@zonos/elements 1.3.230 → 1.3.231
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-ad82a680.js → cart-9b519566.js} +6 -2
- package/dist/cjs/hasInclusivePrice-12605be9.js +24 -0
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{localization-31e3dfe3.js → localization-38af974b.js} +118 -30
- package/dist/cjs/{paypal-88b5e878.js → paypal-e8fa2302.js} +3 -3
- package/dist/cjs/{placeTestOrder-6aefbf9c.js → placeTestOrder-6388881f.js} +11 -7
- package/dist/cjs/{renderFallback-87c908ad.js → renderFallback-bb2c4bce.js} +2 -2
- package/dist/cjs/{translationStore-b8b25e9d.js → translationStore-f2d5eae9.js} +420 -360
- package/dist/cjs/zonos-address_11.cjs.entry.js +21 -5
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +73 -13
- package/dist/cjs/zonos-checkout.cjs.entry.js +8 -5
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +5 -5
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +12 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +9 -6
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +55 -45
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +68 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -1
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -4
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -43
- package/dist/collection/components/main/zonos-controller.js +5 -2
- package/dist/collection/components/store/hello/localization.js +47 -16
- package/dist/collection/components/store/translationStore/strings.arabic.js +21 -18
- package/dist/collection/components/store/translationStore/strings.base.js +21 -18
- package/dist/collection/components/store/translationStore/strings.chinese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.danish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.dutch.js +21 -18
- package/dist/collection/components/store/translationStore/strings.french.js +21 -18
- package/dist/collection/components/store/translationStore/strings.german.js +21 -18
- package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -18
- package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.italian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.japanese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.korean.js +21 -18
- package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.polish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.russian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.spanish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.swedish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.turkish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -18
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +18 -2
- package/dist/collection/components/utils/api/{getInclusivePricing.js → getInclusivePriceConfigurations.js} +1 -1
- package/dist/collection/components/utils/api/getLocalization.js +2 -5
- package/dist/collection/components/utils/api/getZonosSettings.js +5 -0
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +6 -0
- package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -5
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +4 -1
- package/dist/collection/components/utils/getOverridenZCountry.js +11 -0
- package/dist/collection/components/utils/hasInclusivePrice.js +10 -0
- package/dist/collection/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.js +10 -0
- package/dist/collection/components/utils/hello/currencyConversion/applyInclusivePrice.js +39 -0
- package/dist/collection/components/utils/hello/currencyConversion/calculateInclusivePrice.js +32 -0
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +11 -6
- package/dist/collection/constants/key.js +9 -0
- package/dist/collection/types/InclusivePricing.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +87 -3
- package/dist/collection/types/index.js +1 -0
- package/dist/collection/utils/performBlurCurrency.js +38 -5
- package/dist/esm/{cart-c74f9aaa.js → cart-bc0e1598.js} +6 -2
- package/dist/esm/hasInclusivePrice-706cc09d.js +20 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/{localization-106476cb.js → localization-53f67640.js} +117 -31
- package/dist/esm/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +3 -3
- package/dist/esm/{placeTestOrder-891295e8.js → placeTestOrder-917731cf.js} +11 -7
- package/dist/esm/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +2 -2
- package/dist/esm/{translationStore-766b7521.js → translationStore-d241dcf7.js} +420 -360
- package/dist/esm/zonos-address_11.entry.js +21 -5
- package/dist/esm/zonos-cart-items_13.entry.js +73 -13
- package/dist/esm/zonos-checkout.entry.js +8 -5
- package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +5 -5
- package/dist/esm/zonos-confirm-dialog_2.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +12 -5
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +9 -6
- package/dist/esm/zonos-empty-state-payment_4.entry.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +55 -45
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm-es5/cart-bc0e1598.js +1 -0
- package/dist/esm-es5/hasInclusivePrice-706cc09d.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/localization-53f67640.js +1 -0
- package/dist/esm-es5/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +1 -1
- package/dist/esm-es5/placeTestOrder-917731cf.js +1 -0
- package/dist/esm-es5/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +1 -1
- package/dist/esm-es5/translationStore-d241dcf7.js +1 -0
- package/dist/esm-es5/zonos-address_11.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-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.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-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/scripts/blurCurrencyOnInit.js +1 -1
- package/dist/scripts/index.d.ts +31 -6
- 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-cart-subtotal/zonos-cart-subtotal.d.ts +2 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -1
- package/dist/types/components/store/checkout/cart.d.ts +3 -0
- package/dist/types/components/store/hello/localization.d.ts +14 -3
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.base.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.french.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.german.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -15
- package/dist/types/components/utils/api/getInclusivePriceConfigurations.d.ts +2 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/getOverridenZCountry.d.ts +5 -0
- package/dist/types/components/utils/hasInclusivePrice.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/applyInclusivePrice.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/calculateInclusivePrice.d.ts +27 -0
- package/dist/types/constants/key.d.ts +9 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +1 -0
- package/dist/types/types/InclusivePricing.d.ts +13 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +1 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +2 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +184 -51
- package/dist/types/types/generated/graphql.internal.types.ts +221 -50
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +2 -0
- package/dist/types/utils/performBlurCurrency.d.ts +12 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-c89e9d56.system.js → p-0047fecf.system.js} +1 -1
- package/dist/zonos-elements/{p-bd373de0.system.entry.js → p-0bc8e55c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-964a4d85.js → p-2008df67.js} +1 -1
- package/dist/zonos-elements/{p-2db90c99.system.entry.js → p-22338b4a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-38f2f63f.system.entry.js → p-2eaa5013.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-288f5a5b.system.entry.js → p-304bdbc2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-30981f80.entry.js +1 -0
- package/dist/zonos-elements/p-3a242dfc.system.js +1 -0
- package/dist/zonos-elements/{p-5608ac9d.entry.js → p-3eda5c2c.entry.js} +1 -1
- package/dist/zonos-elements/p-3f0ca5f9.js +1 -0
- package/dist/zonos-elements/{p-23f6a2fb.system.entry.js → p-3f35b8b1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-de984173.system.js → p-419c292c.system.js} +1 -1
- package/dist/zonos-elements/{p-7a97e1cf.system.entry.js → p-4697f061.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4f5be8f0.entry.js +1 -0
- package/dist/zonos-elements/p-516a9666.system.js +1 -0
- package/dist/zonos-elements/p-55c6ff14.system.entry.js +1 -0
- package/dist/zonos-elements/p-6d563f33.system.entry.js +1 -0
- package/dist/zonos-elements/{p-caebc1f8.system.js → p-7730879e.system.js} +1 -1
- package/dist/zonos-elements/p-7920d79c.system.js +1 -0
- package/dist/zonos-elements/p-7c96a585.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/{p-2b84039a.entry.js → p-91fa43ef.entry.js} +1 -1
- package/dist/zonos-elements/p-9a444a82.system.entry.js +1 -0
- package/dist/zonos-elements/p-9bdad585.system.entry.js +1 -0
- package/dist/zonos-elements/p-abc0fb80.js +1 -0
- package/dist/zonos-elements/{p-b0a75761.entry.js → p-ac26a931.entry.js} +1 -1
- package/dist/zonos-elements/p-bb707dfd.system.js +1 -0
- package/dist/zonos-elements/{p-10894d36.entry.js → p-bc963b03.entry.js} +1 -1
- package/dist/zonos-elements/p-c0e080e3.js +1 -0
- package/dist/zonos-elements/p-c20429ea.entry.js +1 -0
- package/dist/zonos-elements/p-c28da00e.entry.js +1 -0
- package/dist/zonos-elements/p-c9be03e0.entry.js +1 -0
- package/dist/zonos-elements/{p-6c8e4f01.system.entry.js → p-cb70de13.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cec35a21.entry.js +1 -0
- package/dist/zonos-elements/{p-cf56b990.entry.js → p-d15cd138.entry.js} +1 -1
- package/dist/zonos-elements/{p-6f1024de.system.entry.js → p-d852d6da.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d9486c57.entry.js +1 -0
- package/dist/zonos-elements/p-db73c11a.entry.js +1 -0
- package/dist/zonos-elements/{p-203c7fda.js → p-e27a9450.js} +1 -1
- package/dist/zonos-elements/{p-258570ce.entry.js → p-ede9e968.entry.js} +1 -1
- package/dist/zonos-elements/p-ee8fcde6.js +1 -0
- package/dist/zonos-elements/p-f688d7a4.system.js +1 -0
- package/dist/zonos-elements/{p-236e0144.system.entry.js → p-ff1722d0.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ff522088.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +3 -3
- package/dist/esm-es5/cart-c74f9aaa.js +0 -1
- package/dist/esm-es5/localization-106476cb.js +0 -1
- package/dist/esm-es5/placeTestOrder-891295e8.js +0 -1
- package/dist/esm-es5/translationStore-766b7521.js +0 -1
- package/dist/types/components/utils/api/getInclusivePricing.d.ts +0 -6
- package/dist/zonos-elements/p-053a042e.entry.js +0 -1
- package/dist/zonos-elements/p-1d15662c.js +0 -1
- package/dist/zonos-elements/p-21b251f0.system.entry.js +0 -1
- package/dist/zonos-elements/p-225a61c4.system.entry.js +0 -1
- package/dist/zonos-elements/p-462f8857.entry.js +0 -1
- package/dist/zonos-elements/p-57ee34aa.system.entry.js +0 -1
- package/dist/zonos-elements/p-595668d7.system.js +0 -1
- package/dist/zonos-elements/p-62803534.entry.js +0 -1
- package/dist/zonos-elements/p-6497ce22.entry.js +0 -1
- package/dist/zonos-elements/p-65db3219.entry.js +0 -1
- package/dist/zonos-elements/p-783e7fa7.entry.js +0 -1
- package/dist/zonos-elements/p-9972941a.entry.js +0 -1
- package/dist/zonos-elements/p-ad7be556.system.entry.js +0 -1
- package/dist/zonos-elements/p-b4fe3604.system.js +0 -1
- package/dist/zonos-elements/p-b8293509.js +0 -1
- package/dist/zonos-elements/p-c3c3cd98.js +0 -1
- package/dist/zonos-elements/p-c6d0e87d.system.entry.js +0 -1
- package/dist/zonos-elements/p-cdaf52f4.system.js +0 -1
- package/dist/zonos-elements/p-cef1e888.system.js +0 -1
- package/dist/zonos-elements/p-eea0d8af.js +0 -1
- package/dist/zonos-elements/p-f4085c23.entry.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
2
|
import { d as debounce_1 } from './debounce-f081e4d8.js';
|
|
3
3
|
import { d as isObject_1, z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
4
|
-
import { c as stripeStore, t as trackConversionEvent, K as extractName, B as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, e as cartStore } from './cart-
|
|
5
|
-
import { s as storageStore,
|
|
6
|
-
import { t as translate } from './translationStore-
|
|
4
|
+
import { c as stripeStore, t as trackConversionEvent, K as extractName, B as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, e as cartStore } from './cart-bc0e1598.js';
|
|
5
|
+
import { s as storageStore, p as getFallbackDefaultCountryCode, q as storageStoreOnChange, l as localizationStore } from './localization-53f67640.js';
|
|
6
|
+
import { t as translate } from './translationStore-d241dcf7.js';
|
|
7
7
|
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-a844cac1.js';
|
|
8
8
|
import { s as shouldRenderTaxIdInput, i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './shouldRenderTaxIdInput-8bc112bb.js';
|
|
9
9
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -1893,7 +1893,7 @@ const validateEmailValue = (value) => {
|
|
|
1893
1893
|
const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";
|
|
1894
1894
|
const ZonosLinkAuthenticationStyle0 = zonosLinkAuthenticationCss;
|
|
1895
1895
|
|
|
1896
|
-
const MAX_RETRIES_INITIALIZE_LINK =
|
|
1896
|
+
const MAX_RETRIES_INITIALIZE_LINK = 31;
|
|
1897
1897
|
const ZonosLinkAuthentication = class {
|
|
1898
1898
|
constructor(hostRef) {
|
|
1899
1899
|
registerInstance(this, hostRef);
|
|
@@ -1969,6 +1969,22 @@ const ZonosLinkAuthentication = class {
|
|
|
1969
1969
|
});
|
|
1970
1970
|
stripeStore.stripeLinkElement = linkAuthenticationElement;
|
|
1971
1971
|
this.retriesInitializeLink = 0;
|
|
1972
|
+
// 10 seconds
|
|
1973
|
+
if (this.retriesInitializeLink > 11) {
|
|
1974
|
+
log('Stripe link element initialized', 'info', {
|
|
1975
|
+
retriesInitializeLink: this.retriesInitializeLink,
|
|
1976
|
+
stripe: this.stripe,
|
|
1977
|
+
});
|
|
1978
|
+
void sendErrorLog({
|
|
1979
|
+
endpoint: 'stripe-link-authentication-init-long-running',
|
|
1980
|
+
errors: [
|
|
1981
|
+
'Stripe link element initialized after 20 retries - 10 seconds',
|
|
1982
|
+
],
|
|
1983
|
+
metadata: {
|
|
1984
|
+
retriesInitializeLink: this.retriesInitializeLink,
|
|
1985
|
+
},
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1972
1988
|
}
|
|
1973
1989
|
catch (error) {
|
|
1974
1990
|
if (error instanceof Error) {
|
|
@@ -1983,7 +1999,7 @@ const ZonosLinkAuthentication = class {
|
|
|
1983
1999
|
endpoint: 'stripe-link-authentication-init-error',
|
|
1984
2000
|
errors: [error.message],
|
|
1985
2001
|
metadata: {
|
|
1986
|
-
|
|
2002
|
+
retriesInitializeLink: this.retriesInitializeLink,
|
|
1987
2003
|
},
|
|
1988
2004
|
});
|
|
1989
2005
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, d as getAssetPath, h, H as Host, F as Fragment, c as createEvent, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { e as cartStore, E as cartStoreHasOneEligibleItem, F as stripeStoreApplyPromoCode, G as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, I as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, J as stripeStoreTranslateAddressToLatin, K as extractName, z as cartStoreOnChange, L as stripeStoreAsyncAddressUpdate, D as cartStoreUpdateSelectedShippingOption, M as cartStoreGetShippingTransitInfo, N as cartStoreGetMethod, O as sortServiceLevelOptionsByAmount } from './cart-
|
|
3
|
-
import { t as translate } from './translationStore-
|
|
4
|
-
import { r as renderCheckoutCurrency, p as placeTestOrder } from './placeTestOrder-
|
|
2
|
+
import { e as cartStore, E as cartStoreHasOneEligibleItem, F as stripeStoreApplyPromoCode, G as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, I as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, J as stripeStoreTranslateAddressToLatin, K as extractName, z as cartStoreOnChange, L as stripeStoreAsyncAddressUpdate, D as cartStoreUpdateSelectedShippingOption, M as cartStoreGetShippingTransitInfo, N as cartStoreGetMethod, O as sortServiceLevelOptionsByAmount } from './cart-bc0e1598.js';
|
|
3
|
+
import { t as translate } from './translationStore-d241dcf7.js';
|
|
4
|
+
import { r as renderCheckoutCurrency, p as placeTestOrder } from './placeTestOrder-917731cf.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-b5b18743.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
|
+
import { l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-53f67640.js';
|
|
7
8
|
import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
8
|
-
import {
|
|
9
|
-
import { s as
|
|
9
|
+
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-706cc09d.js';
|
|
10
|
+
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-3a6a048d.js';
|
|
10
11
|
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
11
12
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
12
13
|
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
@@ -148,12 +149,43 @@ const ZonosCartSubtotal = class {
|
|
|
148
149
|
* Loading state for apply promo code button
|
|
149
150
|
*/
|
|
150
151
|
this.loading = false;
|
|
152
|
+
this.getInclusivePriceType = () => {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
const inclusivePriceConfiguration = localizationStore.inclusivePricingConfigurations.find(Boolean);
|
|
155
|
+
const dutyInclusive = ((_a = inclusivePriceConfiguration === null || inclusivePriceConfiguration === void 0 ? void 0 : inclusivePriceConfiguration.configurations[DUTY_KEY]) === null || _a === void 0 ? void 0 : _a.status) ===
|
|
156
|
+
'ENABLED';
|
|
157
|
+
const taxInclusive = ((_b = inclusivePriceConfiguration === null || inclusivePriceConfiguration === void 0 ? void 0 : inclusivePriceConfiguration.configurations[TAXES_KEY]) === null || _b === void 0 ? void 0 : _b.status) ===
|
|
158
|
+
'ENABLED';
|
|
159
|
+
if (dutyInclusive && taxInclusive) {
|
|
160
|
+
return 'DUTY_TAX_AND_FEE';
|
|
161
|
+
}
|
|
162
|
+
// Fee would also be included with duty if it's inclusive
|
|
163
|
+
if (dutyInclusive) {
|
|
164
|
+
return 'DUTY_AND_FEE';
|
|
165
|
+
}
|
|
166
|
+
if (taxInclusive) {
|
|
167
|
+
return 'TAX';
|
|
168
|
+
}
|
|
169
|
+
return null;
|
|
170
|
+
};
|
|
171
|
+
this.getCartSubtotalSubtitle = () => {
|
|
172
|
+
const inclusivePriceType = this.getInclusivePriceType();
|
|
173
|
+
if (inclusivePriceType === 'DUTY_AND_FEE') {
|
|
174
|
+
return (h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Duties and fees included')));
|
|
175
|
+
}
|
|
176
|
+
if (inclusivePriceType === 'TAX') {
|
|
177
|
+
return (h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Taxes included')));
|
|
178
|
+
}
|
|
179
|
+
return null;
|
|
180
|
+
};
|
|
151
181
|
}
|
|
152
182
|
render() {
|
|
153
183
|
var _a, _b, _c, _d, _e;
|
|
184
|
+
// Since now we are prefetching the landed cost, we need to not show the total that includes the landed cost and shipping
|
|
185
|
+
const cartTotal = cartStore.step === 'customer-info' ? cartStore.subtotal : cartStore.total;
|
|
154
186
|
const showDutyTaxesInfo = cartStore.step === 'payment' || cartStore.step === 'shipping';
|
|
155
187
|
// Show 0 for subtotal and total when all items are restricted
|
|
156
|
-
const total = cartStoreHasOneEligibleItem() ?
|
|
188
|
+
const total = cartStoreHasOneEligibleItem() ? cartTotal : 0;
|
|
157
189
|
// Total is in target currency, devide by target rate to get base currency
|
|
158
190
|
const subtotal = cartStoreHasOneEligibleItem() ? cartStore.subtotal : 0;
|
|
159
191
|
const shouldRenderPromoInput =
|
|
@@ -179,16 +211,43 @@ const ZonosCartSubtotal = class {
|
|
|
179
211
|
this.loading = false;
|
|
180
212
|
};
|
|
181
213
|
const renderShippingInfo = () => {
|
|
182
|
-
if (!cartStore.selectedShippingOption
|
|
214
|
+
if (!cartStore.selectedShippingOption ||
|
|
215
|
+
// Should not show shipping info at customer info step
|
|
216
|
+
cartStore.step === 'customer-info') {
|
|
183
217
|
return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Shipping')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('No shipping method selected'))));
|
|
184
218
|
}
|
|
185
219
|
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))));
|
|
186
220
|
};
|
|
187
221
|
const renderLandedCost = () => {
|
|
188
222
|
var _a, _b, _c;
|
|
223
|
+
// At the moment, inclusive price only support for US merchant
|
|
224
|
+
if (hasInclusivePrice()) {
|
|
225
|
+
const inclusivePriceType = this.getInclusivePriceType();
|
|
226
|
+
// This should not happen, put it here to exclude null from the type
|
|
227
|
+
if (!inclusivePriceType) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
if (inclusivePriceType === 'TAX') {
|
|
231
|
+
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties and fees')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Nothing due at the door'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
|
|
232
|
+
? renderCheckoutCurrency({
|
|
233
|
+
amount: cartStore.dutiesTaxesFees,
|
|
234
|
+
isForeign: true,
|
|
235
|
+
})
|
|
236
|
+
: '-'))));
|
|
237
|
+
}
|
|
238
|
+
if (inclusivePriceType === 'DUTY_AND_FEE') {
|
|
239
|
+
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
|
|
240
|
+
? renderCheckoutCurrency({
|
|
241
|
+
amount: cartStore.dutiesTaxesFees,
|
|
242
|
+
isForeign: true,
|
|
243
|
+
})
|
|
244
|
+
: '-'))));
|
|
245
|
+
}
|
|
246
|
+
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('The purchase price covers duties, taxes and fees.'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, "-"))));
|
|
247
|
+
}
|
|
189
248
|
// Domestic US doesn't have duty applied, just taxes and fees
|
|
190
249
|
if ((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')) {
|
|
191
|
-
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 ||
|
|
250
|
+
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes and fees'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null ||
|
|
192
251
|
cartStore.dutiesTaxesFeesEstimate !== null
|
|
193
252
|
? renderCheckoutCurrency({
|
|
194
253
|
amount: cartStore.dutiesTaxesFees ||
|
|
@@ -199,23 +258,23 @@ const ZonosCartSubtotal = class {
|
|
|
199
258
|
: '-'))));
|
|
200
259
|
}
|
|
201
260
|
if (cartStore.landedCostMethod === 'DAP') {
|
|
202
|
-
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
|
|
261
|
+
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), cartStore.dutiesTaxesFeesEstimate !== null
|
|
203
262
|
? `${translate('Estimated [amount]', {
|
|
204
263
|
amount: renderCheckoutCurrency({
|
|
205
264
|
amount: cartStore.dutiesTaxesFeesEstimate,
|
|
206
265
|
isForeign: true,
|
|
207
266
|
}),
|
|
208
267
|
})}`
|
|
209
|
-
: '-'), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, translate('Due at delivery')))));
|
|
268
|
+
: '-'), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, translate('Due at delivery')))));
|
|
210
269
|
}
|
|
211
|
-
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')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Nothing due at the door'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
|
|
270
|
+
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Nothing due at the door'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
|
|
212
271
|
? renderCheckoutCurrency({
|
|
213
272
|
amount: cartStore.dutiesTaxesFees,
|
|
214
273
|
isForeign: true,
|
|
215
274
|
})
|
|
216
275
|
: '-'))));
|
|
217
276
|
};
|
|
218
|
-
return (h(Host, { class: "zonos--cart-subtotal zonos--elements" }, h("table", { class: "zonos--cart-table" }, h("tr", { class: "zonos--row zonos--cart-subtotal" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Cart subtotal'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
277
|
+
return (h(Host, { class: "zonos--cart-subtotal zonos--elements" }, h("table", { class: "zonos--cart-table" }, h("tr", { class: "zonos--row zonos--cart-subtotal" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Cart subtotal')), h("zonos-text", { class: "zonos--caption", type: "caption" }, this.getCartSubtotalSubtitle())), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
219
278
|
amount: subtotal,
|
|
220
279
|
isForeign: true,
|
|
221
280
|
})))), h("tr", { class: "zonos--row zonos--cart-shipping" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, renderShippingInfo()), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, cartStore.shipping
|
|
@@ -1620,7 +1679,8 @@ const ZonosReview = class {
|
|
|
1620
1679
|
this.isMobile = isCheckoutMobile(this.mobile);
|
|
1621
1680
|
}
|
|
1622
1681
|
render() {
|
|
1623
|
-
const
|
|
1682
|
+
const cartTotal = cartStore.step === 'customer-info' ? cartStore.subtotal : cartStore.total;
|
|
1683
|
+
const total = cartStoreHasOneEligibleItem() ? cartTotal : 0;
|
|
1624
1684
|
const titleTextType = this.isMobile ? 'boldSubheader' : 'semiBoldLabel';
|
|
1625
1685
|
const totalTextType = this.isMobile
|
|
1626
1686
|
? 'boldSubheader'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, H as Host } from './index-55a03023.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreCleanupDomesticShippingSession, b as stripeStoreSaveDomesticShippingSession, c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as cartStoreUpdateItems, g as cartStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset, z as cartStoreOnChange } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, c as localizationStoreOnChange, d as currencyFormat } from './localization-
|
|
5
|
-
import { t as translate } from './translationStore-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreCleanupDomesticShippingSession, b as stripeStoreSaveDomesticShippingSession, c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as cartStoreUpdateItems, g as cartStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset, z as cartStoreOnChange } from './cart-bc0e1598.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-3a6a048d.js';
|
|
4
|
+
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, c as localizationStoreOnChange, d as currencyFormat } from './localization-53f67640.js';
|
|
5
|
+
import { t as translate } from './translationStore-d241dcf7.js';
|
|
6
6
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-e3d0493a.js';
|
|
7
7
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
8
8
|
import { h as handleFetch, l as logError, s as sendErrorLog, b as getAdditionalLogMetadata, g as getIsTestMode, j as jsonParse, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-a844cac1.js';
|
|
@@ -159,7 +159,10 @@ const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector, onShi
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
// update the country code in localization store and check if it's shippable
|
|
162
|
-
localizationStoreUpdateSelectedCountryCode(
|
|
162
|
+
localizationStoreUpdateSelectedCountryCode({
|
|
163
|
+
isInitializing: false,
|
|
164
|
+
newSelectedCountryCode: shippingCountry,
|
|
165
|
+
});
|
|
163
166
|
// do nothing if the country is still domestic
|
|
164
167
|
if (!isShippableCountry(false)) {
|
|
165
168
|
// cleanup the domestic shipping session if it's domestic because we will open the intl checkout after redirecting
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, d as getAssetPath, h, H as Host } from './index-55a03023.js';
|
|
2
|
-
import { e as cartStore } from './cart-
|
|
2
|
+
import { e as cartStore } from './cart-bc0e1598.js';
|
|
3
3
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-b5b18743.js';
|
|
4
4
|
import { f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
7
|
-
import './localization-
|
|
7
|
+
import './localization-53f67640.js';
|
|
8
8
|
import './handleFetch-a844cac1.js';
|
|
9
9
|
import './VarianceTest-572cecf5.js';
|
|
10
|
-
import './translationStore-
|
|
10
|
+
import './translationStore-d241dcf7.js';
|
|
11
11
|
import './isDarkColor-83e0c27e.js';
|
|
12
12
|
import './getBorderRadius-6281d902.js';
|
|
13
13
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { c as stripeStore, d as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, y as stripeStoreReset, I as stripeStoreMessageBasedOnStatus, e as cartStore, r as cartStoreNextStep, z as cartStoreOnChange } from './cart-
|
|
3
|
-
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { s as storageStore, l as localizationStore } from './localization-
|
|
5
|
-
import { t as translate, b as translationStoreOnChange } from './translationStore-
|
|
2
|
+
import { c as stripeStore, d as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, y as stripeStoreReset, I as stripeStoreMessageBasedOnStatus, e as cartStore, r as cartStoreNextStep, z as cartStoreOnChange } from './cart-bc0e1598.js';
|
|
3
|
+
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-3a6a048d.js';
|
|
4
|
+
import { s as storageStore, l as localizationStore } from './localization-53f67640.js';
|
|
5
|
+
import { t as translate, b as translationStoreOnChange } from './translationStore-d241dcf7.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-e3d0493a.js';
|
|
7
7
|
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
8
8
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
10
10
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
11
|
-
import { i as isCollectMobile, a as isCollectTablet, e as collectStore, r as renderFallback } from './renderFallback-
|
|
11
|
+
import { i as isCollectMobile, a as isCollectTablet, e as collectStore, r as renderFallback } from './renderFallback-cd0e40d9.js';
|
|
12
12
|
import { c as classes } from './classes-0d95c529.js';
|
|
13
13
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
14
|
-
import { r as renderCheckoutCurrency, p as placeTestOrder } from './placeTestOrder-
|
|
14
|
+
import { r as renderCheckoutCurrency, p as placeTestOrder } from './placeTestOrder-917731cf.js';
|
|
15
15
|
import './isDarkColor-83e0c27e.js';
|
|
16
16
|
|
|
17
17
|
const RemoveIcon = `<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-55a03023.js';
|
|
2
|
-
import { c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, o as cartStoreUpdateToErrorState, f as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, w as stripeStoreConfirmPayment, B as stripeStoreOnChange, y as stripeStoreReset, g as cartStoreReset } from './cart-
|
|
3
|
-
import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore, r as renderFallback } from './renderFallback-
|
|
4
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-
|
|
5
|
-
import { s as storageStore, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-
|
|
6
|
-
import { t as translate } from './translationStore-
|
|
2
|
+
import { c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, o as cartStoreUpdateToErrorState, f as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, w as stripeStoreConfirmPayment, B as stripeStoreOnChange, y as stripeStoreReset, g as cartStoreReset } from './cart-bc0e1598.js';
|
|
3
|
+
import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore, r as renderFallback } from './renderFallback-cd0e40d9.js';
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-3a6a048d.js';
|
|
5
|
+
import { s as storageStore, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-53f67640.js';
|
|
6
|
+
import { t as translate } from './translationStore-d241dcf7.js';
|
|
7
7
|
import { z as zonosStore } from './zonosStore-e3d0493a.js';
|
|
8
8
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
9
9
|
import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-a844cac1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { t as translate } from './translationStore-
|
|
2
|
+
import { t as translate } from './translationStore-d241dcf7.js';
|
|
3
3
|
import { g as getZonosStoreTheme, f as zonosStoreFontFamily, z as zonosStore } from './zonosStore-e3d0493a.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-55a03023.js';
|
|
2
|
-
import { c as stripeStore } from './cart-
|
|
3
|
-
import { i as isValidSelector,
|
|
2
|
+
import { c as stripeStore } from './cart-bc0e1598.js';
|
|
3
|
+
import { e as getOverridenZCountry, i as isValidSelector, h as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-53f67640.js';
|
|
4
4
|
import { z as zonosStore, e as zonosStoreInitSetting, f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
5
5
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-0bc3e118.js';
|
|
6
6
|
import { h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
8
|
-
import './translationStore-
|
|
8
|
+
import './translationStore-d241dcf7.js';
|
|
9
9
|
import './isDarkColor-83e0c27e.js';
|
|
10
10
|
import './getBorderRadius-6281d902.js';
|
|
11
11
|
|
|
@@ -23,6 +23,10 @@ const getZonosSettings = async () => {
|
|
|
23
23
|
if (overrideSettings.overrideShouldEnabledCustomAddress) {
|
|
24
24
|
params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
|
|
25
25
|
}
|
|
26
|
+
const zCountry = getOverridenZCountry();
|
|
27
|
+
if (zCountry) {
|
|
28
|
+
params.set('zCountry', zCountry);
|
|
29
|
+
}
|
|
26
30
|
const { errors, json, zonosMode } = await handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
|
|
27
31
|
if (errors.length) {
|
|
28
32
|
logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
|
|
@@ -672,7 +676,10 @@ const ZonosController = class {
|
|
|
672
676
|
*/
|
|
673
677
|
async overrideCountry(countryCode) {
|
|
674
678
|
log(`Override country code to ${countryCode}`);
|
|
675
|
-
void localizationStoreUpdateSelectedCountryCode(
|
|
679
|
+
void localizationStoreUpdateSelectedCountryCode({
|
|
680
|
+
isInitializing: false,
|
|
681
|
+
newSelectedCountryCode: countryCode,
|
|
682
|
+
});
|
|
676
683
|
}
|
|
677
684
|
/**
|
|
678
685
|
* Get appearance from setting
|
|
@@ -687,7 +694,7 @@ const ZonosController = class {
|
|
|
687
694
|
zonosStore.organizationName = organizationName;
|
|
688
695
|
}
|
|
689
696
|
render() {
|
|
690
|
-
return h(Host, { key: '
|
|
697
|
+
return h(Host, { key: 'c3c33e5e4422b4b05f68fc876a23eb30c9b0f11d', class: "zonos--elements" });
|
|
691
698
|
}
|
|
692
699
|
};
|
|
693
700
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { l as localizationStore } from './localization-
|
|
2
|
+
import { l as localizationStore } from './localization-53f67640.js';
|
|
3
3
|
import { f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-a844cac1.js';
|
|
6
6
|
import './VarianceTest-572cecf5.js';
|
|
7
|
-
import './translationStore-
|
|
7
|
+
import './translationStore-d241dcf7.js';
|
|
8
8
|
|
|
9
9
|
const zonosCountryFlagCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";
|
|
10
10
|
const ZonosCountryFlagStyle0 = zonosCountryFlagCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './localization-
|
|
3
|
-
import { t as translate } from './translationStore-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './localization-53f67640.js';
|
|
3
|
+
import { t as translate } from './translationStore-d241dcf7.js';
|
|
4
4
|
import { f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
6
6
|
import { i as isDarkColor } from './isDarkColor-83e0c27e.js';
|
|
@@ -1822,7 +1822,10 @@ const ZonosCountrySelect = class {
|
|
|
1822
1822
|
this.inputValue = '';
|
|
1823
1823
|
this.countrySelected = (countryCode) => {
|
|
1824
1824
|
// mutate the selected country code in store
|
|
1825
|
-
void localizationStoreUpdateSelectedCountryCode(
|
|
1825
|
+
void localizationStoreUpdateSelectedCountryCode({
|
|
1826
|
+
isInitializing: false,
|
|
1827
|
+
newSelectedCountryCode: countryCode,
|
|
1828
|
+
});
|
|
1826
1829
|
this.handleOnClose();
|
|
1827
1830
|
};
|
|
1828
1831
|
this.handleInputChange = (event) => {
|
|
@@ -1855,13 +1858,13 @@ const ZonosCountrySelect = class {
|
|
|
1855
1858
|
? fuseObject.map(country => country.item)
|
|
1856
1859
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1857
1860
|
const isEmpty = !filteredCountries.length;
|
|
1858
|
-
return (h(Host, { key: '
|
|
1861
|
+
return (h(Host, { key: '4bdbe0a40e52745510cf5c51826375eb46d6c85a', class: "zonos--elements", style: {
|
|
1859
1862
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
1860
|
-
} }, h("div", { key: '
|
|
1863
|
+
} }, h("div", { key: '82492f3baa43f2691fa9457fdde52fcc6d6b153e', class: "zonos--country-select" }, h("zonos-v-stack", { key: '56fa5efa199d1f83f8042b9280295d0e08c9d045', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '3b84b57f1b80152fcb0c4049672796c87744517a', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '68b9b5af5dbdf20d47e39c45b3c64df772afb56f', autoComplete: "off", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), ref: el => {
|
|
1861
1864
|
if (el) {
|
|
1862
1865
|
this.inputRef = el;
|
|
1863
1866
|
}
|
|
1864
|
-
}, type: "text", value: this.inputValue }))), h("div", { key: '
|
|
1867
|
+
}, type: "text", value: this.inputValue }))), h("div", { key: '365e7ae9464070080182bb4b83f232d0952eb9c8', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: '025ae5379da4ef222c39544bee3b009bc3a3c7a4', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '3ae131cb44d63bd239e3c90cbfcaf8535817c663', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
|
|
1865
1868
|
const country = filteredCountries[index];
|
|
1866
1869
|
if (!country) {
|
|
1867
1870
|
return null;
|
|
@@ -2,12 +2,12 @@ import { r as registerInstance, h, H as Host, a as getElement, c as createEvent
|
|
|
2
2
|
import { f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
5
|
-
import { c as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
5
|
+
import { c as stripeStore, t as trackConversionEvent } from './cart-bc0e1598.js';
|
|
6
|
+
import { s as storageStore } from './localization-53f67640.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-3a6a048d.js';
|
|
9
9
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
|
-
import './translationStore-
|
|
10
|
+
import './translationStore-d241dcf7.js';
|
|
11
11
|
import './isDarkColor-83e0c27e.js';
|
|
12
12
|
|
|
13
13
|
const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|