@zonos/elements 1.3.26 → 1.3.27
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-7e817cad.js → cart-61caeb84.js} +280 -160
- package/dist/cjs/index.cjs.js +3 -54
- package/dist/cjs/{submitGtag-7e0065da.js → submitGtag-d3898668.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +58 -21
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -20
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +14 -8
- package/dist/collection/components/store/translationStore/strings.base.js +14 -8
- package/dist/collection/components/store/translationStore/strings.chinese.js +14 -8
- package/dist/collection/components/store/translationStore/strings.danish.js +14 -8
- package/dist/collection/components/store/translationStore/strings.dutch.js +14 -8
- package/dist/collection/components/store/translationStore/strings.french.js +14 -8
- package/dist/collection/components/store/translationStore/strings.german.js +14 -8
- package/dist/collection/components/store/translationStore/strings.hebrew.js +14 -8
- package/dist/collection/components/store/translationStore/strings.indonesian.js +14 -8
- package/dist/collection/components/store/translationStore/strings.italian.js +14 -8
- package/dist/collection/components/store/translationStore/strings.japanese.js +14 -8
- package/dist/collection/components/store/translationStore/strings.korean.js +14 -8
- package/dist/collection/components/store/translationStore/strings.norwegian.js +14 -8
- package/dist/collection/components/store/translationStore/strings.polish.js +14 -8
- package/dist/collection/components/store/translationStore/strings.portuguese.js +14 -8
- package/dist/collection/components/store/translationStore/strings.russian.js +14 -8
- package/dist/collection/components/store/translationStore/strings.spanish.js +14 -8
- package/dist/collection/components/store/translationStore/strings.swedish.js +14 -8
- package/dist/collection/components/store/translationStore/strings.turkish.js +14 -8
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +14 -8
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/wrapStringWithLink.js +3 -0
- package/dist/collection/scripts/_zonosBase.js +0 -51
- package/dist/esm/{cart-13e6a811.js → cart-530a8750.js} +280 -160
- package/dist/esm/index.js +3 -54
- package/dist/esm/{submitGtag-c8bb6f2e.js → submitGtag-44ba0846.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +1 -1
- package/dist/esm/zonos-cart-items_12.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +58 -21
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +2 -2
- package/dist/esm-es5/cart-530a8750.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{submitGtag-c8bb6f2e.js → submitGtag-44ba0846.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.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_3.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-payment.entry.js +1 -1
- package/dist/scripts/index.d.ts +0 -1
- 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-dialog/zonos-hello-dialog.d.ts +8 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.base.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.danish.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.french.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.german.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.italian.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.korean.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.polish.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.russian.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +13 -7
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +13 -7
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/wrapStringWithLink.d.ts +4 -0
- package/dist/types/scripts/_zonosBase.d.ts +0 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-094bfe56.system.entry.js +1 -0
- package/dist/zonos-elements/{p-60621085.entry.js → p-099e229a.entry.js} +1 -1
- package/dist/zonos-elements/{p-b88e52b5.entry.js → p-11f87d7d.entry.js} +1 -1
- package/dist/zonos-elements/{p-f7e2d33b.system.entry.js → p-18d04e89.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-492b8e12.entry.js → p-2a5a0bae.entry.js} +1 -1
- package/dist/zonos-elements/{p-e975b187.entry.js → p-35d00c30.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e488bff.entry.js → p-37685139.entry.js} +1 -1
- package/dist/zonos-elements/{p-452ed1a7.entry.js → p-4eaae82e.entry.js} +1 -1
- package/dist/zonos-elements/p-5d006b02.system.js +1 -0
- package/dist/zonos-elements/{p-eea8111c.system.entry.js → p-5f580c9b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-99da2348.entry.js → p-687dbccc.entry.js} +1 -1
- package/dist/zonos-elements/{p-a5d823d3.system.entry.js → p-68dfcd25.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3baf7a18.entry.js → p-6fe27968.entry.js} +1 -1
- package/dist/zonos-elements/{p-58edaab6.system.entry.js → p-7b5a0a18.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3e61deb.system.entry.js → p-84f7a3a2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-43c1dd27.system.entry.js → p-a5704be4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b4ccc72c.js +1 -0
- package/dist/zonos-elements/{p-eabe2abc.js → p-bb032c2f.js} +1 -1
- package/dist/zonos-elements/p-c4154737.system.js +1 -0
- package/dist/zonos-elements/{p-094c7343.system.entry.js → p-cbed004d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-089c3737.system.entry.js → p-e15ef12e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2011cb03.entry.js → p-e3978982.entry.js} +1 -1
- package/dist/zonos-elements/{p-cab01f64.system.entry.js → p-ecd994c8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fb1120a2.system.js +1 -0
- package/dist/zonos-elements/p-fb1b98a8.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-13e6a811.js +0 -1
- package/dist/zonos-elements/p-121be462.system.js +0 -1
- package/dist/zonos-elements/p-1f2077df.entry.js +0 -1
- package/dist/zonos-elements/p-74488e31.system.js +0 -1
- package/dist/zonos-elements/p-875a311d.js +0 -1
- package/dist/zonos-elements/p-d1771035.system.js +0 -1
- package/dist/zonos-elements/p-e80a5ed7.system.entry.js +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -232,8 +232,8 @@ const zonosLoadUrl = (() => {
|
|
|
232
232
|
}
|
|
233
233
|
return null;
|
|
234
234
|
})();
|
|
235
|
-
const ZONOS_URL = zonosLoadUrl || "https://v1.3.
|
|
236
|
-
const JS_DELIVR_ZONOS_URL = "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
235
|
+
const ZONOS_URL = zonosLoadUrl || "https://v1.3.27.js.zonos.com";
|
|
236
|
+
const JS_DELIVR_ZONOS_URL = "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.27";
|
|
237
237
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
238
238
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
239
239
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -252,7 +252,7 @@ Zonos.isBigCommerce = false;
|
|
|
252
252
|
*/
|
|
253
253
|
Zonos.isNpm = true;
|
|
254
254
|
Zonos.zonosQaUrl = null;
|
|
255
|
-
Zonos.version = `v${"1.3.
|
|
255
|
+
Zonos.version = `v${"1.3.27"}`;
|
|
256
256
|
Zonos.modeAlerted = false;
|
|
257
257
|
Zonos.tempCartData = null;
|
|
258
258
|
Zonos.getCurrentTimestamp = () => new Date().getTime();
|
|
@@ -270,8 +270,6 @@ Zonos.init = async ({ appearance, checkoutSettings, currencyConverter, helloSett
|
|
|
270
270
|
_a.zonosApiKey = zonosApiKey;
|
|
271
271
|
_a.storeId = storeId;
|
|
272
272
|
log('init zonos');
|
|
273
|
-
// add sentry to the project
|
|
274
|
-
_a.injectSentryScript();
|
|
275
273
|
// inject zonos cdn
|
|
276
274
|
_a.injectZonosCdn();
|
|
277
275
|
// inject css for zonos elements
|
|
@@ -398,55 +396,6 @@ Zonos.injectController = ({ config, zonosApiKey, }) => {
|
|
|
398
396
|
_a.zonosController = zonosController;
|
|
399
397
|
log('Zonos controller injected!');
|
|
400
398
|
};
|
|
401
|
-
Zonos.injectSentryScript = () => {
|
|
402
|
-
const scriptUrl = 'https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js';
|
|
403
|
-
const findScript = () => {
|
|
404
|
-
const script = document.querySelector(`script[src="${scriptUrl}"]`);
|
|
405
|
-
return !!script;
|
|
406
|
-
};
|
|
407
|
-
if (findScript()) {
|
|
408
|
-
log('Sentry script already exists in the document', 'warn');
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
const headOrBody = document.head || document.body;
|
|
412
|
-
// init zonos elements when the zonosKey is valid
|
|
413
|
-
// inject esmodule cdn for zonos elements
|
|
414
|
-
const script = document.createElement('script');
|
|
415
|
-
script.crossOrigin = 'anonymous';
|
|
416
|
-
script.src = scriptUrl;
|
|
417
|
-
script.integrity =
|
|
418
|
-
'sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l';
|
|
419
|
-
script.setAttribute('data-lazy', 'no');
|
|
420
|
-
script.onerror = () => {
|
|
421
|
-
logError(`Failed to load ${script.src}`);
|
|
422
|
-
};
|
|
423
|
-
script.onload = () => {
|
|
424
|
-
var _b;
|
|
425
|
-
(_b = window.Sentry) === null || _b === void 0 ? void 0 : _b.init({
|
|
426
|
-
beforeSend(event) {
|
|
427
|
-
var _b, _c, _d, _e, _f, _g;
|
|
428
|
-
// only send error to sentry if it's from zonos production
|
|
429
|
-
const firstExceptionFilename = (_g = (_f = (_e = (_d = (_c = (_b = event.exception) === null || _b === void 0 ? void 0 : _b.values) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.stacktrace) === null || _e === void 0 ? void 0 : _e.frames) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.filename;
|
|
430
|
-
const isZonosProduction = (firstExceptionFilename === null || firstExceptionFilename === void 0 ? void 0 : firstExceptionFilename.includes('js.zonos.com')) ||
|
|
431
|
-
(firstExceptionFilename === null || firstExceptionFilename === void 0 ? void 0 : firstExceptionFilename.includes('@zonos/elements'));
|
|
432
|
-
const isDevelopmentHref = window.location.href.includes('dev.elements') ||
|
|
433
|
-
window.location.href.includes('route.js.zonos.com');
|
|
434
|
-
// don't send error to sentry if the errors are in development href
|
|
435
|
-
if (isZonosProduction && !isDevelopmentHref) {
|
|
436
|
-
return event;
|
|
437
|
-
}
|
|
438
|
-
return null;
|
|
439
|
-
},
|
|
440
|
-
dsn: 'https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760',
|
|
441
|
-
ignoreErrors: ['Failed to load Stripe.js'],
|
|
442
|
-
release: `zonos-elements@${_a.version}`,
|
|
443
|
-
tracesSampler: () => {
|
|
444
|
-
return 0.01;
|
|
445
|
-
},
|
|
446
|
-
});
|
|
447
|
-
};
|
|
448
|
-
headOrBody.appendChild(script);
|
|
449
|
-
};
|
|
450
399
|
Zonos.injectScript = ({ fallBackDomain, isModule, scriptDomain, theRestUrl, }) => {
|
|
451
400
|
const fullScriptUrl = `${scriptDomain}/${theRestUrl}`;
|
|
452
401
|
const findScript = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as handleFetch, d as cartStore, l as localizationStore } from './cart-
|
|
1
|
+
import { r as handleFetch, d as cartStore, l as localizationStore } from './cart-530a8750.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-ba9e541e.js';
|
|
3
3
|
import { l as log } from './logError-c456c092.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { h as stripeStore, l as localizationStore, t as translate } from './cart-
|
|
2
|
+
import { h as stripeStore, l as localizationStore, t as translate } from './cart-530a8750.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';
|
|
@@ -143,7 +143,7 @@ const ZonosAddress = class {
|
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
145
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: '5279ab1ec41882e2b47adbb9074da302caeda979', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'e66644c9dfbeb56c54b8914cecfba5cee3023399', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'a7ca990d5c5c5a59edd6d6bf35a4594fb8dfe5d4', class: "zonos--address-component" })));
|
|
147
147
|
}
|
|
148
148
|
get el() { return getElement(this); }
|
|
149
149
|
static get watchers() { return {
|
|
@@ -631,7 +631,7 @@ const ZonosLinkAuthentication = class {
|
|
|
631
631
|
}
|
|
632
632
|
render() {
|
|
633
633
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
634
|
-
return (h(Host, { key: '
|
|
634
|
+
return (h(Host, { key: '153724937e64d3fdf4360648cefc4548b602e87a', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: 'ac9896dff5fd7acb29d81eebeb9e65a47d65b7fb', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'aca720a9382f63f248e3a2c382e5c61e52750bdf', class: "zonos--link-authentication-component" })));
|
|
635
635
|
}
|
|
636
636
|
get el() { return getElement(this); }
|
|
637
637
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { H as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-
|
|
4
|
+
import { H as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-530a8750.js';
|
|
5
5
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
6
6
|
import './logError-c456c092.js';
|
|
7
7
|
import './isDarkColor-f8324c10.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { d as cartStore, B as currencyFormat, C as cartStoreHasOneEligibleItem, t as translate, r as handleFetch, p as stripeStoreReset, h as stripeStore, D as stripeStoreRetrievePayment, l as localizationStore, E as stripeStoreTranslateAddressToLatin, F as cartStoreUpdateSelectedShippingOption, G as cartStoreGetShippingTransitInfo } from './cart-
|
|
2
|
+
import { d as cartStore, B as currencyFormat, C as cartStoreHasOneEligibleItem, t as translate, r as handleFetch, p as stripeStoreReset, h as stripeStore, D as stripeStoreRetrievePayment, l as localizationStore, E as stripeStoreTranslateAddressToLatin, F as cartStoreUpdateSelectedShippingOption, G as cartStoreGetShippingTransitInfo } from './cart-530a8750.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
5
|
-
import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag, c as createCustomEvent } from './submitGtag-
|
|
5
|
+
import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag, c as createCustomEvent } from './submitGtag-44ba0846.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-947c24de.js';
|
|
7
7
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
8
8
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-3b46f3c3.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 stripeStore, j as stripeStoreInitCheckoutSession, k as cartStoreUpdateToErrorState, t as translate, m as stripeStorePrefetchLandedCost, n as cartStoreNextStep, o as stripeStoreConfirmPayment, p as stripeStoreReset, q as localizationStoreOnUpdate } from './cart-
|
|
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 stripeStore, j as stripeStoreInitCheckoutSession, k as cartStoreUpdateToErrorState, t as translate, m as stripeStorePrefetchLandedCost, n as cartStoreNextStep, o as stripeStoreConfirmPayment, p as stripeStoreReset, q as localizationStoreOnUpdate } from './cart-530a8750.js';
|
|
3
3
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-ba9e541e.js';
|
|
4
|
-
import { c as createCustomEvent, s as sendErrorLog, a as submitGtag, t as trackConversionEvent } from './submitGtag-
|
|
4
|
+
import { c as createCustomEvent, s as sendErrorLog, a as submitGtag, t as trackConversionEvent } from './submitGtag-44ba0846.js';
|
|
5
5
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
6
6
|
import { l as log, a as logError } from './logError-c456c092.js';
|
|
7
7
|
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-3b46f3c3.js';
|
|
2
|
-
import { r as handleFetch, u as isValidSelector, h as stripeStore, v as initLocalizationStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { r as handleFetch, u as isValidSelector, h as stripeStore, v as initLocalizationStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-530a8750.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
4
4
|
import { a as logError, l as log } from './logError-c456c092.js';
|
|
5
5
|
import './isDarkColor-f8324c10.js';
|
|
@@ -292,7 +292,7 @@ const ZonosController = class {
|
|
|
292
292
|
zonosStore.organizationName = organizationName;
|
|
293
293
|
}
|
|
294
294
|
render() {
|
|
295
|
-
return h(Host, { key: '
|
|
295
|
+
return h(Host, { key: 'cfacd00a3f5fba372425ec51cf885356353ad909', class: "zonos--elements" });
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-530a8750.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.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-3b46f3c3.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-530a8750.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-f8324c10.js';
|
|
@@ -1879,9 +1879,9 @@ const ZonosHelloDialogFooter = class {
|
|
|
1879
1879
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
1880
1880
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
1881
1881
|
const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
|
|
1882
|
-
return (h(Host, { key: '
|
|
1882
|
+
return (h(Host, { key: 'fe8165b23a8e56d068d00ae0f6caf587094db24f', class: "zonos--elements" }, h("div", { key: '32ee04554a36a2d7017e73425166a914e1e65714', class: "zonos--hello-dialog-footer", style: {
|
|
1883
1883
|
'--primary-color': primaryColor,
|
|
1884
|
-
} }, h("a", { key: '
|
|
1884
|
+
} }, h("a", { key: '9fe05913fae1b739ec763ba32128f9004e3015f5', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'ebea8cf3264c8d75369e1f87a71e97530755f79b', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: '133b9a19a6e1cfc69fa4bf93964307ae546aead6', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'f5f5b8e8750fdf81094caa496b37b6201addab4a', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '454ef914ec4f5d9c4ffa7fdafb91dc25a27221b9', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
1885
1885
|
}
|
|
1886
1886
|
get ele() { return getElement(this); }
|
|
1887
1887
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import {
|
|
2
|
+
import { l as localizationStore, B as currencyFormat, t as translate } from './cart-530a8750.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-ba9e541e.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
@@ -15,6 +15,10 @@ const getHasMoreSpaceAbove = (ref) => {
|
|
|
15
15
|
return availableSpaceAbove >= availableSpaceBelow;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
const wrapStringWithLink = ({ href, text, }) => {
|
|
19
|
+
return `<zonos-link href="${href}" target="_blank" rel="noopener noreferrer">${text}</zonos-link>`;
|
|
20
|
+
};
|
|
21
|
+
|
|
18
22
|
const BagIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
19
23
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>
|
|
20
24
|
</svg>
|
|
@@ -70,6 +74,23 @@ const ZonosHelloDialog = class {
|
|
|
70
74
|
this.setShowLanguageSelect = async (value) => {
|
|
71
75
|
this.showLanguageSelect = value;
|
|
72
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Store has tax id setup in Zonos settings
|
|
79
|
+
*/
|
|
80
|
+
this.hasTaxId = () => {
|
|
81
|
+
var _a;
|
|
82
|
+
return (_a = localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Some countries don't have threshold. So we need to show generic message for them
|
|
86
|
+
*/
|
|
87
|
+
this.isNoThresholdCountry = (countryCode) => {
|
|
88
|
+
// Only show threshold message if store doesn't have tax id in the settings
|
|
89
|
+
if (!countryCode || !this.hasTaxId()) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return ['AU'].includes(countryCode);
|
|
93
|
+
};
|
|
73
94
|
this.getDutyMessage = () => {
|
|
74
95
|
const { countryLandedCost } = localizationStore;
|
|
75
96
|
// Our Robby API spells deminimis wrong here
|
|
@@ -77,8 +98,11 @@ const ZonosHelloDialog = class {
|
|
|
77
98
|
? currencyFormat({ amount: countryLandedCost.dutyDeminimus })
|
|
78
99
|
: null;
|
|
79
100
|
// If deminimis is undefined or null, assume it's $0
|
|
80
|
-
return dutyDeminimis
|
|
81
|
-
?
|
|
101
|
+
return dutyDeminimis &&
|
|
102
|
+
!this.isNoThresholdCountry(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode)
|
|
103
|
+
? translate('Spend [threshold] duty free', {
|
|
104
|
+
threshold: dutyDeminimis,
|
|
105
|
+
})
|
|
82
106
|
: translate('Duties will apply to all orders');
|
|
83
107
|
};
|
|
84
108
|
this.getTaxMessage = () => {
|
|
@@ -87,8 +111,11 @@ const ZonosHelloDialog = class {
|
|
|
87
111
|
const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
|
|
88
112
|
? currencyFormat({ amount: countryLandedCost.vatTaxDeminimus })
|
|
89
113
|
: null;
|
|
90
|
-
return taxDeminimis
|
|
91
|
-
?
|
|
114
|
+
return taxDeminimis &&
|
|
115
|
+
!this.isNoThresholdCountry(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode)
|
|
116
|
+
? translate('Spend [threshold] tax free', {
|
|
117
|
+
threshold: taxDeminimis,
|
|
118
|
+
})
|
|
92
119
|
: translate('Taxes will apply to all orders');
|
|
93
120
|
};
|
|
94
121
|
this.getUkDutyTaxMessage = (landedCost) => {
|
|
@@ -97,22 +124,31 @@ const ZonosHelloDialog = class {
|
|
|
97
124
|
return null;
|
|
98
125
|
}
|
|
99
126
|
const dutyDeminimis = landedCost.dutyDeminimus;
|
|
100
|
-
return
|
|
101
|
-
countryName
|
|
102
|
-
|
|
103
|
-
|
|
127
|
+
return [
|
|
128
|
+
translate('Orders to [countryName] must be over [threshold] to ship.', {
|
|
129
|
+
countryName: 'United Kingdom',
|
|
130
|
+
threshold: currencyFormat({ amount: dutyDeminimis }),
|
|
131
|
+
}),
|
|
132
|
+
];
|
|
104
133
|
};
|
|
105
134
|
this.getAustraliaDutyTaxMessage = (landedCost) => {
|
|
106
|
-
return
|
|
107
|
-
percentage
|
|
108
|
-
|
|
109
|
-
|
|
135
|
+
return [
|
|
136
|
+
translate('Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders', {
|
|
137
|
+
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
138
|
+
}),
|
|
139
|
+
`${translate('The low-value GST law passed July 1st, 2018 applies to this retailer.')} ${wrapStringWithLink({
|
|
140
|
+
href: 'https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst',
|
|
141
|
+
text: translate('Learn more.'),
|
|
142
|
+
})}`,
|
|
143
|
+
];
|
|
110
144
|
};
|
|
111
145
|
this.getNewZealandDutyTaxMessge = (landedCost) => {
|
|
112
|
-
return
|
|
113
|
-
percentage
|
|
114
|
-
|
|
115
|
-
|
|
146
|
+
return [
|
|
147
|
+
translate('[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.', {
|
|
148
|
+
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
149
|
+
threshold: currencyFormat({ amount: landedCost.vatTaxDeminimus }),
|
|
150
|
+
}),
|
|
151
|
+
];
|
|
116
152
|
};
|
|
117
153
|
/**
|
|
118
154
|
* Get additional duty tax message if selected country has tax id
|
|
@@ -122,7 +158,7 @@ const ZonosHelloDialog = class {
|
|
|
122
158
|
return null;
|
|
123
159
|
}
|
|
124
160
|
// only show the message if the store has a tax id for selected country
|
|
125
|
-
if (!
|
|
161
|
+
if (!this.hasTaxId()) {
|
|
126
162
|
return null;
|
|
127
163
|
}
|
|
128
164
|
switch (localizationStore.countryLandedCost.countryCode) {
|
|
@@ -177,17 +213,18 @@ const ZonosHelloDialog = class {
|
|
|
177
213
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
178
214
|
const currentPage = this.getCurrentPageEnum();
|
|
179
215
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
180
|
-
return (h(Host, { key: '
|
|
216
|
+
return (h(Host, { key: 'bb2b080aaba7b85599b7e6bcb7cabee70863070f', class: "zonos--elements" }, h("div", { key: 'aabdbd8c4b47f759396d1a56fac426570385768d', "aria-hidden": "true", class: classes([
|
|
181
217
|
'zonos--hello-dialog',
|
|
182
218
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
183
219
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
184
220
|
!!this.mobileLocationOverride &&
|
|
185
221
|
'zonos--hello-dialog-mobile-override',
|
|
186
222
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
187
|
-
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
223
|
+
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'd9189f1ced79d3d3fd11c99ea1407e7b83a2573b' }, h("div", { key: '83ac2ab3583935ececea8be98ab64559d802725a', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '4f36dea145e751d63a2d0df3f472ffe674fbb580', 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: 'e8a7cebe4ca88da80b974e3a3536714fe4da47c1', spacing: 24 }, h("zonos-country-flag", { key: 'e02c72135b9c7e9e533fc46c8f4b286ba1cb1b63', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '7d199c0a5f465fe1640e690d2712f11a80e1f378', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '97bf6611bd485ace8ad9b94c3520148ae0d1eab0', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: 'c1e524bf689f34aed978f350676ffa957724176f', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '81a2fabb2f6c2d853f2f6619f7c6829754d80a59', spacing: 8 }, this.restrictedItems.map(item => {
|
|
188
224
|
var _a;
|
|
189
225
|
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)))));
|
|
190
|
-
}), h("zonos-card", { key: '
|
|
226
|
+
}), h("zonos-card", { key: '29ba8b81746a696ca43b88daa89a7c85af5a2b34', spacing: "12px" }, h("zonos-v-stack", { key: '8f4e79efe07a4c7c1b493178c952bfe61a151f0c', spacing: 12 }, h("div", { key: 'a17eda2b103d376f7ca8a9b528d613195b3a1fe7', class: "zonos--flex-message" }, h("zonos-icon", { key: '13c828d956198211a1fbda77840f8b91692d1582', "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", { key: 'c38511e16905f169b821d0cd8d98dee80a7c1de1' }, dutyDeMinimisMessage)), h("div", { key: '9b3165d870419732d4be1421336326f8d4e98547', class: "zonos--flex-message" }, h("zonos-icon", { key: '46248b95b97a3ec74ffc038dda29ca74a1e700c2', "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", { key: '1d698d83f9fa43746de870553d1ba1c09389aefb' }, taxDeMinimisMessage)), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
227
|
+
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: 'fcc21cc1e8b3de45af03c64ffc95dc2ab6f57bf3', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'bbf019b27e6da7aa3256f14bf928aae26ca92f54' }, h("zonos-country-select", { key: 'a70d55e1872ec626e8446866dbad3aafca69790c', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '77f63941fcbb3bc0c668a61aa48ca2e60b8addeb' }, h("zonos-language-select", { key: '57a4d06c098662b00c3587f3b2290552dc04f2fe', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
191
228
|
}
|
|
192
229
|
static get assetsDirs() { return ["assets"]; }
|
|
193
230
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-3b46f3c3.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-ba9e541e.js';
|
|
3
|
-
import { r as handleFetch, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-
|
|
3
|
+
import { r as handleFetch, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-530a8750.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, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { h as stripeStore } from './cart-
|
|
2
|
+
import { h as stripeStore } from './cart-530a8750.js';
|
|
3
3
|
import { a as logError } from './logError-c456c092.js';
|
|
4
4
|
import './zonosStore-ba9e541e.js';
|
|
5
5
|
import './isDarkColor-f8324c10.js';
|
|
@@ -41,7 +41,7 @@ const ZonosPayment = class {
|
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
43
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: 'abebca876eac8bd507fcbdb1c029d2ed0f3b749a', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: '142257f2052337206dbb70e70c87b5207f2bd97a', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: 'c55bbaea79a291e45d8ed37d556529365de89e9f', class: "zonos--payment-component" })));
|
|
45
45
|
}
|
|
46
46
|
get el() { return getElement(this); }
|
|
47
47
|
static get watchers() { return {
|