@zonos/elements 1.3.246 → 1.3.247
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/ShortAddressCode-bec338b0.js +7 -0
- package/dist/cjs/{cart-52cf3366.js → cart-97a2d20a.js} +35 -6
- package/dist/cjs/getContrastColor-30848800.js +37 -0
- package/dist/cjs/{hasInclusivePrice-dbb82df8.js → hasInclusivePrice-134b0250.js} +1 -1
- package/dist/cjs/index.cjs.js +9 -7
- package/dist/cjs/{invoice-972f1ab3.js → invoice-05a10ee1.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-fd11246c.js → isCollectMobileTablet-edd4804c.js} +2 -2
- package/dist/cjs/isContrastColor-09f5924a.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-b1075a8c.js → localization-00e73920.js} +180 -0
- package/dist/cjs/{paypal-e339cc8c.js → paypal-0b4b352b.js} +4 -12
- package/dist/cjs/{placeTestOrder-3dfbe3d6.js → placeTestOrder-07b46688.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-55056c97.js → renderCheckoutCurrency-dd3b0609.js} +2 -2
- package/dist/cjs/{shouldRenderTaxIdInput-eda13ef8.js → shouldRenderTaxIdInput-b8abf6de.js} +18 -0
- package/dist/cjs/zonos-address-display_9.cjs.entry.js +35 -5
- package/dist/cjs/zonos-address_4.cjs.entry.js +37 -7
- package/dist/cjs/zonos-card_5.cjs.entry.js +4 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +65 -44
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -5
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +5 -4
- 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_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +7 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +5 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +18 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +16 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +22 -3
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
- package/dist/collection/components/store/checkout/stripe.js +32 -5
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +53 -3
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -2
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
- package/dist/collection/components/utils/checkout/shouldRenderShortAddressCodeInput.js +16 -0
- package/dist/collection/components/utils/shortAddressCodeValidationResult.js +37 -0
- package/dist/collection/types/checkout/ShortAddressCode.js +3 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +135 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/ShortAddressCode-7620e622.js +5 -0
- package/dist/esm/{cart-7f4704dc.js → cart-99ec4a3d.js} +35 -6
- package/dist/esm/getContrastColor-28c18704.js +35 -0
- package/dist/esm/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
- package/dist/esm/index.js +8 -7
- package/dist/esm/{invoice-d3d256fb.js → invoice-44e97c22.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +2 -2
- package/dist/esm/isContrastColor-69778cea.js +10 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-401ec6d4.js → localization-853b48a9.js} +180 -0
- package/dist/esm/{paypal-61270b79.js → paypal-56534e48.js} +4 -11
- package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +2 -2
- package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
- package/dist/esm/zonos-address-display_9.entry.js +35 -5
- package/dist/esm/zonos-address_4.entry.js +37 -7
- package/dist/esm/zonos-card_5.entry.js +4 -3
- package/dist/esm/zonos-cart-items_12.entry.js +65 -44
- package/dist/esm/zonos-checkout.entry.js +6 -5
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
- package/dist/esm/zonos-collect.entry.js +5 -4
- 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_4.entry.js +1 -1
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +7 -6
- package/dist/esm/zonos-invoice.entry.js +5 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +19 -5
- package/dist/esm-es5/ShortAddressCode-7620e622.js +1 -0
- package/dist/esm-es5/cart-99ec4a3d.js +1 -0
- package/dist/esm-es5/getContrastColor-28c18704.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-d3d256fb.js → invoice-44e97c22.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +1 -1
- package/dist/esm-es5/isContrastColor-69778cea.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-853b48a9.js +1 -0
- package/dist/esm-es5/paypal-56534e48.js +17 -0
- package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +1 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
- package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/scripts/index.d.ts +50 -4
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -0
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +8 -0
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +8 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/shouldRenderShortAddressCodeInput.d.ts +6 -0
- package/dist/types/components/utils/shortAddressCodeValidationResult.d.ts +12 -0
- package/dist/types/components.d.ts +32 -0
- package/dist/types/types/checkout/ShortAddressCode.d.ts +2 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
- package/dist/types/types/checkout/api/CreateParty.d.ts +1 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +157 -30
- package/dist/types/types/generated/graphql.internal.types.ts +194 -37
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-08365fdb.system.js +1 -0
- package/dist/zonos-elements/p-09aabce0.js +1 -0
- package/dist/zonos-elements/p-0c201c39.system.entry.js +1 -0
- package/dist/zonos-elements/p-0cb5f151.system.entry.js +1 -0
- package/dist/zonos-elements/{p-367c13db.system.entry.js → p-10355cf6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-288aab46.js → p-1b86711b.js} +1 -1
- package/dist/zonos-elements/p-1d42cd20.js +1 -0
- package/dist/zonos-elements/p-1dbeeab2.entry.js +1 -0
- package/dist/zonos-elements/p-2c10b067.system.entry.js +1 -0
- package/dist/zonos-elements/p-2e8f842c.entry.js +1 -0
- package/dist/zonos-elements/{p-67820c21.system.entry.js → p-2f55895c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-37bb5f2d.entry.js +1 -0
- package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-382601a9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3e2f175c.entry.js +1 -0
- package/dist/zonos-elements/{p-cee69784.entry.js → p-403b9fca.entry.js} +1 -1
- package/dist/zonos-elements/p-41299ffb.js +1 -0
- package/dist/zonos-elements/p-443e1f30.system.js +1 -0
- package/dist/zonos-elements/{p-a79f3685.js → p-46ece7ae.js} +1 -1
- package/dist/zonos-elements/p-48d55793.system.js +1 -0
- package/dist/zonos-elements/p-5295d36e.entry.js +1 -0
- package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-53a9da45.entry.js} +1 -1
- package/dist/zonos-elements/p-63a383f4.js +1 -0
- package/dist/zonos-elements/{p-a3411f20.entry.js → p-64870563.entry.js} +1 -1
- package/dist/zonos-elements/p-655ec440.system.js +1 -0
- package/dist/zonos-elements/{p-415c2a90.system.js → p-678331f0.system.js} +1 -1
- package/dist/zonos-elements/p-695e0803.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
- package/dist/zonos-elements/p-6e3cf6eb.entry.js +1 -0
- package/dist/zonos-elements/p-6f430d6f.system.entry.js +1 -0
- package/dist/zonos-elements/p-71185d24.system.js +1 -0
- package/dist/zonos-elements/p-786d1c24.js +1 -0
- package/dist/zonos-elements/p-794d29dc.entry.js +1 -0
- package/dist/zonos-elements/{p-87206522.system.entry.js → p-7b400b5f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b9b7cfb.system.entry.js → p-8205ae87.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a88a130.entry.js → p-83377e23.entry.js} +1 -1
- package/dist/zonos-elements/p-8defdf0d.system.js +17 -0
- package/dist/zonos-elements/p-8e98a7c8.js +1 -0
- package/dist/zonos-elements/{p-2889a485.system.entry.js → p-95348ebf.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9a066833.system.entry.js +1 -0
- package/dist/zonos-elements/p-aa6c2348.system.entry.js +1 -0
- package/dist/zonos-elements/p-ada8841a.js +1 -0
- package/dist/zonos-elements/p-ae26aec5.system.js +1 -0
- package/dist/zonos-elements/p-af85846e.system.js +1 -0
- package/dist/zonos-elements/{p-78c8bb58.system.entry.js → p-b54a95ea.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c2442878.system.js +1 -1
- package/dist/zonos-elements/p-c75b7c47.entry.js +1 -0
- package/dist/zonos-elements/p-caff391d.system.entry.js +1 -0
- package/dist/zonos-elements/p-ce98e472.js +1 -0
- package/dist/zonos-elements/{p-3f46d83e.entry.js → p-d0411b2d.entry.js} +1 -1
- package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
- package/dist/zonos-elements/p-dca14319.system.js +1 -0
- package/dist/zonos-elements/p-dd19d9d8.js +17 -0
- package/dist/zonos-elements/{p-e0809901.system.js → p-df6e62f8.system.js} +1 -1
- package/dist/zonos-elements/p-df90bccf.entry.js +1 -0
- package/dist/zonos-elements/p-e07aaf09.system.js +1 -0
- package/dist/zonos-elements/p-e458f737.entry.js +1 -0
- package/dist/zonos-elements/p-eea7ac64.js +1 -0
- package/dist/zonos-elements/p-f6f1d779.system.entry.js +1 -0
- package/dist/zonos-elements/p-f8eb618b.entry.js +1 -0
- package/dist/zonos-elements/p-fe96e239.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-7f4704dc.js +0 -1
- package/dist/esm-es5/localization-401ec6d4.js +0 -1
- package/dist/esm-es5/paypal-61270b79.js +0 -17
- package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +0 -1
- package/dist/zonos-elements/p-01b0a2e2.js +0 -1
- package/dist/zonos-elements/p-095f43ec.entry.js +0 -1
- package/dist/zonos-elements/p-1d91e5d1.entry.js +0 -1
- package/dist/zonos-elements/p-21fb6b39.js +0 -1
- package/dist/zonos-elements/p-2601538e.entry.js +0 -1
- package/dist/zonos-elements/p-276faa43.js +0 -1
- package/dist/zonos-elements/p-27874c22.entry.js +0 -1
- package/dist/zonos-elements/p-291b85f7.entry.js +0 -1
- package/dist/zonos-elements/p-2d2c627a.system.js +0 -1
- package/dist/zonos-elements/p-3b1898bc.system.entry.js +0 -1
- package/dist/zonos-elements/p-3f078bf5.system.entry.js +0 -1
- package/dist/zonos-elements/p-518b501c.system.entry.js +0 -1
- package/dist/zonos-elements/p-59ebb8c7.system.entry.js +0 -1
- package/dist/zonos-elements/p-5f956a0d.entry.js +0 -1
- package/dist/zonos-elements/p-6c29de12.entry.js +0 -1
- package/dist/zonos-elements/p-74e258ff.system.js +0 -1
- package/dist/zonos-elements/p-775c1122.system.js +0 -1
- package/dist/zonos-elements/p-7a6ab319.system.entry.js +0 -1
- package/dist/zonos-elements/p-85430ec1.js +0 -1
- package/dist/zonos-elements/p-872f9c22.system.entry.js +0 -1
- package/dist/zonos-elements/p-95524f54.js +0 -1
- package/dist/zonos-elements/p-993723c2.system.entry.js +0 -1
- package/dist/zonos-elements/p-a0a62b7e.js +0 -17
- package/dist/zonos-elements/p-a556ec07.system.js +0 -17
- package/dist/zonos-elements/p-a6489088.js +0 -1
- package/dist/zonos-elements/p-acc0eee3.system.js +0 -1
- package/dist/zonos-elements/p-bd10e82a.system.entry.js +0 -1
- package/dist/zonos-elements/p-c62b6741.system.entry.js +0 -1
- package/dist/zonos-elements/p-c6aa780e.entry.js +0 -1
- package/dist/zonos-elements/p-d1effb76.system.js +0 -1
- package/dist/zonos-elements/p-e7543082.system.js +0 -1
- package/dist/zonos-elements/p-e7df8394.entry.js +0 -1
- package/dist/zonos-elements/p-e90e9584.entry.js +0 -1
- package/dist/zonos-elements/p-eb9ee025.system.js +0 -1
- package/dist/zonos-elements/p-ebef34e3.entry.js +0 -1
- package/dist/zonos-elements/p-f6c6b6d3.system.entry.js +0 -1
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
import { c as countryRequireShortAddressCode } from './ShortAddressCode-7620e622.js';
|
|
1
2
|
import { e as euCountryCodes, c as countryRequireTaxId } from './TaxId-50d72254.js';
|
|
2
3
|
|
|
4
|
+
const isInShortAddressCodeCountry = (countryCode) => {
|
|
5
|
+
return countryRequireShortAddressCode.includes(countryCode);
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Checks if the short address code input should be rendered based on the country code.
|
|
9
|
+
*/
|
|
10
|
+
const shouldRenderShortAddressCodeInput = ({ countryCode, }) => {
|
|
11
|
+
// If country require short address code, show the input
|
|
12
|
+
const isCountryRequireShortAddressCode = isInShortAddressCodeCountry(countryCode);
|
|
13
|
+
if (isCountryRequireShortAddressCode) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
// If country doesn't require short address code, no need to show the input
|
|
17
|
+
return false;
|
|
18
|
+
};
|
|
19
|
+
|
|
3
20
|
const isInTaxIdCountry = (countryCode) => {
|
|
4
21
|
return countryRequireTaxId.includes(countryCode);
|
|
5
22
|
};
|
|
@@ -20,4 +37,4 @@ const shouldRenderTaxIdInput = ({ companyName, countryCode, }) => {
|
|
|
20
37
|
return false;
|
|
21
38
|
};
|
|
22
39
|
|
|
23
|
-
export { shouldRenderTaxIdInput as s };
|
|
40
|
+
export { shouldRenderTaxIdInput as a, shouldRenderShortAddressCodeInput as s };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, c as createEvent, a as getElement } from './index-0bbe9693.js';
|
|
2
|
-
import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-
|
|
2
|
+
import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-853b48a9.js';
|
|
3
3
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
4
|
-
import { K as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-
|
|
4
|
+
import { K as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-99ec4a3d.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
|
|
7
7
|
import { z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
|
|
@@ -9,11 +9,12 @@ import { R as RemoveIcon$2 } from './RemoveIcon-9dc5dd1a.js';
|
|
|
9
9
|
import { i as isDarkColor } from './isDarkColor-9ddd90cc.js';
|
|
10
10
|
import { t as throttle_1 } from './throttle-ce2432ab.js';
|
|
11
11
|
import { i as isCheckoutMobile } from './handleFetch-a844cac1.js';
|
|
12
|
-
import {
|
|
12
|
+
import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-2572bf77.js';
|
|
13
13
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
14
14
|
import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-50d72254.js';
|
|
15
15
|
import { i as inheritAriaAttributes, a as inheritAttributes } from './helpers-2f6955b1.js';
|
|
16
16
|
import './debounce-c4785346.js';
|
|
17
|
+
import './ShortAddressCode-7620e622.js';
|
|
17
18
|
|
|
18
19
|
const zonosAddressDisplayCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:\", \";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}";
|
|
19
20
|
const ZonosAddressDisplayStyle0 = zonosAddressDisplayCss;
|
|
@@ -503,6 +504,10 @@ const ZonosAddress = class {
|
|
|
503
504
|
* Error message for tax id input
|
|
504
505
|
*/
|
|
505
506
|
this.taxIdErrorMessage = '';
|
|
507
|
+
/**
|
|
508
|
+
* Error message for short address code input
|
|
509
|
+
*/
|
|
510
|
+
this.shortAddressCodeErrorMessage = '';
|
|
506
511
|
this.stripe = window.Zonos.stripe;
|
|
507
512
|
/**
|
|
508
513
|
* Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
|
|
@@ -833,6 +838,31 @@ const ZonosAddress = class {
|
|
|
833
838
|
stripeStore.taxId = event.detail;
|
|
834
839
|
} })));
|
|
835
840
|
}
|
|
841
|
+
/**
|
|
842
|
+
* Render short address code input based on ship to country code
|
|
843
|
+
*/
|
|
844
|
+
renderShortAddressCodeInput() {
|
|
845
|
+
var _a;
|
|
846
|
+
// No need to render short address code input for billing address
|
|
847
|
+
if (this.type === 'billing') {
|
|
848
|
+
return null;
|
|
849
|
+
}
|
|
850
|
+
const countryCode = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
|
|
851
|
+
// Don't render short address code input if the country is not provided
|
|
852
|
+
if (!countryCode) {
|
|
853
|
+
return null;
|
|
854
|
+
}
|
|
855
|
+
const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
|
|
856
|
+
countryCode,
|
|
857
|
+
});
|
|
858
|
+
// Don't render short address code input if the country doesn't require short address code
|
|
859
|
+
if (!shortAddressCodeInputRendered) {
|
|
860
|
+
return null;
|
|
861
|
+
}
|
|
862
|
+
return (h("div", { class: "zonos--short-address-code-input" }, h("zonos-stripe-input", { inputLabel: translate('Short address code'), inputPlaceholder: "RRRD2929", inputValue: stripeStore.shortAddressCode || '', isError: !!this.shortAddressCodeErrorMessage, onInputChange: (event) => {
|
|
863
|
+
stripeStore.shortAddressCode = event.detail;
|
|
864
|
+
} }), this.shortAddressCodeErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.shortAddressCodeErrorMessage))));
|
|
865
|
+
}
|
|
836
866
|
renderCompanyNameInput() {
|
|
837
867
|
// No need to render company name for billing address
|
|
838
868
|
if (this.type === 'billing') {
|
|
@@ -1357,10 +1387,10 @@ const ZonosAddress = class {
|
|
|
1357
1387
|
this.country = localizationStore.selectedCountryCode;
|
|
1358
1388
|
}
|
|
1359
1389
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
1360
|
-
return (h(Host, { key: '
|
|
1390
|
+
return (h(Host, { key: '4a2a2bb06e16eb0470b827efd104c1a7a373e2b5', class: classes([
|
|
1361
1391
|
'zonos--address zonos--elements',
|
|
1362
1392
|
`zonos--${this.type}-address`,
|
|
1363
|
-
]) }, h("zonos-text", { key: '
|
|
1393
|
+
]) }, h("zonos-text", { key: '74fd51761c8672e23ada3c5f1bac121cdf559ca6', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: 'e21b18b079f013e1bdaf2ab526c1c7826f2376f0', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
|
|
1364
1394
|
}
|
|
1365
1395
|
get el() { return getElement(this); }
|
|
1366
1396
|
static get watchers() { return {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-0bbe9693.js';
|
|
2
2
|
import { t as throttle_1 } from './throttle-ce2432ab.js';
|
|
3
|
-
import { b as stripeStore, t as trackConversionEvent, K as extractName, B as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-
|
|
4
|
-
import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-
|
|
3
|
+
import { b as stripeStore, t as trackConversionEvent, K as extractName, B as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-99ec4a3d.js';
|
|
4
|
+
import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-853b48a9.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
|
|
6
6
|
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-a844cac1.js';
|
|
7
|
-
import {
|
|
7
|
+
import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-2572bf77.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
9
9
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-50d72254.js';
|
|
11
11
|
import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
|
|
12
12
|
import './debounce-c4785346.js';
|
|
13
13
|
import './isDarkColor-9ddd90cc.js';
|
|
14
|
+
import './ShortAddressCode-7620e622.js';
|
|
14
15
|
|
|
15
|
-
const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--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:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
|
|
16
|
+
const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--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:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
|
|
16
17
|
const ZonosAddressStyle0 = zonosAddressCss;
|
|
17
18
|
|
|
18
19
|
const ZonosAddress = class {
|
|
@@ -33,6 +34,10 @@ const ZonosAddress = class {
|
|
|
33
34
|
* Error message for tax id input
|
|
34
35
|
*/
|
|
35
36
|
this.taxIdErrorMessage = '';
|
|
37
|
+
/**
|
|
38
|
+
* Error message for short address code input
|
|
39
|
+
*/
|
|
40
|
+
this.shortAddressCodeErrorMessage = '';
|
|
36
41
|
this.stripe = window.Zonos.stripe;
|
|
37
42
|
/**
|
|
38
43
|
* Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
|
|
@@ -262,7 +267,32 @@ const ZonosAddress = class {
|
|
|
262
267
|
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
|
|
263
268
|
stripeStore.taxId = event.detail;
|
|
264
269
|
this.taxIdChanged.emit(event.detail);
|
|
265
|
-
} }), this.taxIdErrorMessage && (h("zonos-text", { textColor:
|
|
270
|
+
} }), this.taxIdErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.taxIdErrorMessage))));
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Render short address code input based on ship to country code
|
|
274
|
+
*/
|
|
275
|
+
renderShortAddressCodeInput() {
|
|
276
|
+
var _a;
|
|
277
|
+
// No need to render short address code input for billing address
|
|
278
|
+
if (this.type === 'billing') {
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
const countryCode = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
|
|
282
|
+
// Don't render short address code input if the country is not provided
|
|
283
|
+
if (!countryCode) {
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
286
|
+
const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
|
|
287
|
+
countryCode,
|
|
288
|
+
});
|
|
289
|
+
// Don't render short address code input if the country doesn't require short address code
|
|
290
|
+
if (!shortAddressCodeInputRendered) {
|
|
291
|
+
return null;
|
|
292
|
+
}
|
|
293
|
+
return (h("div", { class: "zonos--short-address-code-input" }, h("zonos-stripe-input", { inputLabel: translate('Short address code'), inputPlaceholder: "RRRD2929", inputValue: stripeStore.shortAddressCode || '', isError: !!this.shortAddressCodeErrorMessage, onInputChange: (event) => {
|
|
294
|
+
stripeStore.shortAddressCode = event.detail;
|
|
295
|
+
} }), this.shortAddressCodeErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.shortAddressCodeErrorMessage))));
|
|
266
296
|
}
|
|
267
297
|
renderCompanyNameInput() {
|
|
268
298
|
// No need to render company name for billing address (only allow for Collect and Invoice)
|
|
@@ -324,11 +354,11 @@ const ZonosAddress = class {
|
|
|
324
354
|
this.isAddressFilled = true;
|
|
325
355
|
}
|
|
326
356
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
327
|
-
return (h(Host, { key: '
|
|
357
|
+
return (h(Host, { key: '5dc571d7c5e706ae9cb90de70deee22847e5ba7e', class: classes([
|
|
328
358
|
'zonos--address',
|
|
329
359
|
'zonos--elements',
|
|
330
360
|
`zonos--${this.type}-address`,
|
|
331
|
-
]) }, this.titleText && (h("zonos-text", { key: '
|
|
361
|
+
]) }, this.titleText && (h("zonos-text", { key: 'a7c9f730bc9b64aa2c6e8cc24701e638481eac19', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: '3078529c201c7947ffc833485d46184bc79ab1d1', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: 'b4a9850ac30ad9c483e05743ff41b7de9756d826', class: "zonos--address-component" })));
|
|
332
362
|
}
|
|
333
363
|
get el() { return getElement(this); }
|
|
334
364
|
static get watchers() { return {
|
|
@@ -2,12 +2,13 @@ import { r as registerInstance, h, H as Host, a as getElement, c as createEvent
|
|
|
2
2
|
import { f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
|
|
5
|
-
import { b as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
5
|
+
import { b as stripeStore, t as trackConversionEvent } from './cart-99ec4a3d.js';
|
|
6
|
+
import { s as storageStore } from './localization-853b48a9.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-56534e48.js';
|
|
9
9
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-9ddd90cc.js';
|
|
11
|
+
import './isContrastColor-69778cea.js';
|
|
11
12
|
|
|
12
13
|
const zonosCardCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";
|
|
13
14
|
const ZonosCardStyle0 = zonosCardCss;
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { r as registerInstance, d as getAssetPath, h, H as Host, F as Fragment, c as createEvent, a as getElement } from './index-0bbe9693.js';
|
|
2
|
-
import { d as cartStore, E as cartStoreHasOneEligibleItem, F as stripeStoreApplyPromoCode, G as stripeStoreRemovePromoCode, b as stripeStore, y as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, I as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, J as stripeStoreTranslateAddressToLatin, K as extractName, z as cartStoreOnChange, L as stripeStoreAsyncAddressUpdate, D as cartStoreUpdateSelectedShippingOption, M as cartStoreGetShippingTransitInfo, N as cartStoreGetMethod, O as sortServiceLevelOptionsByAmount } from './cart-
|
|
3
|
-
import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-
|
|
4
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
2
|
+
import { d as cartStore, E as cartStoreHasOneEligibleItem, F as stripeStoreApplyPromoCode, G as stripeStoreRemovePromoCode, b as stripeStore, y as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, I as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, J as stripeStoreTranslateAddressToLatin, K as extractName, z as cartStoreOnChange, L as stripeStoreAsyncAddressUpdate, D as cartStoreUpdateSelectedShippingOption, M as cartStoreGetShippingTransitInfo, N as cartStoreGetMethod, O as sortServiceLevelOptionsByAmount } from './cart-99ec4a3d.js';
|
|
3
|
+
import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-853b48a9.js';
|
|
4
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-1bd40006.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-b5b18743.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
7
|
import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
|
|
8
|
-
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-
|
|
9
|
-
import { s as submitGtag, c as paypalStoreReset, a as paypalStore
|
|
8
|
+
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-6fcc712f.js';
|
|
9
|
+
import { s as submitGtag, c as paypalStoreReset, a as paypalStore } from './paypal-56534e48.js';
|
|
10
10
|
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
11
11
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
12
12
|
import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
|
|
13
13
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
14
14
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
15
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
16
|
-
import { i as isDarkColor
|
|
15
|
+
import { p as placeTestOrder } from './placeTestOrder-9e0ab5fd.js';
|
|
16
|
+
import { i as isDarkColor } from './isDarkColor-9ddd90cc.js';
|
|
17
|
+
import { g as getContrastColor } from './getContrastColor-28c18704.js';
|
|
17
18
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|
|
18
19
|
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-047a6cd4.js';
|
|
19
20
|
import { c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
20
|
-
import { s as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-
|
|
21
|
+
import { s as shouldRenderShortAddressCodeInput, a as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-2572bf77.js';
|
|
21
22
|
import { e as euCountryCodes } from './TaxId-50d72254.js';
|
|
23
|
+
import './isContrastColor-69778cea.js';
|
|
22
24
|
import './debounce-c4785346.js';
|
|
25
|
+
import './ShortAddressCode-7620e622.js';
|
|
23
26
|
|
|
24
27
|
const zonosCartItemsCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}";
|
|
25
28
|
const ZonosCartItemsStyle0 = zonosCartItemsCss;
|
|
@@ -961,37 +964,6 @@ const ZonosCheckoutPayment = class {
|
|
|
961
964
|
};
|
|
962
965
|
ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
|
|
963
966
|
|
|
964
|
-
const getContrastColor = ({ backgroundColor, color, }) => {
|
|
965
|
-
if (backgroundColor === color) {
|
|
966
|
-
if (isDarkColor(color)) {
|
|
967
|
-
const ligherColor = tinycolor(color).lighten(40).toHexString();
|
|
968
|
-
return ligherColor;
|
|
969
|
-
}
|
|
970
|
-
const darkerColor = tinycolor(color).darken(40).toHexString();
|
|
971
|
-
return darkerColor;
|
|
972
|
-
}
|
|
973
|
-
// get readibility of the color
|
|
974
|
-
const isContrastEnough = isContrastColor({
|
|
975
|
-
backgroundColor1: backgroundColor,
|
|
976
|
-
backgroundColor2: color,
|
|
977
|
-
});
|
|
978
|
-
if (isContrastEnough) {
|
|
979
|
-
// no need to change the color if it's already contrast enough
|
|
980
|
-
return color;
|
|
981
|
-
}
|
|
982
|
-
if (isDarkColor(color)) {
|
|
983
|
-
return '#ffffff';
|
|
984
|
-
}
|
|
985
|
-
const newDarkerColor = tinycolor(color).darken(25).toHexString();
|
|
986
|
-
const newLigherColor = tinycolor(color).lighten(25).toHexString();
|
|
987
|
-
// get readibility of the color
|
|
988
|
-
const isNewColorContrastEnough = isContrastColor({
|
|
989
|
-
backgroundColor1: backgroundColor,
|
|
990
|
-
backgroundColor2: newDarkerColor,
|
|
991
|
-
});
|
|
992
|
-
return isNewColorContrastEnough ? newDarkerColor : newLigherColor;
|
|
993
|
-
};
|
|
994
|
-
|
|
995
967
|
/**
|
|
996
968
|
* Reset any done tabs after selected tab to undone. This is to force user to go through all tabs again
|
|
997
969
|
*/
|
|
@@ -1139,6 +1111,43 @@ const ZonosCurrencyToggle = class {
|
|
|
1139
1111
|
static get assetsDirs() { return ["assets"]; }
|
|
1140
1112
|
};
|
|
1141
1113
|
|
|
1114
|
+
const shortAddressCodeValidationResult = ({ shippingCountry, shortAddressCode, }) => {
|
|
1115
|
+
// Check to see if we are required to collect short address code for the shipping country or not
|
|
1116
|
+
const isShortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
|
|
1117
|
+
countryCode: shippingCountry,
|
|
1118
|
+
});
|
|
1119
|
+
// If the short address code input is not even rendered, no need to validate anything and allow to proceed. Validate when short address code input is not even rendered would prevent the user from checking out
|
|
1120
|
+
if (!isShortAddressCodeInputRendered) {
|
|
1121
|
+
return {
|
|
1122
|
+
error: null,
|
|
1123
|
+
valid: true,
|
|
1124
|
+
};
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* If the short address code input is rendered, the input should be filled
|
|
1128
|
+
*/
|
|
1129
|
+
if (!shortAddressCode) {
|
|
1130
|
+
return {
|
|
1131
|
+
error: 'Short address code is required.',
|
|
1132
|
+
valid: false,
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
if (shippingCountry === 'SA') {
|
|
1136
|
+
const isValid = /^[A-Za-z]{4}\s*[0-9]{4}$/.test(shortAddressCode);
|
|
1137
|
+
if (!isValid) {
|
|
1138
|
+
return {
|
|
1139
|
+
error: 'Invalid short address code format. Must be 4 letters and 4 numbers.',
|
|
1140
|
+
valid: false,
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
// Other countries doesn't need to validate short address code in the right format
|
|
1145
|
+
return {
|
|
1146
|
+
error: null,
|
|
1147
|
+
valid: true,
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1142
1151
|
const isTaxIdRequired = (shippingCountry) => {
|
|
1143
1152
|
const requireTaxIdCountry = [
|
|
1144
1153
|
'MX',
|
|
@@ -1271,6 +1280,10 @@ const ZonosCustomerInfo = class {
|
|
|
1271
1280
|
* Whether or not the tax id input is invalid
|
|
1272
1281
|
*/
|
|
1273
1282
|
this.taxIdErrorMessage = '';
|
|
1283
|
+
/**
|
|
1284
|
+
* Whether or not the short address code input is invalid
|
|
1285
|
+
*/
|
|
1286
|
+
this.shortAddressCodeErrorMessage = '';
|
|
1274
1287
|
/**
|
|
1275
1288
|
* Whether or not the shipping address contains invalid characters
|
|
1276
1289
|
*/
|
|
@@ -1522,7 +1535,14 @@ const ZonosCustomerInfo = class {
|
|
|
1522
1535
|
shippingCountry: this.shippingCountry,
|
|
1523
1536
|
taxId: stripeStore.taxId,
|
|
1524
1537
|
});
|
|
1538
|
+
const { error: shortAddressCodeError, valid: validShortAddressCode } = shortAddressCodeValidationResult({
|
|
1539
|
+
shippingCountry: this.shippingCountry,
|
|
1540
|
+
shortAddressCode: stripeStore.shortAddressCode,
|
|
1541
|
+
});
|
|
1525
1542
|
this.taxIdErrorMessage = !validTaxId ? translate(error) : '';
|
|
1543
|
+
this.shortAddressCodeErrorMessage = !validShortAddressCode
|
|
1544
|
+
? translate(shortAddressCodeError)
|
|
1545
|
+
: '';
|
|
1526
1546
|
const addressLengthErrorList = this.validateAddressLength({
|
|
1527
1547
|
address: stripeStore.stripeAddressEventData,
|
|
1528
1548
|
type: 'shipping',
|
|
@@ -1539,6 +1559,7 @@ const ZonosCustomerInfo = class {
|
|
|
1539
1559
|
!isValidShipping ||
|
|
1540
1560
|
!isValidLink ||
|
|
1541
1561
|
!validTaxId ||
|
|
1562
|
+
!validShortAddressCode ||
|
|
1542
1563
|
this.exceededCharacterLimitErrorFieldList.length > 0) {
|
|
1543
1564
|
return false;
|
|
1544
1565
|
}
|
|
@@ -1619,10 +1640,10 @@ const ZonosCustomerInfo = class {
|
|
|
1619
1640
|
}
|
|
1620
1641
|
// Render custom address component if the custom address form is enabled
|
|
1621
1642
|
if (this.addressFormRenderType === 'zonos') {
|
|
1622
|
-
return (h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
|
|
1643
|
+
return (h("zonos-custom-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
|
|
1623
1644
|
}
|
|
1624
1645
|
// Render Stripe address component by default
|
|
1625
|
-
return (h("zonos-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
|
|
1646
|
+
return (h("zonos-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
|
|
1626
1647
|
};
|
|
1627
1648
|
}
|
|
1628
1649
|
watchShowErrorBanner() {
|
|
@@ -2071,15 +2092,15 @@ const ZonosShipping = class {
|
|
|
2071
2092
|
var _a;
|
|
2072
2093
|
// Render all service levels for US since domestic shipping doesn't have DDP/DAP
|
|
2073
2094
|
if (((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) === 'US') {
|
|
2074
|
-
return (h("zonos-shipping-rich-radio", { items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
|
|
2095
|
+
return (h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
|
|
2075
2096
|
}
|
|
2076
|
-
return (h(Fragment, null, h("zonos-shipping-rich-radio", { items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
|
|
2097
|
+
return (h(Fragment, null, h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
|
|
2077
2098
|
!!this.serviceLevelsDAP.length && (h("button", { class: classes([
|
|
2078
2099
|
'zonos--shipping-options-collapse-trigger',
|
|
2079
2100
|
this.collapsedDAPOptions && 'collapsed',
|
|
2080
2101
|
]), onClick: () => {
|
|
2081
2102
|
this.collapsedDAPOptions = !this.collapsedDAPOptions;
|
|
2082
|
-
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
|
|
2103
|
+
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
|
|
2083
2104
|
};
|
|
2084
2105
|
return (h(Host, { class: "zonos--shipping zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!this.serviceLevelsAll.length && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !this.serviceLevelsAll.length ? (h("zonos-banner", { bannerTitle: cartStore.customQuotingError
|
|
2085
2106
|
? cartStore.customQuotingError
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, H as Host } from './index-0bbe9693.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset, z as cartStoreOnChange } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset, z as cartStoreOnChange } from './cart-99ec4a3d.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-56534e48.js';
|
|
4
|
+
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-853b48a9.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-b434e436.js';
|
|
6
6
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
7
7
|
import { h as handleFetch, b as getAdditionalLogMetadata, g as getIsTestMode, l as logError, j as jsonParse, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-a844cac1.js';
|
|
@@ -14,6 +14,7 @@ import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
|
|
|
14
14
|
import { i as isDarkColor } from './isDarkColor-9ddd90cc.js';
|
|
15
15
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
16
16
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
17
|
+
import './isContrastColor-69778cea.js';
|
|
17
18
|
import './debounce-c4785346.js';
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -1911,7 +1912,7 @@ const ZonosCheckout = class {
|
|
|
1911
1912
|
'--zonos--primary-color': !this.isMobile
|
|
1912
1913
|
? colorPrimary
|
|
1913
1914
|
: undefined,
|
|
1914
|
-
}) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.getDefaultAddress(), isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
|
|
1915
|
+
}) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.getDefaultAddress(), isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
|
|
1915
1916
|
await this.handleStripePaymentContinue();
|
|
1916
1917
|
}, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
1917
1918
|
// do nothing if it's not mobile
|
|
@@ -1939,7 +1940,7 @@ const ZonosCheckout = class {
|
|
|
1939
1940
|
this.isMobile && 'mobile',
|
|
1940
1941
|
this.isIframed && 'iframed',
|
|
1941
1942
|
this.hiddenMode && 'hidden-mode',
|
|
1942
|
-
]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-dialog", { isLoading: true, loadingText: translate('You will be redirected to international checkout shortly.'), loadingTitle: translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
|
|
1943
|
+
]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, class: "zonos--checkout-dialog", "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-dialog", { isLoading: true, loadingText: translate('You will be redirected to international checkout shortly.'), loadingTitle: translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
|
|
1943
1944
|
this.confirmDialogOpen = false;
|
|
1944
1945
|
},
|
|
1945
1946
|
// Mark user selected confirm to close the dialog
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, d as getAssetPath, h, H as Host } from './index-0bbe9693.js';
|
|
2
|
-
import { d as cartStore } from './cart-
|
|
2
|
+
import { d as cartStore } from './cart-99ec4a3d.js';
|
|
3
3
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-b5b18743.js';
|
|
4
4
|
import { f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
7
|
-
import './localization-
|
|
7
|
+
import './localization-853b48a9.js';
|
|
8
8
|
import './handleFetch-a844cac1.js';
|
|
9
9
|
import './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-9ddd90cc.js';
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, a as getElement } from './index-0bbe9693.js';
|
|
2
|
-
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, y as stripeStoreReset, I as stripeStoreMessageBasedOnStatus, d as cartStore, r as cartStoreNextStep, z as cartStoreOnChange } from './cart-
|
|
3
|
-
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { t as translate, s as storageStore, l as localizationStore, p as translationStoreOnChange } from './localization-
|
|
2
|
+
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, y as stripeStoreReset, I as stripeStoreMessageBasedOnStatus, d as cartStore, r as cartStoreNextStep, z as cartStoreOnChange } from './cart-99ec4a3d.js';
|
|
3
|
+
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-56534e48.js';
|
|
4
|
+
import { t as translate, s as storageStore, l as localizationStore, p as translationStoreOnChange } from './localization-853b48a9.js';
|
|
5
5
|
import { z as zonosStore } from './zonosStore-b434e436.js';
|
|
6
6
|
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
8
8
|
import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
|
|
9
9
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
10
|
-
import { i as isCollectMobile, a as isCollectTablet, e as collectStore } from './isCollectMobileTablet-
|
|
10
|
+
import { i as isCollectMobile, a as isCollectTablet, e as collectStore } from './isCollectMobileTablet-566ff0aa.js';
|
|
11
11
|
import { c as classes } from './classes-0d95c529.js';
|
|
12
12
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
13
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
14
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
13
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-1bd40006.js';
|
|
14
|
+
import { p as placeTestOrder } from './placeTestOrder-9e0ab5fd.js';
|
|
15
15
|
import { r as renderFallback } from './renderFallback-3f010b48.js';
|
|
16
16
|
import './isDarkColor-9ddd90cc.js';
|
|
17
|
+
import './isContrastColor-69778cea.js';
|
|
17
18
|
|
|
18
19
|
const RemoveIcon = `<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
19
20
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-0bbe9693.js';
|
|
2
|
-
import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, n as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, w as stripeStoreConfirmPayment, B as stripeStoreOnChange, y as stripeStoreReset, f as cartStoreReset } from './cart-
|
|
3
|
-
import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore } from './isCollectMobileTablet-
|
|
4
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-
|
|
5
|
-
import { s as storageStore, t as translate, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-
|
|
2
|
+
import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, n as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, w as stripeStoreConfirmPayment, B as stripeStoreOnChange, y as stripeStoreReset, f as cartStoreReset } from './cart-99ec4a3d.js';
|
|
3
|
+
import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore } from './isCollectMobileTablet-566ff0aa.js';
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-56534e48.js';
|
|
5
|
+
import { s as storageStore, t as translate, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-853b48a9.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-b434e436.js';
|
|
7
7
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
8
8
|
import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-a844cac1.js';
|
|
@@ -12,6 +12,7 @@ import { r as renderFallback } from './renderFallback-3f010b48.js';
|
|
|
12
12
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
13
13
|
import './isDarkColor-9ddd90cc.js';
|
|
14
14
|
import './getBorderRadius-877f6389.js';
|
|
15
|
+
import './isContrastColor-69778cea.js';
|
|
15
16
|
|
|
16
17
|
const ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
17
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-0bbe9693.js';
|
|
2
|
-
import { b as stripeStore } from './cart-
|
|
3
|
-
import { e as getOverridenZCountry, i as isValidSelector, h as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-
|
|
2
|
+
import { b as stripeStore } from './cart-99ec4a3d.js';
|
|
3
|
+
import { e as getOverridenZCountry, i as isValidSelector, h as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-853b48a9.js';
|
|
4
4
|
import { z as zonosStore, e as zonosStoreInitSetting, f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
|
|
5
5
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-0bc3e118.js';
|
|
6
6
|
import { h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-0bbe9693.js';
|
|
2
|
-
import { l as localizationStore } from './localization-
|
|
2
|
+
import { l as localizationStore } from './localization-853b48a9.js';
|
|
3
3
|
import { f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-a844cac1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-0bbe9693.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './localization-853b48a9.js';
|
|
3
3
|
import { f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-9ddd90cc.js';
|