@economist/web-apple-pay 1.7.8 → 1.7.9
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/index.js
CHANGED
|
@@ -1120,7 +1120,7 @@ var isAppleDeviceOrSafari = () => {
|
|
|
1120
1120
|
const isSafariBrowser = navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") === -1;
|
|
1121
1121
|
return isIOSOrMacTouchDevice || isSafariBrowser;
|
|
1122
1122
|
};
|
|
1123
|
-
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null
|
|
1123
|
+
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null;
|
|
1124
1124
|
var isApplePayAvailable = async () => {
|
|
1125
1125
|
if (bypassApplePayChecks()) {
|
|
1126
1126
|
return true;
|
|
@@ -2040,9 +2040,9 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2040
2040
|
// ─── Render pipeline ────────────────────────────────────────────────────────
|
|
2041
2041
|
async #run() {
|
|
2042
2042
|
try {
|
|
2043
|
+
this.#renderTemplate();
|
|
2043
2044
|
if (await this.#checkAvailability()) return;
|
|
2044
2045
|
if (this.#checkOffer()) return;
|
|
2045
|
-
this.#renderTemplate();
|
|
2046
2046
|
if (await this.#checkSession()) return;
|
|
2047
2047
|
this.#captureReturnUrl();
|
|
2048
2048
|
this.#computeBillingCountries();
|
|
@@ -2060,6 +2060,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2060
2060
|
const available = await isApplePayAvailable();
|
|
2061
2061
|
if (!available) {
|
|
2062
2062
|
this.style.display = "none";
|
|
2063
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2063
2064
|
return true;
|
|
2064
2065
|
}
|
|
2065
2066
|
return false;
|
|
@@ -2081,6 +2082,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2081
2082
|
#checkOffer() {
|
|
2082
2083
|
if (!this.#offer) {
|
|
2083
2084
|
this.style.display = "none";
|
|
2085
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2084
2086
|
return true;
|
|
2085
2087
|
}
|
|
2086
2088
|
return false;
|
|
@@ -1115,7 +1115,7 @@ var isAppleDeviceOrSafari = () => {
|
|
|
1115
1115
|
const isSafariBrowser = navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") === -1;
|
|
1116
1116
|
return isIOSOrMacTouchDevice || isSafariBrowser;
|
|
1117
1117
|
};
|
|
1118
|
-
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null
|
|
1118
|
+
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null;
|
|
1119
1119
|
var isApplePayAvailable = async () => {
|
|
1120
1120
|
if (bypassApplePayChecks()) {
|
|
1121
1121
|
return true;
|
|
@@ -2035,9 +2035,9 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2035
2035
|
// ─── Render pipeline ────────────────────────────────────────────────────────
|
|
2036
2036
|
async #run() {
|
|
2037
2037
|
try {
|
|
2038
|
+
this.#renderTemplate();
|
|
2038
2039
|
if (await this.#checkAvailability()) return;
|
|
2039
2040
|
if (this.#checkOffer()) return;
|
|
2040
|
-
this.#renderTemplate();
|
|
2041
2041
|
if (await this.#checkSession()) return;
|
|
2042
2042
|
this.#captureReturnUrl();
|
|
2043
2043
|
this.#computeBillingCountries();
|
|
@@ -2055,6 +2055,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2055
2055
|
const available = await isApplePayAvailable();
|
|
2056
2056
|
if (!available) {
|
|
2057
2057
|
this.style.display = "none";
|
|
2058
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2058
2059
|
return true;
|
|
2059
2060
|
}
|
|
2060
2061
|
return false;
|
|
@@ -2076,6 +2077,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2076
2077
|
#checkOffer() {
|
|
2077
2078
|
if (!this.#offer) {
|
|
2078
2079
|
this.style.display = "none";
|
|
2080
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2079
2081
|
return true;
|
|
2080
2082
|
}
|
|
2081
2083
|
return false;
|
|
@@ -1123,7 +1123,7 @@ var isAppleDeviceOrSafari = () => {
|
|
|
1123
1123
|
const isSafariBrowser = navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") === -1;
|
|
1124
1124
|
return isIOSOrMacTouchDevice || isSafariBrowser;
|
|
1125
1125
|
};
|
|
1126
|
-
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null
|
|
1126
|
+
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null;
|
|
1127
1127
|
var isApplePayAvailable = async () => {
|
|
1128
1128
|
if (bypassApplePayChecks()) {
|
|
1129
1129
|
return true;
|
|
@@ -2043,9 +2043,9 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2043
2043
|
// ─── Render pipeline ────────────────────────────────────────────────────────
|
|
2044
2044
|
async #run() {
|
|
2045
2045
|
try {
|
|
2046
|
+
this.#renderTemplate();
|
|
2046
2047
|
if (await this.#checkAvailability()) return;
|
|
2047
2048
|
if (this.#checkOffer()) return;
|
|
2048
|
-
this.#renderTemplate();
|
|
2049
2049
|
if (await this.#checkSession()) return;
|
|
2050
2050
|
this.#captureReturnUrl();
|
|
2051
2051
|
this.#computeBillingCountries();
|
|
@@ -2063,6 +2063,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2063
2063
|
const available = await isApplePayAvailable();
|
|
2064
2064
|
if (!available) {
|
|
2065
2065
|
this.style.display = "none";
|
|
2066
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2066
2067
|
return true;
|
|
2067
2068
|
}
|
|
2068
2069
|
return false;
|
|
@@ -2084,6 +2085,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2084
2085
|
#checkOffer() {
|
|
2085
2086
|
if (!this.#offer) {
|
|
2086
2087
|
this.style.display = "none";
|
|
2088
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2087
2089
|
return true;
|
|
2088
2090
|
}
|
|
2089
2091
|
return false;
|
|
@@ -1115,7 +1115,7 @@ var isAppleDeviceOrSafari = () => {
|
|
|
1115
1115
|
const isSafariBrowser = navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") === -1;
|
|
1116
1116
|
return isIOSOrMacTouchDevice || isSafariBrowser;
|
|
1117
1117
|
};
|
|
1118
|
-
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null
|
|
1118
|
+
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null;
|
|
1119
1119
|
var isApplePayAvailable = async () => {
|
|
1120
1120
|
if (bypassApplePayChecks()) {
|
|
1121
1121
|
return true;
|
|
@@ -2035,9 +2035,9 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2035
2035
|
// ─── Render pipeline ────────────────────────────────────────────────────────
|
|
2036
2036
|
async #run() {
|
|
2037
2037
|
try {
|
|
2038
|
+
this.#renderTemplate();
|
|
2038
2039
|
if (await this.#checkAvailability()) return;
|
|
2039
2040
|
if (this.#checkOffer()) return;
|
|
2040
|
-
this.#renderTemplate();
|
|
2041
2041
|
if (await this.#checkSession()) return;
|
|
2042
2042
|
this.#captureReturnUrl();
|
|
2043
2043
|
this.#computeBillingCountries();
|
|
@@ -2055,6 +2055,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2055
2055
|
const available = await isApplePayAvailable();
|
|
2056
2056
|
if (!available) {
|
|
2057
2057
|
this.style.display = "none";
|
|
2058
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2058
2059
|
return true;
|
|
2059
2060
|
}
|
|
2060
2061
|
return false;
|
|
@@ -2076,6 +2077,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2076
2077
|
#checkOffer() {
|
|
2077
2078
|
if (!this.#offer) {
|
|
2078
2079
|
this.style.display = "none";
|
|
2080
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2079
2081
|
return true;
|
|
2080
2082
|
}
|
|
2081
2083
|
return false;
|
|
@@ -8,7 +8,7 @@ var isAppleDeviceOrSafari = () => {
|
|
|
8
8
|
const isSafariBrowser = navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") === -1;
|
|
9
9
|
return isIOSOrMacTouchDevice || isSafariBrowser;
|
|
10
10
|
};
|
|
11
|
-
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null
|
|
11
|
+
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null;
|
|
12
12
|
var isApplePayAvailable = async () => {
|
|
13
13
|
if (bypassApplePayChecks()) {
|
|
14
14
|
return true;
|
package/dist/src/index.js
CHANGED
|
@@ -1120,7 +1120,7 @@ var isAppleDeviceOrSafari = () => {
|
|
|
1120
1120
|
const isSafariBrowser = navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") === -1;
|
|
1121
1121
|
return isIOSOrMacTouchDevice || isSafariBrowser;
|
|
1122
1122
|
};
|
|
1123
|
-
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null
|
|
1123
|
+
var bypassApplePayChecks = () => new URLSearchParams(window.location.search).get("BYPASS_APPLE_PAY_CHECKS") !== null;
|
|
1124
1124
|
var isApplePayAvailable = async () => {
|
|
1125
1125
|
if (bypassApplePayChecks()) {
|
|
1126
1126
|
return true;
|
|
@@ -2040,9 +2040,9 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2040
2040
|
// ─── Render pipeline ────────────────────────────────────────────────────────
|
|
2041
2041
|
async #run() {
|
|
2042
2042
|
try {
|
|
2043
|
+
this.#renderTemplate();
|
|
2043
2044
|
if (await this.#checkAvailability()) return;
|
|
2044
2045
|
if (this.#checkOffer()) return;
|
|
2045
|
-
this.#renderTemplate();
|
|
2046
2046
|
if (await this.#checkSession()) return;
|
|
2047
2047
|
this.#captureReturnUrl();
|
|
2048
2048
|
this.#computeBillingCountries();
|
|
@@ -2060,6 +2060,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2060
2060
|
const available = await isApplePayAvailable();
|
|
2061
2061
|
if (!available) {
|
|
2062
2062
|
this.style.display = "none";
|
|
2063
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2063
2064
|
return true;
|
|
2064
2065
|
}
|
|
2065
2066
|
return false;
|
|
@@ -2081,6 +2082,7 @@ var ApplePayButton = class _ApplePayButton extends HTMLElement {
|
|
|
2081
2082
|
#checkOffer() {
|
|
2082
2083
|
if (!this.#offer) {
|
|
2083
2084
|
this.style.display = "none";
|
|
2085
|
+
this.querySelector(SEL_CONTAINER)?.remove();
|
|
2084
2086
|
return true;
|
|
2085
2087
|
}
|
|
2086
2088
|
return false;
|