@getlupa/client 0.6.0-alpha-2 → 0.6.0-alpha-5
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 +4 -4
- 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.d.ts +3 -2
- package/dist/cjs/index.min.js +69 -33
- 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 +5 -1
- package/dist/es/components/search-results/SearchResults.vue.d.ts +4 -4
- 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.d.ts +3 -2
- package/dist/es/index.min.js +69 -33
- 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 +5 -1
- package/dist/iife/components/search-results/SearchResults.vue.d.ts +4 -4
- 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.d.ts +3 -2
- 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 +5 -1
- package/package.json +1 -1
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
|
};
|
|
@@ -34843,17 +34853,24 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
|
|
|
34843
34853
|
value: function handleResults(_ref) {
|
|
34844
34854
|
var queryKey = _ref.queryKey,
|
|
34845
34855
|
results = _ref.results;
|
|
34846
|
-
|
|
34847
|
-
var _a;
|
|
34848
|
-
|
|
34849
34856
|
this.trackResults({
|
|
34850
34857
|
queryKey: queryKey,
|
|
34851
34858
|
results: results
|
|
34852
34859
|
});
|
|
34853
|
-
this.
|
|
34854
|
-
|
|
34855
|
-
|
|
34856
|
-
|
|
34860
|
+
this.handleNoResults(results);
|
|
34861
|
+
}
|
|
34862
|
+
}, {
|
|
34863
|
+
key: "handleNoResults",
|
|
34864
|
+
value: function handleNoResults(results) {
|
|
34865
|
+
var _a, _b, _c;
|
|
34866
|
+
|
|
34867
|
+
var hasResults = Boolean(results.total > 0 || ((_a = results.similarQueries) === null || _a === void 0 ? void 0 : _a.length) || ((_b = results.didYouMean) === null || _b === void 0 ? void 0 : _b.options));
|
|
34868
|
+
|
|
34869
|
+
if (hasResults) {
|
|
34870
|
+
return;
|
|
34871
|
+
}
|
|
34872
|
+
|
|
34873
|
+
(_c = this.options.callbacks) === null || _c === void 0 ? void 0 : _c.noResults();
|
|
34857
34874
|
}
|
|
34858
34875
|
}, {
|
|
34859
34876
|
key: "handleResize",
|
|
@@ -34864,6 +34881,9 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
|
|
|
34864
34881
|
width: window.innerWidth,
|
|
34865
34882
|
grid: this.options.grid
|
|
34866
34883
|
});
|
|
34884
|
+
this.setScreenWidth({
|
|
34885
|
+
width: window.innerWidth
|
|
34886
|
+
});
|
|
34867
34887
|
}
|
|
34868
34888
|
}]);
|
|
34869
34889
|
|
|
@@ -34896,8 +34916,6 @@ __decorate([params$1.State("searchString")], SearchResults.prototype, "searchStr
|
|
|
34896
34916
|
|
|
34897
34917
|
__decorate([params$1.Action("setDefaultLimit")], SearchResults.prototype, "setDefaultLimit", void 0);
|
|
34898
34918
|
|
|
34899
|
-
__decorate([params$1.Action("handleNoResultsFlag")], SearchResults.prototype, "handleNoResultsFlag", void 0);
|
|
34900
|
-
|
|
34901
34919
|
__decorate([params$1.Action("add")], SearchResults.prototype, "addParams", void 0);
|
|
34902
34920
|
|
|
34903
34921
|
__decorate([params$1.Action("removeParams")], SearchResults.prototype, "removeParams", void 0);
|
|
@@ -34916,6 +34934,8 @@ __decorate([searchResult$1.Action("setLoading")], SearchResults.prototype, "setL
|
|
|
34916
34934
|
|
|
34917
34935
|
__decorate([options$1.Getter("defaultSearchResultPageSize")], SearchResults.prototype, "defaultSearchResultPageSize", void 0);
|
|
34918
34936
|
|
|
34937
|
+
__decorate([searchResult$1.Mutation("setScreenWidth")], SearchResults.prototype, "setScreenWidth", void 0);
|
|
34938
|
+
|
|
34919
34939
|
__decorate([searchResult$1.Action("setColumnCount")], SearchResults.prototype, "setColumnCount", void 0);
|
|
34920
34940
|
|
|
34921
34941
|
SearchResults = __decorate([Component({
|
|
@@ -36372,6 +36392,8 @@ var setDocumentTitle = function setDocumentTitle(template) {
|
|
|
36372
36392
|
document.title = addParamsToLabel(template, textToInsert);
|
|
36373
36393
|
};
|
|
36374
36394
|
|
|
36395
|
+
var MOBILE_WIDTH = 767;
|
|
36396
|
+
|
|
36375
36397
|
var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
36376
36398
|
_inherits(SearchResultModule, _VuexModule);
|
|
36377
36399
|
|
|
@@ -36389,6 +36411,7 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36389
36411
|
_this.layout = ResultsLayoutEnum.GRID;
|
|
36390
36412
|
_this.loading = false;
|
|
36391
36413
|
_this.isMobileSidebarVisible = false;
|
|
36414
|
+
_this.screenWidth = 1000;
|
|
36392
36415
|
return _this;
|
|
36393
36416
|
}
|
|
36394
36417
|
|
|
@@ -36464,6 +36487,11 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36464
36487
|
var offset = (_b = this.searchResult.offset) !== null && _b !== void 0 ? _b : 0;
|
|
36465
36488
|
return [offset + 1, Math.min(offset + limit, this.totalItems)];
|
|
36466
36489
|
}
|
|
36490
|
+
}, {
|
|
36491
|
+
key: "isMobileWidth",
|
|
36492
|
+
get: function get() {
|
|
36493
|
+
return this.screenWidth < MOBILE_WIDTH;
|
|
36494
|
+
}
|
|
36467
36495
|
}, {
|
|
36468
36496
|
key: "setSidebarVisibility",
|
|
36469
36497
|
value: function setSidebarVisibility(_ref) {
|
|
@@ -36487,6 +36515,12 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36487
36515
|
value: function load(loading) {
|
|
36488
36516
|
this.loading = loading || false;
|
|
36489
36517
|
}
|
|
36518
|
+
}, {
|
|
36519
|
+
key: "setScreenWidth",
|
|
36520
|
+
value: function setScreenWidth(_ref3) {
|
|
36521
|
+
var width = _ref3.width;
|
|
36522
|
+
this.screenWidth = width;
|
|
36523
|
+
}
|
|
36490
36524
|
}, {
|
|
36491
36525
|
key: "add",
|
|
36492
36526
|
value: function add(searchResult) {
|
|
@@ -36505,9 +36539,9 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36505
36539
|
}
|
|
36506
36540
|
}, {
|
|
36507
36541
|
key: "setColumnCount",
|
|
36508
|
-
value: function setColumnCount(
|
|
36509
|
-
var width =
|
|
36510
|
-
grid =
|
|
36542
|
+
value: function setColumnCount(_ref4) {
|
|
36543
|
+
var width = _ref4.width,
|
|
36544
|
+
grid = _ref4.grid;
|
|
36511
36545
|
|
|
36512
36546
|
if (!width || !grid) {
|
|
36513
36547
|
return {
|
|
@@ -36579,6 +36613,8 @@ __decorate([Mutation], SearchResultModule.prototype, "save", null);
|
|
|
36579
36613
|
|
|
36580
36614
|
__decorate([Mutation], SearchResultModule.prototype, "load", null);
|
|
36581
36615
|
|
|
36616
|
+
__decorate([Mutation], SearchResultModule.prototype, "setScreenWidth", null);
|
|
36617
|
+
|
|
36582
36618
|
__decorate([Action({
|
|
36583
36619
|
commit: "save"
|
|
36584
36620
|
})], 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;
|
|
@@ -7,8 +7,8 @@ export declare type SearchResultsOptions = SearchResultsProductOptions & SearchR
|
|
|
7
7
|
containerSelector: string;
|
|
8
8
|
breadcrumbs: SearchResultsBreadcrumb[];
|
|
9
9
|
classMap?: Record<string, string>;
|
|
10
|
-
noResultsQueryFlag?: string;
|
|
11
10
|
disallowEmptyQuery?: boolean;
|
|
11
|
+
callbacks?: SearchResultEventCallbacks;
|
|
12
12
|
};
|
|
13
13
|
export declare type SearchTitlePosition = "page-top" | "search-results-top";
|
|
14
14
|
export declare type SearchResultsDidYouMeanLabels = {
|
|
@@ -19,6 +19,9 @@ export declare type SearchResultsSimilarQueriesLabels = {
|
|
|
19
19
|
similarQuery: string;
|
|
20
20
|
similarQueries: string;
|
|
21
21
|
};
|
|
22
|
+
export declare type SearchResultEventCallbacks = {
|
|
23
|
+
noResults: () => void;
|
|
24
|
+
};
|
|
22
25
|
export declare type SearchResultsOptionLabels = SearchResultsPaginationLabels & SearchResultsDidYouMeanLabels & SearchResultsSimilarQueriesLabels & {
|
|
23
26
|
sortBy: string;
|
|
24
27
|
currency: string;
|
|
@@ -68,6 +71,7 @@ export declare type SearchResultsPagination = {
|
|
|
68
71
|
pageSelection: {
|
|
69
72
|
position: SearchResultsPaginationPosition;
|
|
70
73
|
display: number;
|
|
74
|
+
displayMobile: number;
|
|
71
75
|
};
|
|
72
76
|
};
|
|
73
77
|
export declare type SearchResultsPaginationPosition = {
|
|
@@ -25,10 +25,6 @@ export default class SearchResults extends Vue {
|
|
|
25
25
|
setDefaultLimit: (defaultLimit: number) => {
|
|
26
26
|
defaultLimit: number;
|
|
27
27
|
};
|
|
28
|
-
handleNoResultsFlag: ({ resultCount, noResultsParam, }: {
|
|
29
|
-
resultCount: number;
|
|
30
|
-
noResultsParam?: string;
|
|
31
|
-
}) => void;
|
|
32
28
|
addParams: (params: QueryParams) => {
|
|
33
29
|
params: QueryParams;
|
|
34
30
|
};
|
|
@@ -64,6 +60,10 @@ export default class SearchResults extends Vue {
|
|
|
64
60
|
queryKey: string;
|
|
65
61
|
results: SearchQueryResult;
|
|
66
62
|
}): void;
|
|
63
|
+
handleNoResults(results: SearchQueryResult): void;
|
|
64
|
+
setScreenWidth: ({ width, }: {
|
|
65
|
+
width: number;
|
|
66
|
+
}) => void;
|
|
67
67
|
setColumnCount: ({ width, grid, }: {
|
|
68
68
|
width: number;
|
|
69
69
|
grid: ProductGrid;
|
package/dist/iife/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/iife/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
|
|
2
|
-
import { FacetStyle, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
2
|
+
import { 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";
|
|
@@ -7,6 +7,7 @@ import { SearchBoxPanelType } from "./types/search-box/SearchBoxPanel";
|
|
|
7
7
|
import { RoutingBehavior } from "./types/search-results/RoutingBehavior";
|
|
8
8
|
import { AnchorPosition } from "./types/search-results/SearchResultsProductCardOptions";
|
|
9
9
|
import { BadgeType } from "./types/search-results/BadgeOptions";
|
|
10
|
+
import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
|
|
10
11
|
declare const lupaSearch: {
|
|
11
12
|
searchBox: (options: SearchBoxOptions) => void;
|
|
12
13
|
searchResults: (options: SearchResultsOptions) => void;
|
|
@@ -16,5 +17,5 @@ declare const lupaSearch: {
|
|
|
16
17
|
clearSearchResults: () => void;
|
|
17
18
|
clearProductList: () => void;
|
|
18
19
|
};
|
|
19
|
-
export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, };
|
|
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, };
|
|
20
21
|
export default lupaSearch;
|