@zonos/elements 1.3.182 → 1.3.184
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-dcd068d1.js → cart-3d0c0f0b.js} +60 -0
- package/dist/cjs/index.cjs.js +29 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-4bbc4779.js → paypal-9eaa9196.js} +1 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +50 -15
- package/dist/cjs/zonos-checkout.cjs.entry.js +17 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +9 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +15 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +11 -14
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- package/dist/collection/components/utils/checkout/initCheckout.js +8 -1
- package/dist/collection/components/utils/taxIdValidationResult.js +38 -0
- package/dist/collection/scripts/_zonosBase.js +22 -1
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +33 -0
- package/dist/esm/{cart-d2c86d90.js → cart-3fb04f1f.js} +60 -0
- package/dist/esm/index.js +29 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-5c0d6407.js → paypal-1f2e863c.js} +1 -1
- package/dist/esm/zonos-address_7.entry.js +1 -1
- package/dist/esm/zonos-cart-items_13.entry.js +50 -15
- package/dist/esm/zonos-checkout.entry.js +17 -5
- package/dist/esm/zonos-controller.entry.js +9 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/cart-3fb04f1f.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-5c0d6407.js → paypal-1f2e863c.js} +1 -1
- package/dist/esm-es5/zonos-address_7.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-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-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/index.d.ts +7 -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/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +1 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/utils/taxIdValidationResult.d.ts +12 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +7 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +2 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +3 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +53 -8
- package/dist/types/types/generated/graphql.internal.types.ts +63 -8
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-09041efe.entry.js +1 -0
- package/dist/zonos-elements/{p-5c695748.entry.js → p-107b08c1.entry.js} +1 -1
- package/dist/zonos-elements/{p-a43fba41.js → p-112aecac.js} +1 -1
- package/dist/zonos-elements/p-16e4cdb1.entry.js +1 -0
- package/dist/zonos-elements/{p-5957eff5.system.entry.js → p-29e8c9e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-09fbafe4.entry.js → p-43feb95e.entry.js} +1 -1
- package/dist/zonos-elements/{p-e42e0cdb.entry.js → p-4622cca6.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-9d014d94.system.entry.js → p-4ca666ea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-753811b7.system.entry.js → p-4eff2f8a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a71d418.entry.js → p-587568b5.entry.js} +1 -1
- package/dist/zonos-elements/{p-99f50bf3.system.js → p-5bebcfc2.system.js} +1 -1
- package/dist/zonos-elements/p-642bf613.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1cebd67c.entry.js → p-64dbc282.entry.js} +1 -1
- package/dist/zonos-elements/{p-5be6b837.system.entry.js → p-7cb87ea7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-57af5f9c.entry.js → p-7decb19b.entry.js} +1 -1
- package/dist/zonos-elements/{p-99f17671.entry.js → p-8f640b28.entry.js} +1 -1
- package/dist/zonos-elements/p-a69dbe14.js +1 -0
- package/dist/zonos-elements/{p-00e5d2be.system.js → p-b1020237.system.js} +1 -1
- package/dist/zonos-elements/{p-79e43df6.system.entry.js → p-bc0f885e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5e1a782a.system.entry.js → p-c5c8f803.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c6d96a42.system.js +1 -0
- package/dist/zonos-elements/{p-33de55b8.system.entry.js → p-d367c9ae.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d5d39db4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-42abd4dd.system.entry.js → p-f66a5c7c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c3f2b86c.entry.js → p-fa65b53d.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-d2c86d90.js +0 -1
- package/dist/zonos-elements/p-18ec705b.js +0 -1
- package/dist/zonos-elements/p-1b1cdb4c.system.entry.js +0 -1
- package/dist/zonos-elements/p-91bc2187.system.js +0 -1
- package/dist/zonos-elements/p-a2368c1c.system.entry.js +0 -1
- package/dist/zonos-elements/p-d00049db.entry.js +0 -1
- package/dist/zonos-elements/p-ff8d9f3a.entry.js +0 -1
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy(JSON.parse("[[\"zonos-checkout.cjs\",[[2,\"zonos-checkout\",{\"appearanceSettingsOverride\":[16],\"preview\":[4],\"mobile\":[4],\"overrideStagingMode\":[4,\"override-staging-mode\"],\"defaultAddress\":[16],\"forceDialogOpen\":[4,\"force-dialog-open\"],\"defaultAddressParams\":[32],\"defaultCustomerProfileAddress\":[32],\"customerProfile\":[32],\"open\":[32],\"stripe\":[32],\"submitLoading\":[32],\"collapseReviewMobile\":[32],\"isAttachError\":[32],\"isMobile\":[32],\"isIframed\":[32],\"zonosReviewRef\":[32],\"storybookPaymentStatusOverride\":[32],\"isLegacyCheckout\":[32],\"confirmDialogOpen\":[32],\"isCartExpired\":[32],\"payInUsdConfirmDialogOpen\":[32],\"inventoryCheckErrorMessage\":[32],\"placedOrderInfo\":[32],\"clientSecret\":[32],\"stripeCustomerSessionClientSecret\":[32],\"closeDialogHandler\":[64],\"init\":[64],\"setToFinishStep\":[64],\"mockCheckoutSession\":[64]},[[16,\"zonos--init-cart-info\",\"initCartInfoHandler\"],[4,\"keydown\",\"handleKeyPress\"],[9,\"resize\",\"handleWindowResize\"]],{\"appearanceSettingsOverride\":[\"appearanceSettingsOverrideChanged\",\"handleAppearanceSettingsOverrideChange\"],\"overrideStagingMode\":[\"overrideStagingModeChanged\"],\"mobile\":[\"handleMobileChange\"],\"defaultAddress\":[\"handleAddressChange\"],\"customerProfile\":[\"handleCustomerProfileChange\"],\"clientSecret\":[\"handleClientSecretChange\"],\"stripeCustomerSessionClientSecret\":[\"handleClientSecretChange\"],\"open\":[\"handleOpenChange\"]}]]],[\"zonos-hello.cjs\",[[1,\"zonos-hello\",{\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettingsOverride\":[16],\"showPeekMessage\":[32],\"zonosStoreHelloSettings\":[32],\"showDialog\":[32],\"peekMessage\":[32],\"initialUrl\":[32],\"allRestrictedItems\":[32],\"allFoundProducts\":[32],\"productsOnPage\":[32],\"isHelloWidgetRendered\":[32],\"isMobile\":[32],\"getCountryList\":[64],\"displayCurrency\":[64],\"convertAndFormat\":[64],\"convert\":[64],\"format\":[64],\"openHelloDialog\":[64]},[[9,\"resize\",\"handleResize\"]],{\"appearanceSettingsOverride\":[\"handleAppearanceSettingsOverrideChange\"]}]]],[\"zonos-controller.cjs\",[[1,\"zonos-controller\",{\"config\":[16],\"zonosApiKey\":[1,\"zonos-api-key\"],\"initCheckoutElement\":[64],\"setupGoogleFont\":[64],\"showNotification\":[64],\"reset\":[64],\"overrideConfig\":[64],\"overrideCountry\":[64],\"getAppearanceSetting\":[64],\"updateOrganizationName\":[64]},[[8,\"locationchange\",\"handleLocationChange\"]]]]],[\"zonos-tooltip.cjs\",[[1,\"zonos-tooltip\",{\"label\":[1],\"subtitle\":[1],\"showTooltip\":[32]}]]],[\"zonos-component.cjs\",[[1,\"zonos-component\",{\"first\":[1],\"middle\":[1],\"last\":[1]}]]],[\"zonos-link.cjs\",[[1,\"zonos-link\",{\"href\":[1],\"rel\":[1],\"target\":[1],\"linkTitle\":[1,\"link-title\"]}]]],[\"zonos-logo.cjs\",[[1,\"zonos-logo\",{\"theme\":[1],\"width\":[1]}]]],[\"zonos-hello-dialog.cjs\",[[1,\"zonos-hello-dialog\",{\"isOpen\":[4,\"is-open\"],\"setIsOpen\":[16],\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettings\":[16],\"restrictedItems\":[16],\"welcomeMessage\":[32],\"showCountrySelect\":[32],\"showLanguageSelect\":[32]},[[4,\"click\",\"globalClickHandler\"]],{\"isOpen\":[\"isOpenHandler\"]}]]],[\"zonos-badge.cjs\",[[1,\"zonos-badge\",{\"bold\":[4],\"badgeColor\":[1,\"badge-color\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"rounded\":[4],\"loading\":[4],\"dismissHandler\":[16]}]]],[\"zonos-shipping-rich-radio.cjs\",[[1,\"zonos-shipping-rich-radio\",{\"items\":[16],\"borderColor\":[1,\"border-color\"],\"borderStyle\":[1,\"border-style\"],\"theme\":[1],\"selectedItem\":[16]}]]],[\"zonos-toggle.cjs\",[[1,\"zonos-toggle\",{\"options\":[16],\"value\":[1]}]]],[\"zonos-collapse.cjs\",[[1,\"zonos-collapse\",{\"collapsed\":[4],\"collapseSize\":[2,\"collapse-size\"],\"height\":[32],\"iframe\":[32]}]]],[\"zonos-stripe-input.cjs\",[[1,\"zonos-stripe-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"overrideSecondaryColor\":[1,\"override-secondary-color\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[1025],\"internalValue\":[32]},null,{\"inputValue\":[\"onInputValueChange\"],\"value\":[\"onValueChange\"]}]]],[\"zonos-card.cjs\",[[1,\"zonos-card\",{\"actions\":[16],\"backgroundColor\":[1,\"background-color\"],\"borderRadius\":[2,\"border-radius\"],\"footerActions\":[16],\"footerContent\":[16],\"footerHeight\":[2,\"footer-height\"],\"label\":[16],\"spacing\":[1]}]]],[\"zonos-input.cjs\",[[1,\"zonos-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"inputSize\":[1,\"input-size\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[32]},null,{\"inputValue\":[\"onInputValueChange\"]}]]],[\"zonos-text.cjs\",[[1,\"zonos-text\",{\"textColor\":[1,\"text-color\"],\"size\":[1],\"type\":[1],\"weight\":[2],\"ready\":[32]}]]],[\"zonos-banner.cjs\",[[1,\"zonos-banner\",{\"bannerTitle\":[1,\"banner-title\"],\"intent\":[1],\"hasContent\":[32]}]]],[\"zonos-country-flag.cjs\",[[1,\"zonos-country-flag\",{\"countryCode\":[1,\"country-code\"],\"size\":[2]}]]],[\"zonos-v-stack.cjs\",[[1,\"zonos-v-stack\",{\"spacing\":[2]}]]],[\"zonos-empty-state-payment_4.cjs\",[[1,\"zonos-empty-state-payment\",{\"emptyStateText\":[1,\"empty-state-text\"],\"theme\":[1]}],[2,\"zonos-payment\",{\"titleText\":[1,\"title-text\"],\"stripe\":[32],\"stripeElements\":[32],\"isPaymentInfoFilled\":[32]},null,{\"isPaymentInfoFilled\":[\"watchIsPaymentInfoFilled\"],\"stripeElements\":[\"watchInitStripe\"],\"stripe\":[\"watchInitStripe\"]}],[2,\"zonos-paypal-payment\"],[1,\"zonos-notification\",{\"notificationArray\":[32],\"showNotification\":[64]}]]],[\"zonos-button_3.cjs\",[[17,\"zonos-button\",{\"buttonColor\":[1,\"button-color\"],\"backgroundColor\":[1,\"background-color\"],\"borderStyle\":[1,\"border-style\"],\"isDisabled\":[4,\"is-disabled\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"variant\":[1],\"noBackground\":[4,\"no-background\"],\"withBoxShadow\":[4,\"with-box-shadow\"],\"noPaddingLeft\":[4,\"no-padding-left\"],\"noPaddingRight\":[4,\"no-padding-right\"],\"loading\":[4],\"justifyContent\":[1,\"justify-content\"],\"bold\":[4],\"theme\":[1],\"hasIcon\":[32],\"hasContent\":[32]},[[2,\"click\",\"clickHandler\"]],{\"icon\":[\"iconChangeHandler\"]}],[1,\"zonos-spinner\",{\"size\":[2],\"spinnerColor\":[1,\"spinner-color\"]}],[1,\"zonos-icon\",{\"autoHeight\":[4,\"auto-height\"],\"iconColor\":[1,\"icon-color\"],\"content\":[1],\"size\":[2]}]]],[\"zonos-language-select_2.cjs\",[[1,\"zonos-language-select\",{\"handleOnClose\":[16]}],[1,\"zonos-select-dialog-header\",{\"handleOnClose\":[16],\"label\":[1]}]]],[\"zonos-country-select_4.cjs\",[[1,\"zonos-country-select\",{\"handleOnClose\":[16],\"inputValue\":[32]}],[1,\"zonos-hello-dialog-footer\",{\"appearanceSettings\":[16],\"setShowCountrySelect\":[16],\"setShowLanguageSelect\":[16]}],[1,\"zonos-custom-message\",{\"icon\":[1],\"message\":[1]}],[2,\"zonos-virtual-scroll\",{\"renderItem\":[16],\"itemWidth\":[2,\"item-width\"],\"fallbackItemHeight\":[2,\"fallback-item-height\"],\"itemHeights\":[16],\"container\":[32],\"scrollTop\":[32],\"totalHeight\":[32]},null,{\"itemHeights\":[\"updateTotalHeight\"],\"fallbackItemHeight\":[\"updateTotalHeight\"]}]]],[\"zonos-address_7.cjs\",[[1,\"zonos-address-update-dialog\",{\"continueLoading\":[4,\"continue-loading\"],\"dialogLoading\":[4,\"dialog-loading\"],\"dialogOpen\":[4,\"dialog-open\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"shippingAddress\":[16],\"billingAddress\":[16],\"translatedShippingAddress\":[16],\"translatedBillingAddress\":[16],\"showErrorBanner\":[32],\"translatedShippingAddressState\":[32],\"translatedBillingAddressState\":[32]},null,{\"translatedShippingAddress\":[\"watchTranslatedShippingAddress\"],\"translatedBillingAddress\":[\"watchTranslatedBillingAddress\"]}],[2,\"zonos-address\",{\"type\":[1],\"titleText\":[1,\"title-text\"],\"defaultAddress\":[16],\"stripe\":[32],\"isDirtyAddress\":[32],\"isAddressFilled\":[32],\"checkoutSessionId\":[32]},null,{\"checkoutSessionId\":[\"isAddressFilledChanged\"],\"isAddressFilled\":[\"isAddressFilledChanged\"],\"stripe\":[\"watchInitStripe\"],\"defaultAddress\":[\"defaultAddressChanged\"]}],[2,\"zonos-link-authentication\",{\"titleText\":[1,\"title-text\"],\"defaultEmail\":[1,\"default-email\"],\"isEmailError\":[4,\"is-email-error\"],\"stripe\":[32],\"isStagingMode\":[32],\"clientSecret\":[32]},null,{\"isStagingMode\":[\"watchIsStagingMode\"],\"stripe\":[\"watchInitStripe\"],\"clientSecret\":[\"watchInitStripe\"],\"defaultEmail\":[\"watchDefaultEmail\"]}],[1,\"zonos-checkbox\",{\"backgroundColor\":[1,\"background-color\"],\"label\":[1],\"isChecked\":[4,\"is-checked\"],\"isDisabled\":[4,\"is-disabled\"],\"size\":[2],\"fontSize\":[1,\"font-size\"],\"borderStyle\":[1,\"border-style\"]},[[1,\"click\",\"onClick\"]]],[1,\"zonos-dialog\",{\"open\":[4],\"headerText\":[1,\"header-text\"],\"width\":[1],\"height\":[1],\"minHeight\":[1,\"min-height\"],\"noHeader\":[4,\"no-header\"],\"noBodyPadding\":[4,\"no-body-padding\"],\"noBorder\":[4,\"no-border\"],\"borderStyle\":[1,\"border-style\"],\"noCloseButton\":[4,\"no-close-button\"],\"noClickOutside\":[4,\"no-click-outside\"],\"mobile\":[4],\"isLoading\":[4,\"is-loading\"],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"],[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-address-display\",{\"currentAddress\":[16],\"addressType\":[1,\"address-type\"]}],[1,\"zonos-address-form\",{\"currentAddress\":[16],\"translatedAddress\":[16],\"addressType\":[1,\"address-type\"],\"localAddress\":[32]},null,{\"translatedAddress\":[\"watchCurrentAddress\"]}]]],[\"zonos-cart-items_13.cjs\",[[2,\"zonos-customer-info\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"defaultAddress\":[16],\"showErrorBanner\":[32],\"shippingCountry\":[32],\"isCheckingForRestrictedItems\":[32],\"isValidatingAddress\":[32],\"isTaxIdError\":[32],\"invalidShippingCharacterList\":[32],\"invalidBillingCharacterList\":[32],\"openAddressValidationDialog\":[32],\"isEmailError\":[32]}],[2,\"zonos-checkout-payment\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"showErrorBanner\":[32],\"hasStripePaymentError\":[32],\"stagingOrderCreateErrorMessage\":[32],\"internalContinueLoading\":[32]},null,{\"continueLoading\":[\"continueLoadingWatcher\"],\"hasStripePaymentError\":[\"stripePaymentErrorWatcher\"]}],[1,\"zonos-checkout-footer\",{\"mobile\":[4],\"dataTheme\":[1,\"data-theme\"],\"showLanguageDialog\":[32],\"isMobile\":[32]},[[4,\"click\",\"handleGlobalClick\"]],{\"mobile\":[\"handleMobileChange\"]}],[2,\"zonos-shipping\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"selectedShippingMethod\":[32],\"collapsedDAPOptions\":[32],\"isSelecting\":[32],\"showErrorBanner\":[32],\"serviceLevelsDDP\":[32],\"serviceLevelsDAP\":[32],\"serviceLevelsOther\":[32],\"serviceLevelsAll\":[32],\"displayBaseCurrency\":[32]}],[1,\"zonos-cart-subtotal\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"loading\":[32]}],[1,\"zonos-cart-restricted-items\",{\"hide\":[4],\"errorImages\":[32],\"internalCollapsed\":[32],\"firstRender\":[32]}],[1,\"zonos-checkout-finish\",{\"borderRadius\":[1,\"border-radius\"],\"storybookForceStatus\":[1,\"storybook-force-status\"],\"overrideNotification\":[16],\"isLoading\":[32],\"notificationType\":[32],\"notificationTitle\":[32],\"notificationMessages\":[32],\"notificationActionText\":[32],\"order\":[32],\"isWaitingToRedirect\":[32]}],[1,\"zonos-confirm-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"dialogIntent\":[1,\"dialog-intent\"],\"dialogSubtitle\":[1,\"dialog-subtitle\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"dialogConfirmBtnText\":[1,\"dialog-confirm-btn-text\"],\"dialogWidth\":[2,\"dialog-width\"],\"dialogCancelBtnText\":[1,\"dialog-cancel-btn-text\"],\"dialogType\":[1,\"dialog-type\"],\"isMobile\":[4,\"is-mobile\"],\"dialogOpen\":[4,\"dialog-open\"],\"noClickOutside\":[4,\"no-click-outside\"]},[[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-checkout-progress-tabs\",{\"tabColor\":[1,\"tab-color\"],\"backgroundColor\":[1,\"background-color\"],\"setTabItems\":[64],\"setTabSelected\":[64]}],[1,\"zonos-review\",{\"mobile\":[4],\"collapsed\":[4],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"]]],[1,\"zonos-cart-items\",{\"errorImages\":[32]}],[1,\"zonos-currency-toggle\",{\"errorImages\":[32]}],[1,\"zonos-rest-state\",{\"restStateSubtitle\":[1,\"rest-state-subtitle\"],\"restStateTitle\":[1,\"rest-state-title\"],\"restStateType\":[1,\"rest-state-type\"],\"isErrorImageLoad\":[32]}]]]]"), options);
|
|
22
|
+
return index.bootstrapLazy(JSON.parse("[[\"zonos-checkout.cjs\",[[2,\"zonos-checkout\",{\"appearanceSettingsOverride\":[16],\"preview\":[4],\"mobile\":[4],\"overrideStagingMode\":[4,\"override-staging-mode\"],\"defaultAddress\":[16],\"forceDialogOpen\":[4,\"force-dialog-open\"],\"defaultAddressParams\":[32],\"defaultCustomerProfileAddress\":[32],\"customerProfile\":[32],\"open\":[32],\"stripe\":[32],\"submitLoading\":[32],\"collapseReviewMobile\":[32],\"isAttachError\":[32],\"isMobile\":[32],\"isIframed\":[32],\"zonosReviewRef\":[32],\"storybookPaymentStatusOverride\":[32],\"isLegacyCheckout\":[32],\"confirmDialogOpen\":[32],\"isCartExpired\":[32],\"payInUsdConfirmDialogOpen\":[32],\"inventoryCheckErrorMessage\":[32],\"placedOrderInfo\":[32],\"clientSecret\":[32],\"stripeCustomerSessionClientSecret\":[32],\"closeDialogHandler\":[64],\"init\":[64],\"setToFinishStep\":[64],\"mockCheckoutSession\":[64]},[[16,\"zonos--init-cart-info\",\"initCartInfoHandler\"],[4,\"keydown\",\"handleKeyPress\"],[9,\"resize\",\"handleWindowResize\"]],{\"appearanceSettingsOverride\":[\"appearanceSettingsOverrideChanged\",\"handleAppearanceSettingsOverrideChange\"],\"overrideStagingMode\":[\"overrideStagingModeChanged\"],\"mobile\":[\"handleMobileChange\"],\"defaultAddress\":[\"handleAddressChange\"],\"customerProfile\":[\"handleCustomerProfileChange\"],\"clientSecret\":[\"handleClientSecretChange\"],\"stripeCustomerSessionClientSecret\":[\"handleClientSecretChange\"],\"open\":[\"handleOpenChange\"]}]]],[\"zonos-hello.cjs\",[[1,\"zonos-hello\",{\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettingsOverride\":[16],\"showPeekMessage\":[32],\"zonosStoreHelloSettings\":[32],\"showDialog\":[32],\"peekMessage\":[32],\"initialUrl\":[32],\"allRestrictedItems\":[32],\"allFoundProducts\":[32],\"productsOnPage\":[32],\"isHelloWidgetRendered\":[32],\"isMobile\":[32],\"getCountryList\":[64],\"displayCurrency\":[64],\"convertAndFormat\":[64],\"convert\":[64],\"format\":[64],\"openHelloDialog\":[64]},[[9,\"resize\",\"handleResize\"]],{\"appearanceSettingsOverride\":[\"handleAppearanceSettingsOverrideChange\"]}]]],[\"zonos-controller.cjs\",[[1,\"zonos-controller\",{\"config\":[16],\"zonosApiKey\":[1,\"zonos-api-key\"],\"initCheckoutElement\":[64],\"setupGoogleFont\":[64],\"showNotification\":[64],\"reset\":[64],\"overrideConfig\":[64],\"overrideCountry\":[64],\"getAppearanceSetting\":[64],\"updateOrganizationName\":[64]},[[8,\"locationchange\",\"handleLocationChange\"]]]]],[\"zonos-tooltip.cjs\",[[1,\"zonos-tooltip\",{\"label\":[1],\"subtitle\":[1],\"showTooltip\":[32]}]]],[\"zonos-component.cjs\",[[1,\"zonos-component\",{\"first\":[1],\"middle\":[1],\"last\":[1]}]]],[\"zonos-link.cjs\",[[1,\"zonos-link\",{\"href\":[1],\"rel\":[1],\"target\":[1],\"linkTitle\":[1,\"link-title\"]}]]],[\"zonos-logo.cjs\",[[1,\"zonos-logo\",{\"theme\":[1],\"width\":[1]}]]],[\"zonos-hello-dialog.cjs\",[[1,\"zonos-hello-dialog\",{\"isOpen\":[4,\"is-open\"],\"setIsOpen\":[16],\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettings\":[16],\"restrictedItems\":[16],\"welcomeMessage\":[32],\"showCountrySelect\":[32],\"showLanguageSelect\":[32]},[[4,\"click\",\"globalClickHandler\"]],{\"isOpen\":[\"isOpenHandler\"]}]]],[\"zonos-badge.cjs\",[[1,\"zonos-badge\",{\"bold\":[4],\"badgeColor\":[1,\"badge-color\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"rounded\":[4],\"loading\":[4],\"dismissHandler\":[16]}]]],[\"zonos-shipping-rich-radio.cjs\",[[1,\"zonos-shipping-rich-radio\",{\"items\":[16],\"borderColor\":[1,\"border-color\"],\"borderStyle\":[1,\"border-style\"],\"theme\":[1],\"selectedItem\":[16]}]]],[\"zonos-toggle.cjs\",[[1,\"zonos-toggle\",{\"options\":[16],\"value\":[1]}]]],[\"zonos-collapse.cjs\",[[1,\"zonos-collapse\",{\"collapsed\":[4],\"collapseSize\":[2,\"collapse-size\"],\"height\":[32],\"iframe\":[32]}]]],[\"zonos-stripe-input.cjs\",[[1,\"zonos-stripe-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"overrideSecondaryColor\":[1,\"override-secondary-color\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[1025],\"internalValue\":[32]},null,{\"inputValue\":[\"onInputValueChange\"],\"value\":[\"onValueChange\"]}]]],[\"zonos-card.cjs\",[[1,\"zonos-card\",{\"actions\":[16],\"backgroundColor\":[1,\"background-color\"],\"borderRadius\":[2,\"border-radius\"],\"footerActions\":[16],\"footerContent\":[16],\"footerHeight\":[2,\"footer-height\"],\"label\":[16],\"spacing\":[1]}]]],[\"zonos-input.cjs\",[[1,\"zonos-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"inputSize\":[1,\"input-size\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[32]},null,{\"inputValue\":[\"onInputValueChange\"]}]]],[\"zonos-text.cjs\",[[1,\"zonos-text\",{\"textColor\":[1,\"text-color\"],\"size\":[1],\"type\":[1],\"weight\":[2],\"ready\":[32]}]]],[\"zonos-banner.cjs\",[[1,\"zonos-banner\",{\"bannerTitle\":[1,\"banner-title\"],\"intent\":[1],\"hasContent\":[32]}]]],[\"zonos-country-flag.cjs\",[[1,\"zonos-country-flag\",{\"countryCode\":[1,\"country-code\"],\"size\":[2]}]]],[\"zonos-v-stack.cjs\",[[1,\"zonos-v-stack\",{\"spacing\":[2]}]]],[\"zonos-empty-state-payment_4.cjs\",[[1,\"zonos-empty-state-payment\",{\"emptyStateText\":[1,\"empty-state-text\"],\"theme\":[1]}],[2,\"zonos-payment\",{\"titleText\":[1,\"title-text\"],\"stripe\":[32],\"stripeElements\":[32],\"isPaymentInfoFilled\":[32]},null,{\"isPaymentInfoFilled\":[\"watchIsPaymentInfoFilled\"],\"stripeElements\":[\"watchInitStripe\"],\"stripe\":[\"watchInitStripe\"]}],[2,\"zonos-paypal-payment\"],[1,\"zonos-notification\",{\"notificationArray\":[32],\"showNotification\":[64]}]]],[\"zonos-button_3.cjs\",[[17,\"zonos-button\",{\"buttonColor\":[1,\"button-color\"],\"backgroundColor\":[1,\"background-color\"],\"borderStyle\":[1,\"border-style\"],\"isDisabled\":[4,\"is-disabled\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"variant\":[1],\"noBackground\":[4,\"no-background\"],\"withBoxShadow\":[4,\"with-box-shadow\"],\"noPaddingLeft\":[4,\"no-padding-left\"],\"noPaddingRight\":[4,\"no-padding-right\"],\"loading\":[4],\"justifyContent\":[1,\"justify-content\"],\"bold\":[4],\"theme\":[1],\"hasIcon\":[32],\"hasContent\":[32]},[[2,\"click\",\"clickHandler\"]],{\"icon\":[\"iconChangeHandler\"]}],[1,\"zonos-spinner\",{\"size\":[2],\"spinnerColor\":[1,\"spinner-color\"]}],[1,\"zonos-icon\",{\"autoHeight\":[4,\"auto-height\"],\"iconColor\":[1,\"icon-color\"],\"content\":[1],\"size\":[2]}]]],[\"zonos-language-select_2.cjs\",[[1,\"zonos-language-select\",{\"handleOnClose\":[16]}],[1,\"zonos-select-dialog-header\",{\"handleOnClose\":[16],\"label\":[1]}]]],[\"zonos-country-select_4.cjs\",[[1,\"zonos-country-select\",{\"handleOnClose\":[16],\"inputValue\":[32]}],[1,\"zonos-hello-dialog-footer\",{\"appearanceSettings\":[16],\"setShowCountrySelect\":[16],\"setShowLanguageSelect\":[16]}],[1,\"zonos-custom-message\",{\"icon\":[1],\"message\":[1]}],[2,\"zonos-virtual-scroll\",{\"renderItem\":[16],\"itemWidth\":[2,\"item-width\"],\"fallbackItemHeight\":[2,\"fallback-item-height\"],\"itemHeights\":[16],\"container\":[32],\"scrollTop\":[32],\"totalHeight\":[32]},null,{\"itemHeights\":[\"updateTotalHeight\"],\"fallbackItemHeight\":[\"updateTotalHeight\"]}]]],[\"zonos-address_7.cjs\",[[1,\"zonos-address-update-dialog\",{\"continueLoading\":[4,\"continue-loading\"],\"dialogLoading\":[4,\"dialog-loading\"],\"dialogOpen\":[4,\"dialog-open\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"shippingAddress\":[16],\"billingAddress\":[16],\"translatedShippingAddress\":[16],\"translatedBillingAddress\":[16],\"showErrorBanner\":[32],\"translatedShippingAddressState\":[32],\"translatedBillingAddressState\":[32]},null,{\"translatedShippingAddress\":[\"watchTranslatedShippingAddress\"],\"translatedBillingAddress\":[\"watchTranslatedBillingAddress\"]}],[2,\"zonos-address\",{\"type\":[1],\"titleText\":[1,\"title-text\"],\"defaultAddress\":[16],\"stripe\":[32],\"isDirtyAddress\":[32],\"isAddressFilled\":[32],\"checkoutSessionId\":[32]},null,{\"checkoutSessionId\":[\"isAddressFilledChanged\"],\"isAddressFilled\":[\"isAddressFilledChanged\"],\"stripe\":[\"watchInitStripe\"],\"defaultAddress\":[\"defaultAddressChanged\"]}],[2,\"zonos-link-authentication\",{\"titleText\":[1,\"title-text\"],\"defaultEmail\":[1,\"default-email\"],\"isEmailError\":[4,\"is-email-error\"],\"stripe\":[32],\"isStagingMode\":[32],\"clientSecret\":[32]},null,{\"isStagingMode\":[\"watchIsStagingMode\"],\"stripe\":[\"watchInitStripe\"],\"clientSecret\":[\"watchInitStripe\"],\"defaultEmail\":[\"watchDefaultEmail\"]}],[1,\"zonos-checkbox\",{\"backgroundColor\":[1,\"background-color\"],\"label\":[1],\"isChecked\":[4,\"is-checked\"],\"isDisabled\":[4,\"is-disabled\"],\"size\":[2],\"fontSize\":[1,\"font-size\"],\"borderStyle\":[1,\"border-style\"]},[[1,\"click\",\"onClick\"]]],[1,\"zonos-dialog\",{\"open\":[4],\"headerText\":[1,\"header-text\"],\"width\":[1],\"height\":[1],\"minHeight\":[1,\"min-height\"],\"noHeader\":[4,\"no-header\"],\"noBodyPadding\":[4,\"no-body-padding\"],\"noBorder\":[4,\"no-border\"],\"borderStyle\":[1,\"border-style\"],\"noCloseButton\":[4,\"no-close-button\"],\"noClickOutside\":[4,\"no-click-outside\"],\"mobile\":[4],\"isLoading\":[4,\"is-loading\"],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"],[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-address-display\",{\"currentAddress\":[16],\"addressType\":[1,\"address-type\"]}],[1,\"zonos-address-form\",{\"currentAddress\":[16],\"translatedAddress\":[16],\"addressType\":[1,\"address-type\"],\"localAddress\":[32]},null,{\"translatedAddress\":[\"watchCurrentAddress\"]}]]],[\"zonos-cart-items_13.cjs\",[[2,\"zonos-customer-info\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"defaultAddress\":[16],\"showErrorBanner\":[32],\"shippingCountry\":[32],\"isCheckingForRestrictedItems\":[32],\"isValidatingAddress\":[32],\"taxIdErrorMessage\":[32],\"invalidShippingCharacterList\":[32],\"invalidBillingCharacterList\":[32],\"openAddressValidationDialog\":[32],\"isEmailError\":[32]}],[2,\"zonos-checkout-payment\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"showErrorBanner\":[32],\"hasStripePaymentError\":[32],\"stagingOrderCreateErrorMessage\":[32],\"internalContinueLoading\":[32]},null,{\"continueLoading\":[\"continueLoadingWatcher\"],\"hasStripePaymentError\":[\"stripePaymentErrorWatcher\"]}],[1,\"zonos-checkout-footer\",{\"mobile\":[4],\"dataTheme\":[1,\"data-theme\"],\"showLanguageDialog\":[32],\"isMobile\":[32]},[[4,\"click\",\"handleGlobalClick\"]],{\"mobile\":[\"handleMobileChange\"]}],[2,\"zonos-shipping\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"selectedShippingMethod\":[32],\"collapsedDAPOptions\":[32],\"isSelecting\":[32],\"showErrorBanner\":[32],\"serviceLevelsDDP\":[32],\"serviceLevelsDAP\":[32],\"serviceLevelsOther\":[32],\"serviceLevelsAll\":[32],\"displayBaseCurrency\":[32]}],[1,\"zonos-cart-subtotal\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"loading\":[32]}],[1,\"zonos-cart-restricted-items\",{\"hide\":[4],\"errorImages\":[32],\"internalCollapsed\":[32],\"firstRender\":[32]}],[1,\"zonos-checkout-finish\",{\"borderRadius\":[1,\"border-radius\"],\"storybookForceStatus\":[1,\"storybook-force-status\"],\"overrideNotification\":[16],\"isLoading\":[32],\"notificationType\":[32],\"notificationTitle\":[32],\"notificationMessages\":[32],\"notificationActionText\":[32],\"order\":[32],\"isWaitingToRedirect\":[32]}],[1,\"zonos-confirm-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"dialogIntent\":[1,\"dialog-intent\"],\"dialogSubtitle\":[1,\"dialog-subtitle\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"dialogConfirmBtnText\":[1,\"dialog-confirm-btn-text\"],\"dialogWidth\":[2,\"dialog-width\"],\"dialogCancelBtnText\":[1,\"dialog-cancel-btn-text\"],\"dialogType\":[1,\"dialog-type\"],\"isMobile\":[4,\"is-mobile\"],\"dialogOpen\":[4,\"dialog-open\"],\"noClickOutside\":[4,\"no-click-outside\"]},[[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-checkout-progress-tabs\",{\"tabColor\":[1,\"tab-color\"],\"backgroundColor\":[1,\"background-color\"],\"setTabItems\":[64],\"setTabSelected\":[64]}],[1,\"zonos-review\",{\"mobile\":[4],\"collapsed\":[4],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"]]],[1,\"zonos-cart-items\",{\"errorImages\":[32]}],[1,\"zonos-currency-toggle\",{\"errorImages\":[32]}],[1,\"zonos-rest-state\",{\"restStateSubtitle\":[1,\"rest-state-subtitle\"],\"restStateTitle\":[1,\"rest-state-title\"],\"restStateType\":[1,\"rest-state-type\"],\"isErrorImageLoad\":[32]}]]]]"), options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -6,9 +6,9 @@ const index = require('./index-2f90486e.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-94ef609c.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-3d0c0f0b.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
11
|
-
const paypal = require('./paypal-
|
|
11
|
+
const paypal = require('./paypal-9eaa9196.js');
|
|
12
12
|
require('./isDarkColor-ec4a4e7d.js');
|
|
13
13
|
|
|
14
14
|
const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-3d0c0f0b.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-3d0c0f0b.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-3d0c0f0b.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./handleFetch-969d05d8.js');
|
|
@@ -80,6 +80,7 @@ export class ZonosCheckout {
|
|
|
80
80
|
const currentTime = new Date().getTime();
|
|
81
81
|
const timeDiff = currentTime - cartCreatedAt;
|
|
82
82
|
const timeDiffInSeconds = Math.floor(timeDiff / 1000);
|
|
83
|
+
log(`currentTime: ${currentTime} | cartCreatedAt: ${cartCreatedAt}`);
|
|
83
84
|
log(`Cart has been created for ${timeDiffInSeconds / 60} minutes`);
|
|
84
85
|
if (zonosStore.checkoutSettings.defaultCartExpiration) {
|
|
85
86
|
if (timeDiffInSeconds > zonosStore.checkoutSettings.defaultCartExpiration) {
|
|
@@ -419,14 +420,19 @@ export class ZonosCheckout {
|
|
|
419
420
|
}
|
|
420
421
|
attachCheckout() {
|
|
421
422
|
const buttonAnchorSelector = zonosStore.checkoutSettings.placeOrderButtonSelector;
|
|
423
|
+
const alwaysTriggerInternationalCheckoutSelector = zonosStore.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;
|
|
422
424
|
log(`attach checkout ${buttonAnchorSelector}`);
|
|
425
|
+
log(`attach checkout to always trigger international checkout selector: ${alwaysTriggerInternationalCheckoutSelector}`);
|
|
423
426
|
// allow to load checkout if cartData is ready (Checkout can be loaded right away if tempCartUUID is in the URL)
|
|
424
|
-
if (!buttonAnchorSelector &&
|
|
427
|
+
if (!buttonAnchorSelector &&
|
|
428
|
+
!alwaysTriggerInternationalCheckoutSelector &&
|
|
429
|
+
!window.Zonos.cartData) {
|
|
425
430
|
// do nothing if button element is not found
|
|
426
431
|
return;
|
|
427
432
|
}
|
|
428
433
|
const selectors = [
|
|
429
434
|
buttonAnchorSelector,
|
|
435
|
+
alwaysTriggerInternationalCheckoutSelector,
|
|
430
436
|
// hidden button for domestic redirected
|
|
431
437
|
`#${domesticRedirectedBtnSelector}`,
|
|
432
438
|
// hidden button for legacy checkout facade and when client secret is provided in the query param or session storage when user is redirected from stripe
|
|
@@ -448,9 +454,15 @@ export class ZonosCheckout {
|
|
|
448
454
|
var _a;
|
|
449
455
|
// Start tracking load time
|
|
450
456
|
const startTime = performance.now();
|
|
457
|
+
const isAlwaysTriggerInternationalCheckout = alwaysTriggerInternationalCheckoutSelector &&
|
|
458
|
+
button.matches(alwaysTriggerInternationalCheckoutSelector);
|
|
459
|
+
const isAnyImmediateTrigger = button.matches(`#${domesticRedirectedBtnSelector}`) ||
|
|
460
|
+
button.matches(`#${checkoutHiddenBtnSelector}`);
|
|
451
461
|
// Allow no country set for legacy facades. Otherwise enforce it being a shippable country and not disabled.
|
|
452
462
|
if (!window.Zonos.isLegacyCheckout &&
|
|
453
|
-
(!isShippableCountry() || isDisabledCountry())
|
|
463
|
+
(!isShippableCountry() || isDisabledCountry()) &&
|
|
464
|
+
!isAlwaysTriggerInternationalCheckout &&
|
|
465
|
+
!isAnyImmediateTrigger) {
|
|
454
466
|
return;
|
|
455
467
|
}
|
|
456
468
|
e.preventDefault();
|
|
@@ -553,7 +565,7 @@ export class ZonosCheckout {
|
|
|
553
565
|
}
|
|
554
566
|
button.setAttribute('data-zonos-checkout-attached', 'true');
|
|
555
567
|
// if this button is the hidden button, trigger the click event
|
|
556
|
-
if (button.matches(domesticRedirectedBtnSelector)) {
|
|
568
|
+
if (button.matches(`#${domesticRedirectedBtnSelector}`)) {
|
|
557
569
|
button.dispatchEvent(createCustomEvent('click'));
|
|
558
570
|
// cleanup shipping session after button is clicked
|
|
559
571
|
stripeStoreCleanupDomesticShippingSession();
|
|
@@ -3,6 +3,7 @@ import { stripeStore, stripeStoreTranslateAddressToLatin, } from "../../../store
|
|
|
3
3
|
import { translate } from "../../../store/translationStore";
|
|
4
4
|
import { getZonosStoreTheme, zonosStore, } from "../../../store/zonosStore";
|
|
5
5
|
import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
|
|
6
|
+
import { taxIdValidationResult } from "../../../utils/taxIdValidationResult";
|
|
6
7
|
import { countryRequireTaxId, shipToTaxIdLabels, } from "../../../../types/checkout/Tax";
|
|
7
8
|
export class ZonosCustomerInfo {
|
|
8
9
|
constructor() {
|
|
@@ -83,10 +84,6 @@ export class ZonosCustomerInfo {
|
|
|
83
84
|
}
|
|
84
85
|
this.continueClicked.emit();
|
|
85
86
|
};
|
|
86
|
-
this.isTaxIdRequired = () => {
|
|
87
|
-
const requireTaxIdCountry = ['MX'];
|
|
88
|
-
return requireTaxIdCountry.includes(this.shippingCountry);
|
|
89
|
-
};
|
|
90
87
|
this.handleValidate = () => {
|
|
91
88
|
var _a, _b;
|
|
92
89
|
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
@@ -105,12 +102,12 @@ export class ZonosCustomerInfo {
|
|
|
105
102
|
this.isEmailError = true;
|
|
106
103
|
}
|
|
107
104
|
// validate tax id input if it's required for specific countries, optional otherwise
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
const { error, valid } = taxIdValidationResult({
|
|
106
|
+
shippingCountry: this.shippingCountry,
|
|
107
|
+
taxId: stripeStore.taxId,
|
|
108
|
+
});
|
|
109
|
+
this.taxIdErrorMessage = !valid ? translate(error) : '';
|
|
110
|
+
if (!isValidBilling || !isValidShipping || !isValidLink || !valid) {
|
|
114
111
|
return false;
|
|
115
112
|
}
|
|
116
113
|
return true;
|
|
@@ -148,7 +145,7 @@ export class ZonosCustomerInfo {
|
|
|
148
145
|
this.shippingCountry = '';
|
|
149
146
|
this.isCheckingForRestrictedItems = false;
|
|
150
147
|
this.isValidatingAddress = false;
|
|
151
|
-
this.
|
|
148
|
+
this.taxIdErrorMessage = '';
|
|
152
149
|
this.invalidShippingCharacterList = null;
|
|
153
150
|
this.invalidBillingCharacterList = null;
|
|
154
151
|
this.openAddressValidationDialog = false;
|
|
@@ -195,9 +192,9 @@ export class ZonosCustomerInfo {
|
|
|
195
192
|
return null;
|
|
196
193
|
}
|
|
197
194
|
const taxIdInputInfo = shipToTaxIdLabels[countryCode];
|
|
198
|
-
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: this.
|
|
195
|
+
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
|
|
199
196
|
stripeStore.taxId = event.detail;
|
|
200
|
-
} }), this.
|
|
197
|
+
} }), this.taxIdErrorMessage && (h("zonos-text", { textColor: 'red-600', type: "caption" }, this.taxIdErrorMessage))));
|
|
201
198
|
}
|
|
202
199
|
render() {
|
|
203
200
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -375,7 +372,7 @@ export class ZonosCustomerInfo {
|
|
|
375
372
|
"shippingCountry": {},
|
|
376
373
|
"isCheckingForRestrictedItems": {},
|
|
377
374
|
"isValidatingAddress": {},
|
|
378
|
-
"
|
|
375
|
+
"taxIdErrorMessage": {},
|
|
379
376
|
"invalidShippingCharacterList": {},
|
|
380
377
|
"invalidBillingCharacterList": {},
|
|
381
378
|
"openAddressValidationDialog": {},
|
|
@@ -152,6 +152,9 @@ export const stringsArabic = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'إخفاء الخيارات غير المدفوعة مسبقًا',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'تنسيق RFC غير صالح. يجب أن يكون 12-13 حرفًا كبيرًا وأرقامًا فقط.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'رمز ترويجي غير صالح',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsBase = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Hide non-prepaid options',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Invalid promo code',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsChinese = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: '隐藏非预付选项',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: '无效的RFC格式。必须仅包含12-13个大写字母和数字。',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: '无效的促销代码',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsDanish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Skjul ikke-forudbetalte muligheder',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ugyldigt RFC-format. Skal kun indeholde 12-13 store bogstaver og tal.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ugyldig kampagnekode',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsDutch = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Verberg niet-vooruitbetaalde opties',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ongeldig RFC-formaat. Moet alleen 12-13 hoofdletters en cijfers bevatten.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ongeldige promotiecode',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsFrench = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Masquer les options non prépayées',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Format RFC invalide. Doit contenir uniquement 12 à 13 lettres majuscules et chiffres.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Code promo invalide',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsGerman = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Nicht vorausbezahlte Optionen ausblenden',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ungültiges RFC-Format. Muss nur 12–13 Großbuchstaben und Zahlen enthalten.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ungültiger Aktionscode',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsHebrew = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'הסתר אפשרויות שאינן בתשלום מראש',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'פורמט RFC לא חוקי. חייב להיות 12–13 אותיות גדולות ומספרים בלבד.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'קוד קידום מכירות לא חוקי',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsIndonesian = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Sembunyikan opsi yang tidak prabayar',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Format RFC tidak valid. Harus hanya terdiri dari 12-13 huruf besar dan angka.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Kode promo tidak valid',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsItalian = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Nascondi opzioni non prepagate',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Formato RFC non valido. Deve contenere solo 12-13 lettere maiuscole e numeri.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Codice promozionale non valido',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsJapanese = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: '未払いオプションを非表示にする',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: '無効なRFC形式です。12〜13の大文字と数字のみである必要があります。',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: '無効なプロモーションコード',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsKorean = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: '선불이 아닌 옵션 숨기기',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: '잘못된 RFC 형식입니다. 12~13개의 대문자와 숫자만 포함해야 합니다.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: '유효하지 않은 프로모션 코드',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsNorwegian = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Skjul ikke-forhåndsbetalte alternativer',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ugyldig RFC-format. Må kun inneholde 12–13 store bokstaver og tall.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ugyldig kampanjekode',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsPolish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ukryj opcje nieprzedpłacone',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Nieprawidłowy format RFC. Musi zawierać tylko 12-13 wielkich liter i cyfr.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Nieprawidłowy kod promocyjny',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsPortuguese = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ocultar opções não pré-pagas',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Formato de RFC inválido. Deve ter apenas 12-13 letras maiúsculas e números.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Código promocional inválido',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsRussian = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Скрыть неоплаченные варианты',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Неверный формат RFC. Должно быть 12–13 заглавных букв и цифр.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Недействительный промо-код',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsSpanish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ocultar opciones no prepagadas',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Formato de RFC no válido. Debe tener solo 12-13 letras mayúsculas y números.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Código promocional no válido',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsSwedish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Dölj icke-förbetalda alternativ',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ogiltigt RFC-format. Måste endast innehålla 12–13 versaler och siffror.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ogiltig kampanjkod',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsTurkish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ön ödemesiz seçenekleri gizle',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Geçersiz RFC formatı. Yalnızca 12-13 büyük harf ve rakam olmalıdır.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Geçersiz promosyon kodu',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsVietnamese = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ẩn các tùy chọn chưa trả trước',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Định dạng RFC không hợp lệ. Phải chỉ có 12–13 chữ cái viết hoa và số.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Mã khuyến mãi không hợp lệ',
|
|
157
160
|
},
|
|
@@ -10,7 +10,9 @@ const injectCheckoutElement = () => {
|
|
|
10
10
|
};
|
|
11
11
|
export const initCheckout = (config) => {
|
|
12
12
|
// allow to load checkout if cartData is ready (Checkout can be loaded right awaiy if tempCartUUID is in the URL)
|
|
13
|
-
if (!config.placeOrderButtonSelector &&
|
|
13
|
+
if (!config.placeOrderButtonSelector &&
|
|
14
|
+
!config.alwaysTriggerInternationalCheckoutSelector &&
|
|
15
|
+
!window.Zonos.cartData) {
|
|
14
16
|
// do nothing if checkout button anchor is not set
|
|
15
17
|
return;
|
|
16
18
|
}
|
|
@@ -20,5 +22,10 @@ export const initCheckout = (config) => {
|
|
|
20
22
|
logError(`Selector checkoutButtonAnchor "${config.placeOrderButtonSelector}" is not a valid selector`);
|
|
21
23
|
return;
|
|
22
24
|
}
|
|
25
|
+
if (config.alwaysTriggerInternationalCheckoutSelector &&
|
|
26
|
+
!isValidSelector(config.alwaysTriggerInternationalCheckoutSelector)) {
|
|
27
|
+
logError(`Selector alwaysTriggerInternationalCheckoutSelector "${config.alwaysTriggerInternationalCheckoutSelector}" is not a valid selector`);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
23
30
|
injectCheckoutElement();
|
|
24
31
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const isTaxIdRequired = (shippingCountry) => {
|
|
2
|
+
const requireTaxIdCountry = ['MX'];
|
|
3
|
+
return requireTaxIdCountry.includes(shippingCountry);
|
|
4
|
+
};
|
|
5
|
+
export const taxIdValidationResult = ({ shippingCountry, taxId, }) => {
|
|
6
|
+
const taxRequired = isTaxIdRequired(shippingCountry);
|
|
7
|
+
if (!taxRequired) {
|
|
8
|
+
return {
|
|
9
|
+
error: null,
|
|
10
|
+
valid: true,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
if (!taxId) {
|
|
14
|
+
return {
|
|
15
|
+
error: 'Tax id is required',
|
|
16
|
+
valid: false,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
// validate tax id for mexico;
|
|
20
|
+
if (shippingCountry === 'MX') {
|
|
21
|
+
const isValid = /^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/.test(taxId);
|
|
22
|
+
if (!isValid) {
|
|
23
|
+
return {
|
|
24
|
+
error: 'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.',
|
|
25
|
+
valid: false,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
error: null,
|
|
30
|
+
valid: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
// Other countries doesn't need to validate tax id in the right format
|
|
34
|
+
return {
|
|
35
|
+
error: null,
|
|
36
|
+
valid: true,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -298,7 +298,7 @@ Zonos.restoreNativeBrowserFunctions = () => {
|
|
|
298
298
|
document.body.removeChild(overrideIframe);
|
|
299
299
|
};
|
|
300
300
|
Zonos.injectController = ({ config, }) => {
|
|
301
|
-
var _b;
|
|
301
|
+
var _b, _c;
|
|
302
302
|
if (document.querySelector('zonos-controller')) {
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
@@ -323,6 +323,27 @@ Zonos.injectController = ({ config, }) => {
|
|
|
323
323
|
subtree: true,
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
|
+
// if alwaysTriggerInternationalCheckoutSelector is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
|
|
327
|
+
if ((_c = config.checkoutSettings) === null || _c === void 0 ? void 0 : _c.alwaysTriggerInternationalCheckoutSelector) {
|
|
328
|
+
const alwaysTriggerInternationalCheckoutSelector = config.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;
|
|
329
|
+
_a.disablePlaceOrderButtons({
|
|
330
|
+
config,
|
|
331
|
+
disable: true,
|
|
332
|
+
placeOrderButtonSelector: alwaysTriggerInternationalCheckoutSelector,
|
|
333
|
+
});
|
|
334
|
+
// create a mutation observer to see if any new elements that match our selector is added to the DOM
|
|
335
|
+
const observer = new MutationObserver(() => {
|
|
336
|
+
_a.disablePlaceOrderButtons({
|
|
337
|
+
config,
|
|
338
|
+
disable: true,
|
|
339
|
+
placeOrderButtonSelector: alwaysTriggerInternationalCheckoutSelector,
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
observer.observe(document.body, {
|
|
343
|
+
childList: true,
|
|
344
|
+
subtree: true,
|
|
345
|
+
});
|
|
346
|
+
}
|
|
326
347
|
const zonosController = document.createElement('zonos-controller');
|
|
327
348
|
zonosController.config = config;
|
|
328
349
|
zonosController.zonosApiKey = _a.zonosApiKey || '';
|
|
@@ -14,6 +14,7 @@ export const featureAspectKeyEnum = {
|
|
|
14
14
|
ClassifySingleRequest: 'classify_single_request',
|
|
15
15
|
ComConsolidation: 'com_consolidation',
|
|
16
16
|
DashboardCheckout_2Settings: 'dashboard_checkout_2_settings',
|
|
17
|
+
DashboardChurnedNotification: 'dashboard_churned_notification',
|
|
17
18
|
DashboardHello_2Settings: 'dashboard_hello_2_settings',
|
|
18
19
|
DashboardNewLabelUi: 'dashboard_new_label_ui',
|
|
19
20
|
DashboardOrderApprove: 'dashboard_order_approve',
|
|
@@ -40,6 +41,7 @@ export const featureAudienceNameEnum = {
|
|
|
40
41
|
ClassifyBulkMerchant: 'classify_bulk_merchant',
|
|
41
42
|
ClassifyBulkMerchantExportConfidenceScore: 'classify_bulk_merchant_export_confidence_score',
|
|
42
43
|
CustomerSuccess: 'customer_success',
|
|
44
|
+
DashboardChurnedNotificationMerchant: 'dashboard_churned_notification_merchant',
|
|
43
45
|
DashboardLabelBetaMerchant: 'dashboard_label_beta_merchant',
|
|
44
46
|
Designer: 'designer',
|
|
45
47
|
DocsContributor: 'docs_contributor',
|