@empathyco/x-components 3.0.0-alpha.40 → 3.0.0-alpha.44
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 +81 -0
- package/core/index.js +6 -1
- package/core/index.js.map +1 -1
- package/design-system/base.css +2 -1
- package/design-system/default-theme.css +98 -35
- package/design-system/full-theme.css +571 -47
- package/design-system/grid-default.css +6 -0
- package/design-system/input-group-default.css +16 -7
- package/design-system/list-default.css +0 -5
- package/design-system/list-gap.css +141 -1
- package/design-system/option-list-bottom.css +76 -10
- package/design-system/option-list-default.css +39 -2
- package/design-system/result-default.css +1 -1
- package/design-system/row-gap.css +61 -1
- package/design-system/sliding-panel-default.css +15 -17
- package/design-system/sliding-panel-default.token.css +0 -2
- package/design-system/typography-default.css +1 -0
- package/design-system/utilities-background-color.css +3 -0
- package/design-system/utilities-border-color.css +3 -0
- package/design-system/utilities-flex.css +32 -0
- package/design-system/utilities-font-color.css +3 -0
- package/design-system/utilities-font-size.css +79 -0
- package/design-system/utilities-line-clamp.css +29 -0
- package/design-system/utilities-line-height.css +17 -0
- package/design-system/utilities-position.css +14 -0
- package/design-system/utilities-text-decoration.css +15 -0
- package/design-system/utilities-text-transform.css +11 -0
- package/docs/API-reference/api/x-components.arrowdownicon.md +11 -0
- package/docs/API-reference/api/x-components.arrowlefticon.md +11 -0
- package/docs/API-reference/api/x-components.arrowrighticon.md +11 -0
- package/docs/API-reference/api/{x-components.arrowicon.md → x-components.arrowupicon.md} +2 -2
- package/docs/API-reference/api/x-components.baseresultrating.link.md +13 -0
- package/docs/API-reference/api/x-components.baseresultrating.md +22 -0
- package/docs/API-reference/api/x-components.baseresultrating.result.md +13 -0
- package/docs/API-reference/api/x-components.grid2rowsicon.md +11 -0
- package/docs/API-reference/api/x-components.md +6 -1
- package/docs/API-reference/api/x-components.nextqueries.highlightcurated.md +13 -0
- package/docs/API-reference/api/x-components.nextquery.highlightcurated.md +13 -0
- package/docs/API-reference/api/x-components.nextquery.md +1 -0
- package/docs/API-reference/api/x-components.slidingpanel.buttonclass.md +13 -0
- package/docs/API-reference/api/x-components.slidingpanel.md +1 -0
- package/docs/API-reference/api/x-components.xeventstypes.md +1 -0
- package/docs/API-reference/api/x-components.xeventstypes.userclickedaresultrating.md +13 -0
- package/docs/API-reference/components/common/icons/x-components.arrow-down.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.arrow-left.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.arrow-right.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.arrow-up.md +7 -0
- package/docs/API-reference/components/common/icons/x-components.grid-2-rows.md +7 -0
- package/docs/API-reference/components/common/result/x-components.base-result-rating.md +254 -0
- package/docs/API-reference/components/common/x-components.base-rating.md +6 -6
- package/docs/API-reference/components/common/x-components.sliding-panel.md +1 -0
- package/docs/API-reference/components/next-queries/x-components.next-queries.md +17 -11
- package/docs/API-reference/components/next-queries/x-components.next-query.md +16 -7
- package/js/components/base-rating.vue.js +4 -4
- package/js/components/base-rating.vue.js.map +1 -1
- package/js/components/filters/labels/base-rating-filter-label.vue.js +2 -2
- package/js/components/filters/labels/base-rating-filter-label.vue.js.map +1 -1
- package/js/components/icons/arrow-down.vue.js +61 -0
- package/js/components/icons/arrow-down.vue.js.map +1 -0
- package/js/components/icons/arrow-down.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/arrow-down.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/{arrow.vue.js → arrow-left.vue.js} +2 -2
- package/js/components/icons/arrow-left.vue.js.map +1 -0
- package/js/components/icons/arrow-left.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/arrow-left.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/arrow-right.vue.js +61 -0
- package/js/components/icons/arrow-right.vue.js.map +1 -0
- package/js/components/icons/arrow-right.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/arrow-right.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/arrow-up.vue.js +61 -0
- package/js/components/icons/arrow-up.vue.js.map +1 -0
- package/js/components/icons/arrow-up.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/arrow-up.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/grid-2-rows.vue.js +65 -0
- package/js/components/icons/grid-2-rows.vue.js.map +1 -0
- package/js/components/icons/grid-2-rows.vue_rollup-plugin-vue=script.js +4 -0
- package/js/components/icons/grid-2-rows.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/icons/tag.vue.js +1 -1
- package/js/components/icons/tag.vue.js.map +1 -1
- package/js/components/result/base-result-rating.vue.js +99 -0
- package/js/components/result/base-result-rating.vue.js.map +1 -0
- package/js/components/result/base-result-rating.vue_rollup-plugin-vue=script.js +42 -0
- package/js/components/result/base-result-rating.vue_rollup-plugin-vue=script.js.map +1 -0
- package/js/components/sliding-panel.vue.js +6 -4
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js +3 -0
- package/js/components/sliding-panel.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/index.js +6 -1
- package/js/index.js.map +1 -1
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/extra-params/components/extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/extra-params/components/renderless-extra-param.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/extra-params/components/snippet-config-extra-params.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue_rollup-plugin-vue=script.js +6 -1
- 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 +6 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/facets/components/filters/all-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/facets/components/filters/base-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/number-range-filter.vue_rollup-plugin-vue=script.js +6 -1
- 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 +6 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/filters/simple-filter.vue_rollup-plugin-vue=script.js +6 -1
- 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 +6 -1
- package/js/x-modules/facets/components/lists/exclude-filters-with-no-results.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js +6 -1
- 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_rollup-plugin-vue=script.js +6 -1
- 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 +6 -1
- package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js +15 -4
- 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 +3 -0
- package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue.js +6 -1
- package/js/x-modules/next-queries/components/next-query.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js +18 -0
- package/js/x-modules/next-queries/components/next-query.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/main-scroll-item.vue_rollup-plugin-vue=script.js +6 -1
- 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_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/scroll/components/window-scroll.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue=script.js.map +1 -1
- package/js/x-modules/search/components/sort.mixin.js +6 -1
- package/js/x-modules/search/components/sort.mixin.js.map +1 -1
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js +6 -1
- package/js/x-modules/search/components/spellcheck.vue_rollup-plugin-vue=script.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +278 -2
- package/report/x-components.api.md +27 -1
- package/types/adapter/util.d.ts.map +1 -1
- package/types/components/icons/arrow-down.vue.d.ts +3 -0
- package/types/components/icons/arrow-down.vue.d.ts.map +1 -0
- package/types/components/icons/arrow-left.vue.d.ts +3 -0
- package/types/components/icons/arrow-left.vue.d.ts.map +1 -0
- package/types/components/icons/arrow-right.vue.d.ts +3 -0
- package/types/components/icons/arrow-right.vue.d.ts.map +1 -0
- package/types/components/icons/arrow-up.vue.d.ts +3 -0
- package/types/components/icons/arrow-up.vue.d.ts.map +1 -0
- package/types/components/icons/grid-2-rows.vue.d.ts +3 -0
- package/types/components/icons/grid-2-rows.vue.d.ts.map +1 -0
- package/types/components/icons/index.d.ts +5 -1
- package/types/components/icons/index.d.ts.map +1 -1
- package/types/components/result/base-result-rating.vue.d.ts +29 -0
- package/types/components/result/base-result-rating.vue.d.ts.map +1 -0
- package/types/components/result/index.d.ts +1 -0
- package/types/components/result/index.d.ts.map +1 -1
- package/types/components/sliding-panel.vue.d.ts +6 -0
- package/types/components/sliding-panel.vue.d.ts.map +1 -1
- package/types/views/base-config.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts +5 -0
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/x-modules/next-queries/components/next-queries.vue.d.ts +6 -0
- package/types/x-modules/next-queries/components/next-queries.vue.d.ts.map +1 -1
- package/types/x-modules/next-queries/components/next-query.vue.d.ts +14 -0
- package/types/x-modules/next-queries/components/next-query.vue.d.ts.map +1 -1
- package/docs/API-reference/components/common/icons/x-components.arrow.md +0 -7
- package/js/components/icons/arrow.vue.js.map +0 -1
- package/js/components/icons/arrow.vue_rollup-plugin-vue=script.js +0 -4
- package/js/components/icons/arrow.vue_rollup-plugin-vue=script.js.map +0 -1
- package/types/components/icons/arrow.vue.d.ts +0 -3
- package/types/components/icons/arrow.vue.d.ts.map +0 -1
|
@@ -27,7 +27,10 @@ import '../../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
|
27
27
|
import '../../../../components/icons/star.vue.js';
|
|
28
28
|
import '../../../../components/base-rating.vue.js';
|
|
29
29
|
import '../../../../components/filters/labels/base-rating-filter-label.vue.js';
|
|
30
|
-
import '../../../../components/icons/arrow.vue.js';
|
|
30
|
+
import '../../../../components/icons/arrow-down.vue.js';
|
|
31
|
+
import '../../../../components/icons/arrow-left.vue.js';
|
|
32
|
+
import '../../../../components/icons/arrow-right.vue.js';
|
|
33
|
+
import '../../../../components/icons/arrow-up.vue.js';
|
|
31
34
|
import '../../../../components/icons/bag.vue.js';
|
|
32
35
|
import '../../../../components/icons/bar-code.vue.js';
|
|
33
36
|
import '../../../../components/icons/barcode-tiny.vue.js';
|
|
@@ -51,6 +54,7 @@ import '../../../../components/icons/cross.vue.js';
|
|
|
51
54
|
import '../../../../components/icons/filters.vue.js';
|
|
52
55
|
import '../../../../components/icons/grid-1-col.vue.js';
|
|
53
56
|
import '../../../../components/icons/grid-2-col.vue.js';
|
|
57
|
+
import '../../../../components/icons/grid-2-rows.vue.js';
|
|
54
58
|
import '../../../../components/icons/hide.vue.js';
|
|
55
59
|
import '../../../../components/icons/history-tiny.vue.js';
|
|
56
60
|
import '../../../../components/icons/history.vue.js';
|
|
@@ -97,6 +101,7 @@ import '../../../../components/result/base-result-link.vue.js';
|
|
|
97
101
|
import '../../../../components/result/base-result-previous-price.vue.js';
|
|
98
102
|
import '../../../../components/result/base-result-fallback-image.vue.js';
|
|
99
103
|
import '../../../../components/result/base-result-placeholder-image.vue.js';
|
|
104
|
+
import '../../../../components/result/base-result-rating.vue.js';
|
|
100
105
|
import '../../../../components/suggestions/base-suggestion.vue.js';
|
|
101
106
|
import '../../../../components/suggestions/base-suggestions.vue.js';
|
|
102
107
|
import '../../../../components/auto-progress-bar.vue.js';
|
package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue=script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters-search.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/filters-search.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Filter, isBooleanFilter } from '@empathyco/x-types';\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop, Watch } from 'vue-property-decorator';\nimport { xComponentMixin, XProvide } from '../../../../components';\nimport { debounce } from '../../../../utils/debounce';\nimport { normalizeString } from '../../../../utils/normalize';\nimport { DebouncedFunction, VueCSSClasses } from '../../../../utils/types';\nimport { facetsXModule } from '../../x-module';\nimport FiltersInjectionMixin from './filters-injection.mixin';\n\n/**\n * Renders the filters sifted with the input query.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class FiltersSearch extends mixins(FiltersInjectionMixin) {\n /** The debounce time for applying the filter sifting. */\n @Prop({ default: 200 })\n protected debounceInMs!: number;\n\n protected query = '';\n protected setQueryDebounced!: DebouncedFunction<[string]>;\n\n /**\n * Set the debounce function for setting the query debounced.\n *\n * @internal\n */\n @Watch('debounceInMs', { immediate: true })\n updateSetQueryDebounced(): void {\n this.setQueryDebounced = debounce(query => {\n this.query = query;\n }, this.debounceInMs);\n }\n\n /**\n * Sift the array of filters which matches with the query.\n *\n * @returns Array of sifted filters.\n * @internal\n */\n @XProvide('filters')\n public get siftedFilters(): Filter[] {\n const normalizedQuery = normalizeString(this.query);\n return this.renderedFilters.filter(\n filter => isBooleanFilter(filter) && normalizeString(filter.label).includes(normalizedQuery)\n );\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-filters-search--is-sifted': !!this.query\n };\n }\n\n /**\n * Set the query through the debounced function.\n *\n * @param query - The query to sift filters.\n * @internal\n */\n protected setQuery(query: string): void {\n this.setQueryDebounced(query);\n }\n\n /**\n * Clear the query.\n *\n * @internal\n */\n protected clearQuery(): void {\n this.query = '';\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filters-search.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/filters-search.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Filter, isBooleanFilter } from '@empathyco/x-types';\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop, Watch } from 'vue-property-decorator';\nimport { xComponentMixin, XProvide } from '../../../../components';\nimport { debounce } from '../../../../utils/debounce';\nimport { normalizeString } from '../../../../utils/normalize';\nimport { DebouncedFunction, VueCSSClasses } from '../../../../utils/types';\nimport { facetsXModule } from '../../x-module';\nimport FiltersInjectionMixin from './filters-injection.mixin';\n\n/**\n * Renders the filters sifted with the input query.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class FiltersSearch extends mixins(FiltersInjectionMixin) {\n /** The debounce time for applying the filter sifting. */\n @Prop({ default: 200 })\n protected debounceInMs!: number;\n\n protected query = '';\n protected setQueryDebounced!: DebouncedFunction<[string]>;\n\n /**\n * Set the debounce function for setting the query debounced.\n *\n * @internal\n */\n @Watch('debounceInMs', { immediate: true })\n updateSetQueryDebounced(): void {\n this.setQueryDebounced = debounce(query => {\n this.query = query;\n }, this.debounceInMs);\n }\n\n /**\n * Sift the array of filters which matches with the query.\n *\n * @returns Array of sifted filters.\n * @internal\n */\n @XProvide('filters')\n public get siftedFilters(): Filter[] {\n const normalizedQuery = normalizeString(this.query);\n return this.renderedFilters.filter(\n filter => isBooleanFilter(filter) && normalizeString(filter.label).includes(normalizedQuery)\n );\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The class to be added to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-filters-search--is-sifted': !!this.query\n };\n }\n\n /**\n * Set the query through the debounced function.\n *\n * @param query - The query to sift filters.\n * @internal\n */\n protected setQuery(query: string): void {\n this.setQueryDebounced(query);\n }\n\n /**\n * Clear the query.\n *\n * @internal\n */\n protected clearQuery(): void {\n this.query = '';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;;;;;AAQA;IAA2C,iCAA6B;IAAxE;QAAA,qEAgEC;QA3DW,WAAK,GAAG,EAAE,CAAC;;KA2DtB;;;;;;IAlDC,+CAAuB,GAAvB;QADA,iBAKC;QAHC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,UAAA,KAAK;YACrC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACpB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;KACvB;IASD,sBAAW,wCAAa;;;;;;;aAAxB;YACE,IAAM,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpD,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAChC,UAAA,MAAM,IAAI,OAAA,eAAe,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,GAAA,CAC7F,CAAC;SACH;;;OAAA;IAQD,sBAAc,qCAAU;;;;;;;aAAxB;YACE,OAAO;gBACL,6BAA6B,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK;aAC5C,CAAC;SACH;;;OAAA;;;;;;;IAQS,gCAAQ,GAAlB,UAAmB,KAAa;QAC9B,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;KAC/B;;;;;;IAOS,kCAAU,GAApB;QACE,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;KACjB;IA5DD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;uDACS;IAWhC;QADC,KAAK,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gEAK1C;IASD;QADC,QAAQ,CAAC,SAAS,CAAC;sDAMnB;IAhCkB,aAAa;QAHjC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,aAAa,CAgEjC;IAAD,oBAAC;CAhED,CAA2C,MAAM,CAAC,qBAAqB,CAAC;;;;"}
|
package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js
CHANGED
|
@@ -24,7 +24,10 @@ import '../../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
|
24
24
|
import '../../../../components/icons/star.vue.js';
|
|
25
25
|
import '../../../../components/base-rating.vue.js';
|
|
26
26
|
import '../../../../components/filters/labels/base-rating-filter-label.vue.js';
|
|
27
|
-
import '../../../../components/icons/arrow.vue.js';
|
|
27
|
+
import '../../../../components/icons/arrow-down.vue.js';
|
|
28
|
+
import '../../../../components/icons/arrow-left.vue.js';
|
|
29
|
+
import '../../../../components/icons/arrow-right.vue.js';
|
|
30
|
+
import '../../../../components/icons/arrow-up.vue.js';
|
|
28
31
|
import '../../../../components/icons/bag.vue.js';
|
|
29
32
|
import '../../../../components/icons/bar-code.vue.js';
|
|
30
33
|
import '../../../../components/icons/barcode-tiny.vue.js';
|
|
@@ -48,6 +51,7 @@ import '../../../../components/icons/cross.vue.js';
|
|
|
48
51
|
import '../../../../components/icons/filters.vue.js';
|
|
49
52
|
import '../../../../components/icons/grid-1-col.vue.js';
|
|
50
53
|
import '../../../../components/icons/grid-2-col.vue.js';
|
|
54
|
+
import '../../../../components/icons/grid-2-rows.vue.js';
|
|
51
55
|
import '../../../../components/icons/hide.vue.js';
|
|
52
56
|
import '../../../../components/icons/history-tiny.vue.js';
|
|
53
57
|
import '../../../../components/icons/history.vue.js';
|
|
@@ -94,6 +98,7 @@ import '../../../../components/result/base-result-link.vue.js';
|
|
|
94
98
|
import '../../../../components/result/base-result-previous-price.vue.js';
|
|
95
99
|
import '../../../../components/result/base-result-fallback-image.vue.js';
|
|
96
100
|
import '../../../../components/result/base-result-placeholder-image.vue.js';
|
|
101
|
+
import '../../../../components/result/base-result-rating.vue.js';
|
|
97
102
|
import '../../../../components/suggestions/base-suggestion.vue.js';
|
|
98
103
|
import '../../../../components/suggestions/base-suggestions.vue.js';
|
|
99
104
|
import '../../../../components/auto-progress-bar.vue.js';
|
package/js/x-modules/facets/components/lists/selected-filters.vue_rollup-plugin-vue=script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selected-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/selected-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport { Facet, Filter } from '@empathyco/x-types';\nimport { Component, Prop, Vue } from 'vue-property-decorator';\nimport { Getter } from '../../../../components/decorators/store.decorators';\nimport { NoElement } from '../../../../components';\nimport { xComponentMixin } from '../../../../components/x-component.mixin';\nimport { FiltersByFacet } from '../../store/types';\nimport { facetsXModule } from '../../x-module';\n\n/**\n * Provides a scoped slot with the selected filters from every facet, or from the facet which\n * facet id is passed as property.\n *\n * The default slot renders the length of the selected filters array.\n * The property \"alwaysVisible\" handles if the component is rendered if no filters are selected.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)],\n components: {\n NoElement\n }\n})\nexport default class SelectedFilters extends Vue {\n /**\n * If a facet id is passed as prop, the component filters the selected filters for that facet.\n *\n * @public\n */\n @Prop()\n protected facetId: Facet['id'] | undefined;\n\n /**\n * It handles if the SelectedFilters component is always rendered no matter if no filters are\n * selected.\n * If true, the SelectedFilters component is always rendered.\n * If false, the SelectedFilters component is not rendered whether no filters are selected.\n *\n * @public\n */\n @Prop({ default: false })\n protected alwaysVisible!: boolean;\n\n /**\n * Array of selected filters from every facet.\n *\n * @public\n */\n @Getter('facets', 'selectedFilters')\n public selectedFiltersGetter!: Filter[];\n\n /**\n * Dictionary of selected filters grouped by facet.\n *\n * @public\n */\n @Getter('facets', 'selectedFiltersByFacet')\n public selectedFiltersByFacet!: FiltersByFacet;\n\n /**\n * It returns an array of selected filters. If a facet id is passed as prop to the component,\n * only the selected filters of that facet are returned. If not, it returns selected filters of\n * every facet.\n *\n * @returns Array of selected filters.\n *\n * @internal\n */\n protected get selectedFilters(): Filter[] {\n return this.facetId === undefined\n ? this.selectedFiltersGetter\n : this.selectedFiltersByFacet[this.facetId] ?? [];\n }\n\n /**\n * If \"alwaysVisible\" prop is true, returns true.\n * If \"alwaysVisible\" prop is false, returns true or false depending on if there are some\n * filter selected.\n *\n * @returns True if \"alwaysVisible\" is true. True or false depending on if there are some filter\n * selected.\n *\n * @internal\n */\n protected get show(): boolean {\n return this.alwaysVisible || this.selectedFilters.length > 0;\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"selected-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/selected-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\nimport { Facet, Filter } from '@empathyco/x-types';\nimport { Component, Prop, Vue } from 'vue-property-decorator';\nimport { Getter } from '../../../../components/decorators/store.decorators';\nimport { NoElement } from '../../../../components';\nimport { xComponentMixin } from '../../../../components/x-component.mixin';\nimport { FiltersByFacet } from '../../store/types';\nimport { facetsXModule } from '../../x-module';\n\n/**\n * Provides a scoped slot with the selected filters from every facet, or from the facet which\n * facet id is passed as property.\n *\n * The default slot renders the length of the selected filters array.\n * The property \"alwaysVisible\" handles if the component is rendered if no filters are selected.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)],\n components: {\n NoElement\n }\n})\nexport default class SelectedFilters extends Vue {\n /**\n * If a facet id is passed as prop, the component filters the selected filters for that facet.\n *\n * @public\n */\n @Prop()\n protected facetId: Facet['id'] | undefined;\n\n /**\n * It handles if the SelectedFilters component is always rendered no matter if no filters are\n * selected.\n * If true, the SelectedFilters component is always rendered.\n * If false, the SelectedFilters component is not rendered whether no filters are selected.\n *\n * @public\n */\n @Prop({ default: false })\n protected alwaysVisible!: boolean;\n\n /**\n * Array of selected filters from every facet.\n *\n * @public\n */\n @Getter('facets', 'selectedFilters')\n public selectedFiltersGetter!: Filter[];\n\n /**\n * Dictionary of selected filters grouped by facet.\n *\n * @public\n */\n @Getter('facets', 'selectedFiltersByFacet')\n public selectedFiltersByFacet!: FiltersByFacet;\n\n /**\n * It returns an array of selected filters. If a facet id is passed as prop to the component,\n * only the selected filters of that facet are returned. If not, it returns selected filters of\n * every facet.\n *\n * @returns Array of selected filters.\n *\n * @internal\n */\n protected get selectedFilters(): Filter[] {\n return this.facetId === undefined\n ? this.selectedFiltersGetter\n : this.selectedFiltersByFacet[this.facetId] ?? [];\n }\n\n /**\n * If \"alwaysVisible\" prop is true, returns true.\n * If \"alwaysVisible\" prop is false, returns true or false depending on if there are some\n * filter selected.\n *\n * @returns True if \"alwaysVisible\" is true. True or false depending on if there are some filter\n * selected.\n *\n * @internal\n */\n protected get show(): boolean {\n return this.alwaysVisible || this.selectedFilters.length > 0;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;;;;AAeA;IAA6C,mCAAG;IAAhD;;KAgEC;IAnBC,sBAAc,4CAAe;;;;;;;;;;aAA7B;;YACE,OAAO,IAAI,CAAC,OAAO,KAAK,SAAS;kBAC7B,IAAI,CAAC,qBAAqB;kBAC1B,MAAA,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,CAAC;SACrD;;;OAAA;IAYD,sBAAc,iCAAI;;;;;;;;;;;aAAlB;YACE,OAAO,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC;SAC9D;;;OAAA;IAxDD;QADC,IAAI,EAAE;oDACoC;IAW3C;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;0DACS;IAQlC;QADC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,CAAC;kEACI;IAQxC;QADC,MAAM,CAAC,QAAQ,EAAE,wBAAwB,CAAC;mEACI;IAlC5B,eAAe;QANnC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE;gBACV,SAAS,WAAA;aACV;SACF,CAAC;OACmB,eAAe,CAgEnC;IAAD,sBAAC;CAAA,CAhE4C,GAAG;;;;"}
|
|
@@ -25,7 +25,10 @@ import '../../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
|
25
25
|
import '../../../../components/icons/star.vue.js';
|
|
26
26
|
import '../../../../components/base-rating.vue.js';
|
|
27
27
|
import '../../../../components/filters/labels/base-rating-filter-label.vue.js';
|
|
28
|
-
import '../../../../components/icons/arrow.vue.js';
|
|
28
|
+
import '../../../../components/icons/arrow-down.vue.js';
|
|
29
|
+
import '../../../../components/icons/arrow-left.vue.js';
|
|
30
|
+
import '../../../../components/icons/arrow-right.vue.js';
|
|
31
|
+
import '../../../../components/icons/arrow-up.vue.js';
|
|
29
32
|
import '../../../../components/icons/bag.vue.js';
|
|
30
33
|
import '../../../../components/icons/bar-code.vue.js';
|
|
31
34
|
import '../../../../components/icons/barcode-tiny.vue.js';
|
|
@@ -49,6 +52,7 @@ import '../../../../components/icons/cross.vue.js';
|
|
|
49
52
|
import '../../../../components/icons/filters.vue.js';
|
|
50
53
|
import '../../../../components/icons/grid-1-col.vue.js';
|
|
51
54
|
import '../../../../components/icons/grid-2-col.vue.js';
|
|
55
|
+
import '../../../../components/icons/grid-2-rows.vue.js';
|
|
52
56
|
import '../../../../components/icons/hide.vue.js';
|
|
53
57
|
import '../../../../components/icons/history-tiny.vue.js';
|
|
54
58
|
import '../../../../components/icons/history.vue.js';
|
|
@@ -95,6 +99,7 @@ import '../../../../components/result/base-result-link.vue.js';
|
|
|
95
99
|
import '../../../../components/result/base-result-previous-price.vue.js';
|
|
96
100
|
import '../../../../components/result/base-result-fallback-image.vue.js';
|
|
97
101
|
import '../../../../components/result/base-result-placeholder-image.vue.js';
|
|
102
|
+
import '../../../../components/result/base-result-rating.vue.js';
|
|
98
103
|
import '../../../../components/suggestions/base-suggestion.vue.js';
|
|
99
104
|
import '../../../../components/suggestions/base-suggestions.vue.js';
|
|
100
105
|
import '../../../../components/auto-progress-bar.vue.js';
|
package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue=script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sliced-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/sliced-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Filter } from '@empathyco/x-types';\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { xComponentMixin, XProvide } from '../../../../components';\nimport { VueCSSClasses } from '../../../../utils';\nimport { facetsXModule } from '../../x-module';\nimport FiltersInjectionMixin from './filters-injection.mixin';\n\n/**\n * Component that slices a list of filters and returns them using the default scoped slot,\n * allowing the user to show the full list of them or slicing them again using the\n * show more/less buttons.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class SlicedFilters extends mixins(FiltersInjectionMixin) {\n /** The maximum number of filters to show.\n *\n * @public\n * */\n @Prop({ required: true })\n protected max!: number;\n\n /** For showing the remaining filters. */\n public showMoreFilters = true;\n\n /**\n * Show the buttons template when length filters is greater than property max.\n *\n * @returns Boolean if length filters is greater than property max.\n * @internal\n */\n protected get showButton(): boolean {\n return this.renderedFilters.length > this.max;\n }\n\n /**\n * Sliced the array of filters depends on click button show more.\n *\n * @returns Array of sliced filters or all filters.\n * @internal\n */\n @XProvide('filters')\n public get slicedFilters(): Filter[] {\n return this.showMoreFilters ? this.renderedFilters.slice(0, this.max) : this.renderedFilters;\n }\n\n /**\n * The difference between length filters and max to show.\n *\n * @returns Number of remaining filters to show.\n * @internal\n */\n protected get difference(): number {\n return this.renderedFilters.length - this.max;\n }\n\n /**\n * Show or hide the remaining filters. It also emits a Vue event based on the clicked button.\n *\n * @param event - The click event.\n *\n * @internal\n */\n protected toggleShowMoreFilters(event: MouseEvent): void {\n this.showMoreFilters = !this.showMoreFilters;\n this.$emit(this.showMoreFilters ? 'click:show-less' : 'click:show-more', event);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The classes to be added to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-sliced-filters--is-sliced': this.showButton\n };\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sliced-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/sliced-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Filter } from '@empathyco/x-types';\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { xComponentMixin, XProvide } from '../../../../components';\nimport { VueCSSClasses } from '../../../../utils';\nimport { facetsXModule } from '../../x-module';\nimport FiltersInjectionMixin from './filters-injection.mixin';\n\n/**\n * Component that slices a list of filters and returns them using the default scoped slot,\n * allowing the user to show the full list of them or slicing them again using the\n * show more/less buttons.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class SlicedFilters extends mixins(FiltersInjectionMixin) {\n /** The maximum number of filters to show.\n *\n * @public\n * */\n @Prop({ required: true })\n protected max!: number;\n\n /** For showing the remaining filters. */\n public showMoreFilters = true;\n\n /**\n * Show the buttons template when length filters is greater than property max.\n *\n * @returns Boolean if length filters is greater than property max.\n * @internal\n */\n protected get showButton(): boolean {\n return this.renderedFilters.length > this.max;\n }\n\n /**\n * Sliced the array of filters depends on click button show more.\n *\n * @returns Array of sliced filters or all filters.\n * @internal\n */\n @XProvide('filters')\n public get slicedFilters(): Filter[] {\n return this.showMoreFilters ? this.renderedFilters.slice(0, this.max) : this.renderedFilters;\n }\n\n /**\n * The difference between length filters and max to show.\n *\n * @returns Number of remaining filters to show.\n * @internal\n */\n protected get difference(): number {\n return this.renderedFilters.length - this.max;\n }\n\n /**\n * Show or hide the remaining filters. It also emits a Vue event based on the clicked button.\n *\n * @param event - The click event.\n *\n * @internal\n */\n protected toggleShowMoreFilters(event: MouseEvent): void {\n this.showMoreFilters = !this.showMoreFilters;\n this.$emit(this.showMoreFilters ? 'click:show-less' : 'click:show-more', event);\n }\n\n /**\n * Adds the dynamic css classes to the component.\n *\n * @returns The classes to be added to the component.\n * @internal\n */\n protected get cssClasses(): VueCSSClasses {\n return {\n 'x-sliced-filters--is-sliced': this.showButton\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA;;;;;;;AAUA;IAA2C,iCAA6B;IAAxE;QAAA,qEAiEC;;QAxDQ,qBAAe,GAAG,IAAI,CAAC;;KAwD/B;IAhDC,sBAAc,qCAAU;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC;SAC/C;;;OAAA;IASD,sBAAW,wCAAa;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;SAC9F;;;OAAA;IAQD,sBAAc,qCAAU;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC;SAC/C;;;OAAA;;;;;;;;IASS,6CAAqB,GAA/B,UAAgC,KAAiB;QAC/C,IAAI,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,EAAE,KAAK,CAAC,CAAC;KACjF;IAQD,sBAAc,qCAAU;;;;;;;aAAxB;YACE,OAAO;gBACL,6BAA6B,EAAE,IAAI,CAAC,UAAU;aAC/C,CAAC;SACH;;;OAAA;IA1DD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8CACF;IAsBvB;QADC,QAAQ,CAAC,SAAS,CAAC;sDAGnB;IA9BkB,aAAa;QAHjC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,aAAa,CAiEjC;IAAD,oBAAC;CAjED,CAA2C,MAAM,CAAC,qBAAqB,CAAC;;;;"}
|
|
@@ -42,7 +42,10 @@ import '../../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
|
42
42
|
import '../../../../components/icons/star.vue.js';
|
|
43
43
|
import '../../../../components/base-rating.vue.js';
|
|
44
44
|
import '../../../../components/filters/labels/base-rating-filter-label.vue.js';
|
|
45
|
-
import '../../../../components/icons/arrow.vue.js';
|
|
45
|
+
import '../../../../components/icons/arrow-down.vue.js';
|
|
46
|
+
import '../../../../components/icons/arrow-left.vue.js';
|
|
47
|
+
import '../../../../components/icons/arrow-right.vue.js';
|
|
48
|
+
import '../../../../components/icons/arrow-up.vue.js';
|
|
46
49
|
import '../../../../components/icons/bag.vue.js';
|
|
47
50
|
import '../../../../components/icons/bar-code.vue.js';
|
|
48
51
|
import '../../../../components/icons/barcode-tiny.vue.js';
|
|
@@ -66,6 +69,7 @@ import '../../../../components/icons/cross.vue.js';
|
|
|
66
69
|
import '../../../../components/icons/filters.vue.js';
|
|
67
70
|
import '../../../../components/icons/grid-1-col.vue.js';
|
|
68
71
|
import '../../../../components/icons/grid-2-col.vue.js';
|
|
72
|
+
import '../../../../components/icons/grid-2-rows.vue.js';
|
|
69
73
|
import '../../../../components/icons/hide.vue.js';
|
|
70
74
|
import '../../../../components/icons/history-tiny.vue.js';
|
|
71
75
|
import '../../../../components/icons/history.vue.js';
|
|
@@ -112,6 +116,7 @@ import '../../../../components/result/base-result-link.vue.js';
|
|
|
112
116
|
import '../../../../components/result/base-result-previous-price.vue.js';
|
|
113
117
|
import '../../../../components/result/base-result-fallback-image.vue.js';
|
|
114
118
|
import '../../../../components/result/base-result-placeholder-image.vue.js';
|
|
119
|
+
import '../../../../components/result/base-result-rating.vue.js';
|
|
115
120
|
import '../../../../components/suggestions/base-suggestion.vue.js';
|
|
116
121
|
import '../../../../components/suggestions/base-suggestions.vue.js';
|
|
117
122
|
import '../../../../components/auto-progress-bar.vue.js';
|
package/js/x-modules/facets/components/lists/sorted-filters.vue_rollup-plugin-vue=script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sorted-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/sorted-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { BooleanFilter, Filter, isBooleanFilter } from '@empathyco/x-types';\nimport { mixins } from 'vue-class-component';\nimport { Component } from 'vue-property-decorator';\nimport { CreateElement, VNode } from 'vue';\nimport { xComponentMixin, XProvide } from '../../../../components';\nimport { isArrayEmpty } from '../../../../utils';\nimport { facetsXModule } from '../../x-module';\nimport FiltersInjectionMixin from './filters-injection.mixin';\n\n/**\n * Component that sorts a list of filters and returns them using the default scoped slot.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class SortedFilters extends mixins(FiltersInjectionMixin) {\n /**\n * An array of filters with the selected filters at the beginning of the list.\n *\n * @returns Array of filters.\n * @internal\n */\n @XProvide('filters')\n public get sortedFilters(): Filter[] {\n if (!isArrayEmpty(this.renderedFilters) && isBooleanFilter(this.renderedFilters[0])) {\n return ([...this.renderedFilters] as BooleanFilter[]).sort(({ selected }) => {\n return selected ? -1 : 1;\n });\n }\n\n return this.renderedFilters;\n }\n\n render(h: CreateElement): VNode {\n return this.$scopedSlots.default?.({ filters: this.sortedFilters })?.[0] ?? h();\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sorted-filters.vue_rollup-plugin-vue=script.js","sources":["../../../../../../src/x-modules/facets/components/lists/sorted-filters.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { BooleanFilter, Filter, isBooleanFilter } from '@empathyco/x-types';\nimport { mixins } from 'vue-class-component';\nimport { Component } from 'vue-property-decorator';\nimport { CreateElement, VNode } from 'vue';\nimport { xComponentMixin, XProvide } from '../../../../components';\nimport { isArrayEmpty } from '../../../../utils';\nimport { facetsXModule } from '../../x-module';\nimport FiltersInjectionMixin from './filters-injection.mixin';\n\n/**\n * Component that sorts a list of filters and returns them using the default scoped slot.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(facetsXModule)]\n})\nexport default class SortedFilters extends mixins(FiltersInjectionMixin) {\n /**\n * An array of filters with the selected filters at the beginning of the list.\n *\n * @returns Array of filters.\n * @internal\n */\n @XProvide('filters')\n public get sortedFilters(): Filter[] {\n if (!isArrayEmpty(this.renderedFilters) && isBooleanFilter(this.renderedFilters[0])) {\n return ([...this.renderedFilters] as BooleanFilter[]).sort(({ selected }) => {\n return selected ? -1 : 1;\n });\n }\n\n return this.renderedFilters;\n }\n\n render(h: CreateElement): VNode {\n return this.$scopedSlots.default?.({ filters: this.sortedFilters })?.[0] ?? h();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;AAQA;IAA2C,iCAA6B;IAAxE;;KAqBC;IAbC,sBAAW,wCAAa;;;;;;;aAAxB;YACE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE;gBACnF,OAAQ,kBAAI,IAAI,CAAC,eAAe,CAAqB,CAAC,IAAI,CAAC,UAAC,EAAY;wBAAV,QAAQ,cAAA;oBACpE,OAAO,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;iBAC1B,CAAC,CAAC;aACJ;YAED,OAAO,IAAI,CAAC,eAAe,CAAC;SAC7B;;;OAAA;IAED,8BAAM,GAAN,UAAO,CAAgB;;QACrB,OAAO,MAAA,MAAA,MAAA,MAAA,IAAI,CAAC,YAAY,EAAC,OAAO,mDAAG,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,0CAAG,CAAC,CAAC,mCAAI,CAAC,EAAE,CAAC;KACjF;IAZD;QADC,QAAQ,CAAC,SAAS,CAAC;sDASnB;IAhBkB,aAAa;QAHjC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,aAAa,CAqBjC;IAAD,oBAAC;CArBD,CAA2C,MAAM,CAAC,qBAAqB,CAAC;;;;"}
|
|
@@ -31,19 +31,26 @@ var __vue_render__ = function () {
|
|
|
31
31
|
return [
|
|
32
32
|
_c("NextQuery", {
|
|
33
33
|
staticClass: "x-next-queries__suggestion",
|
|
34
|
-
attrs: {
|
|
34
|
+
attrs: {
|
|
35
|
+
suggestion: suggestion,
|
|
36
|
+
highlightCurated: _vm.highlightCurated,
|
|
37
|
+
},
|
|
35
38
|
scopedSlots: _vm._u(
|
|
36
39
|
[
|
|
37
40
|
{
|
|
38
41
|
key: "default",
|
|
39
|
-
fn: function () {
|
|
42
|
+
fn: function (ref) {
|
|
43
|
+
var suggestion = ref.suggestion;
|
|
44
|
+
var shouldHighlightCurated =
|
|
45
|
+
ref.shouldHighlightCurated;
|
|
40
46
|
return [
|
|
41
47
|
_vm._t("suggestion-content", null, null, {
|
|
42
48
|
suggestion: suggestion,
|
|
49
|
+
shouldHighlightCurated:
|
|
50
|
+
shouldHighlightCurated,
|
|
43
51
|
index: index,
|
|
44
52
|
}) ]
|
|
45
53
|
},
|
|
46
|
-
proxy: true,
|
|
47
54
|
} ],
|
|
48
55
|
null,
|
|
49
56
|
true
|
|
@@ -51,7 +58,11 @@ var __vue_render__ = function () {
|
|
|
51
58
|
}) ]
|
|
52
59
|
},
|
|
53
60
|
null,
|
|
54
|
-
{
|
|
61
|
+
{
|
|
62
|
+
suggestion: suggestion,
|
|
63
|
+
highlightCurated: _vm.highlightCurated,
|
|
64
|
+
index: index,
|
|
65
|
+
}
|
|
55
66
|
) ]
|
|
56
67
|
},
|
|
57
68
|
} ],
|
|
@@ -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\"
|
|
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 @binding {boolean} highlightCurated - True if the curated NQs should be highlighted\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, highlightCurated, index }\">\n <NextQuery\n #default=\"{ suggestion, shouldHighlightCurated }\"\n :suggestion=\"suggestion\"\n :highlightCurated=\"highlightCurated\"\n class=\"x-next-queries__suggestion\"\n >\n <!--\n @slot Next Query content\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {boolean} shouldHighlightCurated - True if the curated NQ should\n be highlighted\n @binding {number} index - Next Query suggestion index\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, shouldHighlightCurated, index }\" />\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 /**\n * Flag to indicate if the curated next queries should be displayed different.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\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 three optional props. `animation` to render the component with an animation,\n`maxItemToRender` to limit the number of next queries will be rendered (by default it is 5) and\n`highlightCurated` to indicate if the curated Next Queries inside the list should be highlighted.\n\n```vue\n<NextQueries :animation=\"FadeAndSlide\" :maxItemsToRender=\"10\" :highlightCurated=\"true\" />\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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -30,6 +30,9 @@ var NextQueries = /** @class */ (function (_super) {
|
|
|
30
30
|
__decorate([
|
|
31
31
|
Getter('nextQueries', 'nextQueries')
|
|
32
32
|
], NextQueries.prototype, "nextQueries", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
Prop({ default: false, type: Boolean })
|
|
35
|
+
], NextQueries.prototype, "highlightCurated", void 0);
|
|
33
36
|
NextQueries = __decorate([
|
|
34
37
|
Component({
|
|
35
38
|
components: { NextQuery: NextQuery, BaseSuggestions: BaseSuggestions },
|
package/js/x-modules/next-queries/components/next-queries.vue_rollup-plugin-vue=script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-queries.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { NextQuery as NextQueryModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\nimport { Getter } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { nextQueriesXModule } from '../x-module';\nimport 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})\nexport 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"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"next-queries.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { NextQuery as NextQueryModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\nimport { Getter } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { nextQueriesXModule } from '../x-module';\nimport 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})\nexport 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 /**\n * Flag to indicate if the curated next queries should be displayed different.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\n}\n"],"names":[],"mappings":";;;;;;;;;AA8CA;;;;;;;;;AAaA;IAAyC,+BAAG;IAA5C;;KAgCC;IAzBC;QADC,IAAI,EAAE;kDACmB;IAQ1B;QADC,IAAI,EAAE;yDAC6B;IAQpC;QADC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC;oDACC;IAQtC;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDACH;IA/BlB,WAAW;QAJ/B,SAAS,CAAC;YACT,UAAU,EAAE,EAAE,SAAS,WAAA,EAAE,eAAe,iBAAA,EAAE;YAC1C,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,WAAW,CAgC/B;IAAD,kBAAC;CAAA,CAhCwC,GAAG;;;;"}
|
|
@@ -11,6 +11,7 @@ var __vue_render__ = function () {
|
|
|
11
11
|
var _c = _vm._self._c || _h;
|
|
12
12
|
return _c("BaseSuggestion", {
|
|
13
13
|
staticClass: "x-next-query",
|
|
14
|
+
class: { "x-next-query--is-curated": _vm.shouldHighlightCurated },
|
|
14
15
|
attrs: {
|
|
15
16
|
suggestion: _vm.suggestion,
|
|
16
17
|
suggestionSelectedEvents: _vm.events,
|
|
@@ -29,7 +30,11 @@ var __vue_render__ = function () {
|
|
|
29
30
|
function () {
|
|
30
31
|
return [_vm._v(_vm._s(suggestion.query))]
|
|
31
32
|
},
|
|
32
|
-
|
|
33
|
+
null,
|
|
34
|
+
{
|
|
35
|
+
suggestion: suggestion,
|
|
36
|
+
shouldHighlightCurated: _vm.shouldHighlightCurated,
|
|
37
|
+
}
|
|
33
38
|
) ]
|
|
34
39
|
},
|
|
35
40
|
} ],
|
|
@@ -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
|
|
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 :class=\"{ 'x-next-query--is-curated': shouldHighlightCurated }\"\n >\n <template #default=\"{ suggestion }\">\n <!--\n @slot Next Query content\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {boolean} shouldHighlightCurated - True if the curated NQ should be highlighted\n -->\n <slot v-bind=\"{ suggestion, shouldHighlightCurated }\">{{ 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 * Indicates if the curated next query should be highlighted.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\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 /**\n * Checks if the next query is curated and if it should be highlighted.\n *\n * @returns True if the next query is curated and should be highlighted.\n *\n * @internal\n */\n protected get shouldHighlightCurated(): boolean {\n return this.highlightCurated && (this.suggestion.isCurated ?? false);\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. It also has an optional\nprop, `highlightCurated`, to indicate if the curated Next Queries should be differentiated with a\nCSS class.\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## Dynamic Classes\n\n`NextQuery` uses the following dynamic CSS classes so you can style it when is:\n\n- Curated: `x-next-query--is-curated`.\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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -32,9 +32,27 @@ var NextQuery = /** @class */ (function (_super) {
|
|
|
32
32
|
enumerable: false,
|
|
33
33
|
configurable: true
|
|
34
34
|
});
|
|
35
|
+
Object.defineProperty(NextQuery.prototype, "shouldHighlightCurated", {
|
|
36
|
+
/**
|
|
37
|
+
* Checks if the next query is curated and if it should be highlighted.
|
|
38
|
+
*
|
|
39
|
+
* @returns True if the next query is curated and should be highlighted.
|
|
40
|
+
*
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
get: function () {
|
|
44
|
+
var _a;
|
|
45
|
+
return this.highlightCurated && ((_a = this.suggestion.isCurated) !== null && _a !== void 0 ? _a : false);
|
|
46
|
+
},
|
|
47
|
+
enumerable: false,
|
|
48
|
+
configurable: true
|
|
49
|
+
});
|
|
35
50
|
__decorate([
|
|
36
51
|
Prop({ required: true })
|
|
37
52
|
], NextQuery.prototype, "suggestion", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Prop({ default: false, type: Boolean })
|
|
55
|
+
], NextQuery.prototype, "highlightCurated", void 0);
|
|
38
56
|
NextQuery = __decorate([
|
|
39
57
|
Component({
|
|
40
58
|
components: { BaseSuggestion: BaseSuggestion },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-query.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/next-queries/components/next-query.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { NextQuery as NextQueryModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { XEventsTypes } from '../../../wiring/events.types';\nimport { 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})\nexport 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"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"next-query.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/next-queries/components/next-query.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { NextQuery as NextQueryModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { XEventsTypes } from '../../../wiring/events.types';\nimport { 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})\nexport 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 * Indicates if the curated next query should be highlighted.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\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 /**\n * Checks if the next query is curated and if it should be highlighted.\n *\n * @returns True if the next query is curated and should be highlighted.\n *\n * @internal\n */\n protected get shouldHighlightCurated(): boolean {\n return this.highlightCurated && (this.suggestion.isCurated ?? false);\n }\n}\n"],"names":[],"mappings":";;;;;;;AA6BA;;;;;;;AAWA;IAAuC,6BAAG;IAA1C;;KAuCC;IAhBC,sBAAc,6BAAM;;;;;;;aAApB;YACE,OAAO;gBACL,sBAAsB,EAAE,IAAI,CAAC,UAAU;aACxC,CAAC;SACH;;;OAAA;IASD,sBAAc,6CAAsB;;;;;;;;aAApC;;YACE,OAAO,IAAI,CAAC,gBAAgB,KAAK,MAAA,IAAI,CAAC,UAAU,CAAC,SAAS,mCAAI,KAAK,CAAC,CAAC;SACtE;;;OAAA;IA/BD;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;iDACa;IAQtC;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDACH;IAflB,SAAS;QAJ7B,SAAS,CAAC;YACT,UAAU,EAAE,EAAE,cAAc,gBAAA,EAAE;YAC9B,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;SAC9C,CAAC;OACmB,SAAS,CAuC7B;IAAD,gBAAC;CAAA,CAvCsC,GAAG;;;;"}
|
|
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
|
25
25
|
import '../../../components/icons/star.vue.js';
|
|
26
26
|
import '../../../components/base-rating.vue.js';
|
|
27
27
|
import '../../../components/filters/labels/base-rating-filter-label.vue.js';
|
|
28
|
-
import '../../../components/icons/arrow.vue.js';
|
|
28
|
+
import '../../../components/icons/arrow-down.vue.js';
|
|
29
|
+
import '../../../components/icons/arrow-left.vue.js';
|
|
30
|
+
import '../../../components/icons/arrow-right.vue.js';
|
|
31
|
+
import '../../../components/icons/arrow-up.vue.js';
|
|
29
32
|
import '../../../components/icons/bag.vue.js';
|
|
30
33
|
import '../../../components/icons/bar-code.vue.js';
|
|
31
34
|
import '../../../components/icons/barcode-tiny.vue.js';
|
|
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
|
|
|
49
52
|
import '../../../components/icons/filters.vue.js';
|
|
50
53
|
import '../../../components/icons/grid-1-col.vue.js';
|
|
51
54
|
import '../../../components/icons/grid-2-col.vue.js';
|
|
55
|
+
import '../../../components/icons/grid-2-rows.vue.js';
|
|
52
56
|
import '../../../components/icons/hide.vue.js';
|
|
53
57
|
import '../../../components/icons/history-tiny.vue.js';
|
|
54
58
|
import '../../../components/icons/history.vue.js';
|
|
@@ -97,6 +101,7 @@ import '../../../components/result/base-result-link.vue.js';
|
|
|
97
101
|
import '../../../components/result/base-result-previous-price.vue.js';
|
|
98
102
|
import '../../../components/result/base-result-fallback-image.vue.js';
|
|
99
103
|
import '../../../components/result/base-result-placeholder-image.vue.js';
|
|
104
|
+
import '../../../components/result/base-result-rating.vue.js';
|
|
100
105
|
import '../../../components/suggestions/base-suggestion.vue.js';
|
|
101
106
|
import '../../../components/suggestions/base-suggestions.vue.js';
|
|
102
107
|
import '../../../components/auto-progress-bar.vue.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-scroll-item.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\nimport { Identifiable } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { XInject } from '../../../components/decorators/injection.decorators';\nimport { scrollXModule } from '../x-module';\nimport { ScrollObserverKey } from './scroll.const';\nimport { ScrollVisibilityObserver } from './scroll.types';\n\n/**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main-scroll-item.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/main-scroll-item.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\nimport { Identifiable } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { NoElement, State, xComponentMixin } from '../../../components';\nimport { XInject } from '../../../components/decorators/injection.decorators';\nimport { scrollXModule } from '../x-module';\nimport { ScrollObserverKey } from './scroll.const';\nimport { ScrollVisibilityObserver } from './scroll.types';\n\n/**\n * Wrapper for elements contained in the {@link MainScroll} that should store/restore its\n * position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class MainScrollItem extends Vue {\n /**\n * Rendered HTML node.\n *\n * @public\n */\n public $el!: HTMLElement;\n\n /**\n * The item data. Used to set the scroll identifier.\n *\n * @public\n */\n @Prop({ required: true })\n public item!: Identifiable;\n\n /**\n * The tag to render.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public tag!: string | typeof Vue;\n\n /**\n * Pending identifier scroll position to restore. If it matches the {@link MainScrollItem.item}\n * `id` property, this component should be scrolled into view.\n *\n * @internal\n */\n @State('scroll', 'pendingScrollTo')\n public pendingScrollTo!: string;\n\n /**\n * Observer to detect the first visible element.\n *\n * @internal\n */\n @XInject(ScrollObserverKey)\n public firstVisibleItemObserver!: ScrollVisibilityObserver | null;\n\n /**\n * Initialise scroll behavior.\n * - Observes the rendered element to detect if it is the first visible item.\n * - If the rendered element matches the {@link MainScrollItem.pendingScrollTo}, scrolls the\n * element into the first position of the view.\n *\n * @internal\n */\n async mounted(): Promise<void> {\n await this.$nextTick(); // Mounted does not guarantee that child components are mounted too\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.$watch('firstVisibleItemObserver', this.observeItem, { immediate: true });\n }\n\n /**\n * Detaches the observer from the rendered element to prevent memory leaks.\n *\n * @internal\n */\n beforeDestroy(): void {\n this.firstVisibleItemObserver?.unobserve(this.$el);\n }\n\n /**\n * Initialises the element visibility observation, stopping the previous one if it has.\n *\n * @param newObserver - The new observer for the HTML element.\n * @param oldObserver - The old observer for the HTML element.\n */\n observeItem(\n newObserver: ScrollVisibilityObserver | null,\n oldObserver: ScrollVisibilityObserver | null\n ): void {\n oldObserver?.unobserve(this.$el);\n newObserver?.observe(this.$el);\n if (this.pendingScrollTo === this.item.id) {\n this.$el.scrollIntoView();\n this.$x.emit('ScrollRestoreSucceeded');\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AASA;IAA4C,kCAAG;IAA/C;;KAiFC;;;;;;;;;IAhCO,gCAAO,GAAb;;;;4BACE,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAtB,SAAsB,CAAC;;wBAEvB,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;KAChF;;;;;;IAOD,sCAAa,GAAb;;QACE,MAAA,IAAI,CAAC,wBAAwB,0CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACpD;;;;;;;IAQD,oCAAW,GAAX,UACE,WAA4C,EAC5C,WAA4C;QAE5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACzC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;SACxC;KACF;IAlED;QADC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gDACE;IAQ3B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;+CACF;IASjC;QADC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;2DACH;IAQhC;QADC,OAAO,CAAC,iBAAiB,CAAC;oEACuC;IAvC/C,cAAc;QAHlC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,cAAc,CAiFlC;IAAD,qBAAC;CAAA,CAjF2C,GAAG;;;;"}
|
|
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
|
25
25
|
import '../../../components/icons/star.vue.js';
|
|
26
26
|
import '../../../components/base-rating.vue.js';
|
|
27
27
|
import '../../../components/filters/labels/base-rating-filter-label.vue.js';
|
|
28
|
-
import '../../../components/icons/arrow.vue.js';
|
|
28
|
+
import '../../../components/icons/arrow-down.vue.js';
|
|
29
|
+
import '../../../components/icons/arrow-left.vue.js';
|
|
30
|
+
import '../../../components/icons/arrow-right.vue.js';
|
|
31
|
+
import '../../../components/icons/arrow-up.vue.js';
|
|
29
32
|
import '../../../components/icons/bag.vue.js';
|
|
30
33
|
import '../../../components/icons/bar-code.vue.js';
|
|
31
34
|
import '../../../components/icons/barcode-tiny.vue.js';
|
|
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
|
|
|
49
52
|
import '../../../components/icons/filters.vue.js';
|
|
50
53
|
import '../../../components/icons/grid-1-col.vue.js';
|
|
51
54
|
import '../../../components/icons/grid-2-col.vue.js';
|
|
55
|
+
import '../../../components/icons/grid-2-rows.vue.js';
|
|
52
56
|
import '../../../components/icons/hide.vue.js';
|
|
53
57
|
import '../../../components/icons/history-tiny.vue.js';
|
|
54
58
|
import '../../../components/icons/history.vue.js';
|
|
@@ -97,6 +101,7 @@ import '../../../components/result/base-result-link.vue.js';
|
|
|
97
101
|
import '../../../components/result/base-result-previous-price.vue.js';
|
|
98
102
|
import '../../../components/result/base-result-fallback-image.vue.js';
|
|
99
103
|
import '../../../components/result/base-result-placeholder-image.vue.js';
|
|
104
|
+
import '../../../components/result/base-result-rating.vue.js';
|
|
100
105
|
import '../../../components/suggestions/base-suggestion.vue.js';
|
|
101
106
|
import '../../../components/suggestions/base-suggestions.vue.js';
|
|
102
107
|
import '../../../components/auto-progress-bar.vue.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-to-top.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { NoElement } from '../../../components/no-element';\nimport { Dictionary } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { ScrollComponentState } from '../store';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n})\nexport default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scroll-to-top.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/scroll-to-top.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { State, xComponentMixin } from '../../../components';\nimport BaseEventButton from '../../../components/base-event-button.vue';\nimport { NoElement } from '../../../components/no-element';\nimport { Dictionary } from '../../../utils';\nimport { XEventsTypes } from '../../../wiring';\nimport { ScrollComponentState } from '../store';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\n/**\n * The `ScrollToTop` component is a button that the user can click to make a container scroll\n * up to its initial position.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)],\n components: { BaseEventButton }\n})\nexport default class ScrollToTop extends Vue {\n /**\n * Animation to use for showing/hiding the button.\n *\n * @public\n */\n @Prop({ default: () => NoElement })\n public animation!: Vue | string;\n\n /**\n * Threshold in pixels from the top to show the button.\n *\n * @public\n */\n @Prop()\n public thresholdPx?: number;\n\n /**\n * Id of the target scroll component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n public scrollId!: string;\n\n /**\n * State of all the scroll components in this module.\n *\n * @internal\n */\n // TODO: Directly retrieve the needed data in this computed property\n @State('scroll', 'data')\n public scrollPositionsMap!: Dictionary<ScrollComponentState>;\n\n /**\n * The scroll data retrieved for this component.\n *\n * @returns The scroll data for this component if a valid {@link ScrollToTop.scrollId} has been\n * passed. Otherwise it returns `null`.\n * @internal\n */\n protected get scrollData(): ScrollComponentState {\n return this.scrollId && this.scrollPositionsMap[this.scrollId]\n ? this.scrollPositionsMap[this.scrollId]\n : {\n position: 0,\n direction: 'UP',\n hasReachedStart: false,\n hasAlmostReachedEnd: false,\n hasReachedEnd: false\n };\n }\n\n /**\n * Event that will be emitted when the scroll to top is clicked.\n *\n * @returns The event to be emitted when the scroll to top is clicked. The id as a payload.\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserClickedScrollToTop: this.scrollId };\n }\n\n /**\n * Checks if the thresholdPx prop has been provided and if it is a number.\n *\n * @returns If the thresholdPx is a number or not.\n * @internal\n */\n protected get useThresholdStrategy(): boolean {\n return typeof this.thresholdPx === 'number';\n }\n\n /**\n * Checks if the threshold has been reached in case the threshold strategy is in use.\n *\n * @returns If the scrollTop is bigger than the thresholdPx.\n * @internal\n */\n protected get isThresholdReached(): boolean {\n return this.useThresholdStrategy && this.scrollData.position > this.thresholdPx!;\n }\n\n /**\n * Whether if the button is visible or not depending on the strategy being used.\n *\n * @returns If the button should be visible or not.\n * @internal\n */\n protected get isVisible(): boolean {\n return this.useThresholdStrategy ? this.isThresholdReached : this.hasAlmostReachedScrollEnd;\n }\n\n /**\n * Returns if the scroll has almost reached its end or not.\n *\n * @returns True if the scroll has almost reached the end and the user is still scrolling down.\n * @internal\n */\n protected get hasAlmostReachedScrollEnd(): boolean {\n return this.scrollData.hasAlmostReachedEnd && this.scrollData.direction === 'DOWN';\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;;;AAUA;IAAyC,+BAAG;IAA5C;;KAsGC;IA7DC,sBAAc,mCAAU;;;;;;;;aAAxB;YACE,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBAC1D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC;kBACtC;oBACE,QAAQ,EAAE,CAAC;oBACX,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,KAAK;oBACtB,mBAAmB,EAAE,KAAK;oBAC1B,aAAa,EAAE,KAAK;iBACrB,CAAC;SACP;;;OAAA;IAQD,sBAAc,+BAAM;;;;;;;aAApB;YACE,OAAO,EAAE,sBAAsB,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;SAClD;;;OAAA;IAQD,sBAAc,6CAAoB;;;;;;;aAAlC;YACE,OAAO,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC;SAC7C;;;OAAA;IAQD,sBAAc,2CAAkB;;;;;;;aAAhC;YACE,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAY,CAAC;SAClF;;;OAAA;IAQD,sBAAc,kCAAS;;;;;;;aAAvB;YACE,OAAO,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,CAAC;SAC7F;;;OAAA;IAQD,sBAAc,kDAAyB;;;;;;;aAAvC;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,KAAK,MAAM,CAAC;SACpF;;;OAAA;IA9FD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,cAAM,OAAA,SAAS,GAAA,EAAE,CAAC;kDACH;IAQhC;QADC,IAAI,EAAE;oDACqB;IAQ5B;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;iDACP;IASzB;QADC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;2DACqC;IAhC1C,WAAW;QAJ/B,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YACxC,UAAU,EAAE,EAAE,eAAe,iBAAA,EAAE;SAChC,CAAC;OACmB,WAAW,CAsG/B;IAAD,kBAAC;CAAA,CAtGwC,GAAG;;;;"}
|
|
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
|
25
25
|
import '../../../components/icons/star.vue.js';
|
|
26
26
|
import '../../../components/base-rating.vue.js';
|
|
27
27
|
import '../../../components/filters/labels/base-rating-filter-label.vue.js';
|
|
28
|
-
import '../../../components/icons/arrow.vue.js';
|
|
28
|
+
import '../../../components/icons/arrow-down.vue.js';
|
|
29
|
+
import '../../../components/icons/arrow-left.vue.js';
|
|
30
|
+
import '../../../components/icons/arrow-right.vue.js';
|
|
31
|
+
import '../../../components/icons/arrow-up.vue.js';
|
|
29
32
|
import '../../../components/icons/bag.vue.js';
|
|
30
33
|
import '../../../components/icons/bar-code.vue.js';
|
|
31
34
|
import '../../../components/icons/barcode-tiny.vue.js';
|
|
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
|
|
|
49
52
|
import '../../../components/icons/filters.vue.js';
|
|
50
53
|
import '../../../components/icons/grid-1-col.vue.js';
|
|
51
54
|
import '../../../components/icons/grid-2-col.vue.js';
|
|
55
|
+
import '../../../components/icons/grid-2-rows.vue.js';
|
|
52
56
|
import '../../../components/icons/hide.vue.js';
|
|
53
57
|
import '../../../components/icons/history-tiny.vue.js';
|
|
54
58
|
import '../../../components/icons/history.vue.js';
|
|
@@ -97,6 +101,7 @@ import '../../../components/result/base-result-link.vue.js';
|
|
|
97
101
|
import '../../../components/result/base-result-previous-price.vue.js';
|
|
98
102
|
import '../../../components/result/base-result-fallback-image.vue.js';
|
|
99
103
|
import '../../../components/result/base-result-placeholder-image.vue.js';
|
|
104
|
+
import '../../../components/result/base-result-rating.vue.js';
|
|
100
105
|
import '../../../components/suggestions/base-suggestion.vue.js';
|
|
101
106
|
import '../../../components/suggestions/base-suggestions.vue.js';
|
|
102
107
|
import '../../../components/auto-progress-bar.vue.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/window-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { ScrollDirection, ScrollMixin, xComponentMixin } from '../../../components';\nimport { WireMetadata } from '../../../wiring';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\ntype ScrollableElement = 'html' | 'body';\n\n/**\n * The `WindowScroll` component listens to either the `html` or `body` DOM scroll events, and\n * re-emits them as X Events. Additionally it also emits events related to the direction or\n * current position of these elements scroll.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class WindowScroll extends mixins(ScrollMixin) {\n /**\n * Tag to identify the main scrollable element.\n *\n * @public\n */\n @Prop({ default: 'html' })\n protected scrollableElement!: ScrollableElement;\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n protected id!: string;\n\n mounted(): void {\n this.initAndListenElement();\n this.$on('scroll', (position: number) => {\n this.$x.emit('UserScrolled', position, this.createXEventMetadata());\n });\n this.$on('scroll:direction-change', (direction: ScrollDirection) => {\n this.$x.emit('UserChangedScrollDirection', direction, this.createXEventMetadata());\n });\n this.$on('scroll:at-start', (hasReachedStart: boolean) => {\n this.$x.emit('UserReachedScrollStart', hasReachedStart, this.createXEventMetadata());\n });\n this.$on('scroll:almost-at-end', (hasAlmostReachedEnd: boolean) => {\n this.$x.emit(\n 'UserAlmostReachedScrollEnd',\n hasAlmostReachedEnd,\n this.createXEventMetadata()\n );\n });\n this.$on('scroll:at-end', (hasReachedEnd: boolean) => {\n this.$x.emit('UserReachedScrollEnd', hasReachedEnd, this.createXEventMetadata());\n });\n }\n\n /**\n * Sets the HTML element depending on {@link WindowScroll.scrollableElement}, and initialises\n * its events.\n *\n * @internal\n */\n protected initAndListenElement(): void {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.$el = this.scrollableElement === 'body' ? document.body : document.documentElement;\n this.$el.addEventListener('scroll', this.throttledStoreScrollData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n\n /**\n * Cleanup listeners.\n */\n beforeDestroy(): void {\n this.$el.removeEventListener('scroll', this.throttledStoreScrollData);\n }\n\n /**\n * Creates the metadata for the events of this component.\n *\n * @returns A {@link WireMetadata} for the events emitted by this component.\n * @internal\n */\n protected createXEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el, id: this.id };\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"window-scroll.vue_rollup-plugin-vue=script.js","sources":["../../../../../src/x-modules/scroll/components/window-scroll.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\nimport { mixins } from 'vue-class-component';\nimport { Component, Prop } from 'vue-property-decorator';\nimport { ScrollDirection, ScrollMixin, xComponentMixin } from '../../../components';\nimport { WireMetadata } from '../../../wiring';\nimport { scrollXModule } from '../x-module';\nimport { MainScrollId } from './scroll.const';\n\ntype ScrollableElement = 'html' | 'body';\n\n/**\n * The `WindowScroll` component listens to either the `html` or `body` DOM scroll events, and\n * re-emits them as X Events. Additionally it also emits events related to the direction or\n * current position of these elements scroll.\n *\n * @public\n */\n@Component({\n mixins: [xComponentMixin(scrollXModule)]\n})\nexport default class WindowScroll extends mixins(ScrollMixin) {\n /**\n * Tag to identify the main scrollable element.\n *\n * @public\n */\n @Prop({ default: 'html' })\n protected scrollableElement!: ScrollableElement;\n /**\n * Id to identify the component.\n *\n * @public\n */\n @Prop({ default: MainScrollId })\n protected id!: string;\n\n mounted(): void {\n this.initAndListenElement();\n this.$on('scroll', (position: number) => {\n this.$x.emit('UserScrolled', position, this.createXEventMetadata());\n });\n this.$on('scroll:direction-change', (direction: ScrollDirection) => {\n this.$x.emit('UserChangedScrollDirection', direction, this.createXEventMetadata());\n });\n this.$on('scroll:at-start', (hasReachedStart: boolean) => {\n this.$x.emit('UserReachedScrollStart', hasReachedStart, this.createXEventMetadata());\n });\n this.$on('scroll:almost-at-end', (hasAlmostReachedEnd: boolean) => {\n this.$x.emit(\n 'UserAlmostReachedScrollEnd',\n hasAlmostReachedEnd,\n this.createXEventMetadata()\n );\n });\n this.$on('scroll:at-end', (hasReachedEnd: boolean) => {\n this.$x.emit('UserReachedScrollEnd', hasReachedEnd, this.createXEventMetadata());\n });\n }\n\n /**\n * Sets the HTML element depending on {@link WindowScroll.scrollableElement}, and initialises\n * its events.\n *\n * @internal\n */\n protected initAndListenElement(): void {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.$el = this.scrollableElement === 'body' ? document.body : document.documentElement;\n this.$el.addEventListener('scroll', this.throttledStoreScrollData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n render(): void {}\n\n /**\n * Cleanup listeners.\n */\n beforeDestroy(): void {\n this.$el.removeEventListener('scroll', this.throttledStoreScrollData);\n }\n\n /**\n * Creates the metadata for the events of this component.\n *\n * @returns A {@link WireMetadata} for the events emitted by this component.\n * @internal\n */\n protected createXEventMetadata(): Partial<WireMetadata> {\n return { target: this.$el, id: this.id };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;AAUA;IAA0C,gCAAmB;IAA7D;;KAuEC;IAvDC,8BAAO,GAAP;QAAA,iBAqBC;QApBC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,QAAgB;YAClC,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACrE,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,yBAAyB,EAAE,UAAC,SAA0B;YAC7D,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,SAAS,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACpF,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,UAAC,eAAwB;YACnD,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,eAAe,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SACtF,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,UAAC,mBAA4B;YAC5D,KAAI,CAAC,EAAE,CAAC,IAAI,CACV,4BAA4B,EAC5B,mBAAmB,EACnB,KAAI,CAAC,oBAAoB,EAAE,CAC5B,CAAC;SACH,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,UAAC,aAAsB;YAC/C,KAAI,CAAC,EAAE,CAAC,IAAI,CAAC,sBAAsB,EAAE,aAAa,EAAE,KAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;SAClF,CAAC,CAAC;KACJ;;;;;;;IAQS,2CAAoB,GAA9B;;;QAGE,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,iBAAiB,KAAK,MAAM,GAAG,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,eAAe,CAAC;QACxF,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACpE;;IAGD,6BAAM,GAAN,eAAiB;;;;IAKjB,oCAAa,GAAb;QACE,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KACvE;;;;;;;IAQS,2CAAoB,GAA9B;QACE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;KAC1C;IA/DD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;2DACsB;IAOhD;QADC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;4CACV;IAdH,YAAY;QAHhC,SAAS,CAAC;YACT,MAAM,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SACzC,CAAC;OACmB,YAAY,CAuEhC;IAAD,mBAAC;CAvED,CAA0C,MAAM,CAAC,WAAW,CAAC;;;;"}
|
|
@@ -25,7 +25,10 @@ import '../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
|
25
25
|
import '../../../components/icons/star.vue.js';
|
|
26
26
|
import '../../../components/base-rating.vue.js';
|
|
27
27
|
import '../../../components/filters/labels/base-rating-filter-label.vue.js';
|
|
28
|
-
import '../../../components/icons/arrow.vue.js';
|
|
28
|
+
import '../../../components/icons/arrow-down.vue.js';
|
|
29
|
+
import '../../../components/icons/arrow-left.vue.js';
|
|
30
|
+
import '../../../components/icons/arrow-right.vue.js';
|
|
31
|
+
import '../../../components/icons/arrow-up.vue.js';
|
|
29
32
|
import '../../../components/icons/bag.vue.js';
|
|
30
33
|
import '../../../components/icons/bar-code.vue.js';
|
|
31
34
|
import '../../../components/icons/barcode-tiny.vue.js';
|
|
@@ -49,6 +52,7 @@ import '../../../components/icons/cross.vue.js';
|
|
|
49
52
|
import '../../../components/icons/filters.vue.js';
|
|
50
53
|
import '../../../components/icons/grid-1-col.vue.js';
|
|
51
54
|
import '../../../components/icons/grid-2-col.vue.js';
|
|
55
|
+
import '../../../components/icons/grid-2-rows.vue.js';
|
|
52
56
|
import '../../../components/icons/hide.vue.js';
|
|
53
57
|
import '../../../components/icons/history-tiny.vue.js';
|
|
54
58
|
import '../../../components/icons/history.vue.js';
|
|
@@ -95,6 +99,7 @@ import '../../../components/result/base-result-link.vue.js';
|
|
|
95
99
|
import '../../../components/result/base-result-previous-price.vue.js';
|
|
96
100
|
import '../../../components/result/base-result-fallback-image.vue.js';
|
|
97
101
|
import '../../../components/result/base-result-placeholder-image.vue.js';
|
|
102
|
+
import '../../../components/result/base-result-rating.vue.js';
|
|
98
103
|
import '../../../components/suggestions/base-suggestion.vue.js';
|
|
99
104
|
import '../../../components/suggestions/base-suggestions.vue.js';
|
|
100
105
|
import '../../../components/auto-progress-bar.vue.js';
|