@zonos/elements 1.5.1 → 1.5.3
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/_isBigCommerceNativeCheckout-3-xbKbAO.js +133 -0
- package/dist/cjs/{cart-CiXlehwQ.js → cart-C39TMSgB.js} +27 -13
- package/dist/cjs/{collect-Drr8fY-q.js → collect-lF9DenLk.js} +4 -4
- package/dist/cjs/{getMissingRequiredShippingFields-DI6qF1z3.js → getMissingRequiredShippingFields-svcnpumn.js} +1 -1
- package/dist/cjs/{handleFetch-DQLhurnE.js → handleFetch-DVfjFTYO.js} +181 -71
- package/dist/cjs/{hasInclusivePrice-84KS94yH.js → hasInclusivePrice-CEPf3_FG.js} +1 -1
- package/dist/cjs/index.cjs.js +158 -47
- package/dist/cjs/{invoice-5hVfSXpb.js → invoice-BD3pCr8P.js} +3 -3
- package/dist/cjs/{localization-B2mjW0Xa.js → localization-BhNVhLZs.js} +24 -48
- package/dist/cjs/{paypal-pd8Nz_R_.js → paypal-Bd1qmwiv.js} +4 -4
- package/dist/cjs/{placeTestOrder-DrI8rD9o.js → placeTestOrder-BMQRvX2q.js} +3 -3
- package/dist/cjs/{renderCheckoutCurrency-u5q8YdUb.js → renderCheckoutCurrency-DE2p8CT8.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-gBg4KeTQ.js → shouldShowLanguageSelect-NOVWOU53.js} +1 -1
- package/dist/cjs/{submitGtag-Rc-S3PnH.js → submitGtag-D4sB7w4z.js} +1 -1
- package/dist/cjs/{taxIdFields-BrIaPTcd.js → taxIdFields-BKbk2bhi.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-d0IKpwW8.js → updateCheckoutSessionAttributes-KxwcsKhM.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +6 -6
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card_5.cjs.entry.js +5 -5
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +18 -18
- package/dist/cjs/zonos-checkout.cjs.entry.js +48 -22
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +9 -9
- package/dist/cjs/zonos-collect.cjs.entry.js +6 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +65 -40
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +9 -9
- package/dist/cjs/zonos-invoice.cjs.entry.js +6 -6
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +8 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +14 -4
- package/dist/collection/components/main/mountCheckoutWithoutStripe.js +12 -0
- package/dist/collection/components/main/zonos-controller.js +26 -10
- package/dist/collection/components/store/checkout/cart.js +3 -2
- package/dist/collection/components/store/checkout/stripe.js +23 -10
- package/dist/collection/components/store/storageStore.js +7 -6
- package/dist/collection/components/utils/__tests__/helpers/blockStorage.js +24 -0
- package/dist/collection/components/utils/api/getExchangeRate.js +2 -1
- package/dist/collection/components/utils/checkout/isBigCommerceCheckoutBypassEnabled.js +2 -1
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +32 -12
- package/dist/collection/components/utils/handleFetch.js +19 -9
- package/dist/collection/components/utils/hello/countryOverrideStorage.js +17 -40
- package/dist/collection/components/utils/logging/installConstructorCapture.js +58 -0
- package/dist/collection/components/utils/logging/reportBlockedStorage.js +34 -0
- package/dist/collection/components/utils/logging/sendErrorLog.js +8 -1
- package/dist/collection/components/utils/logging/startZonosInit.js +35 -0
- package/dist/collection/components/utils/logging/thrownMessage.js +16 -0
- package/dist/collection/components/utils/safeStorage.js +39 -0
- package/dist/collection/scripts/_bigcommerceCheckoutPath.js +16 -0
- package/dist/collection/scripts/_detectBigCommerceHost.js +12 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +3 -2
- package/dist/collection/scripts/_isBigCommerceNativeCheckout.js +107 -0
- package/dist/collection/scripts/_loadStripe.js +15 -4
- package/dist/collection/scripts/_zonosBase.js +46 -33
- package/dist/collection/types/generated/graphql.frontend.types.js +0 -16
- package/dist/collection/types/generated/graphql.internal.types.js +215 -1
- package/dist/esm/_isBigCommerceNativeCheckout-Bb90IMVt.js +128 -0
- package/dist/esm/{cart-DmJkjiDE.js → cart-b84n0nhi.js} +26 -14
- package/dist/esm/{collect-BV5GTPmh.js → collect-B_AEVONL.js} +4 -4
- package/dist/esm/{getMissingRequiredShippingFields-DljgpDZe.js → getMissingRequiredShippingFields-EY10c34-.js} +1 -1
- package/dist/esm/{handleFetch-D5GYDF-O.js → handleFetch-BFVO7oAR.js} +178 -72
- package/dist/esm/{hasInclusivePrice-DhGXpH2D.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm/index.js +158 -47
- package/dist/esm/{invoice-CO-iqlni.js → invoice-dQ0ONK5Q.js} +3 -3
- package/dist/esm/{localization-DHM91diu.js → localization-B5CRzthT.js} +25 -49
- package/dist/esm/{paypal-BfW5aLJw.js → paypal-CF_oM0B6.js} +4 -4
- package/dist/esm/{placeTestOrder-CyWUFhxD.js → placeTestOrder-BTpfyqPL.js} +3 -3
- package/dist/esm/{renderCheckoutCurrency-B31ZNkUv.js → renderCheckoutCurrency-CpeuDWx-.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-DwSfSHar.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm/{submitGtag-BEFrutel.js → submitGtag-C5xzFHjG.js} +1 -1
- package/dist/esm/{taxIdFields-ByEYfsO5.js → taxIdFields-BCyXnc9O.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-B0bQH0uw.js → updateCheckoutSessionAttributes-C9bMKTjz.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +6 -6
- package/dist/esm/zonos-address-display_2.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +4 -4
- package/dist/esm/zonos-airwallex-payment.entry.js +4 -4
- package/dist/esm/zonos-card_5.entry.js +5 -5
- package/dist/esm/zonos-cart-items_12.entry.js +18 -18
- package/dist/esm/zonos-checkout.entry.js +48 -22
- package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
- package/dist/esm/zonos-collect-finish_6.entry.js +9 -9
- package/dist/esm/zonos-collect.entry.js +6 -6
- package/dist/esm/zonos-controller.entry.js +65 -40
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +3 -3
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +5 -5
- package/dist/esm/zonos-invoice-finish_5.entry.js +9 -9
- package/dist/esm/zonos-invoice.entry.js +6 -6
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-policy-consent_2.entry.js +4 -4
- package/dist/esm-es5/_isBigCommerceNativeCheckout-Bb90IMVt.js +40 -0
- package/dist/esm-es5/{cart-DmJkjiDE.js → cart-b84n0nhi.js} +59 -59
- package/dist/esm-es5/{collect-BV5GTPmh.js → collect-B_AEVONL.js} +2 -2
- package/dist/esm-es5/{getMissingRequiredShippingFields-DljgpDZe.js → getMissingRequiredShippingFields-EY10c34-.js} +3 -3
- package/dist/esm-es5/handleFetch-BFVO7oAR.js +73 -0
- package/dist/esm-es5/{hasInclusivePrice-DhGXpH2D.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm-es5/index.js +94 -65
- package/dist/esm-es5/{invoice-CO-iqlni.js → invoice-dQ0ONK5Q.js} +1 -1
- package/dist/esm-es5/{localization-DHM91diu.js → localization-B5CRzthT.js} +7 -10
- package/dist/esm-es5/{paypal-BfW5aLJw.js → paypal-CF_oM0B6.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-CyWUFhxD.js → placeTestOrder-BTpfyqPL.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-B31ZNkUv.js → renderCheckoutCurrency-CpeuDWx-.js} +5 -5
- package/dist/esm-es5/{shouldShowLanguageSelect-DwSfSHar.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm-es5/{submitGtag-BEFrutel.js → submitGtag-C5xzFHjG.js} +1 -1
- package/dist/esm-es5/{taxIdFields-ByEYfsO5.js → taxIdFields-BCyXnc9O.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-B0bQH0uw.js → updateCheckoutSessionAttributes-C9bMKTjz.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2 -2
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +6 -6
- package/dist/esm-es5/zonos-cart-items_12.entry.js +127 -127
- package/dist/esm-es5/zonos-checkout.entry.js +22 -11
- 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-controller.entry.js +21 -12
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +3 -3
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +22 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/main/mountCheckoutWithoutStripe.d.ts +8 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -1
- package/dist/types/components/utils/__tests__/helpers/blockStorage.d.ts +3 -0
- package/dist/types/components/utils/logging/installConstructorCapture.d.ts +20 -0
- package/dist/types/components/utils/logging/reportBlockedStorage.d.ts +16 -0
- package/dist/types/components/utils/logging/startZonosInit.d.ts +5 -0
- package/dist/types/components/utils/logging/thrownMessage.d.ts +1 -0
- package/dist/types/components/utils/safeStorage.d.ts +4 -0
- package/dist/types/scripts/_bigcommerceCheckoutPath.d.ts +12 -0
- package/dist/types/scripts/_detectBigCommerceHost.d.ts +5 -0
- package/dist/types/scripts/_isBigCommerceNativeCheckout.d.ts +21 -0
- package/dist/types/scripts/_zonosBase.d.ts +16 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +0 -22
- package/dist/types/types/generated/graphql.frontend.types.ts +0 -51
- package/dist/types/types/generated/graphql.internal.types.d.ts +270 -1
- package/dist/types/types/generated/graphql.internal.types.ts +341 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-8fa6cfff.entry.js → p-02faff47.entry.js} +1 -1
- package/dist/zonos-elements/{p-216a908d.system.entry.js → p-0c68cbbb.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-vTIygnHq.system.js → p-1OG3IJgY.system.js} +1 -1
- package/dist/zonos-elements/{p-960070d0.system.entry.js → p-1cd2d097.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-1e6db427.entry.js → p-255e411a.entry.js} +1 -1
- package/dist/zonos-elements/p-2c_UqKJL.system.js +7 -0
- package/dist/zonos-elements/{p-DprOoI2W.system.js → p-3AUMK-5E.system.js} +154 -154
- package/dist/zonos-elements/{p-d3345b2c.entry.js → p-3ee87d8b.entry.js} +1 -1
- package/dist/zonos-elements/{p-cccaad60.system.entry.js → p-42fa5694.system.entry.js} +10 -10
- package/dist/zonos-elements/p-49eaaab8.entry.js +1 -0
- package/dist/zonos-elements/{p-fda89981.system.entry.js → p-4ce4c49f.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-f3d9a380.system.entry.js → p-5622fc50.system.entry.js} +263 -252
- package/dist/zonos-elements/{p-5585db86.system.entry.js → p-59457fd9.system.entry.js} +73 -64
- package/dist/zonos-elements/{p-65817880.entry.js → p-66398133.entry.js} +1 -1
- package/dist/zonos-elements/{p-d8f375da.system.entry.js → p-674323ac.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-678b9214.entry.js → p-71d9a5b7.entry.js} +1 -1
- package/dist/zonos-elements/{p-189cc594.system.entry.js → p-81780f8f.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-6e691736.entry.js → p-821b83a2.entry.js} +1 -1
- package/dist/zonos-elements/{p-1fda4aec.system.entry.js → p-877a82d2.system.entry.js} +94 -94
- package/dist/zonos-elements/p-8daec112.entry.js +1 -0
- package/dist/zonos-elements/{p-46a839d2.system.entry.js → p-93bc75fd.system.entry.js} +13 -13
- package/dist/zonos-elements/{p-2ca826b9.system.entry.js → p-976b3bf3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84e76348.entry.js → p-9a4947a5.entry.js} +1 -1
- package/dist/zonos-elements/p-9f7693bf.entry.js +1 -0
- package/dist/zonos-elements/p-BIJM2Kj-.js +1 -0
- package/dist/zonos-elements/p-BJFa5RwX.js +1 -0
- package/dist/zonos-elements/{p-6vSUiBfr.system.js → p-BOh4ifdL.system.js} +51 -54
- package/dist/zonos-elements/p-BZAX-HmS.js +1 -0
- package/dist/zonos-elements/p-Bb90IMVt.js +1 -0
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-CbhN65lj.system.js → p-BvoPE_nb.system.js} +1 -1
- package/dist/zonos-elements/{p-iAIzUA4k.js → p-C3E55OqH.js} +1 -1
- package/dist/zonos-elements/{p-CBUz18kA.system.js → p-C3gF3UV5.system.js} +23 -23
- package/dist/zonos-elements/{p-XoQH3S7Z.system.js → p-CD2ahEZn.system.js} +1 -1
- package/dist/zonos-elements/p-CEBBLbvF.js +1 -0
- package/dist/zonos-elements/{p-CGNVm52g.system.js → p-CEV0O_IQ.system.js} +5 -5
- package/dist/zonos-elements/{p-D1e9zNDA.js → p-CJmWr75U.js} +1 -1
- package/dist/zonos-elements/{p-DgUrB-1a.system.js → p-CZ-uYiCo.system.js} +1 -1
- package/dist/zonos-elements/p-Cn2xE-9t.system.js +256 -0
- package/dist/zonos-elements/p-CtvXi9wL.system.js +41 -0
- package/dist/zonos-elements/{p-BrQ8n8NS.system.js → p-Cw_Qnyow.system.js} +3 -3
- package/dist/zonos-elements/p-CzXNXgyI.js +1 -0
- package/dist/zonos-elements/p-D0DkOoAw.system.js +73 -0
- package/dist/zonos-elements/p-D9OPKqLg.js +1 -0
- package/dist/zonos-elements/{p-ojtNq-r5.system.js → p-DXlojp_Y.system.js} +1 -1
- package/dist/zonos-elements/{p-DpwmHU8R.js → p-Df62LRNs.js} +2 -2
- package/dist/zonos-elements/{p-CHKKvuiz.js → p-Lsqrpzc5.js} +1 -1
- package/dist/zonos-elements/{p-C9XLkmmb.system.js → p-YQFbWtjn.system.js} +1 -1
- package/dist/zonos-elements/p-a27f48e4.entry.js +1 -0
- package/dist/zonos-elements/{p-941a95a1.system.entry.js → p-a6bb296c.system.entry.js} +7 -7
- package/dist/zonos-elements/{p-2b63865a.system.entry.js → p-abb85879.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-12b24ebb.entry.js → p-b8653024.entry.js} +1 -1
- package/dist/zonos-elements/p-b9d7a3b6.entry.js +1 -0
- package/dist/zonos-elements/{p-f5f95990.system.entry.js → p-be067e12.system.entry.js} +15 -15
- package/dist/zonos-elements/p-bmrOH9oh.js +1 -0
- package/dist/zonos-elements/p-c185bc23.entry.js +1 -0
- package/dist/zonos-elements/{p-2d513aa3.entry.js → p-c6e78de2.entry.js} +1 -1
- package/dist/zonos-elements/{p-55813e9f.system.entry.js → p-ca97a1cd.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-3e705c9b.entry.js → p-cbb96382.entry.js} +1 -1
- package/dist/zonos-elements/{p-53eac12f.system.entry.js → p-dbf4d156.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-6410fa11.system.entry.js → p-df240119.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-1cc42a98.system.entry.js → p-e16e4db6.system.entry.js} +17 -17
- package/dist/zonos-elements/{p-064d8829.system.entry.js → p-eb016dd8.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-1199baef.system.entry.js → p-eb5c67a0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ef5344ea.entry.js → p-ed8a7a7f.entry.js} +1 -1
- package/dist/zonos-elements/{p-4917b74d.entry.js → p-ef932fda.entry.js} +1 -1
- package/dist/zonos-elements/{p-e7fdb2c9.entry.js → p-f792ba5f.entry.js} +1 -1
- package/dist/zonos-elements/{p-DiMEP3mh.js → p-fZcKMzE-.js} +1 -1
- package/dist/zonos-elements/{p-CMo3ZweU.js → p-fdritVtG.js} +1 -1
- package/dist/zonos-elements/p-fffe6376.entry.js +1 -0
- package/dist/zonos-elements/p-gEViRqvf.js +1 -0
- package/dist/zonos-elements/{p-Dtu_Japy.system.js → p-v8IEjQ2z.system.js} +39 -39
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +10 -10
- package/dist/esm-es5/handleFetch-D5GYDF-O.js +0 -60
- package/dist/zonos-elements/p-107f287b.entry.js +0 -1
- package/dist/zonos-elements/p-25eb99d4.entry.js +0 -1
- package/dist/zonos-elements/p-46b9f0cf.entry.js +0 -1
- package/dist/zonos-elements/p-636b71d4.entry.js +0 -1
- package/dist/zonos-elements/p-7dc7f328.entry.js +0 -1
- package/dist/zonos-elements/p-8f9d8795.entry.js +0 -1
- package/dist/zonos-elements/p-BMPYH-LT.js +0 -1
- package/dist/zonos-elements/p-C70h5mKA.js +0 -1
- package/dist/zonos-elements/p-CTiqplrr.js +0 -1
- package/dist/zonos-elements/p-Ch1w0Lr7.js +0 -1
- package/dist/zonos-elements/p-D1SmY_fZ.js +0 -1
- package/dist/zonos-elements/p-D6xXnsM_.js +0 -1
- package/dist/zonos-elements/p-DE4a-QD5.js +0 -1
- package/dist/zonos-elements/p-DQrMfUzi.system.js +0 -227
- package/dist/zonos-elements/p-DZdkJHK9.system.js +0 -7
- package/dist/zonos-elements/p-U33isUJG.js +0 -1
- package/dist/zonos-elements/p-ebe157b5.entry.js +0 -1
- package/dist/zonos-elements/p-zVLAvre1.system.js +0 -60
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var localization = require('./localization-
|
|
4
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
5
5
|
var containsNonLatinChars = require('./containsNonLatinChars-D_OggJN6.js');
|
|
6
6
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
7
7
|
var classes = require('./classes-D_DL168u.js');
|
|
8
8
|
var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-DVfjFTYO.js');
|
|
10
10
|
require('./VarianceTest-C98whVgO.js');
|
|
11
11
|
|
|
12
12
|
const zonosAddressDisplayCss = () => `: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 .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var taxIdFields = require('./taxIdFields-
|
|
5
|
-
var cart = require('./cart-
|
|
6
|
-
var localization = require('./localization-
|
|
4
|
+
var taxIdFields = require('./taxIdFields-BKbk2bhi.js');
|
|
5
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
6
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
7
7
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
8
|
-
var handleFetch = require('./handleFetch-
|
|
8
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
9
9
|
var shouldRenderShortAddressCodeInput = require('./shouldRenderShortAddressCodeInput-gpu_bMfp.js');
|
|
10
10
|
var classes = require('./classes-D_DL168u.js');
|
|
11
11
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var collect = require('./collect-
|
|
5
|
-
var cart = require('./cart-
|
|
6
|
-
var localization = require('./localization-
|
|
4
|
+
var collect = require('./collect-lF9DenLk.js');
|
|
5
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
6
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
7
7
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
8
8
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
9
|
-
var handleFetch = require('./handleFetch-
|
|
9
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
10
10
|
require('./taxIdRules-BBj8kQxJ.js');
|
|
11
11
|
require('./TaxId-ChhNwG04.js');
|
|
12
12
|
require('./isDarkColor-f-fD9c2l.js');
|
|
@@ -4,16 +4,16 @@ var index = require('./index-DAAr465v.js');
|
|
|
4
4
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
5
5
|
var classes = require('./classes-D_DL168u.js');
|
|
6
6
|
var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
|
|
7
|
-
var cart = require('./cart-
|
|
8
|
-
var localization = require('./localization-
|
|
9
|
-
var handleFetch = require('./handleFetch-
|
|
10
|
-
var paypal = require('./paypal-
|
|
7
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
8
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
9
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
10
|
+
var paypal = require('./paypal-Bd1qmwiv.js');
|
|
11
11
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
12
12
|
require('./taxIdRules-BBj8kQxJ.js');
|
|
13
13
|
require('./TaxId-ChhNwG04.js');
|
|
14
14
|
require('./isDarkColor-f-fD9c2l.js');
|
|
15
15
|
require('./isContrastColor-B9ldIdpa.js');
|
|
16
|
-
require('./submitGtag-
|
|
16
|
+
require('./submitGtag-D4sB7w4z.js');
|
|
17
17
|
|
|
18
18
|
const zonosCardCss = () => `: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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}`;
|
|
19
19
|
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var cart = require('./cart-
|
|
5
|
-
var localization = require('./localization-
|
|
6
|
-
var renderCheckoutCurrency = require('./renderCheckoutCurrency-
|
|
4
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
5
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
6
|
+
var renderCheckoutCurrency = require('./renderCheckoutCurrency-DE2p8CT8.js');
|
|
7
7
|
var cleanHtmlMarkdown = require('./cleanHtmlMarkdown-DpT-nZLH.js');
|
|
8
8
|
var classes = require('./classes-D_DL168u.js');
|
|
9
9
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
10
|
-
var hasInclusivePrice = require('./hasInclusivePrice-
|
|
10
|
+
var hasInclusivePrice = require('./hasInclusivePrice-CEPf3_FG.js');
|
|
11
11
|
var isSameHostCheckoutLink = require('./isSameHostCheckoutLink-DbmQ7Ha4.js');
|
|
12
|
-
var paypal = require('./paypal-
|
|
13
|
-
var handleFetch = require('./handleFetch-
|
|
12
|
+
var paypal = require('./paypal-Bd1qmwiv.js');
|
|
13
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
14
14
|
var createCustomEvent = require('./createCustomEvent-Cs5zGImL.js');
|
|
15
15
|
var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
|
|
16
16
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
17
|
-
var shouldShowLanguageSelect = require('./shouldShowLanguageSelect-
|
|
18
|
-
var placeTestOrder = require('./placeTestOrder-
|
|
17
|
+
var shouldShowLanguageSelect = require('./shouldShowLanguageSelect-NOVWOU53.js');
|
|
18
|
+
var placeTestOrder = require('./placeTestOrder-BMQRvX2q.js');
|
|
19
19
|
var isDarkColor = require('./isDarkColor-f-fD9c2l.js');
|
|
20
20
|
var getContrastColor = require('./getContrastColor-B2Kn8XHA.js');
|
|
21
21
|
var isColorVariable = require('./isColorVariable-CKoJdu9G.js');
|
|
22
|
-
var updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-
|
|
23
|
-
var getMissingRequiredShippingFields = require('./getMissingRequiredShippingFields-
|
|
22
|
+
var updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-KxwcsKhM.js');
|
|
23
|
+
var getMissingRequiredShippingFields = require('./getMissingRequiredShippingFields-svcnpumn.js');
|
|
24
24
|
var containsNonLatinChars = require('./containsNonLatinChars-D_OggJN6.js');
|
|
25
25
|
var shouldRenderShortAddressCodeInput = require('./shouldRenderShortAddressCodeInput-gpu_bMfp.js');
|
|
26
26
|
var taxIdRules = require('./taxIdRules-BBj8kQxJ.js');
|
|
27
27
|
var TaxId = require('./TaxId-ChhNwG04.js');
|
|
28
28
|
require('./isContrastColor-B9ldIdpa.js');
|
|
29
|
-
require('./submitGtag-
|
|
29
|
+
require('./submitGtag-D4sB7w4z.js');
|
|
30
30
|
require('./debounce-BhgA8_3W.js');
|
|
31
31
|
require('./debounce-DRPMxNew.js');
|
|
32
32
|
require('./ShortAddressCode-C5l520-F.js');
|
|
@@ -1058,7 +1058,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1058
1058
|
};
|
|
1059
1059
|
this.saveOrderIdForDuplicationIssue = () => {
|
|
1060
1060
|
var _a, _b, _c, _d;
|
|
1061
|
-
const existingPlacedOrderInfo = handleFetch.jsonParse(
|
|
1061
|
+
const existingPlacedOrderInfo = handleFetch.jsonParse(handleFetch.safeGetItem('local', 'zonos--placed-order-info'));
|
|
1062
1062
|
const placedOrderTime = {
|
|
1063
1063
|
cartId: window.Zonos.cartId || null,
|
|
1064
1064
|
checkoutSessionId: (existingPlacedOrderInfo === null || existingPlacedOrderInfo === void 0 ? void 0 : existingPlacedOrderInfo.checkoutSessionId) ||
|
|
@@ -1068,12 +1068,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1068
1068
|
time: (existingPlacedOrderInfo === null || existingPlacedOrderInfo === void 0 ? void 0 : existingPlacedOrderInfo.time) || Date.now(),
|
|
1069
1069
|
zonosOrderNumber: ((_d = (_c = (_b = this.order) === null || _b === void 0 ? void 0 : _b.references) === null || _c === void 0 ? void 0 : _c.find(ref => ref.key === 'zonosOrderNumber')) === null || _d === void 0 ? void 0 : _d.value) || null,
|
|
1070
1070
|
};
|
|
1071
|
-
|
|
1071
|
+
handleFetch.safeSetItem('local', 'zonos--placed-order-info', JSON.stringify(placedOrderTime));
|
|
1072
1072
|
};
|
|
1073
1073
|
}
|
|
1074
1074
|
componentDidLoad() {
|
|
1075
1075
|
// Reset local storage for placed order info
|
|
1076
|
-
|
|
1076
|
+
handleFetch.safeRemoveItem('local', 'zonos--placed-order-info');
|
|
1077
1077
|
if (this.overrideNotification) {
|
|
1078
1078
|
// just show the notification and don't check any of the payment status
|
|
1079
1079
|
this.notificationType = this.overrideNotification.type;
|
|
@@ -1097,11 +1097,11 @@ const ZonosCheckoutFinish = class {
|
|
|
1097
1097
|
}
|
|
1098
1098
|
render() {
|
|
1099
1099
|
const isTestMode = handleFetch.getIsTestMode();
|
|
1100
|
-
return (index.h(index.Host, { key: '
|
|
1100
|
+
return (index.h(index.Host, { key: 'd0e01955edb2c23678d39ef14a18a3b8cd0e2b28', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1101
1101
|
'--zonos--border-radius': getBorderRadius.getBorderRadius({
|
|
1102
1102
|
overrideBorderStyle: this.borderRadius,
|
|
1103
1103
|
}),
|
|
1104
|
-
} }, this.isImmediateRedirecting && (index.h("div", { key: '
|
|
1104
|
+
} }, this.isImmediateRedirecting && (index.h("div", { key: 'fdd0468df80703543b942e729a3d90dd2d9f3eee', class: "loading-wrapper" }, index.h("zonos-spinner", { key: '82f8cb7f62ab073a4b39bf6fca67c7e37db94f5e', size: 48 }))), !this.isLoading && !this.isImmediateRedirecting && (index.h("div", { key: '1ad8c9a98307a017aca8493404fb9575b9f8eaa0', class: "zonos--finish-details" }, index.h("div", { key: '474a8780c96fbaf2ebb2e7db7f6a6734cb630baa', class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { key: '4f8ce6ac8ca854cd400db16345433cef732ba9de', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: '5ccf3054ba802e69692ba0154390c4fb24e051e6', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (index.h("zonos-button", { key: '813fec3a2d1e77487935203baf92010e5d28392d',
|
|
1105
1105
|
// Only show loading spinner if it's not an error notification
|
|
1106
1106
|
loading: this.isWaitingToRedirect &&
|
|
1107
1107
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -1113,9 +1113,9 @@ const ZonosCheckoutFinish = class {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
this.closeClickHandler();
|
|
1115
1115
|
}, size: "md", variant: "primary" }, localization.translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
1116
|
-
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '
|
|
1116
|
+
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: 'ad9969e7e07881f872fa599e1dbfe481df03d51e', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
1117
1117
|
cart.cartStore.step === 'finish' &&
|
|
1118
|
-
this.notificationType === 'success' && (index.h("div", { key: '
|
|
1118
|
+
this.notificationType === 'success' && (index.h("div", { key: '6b520c1b13cb036c15f798557b44f9f386a55d68', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: '4ef2807d00be47ba87c4bf4223505923ab6e194a', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: '7db0f58fb43aefabd168f4a82be7daeef843d7cc', onClick: () => {
|
|
1119
1119
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
1120
1120
|
this.redirectToUrl(isZonosDashboard
|
|
1121
1121
|
? '/orders/all'
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var cart = require('./cart-
|
|
5
|
-
var paypal = require('./paypal-
|
|
6
|
-
var localization = require('./localization-
|
|
4
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
5
|
+
var paypal = require('./paypal-Bd1qmwiv.js');
|
|
6
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
7
7
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
8
8
|
var buildCartItemsByTempCart = require('./buildCartItemsByTempCart-ILzonEjb.js');
|
|
9
|
-
var handleFetch = require('./handleFetch-
|
|
10
|
-
var updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-
|
|
9
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
10
|
+
var updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-KxwcsKhM.js');
|
|
11
11
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
12
12
|
var CheckoutConfig = require('./CheckoutConfig-B7JRM7yr.js');
|
|
13
|
+
var _isBigCommerceNativeCheckout = require('./_isBigCommerceNativeCheckout-3-xbKbAO.js');
|
|
13
14
|
var classes = require('./classes-D_DL168u.js');
|
|
14
15
|
var createCustomEvent = require('./createCustomEvent-Cs5zGImL.js');
|
|
15
16
|
var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
|
|
@@ -19,7 +20,7 @@ var RemoveIcon = require('./RemoveIcon-CuM1YmjP.js');
|
|
|
19
20
|
require('./taxIdRules-BBj8kQxJ.js');
|
|
20
21
|
require('./TaxId-ChhNwG04.js');
|
|
21
22
|
require('./isContrastColor-B9ldIdpa.js');
|
|
22
|
-
require('./submitGtag-
|
|
23
|
+
require('./submitGtag-D4sB7w4z.js');
|
|
23
24
|
require('./debounce-BhgA8_3W.js');
|
|
24
25
|
require('./debounce-DRPMxNew.js');
|
|
25
26
|
|
|
@@ -723,7 +724,7 @@ const ZBYPASS_ON_VALUES = ['1', 'true', 'yes'];
|
|
|
723
724
|
*/
|
|
724
725
|
let consumedZBypassQuery = null;
|
|
725
726
|
const isCheckoutPage = () => {
|
|
726
|
-
return window.location.pathname
|
|
727
|
+
return _isBigCommerceNativeCheckout.pathContainsCheckout(window.location.pathname);
|
|
727
728
|
};
|
|
728
729
|
const isAcceptedZBypassQuery = (rawValue) => {
|
|
729
730
|
if (rawValue === null) {
|
|
@@ -888,7 +889,7 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
|
|
|
888
889
|
// Only the native checkout page skips address detection. Storefront pages
|
|
889
890
|
// still run the domestic-session handoff below, and they do not consume
|
|
890
891
|
// a `zBypass` query, so the parameter can survive until `/checkout`.
|
|
891
|
-
if (window.location.pathname
|
|
892
|
+
if (_isBigCommerceNativeCheckout.pathContainsCheckout(window.location.pathname) &&
|
|
892
893
|
isBigCommerceCheckoutBypassEnabled()) {
|
|
893
894
|
return;
|
|
894
895
|
}
|
|
@@ -1141,17 +1142,35 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
|
|
|
1141
1142
|
const shippingAddressSession = cart.stripeStoreGetDomesticShippingSession();
|
|
1142
1143
|
// append a hidden button to the body if the shipping address session is found
|
|
1143
1144
|
if (!domesticRedirectedButton && shippingAddressSession) {
|
|
1144
|
-
//
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1145
|
+
// Stripe.js is not loaded on native checkout, so nothing here can click
|
|
1146
|
+
// a hidden button or clear this session. Send the shopper to `/` once.
|
|
1147
|
+
// Saving or clearing the session drops that hop marker, so a later
|
|
1148
|
+
// leftover session still gets its own redirect. If they come back and
|
|
1149
|
+
// the session is still set, drop it and keep watching the address.
|
|
1150
|
+
if (_isBigCommerceNativeCheckout.isBigCommerceNativeCheckout()) {
|
|
1151
|
+
if (cart.stripeStoreHasDomesticSessionRedirectMarker()) {
|
|
1152
|
+
cart.stripeStoreCleanupDomesticShippingSession();
|
|
1153
|
+
}
|
|
1154
|
+
else {
|
|
1155
|
+
cart.stripeStoreMarkDomesticSessionRedirected();
|
|
1156
|
+
observer.disconnect();
|
|
1157
|
+
window.location.href = buildBigcommerceRedirectUrl('/');
|
|
1158
|
+
return;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
else {
|
|
1162
|
+
// create a hidden button to trigger the click event
|
|
1163
|
+
const button = document.createElement('button');
|
|
1164
|
+
button.style.display = 'none';
|
|
1165
|
+
button.id = 'zonos--domestic-redirected-checkout-button';
|
|
1166
|
+
document.body.appendChild(button);
|
|
1167
|
+
onShippingAddressSessionFound === null || onShippingAddressSessionFound === void 0 ? void 0 : onShippingAddressSessionFound(shippingAddressSession);
|
|
1168
|
+
// disconnect the observer after we found the shipping continue button
|
|
1169
|
+
observer.disconnect();
|
|
1170
|
+
return;
|
|
1171
|
+
}
|
|
1153
1172
|
}
|
|
1154
|
-
const isBigcommerceDomesticCheckoutPage = window.location.pathname
|
|
1173
|
+
const isBigcommerceDomesticCheckoutPage = _isBigCommerceNativeCheckout.pathContainsCheckout(window.location.pathname) &&
|
|
1155
1174
|
window.Zonos.isBigCommerce;
|
|
1156
1175
|
// Should just disconnect the observer if it's not bigcommerce domestic checkout page
|
|
1157
1176
|
if (!isBigcommerceDomesticCheckoutPage) {
|
|
@@ -2150,9 +2169,9 @@ const ZonosCheckout = class {
|
|
|
2150
2169
|
window.location.reload();
|
|
2151
2170
|
}
|
|
2152
2171
|
handleOrderDuplication() {
|
|
2153
|
-
const existingPlacedOrderInfo = handleFetch.jsonParse(
|
|
2172
|
+
const existingPlacedOrderInfo = handleFetch.jsonParse(handleFetch.safeGetItem('local', 'zonos--placed-order-info'));
|
|
2154
2173
|
if (!existingPlacedOrderInfo) {
|
|
2155
|
-
|
|
2174
|
+
handleFetch.safeRemoveItem('local', 'zonos--placed-order-info');
|
|
2156
2175
|
return;
|
|
2157
2176
|
}
|
|
2158
2177
|
const elapsed = Date.now() - existingPlacedOrderInfo.time;
|
|
@@ -2164,7 +2183,7 @@ const ZonosCheckout = class {
|
|
|
2164
2183
|
if (elapsed > overrideExpiredDuplication) {
|
|
2165
2184
|
VarianceTest.log(`=== Existing placed order info is older than ${overrideExpiredDuplication}ms, cleaning localStorage`, 'warn');
|
|
2166
2185
|
// remove the placed order info if it's older than 5 minutes and do nothing.
|
|
2167
|
-
|
|
2186
|
+
handleFetch.safeRemoveItem('local', 'zonos--placed-order-info');
|
|
2168
2187
|
return;
|
|
2169
2188
|
}
|
|
2170
2189
|
// Set placed order info to show the confirm notification to the user
|
|
@@ -2703,6 +2722,13 @@ const ZonosCheckout = class {
|
|
|
2703
2722
|
if (window.Zonos) {
|
|
2704
2723
|
this.useLegacyQueryParams();
|
|
2705
2724
|
}
|
|
2725
|
+
// Native BigCommerce checkout never loads Stripe.js. The address watcher
|
|
2726
|
+
// above still has to run. Skip the poll so checkout does not wait 10s
|
|
2727
|
+
// for a Stripe instance that will not arrive, and so attachCheckout
|
|
2728
|
+
// cannot bind the store's place-order buttons.
|
|
2729
|
+
if (_isBigCommerceNativeCheckout.isBigCommerceNativeCheckout()) {
|
|
2730
|
+
return;
|
|
2731
|
+
}
|
|
2706
2732
|
// only initialize checkout if visitor's country is in the shipping zones.
|
|
2707
2733
|
const interval = setInterval(() => {
|
|
2708
2734
|
cart.stripeStore.stripe = window.Zonos.stripe;
|
|
@@ -3230,7 +3256,7 @@ const ZonosCheckout = class {
|
|
|
3230
3256
|
return;
|
|
3231
3257
|
}
|
|
3232
3258
|
// Check if the page is checkout page, if so, do nothing since they're already at the right page
|
|
3233
|
-
if (window.location.pathname
|
|
3259
|
+
if (_isBigCommerceNativeCheckout.pathContainsCheckout(window.location.pathname)) {
|
|
3234
3260
|
return;
|
|
3235
3261
|
}
|
|
3236
3262
|
const shippingCountry = addressEventData.value.address.country;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var cart = require('./cart-
|
|
4
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
5
5
|
var cleanHtmlMarkdown = require('./cleanHtmlMarkdown-DpT-nZLH.js');
|
|
6
6
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
7
7
|
var classes = require('./classes-D_DL168u.js');
|
|
8
8
|
var styles = require('./styles-nowYls3K.js');
|
|
9
|
-
require('./localization-
|
|
10
|
-
require('./handleFetch-
|
|
9
|
+
require('./localization-BhNVhLZs.js');
|
|
10
|
+
require('./handleFetch-DVfjFTYO.js');
|
|
11
11
|
require('./VarianceTest-C98whVgO.js');
|
|
12
12
|
require('./taxIdRules-BBj8kQxJ.js');
|
|
13
13
|
require('./TaxId-ChhNwG04.js');
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var collect = require('./collect-
|
|
5
|
-
var cart = require('./cart-
|
|
6
|
-
var paypal = require('./paypal-
|
|
7
|
-
var localization = require('./localization-
|
|
4
|
+
var collect = require('./collect-lF9DenLk.js');
|
|
5
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
6
|
+
var paypal = require('./paypal-Bd1qmwiv.js');
|
|
7
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
8
8
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
9
|
-
var handleFetch = require('./handleFetch-
|
|
9
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
10
10
|
var createCustomEvent = require('./createCustomEvent-Cs5zGImL.js');
|
|
11
11
|
var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
|
|
12
12
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
13
13
|
var isCollectMobileTablet = require('./isCollectMobileTablet-Cx2nZ15_.js');
|
|
14
14
|
var classes = require('./classes-D_DL168u.js');
|
|
15
|
-
var shouldShowLanguageSelect = require('./shouldShowLanguageSelect-
|
|
16
|
-
var renderCheckoutCurrency = require('./renderCheckoutCurrency-
|
|
17
|
-
var placeTestOrder = require('./placeTestOrder-
|
|
15
|
+
var shouldShowLanguageSelect = require('./shouldShowLanguageSelect-NOVWOU53.js');
|
|
16
|
+
var renderCheckoutCurrency = require('./renderCheckoutCurrency-DE2p8CT8.js');
|
|
17
|
+
var placeTestOrder = require('./placeTestOrder-BMQRvX2q.js');
|
|
18
18
|
var renderFallback = require('./renderFallback-Bme86uk8.js');
|
|
19
19
|
require('./taxIdRules-BBj8kQxJ.js');
|
|
20
20
|
require('./TaxId-ChhNwG04.js');
|
|
21
21
|
require('./isDarkColor-f-fD9c2l.js');
|
|
22
22
|
require('./isContrastColor-B9ldIdpa.js');
|
|
23
|
-
require('./submitGtag-
|
|
23
|
+
require('./submitGtag-D4sB7w4z.js');
|
|
24
24
|
|
|
25
25
|
var 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>`;
|
|
26
26
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var collect = require('./collect-
|
|
5
|
-
var cart = require('./cart-
|
|
6
|
-
var paypal = require('./paypal-
|
|
7
|
-
var localization = require('./localization-
|
|
4
|
+
var collect = require('./collect-lF9DenLk.js');
|
|
5
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
6
|
+
var paypal = require('./paypal-Bd1qmwiv.js');
|
|
7
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
8
8
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
9
9
|
var buildCartItemsByTempCart = require('./buildCartItemsByTempCart-ILzonEjb.js');
|
|
10
|
-
var handleFetch = require('./handleFetch-
|
|
10
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
11
11
|
var isCollectMobileTablet = require('./isCollectMobileTablet-Cx2nZ15_.js');
|
|
12
12
|
var classes = require('./classes-D_DL168u.js');
|
|
13
13
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
@@ -17,7 +17,7 @@ require('./TaxId-ChhNwG04.js');
|
|
|
17
17
|
require('./isDarkColor-f-fD9c2l.js');
|
|
18
18
|
require('./getBorderRadius-CJ_95w3o.js');
|
|
19
19
|
require('./isContrastColor-B9ldIdpa.js');
|
|
20
|
-
require('./submitGtag-
|
|
20
|
+
require('./submitGtag-D4sB7w4z.js');
|
|
21
21
|
|
|
22
22
|
var ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
23
23
|
|
|
@@ -1,44 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var cart = require('./cart-CiXlehwQ.js');
|
|
5
|
-
var localization = require('./localization-B2mjW0Xa.js');
|
|
6
4
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
5
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
6
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
7
|
+
var cart = require('./cart-C39TMSgB.js');
|
|
7
8
|
var getGenericSettingsOverride = require('./getGenericSettingsOverride-CL6l6wvX.js');
|
|
8
|
-
var handleFetch = require('./handleFetch-DQLhurnE.js');
|
|
9
9
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
10
|
-
var submitGtag = require('./submitGtag-
|
|
10
|
+
var submitGtag = require('./submitGtag-D4sB7w4z.js');
|
|
11
|
+
var _isBigCommerceNativeCheckout = require('./_isBigCommerceNativeCheckout-3-xbKbAO.js');
|
|
11
12
|
require('./taxIdRules-BBj8kQxJ.js');
|
|
12
13
|
require('./TaxId-ChhNwG04.js');
|
|
13
14
|
require('./isDarkColor-f-fD9c2l.js');
|
|
14
15
|
require('./getBorderRadius-CJ_95w3o.js');
|
|
15
16
|
|
|
16
|
-
const getZonosSettings = async () => {
|
|
17
|
-
if (window.Zonos.cartSettings) {
|
|
18
|
-
VarianceTest.log('Reusing cached zonos settings');
|
|
19
|
-
return {
|
|
20
|
-
errors: [],
|
|
21
|
-
json: window.Zonos.cartSettings,
|
|
22
|
-
zonosMode: window.Zonos.zonosMode,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
const overrideSettings = getGenericSettingsOverride.getGenericSettingsOverride();
|
|
26
|
-
const params = new URLSearchParams();
|
|
27
|
-
if (overrideSettings.overrideShouldEnabledCustomAddress) {
|
|
28
|
-
params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
|
|
29
|
-
}
|
|
30
|
-
const zCountry = localization.getOverridenZCountry();
|
|
31
|
-
if (zCountry) {
|
|
32
|
-
params.set('zCountry', zCountry);
|
|
33
|
-
}
|
|
34
|
-
const { errors, json, zonosMode } = await handleFetch.handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
|
|
35
|
-
if (errors.length) {
|
|
36
|
-
handleFetch.logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
|
|
37
|
-
return { errors, json: null, zonosMode };
|
|
38
|
-
}
|
|
39
|
-
return { errors: [], json, zonosMode };
|
|
40
|
-
};
|
|
41
|
-
|
|
42
17
|
const injectCheckoutElement$2 = () => {
|
|
43
18
|
// append checkout component if doesn't exist
|
|
44
19
|
const checkoutElement = document.querySelector('zonos-checkout');
|
|
@@ -69,6 +44,43 @@ const initCheckout = (config) => {
|
|
|
69
44
|
injectCheckoutElement$2();
|
|
70
45
|
};
|
|
71
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Mount `<zonos-checkout>` without a Stripe instance.
|
|
49
|
+
*
|
|
50
|
+
* Native BigCommerce checkout must not receive Stripe.js. Creating the
|
|
51
|
+
* element still runs `zonos-checkout.init()`, which registers the
|
|
52
|
+
* international-address watcher and then returns before the Stripe poll.
|
|
53
|
+
*/
|
|
54
|
+
const mountCheckoutWithoutStripe = () => {
|
|
55
|
+
initCheckout(zonosStore.zonosStore.checkoutSettings);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const getZonosSettings = async () => {
|
|
59
|
+
if (window.Zonos.cartSettings) {
|
|
60
|
+
VarianceTest.log('Reusing cached zonos settings');
|
|
61
|
+
return {
|
|
62
|
+
errors: [],
|
|
63
|
+
json: window.Zonos.cartSettings,
|
|
64
|
+
zonosMode: window.Zonos.zonosMode,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const overrideSettings = getGenericSettingsOverride.getGenericSettingsOverride();
|
|
68
|
+
const params = new URLSearchParams();
|
|
69
|
+
if (overrideSettings.overrideShouldEnabledCustomAddress) {
|
|
70
|
+
params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
|
|
71
|
+
}
|
|
72
|
+
const zCountry = localization.getOverridenZCountry();
|
|
73
|
+
if (zCountry) {
|
|
74
|
+
params.set('zCountry', zCountry);
|
|
75
|
+
}
|
|
76
|
+
const { errors, json, zonosMode } = await handleFetch.handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
|
|
77
|
+
if (errors.length) {
|
|
78
|
+
handleFetch.logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
|
|
79
|
+
return { errors, json: null, zonosMode };
|
|
80
|
+
}
|
|
81
|
+
return { errors: [], json, zonosMode };
|
|
82
|
+
};
|
|
83
|
+
|
|
72
84
|
const injectCheckoutElement$1 = () => {
|
|
73
85
|
// append checkout component if doesn't exist
|
|
74
86
|
const collectElement = document.querySelector('zonos-collect');
|
|
@@ -779,11 +791,17 @@ const ZonosController = class {
|
|
|
779
791
|
VarianceTest.log('Checkout failed to load -- missing publishable key', 'warn');
|
|
780
792
|
return;
|
|
781
793
|
}
|
|
794
|
+
// `_loadStripe.ts` is the only module that injects Stripe.js. This
|
|
795
|
+
// method only chooses whether to ask for it or to mount checkout
|
|
796
|
+
// without it.
|
|
797
|
+
const nativeBigCommerceCheckout = _isBigCommerceNativeCheckout.isBigCommerceNativeCheckout();
|
|
782
798
|
if (window.Zonos.isCollect || window.Zonos.isInvoice) {
|
|
783
|
-
//
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
799
|
+
// Collect and Invoice off native checkout still ask for Stripe.
|
|
800
|
+
if (!nativeBigCommerceCheckout) {
|
|
801
|
+
this.stripeInitEvent.emit({
|
|
802
|
+
publishableKey: publishableKey.token,
|
|
803
|
+
});
|
|
804
|
+
}
|
|
787
805
|
// init google places service
|
|
788
806
|
void this.initGooglePlacesService(json);
|
|
789
807
|
return;
|
|
@@ -805,16 +823,23 @@ const ZonosController = class {
|
|
|
805
823
|
// Checkout also runs without merchant cart callbacks when a cart is
|
|
806
824
|
// prefetched (e.g. `tempCartUUID` -> `cartData`) or when resuming a
|
|
807
825
|
// payment via the Stripe client secret. Stripe must still load for those.
|
|
808
|
-
const clientSecret = new URL(window.location.href).searchParams.get('payment_intent_client_secret') ||
|
|
826
|
+
const clientSecret = new URL(window.location.href).searchParams.get('payment_intent_client_secret') || handleFetch.safeGetItem('session', 'zonos--client-secret');
|
|
809
827
|
const hasPrefetchedCheckoutContext = !!(window.Zonos.cartId && window.Zonos.cartData) || !!clientSecret;
|
|
810
828
|
if (!hasCartCallback && !hasPrefetchedCheckoutContext) {
|
|
811
829
|
VarianceTest.log(`Skip loading Stripe because no cart callback (buildCartDetail/createCartId), prefetched cart, or payment client secret is present`, 'warn');
|
|
812
830
|
return;
|
|
813
831
|
}
|
|
814
|
-
//
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
832
|
+
// Cart callbacks, a prefetched cart, and a client secret do not override
|
|
833
|
+
// the native BigCommerce checkout skip. Mount checkout anyway so the
|
|
834
|
+
// international-address watcher runs, without Stripe.js.
|
|
835
|
+
if (nativeBigCommerceCheckout) {
|
|
836
|
+
mountCheckoutWithoutStripe();
|
|
837
|
+
}
|
|
838
|
+
else {
|
|
839
|
+
this.stripeInitEvent.emit({
|
|
840
|
+
publishableKey: publishableKey.token,
|
|
841
|
+
});
|
|
842
|
+
}
|
|
818
843
|
// init google places service
|
|
819
844
|
void this.initGooglePlacesService(json);
|
|
820
845
|
})();
|
|
@@ -870,7 +895,7 @@ const ZonosController = class {
|
|
|
870
895
|
zonosStore.zonosStore.organizationName = organizationName;
|
|
871
896
|
}
|
|
872
897
|
render() {
|
|
873
|
-
return index.h(index.Host, { key: '
|
|
898
|
+
return index.h(index.Host, { key: '0d8bcffcb7e22891c082a4916b00b87bdf5fc2e8', class: "zonos--elements" });
|
|
874
899
|
}
|
|
875
900
|
};
|
|
876
901
|
ZonosController.style = zonosControllerCss();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var localization = require('./localization-
|
|
4
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
5
5
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
6
6
|
var classes = require('./classes-D_DL168u.js');
|
|
7
|
-
require('./handleFetch-
|
|
7
|
+
require('./handleFetch-DVfjFTYO.js');
|
|
8
8
|
require('./VarianceTest-C98whVgO.js');
|
|
9
9
|
|
|
10
10
|
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}`;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var localization = require('./localization-
|
|
4
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
5
5
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
6
6
|
var formatStringWithLinks = require('./formatStringWithLinks-vOVkAjlu.js');
|
|
7
7
|
var isDarkColor = require('./isDarkColor-f-fD9c2l.js');
|
|
8
|
-
var shouldShowLanguageSelect = require('./shouldShowLanguageSelect-
|
|
8
|
+
var shouldShowLanguageSelect = require('./shouldShowLanguageSelect-NOVWOU53.js');
|
|
9
9
|
var classes = require('./classes-D_DL168u.js');
|
|
10
|
-
require('./handleFetch-
|
|
10
|
+
require('./handleFetch-DVfjFTYO.js');
|
|
11
11
|
require('./VarianceTest-C98whVgO.js');
|
|
12
12
|
require('./isSameHostCheckoutLink-DbmQ7Ha4.js');
|
|
13
13
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
|
-
var localization = require('./localization-
|
|
4
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
5
5
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
6
6
|
var classes = require('./classes-D_DL168u.js');
|
|
7
7
|
var formatStringWithLinks = require('./formatStringWithLinks-vOVkAjlu.js');
|
|
8
|
-
var hasInclusivePrice = require('./hasInclusivePrice-
|
|
8
|
+
var hasInclusivePrice = require('./hasInclusivePrice-CEPf3_FG.js');
|
|
9
9
|
var getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-Cl50u1mb.js');
|
|
10
10
|
var TaxId = require('./TaxId-ChhNwG04.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-DVfjFTYO.js');
|
|
12
12
|
require('./VarianceTest-C98whVgO.js');
|
|
13
13
|
require('./isSameHostCheckoutLink-DbmQ7Ha4.js');
|
|
14
14
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DAAr465v.js');
|
|
4
4
|
var debounce = require('./debounce-BhgA8_3W.js');
|
|
5
|
-
var localization = require('./localization-
|
|
5
|
+
var localization = require('./localization-BhNVhLZs.js');
|
|
6
6
|
var zonosStore = require('./zonosStore-CDV83QyK.js');
|
|
7
7
|
var classes = require('./classes-D_DL168u.js');
|
|
8
|
-
var handleFetch = require('./handleFetch-
|
|
8
|
+
var handleFetch = require('./handleFetch-DVfjFTYO.js');
|
|
9
9
|
var getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-Cl50u1mb.js');
|
|
10
10
|
var VarianceTest = require('./VarianceTest-C98whVgO.js');
|
|
11
11
|
require('./debounce-DRPMxNew.js');
|