@zonos/elements 1.3.41 → 1.3.43
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-497bb434.js → cart-558e4d21.js} +409 -52
- package/dist/cjs/index.cjs.js +21 -7
- package/dist/cjs/{paypal-e65a287a.js → paypal-276d8f92.js} +1 -1
- package/dist/cjs/{sendErrorLog-c3c315a9.js → sendErrorLog-f914a34b.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +3 -3
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -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 +4 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +43 -9
- 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/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +6 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +42 -8
- package/dist/collection/components/store/hello/localization.js +5 -5
- package/dist/collection/components/store/translationStore/strings.arabic.js +20 -2
- package/dist/collection/components/store/translationStore/strings.base.js +20 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +20 -2
- package/dist/collection/components/store/translationStore/strings.french.js +20 -2
- package/dist/collection/components/store/translationStore/strings.german.js +20 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +20 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +20 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +20 -2
- package/dist/collection/components/utils/handleFetch.js +0 -6
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +4 -1
- package/dist/collection/environment.js +6 -0
- package/dist/collection/scripts/_getNextFallbackUrl.js +1 -1
- package/dist/collection/scripts/_getZonosQaUrl.js +12 -1
- package/dist/collection/scripts/_zonosBase.js +4 -1
- package/dist/collection/types/generated/graphql.customer.types.js +19 -10
- package/dist/esm/{cart-f53c9f90.js → cart-c62e41b5.js} +409 -52
- package/dist/esm/index.js +21 -7
- package/dist/esm/{paypal-72296ae6.js → paypal-28d21865.js} +1 -1
- package/dist/esm/{sendErrorLog-f8d3ec4b.js → sendErrorLog-af1cd4bd.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +1 -1
- package/dist/esm/zonos-cart-items_12.entry.js +3 -3
- package/dist/esm/zonos-checkout.entry.js +3 -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 +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +43 -9
- 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-c62e41b5.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-72296ae6.js → paypal-28d21865.js} +1 -1
- package/dist/esm-es5/{sendErrorLog-f8d3ec4b.js → sendErrorLog-af1cd4bd.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.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 +62 -52
- 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/hello/zonos-hello/zonos-hello.d.ts +2 -1
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -0
- package/dist/types/components/store/hello/localization.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +19 -1
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getInclusivePricing.d.ts +2 -4
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components.d.ts +3 -1
- package/dist/types/environment.d.ts +4 -0
- package/dist/types/scripts/_getNextFallbackUrl.d.ts +3 -3
- package/dist/types/types/LogLoadScriptRequestBody.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +45 -13
- package/dist/types/types/generated/graphql.customer.types.ts +47 -18
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-fd54fbb9.system.entry.js → p-01961795.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0e9ca72b.system.js +1 -0
- package/dist/zonos-elements/p-0edd8829.system.js +1 -0
- package/dist/zonos-elements/p-21b38377.entry.js +1 -0
- package/dist/zonos-elements/{p-de53d9c3.entry.js → p-2a655e55.entry.js} +1 -1
- package/dist/zonos-elements/{p-5fe10991.system.entry.js → p-3754f86b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4db5be24.system.entry.js → p-387bc4f0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab11cca6.system.entry.js → p-437fd543.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-df69fa38.system.entry.js → p-4d5cafb1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-52fa9aab.entry.js → p-4fb3cbad.entry.js} +1 -1
- package/dist/zonos-elements/{p-f35ee203.entry.js → p-622cd68a.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4617501.entry.js → p-695fdbca.entry.js} +1 -1
- package/dist/zonos-elements/{p-67f22fbf.system.entry.js → p-6a3e8101.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d86c89e3.entry.js → p-71815183.entry.js} +1 -1
- package/dist/zonos-elements/p-75a6d31d.entry.js +1 -0
- package/dist/zonos-elements/{p-1ee2fa70.system.entry.js → p-77de5f08.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b3e825dc.system.js → p-7ab0cfbf.system.js} +1 -1
- package/dist/zonos-elements/{p-5922c099.entry.js → p-8855805d.entry.js} +1 -1
- package/dist/zonos-elements/{p-b689309d.system.entry.js → p-89c9cd2d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-05cdd3b4.js → p-c887765b.js} +1 -1
- package/dist/zonos-elements/{p-6de1c78a.entry.js → p-ceb9be2b.entry.js} +1 -1
- package/dist/zonos-elements/{p-6fbb4565.system.entry.js → p-d027eef2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-12266c9e.js → p-dba42d88.js} +1 -1
- package/dist/zonos-elements/p-e68503df.js +1 -0
- package/dist/zonos-elements/p-e88d33a6.system.js +1 -0
- package/dist/zonos-elements/{p-7833fa53.system.entry.js → p-eadd9525.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fdb4347f.entry.js → p-f97d6d55.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.css +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +9 -2
- package/dist/esm-es5/cart-f53c9f90.js +0 -1
- package/dist/zonos-elements/p-0f9804e3.entry.js +0 -1
- package/dist/zonos-elements/p-1a89c54a.js +0 -1
- package/dist/zonos-elements/p-678f1888.entry.js +0 -1
- package/dist/zonos-elements/p-79fd4f3c.system.js +0 -1
- package/dist/zonos-elements/p-9525cc44.system.js +0 -1
- package/dist/zonos-elements/p-c460665d.system.js +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -36,7 +36,7 @@ const checkIfLoadVersionDomain = ({ loadScriptSrc }) => {
|
|
|
36
36
|
return { currentLoadScriptUrl, isForceLoadVersionDomain, isWhiteListed };
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
const fallbackList = ['jsdelivr', 'unpkg', 'vercel'];
|
|
39
|
+
const fallbackList = ['jsdelivr', 'cdnjs', 'unpkg', 'vercel'];
|
|
40
40
|
/**
|
|
41
41
|
* Get the next cdn type in the fallback list
|
|
42
42
|
* @param currentCdnType The current cdn type that want to get the next fallback url
|
|
@@ -80,10 +80,21 @@ const extractZonosQaUrl = (url) => {
|
|
|
80
80
|
* Get the Zonos QA URL and return it. Will remove `zonosQaUrl` from the url query if it doesn't exists.
|
|
81
81
|
*/
|
|
82
82
|
const getZonosQaUrl = () => {
|
|
83
|
-
|
|
83
|
+
/**
|
|
84
|
+
* This is flag to force load cdn for testing purpose
|
|
85
|
+
* When developing, if the script load is from `dev.elements.zonos.com`,
|
|
86
|
+
* it would load script from that same domain instead of loading from cdn
|
|
87
|
+
*/
|
|
88
|
+
const shoudForceLoadCdn = window && window.location.href.includes('forceLoadCdn');
|
|
89
|
+
if (typeof window === 'undefined' || shoudForceLoadCdn) {
|
|
84
90
|
return null;
|
|
85
91
|
}
|
|
86
92
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
93
|
+
const cdnUrl = "https://v1.3.43.js.zonos.com";
|
|
94
|
+
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
95
|
+
if (!qaUrl && cdnUrl.includes('test.')) {
|
|
96
|
+
return cdnUrl;
|
|
97
|
+
}
|
|
87
98
|
// when local demo app is running, it needs to use the local dev script unless the qaUrl is set
|
|
88
99
|
if (!qaUrl && window.location.hostname === 'dev.demo.elements.zonos.com') {
|
|
89
100
|
return 'https://dev.elements.zonos.com';
|
|
@@ -249,9 +260,10 @@ const zonosLoadUrl = (() => {
|
|
|
249
260
|
}
|
|
250
261
|
return null;
|
|
251
262
|
})();
|
|
252
|
-
const ZONOS_URL = "https://v1.3.
|
|
253
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
254
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
263
|
+
const ZONOS_URL = "https://v1.3.43.js.zonos.com";
|
|
264
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.43";
|
|
265
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.43";
|
|
266
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.43";
|
|
255
267
|
const MAIN_LOAD_CDN_TYPE = 'jsdelivr';
|
|
256
268
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
257
269
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
@@ -272,7 +284,7 @@ Zonos.isBigCommerce = false;
|
|
|
272
284
|
*/
|
|
273
285
|
Zonos.isNpm = true;
|
|
274
286
|
Zonos.zonosQaUrl = null;
|
|
275
|
-
Zonos.version = `v${"1.3.
|
|
287
|
+
Zonos.version = `v${"1.3.43"}`;
|
|
276
288
|
Zonos.modeAlerted = false;
|
|
277
289
|
Zonos.tempCartData = null;
|
|
278
290
|
Zonos.paypal = null;
|
|
@@ -472,7 +484,9 @@ Zonos.getZonosUrl = (type) => {
|
|
|
472
484
|
return JS_DELIVR_ZONOS_URL;
|
|
473
485
|
case 'unpkg':
|
|
474
486
|
return UNPKG_ZONOS_URL;
|
|
475
|
-
|
|
487
|
+
case 'cdnjs':
|
|
488
|
+
return CDNJS_ZONOS_URL;
|
|
489
|
+
case 'vercel':
|
|
476
490
|
return ZONOS_URL;
|
|
477
491
|
}
|
|
478
492
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-8fc9ceb2.js';
|
|
2
|
-
import { w as handleFetch, d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval, x as jsonParse } from './cart-
|
|
2
|
+
import { w as handleFetch, d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval, x as jsonParse } from './cart-c62e41b5.js';
|
|
3
3
|
import { t as tinycolor } from './isDarkColor-3119e351.js';
|
|
4
4
|
import { l as log, a as logError } from './logError-c456c092.js';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as handleFetch, d as cartStore, l as localizationStore } from './cart-
|
|
1
|
+
import { w as handleFetch, d as cartStore, l as localizationStore } from './cart-c62e41b5.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-8fc9ceb2.js';
|
|
3
3
|
|
|
4
4
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
@@ -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, l as localizationStore, t as translate } from './cart-
|
|
2
|
+
import { j as stripeStore, l as localizationStore, t as translate } from './cart-c62e41b5.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
4
|
import { a as logError } from './logError-c456c092.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
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, F as currencyFormat, G as cartStoreHasOneEligibleItem, t as translate, w as handleFetch, u as stripeStoreReset, j as stripeStore, H as stripeStoreRetrievePayment, I as stripeStoreMessageBasedOnStatus, l as localizationStore, J as stripeStoreTranslateAddressToLatin, K as cartStoreUpdateSelectedShippingOption, L as cartStoreGetShippingTransitInfo } from './cart-
|
|
2
|
+
import { d as cartStore, F as currencyFormat, G as cartStoreHasOneEligibleItem, t as translate, w as handleFetch, u as stripeStoreReset, j as stripeStore, H as stripeStoreRetrievePayment, I as stripeStoreMessageBasedOnStatus, l as localizationStore, J as stripeStoreTranslateAddressToLatin, K as cartStoreUpdateSelectedShippingOption, L as cartStoreGetShippingTransitInfo } from './cart-c62e41b5.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-28d21865.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
6
|
-
import { t as trackConversionEvent, s as sendErrorLog, c as createCustomEvent, g as getIsTestMode } from './sendErrorLog-
|
|
6
|
+
import { t as trackConversionEvent, s as sendErrorLog, c as createCustomEvent, g as getIsTestMode } from './sendErrorLog-af1cd4bd.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-3ba98361.js';
|
|
8
8
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
9
9
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
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 stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreHandleInventoryCheck, r as stripeStoreConfirmPayment, u as stripeStoreReset, v 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 stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreHandleInventoryCheck, r as stripeStoreConfirmPayment, u as stripeStoreReset, v as localizationStoreOnUpdate } from './cart-c62e41b5.js';
|
|
3
|
+
import { s as submitGtag, p as paypalInitScript } from './paypal-28d21865.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-8fc9ceb2.js';
|
|
5
|
-
import { c as createCustomEvent, s as sendErrorLog, t as trackConversionEvent, g as getIsTestMode } from './sendErrorLog-
|
|
5
|
+
import { c as createCustomEvent, s as sendErrorLog, t as trackConversionEvent, g as getIsTestMode } from './sendErrorLog-af1cd4bd.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
7
7
|
import { l as log, a as logError } from './logError-c456c092.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { w as handleFetch, y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { w as handleFetch, y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-c62e41b5.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { a as logError, l as log } from './logError-c456c092.js';
|
|
5
5
|
import './isDarkColor-3119e351.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-c62e41b5.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './logError-c456c092.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, t as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-c62e41b5.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-3119e351.js';
|
|
@@ -1818,7 +1818,7 @@ const ZonosCountrySelect = class {
|
|
|
1818
1818
|
componentDidRender() {
|
|
1819
1819
|
var _a, _b;
|
|
1820
1820
|
// focus the input on render
|
|
1821
|
-
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-
|
|
1821
|
+
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-input')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1822
1822
|
}
|
|
1823
1823
|
render() {
|
|
1824
1824
|
const { helloCountryList } = localizationStore;
|
|
@@ -1833,9 +1833,9 @@ const ZonosCountrySelect = class {
|
|
|
1833
1833
|
? fuseObject.map(country => country.item)
|
|
1834
1834
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1835
1835
|
const isEmpty = !filteredCountries.length;
|
|
1836
|
-
return (h(Host, { key: '
|
|
1836
|
+
return (h(Host, { key: 'd6d6a0736660d0c6e76f749f8ea78a8c95825b88', class: "zonos--elements", style: {
|
|
1837
1837
|
'--font-family': zonosStoreFontFamily(),
|
|
1838
|
-
} }, h("div", { key: '
|
|
1838
|
+
} }, h("div", { key: '0bc3773965c49f0ee4da2056b6acc0ae361e227a', class: "zonos--country-select" }, h("zonos-v-stack", { key: '9e00877189dc39b789861c0425702d276cdad410', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '9c098afdf6db8ef8e18dc855e19ab6d45b7db8be', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '10c59b07a42da02fb348e289dc0211ae33b96638', autocomplete: "off", autofocus: "autofocus", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), value: this.inputValue }))), h("div", { key: 'fec8fb874726377a3c4a03ac5d264fc7d8a94a21', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: '182fb6955798519e63d63121752bc65ac6045770', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '3ccda154b37344857595d65ce3131ca6d2610a11', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
|
|
1839
1839
|
const country = filteredCountries[index];
|
|
1840
1840
|
if (!country) {
|
|
1841
1841
|
return null;
|
|
@@ -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 { t as translate, l as localizationStore, F as currencyFormat } from './cart-
|
|
2
|
+
import { t as translate, l as localizationStore, F as currencyFormat } from './cart-c62e41b5.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
@@ -58,7 +58,6 @@ const dutyTaxMessage_AU_lowValueGST = `${translate('The low-value GST law passed
|
|
|
58
58
|
href: 'https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst',
|
|
59
59
|
text: translate('Learn more.'),
|
|
60
60
|
})}`;
|
|
61
|
-
const inclusivePriceMessage = translate('Product prices already include duties, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions.');
|
|
62
61
|
const ZonosHelloDialog = class {
|
|
63
62
|
constructor(hostRef) {
|
|
64
63
|
registerInstance(this, hostRef);
|
|
@@ -96,7 +95,8 @@ const ZonosHelloDialog = class {
|
|
|
96
95
|
return (_a = localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
|
|
97
96
|
};
|
|
98
97
|
this.hasInclusivePrices = () => {
|
|
99
|
-
|
|
98
|
+
var _a;
|
|
99
|
+
return ((_a = localizationStore.inclusivePricing) === null || _a === void 0 ? void 0 : _a.status) === 'ENABLED';
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
102
|
* Some countries don't have threshold. So we need to show generic message for them
|
|
@@ -149,7 +149,7 @@ const ZonosHelloDialog = class {
|
|
|
149
149
|
];
|
|
150
150
|
};
|
|
151
151
|
this.getAustraliaDutyTaxMessage = (landedCost) => {
|
|
152
|
-
if (
|
|
152
|
+
if (this.hasInclusivePrices()) {
|
|
153
153
|
return [dutyTaxMessage_AU_lowValueGST];
|
|
154
154
|
}
|
|
155
155
|
return [
|
|
@@ -160,7 +160,7 @@ const ZonosHelloDialog = class {
|
|
|
160
160
|
];
|
|
161
161
|
};
|
|
162
162
|
this.getNewZealandDutyTaxMessge = (landedCost) => {
|
|
163
|
-
if (
|
|
163
|
+
if (this.hasInclusivePrices()) {
|
|
164
164
|
return null;
|
|
165
165
|
}
|
|
166
166
|
return [
|
|
@@ -170,6 +170,39 @@ const ZonosHelloDialog = class {
|
|
|
170
170
|
}),
|
|
171
171
|
];
|
|
172
172
|
};
|
|
173
|
+
this.getInclusivePriceMessage = () => {
|
|
174
|
+
const setting = localizationStore.inclusivePricing;
|
|
175
|
+
if ((setting === null || setting === void 0 ? void 0 : setting.status) !== 'ENABLED') {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
179
|
+
setting.tax.status === 'INCLUDED' &&
|
|
180
|
+
setting.fee.status === 'INCLUDED') {
|
|
181
|
+
return translate('Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.');
|
|
182
|
+
}
|
|
183
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
184
|
+
setting.tax.status === 'INCLUDED') {
|
|
185
|
+
return translate('Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.');
|
|
186
|
+
}
|
|
187
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
188
|
+
setting.fee.status === 'INCLUDED') {
|
|
189
|
+
return translate('Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.');
|
|
190
|
+
}
|
|
191
|
+
if (setting.tax.status === 'INCLUDED' &&
|
|
192
|
+
setting.fee.status === 'INCLUDED') {
|
|
193
|
+
return translate('Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.');
|
|
194
|
+
}
|
|
195
|
+
if (setting.duty.status === 'INCLUDED') {
|
|
196
|
+
return translate('Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.');
|
|
197
|
+
}
|
|
198
|
+
if (setting.tax.status === 'INCLUDED') {
|
|
199
|
+
return translate('Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.');
|
|
200
|
+
}
|
|
201
|
+
if (setting.fee.status === 'INCLUDED') {
|
|
202
|
+
return translate('Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.');
|
|
203
|
+
}
|
|
204
|
+
return null;
|
|
205
|
+
};
|
|
173
206
|
/**
|
|
174
207
|
* Get additional duty tax message if selected country has tax id
|
|
175
208
|
*/
|
|
@@ -216,6 +249,7 @@ const ZonosHelloDialog = class {
|
|
|
216
249
|
var _a;
|
|
217
250
|
const { selectedCountryCode } = localizationStore;
|
|
218
251
|
const hasInclusivePrices = this.hasInclusivePrices();
|
|
252
|
+
const inclusivePriceMessage = this.getInclusivePriceMessage();
|
|
219
253
|
// If deminimis is undefined or null, assume it's $0
|
|
220
254
|
const dutyDeMinimisMessage = this.getDutyMessage();
|
|
221
255
|
// If deminimis is undefined or null, assume it's $0
|
|
@@ -234,18 +268,18 @@ const ZonosHelloDialog = class {
|
|
|
234
268
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
235
269
|
const currentPage = this.getCurrentPageEnum();
|
|
236
270
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
237
|
-
return (h(Host, { key: '
|
|
271
|
+
return (h(Host, { key: 'df052224c778ebfceeef7c827fa3da0e8a2f3dc9', class: "zonos--elements" }, h("div", { key: '0ecff6a07d24a72fb4f200cce82ab09e40b48baf', class: classes([
|
|
238
272
|
'zonos--hello-dialog',
|
|
239
273
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
240
274
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
241
275
|
!!this.mobileLocationOverride &&
|
|
242
276
|
'zonos--hello-dialog-mobile-override',
|
|
243
277
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
244
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
278
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'b2939d49930c8a34288a884582eb849a492080ff' }, h("div", { key: 'f1a22291d7865d57d37cbcd3c8f70c4aea57ed39', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'ee3794826efc9fed856f0a320cf6428a428b4ea4', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '3d2ff0b68268c97e385eb3cf7fcc34454d2ed3b5', spacing: 24 }, h("zonos-country-flag", { key: 'e09645ac583e59354d11b3c194d4d3f6d4780c55', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '42017a698c1678b90c8c7bbece5d623d0800e37b', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: 'ac30b7683dcc65773159832eadad8542d1d1bda8', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '58cc0e8c51774c339b0fc735e4e98917ed614c8a', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '0b3a3b2bf981ed72654506cc31f07edf6268b0a4', spacing: 8 }, this.restrictedItems.map(item => {
|
|
245
279
|
var _a;
|
|
246
280
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
247
|
-
}), h("zonos-card", { key: '
|
|
248
|
-
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '
|
|
281
|
+
}), h("zonos-card", { key: '196a593b167fc979bf0a2bef7f266ad3778f6ca0', spacing: "12px" }, h("zonos-v-stack", { key: '94925c753ddfdd1a659580f7f78f8d6626cdcdaa', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
282
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '540006185ce1d28d610052801dcf9281773c5504', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '886c371fdfa8c9c15188ef9d6cbb637162fb0d27' }, h("zonos-country-select", { key: '1365bee67831b64637e5c481f239c557f2649694', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '44929f0c23627970b1706f6e8c76e51022201379' }, h("zonos-language-select", { key: '86b9f68c84da77f9e1af51dcb7d512eb6b289a27', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
249
283
|
}
|
|
250
284
|
static get assetsDirs() { return ["assets"]; }
|
|
251
285
|
static get watchers() { return {
|
|
@@ -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-8fc9ceb2.js';
|
|
3
|
-
import { w as handleFetch, l as localizationStore, y as isValidSelector, t as translate, A as getZCountryUrlParam, B as setZCountryUrlParam, C as currencyDisplay, D as currencyConvertAndFormat, E as currencyConvert, F as currencyFormat } from './cart-
|
|
3
|
+
import { w as handleFetch, l as localizationStore, y as isValidSelector, t as translate, A as getZCountryUrlParam, B as setZCountryUrlParam, C as currencyDisplay, D as currencyConvertAndFormat, E as currencyConvert, F as currencyFormat } from './cart-c62e41b5.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { a as logError, l as log } from './logError-c456c092.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 { M as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { M as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-c62e41b5.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
5
5
|
import './logError-c456c092.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement, c as createEvent } from './index-86b8247e.js';
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { j as stripeStore } from './cart-
|
|
4
|
+
import { j as stripeStore } from './cart-c62e41b5.js';
|
|
5
5
|
import { a as logError, l as log } from './logError-c456c092.js';
|
|
6
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
6
|
+
import { d as paypalStoreInitButtons } from './paypal-28d21865.js';
|
|
7
7
|
import './isDarkColor-3119e351.js';
|
|
8
8
|
import './getBorderRadius-3ba98361.js';
|
|
9
9
|
|