@zonos/elements 1.3.12-alpha.0 → 1.3.12-alpha.10
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-fcddc0e6.js → cart-37e23be9.js} +739 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sendErrorLog-7b3d82e4.js +29 -0
- package/dist/cjs/{submitGtag-ec6ead54.js → submitGtag-d0718b63.js} +1 -20
- package/dist/cjs/zonos-address_4.cjs.entry.js +46 -18
- package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +8 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +7 -7
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +90 -26
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/assets/importIcon.svg +4 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +85 -25
- package/dist/collection/components/store/translationStore/strings.arabic.js +36 -0
- package/dist/collection/components/store/translationStore/strings.base.js +36 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +36 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +36 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +36 -0
- package/dist/collection/components/store/translationStore/strings.french.js +36 -0
- package/dist/collection/components/store/translationStore/strings.german.js +36 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +36 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +36 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +36 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +36 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +36 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +36 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +36 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +36 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +36 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +36 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +36 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +36 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +36 -0
- package/dist/collection/components/store/translationStore.js +19 -3
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +41 -15
- package/dist/collection/components/utils/containsNonLatinChars.js +5 -1
- package/dist/collection/components/utils/logging/getNavigatorConnection.js +16 -0
- package/dist/collection/components/utils/logging/sendLoadScriptLog.js +16 -0
- package/dist/collection/types/LogLoadScriptRequestBody.js +1 -0
- package/dist/collection/types/generated/graphql.customer.types.js +64 -14
- package/dist/collection/types/generated/graphql.frontend.types.js +4 -0
- package/dist/components/sendErrorLog.js +21 -0
- package/dist/components/stripe.js +740 -4
- package/dist/components/trackConversionEvent.js +1 -1
- package/dist/components/zonos-address2.js +46 -16
- package/dist/components/zonos-checkout-finish2.js +3 -20
- package/dist/components/zonos-checkout.js +3 -2
- package/dist/components/zonos-controller.js +1 -1
- package/dist/components/zonos-hello-dialog2.js +89 -25
- package/dist/components/zonos-hello.js +1 -1
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/esm/{cart-228e1ef7.js → cart-7961927b.js} +739 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sendErrorLog-4d9581da.js +26 -0
- package/dist/esm/{submitGtag-c3727595.js → submitGtag-4c1f09dc.js} +2 -20
- package/dist/esm/zonos-address_4.entry.js +45 -17
- package/dist/esm/zonos-card_2.entry.js +1 -1
- package/dist/esm/zonos-cart-items_10.entry.js +3 -3
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +1 -1
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +90 -26
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/cart-7961927b.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/sendErrorLog-4d9581da.js +1 -0
- package/dist/esm-es5/submitGtag-4c1f09dc.js +1 -0
- package/dist/esm-es5/zonos-address_4.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-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-payment.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/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +36 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +36 -0
- package/dist/types/components/store/translationStore.d.ts +24 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +7 -1
- package/dist/types/components/utils/api/getCountryLandedCost.d.ts +10 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/logging/getNavigatorConnection.d.ts +8 -0
- package/dist/types/components/utils/logging/sendLoadScriptLog.d.ts +4 -0
- package/dist/types/types/LogLoadScriptRequestBody.d.ts +12 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +91 -18
- package/dist/types/types/generated/graphql.customer.types.ts +132 -22
- package/dist/types/types/generated/graphql.frontend.types.d.ts +13 -3
- package/dist/types/types/generated/graphql.frontend.types.ts +23 -3
- package/dist/types/types/global.d.ts +1 -2
- package/dist/zonos-elements/assets/importIcon.svg +4 -0
- package/dist/zonos-elements/p-0bdac452.system.js +1 -0
- package/dist/zonos-elements/p-0c5d3595.js +1 -0
- package/dist/zonos-elements/{p-5d5c0fbf.entry.js → p-2191b884.entry.js} +1 -1
- package/dist/zonos-elements/{p-0082c5be.system.entry.js → p-2da8e12a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-67ff446b.system.entry.js → p-339c505b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ac5aecca.entry.js → p-33f5634a.entry.js} +1 -1
- package/dist/zonos-elements/{p-5f662cf2.entry.js → p-3eb402c8.entry.js} +1 -1
- package/dist/zonos-elements/p-431648d8.system.entry.js +1 -0
- package/dist/zonos-elements/p-44842b39.system.entry.js +1 -0
- package/dist/zonos-elements/{p-14a2824f.entry.js → p-44f4dd4b.entry.js} +1 -1
- package/dist/zonos-elements/{p-35c328ba.system.entry.js → p-4b3923d2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-30cd191f.entry.js → p-4eba3abe.entry.js} +1 -1
- package/dist/zonos-elements/p-5a3ceb49.entry.js +1 -0
- package/dist/zonos-elements/p-63775f6d.js +1 -0
- package/dist/zonos-elements/p-6e81adba.system.js +1 -1
- package/dist/zonos-elements/{p-5f6f0581.system.entry.js → p-7efb9c12.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5dbb80df.system.entry.js → p-8eb876e8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a6c9c505.system.js +1 -0
- package/dist/zonos-elements/{p-c815e8b4.system.entry.js → p-bdb72353.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-499d7f5d.system.entry.js → p-d6aa3011.system.entry.js} +1 -1
- package/dist/zonos-elements/p-dd4f3724.system.js +1 -0
- package/dist/zonos-elements/{p-925ae524.entry.js → p-e1796e2a.entry.js} +1 -1
- package/dist/zonos-elements/{p-db1adc42.entry.js → p-e4919505.entry.js} +1 -1
- package/dist/zonos-elements/p-e4be7bd8.js +1 -0
- package/dist/zonos-elements/{p-7ff3a533.system.entry.js → p-e5fd850c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e90e2126.entry.js +1 -0
- package/dist/zonos-elements/{p-11f1b5fb.entry.js → p-f0b5d2fb.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/isCheckoutMobile-f491ca7c.js +0 -8
- package/dist/esm/isCheckoutMobile-8846dccb.js +0 -6
- package/dist/esm-es5/cart-228e1ef7.js +0 -1
- package/dist/esm-es5/isCheckoutMobile-8846dccb.js +0 -1
- package/dist/esm-es5/submitGtag-c3727595.js +0 -1
- package/dist/zonos-elements/p-397d8268.entry.js +0 -1
- package/dist/zonos-elements/p-55940b5a.system.entry.js +0 -1
- package/dist/zonos-elements/p-770e5b9e.js +0 -1
- package/dist/zonos-elements/p-81a54668.js +0 -1
- package/dist/zonos-elements/p-93dafeea.system.entry.js +0 -1
- package/dist/zonos-elements/p-94bbf247.system.js +0 -1
- package/dist/zonos-elements/p-960e4021.system.js +0 -1
- package/dist/zonos-elements/p-aed0098c.system.js +0 -1
- package/dist/zonos-elements/p-d11b2449.js +0 -1
- package/dist/zonos-elements/p-d31e5fcc.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],"
|
|
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],"disabled":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]},null,{"disabled":["watchFormComplete"]}],[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"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"disabled":[32],"serviceLevels":[32]},null,{"disabled":["watchFormComplete"]}],[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 };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { r as handleFetch } from './cart-7961927b.js';
|
|
2
|
+
|
|
3
|
+
const checkoutBreakpoint = 890;
|
|
4
|
+
const isCheckoutMobile = (isMobile) => {
|
|
5
|
+
return isMobile || window.innerWidth < checkoutBreakpoint;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const sendErrorLog = async ({ endpoint, errors, metadata }) => {
|
|
9
|
+
const userAgentData = 'userAgentData' in window.navigator
|
|
10
|
+
? // userAgentData is not yet supported in all browsers
|
|
11
|
+
window.navigator.userAgentData
|
|
12
|
+
: null;
|
|
13
|
+
const errorObject = {
|
|
14
|
+
endpoint,
|
|
15
|
+
errors,
|
|
16
|
+
metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
17
|
+
? userAgentData
|
|
18
|
+
: window.navigator.userAgent }, metadata),
|
|
19
|
+
};
|
|
20
|
+
void handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
|
|
21
|
+
body: errorObject,
|
|
22
|
+
method: 'POST',
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { isCheckoutMobile as i, sendErrorLog as s };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as handleFetch, l as localizationStore, a as log } from './cart-
|
|
1
|
+
import { r as handleFetch, l as localizationStore, a as log } from './cart-7961927b.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-c4c45591.js';
|
|
3
3
|
|
|
4
4
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
@@ -36,24 +36,6 @@ const createCustomEvent = (eventName, detail) => {
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
const sendErrorLog = async ({ endpoint, errors, metadata }) => {
|
|
40
|
-
const userAgentData = 'userAgentData' in window.navigator
|
|
41
|
-
? // userAgentData is not yet supported in all browsers
|
|
42
|
-
window.navigator.userAgentData
|
|
43
|
-
: null;
|
|
44
|
-
const errorObject = {
|
|
45
|
-
endpoint,
|
|
46
|
-
errors,
|
|
47
|
-
metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
48
|
-
? userAgentData
|
|
49
|
-
: window.navigator.userAgent }, metadata),
|
|
50
|
-
};
|
|
51
|
-
void handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
|
|
52
|
-
body: errorObject,
|
|
53
|
-
method: 'POST',
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
|
|
57
39
|
/**
|
|
58
40
|
* Submit a gtag event if the gtag function is available.
|
|
59
41
|
*/
|
|
@@ -69,4 +51,4 @@ const submitGtag = (event) => {
|
|
|
69
51
|
}
|
|
70
52
|
};
|
|
71
53
|
|
|
72
|
-
export {
|
|
54
|
+
export { createCustomEvent as c, submitGtag as s, trackConversionEvent as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { j as stripeStore, d as logError, l as localizationStore, t as translate, n as stripeStorePrefetchLandedCost } from './cart-
|
|
2
|
+
import { j as stripeStore, d as logError, l as localizationStore, t as translate, n as stripeStorePrefetchLandedCost } from './cart-7961927b.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
|
-
import { i as isCheckoutMobile } from './
|
|
4
|
+
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-4d9581da.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-a89e45fb.js';
|
|
7
7
|
import { i as isDarkColor } from './isDarkColor-6bf71e51.js';
|
|
@@ -11,18 +11,31 @@ import { i as isDarkColor } from './isDarkColor-6bf71e51.js';
|
|
|
11
11
|
* @returns an object with the same keys as the input object, and a boolean value indicating if the value contains non-latin characters
|
|
12
12
|
*/
|
|
13
13
|
const containsNonLatinChars = (params) => {
|
|
14
|
+
const specialCharacters = /[ʼˮ՚ߴߵ']{1}/u;
|
|
14
15
|
/**
|
|
15
16
|
* This regex matches any character that is not a latin character, punctuation, symbol, number, separator, control, or mark
|
|
16
17
|
* I limited the character found to 1 in the regex, so that we can return early if we find any non-latin character
|
|
17
18
|
**/
|
|
18
19
|
const nonLatinRegex = /[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;
|
|
19
|
-
const nonLatinValueList = Object.entries(params).reduce((prev, [key, value]) => nonLatinRegex.test(value)
|
|
20
|
+
const nonLatinValueList = Object.entries(params).reduce((prev, [key, value]) => nonLatinRegex.test(value) &&
|
|
21
|
+
// allow special characters like web apostrophe and quotation mark
|
|
22
|
+
!specialCharacters.test(value)
|
|
23
|
+
? Object.assign(Object.assign({}, prev), { [key]: true }) : prev, {});
|
|
20
24
|
return nonLatinValueList;
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:var(--amino-space-8)}";
|
|
24
28
|
const ZonosAddressStyle0 = zonosAddressCss;
|
|
25
29
|
|
|
30
|
+
const mappedFields = {
|
|
31
|
+
city: 'City',
|
|
32
|
+
country: 'Country',
|
|
33
|
+
line1: 'Address line 1',
|
|
34
|
+
line2: 'Address line 2',
|
|
35
|
+
name: 'Name',
|
|
36
|
+
postal_code: 'Postal code',
|
|
37
|
+
state: 'State',
|
|
38
|
+
};
|
|
26
39
|
const ZonosAddress = class {
|
|
27
40
|
constructor(hostRef) {
|
|
28
41
|
registerInstance(this, hostRef);
|
|
@@ -31,7 +44,8 @@ const ZonosAddress = class {
|
|
|
31
44
|
this.titleText = undefined;
|
|
32
45
|
this.defaultAddress = null;
|
|
33
46
|
this.stripe = window.Zonos.stripe;
|
|
34
|
-
this.
|
|
47
|
+
this.reportedInvalidCharacters = false;
|
|
48
|
+
this.invalidCharacterList = null;
|
|
35
49
|
this.isDirtyAddress = false;
|
|
36
50
|
}
|
|
37
51
|
getStripeAddressInstance() {
|
|
@@ -57,13 +71,9 @@ const ZonosAddress = class {
|
|
|
57
71
|
stripeStore.stripeAddressEventData = event;
|
|
58
72
|
break;
|
|
59
73
|
}
|
|
60
|
-
const
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
if (hasInvalidCharacters) {
|
|
64
|
-
// no need to prefetch landed cost if the address contains invalid characters
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
74
|
+
const invalidCharacterList = this.checkInvalidCharacters(event);
|
|
75
|
+
this.invalidCharacterList = invalidCharacterList;
|
|
76
|
+
this.invalidCharacters.emit(!!invalidCharacterList);
|
|
67
77
|
}
|
|
68
78
|
updateAddressElement({ stripeAddressElement, type, }) {
|
|
69
79
|
if (type === 'shipping') {
|
|
@@ -76,7 +86,7 @@ const ZonosAddress = class {
|
|
|
76
86
|
// Do nothing if the allowed character sets is ALL or the address is incomplete
|
|
77
87
|
if (!address.complete ||
|
|
78
88
|
zonosStore.checkoutSettings.allowedCharacterSets === 'ALL') {
|
|
79
|
-
return
|
|
89
|
+
return null;
|
|
80
90
|
}
|
|
81
91
|
const { address: addressValue, firstName, lastName, name } = address.value;
|
|
82
92
|
const { city, country, line1, line2, postal_code, state } = addressValue;
|
|
@@ -89,11 +99,29 @@ const ZonosAddress = class {
|
|
|
89
99
|
postal_code,
|
|
90
100
|
state,
|
|
91
101
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
if (!Object.keys(invalidList).length) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
// send error event only once so we know what value is invalid
|
|
106
|
+
if (!this.reportedInvalidCharacters) {
|
|
107
|
+
this.reportedInvalidCharacters = true;
|
|
108
|
+
void sendErrorLog({
|
|
109
|
+
endpoint: 'NonLatinInput',
|
|
110
|
+
errors: Object.keys(invalidList).map(fieldName => {
|
|
111
|
+
var _a;
|
|
112
|
+
if (fieldName !== 'name') {
|
|
113
|
+
// trim all number so we don't send sensitive information
|
|
114
|
+
const trimmedAddress = (_a = addressValue[fieldName]) === null || _a === void 0 ? void 0 : _a.replace(/[\d\w]+/g, '');
|
|
115
|
+
return `Invalid character found ${fieldName}: "${trimmedAddress}"`;
|
|
116
|
+
}
|
|
117
|
+
const customerName = name || `${firstName} ${lastName}`;
|
|
118
|
+
const trimmedName = customerName.replace(/[\d\w]+/g, '');
|
|
119
|
+
return `Invalid character found ${fieldName}: "${trimmedName}"`;
|
|
120
|
+
}),
|
|
121
|
+
metadata: {},
|
|
122
|
+
});
|
|
95
123
|
}
|
|
96
|
-
return
|
|
124
|
+
return invalidList;
|
|
97
125
|
}
|
|
98
126
|
async watchInitStripe() {
|
|
99
127
|
var _a, _b;
|
|
@@ -192,7 +220,7 @@ const ZonosAddress = class {
|
|
|
192
220
|
}
|
|
193
221
|
render() {
|
|
194
222
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
195
|
-
return (h(Host, { key: '
|
|
223
|
+
return (h(Host, { key: 'b1ad2f6c9c23e6411bf1adccdd34b3aa4f5250b1', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '786a733a44925a670393b72bf0ae3db5ba59f9a1', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'b9d58cbc17abf5daf5d13ffdebc7485c3ac6457d', class: "zonos--address-component" }), this.invalidCharacterList && (h("zonos-banner", { 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)')}`)))))));
|
|
196
224
|
}
|
|
197
225
|
get el() { return getElement(this); }
|
|
198
226
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-dd40cc85.js';
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { F as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-
|
|
4
|
+
import { F as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-7961927b.js';
|
|
5
5
|
import { l as languages } from './ILanguage-97790bee.js';
|
|
6
6
|
import './isDarkColor-6bf71e51.js';
|
|
7
7
|
import './getBorderRadius-a89e45fb.js';
|
|
@@ -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-dd40cc85.js';
|
|
2
|
-
import { f as cartStore, t as translate, r as handleFetch, q as stripeStoreReset, j as stripeStore, C as stripeStoreRetrievePayment, l as localizationStore, D as cartStoreUpdateSelectedShippingOption, E as cartStoreGetShippingTransitInfo } from './cart-
|
|
2
|
+
import { f as cartStore, t as translate, r as handleFetch, q as stripeStoreReset, j as stripeStore, C as stripeStoreRetrievePayment, l as localizationStore, D as cartStoreUpdateSelectedShippingOption, E as cartStoreGetShippingTransitInfo } from './cart-7961927b.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
|
-
import { t as trackConversionEvent, s as
|
|
4
|
+
import { t as trackConversionEvent, s as submitGtag, c as createCustomEvent } from './submitGtag-4c1f09dc.js';
|
|
5
5
|
import { g as getBorderRadius } from './getBorderRadius-a89e45fb.js';
|
|
6
|
-
import { i as isCheckoutMobile } from './
|
|
6
|
+
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-4d9581da.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-6bf71e51.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, H as Host } from './index-dd40cc85.js';
|
|
2
|
-
import { l as localizationStore, a as log, s as stripeStoreGetDomesticShippingSession, b as localizationStoreUpdateSelectedCountryCode, c as stripeStoreCleanupDomesticShippingSession, d as logError, e as stripeStoreSaveDomesticShippingSession, i as initStripeElements, f as cartStore, g as cartStoreUpdateItems, h as cartStoreReset, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreUpdateToErrorState, n as stripeStorePrefetchLandedCost, o as cartStoreNextStep, p as stripeStoreConfirmPayment, q as stripeStoreReset
|
|
2
|
+
import { l as localizationStore, a as log, s as stripeStoreGetDomesticShippingSession, b as localizationStoreUpdateSelectedCountryCode, c as stripeStoreCleanupDomesticShippingSession, d as logError, e as stripeStoreSaveDomesticShippingSession, i as initStripeElements, f as cartStore, g as cartStoreUpdateItems, h as cartStoreReset, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreUpdateToErrorState, t as translate, n as stripeStorePrefetchLandedCost, o as cartStoreNextStep, p as stripeStoreConfirmPayment, q as stripeStoreReset } from './cart-7961927b.js';
|
|
3
3
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-c4c45591.js';
|
|
4
|
-
import { c as createCustomEvent, s as
|
|
5
|
-
import { i as isCheckoutMobile } from './
|
|
4
|
+
import { c as createCustomEvent, s as submitGtag, t as trackConversionEvent } from './submitGtag-4c1f09dc.js';
|
|
5
|
+
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-4d9581da.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-a89e45fb.js';
|
|
8
8
|
import { i as isDarkColor } from './isDarkColor-6bf71e51.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-dd40cc85.js';
|
|
2
|
-
import { r as handleFetch, d as logError, u as isValidSelector, a as log, j as stripeStore, v as initLocalizationStore, b as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { r as handleFetch, d as logError, u as isValidSelector, a as log, j as stripeStore, v as initLocalizationStore, b as localizationStoreUpdateSelectedCountryCode } from './cart-7961927b.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
4
|
import './isDarkColor-6bf71e51.js';
|
|
5
5
|
import './getBorderRadius-a89e45fb.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-7961927b.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './isDarkColor-6bf71e51.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { b as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-
|
|
2
|
+
import { b as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-7961927b.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-6bf71e51.js';
|
|
@@ -16,5 +16,5 @@ const patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
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],"
|
|
19
|
+
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],"disabled":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]},null,{"disabled":["watchFormComplete"]}],[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"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"disabled":[32],"serviceLevels":[32]},null,{"disabled":["watchFormComplete"]}],[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);
|
|
20
20
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-dd40cc85.js';
|
|
2
|
-
import { B as currencyFormat, l as localizationStore, t as translate } from './cart-
|
|
2
|
+
import { B as currencyFormat, l as localizationStore, t as translate } from './cart-7961927b.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-c4c45591.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
@@ -19,6 +19,12 @@ const BagIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xml
|
|
|
19
19
|
</svg>
|
|
20
20
|
`;
|
|
21
21
|
|
|
22
|
+
const ImportIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
23
|
+
<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>
|
|
24
|
+
<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>
|
|
25
|
+
</svg>
|
|
26
|
+
`;
|
|
27
|
+
|
|
22
28
|
const MessageIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
23
29
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>
|
|
24
30
|
</svg>
|
|
@@ -63,6 +69,81 @@ const ZonosHelloDialog = class {
|
|
|
63
69
|
this.setShowLanguageSelect = async (value) => {
|
|
64
70
|
this.showLanguageSelect = value;
|
|
65
71
|
};
|
|
72
|
+
this.getDutyMessage = () => {
|
|
73
|
+
const { countryLandedCost } = localizationStore;
|
|
74
|
+
// Our Robby API spells deminimis wrong here
|
|
75
|
+
const dutyDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.dutyDeminimus)
|
|
76
|
+
? currencyFormat(countryLandedCost.dutyDeminimus)
|
|
77
|
+
: null;
|
|
78
|
+
// If Canada, use 40 CAD (courier duty de minimis)
|
|
79
|
+
const dutyDeminimisToUse = localizationStore.selectedCountryCode === 'CA'
|
|
80
|
+
? currencyFormat(40)
|
|
81
|
+
: dutyDeminimis;
|
|
82
|
+
// If deminimis is undefined or null, assume it's $0
|
|
83
|
+
return dutyDeminimisToUse
|
|
84
|
+
? `${translate('Spend')} ${dutyDeminimisToUse} ${translate('duty free')}`
|
|
85
|
+
: translate('Duties will apply to all orders');
|
|
86
|
+
};
|
|
87
|
+
this.getTaxMessage = () => {
|
|
88
|
+
const { countryLandedCost } = localizationStore;
|
|
89
|
+
// Our Robby API spells deminimis wrong here
|
|
90
|
+
const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
|
|
91
|
+
? currencyFormat(countryLandedCost.vatTaxDeminimus)
|
|
92
|
+
: null;
|
|
93
|
+
// If Canada, use 150 CAD (courier tax de minimis)
|
|
94
|
+
const taxDeminimisToUse = localizationStore.selectedCountryCode === 'CA'
|
|
95
|
+
? currencyFormat(150)
|
|
96
|
+
: taxDeminimis;
|
|
97
|
+
return taxDeminimisToUse
|
|
98
|
+
? `${translate('Spend')} ${taxDeminimisToUse} ${translate('tax free')}`
|
|
99
|
+
: translate('Taxes will apply to all orders');
|
|
100
|
+
};
|
|
101
|
+
this.getUkDutyTaxMessage = (landedCost) => {
|
|
102
|
+
if (landedCost.allowLowValueOrders) {
|
|
103
|
+
// show nothing if low value orders are allowed
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
const dutyDeminimis = landedCost.dutyDeminimus;
|
|
107
|
+
return translate('Orders to ${countryName} must be over ${threshold} to ship.', {
|
|
108
|
+
countryName: 'United Kingdom',
|
|
109
|
+
threshold: currencyFormat(dutyDeminimis),
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
this.getAustraliaDutyTaxMessage = (landedCost) => {
|
|
113
|
+
return translate('${percentage} GST due on any order above ${threshold}.', {
|
|
114
|
+
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
115
|
+
threshold: currencyFormat(landedCost.vatTaxDeminimus),
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
this.getNewZealandDutyTaxMessge = (landedCost) => {
|
|
119
|
+
return translate('${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.', {
|
|
120
|
+
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
121
|
+
threshold: currencyFormat(landedCost.vatTaxDeminimus),
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Get additional duty tax message if selected country has tax id
|
|
126
|
+
*/
|
|
127
|
+
this.getAdditionalDutyTaxMessage = () => {
|
|
128
|
+
if (!localizationStore.countryLandedCost) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
// only show the message if the store has a tax id for selected country
|
|
132
|
+
if (!localizationStore.countryLandedCost.hasTaxId) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
switch (localizationStore.countryLandedCost.countryCode) {
|
|
136
|
+
case 'GB':
|
|
137
|
+
return this.getUkDutyTaxMessage(localizationStore.countryLandedCost);
|
|
138
|
+
case 'AU':
|
|
139
|
+
return this.getAustraliaDutyTaxMessage(localizationStore.countryLandedCost);
|
|
140
|
+
case 'NZ':
|
|
141
|
+
return this.getNewZealandDutyTaxMessge(localizationStore.countryLandedCost);
|
|
142
|
+
default:
|
|
143
|
+
// show nothing
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
66
147
|
this.isOpen = false;
|
|
67
148
|
this.setIsOpen = () => { };
|
|
68
149
|
this.mobileLocationOverride = undefined;
|
|
@@ -84,30 +165,13 @@ const ZonosHelloDialog = class {
|
|
|
84
165
|
}
|
|
85
166
|
render() {
|
|
86
167
|
var _a;
|
|
87
|
-
const {
|
|
88
|
-
//
|
|
89
|
-
const
|
|
90
|
-
? currencyFormat(countryLandedCost.dutyDeminimus)
|
|
91
|
-
: null;
|
|
92
|
-
// If Canada, use 40 CAD (courier duty de minimis)
|
|
93
|
-
const dutyDeminimisToUse = localizationStore.selectedCountryCode === 'CA'
|
|
94
|
-
? currencyFormat(40)
|
|
95
|
-
: dutyDeminimis;
|
|
168
|
+
const { selectedCountryCode } = localizationStore;
|
|
169
|
+
// If deminimis is undefined or null, assume it's $0
|
|
170
|
+
const dutyDeMinimisMessage = this.getDutyMessage();
|
|
96
171
|
// If deminimis is undefined or null, assume it's $0
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
// Our Robby API spells deminimis wrong here
|
|
101
|
-
const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
|
|
102
|
-
? currencyFormat(countryLandedCost.vatTaxDeminimus)
|
|
103
|
-
: null;
|
|
104
|
-
// If Canada, use 150 CAD (courier tax de minimis)
|
|
105
|
-
const taxDeminimisToUse = localizationStore.selectedCountryCode === 'CA'
|
|
106
|
-
? currencyFormat(150)
|
|
107
|
-
: taxDeminimis;
|
|
108
|
-
const taxDeMinimisMessage = taxDeminimisToUse
|
|
109
|
-
? `${translate('Spend')} ${taxDeminimisToUse} ${translate('tax free')}`
|
|
110
|
-
: translate('Taxes will apply to all orders');
|
|
172
|
+
const taxDeMinimisMessage = this.getTaxMessage();
|
|
173
|
+
// Show additional information if selected country has tax id
|
|
174
|
+
const additionalInformation = this.getAdditionalDutyTaxMessage();
|
|
111
175
|
const animateLeft = this.animateFromLeftOverride ||
|
|
112
176
|
(this.dialogRef && getHasMoreSpaceOnRight(this.dialogRef));
|
|
113
177
|
const animateFromBottom = this.dialogRef && getHasMoreSpaceAbove(this.dialogRef);
|
|
@@ -118,7 +182,7 @@ const ZonosHelloDialog = class {
|
|
|
118
182
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
119
183
|
const currentPage = this.getCurrentPageEnum();
|
|
120
184
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
121
|
-
return (h(Host, { key: '
|
|
185
|
+
return (h(Host, { key: 'ccabd686943b009ed6bb9c0ec64a6a4e7cc917f5', class: "zonos--elements" }, h("div", { key: '6bfbae15f5b43413fc76d21b94d0d56a2ce48f4d', "aria-hidden": "true", class: classes([
|
|
122
186
|
'zonos--hello-dialog',
|
|
123
187
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
124
188
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
@@ -128,7 +192,7 @@ const ZonosHelloDialog = class {
|
|
|
128
192
|
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", null, h("div", { class: "zonos--hello-dialog-content" }, h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
|
|
129
193
|
var _a;
|
|
130
194
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
131
|
-
}), h("zonos-card", { spacing: "12px" }, h("zonos-v-stack", { spacing: 12 }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content:
|
|
195
|
+
}), h("zonos-card", { spacing: "12px" }, h("zonos-v-stack", { spacing: 12 }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)), additionalInformation && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Low value order shipping restriction", content: BagIcon }), h("zonos-text", null, additionalInformation))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", null, h("zonos-country-select", { handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", null, h("zonos-language-select", { handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
132
196
|
}
|
|
133
197
|
static get assetsDirs() { return ["assets"]; }
|
|
134
198
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-dd40cc85.js';
|
|
2
2
|
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-c4c45591.js';
|
|
3
|
-
import { r as handleFetch, d as logError, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, a as log, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-
|
|
3
|
+
import { r as handleFetch, d as logError, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, a as log, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-7961927b.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
6
6
|
import './isDarkColor-6bf71e51.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { j as stripeStore, d as logError } from './cart-
|
|
2
|
+
import { j as stripeStore, d as logError } from './cart-7961927b.js';
|
|
3
3
|
import './zonosStore-c4c45591.js';
|
|
4
4
|
import './isDarkColor-6bf71e51.js';
|
|
5
5
|
import './getBorderRadius-a89e45fb.js';
|