@empathyco/x-components 3.0.0-alpha.110 → 3.0.0-alpha.113
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 +38 -0
- package/README.md +1 -1
- package/docs/API-reference/api/index.md +1 -1
- package/docs/API-reference/api/x-adapter-platform.bannermutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.facetconfig.md +21 -0
- package/docs/API-reference/api/x-adapter-platform.facetconfig.modelname.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.facetconfig.schema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.facetmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.facetsconfig.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.getfacetconfig.md +26 -0
- package/docs/API-reference/api/x-adapter-platform.hierarchicalfiltermutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.identifierresultsendpointadapter.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.identifierresultsrequestmapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.identifierresultsrequestschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.identifierresultsresponsemapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.identifierresultsresponseschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.md +102 -0
- package/docs/API-reference/api/x-adapter-platform.nextqueriesendpointadapter.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.nextqueriesrequestmapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.nextqueriesrequestmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.nextqueriesresponsemapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.nextqueriesresponsemutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.nextquerymutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.numberfiltermutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.identifierresults.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.nextqueries.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.popularsearches.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.querysuggestions.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.recommendations.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.relatedtags.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.search.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformadapter.tagging.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformbanner.id.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformbanner.image_url.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformbanner.md +24 -0
- package/docs/API-reference/api/x-adapter-platform.platformbanner.tagging.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformbanner.title.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformbanner.url.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformfacet.facet.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformfacet.md +21 -0
- package/docs/API-reference/api/x-adapter-platform.platformfacet.values.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformfilter.count.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformfilter.filter.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformfilter.id.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformfilter.md +23 -0
- package/docs/API-reference/api/x-adapter-platform.platformfilter.value.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformhierarchicalfilter.children.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformhierarchicalfilter.md +21 -0
- package/docs/API-reference/api/x-adapter-platform.platformidentifierresultsrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformidentifierresultsresponse.catalog.md +16 -0
- package/docs/API-reference/api/x-adapter-platform.platformidentifierresultsresponse.md +20 -0
- package/docs/API-reference/api/x-adapter-platform.platformnextqueriesrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformnextqueriesresponse.data.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformnextqueriesresponse.md +20 -0
- package/docs/API-reference/api/x-adapter-platform.platformnextquery.md +22 -0
- package/docs/API-reference/api/x-adapter-platform.platformnextquery.position.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformnextquery.query.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformnextquery.source.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformpopularsearchesrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformpopularsearchesresponse.md +20 -0
- package/docs/API-reference/api/x-adapter-platform.platformpopularsearchesresponse.toptrends.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformpromoted.id.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformpromoted.image_url.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformpromoted.md +24 -0
- package/docs/API-reference/api/x-adapter-platform.platformpromoted.tagging.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformpromoted.title.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformpromoted.url.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformquerysuggestionsrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformquerysuggestionsresponse.md +20 -0
- package/docs/API-reference/api/x-adapter-platform.platformquerysuggestionsresponse.toptrends.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformrecommendationsrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformrecommendationsresponse.md +20 -0
- package/docs/API-reference/api/x-adapter-platform.platformrecommendationsresponse.topclicked.md +14 -0
- package/docs/API-reference/api/x-adapter-platform.platformredirection.id.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformredirection.md +22 -0
- package/docs/API-reference/api/x-adapter-platform.platformredirection.tagging.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformredirection.url.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtag.md +23 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtag.position.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtag.query.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtag.source.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtag.tag.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtagsrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtagsresponse.data.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtagsresponse.md +21 -0
- package/docs/API-reference/api/x-adapter-platform.platformrelatedtagsresponse.status.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformresult.id.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformresult.image.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformresult.md +25 -0
- package/docs/API-reference/api/x-adapter-platform.platformresult.name.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformresult.price.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformresult.tagging.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformresult.url.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformsearchrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.banner.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.catalog.md +19 -0
- package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.direct.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.md +23 -0
- package/docs/API-reference/api/x-adapter-platform.platformsearchresponse.promoted.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformsuggestion.md +20 -0
- package/docs/API-reference/api/x-adapter-platform.platformsuggestion.title_raw.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.add2cart.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.checkout.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.click.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.platformtagging.md +22 -0
- package/docs/API-reference/api/x-adapter-platform.popularsearchesendpointadapter.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.popularsearchesrequestmapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.popularsearchesrequestmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.popularsearchesresponsemapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.popularsearchesresponsemutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.promotedmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.querysuggestionsendpointadapter.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.querysuggestionsrequestmapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.querysuggestionsrequestmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.querysuggestionsresponsemapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.querysuggestionsresponsemutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.recommendationsendpointadapter.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.recommendationsrequestmapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.recommendationsrequestmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.recommendationsresponsemapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.recommendationsresponsemutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.redirectionmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.relatedtagmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.relatedtagsendpointadapter.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.relatedtagsrequestmapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.relatedtagsrequestmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.relatedtagsresponsemapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.relatedtagsresponsemutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.resultschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.searchendpointadapter.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.searchrequestmapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.searchrequestmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.searchresponsefacetsmapper.md +27 -0
- package/docs/API-reference/api/x-adapter-platform.searchresponsemapper.md +21 -0
- package/docs/API-reference/api/x-adapter-platform.searchresponsemutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.simplefiltermutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.suggestionmutableschema.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.taggingendpointadapter.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.taggingrequestmapper.md +11 -0
- package/docs/API-reference/api/x-adapter-platform.taggingrequestmutableschema.md +11 -0
- package/docs/API-reference/api/x-components.addquerytohistoryaction.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsaveidentifierresults.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsaveidentifierresultswire.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsavenextquerieswire.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsavepopularsearches.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsavequerysuggestions.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsaverecommendations.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsaverelatedtagswire.md +1 -1
- package/docs/API-reference/api/x-components.fetchandsavesuggestionswire.md +1 -1
- package/docs/API-reference/api/x-components.historyqueriesgetter.md +1 -1
- package/docs/API-reference/api/x-components.identifierresultsactions.fetchandsaveidentifierresults.md +2 -2
- package/docs/API-reference/api/x-components.identifierresultsactions.fetchidentifierresults.md +2 -2
- package/docs/API-reference/api/x-components.identifierresultsgetters.identifierresultsrequest.md +1 -1
- package/docs/API-reference/api/x-components.identifierresultsgetters.md +1 -1
- package/docs/API-reference/api/x-components.identifierresultsxevents.identifierresultsrequestchanged.md +1 -1
- package/docs/API-reference/api/x-components.identifierresultsxevents.md +1 -1
- package/docs/API-reference/api/x-components.popularsearchesactions.fetchandsavesuggestions.md +2 -2
- package/docs/API-reference/api/x-components.popularsearchesactions.fetchsuggestions.md +2 -2
- package/docs/API-reference/api/x-components.popularsearchesgetters.md +1 -1
- package/docs/API-reference/api/x-components.popularsearchesgetters.request.md +1 -1
- package/docs/API-reference/api/x-components.popularsearchesxevents.md +1 -1
- package/docs/API-reference/api/x-components.popularsearchesxevents.popularsearchesrequestchanged.md +2 -2
- package/docs/API-reference/api/x-components.privatexmoduleoptions.md +1 -1
- package/docs/API-reference/api/x-components.privatexmoduleoptions.storeemitters.md +1 -1
- package/docs/API-reference/api/x-components.querysuggestionsactions.fetchandsavesuggestions.md +2 -2
- package/docs/API-reference/api/x-components.querysuggestionsactions.fetchsuggestions.md +2 -2
- package/docs/API-reference/api/x-components.querysuggestionsgetter.md +1 -1
- package/docs/API-reference/api/x-components.querysuggestionsgetters.md +1 -1
- package/docs/API-reference/api/x-components.querysuggestionsgetters.request.md +1 -1
- package/docs/API-reference/api/x-components.querysuggestionsxevents.md +1 -1
- package/docs/API-reference/api/x-components.querysuggestionsxevents.querysuggestionsrequestchanged.md +1 -1
- package/docs/API-reference/api/x-components.recommendationsactions.fetchandsaverecommendations.md +2 -2
- package/docs/API-reference/api/x-components.recommendationsactions.fetchrecommendations.md +2 -2
- package/docs/API-reference/api/x-components.recommendationsgetters.md +1 -1
- package/docs/API-reference/api/x-components.recommendationsgetters.request.md +1 -1
- package/docs/API-reference/api/x-components.recommendationsxevents.md +1 -1
- package/docs/API-reference/api/x-components.recommendationsxevents.recommendationsrequestchanged.md +1 -1
- package/docs/API-reference/api/x-components.scrollstatepayload.md +1 -1
- package/docs/API-reference/api/x-components.wireparams.md +1 -1
- package/docs/API-reference/api/x-components.xactioncontext.md +1 -1
- package/docs/API-reference/api/x-components.xcomponentaliasapi.md +1 -0
- package/docs/API-reference/api/x-components.xcomponentaliasapi.results.md +13 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +0 -1
- package/docs/API-reference/api/x-components.xplugin.adapter.md +2 -2
- package/docs/API-reference/api/x-components.xplugin.md +3 -5
- package/docs/API-reference/api/x-components.xpluginoptions.adapter.md +1 -1
- package/docs/API-reference/api/x-components.xpluginoptions.md +1 -1
- package/docs/API-reference/components/extra-params/x-components.snippet-config-extra-params.md +4 -4
- package/docs/build-search-ui/web-archetype-development-guide.md +2 -5
- package/docs/build-search-ui/web-x-components-development-guide.md +23 -52
- package/js/plugins/x-emitters.js.map +1 -1
- package/js/plugins/x-plugin.alias.js +3 -0
- package/js/plugins/x-plugin.alias.js.map +1 -1
- package/js/plugins/x-plugin.js +7 -21
- package/js/plugins/x-plugin.js.map +1 -1
- package/js/x-installer/x-installer/x-installer.js +1 -42
- package/js/x-installer/x-installer/x-installer.js.map +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue.js.map +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue_script.vue.js +0 -2
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue_script.vue.js.map +1 -1
- package/js/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.js.map +1 -1
- package/js/x-modules/identifier-results/store/actions/fetch-identifier-results.action.js +1 -1
- package/js/x-modules/identifier-results/store/actions/fetch-identifier-results.action.js.map +1 -1
- package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js +2 -2
- package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map +1 -1
- package/js/x-modules/next-queries/store/actions/fetch-and-save-next-queries.action.js.map +1 -1
- package/js/x-modules/next-queries/store/actions/fetch-next-queries.action.js +1 -1
- package/js/x-modules/next-queries/store/actions/fetch-next-queries.action.js.map +1 -1
- package/js/x-modules/next-queries/store/getters/request.getter.js +1 -1
- package/js/x-modules/next-queries/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/popular-searches/store/actions/fetch-and-save-suggestions.action.js.map +1 -1
- package/js/x-modules/popular-searches/store/actions/fetch-suggestions.action.js +1 -3
- package/js/x-modules/popular-searches/store/actions/fetch-suggestions.action.js.map +1 -1
- package/js/x-modules/popular-searches/store/getters/request.getter.js +1 -1
- package/js/x-modules/popular-searches/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/query-suggestions/store/actions/fetch-and-save-suggestions.action.js.map +1 -1
- package/js/x-modules/query-suggestions/store/actions/fetch-suggestions.action.js +1 -1
- package/js/x-modules/query-suggestions/store/actions/fetch-suggestions.action.js.map +1 -1
- package/js/x-modules/query-suggestions/store/getters/request.getter.js +1 -1
- package/js/x-modules/query-suggestions/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/recommendations/store/actions/fetch-and-save-recommendations.action.js.map +1 -1
- package/js/x-modules/recommendations/store/actions/fetch-recommendations.action.js +1 -3
- package/js/x-modules/recommendations/store/actions/fetch-recommendations.action.js.map +1 -1
- package/js/x-modules/recommendations/store/getters/request.getter.js +1 -1
- package/js/x-modules/recommendations/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/related-tags/store/actions/fetch-and-save-related-tags.action.js.map +1 -1
- package/js/x-modules/related-tags/store/actions/fetch-related-tags.action.js +1 -3
- package/js/x-modules/related-tags/store/actions/fetch-related-tags.action.js.map +1 -1
- package/js/x-modules/related-tags/store/getters/request.getter.js +1 -1
- package/js/x-modules/related-tags/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
- package/js/x-modules/search/store/actions/reset-state.action.js +8 -7
- package/js/x-modules/search/store/actions/reset-state.action.js.map +1 -1
- package/js/x-modules/search/store/getters/request.getter.js +1 -1
- package/js/x-modules/search/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/tagging/store/actions/track.action.js +1 -1
- package/js/x-modules/tagging/store/actions/track.action.js.map +1 -1
- package/package.json +4 -4
- package/report/tsdoc-metadata.json +1 -1
- package/report/x-adapter-platform.api.json +5582 -0
- package/report/x-components.api.json +252 -238
- package/report/x-components.api.md +48 -50
- package/types/adapter/e2e-adapter.d.ts +29 -0
- package/types/adapter/e2e-adapter.d.ts.map +1 -0
- package/types/plugins/x-emitters.d.ts.map +1 -1
- package/types/plugins/x-plugin.alias.d.ts.map +1 -1
- package/types/plugins/x-plugin.d.ts +12 -21
- package/types/plugins/x-plugin.d.ts.map +1 -1
- package/types/plugins/x-plugin.types.d.ts +31 -13
- package/types/plugins/x-plugin.types.d.ts.map +1 -1
- package/types/views/base-config.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts +0 -5
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/x-installer/x-installer/x-installer.d.ts +0 -20
- package/types/x-installer/x-installer/x-installer.d.ts.map +1 -1
- package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts.map +1 -1
- package/types/x-modules/identifier-results/events.types.d.ts +2 -3
- package/types/x-modules/identifier-results/events.types.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.d.ts +2 -2
- package/types/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/emitters.d.ts +1 -1
- package/types/x-modules/identifier-results/store/types.d.ts +4 -5
- package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
- package/types/x-modules/identifier-results/wiring.d.ts +2 -2
- package/types/x-modules/identifier-results/wiring.d.ts.map +1 -1
- package/types/x-modules/next-queries/events.types.d.ts +1 -2
- package/types/x-modules/next-queries/events.types.d.ts.map +1 -1
- package/types/x-modules/next-queries/store/actions/fetch-and-save-next-queries.action.d.ts +1 -1
- package/types/x-modules/next-queries/store/actions/fetch-and-save-next-queries.action.d.ts.map +1 -1
- package/types/x-modules/next-queries/store/emitters.d.ts +1 -1
- package/types/x-modules/next-queries/store/types.d.ts +1 -2
- package/types/x-modules/next-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/next-queries/wiring.d.ts +2 -2
- package/types/x-modules/next-queries/wiring.d.ts.map +1 -1
- package/types/x-modules/popular-searches/events.types.d.ts +3 -4
- package/types/x-modules/popular-searches/events.types.d.ts.map +1 -1
- package/types/x-modules/popular-searches/store/actions/fetch-and-save-suggestions.action.d.ts +2 -2
- package/types/x-modules/popular-searches/store/actions/fetch-and-save-suggestions.action.d.ts.map +1 -1
- package/types/x-modules/popular-searches/store/actions/fetch-suggestions.action.d.ts.map +1 -1
- package/types/x-modules/popular-searches/store/emitters.d.ts +1 -1
- package/types/x-modules/popular-searches/store/types.d.ts +4 -5
- package/types/x-modules/popular-searches/store/types.d.ts.map +1 -1
- package/types/x-modules/popular-searches/wiring.d.ts +1 -1
- package/types/x-modules/query-suggestions/events.types.d.ts +2 -3
- package/types/x-modules/query-suggestions/events.types.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/store/actions/fetch-and-save-suggestions.action.d.ts +2 -2
- package/types/x-modules/query-suggestions/store/actions/fetch-and-save-suggestions.action.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/store/emitters.d.ts +1 -1
- package/types/x-modules/query-suggestions/store/types.d.ts +4 -5
- package/types/x-modules/query-suggestions/store/types.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/wiring.d.ts +2 -2
- package/types/x-modules/query-suggestions/wiring.d.ts.map +1 -1
- package/types/x-modules/recommendations/events.types.d.ts +2 -3
- package/types/x-modules/recommendations/events.types.d.ts.map +1 -1
- package/types/x-modules/recommendations/store/actions/fetch-and-save-recommendations.action.d.ts +2 -2
- package/types/x-modules/recommendations/store/actions/fetch-and-save-recommendations.action.d.ts.map +1 -1
- package/types/x-modules/recommendations/store/actions/fetch-recommendations.action.d.ts.map +1 -1
- package/types/x-modules/recommendations/store/emitters.d.ts +1 -1
- package/types/x-modules/recommendations/store/types.d.ts +4 -5
- package/types/x-modules/recommendations/store/types.d.ts.map +1 -1
- package/types/x-modules/recommendations/wiring.d.ts +1 -1
- package/types/x-modules/related-tags/events.types.d.ts +1 -2
- package/types/x-modules/related-tags/events.types.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/actions/fetch-and-save-related-tags.action.d.ts +1 -1
- package/types/x-modules/related-tags/store/actions/fetch-and-save-related-tags.action.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/actions/fetch-related-tags.action.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/emitters.d.ts +1 -1
- package/types/x-modules/related-tags/store/types.d.ts +1 -2
- package/types/x-modules/related-tags/store/types.d.ts.map +1 -1
- package/types/x-modules/related-tags/wiring.d.ts +2 -2
- package/types/x-modules/related-tags/wiring.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/reset-state.action.d.ts +1 -0
- package/types/x-modules/search/store/actions/reset-state.action.d.ts.map +1 -1
- package/types/x-modules/search/store/types.d.ts +1 -2
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/search/types.d.ts +1 -1
- package/types/x-modules/search/types.d.ts.map +1 -1
- package/docs/API-reference/api/x-adapter.ancestorbinding.default.md +0 -11
- package/docs/API-reference/api/x-adapter.ancestorbinding.md +0 -21
- package/docs/API-reference/api/x-adapter.ancestorbinding.whenanyancestoris.md +0 -11
- package/docs/API-reference/api/x-adapter.ancestorconstantbinding.md +0 -20
- package/docs/API-reference/api/x-adapter.ancestorconstantbinding.toconstantwhenanyancestoris.md +0 -11
- package/docs/API-reference/api/x-adapter.beacontrackingrequestor._constructor_.md +0 -13
- package/docs/API-reference/api/x-adapter.beacontrackingrequestor.md +0 -27
- package/docs/API-reference/api/x-adapter.beacontrackingrequestor.request.md +0 -22
- package/docs/API-reference/api/x-adapter.beforerequest.md +0 -15
- package/docs/API-reference/api/x-adapter.beforerequestcontext.feature.md +0 -11
- package/docs/API-reference/api/x-adapter.beforerequestcontext.md +0 -24
- package/docs/API-reference/api/x-adapter.beforerequestcontext.rawrequest.md +0 -11
- package/docs/API-reference/api/x-adapter.beforerequestcontext.request.md +0 -11
- package/docs/API-reference/api/x-adapter.beforerequestcontext.requestoptions.md +0 -11
- package/docs/API-reference/api/x-adapter.beforerequestcontext.url.md +0 -11
- package/docs/API-reference/api/x-adapter.beforeresponsetransform.md +0 -15
- package/docs/API-reference/api/x-adapter.beforeresponsetransformcontext.md +0 -21
- package/docs/API-reference/api/x-adapter.beforeresponsetransformcontext.rawresponse.md +0 -11
- package/docs/API-reference/api/x-adapter.binding.md +0 -15
- package/docs/API-reference/api/x-adapter.bindingdictionary.md +0 -15
- package/docs/API-reference/api/x-adapter.bindings.md +0 -13
- package/docs/API-reference/api/x-adapter.cacheservice.clear.md +0 -15
- package/docs/API-reference/api/x-adapter.cacheservice.getitem.md +0 -22
- package/docs/API-reference/api/x-adapter.cacheservice.md +0 -23
- package/docs/API-reference/api/x-adapter.cacheservice.removeitem.md +0 -22
- package/docs/API-reference/api/x-adapter.cacheservice.setitem.md +0 -24
- package/docs/API-reference/api/x-adapter.classbinding.md +0 -15
- package/docs/API-reference/api/x-adapter.clicksrecommendationsrequest.md +0 -22
- package/docs/API-reference/api/x-adapter.clicksrecommendationsrequest.productids.md +0 -11
- package/docs/API-reference/api/x-adapter.clicksrecommendationsrequest.section.md +0 -11
- package/docs/API-reference/api/x-adapter.clicksrecommendationsresponse.md +0 -22
- package/docs/API-reference/api/x-adapter.clicksrecommendationsresponse.results.md +0 -11
- package/docs/API-reference/api/x-adapter.clicksrecommendationsresponse.totalresults.md +0 -11
- package/docs/API-reference/api/x-adapter.configchangedlistener.md +0 -13
- package/docs/API-reference/api/x-adapter.constantbinding.md +0 -15
- package/docs/API-reference/api/x-adapter.containerconfigparser._constructor_.md +0 -21
- package/docs/API-reference/api/x-adapter.containerconfigparser.md +0 -26
- package/docs/API-reference/api/x-adapter.containerconfigparser.parse.md +0 -15
- package/docs/API-reference/api/x-adapter.contextualbinding.md +0 -15
- package/docs/API-reference/api/x-adapter.deeppartial.md +0 -17
- package/docs/API-reference/api/x-adapter.default_cache_config.md +0 -18
- package/docs/API-reference/api/x-adapter.default_empathy_adapter_config.md +0 -13
- package/docs/API-reference/api/x-adapter.dependencies.md +0 -70
- package/docs/API-reference/api/x-adapter.dictionary.md +0 -13
- package/docs/API-reference/api/x-adapter.dynamicbinding.md +0 -20
- package/docs/API-reference/api/x-adapter.dynamicbinding.todynamic.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapter._constructor_.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapter.addconfigchangedlistener.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapter.cache.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapter.config.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapter.configchangedlisteners.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapter.getclicksrecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.getnextqueries.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.getqueriesrecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.getrelatedtags.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.getsectionrecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.getsuggestions.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.gettoprecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.getuserrecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.invalidatecache.md +0 -15
- package/docs/API-reference/api/x-adapter.empathyadapter.md +0 -51
- package/docs/API-reference/api/x-adapter.empathyadapter.notifyconfigchangedlisteners.md +0 -15
- package/docs/API-reference/api/x-adapter.empathyadapter.removeconfigchangedlistener.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapter.requestors.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapter.search.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.searchbyid.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapter.setconfig.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapter.track.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder._constructor_.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.adapterclass.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.addclassmapper.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.addclassrequestmapper.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.addhook.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.addmapper.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.addrequestmapper.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.build.md +0 -15
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.completepartialfacetsconfig.md +0 -15
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.config.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.configurator.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.configurecontainer.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.container.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.createmapperclass.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.createrequestmapperclass.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.defaultbindingsconfig.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.enablecache.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.initcontainerbindings.md +0 -15
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.md +0 -65
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.onbeforerequest.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.onbeforeresponsetransformed.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.onresponsetransformed.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.replaceclassmapper.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.replaceclassrequestmapper.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.replacemapper.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.replacerequestmapper.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setenvironment.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setfacetconfig.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setfeatureconfig.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setinstance.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setlang.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setqueryconfig.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setrequestparams.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setresulttrackingconfig.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setscope.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.setuserinfo.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterbuilder.withconfiguration.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyadapterconfig.env.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapterconfig.features.md +0 -13
- package/docs/API-reference/api/x-adapter.empathyadapterconfig.instance.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyadapterconfig.mappings.md +0 -17
- package/docs/API-reference/api/x-adapter.empathyadapterconfig.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyadapterconfig.requestparams.md +0 -15
- package/docs/API-reference/api/x-adapter.empathyadapterconfigchangedlistener.md +0 -15
- package/docs/API-reference/api/x-adapter.empathybanner.id.md +0 -11
- package/docs/API-reference/api/x-adapter.empathybanner.imagename.md +0 -11
- package/docs/API-reference/api/x-adapter.empathybanner.md +0 -24
- package/docs/API-reference/api/x-adapter.empathybanner.title.md +0 -11
- package/docs/API-reference/api/x-adapter.empathybanner.trackable_url.md +0 -11
- package/docs/API-reference/api/x-adapter.empathybanner.url.md +0 -11
- package/docs/API-reference/api/x-adapter.empathybannermapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathybannermapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathybannermapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathybooleanfiltermapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathybooleanfiltermapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathycacheservice._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathycacheservice.clear.md +0 -15
- package/docs/API-reference/api/x-adapter.empathycacheservice.getitem.md +0 -22
- package/docs/API-reference/api/x-adapter.empathycacheservice.hash.md +0 -22
- package/docs/API-reference/api/x-adapter.empathycacheservice.md +0 -39
- package/docs/API-reference/api/x-adapter.empathycacheservice.minutestomilliseconds.md +0 -22
- package/docs/API-reference/api/x-adapter.empathycacheservice.removeitem.md +0 -22
- package/docs/API-reference/api/x-adapter.empathycacheservice.setitem.md +0 -24
- package/docs/API-reference/api/x-adapter.empathycacheservice.storageservice.md +0 -11
- package/docs/API-reference/api/x-adapter.empathycacheservice.transformkey.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyclicksrecommendationsrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyclicksrecommendationsrequest.productid.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyclicksrecommendationsrequestmapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyclicksrecommendationsrequestmapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathydirect.id.md +0 -11
- package/docs/API-reference/api/x-adapter.empathydirect.md +0 -22
- package/docs/API-reference/api/x-adapter.empathydirect.trackable_url.md +0 -11
- package/docs/API-reference/api/x-adapter.empathydirect.url.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyendpointsservice._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyendpointsservice.buildurl.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyendpointsservice.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyfacet.facet.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyfacet.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyfacet.values.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyfacetfiltermapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyfacetfiltermapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyfacetmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyfacetmapper.facetsconfig.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyfacetmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyfacetmapper.md +0 -33
- package/docs/API-reference/api/x-adapter.empathyfilter.count.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyfilter.filter.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyfilter.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyfilter.selected.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyfilter.value.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyfilter.values.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyhierarchicalfacetmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyhierarchicalfacetmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyhierarchicalfacetmapper.mapdeepfilter.md +0 -25
- package/docs/API-reference/api/x-adapter.empathyhierarchicalfacetmapper.mapfilter.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyhierarchicalfacetmapper.mapfilterstree.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyhierarchicalfacetmapper.md +0 -35
- package/docs/API-reference/api/x-adapter.empathyhierarchicalfiltermapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyhierarchicalfiltermapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathynextqueriesrequest.lang.md +0 -11
- package/docs/API-reference/api/x-adapter.empathynextqueriesrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.empathynextqueriesrequest.q.md +0 -11
- package/docs/API-reference/api/x-adapter.empathynextquery.md +0 -21
- package/docs/API-reference/api/x-adapter.empathynextquery.query.md +0 -11
- package/docs/API-reference/api/x-adapter.empathynextquery.source.md +0 -11
- package/docs/API-reference/api/x-adapter.empathynextquerymapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathynextquerymapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathynumberrangefacetmapper._constructor_.md +0 -21
- package/docs/API-reference/api/x-adapter.empathynumberrangefacetmapper.facetsconfig.md +0 -11
- package/docs/API-reference/api/x-adapter.empathynumberrangefacetmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathynumberrangefacetmapper.mapfilter.md +0 -11
- package/docs/API-reference/api/x-adapter.empathynumberrangefacetmapper.mapfilters.md +0 -25
- package/docs/API-reference/api/x-adapter.empathynumberrangefacetmapper.md +0 -35
- package/docs/API-reference/api/x-adapter.empathynumberrangefiltermapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathynumberrangefiltermapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathypartialresult.docs.md +0 -11
- package/docs/API-reference/api/x-adapter.empathypartialresult.md +0 -22
- package/docs/API-reference/api/x-adapter.empathypartialresult.numfound.md +0 -11
- package/docs/API-reference/api/x-adapter.empathypartialresult.suggestion.md +0 -11
- package/docs/API-reference/api/x-adapter.empathypartialresultmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathypartialresultmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathypartialresultmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathypromoted.id.md +0 -11
- package/docs/API-reference/api/x-adapter.empathypromoted.imagename.md +0 -11
- package/docs/API-reference/api/x-adapter.empathypromoted.md +0 -24
- package/docs/API-reference/api/x-adapter.empathypromoted.title.md +0 -11
- package/docs/API-reference/api/x-adapter.empathypromoted.trackable_url.md +0 -11
- package/docs/API-reference/api/x-adapter.empathypromoted.url.md +0 -11
- package/docs/API-reference/api/x-adapter.empathypromotedmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathypromotedmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathypromotedmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyqueriesrecommendationsrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyqueriesrecommendationsrequest.query.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyqueriesrecommendationsrequestmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyqueriesrecommendationsrequestmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyqueriesrecommendationsrequestmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyqueryablerequestmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyqueryablerequestmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyqueryablerequestmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyredirectionmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyredirectionmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyredirectionmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyrelatedtag.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyrelatedtag.query.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyrelatedtag.source.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyrelatedtag.tag.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyrelatedtagmapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyrelatedtagmapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyrelatedtagsrequest.lang.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyrelatedtagsrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyrelatedtagsrequest.q.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyrequestfiltersmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyrequestfiltersmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyrequestfiltersmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyrequestfilterssolrsyntaxmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyrequestfilterssolrsyntaxmapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyrequestfilterssolrsyntaxmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyrequestparamsmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyrequestparamsmapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyrequestparamsmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyrequestquerymapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathyrequestquerymapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyrequestquerymapper.md +0 -28
- package/docs/API-reference/api/x-adapter.empathyrequestquerymapper.normalizequery.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyrequestsortmapper.map.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyrequestsortmapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyresult.eb_sku.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresult.ebtagging.md +0 -16
- package/docs/API-reference/api/x-adapter.empathyresult.id.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresult.image.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresult.iswishlisted.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresult.md +0 -29
- package/docs/API-reference/api/x-adapter.empathyresult.name.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresult.originalprice.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresult.price.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresult.rating.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresult.url.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyresultmapper._constructor_.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyresultmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyresultmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathyresultquerytaggingmapper._constructor_.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyresultquerytaggingmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathyresultquerytaggingmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathysearchbyidrequest.catalogue.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchbyidrequest.lang.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchbyidrequest.md +0 -25
- package/docs/API-reference/api/x-adapter.empathysearchbyidrequest.q.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchbyidrequest.rows.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchbyidrequest.store.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchbyidrequest.warehouse.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.catalogue.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.filter.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.lang.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.md +0 -31
- package/docs/API-reference/api/x-adapter.empathysearchrequest.origin.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.q.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.rows.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.scope.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.sort.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.sortdirection.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.start.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.store.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequest.warehouse.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysearchrequestmapper._constructor_.md +0 -22
- package/docs/API-reference/api/x-adapter.empathysearchrequestmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathysearchrequestmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathysectionrecommendationsrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.empathysectionrecommendationsrequest.section.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysectionrecommendationsrequestmapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathysectionrecommendationsrequestmapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathysimplefacetmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathysimplefacetmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathysimplefacetmapper.mapfilter.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysimplefacetmapper.mapfilters.md +0 -24
- package/docs/API-reference/api/x-adapter.empathysimplefacetmapper.md +0 -34
- package/docs/API-reference/api/x-adapter.empathysimplefiltermapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathysimplefiltermapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathysimplerequestmapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathysimplerequestmapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathysimplevaluemapper.map.md +0 -22
- package/docs/API-reference/api/x-adapter.empathysimplevaluemapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathysuggestion.facets.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysuggestion.md +0 -22
- package/docs/API-reference/api/x-adapter.empathysuggestion.title.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysuggestion.title_raw.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysuggestionfacetsmapper._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.empathysuggestionfacetsmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathysuggestionfacetsmapper.md +0 -27
- package/docs/API-reference/api/x-adapter.empathysuggestionmapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.empathysuggestionmapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathysuggestionsrequest.catalogue.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysuggestionsrequest.lang.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysuggestionsrequest.md +0 -25
- package/docs/API-reference/api/x-adapter.empathysuggestionsrequest.q.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysuggestionsrequest.rows.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysuggestionsrequest.store.md +0 -11
- package/docs/API-reference/api/x-adapter.empathysuggestionsrequest.warehouse.md +0 -11
- package/docs/API-reference/api/x-adapter.empathytaggingmapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathytaggingmapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.catalogue.md +0 -11
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.lang.md +0 -11
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.md +0 -27
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.origin.md +0 -11
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.q.md +0 -11
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.rows.md +0 -11
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.scope.md +0 -11
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.store.md +0 -11
- package/docs/API-reference/api/x-adapter.empathytoprecommendationsrequest.warehouse.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyuserinfomapper.map.md +0 -23
- package/docs/API-reference/api/x-adapter.empathyuserinfomapper.md +0 -21
- package/docs/API-reference/api/x-adapter.empathyuserinforequest.md +0 -22
- package/docs/API-reference/api/x-adapter.empathyuserinforequest.session.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyuserinforequest.user.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyuserinforequest.user_type.md +0 -11
- package/docs/API-reference/api/x-adapter.empathyuserrecommendationsrequest.md +0 -15
- package/docs/API-reference/api/x-adapter.endpointsservice.buildurl.md +0 -22
- package/docs/API-reference/api/x-adapter.endpointsservice.md +0 -20
- package/docs/API-reference/api/x-adapter.entitynames.md +0 -15
- package/docs/API-reference/api/x-adapter.extraparamsrequest.md +0 -13
- package/docs/API-reference/api/x-adapter.facetconfig.isdynamic.md +0 -11
- package/docs/API-reference/api/x-adapter.facetconfig.md +0 -22
- package/docs/API-reference/api/x-adapter.facetconfig.modelname.md +0 -11
- package/docs/API-reference/api/x-adapter.facetconfig.template.md +0 -11
- package/docs/API-reference/api/x-adapter.facetsconfig.default.md +0 -11
- package/docs/API-reference/api/x-adapter.facetsconfig.md +0 -21
- package/docs/API-reference/api/x-adapter.facetsconfig.named.md +0 -11
- package/docs/API-reference/api/x-adapter.featureconfig.cachettlinminutes.md +0 -11
- package/docs/API-reference/api/x-adapter.featureconfig.endpoint.md +0 -11
- package/docs/API-reference/api/x-adapter.featureconfig.md +0 -22
- package/docs/API-reference/api/x-adapter.featureconfig.responsepaths.md +0 -11
- package/docs/API-reference/api/x-adapter.featurenames.md +0 -13
- package/docs/API-reference/api/x-adapter.featurerequestor._constructor_.md +0 -28
- package/docs/API-reference/api/x-adapter.featurerequestor.beforerequest.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.beforeresponsetransformed.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.config.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.endpointsservice.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.feature.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.featureconfig.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.httpclient.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.maprequest.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.md +0 -45
- package/docs/API-reference/api/x-adapter.featurerequestor.request.md +0 -23
- package/docs/API-reference/api/x-adapter.featurerequestor.responsemappers.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.responsetransformed.md +0 -11
- package/docs/API-reference/api/x-adapter.featurerequestor.runhooks.md +0 -23
- package/docs/API-reference/api/x-adapter.featurerequestor.transformresponse.md +0 -23
- package/docs/API-reference/api/x-adapter.featurerequestor.transformresponseselection.md +0 -24
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.clicksrecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.md +0 -30
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.nextqueries.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.queriesrecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.relatedtags.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.search.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.searchbyid.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.sectionrecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.suggestions.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.toprecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.track.md +0 -11
- package/docs/API-reference/api/x-adapter.featuresresponsetypes.userrecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.fetchhttpclient._constructor_.md +0 -20
- package/docs/API-reference/api/x-adapter.fetchhttpclient.buildurl.md +0 -23
- package/docs/API-reference/api/x-adapter.fetchhttpclient.cache.md +0 -11
- package/docs/API-reference/api/x-adapter.fetchhttpclient.cancelpreviousrequest.md +0 -22
- package/docs/API-reference/api/x-adapter.fetchhttpclient.createabortcontroller.md +0 -22
- package/docs/API-reference/api/x-adapter.fetchhttpclient.get.md +0 -24
- package/docs/API-reference/api/x-adapter.fetchhttpclient.getrequestoptions.md +0 -23
- package/docs/API-reference/api/x-adapter.fetchhttpclient.md +0 -40
- package/docs/API-reference/api/x-adapter.fetchhttpclient.parseresponse.md +0 -22
- package/docs/API-reference/api/x-adapter.fetchhttpclient.requestsabortcontrollers.md +0 -11
- package/docs/API-reference/api/x-adapter.fetchhttpclient.storeincache.md +0 -23
- package/docs/API-reference/api/x-adapter.filterablerequest.filters.md +0 -11
- package/docs/API-reference/api/x-adapter.filterablerequest.md +0 -20
- package/docs/API-reference/api/x-adapter.filtervaluemapperparams.config.md +0 -11
- package/docs/API-reference/api/x-adapter.filtervaluemapperparams.filter.md +0 -11
- package/docs/API-reference/api/x-adapter.filtervaluemapperparams.md +0 -25
- package/docs/API-reference/api/x-adapter.httpclient.get.md +0 -24
- package/docs/API-reference/api/x-adapter.httpclient.md +0 -20
- package/docs/API-reference/api/x-adapter.mapfn.md +0 -15
- package/docs/API-reference/api/x-adapter.mapper.map.md +0 -24
- package/docs/API-reference/api/x-adapter.mapper.md +0 -20
- package/docs/API-reference/api/x-adapter.maprequest.md +0 -15
- package/docs/API-reference/api/x-adapter.mapresponse.md +0 -15
- package/docs/API-reference/api/x-adapter.md +0 -178
- package/docs/API-reference/api/x-adapter.newable.md +0 -13
- package/docs/API-reference/api/x-adapter.nextqueriesrequest.md +0 -15
- package/docs/API-reference/api/x-adapter.nextqueriesresponse.md +0 -20
- package/docs/API-reference/api/x-adapter.nextqueriesresponse.nextqueries.md +0 -11
- package/docs/API-reference/api/x-adapter.pageablerequest.md +0 -21
- package/docs/API-reference/api/x-adapter.pageablerequest.rows.md +0 -11
- package/docs/API-reference/api/x-adapter.pageablerequest.start.md +0 -11
- package/docs/API-reference/api/x-adapter.parentbinding.default.md +0 -11
- package/docs/API-reference/api/x-adapter.parentbinding.md +0 -21
- package/docs/API-reference/api/x-adapter.parentbinding.wheninjectedinto.md +0 -11
- package/docs/API-reference/api/x-adapter.parentconstantbinding.md +0 -20
- package/docs/API-reference/api/x-adapter.parentconstantbinding.toconstantwheninjectedinto.md +0 -11
- package/docs/API-reference/api/x-adapter.pipemappers.md +0 -24
- package/docs/API-reference/api/x-adapter.primitive.md +0 -13
- package/docs/API-reference/api/x-adapter.queriesrecommendationsrequest.md +0 -22
- package/docs/API-reference/api/x-adapter.queriesrecommendationsrequest.queries.md +0 -11
- package/docs/API-reference/api/x-adapter.queriesrecommendationsrequest.section.md +0 -11
- package/docs/API-reference/api/x-adapter.queriesrecommendationsresponse.md +0 -22
- package/docs/API-reference/api/x-adapter.queriesrecommendationsresponse.results.md +0 -11
- package/docs/API-reference/api/x-adapter.queriesrecommendationsresponse.totalresults.md +0 -11
- package/docs/API-reference/api/x-adapter.queryablerequest.md +0 -20
- package/docs/API-reference/api/x-adapter.queryablerequest.query.md +0 -11
- package/docs/API-reference/api/x-adapter.queryconfig.maxlength.md +0 -11
- package/docs/API-reference/api/x-adapter.queryconfig.maxwords.md +0 -11
- package/docs/API-reference/api/x-adapter.queryconfig.md +0 -21
- package/docs/API-reference/api/x-adapter.relatedtagsrequest.md +0 -15
- package/docs/API-reference/api/x-adapter.relatedtagsresponse.md +0 -20
- package/docs/API-reference/api/x-adapter.relatedtagsresponse.relatedtags.md +0 -11
- package/docs/API-reference/api/x-adapter.requesterror._constructor_.md +0 -21
- package/docs/API-reference/api/x-adapter.requesterror.md +0 -28
- package/docs/API-reference/api/x-adapter.requesterror.message.md +0 -11
- package/docs/API-reference/api/x-adapter.requesterror.response.md +0 -11
- package/docs/API-reference/api/x-adapter.requestmapper.md +0 -15
- package/docs/API-reference/api/x-adapter.requestmappercontext.feature.md +0 -11
- package/docs/API-reference/api/x-adapter.requestmappercontext.md +0 -22
- package/docs/API-reference/api/x-adapter.requestmappercontext.requestoptions.md +0 -11
- package/docs/API-reference/api/x-adapter.requestmappercontext.url.md +0 -11
- package/docs/API-reference/api/x-adapter.requestoptions.headers.md +0 -11
- package/docs/API-reference/api/x-adapter.requestoptions.md +0 -22
- package/docs/API-reference/api/x-adapter.requestoptions.requestid.md +0 -11
- package/docs/API-reference/api/x-adapter.requestoptions.ttlinminutes.md +0 -11
- package/docs/API-reference/api/x-adapter.requestor.md +0 -20
- package/docs/API-reference/api/x-adapter.requestor.request.md +0 -23
- package/docs/API-reference/api/x-adapter.requestors._constructor_.md +0 -30
- package/docs/API-reference/api/x-adapter.requestors.clicksrecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.md +0 -37
- package/docs/API-reference/api/x-adapter.requestors.nextqueries.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.queriesrecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.relatedtags.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.search.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.searchbyid.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.sectionrecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.suggestions.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.toprecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.track.md +0 -11
- package/docs/API-reference/api/x-adapter.requestors.userrecommendations.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemapper.md +0 -15
- package/docs/API-reference/api/x-adapter.responsemappercontext.md +0 -23
- package/docs/API-reference/api/x-adapter.responsemappercontext.rawrequest.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappercontext.rawresponse.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappercontext.request.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers._constructor_.md +0 -32
- package/docs/API-reference/api/x-adapter.responsemappers.banners.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.facets.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.md +0 -39
- package/docs/API-reference/api/x-adapter.responsemappers.nextqueries.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.partialresults.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.promoteds.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.querytagging.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.redirections.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.relatedtags.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.results.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.showtagging.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.spellcheck.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.suggestions.md +0 -11
- package/docs/API-reference/api/x-adapter.responsemappers.totalresults.md +0 -11
- package/docs/API-reference/api/x-adapter.responsetransformed.md +0 -15
- package/docs/API-reference/api/x-adapter.responsetransformedcontext.md +0 -21
- package/docs/API-reference/api/x-adapter.responsetransformedcontext.response.md +0 -11
- package/docs/API-reference/api/x-adapter.searchadapter.addconfigchangedlistener.md +0 -22
- package/docs/API-reference/api/x-adapter.searchadapter.getclicksrecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.getnextqueries.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.getqueriesrecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.getrelatedtags.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.getsectionrecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.getsuggestions.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.gettoprecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.getuserrecommendations.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.invalidatecache.md +0 -15
- package/docs/API-reference/api/x-adapter.searchadapter.md +0 -34
- package/docs/API-reference/api/x-adapter.searchadapter.removeconfigchangedlistener.md +0 -22
- package/docs/API-reference/api/x-adapter.searchadapter.search.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.searchbyid.md +0 -23
- package/docs/API-reference/api/x-adapter.searchadapter.setconfig.md +0 -22
- package/docs/API-reference/api/x-adapter.searchadapter.track.md +0 -22
- package/docs/API-reference/api/x-adapter.searchbyidrequest.md +0 -15
- package/docs/API-reference/api/x-adapter.searchbyidresponse.md +0 -20
- package/docs/API-reference/api/x-adapter.searchbyidresponse.results.md +0 -11
- package/docs/API-reference/api/x-adapter.searchrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.searchrequest.sort.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.banners.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.facets.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.md +0 -28
- package/docs/API-reference/api/x-adapter.searchresponse.partialresults.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.promoteds.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.querytagging.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.redirections.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.results.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.spellcheck.md +0 -11
- package/docs/API-reference/api/x-adapter.searchresponse.totalresults.md +0 -11
- package/docs/API-reference/api/x-adapter.sectionrecommendationsrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.sectionrecommendationsrequest.section.md +0 -11
- package/docs/API-reference/api/x-adapter.sectionrecommendationsresponse.md +0 -21
- package/docs/API-reference/api/x-adapter.sectionrecommendationsresponse.results.md +0 -11
- package/docs/API-reference/api/x-adapter.simpleconstantbinding.md +0 -20
- package/docs/API-reference/api/x-adapter.simpleconstantbinding.toconstant.md +0 -11
- package/docs/API-reference/api/x-adapter.suggestionsrequest.md +0 -15
- package/docs/API-reference/api/x-adapter.suggestionsresponse.md +0 -20
- package/docs/API-reference/api/x-adapter.suggestionsresponse.suggestions.md +0 -11
- package/docs/API-reference/api/x-adapter.toprecommendationsrequest.md +0 -15
- package/docs/API-reference/api/x-adapter.toprecommendationsresponse.md +0 -20
- package/docs/API-reference/api/x-adapter.toprecommendationsresponse.results.md +0 -11
- package/docs/API-reference/api/x-adapter.trackablerequest.md +0 -20
- package/docs/API-reference/api/x-adapter.trackablerequest.origin.md +0 -11
- package/docs/API-reference/api/x-adapter.trackableshowresponse.md +0 -20
- package/docs/API-reference/api/x-adapter.trackableshowresponse.showtagging.md +0 -11
- package/docs/API-reference/api/x-adapter.trackingrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.trackingrequest.params.md +0 -11
- package/docs/API-reference/api/x-adapter.trackingrequest.url.md +0 -11
- package/docs/API-reference/api/x-adapter.trackingresultconfig.add2cart.md +0 -11
- package/docs/API-reference/api/x-adapter.trackingresultconfig.checkout.md +0 -11
- package/docs/API-reference/api/x-adapter.trackingresultconfig.click.md +0 -11
- package/docs/API-reference/api/x-adapter.trackingresultconfig.md +0 -22
- package/docs/API-reference/api/x-adapter.usercontextrequest.md +0 -22
- package/docs/API-reference/api/x-adapter.usercontextrequest.session.md +0 -11
- package/docs/API-reference/api/x-adapter.usercontextrequest.user.md +0 -11
- package/docs/API-reference/api/x-adapter.usercontextrequest.usertype.md +0 -11
- package/docs/API-reference/api/x-adapter.userrecommendationsrequest.md +0 -21
- package/docs/API-reference/api/x-adapter.userrecommendationsrequest.section.md +0 -11
- package/docs/API-reference/api/x-adapter.userrecommendationsresponse.md +0 -22
- package/docs/API-reference/api/x-adapter.userrecommendationsresponse.results.md +0 -11
- package/docs/API-reference/api/x-adapter.userrecommendationsresponse.totalresults.md +0 -11
- package/docs/API-reference/api/x-components.xeventstypes.adapterconfigchanged.md +0 -13
- package/report/x-adapter.api.json +0 -23458
- package/types/adapter/mocked-adapter.d.ts +0 -18
- package/types/adapter/mocked-adapter.d.ts.map +0 -1
- package/types/adapter/real-adapter.d.ts +0 -2
- package/types/adapter/real-adapter.d.ts.map +0 -1
- package/types/adapter/util.d.ts +0 -12
- package/types/adapter/util.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-plugin.js","sources":["../../../src/plugins/x-plugin.ts"],"sourcesContent":["import { SearchAdapter } from '@empathyco/x-adapter';\nimport { deepMerge } from '@empathyco/x-deep-merge';\nimport { forEach, Dictionary } from '@empathyco/x-utils';\nimport { PluginObject, VueConstructor } from 'vue';\nimport Vuex, { Module, Store } from 'vuex';\nimport { FILTERS_REGISTRY } from '../filters/filters.registry';\nimport { AnyXStoreModule, RootXStoreState } from '../store/store.types';\nimport { cleanGettersProxyCache } from '../store/utils/getters-proxy.utils';\nimport { RootXStoreModule } from '../store/x.module';\nimport { AnyWire } from '../wiring/wiring.types';\nimport { AnyXModule, XModuleName } from '../x-modules/x-modules.types';\nimport { bus } from './x-bus';\nimport { XBus } from './x-bus.types';\nimport { registerStoreEmitters } from './x-emitters';\nimport { createXComponentAPIMixin } from './x-plugin.mixin';\nimport { AnyXStoreModuleOption, XModuleOptions, XPluginOptions } from './x-plugin.types';\nimport { assertXPluginOptionsAreValid } from './x-plugin.utils';\n\n/**\n * Vue plugin that initializes the properties needed by the x-components, and exposes the events bus\n * and the adapter after it has been installed.\n *\n * @public\n */\nexport class XPlugin implements PluginObject<XPluginOptions> {\n /**\n * {@link @empathyco/x-adapter#SearchAdapter | SearchAdapter} Is the middleware between\n * the components and our API where data can be mapped to client needs.\n * This property is only available after installing the plugin.\n *\n * @returns The installed adapter.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get adapter(): SearchAdapter {\n return this.getInstance().adapter;\n }\n\n /**\n * Exposed {@link XBus}, so any kind of application can subscribe to {@link XEventsTypes}\n * without having to pass through a component.\n * This property is only available after installing the plugin.\n *\n * @returns The installed bus.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get bus(): XBus {\n return this.getInstance().bus;\n }\n\n /**\n * {@link https://vuex.vuejs.org | Vuex Store} Is the place where all shared data\n * is saved.\n *\n * @returns The installed store.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get store(): Store<RootXStoreState> {\n return this.getInstance().store;\n }\n\n /**\n * Safely retrieves the installed instance of the XPlugin.\n *\n * @returns The installed instance of the XPlugin.\n * @throws If this method is called before calling `Vue.use(xPlugin)`.\n * @internal\n */\n protected static getInstance(): XPlugin {\n if (!this.instance) {\n throw Error(\"XPlugin must be installed before accessing it's API.\");\n }\n return this.instance;\n }\n\n /**\n * Record of modules that have been tried to be installed before the installation of the plugin.\n *\n * @internal\n */\n protected static pendingXModules: Partial<Record<XModuleName, AnyXModule>> = {};\n\n /**\n * Instance of the installed plugin. Used to expose the bus and the adapter.\n *\n * @internal\n */\n protected static instance?: XPlugin;\n\n /**\n * Bus for retrieving the observables when registering the wiring.\n *\n * @internal\n */\n protected bus: XBus;\n\n /**\n * Adapter for the API, responsible for transforming requests and responses.\n *\n * @internal\n */\n protected adapter!: SearchAdapter;\n\n /**\n * Set of the already installed {@link XModule | XModules} to avoid re-registering them.\n *\n * @internal\n */\n protected installedXModules = new Set<string>();\n\n /**\n * True if the plugin has been installed in a Vue instance, in this case\n * {@link XModule |Xmodules} will be installed immediately. False otherwise, in this case\n * {@link XModule | XModules} will be installed lazily when the {@link XPlugin#install} method\n * is called.\n *\n * @internal\n */\n protected isInstalled = false;\n\n /**\n * The install options of the plugin, where all the customization of\n * {@link XModule | XModules} is done.\n *\n * @internal\n */\n protected options!: XPluginOptions;\n\n /**\n * The Vuex store, to pass to the wires for its registration, and to register the store\n * modules on it.\n *\n * @internal\n */\n protected store!: Store<any>;\n /**\n * The global Vue, passed by the install method. Used to apply the global mixin\n * {@link createXComponentAPIMixin}, and install the {@link https://vuex.vuejs.org/ | Vuex}\n * plugin.\n *\n * @internal\n */\n protected vue!: VueConstructor;\n\n /**\n * Creates a new instance of the XPlugin with the given bus passed as parameter.\n *\n * @param bus - The {@link XBus} implementation to use for the plugin.\n *\n * @public\n */\n public constructor(bus: XBus) {\n this.bus = bus;\n }\n\n /**\n * If the plugin has already been installed, it immediately registers a {@link XModule}. If it\n * has not been installed yet, it stores the module in a list until the plugin is installed.\n *\n * @param xModule - The module to register.\n *\n * @public\n */\n static registerXModule(xModule: AnyXModule): void {\n if (this.instance) {\n this.instance.registerXModule(xModule);\n } else {\n this.lazyRegisterXModule(xModule);\n }\n }\n\n /**\n * Utility method for resetting the installed instance of the plugin.\n *\n * @remarks Use only for testing.\n *\n * @internal\n */\n static resetInstance(): void {\n cleanGettersProxyCache();\n this.instance = undefined;\n }\n\n /**\n * Stores the {@link XModule} in a dictionary, so it can be registered later in the install\n * process.\n *\n * @param xModule - The module to register.\n *\n * @internal\n */\n protected static lazyRegisterXModule(xModule: AnyXModule): void {\n this.pendingXModules[xModule.name] = xModule;\n }\n\n /**\n * Installs the plugin into the Vue instance.\n *\n * @param vue - The GlobalVue object.\n * @param options - The options to install this plugin with.\n * @throws If the XPlugin has already been installed, or the options are not valid.\n *\n * @internal\n */\n install(vue: VueConstructor, options?: XPluginOptions): void {\n if (this.isInstalled) {\n throw new Error('XPlugin has already been installed');\n }\n assertXPluginOptionsAreValid(options);\n XPlugin.instance = this;\n this.vue = vue;\n this.options = options;\n this.adapter = options.adapter;\n this.createAdapterConfigChangedListener();\n this.registerStore();\n this.applyMixins();\n this.registerFilters();\n this.registerInitialModules();\n this.registerPendingXModules();\n this.isInstalled = true;\n }\n\n /**\n * Performs the registration of a {@link XModule}.\n *\n * @param xModule - The module to register.\n *\n * @internal\n */\n protected registerXModule(xModule: AnyXModule): void {\n if (!this.installedXModules.has(xModule.name)) {\n const customizedXModule = this.customizeXModule(xModule);\n this.registerStoreModule(customizedXModule);\n this.registerStoreEmitters(customizedXModule);\n // The wiring must be registered after the store emitters\n // to allow lazy loaded modules work properly.\n this.registerWiring(customizedXModule);\n this.installedXModules.add(xModule.name);\n }\n }\n\n /**\n * Performs a customization of a {@link XModule} using the XPlugin public and private options.\n *\n * @param xModule - The module to customize.\n * @returns The customized xModule.\n *\n * @internal\n */\n protected customizeXModule({\n name,\n wiring,\n storeModule,\n storeEmitters,\n ...restXModule\n }: AnyXModule): AnyXModule {\n const { wiring: wiringOptions, config }: XModuleOptions<XModuleName> =\n this.options.xModules?.[name] ?? {};\n\n const { storeModule: storeModuleOptions, storeEmitters: emittersOptions } =\n this.options.__PRIVATE__xModules?.[name] ?? {};\n\n return {\n name,\n wiring: wiringOptions ? deepMerge({}, wiring, wiringOptions) : wiring,\n storeModule: this.customizeStoreModule(storeModule, storeModuleOptions ?? {}, config),\n storeEmitters: emittersOptions\n ? deepMerge({}, storeEmitters, emittersOptions)\n : storeEmitters,\n ...restXModule\n };\n }\n\n /**\n * Performs the registration of the wiring, retrieving the observable for each event, and\n * executing each wire.\n *\n * @param xModule - The {@link XModule} to register its wiring.\n *\n * @internal\n */\n protected registerWiring({ wiring }: AnyXModule): void {\n forEach(wiring, (event, wires: Dictionary<AnyWire>) => {\n // Obtain the observable\n const observable = this.bus.on(event, true);\n // Register event wires\n forEach(wires, (_, wire) => {\n wire(observable, this.store, this.bus.on.bind(this.bus));\n });\n });\n }\n\n /**\n * Registers a {@link https://vuex.vuejs.org/ | Vuex} store module under the 'x' module.\n *\n * @param xModule - The {@link XModule} to register its Store Module.\n *\n * @internal\n */\n protected registerStoreModule({ name, storeModule }: AnyXModule): void {\n (storeModule as Module<any, any>).namespaced = true;\n this.store.registerModule(['x', name], storeModule);\n }\n\n /**\n * Overrides a {@link https://vuex.vuejs.org/ | Vuex} store module definition.\n *\n * Priority of configuration merging.\n * 1st {@link XPluginOptions.xModules | xModules XPlugin option}.\n * 2nd {@link XPluginOptions.__PRIVATE__xModules | Private xModules XPlugin option}.\n * 3rd {@link XStoreModule.state | Default state of the xModule}.\n *\n * @param defaultModule - The default store module to override.\n * @param moduleOptions - The state, actions, mutations and getters to override the defaultModule.\n * @param configOptions - The state config to override the moduleOptions.\n * @returns The {@link XStoreModule} customized.\n *\n * @internal\n */\n protected customizeStoreModule(\n { state: defaultState, ...actionsGettersMutations }: AnyXStoreModule,\n { state: xModuleState, ...newActionsGettersMutations }: AnyXStoreModuleOption,\n configOptions: unknown\n ): AnyXStoreModule {\n const configOptionsObject = configOptions ? { config: configOptions } : {};\n const customizedModule = deepMerge({}, actionsGettersMutations, newActionsGettersMutations);\n customizedModule.state = deepMerge(defaultState(), xModuleState, configOptionsObject);\n return customizedModule;\n }\n\n /**\n * Registers the store emitters, making them emit the event when the part of the state selected\n * changes.\n *\n * @param xModule - The {@link XModule} to register its Store Emitters.\n *\n * @internal\n */\n protected registerStoreEmitters(xModule: AnyXModule): void {\n registerStoreEmitters(xModule, this.bus, this.store);\n }\n\n /**\n * Registers the {@link https://vuex.vuejs.org/ | Vuex} store. If the store has not been passed\n * through the {@link XPluginOptions} object, it creates one, and injects it in the Vue\n * prototype. Then it register an x module in the store, to safe scope all the\n * {@link XModule | XModules} dynamically installed.\n *\n * @internal\n */\n protected registerStore(): void {\n this.vue.use(Vuex); // We can safely install Vuex because if it is already installed Vue\n // will simply ignore it\n this.store =\n this.options.store ??\n new Store({\n strict: process.env.NODE_ENV !== 'production'\n });\n if (!this.options.store) {\n this.vue.prototype.$store = this.store;\n }\n this.store.registerModule('x', RootXStoreModule);\n }\n\n /**\n * Applies the {@link createXComponentAPIMixin} mixin in the global Vue.\n *\n * @internal\n */\n protected applyMixins(): void {\n this.vue.mixin(createXComponentAPIMixin(this.bus));\n }\n\n /**\n * Registers the initial {@link XModule | XModules} during the {@link XPlugin} installation.\n *\n * @internal\n */\n protected registerInitialModules(): void {\n this.options.initialXModules?.forEach(xModule => {\n this.registerXModule(xModule);\n });\n }\n\n /**\n * Registers the pending {@link XModule | XModules}, that requested to be registered before the\n * installation of the plugin.\n *\n * @internal\n */\n protected registerPendingXModules(): void {\n forEach(XPlugin.pendingXModules, (_, xModule) => {\n this.registerXModule(xModule);\n });\n XPlugin.pendingXModules = {};\n }\n\n /**\n * If the received adapter supports it, it registers a listener to emit the\n * {@link XEventsTypes.AdapterConfigChanged} event whenever the config of it changes.\n *\n * @internal\n */\n protected createAdapterConfigChangedListener(): void {\n this.options.adapter.addConfigChangedListener?.(newAdapterConfig => {\n this.bus.emit('AdapterConfigChanged', newAdapterConfig);\n });\n }\n\n /**\n * Registers filters globally.\n *\n * @internal\n */\n protected registerFilters(): void {\n forEach(FILTERS_REGISTRY, (filterName, filterFunction) =>\n this.vue.filter(filterName, filterFunction)\n );\n }\n}\n\n/**\n * Vue plugin that modifies each component instance, extending them with the\n * {@link XComponentAPI | X Component API }.\n *\n * @example\n * Minimal installation example. A search adapter is needed for the plugin to work, and connect to\n * the API.\n * ```typescript\n * const adapter = new EmpathyAdapterBuilder()\n * .withConfiguration({instance: 'my-instance-id'})\n * .build();\n * Vue.use(xPlugin, { adapter });\n * ```\n *\n * @example\n * If you are using {@link https://vuex.vuejs.org/ | Vuex} in your project you must install its\n * plugin, and instantiate an store before installing the XPlugin:\n * ```typescript\n * Vue.use(Vuex);\n * const store = new Store({ ... });\n * Vue.use(xPlugin, { adapter, store });\n * ```\n * @public\n */\nexport const xPlugin = new XPlugin(bus);\n"],"names":[],"mappings":";;;;;;;;;;;AAkBA;;;;;;MAMa,OAAO;;;;;;;;IAiIlB,YAAmB,GAAS;;;;;;QA3ClB,sBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;;;;;;;;;QAUtC,gBAAW,GAAG,KAAK,CAAC;QAkC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;KAChB;;;;;;;;;;IAzHM,WAAW,OAAO;QACvB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC;KACnC;;;;;;;;;;IAWM,WAAW,GAAG;QACnB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC;KAC/B;;;;;;;;;IAUM,WAAW,KAAK;QACrB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC;KACjC;;;;;;;;IASS,OAAO,WAAW;QAC1B,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,MAAM,KAAK,CAAC,sDAAsD,CAAC,CAAC;SACrE;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;;;;;;;;;IA0FD,OAAO,eAAe,CAAC,OAAmB;QACxC,IAAI,IAAI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\nimport { forEach, Dictionary } from '@empathyco/x-utils';\nimport { PluginObject, VueConstructor } from 'vue';\nimport Vuex, { Module, Store } from 'vuex';\nimport { PlatformAdapter } from '@empathyco/x-adapter-platform';\nimport { FILTERS_REGISTRY } from '../filters/filters.registry';\nimport { AnyXStoreModule, RootXStoreState } from '../store/store.types';\nimport { cleanGettersProxyCache } from '../store/utils/getters-proxy.utils';\nimport { RootXStoreModule } from '../store/x.module';\nimport { AnyWire } from '../wiring/wiring.types';\nimport { AnyXModule, XModuleName } from '../x-modules/x-modules.types';\nimport { bus } from './x-bus';\nimport { XBus } from './x-bus.types';\nimport { registerStoreEmitters } from './x-emitters';\nimport { createXComponentAPIMixin } from './x-plugin.mixin';\nimport { AnyXStoreModuleOption, XModuleOptions, XPluginOptions } from './x-plugin.types';\nimport { assertXPluginOptionsAreValid } from './x-plugin.utils';\n\n/**\n * Vue plugin that initializes the properties needed by the x-components, and exposes the events bus\n * and the adapter after it has been installed.\n *\n * @public\n */\nexport class XPlugin implements PluginObject<XPluginOptions> {\n /**\n * {@link @empathyco/x-adapter-platform#PlatformAdapter | PlatformAdapter} Is the middleware\n * between the components and our API where data can be mapped to client needs.\n * This property is only available after installing the plugin.\n *\n * @returns The installed adapter.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get adapter(): PlatformAdapter {\n return this.getInstance().adapter;\n }\n\n /**\n * Exposed {@link XBus}, so any kind of application can subscribe to {@link XEventsTypes}\n * without having to pass through a component.\n * This property is only available after installing the plugin.\n *\n * @returns The installed bus.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get bus(): XBus {\n return this.getInstance().bus;\n }\n\n /**\n * {@link https://vuex.vuejs.org | Vuex Store} Is the place where all shared data\n * is saved.\n *\n * @returns The installed store.\n * @throws If this property is accessed before calling `Vue.use(xPlugin)`.\n * @public\n */\n public static get store(): Store<RootXStoreState> {\n return this.getInstance().store;\n }\n\n /**\n * Safely retrieves the installed instance of the XPlugin.\n *\n * @returns The installed instance of the XPlugin.\n * @throws If this method is called before calling `Vue.use(xPlugin)`.\n * @internal\n */\n protected static getInstance(): XPlugin {\n if (!this.instance) {\n throw Error(\"XPlugin must be installed before accessing it's API.\");\n }\n return this.instance;\n }\n\n /**\n * Record of modules that have been tried to be installed before the installation of the plugin.\n *\n * @internal\n */\n protected static pendingXModules: Partial<Record<XModuleName, AnyXModule>> = {};\n\n /**\n * Instance of the installed plugin. Used to expose the bus and the adapter.\n *\n * @internal\n */\n protected static instance?: XPlugin;\n\n /**\n * Bus for retrieving the observables when registering the wiring.\n *\n * @internal\n */\n protected bus: XBus;\n\n /**\n * Adapter for the API, responsible for transforming requests and responses.\n *\n * @internal\n */\n protected adapter!: PlatformAdapter;\n\n /**\n * Set of the already installed {@link XModule | XModules} to avoid re-registering them.\n *\n * @internal\n */\n protected installedXModules = new Set<string>();\n\n /**\n * True if the plugin has been installed in a Vue instance, in this case\n * {@link XModule |Xmodules} will be installed immediately. False otherwise, in this case\n * {@link XModule | XModules} will be installed lazily when the {@link XPlugin#install} method\n * is called.\n *\n * @internal\n */\n protected isInstalled = false;\n\n /**\n * The installation options of the plugin, where all the customization of\n * {@link XModule | XModules} is done.\n *\n * @internal\n */\n protected options!: XPluginOptions;\n\n /**\n * The Vuex store, to pass to the wires for its registration, and to register the store\n * modules on it.\n *\n * @internal\n */\n protected store!: Store<any>;\n /**\n * The global Vue, passed by the installation method. Used to apply the global mixin\n * {@link createXComponentAPIMixin}, and install the {@link https://vuex.vuejs.org/ | Vuex}\n * plugin.\n *\n * @internal\n */\n protected vue!: VueConstructor;\n\n /**\n * Creates a new instance of the XPlugin with the given bus passed as parameter.\n *\n * @param bus - The {@link XBus} implementation to use for the plugin.\n *\n * @public\n */\n public constructor(bus: XBus) {\n this.bus = bus;\n }\n\n /**\n * If the plugin has already been installed, it immediately registers a {@link XModule}. If it\n * has not been installed yet, it stores the module in a list until the plugin is installed.\n *\n * @param xModule - The module to register.\n *\n * @public\n */\n static registerXModule(xModule: AnyXModule): void {\n if (this.instance) {\n this.instance.registerXModule(xModule);\n } else {\n this.lazyRegisterXModule(xModule);\n }\n }\n\n /**\n * Utility method for resetting the installed instance of the plugin.\n *\n * @remarks Use only for testing.\n *\n * @internal\n */\n static resetInstance(): void {\n cleanGettersProxyCache();\n this.instance = undefined;\n }\n\n /**\n * Stores the {@link XModule} in a dictionary, so it can be registered later in the installation\n * process.\n *\n * @param xModule - The module to register.\n *\n * @internal\n */\n protected static lazyRegisterXModule(xModule: AnyXModule): void {\n this.pendingXModules[xModule.name] = xModule;\n }\n\n /**\n * Installs the plugin into the Vue instance.\n *\n * @param vue - The GlobalVue object.\n * @param options - The options to install this plugin with.\n * @throws If the XPlugin has already been installed, or the options are not valid.\n *\n * @internal\n */\n install(vue: VueConstructor, options?: XPluginOptions): void {\n if (this.isInstalled) {\n throw new Error('XPlugin has already been installed');\n }\n assertXPluginOptionsAreValid(options);\n XPlugin.instance = this;\n this.vue = vue;\n this.options = options;\n this.adapter = options.adapter;\n this.registerStore();\n this.applyMixins();\n this.registerFilters();\n this.registerInitialModules();\n this.registerPendingXModules();\n this.isInstalled = true;\n }\n\n /**\n * Performs the registration of a {@link XModule}.\n *\n * @param xModule - The module to register.\n *\n * @internal\n */\n protected registerXModule(xModule: AnyXModule): void {\n if (!this.installedXModules.has(xModule.name)) {\n const customizedXModule = this.customizeXModule(xModule);\n this.registerStoreModule(customizedXModule);\n this.registerStoreEmitters(customizedXModule);\n // The wiring must be registered after the store emitters\n // to allow lazy loaded modules work properly.\n this.registerWiring(customizedXModule);\n this.installedXModules.add(xModule.name);\n }\n }\n\n /**\n * Performs a customization of a {@link XModule} using the XPlugin public and private options.\n *\n * @param xModule - The module to customize.\n * @returns The customized xModule.\n *\n * @internal\n */\n protected customizeXModule({\n name,\n wiring,\n storeModule,\n storeEmitters,\n ...restXModule\n }: AnyXModule): AnyXModule {\n const { wiring: wiringOptions, config }: XModuleOptions<XModuleName> =\n this.options.xModules?.[name] ?? {};\n\n const { storeModule: storeModuleOptions, storeEmitters: emittersOptions } =\n this.options.__PRIVATE__xModules?.[name] ?? {};\n\n return {\n name,\n wiring: wiringOptions ? deepMerge({}, wiring, wiringOptions) : wiring,\n storeModule: this.customizeStoreModule(storeModule, storeModuleOptions ?? {}, config),\n storeEmitters: emittersOptions\n ? deepMerge({}, storeEmitters, emittersOptions)\n : storeEmitters,\n ...restXModule\n };\n }\n\n /**\n * Performs the registration of the wiring, retrieving the observable for each event, and\n * executing each wire.\n *\n * @param xModule - The {@link XModule} to register its wiring.\n *\n * @internal\n */\n protected registerWiring({ wiring }: AnyXModule): void {\n forEach(wiring, (event, wires: Dictionary<AnyWire>) => {\n // Obtain the observable\n const observable = this.bus.on(event, true);\n // Register event wires\n forEach(wires, (_, wire) => {\n wire(observable, this.store, this.bus.on.bind(this.bus));\n });\n });\n }\n\n /**\n * Registers a {@link https://vuex.vuejs.org/ | Vuex} store module under the 'x' module.\n *\n * @param xModule - The {@link XModule} to register its Store Module.\n *\n * @internal\n */\n protected registerStoreModule({ name, storeModule }: AnyXModule): void {\n (storeModule as Module<any, any>).namespaced = true;\n this.store.registerModule(['x', name], storeModule);\n }\n\n /**\n * Overrides a {@link https://vuex.vuejs.org/ | Vuex} store module definition.\n *\n * Priority of configuration merging.\n * 1st {@link XPluginOptions.xModules | xModules XPlugin option}.\n * 2nd {@link XPluginOptions.__PRIVATE__xModules | Private xModules XPlugin option}.\n * 3rd {@link XStoreModule.state | Default state of the xModule}.\n *\n * @param defaultModule - The default store module to override.\n * @param moduleOptions - The state, actions, mutations and getters to override the defaultModule.\n * @param configOptions - The state config to override the moduleOptions.\n * @returns The {@link XStoreModule} customized.\n *\n * @internal\n */\n protected customizeStoreModule(\n { state: defaultState, ...actionsGettersMutations }: AnyXStoreModule,\n { state: xModuleState, ...newActionsGettersMutations }: AnyXStoreModuleOption,\n configOptions: unknown\n ): AnyXStoreModule {\n const configOptionsObject = configOptions ? { config: configOptions } : {};\n const customizedModule = deepMerge({}, actionsGettersMutations, newActionsGettersMutations);\n customizedModule.state = deepMerge(defaultState(), xModuleState, configOptionsObject);\n return customizedModule;\n }\n\n /**\n * Registers the store emitters, making them emit the event when the part of the state selected\n * changes.\n *\n * @param xModule - The {@link XModule} to register its Store Emitters.\n *\n * @internal\n */\n protected registerStoreEmitters(xModule: AnyXModule): void {\n registerStoreEmitters(xModule, this.bus, this.store);\n }\n\n /**\n * Registers the {@link https://vuex.vuejs.org/ | Vuex} store. If the store has not been passed\n * through the {@link XPluginOptions} object, it creates one, and injects it in the Vue\n * prototype. Then it registers an x module in the store, to safe scope all the\n * {@link XModule | XModules} dynamically installed.\n *\n * @internal\n */\n protected registerStore(): void {\n this.vue.use(Vuex); // We can safely install Vuex because if it is already installed Vue\n // will simply ignore it\n this.store =\n this.options.store ??\n new Store({\n strict: process.env.NODE_ENV !== 'production'\n });\n if (!this.options.store) {\n this.vue.prototype.$store = this.store;\n }\n this.store.registerModule('x', RootXStoreModule);\n }\n\n /**\n * Applies the {@link createXComponentAPIMixin} mixin in the global Vue.\n *\n * @internal\n */\n protected applyMixins(): void {\n this.vue.mixin(createXComponentAPIMixin(this.bus));\n }\n\n /**\n * Registers the initial {@link XModule | XModules} during the {@link XPlugin} installation.\n *\n * @internal\n */\n protected registerInitialModules(): void {\n this.options.initialXModules?.forEach(xModule => {\n this.registerXModule(xModule);\n });\n }\n\n /**\n * Registers the pending {@link XModule | XModules}, that requested to be registered before the\n * installation of the plugin.\n *\n * @internal\n */\n protected registerPendingXModules(): void {\n forEach(XPlugin.pendingXModules, (_, xModule) => {\n this.registerXModule(xModule);\n });\n XPlugin.pendingXModules = {};\n }\n\n /**\n * Registers filters globally.\n *\n * @internal\n */\n protected registerFilters(): void {\n forEach(FILTERS_REGISTRY, (filterName, filterFunction) =>\n this.vue.filter(filterName, filterFunction)\n );\n }\n}\n\n/**\n * Vue plugin that modifies each component instance, extending them with the\n * {@link XComponentAPI | X Component API }.\n *\n * @example\n * Minimal installation example. A search adapter is needed for the plugin to work, and connect to\n * the API.\n * ```typescript\n * import { platformAdapter } from '@empathyco/x-adapter-platform';\n * Vue.use(xPlugin, { adapter: platformAdapter });\n * ```\n *\n * @example\n * If you are using {@link https://vuex.vuejs.org/ | Vuex} in your project you must install its\n * plugin, and instantiate a store before installing the XPlugin:\n * ```typescript\n * Vue.use(Vuex);\n * const store = new Store({ ... });\n * Vue.use(xPlugin, { adapter, store });\n * ```\n * @public\n */\nexport const xPlugin = new XPlugin(bus);\n"],"names":[],"mappings":";;;;;;;;;;;AAkBA;;;;;;MAMa,OAAO;;;;;;;;IAiIlB,YAAmB,GAAS;;;;;;QA3ClB,sBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;;;;;;;;;QAUtC,gBAAW,GAAG,KAAK,CAAC;QAkC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;KAChB;;;;;;;;;;IAzHM,WAAW,OAAO;QACvB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC;KACnC;;;;;;;;;;IAWM,WAAW,GAAG;QACnB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC;KAC/B;;;;;;;;;IAUM,WAAW,KAAK;QACrB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC;KACjC;;;;;;;;IASS,OAAO,WAAW;QAC1B,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,MAAM,KAAK,CAAC,sDAAsD,CAAC,CAAC;SACrE;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;;;;;;;;;IA0FD,OAAO,eAAe,CAAC,OAAmB;QACxC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACxC;aAAM;YACL,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;SACnC;KACF;;;;;;;;IASD,OAAO,aAAa;QAClB,sBAAsB,EAAE,CA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C,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;KACpD;;;;;;IAOS,sBAAsB;QAC9B,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,OAAO,CAAC,OAAO;YAC3C,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SAC/B,CAAC,CAAC;KACJ;;;;;;;IAQS,uBAAuB;QAC/B,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,OAAO;YAC1C,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SAC/B,CAAC,CAAC;QACH,OAAO,CAAC,eAAe,GAAG,EAAE,CAAC;KAC9B;;;;;;IAOS,eAAe;QACvB,OAAO,CAAC,gBAAgB,EAAE,CAAC,UAAU,EAAE,cAAc,KACnD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,CAC5C,CAAC;KACH;;AA1UD;;;;;AAKiB,uBAAe,GAA6C,EAAE,CAAC;AAwUlF;;;;;;;;;;;;;;;;;;;;;;MAsBa,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG;;;;"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cleanUndefined, forEach } from '@empathyco/x-utils';
|
|
1
|
+
import { forEach } from '@empathyco/x-utils';
|
|
3
2
|
import Vue from 'vue';
|
|
4
3
|
import { BaseXBus } from '../../plugins/x-bus.js';
|
|
5
4
|
import { XPlugin } from '../../plugins/x-plugin.js';
|
|
6
5
|
import { BaseXAPI } from '../api/base-api.js';
|
|
7
6
|
|
|
8
|
-
const defaultAdapterConfig = {
|
|
9
|
-
env: 'live',
|
|
10
|
-
requestParams: {
|
|
11
|
-
lang: 'es',
|
|
12
|
-
scope: 'default'
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
7
|
/**
|
|
16
8
|
* The purpose of this class is to offer a quick way to initialize the XComponents in a setup
|
|
17
9
|
* project. It allows to receive all the options in {@link InstallXOptions} which is an extension
|
|
@@ -133,8 +125,6 @@ class XInstaller {
|
|
|
133
125
|
}
|
|
134
126
|
async init(snippetConfig = this.retrieveSnippetConfig()) {
|
|
135
127
|
if (snippetConfig) {
|
|
136
|
-
const adapterConfig = this.getAdapterConfig(snippetConfig);
|
|
137
|
-
this.applyConfigToAdapter(adapterConfig);
|
|
138
128
|
const bus = this.createBus();
|
|
139
129
|
const pluginOptions = this.getPluginOptions();
|
|
140
130
|
const plugin = this.installPlugin(pluginOptions, bus);
|
|
@@ -150,26 +140,6 @@ class XInstaller {
|
|
|
150
140
|
}
|
|
151
141
|
return Promise.resolve();
|
|
152
142
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Creates the Adapter Config object using the {@link SnippetConfig} to do it. It also
|
|
155
|
-
* merges the default configuration.
|
|
156
|
-
*
|
|
157
|
-
* @param options - The {@link SnippetConfig}.
|
|
158
|
-
*
|
|
159
|
-
* @returns The Adapter Config object.
|
|
160
|
-
*
|
|
161
|
-
* @internal
|
|
162
|
-
*/
|
|
163
|
-
getAdapterConfig({ instance, env, lang, searchLang, scope }) {
|
|
164
|
-
return deepMerge(defaultAdapterConfig, cleanUndefined({
|
|
165
|
-
instance,
|
|
166
|
-
env,
|
|
167
|
-
requestParams: {
|
|
168
|
-
lang: searchLang ?? lang,
|
|
169
|
-
scope
|
|
170
|
-
}
|
|
171
|
-
}));
|
|
172
|
-
}
|
|
173
143
|
/**
|
|
174
144
|
* Creates the {@link XPluginOptions} object.
|
|
175
145
|
*
|
|
@@ -187,17 +157,6 @@ class XInstaller {
|
|
|
187
157
|
__PRIVATE__xModules
|
|
188
158
|
};
|
|
189
159
|
}
|
|
190
|
-
/**
|
|
191
|
-
* It applies the snippet configuration to the Adapter. Not all the parameters are for the Adapter
|
|
192
|
-
* but they appear destructured to not include them in the `extraParams` parameter.
|
|
193
|
-
*
|
|
194
|
-
* @param adapterConfig - The Adapter config object.
|
|
195
|
-
*
|
|
196
|
-
* @internal
|
|
197
|
-
*/
|
|
198
|
-
applyConfigToAdapter(adapterConfig) {
|
|
199
|
-
this.options.adapter.setConfig?.(adapterConfig);
|
|
200
|
-
}
|
|
201
160
|
/**
|
|
202
161
|
* This method returns the bus instance to be used in the {@link XPlugin} and in the {@link XAPI}.
|
|
203
162
|
* It returns the `bus` parameter in the {@link InstallXOptions} or if not provided, then
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-installer.js","sources":["../../../../src/x-installer/x-installer/x-installer.ts"],"sourcesContent":["import { EmpathyAdapterConfig } from '@empathyco/x-adapter';\nimport { deepMerge } from '@empathyco/x-deep-merge';\nimport { cleanUndefined, DeepPartial, forEach } from '@empathyco/x-utils';\nimport Vue, { PluginObject, VueConstructor } from 'vue';\nimport { BaseXBus } from '../../plugins/x-bus';\nimport { XBus } from '../../plugins/x-bus.types';\nimport { XPlugin } from '../../plugins/x-plugin';\nimport { XPluginOptions } from '../../plugins/x-plugin.types';\nimport { SnippetConfig, XAPI } from '../api/api.types';\nimport { BaseXAPI } from '../api/base-api';\nimport { InitWrapper, InstallXOptions, VueConstructorPartialArgument } from './types';\n\ndeclare global {\n interface Window {\n X?: XAPI;\n initX?: (() => SnippetConfig) | SnippetConfig;\n }\n}\n\nconst defaultAdapterConfig: DeepPartial<EmpathyAdapterConfig> = {\n env: 'live',\n requestParams: {\n lang: 'es',\n scope: 'default'\n }\n};\n\n/**\n * The purpose of this class is to offer a quick way to initialize the XComponents in a setup\n * project. It allows to receive all the options in {@link InstallXOptions} which is an extension\n * of {@link XPluginOptions} with all the options for the plugin and some options more.\n *\n * This class does multiple things:\n * 1. Install the {@link XPlugin} with the {@link XPluginOptions}.\n * 2. Creates the public {@link XAPI} and add it to global window.\n * 3. Creates the Vue Application for the customer project.\n *\n * The steps 2 & 3 are optional and depends on the options passed in {@link InstallXOptions}.\n *\n * @example The way to use this class is the next:\n * 1. Create the installer passing in the {@link InstallXOptions}. This only save the options:\n *\n * ```\n * const installer = new XInstaller(installXOptions)\n * ```\n *\n * 2. Initialize passing the {@link SnippetConfig}. This installs the plugin and creates the App.\n * There are 3 different ways to do this:\n *\n * 2.1 Using the created installer:\n *\n * ```\n * installer.init(snippetConfig)\n * ```\n *\n * 2.2 If the API option is enabled (`createAPI` is `true` in {@link InstallXOptions}, or\n * is not present as the default value is `true`) then this init step can be done with\n * the Public API:\n *\n * ```\n * window.X.init(snippetConfig)\n * ```\n *\n * 2.3 When the script of the project build is loaded it searches for a global `initX`\n * variable that the customer must have in their web site. This variable can be a\n * function that returns the {@link SnippetConfig} or an object that contains the\n * {@link SnippetConfig} itself:\n *\n * ```\n * window.initX = function() {\n * return {\n * instance,\n * env,\n * scope,\n * lang,\n * searchLang,\n * currency,\n * consent,\n * documentDirection\n * };\n * };\n * ```\n *\n * ```\n * window.initX = {\n * instance,\n * env,\n * scope,\n * lang,\n * searchLang,\n * currency,\n * consent,\n * documentDirection\n * };\n * ```\n *\n * @public\n */\nexport class XInstaller {\n private api?: XAPI;\n\n /**\n * The configuration coming from the snippet {@link SnippetConfig}.\n *\n * @internal\n */\n protected snippetConfig!: SnippetConfig;\n\n /**\n * Receives the {@link InstallXOptions} and merges it with the default fallback options. Also\n * creates the public {@link XAPI}.\n *\n * @remarks Auto initializes the Vue application if window.initX is defined as a function or\n * object specifying the {@link SnippetConfig | snippet config}.\n *\n *\n * @param options - The {@link InstallXOptions}.\n *\n * @public\n */\n public constructor(protected readonly options: InstallXOptions) {\n this.createAPI();\n }\n\n /**\n * Creates the public {@link XAPI} using the `api` option from {@link InstallXOptions}. If this\n * `api` option is not passed, then a default {@link BaseXAPI} is created. To disable the API\n * creation the value `false` must be passed in the `api` option.\n *\n * @internal\n */\n protected createAPI(): void {\n const { api } = this.options;\n if (api !== false) {\n this.api = api ?? new BaseXAPI();\n this.api.setInitCallback(this.init.bind(this));\n this.api.setSnippetConfigCallback(this.updateSnippetConfig.bind(this));\n window.X = this.api;\n }\n }\n\n /**\n * Retrieves the {@link SnippetConfig | snippet config} it is defined in the window.initX.\n *\n * @returns The snippet config if it is defined or undefined otherwise.\n *\n * @internal\n */\n private retrieveSnippetConfig(): SnippetConfig | undefined {\n if (typeof window.initX === 'function') {\n return window.initX();\n } else if (typeof window.initX === 'object') {\n return window.initX;\n }\n }\n\n /**\n * Receives the {@link SnippetConfig | snippet config} or retrieves it from window.initX and\n * installs the plugin and initializes the Vue application.\n *\n * @param snippetConfig - The {@link SnippetConfig} that receives from snippet integration.\n *\n * @returns If {@link SnippetConfig | snippet config} is passed or configured in window.initX,\n * returns an object with the {@link XAPI}, the {@link XBus}, the {@link XPlugin} and the Vue App\n * used in the application. Else, a rejected promise is returned.\n *\n * @public\n */\n init(snippetConfig: SnippetConfig): Promise<InitWrapper>;\n init(): Promise<InitWrapper | void>;\n async init(snippetConfig = this.retrieveSnippetConfig()): Promise<InitWrapper | void> {\n if (snippetConfig) {\n const adapterConfig = this.getAdapterConfig(snippetConfig);\n this.applyConfigToAdapter(adapterConfig);\n const bus = this.createBus();\n const pluginOptions = this.getPluginOptions();\n const plugin = this.installPlugin(pluginOptions, bus);\n const extraPlugins = await this.installExtraPlugins(snippetConfig, bus);\n const app = this.createApp(extraPlugins, snippetConfig);\n this.api?.setBus(bus);\n\n return {\n api: this.api,\n app,\n bus,\n plugin\n };\n }\n\n return Promise.resolve();\n }\n\n /**\n * Creates the Adapter Config object using the {@link SnippetConfig} to do it. It also\n * merges the default configuration.\n *\n * @param options - The {@link SnippetConfig}.\n *\n * @returns The Adapter Config object.\n *\n * @internal\n */\n protected getAdapterConfig({ instance, env, lang, searchLang, scope }: SnippetConfig): unknown {\n return deepMerge(\n defaultAdapterConfig,\n cleanUndefined<DeepPartial<EmpathyAdapterConfig>>({\n instance,\n env,\n requestParams: {\n lang: searchLang ?? lang,\n scope\n }\n })\n );\n }\n\n /**\n * Creates the {@link XPluginOptions} object.\n *\n * @returns The {@link XPluginOptions} object.\n *\n * @internal\n */\n protected getPluginOptions(): XPluginOptions {\n const { adapter, store, initialXModules, xModules, __PRIVATE__xModules } = this.options;\n return {\n adapter,\n store,\n xModules,\n initialXModules,\n __PRIVATE__xModules\n };\n }\n\n /**\n * It applies the snippet configuration to the Adapter. Not all the parameters are for the Adapter\n * but they appear destructured to not include them in the `extraParams` parameter.\n *\n * @param adapterConfig - The Adapter config object.\n *\n * @internal\n */\n protected applyConfigToAdapter(adapterConfig: any): void {\n this.options.adapter.setConfig?.(adapterConfig);\n }\n\n /**\n * This method returns the bus instance to be used in the {@link XPlugin} and in the {@link XAPI}.\n * It returns the `bus` parameter in the {@link InstallXOptions} or if not provided, then\n * creates a new instance of {@link BaseXBus}.\n *\n * @returns XBus - The bus instance.\n *\n * @internal\n */\n protected createBus(): XBus {\n return this.options.bus ?? new BaseXBus();\n }\n\n /**\n * This method returns the VueConstructor to use to create the App instance.\n * It returns the `vue` parameter in the {@link InstallXOptions} or if not provided, then\n * returns the default Vue.\n *\n * @remarks The purpose of this option is mainly the testing. In a test we can use this option\n * to pass the local vue instance created by `createLocalVue` method.\n *\n * @returns VueConstructor - The vue constructor to create the App instance.\n *\n * @internal\n */\n protected getVue(): VueConstructor {\n return this.options.vue ?? Vue;\n }\n\n /**\n * Creates and install the Vue Plugin. If `plugin` parameter is passed in the\n * {@link InstallXOptions}, then it is used. If not, then a new instance of {@link XPlugin} is\n * created and installed.\n *\n * @param pluginOptions - The {@link XPluginOptions} to passed as parameter to the install method\n * of the plugin.\n * @param bus - The {@link XBus} to be used to create the XPlugin.\n *\n * @returns PluginObject<XPluginOption> - The plugin instance.\n * @internal\n */\n protected installPlugin(pluginOptions: XPluginOptions, bus: XBus): PluginObject<XPluginOptions> {\n const plugin = this.options.plugin ?? new XPlugin(bus);\n const vue = this.getVue();\n vue.use(plugin, pluginOptions);\n return plugin;\n }\n\n /**\n * Install more plugins to Vue defined by the user.\n *\n * @param snippet - The snippet configuration.\n * @param bus - The events bus used in the application.\n * @returns The arguments from the plugins installation to be used in Vue's constructor.\n * @internal\n */\n protected installExtraPlugins(\n snippet: SnippetConfig,\n bus: XBus\n ): Promise<VueConstructorPartialArgument> {\n const vue = this.getVue();\n return Promise.resolve(this.options.installExtraPlugins?.({ vue, snippet, bus }));\n }\n\n /**\n * In the case that the `app` parameter is present in the {@link InstallXOptions}, then a new Vue\n * application is created using that app.\n *\n * @param extraPlugins - Vue plugins initialisation data.\n * @param snippetConfig - Configuration from the client snippet.\n * @returns The Created Vue application or undefined if not created.\n *\n * @internal\n */\n protected createApp(\n extraPlugins: VueConstructorPartialArgument,\n snippetConfig: SnippetConfig\n ): Vue | undefined {\n if (this.options.app !== undefined) {\n const vue = this.getVue();\n this.snippetConfig = vue.observable(snippetConfig);\n return new vue({\n ...extraPlugins,\n ...this.options.vueOptions,\n provide() {\n return {\n snippetConfig\n };\n },\n store: this.options.store,\n el: this.getMountingTarget(this.options.domElement),\n render: h => h(this.options.app)\n });\n }\n }\n\n /**\n * It returns the HTML element to mount the Vue Application. If the `domElement` parameter in the\n * {@link InstallXOptions} is an Element or a string, then it is used. If it is\n * not present then a new <div> Element is created and append to the body to be used.\n *\n * @param elementOrSelector - String or Element used to mount the Vue App.\n *\n * @returns The Element to use as mounting point for the Vue App.\n * @internal\n */\n protected getMountingTarget(elementOrSelector?: string | Element): Element {\n if (typeof elementOrSelector === 'string') {\n const target = document.querySelector(elementOrSelector);\n if (!target) {\n throw Error(\n `XComponents app couldn't be mounted: Element \"${elementOrSelector}\" couldn't be found`\n );\n }\n return target;\n } else if (elementOrSelector !== undefined) {\n return elementOrSelector;\n } else {\n return document.body.appendChild(document.createElement('div'));\n }\n }\n\n /**\n * It updates all the provided properties from the current snippet config.\n *\n * @param snippetConfig - All the properties to be updated in the {@link SnippetConfig}.\n *\n * @internal\n */\n protected updateSnippetConfig(snippetConfig: Partial<SnippetConfig>): void {\n forEach(snippetConfig, (name, value) => {\n this.getVue().set(this.snippetConfig, name, value);\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;AAmBA,MAAM,oBAAoB,GAAsC;IAC9D,GAAG,EAAE,MAAM;IACX,aAAa,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AAC,CAAC;SACJ;KACF;;;;;;;;;;;IAYS,iBAAiB,CAAC,iBAAoC;QAC9D,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;YACzC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;YACzD,IAAI,CAAC,MAAM,EAAE;gBACX,MAAM,KAAK,CACT,iDAAiD,iBAAiB,qBAAqB,CACxF,CAAC;aACH;YACD,OAAO,MAAM,CAAC;SACf;aAAM,IAAI,iBAAiB,KAAK,SAAS,EAAE;YAC1C,OAAO,iBAAiB,CAAC;SAC1B;aAAM;YACL,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;SACjE;KACF;;;;;;;;IASS,mBAAmB,CAAC,aAAqC;QACjE,OAAO,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,KAAK;YACjC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;SACpD,CAAC,CAAC;KACJ;;;;;"}
|
|
1
|
+
{"version":3,"file":"x-installer.js","sources":["../../../../src/x-installer/x-installer/x-installer.ts"],"sourcesContent":["import { forEach } from '@empathyco/x-utils';\nimport Vue, { PluginObject, VueConstructor } from 'vue';\nimport { BaseXBus } from '../../plugins/x-bus';\nimport { XBus } from '../../plugins/x-bus.types';\nimport { XPlugin } from '../../plugins/x-plugin';\nimport { XPluginOptions } from '../../plugins/x-plugin.types';\nimport { SnippetConfig, XAPI } from '../api/api.types';\nimport { BaseXAPI } from '../api/base-api';\nimport { InitWrapper, InstallXOptions, VueConstructorPartialArgument } from './types';\n\ndeclare global {\n interface Window {\n X?: XAPI;\n initX?: (() => SnippetConfig) | SnippetConfig;\n }\n}\n\n/**\n * The purpose of this class is to offer a quick way to initialize the XComponents in a setup\n * project. It allows to receive all the options in {@link InstallXOptions} which is an extension\n * of {@link XPluginOptions} with all the options for the plugin and some options more.\n *\n * This class does multiple things:\n * 1. Install the {@link XPlugin} with the {@link XPluginOptions}.\n * 2. Creates the public {@link XAPI} and add it to global window.\n * 3. Creates the Vue Application for the customer project.\n *\n * The steps 2 & 3 are optional and depends on the options passed in {@link InstallXOptions}.\n *\n * @example The way to use this class is the next:\n * 1. Create the installer passing in the {@link InstallXOptions}. This only save the options:\n *\n * ```\n * const installer = new XInstaller(installXOptions)\n * ```\n *\n * 2. Initialize passing the {@link SnippetConfig}. This installs the plugin and creates the App.\n * There are 3 different ways to do this:\n *\n * 2.1 Using the created installer:\n *\n * ```\n * installer.init(snippetConfig)\n * ```\n *\n * 2.2 If the API option is enabled (`createAPI` is `true` in {@link InstallXOptions}, or\n * is not present as the default value is `true`) then this init step can be done with\n * the Public API:\n *\n * ```\n * window.X.init(snippetConfig)\n * ```\n *\n * 2.3 When the script of the project build is loaded it searches for a global `initX`\n * variable that the customer must have in their web site. This variable can be a\n * function that returns the {@link SnippetConfig} or an object that contains the\n * {@link SnippetConfig} itself:\n *\n * ```\n * window.initX = function() {\n * return {\n * instance,\n * env,\n * scope,\n * lang,\n * searchLang,\n * currency,\n * consent,\n * documentDirection\n * };\n * };\n * ```\n *\n * ```\n * window.initX = {\n * instance,\n * env,\n * scope,\n * lang,\n * searchLang,\n * currency,\n * consent,\n * documentDirection\n * };\n * ```\n *\n * @public\n */\nexport class XInstaller {\n private api?: XAPI;\n\n /**\n * The configuration coming from the snippet {@link SnippetConfig}.\n *\n * @internal\n */\n protected snippetConfig!: SnippetConfig;\n\n /**\n * Receives the {@link InstallXOptions} and merges it with the default fallback options. Also\n * creates the public {@link XAPI}.\n *\n * @remarks Auto initializes the Vue application if window.initX is defined as a function or\n * object specifying the {@link SnippetConfig | snippet config}.\n *\n *\n * @param options - The {@link InstallXOptions}.\n *\n * @public\n */\n public constructor(protected readonly options: InstallXOptions) {\n this.createAPI();\n }\n\n /**\n * Creates the public {@link XAPI} using the `api` option from {@link InstallXOptions}. If this\n * `api` option is not passed, then a default {@link BaseXAPI} is created. To disable the API\n * creation the value `false` must be passed in the `api` option.\n *\n * @internal\n */\n protected createAPI(): void {\n const { api } = this.options;\n if (api !== false) {\n this.api = api ?? new BaseXAPI();\n this.api.setInitCallback(this.init.bind(this));\n this.api.setSnippetConfigCallback(this.updateSnippetConfig.bind(this));\n window.X = this.api;\n }\n }\n\n /**\n * Retrieves the {@link SnippetConfig | snippet config} it is defined in the window.initX.\n *\n * @returns The snippet config if it is defined or undefined otherwise.\n *\n * @internal\n */\n private retrieveSnippetConfig(): SnippetConfig | undefined {\n if (typeof window.initX === 'function') {\n return window.initX();\n } else if (typeof window.initX === 'object') {\n return window.initX;\n }\n }\n\n /**\n * Receives the {@link SnippetConfig | snippet config} or retrieves it from window.initX and\n * installs the plugin and initializes the Vue application.\n *\n * @param snippetConfig - The {@link SnippetConfig} that receives from snippet integration.\n *\n * @returns If {@link SnippetConfig | snippet config} is passed or configured in window.initX,\n * returns an object with the {@link XAPI}, the {@link XBus}, the {@link XPlugin} and the Vue App\n * used in the application. Else, a rejected promise is returned.\n *\n * @public\n */\n init(snippetConfig: SnippetConfig): Promise<InitWrapper>;\n init(): Promise<InitWrapper | void>;\n async init(snippetConfig = this.retrieveSnippetConfig()): Promise<InitWrapper | void> {\n if (snippetConfig) {\n const bus = this.createBus();\n const pluginOptions = this.getPluginOptions();\n const plugin = this.installPlugin(pluginOptions, bus);\n const extraPlugins = await this.installExtraPlugins(snippetConfig, bus);\n const app = this.createApp(extraPlugins, snippetConfig);\n this.api?.setBus(bus);\n\n return {\n api: this.api,\n app,\n bus,\n plugin\n };\n }\n\n return Promise.resolve();\n }\n\n /**\n * Creates the {@link XPluginOptions} object.\n *\n * @returns The {@link XPluginOptions} object.\n *\n * @internal\n */\n protected getPluginOptions(): XPluginOptions {\n const { adapter, store, initialXModules, xModules, __PRIVATE__xModules } = this.options;\n return {\n adapter,\n store,\n xModules,\n initialXModules,\n __PRIVATE__xModules\n };\n }\n\n /**\n * This method returns the bus instance to be used in the {@link XPlugin} and in the {@link XAPI}.\n * It returns the `bus` parameter in the {@link InstallXOptions} or if not provided, then\n * creates a new instance of {@link BaseXBus}.\n *\n * @returns XBus - The bus instance.\n *\n * @internal\n */\n protected createBus(): XBus {\n return this.options.bus ?? new BaseXBus();\n }\n\n /**\n * This method returns the VueConstructor to use to create the App instance.\n * It returns the `vue` parameter in the {@link InstallXOptions} or if not provided, then\n * returns the default Vue.\n *\n * @remarks The purpose of this option is mainly the testing. In a test we can use this option\n * to pass the local vue instance created by `createLocalVue` method.\n *\n * @returns VueConstructor - The vue constructor to create the App instance.\n *\n * @internal\n */\n protected getVue(): VueConstructor {\n return this.options.vue ?? Vue;\n }\n\n /**\n * Creates and install the Vue Plugin. If `plugin` parameter is passed in the\n * {@link InstallXOptions}, then it is used. If not, then a new instance of {@link XPlugin} is\n * created and installed.\n *\n * @param pluginOptions - The {@link XPluginOptions} to passed as parameter to the install method\n * of the plugin.\n * @param bus - The {@link XBus} to be used to create the XPlugin.\n *\n * @returns PluginObject<XPluginOption> - The plugin instance.\n * @internal\n */\n protected installPlugin(pluginOptions: XPluginOptions, bus: XBus): PluginObject<XPluginOptions> {\n const plugin = this.options.plugin ?? new XPlugin(bus);\n const vue = this.getVue();\n vue.use(plugin, pluginOptions);\n return plugin;\n }\n\n /**\n * Install more plugins to Vue defined by the user.\n *\n * @param snippet - The snippet configuration.\n * @param bus - The events bus used in the application.\n * @returns The arguments from the plugins installation to be used in Vue's constructor.\n * @internal\n */\n protected installExtraPlugins(\n snippet: SnippetConfig,\n bus: XBus\n ): Promise<VueConstructorPartialArgument> {\n const vue = this.getVue();\n return Promise.resolve(this.options.installExtraPlugins?.({ vue, snippet, bus }));\n }\n\n /**\n * In the case that the `app` parameter is present in the {@link InstallXOptions}, then a new Vue\n * application is created using that app.\n *\n * @param extraPlugins - Vue plugins initialisation data.\n * @param snippetConfig - Configuration from the client snippet.\n * @returns The Created Vue application or undefined if not created.\n *\n * @internal\n */\n protected createApp(\n extraPlugins: VueConstructorPartialArgument,\n snippetConfig: SnippetConfig\n ): Vue | undefined {\n if (this.options.app !== undefined) {\n const vue = this.getVue();\n this.snippetConfig = vue.observable(snippetConfig);\n return new vue({\n ...extraPlugins,\n ...this.options.vueOptions,\n provide() {\n return {\n snippetConfig\n };\n },\n store: this.options.store,\n el: this.getMountingTarget(this.options.domElement),\n render: h => h(this.options.app)\n });\n }\n }\n\n /**\n * It returns the HTML element to mount the Vue Application. If the `domElement` parameter in the\n * {@link InstallXOptions} is an Element or a string, then it is used. If it is\n * not present then a new <div> Element is created and append to the body to be used.\n *\n * @param elementOrSelector - String or Element used to mount the Vue App.\n *\n * @returns The Element to use as mounting point for the Vue App.\n * @internal\n */\n protected getMountingTarget(elementOrSelector?: string | Element): Element {\n if (typeof elementOrSelector === 'string') {\n const target = document.querySelector(elementOrSelector);\n if (!target) {\n throw Error(\n `XComponents app couldn't be mounted: Element \"${elementOrSelector}\" couldn't be found`\n );\n }\n return target;\n } else if (elementOrSelector !== undefined) {\n return elementOrSelector;\n } else {\n return document.body.appendChild(document.createElement('div'));\n }\n }\n\n /**\n * It updates all the provided properties from the current snippet config.\n *\n * @param snippetConfig - All the properties to be updated in the {@link SnippetConfig}.\n *\n * @internal\n */\n protected updateSnippetConfig(snippetConfig: Partial<SnippetConfig>): void {\n forEach(snippetConfig, (name, value) => {\n this.getVue().set(this.snippetConfig, name, value);\n });\n }\n}\n"],"names":[],"mappings":";;;;;;AAiBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuEa,UAAU;;;;;;;;;;;;;IAsBrB,YAAsC,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;QAC5D,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;;;;;;;;IASS,SAAS;QACjB,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IA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I,GAAG,CAAC;gBACb,GAAG,YAAY;gBACf,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU;gBAC1B,OAAO;oBACL,OAAO;wBACL,aAAa;qBACd,CAAC;iBACH;gBACD,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;gBACzB,EAAE,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;gBACnD,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;aACjC,CAAC,CAAC;SACJ;KACF;;;;;;;;;;;IAYS,iBAAiB,CAAC,iBAAoC;QAC9D,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;YACzC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;YACzD,IAAI,CAAC,MAAM,EAAE;gBACX,MAAM,KAAK,CACT,iDAAiD,iBAAiB,qBAAqB,CACxF,CAAC;aACH;YACD,OAAO,MAAM,CAAC;SACf;aAAM,IAAI,iBAAiB,KAAK,SAAS,EAAE;YAC1C,OAAO,iBAAiB,CAAC;SAC1B;aAAM;YACL,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;SACjE;KACF;;;;;;;;IASS,mBAAmB,CAAC,aAAqC;QACjE,OAAO,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,KAAK;YACjC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;SACpD,CAAC,CAAC;KACJ;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippet-config-extra-params.vue.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue"],"sourcesContent":["<template>\n <ExtraParams :values=\"extraParams\" />\n</template>\n\n<script lang=\"ts\">\n import { forEach, Dictionary } from '@empathyco/x-utils';\n import Vue from 'vue';\n import { Component, Watch, Inject, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { SnippetConfig } from '../../../x-installer/api/api.types';\n import { extraParamsXModule } from '../x-module';\n import ExtraParams from './extra-params.vue';\n\n /**\n * Extracts the extra parameters from the {@link SnippetConfig} and syncs it with the request\n * objects of every x-module.\n *\n * @public\n */\n @Component({\n components: { ExtraParams },\n mixins: [xComponentMixin(extraParamsXModule)]\n })\n export default class SnippetConfigExtraParams extends Vue {\n /**\n * It injects {@link SnippetConfig} provided by an ancestor as snippetConfig.\n *\n * @internal\n */\n @Inject('snippetConfig')\n public snippetConfig!: SnippetConfig;\n\n /**\n * A Dictionary where the keys are the extra param names and its values.\n *\n * @public\n */\n @Prop()\n protected values?: Dictionary<unknown>;\n\n /**\n * Custom object containing the extra params from the snippet config.\n *\n * @remarks This object keeps manually the desired snippet config properties to avoid\n * unnecessary re-renders.\n *\n * @internal\n */\n protected extraParams: Dictionary<unknown> = {};\n\n /**\n * Collection of properties from the snippet config to exclude from the\n * extra params object.\n *\n * @public\n */\n @Prop({\n default: (): Array<keyof SnippetConfig> => [\n 'callbacks',\n 'productId',\n '
|
|
1
|
+
{"version":3,"file":"snippet-config-extra-params.vue.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue"],"sourcesContent":["<template>\n <ExtraParams :values=\"extraParams\" />\n</template>\n\n<script lang=\"ts\">\n import { forEach, Dictionary } from '@empathyco/x-utils';\n import Vue from 'vue';\n import { Component, Watch, Inject, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { SnippetConfig } from '../../../x-installer/api/api.types';\n import { extraParamsXModule } from '../x-module';\n import ExtraParams from './extra-params.vue';\n\n /**\n * Extracts the extra parameters from the {@link SnippetConfig} and syncs it with the request\n * objects of every x-module.\n *\n * @public\n */\n @Component({\n components: { ExtraParams },\n mixins: [xComponentMixin(extraParamsXModule)]\n })\n export default class SnippetConfigExtraParams extends Vue {\n /**\n * It injects {@link SnippetConfig} provided by an ancestor as snippetConfig.\n *\n * @internal\n */\n @Inject('snippetConfig')\n public snippetConfig!: SnippetConfig;\n\n /**\n * A Dictionary where the keys are the extra param names and its values.\n *\n * @public\n */\n @Prop()\n protected values?: Dictionary<unknown>;\n\n /**\n * Custom object containing the extra params from the snippet config.\n *\n * @remarks This object keeps manually the desired snippet config properties to avoid\n * unnecessary re-renders.\n *\n * @internal\n */\n protected extraParams: Dictionary<unknown> = {};\n\n /**\n * Collection of properties from the snippet config to exclude from the\n * extra params object.\n *\n * @public\n */\n @Prop({\n default: (): Array<keyof SnippetConfig> => [\n 'callbacks',\n 'productId',\n 'searchLang',\n 'consent',\n 'documentDirection',\n 'currency',\n 'filters'\n ]\n })\n protected excludedExtraParams!: Array<keyof SnippetConfig>;\n\n /**\n * Updates the extraParams object when the snippet config changes.\n *\n * @param snippetConfig - The new snippet config.\n *\n * @internal\n */\n @Watch('snippetConfig', { deep: true, immediate: true })\n syncExtraParams(snippetConfig: SnippetConfig): void {\n forEach({ ...this.values, ...snippetConfig }, (name, value) => {\n if (this.excludedExtraParams.includes(name)) {\n return;\n }\n this.$set(this.extraParams, name, value);\n });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\n_See how the snippet config is injected and passed to the SnippetConfigExtraParams component._\n\n```vue\n<template>\n <Provider>\n <SnippetConfigExtraParams />\n </Provider>\n</template>\n\n<script>\n import { SnippetConfigExtraParams } from '@empathyco/x-components/extra-params';\n\n const Provider = {\n provide: {\n snippetConfig: {\n instance: 'demo',\n lang: 'es',\n warehouse: 1234\n }\n }\n };\n\n export default {\n name: 'SnippetConfigExtraParamsDemo',\n components: {\n Provider,\n SnippetConfigExtraParams\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippet-config-extra-params.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\nimport { forEach, Dictionary } from '@empathyco/x-utils';\nimport Vue from 'vue';\nimport { Component, Watch, Inject, Prop } from 'vue-property-decorator';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { SnippetConfig } from '../../../x-installer/api/api.types';\nimport { extraParamsXModule } from '../x-module';\nimport ExtraParams from './extra-params.vue';\n\n/**\n * Extracts the extra parameters from the {@link SnippetConfig} and syncs it with the request\n * objects of every x-module.\n *\n * @public\n */\n@Component({\n components: { ExtraParams },\n mixins: [xComponentMixin(extraParamsXModule)]\n})\nexport default class SnippetConfigExtraParams extends Vue {\n /**\n * It injects {@link SnippetConfig} provided by an ancestor as snippetConfig.\n *\n * @internal\n */\n @Inject('snippetConfig')\n public snippetConfig!: SnippetConfig;\n\n /**\n * A Dictionary where the keys are the extra param names and its values.\n *\n * @public\n */\n @Prop()\n protected values?: Dictionary<unknown>;\n\n /**\n * Custom object containing the extra params from the snippet config.\n *\n * @remarks This object keeps manually the desired snippet config properties to avoid\n * unnecessary re-renders.\n *\n * @internal\n */\n protected extraParams: Dictionary<unknown> = {};\n\n /**\n * Collection of properties from the snippet config to exclude from the\n * extra params object.\n *\n * @public\n */\n @Prop({\n default: (): Array<keyof SnippetConfig> => [\n 'callbacks',\n 'productId',\n '
|
|
1
|
+
{"version":3,"file":"snippet-config-extra-params.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/extra-params/components/snippet-config-extra-params.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\nimport { forEach, Dictionary } from '@empathyco/x-utils';\nimport Vue from 'vue';\nimport { Component, Watch, Inject, Prop } from 'vue-property-decorator';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { SnippetConfig } from '../../../x-installer/api/api.types';\nimport { extraParamsXModule } from '../x-module';\nimport ExtraParams from './extra-params.vue';\n\n/**\n * Extracts the extra parameters from the {@link SnippetConfig} and syncs it with the request\n * objects of every x-module.\n *\n * @public\n */\n@Component({\n components: { ExtraParams },\n mixins: [xComponentMixin(extraParamsXModule)]\n})\nexport default class SnippetConfigExtraParams extends Vue {\n /**\n * It injects {@link SnippetConfig} provided by an ancestor as snippetConfig.\n *\n * @internal\n */\n @Inject('snippetConfig')\n public snippetConfig!: SnippetConfig;\n\n /**\n * A Dictionary where the keys are the extra param names and its values.\n *\n * @public\n */\n @Prop()\n protected values?: Dictionary<unknown>;\n\n /**\n * Custom object containing the extra params from the snippet config.\n *\n * @remarks This object keeps manually the desired snippet config properties to avoid\n * unnecessary re-renders.\n *\n * @internal\n */\n protected extraParams: Dictionary<unknown> = {};\n\n /**\n * Collection of properties from the snippet config to exclude from the\n * extra params object.\n *\n * @public\n */\n @Prop({\n default: (): Array<keyof SnippetConfig> => [\n 'callbacks',\n 'productId',\n 'searchLang',\n 'consent',\n 'documentDirection',\n 'currency',\n 'filters'\n ]\n })\n protected excludedExtraParams!: Array<keyof SnippetConfig>;\n\n /**\n * Updates the extraParams object when the snippet config changes.\n *\n * @param snippetConfig - The new snippet config.\n *\n * @internal\n */\n @Watch('snippetConfig', { deep: true, immediate: true })\n syncExtraParams(snippetConfig: SnippetConfig): void {\n forEach({ ...this.values, ...snippetConfig }, (name, value) => {\n if (this.excludedExtraParams.includes(name)) {\n return;\n }\n this.$set(this.extraParams, name, value);\n });\n }\n}\n"],"names":["ExtraParams"],"mappings":";;;;;;;;AAaA;;;;;;AAUA,IAAqB,wBAAwB,GAA7C,MAAqB,wBAAyB,SAAQ,GAAG;IAAzD;;;;;;;;;;QAyBY,gBAAW,GAAwB,EAAE,CAAC;KAqCjD;;;;;;;;IARC,eAAe,CAAC,aAA4B;QAC1C,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,aAAa,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK;YACxD,IAAI,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAC3C,OAAO;aACR;YACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;SAC1C,CAAC,CAAC;KACJ;CACF,CAAA;AAvDC;IADC,MAAM,CAAC,eAAe,CAAC;+DACa;AAQrC;IADC,IAAI,EAAE;wDACgC;AA6BvC;IAXC,IAAI,CAAC;QACJ,OAAO,EAAE,MAAkC;YACzC,WAAW;YACX,WAAW;YACX,YAAY;YACZ,SAAS;YACT,mBAAmB;YACnB,UAAU;YACV,SAAS;SACV;KACF,CAAC;qEACyD;AAU3D;IADC,KAAK,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;+DAQvD;AA7DkB,wBAAwB;IAJ5C,SAAS,CAAC;QACT,UAAU,EAAE,eAAEA,iBAAW,EAAE;QAC3B,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;KAC9C,CAAC;GACmB,wBAAwB,CA8D5C;aA9DoB,wBAAwB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-identifier-results.action.js","sources":["../../../../../../src/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"fetch-and-save-identifier-results.action.js","sources":["../../../../../../src/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.ts"],"sourcesContent":["import { Result, IdentifierResultsRequest } from '@empathyco/x-types';\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils';\nimport { IdentifierResultsActionsContext } from '../types';\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n IdentifierResultsActionsContext,\n IdentifierResultsRequest | null,\n Result[]\n>({\n fetch({ dispatch, state: { origin } }, request) {\n if (request && origin) {\n request.origin = origin;\n }\n\n return dispatch('fetchIdentifierResults', request);\n },\n onSuccess({ commit }, identifierResults) {\n commit('setIdentifierResults', identifierResults);\n }\n});\n\n/**\n * Default implementation for {@link IdentifierResultsActions.fetchAndSaveIdentifierResults} action.\n *\n * @public\n */\nexport const fetchAndSaveIdentifierResults = fetchAndSave;\n\n/**\n * Default implementation for {@link IdentifierResultsActions.cancelFetchAndSaveIdentifierResults}\n * action.\n *\n * @public\n */\nexport const cancelFetchAndSaveIdentifierResults = cancelPrevious;\n"],"names":[],"mappings":";;AAIA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;IACA,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO;QAC5C,IAAI,OAAO,IAAI,MAAM,EAAE;YACrB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;SACzB;QAED,OAAO,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;KACpD;IACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB;QACrC,MAAM,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,CAAC;KACnD;CACF,CAAC,CAAC;AAEH;;;;;MAKa,6BAA6B,GAAG,aAAa;AAE1D;;;;;;MAMa,mCAAmC,GAAG;;;;"}
|
|
@@ -13,7 +13,7 @@ import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
|
13
13
|
*/
|
|
14
14
|
//eslint-disable-next-line max-len
|
|
15
15
|
const fetchIdentifierResults = (_context, request) => {
|
|
16
|
-
return request ? XPlugin.adapter.
|
|
16
|
+
return request ? XPlugin.adapter.identifierResults(request).then(({ results }) => results) : [];
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export { fetchIdentifierResults };
|
package/js/x-modules/identifier-results/store/actions/fetch-identifier-results.action.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-identifier-results.action.js","sources":["../../../../../../src/x-modules/identifier-results/store/actions/fetch-identifier-results.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins/x-plugin';\nimport { IdentifierResultsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link IdentifierResultsActions.fetchIdentifierResults}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The identifier results request to make.\n * @returns A Promise of Result[] that resolves when it fetches identifier results or empty array\n * if the request was not made.\n *\n * @public\n */\n//eslint-disable-next-line max-len\nexport const fetchIdentifierResults: IdentifierResultsXStoreModule['actions']['fetchIdentifierResults'] =\n (_context, request) => {\n return request ? XPlugin.adapter.
|
|
1
|
+
{"version":3,"file":"fetch-identifier-results.action.js","sources":["../../../../../../src/x-modules/identifier-results/store/actions/fetch-identifier-results.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins/x-plugin';\nimport { IdentifierResultsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link IdentifierResultsActions.fetchIdentifierResults}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The identifier results request to make.\n * @returns A Promise of Result[] that resolves when it fetches identifier results or empty array\n * if the request was not made.\n *\n * @public\n */\n//eslint-disable-next-line max-len\nexport const fetchIdentifierResults: IdentifierResultsXStoreModule['actions']['fetchIdentifierResults'] =\n (_context, request) => {\n return request ? XPlugin.adapter.identifierResults(request).then(({ results }) => results) : [];\n };\n"],"names":[],"mappings":";;AAGA;;;;;;;;;;;AAWA;MACa,sBAAsB,GACjC,CAAC,QAAQ,EAAE,OAAO;IAChB,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,EAAE,CAAC;AAClG;;;;"}
|
package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifier-results-request.getter.js","sources":["../../../../../../src/x-modules/identifier-results/store/getters/identifier-results-request.getter.ts"],"sourcesContent":["import { IdentifierResultsXStoreModule } from '../types';\n/**\n * Default implementation for the {@link IdentifierResultsGetters.identifierResultsRequest} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the identifier\n * results module.\n * @returns The identifier results request to fetch data from the API.\n *\n * @public\n */\n// eslint-disable-next-line max-len\nexport const identifierResultsRequest: IdentifierResultsXStoreModule['getters']['identifierResultsRequest'] =\n ({ config, query, params }) => {\n return query.trim()\n ? {\n query,\n
|
|
1
|
+
{"version":3,"file":"identifier-results-request.getter.js","sources":["../../../../../../src/x-modules/identifier-results/store/getters/identifier-results-request.getter.ts"],"sourcesContent":["import { IdentifierResultsXStoreModule } from '../types';\n/**\n * Default implementation for the {@link IdentifierResultsGetters.identifierResultsRequest} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the identifier\n * results module.\n * @returns The identifier results request to fetch data from the API.\n *\n * @public\n */\n// eslint-disable-next-line max-len\nexport const identifierResultsRequest: IdentifierResultsXStoreModule['getters']['identifierResultsRequest'] =\n ({ config, query, params }) => {\n return query.trim()\n ? {\n query,\n rows: config.maxItemsToRequest,\n start: 0,\n extraParams: params\n }\n : null;\n };\n"],"names":[],"mappings":"AACA;;;;;;;;;AASA;MACa,wBAAwB,GACnC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IACxB,OAAO,KAAK,CAAC,IAAI,EAAE;UACf;YACE,KAAK;YACL,IAAI,EAAE,MAAM,CAAC,iBAAiB;YAC9B,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,MAAM;SACpB;UACD,IAAI,CAAC;AACX;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-next-queries.action.js","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-and-save-next-queries.action.ts"],"sourcesContent":["import { NextQueriesRequest } from '@empathyco/x-
|
|
1
|
+
{"version":3,"file":"fetch-and-save-next-queries.action.js","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-and-save-next-queries.action.ts"],"sourcesContent":["import { NextQuery, NextQueriesRequest } from '@empathyco/x-types';\n// eslint-disable-next-line max-len\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils';\nimport { NextQueriesActionContext } from '../types';\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n NextQueriesActionContext,\n NextQueriesRequest | null,\n NextQuery[] | null\n>({\n fetch({ dispatch }, request) {\n return dispatch('fetchNextQueries', request);\n },\n onSuccess({ commit }, nextQueries) {\n if (nextQueries) {\n commit('setNextQueries', nextQueries);\n }\n }\n});\n\n/**\n * Default implementation for {@link NextQueriesActions.fetchAndSaveNextQueries} action.\n *\n * @public\n */\nexport const fetchAndSaveNextQueries = fetchAndSave;\n\n/**\n * Default implementation for {@link NextQueriesActions.cancelFetchAndSaveNextQueries} action.\n *\n * @public\n */\nexport const cancelFetchAndSaveNextQueries = cancelPrevious;\n"],"names":[],"mappings":";;AACA;AAIA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;IACA,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,OAAO;QACzB,OAAO,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;KAC9C;IACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,WAAW;QAC/B,IAAI,WAAW,EAAE;YACf,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;SACvC;KACF;CACF,CAAC,CAAC;AAEH;;;;;MAKa,uBAAuB,GAAG,aAAa;AAEpD;;;;;MAKa,6BAA6B,GAAG;;;;"}
|
|
@@ -13,7 +13,7 @@ import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
|
13
13
|
*/
|
|
14
14
|
const fetchNextQueries = (_context, request) => {
|
|
15
15
|
return request
|
|
16
|
-
? XPlugin.adapter.
|
|
16
|
+
? XPlugin.adapter.nextQueries(request).then(({ nextQueries }) => nextQueries)
|
|
17
17
|
: null;
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-next-queries.action.js","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-next-queries.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins/x-plugin';\nimport { NextQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link NextQueriesActions.fetchNextQueries}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The next queries request to make.\n * @returns A Promise of NextQuery[] that resolves when it fetches next queries or `null`\n * if the request was not made.\n *\n * @public\n */\nexport const fetchNextQueries: NextQueriesXStoreModule['actions']['fetchNextQueries'] = (\n _context,\n request\n) => {\n return request\n ? XPlugin.adapter.
|
|
1
|
+
{"version":3,"file":"fetch-next-queries.action.js","sources":["../../../../../../src/x-modules/next-queries/store/actions/fetch-next-queries.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins/x-plugin';\nimport { NextQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link NextQueriesActions.fetchNextQueries}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The next queries request to make.\n * @returns A Promise of NextQuery[] that resolves when it fetches next queries or `null`\n * if the request was not made.\n *\n * @public\n */\nexport const fetchNextQueries: NextQueriesXStoreModule['actions']['fetchNextQueries'] = (\n _context,\n request\n) => {\n return request\n ? XPlugin.adapter.nextQueries(request).then(({ nextQueries }) => nextQueries)\n : null;\n};\n"],"names":[],"mappings":";;AAGA;;;;;;;;;;;MAWa,gBAAgB,GAA2D,CACtF,QAAQ,EACR,OAAO;IAEP,OAAO,OAAO;UACV,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,WAAW,CAAC;UAC3E,IAAI,CAAC;AACX;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/next-queries/store/getters/request.getter.ts"],"sourcesContent":["import { NextQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link NextQueriesGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the next\n * queries module.\n * @returns The next queries request to fetch data from the API.\n *\n * @public\n */\nexport const request: NextQueriesXStoreModule['getters']['request'] = ({\n query,\n config,\n params\n}) => {\n return query.trim()\n ? {\n query,\n rows: config.maxItemsToRequest,\n start: 0,\n
|
|
1
|
+
{"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/next-queries/store/getters/request.getter.ts"],"sourcesContent":["import { NextQueriesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link NextQueriesGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the next\n * queries module.\n * @returns The next queries request to fetch data from the API.\n *\n * @public\n */\nexport const request: NextQueriesXStoreModule['getters']['request'] = ({\n query,\n config,\n params\n}) => {\n return query.trim()\n ? {\n query,\n rows: config.maxItemsToRequest,\n start: 0,\n extraParams: params\n }\n : null;\n};\n"],"names":[],"mappings":"AAEA;;;;;;;;;MASa,OAAO,GAAkD,CAAC,EACrE,KAAK,EACL,MAAM,EACN,MAAM,EACP;IACC,OAAO,KAAK,CAAC,IAAI,EAAE;UACf;YACE,KAAK;YACL,IAAI,EAAE,MAAM,CAAC,iBAAiB;YAC9B,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,MAAM;SACpB;UACD,IAAI,CAAC;AACX;;;;"}
|
package/js/x-modules/popular-searches/store/actions/fetch-and-save-suggestions.action.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-suggestions.action.js","sources":["../../../../../../src/x-modules/popular-searches/store/actions/fetch-and-save-suggestions.action.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"fetch-and-save-suggestions.action.js","sources":["../../../../../../src/x-modules/popular-searches/store/actions/fetch-and-save-suggestions.action.ts"],"sourcesContent":["import { Suggestion, PopularSearchesRequest } from '@empathyco/x-types';\n// eslint-disable-next-line max-len\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils';\nimport { PopularSearchesActionContext } from '../types';\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n PopularSearchesActionContext,\n PopularSearchesRequest,\n Suggestion[]\n>({\n fetch({ dispatch }, request) {\n return dispatch('fetchSuggestions', request);\n },\n onSuccess({ commit }, suggestions) {\n commit('setSuggestions', suggestions);\n }\n});\n\n/**\n * Default implementation for {@link PopularSearchesActions.fetchAndSaveSuggestions} action.\n *\n * @public\n */\nexport const fetchAndSaveSuggestions = fetchAndSave;\n\n/**\n * Default implementation for {@link PopularSearchesActions.cancelFetchAndSaveSuggestions} action.\n *\n * @public\n */\nexport const cancelFetchAndSaveSuggestions = cancelPrevious;\n"],"names":[],"mappings":";;AACA;AAIA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;IACA,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,OAAO;QACzB,OAAO,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;KAC9C;IACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,WAAW;QAC/B,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;KACvC;CACF,CAAC,CAAC;AAEH;;;;;MAKa,uBAAuB,GAAG,aAAa;AAEpD;;;;;MAKa,6BAA6B,GAAG;;;;"}
|
|
@@ -11,9 +11,7 @@ import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
13
|
const fetchSuggestions = (_context, request) => {
|
|
14
|
-
return XPlugin.adapter
|
|
15
|
-
.getSuggestions(request, { requestId: 'popularSearches' })
|
|
16
|
-
.then(({ suggestions }) => suggestions);
|
|
14
|
+
return XPlugin.adapter.popularSearches(request).then(({ suggestions }) => suggestions);
|
|
17
15
|
};
|
|
18
16
|
|
|
19
17
|
export { fetchSuggestions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-suggestions.action.js","sources":["../../../../../../src/x-modules/popular-searches/store/actions/fetch-suggestions.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins/x-plugin';\nimport { PopularSearchesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link PopularSearchesActions.fetchSuggestions}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The popular searches request to make.\n * @returns A Promise of search response that resolves when it fetches the popular searches.\n *\n * @public\n */\nexport const fetchSuggestions: PopularSearchesXStoreModule['actions']['fetchSuggestions'] = (\n _context,\n request\n) => {\n return XPlugin.adapter
|
|
1
|
+
{"version":3,"file":"fetch-suggestions.action.js","sources":["../../../../../../src/x-modules/popular-searches/store/actions/fetch-suggestions.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins/x-plugin';\nimport { PopularSearchesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link PopularSearchesActions.fetchSuggestions}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The popular searches request to make.\n * @returns A Promise of search response that resolves when it fetches the popular searches.\n *\n * @public\n */\nexport const fetchSuggestions: PopularSearchesXStoreModule['actions']['fetchSuggestions'] = (\n _context,\n request\n) => {\n return XPlugin.adapter.popularSearches(request).then(({ suggestions }) => suggestions);\n};\n"],"names":[],"mappings":";;AAGA;;;;;;;;;;MAUa,gBAAgB,GAA+D,CAC1F,QAAQ,EACR,OAAO;IAEP,OAAO,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,WAAW,CAAC,CAAC;AACzF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/popular-searches/store/getters/request.getter.ts"],"sourcesContent":["import { PopularSearchesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link PopularSearchesGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the popular\n * searches module.\n *\n * @returns The popular searches request to fetch data from the API.\n *\n * @public\n */\nexport const request: PopularSearchesXStoreModule['getters']['request'] = ({ config, params }) => {\n return {\n rows: config.maxItemsToRequest,\n start: 0,\n
|
|
1
|
+
{"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/popular-searches/store/getters/request.getter.ts"],"sourcesContent":["import { PopularSearchesXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link PopularSearchesGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the popular\n * searches module.\n *\n * @returns The popular searches request to fetch data from the API.\n *\n * @public\n */\nexport const request: PopularSearchesXStoreModule['getters']['request'] = ({ config, params }) => {\n return {\n rows: config.maxItemsToRequest,\n start: 0,\n extraParams: params\n };\n};\n"],"names":[],"mappings":"AAEA;;;;;;;;;;MAUa,OAAO,GAAsD,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE;IAC3F,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,iBAAiB;QAC9B,KAAK,EAAE,CAAC;QACR,WAAW,EAAE,MAAM;KACpB,CAAC;AACJ;;;;"}
|
package/js/x-modules/query-suggestions/store/actions/fetch-and-save-suggestions.action.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-suggestions.action.js","sources":["../../../../../../src/x-modules/query-suggestions/store/actions/fetch-and-save-suggestions.action.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"fetch-and-save-suggestions.action.js","sources":["../../../../../../src/x-modules/query-suggestions/store/actions/fetch-and-save-suggestions.action.ts"],"sourcesContent":["import { QuerySuggestionsRequest, Suggestion } from '@empathyco/x-types';\n// eslint-disable-next-line max-len\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils';\nimport { QuerySuggestionsActionContext } from '../types';\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n QuerySuggestionsActionContext,\n QuerySuggestionsRequest | null,\n Suggestion[]\n>({\n fetch({ dispatch }, request) {\n return dispatch('fetchSuggestions', request);\n },\n onSuccess({ commit }, suggestions) {\n commit('setSuggestions', suggestions);\n }\n});\n\n/**\n * Default implementation for {@link QuerySuggestionsActions.fetchAndSaveSuggestions} action.\n *\n * @public\n */\nexport const fetchAndSaveSuggestions = fetchAndSave;\n\n/**\n * Default implementation for {@link QuerySuggestionsActions.cancelFetchAndSaveSuggestions} action.\n *\n * @public\n */\nexport const cancelFetchAndSaveSuggestions = cancelPrevious;\n"],"names":[],"mappings":";;AACA;AAIA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;IACA,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,OAAO;QACzB,OAAO,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;KAC9C;IACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,WAAW;QAC/B,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;KACvC;CACF,CAAC,CAAC;AAEH;;;;;MAKa,uBAAuB,GAAG,aAAa;AAEpD;;;;;MAKa,6BAA6B,GAAG;;;;"}
|
|
@@ -14,7 +14,7 @@ import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
|
14
14
|
*/
|
|
15
15
|
const fetchSuggestions = (_context, request) => {
|
|
16
16
|
return request
|
|
17
|
-
? XPlugin.adapter.
|
|
17
|
+
? XPlugin.adapter.querySuggestions(request).then(({ suggestions }) => suggestions)
|
|
18
18
|
: [];
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-suggestions.action.js","sources":["../../../../../../src/x-modules/query-suggestions/store/actions/fetch-suggestions.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins';\nimport { QuerySuggestionsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link QuerySuggestionsActions.fetchSuggestions}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The query suggestions request to make.\n *\n * @returns A `void` promise that resolves when it fetches suggestions.\n *\n * @public\n */\nexport const fetchSuggestions: QuerySuggestionsXStoreModule['actions']['fetchSuggestions'] = (\n _context,\n request\n) => {\n return request\n ? XPlugin.adapter.
|
|
1
|
+
{"version":3,"file":"fetch-suggestions.action.js","sources":["../../../../../../src/x-modules/query-suggestions/store/actions/fetch-suggestions.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins';\nimport { QuerySuggestionsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link QuerySuggestionsActions.fetchSuggestions}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The query suggestions request to make.\n *\n * @returns A `void` promise that resolves when it fetches suggestions.\n *\n * @public\n */\nexport const fetchSuggestions: QuerySuggestionsXStoreModule['actions']['fetchSuggestions'] = (\n _context,\n request\n) => {\n return request\n ? XPlugin.adapter.querySuggestions(request).then(({ suggestions }) => suggestions)\n : [];\n};\n"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;MAWa,gBAAgB,GAAgE,CAC3F,QAAQ,EACR,OAAO;IAEP,OAAO,OAAO;UACV,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,WAAW,CAAC;UAChF,EAAE,CAAC;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/query-suggestions/store/getters/request.getter.ts"],"sourcesContent":["import { QuerySuggestionsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link QuerySuggestionsGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the query\n * suggestions module.\n *\n * @returns The query suggestions request to fetch data from the API.\n *\n * @public\n */\nexport const request: QuerySuggestionsXStoreModule['getters']['request'] = ({\n query,\n config,\n params\n}) => {\n return query.trim()\n ? {\n query,\n rows: config.maxItemsToRequest,\n start: 0,\n
|
|
1
|
+
{"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/query-suggestions/store/getters/request.getter.ts"],"sourcesContent":["import { QuerySuggestionsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link QuerySuggestionsGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the query\n * suggestions module.\n *\n * @returns The query suggestions request to fetch data from the API.\n *\n * @public\n */\nexport const request: QuerySuggestionsXStoreModule['getters']['request'] = ({\n query,\n config,\n params\n}) => {\n return query.trim()\n ? {\n query,\n rows: config.maxItemsToRequest,\n start: 0,\n extraParams: params\n }\n : null;\n};\n"],"names":[],"mappings":"AAEA;;;;;;;;;;MAUa,OAAO,GAAuD,CAAC,EAC1E,KAAK,EACL,MAAM,EACN,MAAM,EACP;IACC,OAAO,KAAK,CAAC,IAAI,EAAE;UACf;YACE,KAAK;YACL,IAAI,EAAE,MAAM,CAAC,iBAAiB;YAC9B,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,MAAM;SACpB;UACD,IAAI,CAAC;AACX;;;;"}
|
package/js/x-modules/recommendations/store/actions/fetch-and-save-recommendations.action.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-recommendations.action.js","sources":["../../../../../../src/x-modules/recommendations/store/actions/fetch-and-save-recommendations.action.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"fetch-and-save-recommendations.action.js","sources":["../../../../../../src/x-modules/recommendations/store/actions/fetch-and-save-recommendations.action.ts"],"sourcesContent":["import { Result, RecommendationsRequest } from '@empathyco/x-types';\n// eslint-disable-next-line max-len\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils';\nimport { RecommendationsActionContext } from '../types';\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n RecommendationsActionContext,\n RecommendationsRequest | null,\n Result[]\n>({\n fetch({ dispatch }, request) {\n return dispatch('fetchRecommendations', request);\n },\n onSuccess({ commit }, recommendations) {\n commit('setRecommendations', recommendations);\n }\n});\n\n/**\n * Default implementation for {@link RecommendationsActions.fetchAndSaveRecommendations}\n * action.\n *\n * @public\n */\nexport const fetchAndSaveRecommendations = fetchAndSave;\n\n/**\n * Default implementation for {@link RecommendationsActions.cancelFetchAndSaveRecommendations}\n * action.\n *\n * @public\n */\nexport const cancelFetchAndSaveRecommendations = cancelPrevious;\n"],"names":[],"mappings":";;AACA;AAIA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;IACA,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,OAAO;QACzB,OAAO,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;KAClD;IACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,eAAe;QACnC,MAAM,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAC;KAC/C;CACF,CAAC,CAAC;AAEH;;;;;;MAMa,2BAA2B,GAAG,aAAa;AAExD;;;;;;MAMa,iCAAiC,GAAG;;;;"}
|
|
@@ -12,9 +12,7 @@ import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
14
|
const fetchRecommendations = (_context, request) => {
|
|
15
|
-
return request
|
|
16
|
-
? XPlugin.adapter.getTopRecommendations(request).then(({ results }) => results)
|
|
17
|
-
: [];
|
|
15
|
+
return request ? XPlugin.adapter.recommendations(request).then(({ results }) => results) : [];
|
|
18
16
|
};
|
|
19
17
|
|
|
20
18
|
export { fetchRecommendations };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-recommendations.action.js","sources":["../../../../../../src/x-modules/recommendations/store/actions/fetch-recommendations.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins';\nimport { RecommendationsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link RecommendationsActions.fetchRecommendations}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The recommendations request to make.\n * @returns A `void` promise that resolves when it fetches recommendations.\n *\n * @public\n */\nexport const fetchRecommendations: RecommendationsXStoreModule['actions']['fetchRecommendations'] =\n (_context, request) => {\n return request
|
|
1
|
+
{"version":3,"file":"fetch-recommendations.action.js","sources":["../../../../../../src/x-modules/recommendations/store/actions/fetch-recommendations.action.ts"],"sourcesContent":["import { XPlugin } from '../../../../plugins';\nimport { RecommendationsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link RecommendationsActions.fetchRecommendations}.\n *\n * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,\n * provided by Vuex.\n * @param request - The recommendations request to make.\n * @returns A `void` promise that resolves when it fetches recommendations.\n *\n * @public\n */\nexport const fetchRecommendations: RecommendationsXStoreModule['actions']['fetchRecommendations'] =\n (_context, request) => {\n return request ? XPlugin.adapter.recommendations(request).then(({ results }) => results) : [];\n };\n"],"names":[],"mappings":";;;AAGA;;;;;;;;;;MAUa,oBAAoB,GAC/B,CAAC,QAAQ,EAAE,OAAO;IAChB,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,EAAE,CAAC;AAChG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/recommendations/store/getters/request.getter.ts"],"sourcesContent":["import { RecommendationsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link RecommendationsGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the query\n * suggestions module.\n * @returns The recommendations request to fetch data from the API.\n *\n * @public\n */\nexport const request: RecommendationsXStoreModule['getters']['request'] = ({\n origin,\n config,\n params\n}) => {\n return {\n rows: config.maxItemsToRequest,\n start: 0,\n origin,\n
|
|
1
|
+
{"version":3,"file":"request.getter.js","sources":["../../../../../../src/x-modules/recommendations/store/getters/request.getter.ts"],"sourcesContent":["import { RecommendationsXStoreModule } from '../types';\n\n/**\n * Default implementation for the {@link RecommendationsGetters.request} getter.\n *\n * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the query\n * suggestions module.\n * @returns The recommendations request to fetch data from the API.\n *\n * @public\n */\nexport const request: RecommendationsXStoreModule['getters']['request'] = ({\n origin,\n config,\n params\n}) => {\n return {\n rows: config.maxItemsToRequest,\n start: 0,\n origin,\n extraParams: params\n };\n};\n"],"names":[],"mappings":"AAEA;;;;;;;;;MASa,OAAO,GAAsD,CAAC,EACzE,MAAM,EACN,MAAM,EACN,MAAM,EACP;IACC,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,iBAAiB;QAC9B,KAAK,EAAE,CAAC;QACR,MAAM;QACN,WAAW,EAAE,MAAM;KACpB,CAAC;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-save-related-tags.action.js","sources":["../../../../../../src/x-modules/related-tags/store/actions/fetch-and-save-related-tags.action.ts"],"sourcesContent":["import { RelatedTagsRequest } from '@empathyco/x-
|
|
1
|
+
{"version":3,"file":"fetch-and-save-related-tags.action.js","sources":["../../../../../../src/x-modules/related-tags/store/actions/fetch-and-save-related-tags.action.ts"],"sourcesContent":["import { RelatedTag, RelatedTagsRequest } from '@empathyco/x-types';\n// eslint-disable-next-line max-len\nimport { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils';\nimport { RelatedTagsActionContext } from '../types';\n\nconst { fetchAndSave, cancelPrevious } = createFetchAndSaveActions<\n RelatedTagsActionContext,\n RelatedTagsRequest | null,\n RelatedTag[]\n>({\n fetch({ dispatch }, request) {\n return dispatch('fetchRelatedTags', request);\n },\n onSuccess({ commit }, relatedTags) {\n commit('setRelatedTags', relatedTags);\n }\n});\n\n/**\n * Default implementation for {@link RelatedTagsActions.fetchAndSaveRelatedTags} action.\n *\n * @public\n */\nexport const fetchAndSaveRelatedTags = fetchAndSave;\n\n/**\n * Default implementation for {@link RelatedTagsActions.fetchAndSaveRelatedTags} action.\n *\n * @public\n */\nexport const cancelFetchAndSaveRelatedTags = cancelPrevious;\n"],"names":[],"mappings":";;AACA;AAIA,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,yBAAyB,CAIhE;IACA,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,OAAO;QACzB,OAAO,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;KAC9C;IACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,WAAW;QAC/B,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;KACvC;CACF,CAAC,CAAC;AAEH;;;;;MAKa,uBAAuB,GAAG,aAAa;AAEpD;;;;;MAKa,6BAA6B,GAAG;;;;"}
|
|
@@ -11,9 +11,7 @@ import { XPlugin } from '../../../../plugins/x-plugin.js';
|
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
13
|
const fetchRelatedTags = (_context, request) => {
|
|
14
|
-
return request
|
|
15
|
-
? XPlugin.adapter.getRelatedTags(request).then(({ relatedTags }) => relatedTags)
|
|
16
|
-
: [];
|
|
14
|
+
return request ? XPlugin.adapter.relatedTags(request).then(({ relatedTags }) => relatedTags) : [];
|
|
17
15
|
};
|
|
18
16
|
|
|
19
17
|
export { fetchRelatedTags };
|