@zonos/elements 1.3.246 → 1.3.248
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-28310848.js} +37 -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 +16 -7
- package/dist/cjs/{invoice-972f1ab3.js → invoice-2e8e5879.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-fd11246c.js → isCollectMobileTablet-bd0f4556.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-3019ae94.js} +24 -29
- package/dist/cjs/{placeTestOrder-3dfbe3d6.js → placeTestOrder-b0369cfd.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-55056c97.js → renderCheckoutCurrency-9e919b9f.js} +2 -2
- package/dist/cjs/{shouldRenderTaxIdInput-eda13ef8.js → shouldRenderTaxIdInput-b8abf6de.js} +18 -0
- package/dist/cjs/submitGtag-a50ab32e.js +116 -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 +5 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +170 -57
- package/dist/cjs/zonos-checkout.cjs.entry.js +31 -9
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +14 -12
- package/dist/cjs/zonos-collect.cjs.entry.js +6 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -3
- 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 +14 -12
- package/dist/cjs/zonos-invoice.cjs.entry.js +6 -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-finish/zonos-checkout-finish.js +88 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +9 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +26 -6
- 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 +31 -6
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +5 -5
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +5 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +1 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
- package/dist/collection/components/main/zonos-controller.js +4 -1
- package/dist/collection/components/store/checkout/paypal.js +19 -1
- package/dist/collection/components/store/checkout/stripe.js +34 -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/components/utils/submitGtag.js +90 -2
- package/dist/collection/scripts/_zonosBase.js +7 -0
- package/dist/collection/types/analyticsRelay.js +6 -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-ba8f3890.js} +37 -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 +15 -7
- package/dist/esm/{invoice-d3d256fb.js → invoice-055bb6e5.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-797cea8b.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-8d8518c0.js} +25 -28
- package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-0a74923e.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-bd059ecf.js} +2 -2
- package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
- package/dist/esm/submitGtag-89d6e9cb.js +113 -0
- 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 +5 -3
- package/dist/esm/zonos-cart-items_12.entry.js +170 -57
- package/dist/esm/zonos-checkout.entry.js +31 -9
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +14 -12
- package/dist/esm/zonos-collect.entry.js +6 -4
- package/dist/esm/zonos-controller.entry.js +6 -3
- 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 +14 -12
- package/dist/esm/zonos-invoice.entry.js +6 -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-ba8f3890.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-055bb6e5.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-797cea8b.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-8d8518c0.js +17 -0
- package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-0a74923e.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-bd059ecf.js} +1 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
- package/dist/esm-es5/submitGtag-89d6e9cb.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/analyticsRelayOnInit.js +1 -0
- package/dist/scripts/index.d.ts +61 -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-checkout-finish/zonos-checkout-finish.d.ts +4 -0
- 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 +10 -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/utils/submitGtag.d.ts +32 -2
- package/dist/types/components.d.ts +32 -0
- package/dist/types/scripts/_zonosBase.d.ts +11 -0
- package/dist/types/types/analyticsRelay.d.ts +12 -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-002e45f9.system.js +17 -0
- package/dist/zonos-elements/p-0792688d.system.entry.js +1 -0
- package/dist/zonos-elements/p-09aabce0.js +1 -0
- package/dist/zonos-elements/p-0b7beb16.system.entry.js +1 -0
- package/dist/zonos-elements/p-0f787f5d.entry.js +1 -0
- package/dist/zonos-elements/p-0ff93ca6.entry.js +1 -0
- package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-367c13db.system.entry.js → p-1acf0a71.system.entry.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-291f7ccb.system.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-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3972663a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-39fa55c7.entry.js} +1 -1
- package/dist/zonos-elements/p-3e85b9f5.system.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-48475755.entry.js +1 -0
- package/dist/zonos-elements/p-48d55793.system.js +1 -0
- package/dist/zonos-elements/{p-3f46d83e.entry.js → p-58248f03.entry.js} +1 -1
- package/dist/zonos-elements/p-5edef7c3.system.js +1 -0
- package/dist/zonos-elements/p-63a383f4.js +1 -0
- package/dist/zonos-elements/{p-415c2a90.system.js → p-63a3d3b9.system.js} +1 -1
- package/dist/zonos-elements/p-64661dd1.js +1 -0
- package/dist/zonos-elements/p-655ec440.system.js +1 -0
- package/dist/zonos-elements/p-69212d0f.entry.js +1 -0
- package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
- package/dist/zonos-elements/p-719403e0.system.js +1 -0
- package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-71a8d971.system.entry.js} +1 -1
- package/dist/zonos-elements/p-71d855b8.system.entry.js +1 -0
- package/dist/zonos-elements/p-71f10bf0.entry.js +1 -0
- package/dist/zonos-elements/p-72ff005c.entry.js +1 -0
- package/dist/zonos-elements/p-786d1c24.js +1 -0
- package/dist/zonos-elements/{p-87206522.system.entry.js → p-7b400b5f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7dba5f23.system.js +1 -0
- 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-85e59f3a.system.entry.js +1 -0
- package/dist/zonos-elements/p-866afec1.js +1 -0
- package/dist/zonos-elements/p-942358eb.system.js +1 -0
- package/dist/zonos-elements/p-94c5fbfc.system.entry.js +1 -0
- package/dist/zonos-elements/p-a12cb7ce.entry.js +1 -0
- package/dist/zonos-elements/p-abf38ed6.js +1 -0
- package/dist/zonos-elements/{p-e0809901.system.js → p-ae16dda9.system.js} +1 -1
- 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-a79f3685.js → p-bc4bfa06.js} +1 -1
- package/dist/zonos-elements/p-bf5e47e2.entry.js +1 -0
- package/dist/zonos-elements/p-c027a832.system.js +1 -0
- package/dist/zonos-elements/p-c2442878.system.js +1 -1
- package/dist/zonos-elements/p-c2f34b10.system.entry.js +1 -0
- package/dist/zonos-elements/p-c36696f9.js +1 -0
- package/dist/zonos-elements/p-c7311ce5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-288aab46.js → p-de8899bc.js} +1 -1
- package/dist/zonos-elements/p-e17bbcee.entry.js +1 -0
- package/dist/zonos-elements/p-eea7ac64.js +1 -0
- package/dist/zonos-elements/p-f6c2c743.entry.js +1 -0
- package/dist/zonos-elements/p-fe06c9ea.js +17 -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-2889a485.system.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-a3411f20.entry.js +0 -1
- 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
|
@@ -284,6 +284,9 @@ export const stringsChinese = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: '无效的会话',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: '无效的短地址代码格式。必须是4个字母和4个数字。',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: '发票:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsChinese = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: '购物车已过期',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: '简短地址代码',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: '需要简短的地址代码。',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: '显示',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsDanish = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Ugyldig session',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Ugyldigt format for kort adressekode. Skal være 4 bogstaver og 4 tal.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Faktura:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsDanish = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Indkøbskurv udløbet',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Kort adressekode',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Kort adressekode er påkrævet.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Vis',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsDutch = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Ongeldige sessie',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Ongeldig formaat van korte adrescode. Moet 4 letters en 4 cijfers bevatten.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Factuur:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsDutch = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Winkelwagen verlopen',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Korte adrescode',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Korte adrescode is vereist.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Tonen',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsFrench = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Session invalide',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: "Format de code d'adresse courte invalide. Doit être de 4 lettres et 4 chiffres.",
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Facture:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsFrench = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Panier expiré',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: "Code d'adresse court",
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: "Un code d'adresse court est requis.",
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Montrer',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsGerman = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Ungültige Sitzung',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Ungültiges Format des Kurzadresscodes. Muss aus 4 Buchstaben und 4 Zahlen bestehen.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Rechnung:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsGerman = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Einkaufswagen abgelaufen',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Kurzer Adresscode',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Ein kurzer Adresscode ist erforderlich.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Zeigen',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsHebrew = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'סשן לא חוקי',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'פורמט קוד כתובת קצר לא חוקי. חייב להיות 4 אותיות ו-4 מספרים.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'חשבונית:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsHebrew = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'תוקף עגלת הקניות פג',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'קוד כתובת קצר',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'נדרש קוד כתובת קצר.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'הצג',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsIndonesian = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Sesi tidak valid',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Format kode alamat pendek tidak valid. Harus terdiri dari 4 huruf dan 4 angka.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Faktur:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsIndonesian = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Keranjang belanja kedaluwarsa',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Kode alamat pendek',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Kode alamat pendek diperlukan.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Tampilkan',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsItalian = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Sessione non valida',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Formato del codice di indirizzo breve non valido. Deve essere composto da 4 lettere e 4 numeri.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Fattura:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsItalian = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Carrello della spesa scaduto',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Codice di indirizzo breve',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'È richiesto un codice di indirizzo breve.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Mostra',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsJapanese = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: '無効なセッション',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: '無効な短い住所コード形式です。4文字と4数字でなければなりません。',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: '請求書:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsJapanese = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'ショッピングカートの期限が切れました',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: '短い住所コード',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: '短い住所コードが必要です。',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: '表示',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsKorean = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: '유효하지 않은 세션',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: '잘못된 짧은 주소 코드 형식입니다. 4개의 문자와 4개의 숫자로 구성되어야 합니다.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: '송장:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsKorean = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: '쇼핑 카트가 만료되었습니다',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: '짧은 주소 코드',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: '짧은 주소 코드가 필요합니다.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: '보이다',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsNorwegian = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Ugyldig økt',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Ugyldig format for kort adressekode. Må være 4 bokstaver og 4 tall.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Faktura:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsNorwegian = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Handlekurv utløpt',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Kort adressekode',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Kort adressekode er nødvendig.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Vis',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsPolish = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Nieprawidłowa sesja',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Nieprawidłowy format kodu krótkiego adresu. Musi zawierać 4 litery i 4 cyfry.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Faktura:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsPolish = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Koszyk wygasł',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Krótki kod adresowy',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Wymagany jest krótki kod adresowy.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Pokaż',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsPortuguese = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Sessão inválida',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Formato de código de endereço curto inválido. Deve ter 4 letras e 4 números.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Fatura:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsPortuguese = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Carrinho de compras expirado',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Código de endereço curto',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'É necessário um código de endereço curto.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Mostrar',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsRussian = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Недействительная сессия',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Неверный формат кода короткого адреса. Должен содержать 4 буквы и 4 цифры.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Счет:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsRussian = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Срок действия корзины истек',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Короткий код адреса',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Требуется короткий код адреса.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Показать',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsSpanish = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Sesión no válida',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Formato de código de dirección corta no válido. Debe ser de 4 letras y 4 números.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Factura:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsSpanish = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Carrito de compras caducado',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Código de dirección corto',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Se requiere un código de dirección corto.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Mostrar',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsSwedish = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Ogiltig session',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Ogiltigt format för kort adresskod. Måste vara 4 bokstäver och 4 siffror.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Faktura:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsSwedish = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Kundvagn har gått ut',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Kort adresskod',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Kort adresskod krävs.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Visa',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsTurkish = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Geçersiz oturum',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Geçersiz kısa adres kodu formatı. 4 harf ve 4 rakam olmalıdır.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Fatura:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsTurkish = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Alışveriş sepeti süresi doldu',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Kısa adres kodu',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Kısa adres kodu gereklidir.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Göster',
|
|
532
541
|
},
|
|
@@ -284,6 +284,9 @@ export const stringsVietnamese = {
|
|
|
284
284
|
'Invalid session': {
|
|
285
285
|
value: 'Phiên không hợp lệ',
|
|
286
286
|
},
|
|
287
|
+
'Invalid short address code format. Must be 4 letters and 4 numbers.': {
|
|
288
|
+
value: 'Định dạng mã địa chỉ ngắn không hợp lệ. Phải là 4 chữ cái và 4 chữ số.',
|
|
289
|
+
},
|
|
287
290
|
'Invoice:': {
|
|
288
291
|
value: 'Hóa đơn:',
|
|
289
292
|
},
|
|
@@ -527,6 +530,12 @@ export const stringsVietnamese = {
|
|
|
527
530
|
'Shopping cart expired': {
|
|
528
531
|
value: 'Giỏ hàng đã hết hạn',
|
|
529
532
|
},
|
|
533
|
+
'Short address code': {
|
|
534
|
+
value: 'Mã địa chỉ ngắn',
|
|
535
|
+
},
|
|
536
|
+
'Short address code is required.': {
|
|
537
|
+
value: 'Cần có mã địa chỉ ngắn.',
|
|
538
|
+
},
|
|
530
539
|
Show: {
|
|
531
540
|
value: 'Hiển thị',
|
|
532
541
|
},
|
|
@@ -7,6 +7,7 @@ import { translate } from "../../store/translationStore";
|
|
|
7
7
|
import { zonosStore } from "../../store/zonosStore";
|
|
8
8
|
import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
|
|
9
9
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
10
|
+
import { shouldRenderShortAddressCodeInput } from "../../utils/checkout/shouldRenderShortAddressCodeInput";
|
|
10
11
|
import { shouldRenderTaxIdInput } from "../../utils/checkout/shouldRenderTaxIdInput";
|
|
11
12
|
import { classes } from "../../utils/classes";
|
|
12
13
|
import { extractName } from "../../utils/extractName";
|
|
@@ -31,6 +32,10 @@ export class ZonosAddress {
|
|
|
31
32
|
* Error message for tax id input
|
|
32
33
|
*/
|
|
33
34
|
this.taxIdErrorMessage = '';
|
|
35
|
+
/**
|
|
36
|
+
* Error message for short address code input
|
|
37
|
+
*/
|
|
38
|
+
this.shortAddressCodeErrorMessage = '';
|
|
34
39
|
this.stripe = window.Zonos.stripe;
|
|
35
40
|
/**
|
|
36
41
|
* 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
|
|
@@ -260,7 +265,32 @@ export class ZonosAddress {
|
|
|
260
265
|
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) => {
|
|
261
266
|
stripeStore.taxId = event.detail;
|
|
262
267
|
this.taxIdChanged.emit(event.detail);
|
|
263
|
-
} }), this.taxIdErrorMessage && (h("zonos-text", { textColor:
|
|
268
|
+
} }), this.taxIdErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.taxIdErrorMessage))));
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Render short address code input based on ship to country code
|
|
272
|
+
*/
|
|
273
|
+
renderShortAddressCodeInput() {
|
|
274
|
+
var _a;
|
|
275
|
+
// No need to render short address code input for billing address
|
|
276
|
+
if (this.type === 'billing') {
|
|
277
|
+
return null;
|
|
278
|
+
}
|
|
279
|
+
const countryCode = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
|
|
280
|
+
// Don't render short address code input if the country is not provided
|
|
281
|
+
if (!countryCode) {
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
|
|
285
|
+
countryCode,
|
|
286
|
+
});
|
|
287
|
+
// Don't render short address code input if the country doesn't require short address code
|
|
288
|
+
if (!shortAddressCodeInputRendered) {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
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) => {
|
|
292
|
+
stripeStore.shortAddressCode = event.detail;
|
|
293
|
+
} }), this.shortAddressCodeErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.shortAddressCodeErrorMessage))));
|
|
264
294
|
}
|
|
265
295
|
renderCompanyNameInput() {
|
|
266
296
|
// No need to render company name for billing address (only allow for Collect and Invoice)
|
|
@@ -322,11 +352,11 @@ export class ZonosAddress {
|
|
|
322
352
|
this.isAddressFilled = true;
|
|
323
353
|
}
|
|
324
354
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
325
|
-
return (h(Host, { key: '
|
|
355
|
+
return (h(Host, { key: '5dc571d7c5e706ae9cb90de70deee22847e5ba7e', class: classes([
|
|
326
356
|
'zonos--address',
|
|
327
357
|
'zonos--elements',
|
|
328
358
|
`zonos--${this.type}-address`,
|
|
329
|
-
]) }, this.titleText && (h("zonos-text", { key: '
|
|
359
|
+
]) }, 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" })));
|
|
330
360
|
}
|
|
331
361
|
static get is() { return "zonos-address"; }
|
|
332
362
|
static get encapsulation() { return "scoped"; }
|
|
@@ -423,6 +453,26 @@ export class ZonosAddress {
|
|
|
423
453
|
"attribute": "tax-id-error-message",
|
|
424
454
|
"reflect": false,
|
|
425
455
|
"defaultValue": "''"
|
|
456
|
+
},
|
|
457
|
+
"shortAddressCodeErrorMessage": {
|
|
458
|
+
"type": "string",
|
|
459
|
+
"mutable": false,
|
|
460
|
+
"complexType": {
|
|
461
|
+
"original": "string",
|
|
462
|
+
"resolved": "string",
|
|
463
|
+
"references": {}
|
|
464
|
+
},
|
|
465
|
+
"required": false,
|
|
466
|
+
"optional": false,
|
|
467
|
+
"docs": {
|
|
468
|
+
"tags": [],
|
|
469
|
+
"text": "Error message for short address code input"
|
|
470
|
+
},
|
|
471
|
+
"getter": false,
|
|
472
|
+
"setter": false,
|
|
473
|
+
"attribute": "short-address-code-error-message",
|
|
474
|
+
"reflect": false,
|
|
475
|
+
"defaultValue": "''"
|
|
426
476
|
}
|
|
427
477
|
};
|
|
428
478
|
}
|
|
@@ -20,6 +20,7 @@ import { zonosStore } from "../../store/zonosStore";
|
|
|
20
20
|
import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
|
|
21
21
|
import { isValidZip } from "../../utils/checkout/form/isValidZip";
|
|
22
22
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
23
|
+
import { shouldRenderShortAddressCodeInput } from "../../utils/checkout/shouldRenderShortAddressCodeInput";
|
|
23
24
|
import { shouldRenderTaxIdInput } from "../../utils/checkout/shouldRenderTaxIdInput";
|
|
24
25
|
import { classes } from "../../utils/classes";
|
|
25
26
|
import { extractName } from "../../utils/extractName";
|
|
@@ -40,6 +41,10 @@ export class ZonosAddress {
|
|
|
40
41
|
* Error message for tax id input
|
|
41
42
|
*/
|
|
42
43
|
this.taxIdErrorMessage = '';
|
|
44
|
+
/**
|
|
45
|
+
* Error message for short address code input
|
|
46
|
+
*/
|
|
47
|
+
this.shortAddressCodeErrorMessage = '';
|
|
43
48
|
this.stripe = window.Zonos.stripe;
|
|
44
49
|
/**
|
|
45
50
|
* 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
|
|
@@ -370,6 +375,31 @@ export class ZonosAddress {
|
|
|
370
375
|
stripeStore.taxId = event.detail;
|
|
371
376
|
} })));
|
|
372
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* Render short address code input based on ship to country code
|
|
380
|
+
*/
|
|
381
|
+
renderShortAddressCodeInput() {
|
|
382
|
+
var _a;
|
|
383
|
+
// No need to render short address code input for billing address
|
|
384
|
+
if (this.type === 'billing') {
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
const countryCode = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
|
|
388
|
+
// Don't render short address code input if the country is not provided
|
|
389
|
+
if (!countryCode) {
|
|
390
|
+
return null;
|
|
391
|
+
}
|
|
392
|
+
const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
|
|
393
|
+
countryCode,
|
|
394
|
+
});
|
|
395
|
+
// Don't render short address code input if the country doesn't require short address code
|
|
396
|
+
if (!shortAddressCodeInputRendered) {
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
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) => {
|
|
400
|
+
stripeStore.shortAddressCode = event.detail;
|
|
401
|
+
} }), this.shortAddressCodeErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.shortAddressCodeErrorMessage))));
|
|
402
|
+
}
|
|
373
403
|
renderCompanyNameInput() {
|
|
374
404
|
// No need to render company name for billing address
|
|
375
405
|
if (this.type === 'billing') {
|
|
@@ -894,10 +924,10 @@ export class ZonosAddress {
|
|
|
894
924
|
this.country = localizationStore.selectedCountryCode;
|
|
895
925
|
}
|
|
896
926
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
897
|
-
return (h(Host, { key: '
|
|
927
|
+
return (h(Host, { key: '4a2a2bb06e16eb0470b827efd104c1a7a373e2b5', class: classes([
|
|
898
928
|
'zonos--address zonos--elements',
|
|
899
929
|
`zonos--${this.type}-address`,
|
|
900
|
-
]) }, h("zonos-text", { key: '
|
|
930
|
+
]) }, 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()));
|
|
901
931
|
}
|
|
902
932
|
static get is() { return "zonos-custom-address"; }
|
|
903
933
|
static get encapsulation() { return "scoped"; }
|
|
@@ -994,6 +1024,26 @@ export class ZonosAddress {
|
|
|
994
1024
|
"attribute": "tax-id-error-message",
|
|
995
1025
|
"reflect": false,
|
|
996
1026
|
"defaultValue": "''"
|
|
1027
|
+
},
|
|
1028
|
+
"shortAddressCodeErrorMessage": {
|
|
1029
|
+
"type": "string",
|
|
1030
|
+
"mutable": false,
|
|
1031
|
+
"complexType": {
|
|
1032
|
+
"original": "string",
|
|
1033
|
+
"resolved": "string",
|
|
1034
|
+
"references": {}
|
|
1035
|
+
},
|
|
1036
|
+
"required": false,
|
|
1037
|
+
"optional": false,
|
|
1038
|
+
"docs": {
|
|
1039
|
+
"tags": [],
|
|
1040
|
+
"text": "Error message for short address code input"
|
|
1041
|
+
},
|
|
1042
|
+
"getter": false,
|
|
1043
|
+
"setter": false,
|
|
1044
|
+
"attribute": "short-address-code-error-message",
|
|
1045
|
+
"reflect": false,
|
|
1046
|
+
"defaultValue": "''"
|
|
997
1047
|
}
|
|
998
1048
|
};
|
|
999
1049
|
}
|
|
@@ -99,6 +99,7 @@ export const prepCartCalculateLandedCost = (cartId) => {
|
|
|
99
99
|
},
|
|
100
100
|
]
|
|
101
101
|
: [],
|
|
102
|
+
shipToShortAddressCode: stripeStore.shortAddressCode,
|
|
102
103
|
shipToTaxId: stripeStore.taxId,
|
|
103
104
|
shippingAddress: {
|
|
104
105
|
addressLine1: translatedShippingAddress.line1,
|
|
@@ -185,6 +186,7 @@ export const prepCalculateLandedCost = () => {
|
|
|
185
186
|
isTest: isE2ETest,
|
|
186
187
|
items: cartStore.items,
|
|
187
188
|
landedCostAdjustments: adjustments,
|
|
189
|
+
shipToShortAddressCode: stripeStore.shortAddressCode,
|
|
188
190
|
shipToTaxId: stripeStore.taxId,
|
|
189
191
|
shippingAddress: {
|
|
190
192
|
addressLine1: translatedShippingAddress.line1,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { countryRequireShortAddressCode, } from "../../../types/checkout/ShortAddressCode";
|
|
2
|
+
const isInShortAddressCodeCountry = (countryCode) => {
|
|
3
|
+
return countryRequireShortAddressCode.includes(countryCode);
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Checks if the short address code input should be rendered based on the country code.
|
|
7
|
+
*/
|
|
8
|
+
export const shouldRenderShortAddressCodeInput = ({ countryCode, }) => {
|
|
9
|
+
// If country require short address code, show the input
|
|
10
|
+
const isCountryRequireShortAddressCode = isInShortAddressCodeCountry(countryCode);
|
|
11
|
+
if (isCountryRequireShortAddressCode) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
// If country doesn't require short address code, no need to show the input
|
|
15
|
+
return false;
|
|
16
|
+
};
|