@getlupa/client 0.15.0 → 0.15.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/search-results/additional-panels/AdditionalPanel.vue.d.ts +1 -0
- package/dist/cjs/index.min.js +13 -7
- package/dist/cjs/types/search-box/Common.d.ts +1 -0
- package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/dist/es/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +1 -0
- package/dist/es/index.min.js +13 -7
- package/dist/es/types/search-box/Common.d.ts +1 -0
- package/dist/es/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/dist/iife/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +1 -0
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/search-box/Common.d.ts +1 -0
- package/dist/iife/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/index.min.js
CHANGED
|
@@ -35676,7 +35676,7 @@ let SearchResultsProductCard = class SearchResultsProductCard extends Vue$1 {
|
|
|
35676
35676
|
: "";
|
|
35677
35677
|
}
|
|
35678
35678
|
handleClick() {
|
|
35679
|
-
var _a, _b;
|
|
35679
|
+
var _a, _b, _c, _d;
|
|
35680
35680
|
this.trackClick({
|
|
35681
35681
|
queryKey: this.options.queryKey,
|
|
35682
35682
|
data: {
|
|
@@ -35686,14 +35686,16 @@ let SearchResultsProductCard = class SearchResultsProductCard extends Vue$1 {
|
|
|
35686
35686
|
analytics: {
|
|
35687
35687
|
type: this.query ? "search_product_click" : "select_item",
|
|
35688
35688
|
label: this.title || this.id || this.link,
|
|
35689
|
+
listLabel: (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.labels) === null || _b === void 0 ? void 0 : _b.htmlTitleTemplate,
|
|
35689
35690
|
items: [this.product],
|
|
35690
35691
|
},
|
|
35691
35692
|
options: { allowEmptySearchQuery: true },
|
|
35692
35693
|
},
|
|
35693
35694
|
});
|
|
35694
|
-
(
|
|
35695
|
+
(_d = (_c = this.searchResultOptions.callbacks) === null || _c === void 0 ? void 0 : _c.onProductClick) === null || _d === void 0 ? void 0 : _d.call(_c, {
|
|
35695
35696
|
queryKey: this.query,
|
|
35696
35697
|
hasResults: true,
|
|
35698
|
+
productId: this.id,
|
|
35697
35699
|
});
|
|
35698
35700
|
}
|
|
35699
35701
|
handleProductEvent(item) {
|
|
@@ -36101,20 +36103,20 @@ const sendGa4AnalyticsEvent = (data, options) => {
|
|
|
36101
36103
|
const title = sendItemTitle ? (_b = data.analytics) === null || _b === void 0 ? void 0 : _b.label : undefined;
|
|
36102
36104
|
const params = {
|
|
36103
36105
|
search_text: data.searchQuery,
|
|
36104
|
-
item_title:
|
|
36105
|
-
ecommerce: parseEcommerceData(data,
|
|
36106
|
+
item_title: title,
|
|
36107
|
+
ecommerce: parseEcommerceData(data, (_c = data.analytics) === null || _c === void 0 ? void 0 : _c.listLabel),
|
|
36106
36108
|
};
|
|
36107
36109
|
window.dataLayer.push(Object.assign({ event: (_e = (_d = data.analytics) === null || _d === void 0 ? void 0 : _d.type) !== null && _e !== void 0 ? _e : options.parentEventName }, params));
|
|
36108
36110
|
};
|
|
36109
36111
|
const processDebugEvent = (data) => {
|
|
36110
|
-
var _a, _b, _c;
|
|
36112
|
+
var _a, _b, _c, _d;
|
|
36111
36113
|
const sendItemTitle = data.searchQuery !== ((_a = data.analytics) === null || _a === void 0 ? void 0 : _a.label);
|
|
36112
36114
|
const title = sendItemTitle ? (_b = data.analytics) === null || _b === void 0 ? void 0 : _b.label : undefined;
|
|
36113
36115
|
const params = {
|
|
36114
36116
|
event: (_c = data.analytics) === null || _c === void 0 ? void 0 : _c.type,
|
|
36115
36117
|
search_text: data.searchQuery,
|
|
36116
36118
|
item_title: title,
|
|
36117
|
-
ecommerce: parseEcommerceData(data,
|
|
36119
|
+
ecommerce: parseEcommerceData(data, (_d = data.analytics) === null || _d === void 0 ? void 0 : _d.listLabel),
|
|
36118
36120
|
};
|
|
36119
36121
|
console.debug("Analytics debug event:", params);
|
|
36120
36122
|
};
|
|
@@ -36211,11 +36213,14 @@ __decorate([
|
|
|
36211
36213
|
__decorate([
|
|
36212
36214
|
params$9.Getter("query")
|
|
36213
36215
|
], AdditionalPanels$1.prototype, "query", void 0);
|
|
36216
|
+
__decorate([
|
|
36217
|
+
params$9.Getter("searchString")
|
|
36218
|
+
], AdditionalPanels$1.prototype, "searchString", void 0);
|
|
36214
36219
|
__decorate([
|
|
36215
36220
|
options$6.State((o) => o.searchResultOptions)
|
|
36216
36221
|
], AdditionalPanels$1.prototype, "searchResultOptions", void 0);
|
|
36217
36222
|
__decorate([
|
|
36218
|
-
Watch("
|
|
36223
|
+
Watch("searchString")
|
|
36219
36224
|
], AdditionalPanels$1.prototype, "handleQueryChange", null);
|
|
36220
36225
|
AdditionalPanels$1 = __decorate([
|
|
36221
36226
|
Component({
|
|
@@ -38492,6 +38497,7 @@ let SearchResults = class SearchResults extends Vue$1 {
|
|
|
38492
38497
|
analytics: {
|
|
38493
38498
|
type: "view_item_list",
|
|
38494
38499
|
label: title,
|
|
38500
|
+
listLabel: title,
|
|
38495
38501
|
items,
|
|
38496
38502
|
},
|
|
38497
38503
|
options: { allowEmptySearchQuery: true },
|
package/dist/es/index.min.js
CHANGED
|
@@ -35672,7 +35672,7 @@ let SearchResultsProductCard = class SearchResultsProductCard extends Vue$1 {
|
|
|
35672
35672
|
: "";
|
|
35673
35673
|
}
|
|
35674
35674
|
handleClick() {
|
|
35675
|
-
var _a, _b;
|
|
35675
|
+
var _a, _b, _c, _d;
|
|
35676
35676
|
this.trackClick({
|
|
35677
35677
|
queryKey: this.options.queryKey,
|
|
35678
35678
|
data: {
|
|
@@ -35682,14 +35682,16 @@ let SearchResultsProductCard = class SearchResultsProductCard extends Vue$1 {
|
|
|
35682
35682
|
analytics: {
|
|
35683
35683
|
type: this.query ? "search_product_click" : "select_item",
|
|
35684
35684
|
label: this.title || this.id || this.link,
|
|
35685
|
+
listLabel: (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.labels) === null || _b === void 0 ? void 0 : _b.htmlTitleTemplate,
|
|
35685
35686
|
items: [this.product],
|
|
35686
35687
|
},
|
|
35687
35688
|
options: { allowEmptySearchQuery: true },
|
|
35688
35689
|
},
|
|
35689
35690
|
});
|
|
35690
|
-
(
|
|
35691
|
+
(_d = (_c = this.searchResultOptions.callbacks) === null || _c === void 0 ? void 0 : _c.onProductClick) === null || _d === void 0 ? void 0 : _d.call(_c, {
|
|
35691
35692
|
queryKey: this.query,
|
|
35692
35693
|
hasResults: true,
|
|
35694
|
+
productId: this.id,
|
|
35693
35695
|
});
|
|
35694
35696
|
}
|
|
35695
35697
|
handleProductEvent(item) {
|
|
@@ -36097,20 +36099,20 @@ const sendGa4AnalyticsEvent = (data, options) => {
|
|
|
36097
36099
|
const title = sendItemTitle ? (_b = data.analytics) === null || _b === void 0 ? void 0 : _b.label : undefined;
|
|
36098
36100
|
const params = {
|
|
36099
36101
|
search_text: data.searchQuery,
|
|
36100
|
-
item_title:
|
|
36101
|
-
ecommerce: parseEcommerceData(data,
|
|
36102
|
+
item_title: title,
|
|
36103
|
+
ecommerce: parseEcommerceData(data, (_c = data.analytics) === null || _c === void 0 ? void 0 : _c.listLabel),
|
|
36102
36104
|
};
|
|
36103
36105
|
window.dataLayer.push(Object.assign({ event: (_e = (_d = data.analytics) === null || _d === void 0 ? void 0 : _d.type) !== null && _e !== void 0 ? _e : options.parentEventName }, params));
|
|
36104
36106
|
};
|
|
36105
36107
|
const processDebugEvent = (data) => {
|
|
36106
|
-
var _a, _b, _c;
|
|
36108
|
+
var _a, _b, _c, _d;
|
|
36107
36109
|
const sendItemTitle = data.searchQuery !== ((_a = data.analytics) === null || _a === void 0 ? void 0 : _a.label);
|
|
36108
36110
|
const title = sendItemTitle ? (_b = data.analytics) === null || _b === void 0 ? void 0 : _b.label : undefined;
|
|
36109
36111
|
const params = {
|
|
36110
36112
|
event: (_c = data.analytics) === null || _c === void 0 ? void 0 : _c.type,
|
|
36111
36113
|
search_text: data.searchQuery,
|
|
36112
36114
|
item_title: title,
|
|
36113
|
-
ecommerce: parseEcommerceData(data,
|
|
36115
|
+
ecommerce: parseEcommerceData(data, (_d = data.analytics) === null || _d === void 0 ? void 0 : _d.listLabel),
|
|
36114
36116
|
};
|
|
36115
36117
|
console.debug("Analytics debug event:", params);
|
|
36116
36118
|
};
|
|
@@ -36207,11 +36209,14 @@ __decorate([
|
|
|
36207
36209
|
__decorate([
|
|
36208
36210
|
params$9.Getter("query")
|
|
36209
36211
|
], AdditionalPanels$1.prototype, "query", void 0);
|
|
36212
|
+
__decorate([
|
|
36213
|
+
params$9.Getter("searchString")
|
|
36214
|
+
], AdditionalPanels$1.prototype, "searchString", void 0);
|
|
36210
36215
|
__decorate([
|
|
36211
36216
|
options$6.State((o) => o.searchResultOptions)
|
|
36212
36217
|
], AdditionalPanels$1.prototype, "searchResultOptions", void 0);
|
|
36213
36218
|
__decorate([
|
|
36214
|
-
Watch("
|
|
36219
|
+
Watch("searchString")
|
|
36215
36220
|
], AdditionalPanels$1.prototype, "handleQueryChange", null);
|
|
36216
36221
|
AdditionalPanels$1 = __decorate([
|
|
36217
36222
|
Component({
|
|
@@ -38488,6 +38493,7 @@ let SearchResults = class SearchResults extends Vue$1 {
|
|
|
38488
38493
|
analytics: {
|
|
38489
38494
|
type: "view_item_list",
|
|
38490
38495
|
label: title,
|
|
38496
|
+
listLabel: title,
|
|
38491
38497
|
items,
|
|
38492
38498
|
},
|
|
38493
38499
|
options: { allowEmptySearchQuery: true },
|