@salla.sa/twilight-components 2.11.82 → 2.11.83
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 +5 -3
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +3 -2
- package/dist/components/salla-quick-buy2.js +5 -3
- package/dist/esm/salla-button_37.entry.js +5 -3
- 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-8e030b88.entry.js} +1 -1
- package/dist/twilight/{p-f201f06c.system.entry.js → p-c3b17cfd.system.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +3 -3
|
@@ -25998,7 +25998,8 @@ window.SallaApplePay = {
|
|
|
25998
25998
|
}))
|
|
25999
25999
|
};
|
|
26000
26000
|
|
|
26001
|
-
|
|
26001
|
+
//applePay doesn't allow iframes
|
|
26002
|
+
if (window.ApplePaySession && undefined.self === undefined.top && ApplePaySession.canMakePayments()) {
|
|
26002
26003
|
SallaApplePay.init();
|
|
26003
26004
|
} else {
|
|
26004
26005
|
// 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 +26148,12 @@ const SallaQuickBuy = class {
|
|
|
26147
26148
|
this.currency = response.data.base_currency_price.currency;
|
|
26148
26149
|
});
|
|
26149
26150
|
}
|
|
26150
|
-
|
|
26151
|
+
let isNotIframe = window.self !== window.top;
|
|
26152
|
+
this.isApplePayActive = isNotIframe && ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments())
|
|
26151
26153
|
&& ((_b = salla.config.get('store.settings.payments')) === null || _b === void 0 ? void 0 : _b.includes('apple_pay'));
|
|
26152
26154
|
let applePaySdk = document.getElementById('apple-pay-sdk');
|
|
26153
26155
|
if (applePaySdk || !this.isApplePayActive) {
|
|
26154
|
-
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : 'is not available in the browser'));
|
|
26156
|
+
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : (isNotIframe ? 'is not available in the browser' : 'is iframe')));
|
|
26155
26157
|
resolve(true);
|
|
26156
26158
|
return;
|
|
26157
26159
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -25994,7 +25994,8 @@ window.SallaApplePay = {
|
|
|
25994
25994
|
}))
|
|
25995
25995
|
};
|
|
25996
25996
|
|
|
25997
|
-
|
|
25997
|
+
//applePay doesn't allow iframes
|
|
25998
|
+
if (window.ApplePaySession && undefined.self === undefined.top && ApplePaySession.canMakePayments()) {
|
|
25998
25999
|
SallaApplePay.init();
|
|
25999
26000
|
} else {
|
|
26000
26001
|
// 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 +26144,12 @@ const SallaQuickBuy = class {
|
|
|
26143
26144
|
this.currency = response.data.base_currency_price.currency;
|
|
26144
26145
|
});
|
|
26145
26146
|
}
|
|
26146
|
-
|
|
26147
|
+
let isNotIframe = window.self !== window.top;
|
|
26148
|
+
this.isApplePayActive = isNotIframe && ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments())
|
|
26147
26149
|
&& ((_b = salla.config.get('store.settings.payments')) === null || _b === void 0 ? void 0 : _b.includes('apple_pay'));
|
|
26148
26150
|
let applePaySdk = document.getElementById('apple-pay-sdk');
|
|
26149
26151
|
if (applePaySdk || !this.isApplePayActive) {
|
|
26150
|
-
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : 'is not available in the browser'));
|
|
26152
|
+
salla.logger.warn('🍏 Pay: Skipped load apple pay because ' + (applePaySdk ? 'already loaded' : (isNotIframe ? 'is not available in the browser' : 'is iframe')));
|
|
26151
26153
|
resolve(true);
|
|
26152
26154
|
return;
|
|
26153
26155
|
}
|