@empathyco/x-components 3.0.0-alpha.31 → 3.0.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/core/index.js +2 -0
- package/core/index.js.map +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.globalxbus.created.md +15 -0
- package/docs/API-reference/api/x-components.globalxbus.md +21 -0
- package/docs/API-reference/api/x-components.md +4 -0
- package/docs/API-reference/api/x-components.snippetcallbacks.md +15 -0
- package/docs/API-reference/api/x-components.snippetconfig.callbacks.md +13 -0
- package/docs/API-reference/api/x-components.snippetconfig.md +1 -0
- package/docs/API-reference/api/x-components.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.xeventlisteners.md +17 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +1 -0
- package/docs/API-reference/api/x-components.xeventstypes.snippetcallbackexecuted.md +16 -0
- package/docs/API-reference/components/common/x-components.global-x-bus.md +51 -0
- package/docs/API-reference/components/common/x-components.snippet-callbacks.md +37 -0
- package/docs/API-reference/components/tagging/x-components.tagging.md +4 -0
- package/docs/sidebar.json +1 -1
- package/js/components/animations/animate-width.vue.js +1 -1
- package/js/components/animations/collapse-from-top.vue.js +1 -1
- package/js/components/animations/collapse-height.vue.js +3 -3
- package/js/components/animations/collapse-width.vue.js +3 -3
- package/js/components/animations/cross-fade.vue.js +1 -1
- package/js/components/animations/fade-and-slide.vue.js +2 -2
- package/js/components/animations/staggered-fade-and-slide.vue.js +2 -2
- package/js/components/animations/translate-from-left.vue.js +1 -1
- package/js/components/animations/translate-from-right.vue.js +1 -1
- package/js/components/auto-progress-bar.vue.js +4 -5
- package/js/components/auto-progress-bar.vue.js.map +1 -1
- package/js/components/base-dropdown.vue.js +33 -45
- package/js/components/base-dropdown.vue.js.map +1 -1
- package/js/components/base-event-button.vue.js +1 -1
- package/js/components/base-grid.vue.js +7 -9
- package/js/components/base-grid.vue.js.map +1 -1
- package/js/components/base-keyboard-navigation.vue.js +7 -10
- package/js/components/base-keyboard-navigation.vue.js.map +1 -1
- package/js/components/base-rating.vue.js +19 -20
- package/js/components/base-rating.vue.js.map +1 -1
- package/js/components/base-variable-column-grid.vue.js +6 -7
- package/js/components/base-variable-column-grid.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-dropdown.vue.js +11 -14
- package/js/components/column-picker/base-column-picker-dropdown.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue.js +9 -11
- package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
- package/js/components/currency/base-currency.vue.js +2 -3
- package/js/components/currency/base-currency.vue.js.map +1 -1
- package/js/components/filters/labels/base-rating-filter-label.vue.js +7 -8
- package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
- package/js/components/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 +46 -0
- package/js/components/global-x-bus.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/arrow.vue.js +4 -6
- package/js/components/icons/arrow.vue.js.map +1 -1
- package/js/components/icons/bag.vue.js +8 -12
- package/js/components/icons/bag.vue.js.map +1 -1
- package/js/components/icons/bar-code.vue.js +6 -9
- package/js/components/icons/bar-code.vue.js.map +1 -1
- package/js/components/icons/barcode-tiny.vue.js +6 -9
- package/js/components/icons/barcode-tiny.vue.js.map +1 -1
- package/js/components/icons/cart.vue.js +10 -13
- package/js/components/icons/cart.vue.js.map +1 -1
- package/js/components/icons/check-tiny.vue.js +4 -6
- package/js/components/icons/check-tiny.vue.js.map +1 -1
- package/js/components/icons/check.vue.js +4 -6
- package/js/components/icons/check.vue.js.map +1 -1
- package/js/components/icons/checkbox-card-selected.vue.js +5 -7
- package/js/components/icons/checkbox-card-selected.vue.js.map +1 -1
- package/js/components/icons/checkbox-card-unselected.vue.js +5 -7
- package/js/components/icons/checkbox-card-unselected.vue.js.map +1 -1
- package/js/components/icons/checkbox-selected.vue.js +5 -7
- package/js/components/icons/checkbox-selected.vue.js.map +1 -1
- package/js/components/icons/checkbox-unselected.vue.js +6 -6
- package/js/components/icons/chevron-down.vue.js +6 -8
- package/js/components/icons/chevron-down.vue.js.map +1 -1
- package/js/components/icons/chevron-left.vue.js +6 -8
- package/js/components/icons/chevron-left.vue.js.map +1 -1
- package/js/components/icons/chevron-right.vue.js +4 -6
- package/js/components/icons/chevron-right.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-down.vue.js +6 -8
- package/js/components/icons/chevron-tiny-down.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-left.vue.js +6 -8
- package/js/components/icons/chevron-tiny-left.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-right.vue.js +6 -8
- package/js/components/icons/chevron-tiny-right.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-up.vue.js +6 -8
- package/js/components/icons/chevron-tiny-up.vue.js.map +1 -1
- package/js/components/icons/chevron-up.vue.js +6 -8
- package/js/components/icons/chevron-up.vue.js.map +1 -1
- package/js/components/icons/cross-tiny.vue.js +4 -6
- package/js/components/icons/cross-tiny.vue.js.map +1 -1
- package/js/components/icons/cross.vue.js +4 -6
- package/js/components/icons/cross.vue.js.map +1 -1
- package/js/components/icons/filters.vue.js +10 -15
- package/js/components/icons/filters.vue.js.map +1 -1
- package/js/components/icons/grid-1-col.vue.js +6 -9
- package/js/components/icons/grid-1-col.vue.js.map +1 -1
- package/js/components/icons/grid-2-col.vue.js +8 -10
- package/js/components/icons/grid-2-col.vue.js.map +1 -1
- package/js/components/icons/hide.vue.js +10 -15
- package/js/components/icons/hide.vue.js.map +1 -1
- package/js/components/icons/history-tiny.vue.js +9 -12
- package/js/components/icons/history-tiny.vue.js.map +1 -1
- package/js/components/icons/history.vue.js +9 -12
- package/js/components/icons/history.vue.js.map +1 -1
- package/js/components/icons/menu.vue.js +6 -8
- package/js/components/icons/menu.vue.js.map +1 -1
- package/js/components/icons/minus-tiny.vue.js +4 -6
- package/js/components/icons/minus-tiny.vue.js.map +1 -1
- package/js/components/icons/minus.vue.js +4 -6
- package/js/components/icons/minus.vue.js.map +1 -1
- package/js/components/icons/nq-1.vue.js +4 -6
- package/js/components/icons/nq-1.vue.js.map +1 -1
- package/js/components/icons/nq-2.vue.js +4 -6
- package/js/components/icons/nq-2.vue.js.map +1 -1
- package/js/components/icons/nq-3.vue.js +6 -8
- package/js/components/icons/nq-3.vue.js.map +1 -1
- package/js/components/icons/nq-4.vue.js +9 -12
- package/js/components/icons/nq-4.vue.js.map +1 -1
- package/js/components/icons/plus.vue.js +4 -6
- package/js/components/icons/plus.vue.js.map +1 -1
- package/js/components/icons/search-tiny.vue.js +6 -9
- package/js/components/icons/search-tiny.vue.js.map +1 -1
- package/js/components/icons/search.vue.js +6 -8
- package/js/components/icons/search.vue.js.map +1 -1
- package/js/components/icons/show.vue.js +7 -10
- package/js/components/icons/show.vue.js.map +1 -1
- package/js/components/icons/star.vue.js +6 -9
- package/js/components/icons/star.vue.js.map +1 -1
- package/js/components/icons/trash-open.vue.js +12 -15
- package/js/components/icons/trash-open.vue.js.map +1 -1
- package/js/components/icons/trash.vue.js +8 -11
- package/js/components/icons/trash.vue.js.map +1 -1
- package/js/components/icons/trending-tiny.vue.js +8 -10
- package/js/components/icons/trending-tiny.vue.js.map +1 -1
- package/js/components/icons/trending.vue.js +8 -10
- package/js/components/icons/trending.vue.js.map +1 -1
- package/js/components/icons/user.vue.js +6 -9
- package/js/components/icons/user.vue.js.map +1 -1
- package/js/components/items-list.vue.js +6 -7
- package/js/components/items-list.vue.js.map +1 -1
- package/js/components/layouts/multi-column-max-width-layout.vue.js +54 -88
- package/js/components/layouts/multi-column-max-width-layout.vue.js.map +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/modals/base-events-modal-close.vue.js +2 -2
- package/js/components/modals/base-events-modal-open.vue.js +2 -2
- package/js/components/modals/base-events-modal.vue.js +3 -3
- package/js/components/modals/base-id-modal-close.vue.js +2 -2
- package/js/components/modals/base-id-modal-open.vue.js +2 -2
- package/js/components/modals/base-id-modal.vue.js +3 -3
- package/js/components/modals/base-modal.vue.js +9 -11
- package/js/components/modals/base-modal.vue.js.map +1 -1
- package/js/components/panels/base-header-toggle-panel.vue.js +5 -7
- package/js/components/panels/base-header-toggle-panel.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue.js +2 -2
- package/js/components/panels/base-id-toggle-panel.vue.js +1 -1
- package/js/components/panels/base-toggle-panel.vue.js +3 -4
- package/js/components/panels/base-toggle-panel.vue.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue.js +2 -2
- package/js/components/result/base-result-current-price.vue.js +6 -8
- package/js/components/result/base-result-current-price.vue.js.map +1 -1
- package/js/components/result/base-result-fallback-image.vue.js +7 -9
- package/js/components/result/base-result-fallback-image.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +9 -12
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-link.vue.js +5 -5
- 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 +2 -2
- package/js/components/sliding-panel.vue.js +11 -14
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/snippet-callbacks.vue.js +47 -0
- package/js/components/snippet-callbacks.vue.js.map +1 -0
- package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js +58 -0
- package/js/components/snippet-callbacks.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/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 +6 -7
- package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
- package/js/index.js +3 -0
- package/js/index.js.map +1 -1
- package/js/utils/storage.js +2 -2
- package/js/utils/storage.js.map +1 -1
- package/js/x-modules/device/components/device-detector.vue.js +2 -2
- package/js/x-modules/empathize/components/empathize.vue.js +5 -6
- package/js/x-modules/empathize/components/empathize.vue.js.map +1 -1
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +2 -0
- 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 +2 -0
- 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_rollup-plugin-vue=script.js +2 -0
- 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 +2 -0
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js +2 -0
- 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 +10 -11
- package/js/x-modules/facets/components/facets/facets.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue.js +5 -6
- package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +2 -0
- 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 +2 -0
- 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 +19 -23
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js +29 -38
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +2 -0
- 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 +2 -0
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js +2 -0
- 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 +2 -0
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js +2 -0
- 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 +4 -4
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +2 -0
- 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 +8 -10
- package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +2 -0
- 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 +2 -0
- 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 +2 -0
- package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js +2 -0
- 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-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/remove-history-query.vue.js +2 -2
- package/js/x-modules/identifier-results/components/identifier-result.vue.js +2 -2
- package/js/x-modules/identifier-results/components/identifier-results.vue.js +4 -4
- package/js/x-modules/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.vue.js +15 -20
- package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js +8 -10
- package/js/x-modules/next-queries/components/next-query.vue.js.map +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-searches.vue.js +15 -20
- package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js +9 -11
- package/js/x-modules/query-suggestions/components/query-suggestion.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +15 -20
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
- package/js/x-modules/recommendations/components/recommendations.vue.js +9 -12
- package/js/x-modules/recommendations/components/recommendations.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue.js +4 -5
- package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tags.vue.js +13 -17
- package/js/x-modules/related-tags/components/related-tags.vue.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue.js +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +2 -0
- 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 +2 -0
- 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/window-scroll.vue_rollup-plugin-vue=script.js +2 -0
- 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 +4 -6
- package/js/x-modules/search/components/banner.vue.js.map +1 -1
- package/js/x-modules/search/components/banners-list.vue.js +9 -12
- package/js/x-modules/search/components/banners-list.vue.js.map +1 -1
- package/js/x-modules/search/components/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 +4 -4
- package/js/x-modules/search/components/promoted.vue.js +4 -6
- package/js/x-modules/search/components/promoted.vue.js.map +1 -1
- package/js/x-modules/search/components/promoteds-list.vue.js +9 -12
- package/js/x-modules/search/components/promoteds-list.vue.js.map +1 -1
- package/js/x-modules/search/components/redirection.vue.js +4 -5
- package/js/x-modules/search/components/redirection.vue.js.map +1 -1
- package/js/x-modules/search/components/results-list.vue.js +9 -12
- package/js/x-modules/search/components/results-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-dropdown.vue.js +13 -16
- package/js/x-modules/search/components/sort-dropdown.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue.js +8 -10
- package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +3 -1
- package/js/x-modules/search/store/actions/fetch-and-save-search-response.action.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 +7 -9
- package/js/x-modules/search-box/components/search-input.vue.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/wiring.js +4 -1
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js +2 -2
- package/package.json +16 -14
- package/report/tsdoc-metadata.json +1 -1
- package/report/x-adapter.api.json +3 -3
- package/report/x-components.api.json +326 -9
- package/report/x-components.api.md +46 -10
- package/report/x-types.api.json +1 -1
- package/tagging/index.js +2 -1
- package/types/components/global-x-bus.vue.d.ts +25 -0
- package/types/components/global-x-bus.vue.d.ts.map +1 -0
- package/types/components/index.d.ts +2 -0
- package/types/components/index.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/utils/storage.d.ts +1 -7
- package/types/utils/storage.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts +8 -0
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/x-installer/api/api.types.d.ts +12 -0
- package/types/x-installer/api/api.types.d.ts.map +1 -1
- package/types/x-modules/search/store/actions/fetch-and-save-search-response.action.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
|
@@ -5,7 +5,7 @@ import script from './identifier-result.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;
|
|
@@ -13,7 +13,7 @@ var __vue_render__ = function() {
|
|
|
13
13
|
? _c("span", {
|
|
14
14
|
staticClass: "x-identifier-result",
|
|
15
15
|
attrs: { "data-test": "identifier-result" },
|
|
16
|
-
domProps: { innerHTML: _vm._s(_vm.highlightedQueryHTML) }
|
|
16
|
+
domProps: { innerHTML: _vm._s(_vm.highlightedQueryHTML) },
|
|
17
17
|
})
|
|
18
18
|
: _vm._e()
|
|
19
19
|
};
|
|
@@ -5,7 +5,7 @@ import script from './identifier-results.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,15 +15,15 @@ var __vue_render__ = function() {
|
|
|
15
15
|
{
|
|
16
16
|
tag: "component",
|
|
17
17
|
staticClass: "x-list x-identifier-results",
|
|
18
|
-
attrs: { tag: "ul" }
|
|
18
|
+
attrs: { tag: "ul" },
|
|
19
19
|
},
|
|
20
|
-
_vm._l(_vm.identifierResults, function(identifierResult) {
|
|
20
|
+
_vm._l(_vm.identifierResults, function (identifierResult) {
|
|
21
21
|
return _c(
|
|
22
22
|
"li",
|
|
23
23
|
{
|
|
24
24
|
key: identifierResult.id,
|
|
25
25
|
staticClass: "x-identifier-results__item",
|
|
26
|
-
attrs: { "data-test": "identifier-results-item" }
|
|
26
|
+
attrs: { "data-test": "identifier-results-item" },
|
|
27
27
|
},
|
|
28
28
|
[_vm._t("default", null, { identifierResult: identifierResult })],
|
|
29
29
|
2
|
|
@@ -5,7 +5,7 @@ import script from './next-queries-list.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;
|
|
@@ -14,32 +14,29 @@ var __vue_render__ = function() {
|
|
|
14
14
|
[
|
|
15
15
|
_vm._t(
|
|
16
16
|
"default",
|
|
17
|
-
function() {
|
|
17
|
+
function () {
|
|
18
18
|
return [
|
|
19
19
|
_c("ItemsList", {
|
|
20
20
|
attrs: { animation: _vm.animation, items: _vm.items },
|
|
21
21
|
scopedSlots: _vm._u(
|
|
22
22
|
[
|
|
23
|
-
_vm._l(_vm.$scopedSlots, function(_, slotName) {
|
|
23
|
+
_vm._l(_vm.$scopedSlots, function (_, slotName) {
|
|
24
24
|
return {
|
|
25
25
|
key: slotName,
|
|
26
|
-
fn: function(ref) {
|
|
26
|
+
fn: function (ref) {
|
|
27
27
|
var item = ref.item;
|
|
28
28
|
return [_vm._t(slotName, null, { item: item })]
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
30
|
}
|
|
31
|
-
})
|
|
32
|
-
],
|
|
31
|
+
}) ],
|
|
33
32
|
null,
|
|
34
33
|
true
|
|
35
|
-
)
|
|
36
|
-
})
|
|
37
|
-
]
|
|
34
|
+
),
|
|
35
|
+
}) ]
|
|
38
36
|
},
|
|
39
37
|
null,
|
|
40
38
|
{ items: _vm.items, animation: _vm.animation }
|
|
41
|
-
)
|
|
42
|
-
],
|
|
39
|
+
) ],
|
|
43
40
|
2
|
|
44
41
|
)
|
|
45
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-queries-list.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries-list.vue"],"sourcesContent":["<template>\n <NoElement>\n <!--\n @slot Next queries list layout.\n @binding {SearchItem[]} items - Next queries groups plus the injected list items to\n render.\n @binding {Vue | string} animation - Animation to animate the elements.\n -->\n <slot v-bind=\"{ items, animation }\">\n <ItemsList :animation=\"animation\" :items=\"items\">\n <template v-for=\"(_, slotName) in $scopedSlots\" v-slot:[slotName]=\"{ item }\">\n <slot :name=\"slotName\" :item=\"item\" />\n </template>\n </ItemsList>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import { NextQuery } from '@empathyco/x-types';\n import { mixins } from 'vue-class-component';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { NoElement } from '../../../components/no-element';\n import { ItemsListInjectionMixin } from '../../../components/items-list-injection.mixin';\n import ItemsList from '../../../components/items-list.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { groupItemsBy } from '../../../utils/array';\n import { ListItem } from '../../../utils/types';\n import ResultsList from '../../search/components/results-list.vue';\n import { NextQueriesGroup } from '../types';\n import { nextQueriesXModule } from '../x-module';\n\n /**\n * Component that inserts groups of next queries in different positions of the injected search\n * items list, based on the provided configuration.\n *\n * @public\n */\n @Component({\n components: {\n ResultsList,\n NoElement,\n ItemsList\n },\n mixins: [xComponentMixin(nextQueriesXModule)]\n })\n export default class NextQueriesList extends mixins(ItemsListInjectionMixin) {\n /**\n * Animation component that will be used to animate the next queries groups.\n *\n * @public\n */\n @Prop()\n protected animation?: Vue | string;\n\n /**\n * The first index to insert a group of next queries at.\n *\n * @public\n */\n @Prop({ default: 24 })\n public offset!: number;\n\n /**\n * The items cycle size to keep inserting next queries groups at.\n *\n * @public\n */\n @Prop({ default: 24 })\n public frequency!: number;\n\n /**\n * The maximum amount of next queries to add in a single group.\n *\n * @public\n */\n @Prop({ default: 4 })\n public maxNextQueriesPerGroup!: number;\n\n /**\n * The maximum number of groups to insert into the injected list items list.\n *\n * @public\n */\n @Prop()\n public maxGroups!: number;\n\n /**\n * The state next queries.\n *\n * @internal\n */\n @Getter('nextQueries', 'nextQueries')\n public nextQueries!: NextQuery[];\n\n /**\n * The grouped next queries based on the given config.\n *\n * @returns A list of next queries groups.\n * @internal\n */\n protected get nextQueriesGroups(): NextQueriesGroup[] {\n return Object.values(\n groupItemsBy(this.nextQueries, (_, index) =>\n Math.floor(index / this.maxNextQueriesPerGroup)\n )\n )\n .slice(0, this.maxGroups)\n .map(nextQueries => ({\n modelName: 'NextQueriesGroup' as const,\n id: nextQueries.map(nextQuery => nextQuery.query).join(','),\n nextQueries\n }));\n }\n\n /**\n * New list of {@link ListItem}s to render.\n *\n * @returns The new list of {@link ListItem}s with the next queries groups inserted.\n * @internal\n */\n public override get items(): ListItem[] {\n if (!this.injectedListItems) {\n return this.nextQueriesGroups;\n }\n\n return this.nextQueriesGroups.reduce(\n (items, nextQueriesGroup, index) => {\n const targetIndex = this.offset + this.frequency * index;\n if (targetIndex <= items.length) {\n items.splice(targetIndex, 0, nextQueriesGroup);\n }\n return items;\n },\n [...this.injectedListItems]\n );\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits no events.\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the <b>QuerySignals</b> microservice must be\nimplemented.\n:::\n<!-- prettier-ignore-end -->\n\nUsually, this component is going to be used together with the `ResultsList` one. Next queries groups\nwill be inserted between the results, guiding users to discover new searches directly from the\nresults list.\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <NextQueriesList />\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { NextQueriesList } from '@empathyco/x-components/next-queries';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'NextQueriesListDemo',\n components: {\n NextQueriesList,\n ResultsList,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with the index that next queries groups are inserted at\n\nThe component allows to customise where are the next queries groups inserted. In the following\nexample, the first group of next queries will be inserted at the index `48` (`offset`), and then a\nsecond group will be inserted at index `120` because of the `frequency` prop configured to `72`.\nFinally, a third group will be inserted at index `192`. Because `maxGroups` is configured to `3`, no\nmore groups will be inserted. Each one of this groups will have up to `6` next queries\n(`maxNextQueriesPerGroup`).\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <NextQueriesList :offset=\"48\" :frequency=\"72\" :maxNextQueriesPerGroup=\"6\" :maxGroups=\"3\" />\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { NextQueriesList } from '@empathyco/x-components/next-queries';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'NextQueriesListDemo',\n components: {\n NextQueriesList,\n ResultsList,\n SearchInput\n }\n };\n</script>\n```\n\n### Customise the layout of the component\n\nThis component will render by default the `id` of each search item, both the injected, and for the\ngroups of next queries generated, but the common case is to integrate it with another layout\ncomponent, for example the `BaseGrid`. To do so, you can use the `default` slot\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <NextQueriesList\n :offset=\"48\"\n :frequency=\"72\"\n :maxNextQueriesPerGroup=\"6\"\n :maxGroups=\"3\"\n #default=\"{ items }\"\n >\n <BaseGrid :items=\"items\" :animation=\"animation\">\n <template #next-queries-group=\"{ item }\">\n <span>NextQueriesGroup: {{ item.queries.join(', ') }}</span>\n </template>\n <template #result=\"{ item }\">\n <span>Result: {{ item.name }}</span>\n </template>\n <template #default=\"{ item }\">\n <span>Default: {{ item }}</span>\n </template>\n </BaseGrid>\n </NextQueriesList>\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { NextQueriesList } from '@empathyco/x-components/next-queries';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { BaseGrid } from '@empathyco/x-components';\n\n export default {\n name: 'NextQueriesListDemo',\n components: {\n NextQueriesList,\n ResultsList,\n BaseGrid,\n SearchInput\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA
|
|
1
|
+
{"version":3,"file":"next-queries-list.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries-list.vue"],"sourcesContent":["<template>\n <NoElement>\n <!--\n @slot Next queries list layout.\n @binding {SearchItem[]} items - Next queries groups plus the injected list items to\n render.\n @binding {Vue | string} animation - Animation to animate the elements.\n -->\n <slot v-bind=\"{ items, animation }\">\n <ItemsList :animation=\"animation\" :items=\"items\">\n <template v-for=\"(_, slotName) in $scopedSlots\" v-slot:[slotName]=\"{ item }\">\n <slot :name=\"slotName\" :item=\"item\" />\n </template>\n </ItemsList>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import { NextQuery } from '@empathyco/x-types';\n import { mixins } from 'vue-class-component';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { NoElement } from '../../../components/no-element';\n import { ItemsListInjectionMixin } from '../../../components/items-list-injection.mixin';\n import ItemsList from '../../../components/items-list.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { groupItemsBy } from '../../../utils/array';\n import { ListItem } from '../../../utils/types';\n import ResultsList from '../../search/components/results-list.vue';\n import { NextQueriesGroup } from '../types';\n import { nextQueriesXModule } from '../x-module';\n\n /**\n * Component that inserts groups of next queries in different positions of the injected search\n * items list, based on the provided configuration.\n *\n * @public\n */\n @Component({\n components: {\n ResultsList,\n NoElement,\n ItemsList\n },\n mixins: [xComponentMixin(nextQueriesXModule)]\n })\n export default class NextQueriesList extends mixins(ItemsListInjectionMixin) {\n /**\n * Animation component that will be used to animate the next queries groups.\n *\n * @public\n */\n @Prop()\n protected animation?: Vue | string;\n\n /**\n * The first index to insert a group of next queries at.\n *\n * @public\n */\n @Prop({ default: 24 })\n public offset!: number;\n\n /**\n * The items cycle size to keep inserting next queries groups at.\n *\n * @public\n */\n @Prop({ default: 24 })\n public frequency!: number;\n\n /**\n * The maximum amount of next queries to add in a single group.\n *\n * @public\n */\n @Prop({ default: 4 })\n public maxNextQueriesPerGroup!: number;\n\n /**\n * The maximum number of groups to insert into the injected list items list.\n *\n * @public\n */\n @Prop()\n public maxGroups!: number;\n\n /**\n * The state next queries.\n *\n * @internal\n */\n @Getter('nextQueries', 'nextQueries')\n public nextQueries!: NextQuery[];\n\n /**\n * The grouped next queries based on the given config.\n *\n * @returns A list of next queries groups.\n * @internal\n */\n protected get nextQueriesGroups(): NextQueriesGroup[] {\n return Object.values(\n groupItemsBy(this.nextQueries, (_, index) =>\n Math.floor(index / this.maxNextQueriesPerGroup)\n )\n )\n .slice(0, this.maxGroups)\n .map(nextQueries => ({\n modelName: 'NextQueriesGroup' as const,\n id: nextQueries.map(nextQuery => nextQuery.query).join(','),\n nextQueries\n }));\n }\n\n /**\n * New list of {@link ListItem}s to render.\n *\n * @returns The new list of {@link ListItem}s with the next queries groups inserted.\n * @internal\n */\n public override get items(): ListItem[] {\n if (!this.injectedListItems) {\n return this.nextQueriesGroups;\n }\n\n return this.nextQueriesGroups.reduce(\n (items, nextQueriesGroup, index) => {\n const targetIndex = this.offset + this.frequency * index;\n if (targetIndex <= items.length) {\n items.splice(targetIndex, 0, nextQueriesGroup);\n }\n return items;\n },\n [...this.injectedListItems]\n );\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits no events.\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the <b>QuerySignals</b> microservice must be\nimplemented.\n:::\n<!-- prettier-ignore-end -->\n\nUsually, this component is going to be used together with the `ResultsList` one. Next queries groups\nwill be inserted between the results, guiding users to discover new searches directly from the\nresults list.\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <NextQueriesList />\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { NextQueriesList } from '@empathyco/x-components/next-queries';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'NextQueriesListDemo',\n components: {\n NextQueriesList,\n ResultsList,\n SearchInput\n }\n };\n</script>\n```\n\n### Play with the index that next queries groups are inserted at\n\nThe component allows to customise where are the next queries groups inserted. In the following\nexample, the first group of next queries will be inserted at the index `48` (`offset`), and then a\nsecond group will be inserted at index `120` because of the `frequency` prop configured to `72`.\nFinally, a third group will be inserted at index `192`. Because `maxGroups` is configured to `3`, no\nmore groups will be inserted. Each one of this groups will have up to `6` next queries\n(`maxNextQueriesPerGroup`).\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <NextQueriesList :offset=\"48\" :frequency=\"72\" :maxNextQueriesPerGroup=\"6\" :maxGroups=\"3\" />\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { NextQueriesList } from '@empathyco/x-components/next-queries';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n\n export default {\n name: 'NextQueriesListDemo',\n components: {\n NextQueriesList,\n ResultsList,\n SearchInput\n }\n };\n</script>\n```\n\n### Customise the layout of the component\n\nThis component will render by default the `id` of each search item, both the injected, and for the\ngroups of next queries generated, but the common case is to integrate it with another layout\ncomponent, for example the `BaseGrid`. To do so, you can use the `default` slot\n\n```vue\n<template>\n <div>\n <SearchInput />\n <ResultsList>\n <NextQueriesList\n :offset=\"48\"\n :frequency=\"72\"\n :maxNextQueriesPerGroup=\"6\"\n :maxGroups=\"3\"\n #default=\"{ items }\"\n >\n <BaseGrid :items=\"items\" :animation=\"animation\">\n <template #next-queries-group=\"{ item }\">\n <span>NextQueriesGroup: {{ item.queries.join(', ') }}</span>\n </template>\n <template #result=\"{ item }\">\n <span>Result: {{ item.name }}</span>\n </template>\n <template #default=\"{ item }\">\n <span>Default: {{ item }}</span>\n </template>\n </BaseGrid>\n </NextQueriesList>\n </ResultsList>\n </div>\n</template>\n\n<script>\n import { NextQueriesList } from '@empathyco/x-components/next-queries';\n import { ResultsList } from '@empathyco/x-components/search';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { BaseGrid } from '@empathyco/x-components';\n\n export default {\n name: 'NextQueriesListDemo',\n components: {\n NextQueriesList,\n ResultsList,\n BaseGrid,\n SearchInput\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import script from './next-queries.vue_rollup-plugin-vue=script.js';
|
|
|
5
5
|
var __vue_script__ = script;
|
|
6
6
|
|
|
7
7
|
/* template */
|
|
8
|
-
var __vue_render__ = function() {
|
|
8
|
+
var __vue_render__ = function () {
|
|
9
9
|
var _vm = this;
|
|
10
10
|
var _h = _vm.$createElement;
|
|
11
11
|
var _c = _vm._self._c || _h;
|
|
@@ -15,19 +15,19 @@ var __vue_render__ = function() {
|
|
|
15
15
|
suggestions: _vm.nextQueries,
|
|
16
16
|
"data-test": "next-queries",
|
|
17
17
|
animation: _vm.animation,
|
|
18
|
-
maxItemsToRender: _vm.maxItemsToRender
|
|
18
|
+
maxItemsToRender: _vm.maxItemsToRender,
|
|
19
19
|
},
|
|
20
20
|
scopedSlots: _vm._u(
|
|
21
21
|
[
|
|
22
22
|
{
|
|
23
23
|
key: "default",
|
|
24
|
-
fn: function(ref) {
|
|
24
|
+
fn: function (ref) {
|
|
25
25
|
var suggestion = ref.suggestion;
|
|
26
26
|
var index = ref.index;
|
|
27
27
|
return [
|
|
28
28
|
_vm._t(
|
|
29
29
|
"suggestion",
|
|
30
|
-
function() {
|
|
30
|
+
function () {
|
|
31
31
|
return [
|
|
32
32
|
_c("NextQuery", {
|
|
33
33
|
staticClass: "x-next-queries__suggestion",
|
|
@@ -36,33 +36,28 @@ var __vue_render__ = function() {
|
|
|
36
36
|
[
|
|
37
37
|
{
|
|
38
38
|
key: "default",
|
|
39
|
-
fn: function() {
|
|
39
|
+
fn: function () {
|
|
40
40
|
return [
|
|
41
41
|
_vm._t("suggestion-content", null, null, {
|
|
42
42
|
suggestion: suggestion,
|
|
43
|
-
index: index
|
|
44
|
-
})
|
|
45
|
-
]
|
|
43
|
+
index: index,
|
|
44
|
+
}) ]
|
|
46
45
|
},
|
|
47
|
-
proxy: true
|
|
48
|
-
}
|
|
49
|
-
],
|
|
46
|
+
proxy: true,
|
|
47
|
+
} ],
|
|
50
48
|
null,
|
|
51
49
|
true
|
|
52
|
-
)
|
|
53
|
-
})
|
|
54
|
-
]
|
|
50
|
+
),
|
|
51
|
+
}) ]
|
|
55
52
|
},
|
|
56
53
|
null,
|
|
57
54
|
{ suggestion: suggestion, index: index }
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
],
|
|
55
|
+
) ]
|
|
56
|
+
},
|
|
57
|
+
} ],
|
|
63
58
|
null,
|
|
64
59
|
true
|
|
65
|
-
)
|
|
60
|
+
),
|
|
66
61
|
})
|
|
67
62
|
};
|
|
68
63
|
var __vue_staticRenderFns__ = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-queries.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"nextQueries\"\n data-test=\"next-queries\"\n class=\"x-next-queries\"\n :animation=\"animation\"\n :maxItemsToRender=\"maxItemsToRender\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot Next Query item\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {number} index - Next Query suggestion index\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, index }\">\n <NextQuery :suggestion=\"suggestion\" class=\"x-next-queries__suggestion\">\n <template #default>\n <!--\n @slot Next Query content\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {number} index - Next Query suggestion index\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, index }\" />\n </template>\n </NextQuery>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { NextQuery as NextQueryModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { nextQueriesXModule } from '../x-module';\n import NextQuery from './next-query.vue';\n\n /**\n * Simple next-queries component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A next query is a suggestion for a new search, related to your previous query. I.e. If\n * people normally search for `shirts`, and then `trousers`, `trousers` would be a next query\n * of `shirts`.\n *\n * @public\n */\n @Component({\n components: { NextQuery, BaseSuggestions },\n mixins: [xComponentMixin(nextQueriesXModule)]\n })\n export default class NextQueries extends Vue {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n @Prop()\n protected animation!: Vue;\n\n /**\n * Number of next queries to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The list of next queries.\n *\n * @internal\n */\n @Getter('nextQueries', 'nextQueries')\n public nextQueries!: NextQueryModel[];\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any next\nqueries it will show them\n\n```vue\n<NextQueries />\n```\n\nThe component has two optional props. `animation` to render the component with an animation and\n`maxItemToRender` to limit the number of next queries will be rendered (by default it is 5).\n\n```vue\n<NextQueries :animation=\"FadeAndSlide\" :maxItemsToRender=\"10\" />\n```\n\n## Overriding Next Queries' Content\n\nYou can use your custom implementation of the Next Query's content. In the example below, instead of\nusing the default Next Query's content, an icon is added, as well as a span with the query of the\nNext Query suggestion.\n\n```vue\n<NextQueries>\n <template #suggestion-content=\"{suggestion}\">\n <img src=\"./next-query-icon.svg\" class=\"x-next-query__icon\"/>\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n</NextQueries>\n```\n\n## Adding a custom next query component\n\nYou can use your custom implementation of a next query component. To work correctly, it should use\nthe `emitNextQuerySelected` function when the next query is selected. In the example below, instead\nof using the default `button` tag for a next query, an icon is added, and the text of the next query\nis wrapped in a `span`\n\n```vue\n<NextQueries>\n <template #suggestion=\"{suggestion}\">\n <NextQuery :suggestion=\"suggestion\" class=\"x-next-queries__suggestion\">\n <template #default=\"{suggestion}\">\n <img src=\"./next-query-icon.svg\" class=\"x-next-query__icon\"/>\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQuery>\n <button>Custom Behaviour</button>\n </template>\n</NextQueries>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA
|
|
1
|
+
{"version":3,"file":"next-queries.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"nextQueries\"\n data-test=\"next-queries\"\n class=\"x-next-queries\"\n :animation=\"animation\"\n :maxItemsToRender=\"maxItemsToRender\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot Next Query item\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {number} index - Next Query suggestion index\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, index }\">\n <NextQuery :suggestion=\"suggestion\" class=\"x-next-queries__suggestion\">\n <template #default>\n <!--\n @slot Next Query content\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {number} index - Next Query suggestion index\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, index }\" />\n </template>\n </NextQuery>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { NextQuery as NextQueryModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { nextQueriesXModule } from '../x-module';\n import NextQuery from './next-query.vue';\n\n /**\n * Simple next-queries component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A next query is a suggestion for a new search, related to your previous query. I.e. If\n * people normally search for `shirts`, and then `trousers`, `trousers` would be a next query\n * of `shirts`.\n *\n * @public\n */\n @Component({\n components: { NextQuery, BaseSuggestions },\n mixins: [xComponentMixin(nextQueriesXModule)]\n })\n export default class NextQueries extends Vue {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n @Prop()\n protected animation!: Vue;\n\n /**\n * Number of next queries to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The list of next queries.\n *\n * @internal\n */\n @Getter('nextQueries', 'nextQueries')\n public nextQueries!: NextQueryModel[];\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Basic example\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any next\nqueries it will show them\n\n```vue\n<NextQueries />\n```\n\nThe component has two optional props. `animation` to render the component with an animation and\n`maxItemToRender` to limit the number of next queries will be rendered (by default it is 5).\n\n```vue\n<NextQueries :animation=\"FadeAndSlide\" :maxItemsToRender=\"10\" />\n```\n\n## Overriding Next Queries' Content\n\nYou can use your custom implementation of the Next Query's content. In the example below, instead of\nusing the default Next Query's content, an icon is added, as well as a span with the query of the\nNext Query suggestion.\n\n```vue\n<NextQueries>\n <template #suggestion-content=\"{suggestion}\">\n <img src=\"./next-query-icon.svg\" class=\"x-next-query__icon\"/>\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n</NextQueries>\n```\n\n## Adding a custom next query component\n\nYou can use your custom implementation of a next query component. To work correctly, it should use\nthe `emitNextQuerySelected` function when the next query is selected. In the example below, instead\nof using the default `button` tag for a next query, an icon is added, and the text of the next query\nis wrapped in a `span`\n\n```vue\n<NextQueries>\n <template #suggestion=\"{suggestion}\">\n <NextQuery :suggestion=\"suggestion\" class=\"x-next-queries__suggestion\">\n <template #default=\"{suggestion}\">\n <img src=\"./next-query-icon.svg\" class=\"x-next-query__icon\"/>\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQuery>\n <button>Custom Behaviour</button>\n </template>\n</NextQueries>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import script from './next-query.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,29 +15,27 @@ var __vue_render__ = function() {
|
|
|
15
15
|
suggestion: _vm.suggestion,
|
|
16
16
|
suggestionSelectedEvents: _vm.events,
|
|
17
17
|
"data-test": "next-query",
|
|
18
|
-
feature: "next_query"
|
|
18
|
+
feature: "next_query",
|
|
19
19
|
},
|
|
20
20
|
scopedSlots: _vm._u(
|
|
21
21
|
[
|
|
22
22
|
{
|
|
23
23
|
key: "default",
|
|
24
|
-
fn: function(ref) {
|
|
24
|
+
fn: function (ref) {
|
|
25
25
|
var suggestion = ref.suggestion;
|
|
26
26
|
return [
|
|
27
27
|
_vm._t(
|
|
28
28
|
"default",
|
|
29
|
-
function() {
|
|
29
|
+
function () {
|
|
30
30
|
return [_vm._v(_vm._s(suggestion.query))]
|
|
31
31
|
},
|
|
32
32
|
{ suggestion: suggestion }
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
],
|
|
33
|
+
) ]
|
|
34
|
+
},
|
|
35
|
+
} ],
|
|
38
36
|
null,
|
|
39
37
|
true
|
|
40
|
-
)
|
|
38
|
+
),
|
|
41
39
|
})
|
|
42
40
|
};
|
|
43
41
|
var __vue_staticRenderFns__ = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-query.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-query.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n class=\"x-next-query\"\n :suggestion=\"suggestion\"\n :suggestionSelectedEvents=\"events\"\n data-test=\"next-query\"\n feature=\"next_query\"\n >\n <template #default=\"{ suggestion }\">\n <!--\n @slot Next Query content\n @binding {Suggestion} suggestion - Next Query suggestion data\n -->\n <slot :suggestion=\"suggestion\">{{ suggestion.query }}</slot>\n </template>\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { NextQuery as NextQueryModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { nextQueriesXModule } from '../x-module';\n\n /**\n * Renders a next query item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the next query content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\n @Component({\n components: { BaseSuggestion },\n mixins: [xComponentMixin(nextQueriesXModule)]\n })\n export default class NextQuery extends Vue {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: NextQueryModel;\n\n /**\n * Events list which are going to be emitted when a next query is selected.\n *\n * @returns The {@link XEvent | XEvents} to emit.\n * @public\n */\n protected get events(): Partial<XEventsTypes> {\n return {\n UserSelectedANextQuery: this.suggestion\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the next query.\n\n## Basic Usage\n\nUsing default slot:\n\n```vue\n<NextQuery :suggestion=\"suggestion\" />\n```\n\n## Overriding default slot.\n\nThe default slot allows you to replace the content of the suggestion button.\n\n```vue\n<NextQuery :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <img class=\"x-next-query__icon\" src=\"./next-query.svg\" />\n <span class=\"x-next-query__query\" :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n</NextQuery>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserSelectedANextQuery`: the event is emitted after the user clicks the button. The event payload\n is the next query data.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA
|
|
1
|
+
{"version":3,"file":"next-query.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-query.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n class=\"x-next-query\"\n :suggestion=\"suggestion\"\n :suggestionSelectedEvents=\"events\"\n data-test=\"next-query\"\n feature=\"next_query\"\n >\n <template #default=\"{ suggestion }\">\n <!--\n @slot Next Query content\n @binding {Suggestion} suggestion - Next Query suggestion data\n -->\n <slot :suggestion=\"suggestion\">{{ suggestion.query }}</slot>\n </template>\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { NextQuery as NextQueryModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { nextQueriesXModule } from '../x-module';\n\n /**\n * Renders a next query item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the next query content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\n @Component({\n components: { BaseSuggestion },\n mixins: [xComponentMixin(nextQueriesXModule)]\n })\n export default class NextQuery extends Vue {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: NextQueryModel;\n\n /**\n * Events list which are going to be emitted when a next query is selected.\n *\n * @returns The {@link XEvent | XEvents} to emit.\n * @public\n */\n protected get events(): Partial<XEventsTypes> {\n return {\n UserSelectedANextQuery: this.suggestion\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the next query.\n\n## Basic Usage\n\nUsing default slot:\n\n```vue\n<NextQuery :suggestion=\"suggestion\" />\n```\n\n## Overriding default slot.\n\nThe default slot allows you to replace the content of the suggestion button.\n\n```vue\n<NextQuery :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <img class=\"x-next-query__icon\" src=\"./next-query.svg\" />\n <span class=\"x-next-query__query\" :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n</NextQuery>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserSelectedANextQuery`: the event is emitted after the user clicks the button. The event payload\n is the next query data.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import script from './popular-search.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,29 +15,27 @@ var __vue_render__ = function() {
|
|
|
15
15
|
suggestion: _vm.suggestion,
|
|
16
16
|
suggestionSelectedEvents: _vm.events,
|
|
17
17
|
"data-test": "popular-search",
|
|
18
|
-
feature: "popular_search"
|
|
18
|
+
feature: "popular_search",
|
|
19
19
|
},
|
|
20
20
|
scopedSlots: _vm._u(
|
|
21
21
|
[
|
|
22
22
|
{
|
|
23
23
|
key: "default",
|
|
24
|
-
fn: function(ref) {
|
|
24
|
+
fn: function (ref) {
|
|
25
25
|
var suggestion = ref.suggestion;
|
|
26
26
|
return [
|
|
27
27
|
_vm._t(
|
|
28
28
|
"default",
|
|
29
|
-
function() {
|
|
29
|
+
function () {
|
|
30
30
|
return [_vm._v(_vm._s(suggestion.query))]
|
|
31
31
|
},
|
|
32
32
|
{ suggestion: suggestion }
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
],
|
|
33
|
+
) ]
|
|
34
|
+
},
|
|
35
|
+
} ],
|
|
38
36
|
null,
|
|
39
37
|
true
|
|
40
|
-
)
|
|
38
|
+
),
|
|
41
39
|
})
|
|
42
40
|
};
|
|
43
41
|
var __vue_staticRenderFns__ = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popular-search.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-search.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n class=\"x-popular-search\"\n :suggestion=\"suggestion\"\n :suggestionSelectedEvents=\"events\"\n data-test=\"popular-search\"\n feature=\"popular_search\"\n >\n <template #default=\"{ suggestion }\">\n <!--\n @slot Popular Search's content\n @binding {Suggestion} suggestion - Popular Search suggestion data\n -->\n <slot :suggestion=\"suggestion\">{{ suggestion.query }}</slot>\n </template>\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { popularSearchesXModule } from '../x-module';\n\n /**\n * Renders a popular search item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the popular search content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\n @Component({\n components: { BaseSuggestion },\n mixins: [xComponentMixin(popularSearchesXModule)]\n })\n export default class PopularSearch extends Vue {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: Suggestion;\n\n /**\n * Events list which are going to be emitted when a popular search is selected.\n *\n * @returns The {@link XEvent | XEvents} to emit.\n * @public\n */\n protected get events(): Partial<XEventsTypes> {\n return {\n UserSelectedAPopularSearch: this.suggestion\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the popular search.\n\n## Basic Usage\n\n```vue\n<PopularSearch :suggestion=\"suggestion\" />\n```\n\n## Custom Usage\n\n```vue\n<PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <svg height=\"10\" width=\"10\">\n <circle cx=\"5\" cy=\"5\" r=\"4\" stroke=\"black\" />\n </svg>\n <span :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n</PopularSearch>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserSelectedAPopularSearch`: the event is emitted after the user clicks the button. The event\n payload is the popular search data.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA
|
|
1
|
+
{"version":3,"file":"popular-search.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-search.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n class=\"x-popular-search\"\n :suggestion=\"suggestion\"\n :suggestionSelectedEvents=\"events\"\n data-test=\"popular-search\"\n feature=\"popular_search\"\n >\n <template #default=\"{ suggestion }\">\n <!--\n @slot Popular Search's content\n @binding {Suggestion} suggestion - Popular Search suggestion data\n -->\n <slot :suggestion=\"suggestion\">{{ suggestion.query }}</slot>\n </template>\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { popularSearchesXModule } from '../x-module';\n\n /**\n * Renders a popular search item which receives the suggestion that will be rendered as a prop. It\n * exposes a default slot to change the popular search content. If the slot is not overridden,\n * it will render the suggestion query by default.\n *\n * @public\n */\n @Component({\n components: { BaseSuggestion },\n mixins: [xComponentMixin(popularSearchesXModule)]\n })\n export default class PopularSearch extends Vue {\n /**\n * The suggestion to render and use in the default slot.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: Suggestion;\n\n /**\n * Events list which are going to be emitted when a popular search is selected.\n *\n * @returns The {@link XEvent | XEvents} to emit.\n * @public\n */\n protected get events(): Partial<XEventsTypes> {\n return {\n UserSelectedAPopularSearch: this.suggestion\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\nThis components expects just a suggestion as a prop to be rendered. It has a slot to override the\ncontent. By default, it renders the suggestion query of the popular search.\n\n## Basic Usage\n\n```vue\n<PopularSearch :suggestion=\"suggestion\" />\n```\n\n## Custom Usage\n\n```vue\n<PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <svg height=\"10\" width=\"10\">\n <circle cx=\"5\" cy=\"5\" r=\"4\" stroke=\"black\" />\n </svg>\n <span :aria-label=\"suggestion.query\">{{ suggestion.query }}</span>\n </template>\n</PopularSearch>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserSelectedAPopularSearch`: the event is emitted after the user clicks the button. The event\n payload is the popular search data.\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import script from './popular-searches.vue_rollup-plugin-vue=script.js';
|
|
|
5
5
|
var __vue_script__ = script;
|
|
6
6
|
|
|
7
7
|
/* template */
|
|
8
|
-
var __vue_render__ = function() {
|
|
8
|
+
var __vue_render__ = function () {
|
|
9
9
|
var _vm = this;
|
|
10
10
|
var _h = _vm.$createElement;
|
|
11
11
|
var _c = _vm._self._c || _h;
|
|
@@ -15,19 +15,19 @@ var __vue_render__ = function() {
|
|
|
15
15
|
suggestions: _vm.popularSearches,
|
|
16
16
|
maxItemsToRender: _vm.maxItemsToRender,
|
|
17
17
|
"data-test": "popular-searches",
|
|
18
|
-
animation: _vm.animation
|
|
18
|
+
animation: _vm.animation,
|
|
19
19
|
},
|
|
20
20
|
scopedSlots: _vm._u(
|
|
21
21
|
[
|
|
22
22
|
{
|
|
23
23
|
key: "default",
|
|
24
|
-
fn: function(ref) {
|
|
24
|
+
fn: function (ref) {
|
|
25
25
|
var suggestion = ref.suggestion;
|
|
26
26
|
var index = ref.index;
|
|
27
27
|
return [
|
|
28
28
|
_vm._t(
|
|
29
29
|
"suggestion",
|
|
30
|
-
function() {
|
|
30
|
+
function () {
|
|
31
31
|
return [
|
|
32
32
|
_c("PopularSearch", {
|
|
33
33
|
staticClass: "x-popular-searches__suggestion",
|
|
@@ -36,33 +36,28 @@ var __vue_render__ = function() {
|
|
|
36
36
|
[
|
|
37
37
|
{
|
|
38
38
|
key: "default",
|
|
39
|
-
fn: function() {
|
|
39
|
+
fn: function () {
|
|
40
40
|
return [
|
|
41
41
|
_vm._t("suggestion-content", null, null, {
|
|
42
42
|
suggestion: suggestion,
|
|
43
|
-
index: index
|
|
44
|
-
})
|
|
45
|
-
]
|
|
43
|
+
index: index,
|
|
44
|
+
}) ]
|
|
46
45
|
},
|
|
47
|
-
proxy: true
|
|
48
|
-
}
|
|
49
|
-
],
|
|
46
|
+
proxy: true,
|
|
47
|
+
} ],
|
|
50
48
|
null,
|
|
51
49
|
true
|
|
52
|
-
)
|
|
53
|
-
})
|
|
54
|
-
]
|
|
50
|
+
),
|
|
51
|
+
}) ]
|
|
55
52
|
},
|
|
56
53
|
null,
|
|
57
54
|
{ suggestion: suggestion, index: index }
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
],
|
|
55
|
+
) ]
|
|
56
|
+
},
|
|
57
|
+
} ],
|
|
63
58
|
null,
|
|
64
59
|
true
|
|
65
|
-
)
|
|
60
|
+
),
|
|
66
61
|
})
|
|
67
62
|
};
|
|
68
63
|
var __vue_staticRenderFns__ = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popular-searches.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-searches.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"popularSearches\"\n :maxItemsToRender=\"maxItemsToRender\"\n class=\"x-popular-searches\"\n data-test=\"popular-searches\"\n :animation=\"animation\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot Popular Search item\n @binding {Suggestion} suggestion - Popular Search suggestion data\n @binding {number} index - Popular Search suggestion index\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, index }\">\n <PopularSearch :suggestion=\"suggestion\" class=\"x-popular-searches__suggestion\">\n <template #default>\n <!--\n @slot Popular Search content\n @binding {Suggestion} suggestion - Popular Search suggestion data\n @binding {number} index - Popular Search suggestion index\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, index }\" />\n </template>\n </PopularSearch>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { popularSearchesXModule } from '../x-module';\n import PopularSearch from './popular-search.vue';\n\n /**\n * Simple popular-searches component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A popular search is just a query that has been searched a lot in a certain period and may\n * optionally have associated a set of filters.\n *\n * @public\n */\n @Component({\n components: { PopularSearch, BaseSuggestions },\n mixins: [xComponentMixin(popularSearchesXModule)]\n })\n export default class PopularSearches extends Vue {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n @Prop()\n protected animation!: Vue;\n\n /**\n * Number of popular searches to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The list of popular searches.\n *\n * @internal\n */\n @Getter('popularSearches', 'popularSearches')\n public popularSearches!: Suggestion[];\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Default Usage\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any popular\nsearches it will show them.\n\n```vue\n<PopularSearches />\n```\n\nThe component has two optional props. `animation` to render the component with an animation and\n`maxItemToRender` to limit the number of popular searches will be rendered (by default it is 5).\n\n```vue\n<PopularSearches :animation=\"FadeAndSlide\" :maxItemsToRender=\"10\" />\n```\n\n## Overriding Popular Search's Content\n\nYou can use your custom implementation of the Popular Search's content. In the example below,\ninstead of using the default Popular Search's content, an icon is added, as well as a span with the\nquery of the Popular Search's suggestion.\n\n```vue\n<PopularSearches>\n <template #suggestion-content=\"{ suggestion }\">\n <img class=\"x-popular-search__icon\" src=\"./popular-search-icon.svg\" />\n <span class=\"x-popular-search__query\">{{ suggestion.query }}</span>\n </template>\n</PopularSearches>\n```\n\n## Adding a Custom Popular Search Item\n\nYou can use your custom implementation for the whole Popular Search item. In the example below, we\nchange the default implementation of the Popular Search in Popular Searches. A custom Popular Search\nimplementation is added, it has an image and a span as content (as in the previous example). Also, a\nbutton with a user customized behaviour is added at the same hierarchical level as the Popular\nSearch component.\n\n```vue\n<PopularSearches>\n <template #suggestion=\"{suggestion}\">\n <PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{suggestion}\">\n <img class=\"x-popular-search__icon\" src=\"./popular-search-icon.svg\" />\n <span class=\"x-popular-search__query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearch>\n <button>Custom Behaviour</button>\n </template>\n</PopularSearches>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA
|
|
1
|
+
{"version":3,"file":"popular-searches.vue.js","sources":["../../../../../src/x-modules/popular-searches/components/popular-searches.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"popularSearches\"\n :maxItemsToRender=\"maxItemsToRender\"\n class=\"x-popular-searches\"\n data-test=\"popular-searches\"\n :animation=\"animation\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot Popular Search item\n @binding {Suggestion} suggestion - Popular Search suggestion data\n @binding {number} index - Popular Search suggestion index\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, index }\">\n <PopularSearch :suggestion=\"suggestion\" class=\"x-popular-searches__suggestion\">\n <template #default>\n <!--\n @slot Popular Search content\n @binding {Suggestion} suggestion - Popular Search suggestion data\n @binding {number} index - Popular Search suggestion index\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, index }\" />\n </template>\n </PopularSearch>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { popularSearchesXModule } from '../x-module';\n import PopularSearch from './popular-search.vue';\n\n /**\n * Simple popular-searches component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A popular search is just a query that has been searched a lot in a certain period and may\n * optionally have associated a set of filters.\n *\n * @public\n */\n @Component({\n components: { PopularSearch, BaseSuggestions },\n mixins: [xComponentMixin(popularSearchesXModule)]\n })\n export default class PopularSearches extends Vue {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n @Prop()\n protected animation!: Vue;\n\n /**\n * Number of popular searches to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The list of popular searches.\n *\n * @internal\n */\n @Getter('popularSearches', 'popularSearches')\n public popularSearches!: Suggestion[];\n }\n</script>\n\n<docs lang=\"mdx\">\n# Examples\n\n## Default Usage\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any popular\nsearches it will show them.\n\n```vue\n<PopularSearches />\n```\n\nThe component has two optional props. `animation` to render the component with an animation and\n`maxItemToRender` to limit the number of popular searches will be rendered (by default it is 5).\n\n```vue\n<PopularSearches :animation=\"FadeAndSlide\" :maxItemsToRender=\"10\" />\n```\n\n## Overriding Popular Search's Content\n\nYou can use your custom implementation of the Popular Search's content. In the example below,\ninstead of using the default Popular Search's content, an icon is added, as well as a span with the\nquery of the Popular Search's suggestion.\n\n```vue\n<PopularSearches>\n <template #suggestion-content=\"{ suggestion }\">\n <img class=\"x-popular-search__icon\" src=\"./popular-search-icon.svg\" />\n <span class=\"x-popular-search__query\">{{ suggestion.query }}</span>\n </template>\n</PopularSearches>\n```\n\n## Adding a Custom Popular Search Item\n\nYou can use your custom implementation for the whole Popular Search item. In the example below, we\nchange the default implementation of the Popular Search in Popular Searches. A custom Popular Search\nimplementation is added, it has an image and a span as content (as in the previous example). Also, a\nbutton with a user customized behaviour is added at the same hierarchical level as the Popular\nSearch component.\n\n```vue\n<PopularSearches>\n <template #suggestion=\"{suggestion}\">\n <PopularSearch :suggestion=\"suggestion\">\n <template #default=\"{suggestion}\">\n <img class=\"x-popular-search__icon\" src=\"./popular-search-icon.svg\" />\n <span class=\"x-popular-search__query\">{{ suggestion.query }}</span>\n </template>\n </PopularSearch>\n <button>Custom Behaviour</button>\n </template>\n</PopularSearches>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import script from './query-suggestion.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;
|
|
@@ -17,33 +17,31 @@ var __vue_render__ = function() {
|
|
|
17
17
|
attrs: {
|
|
18
18
|
"aria-label": _vm.suggestion.query,
|
|
19
19
|
"data-test": "query-suggestion",
|
|
20
|
-
feature: "query_suggestion"
|
|
20
|
+
feature: "query_suggestion",
|
|
21
21
|
},
|
|
22
22
|
scopedSlots: _vm._u(
|
|
23
23
|
[
|
|
24
24
|
{
|
|
25
25
|
key: "default",
|
|
26
|
-
fn: function(ref) {
|
|
26
|
+
fn: function (ref) {
|
|
27
27
|
var suggestion = ref.suggestion;
|
|
28
28
|
var queryHTML = ref.queryHTML;
|
|
29
29
|
return [
|
|
30
30
|
_vm._t("default", null, null, {
|
|
31
31
|
suggestion: suggestion,
|
|
32
|
-
queryHTML: queryHTML
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
],
|
|
32
|
+
queryHTML: queryHTML,
|
|
33
|
+
}) ]
|
|
34
|
+
},
|
|
35
|
+
} ],
|
|
38
36
|
null,
|
|
39
37
|
true
|
|
40
|
-
)
|
|
38
|
+
),
|
|
41
39
|
},
|
|
42
40
|
"BaseSuggestion",
|
|
43
41
|
{
|
|
44
42
|
query: _vm.query,
|
|
45
43
|
suggestion: _vm.suggestion,
|
|
46
|
-
suggestionSelectedEvents: _vm.event
|
|
44
|
+
suggestionSelectedEvents: _vm.event,
|
|
47
45
|
},
|
|
48
46
|
false
|
|
49
47
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-suggestion.vue.js","sources":["../../../../../src/x-modules/query-suggestions/components/query-suggestion.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n v-bind=\"{ query, suggestion, suggestionSelectedEvents: event }\"\n :aria-label=\"suggestion.query\"\n class=\"x-query-suggestion\"\n data-test=\"query-suggestion\"\n feature=\"query_suggestion\"\n >\n <template #default=\"{ suggestion, queryHTML }\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Custom content that replaces the `QuerySuggestion` default content\n @binding {Suggestion} suggestion - Query Suggestion data\n @binding {string} queryHTML - Suggestion’s query with the matching part wrapped in a HTML span tag\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ suggestion, queryHTML }\" />\n </template>\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import { Component, Prop, Vue } from 'vue-property-decorator';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { querySuggestionsXModule } from '../x-module';\n\n /**\n * This component renders a suggestion for a query. A query suggestion is a recommended query\n * based on previous search queries. It contains the query itself and a set of filters associated.\n * For example, if you're searching for _shirt_, a query suggestion could be _long sleeve shirt_.\n *\n * @public\n */\n @Component({\n components: { BaseSuggestion },\n mixins: [xComponentMixin(querySuggestionsXModule)]\n })\n export default class QuerySuggestion extends Vue {\n /**\n * The normalized query of the query-suggestions module.\n *\n * @internal\n */\n @Getter('querySuggestions', 'normalizedQuery')\n public query!: string;\n\n /**\n * The suggestion to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: Suggestion;\n\n /**\n * Emits {@link QuerySuggestionsXEvents.UserSelectedAQuerySuggestion} with the suggestion as\n * payload when selecting the query suggestion.\n *\n * @internal\n */\n protected event: Partial<XEventsTypes> = {\n UserSelectedAQuerySuggestion: this.suggestion\n };\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserSelectedAQuerySuggestion`] (./../../api/x-components.querysuggestionsxevents.md)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the <b>Empathize</b> microservice must be\nimplemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you can see how a single query suggestion is rendered using the `suggestion` prop.\n\n```vue\n<template>\n <QuerySuggestion :suggestion=\"suggestion\" />\n</template>\n\n<script>\n import { QuerySuggestion } from '@empathyco/x-components/query-suggestions';\n export default {\n name: 'QuerySuggestionDemo',\n components: {\n QuerySuggestion\n },\n data() {\n return {\n suggestion: {\n modelName: 'QuerySuggestion',\n query: 'beer',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, the query suggestion is painted in blue by passing a color style in the HTML span\nelement.\n\n```vue\n<template>\n <QuerySuggestion :suggestion=\"suggestion\" #default=\"{ queryHTML }\">\n <span v-html=\"queryHTML\" style=\"color: blue;\" />\n </QuerySuggestion>\n</template>\n\n<script>\n import { QuerySuggestion } from '@empathyco/x-components/query-suggestions';\n export default {\n name: 'QuerySuggestionDemo',\n components: {\n QuerySuggestion\n },\n data() {\n return {\n suggestion: {\n modelName: 'QuerySuggestion',\n query: 'beer',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, when you click on the query suggestion, a message is displayed to illustrate that\nthe `UserSelectedAQuerySuggestion` event has been triggered.\n\n```vue\n<template>\n <QuerySuggestion :suggestion=\"suggestion\" @UserSelectedAQuerySuggestion=\"alertSuggestion\" />\n</template>\n\n<script>\n import { QuerySuggestion } from '@empathyco/x-components/query-suggestions';\n export default {\n name: 'QuerySuggestionDemo',\n components: {\n QuerySuggestion\n },\n data() {\n return {\n suggestion: {\n modelName: 'QuerySuggestion',\n query: 'beer',\n facets: []\n }\n };\n },\n methods: {\n alertSuggestion(querySuggestion) {\n alert(`You have clicked the query suggestion: ${querySuggestion.query}`);\n }\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA
|
|
1
|
+
{"version":3,"file":"query-suggestion.vue.js","sources":["../../../../../src/x-modules/query-suggestions/components/query-suggestion.vue"],"sourcesContent":["<template>\n <BaseSuggestion\n v-bind=\"{ query, suggestion, suggestionSelectedEvents: event }\"\n :aria-label=\"suggestion.query\"\n class=\"x-query-suggestion\"\n data-test=\"query-suggestion\"\n feature=\"query_suggestion\"\n >\n <template #default=\"{ suggestion, queryHTML }\">\n <!-- eslint-disable max-len -->\n <!--\n @slot Custom content that replaces the `QuerySuggestion` default content\n @binding {Suggestion} suggestion - Query Suggestion data\n @binding {string} queryHTML - Suggestion’s query with the matching part wrapped in a HTML span tag\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ suggestion, queryHTML }\" />\n </template>\n </BaseSuggestion>\n</template>\n\n<script lang=\"ts\">\n import { Suggestion } from '@empathyco/x-types';\n import { Component, Prop, Vue } from 'vue-property-decorator';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { querySuggestionsXModule } from '../x-module';\n\n /**\n * This component renders a suggestion for a query. A query suggestion is a recommended query\n * based on previous search queries. It contains the query itself and a set of filters associated.\n * For example, if you're searching for _shirt_, a query suggestion could be _long sleeve shirt_.\n *\n * @public\n */\n @Component({\n components: { BaseSuggestion },\n mixins: [xComponentMixin(querySuggestionsXModule)]\n })\n export default class QuerySuggestion extends Vue {\n /**\n * The normalized query of the query-suggestions module.\n *\n * @internal\n */\n @Getter('querySuggestions', 'normalizedQuery')\n public query!: string;\n\n /**\n * The suggestion to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: Suggestion;\n\n /**\n * Emits {@link QuerySuggestionsXEvents.UserSelectedAQuerySuggestion} with the suggestion as\n * payload when selecting the query suggestion.\n *\n * @internal\n */\n protected event: Partial<XEventsTypes> = {\n UserSelectedAQuerySuggestion: this.suggestion\n };\n }\n</script>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserSelectedAQuerySuggestion`] (./../../api/x-components.querysuggestionsxevents.md)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend microservice required\nTo use this component, the <b>Empathize</b> microservice must be\nimplemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you can see how a single query suggestion is rendered using the `suggestion` prop.\n\n```vue\n<template>\n <QuerySuggestion :suggestion=\"suggestion\" />\n</template>\n\n<script>\n import { QuerySuggestion } from '@empathyco/x-components/query-suggestions';\n export default {\n name: 'QuerySuggestionDemo',\n components: {\n QuerySuggestion\n },\n data() {\n return {\n suggestion: {\n modelName: 'QuerySuggestion',\n query: 'beer',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n### Play with default slot\n\nIn this example, the query suggestion is painted in blue by passing a color style in the HTML span\nelement.\n\n```vue\n<template>\n <QuerySuggestion :suggestion=\"suggestion\" #default=\"{ queryHTML }\">\n <span v-html=\"queryHTML\" style=\"color: blue;\" />\n </QuerySuggestion>\n</template>\n\n<script>\n import { QuerySuggestion } from '@empathyco/x-components/query-suggestions';\n export default {\n name: 'QuerySuggestionDemo',\n components: {\n QuerySuggestion\n },\n data() {\n return {\n suggestion: {\n modelName: 'QuerySuggestion',\n query: 'beer',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n### Play with events\n\nIn this example, when you click on the query suggestion, a message is displayed to illustrate that\nthe `UserSelectedAQuerySuggestion` event has been triggered.\n\n```vue\n<template>\n <QuerySuggestion :suggestion=\"suggestion\" @UserSelectedAQuerySuggestion=\"alertSuggestion\" />\n</template>\n\n<script>\n import { QuerySuggestion } from '@empathyco/x-components/query-suggestions';\n export default {\n name: 'QuerySuggestionDemo',\n components: {\n QuerySuggestion\n },\n data() {\n return {\n suggestion: {\n modelName: 'QuerySuggestion',\n query: 'beer',\n facets: []\n }\n };\n },\n methods: {\n alertSuggestion(querySuggestion) {\n alert(`You have clicked the query suggestion: ${querySuggestion.query}`);\n }\n }\n };\n</script>\n```\n</docs>\n"],"names":["const"],"mappings":";;;;AAEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|