@getlupa/client 0.6.0-alpha-12 → 0.6.0-alpha-15
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/dist/cjs/components/search-results/filters/facets/FacetDisplay.vue.d.ts +9 -0
- package/dist/cjs/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
- package/dist/cjs/constants/global.const.d.ts +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.min.js +194 -43
- package/dist/cjs/store/modules/options.d.ts +1 -0
- package/dist/cjs/store/modules/searchResult.d.ts +7 -0
- package/dist/cjs/types/General.d.ts +1 -0
- package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +13 -1
- package/dist/es/components/search-results/filters/facets/FacetDisplay.vue.d.ts +9 -0
- package/dist/es/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
- package/dist/es/constants/global.const.d.ts +1 -1
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.min.js +194 -43
- package/dist/es/store/modules/options.d.ts +1 -0
- package/dist/es/store/modules/searchResult.d.ts +7 -0
- package/dist/es/types/General.d.ts +1 -0
- package/dist/es/types/search-results/SearchResultsOptions.d.ts +13 -1
- package/dist/iife/components/search-results/filters/facets/FacetDisplay.vue.d.ts +9 -0
- package/dist/iife/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
- package/dist/iife/constants/global.const.d.ts +1 -1
- package/dist/iife/index.d.ts +2 -2
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/store/modules/options.d.ts +1 -0
- package/dist/iife/store/modules/searchResult.d.ts +7 -0
- package/dist/iife/types/General.d.ts +1 -0
- package/dist/iife/types/search-results/SearchResultsOptions.d.ts +13 -1
- package/package.json +1 -1
|
@@ -7,14 +7,23 @@ export default class FacetDisplay extends Vue {
|
|
|
7
7
|
facet: FacetResult;
|
|
8
8
|
currentFilters: FilterGroup;
|
|
9
9
|
clearable: boolean;
|
|
10
|
+
currentFilterKeys: string[];
|
|
10
11
|
isOpen: boolean;
|
|
11
12
|
get facetType(): string;
|
|
12
13
|
get hasItems(): boolean;
|
|
13
14
|
get hasFilter(): boolean;
|
|
15
|
+
get filterQueryKey(): string | undefined;
|
|
16
|
+
get activeFilterKeys(): string;
|
|
14
17
|
mounted(): void;
|
|
15
18
|
beforeDestroy(): void;
|
|
16
19
|
handleMouseClick(e: MouseEvent): void;
|
|
20
|
+
handleParamsChange(): void;
|
|
21
|
+
queryFacet: ({ queryKey, facetKey, }: {
|
|
22
|
+
queryKey: string;
|
|
23
|
+
facetKey: string;
|
|
24
|
+
}) => Promise<void>;
|
|
17
25
|
toggleFacet(): void;
|
|
26
|
+
handleFacetQueryFilter(): void;
|
|
18
27
|
handleFacetSelect(item: FacetAction): void;
|
|
19
28
|
clear(): void;
|
|
20
29
|
}
|
|
@@ -21,6 +21,7 @@ export default class SearchResultsToolbar extends Vue {
|
|
|
21
21
|
get displayPageSelect(): boolean;
|
|
22
22
|
get searchSummaryLabel(): string;
|
|
23
23
|
get showMobileFilterCount(): boolean;
|
|
24
|
+
currentResolutionPageSizes: number[];
|
|
24
25
|
removeAllFilters: () => {
|
|
25
26
|
params: QueryParams;
|
|
26
27
|
};
|
|
@@ -8,7 +8,7 @@ export declare const S_MIN_WIDTH = 575;
|
|
|
8
8
|
export declare const MD_MIN_WIDTH = 767;
|
|
9
9
|
export declare const L_MIN_WIDTH = 991;
|
|
10
10
|
export declare const XL_MIN_WIDTH = 1199;
|
|
11
|
-
export declare const MAX_FACET_VALUES =
|
|
11
|
+
export declare const MAX_FACET_VALUES = 5000;
|
|
12
12
|
export declare const CURRENCY_KEY_INDICATOR = "price";
|
|
13
13
|
export declare const DEFAULT_PAGE_SIZE = 12;
|
|
14
14
|
export declare const LUPA_ROUTING_EVENT = "lupaRedirect";
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
|
|
2
|
-
import { CallbackContext, FacetStyle, SearchResultEventCallbacks, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
2
|
+
import { CallbackContext, FacetFilterQuery, FacetStyle, SearchResultEventCallbacks, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
3
3
|
import { SdkOptions, TrackingOptions, Environment, SortDirection } from "./types/General";
|
|
4
4
|
import { ProductListOptions } from "./types/product-list/ProductListOptions";
|
|
5
5
|
import { AddToCartElement, CustomDocumentElement, CustomHtmlElement, DescriptionDocumentElement, DocumentElement, DocumentElementType, ImageDocumentElement, PriceElement, RatingElement, RegularPriceDocumentElement, TitleDocumentElement } from "./types/DocumentElement";
|
|
@@ -17,5 +17,5 @@ declare const lupaSearch: {
|
|
|
17
17
|
clearSearchResults: () => void;
|
|
18
18
|
clearProductList: () => void;
|
|
19
19
|
};
|
|
20
|
-
export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, SortOptions, SearchResultsSortOptions, SearchResultEventCallbacks, CallbackContext, };
|
|
20
|
+
export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, SortOptions, SearchResultsSortOptions, SearchResultEventCallbacks, CallbackContext, FacetFilterQuery, };
|
|
21
21
|
export default lupaSearch;
|
package/dist/cjs/index.min.js
CHANGED
|
@@ -21676,7 +21676,7 @@ var S_MIN_WIDTH = 575;
|
|
|
21676
21676
|
var MD_MIN_WIDTH = 767;
|
|
21677
21677
|
var L_MIN_WIDTH = 991;
|
|
21678
21678
|
var XL_MIN_WIDTH = 1199;
|
|
21679
|
-
var MAX_FACET_VALUES =
|
|
21679
|
+
var MAX_FACET_VALUES = 5000;
|
|
21680
21680
|
var CURRENCY_KEY_INDICATOR = "price";
|
|
21681
21681
|
var DEFAULT_PAGE_SIZE = 12;
|
|
21682
21682
|
var LUPA_ROUTING_EVENT = "lupaRedirect";
|
|
@@ -22147,7 +22147,7 @@ var getPageUrl = function getPageUrl(pathnameOverride) {
|
|
|
22147
22147
|
|
|
22148
22148
|
var history$3 = namespace("history");
|
|
22149
22149
|
var tracking$5 = namespace("tracking");
|
|
22150
|
-
var options$
|
|
22150
|
+
var options$c = namespace("options");
|
|
22151
22151
|
|
|
22152
22152
|
var SearchBoxProduct = /*#__PURE__*/function (_Vue) {
|
|
22153
22153
|
_inherits(SearchBoxProduct, _Vue);
|
|
@@ -22245,7 +22245,7 @@ __decorate([Prop({
|
|
|
22245
22245
|
default: false
|
|
22246
22246
|
})], SearchBoxProduct.prototype, "highlighted", void 0);
|
|
22247
22247
|
|
|
22248
|
-
__decorate([options$
|
|
22248
|
+
__decorate([options$c.Getter("boxRoutingBehavior")], SearchBoxProduct.prototype, "boxRoutingBehavior", void 0);
|
|
22249
22249
|
|
|
22250
22250
|
__decorate([tracking$5.Action("track")], SearchBoxProduct.prototype, "trackClick", void 0);
|
|
22251
22251
|
|
|
@@ -23676,7 +23676,7 @@ var defaultSuggestedValue = {
|
|
|
23676
23676
|
var history$1 = namespace("history");
|
|
23677
23677
|
var params$d = namespace("params");
|
|
23678
23678
|
var searchBox$2 = namespace("searchBox");
|
|
23679
|
-
var options$
|
|
23679
|
+
var options$b = namespace("options");
|
|
23680
23680
|
var tracking$4 = namespace("tracking");
|
|
23681
23681
|
|
|
23682
23682
|
var SearchBox = /*#__PURE__*/function (_Vue) {
|
|
@@ -23961,7 +23961,7 @@ __decorate([tracking$4.Action("track")], SearchBox.prototype, "trackClick", void
|
|
|
23961
23961
|
|
|
23962
23962
|
__decorate([params$d.Action("setSearchResultsLink")], SearchBox.prototype, "setSearchResultsLink", void 0);
|
|
23963
23963
|
|
|
23964
|
-
__decorate([options$
|
|
23964
|
+
__decorate([options$b.Mutation("setSearchBoxOptions")], SearchBox.prototype, "setSearchBoxOptions", void 0);
|
|
23965
23965
|
|
|
23966
23966
|
__decorate([params$d.Action("goToResults")], SearchBox.prototype, "goToResults", void 0);
|
|
23967
23967
|
|
|
@@ -25609,9 +25609,9 @@ var toggleHierarchyParam = function toggleHierarchyParam() {
|
|
|
25609
25609
|
return getMostSpecificHierarchyTerms([param].concat(_toConsumableArray(params)));
|
|
25610
25610
|
};
|
|
25611
25611
|
|
|
25612
|
-
var searchResult$
|
|
25612
|
+
var searchResult$i = namespace("searchResult");
|
|
25613
25613
|
var params$c = namespace("params");
|
|
25614
|
-
var options$
|
|
25614
|
+
var options$a = namespace("options");
|
|
25615
25615
|
|
|
25616
25616
|
var CurrentFilters = /*#__PURE__*/function (_Vue) {
|
|
25617
25617
|
_inherits(CurrentFilters, _Vue);
|
|
@@ -25680,15 +25680,15 @@ __decorate([Prop({
|
|
|
25680
25680
|
default: false
|
|
25681
25681
|
})], CurrentFilters.prototype, "expandable", void 0);
|
|
25682
25682
|
|
|
25683
|
-
__decorate([searchResult$
|
|
25683
|
+
__decorate([searchResult$i.Getter("filters")], CurrentFilters.prototype, "currentFilters", void 0);
|
|
25684
25684
|
|
|
25685
|
-
__decorate([searchResult$
|
|
25685
|
+
__decorate([searchResult$i.Getter("facets")], CurrentFilters.prototype, "facets", void 0);
|
|
25686
25686
|
|
|
25687
|
-
__decorate([searchResult$
|
|
25687
|
+
__decorate([searchResult$i.Getter("displayFilters")], CurrentFilters.prototype, "displayFilters", void 0);
|
|
25688
25688
|
|
|
25689
|
-
__decorate([searchResult$
|
|
25689
|
+
__decorate([searchResult$i.Getter("currentFilterCount")], CurrentFilters.prototype, "currentFilterCount", void 0);
|
|
25690
25690
|
|
|
25691
|
-
__decorate([options$
|
|
25691
|
+
__decorate([options$a.Getter("initialFilters")], CurrentFilters.prototype, "initialFilters", void 0);
|
|
25692
25692
|
|
|
25693
25693
|
__decorate([params$c.Action("removeParams")], CurrentFilters.prototype, "removeParams", void 0);
|
|
25694
25694
|
|
|
@@ -28623,7 +28623,7 @@ var _typeof = _typeof$2.exports.default;
|
|
|
28623
28623
|
|
|
28624
28624
|
var VueSlider = /*@__PURE__*/getDefaultExportFromCjs(vueSliderComponent_umd_min.exports);
|
|
28625
28625
|
|
|
28626
|
-
var options$
|
|
28626
|
+
var options$9 = namespace("options");
|
|
28627
28627
|
|
|
28628
28628
|
var TermFacet = /*#__PURE__*/function (_Vue) {
|
|
28629
28629
|
_inherits(TermFacet, _Vue);
|
|
@@ -28830,7 +28830,7 @@ __decorate([Prop({
|
|
|
28830
28830
|
}
|
|
28831
28831
|
})], TermFacet.prototype, "currentFilters", void 0);
|
|
28832
28832
|
|
|
28833
|
-
__decorate([options$
|
|
28833
|
+
__decorate([options$9.State(function (s) {
|
|
28834
28834
|
return s.searchResultOptions;
|
|
28835
28835
|
})], TermFacet.prototype, "searchResultOptions", void 0);
|
|
28836
28836
|
|
|
@@ -29317,6 +29317,8 @@ var __vue_component__$J = /*#__PURE__*/normalizeComponent({
|
|
|
29317
29317
|
staticRenderFns: __vue_staticRenderFns__$J
|
|
29318
29318
|
}, __vue_inject_styles__$J, __vue_script__$J, __vue_scope_id__$J, __vue_is_functional_template__$J, __vue_module_identifier__$J, false, undefined, undefined, undefined);
|
|
29319
29319
|
|
|
29320
|
+
var searchResult$h = namespace("searchResult");
|
|
29321
|
+
|
|
29320
29322
|
var FacetDisplay = /*#__PURE__*/function (_Vue) {
|
|
29321
29323
|
_inherits(FacetDisplay, _Vue);
|
|
29322
29324
|
|
|
@@ -29364,7 +29366,23 @@ var FacetDisplay = /*#__PURE__*/function (_Vue) {
|
|
|
29364
29366
|
}, {
|
|
29365
29367
|
key: "hasFilter",
|
|
29366
29368
|
get: function get() {
|
|
29367
|
-
|
|
29369
|
+
var _a;
|
|
29370
|
+
|
|
29371
|
+
return Boolean(((_a = this.currentFilters) !== null && _a !== void 0 ? _a : {})[this.facet.key]);
|
|
29372
|
+
}
|
|
29373
|
+
}, {
|
|
29374
|
+
key: "filterQueryKey",
|
|
29375
|
+
get: function get() {
|
|
29376
|
+
var _a, _b;
|
|
29377
|
+
|
|
29378
|
+
return (_b = (_a = this.options.facetFilterQueries) === null || _a === void 0 ? void 0 : _a[this.facet.key]) === null || _b === void 0 ? void 0 : _b.queryKey;
|
|
29379
|
+
}
|
|
29380
|
+
}, {
|
|
29381
|
+
key: "activeFilterKeys",
|
|
29382
|
+
get: function get() {
|
|
29383
|
+
var _a;
|
|
29384
|
+
|
|
29385
|
+
return ((_a = this.currentFilterKeys) !== null && _a !== void 0 ? _a : []).join(",");
|
|
29368
29386
|
}
|
|
29369
29387
|
}, {
|
|
29370
29388
|
key: "mounted",
|
|
@@ -29399,10 +29417,28 @@ var FacetDisplay = /*#__PURE__*/function (_Vue) {
|
|
|
29399
29417
|
this.isOpen = false;
|
|
29400
29418
|
}
|
|
29401
29419
|
}
|
|
29420
|
+
}, {
|
|
29421
|
+
key: "handleParamsChange",
|
|
29422
|
+
value: function handleParamsChange() {
|
|
29423
|
+
this.handleFacetQueryFilter();
|
|
29424
|
+
}
|
|
29402
29425
|
}, {
|
|
29403
29426
|
key: "toggleFacet",
|
|
29404
29427
|
value: function toggleFacet() {
|
|
29405
29428
|
this.isOpen = !this.isOpen;
|
|
29429
|
+
this.handleFacetQueryFilter();
|
|
29430
|
+
}
|
|
29431
|
+
}, {
|
|
29432
|
+
key: "handleFacetQueryFilter",
|
|
29433
|
+
value: function handleFacetQueryFilter() {
|
|
29434
|
+
if (!this.filterQueryKey || !this.isOpen) {
|
|
29435
|
+
return;
|
|
29436
|
+
}
|
|
29437
|
+
|
|
29438
|
+
this.queryFacet({
|
|
29439
|
+
queryKey: this.filterQueryKey,
|
|
29440
|
+
facetKey: this.facet.key
|
|
29441
|
+
});
|
|
29406
29442
|
}
|
|
29407
29443
|
}, {
|
|
29408
29444
|
key: "handleFacetSelect",
|
|
@@ -29438,6 +29474,12 @@ __decorate([Prop({
|
|
|
29438
29474
|
default: false
|
|
29439
29475
|
})], FacetDisplay.prototype, "clearable", void 0);
|
|
29440
29476
|
|
|
29477
|
+
__decorate([searchResult$h.Getter("currentFilterKeys")], FacetDisplay.prototype, "currentFilterKeys", void 0);
|
|
29478
|
+
|
|
29479
|
+
__decorate([Watch("activeFilterKeys")], FacetDisplay.prototype, "handleParamsChange", null);
|
|
29480
|
+
|
|
29481
|
+
__decorate([searchResult$h.Action("queryFacet")], FacetDisplay.prototype, "queryFacet", void 0);
|
|
29482
|
+
|
|
29441
29483
|
FacetDisplay = __decorate([Component({
|
|
29442
29484
|
name: "facetDisplay",
|
|
29443
29485
|
components: {
|
|
@@ -29946,7 +29988,7 @@ var __vue_component__$F = /*#__PURE__*/normalizeComponent({
|
|
|
29946
29988
|
staticRenderFns: __vue_staticRenderFns__$F
|
|
29947
29989
|
}, __vue_inject_styles__$F, __vue_script__$F, __vue_scope_id__$F, __vue_is_functional_template__$F, __vue_module_identifier__$F, false, undefined, undefined, undefined);
|
|
29948
29990
|
|
|
29949
|
-
var options$
|
|
29991
|
+
var options$8 = namespace("options");
|
|
29950
29992
|
|
|
29951
29993
|
var CategoryFilter = /*#__PURE__*/function (_Vue) {
|
|
29952
29994
|
_inherits(CategoryFilter, _Vue);
|
|
@@ -30082,9 +30124,9 @@ var CategoryFilter = /*#__PURE__*/function (_Vue) {
|
|
|
30082
30124
|
|
|
30083
30125
|
__decorate([Prop()], CategoryFilter.prototype, "options", void 0);
|
|
30084
30126
|
|
|
30085
|
-
__decorate([options$
|
|
30127
|
+
__decorate([options$8.Getter("envOptions")], CategoryFilter.prototype, "envOptions", void 0);
|
|
30086
30128
|
|
|
30087
|
-
__decorate([options$
|
|
30129
|
+
__decorate([options$8.State(function (o) {
|
|
30088
30130
|
return o.searchResultOptions;
|
|
30089
30131
|
})], CategoryFilter.prototype, "searchResultOptions", void 0);
|
|
30090
30132
|
|
|
@@ -31073,7 +31115,7 @@ var __vue_component__$w = /*#__PURE__*/normalizeComponent({
|
|
|
31073
31115
|
staticRenderFns: __vue_staticRenderFns__$w
|
|
31074
31116
|
}, __vue_inject_styles__$w, __vue_script__$w, __vue_scope_id__$w, __vue_is_functional_template__$w, __vue_module_identifier__$w, false, undefined, undefined, undefined);
|
|
31075
31117
|
|
|
31076
|
-
var options$
|
|
31118
|
+
var options$7 = namespace("options");
|
|
31077
31119
|
|
|
31078
31120
|
var SearchResultsProductTitle = /*#__PURE__*/function (_Vue) {
|
|
31079
31121
|
_inherits(SearchResultsProductTitle, _Vue);
|
|
@@ -31126,7 +31168,7 @@ __decorate([Prop({
|
|
|
31126
31168
|
default: ""
|
|
31127
31169
|
})], SearchResultsProductTitle.prototype, "link", void 0);
|
|
31128
31170
|
|
|
31129
|
-
__decorate([options$
|
|
31171
|
+
__decorate([options$7.State(function (o) {
|
|
31130
31172
|
return o.searchResultOptions;
|
|
31131
31173
|
})], SearchResultsProductTitle.prototype, "searchResultOptions", void 0);
|
|
31132
31174
|
|
|
@@ -32037,7 +32079,7 @@ var __vue_component__$n = /*#__PURE__*/normalizeComponent({
|
|
|
32037
32079
|
var tracking$3 = namespace("tracking");
|
|
32038
32080
|
var params$9 = namespace("params");
|
|
32039
32081
|
var searchResult$c = namespace("searchResult");
|
|
32040
|
-
var options$
|
|
32082
|
+
var options$6 = namespace("options");
|
|
32041
32083
|
|
|
32042
32084
|
var SearchResultsProductCard = /*#__PURE__*/function (_Vue) {
|
|
32043
32085
|
_inherits(SearchResultsProductCard, _Vue);
|
|
@@ -32210,7 +32252,7 @@ __decorate([searchResult$c.State(function (state) {
|
|
|
32210
32252
|
return state.layout;
|
|
32211
32253
|
})], SearchResultsProductCard.prototype, "layout", void 0);
|
|
32212
32254
|
|
|
32213
|
-
__decorate([options$
|
|
32255
|
+
__decorate([options$6.Getter("searchResultsRoutingBehavior")], SearchResultsProductCard.prototype, "searchResultsRoutingBehavior", void 0);
|
|
32214
32256
|
|
|
32215
32257
|
__decorate([params$9.Getter("query")], SearchResultsProductCard.prototype, "query", void 0);
|
|
32216
32258
|
|
|
@@ -32515,7 +32557,7 @@ var track = function track(queryKey) {
|
|
|
32515
32557
|
};
|
|
32516
32558
|
|
|
32517
32559
|
var params$8 = namespace("params");
|
|
32518
|
-
var options$
|
|
32560
|
+
var options$5 = namespace("options");
|
|
32519
32561
|
|
|
32520
32562
|
var AdditionalPanels$1 = /*#__PURE__*/function (_Vue) {
|
|
32521
32563
|
_inherits(AdditionalPanels, _Vue);
|
|
@@ -32630,7 +32672,7 @@ __decorate([Prop({
|
|
|
32630
32672
|
|
|
32631
32673
|
__decorate([params$8.Getter("query")], AdditionalPanels$1.prototype, "query", void 0);
|
|
32632
32674
|
|
|
32633
|
-
__decorate([options$
|
|
32675
|
+
__decorate([options$5.State(function (o) {
|
|
32634
32676
|
return o.searchResultOptions;
|
|
32635
32677
|
})], AdditionalPanels$1.prototype, "searchResultOptions", void 0);
|
|
32636
32678
|
|
|
@@ -33315,7 +33357,7 @@ var __vue_component__$h = /*#__PURE__*/normalizeComponent({
|
|
|
33315
33357
|
}, __vue_inject_styles__$h, __vue_script__$h, __vue_scope_id__$h, __vue_is_functional_template__$h, __vue_module_identifier__$h, false, undefined, undefined, undefined);
|
|
33316
33358
|
|
|
33317
33359
|
var searchResult$a = namespace("searchResult");
|
|
33318
|
-
var options$
|
|
33360
|
+
var options$4 = namespace("options");
|
|
33319
33361
|
|
|
33320
33362
|
var SearchResultsLayoutSelection = /*#__PURE__*/function (_Vue) {
|
|
33321
33363
|
_inherits(SearchResultsLayoutSelection, _Vue);
|
|
@@ -33342,7 +33384,7 @@ __decorate([searchResult$a.State(function (state) {
|
|
|
33342
33384
|
return state.layout;
|
|
33343
33385
|
})], SearchResultsLayoutSelection.prototype, "layout", void 0);
|
|
33344
33386
|
|
|
33345
|
-
__decorate([options$
|
|
33387
|
+
__decorate([options$4.Getter("classMap")], SearchResultsLayoutSelection.prototype, "classMap", void 0);
|
|
33346
33388
|
|
|
33347
33389
|
__decorate([searchResult$a.Action("setLayout")], SearchResultsLayoutSelection.prototype, "setLayout", void 0);
|
|
33348
33390
|
|
|
@@ -33596,6 +33638,7 @@ var __vue_component__$e = /*#__PURE__*/normalizeComponent({
|
|
|
33596
33638
|
|
|
33597
33639
|
var searchResult$7 = namespace("searchResult");
|
|
33598
33640
|
var params$4 = namespace("params");
|
|
33641
|
+
var options$3 = namespace("options");
|
|
33599
33642
|
|
|
33600
33643
|
var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
|
|
33601
33644
|
_inherits(SearchResultsToolbar, _Vue);
|
|
@@ -33672,11 +33715,10 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
|
|
|
33672
33715
|
}, {
|
|
33673
33716
|
key: "paginationOptions",
|
|
33674
33717
|
get: function get() {
|
|
33675
|
-
var pageSize = this.options.pagination.sizeSelection;
|
|
33676
33718
|
var pageSelect = this.options.pagination.pageSelection;
|
|
33677
|
-
|
|
33719
|
+
return {
|
|
33678
33720
|
pageSize: {
|
|
33679
|
-
sizes:
|
|
33721
|
+
sizes: this.currentResolutionPageSizes,
|
|
33680
33722
|
selectedSize: this.limit
|
|
33681
33723
|
},
|
|
33682
33724
|
pageSelect: {
|
|
@@ -33687,7 +33729,6 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
|
|
|
33687
33729
|
},
|
|
33688
33730
|
labels: this.options.labels
|
|
33689
33731
|
};
|
|
33690
|
-
return r;
|
|
33691
33732
|
}
|
|
33692
33733
|
}, {
|
|
33693
33734
|
key: "displayPageSelect",
|
|
@@ -33736,6 +33777,8 @@ __decorate([searchResult$7.State(function (state) {
|
|
|
33736
33777
|
return state.searchResult;
|
|
33737
33778
|
})], SearchResultsToolbar.prototype, "searchResult", void 0);
|
|
33738
33779
|
|
|
33780
|
+
__decorate([options$3.Getter("currentResolutionPageSizes")], SearchResultsToolbar.prototype, "currentResolutionPageSizes", void 0);
|
|
33781
|
+
|
|
33739
33782
|
__decorate([params$4.Action("removeAllFilters")], SearchResultsToolbar.prototype, "removeAllFilters", void 0);
|
|
33740
33783
|
|
|
33741
33784
|
SearchResultsToolbar = __decorate([Component({
|
|
@@ -34827,13 +34870,11 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
|
|
|
34827
34870
|
}, {
|
|
34828
34871
|
key: "handleMounted",
|
|
34829
34872
|
value: function handleMounted() {
|
|
34830
|
-
var _a, _b, _c;
|
|
34831
|
-
|
|
34832
34873
|
this.handleResize();
|
|
34833
34874
|
var params = new URLSearchParams(window.location.search);
|
|
34834
34875
|
this.handleUrlChange(params);
|
|
34835
34876
|
this.addParams(parseParams(params));
|
|
34836
|
-
this.setDefaultLimit(
|
|
34877
|
+
this.setDefaultLimit(this.defaultSearchResultPageSize);
|
|
34837
34878
|
}
|
|
34838
34879
|
}, {
|
|
34839
34880
|
key: "handleParamsChange",
|
|
@@ -36430,8 +36471,6 @@ var setDocumentTitle = function setDocumentTitle(template) {
|
|
|
36430
36471
|
document.title = addParamsToLabel(template, textToInsert);
|
|
36431
36472
|
};
|
|
36432
36473
|
|
|
36433
|
-
var MOBILE_WIDTH = 767;
|
|
36434
|
-
|
|
36435
36474
|
var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
36436
36475
|
_inherits(SearchResultModule, _VuexModule);
|
|
36437
36476
|
|
|
@@ -36511,6 +36550,13 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36511
36550
|
|
|
36512
36551
|
return (_b = (_a = this.displayFilters) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
36513
36552
|
}
|
|
36553
|
+
}, {
|
|
36554
|
+
key: "currentFilterKeys",
|
|
36555
|
+
get: function get() {
|
|
36556
|
+
var _a;
|
|
36557
|
+
|
|
36558
|
+
return Object.keys((_a = this.currentFilters) !== null && _a !== void 0 ? _a : {});
|
|
36559
|
+
}
|
|
36514
36560
|
}, {
|
|
36515
36561
|
key: "hasAnyFilter",
|
|
36516
36562
|
get: function get() {
|
|
@@ -36528,7 +36574,24 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36528
36574
|
}, {
|
|
36529
36575
|
key: "isMobileWidth",
|
|
36530
36576
|
get: function get() {
|
|
36531
|
-
return this.
|
|
36577
|
+
return this.currentScreenWidth === "sm" || this.currentScreenWidth === "xs";
|
|
36578
|
+
}
|
|
36579
|
+
}, {
|
|
36580
|
+
key: "currentScreenWidth",
|
|
36581
|
+
get: function get() {
|
|
36582
|
+
var width = this.screenWidth;
|
|
36583
|
+
|
|
36584
|
+
if (width <= S_MIN_WIDTH) {
|
|
36585
|
+
return "xs";
|
|
36586
|
+
} else if (width > S_MIN_WIDTH && width <= MD_MIN_WIDTH) {
|
|
36587
|
+
return "sm";
|
|
36588
|
+
} else if (width > MD_MIN_WIDTH && width <= L_MIN_WIDTH) {
|
|
36589
|
+
return "md";
|
|
36590
|
+
} else if (width > L_MIN_WIDTH && width <= XL_MIN_WIDTH) {
|
|
36591
|
+
return "l";
|
|
36592
|
+
} else {
|
|
36593
|
+
return "xl";
|
|
36594
|
+
}
|
|
36532
36595
|
}
|
|
36533
36596
|
}, {
|
|
36534
36597
|
key: "setSidebarVisibility",
|
|
@@ -36548,6 +36611,62 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36548
36611
|
this.addToCartAmount = addToCartAmount || this.addToCartAmount;
|
|
36549
36612
|
this.layout = layout || this.layout;
|
|
36550
36613
|
}
|
|
36614
|
+
}, {
|
|
36615
|
+
key: "queryFacet",
|
|
36616
|
+
value: function queryFacet(_ref3) {
|
|
36617
|
+
var queryKey = _ref3.queryKey,
|
|
36618
|
+
facetKey = _ref3.facetKey;
|
|
36619
|
+
|
|
36620
|
+
var _a, _b, _c, _d, _e;
|
|
36621
|
+
|
|
36622
|
+
return __awaiter$1(this, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
|
|
36623
|
+
var query, options, result, facet, facetItems, updatedResult;
|
|
36624
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
36625
|
+
while (1) {
|
|
36626
|
+
switch (_context.prev = _context.next) {
|
|
36627
|
+
case 0:
|
|
36628
|
+
query = {
|
|
36629
|
+
searchText: "",
|
|
36630
|
+
filters: Object.assign({}, this.currentFilters)
|
|
36631
|
+
};
|
|
36632
|
+
options = (_a = this.context.rootGetters["options/envOptions"]) !== null && _a !== void 0 ? _a : {};
|
|
36633
|
+
_context.next = 4;
|
|
36634
|
+
return getLupaSdk.query(queryKey, query, options);
|
|
36635
|
+
|
|
36636
|
+
case 4:
|
|
36637
|
+
result = _context.sent;
|
|
36638
|
+
|
|
36639
|
+
if (result.success) {
|
|
36640
|
+
_context.next = 7;
|
|
36641
|
+
break;
|
|
36642
|
+
}
|
|
36643
|
+
|
|
36644
|
+
return _context.abrupt("return");
|
|
36645
|
+
|
|
36646
|
+
case 7:
|
|
36647
|
+
facet = (_b = result.facets) === null || _b === void 0 ? void 0 : _b.find(function (f) {
|
|
36648
|
+
return f.key === facetKey;
|
|
36649
|
+
});
|
|
36650
|
+
facetItems = (_d = (_c = facet) === null || _c === void 0 ? void 0 : _c.items) !== null && _d !== void 0 ? _d : [];
|
|
36651
|
+
updatedResult = Object.assign(Object.assign({}, this.searchResult), {
|
|
36652
|
+
facets: (_e = this.facets) === null || _e === void 0 ? void 0 : _e.map(function (f) {
|
|
36653
|
+
return f.key === facetKey ? Object.assign(Object.assign({}, f), {
|
|
36654
|
+
items: facetItems
|
|
36655
|
+
}) : f;
|
|
36656
|
+
})
|
|
36657
|
+
});
|
|
36658
|
+
this.context.commit("save", {
|
|
36659
|
+
searchResult: updatedResult
|
|
36660
|
+
});
|
|
36661
|
+
|
|
36662
|
+
case 11:
|
|
36663
|
+
case "end":
|
|
36664
|
+
return _context.stop();
|
|
36665
|
+
}
|
|
36666
|
+
}
|
|
36667
|
+
}, _callee, this);
|
|
36668
|
+
}));
|
|
36669
|
+
}
|
|
36551
36670
|
}, {
|
|
36552
36671
|
key: "load",
|
|
36553
36672
|
value: function load(loading) {
|
|
@@ -36555,8 +36674,8 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36555
36674
|
}
|
|
36556
36675
|
}, {
|
|
36557
36676
|
key: "setScreenWidth",
|
|
36558
|
-
value: function setScreenWidth(
|
|
36559
|
-
var width =
|
|
36677
|
+
value: function setScreenWidth(_ref4) {
|
|
36678
|
+
var width = _ref4.width;
|
|
36560
36679
|
this.screenWidth = width;
|
|
36561
36680
|
}
|
|
36562
36681
|
}, {
|
|
@@ -36577,9 +36696,9 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36577
36696
|
}
|
|
36578
36697
|
}, {
|
|
36579
36698
|
key: "setColumnCount",
|
|
36580
|
-
value: function setColumnCount(
|
|
36581
|
-
var width =
|
|
36582
|
-
grid =
|
|
36699
|
+
value: function setColumnCount(_ref5) {
|
|
36700
|
+
var width = _ref5.width,
|
|
36701
|
+
grid = _ref5.grid;
|
|
36583
36702
|
|
|
36584
36703
|
if (!width || !grid) {
|
|
36585
36704
|
return {
|
|
@@ -36649,6 +36768,8 @@ __decorate([Mutation], SearchResultModule.prototype, "setSidebarVisibility", nul
|
|
|
36649
36768
|
|
|
36650
36769
|
__decorate([Mutation], SearchResultModule.prototype, "save", null);
|
|
36651
36770
|
|
|
36771
|
+
__decorate([Action], SearchResultModule.prototype, "queryFacet", null);
|
|
36772
|
+
|
|
36652
36773
|
__decorate([Mutation], SearchResultModule.prototype, "load", null);
|
|
36653
36774
|
|
|
36654
36775
|
__decorate([Mutation], SearchResultModule.prototype, "setScreenWidth", null);
|
|
@@ -36993,9 +37114,39 @@ var OptionsModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36993
37114
|
}, {
|
|
36994
37115
|
key: "defaultSearchResultPageSize",
|
|
36995
37116
|
get: function get() {
|
|
36996
|
-
var _a, _b
|
|
37117
|
+
var _a, _b;
|
|
37118
|
+
|
|
37119
|
+
return (_b = (_a = this.currentResolutionPageSizes) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : DEFAULT_PAGE_SIZE;
|
|
37120
|
+
}
|
|
37121
|
+
}, {
|
|
37122
|
+
key: "currentResolutionPageSizes",
|
|
37123
|
+
get: function get() {
|
|
37124
|
+
var _a, _b, _c;
|
|
36997
37125
|
|
|
36998
|
-
|
|
37126
|
+
var pageSizes = (_c = (_b = (_a = this.searchResultOptions) === null || _a === void 0 ? void 0 : _a.pagination) === null || _b === void 0 ? void 0 : _b.sizeSelection) === null || _c === void 0 ? void 0 : _c.sizes;
|
|
37127
|
+
|
|
37128
|
+
if (Array.isArray(pageSizes)) {
|
|
37129
|
+
return pageSizes;
|
|
37130
|
+
}
|
|
37131
|
+
|
|
37132
|
+
var screenSize = this.context.rootGetters["searchResult/currentScreenWidth"];
|
|
37133
|
+
|
|
37134
|
+
switch (screenSize) {
|
|
37135
|
+
case "xs":
|
|
37136
|
+
return pageSizes.xs;
|
|
37137
|
+
|
|
37138
|
+
case "sm":
|
|
37139
|
+
return pageSizes.sm;
|
|
37140
|
+
|
|
37141
|
+
case "md":
|
|
37142
|
+
return pageSizes.md;
|
|
37143
|
+
|
|
37144
|
+
case "l":
|
|
37145
|
+
return pageSizes.l;
|
|
37146
|
+
|
|
37147
|
+
case "xl":
|
|
37148
|
+
return pageSizes.xl;
|
|
37149
|
+
}
|
|
36999
37150
|
}
|
|
37000
37151
|
}, {
|
|
37001
37152
|
key: "setSearchBoxOptions",
|
|
@@ -13,6 +13,7 @@ export default class OptionsModule extends VuexModule {
|
|
|
13
13
|
get boxRoutingBehavior(): RoutingBehavior;
|
|
14
14
|
get searchResultsRoutingBehavior(): RoutingBehavior;
|
|
15
15
|
get defaultSearchResultPageSize(): number;
|
|
16
|
+
get currentResolutionPageSizes(): number[];
|
|
16
17
|
setSearchBoxOptions({ options }: {
|
|
17
18
|
options: SearchBoxOptions;
|
|
18
19
|
}): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ScreenSize } from "@/types/General";
|
|
1
2
|
import { LabeledFilter } from "@/types/search-results/Filters";
|
|
2
3
|
import { ResultsLayout } from "@/types/search-results/ResultsLayout";
|
|
3
4
|
import { ProductGrid } from "@/types/search-results/SearchResultsOptions";
|
|
@@ -20,9 +21,11 @@ export default class SearchResultModule extends VuexModule {
|
|
|
20
21
|
get labeledFilters(): LabeledFilter[];
|
|
21
22
|
get displayFilters(): LabeledFilter[];
|
|
22
23
|
get currentFilterCount(): number;
|
|
24
|
+
get currentFilterKeys(): string[];
|
|
23
25
|
get hasAnyFilter(): boolean;
|
|
24
26
|
get itemRange(): number[];
|
|
25
27
|
get isMobileWidth(): boolean;
|
|
28
|
+
get currentScreenWidth(): ScreenSize;
|
|
26
29
|
setSidebarVisibility({ visible }: {
|
|
27
30
|
visible: boolean;
|
|
28
31
|
}): void;
|
|
@@ -32,6 +35,10 @@ export default class SearchResultModule extends VuexModule {
|
|
|
32
35
|
addToCartAmount?: number;
|
|
33
36
|
layout?: ResultsLayout;
|
|
34
37
|
}): void;
|
|
38
|
+
queryFacet({ queryKey, facetKey, }: {
|
|
39
|
+
queryKey: string;
|
|
40
|
+
facetKey: string;
|
|
41
|
+
}): Promise<void>;
|
|
35
42
|
load(loading: boolean): void;
|
|
36
43
|
setScreenWidth({ width }: {
|
|
37
44
|
width: number;
|
|
@@ -70,9 +70,17 @@ export declare type SearchResultsPaginationLabels = {
|
|
|
70
70
|
pageSize: string;
|
|
71
71
|
showMore: string;
|
|
72
72
|
};
|
|
73
|
+
export declare type ResponsiveSearchResultPageSizes = {
|
|
74
|
+
xs: number[];
|
|
75
|
+
sm: number[];
|
|
76
|
+
md: number[];
|
|
77
|
+
l: number[];
|
|
78
|
+
xl: number[];
|
|
79
|
+
};
|
|
80
|
+
export declare type SearchResultPageSizes = number[] | ResponsiveSearchResultPageSizes;
|
|
73
81
|
export declare type SearchResultsPagination = {
|
|
74
82
|
sizeSelection: {
|
|
75
|
-
sizes:
|
|
83
|
+
sizes: SearchResultPageSizes;
|
|
76
84
|
position: SearchResultsPaginationPosition;
|
|
77
85
|
};
|
|
78
86
|
pageSelection: {
|
|
@@ -100,6 +108,9 @@ export declare type ResultCurrentFilterOptions = {
|
|
|
100
108
|
};
|
|
101
109
|
};
|
|
102
110
|
export declare type FacetStyle = "sidebar" | "top-dropdown";
|
|
111
|
+
export declare type FacetFilterQuery = {
|
|
112
|
+
queryKey: string;
|
|
113
|
+
};
|
|
103
114
|
export declare type ResultFacetOptions = {
|
|
104
115
|
labels: {
|
|
105
116
|
title: string;
|
|
@@ -131,6 +142,7 @@ export declare type ResultFacetOptions = {
|
|
|
131
142
|
type: FacetStyle;
|
|
132
143
|
};
|
|
133
144
|
exclude?: string[];
|
|
145
|
+
facetFilterQueries?: Record<string, FacetFilterQuery>;
|
|
134
146
|
};
|
|
135
147
|
export declare type SearchResultsFilterOptions = {
|
|
136
148
|
currentFilters?: ResultCurrentFilterOptions;
|
|
@@ -7,14 +7,23 @@ export default class FacetDisplay extends Vue {
|
|
|
7
7
|
facet: FacetResult;
|
|
8
8
|
currentFilters: FilterGroup;
|
|
9
9
|
clearable: boolean;
|
|
10
|
+
currentFilterKeys: string[];
|
|
10
11
|
isOpen: boolean;
|
|
11
12
|
get facetType(): string;
|
|
12
13
|
get hasItems(): boolean;
|
|
13
14
|
get hasFilter(): boolean;
|
|
15
|
+
get filterQueryKey(): string | undefined;
|
|
16
|
+
get activeFilterKeys(): string;
|
|
14
17
|
mounted(): void;
|
|
15
18
|
beforeDestroy(): void;
|
|
16
19
|
handleMouseClick(e: MouseEvent): void;
|
|
20
|
+
handleParamsChange(): void;
|
|
21
|
+
queryFacet: ({ queryKey, facetKey, }: {
|
|
22
|
+
queryKey: string;
|
|
23
|
+
facetKey: string;
|
|
24
|
+
}) => Promise<void>;
|
|
17
25
|
toggleFacet(): void;
|
|
26
|
+
handleFacetQueryFilter(): void;
|
|
18
27
|
handleFacetSelect(item: FacetAction): void;
|
|
19
28
|
clear(): void;
|
|
20
29
|
}
|
|
@@ -21,6 +21,7 @@ export default class SearchResultsToolbar extends Vue {
|
|
|
21
21
|
get displayPageSelect(): boolean;
|
|
22
22
|
get searchSummaryLabel(): string;
|
|
23
23
|
get showMobileFilterCount(): boolean;
|
|
24
|
+
currentResolutionPageSizes: number[];
|
|
24
25
|
removeAllFilters: () => {
|
|
25
26
|
params: QueryParams;
|
|
26
27
|
};
|