@getlupa/client 0.6.0-alpha-4 → 0.6.0-alpha-7
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/product-list/CategoryFilter.vue.d.ts +4 -1
- package/dist/cjs/components/search-results/SearchResults.vue.d.ts +0 -4
- package/dist/cjs/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +3 -0
- package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +1 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.min.js +87 -36
- package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +10 -1
- package/dist/es/components/product-list/CategoryFilter.vue.d.ts +4 -1
- package/dist/es/components/search-results/SearchResults.vue.d.ts +0 -4
- package/dist/es/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +3 -0
- package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +1 -0
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.min.js +87 -36
- package/dist/es/types/search-results/SearchResultsOptions.d.ts +10 -1
- package/dist/iife/components/product-list/CategoryFilter.vue.d.ts +4 -1
- package/dist/iife/components/search-results/SearchResults.vue.d.ts +0 -4
- package/dist/iife/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +3 -0
- package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +1 -0
- package/dist/iife/index.d.ts +2 -2
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/search-results/SearchResultsOptions.d.ts +10 -1
- package/package.json +1 -1
package/dist/es/index.min.js
CHANGED
|
@@ -22143,7 +22143,7 @@ var getPageUrl = function getPageUrl(pathnameOverride) {
|
|
|
22143
22143
|
|
|
22144
22144
|
var history$3 = namespace("history");
|
|
22145
22145
|
var tracking$5 = namespace("tracking");
|
|
22146
|
-
var options$
|
|
22146
|
+
var options$b = namespace("options");
|
|
22147
22147
|
|
|
22148
22148
|
var SearchBoxProduct = /*#__PURE__*/function (_Vue) {
|
|
22149
22149
|
_inherits(SearchBoxProduct, _Vue);
|
|
@@ -22241,7 +22241,7 @@ __decorate([Prop({
|
|
|
22241
22241
|
default: false
|
|
22242
22242
|
})], SearchBoxProduct.prototype, "highlighted", void 0);
|
|
22243
22243
|
|
|
22244
|
-
__decorate([options$
|
|
22244
|
+
__decorate([options$b.Getter("boxRoutingBehavior")], SearchBoxProduct.prototype, "boxRoutingBehavior", void 0);
|
|
22245
22245
|
|
|
22246
22246
|
__decorate([tracking$5.Action("track")], SearchBoxProduct.prototype, "trackClick", void 0);
|
|
22247
22247
|
|
|
@@ -23672,7 +23672,7 @@ var defaultSuggestedValue = {
|
|
|
23672
23672
|
var history$1 = namespace("history");
|
|
23673
23673
|
var params$d = namespace("params");
|
|
23674
23674
|
var searchBox$2 = namespace("searchBox");
|
|
23675
|
-
var options$
|
|
23675
|
+
var options$a = namespace("options");
|
|
23676
23676
|
var tracking$4 = namespace("tracking");
|
|
23677
23677
|
|
|
23678
23678
|
var SearchBox = /*#__PURE__*/function (_Vue) {
|
|
@@ -23957,7 +23957,7 @@ __decorate([tracking$4.Action("track")], SearchBox.prototype, "trackClick", void
|
|
|
23957
23957
|
|
|
23958
23958
|
__decorate([params$d.Action("setSearchResultsLink")], SearchBox.prototype, "setSearchResultsLink", void 0);
|
|
23959
23959
|
|
|
23960
|
-
__decorate([options$
|
|
23960
|
+
__decorate([options$a.Mutation("setSearchBoxOptions")], SearchBox.prototype, "setSearchBoxOptions", void 0);
|
|
23961
23961
|
|
|
23962
23962
|
__decorate([params$d.Action("goToResults")], SearchBox.prototype, "goToResults", void 0);
|
|
23963
23963
|
|
|
@@ -25607,7 +25607,7 @@ var toggleHierarchyParam = function toggleHierarchyParam() {
|
|
|
25607
25607
|
|
|
25608
25608
|
var searchResult$h = namespace("searchResult");
|
|
25609
25609
|
var params$c = namespace("params");
|
|
25610
|
-
var options$
|
|
25610
|
+
var options$9 = namespace("options");
|
|
25611
25611
|
|
|
25612
25612
|
var CurrentFilters = /*#__PURE__*/function (_Vue) {
|
|
25613
25613
|
_inherits(CurrentFilters, _Vue);
|
|
@@ -25684,7 +25684,7 @@ __decorate([searchResult$h.Getter("displayFilters")], CurrentFilters.prototype,
|
|
|
25684
25684
|
|
|
25685
25685
|
__decorate([searchResult$h.Getter("currentFilterCount")], CurrentFilters.prototype, "currentFilterCount", void 0);
|
|
25686
25686
|
|
|
25687
|
-
__decorate([options$
|
|
25687
|
+
__decorate([options$9.Getter("initialFilters")], CurrentFilters.prototype, "initialFilters", void 0);
|
|
25688
25688
|
|
|
25689
25689
|
__decorate([params$c.Action("removeParams")], CurrentFilters.prototype, "removeParams", void 0);
|
|
25690
25690
|
|
|
@@ -28619,7 +28619,7 @@ var _typeof = _typeof$2.exports.default;
|
|
|
28619
28619
|
|
|
28620
28620
|
var VueSlider = /*@__PURE__*/getDefaultExportFromCjs(vueSliderComponent_umd_min.exports);
|
|
28621
28621
|
|
|
28622
|
-
var options$
|
|
28622
|
+
var options$8 = namespace("options");
|
|
28623
28623
|
|
|
28624
28624
|
var TermFacet = /*#__PURE__*/function (_Vue) {
|
|
28625
28625
|
_inherits(TermFacet, _Vue);
|
|
@@ -28826,7 +28826,7 @@ __decorate([Prop({
|
|
|
28826
28826
|
}
|
|
28827
28827
|
})], TermFacet.prototype, "currentFilters", void 0);
|
|
28828
28828
|
|
|
28829
|
-
__decorate([options$
|
|
28829
|
+
__decorate([options$8.State(function (s) {
|
|
28830
28830
|
return s.searchResultOptions;
|
|
28831
28831
|
})], TermFacet.prototype, "searchResultOptions", void 0);
|
|
28832
28832
|
|
|
@@ -29942,7 +29942,7 @@ var __vue_component__$F = /*#__PURE__*/normalizeComponent({
|
|
|
29942
29942
|
staticRenderFns: __vue_staticRenderFns__$F
|
|
29943
29943
|
}, __vue_inject_styles__$F, __vue_script__$F, __vue_scope_id__$F, __vue_is_functional_template__$F, __vue_module_identifier__$F, false, undefined, undefined, undefined);
|
|
29944
29944
|
|
|
29945
|
-
var options$
|
|
29945
|
+
var options$7 = namespace("options");
|
|
29946
29946
|
|
|
29947
29947
|
var CategoryFilter = /*#__PURE__*/function (_Vue) {
|
|
29948
29948
|
_inherits(CategoryFilter, _Vue);
|
|
@@ -30021,18 +30021,9 @@ var CategoryFilter = /*#__PURE__*/function (_Vue) {
|
|
|
30021
30021
|
|
|
30022
30022
|
case 2:
|
|
30023
30023
|
result = _context.sent;
|
|
30024
|
+
this.handleResult(result);
|
|
30024
30025
|
|
|
30025
|
-
|
|
30026
|
-
_context.next = 5;
|
|
30027
|
-
break;
|
|
30028
|
-
}
|
|
30029
|
-
|
|
30030
|
-
return _context.abrupt("return");
|
|
30031
|
-
|
|
30032
|
-
case 5:
|
|
30033
|
-
this.categoryChildren = result.items;
|
|
30034
|
-
|
|
30035
|
-
case 6:
|
|
30026
|
+
case 4:
|
|
30036
30027
|
case "end":
|
|
30037
30028
|
return _context.stop();
|
|
30038
30029
|
}
|
|
@@ -30040,6 +30031,21 @@ var CategoryFilter = /*#__PURE__*/function (_Vue) {
|
|
|
30040
30031
|
}, _callee, this);
|
|
30041
30032
|
}));
|
|
30042
30033
|
}
|
|
30034
|
+
}, {
|
|
30035
|
+
key: "handleResult",
|
|
30036
|
+
value: function handleResult(result) {
|
|
30037
|
+
var _a, _b;
|
|
30038
|
+
|
|
30039
|
+
if (!result.success) {
|
|
30040
|
+
return;
|
|
30041
|
+
}
|
|
30042
|
+
|
|
30043
|
+
this.categoryChildren = result.items;
|
|
30044
|
+
(_b = (_a = this.searchResultOptions.callbacks) === null || _a === void 0 ? void 0 : _a.onCategoryFilterResults) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
30045
|
+
queryKey: this.options.queryKey,
|
|
30046
|
+
hasResults: result.total > 0
|
|
30047
|
+
});
|
|
30048
|
+
}
|
|
30043
30049
|
}, {
|
|
30044
30050
|
key: "getCategoryKey",
|
|
30045
30051
|
value: function getCategoryKey(item) {
|
|
@@ -30072,7 +30078,11 @@ var CategoryFilter = /*#__PURE__*/function (_Vue) {
|
|
|
30072
30078
|
|
|
30073
30079
|
__decorate([Prop()], CategoryFilter.prototype, "options", void 0);
|
|
30074
30080
|
|
|
30075
|
-
__decorate([options$
|
|
30081
|
+
__decorate([options$7.Getter("envOptions")], CategoryFilter.prototype, "envOptions", void 0);
|
|
30082
|
+
|
|
30083
|
+
__decorate([options$7.State(function (o) {
|
|
30084
|
+
return o.searchResultOptions;
|
|
30085
|
+
})], CategoryFilter.prototype, "searchResultOptions", void 0);
|
|
30076
30086
|
|
|
30077
30087
|
CategoryFilter = __decorate([Component({
|
|
30078
30088
|
name: "categoryFilter",
|
|
@@ -31059,7 +31069,7 @@ var __vue_component__$w = /*#__PURE__*/normalizeComponent({
|
|
|
31059
31069
|
staticRenderFns: __vue_staticRenderFns__$w
|
|
31060
31070
|
}, __vue_inject_styles__$w, __vue_script__$w, __vue_scope_id__$w, __vue_is_functional_template__$w, __vue_module_identifier__$w, false, undefined, undefined, undefined);
|
|
31061
31071
|
|
|
31062
|
-
var options$
|
|
31072
|
+
var options$6 = namespace("options");
|
|
31063
31073
|
|
|
31064
31074
|
var SearchResultsProductTitle = /*#__PURE__*/function (_Vue) {
|
|
31065
31075
|
_inherits(SearchResultsProductTitle, _Vue);
|
|
@@ -31112,7 +31122,7 @@ __decorate([Prop({
|
|
|
31112
31122
|
default: ""
|
|
31113
31123
|
})], SearchResultsProductTitle.prototype, "link", void 0);
|
|
31114
31124
|
|
|
31115
|
-
__decorate([options$
|
|
31125
|
+
__decorate([options$6.State(function (o) {
|
|
31116
31126
|
return o.searchResultOptions;
|
|
31117
31127
|
})], SearchResultsProductTitle.prototype, "searchResultOptions", void 0);
|
|
31118
31128
|
|
|
@@ -32023,7 +32033,7 @@ var __vue_component__$n = /*#__PURE__*/normalizeComponent({
|
|
|
32023
32033
|
var tracking$3 = namespace("tracking");
|
|
32024
32034
|
var params$9 = namespace("params");
|
|
32025
32035
|
var searchResult$c = namespace("searchResult");
|
|
32026
|
-
var options$
|
|
32036
|
+
var options$5 = namespace("options");
|
|
32027
32037
|
|
|
32028
32038
|
var SearchResultsProductCard = /*#__PURE__*/function (_Vue) {
|
|
32029
32039
|
_inherits(SearchResultsProductCard, _Vue);
|
|
@@ -32194,7 +32204,7 @@ __decorate([searchResult$c.State(function (state) {
|
|
|
32194
32204
|
return state.layout;
|
|
32195
32205
|
})], SearchResultsProductCard.prototype, "layout", void 0);
|
|
32196
32206
|
|
|
32197
|
-
__decorate([options$
|
|
32207
|
+
__decorate([options$5.Getter("searchResultsRoutingBehavior")], SearchResultsProductCard.prototype, "searchResultsRoutingBehavior", void 0);
|
|
32198
32208
|
|
|
32199
32209
|
__decorate([params$9.Getter("query")], SearchResultsProductCard.prototype, "query", void 0);
|
|
32200
32210
|
|
|
@@ -32497,6 +32507,7 @@ var track = function track(queryKey) {
|
|
|
32497
32507
|
};
|
|
32498
32508
|
|
|
32499
32509
|
var params$8 = namespace("params");
|
|
32510
|
+
var options$4 = namespace("options");
|
|
32500
32511
|
|
|
32501
32512
|
var AdditionalPanels$1 = /*#__PURE__*/function (_Vue) {
|
|
32502
32513
|
_inherits(AdditionalPanels, _Vue);
|
|
@@ -32569,12 +32580,23 @@ var AdditionalPanels$1 = /*#__PURE__*/function (_Vue) {
|
|
|
32569
32580
|
});
|
|
32570
32581
|
getLupaSdk.query(this.panel.queryKey, query, this.options).then(function (res) {
|
|
32571
32582
|
if (res.success) {
|
|
32572
|
-
_this2.
|
|
32583
|
+
_this2.handleResults(res);
|
|
32573
32584
|
}
|
|
32574
32585
|
}).catch(function (err) {
|
|
32575
32586
|
console.error(err);
|
|
32576
32587
|
});
|
|
32577
32588
|
}
|
|
32589
|
+
}, {
|
|
32590
|
+
key: "handleResults",
|
|
32591
|
+
value: function handleResults(res) {
|
|
32592
|
+
var _a, _b;
|
|
32593
|
+
|
|
32594
|
+
this.result = res;
|
|
32595
|
+
(_b = (_a = this.searchResultOptions.callbacks) === null || _a === void 0 ? void 0 : _a.onAdditionalPanelResults) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
32596
|
+
queryKey: this.panel.queryKey,
|
|
32597
|
+
hasResults: res.total > 0
|
|
32598
|
+
});
|
|
32599
|
+
}
|
|
32578
32600
|
}, {
|
|
32579
32601
|
key: "toggleShowMore",
|
|
32580
32602
|
value: function toggleShowMore() {
|
|
@@ -32600,6 +32622,10 @@ __decorate([Prop({
|
|
|
32600
32622
|
|
|
32601
32623
|
__decorate([params$8.Getter("query")], AdditionalPanels$1.prototype, "query", void 0);
|
|
32602
32624
|
|
|
32625
|
+
__decorate([options$4.State(function (o) {
|
|
32626
|
+
return o.searchResultOptions;
|
|
32627
|
+
})], AdditionalPanels$1.prototype, "searchResultOptions", void 0);
|
|
32628
|
+
|
|
32603
32629
|
__decorate([Watch("query")], AdditionalPanels$1.prototype, "handleQueryChange", null);
|
|
32604
32630
|
|
|
32605
32631
|
AdditionalPanels$1 = __decorate([Component({
|
|
@@ -32965,6 +32991,11 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32965
32991
|
get: function get() {
|
|
32966
32992
|
return this.showFirstPage && !this.pages.includes(2);
|
|
32967
32993
|
}
|
|
32994
|
+
}, {
|
|
32995
|
+
key: "showPagination",
|
|
32996
|
+
get: function get() {
|
|
32997
|
+
return this.pages.length > 1;
|
|
32998
|
+
}
|
|
32968
32999
|
}, {
|
|
32969
33000
|
key: "handlePageChange",
|
|
32970
33001
|
value: function handlePageChange(page) {
|
|
@@ -33015,7 +33046,7 @@ var __vue_render__$i = function __vue_render__() {
|
|
|
33015
33046
|
|
|
33016
33047
|
var _c = _vm._self._c || _h;
|
|
33017
33048
|
|
|
33018
|
-
return _c("div", {
|
|
33049
|
+
return _vm.showPagination ? _c("div", {
|
|
33019
33050
|
attrs: {
|
|
33020
33051
|
id: "lupa-search-results-page-select",
|
|
33021
33052
|
"data-cy": "lupa-search-results-page-select"
|
|
@@ -33068,7 +33099,7 @@ var __vue_render__$i = function __vue_render__() {
|
|
|
33068
33099
|
return _vm.handlePageChange(_vm.options.selectedPage + 1);
|
|
33069
33100
|
}
|
|
33070
33101
|
}
|
|
33071
|
-
}, [_vm._v("\n " + _vm._s(_vm.lastPageLabel) + "\n ")]) : _vm._e()], 2);
|
|
33102
|
+
}, [_vm._v("\n " + _vm._s(_vm.lastPageLabel) + "\n ")]) : _vm._e()], 2) : _vm._e();
|
|
33072
33103
|
};
|
|
33073
33104
|
|
|
33074
33105
|
var __vue_staticRenderFns__$i = [];
|
|
@@ -34313,13 +34344,13 @@ var __vue_render__$8 = function __vue_render__() {
|
|
|
34313
34344
|
options: _vm.currentFilterOptions,
|
|
34314
34345
|
expandable: true
|
|
34315
34346
|
}
|
|
34316
|
-
}) : _vm._e(), _vm._v(" "), _c("AdditionalPanels", {
|
|
34347
|
+
}) : _vm._e()] : _vm._e(), _vm._v(" "), _c("AdditionalPanels", {
|
|
34317
34348
|
attrs: {
|
|
34318
34349
|
options: _vm.options,
|
|
34319
34350
|
location: "top",
|
|
34320
34351
|
sdkOptions: _vm.options.options
|
|
34321
34352
|
}
|
|
34322
|
-
}), _vm._v(" "), _c("SearchResultsToolbar", {
|
|
34353
|
+
}), _vm._v(" "), _vm.hasResults ? [_c("SearchResultsToolbar", {
|
|
34323
34354
|
staticClass: "lupa-toolbar-top",
|
|
34324
34355
|
attrs: {
|
|
34325
34356
|
options: _vm.options,
|
|
@@ -34854,15 +34885,16 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
|
|
|
34854
34885
|
var queryKey = _ref.queryKey,
|
|
34855
34886
|
results = _ref.results;
|
|
34856
34887
|
|
|
34857
|
-
var _a;
|
|
34888
|
+
var _a, _b, _c, _d;
|
|
34858
34889
|
|
|
34859
34890
|
this.trackResults({
|
|
34860
34891
|
queryKey: queryKey,
|
|
34861
34892
|
results: results
|
|
34862
34893
|
});
|
|
34863
|
-
|
|
34864
|
-
|
|
34865
|
-
|
|
34894
|
+
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));
|
|
34895
|
+
(_d = (_c = this.options.callbacks) === null || _c === void 0 ? void 0 : _c.onSearchResults) === null || _d === void 0 ? void 0 : _d.call(_c, {
|
|
34896
|
+
queryKey: queryKey,
|
|
34897
|
+
hasResults: hasResults
|
|
34866
34898
|
});
|
|
34867
34899
|
}
|
|
34868
34900
|
}, {
|
|
@@ -34909,8 +34941,6 @@ __decorate([params$1.State("searchString")], SearchResults.prototype, "searchStr
|
|
|
34909
34941
|
|
|
34910
34942
|
__decorate([params$1.Action("setDefaultLimit")], SearchResults.prototype, "setDefaultLimit", void 0);
|
|
34911
34943
|
|
|
34912
|
-
__decorate([params$1.Action("handleNoResultsFlag")], SearchResults.prototype, "handleNoResultsFlag", void 0);
|
|
34913
|
-
|
|
34914
34944
|
__decorate([params$1.Action("add")], SearchResults.prototype, "addParams", void 0);
|
|
34915
34945
|
|
|
34916
34946
|
__decorate([params$1.Action("removeParams")], SearchResults.prototype, "removeParams", void 0);
|
|
@@ -37101,6 +37131,13 @@ var tracking = function tracking(options) {
|
|
|
37101
37131
|
};
|
|
37102
37132
|
|
|
37103
37133
|
var searchBox = function searchBox(options) {
|
|
37134
|
+
var _a;
|
|
37135
|
+
|
|
37136
|
+
try {
|
|
37137
|
+
(_a = app.box) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
37138
|
+
} catch (_b) {// Does not exist, do nothing
|
|
37139
|
+
}
|
|
37140
|
+
|
|
37104
37141
|
Vue$1.use(Vuex);
|
|
37105
37142
|
app.box = new Vue$1({
|
|
37106
37143
|
el: options.inputSelector,
|
|
@@ -37119,6 +37156,13 @@ var searchBox = function searchBox(options) {
|
|
|
37119
37156
|
};
|
|
37120
37157
|
|
|
37121
37158
|
var searchResults = function searchResults(options) {
|
|
37159
|
+
var _a;
|
|
37160
|
+
|
|
37161
|
+
try {
|
|
37162
|
+
(_a = app.results) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
37163
|
+
} catch (_b) {// Does not exist, do nothing
|
|
37164
|
+
}
|
|
37165
|
+
|
|
37122
37166
|
Vue$1.use(Vuex);
|
|
37123
37167
|
app.results = new Vue$1({
|
|
37124
37168
|
el: options.containerSelector,
|
|
@@ -37137,6 +37181,13 @@ var searchResults = function searchResults(options) {
|
|
|
37137
37181
|
};
|
|
37138
37182
|
|
|
37139
37183
|
var productList = function productList(options) {
|
|
37184
|
+
var _a;
|
|
37185
|
+
|
|
37186
|
+
try {
|
|
37187
|
+
(_a = app.productList) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
37188
|
+
} catch (_b) {// Does not exist, do nothing
|
|
37189
|
+
}
|
|
37190
|
+
|
|
37140
37191
|
Vue$1.use(Vuex);
|
|
37141
37192
|
app.productList = new Vue$1({
|
|
37142
37193
|
el: options.containerSelector,
|
|
@@ -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,15 @@ export declare type SearchResultsSimilarQueriesLabels = {
|
|
|
19
19
|
similarQuery: string;
|
|
20
20
|
similarQueries: string;
|
|
21
21
|
};
|
|
22
|
+
export declare type CallbackContext = {
|
|
23
|
+
queryKey: string;
|
|
24
|
+
hasResults: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare type SearchResultEventCallbacks = {
|
|
27
|
+
onSearchResults?: (context: CallbackContext) => unknown;
|
|
28
|
+
onAdditionalPanelResults?: (context: CallbackContext) => unknown;
|
|
29
|
+
onCategoryFilterResults?: (context: CallbackContext) => unknown;
|
|
30
|
+
};
|
|
22
31
|
export declare type SearchResultsOptionLabels = SearchResultsPaginationLabels & SearchResultsDidYouMeanLabels & SearchResultsSimilarQueriesLabels & {
|
|
23
32
|
sortBy: string;
|
|
24
33
|
currency: string;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import Vue from "vue";
|
|
2
|
-
import { Options } from "@getlupa/client-sdk/Types";
|
|
2
|
+
import { Options, SdkError, SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
3
3
|
import { CategoryFilterOptions } from "@/types/product-list/ProductListOptions";
|
|
4
|
+
import { SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
|
|
4
5
|
export default class CategoryFilter extends Vue {
|
|
5
6
|
options: CategoryFilterOptions;
|
|
6
7
|
categoryChildren: Record<string, string>[];
|
|
7
8
|
envOptions: Options;
|
|
9
|
+
searchResultOptions: SearchResultsOptions;
|
|
8
10
|
get hasBackButton(): boolean;
|
|
9
11
|
get hasEventRouting(): boolean;
|
|
10
12
|
get backTitle(): string | undefined;
|
|
@@ -13,6 +15,7 @@ export default class CategoryFilter extends Vue {
|
|
|
13
15
|
get parentUrlLink(): string | undefined;
|
|
14
16
|
get isActive(): boolean;
|
|
15
17
|
mounted(): Promise<void>;
|
|
18
|
+
handleResult(result: SearchQueryResult | SdkError): void;
|
|
16
19
|
getCategoryKey(item: Record<string, string>): string;
|
|
17
20
|
handleNavigationParent(event?: Event): void;
|
|
18
21
|
handleNavigationBack(event?: Event): void;
|
|
@@ -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
|
};
|
|
@@ -3,11 +3,13 @@ import Vue from "vue";
|
|
|
3
3
|
import { SdkOptions } from "@/types/General";
|
|
4
4
|
import { SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
5
5
|
import { Document } from "@getlupa/client-sdk/Types";
|
|
6
|
+
import { SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
|
|
6
7
|
export default class AdditionalPanels extends Vue {
|
|
7
8
|
panel: SearchResultsAdditionalPanelOptions;
|
|
8
9
|
options: SdkOptions;
|
|
9
10
|
result: SearchQueryResult;
|
|
10
11
|
query: string;
|
|
12
|
+
searchResultOptions: SearchResultsOptions;
|
|
11
13
|
showAll: boolean;
|
|
12
14
|
get displayShowMore(): boolean;
|
|
13
15
|
get itemCount(): number;
|
|
@@ -16,6 +18,7 @@ export default class AdditionalPanels extends Vue {
|
|
|
16
18
|
get hasResults(): boolean;
|
|
17
19
|
mounted(): void;
|
|
18
20
|
handleQueryChange(): void;
|
|
21
|
+
handleResults(res: SearchQueryResult): void;
|
|
19
22
|
toggleShowMore(): void;
|
|
20
23
|
addParams(label: string, itemCount: number): string;
|
|
21
24
|
}
|
package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
14
14
|
get showLastPageSeparator(): boolean;
|
|
15
15
|
get showFirstPage(): boolean;
|
|
16
16
|
get showFirstPageSeparator(): boolean;
|
|
17
|
+
get showPagination(): boolean;
|
|
17
18
|
appendParams: ({ params, paramsToRemove, }: {
|
|
18
19
|
params: {
|
|
19
20
|
name: string;
|
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 { CallbackContext, 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, };
|
|
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, };
|
|
21
21
|
export default lupaSearch;
|