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