@empathyco/x-components 3.0.0-alpha.28 → 3.0.0-alpha.31
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 +118 -0
- package/core/index.js +7 -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 +15 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.getsessionid.md +15 -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 +11 -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.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.basemainscroll.mounted.md → x-components.mainscroll.mounted.md} +4 -2
- 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 +44 -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.seturlsort.md +13 -0
- package/docs/API-reference/api/x-components.sortmixin.items.md +1 -1
- package/docs/API-reference/api/x-components.sortmixin.md +2 -3
- package/docs/API-reference/api/x-components.sortmixin.providedselectedsort.md +1 -1
- 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.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 +2 -0
- package/docs/API-reference/api/x-components.urlmutations.setscroll.md +24 -0
- package/docs/API-reference/api/x-components.urlmutations.setsort.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.basemainscroll.render.md → x-components.windowscroll.render.md} +2 -2
- 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.xeventstypes.md +3 -8
- 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.location-provider.md +54 -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/search/x-components.sort-dropdown.md +4 -5
- package/docs/API-reference/components/search/x-components.sort-list.md +4 -5
- package/docs/API-reference/components/tagging/x-components.tagging.md +84 -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/layouts/multi-column-max-width-layout.vue.js +41 -34
- 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 +20 -14
- 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/result/base-result-link.vue.js +2 -2
- 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/scroll/base-scroll.vue.js +2 -2
- 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/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 +2 -2
- 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/x-component.utils.js +2 -2
- package/js/components/x-component.utils.js.map +1 -1
- package/js/index.js +24 -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/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +5 -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_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +5 -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/history-query.vue.js +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue=script.js.map +1 -1
- 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_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js +2 -1
- package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue.js +2 -1
- package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +2 -1
- 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/related-tags/components/related-tag.vue.js +5 -4
- 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/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 +188 -0
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/{components/scroll/base-main-scroll.vue.js → x-modules/scroll/components/main-scroll.vue.js} +2 -2
- 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} +2 -2
- 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 +231 -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} +8 -9
- 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 +186 -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/banners-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/partial-query-button.vue.js +3 -2
- 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/promoteds-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/sort.mixin.js +6 -12
- package/js/x-modules/search/components/sort.mixin.js.map +1 -1
- package/js/x-modules/search/components/spellcheck-button.vue.js +3 -2
- 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_rollup-plugin-vue=script.js +4 -6
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +2 -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/actions/set-url-params.action.js +2 -1
- package/js/x-modules/search/store/actions/set-url-params.action.js.map +1 -1
- 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/search-button.vue.js +3 -2
- 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 +3 -2
- 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/service/session.service.js +35 -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 +83 -2
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
- package/js/x-modules/url/components/url-handler.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 +6 -0
- package/js/x-modules/url/store/module.js.map +1 -1
- package/js/x-modules/url/wiring.js +19 -1
- package/js/x-modules/url/wiring.js.map +1 -1
- package/package.json +6 -4
- package/report/x-adapter.api.json +18 -18
- package/report/x-components.api.json +4652 -1770
- package/report/x-components.api.md +421 -133
- package/report/x-types.api.json +396 -310
- package/scroll/index.d.ts +1 -0
- package/scroll/index.js +10 -0
- package/search/index.js +1 -1
- package/tagging/index.js +3 -1
- package/types/adapter/mocked-adapter.d.ts.map +1 -1
- package/types/components/index.d.ts +1 -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/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/wiring/events.types.d.ts +18 -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-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/sort.mixin.d.ts +3 -11
- package/types/x-modules/search/components/sort.mixin.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/actions/set-url-params.action.d.ts.map +1 -1
- 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/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 +1 -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 +20 -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 +12 -0
- package/types/x-modules/url/store/types.d.ts.map +1 -1
- package/types/x-modules/url/wiring.d.ts +18 -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.mounted.md +0 -15
- 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.sortmixin.value.md +0 -13
- 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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
2
|
+
import script from './location-provider.vue_rollup-plugin-vue=script.js';
|
|
3
|
+
|
|
4
|
+
/* script */
|
|
5
|
+
var __vue_script__ = script;
|
|
6
|
+
|
|
7
|
+
/* template */
|
|
8
|
+
|
|
9
|
+
/* style */
|
|
10
|
+
var __vue_inject_styles__ = undefined;
|
|
11
|
+
/* scoped */
|
|
12
|
+
var __vue_scope_id__ = undefined;
|
|
13
|
+
/* module identifier */
|
|
14
|
+
var __vue_module_identifier__ = undefined;
|
|
15
|
+
/* functional template */
|
|
16
|
+
var __vue_is_functional_template__ = undefined;
|
|
17
|
+
/* style inject */
|
|
18
|
+
|
|
19
|
+
/* style inject SSR */
|
|
20
|
+
|
|
21
|
+
/* style inject shadow dom */
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
26
|
+
{},
|
|
27
|
+
__vue_inject_styles__,
|
|
28
|
+
__vue_script__,
|
|
29
|
+
__vue_scope_id__,
|
|
30
|
+
__vue_is_functional_template__,
|
|
31
|
+
__vue_module_identifier__,
|
|
32
|
+
false,
|
|
33
|
+
undefined,
|
|
34
|
+
undefined,
|
|
35
|
+
undefined
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export default __vue_component__;
|
|
39
|
+
//# sourceMappingURL=location-provider.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location-provider.vue.js","sources":["../../../src/components/location-provider.vue"],"sourcesContent":["<script lang=\"ts\">\n import { Prop, Provide, Component } from 'vue-property-decorator';\n import { NoElement } from '../components/no-element';\n import { FeatureLocation } from '../types';\n\n /**\n * Location Provider component.\n * This component injects the location with value passed as prop.\n *\n * @public\n */\n @Component\n export default class LocationProvider extends NoElement {\n /**\n * The {@link FeatureLocation} to provide.\n *\n * @public\n */\n @Prop({ required: true })\n @Provide()\n protected location!: FeatureLocation;\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events. However, events emitted by child components, will include the\n`location` prop value in its metadata.\n\n## See it in action\n\nIn this example, the `LocationProvider` component receives the `location` prop with the\n`predictive_layer` value. This value will then be combined with the `NextQueries` feature name,\n`next_query` to create a `QueryOrigin` string, which is used for tracking the performance of the\ndifferent tools that generate the query.\n\n```vue\n<template>\n <LocationProvider location=\"predictive_layer\">\n <NextQueries />\n </LocationProvider>\n</template>\n<script>\n import { LocationProvider } from '@empathyco/x-components';\n import { NextQueries } from '@empathyco/x-components/next-queries';\n export default {\n name: 'LocationProviderDemo',\n components: {\n LocationProvider,\n NextQueries\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __extends, __decorate } from 'tslib';
|
|
2
|
+
import { Prop, Provide, Component } from 'vue-property-decorator';
|
|
3
|
+
import { NoElement } from './no-element.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Location Provider component.
|
|
7
|
+
* This component injects the location with value passed as prop.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
var LocationProvider = /** @class */ (function (_super) {
|
|
12
|
+
__extends(LocationProvider, _super);
|
|
13
|
+
function LocationProvider() {
|
|
14
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
15
|
+
}
|
|
16
|
+
__decorate([
|
|
17
|
+
Prop({ required: true }),
|
|
18
|
+
Provide()
|
|
19
|
+
], LocationProvider.prototype, "location", void 0);
|
|
20
|
+
LocationProvider = __decorate([
|
|
21
|
+
Component
|
|
22
|
+
], LocationProvider);
|
|
23
|
+
return LocationProvider;
|
|
24
|
+
}(NoElement));
|
|
25
|
+
|
|
26
|
+
export default LocationProvider;
|
|
27
|
+
//# sourceMappingURL=location-provider.vue_rollup-plugin-vue=script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location-provider.vue_rollup-plugin-vue=script.js","sources":["../../../src/components/location-provider.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { Prop, Provide, Component } from 'vue-property-decorator';\nimport { NoElement } from '../components/no-element';\nimport { FeatureLocation } from '../types';\n\n/**\n * Location Provider component.\n * This component injects the location with value passed as prop.\n *\n * @public\n */\n@Component\nexport default class LocationProvider extends NoElement {\n /**\n * The {@link FeatureLocation} to provide.\n *\n * @public\n */\n @Prop({ required: true })\n @Provide()\n protected location!: FeatureLocation;\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;AAOA;IAA8C,oCAAS;IAAvD;;KASC;IADC;QAFC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACxB,OAAO,EAAE;sDAC2B;IARlB,gBAAgB;QADpC,SAAS;OACW,gBAAgB,CASpC;IAAD,uBAAC;CAAA,CAT6C,SAAS;;;;"}
|
|
@@ -38,11 +38,11 @@ __vue_render__._withStripped = true;
|
|
|
38
38
|
/* style */
|
|
39
39
|
var __vue_inject_styles__ = function (inject) {
|
|
40
40
|
if (!inject) { return }
|
|
41
|
-
inject("data-v-
|
|
41
|
+
inject("data-v-13699ce7_0", { source: ".x-result-link[data-v-13699ce7] {\n text-decoration: none;\n}", map: undefined, media: undefined });
|
|
42
42
|
|
|
43
43
|
};
|
|
44
44
|
/* scoped */
|
|
45
|
-
var __vue_scope_id__ = "data-v-
|
|
45
|
+
var __vue_scope_id__ = "data-v-13699ce7";
|
|
46
46
|
/* module identifier */
|
|
47
47
|
var __vue_module_identifier__ = undefined;
|
|
48
48
|
/* functional template */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-result-link.vue.js","sources":["../../../../src/components/result/base-result-link.vue"],"sourcesContent":["<template>\n <a\n @click=\"emitUserClickedAResult\"\n @click.middle=\"emitUserClickedAResult\"\n @click.right=\"emitUserRightClickedAResult\"\n :href=\"result.url\"\n class=\"x-result-link\"\n data-test=\"result-link\"\n >\n <!--\n @slot (Required) Link content with a text, an image, another component or both\n @binding {Result} result - Result data\n -->\n <slot :result=\"result\" />\n </a>\n</template>\n\n<script lang=\"ts\">\n import { Result } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Inject, Prop } from 'vue-property-decorator';\n import {
|
|
1
|
+
{"version":3,"file":"base-result-link.vue.js","sources":["../../../../src/components/result/base-result-link.vue"],"sourcesContent":["<template>\n <a\n @click=\"emitUserClickedAResult\"\n @click.middle=\"emitUserClickedAResult\"\n @click.right=\"emitUserRightClickedAResult\"\n :href=\"result.url\"\n class=\"x-result-link\"\n data-test=\"result-link\"\n >\n <!--\n @slot (Required) Link content with a text, an image, another component or both\n @binding {Result} result - Result data\n -->\n <slot :result=\"result\" />\n </a>\n</template>\n\n<script lang=\"ts\">\n import { Result } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Inject, Prop } from 'vue-property-decorator';\n import { PropsWithType } from '../../utils/types';\n import { XEventsTypes } from '../../wiring/events.types';\n\n /**\n * Component to be reused that renders an `<a>` wrapping the result contents.\n *\n * @remarks\n * It has the logic to emit {@link XEventsTypes.UserClickedAResult} and\n * {@link XEventsTypes.UserRightClickedAResult} to the bus on click mouse events.\n * Additionally, this component may be injected other events to be emitted on click event, so,\n * depending where it's used its father component may provide this events.\n *\n * @public\n */\n @Component\n export default class BaseResultLink extends Vue {\n /**\n * The rendered DOM element.\n *\n * @internal\n */\n public $el!: HTMLElement;\n /**\n * The list of additional events to be emitted by the component when user clicks the link.\n *\n * @internal\n */\n @Inject({ from: 'resultClickExtraEvents', default: [] })\n protected resultClickExtraEvents!: PropsWithType<XEventsTypes, Result>[];\n\n /**\n * (Required) The {@link @empathyco/x-types#Result | result} information.\n *\n * @public\n */\n @Prop({ required: true })\n protected result!: Result;\n\n /**\n * Emits the {@link XEventsTypes.UserClickedAResult} when user clicks on the result, and also\n * additional events if have been injected in the component.\n *\n * @internal\n */\n protected emitUserClickedAResult(): void {\n this.$x.emit('UserClickedAResult', this.result, { target: this.$el });\n this.resultClickExtraEvents.forEach(event => {\n this.$x.emit(event, this.result, { target: this.$el });\n });\n }\n\n /**\n * Emits the {@link XEventsTypes.UserRightClickedAResult} when user right clicks on the result.\n *\n * @internal\n */\n protected emitUserRightClickedAResult(): void {\n this.$x.emit('UserRightClickedAResult', this.result, { target: this.$el });\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-result-link {\n text-decoration: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nThis component is a wrapper for the result contents (images, name, price...) It may be part of the\nsearch result page, recommendations or other section which needs to include results.\n\nThis component will emit `UserClickedAResult` when clicked or middle clicked and\n`UserRightClickedAResult` when right clicked.\n\nAdditionally, this component may be injected other events to be emitted on click event, so,\ndepending where it's used its father component may provide this events.\n\nThe result prop is required. It will render a `<a></a>` with the href to the result URL:\n\n```vue\n<BaseResultLink :result=\"result\">\n <template #default=\"{ result }\">\n <img :src=\"result.images[0]\"/>\n <span>{{ result.name }}</span>\n </template>\n</BaseResultLink>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedAResult`: the event is emitted after the user clicks the element. The event payload is\n the result data.\n- `UserRightClickedAResult`: the event is emitted after the user right clicks the element. The event\n payload is the result data.\n- The component can emit more events on click using the `resultClickExtraEvents` prop.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18,36 +18,27 @@ var BaseResultLink = /** @class */ (function (_super) {
|
|
|
18
18
|
function BaseResultLink() {
|
|
19
19
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
20
20
|
}
|
|
21
|
-
BaseResultLink.prototype.mounted = function () {
|
|
22
|
-
this.metadata = {
|
|
23
|
-
target: this.$el,
|
|
24
|
-
origin: this.origin
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
21
|
/**
|
|
28
22
|
* Emits the {@link XEventsTypes.UserClickedAResult} when user clicks on the result, and also
|
|
29
23
|
* additional events if have been injected in the component.
|
|
30
24
|
*
|
|
31
|
-
* @
|
|
25
|
+
* @internal
|
|
32
26
|
*/
|
|
33
27
|
BaseResultLink.prototype.emitUserClickedAResult = function () {
|
|
34
28
|
var _this = this;
|
|
35
|
-
this.$x.emit('UserClickedAResult', this.result, this
|
|
29
|
+
this.$x.emit('UserClickedAResult', this.result, { target: this.$el });
|
|
36
30
|
this.resultClickExtraEvents.forEach(function (event) {
|
|
37
|
-
_this.$x.emit(event, _this.result, _this
|
|
31
|
+
_this.$x.emit(event, _this.result, { target: _this.$el });
|
|
38
32
|
});
|
|
39
33
|
};
|
|
40
34
|
/**
|
|
41
35
|
* Emits the {@link XEventsTypes.UserRightClickedAResult} when user right clicks on the result.
|
|
42
36
|
*
|
|
43
|
-
* @
|
|
37
|
+
* @internal
|
|
44
38
|
*/
|
|
45
39
|
BaseResultLink.prototype.emitUserRightClickedAResult = function () {
|
|
46
|
-
this.$x.emit('UserRightClickedAResult', this.result, this
|
|
40
|
+
this.$x.emit('UserRightClickedAResult', this.result, { target: this.$el });
|
|
47
41
|
};
|
|
48
|
-
__decorate([
|
|
49
|
-
Inject({ from: 'origin', default: 'default' })
|
|
50
|
-
], BaseResultLink.prototype, "origin", void 0);
|
|
51
42
|
__decorate([
|
|
52
43
|
Inject({ from: 'resultClickExtraEvents', default: [] })
|
|
53
44
|
], BaseResultLink.prototype, "resultClickExtraEvents", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-result-link.vue_rollup-plugin-vue=script.js","sources":["../../../../src/components/result/base-result-link.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Result } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Inject, Prop } from 'vue-property-decorator';\nimport {
|
|
1
|
+
{"version":3,"file":"base-result-link.vue_rollup-plugin-vue=script.js","sources":["../../../../src/components/result/base-result-link.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Result } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Inject, Prop } from 'vue-property-decorator';\nimport { PropsWithType } from '../../utils/types';\nimport { XEventsTypes } from '../../wiring/events.types';\n\n/**\n * Component to be reused that renders an `<a>` wrapping the result contents.\n *\n * @remarks\n * It has the logic to emit {@link XEventsTypes.UserClickedAResult} and\n * {@link XEventsTypes.UserRightClickedAResult} to the bus on click mouse events.\n * Additionally, this component may be injected other events to be emitted on click event, so,\n * depending where it's used its father component may provide this events.\n *\n * @public\n */\n@Component\nexport default class BaseResultLink extends Vue {\n /**\n * The rendered DOM element.\n *\n * @internal\n */\n public $el!: HTMLElement;\n /**\n * The list of additional events to be emitted by the component when user clicks the link.\n *\n * @internal\n */\n @Inject({ from: 'resultClickExtraEvents', default: [] })\n protected resultClickExtraEvents!: PropsWithType<XEventsTypes, Result>[];\n\n /**\n * (Required) The {@link @empathyco/x-types#Result | result} information.\n *\n * @public\n */\n @Prop({ required: true })\n protected result!: Result;\n\n /**\n * Emits the {@link XEventsTypes.UserClickedAResult} when user clicks on the result, and also\n * additional events if have been injected in the component.\n *\n * @internal\n */\n protected emitUserClickedAResult(): void {\n this.$x.emit('UserClickedAResult', this.result, { target: this.$el });\n this.resultClickExtraEvents.forEach(event => {\n this.$x.emit(event, this.result, { target: this.$el });\n });\n }\n\n /**\n * Emits the {@link XEventsTypes.UserRightClickedAResult} when user right clicks on the result.\n *\n * @internal\n */\n protected emitUserRightClickedAResult(): void {\n this.$x.emit('UserRightClickedAResult', this.result, { target: this.$el });\n }\n}\n"],"names":[],"mappings":";;;;AAwBA;;;;;;;;;;;AAYA;IAA4C,kCAAG;IAA/C;;KA4CC;;;;;;;IAfW,+CAAsB,GAAhC;QAAA,iBAKC;QAJC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,UAAA,KAAK;YACvC,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,KAAI,CAAC,GAAG,EAAE,CAAC,CAAC;SACxD,CAAC,CAAC;KACJ;;;;;;IAOS,oDAA2B,GAArC;QACE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,yBAAyB,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;KAC5E;IA9BD;QADC,MAAM,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;kEACiB;IAQzE;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACC;IArBP,cAAc;QADlC,SAAS;OACW,cAAc,CA4ClC;IAAD,qBAAC;CAAA,CA5C2C,GAAG;;;;"}
|
|
@@ -27,11 +27,11 @@ __vue_render__._withStripped = true;
|
|
|
27
27
|
/* style */
|
|
28
28
|
var __vue_inject_styles__ = function (inject) {
|
|
29
29
|
if (!inject) { return }
|
|
30
|
-
inject("data-v-
|
|
30
|
+
inject("data-v-3fdd429c_0", { source: ".x-base-scroll[data-v-3fdd429c] {\n overflow-y: var(--x-string-overflow-scroll, auto);\n}", map: undefined, media: undefined });
|
|
31
31
|
|
|
32
32
|
};
|
|
33
33
|
/* scoped */
|
|
34
|
-
var __vue_scope_id__ = "data-v-
|
|
34
|
+
var __vue_scope_id__ = "data-v-3fdd429c";
|
|
35
35
|
/* module identifier */
|
|
36
36
|
var __vue_module_identifier__ = undefined;
|
|
37
37
|
/* functional template */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-scroll.vue.js","sources":["../../../../src/components/scroll/base-scroll.vue"],"sourcesContent":["<template>\n <div @scroll=\"throttledStoreScrollData\" class=\"x-scroll x-base-scroll\" data-test=\"base-scroll\">\n <slot
|
|
1
|
+
{"version":3,"file":"base-scroll.vue.js","sources":["../../../../src/components/scroll/base-scroll.vue"],"sourcesContent":["<template>\n <div @scroll=\"throttledStoreScrollData\" class=\"x-scroll x-base-scroll\" data-test=\"base-scroll\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { mixins } from 'vue-class-component';\n import { Component } from 'vue-property-decorator';\n import ScrollMixin from './scroll.mixin';\n\n /**\n * Base scroll component that depending on the user interactivity emits different events for\n * knowing when the user scrolls, the direction of scroll and if user reaches the start or end.\n *\n * @public\n */\n @Component\n export default class BaseScroll extends mixins(ScrollMixin) {}\n</script>\n\n<style lang=\"scss\" scoped>\n .x-base-scroll {\n overflow-y: var(--x-string-overflow-scroll, auto);\n }\n</style>\n\n<docs lang=\"mdx\">\n# Example\n\nThe BaseScroll is a component that manage the states of scroll of a specified element. The component\ndoes the necessary calculations for knowing the direction of scroll, if the scroll has reached to\nstart or to end, and is about to reaching to end. The components emits the next events depending of\nmovement that realize the user:\n\n```vue\n<template>\n <BaseScroll\n @scroll=\"scroll\"\n @scroll:direction-change=\"scrollDirectionChange\"\n @scroll:at-start=\"scrollAtStart\"\n @scroll:almost-at-end=\"scrollAlmostAtEnd\"\n @scroll:at-end=\"scrollAtEnd\"\n throttleMs=\"1000\"\n distanceToBottom=\"200\"\n >\n <template>\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </template>\n </BaseScroll>\n</template>\n\n<script>\n import { BaseScroll } from '@empathyco/x-components';\n\n export default {\n name: 'ScrollTest',\n components: {\n BaseScroll\n },\n methods: {\n scroll(position) {\n console.log('scroll', position);\n },\n scrollDirectionChange(direction) {\n console.log('scroll:direction-change', direction);\n },\n scrollAtStart() {\n console.log('scroll:at-start');\n },\n scrollAlmostAtEnd(distance) {\n console.log('scroll:almost-at-end', distance);\n },\n scrollAtEnd() {\n console.log('scroll:at-end');\n }\n }\n };\n</script>\n```\n\n## Avoid reset scroll on query change\n\nSet to false the reset scroll on query change feature which is true by default.\n\n```vue\n<template>\n <BaseScroll\n @scroll=\"scroll\"\n @scroll:direction-change=\"scrollDirectionChange\"\n @scroll:at-start=\"scrollAtStart\"\n @scroll:almost-at-end=\"scrollAlmostAtEnd\"\n @scroll:at-end=\"scrollAtEnd\"\n throttleMs=\"1000\"\n distanceToBottom=\"200\"\n >\n <template>\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </template>\n </BaseScroll>\n</template>\n\n<script>\n import { BaseScroll } from '@empathyco/x-components';\n\n export default {\n name: 'ScrollTest',\n components: {\n BaseScroll\n },\n methods: {\n scroll(position) {\n console.log('scroll', position);\n },\n scrollDirectionChange(direction) {\n console.log('scroll:direction-change', direction);\n },\n scrollAtStart() {\n console.log('scroll:at-start');\n },\n scrollAlmostAtEnd(distance) {\n console.log('scroll:almost-at-end', distance);\n },\n scrollAtEnd() {\n console.log('scroll:at-end');\n }\n }\n };\n</script>\n```\n\n## Vue Events:\n\n- `scroll`: the event is emitted after the user scrolls in this container. The payload is the scroll\n top distance in pixels.\n- `scroll:direction-change`: the event is emitted when the user changes the scroll direction. The\n payload is the new scrolling direction.\n- `scroll:at-start`: the event is emitted when the user scrolls up to the initial position of the\n scroll.\n- `scroll:almost-at-end`: the event is emitted when the user is about to reach the bottom part of\n the scroll.\n- `scroll:at-end`: the event is emitted when the user has reached the bottom part of the scroll.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { __extends, __decorate } from 'tslib';
|
|
2
|
-
import {
|
|
3
|
-
import { throttle } from '../../utils/throttle.js';
|
|
2
|
+
import { Component } from 'vue-property-decorator';
|
|
4
3
|
import { mixins } from 'vue-class-component';
|
|
5
|
-
import { XOn } from '../decorators/bus.decorators.js';
|
|
6
4
|
import ScrollMixin from './scroll.mixin.js';
|
|
7
5
|
|
|
8
6
|
/**
|
|
@@ -14,53 +12,8 @@ import ScrollMixin from './scroll.mixin.js';
|
|
|
14
12
|
var BaseScroll = /** @class */ (function (_super) {
|
|
15
13
|
__extends(BaseScroll, _super);
|
|
16
14
|
function BaseScroll() {
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Throttled version of the function that stores the DOM scroll related properties.
|
|
20
|
-
* The duration of the throttle is configured through the
|
|
21
|
-
* {@link ScrollMixin.throttleMs}.
|
|
22
|
-
*
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
26
|
-
_this.throttledStoreScrollData = throttle(_this.storeScrollData, _this.throttleMs);
|
|
27
|
-
return _this;
|
|
15
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
16
|
}
|
|
29
|
-
BaseScroll.prototype.mounted = function () {
|
|
30
|
-
this.storeScrollData();
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Updates scroll related properties.
|
|
34
|
-
*
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
BaseScroll.prototype.storeScrollData = function () {
|
|
38
|
-
this.currentPosition = this.$el.scrollTop;
|
|
39
|
-
this.scrollHeight = this.$el.scrollHeight;
|
|
40
|
-
this.clientHeight = this.$el.clientHeight;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* It sets the scroll to top if the property `resetOnQueryChange` is true.
|
|
44
|
-
*
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
BaseScroll.prototype.scrollToTop = function () {
|
|
48
|
-
var _a;
|
|
49
|
-
if (this.resetOnQueryChange) {
|
|
50
|
-
(_a = this.$el) === null || _a === void 0 ? void 0 : _a.scrollTo({ top: 0 });
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
__decorate([
|
|
54
|
-
Prop({ default: true })
|
|
55
|
-
], BaseScroll.prototype, "resetOnQueryChange", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
XOn([
|
|
58
|
-
'SearchBoxQueryChanged',
|
|
59
|
-
'SortChanged',
|
|
60
|
-
'SelectedFiltersChanged',
|
|
61
|
-
'SelectedRelatedTagsChanged'
|
|
62
|
-
])
|
|
63
|
-
], BaseScroll.prototype, "scrollToTop", null);
|
|
64
17
|
BaseScroll = __decorate([
|
|
65
18
|
Component
|
|
66
19
|
], BaseScroll);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../src/components/scroll/base-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport {
|
|
1
|
+
{"version":3,"file":"base-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../src/components/scroll/base-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport { mixins } from 'vue-class-component';\nimport { Component } from 'vue-property-decorator';\nimport ScrollMixin from './scroll.mixin';\n\n/**\n * Base scroll component that depending on the user interactivity emits different events for\n * knowing when the user scrolls, the direction of scroll and if user reaches the start or end.\n *\n * @public\n */\n@Component\nexport default class BaseScroll extends mixins(ScrollMixin) {}\n"],"names":[],"mappings":";;;;;AAWA;;;;;;AAOA;IAAwC,8BAAmB;IAA3D;;KAA8D;IAAzC,UAAU;QAD9B,SAAS;OACW,UAAU,CAA+B;IAAD,iBAAC;CAA9D,CAAwC,MAAM,CAAC,WAAW,CAAC;;;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { __extends, __decorate } from 'tslib';
|
|
2
2
|
import Vue from 'vue';
|
|
3
|
-
import { Prop, Watch } from 'vue-property-decorator';
|
|
4
|
-
import
|
|
3
|
+
import { Prop, Watch, Component } from 'vue-property-decorator';
|
|
4
|
+
import { throttle } from '../../utils/throttle.js';
|
|
5
|
+
import { XOn } from '../decorators/bus.decorators.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Mixin to share Scroll logic.
|
|
@@ -10,8 +11,15 @@ import Component from 'vue-class-component';
|
|
|
10
11
|
*/
|
|
11
12
|
var ScrollMixin = /** @class */ (function (_super) {
|
|
12
13
|
__extends(ScrollMixin, _super);
|
|
14
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
13
15
|
function ScrollMixin() {
|
|
14
16
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
17
|
+
/**
|
|
18
|
+
* Property for getting the client height of scroll.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
_this.clientHeight = 0;
|
|
15
23
|
/**
|
|
16
24
|
* Property for getting the current position of scroll.
|
|
17
25
|
*
|
|
@@ -30,23 +38,19 @@ var ScrollMixin = /** @class */ (function (_super) {
|
|
|
30
38
|
* @internal
|
|
31
39
|
*/
|
|
32
40
|
_this.scrollHeight = 0;
|
|
33
|
-
/**
|
|
34
|
-
* Property for getting the client height of scroll.
|
|
35
|
-
*
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
_this.clientHeight = 0;
|
|
39
41
|
return _this;
|
|
40
42
|
}
|
|
41
|
-
Object.defineProperty(ScrollMixin.prototype, "
|
|
43
|
+
Object.defineProperty(ScrollMixin.prototype, "throttledStoreScrollData", {
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
45
|
+
* Throttled version of the function that stores the DOM scroll related properties.
|
|
46
|
+
* The duration of the throttle is configured through the
|
|
47
|
+
* {@link ScrollMixin.throttleMs}.
|
|
44
48
|
*
|
|
45
|
-
* @returns A
|
|
49
|
+
* @returns A throttled version of the function to store the scroll data.
|
|
46
50
|
* @internal
|
|
47
51
|
*/
|
|
48
52
|
get: function () {
|
|
49
|
-
return this.
|
|
53
|
+
return throttle(this.storeScrollData, this.throttleMs);
|
|
50
54
|
},
|
|
51
55
|
enumerable: false,
|
|
52
56
|
configurable: true
|
|
@@ -64,59 +68,103 @@ var ScrollMixin = /** @class */ (function (_super) {
|
|
|
64
68
|
enumerable: false,
|
|
65
69
|
configurable: true
|
|
66
70
|
});
|
|
67
|
-
Object.defineProperty(ScrollMixin.prototype, "
|
|
71
|
+
Object.defineProperty(ScrollMixin.prototype, "hasScrollAlmostReachedEnd", {
|
|
68
72
|
/**
|
|
69
|
-
* Returns `true` when the
|
|
73
|
+
* Returns `true` when the amount of pixels scrolled is greater than
|
|
74
|
+
* the {@link ScrollMixin.distanceToBottom}.
|
|
70
75
|
*
|
|
71
|
-
* @returns A boolean for knowing if the user
|
|
76
|
+
* @returns A boolean for knowing if the user is about to reaching to the end.
|
|
72
77
|
* @internal
|
|
73
78
|
*/
|
|
74
79
|
get: function () {
|
|
75
|
-
return this.
|
|
80
|
+
return !this.hasScrollReachedStart && this.distanceToBottom > this.distanceToEnd;
|
|
76
81
|
},
|
|
77
82
|
enumerable: false,
|
|
78
83
|
configurable: true
|
|
79
84
|
});
|
|
80
|
-
Object.defineProperty(ScrollMixin.prototype, "
|
|
85
|
+
Object.defineProperty(ScrollMixin.prototype, "hasScrollReachedEnd", {
|
|
81
86
|
/**
|
|
82
|
-
* Returns
|
|
87
|
+
* Returns `true` when there is no more content to scroll.
|
|
83
88
|
*
|
|
84
|
-
* @returns
|
|
89
|
+
* @returns A boolean for knowing if the user scrolls to the end.
|
|
85
90
|
* @internal
|
|
86
91
|
*/
|
|
87
92
|
get: function () {
|
|
88
|
-
return this.currentPosition
|
|
93
|
+
return this.currentPosition === this.scrollEndPosition;
|
|
89
94
|
},
|
|
90
95
|
enumerable: false,
|
|
91
96
|
configurable: true
|
|
92
97
|
});
|
|
93
|
-
Object.defineProperty(ScrollMixin.prototype, "
|
|
98
|
+
Object.defineProperty(ScrollMixin.prototype, "hasScrollReachedStart", {
|
|
94
99
|
/**
|
|
95
|
-
* Returns `true` when the
|
|
96
|
-
* the {@link ScrollMixin.distanceToBottom}.
|
|
100
|
+
* Returns `true` when the scroll is at the initial position.
|
|
97
101
|
*
|
|
98
|
-
* @returns A boolean for knowing if the user
|
|
102
|
+
* @returns A boolean for knowing if the user scrolls to the start.
|
|
99
103
|
* @internal
|
|
100
104
|
*/
|
|
101
105
|
get: function () {
|
|
102
|
-
return
|
|
106
|
+
return this.currentPosition === 0;
|
|
103
107
|
},
|
|
104
108
|
enumerable: false,
|
|
105
109
|
configurable: true
|
|
106
110
|
});
|
|
107
|
-
Object.defineProperty(ScrollMixin.prototype, "
|
|
111
|
+
Object.defineProperty(ScrollMixin.prototype, "scrollDirection", {
|
|
108
112
|
/**
|
|
109
|
-
* Returns
|
|
113
|
+
* Returns direction of scroll based in {@link ScrollDirection}.
|
|
110
114
|
*
|
|
111
|
-
* @returns
|
|
115
|
+
* @returns The scroll direction.
|
|
112
116
|
* @internal
|
|
113
117
|
*/
|
|
114
118
|
get: function () {
|
|
115
|
-
return this.currentPosition
|
|
119
|
+
return this.currentPosition > this.previousPosition ? 'DOWN' : 'UP';
|
|
120
|
+
},
|
|
121
|
+
enumerable: false,
|
|
122
|
+
configurable: true
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(ScrollMixin.prototype, "scrollEndPosition", {
|
|
125
|
+
/**
|
|
126
|
+
* Returns end position of scroll.
|
|
127
|
+
*
|
|
128
|
+
* @returns A number for knowing end position of scroll.
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
get: function () {
|
|
132
|
+
return this.scrollHeight - this.clientHeight;
|
|
116
133
|
},
|
|
117
134
|
enumerable: false,
|
|
118
135
|
configurable: true
|
|
119
136
|
});
|
|
137
|
+
/**
|
|
138
|
+
* Initialises DOM dependant scroll properties.
|
|
139
|
+
*
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
|
+
ScrollMixin.prototype.mounted = function () {
|
|
143
|
+
var _this = this;
|
|
144
|
+
this.$nextTick().then(function () {
|
|
145
|
+
if (!_this.$el) {
|
|
146
|
+
// TODO Replace with Empathy's logger
|
|
147
|
+
// eslint-disable-next-line no-console
|
|
148
|
+
console.warn('[ScrollMixin]', 'Components using this mixin must set `this.$el` to the HTML node that is scrolling.');
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
_this.storeScrollData();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Resets the scroll position.
|
|
157
|
+
*
|
|
158
|
+
* @internal
|
|
159
|
+
*/
|
|
160
|
+
ScrollMixin.prototype.resetScroll = function () {
|
|
161
|
+
var _this = this;
|
|
162
|
+
this.$nextTick().then(function () {
|
|
163
|
+
if (_this.resetOnChange) {
|
|
164
|
+
_this.$el.scrollTo({ top: 0 });
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
};
|
|
120
168
|
/**
|
|
121
169
|
* Emits the `scroll` event.
|
|
122
170
|
*
|
|
@@ -128,15 +176,6 @@ var ScrollMixin = /** @class */ (function (_super) {
|
|
|
128
176
|
this.$emit('scroll', this.currentPosition);
|
|
129
177
|
this.previousPosition = oldScrollPosition;
|
|
130
178
|
};
|
|
131
|
-
/**
|
|
132
|
-
* Emits the `scroll:direction-change` event when the scrolling direction has changed.
|
|
133
|
-
*
|
|
134
|
-
* @param direction - The new direction of scroll.
|
|
135
|
-
* @internal
|
|
136
|
-
*/
|
|
137
|
-
ScrollMixin.prototype.emitScrollDirection = function (direction) {
|
|
138
|
-
this.$emit('scroll:direction-change', direction);
|
|
139
|
-
};
|
|
140
179
|
/**
|
|
141
180
|
* Emits the 'scroll:at-start' event when the user reaches the start.
|
|
142
181
|
*
|
|
@@ -144,9 +183,7 @@ var ScrollMixin = /** @class */ (function (_super) {
|
|
|
144
183
|
* @internal
|
|
145
184
|
*/
|
|
146
185
|
ScrollMixin.prototype.emitScrollReachedAtStart = function (isScrollAtStart) {
|
|
147
|
-
|
|
148
|
-
this.$emit('scroll:at-start');
|
|
149
|
-
}
|
|
186
|
+
this.$emit('scroll:at-start', isScrollAtStart);
|
|
150
187
|
};
|
|
151
188
|
/**
|
|
152
189
|
* Emits the 'scroll:almost-at-end' event when the user is about to reach to end.
|
|
@@ -155,9 +192,7 @@ var ScrollMixin = /** @class */ (function (_super) {
|
|
|
155
192
|
* @internal
|
|
156
193
|
*/
|
|
157
194
|
ScrollMixin.prototype.emitScrollAlmostAtEnd = function (isScrollAlmostAtEnd) {
|
|
158
|
-
|
|
159
|
-
this.$emit('scroll:almost-at-end', this.distanceToEnd);
|
|
160
|
-
}
|
|
195
|
+
this.$emit('scroll:almost-at-end', isScrollAlmostAtEnd);
|
|
161
196
|
};
|
|
162
197
|
/**
|
|
163
198
|
* Emits the 'scroll:at-end' event when the user reaches the end.
|
|
@@ -166,22 +201,52 @@ var ScrollMixin = /** @class */ (function (_super) {
|
|
|
166
201
|
* @internal
|
|
167
202
|
*/
|
|
168
203
|
ScrollMixin.prototype.emitScrollAtEnd = function (isScrollAtEnd) {
|
|
169
|
-
|
|
170
|
-
|
|
204
|
+
this.$emit('scroll:at-end', isScrollAtEnd);
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Emits the `scroll:direction-change` event when the scrolling direction has changed.
|
|
208
|
+
*
|
|
209
|
+
* @param direction - The new direction of scroll.
|
|
210
|
+
* @internal
|
|
211
|
+
*/
|
|
212
|
+
ScrollMixin.prototype.emitScrollDirection = function (direction) {
|
|
213
|
+
this.$emit('scroll:direction-change', direction);
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Updates scroll related properties.
|
|
217
|
+
*
|
|
218
|
+
* @internal
|
|
219
|
+
*/
|
|
220
|
+
ScrollMixin.prototype.storeScrollData = function () {
|
|
221
|
+
if (this.$el) {
|
|
222
|
+
this.currentPosition = this.$el.scrollTop;
|
|
223
|
+
this.scrollHeight = this.$el.scrollHeight;
|
|
224
|
+
this.clientHeight = this.$el.clientHeight;
|
|
171
225
|
}
|
|
172
226
|
};
|
|
173
227
|
__decorate([
|
|
174
228
|
Prop({ default: 100 })
|
|
175
|
-
], ScrollMixin.prototype, "
|
|
229
|
+
], ScrollMixin.prototype, "distanceToBottom", void 0);
|
|
176
230
|
__decorate([
|
|
177
231
|
Prop({ default: 100 })
|
|
178
|
-
], ScrollMixin.prototype, "
|
|
232
|
+
], ScrollMixin.prototype, "firstElementThresholdPx", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
Prop({ default: 100 })
|
|
235
|
+
], ScrollMixin.prototype, "throttleMs", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
Prop({ type: Boolean, default: true })
|
|
238
|
+
], ScrollMixin.prototype, "resetOnChange", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
XOn([
|
|
241
|
+
'SearchBoxQueryChanged',
|
|
242
|
+
'SortChanged',
|
|
243
|
+
'SelectedFiltersChanged',
|
|
244
|
+
'SelectedRelatedTagsChanged'
|
|
245
|
+
])
|
|
246
|
+
], ScrollMixin.prototype, "resetScroll", null);
|
|
179
247
|
__decorate([
|
|
180
248
|
Watch('currentPosition')
|
|
181
249
|
], ScrollMixin.prototype, "emitScroll", null);
|
|
182
|
-
__decorate([
|
|
183
|
-
Watch('scrollDirection')
|
|
184
|
-
], ScrollMixin.prototype, "emitScrollDirection", null);
|
|
185
250
|
__decorate([
|
|
186
251
|
Watch('hasScrollReachedStart')
|
|
187
252
|
], ScrollMixin.prototype, "emitScrollReachedAtStart", null);
|
|
@@ -191,11 +256,16 @@ var ScrollMixin = /** @class */ (function (_super) {
|
|
|
191
256
|
__decorate([
|
|
192
257
|
Watch('hasScrollReachedEnd')
|
|
193
258
|
], ScrollMixin.prototype, "emitScrollAtEnd", null);
|
|
259
|
+
__decorate([
|
|
260
|
+
Watch('scrollDirection')
|
|
261
|
+
], ScrollMixin.prototype, "emitScrollDirection", null);
|
|
194
262
|
ScrollMixin = __decorate([
|
|
195
263
|
Component
|
|
264
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
196
265
|
], ScrollMixin);
|
|
197
266
|
return ScrollMixin;
|
|
198
|
-
}(Vue));
|
|
267
|
+
}(Vue));
|
|
268
|
+
/* eslint-enable @typescript-eslint/unbound-method */
|
|
199
269
|
|
|
200
270
|
export default ScrollMixin;
|
|
201
271
|
//# sourceMappingURL=scroll.mixin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.mixin.js","sources":["../../../../src/components/scroll/scroll.mixin.ts"],"sourcesContent":["import Vue from 'vue';\nimport { Prop, Watch } from 'vue-property-decorator';\nimport Component from 'vue-class-component';\nimport { ScrollDirection } from './scroll.types';\n\n/**\n * Mixin to share Scroll logic.\n *\n * @public\n */\n@Component\nexport default class ScrollMixin extends Vue {\n /**\n * Time duration to ignore the subsequent scroll events after an emission.\n * Higher values will decrease events precision but can prevent performance issues.\n *\n * @public\n */\n @Prop({ default: 100 })\n public throttleMs!: number;\n\n /**\n * Distance to the end of the scroll that when reached will emit the\n * `scroll:about-to-end` event.\n *\n * @public\n */\n @Prop({ default: 100 })\n public distanceToBottom!: number;\n\n /**\n * Property for getting the current position of scroll.\n *\n * @internal\n */\n protected currentPosition = 0;\n\n /**\n * Property for getting the previous position of scroll.\n *\n * @internal\n */\n protected previousPosition = 0;\n\n /**\n * Property for getting the scroll height.\n *\n * @internal\n */\n protected scrollHeight = 0;\n\n /**\n * Property for getting the client height of scroll.\n *\n * @internal\n */\n protected clientHeight = 0;\n\n /**\n * Property for getting the direction of scroll.\n *\n * @internal\n */\n protected direction!: ScrollDirection;\n\n /**\n * Returns end position of scroll.\n *\n * @returns A number for knowing end position of scroll.\n * @internal\n */\n protected get scrollEndPosition(): number {\n return this.scrollHeight - this.clientHeight;\n }\n\n /**\n * Returns distance missing to end position position.\n *\n * @returns A number for knowing the distance missing to end position position.\n * @internal\n */\n protected get distanceToEnd(): number {\n return this.scrollEndPosition - this.currentPosition;\n }\n\n /**\n * Returns `true` when the scroll is at the initial position.\n *\n * @returns A boolean for knowing if the user scrolls to the start.\n * @internal\n */\n protected get hasScrollReachedStart(): boolean {\n return this.currentPosition === 0;\n }\n\n /**\n * Returns direction of scroll based in {@link ScrollDirection}.\n *\n * @returns The scroll direction.\n * @internal\n */\n protected get scrollDirection(): ScrollDirection {\n return this.currentPosition > this.previousPosition ? 'DOWN' : 'UP';\n }\n\n /**\n * Returns `true` when the amount of pixels scrolled is greater than\n * the {@link ScrollMixin.distanceToBottom}.\n *\n * @returns A boolean for knowing if the user is about to reaching to the end.\n * @internal\n */\n protected get hasScrollAlmostReachedEnd(): boolean {\n return !this.hasScrollReachedStart && this.distanceToBottom > this.distanceToEnd;\n }\n\n /**\n * Returns `true` when there is no more content to scroll.\n *\n * @returns A boolean for knowing if the user scrolls to the end.\n * @internal\n */\n protected get hasScrollReachedEnd(): boolean {\n return this.currentPosition === this.scrollEndPosition;\n }\n\n /**\n * Emits the `scroll` event.\n *\n * @param _newScrollPosition - The new position of scroll.\n * @param oldScrollPosition - The old position of scroll.\n * @internal\n */\n @Watch('currentPosition')\n emitScroll(_newScrollPosition: number, oldScrollPosition: number): void {\n this.$emit('scroll', this.currentPosition);\n this.previousPosition = oldScrollPosition;\n }\n\n /**\n * Emits the `scroll:direction-change` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n @Watch('scrollDirection')\n emitScrollDirection(direction: ScrollDirection): void {\n this.$emit('scroll:direction-change', direction);\n }\n\n /**\n * Emits the 'scroll:at-start' event when the user reaches the start.\n *\n * @param isScrollAtStart - For knowing if the user reaches at start.\n * @internal\n */\n @Watch('hasScrollReachedStart')\n emitScrollReachedAtStart(isScrollAtStart: boolean): void {\n if (isScrollAtStart) {\n this.$emit('scroll:at-start');\n }\n }\n\n /**\n * Emits the 'scroll:almost-at-end' event when the user is about to reach to end.\n *\n * @param isScrollAlmostAtEnd - For knowing if the user is about to reach to end.\n * @internal\n */\n @Watch('hasScrollAlmostReachedEnd')\n emitScrollAlmostAtEnd(isScrollAlmostAtEnd: boolean): void {\n if (isScrollAlmostAtEnd) {\n this.$emit('scroll:almost-at-end', this.distanceToEnd);\n }\n }\n\n /**\n * Emits the 'scroll:at-end' event when the user reaches the end.\n *\n * @param isScrollAtEnd - For knowing if the user reaches at end.\n * @internal\n */\n @Watch('hasScrollReachedEnd')\n emitScrollAtEnd(isScrollAtEnd: boolean): void {\n if (isScrollAtEnd) {\n this.$emit('scroll:at-end');\n }\n }\n}\n"],"names":[],"mappings":";;;;;AAKA;;;;;AAMA;IAAyC,+BAAG;IAA5C;QAAA,qEAiLC;;;;;;QAzJW,qBAAe,GAAG,CAAC,CAAC;;;;;;QAOpB,sBAAgB,GAAG,CAAC,CAAC;;;;;;QAOrB,kBAAY,GAAG,CAAC,CAAC;;;;;;QAOjB,kBAAY,GAAG,CAAC,CAAC;;KAoI5B;IArHC,sBAAc,0CAAiB;;;;;;;aAA/B;YACE,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;SAC9C;;;OAAA;IAQD,sBAAc,sCAAa;;;;;;;aAA3B;YACE,OAAO,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC;SACtD;;;OAAA;IAQD,sBAAc,8CAAqB;;;;;;;aAAnC;YACE,OAAO,IAAI,CAAC,eAAe,KAAK,CAAC,CAAC;SACnC;;;OAAA;IAQD,sBAAc,wCAAe;;;;;;;aAA7B;YACE,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;SACrE;;;OAAA;IASD,sBAAc,kDAAyB;;;;;;;;aAAvC;YACE,OAAO,CAAC,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;SAClF;;;OAAA;IAQD,sBAAc,4CAAmB;;;;;;;aAAjC;YACE,OAAO,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,iBAAiB,CAAC;SACxD;;;OAAA;;;;;;;;IAUD,gCAAU,GAAV,UAAW,kBAA0B,EAAE,iBAAyB;QAC9D,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;KAC3C;;;;;;;IASD,yCAAmB,GAAnB,UAAoB,SAA0B;QAC5C,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;KAClD;;;;;;;IASD,8CAAwB,GAAxB,UAAyB,eAAwB;QAC/C,IAAI,eAAe,EAAE;YACnB,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;SAC/B;KACF;;;;;;;IASD,2CAAqB,GAArB,UAAsB,mBAA4B;QAChD,IAAI,mBAAmB,EAAE;YACvB,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SACxD;KACF;;;;;;;IASD,qCAAe,GAAf,UAAgB,aAAsB;QACpC,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;SAC7B;KACF;IAxKD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;mDACI;IAS3B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;yDACU;IA0GjC;QADC,KAAK,CAAC,iBAAiB,CAAC;iDAIxB;IASD;QADC,KAAK,CAAC,iBAAiB,CAAC;0DAGxB;IASD;QADC,KAAK,CAAC,uBAAuB,CAAC;+DAK9B;IASD;QADC,KAAK,CAAC,2BAA2B,CAAC;4DAKlC;IASD;QADC,KAAK,CAAC,qBAAqB,CAAC;sDAK5B;IAhLkB,WAAW;QAD/B,SAAS;OACW,WAAW,CAiL/B;IAAD,kBAAC;CAAA,CAjLwC,GAAG;;;;"}
|
|
1
|
+
{"version":3,"file":"scroll.mixin.js","sources":["../../../../src/components/scroll/scroll.mixin.ts"],"sourcesContent":["import Vue from 'vue';\nimport { Component, Prop, Watch } from 'vue-property-decorator';\nimport { throttle } from '../../utils/throttle';\nimport { XOn } from '../decorators/bus.decorators';\nimport { ScrollDirection } from './scroll.types';\n\n/**\n * Mixin to share Scroll logic.\n *\n * @public\n */\n@Component\n/* eslint-disable @typescript-eslint/unbound-method */\nexport default class ScrollMixin extends Vue {\n /**\n * The scrolling container reference.\n *\n * @public\n */\n public $el!: HTMLElement;\n /**\n * Distance to the end of the scroll that when reached will emit the\n * `scroll:about-to-end` event.\n *\n * @public\n */\n @Prop({ default: 100 })\n public distanceToBottom!: number;\n /**\n * Positive vertical distance to still consider that the an element is the first one visible.\n * For example, if set to 100, after scrolling 100 pixels, the first rendered element\n * will still be considered the first one.\n */\n @Prop({ default: 100 })\n public firstElementThresholdPx!: number;\n /**\n * Time duration to ignore the subsequent scroll events after an emission.\n * Higher values will decrease events precision but can prevent performance issues.\n *\n * @public\n */\n @Prop({ default: 100 })\n public throttleMs!: number;\n\n /**\n * If true (default), sets the scroll position to the top when certain events are emitted.\n *\n * @public\n */\n @Prop({ type: Boolean, default: true })\n protected resetOnChange!: boolean;\n /**\n * Property for getting the client height of scroll.\n *\n * @internal\n */\n protected clientHeight = 0;\n /**\n * Property for getting the current position of scroll.\n *\n * @internal\n */\n protected currentPosition = 0;\n /**\n * Property for getting the direction of scroll.\n *\n * @internal\n */\n protected direction!: ScrollDirection;\n /**\n * Property for getting the previous position of scroll.\n *\n * @internal\n */\n protected previousPosition = 0;\n /**\n * Property for getting the scroll height.\n *\n * @internal\n */\n protected scrollHeight = 0;\n\n /**\n * Throttled version of the function that stores the DOM scroll related properties.\n * The duration of the throttle is configured through the\n * {@link ScrollMixin.throttleMs}.\n *\n * @returns A throttled version of the function to store the scroll data.\n * @internal\n */\n protected get throttledStoreScrollData(): () => void {\n return throttle(this.storeScrollData, this.throttleMs);\n }\n\n /**\n * Returns distance missing to end position position.\n *\n * @returns A number for knowing the distance missing to end position position.\n * @internal\n */\n protected get distanceToEnd(): number {\n return this.scrollEndPosition - this.currentPosition;\n }\n\n /**\n * Returns `true` when the amount of pixels scrolled is greater than\n * the {@link ScrollMixin.distanceToBottom}.\n *\n * @returns A boolean for knowing if the user is about to reaching to the end.\n * @internal\n */\n protected get hasScrollAlmostReachedEnd(): boolean {\n return !this.hasScrollReachedStart && this.distanceToBottom > this.distanceToEnd;\n }\n\n /**\n * Returns `true` when there is no more content to scroll.\n *\n * @returns A boolean for knowing if the user scrolls to the end.\n * @internal\n */\n protected get hasScrollReachedEnd(): boolean {\n return this.currentPosition === this.scrollEndPosition;\n }\n\n /**\n * Returns `true` when the scroll is at the initial position.\n *\n * @returns A boolean for knowing if the user scrolls to the start.\n * @internal\n */\n protected get hasScrollReachedStart(): boolean {\n return this.currentPosition === 0;\n }\n\n /**\n * Returns direction of scroll based in {@link ScrollDirection}.\n *\n * @returns The scroll direction.\n * @internal\n */\n protected get scrollDirection(): ScrollDirection {\n return this.currentPosition > this.previousPosition ? 'DOWN' : 'UP';\n }\n\n /**\n * Returns end position of scroll.\n *\n * @returns A number for knowing end position of scroll.\n * @internal\n */\n protected get scrollEndPosition(): number {\n return this.scrollHeight - this.clientHeight;\n }\n\n /**\n * Initialises DOM dependant scroll properties.\n *\n * @internal\n */\n mounted(): void {\n this.$nextTick().then(() => {\n if (!this.$el) {\n // TODO Replace with Empathy's logger\n // eslint-disable-next-line no-console\n console.warn(\n '[ScrollMixin]',\n 'Components using this mixin must set `this.$el` to the HTML node that is scrolling.'\n );\n } else {\n this.storeScrollData();\n }\n });\n }\n\n /**\n * Resets the scroll position.\n *\n * @internal\n */\n @XOn([\n 'SearchBoxQueryChanged',\n 'SortChanged',\n 'SelectedFiltersChanged',\n 'SelectedRelatedTagsChanged'\n ])\n resetScroll(): void {\n this.$nextTick().then(() => {\n if (this.resetOnChange) {\n this.$el.scrollTo({ top: 0 });\n }\n });\n }\n\n /**\n * Emits the `scroll` event.\n *\n * @param _newScrollPosition - The new position of scroll.\n * @param oldScrollPosition - The old position of scroll.\n * @internal\n */\n @Watch('currentPosition')\n protected emitScroll(_newScrollPosition: number, oldScrollPosition: number): void {\n this.$emit('scroll', this.currentPosition);\n this.previousPosition = oldScrollPosition;\n }\n\n /**\n * Emits the 'scroll:at-start' event when the user reaches the start.\n *\n * @param isScrollAtStart - For knowing if the user reaches at start.\n * @internal\n */\n @Watch('hasScrollReachedStart')\n protected emitScrollReachedAtStart(isScrollAtStart: boolean): void {\n this.$emit('scroll:at-start', isScrollAtStart);\n }\n\n /**\n * Emits the 'scroll:almost-at-end' event when the user is about to reach to end.\n *\n * @param isScrollAlmostAtEnd - For knowing if the user is about to reach to end.\n * @internal\n */\n @Watch('hasScrollAlmostReachedEnd')\n protected emitScrollAlmostAtEnd(isScrollAlmostAtEnd: boolean): void {\n this.$emit('scroll:almost-at-end', isScrollAlmostAtEnd);\n }\n\n /**\n * Emits the 'scroll:at-end' event when the user reaches the end.\n *\n * @param isScrollAtEnd - For knowing if the user reaches at end.\n * @internal\n */\n @Watch('hasScrollReachedEnd')\n protected emitScrollAtEnd(isScrollAtEnd: boolean): void {\n this.$emit('scroll:at-end', isScrollAtEnd);\n }\n\n /**\n * Emits the `scroll:direction-change` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n @Watch('scrollDirection')\n protected emitScrollDirection(direction: ScrollDirection): void {\n this.$emit('scroll:direction-change', direction);\n }\n\n /**\n * Updates scroll related properties.\n *\n * @internal\n */\n protected storeScrollData(): void {\n if (this.$el) {\n this.currentPosition = this.$el.scrollTop;\n this.scrollHeight = this.$el.scrollHeight;\n this.clientHeight = this.$el.clientHeight;\n }\n }\n}\n/* eslint-enable @typescript-eslint/unbound-method */\n"],"names":[],"mappings":";;;;;;AAMA;;;;;AAOA;IAAyC,+BAAG;;IAA5C;QAAA,qEA0PC;;;;;;QA/MW,kBAAY,GAAG,CAAC,CAAC;;;;;;QAMjB,qBAAe,GAAG,CAAC,CAAC;;;;;;QAYpB,sBAAgB,GAAG,CAAC,CAAC;;;;;;QAMrB,kBAAY,GAAG,CAAC,CAAC;;KAuL5B;IA7KC,sBAAc,iDAAwB;;;;;;;;;aAAtC;YACE,OAAO,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;SACxD;;;OAAA;IAQD,sBAAc,sCAAa;;;;;;;aAA3B;YACE,OAAO,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC;SACtD;;;OAAA;IASD,sBAAc,kDAAyB;;;;;;;;aAAvC;YACE,OAAO,CAAC,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;SAClF;;;OAAA;IAQD,sBAAc,4CAAmB;;;;;;;aAAjC;YACE,OAAO,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,iBAAiB,CAAC;SACxD;;;OAAA;IAQD,sBAAc,8CAAqB;;;;;;;aAAnC;YACE,OAAO,IAAI,CAAC,eAAe,KAAK,CAAC,CAAC;SACnC;;;OAAA;IAQD,sBAAc,wCAAe;;;;;;;aAA7B;YACE,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;SACrE;;;OAAA;IAQD,sBAAc,0CAAiB;;;;;;;aAA/B;YACE,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;SAC9C;;;OAAA;;;;;;IAOD,6BAAO,GAAP;QAAA,iBAaC;QAZC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC;YACpB,IAAI,CAAC,KAAI,CAAC,GAAG,EAAE;;;gBAGb,OAAO,CAAC,IAAI,CACV,eAAe,EACf,qFAAqF,CACtF,CAAC;aACH;iBAAM;gBACL,KAAI,CAAC,eAAe,EAAE,CAAC;aACxB;SACF,CAAC,CAAC;KACJ;;;;;;IAaD,iCAAW,GAAX;QANA,iBAYC;QALC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC;YACpB,IAAI,KAAI,CAAC,aAAa,EAAE;gBACtB,KAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;aAC/B;SACF,CAAC,CAAC;KACJ;;;;;;;;IAUS,gCAAU,GAApB,UAAqB,kBAA0B,EAAE,iBAAyB;QACxE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;KAC3C;;;;;;;IASS,8CAAwB,GAAlC,UAAmC,eAAwB;QACzD,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;KAChD;;;;;;;IASS,2CAAqB,GAA/B,UAAgC,mBAA4B;QAC1D,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,CAAC;KACzD;;;;;;;IASS,qCAAe,GAAzB,UAA0B,aAAsB;QAC9C,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;KAC5C;;;;;;;IASS,yCAAmB,GAA7B,UAA8B,SAA0B;QACtD,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;KAClD;;;;;;IAOS,qCAAe,GAAzB;QACE,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;YAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;SAC3C;KACF;IA3OD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;yDACU;IAOjC;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;gEACiB;IAQxC;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;mDACI;IAQ3B;QADC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDACL;IAwIlC;QANC,GAAG,CAAC;YACH,uBAAuB;YACvB,aAAa;YACb,wBAAwB;YACxB,4BAA4B;SAC7B,CAAC;kDAOD;IAUD;QADC,KAAK,CAAC,iBAAiB,CAAC;iDAIxB;IASD;QADC,KAAK,CAAC,uBAAuB,CAAC;+DAG9B;IASD;QADC,KAAK,CAAC,2BAA2B,CAAC;4DAGlC;IASD;QADC,KAAK,CAAC,qBAAqB,CAAC;sDAG5B;IASD;QADC,KAAK,CAAC,iBAAiB,CAAC;0DAGxB;IA5OkB,WAAW;QAF/B,SAAS;;OAEW,WAAW,CA0P/B;IAAD,kBAAC;CAAA,CA1PwC,GAAG,GA0P3C;AACD;;;;"}
|