@getlupa/client 0.6.0-alpha-2 → 0.6.0-alpha-3
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/SearchResults.vue.d.ts +3 -0
- package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
- package/dist/cjs/constants/searchResults.const.d.ts +1 -0
- package/dist/cjs/index.min.js +55 -24
- package/dist/cjs/store/modules/searchResult.d.ts +5 -0
- package/dist/cjs/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/dist/es/components/search-results/SearchResults.vue.d.ts +3 -0
- package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
- package/dist/es/constants/searchResults.const.d.ts +1 -0
- package/dist/es/index.min.js +55 -24
- package/dist/es/store/modules/searchResult.d.ts +5 -0
- package/dist/es/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/es/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/dist/iife/components/search-results/SearchResults.vue.d.ts +3 -0
- package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
- package/dist/iife/constants/searchResults.const.d.ts +1 -0
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/store/modules/searchResult.d.ts +5 -0
- package/dist/iife/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/iife/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/package.json +1 -1
|
@@ -64,6 +64,9 @@ export default class SearchResults extends Vue {
|
|
|
64
64
|
queryKey: string;
|
|
65
65
|
results: SearchQueryResult;
|
|
66
66
|
}): void;
|
|
67
|
+
setScreenWidth: ({ width, }: {
|
|
68
|
+
width: number;
|
|
69
|
+
}) => void;
|
|
67
70
|
setColumnCount: ({ width, grid, }: {
|
|
68
71
|
width: number;
|
|
69
72
|
grid: ProductGrid;
|
package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
5
5
|
lastPageLabel: string;
|
|
6
6
|
firstPageLabel: string;
|
|
7
7
|
options: PaginationPageSelect;
|
|
8
|
+
isMobileWidth: boolean;
|
|
9
|
+
get pageOptionsCount(): number;
|
|
8
10
|
get pages(): number[];
|
|
9
11
|
get showBack(): boolean;
|
|
10
12
|
get lastPage(): number | undefined;
|
package/dist/cjs/index.min.js
CHANGED
|
@@ -24229,7 +24229,8 @@ var DEFAULT_OPTIONS_RESULTS = {
|
|
|
24229
24229
|
top: false,
|
|
24230
24230
|
bottom: true
|
|
24231
24231
|
},
|
|
24232
|
-
display: 5
|
|
24232
|
+
display: 5,
|
|
24233
|
+
displayMobile: 3
|
|
24233
24234
|
}
|
|
24234
24235
|
},
|
|
24235
24236
|
sort: [],
|
|
@@ -25608,7 +25609,7 @@ var toggleHierarchyParam = function toggleHierarchyParam() {
|
|
|
25608
25609
|
return getMostSpecificHierarchyTerms([param].concat(_toConsumableArray(params)));
|
|
25609
25610
|
};
|
|
25610
25611
|
|
|
25611
|
-
var searchResult$
|
|
25612
|
+
var searchResult$h = namespace("searchResult");
|
|
25612
25613
|
var params$c = namespace("params");
|
|
25613
25614
|
var options$8 = namespace("options");
|
|
25614
25615
|
|
|
@@ -25679,13 +25680,13 @@ __decorate([Prop({
|
|
|
25679
25680
|
default: false
|
|
25680
25681
|
})], CurrentFilters.prototype, "expandable", void 0);
|
|
25681
25682
|
|
|
25682
|
-
__decorate([searchResult$
|
|
25683
|
+
__decorate([searchResult$h.Getter("filters")], CurrentFilters.prototype, "currentFilters", void 0);
|
|
25683
25684
|
|
|
25684
|
-
__decorate([searchResult$
|
|
25685
|
+
__decorate([searchResult$h.Getter("facets")], CurrentFilters.prototype, "facets", void 0);
|
|
25685
25686
|
|
|
25686
|
-
__decorate([searchResult$
|
|
25687
|
+
__decorate([searchResult$h.Getter("displayFilters")], CurrentFilters.prototype, "displayFilters", void 0);
|
|
25687
25688
|
|
|
25688
|
-
__decorate([searchResult$
|
|
25689
|
+
__decorate([searchResult$h.Getter("currentFilterCount")], CurrentFilters.prototype, "currentFilterCount", void 0);
|
|
25689
25690
|
|
|
25690
25691
|
__decorate([options$8.Getter("initialFilters")], CurrentFilters.prototype, "initialFilters", void 0);
|
|
25691
25692
|
|
|
@@ -29684,7 +29685,7 @@ var scrollTo = function scrollTo(elementId) {
|
|
|
29684
29685
|
});
|
|
29685
29686
|
};
|
|
29686
29687
|
|
|
29687
|
-
var searchResult$
|
|
29688
|
+
var searchResult$g = namespace("searchResult");
|
|
29688
29689
|
var params$b = namespace("params");
|
|
29689
29690
|
|
|
29690
29691
|
var Facets = /*#__PURE__*/function (_Vue) {
|
|
@@ -29768,7 +29769,7 @@ __decorate([Prop({
|
|
|
29768
29769
|
|
|
29769
29770
|
__decorate([params$b.Getter("filters")], Facets.prototype, "currentFilters", void 0);
|
|
29770
29771
|
|
|
29771
|
-
__decorate([searchResult$
|
|
29772
|
+
__decorate([searchResult$g.Getter("facets")], Facets.prototype, "facets", void 0);
|
|
29772
29773
|
|
|
29773
29774
|
__decorate([params$b.Action("removeParams")], Facets.prototype, "removeParams", void 0);
|
|
29774
29775
|
|
|
@@ -30261,7 +30262,7 @@ var __vue_component__$D = /*#__PURE__*/normalizeComponent({
|
|
|
30261
30262
|
staticRenderFns: __vue_staticRenderFns__$D
|
|
30262
30263
|
}, __vue_inject_styles__$D, __vue_script__$D, __vue_scope_id__$D, __vue_is_functional_template__$D, __vue_module_identifier__$D, false, undefined, undefined, undefined);
|
|
30263
30264
|
|
|
30264
|
-
var searchResult$
|
|
30265
|
+
var searchResult$f = namespace("searchResult");
|
|
30265
30266
|
|
|
30266
30267
|
var MobileFilterSidebar = /*#__PURE__*/function (_Vue) {
|
|
30267
30268
|
_inherits(MobileFilterSidebar, _Vue);
|
|
@@ -30309,13 +30310,13 @@ var MobileFilterSidebar = /*#__PURE__*/function (_Vue) {
|
|
|
30309
30310
|
|
|
30310
30311
|
__decorate([Prop()], MobileFilterSidebar.prototype, "options", void 0);
|
|
30311
30312
|
|
|
30312
|
-
__decorate([searchResult$
|
|
30313
|
+
__decorate([searchResult$f.Mutation("setSidebarVisibility")], MobileFilterSidebar.prototype, "setSidebarVisibility", void 0);
|
|
30313
30314
|
|
|
30314
|
-
__decorate([searchResult$
|
|
30315
|
+
__decorate([searchResult$f.State(function (state) {
|
|
30315
30316
|
return state.isMobileSidebarVisible;
|
|
30316
30317
|
})], MobileFilterSidebar.prototype, "isMobileSidebarVisible", void 0);
|
|
30317
30318
|
|
|
30318
|
-
__decorate([searchResult$
|
|
30319
|
+
__decorate([searchResult$f.Getter("currentFilterCount")], MobileFilterSidebar.prototype, "currentFilterCount", void 0);
|
|
30319
30320
|
|
|
30320
30321
|
MobileFilterSidebar = __decorate([Component({
|
|
30321
30322
|
name: "mobileFilerSidebar",
|
|
@@ -30384,7 +30385,7 @@ var __vue_component__$C = /*#__PURE__*/normalizeComponent({
|
|
|
30384
30385
|
staticRenderFns: __vue_staticRenderFns__$C
|
|
30385
30386
|
}, __vue_inject_styles__$C, __vue_script__$C, __vue_scope_id__$C, __vue_is_functional_template__$C, __vue_module_identifier__$C, false, undefined, undefined, undefined);
|
|
30386
30387
|
|
|
30387
|
-
var searchResult$
|
|
30388
|
+
var searchResult$e = namespace("searchResult");
|
|
30388
30389
|
var params$a = namespace("params");
|
|
30389
30390
|
|
|
30390
30391
|
var SearchResultsDidYouMean = /*#__PURE__*/function (_Vue) {
|
|
@@ -30437,7 +30438,7 @@ __decorate([Prop({
|
|
|
30437
30438
|
default: ""
|
|
30438
30439
|
})], SearchResultsDidYouMean.prototype, "labels", void 0);
|
|
30439
30440
|
|
|
30440
|
-
__decorate([searchResult$
|
|
30441
|
+
__decorate([searchResult$e.State(function (state) {
|
|
30441
30442
|
return state.searchResult;
|
|
30442
30443
|
})], SearchResultsDidYouMean.prototype, "searchResult", void 0);
|
|
30443
30444
|
|
|
@@ -31587,7 +31588,7 @@ var __vue_component__$r = /*#__PURE__*/normalizeComponent({
|
|
|
31587
31588
|
staticRenderFns: __vue_staticRenderFns__$r
|
|
31588
31589
|
}, __vue_inject_styles__$r, __vue_script__$r, __vue_scope_id__$r, __vue_is_functional_template__$r, __vue_module_identifier__$r, false, undefined, undefined, undefined);
|
|
31589
31590
|
|
|
31590
|
-
var searchResult$
|
|
31591
|
+
var searchResult$d = namespace("searchResult");
|
|
31591
31592
|
|
|
31592
31593
|
var SearchResultsProductAddToCart = /*#__PURE__*/function (_Vue) {
|
|
31593
31594
|
_inherits(SearchResultsProductAddToCart, _Vue);
|
|
@@ -31648,7 +31649,7 @@ __decorate([Prop({
|
|
|
31648
31649
|
default: true
|
|
31649
31650
|
})], SearchResultsProductAddToCart.prototype, "inStock", void 0);
|
|
31650
31651
|
|
|
31651
|
-
__decorate([searchResult$
|
|
31652
|
+
__decorate([searchResult$d.State(function (state) {
|
|
31652
31653
|
return state.addToCartAmount;
|
|
31653
31654
|
})], SearchResultsProductAddToCart.prototype, "addToCartAmount", void 0);
|
|
31654
31655
|
|
|
@@ -32025,7 +32026,7 @@ var __vue_component__$n = /*#__PURE__*/normalizeComponent({
|
|
|
32025
32026
|
|
|
32026
32027
|
var tracking$3 = namespace("tracking");
|
|
32027
32028
|
var params$9 = namespace("params");
|
|
32028
|
-
var searchResult$
|
|
32029
|
+
var searchResult$c = namespace("searchResult");
|
|
32029
32030
|
var options$4 = namespace("options");
|
|
32030
32031
|
|
|
32031
32032
|
var SearchResultsProductCard = /*#__PURE__*/function (_Vue) {
|
|
@@ -32193,7 +32194,7 @@ __decorate([Prop({
|
|
|
32193
32194
|
default: false
|
|
32194
32195
|
})], SearchResultsProductCard.prototype, "isAdditionalPanel", void 0);
|
|
32195
32196
|
|
|
32196
|
-
__decorate([searchResult$
|
|
32197
|
+
__decorate([searchResult$c.State(function (state) {
|
|
32197
32198
|
return state.layout;
|
|
32198
32199
|
})], SearchResultsProductCard.prototype, "layout", void 0);
|
|
32199
32200
|
|
|
@@ -32901,6 +32902,7 @@ var __vue_component__$j = /*#__PURE__*/normalizeComponent({
|
|
|
32901
32902
|
}, __vue_inject_styles__$j, __vue_script__$j, __vue_scope_id__$j, __vue_is_functional_template__$j, __vue_module_identifier__$j, false, undefined, undefined, undefined);
|
|
32902
32903
|
|
|
32903
32904
|
var params$6 = namespace("params");
|
|
32905
|
+
var searchResult$b = namespace("searchResult");
|
|
32904
32906
|
|
|
32905
32907
|
var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
32906
32908
|
_inherits(SearchResultsPageSelect, _Vue);
|
|
@@ -32914,12 +32916,17 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32914
32916
|
}
|
|
32915
32917
|
|
|
32916
32918
|
_createClass(SearchResultsPageSelect, [{
|
|
32919
|
+
key: "pageOptionsCount",
|
|
32920
|
+
get: function get() {
|
|
32921
|
+
return this.isMobileWidth ? this.options.displayMobile : this.options.display;
|
|
32922
|
+
}
|
|
32923
|
+
}, {
|
|
32917
32924
|
key: "pages",
|
|
32918
32925
|
get: function get() {
|
|
32919
32926
|
var currentPage = Math.min(this.options.count, this.options.selectedPage);
|
|
32920
|
-
var delta = Math.floor(this.
|
|
32927
|
+
var delta = Math.floor(this.pageOptionsCount / 2),
|
|
32921
32928
|
left = currentPage - delta,
|
|
32922
|
-
right = currentPage + (this.
|
|
32929
|
+
right = currentPage + (this.pageOptionsCount - delta);
|
|
32923
32930
|
return Array.from({
|
|
32924
32931
|
length: this.options.count
|
|
32925
32932
|
}, function (v, k) {
|
|
@@ -32992,6 +32999,8 @@ __decorate([Prop({
|
|
|
32992
32999
|
default: {}
|
|
32993
33000
|
})], SearchResultsPageSelect.prototype, "options", void 0);
|
|
32994
33001
|
|
|
33002
|
+
__decorate([searchResult$b.Getter("isMobileWidth")], SearchResultsPageSelect.prototype, "isMobileWidth", void 0);
|
|
33003
|
+
|
|
32995
33004
|
__decorate([params$6.Action("appendParams")], SearchResultsPageSelect.prototype, "appendParams", void 0);
|
|
32996
33005
|
|
|
32997
33006
|
SearchResultsPageSelect = __decorate([Component({
|
|
@@ -33638,7 +33647,8 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
|
|
|
33638
33647
|
pageSelect: {
|
|
33639
33648
|
count: getPageCount(this.searchResult.total, this.limit),
|
|
33640
33649
|
selectedPage: this.page,
|
|
33641
|
-
display: pageSelect.display
|
|
33650
|
+
display: pageSelect.display,
|
|
33651
|
+
displayMobile: pageSelect.displayMobile
|
|
33642
33652
|
},
|
|
33643
33653
|
labels: this.options.labels
|
|
33644
33654
|
};
|
|
@@ -34868,6 +34878,9 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
|
|
|
34868
34878
|
width: window.innerWidth,
|
|
34869
34879
|
grid: this.options.grid
|
|
34870
34880
|
});
|
|
34881
|
+
this.setScreenWidth({
|
|
34882
|
+
width: window.innerWidth
|
|
34883
|
+
});
|
|
34871
34884
|
}
|
|
34872
34885
|
}]);
|
|
34873
34886
|
|
|
@@ -34920,6 +34933,8 @@ __decorate([searchResult$1.Action("setLoading")], SearchResults.prototype, "setL
|
|
|
34920
34933
|
|
|
34921
34934
|
__decorate([options$1.Getter("defaultSearchResultPageSize")], SearchResults.prototype, "defaultSearchResultPageSize", void 0);
|
|
34922
34935
|
|
|
34936
|
+
__decorate([searchResult$1.Mutation("setScreenWidth")], SearchResults.prototype, "setScreenWidth", void 0);
|
|
34937
|
+
|
|
34923
34938
|
__decorate([searchResult$1.Action("setColumnCount")], SearchResults.prototype, "setColumnCount", void 0);
|
|
34924
34939
|
|
|
34925
34940
|
SearchResults = __decorate([Component({
|
|
@@ -36376,6 +36391,8 @@ var setDocumentTitle = function setDocumentTitle(template) {
|
|
|
36376
36391
|
document.title = addParamsToLabel(template, textToInsert);
|
|
36377
36392
|
};
|
|
36378
36393
|
|
|
36394
|
+
var MOBILE_WIDTH = 767;
|
|
36395
|
+
|
|
36379
36396
|
var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
36380
36397
|
_inherits(SearchResultModule, _VuexModule);
|
|
36381
36398
|
|
|
@@ -36393,6 +36410,7 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36393
36410
|
_this.layout = ResultsLayoutEnum.GRID;
|
|
36394
36411
|
_this.loading = false;
|
|
36395
36412
|
_this.isMobileSidebarVisible = false;
|
|
36413
|
+
_this.screenWidth = 1000;
|
|
36396
36414
|
return _this;
|
|
36397
36415
|
}
|
|
36398
36416
|
|
|
@@ -36468,6 +36486,11 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36468
36486
|
var offset = (_b = this.searchResult.offset) !== null && _b !== void 0 ? _b : 0;
|
|
36469
36487
|
return [offset + 1, Math.min(offset + limit, this.totalItems)];
|
|
36470
36488
|
}
|
|
36489
|
+
}, {
|
|
36490
|
+
key: "isMobileWidth",
|
|
36491
|
+
get: function get() {
|
|
36492
|
+
return this.screenWidth < MOBILE_WIDTH;
|
|
36493
|
+
}
|
|
36471
36494
|
}, {
|
|
36472
36495
|
key: "setSidebarVisibility",
|
|
36473
36496
|
value: function setSidebarVisibility(_ref) {
|
|
@@ -36491,6 +36514,12 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36491
36514
|
value: function load(loading) {
|
|
36492
36515
|
this.loading = loading || false;
|
|
36493
36516
|
}
|
|
36517
|
+
}, {
|
|
36518
|
+
key: "setScreenWidth",
|
|
36519
|
+
value: function setScreenWidth(_ref3) {
|
|
36520
|
+
var width = _ref3.width;
|
|
36521
|
+
this.screenWidth = width;
|
|
36522
|
+
}
|
|
36494
36523
|
}, {
|
|
36495
36524
|
key: "add",
|
|
36496
36525
|
value: function add(searchResult) {
|
|
@@ -36509,9 +36538,9 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36509
36538
|
}
|
|
36510
36539
|
}, {
|
|
36511
36540
|
key: "setColumnCount",
|
|
36512
|
-
value: function setColumnCount(
|
|
36513
|
-
var width =
|
|
36514
|
-
grid =
|
|
36541
|
+
value: function setColumnCount(_ref4) {
|
|
36542
|
+
var width = _ref4.width,
|
|
36543
|
+
grid = _ref4.grid;
|
|
36515
36544
|
|
|
36516
36545
|
if (!width || !grid) {
|
|
36517
36546
|
return {
|
|
@@ -36583,6 +36612,8 @@ __decorate([Mutation], SearchResultModule.prototype, "save", null);
|
|
|
36583
36612
|
|
|
36584
36613
|
__decorate([Mutation], SearchResultModule.prototype, "load", null);
|
|
36585
36614
|
|
|
36615
|
+
__decorate([Mutation], SearchResultModule.prototype, "setScreenWidth", null);
|
|
36616
|
+
|
|
36586
36617
|
__decorate([Action({
|
|
36587
36618
|
commit: "save"
|
|
36588
36619
|
})], SearchResultModule.prototype, "add", null);
|
|
@@ -10,6 +10,7 @@ export default class SearchResultModule extends VuexModule {
|
|
|
10
10
|
layout: ResultsLayout;
|
|
11
11
|
loading: boolean;
|
|
12
12
|
isMobileSidebarVisible: boolean;
|
|
13
|
+
screenWidth: number;
|
|
13
14
|
get facets(): FacetResult[] | undefined;
|
|
14
15
|
get currentFilters(): FilterGroup | undefined;
|
|
15
16
|
get filters(): FilterGroup;
|
|
@@ -21,6 +22,7 @@ export default class SearchResultModule extends VuexModule {
|
|
|
21
22
|
get currentFilterCount(): number;
|
|
22
23
|
get hasAnyFilter(): boolean;
|
|
23
24
|
get itemRange(): number[];
|
|
25
|
+
get isMobileWidth(): boolean;
|
|
24
26
|
setSidebarVisibility({ visible }: {
|
|
25
27
|
visible: boolean;
|
|
26
28
|
}): void;
|
|
@@ -31,6 +33,9 @@ export default class SearchResultModule extends VuexModule {
|
|
|
31
33
|
layout?: ResultsLayout;
|
|
32
34
|
}): void;
|
|
33
35
|
load(loading: boolean): void;
|
|
36
|
+
setScreenWidth({ width }: {
|
|
37
|
+
width: number;
|
|
38
|
+
}): void;
|
|
34
39
|
add(searchResult: SearchQueryResult): {
|
|
35
40
|
searchResult: SearchQueryResult;
|
|
36
41
|
pageSize: number;
|
|
@@ -64,6 +64,9 @@ export default class SearchResults extends Vue {
|
|
|
64
64
|
queryKey: string;
|
|
65
65
|
results: SearchQueryResult;
|
|
66
66
|
}): void;
|
|
67
|
+
setScreenWidth: ({ width, }: {
|
|
68
|
+
width: number;
|
|
69
|
+
}) => void;
|
|
67
70
|
setColumnCount: ({ width, grid, }: {
|
|
68
71
|
width: number;
|
|
69
72
|
grid: ProductGrid;
|
package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
5
5
|
lastPageLabel: string;
|
|
6
6
|
firstPageLabel: string;
|
|
7
7
|
options: PaginationPageSelect;
|
|
8
|
+
isMobileWidth: boolean;
|
|
9
|
+
get pageOptionsCount(): number;
|
|
8
10
|
get pages(): number[];
|
|
9
11
|
get showBack(): boolean;
|
|
10
12
|
get lastPage(): number | undefined;
|
package/dist/es/index.min.js
CHANGED
|
@@ -24225,7 +24225,8 @@ var DEFAULT_OPTIONS_RESULTS = {
|
|
|
24225
24225
|
top: false,
|
|
24226
24226
|
bottom: true
|
|
24227
24227
|
},
|
|
24228
|
-
display: 5
|
|
24228
|
+
display: 5,
|
|
24229
|
+
displayMobile: 3
|
|
24229
24230
|
}
|
|
24230
24231
|
},
|
|
24231
24232
|
sort: [],
|
|
@@ -25604,7 +25605,7 @@ var toggleHierarchyParam = function toggleHierarchyParam() {
|
|
|
25604
25605
|
return getMostSpecificHierarchyTerms([param].concat(_toConsumableArray(params)));
|
|
25605
25606
|
};
|
|
25606
25607
|
|
|
25607
|
-
var searchResult$
|
|
25608
|
+
var searchResult$h = namespace("searchResult");
|
|
25608
25609
|
var params$c = namespace("params");
|
|
25609
25610
|
var options$8 = namespace("options");
|
|
25610
25611
|
|
|
@@ -25675,13 +25676,13 @@ __decorate([Prop({
|
|
|
25675
25676
|
default: false
|
|
25676
25677
|
})], CurrentFilters.prototype, "expandable", void 0);
|
|
25677
25678
|
|
|
25678
|
-
__decorate([searchResult$
|
|
25679
|
+
__decorate([searchResult$h.Getter("filters")], CurrentFilters.prototype, "currentFilters", void 0);
|
|
25679
25680
|
|
|
25680
|
-
__decorate([searchResult$
|
|
25681
|
+
__decorate([searchResult$h.Getter("facets")], CurrentFilters.prototype, "facets", void 0);
|
|
25681
25682
|
|
|
25682
|
-
__decorate([searchResult$
|
|
25683
|
+
__decorate([searchResult$h.Getter("displayFilters")], CurrentFilters.prototype, "displayFilters", void 0);
|
|
25683
25684
|
|
|
25684
|
-
__decorate([searchResult$
|
|
25685
|
+
__decorate([searchResult$h.Getter("currentFilterCount")], CurrentFilters.prototype, "currentFilterCount", void 0);
|
|
25685
25686
|
|
|
25686
25687
|
__decorate([options$8.Getter("initialFilters")], CurrentFilters.prototype, "initialFilters", void 0);
|
|
25687
25688
|
|
|
@@ -29680,7 +29681,7 @@ var scrollTo = function scrollTo(elementId) {
|
|
|
29680
29681
|
});
|
|
29681
29682
|
};
|
|
29682
29683
|
|
|
29683
|
-
var searchResult$
|
|
29684
|
+
var searchResult$g = namespace("searchResult");
|
|
29684
29685
|
var params$b = namespace("params");
|
|
29685
29686
|
|
|
29686
29687
|
var Facets = /*#__PURE__*/function (_Vue) {
|
|
@@ -29764,7 +29765,7 @@ __decorate([Prop({
|
|
|
29764
29765
|
|
|
29765
29766
|
__decorate([params$b.Getter("filters")], Facets.prototype, "currentFilters", void 0);
|
|
29766
29767
|
|
|
29767
|
-
__decorate([searchResult$
|
|
29768
|
+
__decorate([searchResult$g.Getter("facets")], Facets.prototype, "facets", void 0);
|
|
29768
29769
|
|
|
29769
29770
|
__decorate([params$b.Action("removeParams")], Facets.prototype, "removeParams", void 0);
|
|
29770
29771
|
|
|
@@ -30257,7 +30258,7 @@ var __vue_component__$D = /*#__PURE__*/normalizeComponent({
|
|
|
30257
30258
|
staticRenderFns: __vue_staticRenderFns__$D
|
|
30258
30259
|
}, __vue_inject_styles__$D, __vue_script__$D, __vue_scope_id__$D, __vue_is_functional_template__$D, __vue_module_identifier__$D, false, undefined, undefined, undefined);
|
|
30259
30260
|
|
|
30260
|
-
var searchResult$
|
|
30261
|
+
var searchResult$f = namespace("searchResult");
|
|
30261
30262
|
|
|
30262
30263
|
var MobileFilterSidebar = /*#__PURE__*/function (_Vue) {
|
|
30263
30264
|
_inherits(MobileFilterSidebar, _Vue);
|
|
@@ -30305,13 +30306,13 @@ var MobileFilterSidebar = /*#__PURE__*/function (_Vue) {
|
|
|
30305
30306
|
|
|
30306
30307
|
__decorate([Prop()], MobileFilterSidebar.prototype, "options", void 0);
|
|
30307
30308
|
|
|
30308
|
-
__decorate([searchResult$
|
|
30309
|
+
__decorate([searchResult$f.Mutation("setSidebarVisibility")], MobileFilterSidebar.prototype, "setSidebarVisibility", void 0);
|
|
30309
30310
|
|
|
30310
|
-
__decorate([searchResult$
|
|
30311
|
+
__decorate([searchResult$f.State(function (state) {
|
|
30311
30312
|
return state.isMobileSidebarVisible;
|
|
30312
30313
|
})], MobileFilterSidebar.prototype, "isMobileSidebarVisible", void 0);
|
|
30313
30314
|
|
|
30314
|
-
__decorate([searchResult$
|
|
30315
|
+
__decorate([searchResult$f.Getter("currentFilterCount")], MobileFilterSidebar.prototype, "currentFilterCount", void 0);
|
|
30315
30316
|
|
|
30316
30317
|
MobileFilterSidebar = __decorate([Component({
|
|
30317
30318
|
name: "mobileFilerSidebar",
|
|
@@ -30380,7 +30381,7 @@ var __vue_component__$C = /*#__PURE__*/normalizeComponent({
|
|
|
30380
30381
|
staticRenderFns: __vue_staticRenderFns__$C
|
|
30381
30382
|
}, __vue_inject_styles__$C, __vue_script__$C, __vue_scope_id__$C, __vue_is_functional_template__$C, __vue_module_identifier__$C, false, undefined, undefined, undefined);
|
|
30382
30383
|
|
|
30383
|
-
var searchResult$
|
|
30384
|
+
var searchResult$e = namespace("searchResult");
|
|
30384
30385
|
var params$a = namespace("params");
|
|
30385
30386
|
|
|
30386
30387
|
var SearchResultsDidYouMean = /*#__PURE__*/function (_Vue) {
|
|
@@ -30433,7 +30434,7 @@ __decorate([Prop({
|
|
|
30433
30434
|
default: ""
|
|
30434
30435
|
})], SearchResultsDidYouMean.prototype, "labels", void 0);
|
|
30435
30436
|
|
|
30436
|
-
__decorate([searchResult$
|
|
30437
|
+
__decorate([searchResult$e.State(function (state) {
|
|
30437
30438
|
return state.searchResult;
|
|
30438
30439
|
})], SearchResultsDidYouMean.prototype, "searchResult", void 0);
|
|
30439
30440
|
|
|
@@ -31583,7 +31584,7 @@ var __vue_component__$r = /*#__PURE__*/normalizeComponent({
|
|
|
31583
31584
|
staticRenderFns: __vue_staticRenderFns__$r
|
|
31584
31585
|
}, __vue_inject_styles__$r, __vue_script__$r, __vue_scope_id__$r, __vue_is_functional_template__$r, __vue_module_identifier__$r, false, undefined, undefined, undefined);
|
|
31585
31586
|
|
|
31586
|
-
var searchResult$
|
|
31587
|
+
var searchResult$d = namespace("searchResult");
|
|
31587
31588
|
|
|
31588
31589
|
var SearchResultsProductAddToCart = /*#__PURE__*/function (_Vue) {
|
|
31589
31590
|
_inherits(SearchResultsProductAddToCart, _Vue);
|
|
@@ -31644,7 +31645,7 @@ __decorate([Prop({
|
|
|
31644
31645
|
default: true
|
|
31645
31646
|
})], SearchResultsProductAddToCart.prototype, "inStock", void 0);
|
|
31646
31647
|
|
|
31647
|
-
__decorate([searchResult$
|
|
31648
|
+
__decorate([searchResult$d.State(function (state) {
|
|
31648
31649
|
return state.addToCartAmount;
|
|
31649
31650
|
})], SearchResultsProductAddToCart.prototype, "addToCartAmount", void 0);
|
|
31650
31651
|
|
|
@@ -32021,7 +32022,7 @@ var __vue_component__$n = /*#__PURE__*/normalizeComponent({
|
|
|
32021
32022
|
|
|
32022
32023
|
var tracking$3 = namespace("tracking");
|
|
32023
32024
|
var params$9 = namespace("params");
|
|
32024
|
-
var searchResult$
|
|
32025
|
+
var searchResult$c = namespace("searchResult");
|
|
32025
32026
|
var options$4 = namespace("options");
|
|
32026
32027
|
|
|
32027
32028
|
var SearchResultsProductCard = /*#__PURE__*/function (_Vue) {
|
|
@@ -32189,7 +32190,7 @@ __decorate([Prop({
|
|
|
32189
32190
|
default: false
|
|
32190
32191
|
})], SearchResultsProductCard.prototype, "isAdditionalPanel", void 0);
|
|
32191
32192
|
|
|
32192
|
-
__decorate([searchResult$
|
|
32193
|
+
__decorate([searchResult$c.State(function (state) {
|
|
32193
32194
|
return state.layout;
|
|
32194
32195
|
})], SearchResultsProductCard.prototype, "layout", void 0);
|
|
32195
32196
|
|
|
@@ -32897,6 +32898,7 @@ var __vue_component__$j = /*#__PURE__*/normalizeComponent({
|
|
|
32897
32898
|
}, __vue_inject_styles__$j, __vue_script__$j, __vue_scope_id__$j, __vue_is_functional_template__$j, __vue_module_identifier__$j, false, undefined, undefined, undefined);
|
|
32898
32899
|
|
|
32899
32900
|
var params$6 = namespace("params");
|
|
32901
|
+
var searchResult$b = namespace("searchResult");
|
|
32900
32902
|
|
|
32901
32903
|
var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
32902
32904
|
_inherits(SearchResultsPageSelect, _Vue);
|
|
@@ -32910,12 +32912,17 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32910
32912
|
}
|
|
32911
32913
|
|
|
32912
32914
|
_createClass(SearchResultsPageSelect, [{
|
|
32915
|
+
key: "pageOptionsCount",
|
|
32916
|
+
get: function get() {
|
|
32917
|
+
return this.isMobileWidth ? this.options.displayMobile : this.options.display;
|
|
32918
|
+
}
|
|
32919
|
+
}, {
|
|
32913
32920
|
key: "pages",
|
|
32914
32921
|
get: function get() {
|
|
32915
32922
|
var currentPage = Math.min(this.options.count, this.options.selectedPage);
|
|
32916
|
-
var delta = Math.floor(this.
|
|
32923
|
+
var delta = Math.floor(this.pageOptionsCount / 2),
|
|
32917
32924
|
left = currentPage - delta,
|
|
32918
|
-
right = currentPage + (this.
|
|
32925
|
+
right = currentPage + (this.pageOptionsCount - delta);
|
|
32919
32926
|
return Array.from({
|
|
32920
32927
|
length: this.options.count
|
|
32921
32928
|
}, function (v, k) {
|
|
@@ -32988,6 +32995,8 @@ __decorate([Prop({
|
|
|
32988
32995
|
default: {}
|
|
32989
32996
|
})], SearchResultsPageSelect.prototype, "options", void 0);
|
|
32990
32997
|
|
|
32998
|
+
__decorate([searchResult$b.Getter("isMobileWidth")], SearchResultsPageSelect.prototype, "isMobileWidth", void 0);
|
|
32999
|
+
|
|
32991
33000
|
__decorate([params$6.Action("appendParams")], SearchResultsPageSelect.prototype, "appendParams", void 0);
|
|
32992
33001
|
|
|
32993
33002
|
SearchResultsPageSelect = __decorate([Component({
|
|
@@ -33634,7 +33643,8 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
|
|
|
33634
33643
|
pageSelect: {
|
|
33635
33644
|
count: getPageCount(this.searchResult.total, this.limit),
|
|
33636
33645
|
selectedPage: this.page,
|
|
33637
|
-
display: pageSelect.display
|
|
33646
|
+
display: pageSelect.display,
|
|
33647
|
+
displayMobile: pageSelect.displayMobile
|
|
33638
33648
|
},
|
|
33639
33649
|
labels: this.options.labels
|
|
33640
33650
|
};
|
|
@@ -34864,6 +34874,9 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
|
|
|
34864
34874
|
width: window.innerWidth,
|
|
34865
34875
|
grid: this.options.grid
|
|
34866
34876
|
});
|
|
34877
|
+
this.setScreenWidth({
|
|
34878
|
+
width: window.innerWidth
|
|
34879
|
+
});
|
|
34867
34880
|
}
|
|
34868
34881
|
}]);
|
|
34869
34882
|
|
|
@@ -34916,6 +34929,8 @@ __decorate([searchResult$1.Action("setLoading")], SearchResults.prototype, "setL
|
|
|
34916
34929
|
|
|
34917
34930
|
__decorate([options$1.Getter("defaultSearchResultPageSize")], SearchResults.prototype, "defaultSearchResultPageSize", void 0);
|
|
34918
34931
|
|
|
34932
|
+
__decorate([searchResult$1.Mutation("setScreenWidth")], SearchResults.prototype, "setScreenWidth", void 0);
|
|
34933
|
+
|
|
34919
34934
|
__decorate([searchResult$1.Action("setColumnCount")], SearchResults.prototype, "setColumnCount", void 0);
|
|
34920
34935
|
|
|
34921
34936
|
SearchResults = __decorate([Component({
|
|
@@ -36372,6 +36387,8 @@ var setDocumentTitle = function setDocumentTitle(template) {
|
|
|
36372
36387
|
document.title = addParamsToLabel(template, textToInsert);
|
|
36373
36388
|
};
|
|
36374
36389
|
|
|
36390
|
+
var MOBILE_WIDTH = 767;
|
|
36391
|
+
|
|
36375
36392
|
var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
36376
36393
|
_inherits(SearchResultModule, _VuexModule);
|
|
36377
36394
|
|
|
@@ -36389,6 +36406,7 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36389
36406
|
_this.layout = ResultsLayoutEnum.GRID;
|
|
36390
36407
|
_this.loading = false;
|
|
36391
36408
|
_this.isMobileSidebarVisible = false;
|
|
36409
|
+
_this.screenWidth = 1000;
|
|
36392
36410
|
return _this;
|
|
36393
36411
|
}
|
|
36394
36412
|
|
|
@@ -36464,6 +36482,11 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36464
36482
|
var offset = (_b = this.searchResult.offset) !== null && _b !== void 0 ? _b : 0;
|
|
36465
36483
|
return [offset + 1, Math.min(offset + limit, this.totalItems)];
|
|
36466
36484
|
}
|
|
36485
|
+
}, {
|
|
36486
|
+
key: "isMobileWidth",
|
|
36487
|
+
get: function get() {
|
|
36488
|
+
return this.screenWidth < MOBILE_WIDTH;
|
|
36489
|
+
}
|
|
36467
36490
|
}, {
|
|
36468
36491
|
key: "setSidebarVisibility",
|
|
36469
36492
|
value: function setSidebarVisibility(_ref) {
|
|
@@ -36487,6 +36510,12 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36487
36510
|
value: function load(loading) {
|
|
36488
36511
|
this.loading = loading || false;
|
|
36489
36512
|
}
|
|
36513
|
+
}, {
|
|
36514
|
+
key: "setScreenWidth",
|
|
36515
|
+
value: function setScreenWidth(_ref3) {
|
|
36516
|
+
var width = _ref3.width;
|
|
36517
|
+
this.screenWidth = width;
|
|
36518
|
+
}
|
|
36490
36519
|
}, {
|
|
36491
36520
|
key: "add",
|
|
36492
36521
|
value: function add(searchResult) {
|
|
@@ -36505,9 +36534,9 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36505
36534
|
}
|
|
36506
36535
|
}, {
|
|
36507
36536
|
key: "setColumnCount",
|
|
36508
|
-
value: function setColumnCount(
|
|
36509
|
-
var width =
|
|
36510
|
-
grid =
|
|
36537
|
+
value: function setColumnCount(_ref4) {
|
|
36538
|
+
var width = _ref4.width,
|
|
36539
|
+
grid = _ref4.grid;
|
|
36511
36540
|
|
|
36512
36541
|
if (!width || !grid) {
|
|
36513
36542
|
return {
|
|
@@ -36579,6 +36608,8 @@ __decorate([Mutation], SearchResultModule.prototype, "save", null);
|
|
|
36579
36608
|
|
|
36580
36609
|
__decorate([Mutation], SearchResultModule.prototype, "load", null);
|
|
36581
36610
|
|
|
36611
|
+
__decorate([Mutation], SearchResultModule.prototype, "setScreenWidth", null);
|
|
36612
|
+
|
|
36582
36613
|
__decorate([Action({
|
|
36583
36614
|
commit: "save"
|
|
36584
36615
|
})], SearchResultModule.prototype, "add", null);
|
|
@@ -10,6 +10,7 @@ export default class SearchResultModule extends VuexModule {
|
|
|
10
10
|
layout: ResultsLayout;
|
|
11
11
|
loading: boolean;
|
|
12
12
|
isMobileSidebarVisible: boolean;
|
|
13
|
+
screenWidth: number;
|
|
13
14
|
get facets(): FacetResult[] | undefined;
|
|
14
15
|
get currentFilters(): FilterGroup | undefined;
|
|
15
16
|
get filters(): FilterGroup;
|
|
@@ -21,6 +22,7 @@ export default class SearchResultModule extends VuexModule {
|
|
|
21
22
|
get currentFilterCount(): number;
|
|
22
23
|
get hasAnyFilter(): boolean;
|
|
23
24
|
get itemRange(): number[];
|
|
25
|
+
get isMobileWidth(): boolean;
|
|
24
26
|
setSidebarVisibility({ visible }: {
|
|
25
27
|
visible: boolean;
|
|
26
28
|
}): void;
|
|
@@ -31,6 +33,9 @@ export default class SearchResultModule extends VuexModule {
|
|
|
31
33
|
layout?: ResultsLayout;
|
|
32
34
|
}): void;
|
|
33
35
|
load(loading: boolean): void;
|
|
36
|
+
setScreenWidth({ width }: {
|
|
37
|
+
width: number;
|
|
38
|
+
}): void;
|
|
34
39
|
add(searchResult: SearchQueryResult): {
|
|
35
40
|
searchResult: SearchQueryResult;
|
|
36
41
|
pageSize: number;
|