@zonos/elements 1.3.14 → 1.3.15-alpha.1
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-5d196917.js → cart-1b1d39af.js} +162 -70
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{sendErrorLog-3e181984.js → sendErrorLog-29e50f7e.js} +1 -1
- package/dist/cjs/{submitGtag-44e3a996.js → submitGtag-ab287a34.js} +1 -1
- package/dist/cjs/zonos-address_4.cjs.entry.js +9 -9
- package/dist/cjs/zonos-badge_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-button_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +90 -69
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +7 -7
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +17 -17
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +40 -28
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +23 -23
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +3 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +5 -10
- package/dist/collection/components/store/checkout/stripe.js +18 -8
- package/dist/collection/components/store/translationStore/strings.arabic.js +6 -3
- package/dist/collection/components/store/translationStore/strings.base.js +6 -3
- package/dist/collection/components/store/translationStore/strings.chinese.js +6 -3
- package/dist/collection/components/store/translationStore/strings.danish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.dutch.js +6 -3
- package/dist/collection/components/store/translationStore/strings.french.js +6 -3
- package/dist/collection/components/store/translationStore/strings.german.js +6 -3
- package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -3
- package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -3
- package/dist/collection/components/store/translationStore/strings.italian.js +6 -3
- package/dist/collection/components/store/translationStore/strings.japanese.js +6 -3
- package/dist/collection/components/store/translationStore/strings.korean.js +6 -3
- package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -3
- package/dist/collection/components/store/translationStore/strings.polish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -3
- package/dist/collection/components/store/translationStore/strings.russian.js +6 -3
- package/dist/collection/components/store/translationStore/strings.spanish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.swedish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.turkish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -3
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +1 -0
- package/dist/collection/components/utils/formatDate.js +6 -2
- package/dist/collection/types/generated/graphql.customer.types.js +45 -44
- package/dist/collection/types/generated/graphql.frontend.types.js +48 -48
- package/dist/components/stripe.js +162 -71
- package/dist/components/zonos-address2.js +1 -1
- package/dist/components/zonos-badge2.js +3 -3
- package/dist/components/zonos-button2.js +3 -3
- package/dist/components/zonos-card2.js +3 -3
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +1 -1
- package/dist/components/zonos-checkout-payment2.js +18 -17
- package/dist/components/zonos-checkout-progress-tabs2.js +4 -4
- package/dist/components/zonos-checkout.js +3 -1
- package/dist/components/zonos-collapse2.js +2 -2
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +2 -2
- package/dist/components/zonos-country-select2.js +2 -2
- package/dist/components/zonos-custom-message2.js +2 -2
- package/dist/components/zonos-customer-info2.js +41 -28
- package/dist/components/zonos-dialog2.js +3 -3
- package/dist/components/zonos-hello-dialog-footer2.js +2 -2
- package/dist/components/zonos-hello-dialog2.js +4 -4
- package/dist/components/zonos-hello.js +1 -1
- package/dist/components/zonos-language-select2.js +3 -3
- package/dist/components/zonos-link-authentication2.js +2 -2
- package/dist/components/zonos-link.js +1 -1
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-select-dialog-header2.js +2 -2
- package/dist/components/zonos-shipping2.js +25 -24
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/esm/{cart-515aac56.js → cart-10bcd2e0.js} +162 -71
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{sendErrorLog-e4546d7b.js → sendErrorLog-8642e94a.js} +1 -1
- package/dist/esm/{submitGtag-6767c31f.js → submitGtag-84886899.js} +1 -1
- package/dist/esm/zonos-address_4.entry.js +9 -9
- package/dist/esm/zonos-badge_2.entry.js +5 -5
- package/dist/esm/zonos-button_2.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +6 -6
- package/dist/esm/zonos-cart-items_10.entry.js +90 -69
- package/dist/esm/zonos-checkout.entry.js +5 -3
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +7 -7
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-payment.entry.js +2 -2
- package/dist/esm/zonos-select-dialog-header_2.entry.js +4 -4
- package/dist/esm-es5/cart-10bcd2e0.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/sendErrorLog-8642e94a.js +1 -0
- package/dist/esm-es5/{submitGtag-6767c31f.js → submitGtag-84886899.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +4 -4
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +3 -4
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -4
- package/dist/types/components/store/checkout/cart.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.base.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.danish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.french.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.german.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.italian.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.korean.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.polish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.russian.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +6 -3
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +1 -0
- package/dist/types/components/utils/formatDate.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +36 -35
- package/dist/types/types/generated/graphql.customer.types.ts +100 -99
- package/dist/types/types/generated/graphql.frontend.types.d.ts +34 -34
- package/dist/types/types/generated/graphql.frontend.types.ts +110 -110
- package/dist/zonos-elements/{p-aa671fa6.entry.js → p-056a453e.entry.js} +1 -1
- package/dist/zonos-elements/{p-3b4225b2.entry.js → p-0fc08944.entry.js} +1 -1
- package/dist/zonos-elements/{p-a583e3c6.system.entry.js → p-19f0392f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d9aa8599.entry.js → p-1a5f8df7.entry.js} +1 -1
- package/dist/zonos-elements/{p-cd449b56.entry.js → p-24bd40ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-05f749dc.system.entry.js → p-262b8e1e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f48a613e.system.entry.js → p-26c55472.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1f5c2d7b.entry.js → p-2ffcc816.entry.js} +1 -1
- package/dist/zonos-elements/p-33abdb30.js +1 -0
- package/dist/zonos-elements/{p-8ec3995a.system.entry.js → p-34565753.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9da65d62.entry.js → p-440eb12c.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6bbff95.entry.js → p-44e8e803.entry.js} +1 -1
- package/dist/zonos-elements/p-450942a3.system.js +1 -0
- package/dist/zonos-elements/{p-bc2bd266.system.entry.js → p-51afdc14.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7aef7d5d.system.entry.js → p-536b62a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2aa3c0e8.system.entry.js → p-596a4beb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-16b59229.system.entry.js → p-5c41ac7d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f0b4e58a.js → p-5ff27485.js} +1 -1
- package/dist/zonos-elements/{p-257af88b.entry.js → p-66b42924.entry.js} +1 -1
- package/dist/zonos-elements/{p-4fbd0ce6.entry.js → p-6adbe3e4.entry.js} +1 -1
- package/dist/zonos-elements/p-6f5761e8.js +1 -0
- package/dist/zonos-elements/p-6fb15797.system.entry.js +1 -0
- package/dist/zonos-elements/{p-522294b9.system.entry.js → p-7411d43e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aa5e2f7c.system.entry.js → p-7432179a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8cb8fa93.entry.js → p-74c8aa64.entry.js} +1 -1
- package/dist/zonos-elements/p-8126011d.entry.js +1 -0
- package/dist/zonos-elements/{p-c5bc49b5.system.entry.js → p-8b44b059.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bdd775f2.system.js → p-8b44e558.system.js} +1 -1
- package/dist/zonos-elements/{p-3f713699.entry.js → p-8d1f81e1.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab06e5c8.system.entry.js → p-8e5796a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4f626a90.system.entry.js → p-b2f56dcb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b4c3dcda.entry.js +1 -0
- package/dist/zonos-elements/p-b4e704c7.entry.js +1 -0
- package/dist/zonos-elements/{p-808413f8.entry.js → p-b6393a04.entry.js} +1 -1
- package/dist/zonos-elements/p-b8e8330b.system.js +1 -1
- package/dist/zonos-elements/p-c6170bec.system.js +1 -0
- package/dist/zonos-elements/{p-3d8254a2.system.entry.js → p-ca8ae8a4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a48e7c84.entry.js → p-dd1ba8fb.entry.js} +1 -1
- package/dist/zonos-elements/p-e7b5cf0d.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-515aac56.js +0 -1
- package/dist/esm-es5/sendErrorLog-e4546d7b.js +0 -1
- package/dist/zonos-elements/p-17ded5a1.system.entry.js +0 -1
- package/dist/zonos-elements/p-2d404058.system.js +0 -1
- package/dist/zonos-elements/p-3e38990b.entry.js +0 -1
- package/dist/zonos-elements/p-418c056d.entry.js +0 -1
- package/dist/zonos-elements/p-816f1aee.js +0 -1
- package/dist/zonos-elements/p-882ec68e.system.js +0 -1
- package/dist/zonos-elements/p-93698719.system.entry.js +0 -1
- package/dist/zonos-elements/p-ca6cf075.js +0 -1
- package/dist/zonos-elements/p-e9a41fd8.entry.js +0 -1
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"domesticRedirectedBtnSelector":[32],"legacyCheckoutHiddenBtnSelector":[32],"isLegacyCheckout":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"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"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3",[[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]}]]],["zonos-address_4",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"reportedInvalidCharacters":[32],"invalidCharacterList":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_10",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"
|
|
8
|
+
return bootstrapLazy([["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"domesticRedirectedBtnSelector":[32],"legacyCheckoutHiddenBtnSelector":[32],"isLegacyCheckout":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"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"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3",[[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]}]]],["zonos-address_4",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"reportedInvalidCharacters":[32],"invalidCharacterList":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_10",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"showErrorBanner":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"showErrorBanner":[32]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevels":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"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"]]],[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]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as handleFetch, f as cartStore, l as localizationStore, a as log } from './cart-10bcd2e0.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-f3eef64b.js';
|
|
3
3
|
|
|
4
4
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-0e31d804.js';
|
|
2
|
-
import {
|
|
2
|
+
import { k as stripeStore, d as logError, l as localizationStore, t as translate, o as stripeStorePrefetchLandedCost } from './cart-10bcd2e0.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
|
|
4
|
-
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-
|
|
4
|
+
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-8642e94a.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-8129b0cb.js';
|
|
7
7
|
import { i as isDarkColor } from './isDarkColor-7a6d2d14.js';
|
|
@@ -220,7 +220,7 @@ const ZonosAddress = class {
|
|
|
220
220
|
}
|
|
221
221
|
render() {
|
|
222
222
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
223
|
-
return (h(Host, { key: '
|
|
223
|
+
return (h(Host, { key: '549fc102d06aa0fd138ca03afb2e6fc691108ac2', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '6e8853dccc44714d21c9c0417d068dab9f10bd2e', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '2c28a21f87720427b9a98d0d6e2fa638232855dc', class: "zonos--address-component" }), this.invalidCharacterList && (h("zonos-banner", { key: '6fc1f7445d51531c8f4009d1f2f82831a9351c4c', bannerTitle: translate('Please resolve the following errors:'), intent: "error" }, Object.keys(this.invalidCharacterList).map(fieldName => (h("zonos-text", null, `- ${translate(mappedFields[fieldName])}: ${translate('only supports Latin characters (A-Z, a-z)')}`)))))));
|
|
224
224
|
}
|
|
225
225
|
get el() { return getElement(this); }
|
|
226
226
|
static get watchers() { return {
|
|
@@ -268,14 +268,14 @@ const ZonosCheckbox = class {
|
|
|
268
268
|
? 'var(--amino-gray-800)'
|
|
269
269
|
: 'var(--amino-gray-0)';
|
|
270
270
|
const borderStyle = getBorderRadius(this.borderStyle, '4px');
|
|
271
|
-
return (h(Host, { key: '
|
|
271
|
+
return (h(Host, { key: '3cf37521b3f7dc267bdcd23f0c023cdff9f73048', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
272
272
|
'--background-color': backgroundColor,
|
|
273
273
|
'--border-radius': borderStyle,
|
|
274
274
|
'--font-family': zonosStoreFontFamily(),
|
|
275
275
|
'--size': `${this.size}px`,
|
|
276
|
-
} }, h("label", { key: '
|
|
276
|
+
} }, h("label", { key: '6771cc475d111684518492cbff6204a9cad5ec33', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: '832a30d4aa546a5c7b5ab9e8437428aa08f20c17', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
277
277
|
this.checkboxSelected.emit(e.target.checked);
|
|
278
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
278
|
+
}, type: "checkbox" }), h("span", { key: '9fe422aee5af96df40176d7d96006c578fe9273f', class: "checkmark-container" }, h("svg", { key: '7097c01f50d8cca92ee1bb531e0ac316cfca1036', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '2fb6af94baa97412ce3dd49ceca12397886ce50b', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { key: 'f1c02b4377be2e48936a6e32049117b7a81a292b', size: this.fontSize }, this.label)))));
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
ZonosCheckbox.style = ZonosCheckboxStyle0;
|
|
@@ -325,10 +325,10 @@ const ZonosCollapse = class {
|
|
|
325
325
|
// set overflow to hidden to prevent content from showing when collapsed
|
|
326
326
|
this.el.style.overflow = 'hidden';
|
|
327
327
|
}
|
|
328
|
-
return (h(Host, { key: '
|
|
328
|
+
return (h(Host, { key: '7e0d608d6bfe0ffa5b04b2a30fb27e956c7cb255', class: 'zonos--elements zonos--collapse', style: {
|
|
329
329
|
'--font-family': zonosStoreFontFamily(),
|
|
330
330
|
height: this.getElementHeight(),
|
|
331
|
-
} }, h("div", { key: '
|
|
331
|
+
} }, h("div", { key: '94f69d9e0e6c849a9b609567036ff5cfd2f8ce9c' }, h("iframe", { key: '66ad13c9e08d2ece856543af98c440fec4fd5975', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: '9d0f92e6d22f3e365bc3cec1e5d23325e045bc1a' }))));
|
|
332
332
|
}
|
|
333
333
|
get el() { return getElement(this); }
|
|
334
334
|
};
|
|
@@ -369,7 +369,7 @@ const ZonosLinkAuthentication = class {
|
|
|
369
369
|
}
|
|
370
370
|
render() {
|
|
371
371
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
372
|
-
return (h(Host, { key: '
|
|
372
|
+
return (h(Host, { key: '31c41fa819b53a3de0b772f2a808bbc2a5954f0b', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '79168635348479523ac726458ac4fdc5c791f6a7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '1eb99df8b3ca8d92b0bdbbd1ef8fd5f561294904', class: "zonos--link-authentication-component" })));
|
|
373
373
|
}
|
|
374
374
|
get el() { return getElement(this); }
|
|
375
375
|
static get watchers() { return {
|
|
@@ -16,16 +16,16 @@ const ZonosBadge = class {
|
|
|
16
16
|
this.rounded = false;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '01a64861017098d6cdfa94b46ee675660147c45d', class: classes(['zonos--elements zonos--badge']), style: {
|
|
20
20
|
'--font-family': zonosStoreFontFamily(),
|
|
21
|
-
} }, h("div", { key: '
|
|
21
|
+
} }, h("div", { key: 'ef736fdfe0352ea201ecb34cbec695d90cfe4e5f', class: classes([
|
|
22
22
|
'zonos--badge-content',
|
|
23
23
|
this.badgeColor,
|
|
24
24
|
this.rounded && 'rounded',
|
|
25
25
|
this.iconRight && 'icon-right',
|
|
26
26
|
this.size,
|
|
27
27
|
this.bold && 'bold',
|
|
28
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
28
|
+
]) }, this.icon, h("zonos-text", { key: '941793bf2ee10ad47bc5263f1bc2cbf6637d8bcd' }, h("slot", { key: '11da2ba6d11f451ecb71b1b2eb9ae29a009f8418' })))));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
ZonosBadge.style = ZonosBadgeStyle0;
|
|
@@ -41,10 +41,10 @@ const ZonosTooltip = class {
|
|
|
41
41
|
this.showTooltip = false;
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '20c737a7dd6aae9b2b7aa1a293dd891cc618dfbb', class: "zonos--elements" }, h("div", { key: '09aefcda610b6536a10b0a325c2b460d2f5a2976', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '4191e0e3297b1c5ff625ee965773d026a970db68' }), h("div", { key: 'f4a4455f57ad9e03a6bf3d4309999480caa077f4', class: classes([
|
|
45
45
|
this.showTooltip && 'zonos--show-tooltip',
|
|
46
46
|
'zonos--tooltip-content',
|
|
47
|
-
]) }, h("zonos-text", { key: '
|
|
47
|
+
]) }, h("zonos-text", { key: '36d1afd592d1e83cf325bb64bef2ff94cd6f5adb', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '8e9562f0cb35a53e32dd39cabf22cc26a1e07d47', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
ZonosTooltip.style = ZonosTooltipStyle0;
|
|
@@ -96,12 +96,12 @@ const ZonosButton = class {
|
|
|
96
96
|
const spinnerColor = backgroundActualColor && isDarkColor(backgroundActualColor)
|
|
97
97
|
? 'white'
|
|
98
98
|
: 'black';
|
|
99
|
-
return (h(Host, { key: '
|
|
99
|
+
return (h(Host, { key: '5f6e507c51fe1b02bbc14ff2bea2267ced9f8053', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
100
100
|
'--background-color': overrideBackground,
|
|
101
101
|
'--border-radius': borderStyle,
|
|
102
102
|
'--color': color,
|
|
103
103
|
'--font-family': zonosStoreFontFamily(),
|
|
104
|
-
}) }, h("button", { key: '
|
|
104
|
+
}) }, h("button", { key: 'f464fef0f48e4e8fbfec844c8f4e3e6c525c70fd', class: classes([
|
|
105
105
|
this.hasIcon && 'has-icon',
|
|
106
106
|
this.hasContent && 'has-content',
|
|
107
107
|
this.noBackground && 'no-background',
|
|
@@ -114,7 +114,7 @@ const ZonosButton = class {
|
|
|
114
114
|
overrideBackground &&
|
|
115
115
|
variant === 'standard' &&
|
|
116
116
|
'override-background',
|
|
117
|
-
]), disabled: disabled }, this.loading && (h("div", { key: '
|
|
117
|
+
]), disabled: disabled }, this.loading && (h("div", { key: '9fafd9c3c4764df1b9e268f6784b75fdfe21f9a7', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: '5a2acbea7bbf41d76ce262f073f78e9f966dddc9', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '29982e7b98f8e9940f20916513434b5b1125c93a', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
118
118
|
}
|
|
119
119
|
get ele() { return getElement(this); }
|
|
120
120
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-0e31d804.js';
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import {
|
|
4
|
+
import { G as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-10bcd2e0.js';
|
|
5
5
|
import { l as languages } from './ILanguage-97790bee.js';
|
|
6
6
|
import './isDarkColor-7a6d2d14.js';
|
|
7
7
|
import './getBorderRadius-8129b0cb.js';
|
|
@@ -20,12 +20,12 @@ const ZonosCard = class {
|
|
|
20
20
|
this.spacing = '24px';
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: 'e45c790b27e1991c005156ad6e53b1c8754d4dc5', style: {
|
|
24
24
|
'--font-family': zonosStoreFontFamily(),
|
|
25
|
-
} }, h("div", { key: '
|
|
25
|
+
} }, h("div", { key: 'efb85ca20d87be834dfe8dd0a80ba590e34480f3', class: classes(['styled-card']), style: { padding: this.spacing } }, this.label && (h("header", { key: 'edf7aa372e011fc76b14628b7a850fbb4577040e', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: 'ed7202d01519374129dc9f20f4c0914f2af311f8', type: "subheader" }, this.label), h("h-stack", { key: 'f3d041b3a96cfd5df4395efb7cbc958fb4ff3140', spacing: 8 }, this.actions))), h("slot", { key: '5957af957d0f2b1d9974dee154d050089dee574b' }), (this.footerActions || this.footerContent) && (h("footer", { key: '723c690483ebbe294c132fe39482180051bb7b8e', class: "card-footer", style: {
|
|
26
26
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
27
27
|
padding: this.spacing,
|
|
28
|
-
} }, h("div", { key: '
|
|
28
|
+
} }, h("div", { key: '12a11f8192e9bdd95afd52a7b58ad99b6300c830' }, this.footerContent), h("h-stack", { key: '60cb2397fbe8f81a4248ab0581380ba125d08797', spacing: 8 }, this.footerActions))))));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
ZonosCard.style = ZonosCardStyle0;
|
|
@@ -51,9 +51,9 @@ const ZonosLanguageSelect = class {
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
const { selectedLocale } = localizationStore;
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '5ccbe14cb452d09ae6bc2fb607f745397d94f55e', class: "zonos--elements", style: {
|
|
55
55
|
'--font-family': zonosStoreFontFamily(),
|
|
56
|
-
} }, h("div", { key: '
|
|
56
|
+
} }, h("div", { key: '9679284a648e7fa09bbdcba7f2d7b6665134772b', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '15f1b2497a2808c2df25611ec33d2f4dc4ba8586', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'f072ae8c34af9d218f8975cbead1123a1b449e62', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-0e31d804.js';
|
|
2
|
-
import { f as cartStore, t as translate,
|
|
2
|
+
import { f as cartStore, t as translate, u as handleFetch, r as stripeStoreReset, k as stripeStore, D as stripeStoreRetrievePayment, l as localizationStore, E as cartStoreUpdateSelectedShippingOption, F as cartStoreGetShippingTransitInfo } from './cart-10bcd2e0.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
|
|
4
|
-
import { t as trackConversionEvent, s as submitGtag, c as createCustomEvent } from './submitGtag-
|
|
4
|
+
import { t as trackConversionEvent, s as submitGtag, c as createCustomEvent } from './submitGtag-84886899.js';
|
|
5
5
|
import { g as getBorderRadius } from './getBorderRadius-8129b0cb.js';
|
|
6
|
-
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-
|
|
6
|
+
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-8642e94a.js';
|
|
7
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
8
8
|
import { l as languages } from './ILanguage-97790bee.js';
|
|
9
9
|
import { t as tinycolor, i as isDarkColor } from './isDarkColor-7a6d2d14.js';
|
|
@@ -300,47 +300,50 @@ const ZonosCheckoutFooter = class {
|
|
|
300
300
|
};
|
|
301
301
|
ZonosCheckoutFooter.style = ZonosCheckoutFooterStyle0;
|
|
302
302
|
|
|
303
|
-
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}";
|
|
303
|
+
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-16)}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}";
|
|
304
304
|
const ZonosCheckoutPaymentStyle0 = zonosCheckoutPaymentCss;
|
|
305
305
|
|
|
306
306
|
const ZonosCheckoutPayment = class {
|
|
307
307
|
constructor(hostRef) {
|
|
308
308
|
registerInstance(this, hostRef);
|
|
309
309
|
this.continueClicked = createEvent(this, "continueClicked", 7);
|
|
310
|
+
this.handleValidate = () => {
|
|
311
|
+
var _a;
|
|
312
|
+
return !!((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
313
|
+
};
|
|
310
314
|
/**
|
|
311
315
|
* handler for continue button click
|
|
312
316
|
*/
|
|
313
317
|
this.continueClickHandler = () => {
|
|
318
|
+
if (!this.handleValidate()) {
|
|
319
|
+
this.showErrorBanner = true;
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
314
322
|
this.continueClicked.emit();
|
|
323
|
+
// submit google tag when the form is complete
|
|
324
|
+
submitGtag('zonos-checkout-payment-info');
|
|
315
325
|
};
|
|
316
326
|
this.paymentError = false;
|
|
317
327
|
this.submitBtnType = undefined;
|
|
318
328
|
this.continueLoading = false;
|
|
319
329
|
this.submitBtnColor = undefined;
|
|
320
|
-
this.
|
|
321
|
-
}
|
|
322
|
-
watchFormComplete() {
|
|
323
|
-
if (!this.disabled) {
|
|
324
|
-
// submit google tag when the form is complete
|
|
325
|
-
submitGtag('zonos-checkout-payment-info');
|
|
326
|
-
}
|
|
330
|
+
this.showErrorBanner = false;
|
|
327
331
|
}
|
|
328
332
|
render() {
|
|
329
|
-
var _a;
|
|
330
333
|
if (!stripeStore.stripeElements) {
|
|
331
334
|
return null;
|
|
332
335
|
}
|
|
333
|
-
|
|
334
|
-
|
|
336
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
337
|
+
if (this.showErrorBanner) {
|
|
338
|
+
this.showErrorBanner = !this.handleValidate();
|
|
339
|
+
}
|
|
340
|
+
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
335
341
|
// use primary type when on mobile mode
|
|
336
342
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
337
343
|
amount: cartStore.total,
|
|
338
344
|
currency: cartStore.currency,
|
|
339
345
|
}))))));
|
|
340
346
|
}
|
|
341
|
-
static get watchers() { return {
|
|
342
|
-
"disabled": ["watchFormComplete"]
|
|
343
|
-
}; }
|
|
344
347
|
};
|
|
345
348
|
ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
|
|
346
349
|
|
|
@@ -364,7 +367,7 @@ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none
|
|
|
364
367
|
</svg>
|
|
365
368
|
`;
|
|
366
369
|
|
|
367
|
-
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
370
|
+
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
368
371
|
const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
|
|
369
372
|
|
|
370
373
|
const ZonosCheckoutProgressTabs = class {
|
|
@@ -424,24 +427,24 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
424
427
|
color: labelSelectedColor,
|
|
425
428
|
})
|
|
426
429
|
: labelSelectedColor;
|
|
427
|
-
return (h(Host, { key: '
|
|
430
|
+
return (h(Host, { key: '419ccd73b029f2bbb92824f9398249d69cfd22aa', class: "zonos--elements", style: {
|
|
428
431
|
'--color': contrastLabelColor,
|
|
429
432
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
430
|
-
} }, h("div", { key: '
|
|
433
|
+
} }, h("div", { key: '2dccf47e6211a6d25f2f8a4ece84c2759d06dc5a', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
431
434
|
const isSelected = tab.value === selectedStep;
|
|
432
435
|
return (h("button", { class: classes([
|
|
433
436
|
'zonos--tab-item',
|
|
434
437
|
tab.value === selectedStep && 'selected',
|
|
435
438
|
tab.isDone && 'done',
|
|
436
439
|
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, translate(tab.label))));
|
|
437
|
-
})), h("div", { key: '
|
|
440
|
+
})), h("div", { key: '8f70a570e14fe00d855081a5a00607cdbbe87f1b', class: "zonos--tab-progress" }, h("div", { key: '85dd90b7a571ee92035bc6a03ce1d97af85e1e0d', class: "zonos--progress-bar-fill" }))));
|
|
438
441
|
}
|
|
439
442
|
static get assetsDirs() { return ["assets"]; }
|
|
440
443
|
get ele() { return getElement(this); }
|
|
441
444
|
};
|
|
442
445
|
ZonosCheckoutProgressTabs.style = ZonosCheckoutProgressTabsStyle0;
|
|
443
446
|
|
|
444
|
-
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:var(--amino-space-8);margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
447
|
+
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:var(--amino-space-8);margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
445
448
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
446
449
|
|
|
447
450
|
const ZonosCustomerInfo = class {
|
|
@@ -463,49 +466,64 @@ const ZonosCustomerInfo = class {
|
|
|
463
466
|
}
|
|
464
467
|
return;
|
|
465
468
|
}
|
|
469
|
+
if (!this.handleValidate()) {
|
|
470
|
+
// scroll to the top zonos-banner
|
|
471
|
+
setTimeout(() => {
|
|
472
|
+
var _a;
|
|
473
|
+
(_a = this.el
|
|
474
|
+
.querySelector('zonos-banner.zonos--error-banner')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
475
|
+
behavior: 'smooth',
|
|
476
|
+
block: 'center',
|
|
477
|
+
});
|
|
478
|
+
}, 50);
|
|
479
|
+
this.showErrorBanner = true;
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
this.showErrorBanner = false;
|
|
466
483
|
this.continueClicked.emit();
|
|
484
|
+
// submit google tag when the form is complete
|
|
485
|
+
submitGtag('zonos-checkout-customer-info');
|
|
486
|
+
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
487
|
+
};
|
|
488
|
+
this.handleValidate = () => {
|
|
489
|
+
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
490
|
+
const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
|
|
491
|
+
const stripeLinkEventData = stripeStore.stripeLinkEventData;
|
|
492
|
+
// if the shipping is different from billing, we need to make sure the billing address is valid and disable the button if it's not
|
|
493
|
+
const isValidBilling = stripeStore.stripeShippingSameAsBilling
|
|
494
|
+
? !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete)
|
|
495
|
+
: !!(stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.complete);
|
|
496
|
+
const isValidShipping = !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete);
|
|
497
|
+
const isValidLink = !!(stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.complete);
|
|
498
|
+
if (!isValidBilling || !isValidShipping || !isValidLink) {
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
return true;
|
|
467
502
|
};
|
|
468
503
|
this.continueLoading = false;
|
|
469
504
|
this.submitBtnType = undefined;
|
|
470
505
|
this.submitBtnColor = undefined;
|
|
471
506
|
this.defaultAddress = null;
|
|
472
|
-
this.
|
|
507
|
+
this.showErrorBanner = false;
|
|
473
508
|
this.hasInvalidShippingCharacters = false;
|
|
474
509
|
this.hasInvalidBillingCharacters = false;
|
|
475
510
|
}
|
|
476
|
-
watchFormComplete() {
|
|
477
|
-
if (!this.disabled) {
|
|
478
|
-
// submit google tag when the form is complete
|
|
479
|
-
submitGtag('zonos-checkout-customer-info');
|
|
480
|
-
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
511
|
render() {
|
|
484
512
|
if (!stripeStore.stripeElements) {
|
|
485
513
|
return null;
|
|
486
514
|
}
|
|
487
|
-
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
488
|
-
const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
|
|
489
|
-
const stripeLinkEventData = stripeStore.stripeLinkEventData;
|
|
490
|
-
// if the shipping is different from billing, we need to make sure the billing address is valid and disable the button if it's not
|
|
491
|
-
const isValidBilling = stripeStore.stripeShippingSameAsBilling
|
|
492
|
-
? !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete)
|
|
493
|
-
: !!(stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.complete);
|
|
494
|
-
const isValidShipping = !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete);
|
|
495
|
-
const isValidLink = !!(stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.complete);
|
|
496
|
-
// make sure data is valid
|
|
497
|
-
this.disabled = !isValidBilling || !isValidShipping || !isValidLink;
|
|
498
515
|
const showBilling = !stripeStore.stripeShippingSameAsBilling;
|
|
499
|
-
|
|
516
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
517
|
+
if (this.showErrorBanner) {
|
|
518
|
+
this.showErrorBanner = !this.handleValidate();
|
|
519
|
+
}
|
|
520
|
+
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidShippingCharacters = e.detail), titleText: translate('Address'), type: "shipping" }), h("zonos-checkbox", { isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
500
521
|
stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
501
|
-
} }), h("zonos-collapse", { collapsed: !showBilling }, h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidBillingCharacters = e.detail), titleText: translate('Billing address'), type: "billing" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor,
|
|
522
|
+
} }), h("zonos-collapse", { collapsed: !showBilling }, h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidBillingCharacters = e.detail), titleText: translate('Billing address'), type: "billing" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
502
523
|
// use primary type when on mobile mode
|
|
503
524
|
variant: this.submitBtnType }, translate('Continue to shipping'))))));
|
|
504
525
|
}
|
|
505
526
|
get el() { return getElement(this); }
|
|
506
|
-
static get watchers() { return {
|
|
507
|
-
"disabled": ["watchFormComplete"]
|
|
508
|
-
}; }
|
|
509
527
|
};
|
|
510
528
|
ZonosCustomerInfo.style = ZonosCustomerInfoStyle0;
|
|
511
529
|
|
|
@@ -558,7 +576,7 @@ const ZonosDialog = class {
|
|
|
558
576
|
document.body.style.overflow = 'auto';
|
|
559
577
|
}
|
|
560
578
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
561
|
-
return (h(Host, { key: '
|
|
579
|
+
return (h(Host, { key: 'c97c24de2950d418d1aec4738ea6152e24f8049a', class: classes([
|
|
562
580
|
'zonos--elements',
|
|
563
581
|
this.open && 'open',
|
|
564
582
|
this.isLoading && 'is-loading',
|
|
@@ -569,10 +587,10 @@ const ZonosDialog = class {
|
|
|
569
587
|
'--font-family': zonosStoreFontFamily(),
|
|
570
588
|
'--height': this.height || 'initial',
|
|
571
589
|
'--width': this.width,
|
|
572
|
-
} }, h("div", { key: '
|
|
590
|
+
} }, h("div", { key: 'd8053eb085edd344a5c667123515932a759ee4df', class: "zonos--backdrop" }), h("div", { key: '15f11f85257160698f7850495f3d8866dfd46346', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: '6cb8ab8555511cfdbb502ecdb7b796894ff9b0df', class: "zonos--dialog" }, this.isLoading && (h("div", { key: '7dc1c154cda561aca93c0b3f09bf1c8f9d01446b', class: "zonos--loading" }, h("zonos-spinner", { key: '71701888d4320b35f43934a425a6e44653c84e62', size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { key: '5e9ea325a80cefc212c4375dec076d4a703d3bbb', class: "zonos--header" }, this.headerText && (h("h3", { key: '6372813c8c79c0c4a09cca96bf85749ce32a43fb', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: '00d2f9393acec2da88794977cf6cfd4308fffb31', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: '71177d6272533d34143f50d2ebce277b3cb6a6db', class: classes([
|
|
573
591
|
'zonos--body',
|
|
574
592
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
575
|
-
]) }, h("slot", { key: '
|
|
593
|
+
]) }, h("slot", { key: 'ae388c5f9d7a250e0f829313acc561aea9ba1468' })), h("slot", { key: '202816af31727db4a92af8f63daeb34992ac5504', name: "dialog-footer" })))));
|
|
576
594
|
}
|
|
577
595
|
static get assetsDirs() { return ["assets"]; }
|
|
578
596
|
};
|
|
@@ -626,7 +644,7 @@ const ZonosReview = class {
|
|
|
626
644
|
};
|
|
627
645
|
ZonosReview.style = ZonosReviewStyle0;
|
|
628
646
|
|
|
629
|
-
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
647
|
+
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
630
648
|
const ZonosShippingStyle0 = zonosShippingCss;
|
|
631
649
|
|
|
632
650
|
const ZonosShipping = class {
|
|
@@ -650,13 +668,27 @@ const ZonosShipping = class {
|
|
|
650
668
|
return;
|
|
651
669
|
}
|
|
652
670
|
this.isSelecting = false;
|
|
653
|
-
|
|
671
|
+
};
|
|
672
|
+
this.handleValidate = () => {
|
|
673
|
+
return !!this.selectedShippingMethod;
|
|
654
674
|
};
|
|
655
675
|
/**
|
|
656
676
|
* handler for continue button click
|
|
657
677
|
*/
|
|
658
678
|
this.continueClickHandler = () => {
|
|
679
|
+
var _a;
|
|
680
|
+
// show error banner if the form is not complete
|
|
681
|
+
if (!this.handleValidate()) {
|
|
682
|
+
this.showErrorBanner = true;
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
this.showErrorBanner = false;
|
|
659
686
|
this.continueClicked.emit();
|
|
687
|
+
// submit google tag when the form is complete
|
|
688
|
+
submitGtag('zonos-checkout-shipping-info');
|
|
689
|
+
void trackConversionEvent('checkout_shippingInfoCompleted', {
|
|
690
|
+
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
691
|
+
});
|
|
660
692
|
};
|
|
661
693
|
this.initServiceLevels = () => {
|
|
662
694
|
var _a;
|
|
@@ -688,37 +720,26 @@ const ZonosShipping = class {
|
|
|
688
720
|
this.submitBtnType = undefined;
|
|
689
721
|
this.selectedShippingMethod = null;
|
|
690
722
|
this.isSelecting = false;
|
|
691
|
-
this.
|
|
723
|
+
this.showErrorBanner = false;
|
|
692
724
|
this.serviceLevels = [];
|
|
693
725
|
}
|
|
694
|
-
watchFormComplete() {
|
|
695
|
-
var _a;
|
|
696
|
-
if (!this.disabled) {
|
|
697
|
-
// submit google tag when the form is complete
|
|
698
|
-
submitGtag('zonos-checkout-shipping-info');
|
|
699
|
-
void trackConversionEvent('checkout_shippingInfoCompleted', {
|
|
700
|
-
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
701
|
-
});
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
726
|
componentWillLoad() {
|
|
705
727
|
this.initServiceLevels();
|
|
706
728
|
const selectedServiceLevel = this.serviceLevels.find(item => { var _a; return item.value === ((_a = cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
|
|
707
729
|
if (selectedServiceLevel) {
|
|
708
730
|
this.selectedShippingMethod = selectedServiceLevel;
|
|
709
731
|
}
|
|
710
|
-
// enable continue button if there is a selected shipping option
|
|
711
|
-
this.disabled = !selectedServiceLevel;
|
|
712
732
|
}
|
|
713
733
|
render() {
|
|
714
|
-
var _a, _b;
|
|
715
|
-
|
|
734
|
+
var _a, _b, _c;
|
|
735
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
736
|
+
if (this.showErrorBanner) {
|
|
737
|
+
this.showErrorBanner = !this.handleValidate();
|
|
738
|
+
}
|
|
739
|
+
return (h(Host, { key: 'f46a224f05bd6a5b762e7b4a9130c809fa1806d9', class: "zonos--shipping zonos--elements" }, h("div", { key: '07dceedd0abb2c794c8f4b7c70d51f84eb76f82f', class: "zonos--group" }, h("zonos-text", { key: 'e9aec3b541e90bca19218f5444b2a1282c1fade2', class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) && (h("zonos-banner", { key: 'df955af5f7318a0146d72aae0d5292a5455c16d9', class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { key: 'eacb6cc1936ac9a70f32deca90fa88efd9d560bd', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !((_b = this.serviceLevels) === null || _b === void 0 ? void 0 : _b.length) ? (h("zonos-banner", { bannerTitle: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), intent: "error" })) : (h("zonos-shipping-rich-radio", { initialSelectedValue: (_c = this.selectedShippingMethod) === null || _c === void 0 ? void 0 : _c.value, items: this.serviceLevels, onRadioSelected: e => this.handleRadioSelected(e) })), h("div", { key: '37aed76bf80c937ed9dddbefb7f6417bf1322a89', class: "zonos--group-btn" }, h("zonos-button", { key: '09a5e1986f6d39ece56a0ea9b47324f81e4c3d84', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
716
740
|
// use primary type when on mobile mode
|
|
717
741
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
718
742
|
}
|
|
719
|
-
static get watchers() { return {
|
|
720
|
-
"disabled": ["watchFormComplete"]
|
|
721
|
-
}; }
|
|
722
743
|
};
|
|
723
744
|
ZonosShipping.style = ZonosShippingStyle0;
|
|
724
745
|
|