@empathyco/x-components 3.0.0-alpha.31 → 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 +132 -0
- package/core/index.js +26 -22
- package/core/index.js.map +1 -1
- package/docs/API-reference/api/x-adapter.empathyrelatedtag.md +1 -0
- package/docs/API-reference/api/x-adapter.empathyrelatedtag.source.md +11 -0
- 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.defaultsessionservice.clearsessionid.md +2 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.getsessionid.md +4 -0
- package/docs/API-reference/api/x-components.defaultsessionservice.md +3 -3
- package/docs/API-reference/api/x-components.defaultsessionservice.session_id_key.md +3 -1
- package/docs/API-reference/api/x-components.featurelocation.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.globalxbus.created.md +15 -0
- package/docs/API-reference/api/x-components.globalxbus.md +21 -0
- 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 +16 -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.relatedtag.highlightcurated.md +13 -0
- package/docs/API-reference/api/x-components.relatedtag.md +1 -0
- package/docs/API-reference/api/x-components.relatedtags.highlightcurated.md +13 -0
- 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.snippetcallbacks.md +15 -0
- package/docs/API-reference/api/x-components.snippetconfig.callbacks.md +13 -0
- package/docs/API-reference/api/x-components.snippetconfig.isspa.md +13 -0
- package/docs/API-reference/api/x-components.snippetconfig.md +2 -0
- package/docs/API-reference/api/x-components.tagging.activeconsent.md +18 -0
- package/docs/API-reference/api/x-components.tagging.consent.md +13 -0
- package/docs/API-reference/api/x-components.tagging.md +28 -0
- package/docs/API-reference/api/x-components.tagging.render.md +15 -0
- package/docs/API-reference/api/x-components.tagicon.md +11 -0
- 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.xeventlisteners.md +17 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +1 -1
- package/docs/API-reference/api/x-components.xeventstypes.snippetcallbackexecuted.md +16 -0
- package/docs/API-reference/api/x-components.xinstaller.md +1 -1
- package/docs/API-reference/api/x-types.relatedtag.iscurated.md +13 -0
- package/docs/API-reference/api/x-types.relatedtag.md +1 -0
- package/docs/API-reference/components/common/animations/x-components.animate-width.md +6 -7
- package/docs/API-reference/components/common/animations/x-components.collapse-from-top.md +7 -8
- package/docs/API-reference/components/common/animations/x-components.collapse-height.md +8 -9
- package/docs/API-reference/components/common/animations/x-components.collapse-width.md +8 -9
- package/docs/API-reference/components/common/animations/x-components.cross-fade.md +7 -8
- package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +7 -8
- package/docs/API-reference/components/common/animations/x-components.staggered-fade-and-slide.md +7 -8
- package/docs/API-reference/components/common/{x-components.staggering-transition-group.md → animations/x-components.staggering-transition-group.md} +8 -9
- package/docs/API-reference/components/common/animations/x-components.translate-from-left.md +7 -8
- package/docs/API-reference/components/common/animations/x-components.translate-from-right.md +7 -8
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +12 -13
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +11 -12
- package/docs/API-reference/components/common/currency/x-components.base-currency.md +9 -12
- package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +9 -10
- package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +11 -12
- package/docs/API-reference/components/common/icons/x-components.arrow.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.bag.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.bar-code.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.barcode-tiny.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.cart.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.check-tiny.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.check.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.checkbox-card-selected.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.checkbox-card-unselected.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.checkbox-selected.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.checkbox-unselected.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.chevron-down.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.chevron-left.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.chevron-right.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.chevron-tiny-down.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.chevron-tiny-left.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.chevron-tiny-right.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.chevron-tiny-up.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.chevron-up.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.cross-tiny.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.cross.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.filters.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.grid-1-col.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.grid-2-col.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.hide.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.history-tiny.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.history.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.menu.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.minus-tiny.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.minus.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.nq-1.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.nq-2.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.nq-3.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.nq-4.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.plus.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.search-tiny.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.search.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.show.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.star.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.tag.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.trash-open.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.trash.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.trending-tiny.md +4 -5
- package/docs/API-reference/components/common/icons/x-components.trending.md +3 -4
- package/docs/API-reference/components/common/icons/x-components.user.md +3 -4
- package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +8 -9
- package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +8 -9
- package/docs/API-reference/components/common/layouts/x-components.single-column-layout.md +6 -5
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +10 -11
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +10 -11
- package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +15 -16
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +9 -10
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +9 -10
- package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +11 -12
- package/docs/API-reference/components/common/modals/x-components.base-modal.md +7 -8
- package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +11 -12
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +10 -11
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +10 -11
- package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +8 -9
- package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +9 -10
- package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +10 -11
- package/docs/API-reference/components/common/result/x-components.base-result-fallback-image.md +4 -5
- package/docs/API-reference/components/common/result/x-components.base-result-image.md +9 -10
- package/docs/API-reference/components/common/result/x-components.base-result-link.md +15 -24
- package/docs/API-reference/components/common/result/x-components.base-result-placeholder-image.md +4 -5
- package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +9 -10
- package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +8 -9
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +10 -11
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +7 -8
- package/docs/API-reference/components/common/x-components.auto-progress-bar.md +5 -6
- package/docs/API-reference/components/common/x-components.base-dropdown.md +8 -9
- package/docs/API-reference/components/common/x-components.base-event-button.md +11 -12
- package/docs/API-reference/components/common/x-components.base-grid.md +15 -16
- package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +10 -11
- package/docs/API-reference/components/common/x-components.base-rating.md +10 -11
- package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +10 -11
- package/docs/API-reference/components/common/x-components.global-x-bus.md +50 -0
- package/docs/API-reference/components/common/x-components.items-list.md +6 -5
- package/docs/API-reference/components/common/x-components.location-provider.md +6 -7
- package/docs/API-reference/components/common/x-components.sliding-panel.md +10 -11
- package/docs/API-reference/components/common/x-components.snippet-callbacks.md +36 -0
- package/docs/API-reference/components/device/x-components.device-detector.md +8 -9
- package/docs/API-reference/components/empathize/x-components.empathize.md +8 -9
- package/docs/API-reference/components/extra-params/x-components.extra-params.md +7 -8
- package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +9 -10
- package/docs/API-reference/components/extra-params/x-components.snippet-config-extra-params.md +6 -7
- package/docs/API-reference/components/facets/x-components.clear-filters.md +9 -10
- package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +10 -11
- package/docs/API-reference/components/facets/x-components.facets/facets.md +12 -13
- package/docs/API-reference/components/facets/x-components.filters/all-filter.md +15 -16
- package/docs/API-reference/components/facets/x-components.filters/base-filter.md +12 -13
- package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +12 -13
- package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +9 -10
- package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +9 -10
- package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +12 -13
- package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +10 -11
- package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +11 -12
- package/docs/API-reference/components/facets/x-components.lists/filters-list.md +11 -12
- package/docs/API-reference/components/facets/x-components.lists/filters-search.md +9 -10
- package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +12 -13
- package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +11 -12
- package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +11 -12
- package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +11 -12
- package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +10 -11
- package/docs/API-reference/components/history-queries/x-components.history-queries.md +10 -11
- package/docs/API-reference/components/history-queries/x-components.history-query.md +11 -12
- package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +10 -11
- package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +9 -10
- package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +10 -11
- package/docs/API-reference/components/next-queries/x-components.next-queries-list.md +7 -8
- package/docs/API-reference/components/next-queries/x-components.next-queries.md +14 -15
- package/docs/API-reference/components/next-queries/x-components.next-query.md +11 -12
- package/docs/API-reference/components/popular-searches/x-components.popular-search.md +11 -12
- package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +13 -14
- package/docs/API-reference/components/query-suggestions/x-components.query-suggestion.md +8 -9
- package/docs/API-reference/components/query-suggestions/x-components.query-suggestions.md +8 -9
- package/docs/API-reference/components/recommendations/x-components.recommendations.md +14 -15
- package/docs/API-reference/components/related-tags/x-components.related-tag.md +19 -17
- package/docs/API-reference/components/related-tags/x-components.related-tags.md +19 -19
- package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +7 -8
- package/docs/API-reference/components/scroll/x-components.main-scroll.md +7 -8
- package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +9 -10
- package/docs/API-reference/components/scroll/x-components.scroll.md +25 -30
- package/docs/API-reference/components/scroll/x-components.window-scroll.md +13 -16
- package/docs/API-reference/components/search/x-components.banner.md +8 -9
- package/docs/API-reference/components/search/x-components.banners-list.md +7 -8
- package/docs/API-reference/components/search/x-components.partial-query-button.md +11 -12
- package/docs/API-reference/components/search/x-components.partial-results-list.md +11 -12
- package/docs/API-reference/components/search/x-components.promoted.md +7 -8
- package/docs/API-reference/components/search/x-components.promoteds-list.md +7 -8
- package/docs/API-reference/components/search/x-components.redirection.md +8 -9
- package/docs/API-reference/components/search/x-components.results-list.md +7 -8
- package/docs/API-reference/components/search/x-components.sort-dropdown.md +8 -9
- package/docs/API-reference/components/search/x-components.sort-list.md +8 -9
- package/docs/API-reference/components/search/x-components.spellcheck-button.md +11 -12
- package/docs/API-reference/components/search/x-components.spellcheck.md +11 -12
- package/docs/API-reference/components/search-box/x-components.clear-search-input.md +6 -7
- package/docs/API-reference/components/search-box/x-components.search-button.md +6 -7
- package/docs/API-reference/components/search-box/x-components.search-input.md +7 -8
- package/docs/API-reference/components/tagging/x-components.tagging.md +8 -5
- package/docs/API-reference/components/url/x-components.url-handler.md +7 -8
- package/docs/build-search-ui/README.md +0 -5
- package/docs/build-search-ui/web-archetype-development-guide.md +178 -0
- package/docs/build-search-ui/web-archetype-integration-guide.md +146 -143
- package/docs/build-search-ui/web-use-x-components-guide.md +0 -5
- package/docs/build-search-ui/web-x-components-integration-guide.md +3 -8
- package/docs/build-search-ui/x-architecture/README.md +0 -5
- package/js/components/animations/animate-width.vue.js +3 -3
- package/js/components/animations/animate-width.vue.js.map +1 -1
- package/js/components/animations/collapse-from-top.vue.js +3 -3
- package/js/components/animations/collapse-from-top.vue.js.map +1 -1
- package/js/components/animations/collapse-height.vue.js +5 -5
- package/js/components/animations/collapse-height.vue.js.map +1 -1
- package/js/components/animations/collapse-width.vue.js +5 -5
- package/js/components/animations/collapse-width.vue.js.map +1 -1
- package/js/components/animations/cross-fade.vue.js +3 -3
- package/js/components/animations/cross-fade.vue.js.map +1 -1
- package/js/components/animations/fade-and-slide.vue.js +4 -4
- package/js/components/animations/fade-and-slide.vue.js.map +1 -1
- package/js/components/animations/staggered-fade-and-slide.vue.js +4 -4
- 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 +3 -3
- package/js/components/animations/translate-from-left.vue.js.map +1 -1
- package/js/components/animations/translate-from-right.vue.js +3 -3
- package/js/components/animations/translate-from-right.vue.js.map +1 -1
- package/js/components/auto-progress-bar.vue.js +4 -5
- package/js/components/auto-progress-bar.vue.js.map +1 -1
- package/js/components/base-dropdown.vue.js +35 -47
- package/js/components/base-dropdown.vue.js.map +1 -1
- package/js/components/base-event-button.vue.js +1 -1
- package/js/components/base-event-button.vue.js.map +1 -1
- package/js/components/base-grid.vue.js +9 -11
- package/js/components/base-grid.vue.js.map +1 -1
- package/js/components/base-keyboard-navigation.vue.js +7 -10
- package/js/components/base-keyboard-navigation.vue.js.map +1 -1
- package/js/components/base-rating.vue.js +21 -22
- package/js/components/base-rating.vue.js.map +1 -1
- package/js/components/base-variable-column-grid.vue.js +6 -7
- package/js/components/base-variable-column-grid.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-dropdown.vue.js +11 -14
- package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue.js +11 -13
- package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
- package/js/components/currency/base-currency.vue.js +2 -3
- package/js/components/currency/base-currency.vue.js.map +1 -1
- package/js/components/filters/labels/base-price-filter-label.vue.js.map +1 -1
- package/js/components/filters/labels/base-rating-filter-label.vue.js +7 -8
- package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
- package/js/components/global-x-bus.vue.js +39 -0
- package/js/components/global-x-bus.vue.js.map +1 -0
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js +47 -0
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/arrow.vue.js +4 -6
- package/js/components/icons/arrow.vue.js.map +1 -1
- package/js/components/icons/bag.vue.js +8 -12
- package/js/components/icons/bag.vue.js.map +1 -1
- package/js/components/icons/bar-code.vue.js +6 -9
- package/js/components/icons/bar-code.vue.js.map +1 -1
- package/js/components/icons/barcode-tiny.vue.js +6 -9
- package/js/components/icons/barcode-tiny.vue.js.map +1 -1
- package/js/components/icons/cart.vue.js +10 -13
- package/js/components/icons/cart.vue.js.map +1 -1
- package/js/components/icons/check-tiny.vue.js +4 -6
- package/js/components/icons/check-tiny.vue.js.map +1 -1
- package/js/components/icons/check.vue.js +4 -6
- package/js/components/icons/check.vue.js.map +1 -1
- package/js/components/icons/checkbox-card-selected.vue.js +5 -7
- package/js/components/icons/checkbox-card-selected.vue.js.map +1 -1
- package/js/components/icons/checkbox-card-unselected.vue.js +5 -7
- package/js/components/icons/checkbox-card-unselected.vue.js.map +1 -1
- package/js/components/icons/checkbox-selected.vue.js +5 -7
- package/js/components/icons/checkbox-selected.vue.js.map +1 -1
- package/js/components/icons/checkbox-unselected.vue.js +6 -6
- package/js/components/icons/chevron-down.vue.js +6 -8
- package/js/components/icons/chevron-down.vue.js.map +1 -1
- package/js/components/icons/chevron-left.vue.js +6 -8
- package/js/components/icons/chevron-left.vue.js.map +1 -1
- package/js/components/icons/chevron-right.vue.js +4 -6
- package/js/components/icons/chevron-right.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-down.vue.js +6 -8
- package/js/components/icons/chevron-tiny-down.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-left.vue.js +6 -8
- package/js/components/icons/chevron-tiny-left.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-right.vue.js +6 -8
- package/js/components/icons/chevron-tiny-right.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-up.vue.js +6 -8
- package/js/components/icons/chevron-tiny-up.vue.js.map +1 -1
- package/js/components/icons/chevron-up.vue.js +6 -8
- package/js/components/icons/chevron-up.vue.js.map +1 -1
- package/js/components/icons/cross-tiny.vue.js +4 -6
- package/js/components/icons/cross-tiny.vue.js.map +1 -1
- package/js/components/icons/cross.vue.js +4 -6
- package/js/components/icons/cross.vue.js.map +1 -1
- package/js/components/icons/filters.vue.js +10 -15
- package/js/components/icons/filters.vue.js.map +1 -1
- package/js/components/icons/grid-1-col.vue.js +6 -9
- package/js/components/icons/grid-1-col.vue.js.map +1 -1
- package/js/components/icons/grid-2-col.vue.js +8 -10
- package/js/components/icons/grid-2-col.vue.js.map +1 -1
- package/js/components/icons/hide.vue.js +10 -15
- package/js/components/icons/hide.vue.js.map +1 -1
- package/js/components/icons/history-tiny.vue.js +9 -12
- package/js/components/icons/history-tiny.vue.js.map +1 -1
- package/js/components/icons/history.vue.js +9 -12
- package/js/components/icons/history.vue.js.map +1 -1
- package/js/components/icons/menu.vue.js +6 -8
- package/js/components/icons/menu.vue.js.map +1 -1
- package/js/components/icons/minus-tiny.vue.js +4 -6
- package/js/components/icons/minus-tiny.vue.js.map +1 -1
- package/js/components/icons/minus.vue.js +4 -6
- package/js/components/icons/minus.vue.js.map +1 -1
- package/js/components/icons/nq-1.vue.js +4 -6
- package/js/components/icons/nq-1.vue.js.map +1 -1
- package/js/components/icons/nq-2.vue.js +4 -6
- package/js/components/icons/nq-2.vue.js.map +1 -1
- package/js/components/icons/nq-3.vue.js +6 -8
- package/js/components/icons/nq-3.vue.js.map +1 -1
- package/js/components/icons/nq-4.vue.js +9 -12
- package/js/components/icons/nq-4.vue.js.map +1 -1
- package/js/components/icons/plus.vue.js +4 -6
- package/js/components/icons/plus.vue.js.map +1 -1
- package/js/components/icons/search-tiny.vue.js +6 -9
- package/js/components/icons/search-tiny.vue.js.map +1 -1
- package/js/components/icons/search.vue.js +6 -8
- package/js/components/icons/search.vue.js.map +1 -1
- package/js/components/icons/show.vue.js +7 -10
- package/js/components/icons/show.vue.js.map +1 -1
- package/js/components/icons/star.vue.js +6 -9
- package/js/components/icons/star.vue.js.map +1 -1
- package/js/components/icons/tag.vue.js +59 -0
- package/js/components/icons/tag.vue.js.map +1 -0
- package/js/components/icons/tag.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/tag.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/trash-open.vue.js +12 -15
- package/js/components/icons/trash-open.vue.js.map +1 -1
- package/js/components/icons/trash.vue.js +8 -11
- package/js/components/icons/trash.vue.js.map +1 -1
- package/js/components/icons/trending-tiny.vue.js +8 -10
- package/js/components/icons/trending-tiny.vue.js.map +1 -1
- package/js/components/icons/trending.vue.js +8 -10
- package/js/components/icons/trending.vue.js.map +1 -1
- package/js/components/icons/user.vue.js +6 -9
- package/js/components/icons/user.vue.js.map +1 -1
- package/js/components/items-list.vue.js +6 -7
- package/js/components/items-list.vue.js.map +1 -1
- package/js/components/layouts/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 +57 -91
- 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.js +39 -67
- package/js/components/layouts/single-column-layout.vue.js.map +1 -1
- package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue=script.js +1 -1
- package/js/components/modals/base-events-modal-close.vue.js +2 -2
- package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-open.vue.js +2 -2
- package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-events-modal.vue.js +3 -3
- package/js/components/modals/base-events-modal.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-close.vue.js +2 -2
- package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-open.vue.js +2 -2
- package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-id-modal.vue.js +3 -3
- package/js/components/modals/base-id-modal.vue.js.map +1 -1
- package/js/components/modals/base-modal.vue.js +11 -13
- package/js/components/modals/base-modal.vue.js.map +1 -1
- package/js/components/panels/base-header-toggle-panel.vue.js +7 -9
- package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue.js +2 -2
- package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel.vue.js +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 +3 -4
- package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue.js +2 -2
- package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
- package/js/components/result/base-result-current-price.vue.js +6 -8
- package/js/components/result/base-result-current-price.vue.js.map +1 -1
- package/js/components/result/base-result-fallback-image.vue.js +7 -9
- package/js/components/result/base-result-fallback-image.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +11 -14
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-link.vue.js +8 -8
- 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-placeholder-image.vue.js +7 -9
- package/js/components/result/base-result-placeholder-image.vue.js.map +1 -1
- package/js/components/result/base-result-previous-price.vue.js +7 -9
- package/js/components/result/base-result-previous-price.vue.js.map +1 -1
- package/js/components/scroll/base-scroll.vue.js +4 -4
- package/js/components/scroll/base-scroll.vue.js.map +1 -1
- package/js/components/sliding-panel.vue.js +13 -16
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/snippet-callbacks.vue.js +47 -0
- package/js/components/snippet-callbacks.vue.js.map +1 -0
- package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js +58 -0
- package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/suggestions/base-suggestion.vue.js +6 -8
- package/js/components/suggestions/base-suggestion.vue.js.map +1 -1
- package/js/components/suggestions/base-suggestions.vue.js +8 -9
- 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 +35 -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/utils/origin.js +5 -3
- package/js/utils/origin.js.map +1 -1
- package/js/utils/storage.js +2 -2
- package/js/utils/storage.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/device/components/device-detector.vue.js +2 -2
- package/js/x-modules/empathize/components/empathize.vue.js +5 -6
- package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
- package/js/x-modules/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 +16 -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 +3 -4
- package/js/x-modules/extra-params/components/renderless-extra-param.vue.js.map +1 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +16 -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 +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 +25 -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 +6 -8
- package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +16 -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 +20 -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 +12 -13
- package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue.js +5 -6
- package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +16 -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 +5 -6
- package/js/x-modules/facets/components/filters/base-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +16 -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 +20 -24
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +29 -38
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +16 -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 +5 -6
- package/js/x-modules/facets/components/filters/number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +16 -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 +16 -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 +13 -17
- package/js/x-modules/facets/components/filters/simple-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +16 -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 +16 -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 +6 -6
- 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 +16 -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 +10 -12
- 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 +16 -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 +14 -20
- package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue.js +3 -4
- package/js/x-modules/facets/components/lists/selected-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +16 -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 +12 -18
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js +16 -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 +16 -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 +5 -6
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue.js +19 -25
- package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js +13 -17
- 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 +2 -2
- 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 +2 -2
- 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 +4 -4
- package/js/x-modules/identifier-results/components/identifier-results.vue.js.map +1 -1
- package/js/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.js +4 -2
- package/js/x-modules/identifier-results/store/actions/fetch-and-save-identifier-results.action.js.map +1 -1
- package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js +2 -3
- package/js/x-modules/identifier-results/store/getters/identifier-results-request.getter.js.map +1 -1
- package/js/x-modules/identifier-results/wiring.js +3 -2
- package/js/x-modules/identifier-results/wiring.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries-list.vue.js +9 -12
- package/js/x-modules/next-queries/components/next-queries-list.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js +15 -20
- package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js +8 -10
- package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue.js +8 -10
- package/js/x-modules/popular-searches/components/popular-search.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-search.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue.js +15 -20
- package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +9 -11
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +15 -20
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
- package/js/x-modules/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 +11 -14
- package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue.js +11 -8
- package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js +20 -0
- package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tags.vue.js +28 -21
- package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tags.vue_rollup-plugin-vue=script.js +3 -0
- package/js/x-modules/related-tags/components/related-tags.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue.js +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +18 -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 +3 -4
- 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 +18 -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 +4 -4
- 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 +18 -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 +6 -7
- 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.js +9 -12
- package/js/x-modules/search/components/banners-list.vue.js.map +1 -1
- package/js/x-modules/search/components/banners-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/partial-query-button.vue.js +4 -5
- 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 +6 -6
- package/js/x-modules/search/components/partial-results-list.vue.js.map +1 -1
- package/js/x-modules/search/components/promoted.vue.js +6 -7
- 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.js +9 -12
- package/js/x-modules/search/components/promoteds-list.vue.js.map +1 -1
- package/js/x-modules/search/components/promoteds-list.vue_rollup-plugin-vue=script.js +1 -1
- package/js/x-modules/search/components/redirection.vue.js +4 -5
- package/js/x-modules/search/components/redirection.vue.js.map +1 -1
- package/js/x-modules/search/components/redirection.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/results-list.vue.js +9 -12
- package/js/x-modules/search/components/results-list.vue.js.map +1 -1
- package/js/x-modules/search/components/results-list.vue_rollup-plugin-vue=script.js +2 -2
- package/js/x-modules/search/components/sort-dropdown.vue.js +13 -16
- package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue.js +10 -12
- 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 +16 -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 +16 -12
- package/js/x-modules/search/components/sort.mixin.js.map +1 -1
- package/js/x-modules/search/components/spellcheck-button.vue.js +4 -5
- package/js/x-modules/search/components/spellcheck-button.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue.js +4 -6
- package/js/x-modules/search/components/spellcheck.vue.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +16 -12
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js +7 -2
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.js.map +1 -1
- package/js/x-modules/search/store/getters/request.getter.js +2 -3
- package/js/x-modules/search/store/getters/request.getter.js.map +1 -1
- package/js/x-modules/search/wiring.js +4 -3
- package/js/x-modules/search/wiring.js.map +1 -1
- package/js/x-modules/search-box/components/clear-search-input.vue.js +5 -6
- package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-button.vue.js +4 -5
- package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue.js +9 -11
- package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js +7 -5
- package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/tagging/components/tagging.vue.js +39 -0
- package/js/x-modules/tagging/components/tagging.vue.js.map +1 -0
- package/js/x-modules/tagging/components/tagging.vue_rollup-plugin-vue=script.js +65 -0
- package/js/x-modules/tagging/components/tagging.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/x-modules/tagging/service/session.service.js +23 -6
- package/js/x-modules/tagging/service/session.service.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 +52 -5
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js +2 -2
- package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js +101 -5
- package/js/x-modules/url/components/url-handler.vue_rollup-plugin-vue=script.js.map +1 -1
- package/package.json +18 -16
- package/report/tsdoc-metadata.json +1 -1
- package/report/x-adapter.api.json +29 -3
- package/report/x-components.api.json +999 -231
- package/report/x-components.api.md +132 -45
- package/report/x-types.api.json +27 -1
- package/tagging/index.js +3 -2
- 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 +25 -0
- package/types/components/global-x-bus.vue.d.ts.map +1 -0
- package/types/components/icons/index.d.ts +1 -0
- package/types/components/icons/index.d.ts.map +1 -1
- package/types/components/icons/tag.vue.d.ts +3 -0
- package/types/components/icons/tag.vue.d.ts.map +1 -0
- package/types/components/index.d.ts +3 -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/snippet-callbacks.vue.d.ts +27 -0
- package/types/components/snippet-callbacks.vue.d.ts.map +1 -0
- 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/types/origin.d.ts +1 -1
- package/types/types/origin.d.ts.map +1 -1
- package/types/utils/origin.d.ts +3 -1
- package/types/utils/origin.d.ts.map +1 -1
- package/types/utils/storage.d.ts +1 -7
- package/types/utils/storage.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 +8 -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/api/api.types.d.ts +14 -0
- package/types/x-installer/api/api.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/store/actions/fetch-and-save-identifier-results.action.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/getters/identifier-results-request.getter.d.ts.map +1 -1
- package/types/x-modules/identifier-results/wiring.d.ts +2 -1
- package/types/x-modules/identifier-results/wiring.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/wiring.d.ts +1 -1
- package/types/x-modules/related-tags/components/related-tag.vue.d.ts +14 -0
- package/types/x-modules/related-tags/components/related-tag.vue.d.ts.map +1 -1
- package/types/x-modules/related-tags/components/related-tags.vue.d.ts +6 -0
- package/types/x-modules/related-tags/components/related-tags.vue.d.ts.map +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/search/store/actions/fetch-and-save-search-response.action.d.ts.map +1 -1
- package/types/x-modules/search/store/getters/request.getter.d.ts.map +1 -1
- package/types/x-modules/search/wiring.d.ts +2 -1
- package/types/x-modules/search/wiring.d.ts.map +1 -1
- package/types/x-modules/search-box/components/search-input.vue.d.ts +5 -2
- package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
- package/types/x-modules/tagging/components/tagging.vue.d.ts +47 -0
- package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -0
- package/types/x-modules/tagging/index.d.ts +1 -0
- package/types/x-modules/tagging/index.d.ts.map +1 -1
- package/types/x-modules/tagging/service/session.service.d.ts +18 -1
- package/types/x-modules/tagging/service/session.service.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/types/x-modules/url/components/url-handler.vue.d.ts +70 -7
- package/types/x-modules/url/components/url-handler.vue.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/docs/sidebar.json +0 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translate-from-left.vue.js","sources":["../../../../src/components/animations/translate-from-left.vue"],"sourcesContent":["<template>\n <transition v-on=\"$listeners\" appear name=\"x-translate-from-left-\">\n <!-- @slot (Required) to add content to the transition -->\n <slot />\n </transition>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component } from 'vue-property-decorator';\n\n /**\n * Renders a transition wrapping the element passed in the default slot and moving it to its\n * desired position.\n *\n * @public\n */\n @Component\n export default class TranslateFromLeft extends Vue {}\n</script>\n\n<style lang=\"scss\" scoped>\n .x-translate-from-left {\n &--enter-active,\n &--leave-active {\n transition: transform 0.3s ease-out;\n }\n\n &--leave-to,\n &--enter {\n transform: translateX(-100%);\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"translate-from-left.vue.js","sources":["../../../../src/components/animations/translate-from-left.vue"],"sourcesContent":["<template>\n <transition v-on=\"$listeners\" appear name=\"x-translate-from-left-\">\n <!-- @slot (Required) to add content to the transition -->\n <slot />\n </transition>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component } from 'vue-property-decorator';\n\n /**\n * Renders a transition wrapping the element passed in the default slot and moving it to its\n * desired position.\n *\n * @public\n */\n @Component\n export default class TranslateFromLeft extends Vue {}\n</script>\n\n<style lang=\"scss\" scoped>\n .x-translate-from-left {\n &--enter-active,\n &--leave-active {\n transition: transform 0.3s ease-out;\n }\n\n &--leave-to,\n &--enter {\n transform: translateX(-100%);\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Example\n\nThe `TranslateFromRight` component is intended to be used as animation to wrap an element with v-if\nor v-show and animate it. The animation translates the item from/to left 100%.\n\nWrapping a component:\n\n```vue\n<TranslateFromLeft>\n <ComponentOrElement v-if=\"open\"/>\n</TranslateFromLeft>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import script from './translate-from-right.vue_rollup-plugin-vue=script.js';
|
|
|
6
6
|
var __vue_script__ = script;
|
|
7
7
|
|
|
8
8
|
/* template */
|
|
9
|
-
var __vue_render__ = function() {
|
|
9
|
+
var __vue_render__ = function () {
|
|
10
10
|
var _vm = this;
|
|
11
11
|
var _h = _vm.$createElement;
|
|
12
12
|
var _c = _vm._self._c || _h;
|
|
@@ -26,11 +26,11 @@ __vue_render__._withStripped = true;
|
|
|
26
26
|
/* style */
|
|
27
27
|
var __vue_inject_styles__ = function (inject) {
|
|
28
28
|
if (!inject) { return }
|
|
29
|
-
inject("data-v-
|
|
29
|
+
inject("data-v-d9420f60_0", { source: ".x-translate-from-right--enter-active[data-v-d9420f60], .x-translate-from-right--leave-active[data-v-d9420f60] {\n transition: transform 0.3s ease-out;\n}\n.x-translate-from-right--leave-to[data-v-d9420f60], .x-translate-from-right--enter[data-v-d9420f60] {\n transform: translateX(100%);\n}", map: undefined, media: undefined });
|
|
30
30
|
|
|
31
31
|
};
|
|
32
32
|
/* scoped */
|
|
33
|
-
var __vue_scope_id__ = "data-v-
|
|
33
|
+
var __vue_scope_id__ = "data-v-d9420f60";
|
|
34
34
|
/* module identifier */
|
|
35
35
|
var __vue_module_identifier__ = undefined;
|
|
36
36
|
/* functional template */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translate-from-right.vue.js","sources":["../../../../src/components/animations/translate-from-right.vue"],"sourcesContent":["<template>\n <transition v-on=\"$listeners\" appear name=\"x-translate-from-right-\">\n <!-- @slot (Required) to add content to the transition -->\n <slot />\n </transition>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component } from 'vue-property-decorator';\n\n /**\n * Renders a transition wrapping the element passed in the default slot and moving it to its\n * desired position.\n *\n * @public\n */\n @Component\n export default class TranslateFromRight extends Vue {}\n</script>\n\n<style lang=\"scss\" scoped>\n .x-translate-from-right {\n &--enter-active,\n &--leave-active {\n transition: transform 0.3s ease-out;\n }\n\n &--leave-to,\n &--enter {\n transform: translateX(100%);\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"translate-from-right.vue.js","sources":["../../../../src/components/animations/translate-from-right.vue"],"sourcesContent":["<template>\n <transition v-on=\"$listeners\" appear name=\"x-translate-from-right-\">\n <!-- @slot (Required) to add content to the transition -->\n <slot />\n </transition>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component } from 'vue-property-decorator';\n\n /**\n * Renders a transition wrapping the element passed in the default slot and moving it to its\n * desired position.\n *\n * @public\n */\n @Component\n export default class TranslateFromRight extends Vue {}\n</script>\n\n<style lang=\"scss\" scoped>\n .x-translate-from-right {\n &--enter-active,\n &--leave-active {\n transition: transform 0.3s ease-out;\n }\n\n &--leave-to,\n &--enter {\n transform: translateX(100%);\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Example\n\nThe `TranslateFromRight` component is intended to be used as animation to wrap an element with v-if\nor v-show and animate it. The animation translates the item from/to right 100%.\n\nUsed wrapping a component:\n\n```vue\n<TranslateFromRight>\n <ComponentOrElement v-if=\"open\"/>\n</TranslateFromRight>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import script from './auto-progress-bar.vue_rollup-plugin-vue=script.js';
|
|
|
6
6
|
var __vue_script__ = script;
|
|
7
7
|
|
|
8
8
|
/* template */
|
|
9
|
-
var __vue_render__ = function() {
|
|
9
|
+
var __vue_render__ = function () {
|
|
10
10
|
var _vm = this;
|
|
11
11
|
var _h = _vm.$createElement;
|
|
12
12
|
var _c = _vm._self._c || _h;
|
|
@@ -15,15 +15,14 @@ var __vue_render__ = function() {
|
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
staticClass: "x-progress-bar",
|
|
18
|
-
attrs: { "data-test": "progress-bar", role: "progressbar" }
|
|
18
|
+
attrs: { "data-test": "progress-bar", role: "progressbar" },
|
|
19
19
|
},
|
|
20
20
|
[
|
|
21
21
|
_c("div", {
|
|
22
22
|
staticClass: "x-progress-bar__line",
|
|
23
23
|
style: _vm.cssStyles,
|
|
24
|
-
attrs: { "data-test": "progress-bar-line" }
|
|
25
|
-
})
|
|
26
|
-
]
|
|
24
|
+
attrs: { "data-test": "progress-bar-line" },
|
|
25
|
+
}) ]
|
|
27
26
|
)
|
|
28
27
|
: _vm._e()
|
|
29
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-progress-bar.vue.js","sources":["../../../src/components/auto-progress-bar.vue"],"sourcesContent":["<template>\n <div v-if=\"isLoading\" class=\"x-progress-bar\" data-test=\"progress-bar\" role=\"progressbar\">\n <div class=\"x-progress-bar__line\" :style=\"cssStyles\" data-test=\"progress-bar-line\"></div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n\n /**\n * An auto progress bar component.\n *\n * @public\n */\n @Component\n export default class AutoProgressBar extends Vue {\n /**\n * A boolean flag indicating if the bar is loading.\n *\n * @public\n */\n @Prop({ default: true })\n public isLoading!: boolean;\n\n /**\n * The duration in seconds of the progress bar.\n *\n * @public\n */\n @Prop({ default: 5 })\n public durationInSeconds!: number;\n\n /**\n * Computed property to calculate the animation's duration.\n *\n * @returns The CSS styles of the animation.\n *\n * @internal\n */\n protected get cssStyles(): Partial<CSSStyleDeclaration> {\n return { animationDuration: `${this.durationInSeconds}s` };\n }\n }\n</script>\n\n<style lang=\"scss\">\n .x-progress-bar {\n display: inline-block;\n overflow: hidden;\n background-color: var(--x-color-background-progress-bar-default, #b3b3b3);\n border-radius: var(--x-size-border-radius-progress-bar-default, 24px);\n\n &__line {\n height: var(--x-size-height-progress-bar-line-default, 4px);\n width: var(--x-size-width-progress-bar-line-default, 272px);\n background-color: var(--x-color-background-progress-bar-line-default, #1a1a1a);\n border-radius: var(--x-size-border-radius-progress-bar-default, 24px);\n animation: slide linear;\n transform-origin: left;\n }\n }\n @keyframes slide {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(0);\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## See it in action\n\nHere you have a basic example of how the auto progress bar is rendered.\n\n```vue\n<template>\n <AutoProgressBar :isLoading=\"isLoading\" :durationInSeconds=\"delayInSeconds\" />\n</template>\n\n<script>\n export default {\n name: 'AutoProgressBarDemo',\n data() {\n return {\n isLoading: true,\n durationInSeconds: 100\n };\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the auto progress bar has been set to do an animation for 5 seconds. There is a way\nto cancel the animation by sending the isLoading prop to false.\n\n```vue\n<template>\n <AutoProgressBar :durationInSeconds=\"5\" :isLoading=\"true\" />\n</template>\n\n<script>\n export default {\n name: 'AutoProgressBarDemo'\n };\n</script>\n```\n\n## Events\n\nThis component emits the following events:\n\n- `UserClickedARedirection` after the user clicks the redirection button.\n- `UserClickedAbortARedirection` after the user clicks the abort redirection button.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA
|
|
1
|
+
{"version":3,"file":"auto-progress-bar.vue.js","sources":["../../../src/components/auto-progress-bar.vue"],"sourcesContent":["<template>\n <div v-if=\"isLoading\" class=\"x-progress-bar\" data-test=\"progress-bar\" role=\"progressbar\">\n <div class=\"x-progress-bar__line\" :style=\"cssStyles\" data-test=\"progress-bar-line\"></div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n\n /**\n * An auto progress bar component.\n *\n * @public\n */\n @Component\n export default class AutoProgressBar extends Vue {\n /**\n * A boolean flag indicating if the bar is loading.\n *\n * @public\n */\n @Prop({ default: true })\n public isLoading!: boolean;\n\n /**\n * The duration in seconds of the progress bar.\n *\n * @public\n */\n @Prop({ default: 5 })\n public durationInSeconds!: number;\n\n /**\n * Computed property to calculate the animation's duration.\n *\n * @returns The CSS styles of the animation.\n *\n * @internal\n */\n protected get cssStyles(): Partial<CSSStyleDeclaration> {\n return { animationDuration: `${this.durationInSeconds}s` };\n }\n }\n</script>\n\n<style lang=\"scss\">\n .x-progress-bar {\n display: inline-block;\n overflow: hidden;\n background-color: var(--x-color-background-progress-bar-default, #b3b3b3);\n border-radius: var(--x-size-border-radius-progress-bar-default, 24px);\n\n &__line {\n height: var(--x-size-height-progress-bar-line-default, 4px);\n width: var(--x-size-width-progress-bar-line-default, 272px);\n background-color: var(--x-color-background-progress-bar-line-default, #1a1a1a);\n border-radius: var(--x-size-border-radius-progress-bar-default, 24px);\n animation: slide linear;\n transform-origin: left;\n }\n }\n @keyframes slide {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(0);\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## See it in action\n\nHere you have a basic example of how the auto progress bar is rendered.\n\n```vue\n<template>\n <AutoProgressBar :isLoading=\"isLoading\" :durationInSeconds=\"delayInSeconds\" />\n</template>\n\n<script>\n export default {\n name: 'AutoProgressBarDemo',\n data() {\n return {\n isLoading: true,\n durationInSeconds: 100\n };\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the auto progress bar has been set to do an animation for 5 seconds. There is a way\nto cancel the animation by sending the isLoading prop to false.\n\n```vue\n<template>\n <AutoProgressBar :durationInSeconds=\"5\" :isLoading=\"true\" />\n</template>\n\n<script>\n export default {\n name: 'AutoProgressBarDemo'\n };\n</script>\n```\n\n## Events\n\nThis component emits the following events:\n\n- `UserClickedARedirection` after the user clicks the redirection button.\n- `UserClickedAbortARedirection` after the user clicks the abort redirection button.\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import script from './base-dropdown.vue_rollup-plugin-vue=script.js';
|
|
|
6
6
|
var __vue_script__ = script;
|
|
7
7
|
|
|
8
8
|
/* template */
|
|
9
|
-
var __vue_render__ = function() {
|
|
9
|
+
var __vue_render__ = function () {
|
|
10
10
|
var _vm = this;
|
|
11
11
|
var _h = _vm.$createElement;
|
|
12
12
|
var _c = _vm._self._c || _h;
|
|
@@ -18,20 +18,19 @@ var __vue_render__ = function() {
|
|
|
18
18
|
on: {
|
|
19
19
|
keydown: [
|
|
20
20
|
_vm.updateSearchBuffer,
|
|
21
|
-
function($event) {
|
|
21
|
+
function ($event) {
|
|
22
22
|
if (
|
|
23
23
|
!$event.type.indexOf("key") &&
|
|
24
24
|
_vm._k($event.keyCode, "down", 40, $event.key, [
|
|
25
25
|
"Down",
|
|
26
|
-
"ArrowDown"
|
|
27
|
-
])
|
|
26
|
+
"ArrowDown" ])
|
|
28
27
|
) {
|
|
29
28
|
return null
|
|
30
29
|
}
|
|
31
30
|
$event.preventDefault();
|
|
32
31
|
return _vm.highlightNextItem.apply(null, arguments)
|
|
33
32
|
},
|
|
34
|
-
function($event) {
|
|
33
|
+
function ($event) {
|
|
35
34
|
if (
|
|
36
35
|
!$event.type.indexOf("key") &&
|
|
37
36
|
_vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])
|
|
@@ -40,9 +39,8 @@ var __vue_render__ = function() {
|
|
|
40
39
|
}
|
|
41
40
|
$event.preventDefault();
|
|
42
41
|
return _vm.highlightPreviousItem.apply(null, arguments)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}
|
|
42
|
+
} ],
|
|
43
|
+
},
|
|
46
44
|
},
|
|
47
45
|
[
|
|
48
46
|
_c(
|
|
@@ -52,43 +50,40 @@ var __vue_render__ = function() {
|
|
|
52
50
|
attrs: { "aria-haspopup": "listbox", "data-test": "dropdown-toggle" },
|
|
53
51
|
on: {
|
|
54
52
|
click: _vm.toggle,
|
|
55
|
-
keydown: function($event) {
|
|
53
|
+
keydown: function ($event) {
|
|
56
54
|
if (
|
|
57
55
|
!$event.type.indexOf("key") &&
|
|
58
56
|
_vm._k($event.keyCode, "up", 38, $event.key, [
|
|
59
57
|
"Up",
|
|
60
|
-
"ArrowUp"
|
|
61
|
-
]) &&
|
|
58
|
+
"ArrowUp" ]) &&
|
|
62
59
|
_vm._k($event.keyCode, "down", 40, $event.key, [
|
|
63
60
|
"Down",
|
|
64
|
-
"ArrowDown"
|
|
65
|
-
])
|
|
61
|
+
"ArrowDown" ])
|
|
66
62
|
) {
|
|
67
63
|
return null
|
|
68
64
|
}
|
|
69
65
|
$event.preventDefault();
|
|
70
66
|
$event.stopPropagation();
|
|
71
67
|
return _vm.open.apply(null, arguments)
|
|
72
|
-
}
|
|
73
|
-
}
|
|
68
|
+
},
|
|
69
|
+
},
|
|
74
70
|
},
|
|
75
71
|
[
|
|
76
72
|
_vm.$scopedSlots.toggle
|
|
77
73
|
? _vm._t(
|
|
78
74
|
"toggle",
|
|
79
|
-
function() {
|
|
75
|
+
function () {
|
|
80
76
|
return [_vm._v("\n " + _vm._s(_vm.value) + "\n ")]
|
|
81
77
|
},
|
|
82
78
|
{ isOpen: _vm.isOpen, item: _vm.value }
|
|
83
79
|
)
|
|
84
80
|
: _vm._t(
|
|
85
81
|
"item",
|
|
86
|
-
function() {
|
|
82
|
+
function () {
|
|
87
83
|
return [_vm._v(_vm._s(_vm.value))]
|
|
88
84
|
},
|
|
89
85
|
{ item: _vm.value }
|
|
90
|
-
)
|
|
91
|
-
],
|
|
86
|
+
) ],
|
|
92
87
|
2
|
|
93
88
|
),
|
|
94
89
|
_vm._v(" "),
|
|
@@ -100,11 +95,11 @@ var __vue_render__ = function() {
|
|
|
100
95
|
staticClass: "x-dropdown__items-list",
|
|
101
96
|
attrs: {
|
|
102
97
|
"aria-expanded": _vm.isOpen.toString(),
|
|
103
|
-
role: "listbox"
|
|
98
|
+
role: "listbox",
|
|
104
99
|
},
|
|
105
100
|
on: {
|
|
106
101
|
keydown: [
|
|
107
|
-
function($event) {
|
|
102
|
+
function ($event) {
|
|
108
103
|
if (
|
|
109
104
|
!$event.type.indexOf("key") &&
|
|
110
105
|
_vm._k(
|
|
@@ -119,19 +114,18 @@ var __vue_render__ = function() {
|
|
|
119
114
|
}
|
|
120
115
|
return _vm.highlightLastItem.apply(null, arguments)
|
|
121
116
|
},
|
|
122
|
-
function($event) {
|
|
117
|
+
function ($event) {
|
|
123
118
|
if (
|
|
124
119
|
!$event.type.indexOf("key") &&
|
|
125
120
|
_vm._k($event.keyCode, "esc", 27, $event.key, [
|
|
126
121
|
"Esc",
|
|
127
|
-
"Escape"
|
|
128
|
-
])
|
|
122
|
+
"Escape" ])
|
|
129
123
|
) {
|
|
130
124
|
return null
|
|
131
125
|
}
|
|
132
126
|
return _vm.close.apply(null, arguments)
|
|
133
127
|
},
|
|
134
|
-
function($event) {
|
|
128
|
+
function ($event) {
|
|
135
129
|
if (
|
|
136
130
|
!$event.type.indexOf("key") &&
|
|
137
131
|
_vm._k(
|
|
@@ -145,16 +139,15 @@ var __vue_render__ = function() {
|
|
|
145
139
|
return null
|
|
146
140
|
}
|
|
147
141
|
return _vm.highlightFirstItem.apply(null, arguments)
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
}
|
|
142
|
+
} ],
|
|
143
|
+
},
|
|
151
144
|
},
|
|
152
|
-
_vm._l(_vm.items, function(item, index) {
|
|
145
|
+
_vm._l(_vm.items, function (item, index) {
|
|
153
146
|
return _c(
|
|
154
147
|
"li",
|
|
155
148
|
{
|
|
156
149
|
key: item.id || item,
|
|
157
|
-
staticClass: "x-dropdown__list-item"
|
|
150
|
+
staticClass: "x-dropdown__list-item",
|
|
158
151
|
},
|
|
159
152
|
[
|
|
160
153
|
_c(
|
|
@@ -171,41 +164,36 @@ var __vue_render__ = function() {
|
|
|
171
164
|
"aria-current": (item === _vm.value).toString(),
|
|
172
165
|
"data-test": "dropdown-item",
|
|
173
166
|
role: "option",
|
|
174
|
-
tabindex: "-1"
|
|
167
|
+
tabindex: "-1",
|
|
175
168
|
},
|
|
176
169
|
on: {
|
|
177
|
-
click: function($event) {
|
|
170
|
+
click: function ($event) {
|
|
178
171
|
return _vm.emitSelectedItemChanged(item)
|
|
179
|
-
}
|
|
180
|
-
}
|
|
172
|
+
},
|
|
173
|
+
},
|
|
181
174
|
},
|
|
182
175
|
[
|
|
183
176
|
_vm._t(
|
|
184
177
|
"item",
|
|
185
|
-
function() {
|
|
178
|
+
function () {
|
|
186
179
|
return [
|
|
187
180
|
_vm._v(
|
|
188
181
|
"\n " + _vm._s(item) + "\n "
|
|
189
|
-
)
|
|
190
|
-
]
|
|
182
|
+
) ]
|
|
191
183
|
},
|
|
192
184
|
{
|
|
193
185
|
isHighlighted: index === _vm.highlightedItemIndex,
|
|
194
186
|
isSelected: item === _vm.value,
|
|
195
|
-
item: item
|
|
187
|
+
item: item,
|
|
196
188
|
}
|
|
197
|
-
)
|
|
198
|
-
],
|
|
189
|
+
) ],
|
|
199
190
|
2
|
|
200
|
-
)
|
|
201
|
-
]
|
|
191
|
+
) ]
|
|
202
192
|
)
|
|
203
193
|
}),
|
|
204
194
|
0
|
|
205
195
|
)
|
|
206
|
-
: _vm._e()
|
|
207
|
-
])
|
|
208
|
-
],
|
|
196
|
+
: _vm._e() ]) ],
|
|
209
197
|
1
|
|
210
198
|
)
|
|
211
199
|
};
|
|
@@ -215,11 +203,11 @@ __vue_render__._withStripped = true;
|
|
|
215
203
|
/* style */
|
|
216
204
|
var __vue_inject_styles__ = function (inject) {
|
|
217
205
|
if (!inject) { return }
|
|
218
|
-
inject("data-v-
|
|
206
|
+
inject("data-v-12a3cc4e_0", { source: ".x-dropdown[data-v-12a3cc4e] {\n position: relative;\n}\n.x-dropdown__items-list[data-v-12a3cc4e] {\n z-index: 1;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0;\n top: calc(100% + var(--x-size-gap-dropdown-default, 0));\n}", map: undefined, media: undefined });
|
|
219
207
|
|
|
220
208
|
};
|
|
221
209
|
/* scoped */
|
|
222
|
-
var __vue_scope_id__ = "data-v-
|
|
210
|
+
var __vue_scope_id__ = "data-v-12a3cc4e";
|
|
223
211
|
/* module identifier */
|
|
224
212
|
var __vue_module_identifier__ = undefined;
|
|
225
213
|
/* functional template */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-dropdown.vue.js","sources":["../../../src/components/base-dropdown.vue"],"sourcesContent":["<template>\n <div\n @keydown=\"updateSearchBuffer\"\n @keydown.down.prevent=\"highlightNextItem\"\n @keydown.up.prevent=\"highlightPreviousItem\"\n :class=\"dropdownCSSClasses\"\n class=\"x-dropdown\"\n >\n <button\n @click=\"toggle\"\n @keydown.up.down.prevent.stop=\"open\"\n aria-haspopup=\"listbox\"\n class=\"x-dropdown__toggle\"\n data-test=\"dropdown-toggle\"\n >\n <!--\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {string|number|Identifiable} item - The item data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n -->\n <slot v-if=\"$scopedSlots.toggle\" :isOpen=\"isOpen\" :item=\"value\" name=\"toggle\">\n {{ value }}\n </slot>\n <slot v-else :item=\"value\" name=\"item\">{{ value }}</slot>\n </button>\n\n <component :is=\"animation\">\n <ul\n v-if=\"isOpen\"\n @keydown.end=\"highlightLastItem\"\n @keydown.esc=\"close\"\n @keydown.home=\"highlightFirstItem\"\n :aria-expanded=\"isOpen.toString()\"\n class=\"x-dropdown__items-list\"\n role=\"listbox\"\n >\n <li v-for=\"(item, index) in items\" :key=\"item.id || item\" class=\"x-dropdown__list-item\">\n <button\n ref=\"itemButtons\"\n @click=\"emitSelectedItemChanged(item)\"\n :aria-selected=\"(index === highlightedItemIndex).toString()\"\n :aria-current=\"(item === value).toString()\"\n :class=\"itemsCSSClasses[index]\"\n class=\"x-dropdown__item\"\n data-test=\"dropdown-item\"\n role=\"option\"\n tabindex=\"-1\"\n >\n <!--\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {string|number|Identifiable} item - Item to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n -->\n <slot\n :isHighlighted=\"index === highlightedItemIndex\"\n :isSelected=\"item === value\"\n :item=\"item\"\n name=\"item\"\n >\n {{ item }}\n </slot>\n </button>\n </li>\n </ul>\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Identifiable } from '@empathyco/x-types';\n import { Component, Prop, Watch } from 'vue-property-decorator';\n import Vue from 'vue';\n import { normalizeString } from '../utils/normalize';\n import { isInRange } from '../utils/number';\n import { debounce } from '../utils/debounce';\n import { VueCSSClasses } from '../utils/types';\n import { NoElement } from './no-element';\n\n type DropdownItem = string | number | Identifiable;\n\n /**\n * Dropdown component that mimics a Select element behavior, but with the option\n * to customize the toggle button and each item contents.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n model: {\n event: 'change'\n }\n })\n export default class BaseDropdown extends Vue {\n /**\n * List of items to display.\n *\n * @public\n */\n @Prop({ required: true })\n public items!: DropdownItem[];\n\n /**\n * The selected item.\n *\n * @public\n */\n @Prop({ required: true })\n public value!: DropdownItem | null;\n\n /**\n * Animation component to use for expanding the dropdown. This is a single element animation,\n * so only `<transition>` components are allowed.\n *\n * @public\n */\n @Prop({ default: 'NoElement' })\n public animation!: typeof Vue | string;\n\n /**\n * Time to wait without receiving any keystroke before resetting the items search query.\n *\n * @public\n */\n @Prop({ default: 1000 })\n public searchTimeoutMs!: number;\n\n public $refs!: {\n /** Array containing the dropdown list buttons HTMLElements. */\n itemButtons: HTMLButtonElement[];\n };\n\n /**\n * Property to track whether the dropdown is expanded and displaying the full\n * list of items, or closed.\n *\n * @internal\n */\n protected isOpen = false;\n\n /**\n * Index of the element that has the focus in the list. -1 means no element has focus.\n *\n * @internal\n */\n protected highlightedItemIndex = -1;\n\n /**\n * String to search for the first element that starts with it.\n *\n * @internal\n */\n protected searchBuffer = '';\n\n /**\n * Resets the search buffer after a certain time has passed.\n *\n * @internal\n */\n protected restartResetSearchTimeout!: () => void;\n\n /**\n * Dynamic CSS classes to add to the dropdown root element.\n *\n * @returns An object containing the CSS classes to add to the dropdown root element.\n * @internal\n */\n protected get dropdownCSSClasses(): VueCSSClasses {\n return {\n 'x-dropdown--is-open': this.isOpen\n };\n }\n\n /**\n * Dynamic CSS classes to add to each one of the items.\n *\n * @returns An object containing the CSS classes to add to each item.\n * @internal\n */\n protected get itemsCSSClasses(): VueCSSClasses[] {\n return this.items.map((item, index) => {\n return {\n 'x-dropdown__item--is-selected': this.value === item,\n 'x-dropdown__item--is-highlighted': this.highlightedItemIndex === index\n };\n });\n }\n\n /**\n * If the dropdown is destroyed before removing the document listeners, it ensures that they\n * are removed too.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.removeDocumentCloseListeners();\n }\n\n /**\n * Opens the dropdown.\n *\n * @internal\n */\n protected open(): void {\n this.isOpen = true;\n }\n\n /**\n * Closes the dropdown.\n *\n * @internal\n */\n protected close(): void {\n this.isOpen = false;\n }\n\n /**\n * If the dropdown is opened it closes it. If it is closed it opens it.\n *\n * @internal\n */\n protected toggle(): void {\n this.isOpen = !this.isOpen;\n }\n\n /**\n * Emits the event that the selected item has changed.\n *\n * @param item - The new selected item.\n * @internal\n */\n protected emitSelectedItemChanged(item: DropdownItem): void {\n this.$emit('change', item);\n this.close();\n }\n\n /**\n * Highlights the item after the one that is currently highlighted.\n *\n * @internal\n */\n protected highlightNextItem(): void {\n this.open();\n this.highlightedItemIndex = (this.highlightedItemIndex + 1) % this.items.length;\n }\n\n /**\n * Highlights the item before the one that is currently highlighted.\n *\n * @internal\n */\n protected highlightPreviousItem(): void {\n this.open();\n this.highlightedItemIndex =\n this.highlightedItemIndex > 0 ? this.highlightedItemIndex - 1 : this.items.length - 1;\n }\n\n /**\n * Highlights the first of the provided items.\n *\n * @internal\n */\n protected highlightFirstItem(): void {\n this.highlightedItemIndex = 0;\n }\n\n /**\n * Highlights the last of the provided items.\n *\n * @internal\n */\n protected highlightLastItem(): void {\n this.highlightedItemIndex = this.items.length - 1;\n }\n\n /**\n * Updates the variable that is used to search in the filters.\n *\n * @param event - The event coming from the user typing.\n * @internal\n */\n protected updateSearchBuffer(event: KeyboardEvent): void {\n if (/^\\w$/.test(event.key)) {\n const key = event.key;\n this.searchBuffer += key;\n this.restartResetSearchTimeout();\n }\n }\n\n /**\n * Highlights the item that matches the search buffer. To do so it checks the list buttons\n * text content. It highlights items folowing this priority:\n * - If an element is already highlighted, it starts searching from that element.\n * - If no element is found starting from the previously highlighted, it returns the first one.\n * - If no element is found matching the search query it highlights the first element.\n *\n * @param search - The search string to find in the HTML.\n * @internal\n */\n @Watch('searchBuffer')\n protected highlightMatchingItem(search: string): void {\n if (search) {\n const normalizedSearch = normalizeString(search);\n const matchingIndices = this.$refs.itemButtons.reduce<number[]>(\n (matchingIndices, button, index) => {\n const safeButtonWordCharacters = button.textContent!.replace(/[^\\w]/g, '');\n const normalizedButtonText = normalizeString(safeButtonWordCharacters);\n if (normalizedButtonText.startsWith(normalizedSearch)) {\n matchingIndices.push(index);\n }\n return matchingIndices;\n },\n []\n );\n this.highlightedItemIndex =\n // First matching item starting to search from the current highlighted element\n matchingIndices.find(index => index >= this.highlightedItemIndex) ??\n // First matching item\n matchingIndices[0] ??\n // First item\n 0;\n }\n }\n\n /**\n * Resets the search buffer.\n *\n * @internal\n */\n protected resetSearch(): void {\n this.searchBuffer = '';\n }\n\n /** Updates the debounced function to reset the search.\n *\n * @param searchTimeoutMs - The new milliseconds that have to pass without typing before\n * resetting the search.\n * @internal\n */\n @Watch('searchTimeoutMs', { immediate: true })\n protected updateSearchTimeout(searchTimeoutMs: number): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.restartResetSearchTimeout = debounce(this.resetSearch, searchTimeoutMs);\n }\n\n /**\n * Focuses the DOM element which matches the `highlightedItemIndex`.\n *\n * @param highlightedItemIndex - The index of the HTML element to focus.\n * @internal\n */\n @Watch('highlightedItemIndex', { immediate: true })\n protected focusHighlightedItem(highlightedItemIndex: number): void {\n this.$nextTick(() => {\n if (this.$refs.itemButtons && isInRange(highlightedItemIndex, [0, this.items.length - 1])) {\n const newItem = this.$refs.itemButtons[this.highlightedItemIndex];\n newItem.focus();\n }\n });\n }\n\n /**\n * When the dropdown is open it sets the focused element to the one that is selected.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n * @internal\n */\n @Watch('isOpen')\n protected updateHighlightedItem(isOpen: boolean): void {\n if (isOpen) {\n this.highlightedItemIndex = this.value === null ? 0 : this.items.indexOf(this.value);\n } else {\n this.highlightedItemIndex = -1;\n }\n }\n\n /**\n * Adds and removes listeners to close the dropdown when it loses the focus.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n * @internal\n */\n @Watch('isOpen')\n protected syncCloseListeners(isOpen: boolean): void {\n /*\n * Because there is an issue with Firefox in macOS and Safari that doesn't focus the target\n * element of the `mousedown` events, the `focusout` event `relatedTarget` property can't be\n * used to detect whether or not the user has blurred the dropdown. The hack here is to use\n * document listeners that have the side effect of losing the focus.\n */\n if (isOpen) {\n this.addDocumentCloseListeners();\n } else {\n this.removeDocumentCloseListeners();\n }\n }\n\n /**\n * Adds listeners to the document element to detect if the focus has moved out from the\n * dropdown.\n *\n * @internal\n */\n protected addDocumentCloseListeners(): void {\n /* eslint-disable @typescript-eslint/unbound-method */\n document.addEventListener('mousedown', this.closeIfEventIsOutOfDropdown);\n document.addEventListener('touchstart', this.closeIfEventIsOutOfDropdown);\n document.addEventListener('focusin', this.closeIfEventIsOutOfDropdown);\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n\n /**\n * Removes the listeners of the document element to detect if the focus has moved out from the\n * dropdown.\n *\n * @internal\n */\n protected removeDocumentCloseListeners(): void {\n /* eslint-disable @typescript-eslint/unbound-method */\n document.removeEventListener('mousedown', this.closeIfEventIsOutOfDropdown);\n document.removeEventListener('touchstart', this.closeIfEventIsOutOfDropdown);\n document.removeEventListener('focusin', this.closeIfEventIsOutOfDropdown);\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n\n /**\n * Closes the dropdown if the passed event has happened on an element out of the dropdown.\n *\n * @param event - The event to check if it has happen out of the dropdown component.\n */\n protected closeIfEventIsOutOfDropdown(event: MouseEvent | TouchEvent | FocusEvent): void {\n if (!this.$el.contains(event.target as HTMLElement)) {\n this.close();\n }\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-dropdown {\n position: relative;\n\n &__items-list {\n z-index: 1;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0;\n top: calc(100% + var(--x-size-gap-dropdown-default, 0));\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n# Example\n\nThe `Dropdown` component is a simple yet customizable select component. The component needs to work\nthe list of items available to select, which are passed using the `items` prop, and the selected\nitem, which is passed in using the `value` prop.\n\nThe supported items must be an array that can contain unique strings, unique numbers, or objects\nwith a unique `id` property.\n\nThe content of each item can be customized using the `item` slot, which apart from the data of the\nitem, it also receives via prop if the element is selected or highlighted.\n\nThere `toggle` slot can be used to customize the button that opens the dropdown. If this is not\nprovided, the `item` slot will be used for that.\n\n```vue\n<template>\n <BaseDropdown :items=\"items\" v-model=\"value\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>\n\n <template #item=\"{ item, isSelected, isHighlighted }\">\n <span v-if=\"isHighlighted\">🟢</span>\n <span v-if=\"isSelected\">✅</span>\n <span>{{ item }}</span>\n </template>\n </BaseDropdown>\n</template>\n\n<script>\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'DropdownTest',\n components: {\n BaseDropdown\n },\n data() {\n return {\n items: ['a', 2, { id: '3' }],\n value: ['a']\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"base-dropdown.vue.js","sources":["../../../src/components/base-dropdown.vue"],"sourcesContent":["<template>\n <div\n @keydown=\"updateSearchBuffer\"\n @keydown.down.prevent=\"highlightNextItem\"\n @keydown.up.prevent=\"highlightPreviousItem\"\n :class=\"dropdownCSSClasses\"\n class=\"x-dropdown\"\n >\n <button\n @click=\"toggle\"\n @keydown.up.down.prevent.stop=\"open\"\n aria-haspopup=\"listbox\"\n class=\"x-dropdown__toggle\"\n data-test=\"dropdown-toggle\"\n >\n <!--\n @slot Used to render the contents of the dropdown toggle button. If not provided, it uses\n the item slot as fallback.\n @binding {string|number|Identifiable} item - The item data to render.\n @binding {boolean} isOpen - True if the dropdown is opened, and false if it is closed.\n -->\n <slot v-if=\"$scopedSlots.toggle\" :isOpen=\"isOpen\" :item=\"value\" name=\"toggle\">\n {{ value }}\n </slot>\n <slot v-else :item=\"value\" name=\"item\">{{ value }}</slot>\n </button>\n\n <component :is=\"animation\">\n <ul\n v-if=\"isOpen\"\n @keydown.end=\"highlightLastItem\"\n @keydown.esc=\"close\"\n @keydown.home=\"highlightFirstItem\"\n :aria-expanded=\"isOpen.toString()\"\n class=\"x-dropdown__items-list\"\n role=\"listbox\"\n >\n <li v-for=\"(item, index) in items\" :key=\"item.id || item\" class=\"x-dropdown__list-item\">\n <button\n ref=\"itemButtons\"\n @click=\"emitSelectedItemChanged(item)\"\n :aria-selected=\"(index === highlightedItemIndex).toString()\"\n :aria-current=\"(item === value).toString()\"\n :class=\"itemsCSSClasses[index]\"\n class=\"x-dropdown__item\"\n data-test=\"dropdown-item\"\n role=\"option\"\n tabindex=\"-1\"\n >\n <!--\n @slot (required) Used to render each one of the items content, and as fallback\n for the toggle button content slot if it is not provided.\n @binding {string|number|Identifiable} item - Item to render\n @binding {boolean} isHighlighted - True when the item has the focus.\n @binding {boolean} isSelected - True when the item is selected.\n -->\n <slot\n :isHighlighted=\"index === highlightedItemIndex\"\n :isSelected=\"item === value\"\n :item=\"item\"\n name=\"item\"\n >\n {{ item }}\n </slot>\n </button>\n </li>\n </ul>\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Identifiable } from '@empathyco/x-types';\n import { Component, Prop, Watch } from 'vue-property-decorator';\n import Vue from 'vue';\n import { normalizeString } from '../utils/normalize';\n import { isInRange } from '../utils/number';\n import { debounce } from '../utils/debounce';\n import { VueCSSClasses } from '../utils/types';\n import { NoElement } from './no-element';\n\n type DropdownItem = string | number | Identifiable;\n\n /**\n * Dropdown component that mimics a Select element behavior, but with the option\n * to customize the toggle button and each item contents.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n model: {\n event: 'change'\n }\n })\n export default class BaseDropdown extends Vue {\n /**\n * List of items to display.\n *\n * @public\n */\n @Prop({ required: true })\n public items!: DropdownItem[];\n\n /**\n * The selected item.\n *\n * @public\n */\n @Prop({ required: true })\n public value!: DropdownItem | null;\n\n /**\n * Animation component to use for expanding the dropdown. This is a single element animation,\n * so only `<transition>` components are allowed.\n *\n * @public\n */\n @Prop({ default: 'NoElement' })\n public animation!: typeof Vue | string;\n\n /**\n * Time to wait without receiving any keystroke before resetting the items search query.\n *\n * @public\n */\n @Prop({ default: 1000 })\n public searchTimeoutMs!: number;\n\n public $refs!: {\n /** Array containing the dropdown list buttons HTMLElements. */\n itemButtons: HTMLButtonElement[];\n };\n\n /**\n * Property to track whether the dropdown is expanded and displaying the full\n * list of items, or closed.\n *\n * @internal\n */\n protected isOpen = false;\n\n /**\n * Index of the element that has the focus in the list. -1 means no element has focus.\n *\n * @internal\n */\n protected highlightedItemIndex = -1;\n\n /**\n * String to search for the first element that starts with it.\n *\n * @internal\n */\n protected searchBuffer = '';\n\n /**\n * Resets the search buffer after a certain time has passed.\n *\n * @internal\n */\n protected restartResetSearchTimeout!: () => void;\n\n /**\n * Dynamic CSS classes to add to the dropdown root element.\n *\n * @returns An object containing the CSS classes to add to the dropdown root element.\n * @internal\n */\n protected get dropdownCSSClasses(): VueCSSClasses {\n return {\n 'x-dropdown--is-open': this.isOpen\n };\n }\n\n /**\n * Dynamic CSS classes to add to each one of the items.\n *\n * @returns An object containing the CSS classes to add to each item.\n * @internal\n */\n protected get itemsCSSClasses(): VueCSSClasses[] {\n return this.items.map((item, index) => {\n return {\n 'x-dropdown__item--is-selected': this.value === item,\n 'x-dropdown__item--is-highlighted': this.highlightedItemIndex === index\n };\n });\n }\n\n /**\n * If the dropdown is destroyed before removing the document listeners, it ensures that they\n * are removed too.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.removeDocumentCloseListeners();\n }\n\n /**\n * Opens the dropdown.\n *\n * @internal\n */\n protected open(): void {\n this.isOpen = true;\n }\n\n /**\n * Closes the dropdown.\n *\n * @internal\n */\n protected close(): void {\n this.isOpen = false;\n }\n\n /**\n * If the dropdown is opened it closes it. If it is closed it opens it.\n *\n * @internal\n */\n protected toggle(): void {\n this.isOpen = !this.isOpen;\n }\n\n /**\n * Emits the event that the selected item has changed.\n *\n * @param item - The new selected item.\n * @internal\n */\n protected emitSelectedItemChanged(item: DropdownItem): void {\n this.$emit('change', item);\n this.close();\n }\n\n /**\n * Highlights the item after the one that is currently highlighted.\n *\n * @internal\n */\n protected highlightNextItem(): void {\n this.open();\n this.highlightedItemIndex = (this.highlightedItemIndex + 1) % this.items.length;\n }\n\n /**\n * Highlights the item before the one that is currently highlighted.\n *\n * @internal\n */\n protected highlightPreviousItem(): void {\n this.open();\n this.highlightedItemIndex =\n this.highlightedItemIndex > 0 ? this.highlightedItemIndex - 1 : this.items.length - 1;\n }\n\n /**\n * Highlights the first of the provided items.\n *\n * @internal\n */\n protected highlightFirstItem(): void {\n this.highlightedItemIndex = 0;\n }\n\n /**\n * Highlights the last of the provided items.\n *\n * @internal\n */\n protected highlightLastItem(): void {\n this.highlightedItemIndex = this.items.length - 1;\n }\n\n /**\n * Updates the variable that is used to search in the filters.\n *\n * @param event - The event coming from the user typing.\n * @internal\n */\n protected updateSearchBuffer(event: KeyboardEvent): void {\n if (/^\\w$/.test(event.key)) {\n const key = event.key;\n this.searchBuffer += key;\n this.restartResetSearchTimeout();\n }\n }\n\n /**\n * Highlights the item that matches the search buffer. To do so it checks the list buttons\n * text content. It highlights items folowing this priority:\n * - If an element is already highlighted, it starts searching from that element.\n * - If no element is found starting from the previously highlighted, it returns the first one.\n * - If no element is found matching the search query it highlights the first element.\n *\n * @param search - The search string to find in the HTML.\n * @internal\n */\n @Watch('searchBuffer')\n protected highlightMatchingItem(search: string): void {\n if (search) {\n const normalizedSearch = normalizeString(search);\n const matchingIndices = this.$refs.itemButtons.reduce<number[]>(\n (matchingIndices, button, index) => {\n const safeButtonWordCharacters = button.textContent!.replace(/[^\\w]/g, '');\n const normalizedButtonText = normalizeString(safeButtonWordCharacters);\n if (normalizedButtonText.startsWith(normalizedSearch)) {\n matchingIndices.push(index);\n }\n return matchingIndices;\n },\n []\n );\n this.highlightedItemIndex =\n // First matching item starting to search from the current highlighted element\n matchingIndices.find(index => index >= this.highlightedItemIndex) ??\n // First matching item\n matchingIndices[0] ??\n // First item\n 0;\n }\n }\n\n /**\n * Resets the search buffer.\n *\n * @internal\n */\n protected resetSearch(): void {\n this.searchBuffer = '';\n }\n\n /** Updates the debounced function to reset the search.\n *\n * @param searchTimeoutMs - The new milliseconds that have to pass without typing before\n * resetting the search.\n * @internal\n */\n @Watch('searchTimeoutMs', { immediate: true })\n protected updateSearchTimeout(searchTimeoutMs: number): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.restartResetSearchTimeout = debounce(this.resetSearch, searchTimeoutMs);\n }\n\n /**\n * Focuses the DOM element which matches the `highlightedItemIndex`.\n *\n * @param highlightedItemIndex - The index of the HTML element to focus.\n * @internal\n */\n @Watch('highlightedItemIndex', { immediate: true })\n protected focusHighlightedItem(highlightedItemIndex: number): void {\n this.$nextTick(() => {\n if (this.$refs.itemButtons && isInRange(highlightedItemIndex, [0, this.items.length - 1])) {\n const newItem = this.$refs.itemButtons[this.highlightedItemIndex];\n newItem.focus();\n }\n });\n }\n\n /**\n * When the dropdown is open it sets the focused element to the one that is selected.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n * @internal\n */\n @Watch('isOpen')\n protected updateHighlightedItem(isOpen: boolean): void {\n if (isOpen) {\n this.highlightedItemIndex = this.value === null ? 0 : this.items.indexOf(this.value);\n } else {\n this.highlightedItemIndex = -1;\n }\n }\n\n /**\n * Adds and removes listeners to close the dropdown when it loses the focus.\n *\n * @param isOpen - True if the dropdown is open, false otherwise.\n * @internal\n */\n @Watch('isOpen')\n protected syncCloseListeners(isOpen: boolean): void {\n /*\n * Because there is an issue with Firefox in macOS and Safari that doesn't focus the target\n * element of the `mousedown` events, the `focusout` event `relatedTarget` property can't be\n * used to detect whether or not the user has blurred the dropdown. The hack here is to use\n * document listeners that have the side effect of losing the focus.\n */\n if (isOpen) {\n this.addDocumentCloseListeners();\n } else {\n this.removeDocumentCloseListeners();\n }\n }\n\n /**\n * Adds listeners to the document element to detect if the focus has moved out from the\n * dropdown.\n *\n * @internal\n */\n protected addDocumentCloseListeners(): void {\n /* eslint-disable @typescript-eslint/unbound-method */\n document.addEventListener('mousedown', this.closeIfEventIsOutOfDropdown);\n document.addEventListener('touchstart', this.closeIfEventIsOutOfDropdown);\n document.addEventListener('focusin', this.closeIfEventIsOutOfDropdown);\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n\n /**\n * Removes the listeners of the document element to detect if the focus has moved out from the\n * dropdown.\n *\n * @internal\n */\n protected removeDocumentCloseListeners(): void {\n /* eslint-disable @typescript-eslint/unbound-method */\n document.removeEventListener('mousedown', this.closeIfEventIsOutOfDropdown);\n document.removeEventListener('touchstart', this.closeIfEventIsOutOfDropdown);\n document.removeEventListener('focusin', this.closeIfEventIsOutOfDropdown);\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n\n /**\n * Closes the dropdown if the passed event has happened on an element out of the dropdown.\n *\n * @param event - The event to check if it has happen out of the dropdown component.\n */\n protected closeIfEventIsOutOfDropdown(event: MouseEvent | TouchEvent | FocusEvent): void {\n if (!this.$el.contains(event.target as HTMLElement)) {\n this.close();\n }\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-dropdown {\n position: relative;\n\n &__items-list {\n z-index: 1;\n list-style: none;\n position: absolute;\n padding: 0;\n margin: 0;\n top: calc(100% + var(--x-size-gap-dropdown-default, 0));\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Example\n\nThe `Dropdown` component is a simple yet customizable select component. The component needs to work\nthe list of items available to select, which are passed using the `items` prop, and the selected\nitem, which is passed in using the `value` prop.\n\nThe supported items must be an array that can contain unique strings, unique numbers, or objects\nwith a unique `id` property.\n\nThe content of each item can be customized using the `item` slot, which apart from the data of the\nitem, it also receives via prop if the element is selected or highlighted.\n\nThere `toggle` slot can be used to customize the button that opens the dropdown. If this is not\nprovided, the `item` slot will be used for that.\n\n```vue\n<template>\n <BaseDropdown :items=\"items\" v-model=\"value\">\n <template #toggle=\"{ item, isOpen }\">{{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>\n\n <template #item=\"{ item, isSelected, isHighlighted }\">\n <span v-if=\"isHighlighted\">🟢</span>\n <span v-if=\"isSelected\">✅</span>\n <span>{{ item }}</span>\n </template>\n </BaseDropdown>\n</template>\n\n<script>\n import { BaseDropdown } from '@empathyco/x-components';\n\n export default {\n name: 'DropdownTest',\n components: {\n BaseDropdown\n },\n data() {\n return {\n items: ['a', 2, { id: '3' }],\n value: ['a']\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import script from './base-event-button.vue_rollup-plugin-vue=script.js';
|
|
|
5
5
|
var __vue_script__ = script;
|
|
6
6
|
|
|
7
7
|
/* template */
|
|
8
|
-
var __vue_render__ = function() {
|
|
8
|
+
var __vue_render__ = function () {
|
|
9
9
|
var _vm = this;
|
|
10
10
|
var _h = _vm.$createElement;
|
|
11
11
|
var _c = _vm._self._c || _h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-event-button.vue.js","sources":["../../../src/components/base-event-button.vue"],"sourcesContent":["<template>\n <button v-on=\"$listeners\" @click=\"emitEvents\" data-test=\"event-button\">\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <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 { XEvent, XEventsTypes } from '../wiring';\n\n /**\n * Component to be reused that renders a `<button>` with the logic of emitting events to the bus\n * on click. The events are passed as an object to prop {@link XEventsTypes | events}.\n * The keys are the event name and the values are the payload of each event. All events are\n * emitted with its respective payload. If any event doesn't need payload a `undefined` must be\n * passed as value.\n *\n * @public\n */\n @Component\n export default class BaseEventButton extends Vue {\n /**\n * (Required) A object where the keys are the {@link XEvent} and the values\n * are the payload of each event.\n *\n * @public\n */\n @Prop({ required: true })\n protected events!: Partial<XEventsTypes>;\n\n protected emitEvents(): void {\n Object.entries(this.events).forEach(([event, payload]) => {\n this.$x.emit(event as XEvent, payload, { target: this.$el as HTMLElement });\n });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"base-event-button.vue.js","sources":["../../../src/components/base-event-button.vue"],"sourcesContent":["<template>\n <button v-on=\"$listeners\" @click=\"emitEvents\" data-test=\"event-button\">\n <!-- @slot (Required) Button content with a text, an icon or both -->\n <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 { XEvent, XEventsTypes } from '../wiring';\n\n /**\n * Component to be reused that renders a `<button>` with the logic of emitting events to the bus\n * on click. The events are passed as an object to prop {@link XEventsTypes | events}.\n * The keys are the event name and the values are the payload of each event. All events are\n * emitted with its respective payload. If any event doesn't need payload a `undefined` must be\n * passed as value.\n *\n * @public\n */\n @Component\n export default class BaseEventButton extends Vue {\n /**\n * (Required) A object where the keys are the {@link XEvent} and the values\n * are the payload of each event.\n *\n * @public\n */\n @Prop({ required: true })\n protected events!: Partial<XEventsTypes>;\n\n protected emitEvents(): void {\n Object.entries(this.events).forEach(([event, payload]) => {\n this.$x.emit(event as XEvent, payload, { target: this.$el as HTMLElement });\n });\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe event prop is required. It will render a <button></button> that emits the event passed as prop\nwith the value as payload on click:\n\n```vue\n<BaseEventButton :events=\"{ myEvent: payload }\" />\n```\n\nIf the event doesn't need payload then `undefined` must be passed:\n\n```vue\n<BaseEventButton :events=\"{ myEvent: undefined }\" />\n```\n\nIt can emit multiple events at the same time:\n\n```vue\n<BaseEventButton :events=\"{ myFirstEvent: payload1, mySecondEvent: payload2 }\" />\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import script from './base-grid.vue_rollup-plugin-vue=script.js';
|
|
|
6
6
|
var __vue_script__ = script;
|
|
7
7
|
|
|
8
8
|
/* template */
|
|
9
|
-
var __vue_render__ = function() {
|
|
9
|
+
var __vue_render__ = function () {
|
|
10
10
|
var _vm = this;
|
|
11
11
|
var _h = _vm.$createElement;
|
|
12
12
|
var _c = _vm._self._c || _h;
|
|
@@ -17,9 +17,9 @@ var __vue_render__ = function() {
|
|
|
17
17
|
staticClass: "x-grid x-base-grid",
|
|
18
18
|
class: _vm.cssClasses,
|
|
19
19
|
style: _vm.style,
|
|
20
|
-
attrs: { tag: "ul", "data-test": "grid" }
|
|
20
|
+
attrs: { tag: "ul", "data-test": "grid" },
|
|
21
21
|
},
|
|
22
|
-
_vm._l(_vm.gridItems, function(ref) {
|
|
22
|
+
_vm._l(_vm.gridItems, function (ref) {
|
|
23
23
|
var slotName = ref.slotName;
|
|
24
24
|
var item = ref.item;
|
|
25
25
|
var cssClass = ref.cssClass;
|
|
@@ -28,23 +28,21 @@ var __vue_render__ = function() {
|
|
|
28
28
|
{
|
|
29
29
|
key: item.id,
|
|
30
30
|
staticClass: "x-grid__item x-base-grid__item",
|
|
31
|
-
class: cssClass
|
|
31
|
+
class: cssClass,
|
|
32
32
|
},
|
|
33
33
|
[
|
|
34
34
|
_vm.$scopedSlots[slotName]
|
|
35
35
|
? _vm._t(slotName, null, { item: item })
|
|
36
36
|
: _vm._t(
|
|
37
37
|
"default",
|
|
38
|
-
function() {
|
|
38
|
+
function () {
|
|
39
39
|
return [
|
|
40
40
|
_vm._v(
|
|
41
41
|
_vm._s(item.name || item.modelName || item.id || item)
|
|
42
|
-
)
|
|
43
|
-
]
|
|
42
|
+
) ]
|
|
44
43
|
},
|
|
45
44
|
{ item: item }
|
|
46
|
-
)
|
|
47
|
-
],
|
|
45
|
+
) ],
|
|
48
46
|
2
|
|
49
47
|
)
|
|
50
48
|
}),
|
|
@@ -57,11 +55,11 @@ __vue_render__._withStripped = true;
|
|
|
57
55
|
/* style */
|
|
58
56
|
var __vue_inject_styles__ = function (inject) {
|
|
59
57
|
if (!inject) { return }
|
|
60
|
-
inject("data-v-
|
|
58
|
+
inject("data-v-c0275f42_0", { source: ".x-base-grid[data-v-c0275f42] {\n padding: var(--x-size-padding-grid, 0);\n margin: 0;\n display: grid;\n grid-auto-flow: dense;\n list-style: none;\n}\n.x-base-grid__banner[data-v-c0275f42] {\n grid-column-start: 1;\n grid-column-end: -1;\n}", map: undefined, media: undefined });
|
|
61
59
|
|
|
62
60
|
};
|
|
63
61
|
/* scoped */
|
|
64
|
-
var __vue_scope_id__ = "data-v-
|
|
62
|
+
var __vue_scope_id__ = "data-v-c0275f42";
|
|
65
63
|
/* module identifier */
|
|
66
64
|
var __vue_module_identifier__ = undefined;
|
|
67
65
|
/* functional template */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-grid.vue.js","sources":["../../../src/components/base-grid.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n :style=\"style\"\n class=\"x-grid x-base-grid\"\n :class=\"cssClasses\"\n tag=\"ul\"\n data-test=\"grid\"\n >\n <li\n v-for=\"{ slotName, item, cssClass } in gridItems\"\n :key=\"item.id\"\n :class=\"cssClass\"\n class=\"x-grid__item x-base-grid__item\"\n >\n <!--\n @slot Customized item rendering. Specifying a slot with the item's modelName will result in\n the item using that slot composition to render.\n @binding {item} item - Item to render\n -->\n <slot v-if=\"$scopedSlots[slotName]\" :name=\"slotName\" :item=\"item\" />\n <!--\n @slot (required) Default item rendering. This slot will be used by default for rendering\n the item without an specific slot implementation.\n @binding {item} item - Item to render\n -->\n <slot v-else :item=\"item\">{{ item.name || item.modelName || item.id || item }}</slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { toKebabCase } from '../utils/string';\n import { ListItem, VueCSSClasses } from '../utils/types';\n import { XInject } from './decorators/injection.decorators';\n import { LIST_ITEMS_KEY } from './decorators/injection.consts';\n\n /**\n * The type returned by the gridItems function. Basically it's a list of items with its CSS\n * classes and a slotName.\n *\n * @internal\n */\n interface GridItem {\n slotName: string;\n item: ListItem;\n cssClass: VueCSSClasses;\n }\n\n /**\n * Grid component that is able to render different items based on their modelName value. In order\n * to achieve this, it exposes a scopedSlot for each different modelName. In case the items used\n * do not have modelName property, the default slot is used instead. It has a required property:\n * the `items` to render; and an optional one: the number `columns` the grid is divided in. If the\n * number of columns is not specified, the grid automatically fills the rows with as many columns\n * as it can fit.\n *\n * @public\n */\n @Component({})\n export default class BaseGrid extends Vue {\n /**\n * Animation component that will be used to animate the base grid.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Number of columns the grid is divided into. By default, its value is 0, setting the grid\n * columns mode to auto-fill.\n *\n * @public\n */\n @Prop({ default: 0 })\n protected columns!: number;\n\n /**\n * The list of items to be rendered.\n *\n * @remarks The items must have an id property.\n *\n * @public\n */\n @Prop()\n protected items!: ListItem[];\n\n /**\n * It injects {@link ListItem} provided by an ancestor.\n *\n * @internal\n */\n @XInject(LIST_ITEMS_KEY)\n public injectedListItems!: ListItem[];\n\n /**\n * It returns the items passed as props or the injected ones.\n *\n * @returns List of grid items.\n *\n * @public\n */\n protected get computedItems(): ListItem[] {\n return (\n this.items ??\n this.injectedListItems ??\n //TODO: add here logger\n //eslint-disable-next-line no-console\n console.warn('It is necessary to pass a prop or inject the list of filters')\n );\n }\n\n /**\n * CSS class based on the column property value so items inside the grid can fill different\n * amount of columns or rows based on how many columns the grid is divided into.\n *\n * @returns CSS class with the column property value.\n *\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return this.columns ? `x-grid--cols-${this.columns}` : 'x-grid--cols-auto';\n }\n\n /**\n * CSSStyleDeclaration object specifying the number of columns the grid is divided into based on\n * the column property value.\n *\n * @returns A CSSStyleDeclaration to use as the style attribute.\n *\n * @internal\n */\n protected get style(): Partial<CSSStyleDeclaration> {\n return {\n gridTemplateColumns: this.columns\n ? `repeat(${this.columns}, minmax(0, 1fr))`\n : 'repeat(auto-fill, minmax(var(--x-size-min-width-grid-item, 150px), auto))'\n };\n }\n\n /**\n * Maps the item to an object containing: the `item`, its `CSS class` and its slot name.\n *\n * @returns An array of objects containing the item and its CSS class.\n *\n * @internal\n */\n protected get gridItems(): GridItem[] {\n return this.computedItems.map(item => {\n const slotName = toKebabCase(item.modelName);\n return {\n slotName,\n item,\n cssClass: `x-base-grid__${slotName}`\n };\n });\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-base-grid {\n padding: var(--x-size-padding-grid, 0);\n margin: 0;\n display: grid;\n grid-auto-flow: dense;\n list-style: none;\n\n &__banner {\n grid-column-start: 1;\n grid-column-end: -1;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"base-grid.vue.js","sources":["../../../src/components/base-grid.vue"],"sourcesContent":["<template>\n <component\n :is=\"animation\"\n :style=\"style\"\n class=\"x-grid x-base-grid\"\n :class=\"cssClasses\"\n tag=\"ul\"\n data-test=\"grid\"\n >\n <li\n v-for=\"{ slotName, item, cssClass } in gridItems\"\n :key=\"item.id\"\n :class=\"cssClass\"\n class=\"x-grid__item x-base-grid__item\"\n >\n <!--\n @slot Customized item rendering. Specifying a slot with the item's modelName will result in\n the item using that slot composition to render.\n @binding {item} item - Item to render\n -->\n <slot v-if=\"$scopedSlots[slotName]\" :name=\"slotName\" :item=\"item\" />\n <!--\n @slot (required) Default item rendering. This slot will be used by default for rendering\n the item without an specific slot implementation.\n @binding {item} item - Item to render\n -->\n <slot v-else :item=\"item\">{{ item.name || item.modelName || item.id || item }}</slot>\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { toKebabCase } from '../utils/string';\n import { ListItem, VueCSSClasses } from '../utils/types';\n import { XInject } from './decorators/injection.decorators';\n import { LIST_ITEMS_KEY } from './decorators/injection.consts';\n\n /**\n * The type returned by the gridItems function. Basically it's a list of items with its CSS\n * classes and a slotName.\n *\n * @internal\n */\n interface GridItem {\n slotName: string;\n item: ListItem;\n cssClass: VueCSSClasses;\n }\n\n /**\n * Grid component that is able to render different items based on their modelName value. In order\n * to achieve this, it exposes a scopedSlot for each different modelName. In case the items used\n * do not have modelName property, the default slot is used instead. It has a required property:\n * the `items` to render; and an optional one: the number `columns` the grid is divided in. If the\n * number of columns is not specified, the grid automatically fills the rows with as many columns\n * as it can fit.\n *\n * @public\n */\n @Component({})\n export default class BaseGrid extends Vue {\n /**\n * Animation component that will be used to animate the base grid.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Number of columns the grid is divided into. By default, its value is 0, setting the grid\n * columns mode to auto-fill.\n *\n * @public\n */\n @Prop({ default: 0 })\n protected columns!: number;\n\n /**\n * The list of items to be rendered.\n *\n * @remarks The items must have an id property.\n *\n * @public\n */\n @Prop()\n protected items!: ListItem[];\n\n /**\n * It injects {@link ListItem} provided by an ancestor.\n *\n * @internal\n */\n @XInject(LIST_ITEMS_KEY)\n public injectedListItems!: ListItem[];\n\n /**\n * It returns the items passed as props or the injected ones.\n *\n * @returns List of grid items.\n *\n * @public\n */\n protected get computedItems(): ListItem[] {\n return (\n this.items ??\n this.injectedListItems ??\n //TODO: add here logger\n //eslint-disable-next-line no-console\n console.warn('It is necessary to pass a prop or inject the list of filters')\n );\n }\n\n /**\n * CSS class based on the column property value so items inside the grid can fill different\n * amount of columns or rows based on how many columns the grid is divided into.\n *\n * @returns CSS class with the column property value.\n *\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return this.columns ? `x-grid--cols-${this.columns}` : 'x-grid--cols-auto';\n }\n\n /**\n * CSSStyleDeclaration object specifying the number of columns the grid is divided into based on\n * the column property value.\n *\n * @returns A CSSStyleDeclaration to use as the style attribute.\n *\n * @internal\n */\n protected get style(): Partial<CSSStyleDeclaration> {\n return {\n gridTemplateColumns: this.columns\n ? `repeat(${this.columns}, minmax(0, 1fr))`\n : 'repeat(auto-fill, minmax(var(--x-size-min-width-grid-item, 150px), auto))'\n };\n }\n\n /**\n * Maps the item to an object containing: the `item`, its `CSS class` and its slot name.\n *\n * @returns An array of objects containing the item and its CSS class.\n *\n * @internal\n */\n protected get gridItems(): GridItem[] {\n return this.computedItems.map(item => {\n const slotName = toKebabCase(item.modelName);\n return {\n slotName,\n item,\n cssClass: `x-base-grid__${slotName}`\n };\n });\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-base-grid {\n padding: var(--x-size-padding-grid, 0);\n margin: 0;\n display: grid;\n grid-auto-flow: dense;\n list-style: none;\n\n &__banner {\n grid-column-start: 1;\n grid-column-end: -1;\n }\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component renders a list of elements in different slots depending on their modelName. In order\nto achieve this, it exposes a scopedSlot for each different modelName. In case the items used do not\nhave modelName property, the default slot is used instead. It has a required property, the `items`\nto render, and an optional one, the number of `columns` the grid is divided in. If the number of\ncolumns is not specified, the grid automatically fills the rows with as many columns as it can fit.\n\n### Basic example\n\nIt renders a list of items using the default slot:\n\n```vue\n<template>\n <BaseGrid :items=\"items\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Configuring the number of columns\n\nIt renders a grid with 12 columns instead of 6, which is the default value:\n\n```vue\n<template>\n <BaseGrid :items=\"items\" :columns=\"12\">\n <template #default=\"{ item }\">\n {{ `Default slot content: ${item.id}` }}\n </template>\n </BaseGrid>\n</template>\n```\n\n### Rendering usage\n\nConfiguring the number of columns.\n\nIt renders a list of items using the different scopedSlots created by the item's modelName. For\nexample, if you want to use this component as the search grid, you pass the search results (results,\nbanners, promoted, next queries...etc) as items. Each of these results have a different modelName\nand are rendered in different slots.\n\n```vue\n<template>\n <BaseGrid :animation=\"animation\" :items=\"items\">\n <template #banner=\"{ item }\">\n <span class=\"banner\">\n {{ `${item.title} banner` }}\n </span>\n </template>\n <template #next-queries=\"{ item }\">\n <span>\n {{ `${item.totalResults} next queries` }}\n </span>\n </template>\n <template #promoted=\"{ item }\">\n <span class=\"promoted\">\n {{ `${item.title} promoted` }}\n </span>\n </template>\n <template #result=\"{ item }\">\n <BaseResultLink :result=\"item\">\n {{ item.name }}\n </BaseResultLink>\n </template>\n </BaseGrid>\n</template>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import script from './base-keyboard-navigation.vue_rollup-plugin-vue=script.js';
|
|
|
5
5
|
var __vue_script__ = script;
|
|
6
6
|
|
|
7
7
|
/* template */
|
|
8
|
-
var __vue_render__ = function() {
|
|
8
|
+
var __vue_render__ = function () {
|
|
9
9
|
var _vm = this;
|
|
10
10
|
var _h = _vm.$createElement;
|
|
11
11
|
var _c = _vm._self._c || _h;
|
|
@@ -15,22 +15,19 @@ var __vue_render__ = function() {
|
|
|
15
15
|
staticClass: "x-keyboard-navigation",
|
|
16
16
|
attrs: { "data-test": "keyboard-navigation" },
|
|
17
17
|
on: {
|
|
18
|
-
keydown: function($event) {
|
|
18
|
+
keydown: function ($event) {
|
|
19
19
|
if (
|
|
20
20
|
!$event.type.indexOf("key") &&
|
|
21
21
|
_vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"]) &&
|
|
22
22
|
_vm._k($event.keyCode, "down", 40, $event.key, [
|
|
23
23
|
"Down",
|
|
24
|
-
"ArrowDown"
|
|
25
|
-
]) &&
|
|
24
|
+
"ArrowDown" ]) &&
|
|
26
25
|
_vm._k($event.keyCode, "right", 39, $event.key, [
|
|
27
26
|
"Right",
|
|
28
|
-
"ArrowRight"
|
|
29
|
-
]) &&
|
|
27
|
+
"ArrowRight" ]) &&
|
|
30
28
|
_vm._k($event.keyCode, "left", 37, $event.key, [
|
|
31
29
|
"Left",
|
|
32
|
-
"ArrowLeft"
|
|
33
|
-
])
|
|
30
|
+
"ArrowLeft" ])
|
|
34
31
|
) {
|
|
35
32
|
return null
|
|
36
33
|
}
|
|
@@ -42,8 +39,8 @@ var __vue_render__ = function() {
|
|
|
42
39
|
}
|
|
43
40
|
$event.preventDefault();
|
|
44
41
|
return _vm.focusNextNavigableElement.apply(null, arguments)
|
|
45
|
-
}
|
|
46
|
-
}
|
|
42
|
+
},
|
|
43
|
+
},
|
|
47
44
|
},
|
|
48
45
|
[_vm._t("default")],
|
|
49
46
|
2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-keyboard-navigation.vue.js","sources":["../../../src/components/base-keyboard-navigation.vue"],"sourcesContent":["<template>\n <div\n @keydown.up.down.right.left.prevent=\"focusNextNavigableElement\"\n class=\"x-keyboard-navigation\"\n data-test=\"keyboard-navigation\"\n >\n <!-- @slot (Required) Container content -->\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n // eslint-disable-next-line max-len\n import { DirectionalFocusNavigationService } from '../services/directional-focus-navigation.service';\n import { SpatialNavigation } from '../services/services.types';\n import { ArrowKey, EventsForDirectionLimit, TakeNavigationControl } from '../utils/types';\n import { XEventsOf } from '../wiring/events.types';\n import { WireMetadata } from '../wiring/wiring.types';\n import { XOn } from './decorators/bus.decorators';\n\n /**\n * Base component to handle keyboard navigation for elements inside it. It has a required slot to\n * include the navigable elements.\n *\n * @remarks\n * The component can be customized through props: an array of navigationHijacker objects, which\n * contains: the xEvent to listen to, the moduleName in charge of emitting the event and to which\n * direction it should react to; to take control of the navigation and eventsForDirectionLimit, to\n * emit an xEvent when reaching the navigation limit in any direction.\n *\n * @public\n */\n @Component\n export default class BaseKeyboardNavigation extends Vue {\n /**\n * An array of {@link TakeNavigationControl | navigation hijacker} objects defining when to\n * take control of the keyboard navigation.\n */\n @Prop({\n default: () => [\n { xEvent: 'UserPressedArrowKey', moduleName: 'searchBox', direction: 'ArrowDown' }\n ]\n })\n protected navigationHijacker!: TakeNavigationControl[];\n\n /**\n * An {@link EventsForDirectionLimit} to emit when the user is already at the furthest element\n * in a direction and tries to keep going on the same direction.\n */\n @Prop({ default: () => ({ ArrowUp: 'UserReachedEmpathizeTop' }) })\n protected eventsForDirectionLimit!: Partial<EventsForDirectionLimit>;\n\n /**\n * The {@link SpatialNavigation | navigation service} to use.\n */\n protected navigationService!: SpatialNavigation;\n\n /**\n * The element to focus.\n */\n protected elementToFocus: HTMLElement | undefined;\n\n mounted(): void {\n // TODO Replace this with injection\n this.navigationService = new DirectionalFocusNavigationService(this.$el as HTMLElement);\n }\n\n /**\n * Get the navigation hijacker events.\n *\n * @remarks\n * If the same {@link XEvent} is defined multiple times it is only inserted once.\n *\n * @returns The events to hijack the navigation.\n */\n protected get navigationHijackerEvents(): XEventsOf<ArrowKey>[] {\n const eventsSet = this.navigationHijacker.map(({ xEvent }) => xEvent);\n return Array.from(new Set(eventsSet));\n }\n\n /**\n * Trigger navigation if this component is in control of it.\n *\n * @param eventPayload - The {@link WirePayload.eventPayload}.\n * @param metadata - The {@link WirePayload.metadata}.\n * @public\n */\n @XOn(component => (component as BaseKeyboardNavigation).navigationHijackerEvents)\n triggerNavigation(eventPayload: ArrowKey, metadata: WireMetadata): void {\n if (this.hasToTakeNavigationControl(eventPayload, metadata)) {\n this.focusNextNavigableElement(eventPayload);\n }\n }\n\n /**\n * Checks if the component has to take control of the keyboard navigation.\n *\n * @param eventPayload - The {@link ArrowKey}.\n * @param metadata - The {@link WireMetadata}.\n *\n * @returns Whether the component needs to take control of the keyboard navigation or not.\n * @internal\n */\n private hasToTakeNavigationControl(eventPayload: ArrowKey, metadata: WireMetadata): boolean {\n return this.navigationHijacker.some(\n ({ moduleName, direction }) =>\n moduleName === metadata.moduleName && direction === eventPayload\n );\n }\n\n /**\n * Focus the next navigable element returned by the navigation service.\n *\n * @param direction - The navigation direction.\n * @internal\n */\n protected focusNextNavigableElement(direction: ArrowKey | KeyboardEvent): void {\n const dir = typeof direction === 'object' ? (direction.key as ArrowKey) : direction;\n const nextElementToFocus = this.navigationService?.navigateTo(dir);\n\n if (this.elementToFocus !== nextElementToFocus) {\n this.elementToFocus = nextElementToFocus;\n this.elementToFocus.focus();\n } else {\n this.emitDirectionalLimitReached(dir);\n this.elementToFocus = undefined;\n }\n }\n\n /**\n * Emit the {@link XEvent} associated to the navigation's direction when reaching its limit.\n *\n * @param direction - The navigation direction.\n * @internal\n */\n private emitDirectionalLimitReached(direction: ArrowKey): void {\n const xEvent = this.eventsForDirectionLimit?.[direction];\n if (xEvent) {\n this.$x.emit(xEvent, undefined, { target: this.elementToFocus });\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n
|
|
1
|
+
{"version":3,"file":"base-keyboard-navigation.vue.js","sources":["../../../src/components/base-keyboard-navigation.vue"],"sourcesContent":["<template>\n <div\n @keydown.up.down.right.left.prevent=\"focusNextNavigableElement\"\n class=\"x-keyboard-navigation\"\n data-test=\"keyboard-navigation\"\n >\n <!-- @slot (Required) Container content -->\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n // eslint-disable-next-line max-len\n import { DirectionalFocusNavigationService } from '../services/directional-focus-navigation.service';\n import { SpatialNavigation } from '../services/services.types';\n import { ArrowKey, EventsForDirectionLimit, TakeNavigationControl } from '../utils/types';\n import { XEventsOf } from '../wiring/events.types';\n import { WireMetadata } from '../wiring/wiring.types';\n import { XOn } from './decorators/bus.decorators';\n\n /**\n * Base component to handle keyboard navigation for elements inside it. It has a required slot to\n * include the navigable elements.\n *\n * @remarks\n * The component can be customized through props: an array of navigationHijacker objects, which\n * contains: the xEvent to listen to, the moduleName in charge of emitting the event and to which\n * direction it should react to; to take control of the navigation and eventsForDirectionLimit, to\n * emit an xEvent when reaching the navigation limit in any direction.\n *\n * @public\n */\n @Component\n export default class BaseKeyboardNavigation extends Vue {\n /**\n * An array of {@link TakeNavigationControl | navigation hijacker} objects defining when to\n * take control of the keyboard navigation.\n */\n @Prop({\n default: () => [\n { xEvent: 'UserPressedArrowKey', moduleName: 'searchBox', direction: 'ArrowDown' }\n ]\n })\n protected navigationHijacker!: TakeNavigationControl[];\n\n /**\n * An {@link EventsForDirectionLimit} to emit when the user is already at the furthest element\n * in a direction and tries to keep going on the same direction.\n */\n @Prop({ default: () => ({ ArrowUp: 'UserReachedEmpathizeTop' }) })\n protected eventsForDirectionLimit!: Partial<EventsForDirectionLimit>;\n\n /**\n * The {@link SpatialNavigation | navigation service} to use.\n */\n protected navigationService!: SpatialNavigation;\n\n /**\n * The element to focus.\n */\n protected elementToFocus: HTMLElement | undefined;\n\n mounted(): void {\n // TODO Replace this with injection\n this.navigationService = new DirectionalFocusNavigationService(this.$el as HTMLElement);\n }\n\n /**\n * Get the navigation hijacker events.\n *\n * @remarks\n * If the same {@link XEvent} is defined multiple times it is only inserted once.\n *\n * @returns The events to hijack the navigation.\n */\n protected get navigationHijackerEvents(): XEventsOf<ArrowKey>[] {\n const eventsSet = this.navigationHijacker.map(({ xEvent }) => xEvent);\n return Array.from(new Set(eventsSet));\n }\n\n /**\n * Trigger navigation if this component is in control of it.\n *\n * @param eventPayload - The {@link WirePayload.eventPayload}.\n * @param metadata - The {@link WirePayload.metadata}.\n * @public\n */\n @XOn(component => (component as BaseKeyboardNavigation).navigationHijackerEvents)\n triggerNavigation(eventPayload: ArrowKey, metadata: WireMetadata): void {\n if (this.hasToTakeNavigationControl(eventPayload, metadata)) {\n this.focusNextNavigableElement(eventPayload);\n }\n }\n\n /**\n * Checks if the component has to take control of the keyboard navigation.\n *\n * @param eventPayload - The {@link ArrowKey}.\n * @param metadata - The {@link WireMetadata}.\n *\n * @returns Whether the component needs to take control of the keyboard navigation or not.\n * @internal\n */\n private hasToTakeNavigationControl(eventPayload: ArrowKey, metadata: WireMetadata): boolean {\n return this.navigationHijacker.some(\n ({ moduleName, direction }) =>\n moduleName === metadata.moduleName && direction === eventPayload\n );\n }\n\n /**\n * Focus the next navigable element returned by the navigation service.\n *\n * @param direction - The navigation direction.\n * @internal\n */\n protected focusNextNavigableElement(direction: ArrowKey | KeyboardEvent): void {\n const dir = typeof direction === 'object' ? (direction.key as ArrowKey) : direction;\n const nextElementToFocus = this.navigationService?.navigateTo(dir);\n\n if (this.elementToFocus !== nextElementToFocus) {\n this.elementToFocus = nextElementToFocus;\n this.elementToFocus.focus();\n } else {\n this.emitDirectionalLimitReached(dir);\n this.elementToFocus = undefined;\n }\n }\n\n /**\n * Emit the {@link XEvent} associated to the navigation's direction when reaching its limit.\n *\n * @param direction - The navigation direction.\n * @internal\n */\n private emitDirectionalLimitReached(direction: ArrowKey): void {\n const xEvent = this.eventsForDirectionLimit?.[direction];\n if (xEvent) {\n this.$x.emit(xEvent, undefined, { target: this.elementToFocus });\n }\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\nThis component has a slot to inject other components inside it. The component expects a required\nprop, navigationHijacker, which is an array of objects containing: the xEvent to listen to, the\nmoduleName in charge of emitting the event and to which direction it should react to; to take\ncontrol of the navigation. It has another prop, optional in this case, to emit an xEvent when\nreaching the navigation limit in any direction.\n\n### Basic Usage\n\n```vue\n<KeyboardNavigation>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n\n### Defining multiple conditions to take navigation's control\n\n```vue\n<KeyboardNavigation\n :navigationHijacker=\"[\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'searchBox',\n direction: 'ArrowDown'\n },\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'facets',\n direction: 'ArrowRight'\n }\n ]\"\n>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n\n### Defining events to emit when reaching a navigation limit\n\n```vue\n<KeyboardNavigation\n :navigationHijacker=\"[\n {\n xEvent: 'UserPressedArrowKey',\n moduleName: 'searchBox',\n direction: 'ArrowDown'\n }\n ]\"\n :eventsForDirectionLimit=\"{\n ArrowUp: 'UserReachedEmpathizeTop'\n }\"\n>\n <QuerySuggestions/>\n</KeyboardNavigation>\n```\n\n## Events\n\nAn event that the component will emit:\n\n- `UserReachedEmpathizeTop`: the event emitted by default when the container reaches its top\n navigation, but more events can be emitted for each direction using the `eventsForDirectionLimit`\n prop.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|