@getlupa/client 0.6.0-alpha-3 → 0.6.0-alpha-6
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 +3 -2
- package/dist/cjs/index.min.js +69 -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 +3 -2
- package/dist/es/index.min.js +69 -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 +3 -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);
|
|
@@ -32551,6 +32562,8 @@ var AdditionalPanels$1 = /*#__PURE__*/function (_Vue) {
|
|
|
32551
32562
|
}, {
|
|
32552
32563
|
key: "mounted",
|
|
32553
32564
|
value: function mounted() {
|
|
32565
|
+
console.log("m");
|
|
32566
|
+
|
|
32554
32567
|
if (!this.query) {
|
|
32555
32568
|
return;
|
|
32556
32569
|
}
|
|
@@ -32562,6 +32575,7 @@ var AdditionalPanels$1 = /*#__PURE__*/function (_Vue) {
|
|
|
32562
32575
|
value: function handleQueryChange() {
|
|
32563
32576
|
var _this2 = this;
|
|
32564
32577
|
|
|
32578
|
+
console.log("q");
|
|
32565
32579
|
var context = getLupaTrackingContext();
|
|
32566
32580
|
var query = Object.assign(Object.assign({}, context), {
|
|
32567
32581
|
limit: this.panel.totalCountLimit,
|
|
@@ -32569,12 +32583,23 @@ var AdditionalPanels$1 = /*#__PURE__*/function (_Vue) {
|
|
|
32569
32583
|
});
|
|
32570
32584
|
getLupaSdk.query(this.panel.queryKey, query, this.options).then(function (res) {
|
|
32571
32585
|
if (res.success) {
|
|
32572
|
-
_this2.
|
|
32586
|
+
_this2.handleResults(res);
|
|
32573
32587
|
}
|
|
32574
32588
|
}).catch(function (err) {
|
|
32575
32589
|
console.error(err);
|
|
32576
32590
|
});
|
|
32577
32591
|
}
|
|
32592
|
+
}, {
|
|
32593
|
+
key: "handleResults",
|
|
32594
|
+
value: function handleResults(res) {
|
|
32595
|
+
var _a, _b;
|
|
32596
|
+
|
|
32597
|
+
this.result = res;
|
|
32598
|
+
(_b = (_a = this.searchResultOptions.callbacks) === null || _a === void 0 ? void 0 : _a.onAdditionalPanelResults) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
32599
|
+
queryKey: this.panel.queryKey,
|
|
32600
|
+
hasResults: res.total > 0
|
|
32601
|
+
});
|
|
32602
|
+
}
|
|
32578
32603
|
}, {
|
|
32579
32604
|
key: "toggleShowMore",
|
|
32580
32605
|
value: function toggleShowMore() {
|
|
@@ -32600,6 +32625,10 @@ __decorate([Prop({
|
|
|
32600
32625
|
|
|
32601
32626
|
__decorate([params$8.Getter("query")], AdditionalPanels$1.prototype, "query", void 0);
|
|
32602
32627
|
|
|
32628
|
+
__decorate([options$4.State(function (o) {
|
|
32629
|
+
return o.searchResultOptions;
|
|
32630
|
+
})], AdditionalPanels$1.prototype, "searchResultOptions", void 0);
|
|
32631
|
+
|
|
32603
32632
|
__decorate([Watch("query")], AdditionalPanels$1.prototype, "handleQueryChange", null);
|
|
32604
32633
|
|
|
32605
32634
|
AdditionalPanels$1 = __decorate([Component({
|
|
@@ -32965,6 +32994,11 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32965
32994
|
get: function get() {
|
|
32966
32995
|
return this.showFirstPage && !this.pages.includes(2);
|
|
32967
32996
|
}
|
|
32997
|
+
}, {
|
|
32998
|
+
key: "showPagination",
|
|
32999
|
+
get: function get() {
|
|
33000
|
+
return this.pages.length > 1;
|
|
33001
|
+
}
|
|
32968
33002
|
}, {
|
|
32969
33003
|
key: "handlePageChange",
|
|
32970
33004
|
value: function handlePageChange(page) {
|
|
@@ -33015,7 +33049,7 @@ var __vue_render__$i = function __vue_render__() {
|
|
|
33015
33049
|
|
|
33016
33050
|
var _c = _vm._self._c || _h;
|
|
33017
33051
|
|
|
33018
|
-
return _c("div", {
|
|
33052
|
+
return _vm.showPagination ? _c("div", {
|
|
33019
33053
|
attrs: {
|
|
33020
33054
|
id: "lupa-search-results-page-select",
|
|
33021
33055
|
"data-cy": "lupa-search-results-page-select"
|
|
@@ -33068,7 +33102,7 @@ var __vue_render__$i = function __vue_render__() {
|
|
|
33068
33102
|
return _vm.handlePageChange(_vm.options.selectedPage + 1);
|
|
33069
33103
|
}
|
|
33070
33104
|
}
|
|
33071
|
-
}, [_vm._v("\n " + _vm._s(_vm.lastPageLabel) + "\n ")]) : _vm._e()], 2);
|
|
33105
|
+
}, [_vm._v("\n " + _vm._s(_vm.lastPageLabel) + "\n ")]) : _vm._e()], 2) : _vm._e();
|
|
33072
33106
|
};
|
|
33073
33107
|
|
|
33074
33108
|
var __vue_staticRenderFns__$i = [];
|
|
@@ -34313,13 +34347,13 @@ var __vue_render__$8 = function __vue_render__() {
|
|
|
34313
34347
|
options: _vm.currentFilterOptions,
|
|
34314
34348
|
expandable: true
|
|
34315
34349
|
}
|
|
34316
|
-
}) : _vm._e(), _vm._v(" "), _c("AdditionalPanels", {
|
|
34350
|
+
}) : _vm._e()] : _vm._e(), _vm._v(" "), _c("AdditionalPanels", {
|
|
34317
34351
|
attrs: {
|
|
34318
34352
|
options: _vm.options,
|
|
34319
34353
|
location: "top",
|
|
34320
34354
|
sdkOptions: _vm.options.options
|
|
34321
34355
|
}
|
|
34322
|
-
}), _vm._v(" "), _c("SearchResultsToolbar", {
|
|
34356
|
+
}), _vm._v(" "), _vm.hasResults ? [_c("SearchResultsToolbar", {
|
|
34323
34357
|
staticClass: "lupa-toolbar-top",
|
|
34324
34358
|
attrs: {
|
|
34325
34359
|
options: _vm.options,
|
|
@@ -34854,15 +34888,16 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
|
|
|
34854
34888
|
var queryKey = _ref.queryKey,
|
|
34855
34889
|
results = _ref.results;
|
|
34856
34890
|
|
|
34857
|
-
var _a;
|
|
34891
|
+
var _a, _b, _c, _d;
|
|
34858
34892
|
|
|
34859
34893
|
this.trackResults({
|
|
34860
34894
|
queryKey: queryKey,
|
|
34861
34895
|
results: results
|
|
34862
34896
|
});
|
|
34863
|
-
|
|
34864
|
-
|
|
34865
|
-
|
|
34897
|
+
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));
|
|
34898
|
+
(_d = (_c = this.options.callbacks) === null || _c === void 0 ? void 0 : _c.onSearchResults) === null || _d === void 0 ? void 0 : _d.call(_c, {
|
|
34899
|
+
queryKey: queryKey,
|
|
34900
|
+
hasResults: hasResults
|
|
34866
34901
|
});
|
|
34867
34902
|
}
|
|
34868
34903
|
}, {
|
|
@@ -34909,8 +34944,6 @@ __decorate([params$1.State("searchString")], SearchResults.prototype, "searchStr
|
|
|
34909
34944
|
|
|
34910
34945
|
__decorate([params$1.Action("setDefaultLimit")], SearchResults.prototype, "setDefaultLimit", void 0);
|
|
34911
34946
|
|
|
34912
|
-
__decorate([params$1.Action("handleNoResultsFlag")], SearchResults.prototype, "handleNoResultsFlag", void 0);
|
|
34913
|
-
|
|
34914
34947
|
__decorate([params$1.Action("add")], SearchResults.prototype, "addParams", void 0);
|
|
34915
34948
|
|
|
34916
34949
|
__decorate([params$1.Action("removeParams")], SearchResults.prototype, "removeParams", void 0);
|
|
@@ -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";
|
|
@@ -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, CallbackContext, };
|
|
20
21
|
export default lupaSearch;
|