@getlupa/client 0.14.0 → 0.14.2
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 +1 -0
- package/dist/cjs/components/search-results/filters/SearchResultsFilters.vue.d.ts +1 -0
- package/dist/cjs/index.min.js +23 -5
- package/dist/cjs/store/modules/dynamicData.d.ts +4 -3
- package/dist/es/components/product-list/CategoryFilter.vue.d.ts +1 -0
- package/dist/es/components/search-results/filters/SearchResultsFilters.vue.d.ts +1 -0
- package/dist/es/index.min.js +23 -5
- package/dist/es/store/modules/dynamicData.d.ts +4 -3
- package/dist/iife/components/product-list/CategoryFilter.vue.d.ts +1 -0
- package/dist/iife/components/search-results/filters/SearchResultsFilters.vue.d.ts +1 -0
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/store/modules/dynamicData.d.ts +4 -3
- package/dist/lupaContainerStyle.css +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ export default class CategoryFilter extends Vue {
|
|
|
15
15
|
get parentUrlLink(): string | undefined;
|
|
16
16
|
get isActive(): boolean;
|
|
17
17
|
mounted(): Promise<void>;
|
|
18
|
+
fetch(): Promise<void>;
|
|
18
19
|
handleResult(result: SearchQueryResult | SdkError): void;
|
|
19
20
|
getCategoryKey(item: Record<string, string>): string;
|
|
20
21
|
handleNavigationParent(event?: Event): void;
|
package/dist/cjs/index.min.js
CHANGED
|
@@ -33523,6 +33523,11 @@ let CategoryFilter = class CategoryFilter extends Vue$1 {
|
|
|
33523
33523
|
return linksMatch(this.parentUrlLink, window.location.origin + window.location.pathname);
|
|
33524
33524
|
}
|
|
33525
33525
|
mounted() {
|
|
33526
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
33527
|
+
yield this.fetch();
|
|
33528
|
+
});
|
|
33529
|
+
}
|
|
33530
|
+
fetch() {
|
|
33526
33531
|
var _a;
|
|
33527
33532
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
33528
33533
|
if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.queryKey)) {
|
|
@@ -33689,6 +33694,11 @@ let SearchResultsFilters = class SearchResultsFilters extends Vue$1 {
|
|
|
33689
33694
|
? Boolean(this.options.facets)
|
|
33690
33695
|
: false;
|
|
33691
33696
|
}
|
|
33697
|
+
fetch() {
|
|
33698
|
+
var _a;
|
|
33699
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33700
|
+
(_a = this.$refs.categoryFilters) === null || _a === void 0 ? void 0 : _a.fetch();
|
|
33701
|
+
}
|
|
33692
33702
|
};
|
|
33693
33703
|
__decorate([
|
|
33694
33704
|
Prop()
|
|
@@ -33733,7 +33743,10 @@ var __vue_render__$I = function () {
|
|
|
33733
33743
|
: _vm._e(),
|
|
33734
33744
|
_vm._v(" "),
|
|
33735
33745
|
_vm.options.categories
|
|
33736
|
-
? _c("CategoryFilter", {
|
|
33746
|
+
? _c("CategoryFilter", {
|
|
33747
|
+
ref: "categoryFilters",
|
|
33748
|
+
attrs: { options: _vm.options.categories },
|
|
33749
|
+
})
|
|
33737
33750
|
: _vm._e(),
|
|
33738
33751
|
_vm._v(" "),
|
|
33739
33752
|
_vm.options.facets
|
|
@@ -38444,9 +38457,12 @@ let SearchResults = class SearchResults extends Vue$1 {
|
|
|
38444
38457
|
window.removeEventListener("resize", this.handleResize);
|
|
38445
38458
|
}
|
|
38446
38459
|
handleMounted() {
|
|
38460
|
+
var _a;
|
|
38447
38461
|
this.handleResize();
|
|
38448
38462
|
if (this.isProductList) {
|
|
38449
38463
|
setDocumentTitle(this.options.labels.htmlTitleTemplate, "");
|
|
38464
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38465
|
+
(_a = this.$refs.searchResultsFilters) === null || _a === void 0 ? void 0 : _a.fetch();
|
|
38450
38466
|
}
|
|
38451
38467
|
const params = new URLSearchParams(window.location.search);
|
|
38452
38468
|
if (!params.has(QUERY_PARAMS.QUERY)) {
|
|
@@ -38671,6 +38687,7 @@ var __vue_render__$6 = function () {
|
|
|
38671
38687
|
[
|
|
38672
38688
|
_vm.showFilterSidebar
|
|
38673
38689
|
? _c("SearchResultsFilters", {
|
|
38690
|
+
ref: "searchResultsFilters",
|
|
38674
38691
|
attrs: { options: _vm.options.filters },
|
|
38675
38692
|
})
|
|
38676
38693
|
: _vm._e(),
|
|
@@ -38731,6 +38748,7 @@ var __vue_render__$6 = function () {
|
|
|
38731
38748
|
[
|
|
38732
38749
|
_vm.showFilterSidebar
|
|
38733
38750
|
? _c("SearchResultsFilters", {
|
|
38751
|
+
ref: "searchResultsFilters",
|
|
38734
38752
|
attrs: { options: _vm.options.filters },
|
|
38735
38753
|
})
|
|
38736
38754
|
: _vm._e(),
|
|
@@ -40497,12 +40515,12 @@ let DynamicDataModule = class DynamicDataModule extends VuexModule {
|
|
|
40497
40515
|
return (_a = this.searchBoxOptions) === null || _a === void 0 ? void 0 : _a.dynamicData;
|
|
40498
40516
|
}
|
|
40499
40517
|
get isDynamicDataEnabledForSearchResults() {
|
|
40500
|
-
var _a, _b;
|
|
40501
|
-
return (_b = (_a = this.searchResultOptions) === null || _a === void 0 ? void 0 : _a.dynamicData) === null || _b === void 0 ? void 0 : _b.enabled;
|
|
40518
|
+
var _a, _b, _c;
|
|
40519
|
+
return (_c = (_b = (_a = this.searchResultOptions) === null || _a === void 0 ? void 0 : _a.dynamicData) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : false;
|
|
40502
40520
|
}
|
|
40503
40521
|
get isDynamicDataEnabledForSearchBox() {
|
|
40504
|
-
var _a, _b;
|
|
40505
|
-
return (_b = (_a = this.searchBoxOptions) === null || _a === void 0 ? void 0 : _a.dynamicData) === null || _b === void 0 ? void 0 : _b.enabled;
|
|
40522
|
+
var _a, _b, _c;
|
|
40523
|
+
return (_c = (_b = (_a = this.searchBoxOptions) === null || _a === void 0 ? void 0 : _a.dynamicData) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : false;
|
|
40506
40524
|
}
|
|
40507
40525
|
get isCacheEnabled() {
|
|
40508
40526
|
var _a;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SearchBoxOptions } from "@/types/search-box/SearchBoxOptions";
|
|
2
|
+
import { DynamicData, SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
|
|
2
3
|
import { Document, SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
3
4
|
import { VuexModule } from "vuex-module-decorators";
|
|
4
5
|
export default class DynamicDataModule extends VuexModule {
|
|
5
6
|
loading: boolean;
|
|
6
7
|
dynamicDataIdMap: Record<string, Document>;
|
|
7
8
|
get loadedIds(): string[];
|
|
8
|
-
get searchResultOptions():
|
|
9
|
-
get searchBoxOptions():
|
|
9
|
+
get searchResultOptions(): SearchResultsOptions;
|
|
10
|
+
get searchBoxOptions(): SearchBoxOptions;
|
|
10
11
|
get dynamicSearchResultData(): DynamicData | undefined;
|
|
11
12
|
get dynamicSearchBoxData(): DynamicData | undefined;
|
|
12
13
|
get isDynamicDataEnabledForSearchResults(): boolean;
|
|
@@ -15,6 +15,7 @@ export default class CategoryFilter extends Vue {
|
|
|
15
15
|
get parentUrlLink(): string | undefined;
|
|
16
16
|
get isActive(): boolean;
|
|
17
17
|
mounted(): Promise<void>;
|
|
18
|
+
fetch(): Promise<void>;
|
|
18
19
|
handleResult(result: SearchQueryResult | SdkError): void;
|
|
19
20
|
getCategoryKey(item: Record<string, string>): string;
|
|
20
21
|
handleNavigationParent(event?: Event): void;
|
package/dist/es/index.min.js
CHANGED
|
@@ -33519,6 +33519,11 @@ let CategoryFilter = class CategoryFilter extends Vue$1 {
|
|
|
33519
33519
|
return linksMatch(this.parentUrlLink, window.location.origin + window.location.pathname);
|
|
33520
33520
|
}
|
|
33521
33521
|
mounted() {
|
|
33522
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
33523
|
+
yield this.fetch();
|
|
33524
|
+
});
|
|
33525
|
+
}
|
|
33526
|
+
fetch() {
|
|
33522
33527
|
var _a;
|
|
33523
33528
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
33524
33529
|
if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.queryKey)) {
|
|
@@ -33685,6 +33690,11 @@ let SearchResultsFilters = class SearchResultsFilters extends Vue$1 {
|
|
|
33685
33690
|
? Boolean(this.options.facets)
|
|
33686
33691
|
: false;
|
|
33687
33692
|
}
|
|
33693
|
+
fetch() {
|
|
33694
|
+
var _a;
|
|
33695
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33696
|
+
(_a = this.$refs.categoryFilters) === null || _a === void 0 ? void 0 : _a.fetch();
|
|
33697
|
+
}
|
|
33688
33698
|
};
|
|
33689
33699
|
__decorate([
|
|
33690
33700
|
Prop()
|
|
@@ -33729,7 +33739,10 @@ var __vue_render__$I = function () {
|
|
|
33729
33739
|
: _vm._e(),
|
|
33730
33740
|
_vm._v(" "),
|
|
33731
33741
|
_vm.options.categories
|
|
33732
|
-
? _c("CategoryFilter", {
|
|
33742
|
+
? _c("CategoryFilter", {
|
|
33743
|
+
ref: "categoryFilters",
|
|
33744
|
+
attrs: { options: _vm.options.categories },
|
|
33745
|
+
})
|
|
33733
33746
|
: _vm._e(),
|
|
33734
33747
|
_vm._v(" "),
|
|
33735
33748
|
_vm.options.facets
|
|
@@ -38440,9 +38453,12 @@ let SearchResults = class SearchResults extends Vue$1 {
|
|
|
38440
38453
|
window.removeEventListener("resize", this.handleResize);
|
|
38441
38454
|
}
|
|
38442
38455
|
handleMounted() {
|
|
38456
|
+
var _a;
|
|
38443
38457
|
this.handleResize();
|
|
38444
38458
|
if (this.isProductList) {
|
|
38445
38459
|
setDocumentTitle(this.options.labels.htmlTitleTemplate, "");
|
|
38460
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38461
|
+
(_a = this.$refs.searchResultsFilters) === null || _a === void 0 ? void 0 : _a.fetch();
|
|
38446
38462
|
}
|
|
38447
38463
|
const params = new URLSearchParams(window.location.search);
|
|
38448
38464
|
if (!params.has(QUERY_PARAMS.QUERY)) {
|
|
@@ -38667,6 +38683,7 @@ var __vue_render__$6 = function () {
|
|
|
38667
38683
|
[
|
|
38668
38684
|
_vm.showFilterSidebar
|
|
38669
38685
|
? _c("SearchResultsFilters", {
|
|
38686
|
+
ref: "searchResultsFilters",
|
|
38670
38687
|
attrs: { options: _vm.options.filters },
|
|
38671
38688
|
})
|
|
38672
38689
|
: _vm._e(),
|
|
@@ -38727,6 +38744,7 @@ var __vue_render__$6 = function () {
|
|
|
38727
38744
|
[
|
|
38728
38745
|
_vm.showFilterSidebar
|
|
38729
38746
|
? _c("SearchResultsFilters", {
|
|
38747
|
+
ref: "searchResultsFilters",
|
|
38730
38748
|
attrs: { options: _vm.options.filters },
|
|
38731
38749
|
})
|
|
38732
38750
|
: _vm._e(),
|
|
@@ -40493,12 +40511,12 @@ let DynamicDataModule = class DynamicDataModule extends VuexModule {
|
|
|
40493
40511
|
return (_a = this.searchBoxOptions) === null || _a === void 0 ? void 0 : _a.dynamicData;
|
|
40494
40512
|
}
|
|
40495
40513
|
get isDynamicDataEnabledForSearchResults() {
|
|
40496
|
-
var _a, _b;
|
|
40497
|
-
return (_b = (_a = this.searchResultOptions) === null || _a === void 0 ? void 0 : _a.dynamicData) === null || _b === void 0 ? void 0 : _b.enabled;
|
|
40514
|
+
var _a, _b, _c;
|
|
40515
|
+
return (_c = (_b = (_a = this.searchResultOptions) === null || _a === void 0 ? void 0 : _a.dynamicData) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : false;
|
|
40498
40516
|
}
|
|
40499
40517
|
get isDynamicDataEnabledForSearchBox() {
|
|
40500
|
-
var _a, _b;
|
|
40501
|
-
return (_b = (_a = this.searchBoxOptions) === null || _a === void 0 ? void 0 : _a.dynamicData) === null || _b === void 0 ? void 0 : _b.enabled;
|
|
40518
|
+
var _a, _b, _c;
|
|
40519
|
+
return (_c = (_b = (_a = this.searchBoxOptions) === null || _a === void 0 ? void 0 : _a.dynamicData) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : false;
|
|
40502
40520
|
}
|
|
40503
40521
|
get isCacheEnabled() {
|
|
40504
40522
|
var _a;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SearchBoxOptions } from "@/types/search-box/SearchBoxOptions";
|
|
2
|
+
import { DynamicData, SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
|
|
2
3
|
import { Document, SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
3
4
|
import { VuexModule } from "vuex-module-decorators";
|
|
4
5
|
export default class DynamicDataModule extends VuexModule {
|
|
5
6
|
loading: boolean;
|
|
6
7
|
dynamicDataIdMap: Record<string, Document>;
|
|
7
8
|
get loadedIds(): string[];
|
|
8
|
-
get searchResultOptions():
|
|
9
|
-
get searchBoxOptions():
|
|
9
|
+
get searchResultOptions(): SearchResultsOptions;
|
|
10
|
+
get searchBoxOptions(): SearchBoxOptions;
|
|
10
11
|
get dynamicSearchResultData(): DynamicData | undefined;
|
|
11
12
|
get dynamicSearchBoxData(): DynamicData | undefined;
|
|
12
13
|
get isDynamicDataEnabledForSearchResults(): boolean;
|
|
@@ -15,6 +15,7 @@ export default class CategoryFilter extends Vue {
|
|
|
15
15
|
get parentUrlLink(): string | undefined;
|
|
16
16
|
get isActive(): boolean;
|
|
17
17
|
mounted(): Promise<void>;
|
|
18
|
+
fetch(): Promise<void>;
|
|
18
19
|
handleResult(result: SearchQueryResult | SdkError): void;
|
|
19
20
|
getCategoryKey(item: Record<string, string>): string;
|
|
20
21
|
handleNavigationParent(event?: Event): void;
|