@zonos/elements 1.3.62 → 1.3.64
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/{CheckoutConfig-4d03e084.js → CheckoutConfig-2fef694e.js} +1 -1
- package/dist/cjs/{cart-dee65a87.js → cart-285b3c4a.js} +1 -1
- package/dist/cjs/{createCustomEvent-b19ee73d.js → createCustomEvent-0fff9307.js} +2 -2
- package/dist/cjs/{handleFetch-c0e07666.js → handleFetch-661a8225.js} +3 -1
- package/dist/cjs/index.cjs.js +11 -9
- package/dist/cjs/{paypal-d4a21b6a.js → paypal-2788afc2.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-badge_13.cjs.entry.js +4 -4
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +13 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
- package/dist/collection/components/main/zonos-controller.js +11 -2
- package/dist/collection/components/utils/handleFetch.js +3 -1
- package/dist/collection/scripts/_checkIfLoadVersionDomain.js +1 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +19 -0
- package/dist/collection/scripts/_zonosBase.js +1 -0
- package/dist/esm/{CheckoutConfig-7fe6442e.js → CheckoutConfig-c7954c2a.js} +1 -1
- package/dist/esm/{cart-a875cea7.js → cart-7faa064c.js} +1 -1
- package/dist/esm/{createCustomEvent-0ff4506c.js → createCustomEvent-4a02c0ac.js} +2 -2
- package/dist/esm/{handleFetch-613fbc00.js → handleFetch-80ecfb91.js} +3 -1
- package/dist/esm/index.js +12 -10
- package/dist/esm/{paypal-1eab776e.js → paypal-82c6849e.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +2 -2
- package/dist/esm/zonos-badge_13.entry.js +4 -4
- package/dist/esm/zonos-checkout.entry.js +5 -5
- package/dist/esm/zonos-controller.entry.js +13 -4
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +3 -3
- package/dist/esm-es5/{CheckoutConfig-7fe6442e.js → CheckoutConfig-c7954c2a.js} +1 -1
- package/dist/esm-es5/{cart-a875cea7.js → cart-7faa064c.js} +1 -1
- package/dist/esm-es5/{createCustomEvent-0ff4506c.js → createCustomEvent-4a02c0ac.js} +1 -1
- package/dist/esm-es5/{handleFetch-613fbc00.js → handleFetch-80ecfb91.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-1eab776e.js → paypal-82c6849e.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/scripts/index.d.ts +2 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/scripts/_getZonosQaUrl.d.ts +4 -0
- package/dist/types/scripts/_zonosBase.d.ts +2 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-27f40576.system.js → p-0a244ae4.system.js} +1 -1
- package/dist/zonos-elements/{p-9c50823c.entry.js → p-105aa0dc.entry.js} +1 -1
- package/dist/zonos-elements/p-1c0d88c8.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4a8753ca.js → p-258e7d86.js} +1 -1
- package/dist/zonos-elements/{p-bf53c6aa.system.js → p-2d8c8aaa.system.js} +1 -1
- package/dist/zonos-elements/{p-fb59c3c3.js → p-2ec2e9d3.js} +1 -1
- package/dist/zonos-elements/{p-fbeef2f8.entry.js → p-3398ea06.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1386fff.system.entry.js → p-356902d8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3fbb3f57.system.entry.js → p-3a372740.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e04581f4.entry.js → p-3c091f1c.entry.js} +1 -1
- package/dist/zonos-elements/{p-0864b21c.js → p-4032c20e.js} +2 -2
- package/dist/zonos-elements/{p-9fed08ac.entry.js → p-48f58daa.entry.js} +1 -1
- package/dist/zonos-elements/p-5b6ec037.entry.js +1 -0
- package/dist/zonos-elements/{p-6c05299c.system.entry.js → p-5fa5f38a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e89289ba.system.entry.js → p-5faed746.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f9c2288f.js → p-6b3fd741.js} +1 -1
- package/dist/zonos-elements/{p-e58e5939.entry.js → p-7bb76ba6.entry.js} +1 -1
- package/dist/zonos-elements/{p-1df63802.system.js → p-81cdd0d5.system.js} +1 -1
- package/dist/zonos-elements/{p-15b5200b.entry.js → p-8a063c3b.entry.js} +1 -1
- package/dist/zonos-elements/{p-8d59de18.system.entry.js → p-8b232685.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a170d7cc.entry.js → p-98d5536c.entry.js} +1 -1
- package/dist/zonos-elements/{p-ec4c219a.entry.js → p-a22b23c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-396fd3eb.system.entry.js → p-bca6a1a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c0b5743.system.js → p-c1b1aa28.system.js} +1 -1
- package/dist/zonos-elements/{p-e89c2805.system.js → p-c4957e35.system.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-5ab7d154.system.entry.js → p-dc242eff.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5e5045a6.system.entry.js → p-de550231.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-944ef745.entry.js → p-e3e9a857.entry.js} +1 -1
- package/dist/zonos-elements/p-e46339af.system.js +1 -0
- package/dist/zonos-elements/{p-8a259a5c.system.entry.js → p-e8fdb980.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b7ff0fb5.js → p-f28d1cb2.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-3fd2ef71.system.js +0 -1
- package/dist/zonos-elements/p-756d4068.entry.js +0 -1
- package/dist/zonos-elements/p-81ca4089.system.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const handleFetch = require('./handleFetch-
|
|
3
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
4
4
|
|
|
5
5
|
const getTempCartById = async (cartId) => {
|
|
6
6
|
const { errors, json } = await handleFetch.handleFetch('/api/zonos-elements/get-temp-cart', {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
4
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
5
5
|
const isDarkColor = require('./isDarkColor-5efc8367.js');
|
|
6
6
|
const getBorderRadius = require('./getBorderRadius-5a64574c.js');
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const cart = require('./cart-
|
|
3
|
+
const cart = require('./cart-285b3c4a.js');
|
|
4
4
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
5
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
6
6
|
|
|
7
7
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
8
8
|
var _a, _b;
|
|
@@ -180,7 +180,9 @@ const encodeString = (text) => {
|
|
|
180
180
|
const handleRequest = async ({ basePathType, options, path, }) => {
|
|
181
181
|
let response;
|
|
182
182
|
// fallback to the main base API if the passed in base path is not available
|
|
183
|
-
const baseUrl =
|
|
183
|
+
const baseUrl = window.Zonos.zonosQaUrlApi ||
|
|
184
|
+
fallbackApiList[basePathType] ||
|
|
185
|
+
MAIN_BASE_API_TYPE;
|
|
184
186
|
const url = baseUrl + path;
|
|
185
187
|
// adding random encoded token to the url so that the request will be cached differently for each store
|
|
186
188
|
const modifiedUrl = new URL(url);
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
6
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
5
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
6
|
+
const CheckoutConfig = require('./CheckoutConfig-2fef694e.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -20,6 +20,7 @@ const checkIfLoadVersionDomain = ({ loadScriptSrc }) => {
|
|
|
20
20
|
const whiteListedDomains = [
|
|
21
21
|
// local domain
|
|
22
22
|
'dev.elements.zonos.com',
|
|
23
|
+
'dev.assets-checkout.zonos.com',
|
|
23
24
|
// any domain with prefix , no need to version it
|
|
24
25
|
'.js.zonos.com',
|
|
25
26
|
// vercel git domain
|
|
@@ -96,7 +97,7 @@ const getZonosQaUrl = () => {
|
|
|
96
97
|
return null;
|
|
97
98
|
}
|
|
98
99
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
99
|
-
const cdnUrl = "https://v1.3.
|
|
100
|
+
const cdnUrl = "https://v1.3.64.js.zonos.com";
|
|
100
101
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
101
102
|
if (!qaUrl &&
|
|
102
103
|
(cdnUrl.includes('test.') ||
|
|
@@ -280,10 +281,10 @@ const zonosLoadUrl = (() => {
|
|
|
280
281
|
}
|
|
281
282
|
return null;
|
|
282
283
|
})();
|
|
283
|
-
const ZONOS_URL = "https://v1.3.
|
|
284
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
285
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
286
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
284
|
+
const ZONOS_URL = "https://v1.3.64.js.zonos.com";
|
|
285
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.64";
|
|
286
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.64";
|
|
287
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.64";
|
|
287
288
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
288
289
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
289
290
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -298,14 +299,15 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
298
299
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
299
300
|
Zonos._paypalMockResponse = null;
|
|
300
301
|
Zonos.isBigCommerce = false;
|
|
301
|
-
Zonos.releaseDate = "
|
|
302
|
+
Zonos.releaseDate = "1727903724659";
|
|
302
303
|
Zonos.isLegacyCheckout = false;
|
|
303
304
|
/**
|
|
304
305
|
* By default, the package will load from npm
|
|
305
306
|
*/
|
|
306
307
|
Zonos.isNpm = true;
|
|
307
308
|
Zonos.zonosQaUrl = null;
|
|
308
|
-
Zonos.
|
|
309
|
+
Zonos.zonosQaUrlApi = null;
|
|
310
|
+
Zonos.version = `v${"1.3.64"}`;
|
|
309
311
|
Zonos.modeAlerted = false;
|
|
310
312
|
Zonos.cartData = null;
|
|
311
313
|
Zonos.paypal = null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
4
|
-
const cart = require('./cart-
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const cart = require('./cart-285b3c4a.js');
|
|
5
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-5efc8367.js');
|
|
7
7
|
|
|
8
8
|
/*!
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-285b3c4a.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
10
10
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const paypal = require('./paypal-
|
|
10
|
-
const createCustomEvent = require('./createCustomEvent-
|
|
8
|
+
const cart = require('./cart-285b3c4a.js');
|
|
9
|
+
const paypal = require('./paypal-2788afc2.js');
|
|
10
|
+
const createCustomEvent = require('./createCustomEvent-0fff9307.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-5a64574c.js');
|
|
12
|
-
const handleFetch = require('./handleFetch-
|
|
12
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
13
13
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
14
14
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
15
15
|
const isDarkColor = require('./isDarkColor-5efc8367.js');
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-285b3c4a.js');
|
|
7
|
+
const paypal = require('./paypal-2788afc2.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
9
|
-
const createCustomEvent = require('./createCustomEvent-
|
|
9
|
+
const createCustomEvent = require('./createCustomEvent-0fff9307.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
11
|
-
const handleFetch = require('./handleFetch-
|
|
11
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
12
12
|
const classes = require('./classes-b7918f56.js');
|
|
13
13
|
const getBorderRadius = require('./getBorderRadius-5a64574c.js');
|
|
14
14
|
const isDarkColor = require('./isDarkColor-5efc8367.js');
|
|
15
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
15
|
+
const CheckoutConfig = require('./CheckoutConfig-2fef694e.js');
|
|
16
16
|
const RemoveIcon = require('./RemoveIcon-081ac073.js');
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-285b3c4a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
9
9
|
require('./isDarkColor-5efc8367.js');
|
|
10
10
|
require('./getBorderRadius-5a64574c.js');
|
|
11
11
|
|
|
@@ -227,8 +227,17 @@ const ZonosController = class {
|
|
|
227
227
|
}
|
|
228
228
|
// init zonos notification
|
|
229
229
|
this.initZonosNotification();
|
|
230
|
+
const getLogoUrl = () => {
|
|
231
|
+
var _a, _b, _c;
|
|
232
|
+
if (window.Zonos.isLegacyCheckout) {
|
|
233
|
+
// Try to use new settings first for legacy stores
|
|
234
|
+
return (((_a = json === null || json === void 0 ? void 0 : json.appearanceSettings) === null || _a === void 0 ? void 0 : _a.logoUrl) || ((_b = this.config.appearance) === null || _b === void 0 ? void 0 : _b.logoUrl));
|
|
235
|
+
}
|
|
236
|
+
// Other wise respect override
|
|
237
|
+
return (_c = this.config.appearance) === null || _c === void 0 ? void 0 : _c.logoUrl;
|
|
238
|
+
};
|
|
230
239
|
// override subscription status
|
|
231
|
-
const config = Object.assign(Object.assign({}, this.config), { checkoutSettings: this.config.checkoutSettings
|
|
240
|
+
const config = Object.assign(Object.assign({}, this.config), { appearance: Object.assign(Object.assign({}, this.config.appearance), { logoUrl: getLogoUrl() }), checkoutSettings: this.config.checkoutSettings
|
|
232
241
|
? Object.assign(Object.assign({}, this.config.checkoutSettings), { subscriptionStatus: undefined }) : undefined });
|
|
233
242
|
// load default setting if failed to load user settings
|
|
234
243
|
zonosStore.zonosStoreInitSetting({
|
|
@@ -319,7 +328,7 @@ const ZonosController = class {
|
|
|
319
328
|
zonosStore.zonosStore.organizationName = organizationName;
|
|
320
329
|
}
|
|
321
330
|
render() {
|
|
322
|
-
return index.h(index.Host, { key: '
|
|
331
|
+
return index.h(index.Host, { key: '88cac0dfe5118ae982acfec883927e7c5a6d5490', class: "zonos--elements" });
|
|
323
332
|
}
|
|
324
333
|
};
|
|
325
334
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-285b3c4a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-661a8225.js');
|
|
10
10
|
require('./isDarkColor-5efc8367.js');
|
|
11
11
|
require('./getBorderRadius-5a64574c.js');
|
|
12
12
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-285b3c4a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-5efc8367.js');
|
|
10
10
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-661a8225.js');
|
|
12
12
|
require('./getBorderRadius-5a64574c.js');
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-285b3c4a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-661a8225.js');
|
|
12
12
|
require('./isDarkColor-5efc8367.js');
|
|
13
13
|
require('./getBorderRadius-5a64574c.js');
|
|
14
14
|
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-285b3c4a.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
11
|
require('./isDarkColor-5efc8367.js');
|
|
12
12
|
require('./getBorderRadius-5a64574c.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-285b3c4a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-661a8225.js');
|
|
10
10
|
require('./isDarkColor-5efc8367.js');
|
|
11
11
|
require('./getBorderRadius-5a64574c.js');
|
|
12
12
|
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
-
const paypal = require('./paypal-
|
|
8
|
+
const cart = require('./cart-285b3c4a.js');
|
|
9
|
+
const handleFetch = require('./handleFetch-661a8225.js');
|
|
10
|
+
const paypal = require('./paypal-2788afc2.js');
|
|
11
11
|
require('./isDarkColor-5efc8367.js');
|
|
12
12
|
require('./getBorderRadius-5a64574c.js');
|
|
13
13
|
|
|
@@ -103,8 +103,17 @@ export class ZonosController {
|
|
|
103
103
|
}
|
|
104
104
|
// init zonos notification
|
|
105
105
|
this.initZonosNotification();
|
|
106
|
+
const getLogoUrl = () => {
|
|
107
|
+
var _a, _b, _c;
|
|
108
|
+
if (window.Zonos.isLegacyCheckout) {
|
|
109
|
+
// Try to use new settings first for legacy stores
|
|
110
|
+
return (((_a = json === null || json === void 0 ? void 0 : json.appearanceSettings) === null || _a === void 0 ? void 0 : _a.logoUrl) || ((_b = this.config.appearance) === null || _b === void 0 ? void 0 : _b.logoUrl));
|
|
111
|
+
}
|
|
112
|
+
// Other wise respect override
|
|
113
|
+
return (_c = this.config.appearance) === null || _c === void 0 ? void 0 : _c.logoUrl;
|
|
114
|
+
};
|
|
106
115
|
// override subscription status
|
|
107
|
-
const config = Object.assign(Object.assign({}, this.config), { checkoutSettings: this.config.checkoutSettings
|
|
116
|
+
const config = Object.assign(Object.assign({}, this.config), { appearance: Object.assign(Object.assign({}, this.config.appearance), { logoUrl: getLogoUrl() }), checkoutSettings: this.config.checkoutSettings
|
|
108
117
|
? Object.assign(Object.assign({}, this.config.checkoutSettings), { subscriptionStatus: undefined }) : undefined });
|
|
109
118
|
// load default setting if failed to load user settings
|
|
110
119
|
zonosStoreInitSetting({
|
|
@@ -195,7 +204,7 @@ export class ZonosController {
|
|
|
195
204
|
zonosStore.organizationName = organizationName;
|
|
196
205
|
}
|
|
197
206
|
render() {
|
|
198
|
-
return h(Host, { key: '
|
|
207
|
+
return h(Host, { key: '88cac0dfe5118ae982acfec883927e7c5a6d5490', class: "zonos--elements" });
|
|
199
208
|
}
|
|
200
209
|
static get is() { return "zonos-controller"; }
|
|
201
210
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,7 +48,9 @@ const encodeString = (text) => {
|
|
|
48
48
|
const handleRequest = async ({ basePathType, options, path, }) => {
|
|
49
49
|
let response;
|
|
50
50
|
// fallback to the main base API if the passed in base path is not available
|
|
51
|
-
const baseUrl =
|
|
51
|
+
const baseUrl = window.Zonos.zonosQaUrlApi ||
|
|
52
|
+
fallbackApiList[basePathType] ||
|
|
53
|
+
MAIN_BASE_API_TYPE;
|
|
52
54
|
const url = baseUrl + path;
|
|
53
55
|
// adding random encoded token to the url so that the request will be cached differently for each store
|
|
54
56
|
const modifiedUrl = new URL(url);
|
|
@@ -13,6 +13,7 @@ export const checkIfLoadVersionDomain = ({ loadScriptSrc }) => {
|
|
|
13
13
|
const whiteListedDomains = [
|
|
14
14
|
// local domain
|
|
15
15
|
'dev.elements.zonos.com',
|
|
16
|
+
'dev.assets-checkout.zonos.com',
|
|
16
17
|
// any domain with prefix , no need to version it
|
|
17
18
|
'.js.zonos.com',
|
|
18
19
|
// vercel git domain
|
|
@@ -61,3 +61,22 @@ export const getZonosQaUrl = () => {
|
|
|
61
61
|
});
|
|
62
62
|
return fullUrl;
|
|
63
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Get the Zonos QA URL and return it. Will remove `zonosQaUrl` from the url query if it doesn't exists.
|
|
66
|
+
*/
|
|
67
|
+
export const getZonosQaUrlApi = () => {
|
|
68
|
+
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
69
|
+
// when local demo app is running, it needs to use the local dev script unless the qaUrl is set
|
|
70
|
+
if (!qaUrl &&
|
|
71
|
+
['dev.demo.elements.zonos.com'].includes(window.location.hostname)) {
|
|
72
|
+
return 'https://dev.demo.elements.zonos.com';
|
|
73
|
+
}
|
|
74
|
+
if (!qaUrl) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
// If the qaUrl, use the dev-elements domain to forward the request to the dev server to quickly debug the issue
|
|
78
|
+
if (qaUrl === 'dev-elements') {
|
|
79
|
+
return 'https://dev.demo.elements.zonos.com';
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as handleFetch, l as log, a as logError } from './handleFetch-
|
|
1
|
+
import { h as handleFetch, l as log, a as logError } from './handleFetch-80ecfb91.js';
|
|
2
2
|
|
|
3
3
|
const getTempCartById = async (cartId) => {
|
|
4
4
|
const { errors, json } = await handleFetch('/api/zonos-elements/get-temp-cart', {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-0dc7a947.js';
|
|
2
|
-
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-80ecfb91.js';
|
|
3
3
|
import { i as isDarkColor } from './isDarkColor-b3afa948.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-cff1e39b.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as cartStore, l as localizationStore } from './cart-
|
|
1
|
+
import { d as cartStore, l as localizationStore } from './cart-7faa064c.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-0dc7a947.js';
|
|
3
|
-
import { h as handleFetch } from './handleFetch-
|
|
3
|
+
import { h as handleFetch } from './handleFetch-80ecfb91.js';
|
|
4
4
|
|
|
5
5
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
6
6
|
var _a, _b;
|
|
@@ -178,7 +178,9 @@ const encodeString = (text) => {
|
|
|
178
178
|
const handleRequest = async ({ basePathType, options, path, }) => {
|
|
179
179
|
let response;
|
|
180
180
|
// fallback to the main base API if the passed in base path is not available
|
|
181
|
-
const baseUrl =
|
|
181
|
+
const baseUrl = window.Zonos.zonosQaUrlApi ||
|
|
182
|
+
fallbackApiList[basePathType] ||
|
|
183
|
+
MAIN_BASE_API_TYPE;
|
|
182
184
|
const url = baseUrl + path;
|
|
183
185
|
// adding random encoded token to the url so that the request will be cached differently for each store
|
|
184
186
|
const modifiedUrl = new URL(url);
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as log, a as logError } from './handleFetch-
|
|
2
|
-
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
3
|
-
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
1
|
+
import { l as log, a as logError } from './handleFetch-80ecfb91.js';
|
|
2
|
+
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-c7954c2a.js';
|
|
3
|
+
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-c7954c2a.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -17,6 +17,7 @@ const checkIfLoadVersionDomain = ({ loadScriptSrc }) => {
|
|
|
17
17
|
const whiteListedDomains = [
|
|
18
18
|
// local domain
|
|
19
19
|
'dev.elements.zonos.com',
|
|
20
|
+
'dev.assets-checkout.zonos.com',
|
|
20
21
|
// any domain with prefix , no need to version it
|
|
21
22
|
'.js.zonos.com',
|
|
22
23
|
// vercel git domain
|
|
@@ -93,7 +94,7 @@ const getZonosQaUrl = () => {
|
|
|
93
94
|
return null;
|
|
94
95
|
}
|
|
95
96
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
96
|
-
const cdnUrl = "https://v1.3.
|
|
97
|
+
const cdnUrl = "https://v1.3.64.js.zonos.com";
|
|
97
98
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
98
99
|
if (!qaUrl &&
|
|
99
100
|
(cdnUrl.includes('test.') ||
|
|
@@ -277,10 +278,10 @@ const zonosLoadUrl = (() => {
|
|
|
277
278
|
}
|
|
278
279
|
return null;
|
|
279
280
|
})();
|
|
280
|
-
const ZONOS_URL = "https://v1.3.
|
|
281
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
282
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
283
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
281
|
+
const ZONOS_URL = "https://v1.3.64.js.zonos.com";
|
|
282
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.64";
|
|
283
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.64";
|
|
284
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.64";
|
|
284
285
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
285
286
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
286
287
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -295,14 +296,15 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
295
296
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
296
297
|
Zonos._paypalMockResponse = null;
|
|
297
298
|
Zonos.isBigCommerce = false;
|
|
298
|
-
Zonos.releaseDate = "
|
|
299
|
+
Zonos.releaseDate = "1727903724659";
|
|
299
300
|
Zonos.isLegacyCheckout = false;
|
|
300
301
|
/**
|
|
301
302
|
* By default, the package will load from npm
|
|
302
303
|
*/
|
|
303
304
|
Zonos.isNpm = true;
|
|
304
305
|
Zonos.zonosQaUrl = null;
|
|
305
|
-
Zonos.
|
|
306
|
+
Zonos.zonosQaUrlApi = null;
|
|
307
|
+
Zonos.version = `v${"1.3.64"}`;
|
|
306
308
|
Zonos.modeAlerted = false;
|
|
307
309
|
Zonos.cartData = null;
|
|
308
310
|
Zonos.paypal = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-0dc7a947.js';
|
|
2
|
-
import { d as cartStore, r as stripeStoreHandleInventoryCheck, t as translate, q as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-
|
|
3
|
-
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { d as cartStore, r as stripeStoreHandleInventoryCheck, t as translate, q as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-7faa064c.js';
|
|
3
|
+
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-80ecfb91.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-b3afa948.js';
|
|
5
5
|
|
|
6
6
|
/*!
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { j as stripeStore, l as localizationStore, t as translate } from './cart-
|
|
2
|
+
import { j as stripeStore, l as localizationStore, t as translate } from './cart-7faa064c.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
|
-
import { a as logError } from './handleFetch-
|
|
4
|
+
import { a as logError } from './handleFetch-80ecfb91.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
6
6
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
|
|
7
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getAssetPath, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
|
|
2
2
|
import { d as zonosStoreFontFamily, z as zonosStore, g as getZonosStoreTheme } from './zonosStore-0dc7a947.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { d as cartStore, E as currencyFormat, F as cartStoreHasOneEligibleItem, t as translate, v as stripeStoreReset, j as stripeStore, G as stripeStoreRetrievePayment, H as stripeStoreMessageBasedOnStatus, l as localizationStore, I as stripeStoreTranslateAddressToLatin, J as cartStoreUpdateSelectedShippingOption, K as cartStoreGetShippingTransitInfo } from './cart-
|
|
5
|
-
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-
|
|
6
|
-
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-
|
|
4
|
+
import { d as cartStore, E as currencyFormat, F as cartStoreHasOneEligibleItem, t as translate, v as stripeStoreReset, j as stripeStore, G as stripeStoreRetrievePayment, H as stripeStoreMessageBasedOnStatus, l as localizationStore, I as stripeStoreTranslateAddressToLatin, J as cartStoreUpdateSelectedShippingOption, K as cartStoreGetShippingTransitInfo } from './cart-7faa064c.js';
|
|
5
|
+
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-82c6849e.js';
|
|
6
|
+
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-4a02c0ac.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-cff1e39b.js';
|
|
8
|
-
import { h as handleFetch, s as sendErrorLog } from './handleFetch-
|
|
8
|
+
import { h as handleFetch, s as sendErrorLog } from './handleFetch-80ecfb91.js';
|
|
9
9
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
10
10
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
11
11
|
import { i as isDarkColor, t as tinycolor } from './isDarkColor-b3afa948.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as cartStoreSetCheckoutSession, p as stripeStorePrefetchLandedCost, q as cartStoreNextStep, r as stripeStoreHandleInventoryCheck, u as stripeStoreConfirmPayment, v as stripeStoreReset, w as localizationStoreOnUpdate } from './cart-
|
|
3
|
-
import { s as submitGtag, p as paypalInitScript } from './paypal-
|
|
2
|
+
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as cartStoreSetCheckoutSession, p as stripeStorePrefetchLandedCost, q as cartStoreNextStep, r as stripeStoreHandleInventoryCheck, u as stripeStoreConfirmPayment, v as stripeStoreReset, w as localizationStoreOnUpdate } from './cart-7faa064c.js';
|
|
3
|
+
import { s as submitGtag, p as paypalInitScript } from './paypal-82c6849e.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-0dc7a947.js';
|
|
5
|
-
import { c as createCustomEvent, t as trackConversionEvent, g as getIsTestMode } from './createCustomEvent-
|
|
5
|
+
import { c as createCustomEvent, t as trackConversionEvent, g as getIsTestMode } from './createCustomEvent-4a02c0ac.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
7
|
-
import { l as log, a as logError, s as sendErrorLog } from './handleFetch-
|
|
7
|
+
import { l as log, a as logError, s as sendErrorLog } from './handleFetch-80ecfb91.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-cff1e39b.js';
|
|
10
10
|
import { i as isDarkColor } from './isDarkColor-b3afa948.js';
|
|
11
|
-
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
11
|
+
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-c7954c2a.js';
|
|
12
12
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { x as isValidSelector, j as stripeStore, y as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { x as isValidSelector, j as stripeStore, y as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-7faa064c.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
|
|
4
|
-
import { h as handleFetch, a as logError, l as log } from './handleFetch-
|
|
4
|
+
import { h as handleFetch, a as logError, l as log } from './handleFetch-80ecfb91.js';
|
|
5
5
|
import './isDarkColor-b3afa948.js';
|
|
6
6
|
import './getBorderRadius-cff1e39b.js';
|
|
7
7
|
|
|
@@ -223,8 +223,17 @@ const ZonosController = class {
|
|
|
223
223
|
}
|
|
224
224
|
// init zonos notification
|
|
225
225
|
this.initZonosNotification();
|
|
226
|
+
const getLogoUrl = () => {
|
|
227
|
+
var _a, _b, _c;
|
|
228
|
+
if (window.Zonos.isLegacyCheckout) {
|
|
229
|
+
// Try to use new settings first for legacy stores
|
|
230
|
+
return (((_a = json === null || json === void 0 ? void 0 : json.appearanceSettings) === null || _a === void 0 ? void 0 : _a.logoUrl) || ((_b = this.config.appearance) === null || _b === void 0 ? void 0 : _b.logoUrl));
|
|
231
|
+
}
|
|
232
|
+
// Other wise respect override
|
|
233
|
+
return (_c = this.config.appearance) === null || _c === void 0 ? void 0 : _c.logoUrl;
|
|
234
|
+
};
|
|
226
235
|
// override subscription status
|
|
227
|
-
const config = Object.assign(Object.assign({}, this.config), { checkoutSettings: this.config.checkoutSettings
|
|
236
|
+
const config = Object.assign(Object.assign({}, this.config), { appearance: Object.assign(Object.assign({}, this.config.appearance), { logoUrl: getLogoUrl() }), checkoutSettings: this.config.checkoutSettings
|
|
228
237
|
? Object.assign(Object.assign({}, this.config.checkoutSettings), { subscriptionStatus: undefined }) : undefined });
|
|
229
238
|
// load default setting if failed to load user settings
|
|
230
239
|
zonosStoreInitSetting({
|
|
@@ -315,7 +324,7 @@ const ZonosController = class {
|
|
|
315
324
|
zonosStore.organizationName = organizationName;
|
|
316
325
|
}
|
|
317
326
|
render() {
|
|
318
|
-
return h(Host, { key: '
|
|
327
|
+
return h(Host, { key: '88cac0dfe5118ae982acfec883927e7c5a6d5490', class: "zonos--elements" });
|
|
319
328
|
}
|
|
320
329
|
};
|
|
321
330
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-7faa064c.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-80ecfb91.js';
|
|
6
6
|
import './isDarkColor-b3afa948.js';
|
|
7
7
|
import './getBorderRadius-cff1e39b.js';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-7faa064c.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-b3afa948.js';
|
|
6
6
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
7
|
-
import './handleFetch-
|
|
7
|
+
import './handleFetch-80ecfb91.js';
|
|
8
8
|
import './getBorderRadius-cff1e39b.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { t as translate, l as localizationStore, E as currencyFormat } from './cart-
|
|
2
|
+
import { t as translate, l as localizationStore, E as currencyFormat } from './cart-7faa064c.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-0dc7a947.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
7
|
-
import './handleFetch-
|
|
7
|
+
import './handleFetch-80ecfb91.js';
|
|
8
8
|
import './isDarkColor-b3afa948.js';
|
|
9
9
|
import './getBorderRadius-cff1e39b.js';
|
|
10
10
|
|