@empathyco/x-components 3.0.0-alpha.34 → 3.0.0-alpha.35
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 +52 -0
- package/core/index.js +23 -22
- package/core/index.js.map +1 -1
- package/docs/API-reference/api/x-components.baseidtogglepanel.md +0 -1
- package/docs/API-reference/api/x-components.baseresultlink.md +1 -1
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.isbackdropvisible.md +11 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.leftasideanimation.md +11 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.md +30 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.rightasideanimation.md +11 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.scrollposition.md +11 -0
- package/docs/API-reference/api/x-components.fixedheaderandasideslayout.setposition.md +22 -0
- package/docs/API-reference/api/x-components.getrootxcomponent.md +2 -2
- package/docs/API-reference/api/x-components.isxcomponent.md +2 -2
- package/docs/API-reference/api/x-components.maybearray.md +13 -0
- package/docs/API-reference/api/x-components.md +11 -7
- package/docs/API-reference/api/x-components.namespaceddebounce.md +2 -2
- package/docs/API-reference/api/x-components.namespacedthrottle.md +2 -2
- package/docs/API-reference/api/{x-components.namespacedtimeretrieving.md → x-components.namespacedtimeselector.md} +3 -3
- package/docs/API-reference/api/x-components.namespacedtimewireoperator.md +3 -3
- package/docs/API-reference/api/x-components.searchxevents.md +2 -0
- package/docs/API-reference/api/x-components.searchxevents.userclickedabanner.md +13 -0
- package/docs/API-reference/api/x-components.searchxevents.userclickedapromoted.md +13 -0
- package/docs/API-reference/api/x-components.setconsent.md +1 -1
- package/docs/API-reference/api/x-components.setquerytaggingdebounce.md +1 -1
- package/docs/API-reference/api/x-components.setsessionduration.md +1 -1
- package/docs/API-reference/api/x-components.throttle.md +3 -3
- package/docs/API-reference/api/x-components.timedwireoperatoroptions.cancelon.md +13 -0
- package/docs/API-reference/api/x-components.timedwireoperatoroptions.forceon.md +13 -0
- package/docs/API-reference/api/x-components.timedwireoperatoroptions.md +21 -0
- package/docs/API-reference/api/{x-components.timeretrieving.md → x-components.timeselector.md} +3 -3
- package/docs/API-reference/api/x-components.trackaddtocartwire.md +13 -0
- package/docs/API-reference/api/{x-components.trackwire.md → x-components.trackquerywire.md} +3 -3
- package/docs/API-reference/api/x-components.trackresultclickedwire.md +13 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +0 -1
- package/docs/API-reference/api/x-components.xinstaller.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.animate-width.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.collapse-from-top.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.collapse-height.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.collapse-width.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.cross-fade.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +1 -1
- package/docs/API-reference/components/common/{x-components.staggering-transition-group.md → animations/x-components.staggering-transition-group.md} +2 -2
- package/docs/API-reference/components/common/animations/x-components.translate-from-left.md +1 -1
- package/docs/API-reference/components/common/animations/x-components.translate-from-right.md +1 -1
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +5 -5
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +5 -5
- package/docs/API-reference/components/common/currency/x-components.base-currency.md +2 -4
- package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +2 -2
- package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +4 -4
- package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +2 -2
- package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +3 -3
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +3 -3
- package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +3 -3
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-modal.md +1 -1
- package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +4 -4
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +2 -2
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +2 -2
- package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +2 -2
- package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +2 -2
- package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +3 -3
- package/docs/API-reference/components/common/result/x-components.base-result-image.md +3 -3
- package/docs/API-reference/components/common/result/x-components.base-result-link.md +11 -19
- package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +3 -3
- package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +2 -2
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +3 -3
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +1 -1
- package/docs/API-reference/components/common/x-components.base-dropdown.md +1 -1
- package/docs/API-reference/components/common/x-components.base-event-button.md +2 -2
- package/docs/API-reference/components/common/x-components.base-grid.md +4 -4
- package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +4 -4
- package/docs/API-reference/components/common/x-components.base-rating.md +3 -3
- package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +1 -1
- package/docs/API-reference/components/common/x-components.sliding-panel.md +4 -4
- package/docs/API-reference/components/empathize/x-components.empathize.md +2 -2
- package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +2 -2
- package/docs/API-reference/components/facets/x-components.clear-filters.md +3 -3
- package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +1 -1
- package/docs/API-reference/components/facets/x-components.facets/facets.md +6 -6
- package/docs/API-reference/components/facets/x-components.filters/all-filter.md +5 -5
- package/docs/API-reference/components/facets/x-components.filters/base-filter.md +4 -4
- package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +5 -5
- package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +4 -4
- package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +3 -3
- package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +3 -3
- package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +4 -4
- package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +3 -3
- package/docs/API-reference/components/facets/x-components.lists/filters-list.md +3 -3
- package/docs/API-reference/components/facets/x-components.lists/filters-search.md +3 -3
- package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +5 -5
- package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +4 -4
- package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +3 -3
- package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +5 -5
- package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +2 -2
- package/docs/API-reference/components/history-queries/x-components.history-queries.md +4 -4
- package/docs/API-reference/components/history-queries/x-components.history-query.md +3 -3
- package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +2 -2
- package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +2 -2
- package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +2 -2
- package/docs/API-reference/components/next-queries/x-components.next-queries.md +4 -4
- package/docs/API-reference/components/next-queries/x-components.next-query.md +3 -3
- package/docs/API-reference/components/popular-searches/x-components.popular-search.md +3 -3
- package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +4 -4
- package/docs/API-reference/components/recommendations/x-components.recommendations.md +4 -4
- package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +2 -2
- package/docs/API-reference/components/scroll/x-components.scroll.md +18 -22
- package/docs/API-reference/components/scroll/x-components.window-scroll.md +5 -7
- package/docs/API-reference/components/search/x-components.partial-query-button.md +3 -3
- package/docs/API-reference/components/search/x-components.partial-results-list.md +4 -4
- package/docs/API-reference/components/search/x-components.redirection.md +1 -1
- package/docs/API-reference/components/search/x-components.sort-dropdown.md +1 -1
- package/docs/API-reference/components/search/x-components.sort-list.md +1 -1
- package/docs/API-reference/components/search/x-components.spellcheck-button.md +3 -3
- package/docs/API-reference/components/search/x-components.spellcheck.md +3 -3
- package/docs/build-search-ui/web-archetype-development-guide.md +178 -0
- package/docs/build-search-ui/web-archetype-integration-guide.md +146 -138
- package/docs/build-search-ui/web-x-components-integration-guide.md +3 -3
- package/js/components/animations/animate-width.vue.js +2 -2
- package/js/components/animations/animate-width.vue.js.map +1 -1
- package/js/components/animations/collapse-from-top.vue.js +2 -2
- package/js/components/animations/collapse-from-top.vue.js.map +1 -1
- package/js/components/animations/collapse-height.vue.js +2 -2
- package/js/components/animations/collapse-height.vue.js.map +1 -1
- package/js/components/animations/collapse-width.vue.js +2 -2
- package/js/components/animations/collapse-width.vue.js.map +1 -1
- package/js/components/animations/cross-fade.vue.js +2 -2
- package/js/components/animations/cross-fade.vue.js.map +1 -1
- package/js/components/animations/fade-and-slide.vue.js +2 -2
- package/js/components/animations/fade-and-slide.vue.js.map +1 -1
- package/js/components/animations/staggered-fade-and-slide.vue.js +2 -2
- package/js/components/animations/staggered-fade-and-slide.vue.js.map +1 -1
- package/js/components/animations/staggered-fade-and-slide.vue_rollup-plugin-vue=script.js +1 -1
- package/js/components/animations/staggered-fade-and-slide.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/{staggering-transition-group.vue.js → animations/staggering-transition-group.vue.js} +2 -2
- package/js/components/animations/staggering-transition-group.vue.js.map +1 -0
- package/js/components/{staggering-transition-group.vue_rollup-plugin-vue=script.js → animations/staggering-transition-group.vue_rollup-plugin-vue=script.js} +17 -17
- package/js/components/animations/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/animations/translate-from-left.vue.js +2 -2
- package/js/components/animations/translate-from-left.vue.js.map +1 -1
- package/js/components/animations/translate-from-right.vue.js +2 -2
- package/js/components/animations/translate-from-right.vue.js.map +1 -1
- package/js/components/base-dropdown.vue.js +2 -2
- package/js/components/base-dropdown.vue.js.map +1 -1
- package/js/components/base-event-button.vue.js.map +1 -1
- package/js/components/base-grid.vue.js +2 -2
- package/js/components/base-grid.vue.js.map +1 -1
- package/js/components/base-keyboard-navigation.vue.js.map +1 -1
- package/js/components/base-rating.vue.js +2 -2
- package/js/components/base-rating.vue.js.map +1 -1
- package/js/components/base-variable-column-grid.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue.js +2 -2
- package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
- package/js/components/currency/base-currency.vue.js.map +1 -1
- package/js/components/filters/labels/base-price-filter-label.vue.js.map +1 -1
- package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
- package/js/components/global-x-bus.vue.js.map +1 -1
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js +2 -1
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/layouts/fixed-header-and-asides-layout.vue.js +212 -0
- package/js/components/layouts/fixed-header-and-asides-layout.vue.js.map +1 -0
- package/js/components/layouts/fixed-header-and-asides-layout.vue_rollup-plugin-vue=script.js +57 -0
- package/js/components/layouts/fixed-header-and-asides-layout.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/layouts/multi-column-max-width-layout.vue.js +3 -3
- 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 +1 -1
- package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js +1 -1
- package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-events-modal.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-id-modal.vue.js.map +1 -1
- package/js/components/modals/base-modal.vue.js +2 -2
- package/js/components/modals/base-modal.vue.js.map +1 -1
- package/js/components/panels/base-header-toggle-panel.vue.js +2 -2
- package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel.vue_rollup-plugin-vue=script.js +4 -9
- package/js/components/panels/base-id-toggle-panel.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
- package/js/components/result/base-result-current-price.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +2 -2
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-link.vue.js +5 -5
- 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 +3 -12
- package/js/components/result/base-result-link.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/components/result/base-result-previous-price.vue.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/sliding-panel.vue.js +2 -2
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
- package/js/components/suggestions/base-suggestions.vue.js +2 -2
- package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
- package/js/components/x-component.mixin.js +1 -4
- package/js/components/x-component.mixin.js.map +1 -1
- package/js/components/x-component.utils.js +4 -20
- package/js/components/x-component.utils.js.map +1 -1
- package/js/index.js +31 -30
- package/js/index.js.map +1 -1
- package/js/plugins/x-plugin.alias.js +21 -20
- package/js/plugins/x-plugin.alias.js.map +1 -1
- package/js/plugins/x-plugin.mixin.js +2 -2
- package/js/plugins/x-plugin.mixin.js.map +1 -1
- package/js/wiring/namespaced-wires.operators.js +3 -4
- package/js/wiring/namespaced-wires.operators.js.map +1 -1
- package/js/wiring/wires-operators.utils.js +55 -0
- package/js/wiring/wires-operators.utils.js.map +1 -0
- package/js/wiring/wires.operators.js +17 -12
- package/js/wiring/wires.operators.js.map +1 -1
- package/js/x-installer/x-installer/x-installer.js +1 -1
- package/js/x-installer/x-installer/x-installer.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +13 -12
- 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.js.map +1 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +13 -12
- 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.js.map +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +22 -12
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +13 -12
- 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.js +2 -2
- package/js/x-modules/facets/components/facets/facets-provider.vue.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +17 -23
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets.vue.js +2 -2
- package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +13 -12
- 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.js.map +1 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +13 -12
- 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/editable-number-range-filter.vue.js +1 -1
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +13 -12
- 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.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +13 -12
- 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.js.map +1 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +13 -12
- 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.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +13 -12
- 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.js.map +1 -1
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +13 -12
- 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.js +2 -2
- package/js/x-modules/facets/components/lists/filters-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +13 -12
- 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.js +2 -2
- package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +13 -12
- 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-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +13 -12
- 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 +13 -12
- 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.js.map +1 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue_rollup-plugin-vue=script.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 +1 -1
- package/js/x-modules/history-queries/components/remove-history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/wiring.js +1 -1
- package/js/x-modules/history-queries/wiring.js.map +1 -1
- package/js/x-modules/identifier-results/components/identifier-result.vue.js.map +1 -1
- package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
- package/js/x-modules/identifier-results/wiring.js +1 -1
- 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-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js +1 -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 +1 -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 +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/query-suggestions/wiring.js +1 -1
- package/js/x-modules/query-suggestions/wiring.js.map +1 -1
- package/js/x-modules/recommendations/components/recommendations.vue.js +2 -2
- package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +15 -14
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js +15 -14
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/scroll.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/scroll/components/window-scroll.vue.js.map +1 -1
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +15 -14
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/banner.vue.js +2 -1
- package/js/x-modules/search/components/banner.vue.js.map +1 -1
- package/js/x-modules/search/components/banner.vue_rollup-plugin-vue=script.js +8 -0
- package/js/x-modules/search/components/banner.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/banners-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
- package/js/x-modules/search/components/partial-results-list.vue.js +2 -2
- package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
- package/js/x-modules/search/components/promoted.vue.js +2 -1
- package/js/x-modules/search/components/promoted.vue.js.map +1 -1
- package/js/x-modules/search/components/promoted.vue_rollup-plugin-vue=script.js +8 -0
- package/js/x-modules/search/components/promoted.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/redirection.vue.js.map +1 -1
- package/js/x-modules/search/components/redirection.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/results-list.vue_rollup-plugin-vue=script.js +2 -2
- package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue.js +2 -2
- package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +13 -12
- 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 +13 -12
- package/js/x-modules/search/components/sort.mixin.js.map +1 -1
- package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +13 -12
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/tagging/store/actions/track.action.js +2 -2
- package/js/x-modules/tagging/store/actions/track.action.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +48 -4
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/package.json +7 -7
- package/report/tsdoc-metadata.json +1 -1
- package/report/x-adapter.api.json +1 -1
- package/report/x-components.api.json +572 -222
- package/report/x-components.api.md +60 -33
- package/report/x-types.api.json +1 -1
- package/tagging/index.js +1 -1
- package/types/adapter/mocked-adapter.d.ts.map +1 -1
- package/types/components/animations/index.d.ts +1 -0
- package/types/components/animations/index.d.ts.map +1 -1
- package/types/components/{staggering-transition-group.vue.d.ts → animations/staggering-transition-group.vue.d.ts} +0 -0
- package/types/components/animations/staggering-transition-group.vue.d.ts.map +1 -0
- package/types/components/global-x-bus.vue.d.ts.map +1 -1
- package/types/components/index.d.ts +1 -4
- package/types/components/index.d.ts.map +1 -1
- package/types/components/layouts/fixed-header-and-asides-layout.vue.d.ts +17 -0
- package/types/components/layouts/fixed-header-and-asides-layout.vue.d.ts.map +1 -0
- package/types/components/layouts/index.d.ts +4 -0
- package/types/components/layouts/index.d.ts.map +1 -0
- package/types/components/panels/base-id-toggle-panel.vue.d.ts +0 -5
- package/types/components/panels/base-id-toggle-panel.vue.d.ts.map +1 -1
- package/types/components/result/base-result-link.vue.d.ts +3 -10
- package/types/components/result/base-result-link.vue.d.ts.map +1 -1
- package/types/components/x-component.mixin.d.ts.map +1 -1
- package/types/components/x-component.utils.d.ts +1 -16
- package/types/components/x-component.utils.d.ts.map +1 -1
- package/types/plugins/x-plugin.alias.d.ts +4 -6
- package/types/plugins/x-plugin.alias.d.ts.map +1 -1
- package/types/plugins/x-plugin.mixin.d.ts +13 -3
- package/types/plugins/x-plugin.mixin.d.ts.map +1 -1
- package/types/utils/types.d.ts +6 -0
- package/types/utils/types.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts +0 -5
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/wiring/namespaced-wires.operators.d.ts +2 -3
- package/types/wiring/namespaced-wires.operators.d.ts.map +1 -1
- package/types/wiring/namespaced-wiring.types.d.ts +9 -10
- package/types/wiring/namespaced-wiring.types.d.ts.map +1 -1
- package/types/wiring/wires-operators.utils.d.ts +36 -0
- package/types/wiring/wires-operators.utils.d.ts.map +1 -0
- package/types/wiring/wires.operators.d.ts +5 -8
- package/types/wiring/wires.operators.d.ts.map +1 -1
- package/types/wiring/wiring.types.d.ts +17 -4
- package/types/wiring/wiring.types.d.ts.map +1 -1
- package/types/x-installer/x-installer/x-installer.d.ts +1 -1
- package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts +6 -0
- package/types/x-modules/extra-params/components/snippet-config-extra-params.vue.d.ts.map +1 -1
- package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts +0 -8
- package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts.map +1 -1
- package/types/x-modules/history-queries/wiring.d.ts +1 -1
- package/types/x-modules/identifier-results/wiring.d.ts +1 -1
- package/types/x-modules/query-suggestions/wiring.d.ts +1 -1
- package/types/x-modules/search/components/banner.vue.d.ts +6 -0
- package/types/x-modules/search/components/banner.vue.d.ts.map +1 -1
- package/types/x-modules/search/components/promoted.vue.d.ts +6 -0
- package/types/x-modules/search/components/promoted.vue.d.ts.map +1 -1
- package/types/x-modules/search/components/redirection.vue.d.ts +1 -1
- package/types/x-modules/search/components/redirection.vue.d.ts.map +1 -1
- package/types/x-modules/search/events.types.d.ts +11 -1
- package/types/x-modules/search/events.types.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +29 -9
- package/types/x-modules/tagging/wiring.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.baseidtogglepanel.created.md +0 -17
- package/docs/API-reference/api/x-components.xcomponent.md +0 -15
- package/docs/API-reference/api/x-components.xeventstypes.userrightclickedaresult.md +0 -13
- package/js/components/staggering-transition-group.vue.js.map +0 -1
- package/js/components/staggering-transition-group.vue_rollup-plugin-vue=script.js.map +0 -1
- package/js/wiring/utils/wire-racing-handling.js +0 -108
- package/js/wiring/utils/wire-racing-handling.js.map +0 -1
- package/types/components/staggering-transition-group.vue.d.ts.map +0 -1
- package/types/components/x-component.types.d.ts +0 -19
- package/types/components/x-component.types.d.ts.map +0 -1
- package/types/wiring/utils/wire-racing-handling.d.ts +0 -27
- package/types/wiring/utils/wire-racing-handling.d.ts.map +0 -1
|
@@ -8,7 +8,7 @@ import '../../../components/animations/collapse-height.vue.js';
|
|
|
8
8
|
import '../../../components/animations/collapse-width.vue.js';
|
|
9
9
|
import '../../../components/animations/cross-fade.vue.js';
|
|
10
10
|
import '../../../components/animations/fade-and-slide.vue.js';
|
|
11
|
-
import '../../../components/staggering-transition-group.vue.js';
|
|
11
|
+
import '../../../components/animations/staggering-transition-group.vue.js';
|
|
12
12
|
import '../../../components/animations/staggered-fade-and-slide.vue.js';
|
|
13
13
|
import '../../../components/animations/translate-from-left.vue.js';
|
|
14
14
|
import '../../../components/animations/translate-from-right.vue.js';
|
|
@@ -69,16 +69,26 @@ import '../../../components/icons/trash.vue.js';
|
|
|
69
69
|
import '../../../components/icons/trending-tiny.vue.js';
|
|
70
70
|
import '../../../components/icons/trending.vue.js';
|
|
71
71
|
import '../../../components/icons/user.vue.js';
|
|
72
|
-
import '../../../components/
|
|
72
|
+
import { State } from '../../../components/decorators/store.decorators.js';
|
|
73
|
+
import '../../../components/x-component.utils.js';
|
|
74
|
+
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
75
|
+
import { scrollXModule } from '../x-module.js';
|
|
76
|
+
import { ScrollObserverKey } from './scroll.const.js';
|
|
73
77
|
import '../../../components/modals/base-modal.vue.js';
|
|
78
|
+
import '../../../components/modals/base-id-modal.vue.js';
|
|
79
|
+
import '../../../components/scroll/scroll.mixin.js';
|
|
80
|
+
import '../../../components/scroll/base-scroll.vue.js';
|
|
81
|
+
import '../../../components/layouts/fixed-header-and-asides-layout.vue.js';
|
|
82
|
+
import '../../../components/panels/base-toggle-panel.vue.js';
|
|
83
|
+
import '../../../components/panels/base-id-toggle-panel.vue.js';
|
|
84
|
+
import '../../../components/layouts/multi-column-max-width-layout.vue.js';
|
|
85
|
+
import '../../../components/layouts/single-column-layout.vue.js';
|
|
86
|
+
import '../../../components/modals/base-events-modal-close.vue.js';
|
|
74
87
|
import '../../../components/modals/base-events-modal.vue.js';
|
|
75
88
|
import '../../../components/modals/base-events-modal-open.vue.js';
|
|
76
|
-
import '../../../components/modals/base-id-modal.vue.js';
|
|
77
89
|
import '../../../components/modals/base-id-modal-close.vue.js';
|
|
78
90
|
import '../../../components/modals/base-id-modal-open.vue.js';
|
|
79
|
-
import '../../../components/panels/base-toggle-panel.vue.js';
|
|
80
91
|
import '../../../components/panels/base-header-toggle-panel.vue.js';
|
|
81
|
-
import '../../../components/panels/base-id-toggle-panel.vue.js';
|
|
82
92
|
import '../../../components/panels/base-id-toggle-panel-button.vue.js';
|
|
83
93
|
import '../../../components/result/base-result-add-to-cart.vue.js';
|
|
84
94
|
import '../../../components/result/base-result-current-price.vue.js';
|
|
@@ -87,8 +97,6 @@ import '../../../components/result/base-result-link.vue.js';
|
|
|
87
97
|
import '../../../components/result/base-result-previous-price.vue.js';
|
|
88
98
|
import '../../../components/result/base-result-fallback-image.vue.js';
|
|
89
99
|
import '../../../components/result/base-result-placeholder-image.vue.js';
|
|
90
|
-
import '../../../components/scroll/scroll.mixin.js';
|
|
91
|
-
import '../../../components/scroll/base-scroll.vue.js';
|
|
92
100
|
import '../../../components/suggestions/base-suggestion.vue.js';
|
|
93
101
|
import '../../../components/suggestions/base-suggestions.vue.js';
|
|
94
102
|
import '../../../components/auto-progress-bar.vue.js';
|
|
@@ -99,13 +107,6 @@ import '../../../components/base-variable-column-grid.vue.js';
|
|
|
99
107
|
import '../../../components/decorators/debounce.decorators.js';
|
|
100
108
|
import '../../../components/sliding-panel.vue.js';
|
|
101
109
|
import '../../../components/items-list.vue.js';
|
|
102
|
-
import { State } from '../../../components/decorators/store.decorators.js';
|
|
103
|
-
import '../../../components/x-component.utils.js';
|
|
104
|
-
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
105
|
-
import { scrollXModule } from '../x-module.js';
|
|
106
|
-
import { ScrollObserverKey } from './scroll.const.js';
|
|
107
|
-
import '../../../components/layouts/multi-column-max-width-layout.vue.js';
|
|
108
|
-
import '../../../components/layouts/single-column-layout.vue.js';
|
|
109
110
|
import '../../../components/location-provider.vue.js';
|
|
110
111
|
import '../../../components/global-x-bus.vue.js';
|
|
111
112
|
import '../../../components/snippet-callbacks.vue.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-scroll-item.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\nimport { Identifiable } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { XInject } from '../../../components/decorators/injection.decorators';\nimport { scrollXModule } from '../x-module';\nimport { ScrollObserverKey } from './scroll.const';\nimport { ScrollVisibilityObserver } from './scroll.types';\n\n/**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main-scroll-item.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\nimport { Identifiable } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { XInject } from '../../../components/decorators/injection.decorators';\nimport { scrollXModule } from '../x-module';\nimport { ScrollObserverKey } from './scroll.const';\nimport { ScrollVisibilityObserver } from './scroll.types';\n\n/**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AASA;IAA4C,kCAAG;IAA/C;;KAiFC;;;;;;;;;IAhCO,gCAAO,GAAb;;;;4BACE,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAtB,SAAsB,CAAC;;wBAEvB,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;KAChF;;;;;;IAOD,sCAAa,GAAb;;QACE,MAAA,IAAI,CAAC,wBAAwB,0CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpD;;;;;;;IAQD,oCAAW,GAAX,UACE,WAA4C,EAC5C,WAA4C;QAE5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACzC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;SACxC;KACF;IAlED;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gDACE;IAQ3B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;+CACF;IASjC;QADC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;2DACH;IAQhC;QADC,OAAO,CAAC,iBAAiB,CAAC;oEACuC;IAvC/C,cAAc;QAHlC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,cAAc,CAiFlC;IAAD,qBAAC;CAAA,CAjF2C,GAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-to-top.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <BaseEventButton\n v-if=\"isVisible\"\n v-on=\"$listeners\"\n class=\"x-button x-scroll-to-top\"\n data-test=\"scroll-to-top\"\n :events=\"events\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { State, xComponentMixin } from '../../../components';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { NoElement } from '../../../components/no-element';\n import { Dictionary } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { ScrollComponentState } from '../store';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n /**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n })\n export default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"scroll-to-top.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue"],"sourcesContent":["<template>\n <component :is=\"animation\">\n <BaseEventButton\n v-if=\"isVisible\"\n v-on=\"$listeners\"\n class=\"x-button x-scroll-to-top\"\n data-test=\"scroll-to-top\"\n :events=\"events\"\n >\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <slot />\n </BaseEventButton>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { State, xComponentMixin } from '../../../components';\n import BaseEventButton from '../../../components/base-event-button.vue';\n import { NoElement } from '../../../components/no-element';\n import { Dictionary } from '../../../utils';\n import { XEventsTypes } from '../../../wiring';\n import { ScrollComponentState } from '../store';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n /**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n })\n export default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe component renders whatever is passed to it in the default slot and scrolls to top the scroll\nwith an id `scrollId`.\n\nIt also receives an optional threshold in pixels. When the threshold is reached from the top, the\ncomponent will be shown once the user scrolls `UP`.\n\nIf this parameter is not provided the button will be visible when the user almost reaches the end of\nthe scroll.\n\n```vue\n<template>\n <div>\n <ScrollToTop scroll-id=\"scrollId\" :threshold-px=\"1000\">\n <span>Scroll to top</span>\n </ScrollToTop>\n </div>\n</template>\n\n<script>\n import { ScrollToTop } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollToTopTest',\n components: {\n ScrollToTop\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserClickedScrollToTop`: the event is emitted after the user clicks the button. The event payload\n is the id of the scroll that it going to be scrolled.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,7 +8,7 @@ import '../../../components/animations/collapse-height.vue.js';
|
|
|
8
8
|
import '../../../components/animations/collapse-width.vue.js';
|
|
9
9
|
import '../../../components/animations/cross-fade.vue.js';
|
|
10
10
|
import '../../../components/animations/fade-and-slide.vue.js';
|
|
11
|
-
import '../../../components/staggering-transition-group.vue.js';
|
|
11
|
+
import '../../../components/animations/staggering-transition-group.vue.js';
|
|
12
12
|
import '../../../components/animations/staggered-fade-and-slide.vue.js';
|
|
13
13
|
import '../../../components/animations/translate-from-left.vue.js';
|
|
14
14
|
import '../../../components/animations/translate-from-right.vue.js';
|
|
@@ -69,16 +69,26 @@ import '../../../components/icons/trash.vue.js';
|
|
|
69
69
|
import '../../../components/icons/trending-tiny.vue.js';
|
|
70
70
|
import '../../../components/icons/trending.vue.js';
|
|
71
71
|
import '../../../components/icons/user.vue.js';
|
|
72
|
-
import '../../../components/
|
|
72
|
+
import { State } from '../../../components/decorators/store.decorators.js';
|
|
73
|
+
import '../../../components/x-component.utils.js';
|
|
74
|
+
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
75
|
+
import { scrollXModule } from '../x-module.js';
|
|
76
|
+
import { MainScrollId } from './scroll.const.js';
|
|
73
77
|
import '../../../components/modals/base-modal.vue.js';
|
|
78
|
+
import '../../../components/modals/base-id-modal.vue.js';
|
|
79
|
+
import '../../../components/scroll/scroll.mixin.js';
|
|
80
|
+
import '../../../components/scroll/base-scroll.vue.js';
|
|
81
|
+
import '../../../components/layouts/fixed-header-and-asides-layout.vue.js';
|
|
82
|
+
import '../../../components/panels/base-toggle-panel.vue.js';
|
|
83
|
+
import '../../../components/panels/base-id-toggle-panel.vue.js';
|
|
84
|
+
import '../../../components/layouts/multi-column-max-width-layout.vue.js';
|
|
85
|
+
import '../../../components/layouts/single-column-layout.vue.js';
|
|
86
|
+
import '../../../components/modals/base-events-modal-close.vue.js';
|
|
74
87
|
import '../../../components/modals/base-events-modal.vue.js';
|
|
75
88
|
import '../../../components/modals/base-events-modal-open.vue.js';
|
|
76
|
-
import '../../../components/modals/base-id-modal.vue.js';
|
|
77
89
|
import '../../../components/modals/base-id-modal-close.vue.js';
|
|
78
90
|
import '../../../components/modals/base-id-modal-open.vue.js';
|
|
79
|
-
import '../../../components/panels/base-toggle-panel.vue.js';
|
|
80
91
|
import '../../../components/panels/base-header-toggle-panel.vue.js';
|
|
81
|
-
import '../../../components/panels/base-id-toggle-panel.vue.js';
|
|
82
92
|
import '../../../components/panels/base-id-toggle-panel-button.vue.js';
|
|
83
93
|
import '../../../components/result/base-result-add-to-cart.vue.js';
|
|
84
94
|
import '../../../components/result/base-result-current-price.vue.js';
|
|
@@ -87,8 +97,6 @@ import '../../../components/result/base-result-link.vue.js';
|
|
|
87
97
|
import '../../../components/result/base-result-previous-price.vue.js';
|
|
88
98
|
import '../../../components/result/base-result-fallback-image.vue.js';
|
|
89
99
|
import '../../../components/result/base-result-placeholder-image.vue.js';
|
|
90
|
-
import '../../../components/scroll/scroll.mixin.js';
|
|
91
|
-
import '../../../components/scroll/base-scroll.vue.js';
|
|
92
100
|
import '../../../components/suggestions/base-suggestion.vue.js';
|
|
93
101
|
import '../../../components/suggestions/base-suggestions.vue.js';
|
|
94
102
|
import '../../../components/auto-progress-bar.vue.js';
|
|
@@ -99,13 +107,6 @@ import '../../../components/base-variable-column-grid.vue.js';
|
|
|
99
107
|
import '../../../components/decorators/debounce.decorators.js';
|
|
100
108
|
import '../../../components/sliding-panel.vue.js';
|
|
101
109
|
import '../../../components/items-list.vue.js';
|
|
102
|
-
import { State } from '../../../components/decorators/store.decorators.js';
|
|
103
|
-
import '../../../components/x-component.utils.js';
|
|
104
|
-
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
105
|
-
import { scrollXModule } from '../x-module.js';
|
|
106
|
-
import { MainScrollId } from './scroll.const.js';
|
|
107
|
-
import '../../../components/layouts/multi-column-max-width-layout.vue.js';
|
|
108
|
-
import '../../../components/layouts/single-column-layout.vue.js';
|
|
109
110
|
import '../../../components/location-provider.vue.js';
|
|
110
111
|
import '../../../components/global-x-bus.vue.js';
|
|
111
112
|
import '../../../components/snippet-callbacks.vue.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-to-top.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { NoElement } from '../../../components/no-element';\nimport { Dictionary } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { ScrollComponentState } from '../store';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n})\nexport default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scroll-to-top.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { NoElement } from '../../../components/no-element';\nimport { Dictionary } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { ScrollComponentState } from '../store';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n})\nexport default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;AAUA;IAAyC,+BAAG;IAA5C;;KAsGC;IA7DC,sBAAc,mCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBAC1D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBACtC;oBACE,QAAQ,EAAE,CAAC;oBACX,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,KAAK;oBACtB,mBAAmB,EAAE,KAAK;oBAC1B,aAAa,EAAE,KAAK;iBACrB,CAAC;SACP;;;OAAA;IAQD,sBAAc,+BAAM;;;;;;;aAApB;YACE,OAAO,EAAE,sBAAsB,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClD;;;OAAA;IAQD,sBAAc,6CAAoB;;;;;;;aAAlC;YACE,OAAO,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC;SAC7C;;;OAAA;IAQD,sBAAc,2CAAkB;;;;;;;aAAhC;YACE,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAY,CAAC;SAClF;;;OAAA;IAQD,sBAAc,kCAAS;;;;;;;aAAvB;YACE,OAAO,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,CAAC;SAC7F;;;OAAA;IAQD,sBAAc,kDAAyB;;;;;;;aAAvC;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,KAAK,MAAM,CAAC;SACpF;;;OAAA;IA9FD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;kDACH;IAQhC;QADC,IAAI,EAAE;oDACqB;IAQ5B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;iDACP;IASzB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;2DACqC;IAhC1C,WAAW;QAJ/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE;SAChC,CAAC;OACmB,WAAW,CAsG/B;IAAD,kBAAC;CAAA,CAtGwC,GAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll.vue"],"sourcesContent":["<template>\n <BaseScroll\n @scroll=\"emitScroll\"\n @scroll:direction-change=\"emitScrollDirectionChange\"\n @scroll:at-start=\"emitScrollAtStart\"\n @scroll:almost-at-end=\"emitScrollAlmostAtEnd\"\n @scroll:at-end=\"emitScrollAtEnd\"\n v-on=\"$listeners\"\n :id=\"id\"\n :throttleMs=\"throttleMs\"\n :distanceToBottom=\"distanceToBottom\"\n >\n <slot />\n </BaseScroll>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { XOn } from '../../../components/decorators/bus.decorators';\n import BaseScroll from '../../../components/scroll/base-scroll.vue';\n import { ScrollDirection } from '../../../components/scroll/scroll.types';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n /**\n * Base scroll component that depending on base scroll component and the user interaction emits\n * different x events for knowing when the user scrolls, the direction of scroll and if user\n * reaches the start or end.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseScroll }\n })\n export default class Scroll 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()\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()\n public distanceToBottom!: number;\n\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public id!: string;\n\n /**\n * Emits the `UserScrolled` event.\n *\n * @param position - The new position of scroll.\n * @internal\n */\n protected emitScroll(position: number): void {\n this.$x.emit('UserScrolled', position, this.createEventMetadata());\n }\n\n /**\n * Emits the `UserChangedScrollDirection` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n protected emitScrollDirectionChange(direction: ScrollDirection): void {\n this.$x.emit('UserChangedScrollDirection', direction, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollStart' event when the user reaches the start.\n *\n * @param isAtStart - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtStart(isAtStart: boolean): void {\n this.$x.emit('UserReachedScrollStart', isAtStart, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserAlmostReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAlmostAtEnd - A boolean indicating if the scroll is almost at its ending position.\n * @internal\n */\n protected emitScrollAlmostAtEnd(isAlmostAtEnd: boolean): void {\n this.$x.emit('UserAlmostReachedScrollEnd', isAlmostAtEnd, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAtEnd - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtEnd(isAtEnd: boolean): void {\n this.$x.emit('UserReachedScrollEnd', isAtEnd, this.createEventMetadata());\n }\n\n /**\n * Creates a {@link WireMetadata} metadata object for all the emitted events.\n *\n * @internal\n * @returns A new {@link WireMetadata} object.\n */\n protected createEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el as HTMLElement, id: this.id };\n }\n\n /**\n * Scrolls to initial position when the user has clicked the scroll to top button.\n *\n * @param scrollId - {@link XEventsTypes.UserClickedScrollToTop}.\n * @internal\n */\n @XOn('UserClickedScrollToTop')\n scrollToTop(scrollId: string): void {\n if (scrollId === this.id && this.$el) {\n this.$el?.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"scroll.vue.js","sources":["../../../../../src/x-modules/scroll/components/scroll.vue"],"sourcesContent":["<template>\n <BaseScroll\n @scroll=\"emitScroll\"\n @scroll:direction-change=\"emitScrollDirectionChange\"\n @scroll:at-start=\"emitScrollAtStart\"\n @scroll:almost-at-end=\"emitScrollAlmostAtEnd\"\n @scroll:at-end=\"emitScrollAtEnd\"\n v-on=\"$listeners\"\n :id=\"id\"\n :throttleMs=\"throttleMs\"\n :distanceToBottom=\"distanceToBottom\"\n >\n <slot />\n </BaseScroll>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { XOn } from '../../../components/decorators/bus.decorators';\n import BaseScroll from '../../../components/scroll/base-scroll.vue';\n import { ScrollDirection } from '../../../components/scroll/scroll.types';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n /**\n * Base scroll component that depending on base scroll component and the user interaction emits\n * different x events for knowing when the user scrolls, the direction of scroll and if user\n * reaches the start or end.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseScroll }\n })\n export default class Scroll 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()\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()\n public distanceToBottom!: number;\n\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public id!: string;\n\n /**\n * Emits the `UserScrolled` event.\n *\n * @param position - The new position of scroll.\n * @internal\n */\n protected emitScroll(position: number): void {\n this.$x.emit('UserScrolled', position, this.createEventMetadata());\n }\n\n /**\n * Emits the `UserChangedScrollDirection` event when the scrolling direction has changed.\n *\n * @param direction - The new direction of scroll.\n * @internal\n */\n protected emitScrollDirectionChange(direction: ScrollDirection): void {\n this.$x.emit('UserChangedScrollDirection', direction, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollStart' event when the user reaches the start.\n *\n * @param isAtStart - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtStart(isAtStart: boolean): void {\n this.$x.emit('UserReachedScrollStart', isAtStart, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserAlmostReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAlmostAtEnd - A boolean indicating if the scroll is almost at its ending position.\n * @internal\n */\n protected emitScrollAlmostAtEnd(isAlmostAtEnd: boolean): void {\n this.$x.emit('UserAlmostReachedScrollEnd', isAlmostAtEnd, this.createEventMetadata());\n }\n\n /**\n * Emits the 'UserReachedScrollEnd' event when the user is about to reach to end.\n *\n * @param isAtEnd - A boolean indicating if the scroll is at the ending position.\n * @internal\n */\n protected emitScrollAtEnd(isAtEnd: boolean): void {\n this.$x.emit('UserReachedScrollEnd', isAtEnd, this.createEventMetadata());\n }\n\n /**\n * Creates a {@link WireMetadata} metadata object for all the emitted events.\n *\n * @internal\n * @returns A new {@link WireMetadata} object.\n */\n protected createEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el as HTMLElement, id: this.id };\n }\n\n /**\n * Scrolls to initial position when the user has clicked the scroll to top button.\n *\n * @param scrollId - {@link XEventsTypes.UserClickedScrollToTop}.\n * @internal\n */\n @XOn('UserClickedScrollToTop')\n scrollToTop(scrollId: string): void {\n if (scrollId === this.id && this.$el) {\n this.$el?.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Example\n\nThe Scroll is a component that wraps the BaseScroll and provides it for a unique id.\n\n### Customized usage\n\n#### Overriding the properties\n\nIt renders an element with scroll, with the content passed in the `default slot`.\n\n```vue\n<template>\n <Scroll id=\"exampleScrollId\" throttleMs=\"50\" distanceToBottom=\"300\">\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\n }\n };\n</script>\n```\n\n#### Using scroll events.\n\n```vue\n<template>\n <Scroll\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 id=\"exampleScrollId\"\n throttleMs=\"50\"\n distanceToBottom=\"300\"\n >\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\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(isAtStart) {\n console.log('scroll:at-start', isAtStart);\n },\n scrollAlmostAtEnd(isAlmostAtEnd) {\n console.log('scroll:almost-at-end', isAlmostAtEnd);\n },\n scrollAtEnd(isAtEnd) {\n console.log('scroll:at-end', isAtEnd);\n }\n }\n };\n</script>\n```\n\n#### Using XEvents.\n\nYou can use the XEvents subscribing to them.\n\n```vue\n<template>\n <Scroll throttleMs=\"50\" distanceToBottom=\"300\">\n <div class=\"content-scroll\">\n <span>content1</span>\n <span>content1</span>\n </div>\n </Scroll>\n</template>\n\n<script>\n import { Scroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n Scroll\n },\n mounted() {\n this.$x.on('UserScrolled').subscribe(distance => {\n console.log(distance);\n });\n this.$x.on('UserChangedScrollDirection').subscribe(direction => {\n console.log(direction);\n });\n this.$x.on('UserReachedScrollStart').subscribe(isAtStart => {\n console.log(isAtStart);\n });\n this.$x.on('UserAlmostReachedScrollEnd').subscribe(isAlmostAtEnd => {\n console.log(isAlmostAtEnd);\n });\n this.$x.on('UserReachedScrollEnd').subscribe(isAtEnd => {\n console.log(isAtEnd);\n });\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserScrolled`: emitted after the user scrolls in this container. The payload is the scroll top\n distance in pixels.\n- `UserChangedScrollDirection`: emitted when the user changes the scroll direction. The payload is\n the new scrolling direction.\n- `UserReachedScrollStart`: emitted when the user scrolls up to the initial position of the scroll.\n- `UserAlmostReachedScrollEnd`: emitted when the user is about to reach the bottom part of the\n scroll.\n- `UserReachedScrollEnd`: emitted when the user has reached the bottom part of the scroll.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,10 +2,10 @@ import { __extends, __decorate } from 'tslib';
|
|
|
2
2
|
import Vue from 'vue';
|
|
3
3
|
import { Prop, Component } from 'vue-property-decorator';
|
|
4
4
|
import { XOn } from '../../../components/decorators/bus.decorators.js';
|
|
5
|
-
import BaseScroll from '../../../components/scroll/base-scroll.vue.js';
|
|
6
5
|
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
7
6
|
import { scrollXModule } from '../x-module.js';
|
|
8
7
|
import { MainScrollId } from './scroll.const.js';
|
|
8
|
+
import BaseScroll from '../../../components/scroll/base-scroll.vue.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Base scroll component that depending on base scroll component and the user interaction emits
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-scroll.vue.js","sources":["../../../../../src/x-modules/scroll/components/window-scroll.vue"],"sourcesContent":["<script lang=\"ts\">\n import { mixins } from 'vue-class-component';\n import { Component, Prop } from 'vue-property-decorator';\n import { ScrollDirection, ScrollMixin, xComponentMixin } from '../../../components';\n import { WireMetadata } from '../../../wiring';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n type ScrollableElement = 'html' | 'body';\n\n /**\n * The `WindowScroll` component listens to either the `html` or `body` DOM scroll events, and\n * re-emits them as X Events. Additionally it also emits events related to the direction or\n * current position of these elements scroll.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)]\n })\n export default class WindowScroll extends mixins(ScrollMixin) {\n /**\n * Tag to identify the main scrollable element.\n *\n * @public\n */\n @Prop({ default: 'html' })\n protected scrollableElement!: ScrollableElement;\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n protected id!: string;\n\n mounted(): void {\n this.initAndListenElement();\n this.$on('scroll', (position: number) => {\n this.$x.emit('UserScrolled', position, this.createXEventMetadata());\n });\n this.$on('scroll:direction-change', (direction: ScrollDirection) => {\n this.$x.emit('UserChangedScrollDirection', direction, this.createXEventMetadata());\n });\n this.$on('scroll:at-start', (hasReachedStart: boolean) => {\n this.$x.emit('UserReachedScrollStart', hasReachedStart, this.createXEventMetadata());\n });\n this.$on('scroll:almost-at-end', (hasAlmostReachedEnd: boolean) => {\n this.$x.emit(\n 'UserAlmostReachedScrollEnd',\n hasAlmostReachedEnd,\n this.createXEventMetadata()\n );\n });\n this.$on('scroll:at-end', (hasReachedEnd: boolean) => {\n this.$x.emit('UserReachedScrollEnd', hasReachedEnd, this.createXEventMetadata());\n });\n }\n\n /**\n * Sets the HTML element depending on {@link WindowScroll.scrollableElement}, and initialises\n * its events.\n *\n * @internal\n */\n protected initAndListenElement(): void {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.$el = this.scrollableElement === 'body' ? document.body : document.documentElement;\n this.$el.addEventListener('scroll', this.throttledStoreScrollData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n\n /**\n * Cleanup listeners.\n */\n beforeDestroy(): void {\n this.$el.removeEventListener('scroll', this.throttledStoreScrollData);\n }\n\n /**\n * Creates the metadata for the events of this component.\n *\n * @returns A {@link WireMetadata} for the events emitted by this component.\n * @internal\n */\n protected createXEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el, id: this.id };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"window-scroll.vue.js","sources":["../../../../../src/x-modules/scroll/components/window-scroll.vue"],"sourcesContent":["<script lang=\"ts\">\n import { mixins } from 'vue-class-component';\n import { Component, Prop } from 'vue-property-decorator';\n import { ScrollDirection, ScrollMixin, xComponentMixin } from '../../../components';\n import { WireMetadata } from '../../../wiring';\n import { scrollXModule } from '../x-module';\n import { MainScrollId } from './scroll.const';\n\n type ScrollableElement = 'html' | 'body';\n\n /**\n * The `WindowScroll` component listens to either the `html` or `body` DOM scroll events, and\n * re-emits them as X Events. Additionally it also emits events related to the direction or\n * current position of these elements scroll.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(scrollXModule)]\n })\n export default class WindowScroll extends mixins(ScrollMixin) {\n /**\n * Tag to identify the main scrollable element.\n *\n * @public\n */\n @Prop({ default: 'html' })\n protected scrollableElement!: ScrollableElement;\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n protected id!: string;\n\n mounted(): void {\n this.initAndListenElement();\n this.$on('scroll', (position: number) => {\n this.$x.emit('UserScrolled', position, this.createXEventMetadata());\n });\n this.$on('scroll:direction-change', (direction: ScrollDirection) => {\n this.$x.emit('UserChangedScrollDirection', direction, this.createXEventMetadata());\n });\n this.$on('scroll:at-start', (hasReachedStart: boolean) => {\n this.$x.emit('UserReachedScrollStart', hasReachedStart, this.createXEventMetadata());\n });\n this.$on('scroll:almost-at-end', (hasAlmostReachedEnd: boolean) => {\n this.$x.emit(\n 'UserAlmostReachedScrollEnd',\n hasAlmostReachedEnd,\n this.createXEventMetadata()\n );\n });\n this.$on('scroll:at-end', (hasReachedEnd: boolean) => {\n this.$x.emit('UserReachedScrollEnd', hasReachedEnd, this.createXEventMetadata());\n });\n }\n\n /**\n * Sets the HTML element depending on {@link WindowScroll.scrollableElement}, and initialises\n * its events.\n *\n * @internal\n */\n protected initAndListenElement(): void {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.$el = this.scrollableElement === 'body' ? document.body : document.documentElement;\n this.$el.addEventListener('scroll', this.throttledStoreScrollData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n\n /**\n * Cleanup listeners.\n */\n beforeDestroy(): void {\n this.$el.removeEventListener('scroll', this.throttledStoreScrollData);\n }\n\n /**\n * Creates the metadata for the events of this component.\n *\n * @returns A {@link WireMetadata} for the events emitted by this component.\n * @internal\n */\n protected createXEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el, id: this.id };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Example\n\nThe `WindowScroll` component manages the scroll state of the `body` or `html` elements. It does the\nnecessary calculations for knowing the direction of scroll, if the scroll has reached its starting\nposition, if it is about to reach its ending position or if it has already reached it end. Whenever\nthis state changes, it emits the appropiate X Event to the rest of the application\n\n### Custom usage\n\n#### Overriding the properties and using document scroll events.\n\n```vue\n<template>\n <WindowScroll\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 id=\"example-main-scroll\"\n throttleMs=\"100\"\n distanceToBottom=\"300\"\n scrollableElement=\"body\"\n />\n</template>\n\n<script>\n import { WindowScroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'ScrollIdTest',\n components: {\n WindowScroll\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', isAtStart);\n },\n scrollAlmostAtEnd(isAlmostAtEnd) {\n console.log('scroll:almost-at-end', isAlmostAtEnd);\n },\n scrollAtEnd(isAtEnd) {\n console.log('scroll:at-end', isAtEnd);\n }\n }\n };\n</script>\n```\n\n#### Using body and XEvents.\n\nIf we want to listen scroll body we should do some changes in css for body. This is an example, so\ntherefore the height of body can be get any value that you want. The template style should have a\nsimilar styles the corresponding style for tag body like in the next example.\n\n```vue\n<template>\n <WindowScroll\n id=\"example-main-scroll\"\n throttleMs=\"100\"\n distanceToBottom=\"300\"\n scrollableElement=\"body\"\n />\n</template>\n\n<script>\n import { WindowScroll } from '@empathyco/x-components/scroll';\n\n export default {\n name: 'MainComponent',\n components: {\n WindowScroll\n },\n mounted() {\n this.$x.on('UserScrolled').subscribe(distance => {\n console.log(distance);\n });\n this.$x.on('UserChangedScrollDirection').subscribe(direction => {\n console.log(direction);\n });\n this.$x.on('UserReachedScrollStart').subscribe(isAtStart => {\n console.log(isAtStart);\n });\n this.$x.on('UserAlmostReachedScrollEnd').subscribe(isAlmostAtEnd => {\n console.log(isAlmostAtEnd);\n });\n this.$x.on('UserReachedScrollEnd').subscribe(isAtEnd => {\n console.log(isAtEnd);\n });\n }\n };\n</script>\n<style lang=\"scss\">\n html {\n overflow: hidden;\n }\n\n body {\n overflow-y: auto;\n height: 100vh;\n }\n</style>\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\n## Events\n\nA list of events that the component will emit:\n\n- `UserScrolled`: the event is emitted after the user scrolls in this container. The payload is the\n scroll top distance in pixels.\n- `UserChangedScrollDirection`: the event is emitted when the user changes the scroll direction. The\n payload is the new scrolling direction.\n- `UserReachedScrollStart`: the event is emitted when the user scrolls up to the initial position of\n the scroll.\n- `UserAlmostReachedScrollEnd`: the event is emitted when the user is about to reach the bottom part\n of the scroll.\n- `UserReachedScrollEnd`: the event is emitted when the user has reached the bottom part of the\n scroll.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,7 +7,7 @@ import '../../../components/animations/collapse-height.vue.js';
|
|
|
7
7
|
import '../../../components/animations/collapse-width.vue.js';
|
|
8
8
|
import '../../../components/animations/cross-fade.vue.js';
|
|
9
9
|
import '../../../components/animations/fade-and-slide.vue.js';
|
|
10
|
-
import '../../../components/staggering-transition-group.vue.js';
|
|
10
|
+
import '../../../components/animations/staggering-transition-group.vue.js';
|
|
11
11
|
import '../../../components/animations/staggered-fade-and-slide.vue.js';
|
|
12
12
|
import '../../../components/animations/translate-from-left.vue.js';
|
|
13
13
|
import '../../../components/animations/translate-from-right.vue.js';
|
|
@@ -69,16 +69,26 @@ import '../../../components/icons/trash.vue.js';
|
|
|
69
69
|
import '../../../components/icons/trending-tiny.vue.js';
|
|
70
70
|
import '../../../components/icons/trending.vue.js';
|
|
71
71
|
import '../../../components/icons/user.vue.js';
|
|
72
|
-
import '../../../components/
|
|
72
|
+
import '../../../components/decorators/store.decorators.js';
|
|
73
|
+
import '../../../components/x-component.utils.js';
|
|
74
|
+
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
75
|
+
import { scrollXModule } from '../x-module.js';
|
|
76
|
+
import { MainScrollId } from './scroll.const.js';
|
|
73
77
|
import '../../../components/modals/base-modal.vue.js';
|
|
78
|
+
import '../../../components/modals/base-id-modal.vue.js';
|
|
79
|
+
import ScrollMixin from '../../../components/scroll/scroll.mixin.js';
|
|
80
|
+
import '../../../components/scroll/base-scroll.vue.js';
|
|
81
|
+
import '../../../components/layouts/fixed-header-and-asides-layout.vue.js';
|
|
82
|
+
import '../../../components/panels/base-toggle-panel.vue.js';
|
|
83
|
+
import '../../../components/panels/base-id-toggle-panel.vue.js';
|
|
84
|
+
import '../../../components/layouts/multi-column-max-width-layout.vue.js';
|
|
85
|
+
import '../../../components/layouts/single-column-layout.vue.js';
|
|
86
|
+
import '../../../components/modals/base-events-modal-close.vue.js';
|
|
74
87
|
import '../../../components/modals/base-events-modal.vue.js';
|
|
75
88
|
import '../../../components/modals/base-events-modal-open.vue.js';
|
|
76
|
-
import '../../../components/modals/base-id-modal.vue.js';
|
|
77
89
|
import '../../../components/modals/base-id-modal-close.vue.js';
|
|
78
90
|
import '../../../components/modals/base-id-modal-open.vue.js';
|
|
79
|
-
import '../../../components/panels/base-toggle-panel.vue.js';
|
|
80
91
|
import '../../../components/panels/base-header-toggle-panel.vue.js';
|
|
81
|
-
import '../../../components/panels/base-id-toggle-panel.vue.js';
|
|
82
92
|
import '../../../components/panels/base-id-toggle-panel-button.vue.js';
|
|
83
93
|
import '../../../components/result/base-result-add-to-cart.vue.js';
|
|
84
94
|
import '../../../components/result/base-result-current-price.vue.js';
|
|
@@ -87,8 +97,6 @@ import '../../../components/result/base-result-link.vue.js';
|
|
|
87
97
|
import '../../../components/result/base-result-previous-price.vue.js';
|
|
88
98
|
import '../../../components/result/base-result-fallback-image.vue.js';
|
|
89
99
|
import '../../../components/result/base-result-placeholder-image.vue.js';
|
|
90
|
-
import ScrollMixin from '../../../components/scroll/scroll.mixin.js';
|
|
91
|
-
import '../../../components/scroll/base-scroll.vue.js';
|
|
92
100
|
import '../../../components/suggestions/base-suggestion.vue.js';
|
|
93
101
|
import '../../../components/suggestions/base-suggestions.vue.js';
|
|
94
102
|
import '../../../components/auto-progress-bar.vue.js';
|
|
@@ -99,13 +107,6 @@ import '../../../components/base-variable-column-grid.vue.js';
|
|
|
99
107
|
import '../../../components/decorators/debounce.decorators.js';
|
|
100
108
|
import '../../../components/sliding-panel.vue.js';
|
|
101
109
|
import '../../../components/items-list.vue.js';
|
|
102
|
-
import '../../../components/decorators/store.decorators.js';
|
|
103
|
-
import '../../../components/x-component.utils.js';
|
|
104
|
-
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
105
|
-
import { scrollXModule } from '../x-module.js';
|
|
106
|
-
import { MainScrollId } from './scroll.const.js';
|
|
107
|
-
import '../../../components/layouts/multi-column-max-width-layout.vue.js';
|
|
108
|
-
import '../../../components/layouts/single-column-layout.vue.js';
|
|
109
110
|
import '../../../components/location-provider.vue.js';
|
|
110
111
|
import '../../../components/global-x-bus.vue.js';
|
|
111
112
|
import '../../../components/snippet-callbacks.vue.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/window-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { ScrollDirection, ScrollMixin, xComponentMixin } from '../../../components';\nimport { WireMetadata } from '../../../wiring';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\ntype ScrollableElement = 'html' | 'body';\n\n/**\n * The `WindowScroll` component listens to either the `html` or `body` DOM scroll events, and\n * re-emits them as X Events. Additionally it also emits events related to the direction or\n * current position of these elements scroll.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class WindowScroll extends mixins(ScrollMixin) {\n /**\n * Tag to identify the main scrollable element.\n *\n * @public\n */\n @Prop({ default: 'html' })\n protected scrollableElement!: ScrollableElement;\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n protected id!: string;\n\n mounted(): void {\n this.initAndListenElement();\n this.$on('scroll', (position: number) => {\n this.$x.emit('UserScrolled', position, this.createXEventMetadata());\n });\n this.$on('scroll:direction-change', (direction: ScrollDirection) => {\n this.$x.emit('UserChangedScrollDirection', direction, this.createXEventMetadata());\n });\n this.$on('scroll:at-start', (hasReachedStart: boolean) => {\n this.$x.emit('UserReachedScrollStart', hasReachedStart, this.createXEventMetadata());\n });\n this.$on('scroll:almost-at-end', (hasAlmostReachedEnd: boolean) => {\n this.$x.emit(\n 'UserAlmostReachedScrollEnd',\n hasAlmostReachedEnd,\n this.createXEventMetadata()\n );\n });\n this.$on('scroll:at-end', (hasReachedEnd: boolean) => {\n this.$x.emit('UserReachedScrollEnd', hasReachedEnd, this.createXEventMetadata());\n });\n }\n\n /**\n * Sets the HTML element depending on {@link WindowScroll.scrollableElement}, and initialises\n * its events.\n *\n * @internal\n */\n protected initAndListenElement(): void {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.$el = this.scrollableElement === 'body' ? document.body : document.documentElement;\n this.$el.addEventListener('scroll', this.throttledStoreScrollData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n\n /**\n * Cleanup listeners.\n */\n beforeDestroy(): void {\n this.$el.removeEventListener('scroll', this.throttledStoreScrollData);\n }\n\n /**\n * Creates the metadata for the events of this component.\n *\n * @returns A {@link WireMetadata} for the events emitted by this component.\n * @internal\n */\n protected createXEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el, id: this.id };\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"window-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/window-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { ScrollDirection, ScrollMixin, xComponentMixin } from '../../../components';\nimport { WireMetadata } from '../../../wiring';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\ntype ScrollableElement = 'html' | 'body';\n\n/**\n * The `WindowScroll` component listens to either the `html` or `body` DOM scroll events, and\n * re-emits them as X Events. Additionally it also emits events related to the direction or\n * current position of these elements scroll.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class WindowScroll extends mixins(ScrollMixin) {\n /**\n * Tag to identify the main scrollable element.\n *\n * @public\n */\n @Prop({ default: 'html' })\n protected scrollableElement!: ScrollableElement;\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n protected id!: string;\n\n mounted(): void {\n this.initAndListenElement();\n this.$on('scroll', (position: number) => {\n this.$x.emit('UserScrolled', position, this.createXEventMetadata());\n });\n this.$on('scroll:direction-change', (direction: ScrollDirection) => {\n this.$x.emit('UserChangedScrollDirection', direction, this.createXEventMetadata());\n });\n this.$on('scroll:at-start', (hasReachedStart: boolean) => {\n this.$x.emit('UserReachedScrollStart', hasReachedStart, this.createXEventMetadata());\n });\n this.$on('scroll:almost-at-end', (hasAlmostReachedEnd: boolean) => {\n this.$x.emit(\n 'UserAlmostReachedScrollEnd',\n hasAlmostReachedEnd,\n this.createXEventMetadata()\n );\n });\n this.$on('scroll:at-end', (hasReachedEnd: boolean) => {\n this.$x.emit('UserReachedScrollEnd', hasReachedEnd, this.createXEventMetadata());\n });\n }\n\n /**\n * Sets the HTML element depending on {@link WindowScroll.scrollableElement}, and initialises\n * its events.\n *\n * @internal\n */\n protected initAndListenElement(): void {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.$el = this.scrollableElement === 'body' ? document.body : document.documentElement;\n this.$el.addEventListener('scroll', this.throttledStoreScrollData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n\n /**\n * Cleanup listeners.\n */\n beforeDestroy(): void {\n this.$el.removeEventListener('scroll', this.throttledStoreScrollData);\n }\n\n /**\n * Creates the metadata for the events of this component.\n *\n * @returns A {@link WireMetadata} for the events emitted by this component.\n * @internal\n */\n protected createXEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el, id: this.id };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;AAUA;IAA0C,gCAAmB;IAA7D;;KAuEC;IAvDC,8BAAO,GAAP;QAAA,iBAqBC;QApBC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,QAAgB;YAClC,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACrE,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,yBAAyB,EAAE,UAAC,SAA0B;YAC7D,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,SAAS,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACpF,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,UAAC,eAAwB;YACnD,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,eAAe,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACtF,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,UAAC,mBAA4B;YAC5D,KAAI,CAAC,EAAE,CAAC,IAAI,CACV,4BAA4B,EAC5B,mBAAmB,EACnB,KAAI,CAAC,oBAAoB,EAAE,CAC5B,CAAC;SACH,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,UAAC,aAAsB;YAC/C,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,sBAAsB,EAAE,aAAa,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SAClF,CAAC,CAAC;KACJ;;;;;;;IAQS,2CAAoB,GAA9B;;;QAGE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,iBAAiB,KAAK,MAAM,GAAG,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,eAAe,CAAC;QACxF,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACpE;;IAGD,6BAAM,GAAN,eAAiB;;;;IAKjB,oCAAa,GAAb;QACE,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACvE;;;;;;;IAQS,2CAAoB,GAA9B;QACE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;KAC1C;IA/DD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;2DACsB;IAOhD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;4CACV;IAdH,YAAY;QAHhC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,YAAY,CAuEhC;IAAD,mBAAC;CAvED,CAA0C,MAAM,CAAC,WAAW,CAAC;;;;"}
|
|
@@ -15,6 +15,7 @@ var __vue_render__ = function () {
|
|
|
15
15
|
{
|
|
16
16
|
staticClass: "x-banner",
|
|
17
17
|
attrs: { href: _vm.banner.url, "data-test": "banner" },
|
|
18
|
+
on: { click: _vm.emitClickEvent },
|
|
18
19
|
},
|
|
19
20
|
[
|
|
20
21
|
_c("img", {
|
|
@@ -32,7 +33,7 @@ __vue_render__._withStripped = true;
|
|
|
32
33
|
/* style */
|
|
33
34
|
var __vue_inject_styles__ = function (inject) {
|
|
34
35
|
if (!inject) { return }
|
|
35
|
-
inject("data-v-
|
|
36
|
+
inject("data-v-134380e3_0", { source: ".x-banner {\n display: flex;\n flex-flow: column nowrap;\n text-decoration: none;\n}\n.x-banner__image {\n width: 100%;\n object-fit: contain;\n}", map: undefined, media: undefined });
|
|
36
37
|
|
|
37
38
|
};
|
|
38
39
|
/* scoped */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.vue.js","sources":["../../../../../src/x-modules/search/components/banner.vue"],"sourcesContent":["<template>\n <a :href=\"banner.url\" class=\"x-banner\" data-test=\"banner\">\n <img :src=\"banner.image\" class=\"x-banner__image\" alt=\"\" />\n <h2 class=\"x-banner__title\">{{ banner.title }}</h2>\n </a>\n</template>\n\n<script lang=\"ts\">\n import { Banner as BannerModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { searchXModule } from '../x-module';\n /**\n * A banner result is just an item that has been inserted into the search results to advertise\n * something. Usually it is the first item in the grid or it can be placed in the middle of them\n * and fill the whole row where appears. It just contains a link to the banner content, an image\n * and a title.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule)]\n })\n export default class Banner extends Vue {\n /**\n * The banner data.\n *\n * @public\n */\n @Prop({ required: true })\n public banner!: BannerModel;\n }\n</script>\n\n<style lang=\"scss\">\n .x-banner {\n display: flex;\n flex-flow: column nowrap;\n text-decoration: none;\n\n &__image {\n width: 100%;\n object-fit: contain;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nIn this example banned data is passed as a prop.\n\n_Here you can see how the `Banner` component is rendered._\n\n```vue\n<template>\n <Banner :banner=\"banner\" />\n</template>\n\n<script>\n import { Banner } from '@empathyco/x-components/search';\n export default {\n name: 'BannerDemo',\n components: {\n Banner\n },\n data() {\n return {\n banner: {\n modelName: 'Banner',\n id: 'banner-example',\n url: 'https://my-website.com/summer-shirts',\n image: 'https://my-website.com/images/summer-shirts.jpg',\n title: 'Trendy summer shirts'\n }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA
|
|
1
|
+
{"version":3,"file":"banner.vue.js","sources":["../../../../../src/x-modules/search/components/banner.vue"],"sourcesContent":["<template>\n <a @click=\"emitClickEvent\" :href=\"banner.url\" class=\"x-banner\" data-test=\"banner\">\n <img :src=\"banner.image\" class=\"x-banner__image\" alt=\"\" />\n <h2 class=\"x-banner__title\">{{ banner.title }}</h2>\n </a>\n</template>\n\n<script lang=\"ts\">\n import { Banner as BannerModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { searchXModule } from '../x-module';\n /**\n * A banner result is just an item that has been inserted into the search results to advertise\n * something. Usually it is the first item in the grid or it can be placed in the middle of them\n * and fill the whole row where appears. It just contains a link to the banner content, an image\n * and a title.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule)]\n })\n export default class Banner extends Vue {\n /**\n * The banner data.\n *\n * @public\n */\n @Prop({ required: true })\n public banner!: BannerModel;\n\n /**\n * Emits the banner click event.\n *\n * @internal\n */\n protected emitClickEvent(): void {\n this.$x.emit('UserClickedABanner', this.banner);\n }\n }\n</script>\n\n<style lang=\"scss\">\n .x-banner {\n display: flex;\n flex-flow: column nowrap;\n text-decoration: none;\n\n &__image {\n width: 100%;\n object-fit: contain;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nIn this example banned data is passed as a prop.\n\n_Here you can see how the `Banner` component is rendered._\n\n```vue\n<template>\n <Banner :banner=\"banner\" />\n</template>\n\n<script>\n import { Banner } from '@empathyco/x-components/search';\n export default {\n name: 'BannerDemo',\n components: {\n Banner\n },\n data() {\n return {\n banner: {\n modelName: 'Banner',\n id: 'banner-example',\n url: 'https://my-website.com/summer-shirts',\n image: 'https://my-website.com/images/summer-shirts.jpg',\n title: 'Trendy summer shirts'\n }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -17,6 +17,14 @@ var Banner = /** @class */ (function (_super) {
|
|
|
17
17
|
function Banner() {
|
|
18
18
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Emits the banner click event.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
Banner.prototype.emitClickEvent = function () {
|
|
26
|
+
this.$x.emit('UserClickedABanner', this.banner);
|
|
27
|
+
};
|
|
20
28
|
__decorate([
|
|
21
29
|
Prop({ required: true })
|
|
22
30
|
], Banner.prototype, "banner", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/search/components/banner.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\nimport { Banner as BannerModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { searchXModule } from '../x-module';\n/**\n * A banner result is just an item that has been inserted into the search results to advertise\n * something. Usually it is the first item in the grid or it can be placed in the middle of them\n * and fill the whole row where appears. It just contains a link to the banner content, an image\n * and a title.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(searchXModule)]\n})\nexport default class Banner extends Vue {\n /**\n * The banner data.\n *\n * @public\n */\n @Prop({ required: true })\n public banner!: BannerModel;\n}\n"],"names":[],"mappings":";;;;;;AAaA;;;;;;;;AAWA;IAAoC,0BAAG;IAAvC;;
|
|
1
|
+
{"version":3,"file":"banner.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/search/components/banner.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\nimport { Banner as BannerModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { searchXModule } from '../x-module';\n/**\n * A banner result is just an item that has been inserted into the search results to advertise\n * something. Usually it is the first item in the grid or it can be placed in the middle of them\n * and fill the whole row where appears. It just contains a link to the banner content, an image\n * and a title.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(searchXModule)]\n})\nexport default class Banner extends Vue {\n /**\n * The banner data.\n *\n * @public\n */\n @Prop({ required: true })\n public banner!: BannerModel;\n\n /**\n * Emits the banner click event.\n *\n * @internal\n */\n protected emitClickEvent(): void {\n this.$x.emit('UserClickedABanner', this.banner);\n }\n}\n"],"names":[],"mappings":";;;;;;AAaA;;;;;;;;AAWA;IAAoC,0BAAG;IAAvC;;KAiBC;;;;;;IAHW,+BAAc,GAAxB;QACE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;KACjD;IATD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0CACG;IAPT,MAAM;QAH1B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,MAAM,CAiB1B;IAAD,aAAC;CAAA,CAjBmC,GAAG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __extends, __spreadArray, __decorate } from 'tslib';
|
|
2
2
|
import { Prop, Component } from 'vue-property-decorator';
|
|
3
3
|
import { NoElement } from '../../../components/no-element.js';
|
|
4
|
-
import ItemsList from '../../../components/items-list.vue.js';
|
|
5
4
|
import { State } from '../../../components/decorators/store.decorators.js';
|
|
6
5
|
import { xComponentMixin } from '../../../components/x-component.mixin.js';
|
|
6
|
+
import ItemsList from '../../../components/items-list.vue.js';
|
|
7
7
|
import { ItemsListInjectionMixin } from '../../../components/items-list-injection.mixin.js';
|
|
8
8
|
import { searchXModule } from '../x-module.js';
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partial-query-button.vue.js","sources":["../../../../../src/x-modules/search/components/partial-query-button.vue"],"sourcesContent":["<template>\n <button\n @click=\"emitEvents\"\n class=\"x-button x-partial-query-button\"\n data-test=\"partial-query-button\"\n >\n <slot v-bind=\"{ query }\">{{ query }}</slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { searchXModule } from '../x-module';\n\n /**\n * A button that when pressed emits the {@link XEventsTypes.UserAcceptedAQuery}\n * and {@link SearchXEvents.UserClickedPartialQuery} events, expressing the user\n * intention to set the partial query.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule)]\n })\n export default class PartialQueryButton extends Vue {\n /**\n * The query property.\n *\n * @public\n */\n @Prop({ required: true })\n public query!: string;\n\n /**\n * Generates the {@link WireMetadata | event metadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n protected createEventMetadata(): Omit<WireMetadata, 'moduleName'> {\n return {\n target: this.$el as HTMLElement,\n feature: 'partial_result'\n };\n }\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n this.$x.emit('UserAcceptedAQuery', this.query, this.createEventMetadata());\n this.$x.emit('UserClickedPartialQuery', this.query, this.createEventMetadata());\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"partial-query-button.vue.js","sources":["../../../../../src/x-modules/search/components/partial-query-button.vue"],"sourcesContent":["<template>\n <button\n @click=\"emitEvents\"\n class=\"x-button x-partial-query-button\"\n data-test=\"partial-query-button\"\n >\n <slot v-bind=\"{ query }\">{{ query }}</slot>\n </button>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { WireMetadata } from '../../../wiring/wiring.types';\n import { searchXModule } from '../x-module';\n\n /**\n * A button that when pressed emits the {@link XEventsTypes.UserAcceptedAQuery}\n * and {@link SearchXEvents.UserClickedPartialQuery} events, expressing the user\n * intention to set the partial query.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule)]\n })\n export default class PartialQueryButton extends Vue {\n /**\n * The query property.\n *\n * @public\n */\n @Prop({ required: true })\n public query!: string;\n\n /**\n * Generates the {@link WireMetadata | event metadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n protected createEventMetadata(): Omit<WireMetadata, 'moduleName'> {\n return {\n target: this.$el as HTMLElement,\n feature: 'partial_result'\n };\n }\n\n /**\n * Emits events when the button is clicked.\n *\n * @public\n */\n protected emitEvents(): void {\n this.$x.emit('UserAcceptedAQuery', this.query, this.createEventMetadata());\n this.$x.emit('UserClickedPartialQuery', this.query, this.createEventMetadata());\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nA button that when pressed emits the {@link XEventsTypes.UserAcceptedAQuery} and {@link\nSearchXEvents.UserClickedPartialQuery} events, expressing the user intention to set the partial\nquery.\n\nThe component sets the current query as the new query and emits the `UserAcceptedAQuery` and\n`UserClickedPartialQuery` events when is clicked.\n\n```vue\n<template>\n <PartialQueryButton :query=\"query\" />\n</template>\n```\n\n### Customizing its contents\n\n```vue\n<template>\n <PartialQueryButton>\n <template #default=\"{ query }\">\n <span class=\"x-partial-query-button__text\">\n Set the Partial query as the new query: {{ query }}!\n </span>\n </template>\n </PartialQueryButton>\n</template>\n\n<script>\n import { PartialQueryButton } from '@empathyco/x-components/search';\n\n export default {\n components: {\n PartialQueryButton\n }\n };\n</script>\n```\n\n## Events\n\nThis component emits 2 different events:\n\n- UserAcceptedAQuery: the event is emitted after the user clicks the partial query. The event\n payload is the partial query data.\n- UserClickedPartialQuery: the event is emitted after the user clicks the partial query. The event\n payload is the partial query data.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -40,11 +40,11 @@ __vue_render__._withStripped = true;
|
|
|
40
40
|
/* style */
|
|
41
41
|
var __vue_inject_styles__ = function (inject) {
|
|
42
42
|
if (!inject) { return }
|
|
43
|
-
inject("data-v-
|
|
43
|
+
inject("data-v-91d70c6c_0", { source: ".x-partial-results[data-v-91d70c6c] {\n list-style-type: none;\n padding: 0;\n}", map: undefined, media: undefined });
|
|
44
44
|
|
|
45
45
|
};
|
|
46
46
|
/* scoped */
|
|
47
|
-
var __vue_scope_id__ = "data-v-
|
|
47
|
+
var __vue_scope_id__ = "data-v-91d70c6c";
|
|
48
48
|
/* module identifier */
|
|
49
49
|
var __vue_module_identifier__ = undefined;
|
|
50
50
|
/* functional template */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partial-results-list.vue.js","sources":["../../../../../src/x-modules/search/components/partial-results-list.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"partialResults.length\"\n class=\"x-list x-partial-results-list\"\n data-test=\"partial-results\"\n tag=\"ul\"\n >\n <li\n v-for=\"(partialResult, index) in partialResults\"\n :key=\"`${partialResult.query}-${index}`\"\n class=\"x-partial-result\"\n data-test=\"partial-result\"\n >\n <!--\n @slot (Required) Partial results item content\n @binding {Partial} partialResult - Partial Result data\n -->\n <slot :partialResult=\"partialResult\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { PartialResult } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { State } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { searchXModule } from '../x-module';\n\n /**\n * It renders a list of partial results from {@link SearchState.partialResults} by default.\n * It also provides the partial result slot to customize the item with the partial result bound.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule)]\n })\n export default class PartialResultsList extends Vue {\n /**\n * Animation component that will be used to animate the partial results.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n /**\n * The partials results from the search state.\n *\n * @public\n */\n @State('search', 'partialResults')\n public items!: PartialResult[];\n /**\n * Maximum number of partial results to show.\n *\n * @public\n */\n @Prop({ default: 5 })\n protected maxItemsToRender!: number;\n /**\n * A limited number of partial results.\n *\n * @returns The partial results sliced by the maxItemsToRender.\n *\n * @internal\n */\n protected get partialResults(): PartialResult[] {\n return this.items.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-partial-results {\n list-style-type: none;\n padding: 0;\n }\n</style>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"partial-results-list.vue.js","sources":["../../../../../src/x-modules/search/components/partial-results-list.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n v-if=\"partialResults.length\"\n class=\"x-list x-partial-results-list\"\n data-test=\"partial-results\"\n tag=\"ul\"\n >\n <li\n v-for=\"(partialResult, index) in partialResults\"\n :key=\"`${partialResult.query}-${index}`\"\n class=\"x-partial-result\"\n data-test=\"partial-result\"\n >\n <!--\n @slot (Required) Partial results item content\n @binding {Partial} partialResult - Partial Result data\n -->\n <slot :partialResult=\"partialResult\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { PartialResult } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { State } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { searchXModule } from '../x-module';\n\n /**\n * It renders a list of partial results from {@link SearchState.partialResults} by default.\n * It also provides the partial result slot to customize the item with the partial result bound.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule)]\n })\n export default class PartialResultsList extends Vue {\n /**\n * Animation component that will be used to animate the partial results.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n /**\n * The partials results from the search state.\n *\n * @public\n */\n @State('search', 'partialResults')\n public items!: PartialResult[];\n /**\n * Maximum number of partial results to show.\n *\n * @public\n */\n @Prop({ default: 5 })\n protected maxItemsToRender!: number;\n /**\n * A limited number of partial results.\n *\n * @returns The partial results sliced by the maxItemsToRender.\n *\n * @internal\n */\n protected get partialResults(): PartialResult[] {\n return this.items.slice(0, this.maxItemsToRender);\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-partial-results {\n list-style-type: none;\n padding: 0;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component loops through an array of partials an exposed a slot to use customize each partial.\n\n### Basic example\n\nIt renders a list of partial results using the default slot:\n\n```vue\n<template>\n <PartialResultsList>\n <template #default=\"{ partialResult }\">\n <ResultsList :results=\"partialResult.results\" />\n </template>\n </PartialResultsList>\n</template>\n```\n\n### Configuring the number of partials\n\nIt sets the maximum partials to show to 3.\n\n```vue\n<template>\n <PartialResultsList :maxItemsToRender=\"3\">\n <template #default=\"{ partialResult }\">\n <ResultsList :results=\"partialResult.results\" />\n </template>\n </PartialResultsList>\n</template>\n```\n\n### Rendering usage\n\nIt renders a list of partial results using the default slot. It will show the query, the partial\nresults and a button to update the query with the partial one.\n\n```vue\n<template>\n <PartialResultsList>\n <template #default=\"{ partialResult }\">\n <span>{{ partialResult.query }}</span>\n <BaseGrid :columns=\"4\" :items=\"partialResult.results\">\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n <template #default=\"{ item }\">\n <BaseResultImage :result=\"item\" />\n <span class=\"x-result__title\">{{ item.name }}</span>\n </template>\n </BaseResultLink>\n </template>\n </BaseGrid>\n <PartialQueryButton :query=\"partialResult.query\">\n <template #default=\"{ query }\">Ver todos {{ query }}</template>\n </PartialQueryButton>\n </template>\n </PartialResultsList>\n</template>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -15,6 +15,7 @@ var __vue_render__ = function () {
|
|
|
15
15
|
{
|
|
16
16
|
staticClass: "x-promoted",
|
|
17
17
|
attrs: { href: _vm.promoted.url, "data-test": "promoted" },
|
|
18
|
+
on: { click: _vm.emitClickEvent },
|
|
18
19
|
},
|
|
19
20
|
[
|
|
20
21
|
_c("img", {
|
|
@@ -32,7 +33,7 @@ __vue_render__._withStripped = true;
|
|
|
32
33
|
/* style */
|
|
33
34
|
var __vue_inject_styles__ = function (inject) {
|
|
34
35
|
if (!inject) { return }
|
|
35
|
-
inject("data-v-
|
|
36
|
+
inject("data-v-344a5de2_0", { source: ".x-promoted {\n display: flex;\n flex-flow: column nowrap;\n text-decoration: none;\n}\n.x-promoted__image {\n width: 100%;\n object-fit: contain;\n}", map: undefined, media: undefined });
|
|
36
37
|
|
|
37
38
|
};
|
|
38
39
|
/* scoped */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promoted.vue.js","sources":["../../../../../src/x-modules/search/components/promoted.vue"],"sourcesContent":["<template>\n <a :href=\"promoted.url\" class=\"x-promoted\" data-test=\"promoted\">\n <img :src=\"promoted.image\" class=\"x-promoted__image\" alt=\"\" />\n <h2 class=\"x-promoted__title\">{{ promoted.title }}</h2>\n </a>\n</template>\n\n<script lang=\"ts\">\n import { Promoted as PromotedModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { searchXModule } from '../x-module';\n\n /**\n * A promoted result is just an item that has been inserted into the search results to advertise\n * something. Usually it is one of the first items in the grid, and has the same shape as a\n * result. It just contains a link to the promoted content, an image, and a title.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule)]\n })\n export default class Promoted extends Vue {\n /**\n * The promoted data.\n *\n * @public\n */\n @Prop({ required: true })\n public promoted!: PromotedModel;\n }\n</script>\n\n<style lang=\"scss\">\n .x-promoted {\n display: flex;\n flex-flow: column nowrap;\n text-decoration: none;\n\n &__image {\n width: 100%;\n object-fit: contain;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nIn this example promoted data is passed as a prop.\n\n_Here you can see how the `Promoted` component is rendered._\n\n```vue\n<template>\n <Promoted :promoted=\"promoted\" />\n</template>\n\n<script>\n import { Promoted } from '@empathyco/x-components/search';\n\n export default {\n name: 'PromotedDemo',\n components: {\n Promoted\n },\n data() {\n return {\n promoted: {\n modelName: 'Promoted',\n id: 'promoted-example',\n url: 'https://my-website.com/summer-shirts',\n image: 'https://my-website.com/images/summer-shirts.jpg',\n title: 'Trendy summer shirts'\n }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA
|
|
1
|
+
{"version":3,"file":"promoted.vue.js","sources":["../../../../../src/x-modules/search/components/promoted.vue"],"sourcesContent":["<template>\n <a @click=\"emitClickEvent\" :href=\"promoted.url\" class=\"x-promoted\" data-test=\"promoted\">\n <img :src=\"promoted.image\" class=\"x-promoted__image\" alt=\"\" />\n <h2 class=\"x-promoted__title\">{{ promoted.title }}</h2>\n </a>\n</template>\n\n<script lang=\"ts\">\n import { Promoted as PromotedModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { searchXModule } from '../x-module';\n\n /**\n * A promoted result is just an item that has been inserted into the search results to advertise\n * something. Usually it is one of the first items in the grid, and has the same shape as a\n * result. It just contains a link to the promoted content, an image, and a title.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(searchXModule)]\n })\n export default class Promoted extends Vue {\n /**\n * The promoted data.\n *\n * @public\n */\n @Prop({ required: true })\n public promoted!: PromotedModel;\n\n /**\n * Emits the promoted click event.\n *\n * @internal\n */\n protected emitClickEvent(): void {\n this.$x.emit('UserClickedAPromoted', this.promoted);\n }\n }\n</script>\n\n<style lang=\"scss\">\n .x-promoted {\n display: flex;\n flex-flow: column nowrap;\n text-decoration: none;\n\n &__image {\n width: 100%;\n object-fit: contain;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component doesn't emit events.\n\n## See it in action\n\nIn this example promoted data is passed as a prop.\n\n_Here you can see how the `Promoted` component is rendered._\n\n```vue\n<template>\n <Promoted :promoted=\"promoted\" />\n</template>\n\n<script>\n import { Promoted } from '@empathyco/x-components/search';\n\n export default {\n name: 'PromotedDemo',\n components: {\n Promoted\n },\n data() {\n return {\n promoted: {\n modelName: 'Promoted',\n id: 'promoted-example',\n url: 'https://my-website.com/summer-shirts',\n image: 'https://my-website.com/images/summer-shirts.jpg',\n title: 'Trendy summer shirts'\n }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|