@getlupa/client 0.16.0-alpha-4 → 0.16.1
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/README.md +2 -0
- package/dist/cjs/components/search-box/products/elements/SearchBoxProductCustom.vue.d.ts +1 -0
- package/dist/cjs/components/search-box/products/elements/custom/SearchBoxProductCustomHtml.vue.d.ts +1 -0
- package/dist/cjs/components/search-results/filters/SearchResultsFilters.vue.d.ts +2 -0
- package/dist/cjs/components/search-results/products/SearchResultsProducts.vue.d.ts +3 -0
- package/dist/cjs/components/search-results/products/product-card/badges/SearchResultGeneratedBadge.vue.d.ts +1 -0
- package/dist/cjs/components/search-results/products/product-card/elements/SearchResultsProductCustom.vue.d.ts +1 -0
- package/dist/cjs/components/search-results/products/product-card/elements/custom/SearchResultsProductCustomHtmlElement.vue.d.ts +1 -0
- package/dist/cjs/constants/development/searchResultsDev.example.const.d.ts +5 -0
- package/dist/cjs/index.min.js +148 -51
- package/dist/cjs/types/DocumentElement.d.ts +2 -0
- package/dist/cjs/types/search-results/BadgeOptions.d.ts +1 -0
- package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +7 -2
- package/dist/es/components/search-box/products/elements/SearchBoxProductCustom.vue.d.ts +1 -0
- package/dist/es/components/search-box/products/elements/custom/SearchBoxProductCustomHtml.vue.d.ts +1 -0
- package/dist/es/components/search-results/filters/SearchResultsFilters.vue.d.ts +2 -0
- package/dist/es/components/search-results/products/SearchResultsProducts.vue.d.ts +3 -0
- package/dist/es/components/search-results/products/product-card/badges/SearchResultGeneratedBadge.vue.d.ts +1 -0
- package/dist/es/components/search-results/products/product-card/elements/SearchResultsProductCustom.vue.d.ts +1 -0
- package/dist/es/components/search-results/products/product-card/elements/custom/SearchResultsProductCustomHtmlElement.vue.d.ts +1 -0
- package/dist/es/constants/development/searchResultsDev.example.const.d.ts +5 -0
- package/dist/es/index.min.js +148 -51
- package/dist/es/types/DocumentElement.d.ts +2 -0
- package/dist/es/types/search-results/BadgeOptions.d.ts +1 -0
- package/dist/es/types/search-results/SearchResultsOptions.d.ts +7 -2
- package/dist/iife/components/search-box/products/elements/SearchBoxProductCustom.vue.d.ts +1 -0
- package/dist/iife/components/search-box/products/elements/custom/SearchBoxProductCustomHtml.vue.d.ts +1 -0
- package/dist/iife/components/search-results/filters/SearchResultsFilters.vue.d.ts +2 -0
- package/dist/iife/components/search-results/products/SearchResultsProducts.vue.d.ts +3 -0
- package/dist/iife/components/search-results/products/product-card/badges/SearchResultGeneratedBadge.vue.d.ts +1 -0
- package/dist/iife/components/search-results/products/product-card/elements/SearchResultsProductCustom.vue.d.ts +1 -0
- package/dist/iife/components/search-results/products/product-card/elements/custom/SearchResultsProductCustomHtmlElement.vue.d.ts +1 -0
- package/dist/iife/constants/development/searchResultsDev.example.const.d.ts +5 -0
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/DocumentElement.d.ts +2 -0
- package/dist/iife/types/search-results/BadgeOptions.d.ts +1 -0
- package/dist/iife/types/search-results/SearchResultsOptions.d.ts +7 -2
- package/dist/lupaContainerStyle.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,8 @@ import { SearchResultsFilterOptions } from "@/types/search-results/SearchResults
|
|
|
3
3
|
export default class SearchResultsFilters extends Vue {
|
|
4
4
|
options: SearchResultsFilterOptions;
|
|
5
5
|
expandable: boolean;
|
|
6
|
+
get desktopFiltersVisible(): boolean;
|
|
7
|
+
get currentFiltersVisible(): boolean;
|
|
6
8
|
get showCurrentFilters(): boolean;
|
|
7
9
|
fetch(): void;
|
|
8
10
|
}
|
|
@@ -14,7 +14,10 @@ export default class SearchResultsProducts extends Vue {
|
|
|
14
14
|
get similarQueriesLabels(): SearchResultsSimilarQueriesLabels;
|
|
15
15
|
get showTopFilters(): boolean;
|
|
16
16
|
get showMobileFilters(): boolean;
|
|
17
|
+
get currentFilterToolbarVisible(): boolean;
|
|
17
18
|
get currentFilterOptions(): ResultCurrentFilterOptions | undefined;
|
|
19
|
+
get currentFiltersClass(): string;
|
|
20
|
+
get desktopFiltersExpanded(): boolean;
|
|
18
21
|
columnCount: number;
|
|
19
22
|
searchResult: SearchQueryResult;
|
|
20
23
|
layout: ResultsLayout;
|
|
@@ -57,6 +57,8 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
|
|
|
57
57
|
visibility: {
|
|
58
58
|
mobileSidebar: boolean;
|
|
59
59
|
mobileToolbar: boolean;
|
|
60
|
+
desktopToolbar: boolean;
|
|
61
|
+
desktopSidebar: boolean;
|
|
60
62
|
};
|
|
61
63
|
labels: {
|
|
62
64
|
title: string;
|
|
@@ -66,6 +68,9 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
|
|
|
66
68
|
showFilterCount: boolean;
|
|
67
69
|
activeFiltersExpanded: boolean;
|
|
68
70
|
};
|
|
71
|
+
desktopToolbar: {
|
|
72
|
+
activeFiltersExpanded: boolean;
|
|
73
|
+
};
|
|
69
74
|
};
|
|
70
75
|
facets: {
|
|
71
76
|
labels: {
|
package/dist/cjs/index.min.js
CHANGED
|
@@ -11779,6 +11779,14 @@ let SearchBoxProductCustom = class SearchBoxProductCustom extends Vue$1 {
|
|
|
11779
11779
|
var _a;
|
|
11780
11780
|
return (_a = this.options.isHtml) !== null && _a !== void 0 ? _a : false;
|
|
11781
11781
|
}
|
|
11782
|
+
handleClick() {
|
|
11783
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
11784
|
+
if (!this.options.action) {
|
|
11785
|
+
return;
|
|
11786
|
+
}
|
|
11787
|
+
yield this.options.action(this.item);
|
|
11788
|
+
});
|
|
11789
|
+
}
|
|
11782
11790
|
};
|
|
11783
11791
|
__decorate([
|
|
11784
11792
|
Prop()
|
|
@@ -11800,23 +11808,36 @@ var __vue_render__$18 = function () {
|
|
|
11800
11808
|
var _h = _vm.$createElement;
|
|
11801
11809
|
var _c = _vm._self._c || _h;
|
|
11802
11810
|
return _vm.isHtml
|
|
11803
|
-
? _c(
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
:
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
|
|
11811
|
+
? _c(
|
|
11812
|
+
"div",
|
|
11813
|
+
_vm._g(
|
|
11814
|
+
{
|
|
11815
|
+
class: [_vm.className, "lupa-search-box-product-custom"],
|
|
11816
|
+
domProps: { innerHTML: _vm._s(_vm.text) },
|
|
11817
|
+
},
|
|
11818
|
+
_vm.options.action ? { click: _vm.handleClick } : {}
|
|
11819
|
+
)
|
|
11820
|
+
)
|
|
11821
|
+
: _c(
|
|
11822
|
+
"div",
|
|
11823
|
+
_vm._g(
|
|
11824
|
+
{ class: [_vm.className, "lupa-search-box-product-custom"] },
|
|
11825
|
+
_vm.options.action ? { click: _vm.handleClick } : {}
|
|
11826
|
+
),
|
|
11827
|
+
[
|
|
11828
|
+
!_vm.label
|
|
11829
|
+
? _c("div", [_vm._v("\n " + _vm._s(_vm.text) + "\n ")])
|
|
11830
|
+
: _c("div", [
|
|
11831
|
+
_c("div", { staticClass: "lupa-search-box-custom-label" }, [
|
|
11832
|
+
_vm._v(_vm._s(_vm.label)),
|
|
11833
|
+
]),
|
|
11834
|
+
_vm._v(" "),
|
|
11835
|
+
_c("div", { staticClass: "lupa-search-box-custom-text" }, [
|
|
11836
|
+
_vm._v(_vm._s(_vm.text)),
|
|
11837
|
+
]),
|
|
11817
11838
|
]),
|
|
11818
|
-
|
|
11819
|
-
|
|
11839
|
+
]
|
|
11840
|
+
)
|
|
11820
11841
|
};
|
|
11821
11842
|
var __vue_staticRenderFns__$18 = [];
|
|
11822
11843
|
__vue_render__$18._withStripped = true;
|
|
@@ -11857,6 +11878,14 @@ let SearchBoxProductCustomHtml = class SearchBoxProductCustomHtml extends Vue$1
|
|
|
11857
11878
|
get className() {
|
|
11858
11879
|
return this.options.className;
|
|
11859
11880
|
}
|
|
11881
|
+
handleClick() {
|
|
11882
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
11883
|
+
if (!this.options.action) {
|
|
11884
|
+
return;
|
|
11885
|
+
}
|
|
11886
|
+
yield this.options.action(this.item);
|
|
11887
|
+
});
|
|
11888
|
+
}
|
|
11860
11889
|
};
|
|
11861
11890
|
__decorate([
|
|
11862
11891
|
Prop()
|
|
@@ -11879,10 +11908,13 @@ var __vue_render__$17 = function () {
|
|
|
11879
11908
|
var _vm = this;
|
|
11880
11909
|
var _h = _vm.$createElement;
|
|
11881
11910
|
var _c = _vm._self._c || _h;
|
|
11882
|
-
return _c(
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11911
|
+
return _c(
|
|
11912
|
+
"div",
|
|
11913
|
+
_vm._g(
|
|
11914
|
+
{ class: _vm.className, domProps: { innerHTML: _vm._s(_vm.text) } },
|
|
11915
|
+
_vm.options.action ? { click: _vm.handleClick } : {}
|
|
11916
|
+
)
|
|
11917
|
+
)
|
|
11886
11918
|
};
|
|
11887
11919
|
var __vue_staticRenderFns__$17 = [];
|
|
11888
11920
|
__vue_render__$17._withStripped = true;
|
|
@@ -33715,11 +33747,18 @@ __vue_render__$L._withStripped = true;
|
|
|
33715
33747
|
);
|
|
33716
33748
|
|
|
33717
33749
|
let SearchResultsFilters = class SearchResultsFilters extends Vue$1 {
|
|
33718
|
-
get
|
|
33750
|
+
get desktopFiltersVisible() {
|
|
33751
|
+
var _a, _b, _c;
|
|
33752
|
+
// Default is true
|
|
33753
|
+
return (_c = (_b = (_a = this.options.currentFilters) === null || _a === void 0 ? void 0 : _a.visibility) === null || _b === void 0 ? void 0 : _b.desktopSidebar) !== null && _c !== void 0 ? _c : true;
|
|
33754
|
+
}
|
|
33755
|
+
get currentFiltersVisible() {
|
|
33719
33756
|
var _a, _b;
|
|
33720
|
-
return ((_b = (_a = this.options.currentFilters) === null || _a === void 0 ? void 0 : _a.visibility) === null || _b === void 0 ? void 0 : _b.mobileSidebar)
|
|
33721
|
-
|
|
33722
|
-
|
|
33757
|
+
return (((_b = (_a = this.options.currentFilters) === null || _a === void 0 ? void 0 : _a.visibility) === null || _b === void 0 ? void 0 : _b.mobileSidebar) ||
|
|
33758
|
+
this.desktopFiltersVisible);
|
|
33759
|
+
}
|
|
33760
|
+
get showCurrentFilters() {
|
|
33761
|
+
return this.currentFiltersVisible ? Boolean(this.options.facets) : false;
|
|
33723
33762
|
}
|
|
33724
33763
|
fetch() {
|
|
33725
33764
|
var _a;
|
|
@@ -34308,6 +34347,10 @@ let SearchResultGeneratedBadge = class SearchResultGeneratedBadge extends Vue$1
|
|
|
34308
34347
|
var _a, _b, _c;
|
|
34309
34348
|
return (_c = (_b = (_a = this.options.generate) === null || _a === void 0 ? void 0 : _a.image) === null || _b === void 0 ? void 0 : _b.call(_a, this.badge)) !== null && _c !== void 0 ? _c : "";
|
|
34310
34349
|
}
|
|
34350
|
+
get showTitle() {
|
|
34351
|
+
var _a, _b, _c;
|
|
34352
|
+
return (_c = (_b = (_a = this.options.generate) === null || _a === void 0 ? void 0 : _a.showTitle) === null || _b === void 0 ? void 0 : _b.call(_a, this.badge)) !== null && _c !== void 0 ? _c : true;
|
|
34353
|
+
}
|
|
34311
34354
|
get hasAdditionalText() {
|
|
34312
34355
|
var _a, _b;
|
|
34313
34356
|
return (Boolean((_a = this.badge) === null || _a === void 0 ? void 0 : _a.additionalText) &&
|
|
@@ -34349,7 +34392,7 @@ var __vue_render__$E = function () {
|
|
|
34349
34392
|
[
|
|
34350
34393
|
_c("span", { staticClass: "lupa-badge-title" }, [
|
|
34351
34394
|
_vm.image ? _c("img", { attrs: { src: _vm.image } }) : _vm._e(),
|
|
34352
|
-
_vm.hasTitleText
|
|
34395
|
+
_vm.hasTitleText && _vm.showTitle
|
|
34353
34396
|
? _c("span", [_vm._v("\n " + _vm._s(_vm.badge.titleText))])
|
|
34354
34397
|
: _vm._e(),
|
|
34355
34398
|
]),
|
|
@@ -35261,6 +35304,14 @@ let SearchResultsProductCustom = class SearchResultsProductCustom extends Vue$1
|
|
|
35261
35304
|
var _a;
|
|
35262
35305
|
return (_a = this.options.isHtml) !== null && _a !== void 0 ? _a : false;
|
|
35263
35306
|
}
|
|
35307
|
+
handleClick() {
|
|
35308
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
35309
|
+
if (!this.options.action) {
|
|
35310
|
+
return;
|
|
35311
|
+
}
|
|
35312
|
+
yield this.options.action(this.item);
|
|
35313
|
+
});
|
|
35314
|
+
}
|
|
35264
35315
|
};
|
|
35265
35316
|
__decorate([
|
|
35266
35317
|
Prop()
|
|
@@ -35284,23 +35335,33 @@ var __vue_render__$u = function () {
|
|
|
35284
35335
|
var _h = _vm.$createElement;
|
|
35285
35336
|
var _c = _vm._self._c || _h;
|
|
35286
35337
|
return _vm.isHtml
|
|
35287
|
-
? _c(
|
|
35288
|
-
|
|
35289
|
-
|
|
35290
|
-
|
|
35291
|
-
|
|
35292
|
-
|
|
35293
|
-
|
|
35294
|
-
|
|
35295
|
-
|
|
35296
|
-
|
|
35297
|
-
|
|
35298
|
-
|
|
35299
|
-
|
|
35300
|
-
|
|
35338
|
+
? _c(
|
|
35339
|
+
"div",
|
|
35340
|
+
_vm._g(
|
|
35341
|
+
{ class: _vm.className, domProps: { innerHTML: _vm._s(_vm.text) } },
|
|
35342
|
+
_vm.options.action ? { click: _vm.handleClick } : {}
|
|
35343
|
+
)
|
|
35344
|
+
)
|
|
35345
|
+
: _c(
|
|
35346
|
+
"div",
|
|
35347
|
+
_vm._g(
|
|
35348
|
+
{ class: _vm.className },
|
|
35349
|
+
_vm.options.action ? { click: _vm.handleClick } : {}
|
|
35350
|
+
),
|
|
35351
|
+
[
|
|
35352
|
+
!_vm.label
|
|
35353
|
+
? _c("div", [_vm._v("\n " + _vm._s(_vm.text) + "\n ")])
|
|
35354
|
+
: _c("div", [
|
|
35355
|
+
_c("div", { staticClass: "lupa-search-box-custom-label" }, [
|
|
35356
|
+
_vm._v(_vm._s(_vm.label)),
|
|
35357
|
+
]),
|
|
35358
|
+
_vm._v(" "),
|
|
35359
|
+
_c("div", { staticClass: "lupa-search-box-custom-text" }, [
|
|
35360
|
+
_vm._v(_vm._s(_vm.text)),
|
|
35361
|
+
]),
|
|
35301
35362
|
]),
|
|
35302
|
-
|
|
35303
|
-
|
|
35363
|
+
]
|
|
35364
|
+
)
|
|
35304
35365
|
};
|
|
35305
35366
|
var __vue_staticRenderFns__$u = [];
|
|
35306
35367
|
__vue_render__$u._withStripped = true;
|
|
@@ -35341,6 +35402,14 @@ let SearchResultsProductCustomHtmlElement = class SearchResultsProductCustomHtml
|
|
|
35341
35402
|
get className() {
|
|
35342
35403
|
return this.options.className;
|
|
35343
35404
|
}
|
|
35405
|
+
handleClick() {
|
|
35406
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
35407
|
+
if (!this.options.action) {
|
|
35408
|
+
return;
|
|
35409
|
+
}
|
|
35410
|
+
yield this.options.action(this.item);
|
|
35411
|
+
});
|
|
35412
|
+
}
|
|
35344
35413
|
};
|
|
35345
35414
|
__decorate([
|
|
35346
35415
|
Prop()
|
|
@@ -35363,10 +35432,13 @@ var __vue_render__$t = function () {
|
|
|
35363
35432
|
var _vm = this;
|
|
35364
35433
|
var _h = _vm.$createElement;
|
|
35365
35434
|
var _c = _vm._self._c || _h;
|
|
35366
|
-
return _c(
|
|
35367
|
-
|
|
35368
|
-
|
|
35369
|
-
|
|
35435
|
+
return _c(
|
|
35436
|
+
"div",
|
|
35437
|
+
_vm._g(
|
|
35438
|
+
{ class: _vm.className, domProps: { innerHTML: _vm._s(_vm.text) } },
|
|
35439
|
+
_vm.options.action ? { click: _vm.handleClick } : {}
|
|
35440
|
+
)
|
|
35441
|
+
)
|
|
35370
35442
|
};
|
|
35371
35443
|
var __vue_staticRenderFns__$t = [];
|
|
35372
35444
|
__vue_render__$t._withStripped = true;
|
|
@@ -37875,12 +37947,34 @@ let SearchResultsProducts = class SearchResultsProducts extends Vue$1 {
|
|
|
37875
37947
|
get showMobileFilters() {
|
|
37876
37948
|
return this.options.searchTitlePosition !== "search-results-top";
|
|
37877
37949
|
}
|
|
37950
|
+
get currentFilterToolbarVisible() {
|
|
37951
|
+
var _a, _b, _c, _d, _e, _f;
|
|
37952
|
+
return Boolean(((_c = (_b = (_a = this.options.filters) === null || _a === void 0 ? void 0 : _a.currentFilters) === null || _b === void 0 ? void 0 : _b.visibility) === null || _c === void 0 ? void 0 : _c.mobileToolbar) ||
|
|
37953
|
+
((_f = (_e = (_d = this.options.filters) === null || _d === void 0 ? void 0 : _d.currentFilters) === null || _e === void 0 ? void 0 : _e.visibility) === null || _f === void 0 ? void 0 : _f.desktopToolbar));
|
|
37954
|
+
}
|
|
37878
37955
|
get currentFilterOptions() {
|
|
37879
|
-
var _a
|
|
37880
|
-
return
|
|
37881
|
-
? (
|
|
37956
|
+
var _a;
|
|
37957
|
+
return this.currentFilterToolbarVisible
|
|
37958
|
+
? (_a = this.options.filters) === null || _a === void 0 ? void 0 : _a.currentFilters
|
|
37882
37959
|
: undefined;
|
|
37883
37960
|
}
|
|
37961
|
+
get currentFiltersClass() {
|
|
37962
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
37963
|
+
if (!this.currentFilterToolbarVisible) {
|
|
37964
|
+
return "";
|
|
37965
|
+
}
|
|
37966
|
+
if (((_c = (_b = (_a = this.options.filters) === null || _a === void 0 ? void 0 : _a.currentFilters) === null || _b === void 0 ? void 0 : _b.visibility) === null || _c === void 0 ? void 0 : _c.mobileToolbar) &&
|
|
37967
|
+
((_f = (_e = (_d = this.options.filters) === null || _d === void 0 ? void 0 : _d.currentFilters) === null || _e === void 0 ? void 0 : _e.visibility) === null || _f === void 0 ? void 0 : _f.desktopToolbar)) {
|
|
37968
|
+
return "lupa-toolbar-filters";
|
|
37969
|
+
}
|
|
37970
|
+
return ((_j = (_h = (_g = this.options.filters) === null || _g === void 0 ? void 0 : _g.currentFilters) === null || _h === void 0 ? void 0 : _h.visibility) === null || _j === void 0 ? void 0 : _j.mobileToolbar)
|
|
37971
|
+
? "lupa-filters-mobile"
|
|
37972
|
+
: "lupa-toolbar-filters-desktop";
|
|
37973
|
+
}
|
|
37974
|
+
get desktopFiltersExpanded() {
|
|
37975
|
+
var _a, _b, _c, _d, _e;
|
|
37976
|
+
return ((_e = (_d = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.currentFilters) === null || _c === void 0 ? void 0 : _c.desktopToolbar) === null || _d === void 0 ? void 0 : _d.activeFiltersExpanded) !== null && _e !== void 0 ? _e : false);
|
|
37977
|
+
}
|
|
37884
37978
|
get columnSize() {
|
|
37885
37979
|
if (this.layout === ResultsLayoutEnum.LIST) {
|
|
37886
37980
|
return "width: 100%";
|
|
@@ -37981,11 +38075,11 @@ var __vue_render__$c = function () {
|
|
|
37981
38075
|
_vm._v(" "),
|
|
37982
38076
|
_vm.currentFilterOptions
|
|
37983
38077
|
? _c("CurrentFilters", {
|
|
37984
|
-
|
|
38078
|
+
class: _vm.currentFiltersClass,
|
|
37985
38079
|
attrs: {
|
|
37986
38080
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
37987
38081
|
options: _vm.currentFilterOptions,
|
|
37988
|
-
expandable:
|
|
38082
|
+
expandable: !_vm.desktopFiltersExpanded,
|
|
37989
38083
|
},
|
|
37990
38084
|
})
|
|
37991
38085
|
: _vm._e(),
|
|
@@ -38740,7 +38834,10 @@ var __vue_render__$8 = function () {
|
|
|
38740
38834
|
var _c = _vm._self._c || _h;
|
|
38741
38835
|
return _c(
|
|
38742
38836
|
"div",
|
|
38743
|
-
{
|
|
38837
|
+
{
|
|
38838
|
+
staticClass: "lupa-search-result-wrapper",
|
|
38839
|
+
class: { "lupa-search-wrapper-no-results": !_vm.hasResults },
|
|
38840
|
+
},
|
|
38744
38841
|
[
|
|
38745
38842
|
_vm.isContainer
|
|
38746
38843
|
? [
|
|
@@ -43,6 +43,7 @@ export declare type CustomDocumentElement<T = any> = DocumentElementBase<T> & {
|
|
|
43
43
|
className: string;
|
|
44
44
|
key: string;
|
|
45
45
|
label?: string;
|
|
46
|
+
action?: (document: T) => Promise<unknown> | undefined;
|
|
46
47
|
};
|
|
47
48
|
export declare type PriceElement<T = any> = DocumentElementBase<T> & {
|
|
48
49
|
type: DocumentElementType.PRICE;
|
|
@@ -85,5 +86,6 @@ export declare type CustomHtmlElement<T = any> = DocumentElementBase<T> & {
|
|
|
85
86
|
type: DocumentElementType.CUSTOM_HTML;
|
|
86
87
|
html: (document: T) => string;
|
|
87
88
|
className: string;
|
|
89
|
+
action?: (document: T) => Promise<unknown> | undefined;
|
|
88
90
|
};
|
|
89
91
|
export declare type DocumentElement = ImageDocumentElement | TitleDocumentElement | DescriptionDocumentElement | CustomDocumentElement | PriceElement | RegularPriceDocumentElement | RatingElement | SingleStarRatingElement | AddToCartElement | CustomHtmlElement;
|
|
@@ -11,6 +11,7 @@ export declare type BadgeGenerateOptions<T = Record<string, any>> = {
|
|
|
11
11
|
key?: string;
|
|
12
12
|
keyMap?: Record<keyof BadgeGenerateSeed, keyof T>;
|
|
13
13
|
image?: (field: BadgeGenerateSeed) => string | undefined;
|
|
14
|
+
showTitle?: (field: BadgeGenerateSeed) => boolean;
|
|
14
15
|
};
|
|
15
16
|
export declare type BadgeOptions = {
|
|
16
17
|
anchor: AnchorPosition;
|
|
@@ -110,13 +110,18 @@ export declare type ResultCurrentFilterOptions = {
|
|
|
110
110
|
clearAll: string;
|
|
111
111
|
};
|
|
112
112
|
visibility?: {
|
|
113
|
-
mobileSidebar
|
|
114
|
-
mobileToolbar
|
|
113
|
+
mobileSidebar?: boolean;
|
|
114
|
+
mobileToolbar?: boolean;
|
|
115
|
+
desktopSidebar?: boolean;
|
|
116
|
+
desktopToolbar?: boolean;
|
|
115
117
|
};
|
|
116
118
|
mobileSidebar?: {
|
|
117
119
|
showFilterCount?: boolean;
|
|
118
120
|
activeFiltersExpanded?: boolean;
|
|
119
121
|
};
|
|
122
|
+
desktopToolbar?: {
|
|
123
|
+
activeFiltersExpanded?: boolean;
|
|
124
|
+
};
|
|
120
125
|
};
|
|
121
126
|
export declare type FacetStyle = "sidebar" | "top-dropdown";
|
|
122
127
|
export declare type FacetFilterQuery = {
|
|
@@ -3,6 +3,8 @@ import { SearchResultsFilterOptions } from "@/types/search-results/SearchResults
|
|
|
3
3
|
export default class SearchResultsFilters extends Vue {
|
|
4
4
|
options: SearchResultsFilterOptions;
|
|
5
5
|
expandable: boolean;
|
|
6
|
+
get desktopFiltersVisible(): boolean;
|
|
7
|
+
get currentFiltersVisible(): boolean;
|
|
6
8
|
get showCurrentFilters(): boolean;
|
|
7
9
|
fetch(): void;
|
|
8
10
|
}
|
|
@@ -14,7 +14,10 @@ export default class SearchResultsProducts extends Vue {
|
|
|
14
14
|
get similarQueriesLabels(): SearchResultsSimilarQueriesLabels;
|
|
15
15
|
get showTopFilters(): boolean;
|
|
16
16
|
get showMobileFilters(): boolean;
|
|
17
|
+
get currentFilterToolbarVisible(): boolean;
|
|
17
18
|
get currentFilterOptions(): ResultCurrentFilterOptions | undefined;
|
|
19
|
+
get currentFiltersClass(): string;
|
|
20
|
+
get desktopFiltersExpanded(): boolean;
|
|
18
21
|
columnCount: number;
|
|
19
22
|
searchResult: SearchQueryResult;
|
|
20
23
|
layout: ResultsLayout;
|
|
@@ -57,6 +57,8 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
|
|
|
57
57
|
visibility: {
|
|
58
58
|
mobileSidebar: boolean;
|
|
59
59
|
mobileToolbar: boolean;
|
|
60
|
+
desktopToolbar: boolean;
|
|
61
|
+
desktopSidebar: boolean;
|
|
60
62
|
};
|
|
61
63
|
labels: {
|
|
62
64
|
title: string;
|
|
@@ -66,6 +68,9 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
|
|
|
66
68
|
showFilterCount: boolean;
|
|
67
69
|
activeFiltersExpanded: boolean;
|
|
68
70
|
};
|
|
71
|
+
desktopToolbar: {
|
|
72
|
+
activeFiltersExpanded: boolean;
|
|
73
|
+
};
|
|
69
74
|
};
|
|
70
75
|
facets: {
|
|
71
76
|
labels: {
|