@zonos/elements 1.3.138 → 1.3.140
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-efd80d55.js → cart-e1b59d03.js} +280 -41
- package/dist/cjs/index.cjs.js +12 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-50e03778.js → paypal-86cc51e4.js} +13 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +10 -10
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +94 -26
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- 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_4.cjs.entry.js +9 -9
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +19 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +24 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +23 -11
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +11 -4
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +1 -1
- 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 +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/paypal.js +14 -1
- package/dist/collection/components/store/checkout/stripe.js +9 -0
- package/dist/collection/components/store/hello/localization.js +3 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +11 -2
- package/dist/collection/components/store/translationStore/strings.base.js +11 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +11 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +11 -2
- package/dist/collection/components/store/translationStore/strings.french.js +11 -2
- package/dist/collection/components/store/translationStore/strings.german.js +11 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +11 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +11 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +11 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +11 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +11 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +11 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +11 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +11 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +11 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +11 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/getCheckoutSession.js +14 -0
- package/dist/collection/components/utils/resetToSelectedTab.js +17 -0
- package/dist/collection/components/utils/validateCheckoutSession.js +39 -0
- package/dist/collection/scripts/_zonosBase.js +5 -6
- package/dist/esm/{cart-f0bf7202.js → cart-709f053f.js} +281 -43
- package/dist/esm/index.js +12 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-65d40ba3.js → paypal-77a60c44.js} +13 -1
- package/dist/esm/zonos-address_7.entry.js +10 -10
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +4 -4
- package/dist/esm/zonos-cart-items_13.entry.js +94 -26
- package/dist/esm/zonos-checkout.entry.js +5 -3
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +1 -1
- 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_4.entry.js +9 -9
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +4 -4
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/cart-709f053f.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/paypal-77a60c44.js +17 -0
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.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-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-component.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-elements.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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -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/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +6 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +10 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +10 -1
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getCheckoutSession.d.ts +9 -0
- package/dist/types/components/utils/resetToSelectedTab.d.ts +12 -0
- package/dist/types/components/utils/validateCheckoutSession.d.ts +9 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +5 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +112 -0
- package/dist/types/types/generated/graphql.internal.types.ts +102 -1
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-bbd5119f.entry.js → p-00d4bff1.entry.js} +1 -1
- package/dist/zonos-elements/p-010f5797.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7b34be6e.system.entry.js → p-01ad5be8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-856bf7a4.entry.js → p-04a6a167.entry.js} +1 -1
- package/dist/zonos-elements/{p-b500f0d1.system.entry.js → p-0aee2e4c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0c027d2e.entry.js +1 -0
- package/dist/zonos-elements/{p-59d0f69b.system.entry.js → p-1c4ff7b2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1af0a800.system.entry.js → p-22d69480.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d2a77699.system.entry.js → p-25c7e4fa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-26b24d0b.system.js +1 -0
- package/dist/zonos-elements/{p-ba26fc96.system.entry.js → p-289ded20.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9c4e557.entry.js → p-35b8dcde.entry.js} +1 -1
- package/dist/zonos-elements/{p-acae88db.entry.js → p-3a26cae5.entry.js} +1 -1
- package/dist/zonos-elements/{p-1360c4b5.system.entry.js → p-3dd503fd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-24488838.system.entry.js → p-4319600a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1393d259.system.entry.js → p-461624ce.system.entry.js} +1 -1
- package/dist/zonos-elements/p-49e4ca08.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e44ab8b8.entry.js → p-5c32689e.entry.js} +1 -1
- package/dist/zonos-elements/{p-47efac28.system.entry.js → p-64a04391.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6b0aa1bb.system.js +17 -0
- package/dist/zonos-elements/{p-22d099fb.system.entry.js → p-7a60deef.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84df573a.entry.js → p-7acf6802.entry.js} +1 -1
- package/dist/zonos-elements/{p-f9f48476.entry.js → p-7ef573f0.entry.js} +1 -1
- package/dist/zonos-elements/{p-37a127fc.entry.js → p-8368a79e.entry.js} +1 -1
- package/dist/zonos-elements/{p-5775cd68.system.entry.js → p-87ed2e17.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ac0f941.system.entry.js → p-896ab1ed.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c48e735d.system.entry.js → p-896d62a4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8f9affb3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-234b3f74.entry.js → p-9589bd08.entry.js} +1 -1
- package/dist/zonos-elements/{p-22e2f162.entry.js → p-9b59704a.entry.js} +1 -1
- package/dist/zonos-elements/p-a58731ec.system.js +1 -0
- package/dist/zonos-elements/{p-bad5200e.entry.js → p-ad1d6ea2.entry.js} +1 -1
- package/dist/zonos-elements/{p-b9e4e410.entry.js → p-ad4bc6a2.entry.js} +1 -1
- package/dist/zonos-elements/p-afffdfc2.js +1 -0
- package/dist/zonos-elements/{p-4ab4ba81.entry.js → p-b832ec52.entry.js} +1 -1
- package/dist/zonos-elements/{p-f0ce4d90.entry.js → p-b9efc660.entry.js} +1 -1
- package/dist/zonos-elements/p-be2feba6.entry.js +1 -0
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-a0cc4dd2.entry.js → p-cd1fd09e.entry.js} +1 -1
- package/dist/zonos-elements/{p-52a5bd4c.system.entry.js → p-cf72603f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d35376d3.js +17 -0
- package/dist/zonos-elements/{p-95f26bc3.entry.js → p-d633ced9.entry.js} +1 -1
- package/dist/zonos-elements/p-e6c31531.entry.js +1 -0
- package/dist/zonos-elements/{p-de020c11.system.entry.js → p-ee1e1d94.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-be468605.system.entry.js → p-f07c01c5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8880d648.entry.js → p-f2867195.entry.js} +1 -1
- package/dist/zonos-elements/{p-b088f65a.entry.js → p-f8ca3e71.entry.js} +1 -1
- package/dist/zonos-elements/{p-c0719959.system.entry.js → p-ffe4a999.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +2 -1
- package/dist/esm-es5/cart-f0bf7202.js +0 -1
- package/dist/esm-es5/paypal-65d40ba3.js +0 -17
- package/dist/zonos-elements/p-09636917.js +0 -1
- package/dist/zonos-elements/p-128b1b70.system.entry.js +0 -1
- package/dist/zonos-elements/p-31a776aa.system.entry.js +0 -1
- package/dist/zonos-elements/p-4628832d.system.js +0 -1
- package/dist/zonos-elements/p-58983c97.entry.js +0 -1
- package/dist/zonos-elements/p-6e24b0cf.system.js +0 -17
- package/dist/zonos-elements/p-845ad2b8.js +0 -17
- package/dist/zonos-elements/p-8e25910c.entry.js +0 -1
- package/dist/zonos-elements/p-b6005449.system.entry.js +0 -1
- package/dist/zonos-elements/p-c5bff157.entry.js +0 -1
- package/dist/zonos-elements/p-e309e4a3.system.js +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -124,7 +124,7 @@ const getZonosQaUrl = () => {
|
|
|
124
124
|
return null;
|
|
125
125
|
}
|
|
126
126
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
127
|
-
const cdnUrl = "https://v1.3.
|
|
127
|
+
const cdnUrl = "https://v1.3.140.js.zonos.com";
|
|
128
128
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
129
129
|
if (!qaUrl &&
|
|
130
130
|
(cdnUrl.includes('test.') ||
|
|
@@ -308,13 +308,12 @@ 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.
|
|
315
|
-
const INTER_FONT_URL = 'https://rsms.me';
|
|
311
|
+
const ZONOS_URL = "https://v1.3.140.js.zonos.com";
|
|
312
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.140";
|
|
313
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.140";
|
|
314
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.140";
|
|
316
315
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
317
|
-
const
|
|
316
|
+
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
318
317
|
class Zonos {
|
|
319
318
|
}
|
|
320
319
|
_a = Zonos;
|
|
@@ -326,7 +325,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
326
325
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
327
326
|
Zonos._paypalMockResponse = null;
|
|
328
327
|
Zonos.isBigCommerce = false;
|
|
329
|
-
Zonos.releaseDate = "
|
|
328
|
+
Zonos.releaseDate = "1734113749964";
|
|
330
329
|
Zonos.isLegacyCheckout = false;
|
|
331
330
|
Zonos.domain = typeof window !== 'undefined'
|
|
332
331
|
? // domain that embeds the iframe
|
|
@@ -342,7 +341,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
342
341
|
Zonos.isNpm = true;
|
|
343
342
|
Zonos.zonosQaUrl = null;
|
|
344
343
|
Zonos.zonosQaUrlApi = null;
|
|
345
|
-
Zonos.version = `v${"1.3.
|
|
344
|
+
Zonos.version = `v${"1.3.140"}`;
|
|
346
345
|
Zonos.modeAlerted = false;
|
|
347
346
|
Zonos.cartData = null;
|
|
348
347
|
Zonos.paypal = null;
|
|
@@ -672,13 +671,13 @@ Zonos.injectZonosCss = () => {
|
|
|
672
671
|
};
|
|
673
672
|
Zonos.injectFonts = () => {
|
|
674
673
|
const findFont = () => {
|
|
675
|
-
const links = document.querySelectorAll(`link[rel="stylesheet"][href^="${
|
|
674
|
+
const links = document.querySelectorAll(`link[rel="stylesheet"][href^="${GOOGLE_FONT_URL}"]`);
|
|
676
675
|
for (let i = 0; i < links.length; i++) {
|
|
677
676
|
const link = links[i];
|
|
678
677
|
if (!link) {
|
|
679
678
|
continue;
|
|
680
679
|
}
|
|
681
|
-
if (
|
|
680
|
+
if (GOOGLE_FONT_REGEX.test(link.href)) {
|
|
682
681
|
continue;
|
|
683
682
|
}
|
|
684
683
|
return link;
|
|
@@ -693,12 +692,12 @@ Zonos.injectFonts = () => {
|
|
|
693
692
|
// inject font css for zonos elements
|
|
694
693
|
const fontPreconnect = document.createElement('link');
|
|
695
694
|
fontPreconnect.rel = 'preconnect';
|
|
696
|
-
fontPreconnect.href =
|
|
695
|
+
fontPreconnect.href = GOOGLE_FONT_URL;
|
|
697
696
|
headOrBody.appendChild(fontPreconnect);
|
|
698
697
|
// inject font css for zonos elements
|
|
699
698
|
const font = document.createElement('link');
|
|
700
699
|
font.rel = 'stylesheet';
|
|
701
|
-
font.href = `${
|
|
700
|
+
font.href = `${GOOGLE_FONT_URL}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`;
|
|
702
701
|
headOrBody.appendChild(font);
|
|
703
702
|
log('Zonos font injected!');
|
|
704
703
|
};
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy(JSON.parse("[[\"zonos-checkout\",[[2,\"zonos-checkout\",{\"appearanceSettingsOverride\":[16],\"preview\":[4],\"mobile\":[4],\"defaultAddress\":[16],\"forceDialogOpen\":[4,\"force-dialog-open\"],\"defaultAddressParams\":[32],\"open\":[32],\"stripe\":[32],\"submitLoading\":[32],\"collapseReviewMobile\":[32],\"isAttachError\":[32],\"isMobile\":[32],\"isIframed\":[32],\"zonosReviewRef\":[32],\"storybookPaymentStatusOverride\":[32],\"isLegacyCheckout\":[32],\"confirmDialogOpen\":[32],\"isCartExpired\":[32],\"inventoryCheckErrorMessage\":[32],\"placedOrderInfo\":[32],\"closeDialogHandler\":[64],\"init\":[64],\"setToFinishStep\":[64],\"mockCheckoutSession\":[64]},[[16,\"zonos--init-cart-info\",\"initCartInfoHandler\"],[4,\"keydown\",\"handleKeyPress\"],[9,\"resize\",\"handleWindowResize\"]],{\"appearanceSettingsOverride\":[\"appearanceSettingsOverrideChanged\",\"handleAppearanceSettingsOverrideChange\"],\"mobile\":[\"handleMobileChange\"],\"defaultAddress\":[\"handleAddressChange\"],\"open\":[\"handleOpenChange\"]}]]],[\"zonos-hello\",[[1,\"zonos-hello\",{\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettingsOverride\":[16],\"showPeekMessage\":[32],\"zonosStoreHelloSettings\":[32],\"showDialog\":[32],\"peekMessage\":[32],\"initialUrl\":[32],\"allRestrictedItems\":[32],\"allFoundProducts\":[32],\"productsOnPage\":[32],\"isHelloWidgetRendered\":[32],\"isMobile\":[32],\"getCountryList\":[64],\"displayCurrency\":[64],\"convertAndFormat\":[64],\"convert\":[64],\"format\":[64],\"openHelloDialog\":[64]},[[9,\"resize\",\"handleResize\"]],{\"appearanceSettingsOverride\":[\"handleAppearanceSettingsOverrideChange\"]}]]],[\"zonos-controller\",[[1,\"zonos-controller\",{\"config\":[16],\"zonosApiKey\":[1,\"zonos-api-key\"],\"initCheckoutElement\":[64],\"setupGoogleFont\":[64],\"showNotification\":[64],\"reset\":[64],\"overrideConfig\":[64],\"overrideCountry\":[64],\"getAppearanceSetting\":[64],\"updateOrganizationName\":[64]},[[8,\"locationchange\",\"handleLocationChange\"]]]]],[\"zonos-tooltip\",[[1,\"zonos-tooltip\",{\"label\":[1],\"subtitle\":[1],\"showTooltip\":[32]}]]],[\"zonos-component\",[[1,\"zonos-component\",{\"first\":[1],\"middle\":[1],\"last\":[1]}]]],[\"zonos-link\",[[1,\"zonos-link\",{\"href\":[1],\"rel\":[1],\"target\":[1],\"linkTitle\":[1,\"link-title\"]}]]],[\"zonos-logo\",[[1,\"zonos-logo\",{\"theme\":[1],\"width\":[1]}]]],[\"zonos-hello-dialog\",[[1,\"zonos-hello-dialog\",{\"isOpen\":[4,\"is-open\"],\"setIsOpen\":[16],\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettings\":[16],\"restrictedItems\":[16],\"welcomeMessage\":[32],\"showCountrySelect\":[32],\"showLanguageSelect\":[32]},[[4,\"click\",\"globalClickHandler\"]],{\"isOpen\":[\"isOpenHandler\"]}]]],[\"zonos-badge\",[[1,\"zonos-badge\",{\"bold\":[4],\"badgeColor\":[1,\"badge-color\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"rounded\":[4],\"loading\":[4],\"dismissHandler\":[16]}]]],[\"zonos-shipping-rich-radio\",[[1,\"zonos-shipping-rich-radio\",{\"items\":[16],\"borderColor\":[1,\"border-color\"],\"borderStyle\":[1,\"border-style\"],\"theme\":[1],\"selectedItem\":[16]}]]],[\"zonos-toggle\",[[1,\"zonos-toggle\",{\"options\":[16],\"value\":[1]}]]],[\"zonos-collapse\",[[1,\"zonos-collapse\",{\"collapsed\":[4],\"collapseSize\":[2,\"collapse-size\"],\"height\":[32],\"iframe\":[32]}]]],[\"zonos-card\",[[1,\"zonos-card\",{\"actions\":[16],\"backgroundColor\":[1,\"background-color\"],\"borderRadius\":[2,\"border-radius\"],\"footerActions\":[16],\"footerContent\":[16],\"footerHeight\":[2,\"footer-height\"],\"label\":[16],\"spacing\":[1]}]]],[\"zonos-input\",[[1,\"zonos-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"inputSize\":[1,\"input-size\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[32]},null,{\"inputValue\":[\"onInputValueChange\"]}]]],[\"zonos-notification_3\",[[2,\"zonos-payment\",{\"titleText\":[1,\"title-text\"],\"stripe\":[32],\"stripeElements\":[32]},null,{\"stripeElements\":[\"watchInitStripe\"],\"stripe\":[\"watchInitStripe\"]}],[2,\"zonos-paypal-payment\"],[1,\"zonos-notification\",{\"notificationArray\":[32],\"showNotification\":[64]}]]],[\"zonos-banner\",[[1,\"zonos-banner\",{\"bannerTitle\":[1,\"banner-title\"],\"intent\":[1],\"hasContent\":[32]}]]],[\"zonos-country-flag\",[[1,\"zonos-country-flag\",{\"countryCode\":[1,\"country-code\"],\"size\":[2]}]]],[\"zonos-v-stack\",[[1,\"zonos-v-stack\",{\"spacing\":[2]}]]],[\"zonos-text\",[[1,\"zonos-text\",{\"textColor\":[1,\"text-color\"],\"size\":[1],\"type\":[1],\"weight\":[2],\"ready\":[32]}]]],[\"zonos-button_3\",[[17,\"zonos-button\",{\"buttonColor\":[1,\"button-color\"],\"backgroundColor\":[1,\"background-color\"],\"borderStyle\":[1,\"border-style\"],\"isDisabled\":[4,\"is-disabled\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"variant\":[1],\"noBackground\":[4,\"no-background\"],\"withBoxShadow\":[4,\"with-box-shadow\"],\"noPaddingLeft\":[4,\"no-padding-left\"],\"noPaddingRight\":[4,\"no-padding-right\"],\"loading\":[4],\"justifyContent\":[1,\"justify-content\"],\"theme\":[1],\"hasIcon\":[32],\"hasContent\":[32]},[[2,\"click\",\"clickHandler\"]],{\"icon\":[\"iconChangeHandler\"]}],[1,\"zonos-spinner\",{\"size\":[2],\"spinnerColor\":[1,\"spinner-color\"]}],[1,\"zonos-icon\",{\"autoHeight\":[4,\"auto-height\"],\"iconColor\":[1,\"icon-color\"],\"content\":[1],\"size\":[2]}]]],[\"zonos-language-select_2\",[[1,\"zonos-language-select\",{\"handleOnClose\":[16]}],[1,\"zonos-select-dialog-header\",{\"handleOnClose\":[16],\"label\":[1]}]]],[\"zonos-country-select_4\",[[1,\"zonos-country-select\",{\"handleOnClose\":[16],\"inputValue\":[32]}],[1,\"zonos-hello-dialog-footer\",{\"appearanceSettings\":[16],\"setShowCountrySelect\":[16],\"setShowLanguageSelect\":[16]}],[1,\"zonos-custom-message\",{\"icon\":[1],\"message\":[1]}],[2,\"zonos-virtual-scroll\",{\"renderItem\":[16],\"itemWidth\":[2,\"item-width\"],\"fallbackItemHeight\":[2,\"fallback-item-height\"],\"itemHeights\":[16],\"container\":[32],\"scrollTop\":[32],\"totalHeight\":[32]},null,{\"itemHeights\":[\"updateTotalHeight\"],\"fallbackItemHeight\":[\"updateTotalHeight\"]}]]],[\"zonos-address_7\",[[1,\"zonos-address-update-dialog\",{\"continueLoading\":[4,\"continue-loading\"],\"dialogLoading\":[4,\"dialog-loading\"],\"dialogOpen\":[4,\"dialog-open\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"shippingAddress\":[16],\"billingAddress\":[16],\"translatedShippingAddress\":[16],\"translatedBillingAddress\":[16],\"showErrorBanner\":[32],\"translatedShippingAddressState\":[32],\"translatedBillingAddressState\":[32]},null,{\"translatedShippingAddress\":[\"watchTranslatedShippingAddress\"],\"translatedBillingAddress\":[\"watchTranslatedBillingAddress\"]}],[2,\"zonos-address\",{\"type\":[1],\"titleText\":[1,\"title-text\"],\"defaultAddress\":[16],\"stripe\":[32],\"isDirtyAddress\":[32]},null,{\"stripe\":[\"watchInitStripe\"]}],[1,\"zonos-checkbox\",{\"backgroundColor\":[1,\"background-color\"],\"label\":[1],\"isChecked\":[4,\"is-checked\"],\"isDisabled\":[4,\"is-disabled\"],\"size\":[2],\"fontSize\":[1,\"font-size\"],\"borderStyle\":[1,\"border-style\"]},[[1,\"click\",\"onClick\"]]],[2,\"zonos-link-authentication\",{\"titleText\":[1,\"title-text\"],\"defaultEmail\":[1,\"default-email\"],\"isEmailError\":[4,\"is-email-error\"],\"stripe\":[32]},null,{\"stripe\":[\"watchInitStripe\"]}],[1,\"zonos-dialog\",{\"open\":[4],\"headerText\":[1,\"header-text\"],\"width\":[1],\"height\":[1],\"minHeight\":[1,\"min-height\"],\"noHeader\":[4,\"no-header\"],\"noBodyPadding\":[4,\"no-body-padding\"],\"noBorder\":[4,\"no-border\"],\"borderStyle\":[1,\"border-style\"],\"noCloseButton\":[4,\"no-close-button\"],\"noClickOutside\":[4,\"no-click-outside\"],\"mobile\":[4],\"isLoading\":[4,\"is-loading\"],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"],[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-address-display\",{\"currentAddress\":[16],\"addressType\":[1,\"address-type\"]}],[1,\"zonos-address-form\",{\"currentAddress\":[16],\"translatedAddress\":[16],\"addressType\":[1,\"address-type\"],\"localAddress\":[32]},null,{\"translatedAddress\":[\"watchCurrentAddress\"]}]]],[\"zonos-cart-items_13\",[[2,\"zonos-customer-info\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"defaultAddress\":[16],\"showErrorBanner\":[32],\"shippingCountry\":[32],\"isCheckingForRestrictedItems\":[32],\"isValidatingAddress\":[32],\"invalidShippingCharacterList\":[32],\"invalidBillingCharacterList\":[32],\"openAddressValidationDialog\":[32],\"isEmailError\":[32]}],[2,\"zonos-checkout-payment\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"showErrorBanner\":[32]}],[1,\"zonos-checkout-footer\",{\"mobile\":[4],\"dataTheme\":[1,\"data-theme\"],\"showLanguageDialog\":[32],\"isMobile\":[32]},[[4,\"click\",\"handleGlobalClick\"]],{\"mobile\":[\"handleMobileChange\"]}],[2,\"zonos-shipping\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"selectedShippingMethod\":[32],\"collapsedDAPOptions\":[32],\"isSelecting\":[32],\"showErrorBanner\":[32],\"serviceLevelsDDP\":[32],\"serviceLevelsDAP\":[32],\"serviceLevelsOther\":[32],\"serviceLevelsAll\":[32],\"displayBaseCurrency\":[32]}],[1,\"zonos-cart-subtotal\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"loading\":[32]}],[1,\"zonos-cart-restricted-items\",{\"hide\":[4],\"errorImages\":[32],\"internalCollapsed\":[32],\"firstRender\":[32]}],[1,\"zonos-checkout-finish\",{\"borderRadius\":[1,\"border-radius\"],\"storybookForceStatus\":[1,\"storybook-force-status\"],\"overrideNotification\":[16],\"isLoading\":[32],\"notificationType\":[32],\"notificationTitle\":[32],\"notificationMessages\":[32],\"notificationActionText\":[32],\"order\":[32],\"isWaitingToRedirect\":[32]}],[1,\"zonos-confirm-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"dialogIntent\":[1,\"dialog-intent\"],\"dialogSubtitle\":[1,\"dialog-subtitle\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"dialogConfirmBtnText\":[1,\"dialog-confirm-btn-text\"],\"dialogWidth\":[2,\"dialog-width\"],\"dialogCancelBtnText\":[1,\"dialog-cancel-btn-text\"],\"dialogType\":[1,\"dialog-type\"],\"isMobile\":[4,\"is-mobile\"],\"dialogOpen\":[4,\"dialog-open\"],\"noClickOutside\":[4,\"no-click-outside\"]},[[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-checkout-progress-tabs\",{\"tabColor\":[1,\"tab-color\"],\"backgroundColor\":[1,\"background-color\"],\"setTabItems\":[64],\"setTabSelected\":[64]}],[1,\"zonos-review\",{\"mobile\":[4],\"collapsed\":[4],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"]]],[1,\"zonos-cart-items\",{\"errorImages\":[32]}],[1,\"zonos-currency-toggle\",{\"errorImages\":[32]}],[1,\"zonos-rest-state\",{\"restStateSubtitle\":[1,\"rest-state-subtitle\"],\"restStateTitle\":[1,\"rest-state-title\"],\"restStateType\":[1,\"rest-state-type\"],\"isErrorImageLoad\":[32]}]]]]"), options);
|
|
8
|
+
return bootstrapLazy(JSON.parse("[[\"zonos-checkout\",[[2,\"zonos-checkout\",{\"appearanceSettingsOverride\":[16],\"preview\":[4],\"mobile\":[4],\"defaultAddress\":[16],\"forceDialogOpen\":[4,\"force-dialog-open\"],\"defaultAddressParams\":[32],\"open\":[32],\"stripe\":[32],\"submitLoading\":[32],\"collapseReviewMobile\":[32],\"isAttachError\":[32],\"isMobile\":[32],\"isIframed\":[32],\"zonosReviewRef\":[32],\"storybookPaymentStatusOverride\":[32],\"isLegacyCheckout\":[32],\"confirmDialogOpen\":[32],\"isCartExpired\":[32],\"inventoryCheckErrorMessage\":[32],\"placedOrderInfo\":[32],\"closeDialogHandler\":[64],\"init\":[64],\"setToFinishStep\":[64],\"mockCheckoutSession\":[64]},[[16,\"zonos--init-cart-info\",\"initCartInfoHandler\"],[4,\"keydown\",\"handleKeyPress\"],[9,\"resize\",\"handleWindowResize\"]],{\"appearanceSettingsOverride\":[\"appearanceSettingsOverrideChanged\",\"handleAppearanceSettingsOverrideChange\"],\"mobile\":[\"handleMobileChange\"],\"defaultAddress\":[\"handleAddressChange\"],\"open\":[\"handleOpenChange\"]}]]],[\"zonos-hello\",[[1,\"zonos-hello\",{\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettingsOverride\":[16],\"showPeekMessage\":[32],\"zonosStoreHelloSettings\":[32],\"showDialog\":[32],\"peekMessage\":[32],\"initialUrl\":[32],\"allRestrictedItems\":[32],\"allFoundProducts\":[32],\"productsOnPage\":[32],\"isHelloWidgetRendered\":[32],\"isMobile\":[32],\"getCountryList\":[64],\"displayCurrency\":[64],\"convertAndFormat\":[64],\"convert\":[64],\"format\":[64],\"openHelloDialog\":[64]},[[9,\"resize\",\"handleResize\"]],{\"appearanceSettingsOverride\":[\"handleAppearanceSettingsOverrideChange\"]}]]],[\"zonos-controller\",[[1,\"zonos-controller\",{\"config\":[16],\"zonosApiKey\":[1,\"zonos-api-key\"],\"initCheckoutElement\":[64],\"setupGoogleFont\":[64],\"showNotification\":[64],\"reset\":[64],\"overrideConfig\":[64],\"overrideCountry\":[64],\"getAppearanceSetting\":[64],\"updateOrganizationName\":[64]},[[8,\"locationchange\",\"handleLocationChange\"]]]]],[\"zonos-tooltip\",[[1,\"zonos-tooltip\",{\"label\":[1],\"subtitle\":[1],\"showTooltip\":[32]}]]],[\"zonos-component\",[[1,\"zonos-component\",{\"first\":[1],\"middle\":[1],\"last\":[1]}]]],[\"zonos-link\",[[1,\"zonos-link\",{\"href\":[1],\"rel\":[1],\"target\":[1],\"linkTitle\":[1,\"link-title\"]}]]],[\"zonos-logo\",[[1,\"zonos-logo\",{\"theme\":[1],\"width\":[1]}]]],[\"zonos-hello-dialog\",[[1,\"zonos-hello-dialog\",{\"isOpen\":[4,\"is-open\"],\"setIsOpen\":[16],\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettings\":[16],\"restrictedItems\":[16],\"welcomeMessage\":[32],\"showCountrySelect\":[32],\"showLanguageSelect\":[32]},[[4,\"click\",\"globalClickHandler\"]],{\"isOpen\":[\"isOpenHandler\"]}]]],[\"zonos-badge\",[[1,\"zonos-badge\",{\"bold\":[4],\"badgeColor\":[1,\"badge-color\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"rounded\":[4],\"loading\":[4],\"dismissHandler\":[16]}]]],[\"zonos-shipping-rich-radio\",[[1,\"zonos-shipping-rich-radio\",{\"items\":[16],\"borderColor\":[1,\"border-color\"],\"borderStyle\":[1,\"border-style\"],\"theme\":[1],\"selectedItem\":[16]}]]],[\"zonos-toggle\",[[1,\"zonos-toggle\",{\"options\":[16],\"value\":[1]}]]],[\"zonos-collapse\",[[1,\"zonos-collapse\",{\"collapsed\":[4],\"collapseSize\":[2,\"collapse-size\"],\"height\":[32],\"iframe\":[32]}]]],[\"zonos-card\",[[1,\"zonos-card\",{\"actions\":[16],\"backgroundColor\":[1,\"background-color\"],\"borderRadius\":[2,\"border-radius\"],\"footerActions\":[16],\"footerContent\":[16],\"footerHeight\":[2,\"footer-height\"],\"label\":[16],\"spacing\":[1]}]]],[\"zonos-input\",[[1,\"zonos-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"inputSize\":[1,\"input-size\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[32]},null,{\"inputValue\":[\"onInputValueChange\"]}]]],[\"zonos-notification_3\",[[2,\"zonos-payment\",{\"titleText\":[1,\"title-text\"],\"stripe\":[32],\"stripeElements\":[32]},null,{\"stripeElements\":[\"watchInitStripe\"],\"stripe\":[\"watchInitStripe\"]}],[2,\"zonos-paypal-payment\"],[1,\"zonos-notification\",{\"notificationArray\":[32],\"showNotification\":[64]}]]],[\"zonos-banner\",[[1,\"zonos-banner\",{\"bannerTitle\":[1,\"banner-title\"],\"intent\":[1],\"hasContent\":[32]}]]],[\"zonos-country-flag\",[[1,\"zonos-country-flag\",{\"countryCode\":[1,\"country-code\"],\"size\":[2]}]]],[\"zonos-v-stack\",[[1,\"zonos-v-stack\",{\"spacing\":[2]}]]],[\"zonos-text\",[[1,\"zonos-text\",{\"textColor\":[1,\"text-color\"],\"size\":[1],\"type\":[1],\"weight\":[2],\"ready\":[32]}]]],[\"zonos-button_3\",[[17,\"zonos-button\",{\"buttonColor\":[1,\"button-color\"],\"backgroundColor\":[1,\"background-color\"],\"borderStyle\":[1,\"border-style\"],\"isDisabled\":[4,\"is-disabled\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"variant\":[1],\"noBackground\":[4,\"no-background\"],\"withBoxShadow\":[4,\"with-box-shadow\"],\"noPaddingLeft\":[4,\"no-padding-left\"],\"noPaddingRight\":[4,\"no-padding-right\"],\"loading\":[4],\"justifyContent\":[1,\"justify-content\"],\"theme\":[1],\"hasIcon\":[32],\"hasContent\":[32]},[[2,\"click\",\"clickHandler\"]],{\"icon\":[\"iconChangeHandler\"]}],[1,\"zonos-spinner\",{\"size\":[2],\"spinnerColor\":[1,\"spinner-color\"]}],[1,\"zonos-icon\",{\"autoHeight\":[4,\"auto-height\"],\"iconColor\":[1,\"icon-color\"],\"content\":[1],\"size\":[2]}]]],[\"zonos-language-select_2\",[[1,\"zonos-language-select\",{\"handleOnClose\":[16]}],[1,\"zonos-select-dialog-header\",{\"handleOnClose\":[16],\"label\":[1]}]]],[\"zonos-country-select_4\",[[1,\"zonos-country-select\",{\"handleOnClose\":[16],\"inputValue\":[32]}],[1,\"zonos-hello-dialog-footer\",{\"appearanceSettings\":[16],\"setShowCountrySelect\":[16],\"setShowLanguageSelect\":[16]}],[1,\"zonos-custom-message\",{\"icon\":[1],\"message\":[1]}],[2,\"zonos-virtual-scroll\",{\"renderItem\":[16],\"itemWidth\":[2,\"item-width\"],\"fallbackItemHeight\":[2,\"fallback-item-height\"],\"itemHeights\":[16],\"container\":[32],\"scrollTop\":[32],\"totalHeight\":[32]},null,{\"itemHeights\":[\"updateTotalHeight\"],\"fallbackItemHeight\":[\"updateTotalHeight\"]}]]],[\"zonos-address_7\",[[1,\"zonos-address-update-dialog\",{\"continueLoading\":[4,\"continue-loading\"],\"dialogLoading\":[4,\"dialog-loading\"],\"dialogOpen\":[4,\"dialog-open\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"shippingAddress\":[16],\"billingAddress\":[16],\"translatedShippingAddress\":[16],\"translatedBillingAddress\":[16],\"showErrorBanner\":[32],\"translatedShippingAddressState\":[32],\"translatedBillingAddressState\":[32]},null,{\"translatedShippingAddress\":[\"watchTranslatedShippingAddress\"],\"translatedBillingAddress\":[\"watchTranslatedBillingAddress\"]}],[2,\"zonos-address\",{\"type\":[1],\"titleText\":[1,\"title-text\"],\"defaultAddress\":[16],\"stripe\":[32],\"isDirtyAddress\":[32]},null,{\"stripe\":[\"watchInitStripe\"]}],[1,\"zonos-checkbox\",{\"backgroundColor\":[1,\"background-color\"],\"label\":[1],\"isChecked\":[4,\"is-checked\"],\"isDisabled\":[4,\"is-disabled\"],\"size\":[2],\"fontSize\":[1,\"font-size\"],\"borderStyle\":[1,\"border-style\"]},[[1,\"click\",\"onClick\"]]],[2,\"zonos-link-authentication\",{\"titleText\":[1,\"title-text\"],\"defaultEmail\":[1,\"default-email\"],\"isEmailError\":[4,\"is-email-error\"],\"stripe\":[32]},null,{\"stripe\":[\"watchInitStripe\"]}],[1,\"zonos-dialog\",{\"open\":[4],\"headerText\":[1,\"header-text\"],\"width\":[1],\"height\":[1],\"minHeight\":[1,\"min-height\"],\"noHeader\":[4,\"no-header\"],\"noBodyPadding\":[4,\"no-body-padding\"],\"noBorder\":[4,\"no-border\"],\"borderStyle\":[1,\"border-style\"],\"noCloseButton\":[4,\"no-close-button\"],\"noClickOutside\":[4,\"no-click-outside\"],\"mobile\":[4],\"isLoading\":[4,\"is-loading\"],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"],[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-address-display\",{\"currentAddress\":[16],\"addressType\":[1,\"address-type\"]}],[1,\"zonos-address-form\",{\"currentAddress\":[16],\"translatedAddress\":[16],\"addressType\":[1,\"address-type\"],\"localAddress\":[32]},null,{\"translatedAddress\":[\"watchCurrentAddress\"]}]]],[\"zonos-cart-items_13\",[[2,\"zonos-customer-info\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"defaultAddress\":[16],\"showErrorBanner\":[32],\"shippingCountry\":[32],\"isCheckingForRestrictedItems\":[32],\"isValidatingAddress\":[32],\"invalidShippingCharacterList\":[32],\"invalidBillingCharacterList\":[32],\"openAddressValidationDialog\":[32],\"isEmailError\":[32]}],[2,\"zonos-checkout-payment\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"showErrorBanner\":[32],\"hasStripePaymentError\":[32]},null,{\"hasStripePaymentError\":[\"stripePaymentErrorWatcher\"]}],[1,\"zonos-checkout-footer\",{\"mobile\":[4],\"dataTheme\":[1,\"data-theme\"],\"showLanguageDialog\":[32],\"isMobile\":[32]},[[4,\"click\",\"handleGlobalClick\"]],{\"mobile\":[\"handleMobileChange\"]}],[2,\"zonos-shipping\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"selectedShippingMethod\":[32],\"collapsedDAPOptions\":[32],\"isSelecting\":[32],\"showErrorBanner\":[32],\"serviceLevelsDDP\":[32],\"serviceLevelsDAP\":[32],\"serviceLevelsOther\":[32],\"serviceLevelsAll\":[32],\"displayBaseCurrency\":[32]}],[1,\"zonos-cart-subtotal\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"loading\":[32]}],[1,\"zonos-cart-restricted-items\",{\"hide\":[4],\"errorImages\":[32],\"internalCollapsed\":[32],\"firstRender\":[32]}],[1,\"zonos-checkout-finish\",{\"borderRadius\":[1,\"border-radius\"],\"storybookForceStatus\":[1,\"storybook-force-status\"],\"overrideNotification\":[16],\"isLoading\":[32],\"notificationType\":[32],\"notificationTitle\":[32],\"notificationMessages\":[32],\"notificationActionText\":[32],\"order\":[32],\"isWaitingToRedirect\":[32]}],[1,\"zonos-confirm-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"dialogIntent\":[1,\"dialog-intent\"],\"dialogSubtitle\":[1,\"dialog-subtitle\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"dialogConfirmBtnText\":[1,\"dialog-confirm-btn-text\"],\"dialogWidth\":[2,\"dialog-width\"],\"dialogCancelBtnText\":[1,\"dialog-cancel-btn-text\"],\"dialogType\":[1,\"dialog-type\"],\"isMobile\":[4,\"is-mobile\"],\"dialogOpen\":[4,\"dialog-open\"],\"noClickOutside\":[4,\"no-click-outside\"]},[[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-checkout-progress-tabs\",{\"tabColor\":[1,\"tab-color\"],\"backgroundColor\":[1,\"background-color\"],\"setTabItems\":[64],\"setTabSelected\":[64]}],[1,\"zonos-review\",{\"mobile\":[4],\"collapsed\":[4],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"]]],[1,\"zonos-cart-items\",{\"errorImages\":[32]}],[1,\"zonos-currency-toggle\",{\"errorImages\":[32]}],[1,\"zonos-rest-state\",{\"restStateSubtitle\":[1,\"rest-state-subtitle\"],\"restStateTitle\":[1,\"rest-state-title\"],\"restStateType\":[1,\"rest-state-type\"],\"isErrorImageLoad\":[32]}]]]]"), options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-c493c4fe.js';
|
|
2
|
-
import { e as cartStore, x as stripeStoreHandleInventoryCheck, q as translate, w as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-
|
|
2
|
+
import { C as validateCheckoutSession, f as stripeStore, e as cartStore, x as stripeStoreHandleInventoryCheck, q as translate, w as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-709f053f.js';
|
|
3
3
|
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-22cb914b.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-c6924924.js';
|
|
5
5
|
|
|
@@ -306,6 +306,15 @@ const paypalButtonOptions = ({ checkoutSessionId, onPaypalFail, onPaypalSessionD
|
|
|
306
306
|
});
|
|
307
307
|
return {
|
|
308
308
|
createOrder: async () => {
|
|
309
|
+
const checkoutSessionStatus = await validateCheckoutSession();
|
|
310
|
+
if (!checkoutSessionStatus.valid) {
|
|
311
|
+
paypalStore.paypalErrorMessage = checkoutSessionStatus.errorMessage;
|
|
312
|
+
// reset stripe error message
|
|
313
|
+
stripeStore.hasPaymentError = false;
|
|
314
|
+
stripeStore.customErrorMessage = null;
|
|
315
|
+
onPaypalFail === null || onPaypalFail === void 0 ? void 0 : onPaypalFail();
|
|
316
|
+
return '';
|
|
317
|
+
}
|
|
309
318
|
try {
|
|
310
319
|
// reset paypal error banner
|
|
311
320
|
paypalStore.paypalErrorMessage = null;
|
|
@@ -332,6 +341,9 @@ const paypalButtonOptions = ({ checkoutSessionId, onPaypalFail, onPaypalSessionD
|
|
|
332
341
|
catch (err) {
|
|
333
342
|
logError('Failed to create paypal order', err);
|
|
334
343
|
paypalStore.paypalErrorMessage = translate('Failed to create PayPal order. Please try again, or consider using an alternative method.');
|
|
344
|
+
// reset stripe error message
|
|
345
|
+
stripeStore.hasPaymentError = false;
|
|
346
|
+
stripeStore.customErrorMessage = null;
|
|
335
347
|
// trigger fail event
|
|
336
348
|
onPaypalFail === null || onPaypalFail === void 0 ? void 0 : onPaypalFail();
|
|
337
349
|
return '';
|
|
@@ -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 { f as stripeStore,
|
|
2
|
+
import { f as stripeStore, T as getFallbackDefaultCountryCode, l as localizationStore, q as translate } from './cart-709f053f.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
4
|
import { a as logError, l as log } from './handleFetch-22cb914b.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
@@ -145,7 +145,7 @@ const ZonosAddress = class {
|
|
|
145
145
|
}
|
|
146
146
|
render() {
|
|
147
147
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
148
|
-
return (h(Host, { key: '
|
|
148
|
+
return (h(Host, { key: '4c2371b6111fac3e7b9e73c83fb858db844e800a', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'a0a1f0c4a247a044f541083257edf8dc7b62f903', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'e610eecbbd4c57dcb539af8d539da3db60bb45e7', class: "zonos--address-component" })));
|
|
149
149
|
}
|
|
150
150
|
get el() { return getElement(this); }
|
|
151
151
|
static get watchers() { return {
|
|
@@ -445,14 +445,14 @@ const ZonosCheckbox = class {
|
|
|
445
445
|
customRoundRadius: '4px',
|
|
446
446
|
overrideBorderStyle: this.borderStyle,
|
|
447
447
|
});
|
|
448
|
-
return (h(Host, { key: '
|
|
448
|
+
return (h(Host, { key: '7a2972128b04d5dffe09f60b5292d90f7201066a', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
449
449
|
'--zonos--background-color': backgroundColor,
|
|
450
450
|
'--zonos--border-radius': borderStyle,
|
|
451
451
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
452
452
|
'--zonos--size': `${this.size}px`,
|
|
453
|
-
} }, h("label", { key: '
|
|
453
|
+
} }, h("label", { key: 'b18d0f091b783555b4b3a1fc2b5d5cb1c62a9d41', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: 'f3b86525ef7988d6df87f9147f5aa22b447c1303', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
454
454
|
this.checkboxSelected.emit(e.target.checked);
|
|
455
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
455
|
+
}, type: "checkbox" }), h("span", { key: '2007c2fbc4d8437f75b9a3d7a4e65d394922abf4', class: "checkmark-container" }, h("svg", { key: '481b9272c99cf464d8d88ab24a8dba35de921abf', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'ab7690fba113135175248c8926907312dfe478d5', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { key: '99689099e7469f2ff928619daa2fcee0ce35a418', size: this.fontSize }, this.label)))));
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
458
|
ZonosCheckbox.style = ZonosCheckboxStyle0;
|
|
@@ -511,7 +511,7 @@ const ZonosDialog = class {
|
|
|
511
511
|
const borderStyle = getBorderRadius({
|
|
512
512
|
overrideBorderStyle: this.borderStyle,
|
|
513
513
|
});
|
|
514
|
-
return (h(Host, { key: '
|
|
514
|
+
return (h(Host, { key: 'a9932187bccf8e7fa505c7e07175d03541d66852', class: classes([
|
|
515
515
|
'zonos--elements',
|
|
516
516
|
this.open && 'open',
|
|
517
517
|
this.isLoading && 'is-loading',
|
|
@@ -523,10 +523,10 @@ const ZonosDialog = class {
|
|
|
523
523
|
'--zonos--height': this.height || 'initial',
|
|
524
524
|
'--zonos--min-height': this.minHeight || '500px',
|
|
525
525
|
'--zonos--width': this.width,
|
|
526
|
-
} }, h("div", { key: '
|
|
526
|
+
} }, h("div", { key: '0298cf365a50e3544656a6d27ae59e922b9e3aed', class: "zonos--backdrop" }), h("div", { key: '9fce580a07147d51f17c898a22204c3d9ce6ac7b', class: "zonos--dialog-layout", inert: !this.open, onClick: this.clickOutsideDialogHandler }, h("div", { key: 'b168439cd985cc5c0166a653db206688504cf7dd', class: "zonos--dialog" }, this.isLoading && (h("div", { key: 'e0b6215f3c7bc939721669069bc294e08558d8b5', class: "zonos--loading" }, h("zonos-spinner", { key: '687bcd6d2695933de828484c34aff1230bf71d49', size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { key: '04a57a4add896e3d96faca8b77321bba5f00b889', class: "zonos--header" }, this.headerText && (h("h3", { key: 'd084cb3aedcb7e5bb8fd82012b57f441d7dce4a2', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: '7b73bd57b8651fd3f3ebd29e3c252bd83d9375ee', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, variant: "subtle" })))), h("div", { key: '7af04c281b6410b87bfe53913e74fa215f6de24b', class: classes([
|
|
527
527
|
'zonos--body',
|
|
528
528
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
529
|
-
]) }, h("slot", { key: '
|
|
529
|
+
]) }, h("slot", { key: '8c6ce4437d2bc98f9eccea0280cee31794883b77' })), h("slot", { key: '11f97e705b3cc1bad11c037ede940d2f392d67e7', name: "dialog-footer" })))));
|
|
530
530
|
}
|
|
531
531
|
static get assetsDirs() { return ["assets"]; }
|
|
532
532
|
};
|
|
@@ -577,9 +577,9 @@ const ZonosLinkAuthentication = class {
|
|
|
577
577
|
}
|
|
578
578
|
render() {
|
|
579
579
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
580
|
-
return (h(Host, { key: '
|
|
580
|
+
return (h(Host, { key: '2e0db99db09b2e6f055db2851e03f39819a6821e', class: "zonos--link-authentication zonos--elements", style: {
|
|
581
581
|
'--zonos--border-radius': getBorderRadius(),
|
|
582
|
-
} }, h("zonos-text", { key: '
|
|
582
|
+
} }, h("zonos-text", { key: 'fa4516128da2fafa81b070f4d525602edd11203e', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '4b9afcb4bb2be87157923f136b517d3dc44a4c47', class: `zonos--link-authentication-component ${this.isEmailError && 'zonos--input-invalid'}` }), this.isEmailError && (h("zonos-text", { key: 'e6a20eedb5d0a2e5ccb58fa240d664812749801d', textColor: "red-600" }, translate('Please enter a valid email address.')))));
|
|
583
583
|
}
|
|
584
584
|
get el() { return getElement(this); }
|
|
585
585
|
static get watchers() { return {
|
|
@@ -23,16 +23,16 @@ const ZonosBadge = class {
|
|
|
23
23
|
this.dismissHandler = undefined;
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: 'd8a6a11f10c36a272ecdb52c54919f9ad45e1a9a', class: classes(['zonos--elements zonos--badge']), style: {
|
|
27
27
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
28
|
-
} }, h("div", { key: '
|
|
28
|
+
} }, h("div", { key: 'c7573446a478f9b9e45a4787593ba9ecaf595fdc', class: classes([
|
|
29
29
|
'zonos--badge-content',
|
|
30
30
|
this.badgeColor,
|
|
31
31
|
this.rounded && 'rounded',
|
|
32
32
|
this.iconRight && 'icon-right',
|
|
33
33
|
this.size,
|
|
34
34
|
this.bold && 'bold',
|
|
35
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
35
|
+
]) }, this.icon, h("zonos-text", { key: '578f7cf2f27be3306fc7c776dc82a7a324a8b3ca', textColor: `${this.badgeColor}-800` }, h("slot", { key: '0b59f674e40454dcf07bea704f38c9df7d68cb43' })), this.dismissHandler && (h("zonos-icon", { key: 'ff4e2ee7511940df9ec27830e406502d7acf5209', "aria-label": "Remove action", class: "zonos--badge-dismiss", content: RemoveLineIcon, onClick: () => { var _a; return (_a = this.dismissHandler) === null || _a === void 0 ? void 0 : _a.call(this); } })))));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
ZonosBadge.style = ZonosBadgeStyle0;
|
|
@@ -143,12 +143,12 @@ const ZonosButton = class {
|
|
|
143
143
|
const borderStyle = getBorderRadius({
|
|
144
144
|
overrideBorderStyle: this.borderStyle,
|
|
145
145
|
});
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: '434195b28ed289d47b9c5eb14b754245a8500a99', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
147
147
|
'--zonos--background-color': backgroundColor,
|
|
148
148
|
'--zonos--border-radius': borderStyle,
|
|
149
149
|
'--zonos--color': color,
|
|
150
150
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
151
|
-
}) }, h("button", { key: '
|
|
151
|
+
}) }, h("button", { key: 'f3891cd7f75b7c02c5c21af6b9c38e59d8d13865', class: classes([
|
|
152
152
|
this.hasIcon && 'has-icon',
|
|
153
153
|
this.hasContent && 'has-content',
|
|
154
154
|
this.noBackground && 'no-background',
|
|
@@ -163,7 +163,7 @@ const ZonosButton = class {
|
|
|
163
163
|
backgroundColor && variant === 'standard' && 'override-background',
|
|
164
164
|
]), disabled: disabled, style: {
|
|
165
165
|
justifyContent: this.justifyContent,
|
|
166
|
-
} }, this.loading && (h("div", { key: '
|
|
166
|
+
} }, this.loading && (h("div", { key: '66ac0c980f09f1aa0237c906517658c618efc36d', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: '7b53b4ead46663e437c2d7d7eedcccd65f2122db', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '16cda705df713167e678e3427c584450268eac72', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
167
167
|
}
|
|
168
168
|
static get delegatesFocus() { return true; }
|
|
169
169
|
get ele() { return getElement(this); }
|
|
@@ -26,16 +26,16 @@ const ZonosCard = class {
|
|
|
26
26
|
customRoundRadius: `${this.borderRadius}px`,
|
|
27
27
|
overrideBorderStyle: 'ROUNDED',
|
|
28
28
|
});
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'd1a2b02f3d33492fc76bd88cf92e68bf1603cbd0', style: {
|
|
30
30
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
31
|
-
} }, h("div", { key: '
|
|
31
|
+
} }, h("div", { key: '0c9acee7938dc95d1f6267dff6fa399bd8a65b95', class: classes(['styled-card']), style: {
|
|
32
32
|
'--zonos--background-color': backgroundColor,
|
|
33
33
|
'--zonos--border-radius': borderRadius,
|
|
34
34
|
padding: this.spacing,
|
|
35
|
-
} }, this.label && (h("header", { key: '
|
|
35
|
+
} }, this.label && (h("header", { key: '2559a7fd78c4c4a97ce466e0eefbc4db8409c97f', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: '287e0e64461cb5206a653711346fd8eb62524a00', type: "subheader" }, this.label), h("h-stack", { key: '9ac80b9c555a93232bbcdd0e1769a4b78ded2fa8', spacing: 8 }, this.actions))), h("slot", { key: '3342bd7f5d2af58740c49d353f311ce1c4101f13' }), (this.footerActions || this.footerContent) && (h("footer", { key: 'dee65ea527dfac5821ece452426e2d33f127e356', class: "card-footer", style: {
|
|
36
36
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
37
37
|
padding: this.spacing,
|
|
38
|
-
} }, h("div", { key: '
|
|
38
|
+
} }, h("div", { key: '13a23726ada09eb39783ea261b760cbe83587f5b' }, this.footerContent), h("h-stack", { key: '1389bcbce376431f3008669e9f55a69b0a177d85', spacing: 8 }, this.footerActions))))));
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
ZonosCard.style = ZonosCardStyle0;
|
|
@@ -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 { e as cartStore,
|
|
2
|
+
import { e as cartStore, J as currencyFormat, q as translate, K as cartStoreHasOneEligibleItem, L as stripeStoreApplyPromoCode, M as stripeStoreRemovePromoCode, f as stripeStore, A as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, N as stripeStoreResetPromoCode, O as stripeStoreMessageBasedOnStatus, l as localizationStore, P as stripeStoreTranslateAddressToLatin, Q as cartStoreUpdateSelectedShippingOption, R as cartStoreGetShippingTransitInfo, S as sortServiceLevelOptionsByAmount } from './cart-709f053f.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-77a60c44.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';
|
|
@@ -1205,11 +1205,26 @@ const ZonosCartSubtotal = class {
|
|
|
1205
1205
|
return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cartStore.selectedShippingOption.displayName), cartStore.selectedShippingOptionTransitTime && (h("zonos-text", { class: "zonos--caption", type: "caption" }, cartStore.selectedShippingOptionTransitTime))));
|
|
1206
1206
|
};
|
|
1207
1207
|
const renderLandedCost = () => {
|
|
1208
|
+
var _a;
|
|
1209
|
+
// Domestic US doesn't have duty applied, just taxes and fees
|
|
1210
|
+
if (((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) === 'US') {
|
|
1211
|
+
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes and fees'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null ||
|
|
1212
|
+
cartStore.dutiesTaxesFeesEstimate !== null
|
|
1213
|
+
? renderCheckoutCurrency({
|
|
1214
|
+
amount: cartStore.dutiesTaxesFees ||
|
|
1215
|
+
cartStore.dutiesTaxesFeesEstimate ||
|
|
1216
|
+
0,
|
|
1217
|
+
isForeign: true,
|
|
1218
|
+
})
|
|
1219
|
+
: '-'))));
|
|
1220
|
+
}
|
|
1208
1221
|
if (cartStore.landedCostMethod === 'DAP') {
|
|
1209
1222
|
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), cartStore.dutiesTaxesFeesEstimate !== null
|
|
1210
|
-
? `${translate('Estimated'
|
|
1211
|
-
amount:
|
|
1212
|
-
|
|
1223
|
+
? `${translate('Estimated [amount]', {
|
|
1224
|
+
amount: renderCheckoutCurrency({
|
|
1225
|
+
amount: cartStore.dutiesTaxesFeesEstimate,
|
|
1226
|
+
isForeign: true,
|
|
1227
|
+
}),
|
|
1213
1228
|
})}`
|
|
1214
1229
|
: '-'), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, translate('Due at delivery')))));
|
|
1215
1230
|
}
|
|
@@ -1695,9 +1710,22 @@ const ZonosCheckoutPayment = class {
|
|
|
1695
1710
|
this.continueLoading = false;
|
|
1696
1711
|
this.submitBtnColor = undefined;
|
|
1697
1712
|
this.showErrorBanner = false;
|
|
1713
|
+
this.hasStripePaymentError = false;
|
|
1714
|
+
}
|
|
1715
|
+
stripePaymentErrorWatcher() {
|
|
1716
|
+
if (this.hasStripePaymentError) {
|
|
1717
|
+
setTimeout(() => {
|
|
1718
|
+
var _a;
|
|
1719
|
+
// scroll to the top of the page when the payment error is shown
|
|
1720
|
+
(_a = this.ele.querySelector('zonos-banner')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
1721
|
+
behavior: 'smooth',
|
|
1722
|
+
});
|
|
1723
|
+
}, 0);
|
|
1724
|
+
}
|
|
1698
1725
|
}
|
|
1699
1726
|
render() {
|
|
1700
1727
|
var _a;
|
|
1728
|
+
this.hasStripePaymentError = stripeStore.hasPaymentError;
|
|
1701
1729
|
if (!stripeStore.stripeElements) {
|
|
1702
1730
|
return null;
|
|
1703
1731
|
}
|
|
@@ -1707,7 +1735,8 @@ const ZonosCheckoutPayment = class {
|
|
|
1707
1735
|
}
|
|
1708
1736
|
const isTestMode = getIsTestMode();
|
|
1709
1737
|
const isPaypalTabSelected = ((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.value.type) === 'external_paypal';
|
|
1710
|
-
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))),
|
|
1738
|
+
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), this.hasStripePaymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, stripeStore.customErrorMessage ||
|
|
1739
|
+
translate("We couldn't complete your payment. Please verify the payment details and try again."))), paypalStore.paypalErrorMessage && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, paypalStore.paypalErrorMessage)), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, !isPaypalTabSelected && (h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => {
|
|
1711
1740
|
this.continueClickHandler();
|
|
1712
1741
|
}, size: "lg",
|
|
1713
1742
|
// use primary type when on mobile mode
|
|
@@ -1722,6 +1751,10 @@ const ZonosCheckoutPayment = class {
|
|
|
1722
1751
|
display: isPaypalTabSelected ? 'block' : 'none',
|
|
1723
1752
|
} })), isTestMode && (h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, h("zonos-v-stack", { spacing: 16 }, h("div", null, h("zonos-text", { type: "semiBoldLabel" }, translate('Test cards')), h("zonos-text", { textColor: "gray-700" }, translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), h("zonos-button", { icon: h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, translate('Success'), " (****4242)"), h("zonos-button", { icon: h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, translate('Failure'), " (****0002)")), h("zonos-notification", null))))));
|
|
1724
1753
|
}
|
|
1754
|
+
get ele() { return getElement(this); }
|
|
1755
|
+
static get watchers() { return {
|
|
1756
|
+
"hasStripePaymentError": ["stripePaymentErrorWatcher"]
|
|
1757
|
+
}; }
|
|
1725
1758
|
};
|
|
1726
1759
|
ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
|
|
1727
1760
|
|
|
@@ -1748,6 +1781,24 @@ const getContrastColor = ({ backgroundColor, color, }) => {
|
|
|
1748
1781
|
return isNewColorContrastEnough ? newDarkerColor : newLigherColor;
|
|
1749
1782
|
};
|
|
1750
1783
|
|
|
1784
|
+
/**
|
|
1785
|
+
* Reset any done tabs after selected tab to undone. This is to force user to go through all tabs again
|
|
1786
|
+
*/
|
|
1787
|
+
const resetToSelectedTab = ({ selectedTab, tabList, }) => {
|
|
1788
|
+
const selectedTabIndex = tabList[selectedTab].index;
|
|
1789
|
+
// Any tab after the selected tab should be reset
|
|
1790
|
+
const tabsToReset = Object.values(tabList)
|
|
1791
|
+
.slice(selectedTabIndex - 1, Object.keys(tabList).length)
|
|
1792
|
+
.map(tab => tab.value);
|
|
1793
|
+
const newTabList = Object.assign({}, tabList);
|
|
1794
|
+
Object.values(newTabList).forEach(tab => {
|
|
1795
|
+
if (tabsToReset.includes(tab.value)) {
|
|
1796
|
+
tab.isDone = false;
|
|
1797
|
+
}
|
|
1798
|
+
});
|
|
1799
|
+
return newTabList;
|
|
1800
|
+
};
|
|
1801
|
+
|
|
1751
1802
|
const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1752
1803
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>
|
|
1753
1804
|
</svg>
|
|
@@ -1797,6 +1848,12 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
1797
1848
|
async setTabSelected(tabValue) {
|
|
1798
1849
|
if (this.isTabClickable(tabValue)) {
|
|
1799
1850
|
cartStore.step = tabValue;
|
|
1851
|
+
// reset tabItems state until the selected step
|
|
1852
|
+
const newTabItems = resetToSelectedTab({
|
|
1853
|
+
selectedTab: tabValue,
|
|
1854
|
+
tabList: cartStore.tabItems,
|
|
1855
|
+
});
|
|
1856
|
+
cartStore.tabItems = newTabItems;
|
|
1800
1857
|
}
|
|
1801
1858
|
}
|
|
1802
1859
|
render() {
|
|
@@ -1814,17 +1871,17 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
1814
1871
|
color: labelSelectedColor,
|
|
1815
1872
|
})
|
|
1816
1873
|
: labelSelectedColor;
|
|
1817
|
-
return (h(Host, { key: '
|
|
1874
|
+
return (h(Host, { key: '592fe18f902f828c4dcdcab28221617ba63ea358', class: "zonos--elements", style: {
|
|
1818
1875
|
'--zonos--color': contrastLabelColor,
|
|
1819
1876
|
'--zonos--progress-percent': this.getTotalSuccessStep(),
|
|
1820
|
-
} }, h("div", { key: '
|
|
1877
|
+
} }, h("div", { key: 'd173893ab0da684a189127ab511db90ba3a0985c', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
1821
1878
|
const isSelected = tab.value === selectedStep;
|
|
1822
1879
|
return (h("button", { class: classes([
|
|
1823
1880
|
'zonos--tab-item',
|
|
1824
1881
|
tab.value === selectedStep && 'selected',
|
|
1825
1882
|
tab.isDone && 'done',
|
|
1826
|
-
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (
|
|
1827
|
-
})), h("div", { key: '
|
|
1883
|
+
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => this.setTabSelected(tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, translate(tab.label))));
|
|
1884
|
+
})), h("div", { key: '1e8dbcee0cc21837b030760250755fe5292bd261', class: "zonos--tab-progress" }, h("div", { key: 'a9250c1ca7b7a40f5b6d0bbbeca24f657471cda1', class: "zonos--progress-bar-fill" }))));
|
|
1828
1885
|
}
|
|
1829
1886
|
static get assetsDirs() { return ["assets"]; }
|
|
1830
1887
|
get ele() { return getElement(this); }
|
|
@@ -1926,13 +1983,13 @@ const ZonosConfirmDialog = class {
|
|
|
1926
1983
|
const borderStyle = getBorderRadius();
|
|
1927
1984
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
1928
1985
|
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
1929
|
-
return (h(Host, { key: '
|
|
1986
|
+
return (h(Host, { key: '3d4920dacf3c4b1ae796b10a3d68dc875cbe4267', class: classes([this.dialogOpen && 'open', 'zonos--elements']), "data-dialog-type": this.dialogType, "data-theme": theme, style: {
|
|
1930
1987
|
'--zonos--border-radius': borderStyle,
|
|
1931
1988
|
'--zonos--dialog-width': `${this.dialogWidth}px`,
|
|
1932
1989
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
1933
|
-
} }, h("div", { key: '
|
|
1990
|
+
} }, h("div", { key: 'e2b1358dedfb3e5a3dc42099330be1d3bb6845e5', class: "zonos--backdrop", tabIndex: -1 }), h("div", { key: 'e0fdc195773d12de322c3edd1487a7b096fd9e78', "aria-hidden": "true", class: classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, h("div", { key: '07997854cef00b029c58734f75c428450042c15c', class: "zonos--confirm-dialog", onBlur: () => {
|
|
1934
1991
|
this.focusDialog();
|
|
1935
|
-
} }, h("div", { key: '
|
|
1992
|
+
} }, h("div", { key: '5844b414871db63311bff5c76db62f1afba1bb92', class: "wrapper" }, h("div", { key: '7a1f69ff157d9c40bbe93c9c80759227862af136', class: "icon-wrapper" }, this.renderIcon()), h("div", { key: 'd3fc11932d0d94b798c7512dd70621fe96a5e8fd', class: "content" }, h("div", { key: 'd00c5488036fb8462ec69d4f8001c01de0b96449', class: "title" }, h("zonos-text", { key: '8966faf396a003fb8c065f6f46cd984878bc1274', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (h("div", { key: '022ae94eb5a02e8fc41c1616294d4e6d5a647358', class: "subtitle" }, h("zonos-text", { key: 'e3dbd4b9e7d650ec7b5bca30e33f7e7864d952fb', textColor: "gray-800" }, this.dialogSubtitle)))), h("div", { key: 'dd82a80b61ca3104d336f3204fac71a8ae1d3c54', class: "footer" }, this.dialogType === 'confirm' && (h("zonos-button", { key: '9eed92ab86f1154dac6dfb0aad8a313322b753c9', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText || translate('Cancel'))), h("zonos-button", { key: '6697bcca1fe4ac376c6a1b8b968d76cd17117242', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
|
|
1936
1993
|
}
|
|
1937
1994
|
static get assetsDirs() { return ["assets"]; }
|
|
1938
1995
|
get el() { return getElement(this); }
|
|
@@ -2203,11 +2260,11 @@ const ZonosRestState = class {
|
|
|
2203
2260
|
}
|
|
2204
2261
|
render() {
|
|
2205
2262
|
const imageUrl = this.getImageRestState();
|
|
2206
|
-
return (h(Host, { key: '
|
|
2263
|
+
return (h(Host, { key: 'a06221e04e00bf733a37d00fdff2643714208eca', class: classes(['zonos--elements zonos--restState']), style: {
|
|
2207
2264
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
2208
|
-
} }, h("div", { key: '
|
|
2265
|
+
} }, h("div", { key: 'c889f042cb289876f3e6e002a5527a239ad69791', class: "zonos--restState-image" }, h("img", { key: '21b30e32ac86bd0f5e9f9dded3bcd4f3295c9637', alt: this.restStateType, onError: () => {
|
|
2209
2266
|
this.isErrorImageLoad = true;
|
|
2210
|
-
}, src: imageUrl })), h("div", { key: '
|
|
2267
|
+
}, src: imageUrl })), h("div", { key: 'a28cfe4511fb4aa0f0c79b2e6cfaa78b6cbdb2a8', class: "content" }, h("zonos-text", { key: '20aa2a10a7617c96f99a6f653a5c1a8a0de85dbe', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '595b823c2e9c3270f510388b4ccbf544581453a9', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: '56a2514a6d170849ed87d1ab680e582a0f6e4b24', class: "action" }, h("slot", { key: 'b0e8f4dd2ff05929f4ffe7461e5dbe9aa4b5bfc5' }))));
|
|
2211
2268
|
}
|
|
2212
2269
|
static get assetsDirs() { return ["assets"]; }
|
|
2213
2270
|
};
|
|
@@ -2344,8 +2401,11 @@ const ZonosShipping = class {
|
|
|
2344
2401
|
});
|
|
2345
2402
|
};
|
|
2346
2403
|
this.getLandedCostMethodLabelSuffix = (method) => {
|
|
2347
|
-
|
|
2348
|
-
|
|
2404
|
+
var _a;
|
|
2405
|
+
switch (true) {
|
|
2406
|
+
// DAP description for non-US countries only
|
|
2407
|
+
case method === 'DAP' &&
|
|
2408
|
+
((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) !== 'US':
|
|
2349
2409
|
return translate(` (Duties due at door)`);
|
|
2350
2410
|
default:
|
|
2351
2411
|
return '';
|
|
@@ -2455,15 +2515,23 @@ const ZonosShipping = class {
|
|
|
2455
2515
|
if (this.showErrorBanner) {
|
|
2456
2516
|
this.showErrorBanner = !this.handleValidate();
|
|
2457
2517
|
}
|
|
2458
|
-
|
|
2518
|
+
const renderServiceLevels = () => {
|
|
2519
|
+
var _a;
|
|
2520
|
+
// Render all service levels for US since domestic shipping doesn't have DDP/DAP
|
|
2521
|
+
if (((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) === 'US') {
|
|
2522
|
+
return (h("zonos-shipping-rich-radio", { items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
|
|
2523
|
+
}
|
|
2524
|
+
return (h(Fragment, null, h("zonos-shipping-rich-radio", { items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
|
|
2525
|
+
!!this.serviceLevelsDAP.length && (h("button", { class: classes([
|
|
2526
|
+
'zonos--shipping-options-collapse-trigger',
|
|
2527
|
+
this.collapsedDAPOptions && 'collapsed',
|
|
2528
|
+
]), onClick: () => {
|
|
2529
|
+
this.collapsedDAPOptions = !this.collapsedDAPOptions;
|
|
2530
|
+
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
|
|
2531
|
+
};
|
|
2532
|
+
return (h(Host, { class: "zonos--shipping zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!this.serviceLevelsAll.length && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !this.serviceLevelsAll.length ? (h("zonos-banner", { bannerTitle: cartStore.customQuotingError
|
|
2459
2533
|
? cartStore.customQuotingError
|
|
2460
|
-
: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), class: "zonos--shipping-method-error", intent: "error" })) : (h("div", { class: "zonos--shipping-options-wrapper" }, h("zonos-
|
|
2461
|
-
!!this.serviceLevelsDAP.length && (h("button", { class: classes([
|
|
2462
|
-
'zonos--shipping-options-collapse-trigger',
|
|
2463
|
-
this.collapsedDAPOptions && 'collapsed',
|
|
2464
|
-
]), onClick: () => {
|
|
2465
|
-
this.collapsedDAPOptions = !this.collapsedDAPOptions;
|
|
2466
|
-
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }))))), h("div", { key: 'e4edb741bd79d0d5b14385d52a6d110016f9de9e', class: "zonos--group-btn" }, h("zonos-button", { key: '6e747d6e499bf322f959af36ff6b784f7fb9a92b', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
2534
|
+
: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), class: "zonos--shipping-method-error", intent: "error" })) : (h("div", { class: "zonos--shipping-options-wrapper" }, renderServiceLevels())), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
2467
2535
|
// use primary type when on mobile mode
|
|
2468
2536
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
2469
2537
|
}
|