@zonos/elements 1.3.131 → 1.3.132
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/{cart-d5240ba9.js → cart-1bab358a.js} +2 -0
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/{paypal-78db30b7.js → paypal-f1874626.js} +1 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +4 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -1
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +2 -0
- package/dist/collection/scripts/_zonosBase.js +1 -1
- package/dist/esm/{cart-4f1ee6dd.js → cart-a5a8ec74.js} +2 -0
- package/dist/esm/index.js +8 -8
- package/dist/esm/{paypal-5b1964b6.js → paypal-828b4297.js} +1 -1
- package/dist/esm/zonos-address_7.entry.js +1 -1
- package/dist/esm/zonos-cart-items_13.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +4 -3
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +2 -2
- package/dist/esm-es5/{cart-4f1ee6dd.js → cart-a5a8ec74.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-5b1964b6.js → paypal-828b4297.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_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 +1 -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/components/utils/api/triggerBuildLandedCost.d.ts +1 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-dc823080.entry.js → p-0e067b2e.entry.js} +1 -1
- package/dist/zonos-elements/{p-876ded0e.system.entry.js → p-296aee8a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-87945d75.system.entry.js → p-31e85dce.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e1aea7c6.system.js → p-34471cab.system.js} +1 -1
- package/dist/zonos-elements/{p-a50ebda1.entry.js → p-3972da4c.entry.js} +1 -1
- package/dist/zonos-elements/{p-5cd970b9.entry.js → p-40579074.entry.js} +1 -1
- package/dist/zonos-elements/{p-14022fab.system.js → p-4794c0ab.system.js} +1 -1
- package/dist/zonos-elements/{p-a277cde0.system.entry.js → p-4953542e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3f40806c.entry.js → p-76f17790.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e4b11ed.system.entry.js → p-78227a4e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-49fff22c.js → p-7b2ee5b0.js} +1 -1
- package/dist/zonos-elements/{p-7fa88e0a.entry.js → p-817741b7.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd05d150.system.js → p-81bb0bde.system.js} +1 -1
- package/dist/zonos-elements/{p-0531689a.system.entry.js → p-8aaada48.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-10cebad7.entry.js → p-937d08c1.entry.js} +1 -1
- package/dist/zonos-elements/{p-a1c26abb.system.entry.js → p-a0614f3a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a49ac35e.entry.js → p-b2641a83.entry.js} +1 -1
- package/dist/zonos-elements/{p-19944a13.system.entry.js → p-bdc7e244.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-30d6e78c.entry.js → p-c127846c.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-72c682ac.system.entry.js → p-db70f65a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7d3a63c5.js → p-dd517bcb.js} +2 -2
- package/dist/zonos-elements/{p-1a6e9eec.entry.js → p-e9a565d0.entry.js} +1 -1
- package/dist/zonos-elements/{p-7af3b735.system.entry.js → p-f0ea7e98.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9cb6599d.system.entry.js → p-f61c142c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-124a4a50.entry.js → p-f7f481be.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
|
@@ -9555,6 +9555,8 @@ const triggerBuildLandedCost = async (buildLandedCost) => {
|
|
|
9555
9555
|
checkoutSessionId: data.checkoutSessionId,
|
|
9556
9556
|
contact: data.contact,
|
|
9557
9557
|
landedCostAdjustments: data.landedCostAdjustments,
|
|
9558
|
+
// zonosApiKey should always be available
|
|
9559
|
+
publicCredential: window.Zonos.zonosApiKey || '',
|
|
9558
9560
|
shippingAddress: data.shippingAddress,
|
|
9559
9561
|
zonosApiRoute: handleFetch.fallbackApiList['vercel'],
|
|
9560
9562
|
});
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -97,7 +97,7 @@ const getZonosQaUrl = () => {
|
|
|
97
97
|
return null;
|
|
98
98
|
}
|
|
99
99
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
100
|
-
const cdnUrl = "https://v1.3.
|
|
100
|
+
const cdnUrl = "https://v1.3.132.js.zonos.com";
|
|
101
101
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
102
102
|
if (!qaUrl &&
|
|
103
103
|
(cdnUrl.includes('test.') ||
|
|
@@ -311,10 +311,10 @@ const zonosLoadUrl = (() => {
|
|
|
311
311
|
}
|
|
312
312
|
return null;
|
|
313
313
|
})();
|
|
314
|
-
const ZONOS_URL = "https://v1.3.
|
|
315
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
316
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
317
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
314
|
+
const ZONOS_URL = "https://v1.3.132.js.zonos.com";
|
|
315
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.132";
|
|
316
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.132";
|
|
317
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.132";
|
|
318
318
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
319
319
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
320
320
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -329,7 +329,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
329
329
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
330
330
|
Zonos._paypalMockResponse = null;
|
|
331
331
|
Zonos.isBigCommerce = false;
|
|
332
|
-
Zonos.releaseDate = "
|
|
332
|
+
Zonos.releaseDate = "1732306651064";
|
|
333
333
|
Zonos.isLegacyCheckout = false;
|
|
334
334
|
Zonos.domain = typeof window !== 'undefined'
|
|
335
335
|
? // domain that embeds the iframe
|
|
@@ -345,7 +345,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
345
345
|
Zonos.isNpm = true;
|
|
346
346
|
Zonos.zonosQaUrl = null;
|
|
347
347
|
Zonos.zonosQaUrlApi = null;
|
|
348
|
-
Zonos.version = `v${"1.3.
|
|
348
|
+
Zonos.version = `v${"1.3.132"}`;
|
|
349
349
|
Zonos.modeAlerted = false;
|
|
350
350
|
Zonos.cartData = null;
|
|
351
351
|
Zonos.paypal = null;
|
|
@@ -405,7 +405,7 @@ Zonos.init = async (params) => {
|
|
|
405
405
|
_a.zonosApiKey = cartinfo.zonosApiKey;
|
|
406
406
|
}
|
|
407
407
|
// Try to request for test API key if the API key is production but query param isTestMode is provided
|
|
408
|
-
|
|
408
|
+
await overrideWithTestPublicCredential();
|
|
409
409
|
}
|
|
410
410
|
// inject hidden button to body to trigger checkout right away if we have cartData
|
|
411
411
|
if (_a.cartId && _a.cartData) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-1bab358a.js');
|
|
5
5
|
const handleFetch = require('./handleFetch-a8dfb07c.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-dd6d723b.js');
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
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-1bab358a.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-a8dfb07c.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
@@ -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-1bab358a.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
8
|
+
const paypal = require('./paypal-f1874626.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
10
10
|
const createCustomEvent = require('./createCustomEvent-3e982e57.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-f72d8edf.js');
|
|
@@ -3,8 +3,8 @@
|
|
|
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-1bab358a.js');
|
|
7
|
+
const paypal = require('./paypal-f1874626.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-a8dfb07c.js');
|
|
10
10
|
const createCustomEvent = require('./createCustomEvent-3e982e57.js');
|
|
@@ -970,7 +970,8 @@ const ZonosCheckout = class {
|
|
|
970
970
|
const urlParams = new URLSearchParams(window.location.search);
|
|
971
971
|
const zonosQaUrl = urlParams.get('zonosQaUrl');
|
|
972
972
|
const zonosDebug = urlParams.get('zonosDebug');
|
|
973
|
-
|
|
973
|
+
const zonosE2ETest = urlParams.get('zonosE2ETest');
|
|
974
|
+
return (index.h("zonos-v-stack", null, index.h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (index.h("zonos-badge", { badgeColor: "orange", size: "small" }, cart.translate('Test mode'))), zonosDebug === '1' && (index.h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (index.h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl)), zonosE2ETest && (index.h("zonos-badge", { badgeColor: "gray", size: "small" }, "E2E Test"))), index.h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
974
975
|
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
975
976
|
this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
976
977
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
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-1bab358a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-a8dfb07c.js');
|
|
9
9
|
require('./isDarkColor-dd6d723b.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
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-1bab358a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./handleFetch-a8dfb07c.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
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-1bab358a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-dd6d723b.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
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-1bab358a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-1bab358a.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-a8dfb07c.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
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-1bab358a.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./handleFetch-a8dfb07c.js');
|
|
@@ -6,9 +6,9 @@ const index = require('./index-d56e0a8b.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-293bb3ba.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-f72d8edf.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-1bab358a.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-a8dfb07c.js');
|
|
11
|
-
const paypal = require('./paypal-
|
|
11
|
+
const paypal = require('./paypal-f1874626.js');
|
|
12
12
|
require('./isDarkColor-dd6d723b.js');
|
|
13
13
|
|
|
14
14
|
const zonosNotificationCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";
|
|
@@ -758,7 +758,8 @@ export class ZonosCheckout {
|
|
|
758
758
|
const urlParams = new URLSearchParams(window.location.search);
|
|
759
759
|
const zonosQaUrl = urlParams.get('zonosQaUrl');
|
|
760
760
|
const zonosDebug = urlParams.get('zonosDebug');
|
|
761
|
-
|
|
761
|
+
const zonosE2ETest = urlParams.get('zonosE2ETest');
|
|
762
|
+
return (h("zonos-v-stack", null, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl)), zonosE2ETest && (h("zonos-badge", { badgeColor: "gray", size: "small" }, "E2E Test"))), h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
762
763
|
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
763
764
|
this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
764
765
|
};
|
|
@@ -10,6 +10,8 @@ export const triggerBuildLandedCost = async (buildLandedCost) => {
|
|
|
10
10
|
checkoutSessionId: data.checkoutSessionId,
|
|
11
11
|
contact: data.contact,
|
|
12
12
|
landedCostAdjustments: data.landedCostAdjustments,
|
|
13
|
+
// zonosApiKey should always be available
|
|
14
|
+
publicCredential: window.Zonos.zonosApiKey || '',
|
|
13
15
|
shippingAddress: data.shippingAddress,
|
|
14
16
|
zonosApiRoute: fallbackApiList['vercel'],
|
|
15
17
|
});
|
|
@@ -119,7 +119,7 @@ Zonos.init = async (params) => {
|
|
|
119
119
|
_a.zonosApiKey = cartinfo.zonosApiKey;
|
|
120
120
|
}
|
|
121
121
|
// Try to request for test API key if the API key is production but query param isTestMode is provided
|
|
122
|
-
|
|
122
|
+
await overrideWithTestPublicCredential();
|
|
123
123
|
}
|
|
124
124
|
// inject hidden button to body to trigger checkout right away if we have cartData
|
|
125
125
|
if (_a.cartId && _a.cartData) {
|
|
@@ -9553,6 +9553,8 @@ const triggerBuildLandedCost = async (buildLandedCost) => {
|
|
|
9553
9553
|
checkoutSessionId: data.checkoutSessionId,
|
|
9554
9554
|
contact: data.contact,
|
|
9555
9555
|
landedCostAdjustments: data.landedCostAdjustments,
|
|
9556
|
+
// zonosApiKey should always be available
|
|
9557
|
+
publicCredential: window.Zonos.zonosApiKey || '',
|
|
9556
9558
|
shippingAddress: data.shippingAddress,
|
|
9557
9559
|
zonosApiRoute: fallbackApiList['vercel'],
|
|
9558
9560
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -94,7 +94,7 @@ const getZonosQaUrl = () => {
|
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
96
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
97
|
-
const cdnUrl = "https://v1.3.
|
|
97
|
+
const cdnUrl = "https://v1.3.132.js.zonos.com";
|
|
98
98
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
99
99
|
if (!qaUrl &&
|
|
100
100
|
(cdnUrl.includes('test.') ||
|
|
@@ -308,10 +308,10 @@ const zonosLoadUrl = (() => {
|
|
|
308
308
|
}
|
|
309
309
|
return null;
|
|
310
310
|
})();
|
|
311
|
-
const ZONOS_URL = "https://v1.3.
|
|
312
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
313
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
314
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
311
|
+
const ZONOS_URL = "https://v1.3.132.js.zonos.com";
|
|
312
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.132";
|
|
313
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.132";
|
|
314
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.132";
|
|
315
315
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
316
316
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
317
317
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -326,7 +326,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
326
326
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
327
327
|
Zonos._paypalMockResponse = null;
|
|
328
328
|
Zonos.isBigCommerce = false;
|
|
329
|
-
Zonos.releaseDate = "
|
|
329
|
+
Zonos.releaseDate = "1732306651064";
|
|
330
330
|
Zonos.isLegacyCheckout = false;
|
|
331
331
|
Zonos.domain = typeof window !== 'undefined'
|
|
332
332
|
? // domain that embeds the iframe
|
|
@@ -342,7 +342,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
342
342
|
Zonos.isNpm = true;
|
|
343
343
|
Zonos.zonosQaUrl = null;
|
|
344
344
|
Zonos.zonosQaUrlApi = null;
|
|
345
|
-
Zonos.version = `v${"1.3.
|
|
345
|
+
Zonos.version = `v${"1.3.132"}`;
|
|
346
346
|
Zonos.modeAlerted = false;
|
|
347
347
|
Zonos.cartData = null;
|
|
348
348
|
Zonos.paypal = null;
|
|
@@ -402,7 +402,7 @@ Zonos.init = async (params) => {
|
|
|
402
402
|
_a.zonosApiKey = cartinfo.zonosApiKey;
|
|
403
403
|
}
|
|
404
404
|
// Try to request for test API key if the API key is production but query param isTestMode is provided
|
|
405
|
-
|
|
405
|
+
await overrideWithTestPublicCredential();
|
|
406
406
|
}
|
|
407
407
|
// inject hidden button to body to trigger checkout right away if we have cartData
|
|
408
408
|
if (_a.cartId && _a.cartData) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-c493c4fe.js';
|
|
2
|
-
import { d as cartStore, w as stripeStoreHandleInventoryCheck, p as translate, v as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-
|
|
2
|
+
import { d as cartStore, w as stripeStoreHandleInventoryCheck, p as translate, v as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-a5a8ec74.js';
|
|
3
3
|
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-40fc3562.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-c6924924.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
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, S as getFallbackDefaultCountryCode, l as localizationStore, p as translate } from './cart-
|
|
2
|
+
import { j as stripeStore, S as getFallbackDefaultCountryCode, l as localizationStore, p as translate } from './cart-a5a8ec74.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
4
|
import { a as logError, l as log } from './handleFetch-40fc3562.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { d as cartStore, H as currencyFormat, p as translate, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, z as stripeStoreReset, j as stripeStore, L as stripeStoreRetrievePayment, t as trackConversionEvent, M as stripeStoreResetPromoCode, N as stripeStoreMessageBasedOnStatus, l as localizationStore, O as stripeStoreTranslateAddressToLatin, P as cartStoreUpdateSelectedShippingOption, Q as cartStoreGetShippingTransitInfo, R as sortServiceLevelOptionsByAmount } from './cart-
|
|
2
|
+
import { d as cartStore, H as currencyFormat, p as translate, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, z as stripeStoreReset, j as stripeStore, L as stripeStoreRetrievePayment, t as trackConversionEvent, M as stripeStoreResetPromoCode, N as stripeStoreMessageBasedOnStatus, l as localizationStore, O as stripeStoreTranslateAddressToLatin, P as cartStoreUpdateSelectedShippingOption, Q as cartStoreGetShippingTransitInfo, R as sortServiceLevelOptionsByAmount } from './cart-a5a8ec74.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-828b4297.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-c493c4fe.js';
|
|
6
6
|
import { c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-31a792d3.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-bdd709e7.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
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, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as translate, q as getZCountryUrlParam, r as cartStoreSetCheckoutSession, u as stripeStorePrefetchLandedCost, v as cartStoreNextStep, w as stripeStoreHandleInventoryCheck, x as stripeStoreConfirmPayment, y as stripeStoreHandleInventoryRefund, z as stripeStoreReset, A as localizationStoreOnUpdate } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a 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, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as translate, q as getZCountryUrlParam, r as cartStoreSetCheckoutSession, u as stripeStorePrefetchLandedCost, v as cartStoreNextStep, w as stripeStoreHandleInventoryCheck, x as stripeStoreConfirmPayment, y as stripeStoreHandleInventoryRefund, z as stripeStoreReset, A as localizationStoreOnUpdate } from './cart-a5a8ec74.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript } from './paypal-828b4297.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-c493c4fe.js';
|
|
5
5
|
import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs, j as jsonParse } from './handleFetch-40fc3562.js';
|
|
6
6
|
import { g as getIsTestMode, c as createCustomEvent } from './createCustomEvent-31a792d3.js';
|
|
@@ -966,7 +966,8 @@ const ZonosCheckout = class {
|
|
|
966
966
|
const urlParams = new URLSearchParams(window.location.search);
|
|
967
967
|
const zonosQaUrl = urlParams.get('zonosQaUrl');
|
|
968
968
|
const zonosDebug = urlParams.get('zonosDebug');
|
|
969
|
-
|
|
969
|
+
const zonosE2ETest = urlParams.get('zonosE2ETest');
|
|
970
|
+
return (h("zonos-v-stack", null, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl)), zonosE2ETest && (h("zonos-badge", { badgeColor: "gray", size: "small" }, "E2E Test"))), h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
970
971
|
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
971
972
|
this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
972
973
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { B as isValidSelector, j as stripeStore, C as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { B as isValidSelector, j as stripeStore, C as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-a5a8ec74.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-c493c4fe.js';
|
|
4
4
|
import { h as handleFetch, a as logError, l as log } from './handleFetch-40fc3562.js';
|
|
5
5
|
import './isDarkColor-c6924924.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
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-a5a8ec74.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-c493c4fe.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-40fc3562.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, p as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, p as translate, l as localizationStore } from './cart-a5a8ec74.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-c493c4fe.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-c6924924.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { p as translate, l as localizationStore, H as currencyFormat } from './cart-
|
|
2
|
+
import { p as translate, l as localizationStore, H as currencyFormat } from './cart-a5a8ec74.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-c493c4fe.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
|
|
2
2
|
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-c493c4fe.js';
|
|
3
|
-
import { l as localizationStore, B as isValidSelector, p as translate, q as getZCountryUrlParam, D as setZCountryUrlParam, E as currencyDisplay, F as currencyConvertAndFormat, G as currencyConvert, H as currencyFormat } from './cart-
|
|
3
|
+
import { l as localizationStore, B as isValidSelector, p as translate, q as getZCountryUrlParam, D as setZCountryUrlParam, E as currencyDisplay, F as currencyConvertAndFormat, G as currencyConvert, H as currencyFormat } from './cart-a5a8ec74.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { h as handleFetch, a as logError, l as log } from './handleFetch-40fc3562.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { T as localizationStoreUpdateSelectedLocale, p as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { T as localizationStoreUpdateSelectedLocale, p as translate, l as localizationStore } from './cart-a5a8ec74.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-c493c4fe.js';
|
|
4
4
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
5
5
|
import './handleFetch-40fc3562.js';
|
|
@@ -2,9 +2,9 @@ import { r as registerInstance, h, H as Host, d as getElement, c as createEvent
|
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-c493c4fe.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-bdd709e7.js';
|
|
5
|
-
import { j as stripeStore } from './cart-
|
|
5
|
+
import { j as stripeStore } from './cart-a5a8ec74.js';
|
|
6
6
|
import { a as logError, l as log } from './handleFetch-40fc3562.js';
|
|
7
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
7
|
+
import { d as paypalStoreInitButtons } from './paypal-828b4297.js';
|
|
8
8
|
import './isDarkColor-c6924924.js';
|
|
9
9
|
|
|
10
10
|
const zonosNotificationCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";
|