@salla.sa/twilight-components 2.11.43 → 2.11.45
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/salla-button_36.cjs.entry.js +8 -0
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +8 -0
- package/dist/components/salla-loyalty.js +8 -0
- package/dist/esm/salla-button_36.entry.js +8 -0
- package/dist/esm-es5/salla-button_36.entry.js +1 -1
- package/dist/twilight/p-9fda3312.system.js +1 -1
- package/dist/twilight/{p-5ebad3ab.system.entry.js → p-c221811f.system.entry.js} +5 -5
- package/dist/twilight/{p-157001d7.entry.js → p-c247d3b2.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +4 -4
|
@@ -21953,6 +21953,11 @@ const SallaLoyalty = class {
|
|
|
21953
21953
|
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
21954
21954
|
this.translationLoaded = true;
|
|
21955
21955
|
});
|
|
21956
|
+
salla.cart.event.onUpdated(cart => {
|
|
21957
|
+
var _a, _b;
|
|
21958
|
+
this.prizePoints = (_a = cart.loyalty.prize) === null || _a === void 0 ? void 0 : _a.points;
|
|
21959
|
+
this.prizeTitle = (_b = cart.loyalty.prize) === null || _b === void 0 ? void 0 : _b.title;
|
|
21960
|
+
});
|
|
21956
21961
|
}
|
|
21957
21962
|
setSelectedPrizeItem(item) {
|
|
21958
21963
|
var _a;
|
|
@@ -22053,6 +22058,9 @@ const SallaLoyalty = class {
|
|
|
22053
22058
|
var _a, _b, _c, _d;
|
|
22054
22059
|
this.prizePoints = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.prize) === null || _b === void 0 ? void 0 : _b.points;
|
|
22055
22060
|
this.prizeTitle = (_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.prize) === null || _d === void 0 ? void 0 : _d.title;
|
|
22061
|
+
if (this.selectedItem.key == "FREE_PRODUCT" && salla.url.is_page('cart')) {
|
|
22062
|
+
window.location.reload();
|
|
22063
|
+
}
|
|
22056
22064
|
})
|
|
22057
22065
|
.catch(e => console.log(e))
|
|
22058
22066
|
.finally(() => {
|
|
@@ -50,6 +50,11 @@ export class SallaLoyalty {
|
|
|
50
50
|
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
51
51
|
this.translationLoaded = true;
|
|
52
52
|
});
|
|
53
|
+
salla.cart.event.onUpdated(cart => {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
this.prizePoints = (_a = cart.loyalty.prize) === null || _a === void 0 ? void 0 : _a.points;
|
|
56
|
+
this.prizeTitle = (_b = cart.loyalty.prize) === null || _b === void 0 ? void 0 : _b.title;
|
|
57
|
+
});
|
|
53
58
|
}
|
|
54
59
|
setSelectedPrizeItem(item) {
|
|
55
60
|
var _a;
|
|
@@ -183,6 +188,9 @@ export class SallaLoyalty {
|
|
|
183
188
|
var _a, _b, _c, _d;
|
|
184
189
|
this.prizePoints = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.prize) === null || _b === void 0 ? void 0 : _b.points;
|
|
185
190
|
this.prizeTitle = (_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.prize) === null || _d === void 0 ? void 0 : _d.title;
|
|
191
|
+
if (this.selectedItem.key == "FREE_PRODUCT" && salla.url.is_page('cart')) {
|
|
192
|
+
window.location.reload();
|
|
193
|
+
}
|
|
186
194
|
})
|
|
187
195
|
.catch(e => console.log(e))
|
|
188
196
|
.finally(() => {
|
|
@@ -111,6 +111,11 @@ const SallaLoyalty$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
111
111
|
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
112
112
|
this.translationLoaded = true;
|
|
113
113
|
});
|
|
114
|
+
salla.cart.event.onUpdated(cart => {
|
|
115
|
+
var _a, _b;
|
|
116
|
+
this.prizePoints = (_a = cart.loyalty.prize) === null || _a === void 0 ? void 0 : _a.points;
|
|
117
|
+
this.prizeTitle = (_b = cart.loyalty.prize) === null || _b === void 0 ? void 0 : _b.title;
|
|
118
|
+
});
|
|
114
119
|
}
|
|
115
120
|
setSelectedPrizeItem(item) {
|
|
116
121
|
var _a;
|
|
@@ -211,6 +216,9 @@ const SallaLoyalty$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
211
216
|
var _a, _b, _c, _d;
|
|
212
217
|
this.prizePoints = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.prize) === null || _b === void 0 ? void 0 : _b.points;
|
|
213
218
|
this.prizeTitle = (_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.prize) === null || _d === void 0 ? void 0 : _d.title;
|
|
219
|
+
if (this.selectedItem.key == "FREE_PRODUCT" && salla.url.is_page('cart')) {
|
|
220
|
+
window.location.reload();
|
|
221
|
+
}
|
|
214
222
|
})
|
|
215
223
|
.catch(e => console.log(e))
|
|
216
224
|
.finally(() => {
|
|
@@ -21949,6 +21949,11 @@ const SallaLoyalty = class {
|
|
|
21949
21949
|
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
21950
21950
|
this.translationLoaded = true;
|
|
21951
21951
|
});
|
|
21952
|
+
salla.cart.event.onUpdated(cart => {
|
|
21953
|
+
var _a, _b;
|
|
21954
|
+
this.prizePoints = (_a = cart.loyalty.prize) === null || _a === void 0 ? void 0 : _a.points;
|
|
21955
|
+
this.prizeTitle = (_b = cart.loyalty.prize) === null || _b === void 0 ? void 0 : _b.title;
|
|
21956
|
+
});
|
|
21952
21957
|
}
|
|
21953
21958
|
setSelectedPrizeItem(item) {
|
|
21954
21959
|
var _a;
|
|
@@ -22049,6 +22054,9 @@ const SallaLoyalty = class {
|
|
|
22049
22054
|
var _a, _b, _c, _d;
|
|
22050
22055
|
this.prizePoints = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.prize) === null || _b === void 0 ? void 0 : _b.points;
|
|
22051
22056
|
this.prizeTitle = (_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.prize) === null || _d === void 0 ? void 0 : _d.title;
|
|
22057
|
+
if (this.selectedItem.key == "FREE_PRODUCT" && salla.url.is_page('cart')) {
|
|
22058
|
+
window.location.reload();
|
|
22059
|
+
}
|
|
22052
22060
|
})
|
|
22053
22061
|
.catch(e => console.log(e))
|
|
22054
22062
|
.finally(() => {
|