@empathyco/x-components 3.0.0-alpha.29 → 3.0.0-alpha.32
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 +140 -0
- package/core/index.js +9 -8
- package/core/index.js.map +1 -1
- package/design-system/default-theme.css +6 -1
- package/design-system/full-theme.css +6 -1
- package/design-system/list-default.css +3 -0
- package/design-system/suggestion-default.css +3 -1
- package/docs/API-reference/api/x-adapter.empathybannermapper._constructor_.md +2 -2
- package/docs/API-reference/api/x-adapter.empathypromotedmapper._constructor_.md +2 -2
- package/docs/API-reference/api/x-adapter.empathyredirectionmapper._constructor_.md +2 -2
- package/docs/API-reference/api/x-adapter.empathyresultmapper._constructor_.md +2 -2
- package/docs/API-reference/api/x-adapter.empathytaggingmapper.map.md +3 -3
- package/docs/API-reference/api/x-adapter.empathytaggingmapper.md +2 -2
- package/docs/API-reference/api/x-adapter.searchresponse.md +1 -1
- package/docs/API-reference/api/x-adapter.searchresponse.querytagging.md +1 -1
- package/docs/API-reference/api/x-adapter.trackableshowresponse.md +1 -1
- package/docs/API-reference/api/x-adapter.trackableshowresponse.showtagging.md +1 -1
- package/docs/API-reference/api/x-components.baseresultlink.md +0 -11
- package/docs/API-reference/api/x-components.basescroll.md +0 -12
- package/docs/API-reference/api/x-components.basesuggestion.emitevents.md +17 -0
- package/docs/API-reference/api/x-components.basesuggestion.feature.md +13 -0
- package/docs/API-reference/api/x-components.basesuggestion.md +8 -1
- package/docs/API-reference/api/x-components.clearpendingscrolltowire.md +13 -0
- package/docs/API-reference/api/x-components.defaultsessionservice._constructor_.md +21 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.clearsessionid.md +17 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.getsessionid.md +19 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.instance.md +13 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.md +37 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.session_id_key.md +13 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.storageservice.md +11 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.ttlms.md +11 -0
- package/docs/API-reference/api/x-components.featurelocation.md +22 -0
- package/docs/API-reference/api/{x-components.basemainscroll.mounted.md → x-components.globalxbus.created.md} +3 -3
- package/docs/API-reference/api/x-components.globalxbus.md +21 -0
- package/docs/API-reference/api/x-components.identifierresults.md +1 -0
- package/docs/API-reference/api/x-components.identifierresults.resultclickextraevents.md +13 -0
- package/docs/API-reference/api/x-components.identifierresultsactions.md +1 -1
- package/docs/API-reference/api/x-components.identifierresultsactions.saveorigin.md +24 -0
- package/docs/API-reference/api/x-components.identifierresultsmutations.md +2 -0
- package/docs/API-reference/api/x-components.identifierresultsmutations.setorigin.md +24 -0
- package/docs/API-reference/api/x-components.identifierresultsmutations.setparams.md +24 -0
- package/docs/API-reference/api/x-components.identifierresultsstate.md +2 -0
- package/docs/API-reference/api/x-components.identifierresultsstate.origin.md +13 -0
- package/docs/API-reference/api/x-components.identifierresultsstate.params.md +13 -0
- package/docs/API-reference/api/x-components.locationprovider.location.md +13 -0
- package/docs/API-reference/api/x-components.locationprovider.md +21 -0
- package/docs/API-reference/api/x-components.mainscroll.margin.md +13 -0
- package/docs/API-reference/api/x-components.mainscroll.md +33 -0
- package/docs/API-reference/api/x-components.mainscroll.mounted.md +17 -0
- package/docs/API-reference/api/x-components.mainscroll.restorescrolltimeoutms.md +13 -0
- package/docs/API-reference/api/x-components.mainscroll.threshold.md +13 -0
- package/docs/API-reference/api/x-components.mainscroll.usewindow.md +13 -0
- package/docs/API-reference/api/x-components.mainscroll.visibleelementsobserver.md +13 -0
- package/docs/API-reference/api/x-components.mainscrollitem._el.md +13 -0
- package/docs/API-reference/api/x-components.mainscrollitem.item.md +13 -0
- package/docs/API-reference/api/x-components.mainscrollitem.md +29 -0
- package/docs/API-reference/api/x-components.mainscrollitem.observeitem.md +25 -0
- package/docs/API-reference/api/x-components.mainscrollitem.tag.md +13 -0
- package/docs/API-reference/api/x-components.md +47 -6
- package/docs/API-reference/api/{x-components.partialquerybutton.events.md → x-components.partialquerybutton.emitevents.md} +8 -4
- package/docs/API-reference/api/x-components.partialquerybutton.md +6 -1
- package/docs/API-reference/api/x-components.queryfeature.md +13 -0
- package/docs/API-reference/api/x-components.queryorigin.md +4 -2
- package/docs/API-reference/api/x-components.queryorigininit.md +15 -0
- package/docs/API-reference/api/x-components.relatedtag.emitevents.md +17 -0
- package/docs/API-reference/api/x-components.relatedtag.md +6 -0
- package/docs/API-reference/api/x-components.resultfeature.md +13 -0
- package/docs/API-reference/api/x-components.resultorigin.md +15 -0
- package/docs/API-reference/api/x-components.saveidentifierresultsoriginwire.md +13 -0
- package/docs/API-reference/api/x-components.saveorigin.md +13 -0
- package/docs/API-reference/api/{x-components.setorigin.md → x-components.saveoriginwire.md} +3 -3
- package/docs/API-reference/api/{x-components.baseidscroll.distancetobottom.md → x-components.scroll.distancetobottom.md} +2 -2
- package/docs/API-reference/api/{x-components.baseidscroll.id.md → x-components.scroll.id.md} +2 -2
- package/docs/API-reference/api/x-components.scroll.md +23 -0
- package/docs/API-reference/api/{x-components.baseidscroll.throttlems.md → x-components.scroll.throttlems.md} +2 -2
- package/docs/API-reference/api/x-components.scrollactions.md +13 -0
- package/docs/API-reference/api/x-components.scrollcomponentstate.direction.md +13 -0
- package/docs/API-reference/api/x-components.scrollcomponentstate.hasalmostreachedend.md +13 -0
- package/docs/API-reference/api/x-components.scrollcomponentstate.hasreachedend.md +13 -0
- package/docs/API-reference/api/x-components.scrollcomponentstate.hasreachedstart.md +13 -0
- package/docs/API-reference/api/x-components.scrollcomponentstate.md +24 -0
- package/docs/API-reference/api/x-components.scrollcomponentstate.position.md +13 -0
- package/docs/API-reference/api/x-components.scrollgetters.md +13 -0
- package/docs/API-reference/api/x-components.scrollmixin._el.md +13 -0
- package/docs/API-reference/api/x-components.scrollmixin.firstelementthresholdpx.md +13 -0
- package/docs/API-reference/api/x-components.scrollmixin.md +3 -0
- package/docs/API-reference/api/x-components.scrollmixin.resetonchange.md +13 -0
- package/docs/API-reference/api/x-components.scrollmutations.md +21 -0
- package/docs/API-reference/api/x-components.scrollmutations.setpendingscrollto.md +24 -0
- package/docs/API-reference/api/x-components.scrollmutations.setscrollcomponentstate.md +24 -0
- package/docs/API-reference/api/x-components.scrollstate.data.md +13 -0
- package/docs/API-reference/api/x-components.scrollstate.md +21 -0
- package/docs/API-reference/api/x-components.scrollstate.pendingscrollto.md +13 -0
- package/docs/API-reference/api/x-components.scrollstatepayload.md +21 -0
- package/docs/API-reference/api/x-components.scrollstatepayload.newstate.md +13 -0
- package/docs/API-reference/api/{x-components.basescrolltotop.animation.md → x-components.scrolltotop.animation.md} +2 -2
- package/docs/API-reference/api/x-components.scrolltotop.md +23 -0
- package/docs/API-reference/api/{x-components.basescrolltotop.scrollid.md → x-components.scrolltotop.scrollid.md} +3 -3
- package/docs/API-reference/api/{x-components.basescrolltotop.thresholdpx.md → x-components.scrolltotop.thresholdpx.md} +2 -2
- package/docs/API-reference/api/x-components.scrollvisibilityobserver.md +21 -0
- package/docs/API-reference/api/x-components.scrollvisibilityobserver.observe.md +24 -0
- package/docs/API-reference/api/x-components.scrollvisibilityobserver.unobserve.md +24 -0
- package/docs/API-reference/api/x-components.scrollxevents.md +27 -0
- package/docs/API-reference/api/x-components.scrollxevents.scrollrestorefailed.md +13 -0
- package/docs/API-reference/api/x-components.scrollxevents.scrollrestoresucceeded.md +13 -0
- package/docs/API-reference/api/x-components.scrollxevents.useralmostreachedscrollend.md +13 -0
- package/docs/API-reference/api/{x-components.xeventstypes.userchangedscrolldirection.md → x-components.scrollxevents.userchangedscrolldirection.md} +2 -2
- package/docs/API-reference/api/x-components.scrollxevents.userreachedscrollend.md +13 -0
- package/docs/API-reference/api/x-components.scrollxevents.userreachedscrollstart.md +13 -0
- package/docs/API-reference/api/{x-components.xeventstypes.userscrolled.md → x-components.scrollxevents.userscrolled.md} +2 -2
- package/docs/API-reference/api/x-components.scrollxevents.userscrolledtoelement.md +13 -0
- package/docs/API-reference/api/x-components.scrollxmodule.md +13 -0
- package/docs/API-reference/api/x-components.scrollxstoremodule.md +15 -0
- package/docs/API-reference/api/x-components.searchactions.md +1 -0
- package/docs/API-reference/api/x-components.searchactions.saveorigin.md +24 -0
- package/docs/API-reference/api/{x-components.searchbutton.events.md → x-components.searchbutton.emitevents.md} +9 -3
- package/docs/API-reference/api/x-components.searchbutton.md +6 -1
- package/docs/API-reference/api/x-components.searchmutations.md +1 -0
- package/docs/API-reference/api/x-components.searchmutations.setorigin.md +2 -2
- package/docs/API-reference/api/x-components.searchmutations.setquerytagging.md +24 -0
- package/docs/API-reference/api/x-components.searchstate.md +1 -0
- package/docs/API-reference/api/x-components.searchstate.querytagging.md +13 -0
- package/docs/API-reference/api/x-components.searchxevents.md +1 -0
- package/docs/API-reference/api/x-components.searchxevents.searchtaggingchanged.md +13 -0
- package/docs/API-reference/api/x-components.sessionservice.clearsessionid.md +17 -0
- package/docs/API-reference/api/x-components.sessionservice.getsessionid.md +23 -0
- package/docs/API-reference/api/x-components.sessionservice.md +21 -0
- package/docs/API-reference/api/x-components.setconsent.md +13 -0
- package/docs/API-reference/api/x-components.setidentifierresultsextraparams.md +13 -0
- package/docs/API-reference/api/x-components.setpendingscrolltowire.md +13 -0
- package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +13 -0
- package/docs/API-reference/api/x-components.setscrolldirectionwire.md +13 -0
- package/docs/API-reference/api/x-components.setscrollhasalmostreachedendwire.md +13 -0
- package/docs/API-reference/api/x-components.setscrollhasreachedendwire.md +13 -0
- package/docs/API-reference/api/x-components.setscrollhasreachedstartwire.md +13 -0
- package/docs/API-reference/api/x-components.setscrollpositionwire.md +13 -0
- package/docs/API-reference/api/x-components.setsessionduration.md +13 -0
- package/docs/API-reference/api/x-components.seturlscroll.md +13 -0
- package/docs/API-reference/api/x-components.snippetcallbacks.md +15 -0
- package/docs/API-reference/api/x-components.snippetconfig.callbacks.md +13 -0
- package/docs/API-reference/api/x-components.snippetconfig.md +1 -0
- package/docs/API-reference/api/{x-components.spellcheckbutton.events.md → x-components.spellcheckbutton.emitevents.md} +8 -4
- package/docs/API-reference/api/x-components.spellcheckbutton.md +6 -1
- package/docs/API-reference/api/x-components.tagging.activeconsent.md +18 -0
- package/docs/API-reference/api/x-components.tagging.consent.md +13 -0
- package/docs/API-reference/api/x-components.tagging.md +28 -0
- package/docs/API-reference/api/{x-components.basemainscroll.render.md → x-components.tagging.render.md} +2 -2
- package/docs/API-reference/api/x-components.taggingactions.md +7 -0
- package/docs/API-reference/api/x-components.taggingactions.track.md +24 -0
- package/docs/API-reference/api/x-components.taggingconfig.md +8 -0
- package/docs/API-reference/api/x-components.taggingconfig.querytaggingdebouncems.md +13 -0
- package/docs/API-reference/api/x-components.taggingconfig.sessionttlms.md +13 -0
- package/docs/API-reference/api/x-components.taggingmutations.md +9 -0
- package/docs/API-reference/api/x-components.taggingmutations.setconsent.md +24 -0
- package/docs/API-reference/api/x-components.taggingmutations.setquerytaggingdebounce.md +24 -0
- package/docs/API-reference/api/x-components.taggingmutations.setsessionduration.md +24 -0
- package/docs/API-reference/api/x-components.taggingstate.config.md +13 -0
- package/docs/API-reference/api/x-components.taggingstate.consent.md +13 -0
- package/docs/API-reference/api/x-components.taggingstate.md +8 -0
- package/docs/API-reference/api/x-components.taggingxevents.consentchanged.md +13 -0
- package/docs/API-reference/api/x-components.taggingxevents.consentprovided.md +13 -0
- package/docs/API-reference/api/x-components.taggingxevents.md +10 -0
- package/docs/API-reference/api/x-components.taggingxevents.querytaggingdebounceprovided.md +13 -0
- package/docs/API-reference/api/x-components.taggingxevents.sessiondurationprovided.md +13 -0
- package/docs/API-reference/api/x-components.track.md +13 -0
- package/docs/API-reference/api/x-components.trackwire.md +13 -0
- package/docs/API-reference/api/x-components.urlmutations.md +1 -0
- package/docs/API-reference/api/x-components.urlmutations.setscroll.md +24 -0
- package/docs/API-reference/api/x-components.urlparams.md +1 -1
- package/docs/API-reference/api/x-components.urlparams.scroll.md +1 -1
- package/docs/API-reference/api/{x-components.basemainscroll.beforedestroy.md → x-components.windowscroll.beforedestroy.md} +4 -2
- package/docs/API-reference/api/{x-components.basemainscroll.id.md → x-components.windowscroll.id.md} +2 -2
- package/docs/API-reference/api/x-components.windowscroll.md +30 -0
- package/docs/API-reference/api/{x-components.basescroll.mounted.md → x-components.windowscroll.mounted.md} +2 -2
- package/docs/API-reference/api/{x-components.baseresultlink.mounted.md → x-components.windowscroll.render.md} +3 -3
- package/docs/API-reference/api/x-components.windowscroll.scrollableelement.md +13 -0
- package/docs/API-reference/api/x-components.wiremetadata.feature.md +13 -0
- package/docs/API-reference/api/x-components.wiremetadata.location.md +13 -0
- package/docs/API-reference/api/x-components.wiremetadata.md +2 -1
- package/docs/API-reference/api/x-components.xcomponentbusapi.emit_1.md +2 -2
- package/docs/API-reference/api/x-components.xeventlisteners.md +17 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +4 -8
- package/docs/API-reference/api/x-components.xeventstypes.snippetcallbackexecuted.md +16 -0
- package/docs/API-reference/api/x-components.xmodulestree.md +1 -0
- package/docs/API-reference/api/x-components.xmodulestree.scroll.md +11 -0
- package/docs/API-reference/api/x-types.banner.md +2 -3
- package/docs/API-reference/api/x-types.identifiable.id.md +1 -1
- package/docs/API-reference/api/x-types.identifiable.md +2 -2
- package/docs/API-reference/api/x-types.md +5 -2
- package/docs/API-reference/api/x-types.promoted.md +2 -3
- package/docs/API-reference/api/x-types.redirection.md +2 -3
- package/docs/API-reference/api/x-types.result.md +2 -3
- package/docs/API-reference/api/x-types.taggable.md +20 -0
- package/docs/API-reference/api/x-types.taggable.tagging.md +13 -0
- package/docs/API-reference/api/{x-types.banner.tagging.md → x-types.taggableschema.md} +4 -6
- package/docs/API-reference/api/x-types.tagging.add2cart.md +13 -0
- package/docs/API-reference/api/x-types.tagging.checkout.md +13 -0
- package/docs/API-reference/api/{x-types.promoted.tagging.md → x-types.tagging.click.md} +4 -6
- package/docs/API-reference/api/x-types.tagging.md +6 -3
- package/docs/API-reference/api/x-types.tagging.query.md +13 -0
- package/docs/API-reference/api/x-types.tagging.wishlist.md +13 -0
- package/docs/API-reference/api/x-types.tagginginfo.md +21 -0
- package/docs/API-reference/api/{x-types.tagging.params.md → x-types.tagginginfo.params.md} +3 -3
- package/docs/API-reference/api/{x-types.tagging.url.md → x-types.tagginginfo.url.md} +2 -2
- package/docs/API-reference/api/x-types.tagginginfoschema.md +13 -0
- package/docs/API-reference/components/common/result/x-components.base-result-link.md +2 -3
- package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +9 -9
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +9 -8
- package/docs/API-reference/components/common/x-components.global-x-bus.md +51 -0
- package/docs/API-reference/components/common/x-components.location-provider.md +54 -0
- package/docs/API-reference/components/common/x-components.snippet-callbacks.md +37 -0
- package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +10 -6
- package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +84 -0
- package/docs/API-reference/components/scroll/x-components.main-scroll.md +175 -0
- package/docs/API-reference/components/{common/scroll/x-components.base-scroll-to-top.md → scroll/x-components.scroll-to-top.md} +11 -14
- package/docs/API-reference/components/scroll/x-components.scroll.md +168 -0
- package/docs/API-reference/components/scroll/x-components.window-scroll.md +158 -0
- package/docs/API-reference/components/tagging/x-components.tagging.md +88 -0
- package/docs/build-search-ui/README.md +113 -0
- package/docs/build-search-ui/web-archetype-integration-guide.md +183 -0
- package/docs/build-search-ui/web-use-x-components-guide.md +170 -0
- package/docs/build-search-ui/web-x-components-integration-guide.md +197 -0
- package/docs/build-search-ui/x-architecture/README.md +133 -0
- package/docs/sidebar.json +1 -1
- package/identifier-results/index.js +2 -1
- package/js/components/animations/animate-width.vue.js +1 -1
- package/js/components/animations/collapse-from-top.vue.js +1 -1
- package/js/components/animations/collapse-height.vue.js +3 -3
- package/js/components/animations/collapse-width.vue.js +3 -3
- package/js/components/animations/cross-fade.vue.js +1 -1
- package/js/components/animations/fade-and-slide.vue.js +2 -2
- package/js/components/animations/staggered-fade-and-slide.vue.js +2 -2
- package/js/components/animations/translate-from-left.vue.js +1 -1
- package/js/components/animations/translate-from-right.vue.js +1 -1
- package/js/components/auto-progress-bar.vue.js +4 -5
- package/js/components/auto-progress-bar.vue.js.map +1 -1
- package/js/components/base-dropdown.vue.js +33 -45
- package/js/components/base-dropdown.vue.js.map +1 -1
- package/js/components/base-event-button.vue.js +1 -1
- package/js/components/base-grid.vue.js +7 -9
- package/js/components/base-grid.vue.js.map +1 -1
- package/js/components/base-keyboard-navigation.vue.js +7 -10
- package/js/components/base-keyboard-navigation.vue.js.map +1 -1
- package/js/components/base-rating.vue.js +19 -20
- package/js/components/base-rating.vue.js.map +1 -1
- package/js/components/base-variable-column-grid.vue.js +6 -7
- package/js/components/base-variable-column-grid.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-dropdown.vue.js +11 -14
- package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue.js +9 -11
- package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
- package/js/components/currency/base-currency.vue.js +2 -3
- package/js/components/currency/base-currency.vue.js.map +1 -1
- package/js/components/filters/labels/base-rating-filter-label.vue.js +7 -8
- package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
- package/js/components/{scroll/base-main-scroll.vue.js → global-x-bus.vue.js} +2 -2
- package/js/components/global-x-bus.vue.js.map +1 -0
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js +46 -0
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/arrow.vue.js +4 -6
- package/js/components/icons/arrow.vue.js.map +1 -1
- package/js/components/icons/bag.vue.js +8 -12
- package/js/components/icons/bag.vue.js.map +1 -1
- package/js/components/icons/bar-code.vue.js +6 -9
- package/js/components/icons/bar-code.vue.js.map +1 -1
- package/js/components/icons/barcode-tiny.vue.js +6 -9
- package/js/components/icons/barcode-tiny.vue.js.map +1 -1
- package/js/components/icons/cart.vue.js +10 -13
- package/js/components/icons/cart.vue.js.map +1 -1
- package/js/components/icons/check-tiny.vue.js +4 -6
- package/js/components/icons/check-tiny.vue.js.map +1 -1
- package/js/components/icons/check.vue.js +4 -6
- package/js/components/icons/check.vue.js.map +1 -1
- package/js/components/icons/checkbox-card-selected.vue.js +5 -7
- package/js/components/icons/checkbox-card-selected.vue.js.map +1 -1
- package/js/components/icons/checkbox-card-unselected.vue.js +5 -7
- package/js/components/icons/checkbox-card-unselected.vue.js.map +1 -1
- package/js/components/icons/checkbox-selected.vue.js +5 -7
- package/js/components/icons/checkbox-selected.vue.js.map +1 -1
- package/js/components/icons/checkbox-unselected.vue.js +6 -6
- package/js/components/icons/chevron-down.vue.js +6 -8
- package/js/components/icons/chevron-down.vue.js.map +1 -1
- package/js/components/icons/chevron-left.vue.js +6 -8
- package/js/components/icons/chevron-left.vue.js.map +1 -1
- package/js/components/icons/chevron-right.vue.js +4 -6
- package/js/components/icons/chevron-right.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-down.vue.js +6 -8
- package/js/components/icons/chevron-tiny-down.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-left.vue.js +6 -8
- package/js/components/icons/chevron-tiny-left.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-right.vue.js +6 -8
- package/js/components/icons/chevron-tiny-right.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-up.vue.js +6 -8
- package/js/components/icons/chevron-tiny-up.vue.js.map +1 -1
- package/js/components/icons/chevron-up.vue.js +6 -8
- package/js/components/icons/chevron-up.vue.js.map +1 -1
- package/js/components/icons/cross-tiny.vue.js +4 -6
- package/js/components/icons/cross-tiny.vue.js.map +1 -1
- package/js/components/icons/cross.vue.js +4 -6
- package/js/components/icons/cross.vue.js.map +1 -1
- package/js/components/icons/filters.vue.js +10 -15
- package/js/components/icons/filters.vue.js.map +1 -1
- package/js/components/icons/grid-1-col.vue.js +6 -9
- package/js/components/icons/grid-1-col.vue.js.map +1 -1
- package/js/components/icons/grid-2-col.vue.js +8 -10
- package/js/components/icons/grid-2-col.vue.js.map +1 -1
- package/js/components/icons/hide.vue.js +10 -15
- package/js/components/icons/hide.vue.js.map +1 -1
- package/js/components/icons/history-tiny.vue.js +9 -12
- package/js/components/icons/history-tiny.vue.js.map +1 -1
- package/js/components/icons/history.vue.js +9 -12
- package/js/components/icons/history.vue.js.map +1 -1
- package/js/components/icons/menu.vue.js +6 -8
- package/js/components/icons/menu.vue.js.map +1 -1
- package/js/components/icons/minus-tiny.vue.js +4 -6
- package/js/components/icons/minus-tiny.vue.js.map +1 -1
- package/js/components/icons/minus.vue.js +4 -6
- package/js/components/icons/minus.vue.js.map +1 -1
- package/js/components/icons/nq-1.vue.js +4 -6
- package/js/components/icons/nq-1.vue.js.map +1 -1
- package/js/components/icons/nq-2.vue.js +4 -6
- package/js/components/icons/nq-2.vue.js.map +1 -1
- package/js/components/icons/nq-3.vue.js +6 -8
- package/js/components/icons/nq-3.vue.js.map +1 -1
- package/js/components/icons/nq-4.vue.js +9 -12
- package/js/components/icons/nq-4.vue.js.map +1 -1
- package/js/components/icons/plus.vue.js +4 -6
- package/js/components/icons/plus.vue.js.map +1 -1
- package/js/components/icons/search-tiny.vue.js +6 -9
- package/js/components/icons/search-tiny.vue.js.map +1 -1
- package/js/components/icons/search.vue.js +6 -8
- package/js/components/icons/search.vue.js.map +1 -1
- package/js/components/icons/show.vue.js +7 -10
- package/js/components/icons/show.vue.js.map +1 -1
- package/js/components/icons/star.vue.js +6 -9
- package/js/components/icons/star.vue.js.map +1 -1
- package/js/components/icons/trash-open.vue.js +12 -15
- package/js/components/icons/trash-open.vue.js.map +1 -1
- package/js/components/icons/trash.vue.js +8 -11
- package/js/components/icons/trash.vue.js.map +1 -1
- package/js/components/icons/trending-tiny.vue.js +8 -10
- package/js/components/icons/trending-tiny.vue.js.map +1 -1
- package/js/components/icons/trending.vue.js +8 -10
- package/js/components/icons/trending.vue.js.map +1 -1
- package/js/components/icons/user.vue.js +6 -9
- package/js/components/icons/user.vue.js.map +1 -1
- package/js/components/items-list.vue.js +6 -7
- package/js/components/items-list.vue.js.map +1 -1
- package/js/components/layouts/multi-column-max-width-layout.vue.js +82 -109
- package/js/components/layouts/multi-column-max-width-layout.vue.js.map +1 -1
- package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js +3 -2
- package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/layouts/single-column-layout.vue.js +51 -73
- package/js/components/layouts/single-column-layout.vue.js.map +1 -1
- package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js +3 -2
- package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/location-provider.vue.js +39 -0
- package/js/components/location-provider.vue.js.map +1 -0
- package/js/components/location-provider.vue_rollup-plugin-vue=script.js +27 -0
- package/js/components/location-provider.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/modals/base-events-modal-close.vue.js +2 -2
- package/js/components/modals/base-events-modal-open.vue.js +2 -2
- package/js/components/modals/base-events-modal.vue.js +3 -3
- package/js/components/modals/base-id-modal-close.vue.js +2 -2
- package/js/components/modals/base-id-modal-open.vue.js +2 -2
- package/js/components/modals/base-id-modal.vue.js +3 -3
- package/js/components/modals/base-modal.vue.js +9 -11
- package/js/components/modals/base-modal.vue.js.map +1 -1
- package/js/components/panels/base-header-toggle-panel.vue.js +5 -7
- package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue.js +2 -2
- package/js/components/panels/base-id-toggle-panel.vue.js +1 -1
- package/js/components/panels/base-toggle-panel.vue.js +3 -4
- package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue.js +2 -2
- package/js/components/result/base-result-current-price.vue.js +6 -8
- package/js/components/result/base-result-current-price.vue.js.map +1 -1
- package/js/components/result/base-result-fallback-image.vue.js +7 -9
- package/js/components/result/base-result-fallback-image.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +9 -12
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-link.vue.js +7 -7
- package/js/components/result/base-result-link.vue.js.map +1 -1
- package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js +5 -14
- package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/result/base-result-placeholder-image.vue.js +7 -9
- package/js/components/result/base-result-placeholder-image.vue.js.map +1 -1
- package/js/components/result/base-result-previous-price.vue.js +7 -9
- package/js/components/result/base-result-previous-price.vue.js.map +1 -1
- package/js/components/scroll/base-scroll.vue.js +4 -4
- package/js/components/scroll/base-scroll.vue.js.map +1 -1
- package/js/components/scroll/base-scroll.vue_rollup-plugin-vue=script.js +2 -49
- package/js/components/scroll/base-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/scroll/scroll.mixin.js +122 -52
- package/js/components/scroll/scroll.mixin.js.map +1 -1
- package/js/components/sliding-panel.vue.js +11 -14
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/snippet-callbacks.vue.js +47 -0
- package/js/components/snippet-callbacks.vue.js.map +1 -0
- package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js +58 -0
- package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js +1 -0
- package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/suggestions/base-suggestion.vue.js +7 -9
- package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
- package/js/components/suggestions/base-suggestion.vue_rollup-plugin-vue=script.js +21 -6
- package/js/components/suggestions/base-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/suggestions/base-suggestions.vue.js +6 -7
- package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
- package/js/components/x-component.utils.js +2 -2
- package/js/components/x-component.utils.js.map +1 -1
- package/js/index.js +27 -12
- package/js/index.js.map +1 -1
- package/js/plugins/x-plugin.js +1 -0
- package/js/plugins/x-plugin.js.map +1 -1
- package/js/plugins/x-plugin.mixin.js +16 -6
- package/js/plugins/x-plugin.mixin.js.map +1 -1
- package/js/store/x.module.js +7 -6
- package/js/store/x.module.js.map +1 -1
- package/js/utils/origin.js +20 -0
- package/js/utils/origin.js.map +1 -0
- package/js/utils/storage.js +2 -2
- package/js/utils/storage.js.map +1 -1
- package/js/x-modules/device/components/device-detector.vue.js +2 -2
- package/js/x-modules/empathize/components/empathize.vue.js +5 -6
- package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/extra-params/components/renderless-extra-param.vue.js +3 -4
- package/js/x-modules/extra-params/components/renderless-extra-param.vue.js.map +1 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue.js +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +7 -6
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue.js +6 -8
- package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/facets/facets.vue.js +10 -11
- package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue.js +5 -6
- package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/filters/base-filter.vue.js +5 -6
- package/js/x-modules/facets/components/filters/base-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +19 -23
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +29 -38
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/filters/number-range-filter.vue.js +5 -6
- package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/filters/simple-filter.vue.js +13 -17
- package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/lists/filters-list.vue.js +4 -4
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/lists/filters-search.vue.js +8 -10
- package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +14 -20
- package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue.js +3 -4
- package/js/x-modules/facets/components/lists/selected-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js +12 -18
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +7 -6
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/service/facets.service.js +1 -0
- package/js/x-modules/facets/service/facets.service.js.map +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js +5 -6
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue.js +19 -25
- package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js +14 -18
- package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/history-queries/components/remove-history-query.vue.js +2 -2
- package/js/x-modules/identifier-results/components/identifier-result.vue.js +2 -2
- package/js/x-modules/identifier-results/components/identifier-results.vue.js +4 -4
- package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
- package/js/x-modules/identifier-results/components/identifier-results.vue_rollup-plugin-vue=script.js +14 -2
- package/js/x-modules/identifier-results/components/identifier-results.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/identifier-results/store/actions/save-origin.action.js +18 -0
- package/js/x-modules/identifier-results/store/actions/save-origin.action.js.map +1 -0
- package/js/x-modules/identifier-results/store/actions/save-query.action.js +4 -0
- package/js/x-modules/identifier-results/store/actions/save-query.action.js.map +1 -1
- package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js +5 -8
- package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map +1 -1
- package/js/x-modules/identifier-results/store/module.js +16 -7
- package/js/x-modules/identifier-results/store/module.js.map +1 -1
- package/js/x-modules/identifier-results/wiring.js +25 -3
- package/js/x-modules/identifier-results/wiring.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries-list.vue.js +9 -12
- package/js/x-modules/next-queries/components/next-queries-list.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js +15 -20
- package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js +9 -10
- package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue.js +9 -10
- package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue.js +15 -20
- package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +10 -11
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +15 -20
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
- package/js/x-modules/recommendations/components/recommendations.vue.js +9 -12
- package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue.js +8 -8
- package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js +23 -24
- package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tags.vue.js +13 -17
- package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue.js +52 -0
- package/js/x-modules/scroll/components/main-scroll-item.vue.js.map +1 -0
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +190 -0
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/x-modules/scroll/components/main-scroll.vue.js +39 -0
- package/js/x-modules/scroll/components/main-scroll.vue.js.map +1 -0
- package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js +204 -0
- package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/{components/scroll/base-scroll-to-top.vue.js → x-modules/scroll/components/scroll-to-top.vue.js} +5 -6
- package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -0
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +233 -0
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/x-modules/scroll/components/scroll.const.js +15 -0
- package/js/x-modules/scroll/components/scroll.const.js.map +1 -0
- package/js/{components/scroll/base-id-scroll.vue.js → x-modules/scroll/components/scroll.vue.js} +9 -10
- package/js/x-modules/scroll/components/scroll.vue.js.map +1 -0
- package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +110 -0
- package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/x-modules/scroll/components/window-scroll.vue.js +39 -0
- package/js/x-modules/scroll/components/window-scroll.vue.js.map +1 -0
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +188 -0
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/x-modules/scroll/store/emitters.js +15 -0
- package/js/x-modules/scroll/store/emitters.js.map +1 -0
- package/js/x-modules/scroll/store/module.js +36 -0
- package/js/x-modules/scroll/store/module.js.map +1 -0
- package/js/x-modules/scroll/wiring.js +114 -0
- package/js/x-modules/scroll/wiring.js.map +1 -0
- package/js/x-modules/scroll/x-module.js +19 -0
- package/js/x-modules/scroll/x-module.js.map +1 -0
- package/js/x-modules/search/components/banner.vue.js +4 -6
- package/js/x-modules/search/components/banner.vue.js.map +1 -1
- package/js/x-modules/search/components/banners-list.vue.js +9 -12
- package/js/x-modules/search/components/banners-list.vue.js.map +1 -1
- package/js/x-modules/search/components/banners-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/partial-query-button.vue.js +6 -6
- package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
- package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js +21 -123
- package/js/x-modules/search/components/partial-query-button.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/partial-results-list.vue.js +4 -4
- package/js/x-modules/search/components/promoted.vue.js +4 -6
- package/js/x-modules/search/components/promoted.vue.js.map +1 -1
- package/js/x-modules/search/components/promoteds-list.vue.js +9 -12
- package/js/x-modules/search/components/promoteds-list.vue.js.map +1 -1
- package/js/x-modules/search/components/promoteds-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/redirection.vue.js +4 -5
- package/js/x-modules/search/components/redirection.vue.js.map +1 -1
- package/js/x-modules/search/components/results-list.vue.js +9 -12
- package/js/x-modules/search/components/results-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-dropdown.vue.js +13 -16
- package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue.js +8 -10
- package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/search/components/sort.mixin.js +6 -6
- package/js/x-modules/search/components/spellcheck-button.vue.js +6 -6
- package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js +21 -122
- package/js/x-modules/search/components/spellcheck-button.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue.js +4 -6
- package/js/x-modules/search/components/spellcheck.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +6 -6
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +4 -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/save-origin.action.js +18 -0
- package/js/x-modules/search/store/actions/save-origin.action.js.map +1 -0
- package/js/x-modules/search/store/emitters.js +8 -0
- package/js/x-modules/search/store/emitters.js.map +1 -1
- package/js/x-modules/search/store/module.js +13 -3
- package/js/x-modules/search/store/module.js.map +1 -1
- package/js/x-modules/search/wiring.js +5 -5
- package/js/x-modules/search/wiring.js.map +1 -1
- package/js/x-modules/search-box/components/clear-search-input.vue.js +5 -6
- package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-button.vue.js +6 -6
- package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js +24 -15
- package/js/x-modules/search-box/components/search-button.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue.js +10 -11
- package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js +10 -9
- package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/tagging/components/tagging.vue.js +39 -0
- package/js/x-modules/tagging/components/tagging.vue.js.map +1 -0
- package/js/x-modules/tagging/components/tagging.vue_rollup-plugin-vue=script.js +65 -0
- package/js/x-modules/tagging/components/tagging.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/x-modules/tagging/service/session.service.js +52 -0
- package/js/x-modules/tagging/service/session.service.js.map +1 -0
- package/js/x-modules/tagging/store/actions/track.action.js +43 -0
- package/js/x-modules/tagging/store/actions/track.action.js.map +1 -0
- package/js/x-modules/tagging/store/emitters.js +3 -1
- package/js/x-modules/tagging/store/emitters.js.map +1 -1
- package/js/x-modules/tagging/store/module.js +21 -3
- package/js/x-modules/tagging/store/module.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +86 -2
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js +2 -2
- package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js +2 -2
- package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/url/store/initial-state.js +1 -1
- package/js/x-modules/url/store/initial-state.js.map +1 -1
- package/js/x-modules/url/store/module.js +3 -0
- package/js/x-modules/url/store/module.js.map +1 -1
- package/js/x-modules/url/wiring.js +10 -1
- package/js/x-modules/url/wiring.js.map +1 -1
- package/package.json +18 -14
- package/report/tsdoc-metadata.json +1 -1
- package/report/x-adapter.api.json +21 -21
- package/report/x-components.api.json +4574 -1421
- package/report/x-components.api.md +456 -138
- package/report/x-types.api.json +397 -311
- package/scroll/index.d.ts +1 -0
- package/scroll/index.js +10 -0
- package/search/index.js +1 -1
- package/tagging/index.js +5 -2
- package/types/adapter/mocked-adapter.d.ts.map +1 -1
- package/types/components/global-x-bus.vue.d.ts +25 -0
- package/types/components/global-x-bus.vue.d.ts.map +1 -0
- package/types/components/index.d.ts +3 -0
- package/types/components/index.d.ts.map +1 -1
- package/types/components/layouts/multi-column-max-width-layout.vue.d.ts.map +1 -1
- package/types/components/layouts/single-column-layout.vue.d.ts.map +1 -1
- package/types/components/location-provider.vue.d.ts +17 -0
- package/types/components/location-provider.vue.d.ts.map +1 -0
- package/types/components/result/base-result-link.vue.d.ts +8 -18
- package/types/components/result/base-result-link.vue.d.ts.map +1 -1
- package/types/components/scroll/base-scroll.vue.d.ts +0 -28
- package/types/components/scroll/base-scroll.vue.d.ts.map +1 -1
- package/types/components/scroll/index.d.ts +0 -3
- package/types/components/scroll/index.d.ts.map +1 -1
- package/types/components/scroll/scroll.mixin.d.ts +75 -30
- package/types/components/scroll/scroll.mixin.d.ts.map +1 -1
- package/types/components/snippet-callbacks.vue.d.ts +27 -0
- package/types/components/snippet-callbacks.vue.d.ts.map +1 -0
- package/types/components/suggestions/base-suggestion.vue.d.ts +15 -2
- package/types/components/suggestions/base-suggestion.vue.d.ts.map +1 -1
- package/types/components/x-component.utils.d.ts +1 -1
- package/types/components/x-component.utils.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/plugins/x-plugin.mixin.d.ts +2 -2
- package/types/plugins/x-plugin.mixin.d.ts.map +1 -1
- package/types/plugins/x-plugin.types.d.ts +1 -1
- package/types/plugins/x-plugin.types.d.ts.map +1 -1
- package/types/router.d.ts.map +1 -1
- package/types/store/x.module.d.ts.map +1 -1
- package/types/types/index.d.ts +1 -1
- package/types/types/index.d.ts.map +1 -1
- package/types/types/origin.d.ts +46 -0
- package/types/types/origin.d.ts.map +1 -0
- package/types/types/url-params.d.ts +1 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/index.d.ts.map +1 -1
- package/types/utils/origin.d.ts +13 -0
- package/types/utils/origin.d.ts.map +1 -0
- package/types/utils/storage.d.ts +1 -7
- package/types/utils/storage.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts +26 -40
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/wiring/wiring.types.d.ts +9 -10
- package/types/wiring/wiring.types.d.ts.map +1 -1
- package/types/x-installer/api/api.types.d.ts +12 -0
- package/types/x-installer/api/api.types.d.ts.map +1 -1
- package/types/x-modules/history-queries/components/history-query.vue.d.ts.map +1 -1
- package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts +8 -0
- package/types/x-modules/identifier-results/components/identifier-results.vue.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/actions/{set-url-params.action.d.ts → save-origin.action.d.ts} +4 -4
- package/types/x-modules/identifier-results/store/actions/save-origin.action.d.ts.map +1 -0
- package/types/x-modules/identifier-results/store/actions/save-query.action.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/getters/identifier-results-request.getter.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/index.d.ts +1 -0
- package/types/x-modules/identifier-results/store/index.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/module.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/types.d.ts +35 -17
- package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
- package/types/x-modules/identifier-results/wiring.d.ts +17 -1
- package/types/x-modules/identifier-results/wiring.d.ts.map +1 -1
- package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
- package/types/x-modules/popular-searches/components/popular-search.vue.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/components/query-suggestion.vue.d.ts.map +1 -1
- package/types/x-modules/related-tags/components/related-tag.vue.d.ts +10 -5
- package/types/x-modules/related-tags/components/related-tag.vue.d.ts.map +1 -1
- package/types/x-modules/scroll/components/index.d.ts +8 -0
- package/types/x-modules/scroll/components/index.d.ts.map +1 -0
- package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts +65 -0
- package/types/x-modules/scroll/components/main-scroll-item.vue.d.ts.map +1 -0
- package/types/x-modules/scroll/components/main-scroll.vue.d.ts +121 -0
- package/types/x-modules/scroll/components/main-scroll.vue.d.ts.map +1 -0
- package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts +80 -0
- package/types/x-modules/scroll/components/scroll-to-top.vue.d.ts.map +1 -0
- package/types/x-modules/scroll/components/scroll.const.d.ts +15 -0
- package/types/x-modules/scroll/components/scroll.const.d.ts.map +1 -0
- package/types/x-modules/scroll/components/scroll.types.d.ts +20 -0
- package/types/x-modules/scroll/components/scroll.types.d.ts.map +1 -0
- package/types/{components/scroll/base-id-scroll.vue.d.ts → x-modules/scroll/components/scroll.vue.d.ts} +17 -30
- package/types/x-modules/scroll/components/scroll.vue.d.ts.map +1 -0
- package/types/x-modules/scroll/components/window-scroll.vue.d.ts +47 -0
- package/types/x-modules/scroll/components/window-scroll.vue.d.ts.map +1 -0
- package/types/x-modules/scroll/events.types.d.ts +53 -0
- package/types/x-modules/scroll/events.types.d.ts.map +1 -0
- package/types/x-modules/scroll/index.d.ts +6 -0
- package/types/x-modules/scroll/index.d.ts.map +1 -0
- package/types/x-modules/scroll/store/emitters.d.ts +7 -0
- package/types/x-modules/scroll/store/emitters.d.ts.map +1 -0
- package/types/x-modules/scroll/store/index.d.ts +4 -0
- package/types/x-modules/scroll/store/index.d.ts.map +1 -0
- package/types/x-modules/scroll/store/module.d.ts +8 -0
- package/types/x-modules/scroll/store/module.d.ts.map +1 -0
- package/types/x-modules/scroll/store/types.d.ts +98 -0
- package/types/x-modules/scroll/store/types.d.ts.map +1 -0
- package/types/x-modules/scroll/wiring.d.ts +74 -0
- package/types/x-modules/scroll/wiring.d.ts.map +1 -0
- package/types/x-modules/scroll/x-module.d.ts +16 -0
- package/types/x-modules/scroll/x-module.d.ts.map +1 -0
- package/types/x-modules/search/components/partial-query-button.vue.d.ts +9 -4
- package/types/x-modules/search/components/partial-query-button.vue.d.ts.map +1 -1
- package/types/x-modules/search/components/spellcheck-button.vue.d.ts +9 -4
- package/types/x-modules/search/components/spellcheck-button.vue.d.ts.map +1 -1
- package/types/x-modules/search/events.types.d.ts +6 -1
- package/types/x-modules/search/events.types.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/save-origin.action.d.ts +12 -0
- package/types/x-modules/search/store/actions/save-origin.action.d.ts.map +1 -0
- package/types/x-modules/search/store/emitters.d.ts +4 -0
- package/types/x-modules/search/store/emitters.d.ts.map +1 -1
- package/types/x-modules/search/store/module.d.ts.map +1 -1
- package/types/x-modules/search/store/types.d.ts +17 -3
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/search/wiring.d.ts +3 -3
- package/types/x-modules/search/wiring.d.ts.map +1 -1
- package/types/x-modules/search-box/components/search-button.vue.d.ts +14 -2
- package/types/x-modules/search-box/components/search-button.vue.d.ts.map +1 -1
- package/types/x-modules/search-box/components/search-input.vue.d.ts +1 -1
- package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
- package/types/x-modules/tagging/components/index.d.ts +2 -0
- package/types/x-modules/tagging/components/index.d.ts.map +1 -0
- package/types/x-modules/tagging/components/tagging.vue.d.ts +47 -0
- package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -0
- package/types/x-modules/tagging/config.types.d.ts +9 -0
- package/types/x-modules/tagging/config.types.d.ts.map +1 -1
- package/types/x-modules/tagging/events.types.d.ts +20 -0
- package/types/x-modules/tagging/events.types.d.ts.map +1 -1
- package/types/x-modules/tagging/index.d.ts +2 -0
- package/types/x-modules/tagging/index.d.ts.map +1 -1
- package/types/x-modules/tagging/service/index.d.ts +3 -0
- package/types/x-modules/tagging/service/index.d.ts.map +1 -0
- package/types/x-modules/tagging/service/session.service.d.ts +37 -0
- package/types/x-modules/tagging/service/session.service.d.ts.map +1 -0
- package/types/x-modules/tagging/service/types.d.ts +21 -0
- package/types/x-modules/tagging/service/types.d.ts.map +1 -0
- package/types/x-modules/tagging/store/actions/index.d.ts +2 -0
- package/types/x-modules/tagging/store/actions/index.d.ts.map +1 -0
- package/types/x-modules/tagging/store/actions/track.action.d.ts +12 -0
- package/types/x-modules/tagging/store/actions/track.action.d.ts.map +1 -0
- package/types/x-modules/tagging/store/emitters.d.ts +3 -1
- package/types/x-modules/tagging/store/emitters.d.ts.map +1 -1
- package/types/x-modules/tagging/store/index.d.ts +1 -0
- package/types/x-modules/tagging/store/index.d.ts.map +1 -1
- package/types/x-modules/tagging/store/module.d.ts.map +1 -1
- package/types/x-modules/tagging/store/types.d.ts +34 -0
- package/types/x-modules/tagging/store/types.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +42 -1
- package/types/x-modules/tagging/wiring.d.ts.map +1 -1
- package/types/x-modules/url/store/module.d.ts.map +1 -1
- package/types/x-modules/url/store/types.d.ts +6 -0
- package/types/x-modules/url/store/types.d.ts.map +1 -1
- package/types/x-modules/url/wiring.d.ts +9 -0
- package/types/x-modules/url/wiring.d.ts.map +1 -1
- package/types/x-modules/x-modules.types.d.ts +3 -1
- package/types/x-modules/x-modules.types.d.ts.map +1 -1
- package/url/index.js +1 -1
- package/docs/API-reference/api/x-components.baseidscroll.md +0 -24
- package/docs/API-reference/api/x-components.baseidscroll.resetonquerychange.md +0 -13
- package/docs/API-reference/api/x-components.basemainscroll.element.md +0 -13
- package/docs/API-reference/api/x-components.basemainscroll.md +0 -31
- package/docs/API-reference/api/x-components.basemainscroll.tag.md +0 -13
- package/docs/API-reference/api/x-components.baseresultlink.emituserclickedaresult.md +0 -17
- package/docs/API-reference/api/x-components.baseresultlink.emituserrightclickedaresult.md +0 -17
- package/docs/API-reference/api/x-components.baseresultlink.metadata.md +0 -13
- package/docs/API-reference/api/x-components.baseresultlink.origin.md +0 -13
- package/docs/API-reference/api/x-components.baseresultlink.resultclickextraevents.md +0 -13
- package/docs/API-reference/api/x-components.basescroll.resetonquerychange.md +0 -13
- package/docs/API-reference/api/x-components.basescrolltotop.md +0 -23
- package/docs/API-reference/api/x-components.identifierresultsactions.seturlparams.md +0 -24
- package/docs/API-reference/api/x-components.wiremetadata.origin.md +0 -13
- package/docs/API-reference/api/x-components.xeventstypes.useralmostreachedscrollend.md +0 -13
- package/docs/API-reference/api/x-components.xeventstypes.userreachedscrollend.md +0 -13
- package/docs/API-reference/api/x-components.xeventstypes.userreachedscrollstart.md +0 -13
- package/docs/API-reference/api/x-types.redirection.tagging.md +0 -15
- package/docs/API-reference/api/x-types.result.tagging.md +0 -13
- package/docs/API-reference/api/x-types.resulttagging.add2cart.md +0 -13
- package/docs/API-reference/api/x-types.resulttagging.checkout.md +0 -13
- package/docs/API-reference/api/x-types.resulttagging.click.md +0 -13
- package/docs/API-reference/api/x-types.resulttagging.md +0 -22
- package/docs/API-reference/components/common/scroll/x-components.base-id-scroll.md +0 -216
- package/docs/API-reference/components/common/scroll/x-components.base-main-scroll.md +0 -170
- package/docs/css/global.scss +0 -1
- package/docs/css/utils/utils.scss +0 -35
- package/docs/css/xcomponents/clear-search-input.scss +0 -9
- package/docs/css/xcomponents/index.scss +0 -16
- package/docs/css/xcomponents/search-input.scss +0 -10
- package/docs/css/xcomponents/suggestions.scss +0 -19
- package/docs/guide/getting-started/components/clear-search-input.md +0 -98
- package/docs/guide/getting-started/components/live-examples.md +0 -100
- package/docs/guide/getting-started/components/query-suggestions.md +0 -76
- package/docs/guide/getting-started/components/search-button.md +0 -98
- package/docs/guide/getting-started/components/search-input.md +0 -105
- package/docs/guide/getting-started/install-xplugin.md +0 -72
- package/docs/guide/getting-started/use-components.md +0 -75
- package/docs/guide/install.md +0 -30
- package/docs/react-components/ReactComponents.jsx +0 -46
- package/docs/react-components/Utils.jsx +0 -34
- package/js/components/scroll/base-id-scroll.vue.js.map +0 -1
- package/js/components/scroll/base-id-scroll.vue_rollup-plugin-vue=script.js +0 -110
- package/js/components/scroll/base-id-scroll.vue_rollup-plugin-vue=script.js.map +0 -1
- package/js/components/scroll/base-main-scroll.vue.js.map +0 -1
- package/js/components/scroll/base-main-scroll.vue_rollup-plugin-vue=script.js +0 -105
- package/js/components/scroll/base-main-scroll.vue_rollup-plugin-vue=script.js.map +0 -1
- package/js/components/scroll/base-scroll-to-top.vue.js.map +0 -1
- package/js/components/scroll/base-scroll-to-top.vue_rollup-plugin-vue=script.js +0 -179
- package/js/components/scroll/base-scroll-to-top.vue_rollup-plugin-vue=script.js.map +0 -1
- package/js/x-modules/identifier-results/store/actions/set-url-params.action.js +0 -17
- package/js/x-modules/identifier-results/store/actions/set-url-params.action.js.map +0 -1
- package/types/components/scroll/base-id-scroll.vue.d.ts.map +0 -1
- package/types/components/scroll/base-main-scroll.vue.d.ts +0 -78
- package/types/components/scroll/base-main-scroll.vue.d.ts.map +0 -1
- package/types/components/scroll/base-scroll-to-top.vue.d.ts +0 -119
- package/types/components/scroll/base-scroll-to-top.vue.d.ts.map +0 -1
- package/types/types/query-origin.d.ts +0 -7
- package/types/types/query-origin.d.ts.map +0 -1
- package/types/x-modules/identifier-results/store/actions/set-url-params.action.d.ts.map +0 -1
|
@@ -5,7 +5,7 @@ import script from './query-suggestions.vue_rollup-plugin-vue=script.js';
|
|
|
5
5
|
var __vue_script__ = script;
|
|
6
6
|
|
|
7
7
|
/* template */
|
|
8
|
-
var __vue_render__ = function() {
|
|
8
|
+
var __vue_render__ = function () {
|
|
9
9
|
var _vm = this;
|
|
10
10
|
var _h = _vm.$createElement;
|
|
11
11
|
var _c = _vm._self._c || _h;
|
|
@@ -15,19 +15,19 @@ var __vue_render__ = function() {
|
|
|
15
15
|
suggestions: _vm.suggestions,
|
|
16
16
|
"data-test": "query-suggestions",
|
|
17
17
|
animation: _vm.animation,
|
|
18
|
-
maxItemsToRender: _vm.maxItemsToRender
|
|
18
|
+
maxItemsToRender: _vm.maxItemsToRender,
|
|
19
19
|
},
|
|
20
20
|
scopedSlots: _vm._u(
|
|
21
21
|
[
|
|
22
22
|
{
|
|
23
23
|
key: "default",
|
|
24
|
-
fn: function(ref) {
|
|
24
|
+
fn: function (ref) {
|
|
25
25
|
var suggestion = ref.suggestion;
|
|
26
26
|
var index = ref.index;
|
|
27
27
|
return [
|
|
28
28
|
_vm._t(
|
|
29
29
|
"suggestion",
|
|
30
|
-
function() {
|
|
30
|
+
function () {
|
|
31
31
|
return [
|
|
32
32
|
_c("QuerySuggestion", {
|
|
33
33
|
staticClass: "x-query-suggestions__suggestion",
|
|
@@ -36,34 +36,29 @@ var __vue_render__ = function() {
|
|
|
36
36
|
[
|
|
37
37
|
{
|
|
38
38
|
key: "default",
|
|
39
|
-
fn: function(ref) {
|
|
39
|
+
fn: function (ref) {
|
|
40
40
|
var queryHTML = ref.queryHTML;
|
|
41
41
|
return [
|
|
42
42
|
_vm._t("suggestion-content", null, null, {
|
|
43
43
|
suggestion: suggestion,
|
|
44
44
|
index: index,
|
|
45
|
-
queryHTML: queryHTML
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
],
|
|
45
|
+
queryHTML: queryHTML,
|
|
46
|
+
}) ]
|
|
47
|
+
},
|
|
48
|
+
} ],
|
|
51
49
|
null,
|
|
52
50
|
true
|
|
53
|
-
)
|
|
54
|
-
})
|
|
55
|
-
]
|
|
51
|
+
),
|
|
52
|
+
}) ]
|
|
56
53
|
},
|
|
57
54
|
null,
|
|
58
55
|
{ suggestion: suggestion, index: index }
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
],
|
|
56
|
+
) ]
|
|
57
|
+
},
|
|
58
|
+
} ],
|
|
64
59
|
null,
|
|
65
60
|
true
|
|
66
|
-
)
|
|
61
|
+
),
|
|
67
62
|
})
|
|
68
63
|
};
|
|
69
64
|
var __vue_staticRenderFns__ = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-suggestions.vue.js","sources":["../../../../../src/x-modules/query-suggestions/components/query-suggestions.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"suggestions\"\n class=\"x-query-suggestions\"\n data-test=\"query-suggestions\"\n :animation=\"animation\"\n :maxItemsToRender=\"maxItemsToRender\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot Custom component that replaces the `QuerySuggestion` component\n @binding {Suggestion} suggestion - Query Suggestion data\n @binding {number} index - Query Suggestion index\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, index }\">\n <QuerySuggestion :suggestion=\"suggestion\" class=\"x-query-suggestions__suggestion\">\n <template #default=\"{ queryHTML }\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Custom content that replaces the `QuerySuggestion` default content\n @binding {Suggestion} suggestion - Query Suggestion data\n @binding {string} queryHTML - Suggestion’s query with the matching part wrapped in a HTML span tag\n @binding {number} index - Query Suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, index, queryHTML }\" />\n </template>\n </QuerySuggestion>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { querySuggestionsXModule } from '../x-module';\n import QuerySuggestion from './query-suggestion.vue';\n\n /**\n * This component renders a list of possible search queries to select from as a query is entered\n * in the input field. By default, this is a list of\n * [`QuerySuggestion`](./x-components.query-suggestion.md) components.\n *\n * @public\n */\n @Component({\n components: { BaseSuggestions, QuerySuggestion },\n mixins: [xComponentMixin(querySuggestionsXModule)]\n })\n export default class QuerySuggestions extends Vue {\n /**\n * The module's list of suggestions.\n *\n * @internal\n */\n @Getter('querySuggestions', 'querySuggestions')\n public suggestions!: Suggestion[];\n\n /**\n * Animation component for `QuerySuggestions`.\n *\n * @public\n */\n @Prop()\n protected animation!: Vue;\n\n /**\n * Number of query suggestions to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n }\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the <b>Empathize</b> microservice must be\nimplemented.\n:::\n<!-- prettier-ignore-end -->\n\nIn this example, a list of query suggestions is displayed. See how the suggestions change as you\ntype “puzzle”. If you click on a suggestion, the search term in the search input is updated and the\nquery suggestions are changed to reflect the new search term.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions />\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n QuerySuggestions,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, an `StaggeredFadeAndSlide` animation component has been passed as prop, so that the\nmatching query suggestions are shuffled with a slight delay as more letters of the term are typed.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions animation=\"StaggeredFadeAndSlide\" />\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { StaggeredFadeAndSlide } from '@empathyco/x-components';\n\n // Register the animation as a global component\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n QuerySuggestions,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with suggestion slot\n\nHere, the `suggestion` binding property passes the suggestion data.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions #suggestion=\"{ suggestion }\">\n <QuerySuggestion :suggestion=\"suggestion\" #default=\"{ queryHTML }\">\n <span v-html=\"queryHTML\" />\n </QuerySuggestion>\n </QuerySuggestions>\n </div>\n</template>\n\n<script>\n import { QuerySuggestion, QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n QuerySuggestion,\n QuerySuggestions\n }\n };\n</script>\n```\n\n<!-- prettier-ignore-start -->\n::: danger\nIf you're not using the [`QuerySuggestion`](./query-suggestion.md) component, then\nyou must implement the `UserAcceptedAQuery` and `UserSelectedAQuerySuggestion` events in\n`QuerySuggestions`.\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions #suggestion=\"{ suggestion }\">\n <button @click=\"emitSuggestionClickedEvents($event, suggestion)\">\n {{ suggestion.query }}\n </button>\n </QuerySuggestions>\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n SearchInput,\n QuerySuggestions\n },\n methods: {\n emitSuggestionClickedEvents(event, suggestion) {\n this.$x.emit('UserAcceptedAQuery', suggestion.query, {\n target: event.target\n });\n this.$x.emit('UserSelectedASuggestion', suggestion, {\n target: event.target\n });\n this.$x.emit('UserSelectedAQuerySuggestion', suggestion, {\n target: event.target\n });\n }\n }\n };\n</script>\n```\n\n:::\n<!-- prettier-ignore-end -->\n\n### Play with suggestion-content slot\n\nIn this example, the `suggestion` and `queryHTML` bindings have been passed in the\n`suggestion-content` slot to paint the resulting query suggestions in blue.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions #suggestion-content=\"{ suggestion, queryHTML }\">\n <span :aria-label=\"`Select ${suggestion.query}`\" style=\"color: blue;\" v-html=\"queryHTML\" />\n </QuerySuggestions>\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n SearchInput,\n QuerySuggestions\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `QuerySuggestions`\ncomponent communicates with the [`SearchInput`](../search-box/x-components.search-input.md),\nupdating the term in the search input.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions />\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n SearchInput,\n QuerySuggestions\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA
|
|
1
|
+
{"version":3,"file":"query-suggestions.vue.js","sources":["../../../../../src/x-modules/query-suggestions/components/query-suggestions.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"suggestions\"\n class=\"x-query-suggestions\"\n data-test=\"query-suggestions\"\n :animation=\"animation\"\n :maxItemsToRender=\"maxItemsToRender\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot Custom component that replaces the `QuerySuggestion` component\n @binding {Suggestion} suggestion - Query Suggestion data\n @binding {number} index - Query Suggestion index\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, index }\">\n <QuerySuggestion :suggestion=\"suggestion\" class=\"x-query-suggestions__suggestion\">\n <template #default=\"{ queryHTML }\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Custom content that replaces the `QuerySuggestion` default content\n @binding {Suggestion} suggestion - Query Suggestion data\n @binding {string} queryHTML - Suggestion’s query with the matching part wrapped in a HTML span tag\n @binding {number} index - Query Suggestion index\n -->\n <!-- eslint-enable max-len -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, index, queryHTML }\" />\n </template>\n </QuerySuggestion>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { querySuggestionsXModule } from '../x-module';\n import QuerySuggestion from './query-suggestion.vue';\n\n /**\n * This component renders a list of possible search queries to select from as a query is entered\n * in the input field. By default, this is a list of\n * [`QuerySuggestion`](./x-components.query-suggestion.md) components.\n *\n * @public\n */\n @Component({\n components: { BaseSuggestions, QuerySuggestion },\n mixins: [xComponentMixin(querySuggestionsXModule)]\n })\n export default class QuerySuggestions extends Vue {\n /**\n * The module's list of suggestions.\n *\n * @internal\n */\n @Getter('querySuggestions', 'querySuggestions')\n public suggestions!: Suggestion[];\n\n /**\n * Animation component for `QuerySuggestions`.\n *\n * @public\n */\n @Prop()\n protected animation!: Vue;\n\n /**\n * Number of query suggestions to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n }\n</script>\n\n<docs lang=\"mdx\">\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the <b>Empathize</b> microservice must be\nimplemented.\n:::\n<!-- prettier-ignore-end -->\n\nIn this example, a list of query suggestions is displayed. See how the suggestions change as you\ntype “puzzle”. If you click on a suggestion, the search term in the search input is updated and the\nquery suggestions are changed to reflect the new search term.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions />\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n QuerySuggestions,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, an `StaggeredFadeAndSlide` animation component has been passed as prop, so that the\nmatching query suggestions are shuffled with a slight delay as more letters of the term are typed.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions animation=\"StaggeredFadeAndSlide\" />\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { StaggeredFadeAndSlide } from '@empathyco/x-components';\n\n // Register the animation as a global component\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n QuerySuggestions,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with suggestion slot\n\nHere, the `suggestion` binding property passes the suggestion data.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions #suggestion=\"{ suggestion }\">\n <QuerySuggestion :suggestion=\"suggestion\" #default=\"{ queryHTML }\">\n <span v-html=\"queryHTML\" />\n </QuerySuggestion>\n </QuerySuggestions>\n </div>\n</template>\n\n<script>\n import { QuerySuggestion, QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n QuerySuggestion,\n QuerySuggestions\n }\n };\n</script>\n```\n\n<!-- prettier-ignore-start -->\n::: danger\nIf you're not using the [`QuerySuggestion`](./query-suggestion.md) component, then\nyou must implement the `UserAcceptedAQuery` and `UserSelectedAQuerySuggestion` events in\n`QuerySuggestions`.\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions #suggestion=\"{ suggestion }\">\n <button @click=\"emitSuggestionClickedEvents($event, suggestion)\">\n {{ suggestion.query }}\n </button>\n </QuerySuggestions>\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n SearchInput,\n QuerySuggestions\n },\n methods: {\n emitSuggestionClickedEvents(event, suggestion) {\n this.$x.emit('UserAcceptedAQuery', suggestion.query, {\n target: event.target\n });\n this.$x.emit('UserSelectedASuggestion', suggestion, {\n target: event.target\n });\n this.$x.emit('UserSelectedAQuerySuggestion', suggestion, {\n target: event.target\n });\n }\n }\n };\n</script>\n```\n\n:::\n<!-- prettier-ignore-end -->\n\n### Play with suggestion-content slot\n\nIn this example, the `suggestion` and `queryHTML` bindings have been passed in the\n`suggestion-content` slot to paint the resulting query suggestions in blue.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions #suggestion-content=\"{ suggestion, queryHTML }\">\n <span :aria-label=\"`Select ${suggestion.query}`\" style=\"color: blue;\" v-html=\"queryHTML\" />\n </QuerySuggestions>\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n SearchInput,\n QuerySuggestions\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `QuerySuggestions`\ncomponent communicates with the [`SearchInput`](../search-box/x-components.search-input.md),\nupdating the term in the search input.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <div>\n <SearchInput />\n <QuerySuggestions />\n </div>\n</template>\n\n<script>\n import { QuerySuggestions } from '@empathyco/x-components/query-suggestions';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'QuerySuggestionsDemo',\n components: {\n SearchInput,\n QuerySuggestions\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import script from './recommendations.vue_rollup-plugin-vue=script.js';
|
|
|
6
6
|
var __vue_script__ = script;
|
|
7
7
|
|
|
8
8
|
/* template */
|
|
9
|
-
var __vue_render__ = function() {
|
|
9
|
+
var __vue_render__ = function () {
|
|
10
10
|
var _vm = this;
|
|
11
11
|
var _h = _vm.$createElement;
|
|
12
12
|
var _c = _vm._self._c || _h;
|
|
@@ -16,39 +16,36 @@ var __vue_render__ = function() {
|
|
|
16
16
|
[
|
|
17
17
|
_vm._t(
|
|
18
18
|
"layout",
|
|
19
|
-
function() {
|
|
19
|
+
function () {
|
|
20
20
|
return [
|
|
21
21
|
_c(
|
|
22
22
|
_vm.animation,
|
|
23
23
|
{
|
|
24
24
|
tag: "component",
|
|
25
25
|
staticClass: "x-list x-recommendations",
|
|
26
|
-
attrs: { tag: "ul", "data-test": "recommendations" }
|
|
26
|
+
attrs: { tag: "ul", "data-test": "recommendations" },
|
|
27
27
|
},
|
|
28
|
-
_vm._l(_vm.recommendations, function(recommendation) {
|
|
28
|
+
_vm._l(_vm.recommendations, function (recommendation) {
|
|
29
29
|
return _c(
|
|
30
30
|
"li",
|
|
31
31
|
{
|
|
32
32
|
key: recommendation.id,
|
|
33
33
|
staticClass: "x-recommendations__item",
|
|
34
|
-
attrs: { "data-test": "recommendation-item" }
|
|
34
|
+
attrs: { "data-test": "recommendation-item" },
|
|
35
35
|
},
|
|
36
36
|
[
|
|
37
37
|
_vm._t("default", null, {
|
|
38
|
-
recommendation: recommendation
|
|
39
|
-
})
|
|
40
|
-
],
|
|
38
|
+
recommendation: recommendation,
|
|
39
|
+
}) ],
|
|
41
40
|
2
|
|
42
41
|
)
|
|
43
42
|
}),
|
|
44
43
|
0
|
|
45
|
-
)
|
|
46
|
-
]
|
|
44
|
+
) ]
|
|
47
45
|
},
|
|
48
46
|
null,
|
|
49
47
|
{ animation: _vm.animation, recommendations: _vm.recommendations }
|
|
50
|
-
)
|
|
51
|
-
],
|
|
48
|
+
) ],
|
|
52
49
|
2
|
|
53
50
|
)
|
|
54
51
|
: _vm._e()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendations.vue.js","sources":["../../../../../src/x-modules/recommendations/components/recommendations.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"recommendations.length\">\n <!--\n @slot Customized Recommendations layout.\n @binding {Result[]} recommendations - Recommendations to render.\n @binding {Vue} animation - Animation to animate the elements.\n -->\n <slot name=\"layout\" v-bind=\"{ animation, recommendations }\">\n <component\n :is=\"animation\"\n tag=\"ul\"\n data-test=\"recommendations\"\n class=\"x-list x-recommendations\"\n >\n <li\n v-for=\"recommendation in recommendations\"\n :key=\"recommendation.id\"\n class=\"x-recommendations__item\"\n data-test=\"recommendation-item\"\n >\n <!--\n @slot (Required) Recommendation content.\n @binding {recommendation} recommendation - Recommendation data.\n -->\n <slot :recommendation=\"recommendation\" />\n </li>\n </component>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import { Component, Prop, Provide } from 'vue-property-decorator';\n import { Result } from '@empathyco/x-types';\n import Vue from 'vue';\n import { State } from '../../../components/decorators/store.decorators';\n import { NoElement } from '../../../components/no-element';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { PropsWithType } from '../../../utils/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { recommendationsXModule } from '../x-module';\n\n /**\n * It renders a list of recommendations from the\n * {@link RecommendationsState.recommendations | Recommendations} state by default.\n * The component provides the slot layout which wraps the whole component with the\n * recommendations bounded. It also provides the default slot to customize the item, which is\n * within the layout slot, with the recommendation bounded. Each recommendation should be\n * represented by a {@link BaseResultLink | result link component} besides any other component.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(recommendationsXModule)],\n components: {\n NoElement\n }\n })\n export default class Recommendations extends Vue {\n /**\n * The module's list of recommendations.\n *\n * @public\n */\n @State('recommendations', 'recommendations')\n public storedRecommendations!: Result[];\n\n /**\n * Animation component that will be used to animate the recommendations.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of recommendations to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The additional events to be emitted by the mandatory {@link BaseResultLink} component.\n *\n * @public\n */\n @Provide()\n protected resultClickExtraEvents: PropsWithType<XEventsTypes, Result>[] = [\n 'UserClickedARecommendation'\n ];\n\n /**\n * Slices the recommendations from the state.\n *\n * @returns - The list of recommendations slice by the number of items to render.\n *\n * @internal\n */\n protected get recommendations(): Result[] {\n return this.storedRecommendations.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-recommendations {\n list-style-type: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\nIt renders a list of recommendations from recommendations state by default. The component provides\nthe slot layout which wraps the whole component with the recommendations bound. It also provides the\ndefault slot to customize the item, which is within the layout slot, with the recommendation bound.\nEach recommendation should be represented by a BaseResultLink component besides any other component.\n\n## Basic example\n\n## Adding a custom BaseResultLink component\n\nA BaseResultLink **must** be used inside the Recommendations component. In the example below the\nBaseResultLink default slot is filled with an image of the result and a span for the title. Besides\nthat, an additional button has been added.\n\n```vue\n<Recommendations>\n <template #default=\"{ recommendation }\">\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <template #default=\"{ result }\">\n <img :src=\"result.images[0]\" class=\"x-recommendations__image\"/>\n <span class=\"x-recommendations__title\">{{ result.name }}</span>\n </template>\n </BaseResultLink>\n <button>Custom Behaviour</button>\n </template>\n</Recommendations>\n```\n\n## Overriding layout content\n\nIt renders a list of recommendations customizing the layout slot. In the example below, instead of\nusing the default Recommendations content, a BaseGrid component is used to render the\nrecommendations.\n\n```vue\n<Recommendations :animation=\"staggeredFadeAndSlide\">\n <template #layout=\"{ recommendations, animation }\">\n <BaseGrid :items=\"recommendations\" :animation=\"animation\">\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n <span class=\"x-result__title\">{{ item.name }}</span>\n </BaseResultLink>\n </template>\n </BaseGrid>\n </template>\n</Recommendations>\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 3 items.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" :maxItemToRender=\"3\" />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedARecommendation`: the event is emitted after the user clicks the button.\n- A list of events emitted by the `BaseResultLink`.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA
|
|
1
|
+
{"version":3,"file":"recommendations.vue.js","sources":["../../../../../src/x-modules/recommendations/components/recommendations.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"recommendations.length\">\n <!--\n @slot Customized Recommendations layout.\n @binding {Result[]} recommendations - Recommendations to render.\n @binding {Vue} animation - Animation to animate the elements.\n -->\n <slot name=\"layout\" v-bind=\"{ animation, recommendations }\">\n <component\n :is=\"animation\"\n tag=\"ul\"\n data-test=\"recommendations\"\n class=\"x-list x-recommendations\"\n >\n <li\n v-for=\"recommendation in recommendations\"\n :key=\"recommendation.id\"\n class=\"x-recommendations__item\"\n data-test=\"recommendation-item\"\n >\n <!--\n @slot (Required) Recommendation content.\n @binding {recommendation} recommendation - Recommendation data.\n -->\n <slot :recommendation=\"recommendation\" />\n </li>\n </component>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import { Component, Prop, Provide } from 'vue-property-decorator';\n import { Result } from '@empathyco/x-types';\n import Vue from 'vue';\n import { State } from '../../../components/decorators/store.decorators';\n import { NoElement } from '../../../components/no-element';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { PropsWithType } from '../../../utils/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { recommendationsXModule } from '../x-module';\n\n /**\n * It renders a list of recommendations from the\n * {@link RecommendationsState.recommendations | Recommendations} state by default.\n * The component provides the slot layout which wraps the whole component with the\n * recommendations bounded. It also provides the default slot to customize the item, which is\n * within the layout slot, with the recommendation bounded. Each recommendation should be\n * represented by a {@link BaseResultLink | result link component} besides any other component.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(recommendationsXModule)],\n components: {\n NoElement\n }\n })\n export default class Recommendations extends Vue {\n /**\n * The module's list of recommendations.\n *\n * @public\n */\n @State('recommendations', 'recommendations')\n public storedRecommendations!: Result[];\n\n /**\n * Animation component that will be used to animate the recommendations.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of recommendations to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The additional events to be emitted by the mandatory {@link BaseResultLink} component.\n *\n * @public\n */\n @Provide()\n protected resultClickExtraEvents: PropsWithType<XEventsTypes, Result>[] = [\n 'UserClickedARecommendation'\n ];\n\n /**\n * Slices the recommendations from the state.\n *\n * @returns - The list of recommendations slice by the number of items to render.\n *\n * @internal\n */\n protected get recommendations(): Result[] {\n return this.storedRecommendations.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-recommendations {\n list-style-type: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\nIt renders a list of recommendations from recommendations state by default. The component provides\nthe slot layout which wraps the whole component with the recommendations bound. It also provides the\ndefault slot to customize the item, which is within the layout slot, with the recommendation bound.\nEach recommendation should be represented by a BaseResultLink component besides any other component.\n\n## Basic example\n\n## Adding a custom BaseResultLink component\n\nA BaseResultLink **must** be used inside the Recommendations component. In the example below the\nBaseResultLink default slot is filled with an image of the result and a span for the title. Besides\nthat, an additional button has been added.\n\n```vue\n<Recommendations>\n <template #default=\"{ recommendation }\">\n <BaseResultLink :result=\"recommendation\" class=\"x-recommendations__link\">\n <template #default=\"{ result }\">\n <img :src=\"result.images[0]\" class=\"x-recommendations__image\"/>\n <span class=\"x-recommendations__title\">{{ result.name }}</span>\n </template>\n </BaseResultLink>\n <button>Custom Behaviour</button>\n </template>\n</Recommendations>\n```\n\n## Overriding layout content\n\nIt renders a list of recommendations customizing the layout slot. In the example below, instead of\nusing the default Recommendations content, a BaseGrid component is used to render the\nrecommendations.\n\n```vue\n<Recommendations :animation=\"staggeredFadeAndSlide\">\n <template #layout=\"{ recommendations, animation }\">\n <BaseGrid :items=\"recommendations\" :animation=\"animation\">\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n <span class=\"x-result__title\">{{ item.name }}</span>\n </BaseResultLink>\n </template>\n </BaseGrid>\n </template>\n</Recommendations>\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 3 items.\n\n_Type “puzzle” or another toy in the input field to try it out!_\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" :maxItemToRender=\"3\" />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedARecommendation`: the event is emitted after the user clicks the button.\n- A list of events emitted by the `BaseResultLink`.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,27 +6,27 @@ import script from './related-tag.vue_rollup-plugin-vue=script.js';
|
|
|
6
6
|
var __vue_script__ = script;
|
|
7
7
|
|
|
8
8
|
/* template */
|
|
9
|
-
var __vue_render__ = function() {
|
|
9
|
+
var __vue_render__ = function () {
|
|
10
10
|
var _vm = this;
|
|
11
11
|
var _h = _vm.$createElement;
|
|
12
12
|
var _c = _vm._self._c || _h;
|
|
13
13
|
return _c(
|
|
14
|
-
"
|
|
14
|
+
"button",
|
|
15
15
|
{
|
|
16
16
|
staticClass: "x-tag x-related-tag",
|
|
17
17
|
class: _vm.dynamicClasses,
|
|
18
|
-
attrs: {
|
|
18
|
+
attrs: { "data-test": "related-tag" },
|
|
19
|
+
on: { click: _vm.emitEvents },
|
|
19
20
|
},
|
|
20
21
|
[
|
|
21
22
|
_vm._t(
|
|
22
23
|
"default",
|
|
23
|
-
function() {
|
|
24
|
+
function () {
|
|
24
25
|
return [_vm._v(_vm._s(_vm.relatedTag.tag))]
|
|
25
26
|
},
|
|
26
27
|
null,
|
|
27
28
|
{ relatedTag: _vm.relatedTag, isSelected: _vm.isSelected }
|
|
28
|
-
)
|
|
29
|
-
],
|
|
29
|
+
) ],
|
|
30
30
|
2
|
|
31
31
|
)
|
|
32
32
|
};
|
|
@@ -36,11 +36,11 @@ __vue_render__._withStripped = true;
|
|
|
36
36
|
/* style */
|
|
37
37
|
var __vue_inject_styles__ = function (inject) {
|
|
38
38
|
if (!inject) { return }
|
|
39
|
-
inject("data-v-
|
|
39
|
+
inject("data-v-0dfb94a8_0", { source: ".x-related-tag[data-v-0dfb94a8] {\n white-space: nowrap;\n}\n.x-related-tag--is-selected[data-v-0dfb94a8] {\n background: lightgrey;\n}", map: undefined, media: undefined });
|
|
40
40
|
|
|
41
41
|
};
|
|
42
42
|
/* scoped */
|
|
43
|
-
var __vue_scope_id__ = "data-v-
|
|
43
|
+
var __vue_scope_id__ = "data-v-0dfb94a8";
|
|
44
44
|
/* module identifier */
|
|
45
45
|
var __vue_module_identifier__ = undefined;
|
|
46
46
|
/* functional template */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related-tag.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue"],"sourcesContent":["<template>\n <
|
|
1
|
+
{"version":3,"file":"related-tag.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue"],"sourcesContent":["<template>\n <button\n @click=\"emitEvents\"\n class=\"x-tag x-related-tag\"\n data-test=\"related-tag\"\n :class=\"dynamicClasses\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n -->\n <slot v-bind=\"{ relatedTag, isSelected }\">{{ relatedTag.tag }}</slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import { State } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { VueCSSClasses } from '../../../utils/types';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { relatedTagsXModule } from '../x-module';\n\n /**\n * This component renders a related tag for a query. A related tag is a descriptive keyword\n * related to the current query to fine-tune the search. For example, if you are searching\n * for *lego*, a related tag could be *city*, refining the search with *lego city*.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(relatedTagsXModule)]\n })\n export default class RelatedTag extends Vue {\n /**\n * The related tag model data.\n *\n * @public\n */\n @Prop({ required: true })\n protected relatedTag!: RelatedTagModel;\n /**\n * The selected related tags.\n *\n * @internal\n */\n @State('relatedTags', 'selectedRelatedTags')\n public selectedRelatedTags!: RelatedTagModel[];\n\n /**\n * Generates the {@link WireMetadata | event metadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n protected createEventMetadata(): Omit<WireMetadata, 'moduleName'> {\n return {\n target: this.$el as HTMLElement,\n feature: 'related_tag'\n };\n }\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the\n // isSelected value before emitting this selection events.\n this.$x.emit(\n this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag',\n this.relatedTag,\n this.createEventMetadata()\n );\n this.$x.emit('UserPickedARelatedTag', this.relatedTag, this.createEventMetadata());\n }\n\n /**\n * Check if the related tag is selected or not.\n *\n * @returns If the related tag is selected.\n *\n * @internal\n */\n protected get isSelected(): boolean {\n return this.selectedRelatedTags.includes(this.relatedTag);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n *\n * @internal\n */\n protected get dynamicClasses(): VueCSSClasses {\n return {\n 'x-tag--is-selected': this.isSelected,\n 'x-related-tag--is-selected': this.isSelected\n };\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-related-tag {\n white-space: nowrap;\n\n &--is-selected {\n background: lightgrey;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Dynamic classes\n\n`RelatedTag` uses the `x-related-tag--is-selected` dynamic CSS class so you can style it when is\nselected.\n\n## Events\n\nThis component emits the following events:\n\n- [`UserDeselectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n- [`UserPickedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n- [`UserSelectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nThe QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nIn this example related tag data is passed as a prop.\n\n_Here you can see how the RelatedTag component is rendered._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\"></RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, an HTML span element is passed in the `default` slot.\n\n_See how the related tag can be rendered._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\" #default=\"{ relatedTag }\">\n <span :aria-label=\"relatedTag.tag\">{{ relatedTag.tag }}</span>\n </RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, the [`UserSelectedARelatedTag`](./../../api/x-components.relatedtagsxevents.md)\nevent is implemented, as illustrated by the “Tag” message returned.\n\n_See how the event is triggered when the related tag is clicked._\n\n```vue\n<template>\n <RelatedTag :relatedTag=\"tag\" @UserSelectedARelatedTag=\"alertRelatedTag\"></RelatedTag>\n</template>\n\n<script>\n import { RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagDemo',\n components: {\n RelatedTag\n },\n data() {\n return {\n tag: {\n modelName: 'RelatedTag',\n previous: 'toy',\n query: 'toy story',\n selected: false,\n tag: 'story'\n }\n };\n },\n methods: {\n alertRelatedTag(relatedTag) {\n alert(`You have clicked the related tag: ${relatedTag.query}`);\n }\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __extends, __decorate } from 'tslib';
|
|
2
2
|
import Vue from 'vue';
|
|
3
3
|
import { Prop, Component } from 'vue-property-decorator';
|
|
4
|
-
import BaseEventButton from '../../../components/base-event-button.vue.js';
|
|
5
4
|
import { State } from '../../../components/decorators/store.decorators.js';
|
|
6
5
|
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
7
6
|
import { relatedTagsXModule } from '../x-module.js';
|
|
@@ -18,28 +17,29 @@ var RelatedTag = /** @class */ (function (_super) {
|
|
|
18
17
|
function RelatedTag() {
|
|
19
18
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Generates the {@link WireMetadata | event metadata} object omitting the moduleName.
|
|
22
|
+
*
|
|
23
|
+
* @returns The {@link WireMetadata} object omitting the moduleName.
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
RelatedTag.prototype.createEventMetadata = function () {
|
|
27
|
+
return {
|
|
28
|
+
target: this.$el,
|
|
29
|
+
feature: 'related_tag'
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Emits events when the button is clicked.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
RelatedTag.prototype.emitEvents = function () {
|
|
38
|
+
// We have to emit this events first to avoid the UserPickedARelatedTag wires to change the
|
|
39
|
+
// isSelected value before emitting this selection events.
|
|
40
|
+
this.$x.emit(this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag', this.relatedTag, this.createEventMetadata());
|
|
41
|
+
this.$x.emit('UserPickedARelatedTag', this.relatedTag, this.createEventMetadata());
|
|
42
|
+
};
|
|
43
43
|
Object.defineProperty(RelatedTag.prototype, "isSelected", {
|
|
44
44
|
/**
|
|
45
45
|
* Check if the related tag is selected or not.
|
|
@@ -79,7 +79,6 @@ var RelatedTag = /** @class */ (function (_super) {
|
|
|
79
79
|
], RelatedTag.prototype, "selectedRelatedTags", void 0);
|
|
80
80
|
RelatedTag = __decorate([
|
|
81
81
|
Component({
|
|
82
|
-
components: { BaseEventButton: BaseEventButton },
|
|
83
82
|
mixins: [xComponentMixin(relatedTagsXModule)]
|
|
84
83
|
})
|
|
85
84
|
], RelatedTag);
|
package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related-tag.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\nimport
|
|
1
|
+
{"version":3,"file":"related-tag.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/related-tags/components/related-tag.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\nimport { State } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { VueCSSClasses } from '../../../utils/types';\nimport { WireMetadata } from '../../../wiring/wiring.types';\nimport { relatedTagsXModule } from '../x-module';\n\n/**\n * This component renders a related tag for a query. A related tag is a descriptive keyword\n * related to the current query to fine-tune the search. For example, if you are searching\n * for *lego*, a related tag could be *city*, refining the search with *lego city*.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(relatedTagsXModule)]\n})\nexport default class RelatedTag extends Vue {\n /**\n * The related tag model data.\n *\n * @public\n */\n @Prop({ required: true })\n protected relatedTag!: RelatedTagModel;\n /**\n * The selected related tags.\n *\n * @internal\n */\n @State('relatedTags', 'selectedRelatedTags')\n public selectedRelatedTags!: RelatedTagModel[];\n\n /**\n * Generates the {@link WireMetadata | event metadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n protected createEventMetadata(): Omit<WireMetadata, 'moduleName'> {\n return {\n target: this.$el as HTMLElement,\n feature: 'related_tag'\n };\n }\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n // We have to emit this events first to avoid the UserPickedARelatedTag wires to change the\n // isSelected value before emitting this selection events.\n this.$x.emit(\n this.isSelected ? 'UserDeselectedARelatedTag' : 'UserSelectedARelatedTag',\n this.relatedTag,\n this.createEventMetadata()\n );\n this.$x.emit('UserPickedARelatedTag', this.relatedTag, this.createEventMetadata());\n }\n\n /**\n * Check if the related tag is selected or not.\n *\n * @returns If the related tag is selected.\n *\n * @internal\n */\n protected get isSelected(): boolean {\n return this.selectedRelatedTags.includes(this.relatedTag);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n *\n * @internal\n */\n protected get dynamicClasses(): VueCSSClasses {\n return {\n 'x-tag--is-selected': this.isSelected,\n 'x-related-tag--is-selected': this.isSelected\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;AA0BA;;;;;;;AAUA;IAAwC,8BAAG;IAA3C;;KAqEC;;;;;;;IA/CW,wCAAmB,GAA7B;QACE,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,GAAkB;YAC/B,OAAO,EAAE,aAAa;SACvB,CAAC;KACH;;;;;;IAOS,+BAAU,GAApB;;;QAGE,IAAI,CAAC,EAAE,CAAC,IAAI,CACV,IAAI,CAAC,UAAU,GAAG,2BAA2B,GAAG,yBAAyB,EACzE,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,mBAAmB,EAAE,CAC3B,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;KACpF;IASD,sBAAc,kCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC3D;;;OAAA;IASD,sBAAc,sCAAc;;;;;;;;aAA5B;YACE,OAAO;gBACL,oBAAoB,EAAE,IAAI,CAAC,UAAU;gBACrC,4BAA4B,EAAE,IAAI,CAAC,UAAU;aAC9C,CAAC;SACH;;;OAAA;IA7DD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACc;IAOvC;QADC,KAAK,CAAC,aAAa,EAAE,qBAAqB,CAAC;2DACG;IAd5B,UAAU;QAH9B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,UAAU,CAqE9B;IAAD,iBAAC;CAAA,CArEuC,GAAG;;;;"}
|
|
@@ -6,7 +6,7 @@ import script from './related-tags.vue_rollup-plugin-vue=script.js';
|
|
|
6
6
|
var __vue_script__ = script;
|
|
7
7
|
|
|
8
8
|
/* template */
|
|
9
|
-
var __vue_render__ = function() {
|
|
9
|
+
var __vue_render__ = function () {
|
|
10
10
|
var _vm = this;
|
|
11
11
|
var _h = _vm.$createElement;
|
|
12
12
|
var _c = _vm._self._c || _h;
|
|
@@ -16,20 +16,20 @@ var __vue_render__ = function() {
|
|
|
16
16
|
{
|
|
17
17
|
tag: "component",
|
|
18
18
|
staticClass: "x-list x-related-tags",
|
|
19
|
-
attrs: { tag: "ul", "data-test": "related-tags" }
|
|
19
|
+
attrs: { tag: "ul", "data-test": "related-tags" },
|
|
20
20
|
},
|
|
21
|
-
_vm._l(_vm.relatedTags, function(relatedTag) {
|
|
21
|
+
_vm._l(_vm.relatedTags, function (relatedTag) {
|
|
22
22
|
return _c(
|
|
23
23
|
"li",
|
|
24
24
|
{
|
|
25
25
|
key: relatedTag.tag,
|
|
26
26
|
staticClass: "x-related-tags__item",
|
|
27
|
-
attrs: { "data-test": "related-tag-item" }
|
|
27
|
+
attrs: { "data-test": "related-tag-item" },
|
|
28
28
|
},
|
|
29
29
|
[
|
|
30
30
|
_vm._t(
|
|
31
31
|
"related-tag",
|
|
32
|
-
function() {
|
|
32
|
+
function () {
|
|
33
33
|
return [
|
|
34
34
|
_c("RelatedTag", {
|
|
35
35
|
attrs: { relatedTag: relatedTag },
|
|
@@ -37,27 +37,23 @@ var __vue_render__ = function() {
|
|
|
37
37
|
[
|
|
38
38
|
{
|
|
39
39
|
key: "default",
|
|
40
|
-
fn: function(ref) {
|
|
40
|
+
fn: function (ref) {
|
|
41
41
|
var relatedTag = ref.relatedTag;
|
|
42
42
|
var isSelected = ref.isSelected;
|
|
43
43
|
return [
|
|
44
44
|
_vm._t("related-tag-content", null, null, {
|
|
45
45
|
relatedTag: relatedTag,
|
|
46
|
-
isSelected: isSelected
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
],
|
|
46
|
+
isSelected: isSelected,
|
|
47
|
+
}) ]
|
|
48
|
+
},
|
|
49
|
+
} ],
|
|
52
50
|
null,
|
|
53
51
|
true
|
|
54
|
-
)
|
|
55
|
-
})
|
|
56
|
-
]
|
|
52
|
+
),
|
|
53
|
+
}) ]
|
|
57
54
|
},
|
|
58
55
|
{ relatedTag: relatedTag }
|
|
59
|
-
)
|
|
60
|
-
],
|
|
56
|
+
) ],
|
|
61
57
|
2
|
|
62
58
|
)
|
|
63
59
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related-tags.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tags.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"relatedTags.length\"\n tag=\"ul\"\n class=\"x-list x-related-tags\"\n data-test=\"related-tags\"\n >\n <li\n v-for=\"relatedTag in relatedTags\"\n :key=\"relatedTag.tag\"\n class=\"x-related-tags__item\"\n data-test=\"related-tag-item\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag component.\n @binding {RelatedTag} relatedTag - Related tag data.\n -->\n <slot name=\"related-tag\" :relatedTag=\"relatedTag\">\n <RelatedTag :relatedTag=\"relatedTag\">\n <template #default=\"{ relatedTag, isSelected }\">\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n -->\n <slot name=\"related-tag-content\" v-bind=\"{ relatedTag, isSelected }\" />\n </template>\n </RelatedTag>\n </slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { relatedTagsXModule } from '../x-module';\n import RelatedTag from './related-tag.vue';\n\n /**\n * This component renders a set of [`RelatedTag`](./x-components.related-tag) components by\n * default to select from after a query is performed to fine-tune search.\n * For example, if you are searching for *lego*, different related tags could be *city*,\n * *friends*, or *harry potter*, refining the search with *lego city*, *lego friends*,\n * or *lego harry potter*.\n *\n * @public\n */\n @Component({\n components: { RelatedTag },\n mixins: [xComponentMixin(relatedTagsXModule)]\n })\n export default class RelatedTags extends Vue {\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of related tags to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n @Getter('relatedTags', 'relatedTags')\n public storedRelatedTags!: RelatedTagModel[];\n\n protected get relatedTags(): RelatedTagModel[] {\n return this.storedRelatedTags.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-related-tags {\n display: flex;\n list-style: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nThis example shows how related tags can be rendered without any additional effects.\n\n_Search for a toy and press enter._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags></RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the number of related tags rendered has been limited to 3. A fade and slide effect\nhas been added so that the related tags appear with a delay, then slide upwards and fade.\n\n_Search for a toy and press Enter to see the related tags with the animation effect._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags animation=\"StaggeredFadeAndSlide\" :maxItemsToRender=\"3\"></RelatedTags>\n </div>\n</template>\n\n<script>\n import Vue from 'vue';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { StaggeredFadeAndSlide } from '@empathyco/x-components';\n\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with related-tag slot\n\nIn this example, the [`RelatedTag`](./x-components.related-tag.md) component is passed in the\n`related-tag` slot (although any other component could potentially be passed).\n\n_Search for a toy and see how the related tags can be rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags #related-tag=\"{ relatedTag }\">\n <RelatedTag :relatedTag=\"relatedTag\"></RelatedTag>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags, RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n RelatedTag\n }\n };\n</script>\n```\n\n### Play with related-tag-content slot\n\nTo continue the previous example, the [`RelatedTag`](./x-components.related-tag.md) component is\npassed in the `related-tag-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n_Search for a toy and see how the related tags are rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags #related-tag-content=\"{ relatedTag }\">\n <span>{{ relatedTag.tag }}</span>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. The `RelatedTags` component can\ncommunicate with the [`SearchInput`](../search-box/x-components.search-input.md) as follows:\n\n_Search for a toy and see how the related tags can be rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags></RelatedTags>\n <ResultsList></ResultsList>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { ResultsList } from '@empathyco/x-components/search';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n ResultsList\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA
|
|
1
|
+
{"version":3,"file":"related-tags.vue.js","sources":["../../../../../src/x-modules/related-tags/components/related-tags.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"relatedTags.length\"\n tag=\"ul\"\n class=\"x-list x-related-tags\"\n data-test=\"related-tags\"\n >\n <li\n v-for=\"relatedTag in relatedTags\"\n :key=\"relatedTag.tag\"\n class=\"x-related-tags__item\"\n data-test=\"related-tag-item\"\n >\n <!--\n @slot Custom content that replaces the RelatedTag component.\n @binding {RelatedTag} relatedTag - Related tag data.\n -->\n <slot name=\"related-tag\" :relatedTag=\"relatedTag\">\n <RelatedTag :relatedTag=\"relatedTag\">\n <template #default=\"{ relatedTag, isSelected }\">\n <!--\n @slot Custom content that replaces the RelatedTag default content.\n @binding {RelatedTag} relatedTag - Related tag data.\n @binding {boolean} isSelected - Related tag status.\n -->\n <slot name=\"related-tag-content\" v-bind=\"{ relatedTag, isSelected }\" />\n </template>\n </RelatedTag>\n </slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { RelatedTag as RelatedTagModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { relatedTagsXModule } from '../x-module';\n import RelatedTag from './related-tag.vue';\n\n /**\n * This component renders a set of [`RelatedTag`](./x-components.related-tag) components by\n * default to select from after a query is performed to fine-tune search.\n * For example, if you are searching for *lego*, different related tags could be *city*,\n * *friends*, or *harry potter*, refining the search with *lego city*, *lego friends*,\n * or *lego harry potter*.\n *\n * @public\n */\n @Component({\n components: { RelatedTag },\n mixins: [xComponentMixin(relatedTagsXModule)]\n })\n export default class RelatedTags extends Vue {\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue;\n\n /**\n * Number of related tags to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n @Getter('relatedTags', 'relatedTags')\n public storedRelatedTags!: RelatedTagModel[];\n\n protected get relatedTags(): RelatedTagModel[] {\n return this.storedRelatedTags.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-related-tags {\n display: flex;\n list-style: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the QuerySignals microservice must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nThis example shows how related tags can be rendered without any additional effects.\n\n_Search for a toy and press enter._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags></RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the number of related tags rendered has been limited to 3. A fade and slide effect\nhas been added so that the related tags appear with a delay, then slide upwards and fade.\n\n_Search for a toy and press Enter to see the related tags with the animation effect._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags animation=\"StaggeredFadeAndSlide\" :maxItemsToRender=\"3\"></RelatedTags>\n </div>\n</template>\n\n<script>\n import Vue from 'vue';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { StaggeredFadeAndSlide } from '@empathyco/x-components';\n\n Vue.component('StaggeredFadeAndSlide', StaggeredFadeAndSlide);\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n### Play with related-tag slot\n\nIn this example, the [`RelatedTag`](./x-components.related-tag.md) component is passed in the\n`related-tag` slot (although any other component could potentially be passed).\n\n_Search for a toy and see how the related tags can be rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags #related-tag=\"{ relatedTag }\">\n <RelatedTag :relatedTag=\"relatedTag\"></RelatedTag>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags, RelatedTag } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n RelatedTag\n }\n };\n</script>\n```\n\n### Play with related-tag-content slot\n\nTo continue the previous example, the [`RelatedTag`](./x-components.related-tag.md) component is\npassed in the `related-tag-content` slot, but in addition, an HTML span tag for the text are also\npassed.\n\n_Search for a toy and see how the related tags are rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags #related-tag-content=\"{ relatedTag }\">\n <span>{{ relatedTag.tag }}</span>\n </RelatedTags>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags\n }\n };\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. The `RelatedTags` component can\ncommunicate with the [`SearchInput`](../search-box/x-components.search-input.md) as follows:\n\n_Search for a toy and see how the related tags can be rendered._\n\n```vue\n<template>\n <div>\n <SearchInput></SearchInput>\n <RelatedTags></RelatedTags>\n <ResultsList></ResultsList>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { RelatedTags } from '@empathyco/x-components/related-tags';\n import { ResultsList } from '@empathyco/x-components/search';\n\n export default {\n name: 'RelatedTagsDemo',\n components: {\n SearchInput,\n RelatedTags,\n ResultsList\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
+
import script from './main-scroll-item.vue_rollup-plugin-vue=script.js';
|
|
3
|
+
|
|
4
|
+
/* script */
|
|
5
|
+
var __vue_script__ = script;
|
|
6
|
+
|
|
7
|
+
/* template */
|
|
8
|
+
var __vue_render__ = function () {
|
|
9
|
+
var _vm = this;
|
|
10
|
+
var _h = _vm.$createElement;
|
|
11
|
+
var _c = _vm._self._c || _h;
|
|
12
|
+
return _c(
|
|
13
|
+
_vm.tag,
|
|
14
|
+
{ tag: "component", attrs: { "data-scroll": _vm.item.id } },
|
|
15
|
+
[_vm._t("default")],
|
|
16
|
+
2
|
|
17
|
+
)
|
|
18
|
+
};
|
|
19
|
+
var __vue_staticRenderFns__ = [];
|
|
20
|
+
__vue_render__._withStripped = true;
|
|
21
|
+
|
|
22
|
+
/* style */
|
|
23
|
+
var __vue_inject_styles__ = undefined;
|
|
24
|
+
/* scoped */
|
|
25
|
+
var __vue_scope_id__ = undefined;
|
|
26
|
+
/* module identifier */
|
|
27
|
+
var __vue_module_identifier__ = undefined;
|
|
28
|
+
/* functional template */
|
|
29
|
+
var __vue_is_functional_template__ = false;
|
|
30
|
+
/* style inject */
|
|
31
|
+
|
|
32
|
+
/* style inject SSR */
|
|
33
|
+
|
|
34
|
+
/* style inject shadow dom */
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
var __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
39
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
40
|
+
__vue_inject_styles__,
|
|
41
|
+
__vue_script__,
|
|
42
|
+
__vue_scope_id__,
|
|
43
|
+
__vue_is_functional_template__,
|
|
44
|
+
__vue_module_identifier__,
|
|
45
|
+
false,
|
|
46
|
+
undefined,
|
|
47
|
+
undefined,
|
|
48
|
+
undefined
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export default __vue_component__;
|
|
52
|
+
//# sourceMappingURL=main-scroll-item.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main-scroll-item.vue.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue"],"sourcesContent":["<template>\n <component :is=\"tag\" :data-scroll=\"item.id\">\n <slot />\n </component>\n</template>\n<script lang=\"ts\">\n import { Identifiable } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { NoElement, State, xComponentMixin } from '../../../components';\n import { XInject } from '../../../components/decorators/injection.decorators';\n import { scrollXModule } from '../x-module';\n import { ScrollObserverKey } from './scroll.const';\n import { ScrollVisibilityObserver } from './scroll.types';\n\n /**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)]\n })\n export default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis components emits the following events:\n\n- [`ScrollRestoreSucceeded`](./../../api/x-components.scrollxevents.md)\n\n## See it in action\n\nThis component has no predefined template. It renders whatever you decide using the `tag` prop. It's\nmain purpose is to help storing and restoring the scroll position so URLs can be shared, and also to\nallow users to smoothly navigate back and forth.\n\nTo do so, it must be wrapped with the `MainScroll` component. In the following example we make use\nof all of these components. The URL is modified as the user scrolls.\n\n```vue\n<template>\n <div>\n <UrlHandler />\n <SearchInput />\n\n <MainScroll>\n <Scroll>\n <ResultsList #result=\"{ item }\">\n <MainScrollItem :item=\"item\" tag=\"article\">\n <BaseResultLink :item=\"item\">\n <img :src=\"item.images[0]\" />\n <p>{{ item.title }}</p>\n </BaseResultLink>\n </MainScrollItem>\n </ResultsList>\n </Scroll>\n </MainScroll>\n </div>\n</template>\n\n<script>\n import { MainScroll, Scroll, MainScrollItem } from '@empathyco/x-components/scroll';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { UrlHandler } from '@empathyco/x-components/url';\n\n export default {\n name: 'ScrollItemDemo',\n components: {\n Scroll,\n ResultsList,\n MainScroll,\n MainScrollItem,\n SearchInput,\n UrlHandler\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|