@salla.sa/twilight-components 2.11.82 → 2.11.84
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_37.cjs.entry.js +10 -5
- package/dist/collection/components/salla-gifting/salla-gifting.js +5 -2
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +3 -2
- package/dist/components/salla-gifting.js +5 -2
- package/dist/components/salla-quick-buy2.js +5 -3
- package/dist/esm/salla-button_37.entry.js +10 -5
- package/dist/esm-es5/salla-button_37.entry.js +1 -1
- package/dist/twilight/p-2845b9fd.system.js +1 -1
- package/dist/twilight/{p-7251f1e7.entry.js → p-31871b97.entry.js} +1 -1
- package/dist/twilight/{p-f201f06c.system.entry.js → p-a6a5e6bc.system.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-gifting/intefaces.d.ts +1 -0
- package/package.json +3 -3
|
@@ -21298,7 +21298,9 @@ const SallaGifting = class {
|
|
|
21298
21298
|
};
|
|
21299
21299
|
}
|
|
21300
21300
|
async submitForm() {
|
|
21301
|
-
var _a;
|
|
21301
|
+
var _a, _b;
|
|
21302
|
+
// @ts-ignore
|
|
21303
|
+
const donatingAmount = (_a = document.querySelector('#donating-amount')) === null || _a === void 0 ? void 0 : _a.value;
|
|
21302
21304
|
this.calendarFormGroup.classList.remove('s-form-has-error');
|
|
21303
21305
|
if (!!this.errors) {
|
|
21304
21306
|
this.errors = {};
|
|
@@ -21313,7 +21315,8 @@ const SallaGifting = class {
|
|
|
21313
21315
|
sender_name: this.senderName,
|
|
21314
21316
|
quantity: this.quantity,
|
|
21315
21317
|
deliver_at: this.showCalendar ? this.deliveryDate : null,
|
|
21316
|
-
image_url: (
|
|
21318
|
+
image_url: (_b = this.uploadedImage) !== null && _b !== void 0 ? _b : this.selectedImage,
|
|
21319
|
+
donation_amount: donatingAmount ? donatingAmount : null,
|
|
21317
21320
|
receiver: {
|
|
21318
21321
|
name: this.receiverName,
|
|
21319
21322
|
country_code: this.receiverCountryCode,
|
|
@@ -25998,7 +26001,8 @@ window.SallaApplePay = {
|
|
|
25998
26001
|
}))
|
|
25999
26002
|
};
|
|
26000
26003
|
|
|
26001
|
-
|
|
26004
|
+
//applePay doesn't allow iframes
|
|
26005
|
+
if (window.ApplePaySession && undefined.self === undefined.top && ApplePaySession.canMakePayments()) {
|
|
26002
26006
|
SallaApplePay.init();
|
|
26003
26007
|
} else {
|
|
26004
26008
|
// You can hide the Apple Pay button easy with add data-show-if-apple-pay-supported to element like <div data-show-if-apple-pay-supported>
|
|
@@ -26147,11 +26151,12 @@ const SallaQuickBuy = class {
|
|
|
26147
26151
|
this.currency = response.data.base_currency_price.currency;
|
|
26148
26152
|
});
|
|
26149
26153
|
}
|
|
26150
|
-
|
|
26154
|
+
let isNotIframe = window.self !== window.top;
|
|
26155
|
+
this.isApplePayActive = isNotIframe && ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments())
|
|
26151
26156
|
&& ((_b = salla.config.get('store.settings.payments')) === null || _b === void 0 ? void 0 : _b.includes('apple_pay'));
|
|
26152
26157
|
let applePaySdk = document.getElementById('apple-pay-sdk');
|
|
26153
26158
|
if (applePaySdk || !this.isApplePayActive) {
|
|
26154
|
-
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : 'is not available in the browser'));
|
|
26159
|
+
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : (isNotIframe ? 'is not available in the browser' : 'is iframe')));
|
|
26155
26160
|
resolve(true);
|
|
26156
26161
|
return;
|
|
26157
26162
|
}
|
|
@@ -280,7 +280,9 @@ export class SallaGifting {
|
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
async submitForm() {
|
|
283
|
-
var _a;
|
|
283
|
+
var _a, _b;
|
|
284
|
+
// @ts-ignore
|
|
285
|
+
const donatingAmount = (_a = document.querySelector('#donating-amount')) === null || _a === void 0 ? void 0 : _a.value;
|
|
284
286
|
this.calendarFormGroup.classList.remove('s-form-has-error');
|
|
285
287
|
if (!!this.errors) {
|
|
286
288
|
this.errors = {};
|
|
@@ -295,7 +297,8 @@ export class SallaGifting {
|
|
|
295
297
|
sender_name: this.senderName,
|
|
296
298
|
quantity: this.quantity,
|
|
297
299
|
deliver_at: this.showCalendar ? this.deliveryDate : null,
|
|
298
|
-
image_url: (
|
|
300
|
+
image_url: (_b = this.uploadedImage) !== null && _b !== void 0 ? _b : this.selectedImage,
|
|
301
|
+
donation_amount: donatingAmount ? donatingAmount : null,
|
|
299
302
|
receiver: {
|
|
300
303
|
name: this.receiverName,
|
|
301
304
|
country_code: this.receiverCountryCode,
|
|
@@ -143,11 +143,12 @@ export class SallaQuickBuy {
|
|
|
143
143
|
this.currency = response.data.base_currency_price.currency;
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
let isNotIframe = window.self !== window.top;
|
|
147
|
+
this.isApplePayActive = isNotIframe && ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments())
|
|
147
148
|
&& ((_b = salla.config.get('store.settings.payments')) === null || _b === void 0 ? void 0 : _b.includes('apple_pay'));
|
|
148
149
|
let applePaySdk = document.getElementById('apple-pay-sdk');
|
|
149
150
|
if (applePaySdk || !this.isApplePayActive) {
|
|
150
|
-
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : 'is not available in the browser'));
|
|
151
|
+
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : (isNotIframe ? 'is not available in the browser' : 'is iframe')));
|
|
151
152
|
resolve(true);
|
|
152
153
|
return;
|
|
153
154
|
}
|
|
@@ -312,7 +312,9 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
async submitForm() {
|
|
315
|
-
var _a;
|
|
315
|
+
var _a, _b;
|
|
316
|
+
// @ts-ignore
|
|
317
|
+
const donatingAmount = (_a = document.querySelector('#donating-amount')) === null || _a === void 0 ? void 0 : _a.value;
|
|
316
318
|
this.calendarFormGroup.classList.remove('s-form-has-error');
|
|
317
319
|
if (!!this.errors) {
|
|
318
320
|
this.errors = {};
|
|
@@ -327,7 +329,8 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
327
329
|
sender_name: this.senderName,
|
|
328
330
|
quantity: this.quantity,
|
|
329
331
|
deliver_at: this.showCalendar ? this.deliveryDate : null,
|
|
330
|
-
image_url: (
|
|
332
|
+
image_url: (_b = this.uploadedImage) !== null && _b !== void 0 ? _b : this.selectedImage,
|
|
333
|
+
donation_amount: donatingAmount ? donatingAmount : null,
|
|
331
334
|
receiver: {
|
|
332
335
|
name: this.receiverName,
|
|
333
336
|
country_code: this.receiverCountryCode,
|
|
@@ -2396,7 +2396,8 @@ window.SallaApplePay = {
|
|
|
2396
2396
|
}))
|
|
2397
2397
|
};
|
|
2398
2398
|
|
|
2399
|
-
|
|
2399
|
+
//applePay doesn't allow iframes
|
|
2400
|
+
if (window.ApplePaySession && undefined.self === undefined.top && ApplePaySession.canMakePayments()) {
|
|
2400
2401
|
SallaApplePay.init();
|
|
2401
2402
|
} else {
|
|
2402
2403
|
// You can hide the Apple Pay button easy with add data-show-if-apple-pay-supported to element like <div data-show-if-apple-pay-supported>
|
|
@@ -2546,11 +2547,12 @@ const SallaQuickBuy = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
2546
2547
|
this.currency = response.data.base_currency_price.currency;
|
|
2547
2548
|
});
|
|
2548
2549
|
}
|
|
2549
|
-
|
|
2550
|
+
let isNotIframe = window.self !== window.top;
|
|
2551
|
+
this.isApplePayActive = isNotIframe && ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments())
|
|
2550
2552
|
&& ((_b = salla.config.get('store.settings.payments')) === null || _b === void 0 ? void 0 : _b.includes('apple_pay'));
|
|
2551
2553
|
let applePaySdk = document.getElementById('apple-pay-sdk');
|
|
2552
2554
|
if (applePaySdk || !this.isApplePayActive) {
|
|
2553
|
-
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : 'is not available in the browser'));
|
|
2555
|
+
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : (isNotIframe ? 'is not available in the browser' : 'is iframe')));
|
|
2554
2556
|
resolve(true);
|
|
2555
2557
|
return;
|
|
2556
2558
|
}
|
|
@@ -21294,7 +21294,9 @@ const SallaGifting = class {
|
|
|
21294
21294
|
};
|
|
21295
21295
|
}
|
|
21296
21296
|
async submitForm() {
|
|
21297
|
-
var _a;
|
|
21297
|
+
var _a, _b;
|
|
21298
|
+
// @ts-ignore
|
|
21299
|
+
const donatingAmount = (_a = document.querySelector('#donating-amount')) === null || _a === void 0 ? void 0 : _a.value;
|
|
21298
21300
|
this.calendarFormGroup.classList.remove('s-form-has-error');
|
|
21299
21301
|
if (!!this.errors) {
|
|
21300
21302
|
this.errors = {};
|
|
@@ -21309,7 +21311,8 @@ const SallaGifting = class {
|
|
|
21309
21311
|
sender_name: this.senderName,
|
|
21310
21312
|
quantity: this.quantity,
|
|
21311
21313
|
deliver_at: this.showCalendar ? this.deliveryDate : null,
|
|
21312
|
-
image_url: (
|
|
21314
|
+
image_url: (_b = this.uploadedImage) !== null && _b !== void 0 ? _b : this.selectedImage,
|
|
21315
|
+
donation_amount: donatingAmount ? donatingAmount : null,
|
|
21313
21316
|
receiver: {
|
|
21314
21317
|
name: this.receiverName,
|
|
21315
21318
|
country_code: this.receiverCountryCode,
|
|
@@ -25994,7 +25997,8 @@ window.SallaApplePay = {
|
|
|
25994
25997
|
}))
|
|
25995
25998
|
};
|
|
25996
25999
|
|
|
25997
|
-
|
|
26000
|
+
//applePay doesn't allow iframes
|
|
26001
|
+
if (window.ApplePaySession && undefined.self === undefined.top && ApplePaySession.canMakePayments()) {
|
|
25998
26002
|
SallaApplePay.init();
|
|
25999
26003
|
} else {
|
|
26000
26004
|
// You can hide the Apple Pay button easy with add data-show-if-apple-pay-supported to element like <div data-show-if-apple-pay-supported>
|
|
@@ -26143,11 +26147,12 @@ const SallaQuickBuy = class {
|
|
|
26143
26147
|
this.currency = response.data.base_currency_price.currency;
|
|
26144
26148
|
});
|
|
26145
26149
|
}
|
|
26146
|
-
|
|
26150
|
+
let isNotIframe = window.self !== window.top;
|
|
26151
|
+
this.isApplePayActive = isNotIframe && ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments())
|
|
26147
26152
|
&& ((_b = salla.config.get('store.settings.payments')) === null || _b === void 0 ? void 0 : _b.includes('apple_pay'));
|
|
26148
26153
|
let applePaySdk = document.getElementById('apple-pay-sdk');
|
|
26149
26154
|
if (applePaySdk || !this.isApplePayActive) {
|
|
26150
|
-
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : 'is not available in the browser'));
|
|
26155
|
+
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : (isNotIframe ? 'is not available in the browser' : 'is iframe')));
|
|
26151
26156
|
resolve(true);
|
|
26152
26157
|
return;
|
|
26153
26158
|
}
|