@zonos/elements 1.4.2 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{TaxId-Q6aDqqWv.js → TaxId-ChhNwG04.js} +36 -0
- package/dist/cjs/{cart-B6Aty-21.js → cart-CiXlehwQ.js} +88 -52
- package/dist/cjs/{collect-DnrvaXUI.js → collect-Drr8fY-q.js} +3 -3
- package/dist/cjs/{debounce-Cd2emZPn.js → debounce-BhgA8_3W.js} +2 -2
- package/dist/cjs/{debounce-vY0QYT6o.js → debounce-DRPMxNew.js} +1 -1
- package/dist/cjs/{getBorderRadius-CyYZw4qq.js → getBorderRadius-CJ_95w3o.js} +1 -1
- package/dist/cjs/{getMissingRequiredShippingFields-D03ICqss.js → getMissingRequiredShippingFields-DI6qF1z3.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-CPCoVeU3.js → hasInclusivePrice-84KS94yH.js} +1 -1
- package/dist/cjs/index.cjs.js +19 -8
- package/dist/cjs/{invoice-Cj8W7NW0.js → invoice-5hVfSXpb.js} +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-BzNeXeDe.js → localization-B2mjW0Xa.js} +701 -41
- package/dist/cjs/{paypal-CuKshRmZ.js → paypal-pd8Nz_R_.js} +4 -4
- package/dist/cjs/{placeTestOrder-7czjwkjm.js → placeTestOrder-DrI8rD9o.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-BH8t2b2x.js → renderCheckoutCurrency-u5q8YdUb.js} +2 -2
- package/dist/cjs/shouldRenderShortAddressCodeInput-gpu_bMfp.js +21 -0
- package/dist/cjs/{shouldShowLanguageSelect-yAbtCmd8.js → shouldShowLanguageSelect-gBg4KeTQ.js} +1 -1
- package/dist/cjs/{submitGtag-D79e8u6s.js → submitGtag-Rc-S3PnH.js} +1 -1
- package/dist/cjs/{throttle-zSVRQLC0.js → taxIdFields-BrIaPTcd.js} +57 -2
- package/dist/cjs/taxIdRules-BBj8kQxJ.js +58 -0
- package/dist/cjs/{updateCheckoutSessionAttributes-jMtfOL2m.js → updateCheckoutSessionAttributes-d0IKpwW8.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +25 -30
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-address_4.cjs.entry.js +27 -30
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +7 -6
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +8 -7
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +148 -80
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +31 -20
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -5
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +12 -11
- package/dist/cjs/zonos-collect.cjs.entry.js +9 -8
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -6
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -7
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +12 -11
- package/dist/cjs/zonos-invoice.cjs.entry.js +9 -8
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +7 -6
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-Bx9jK82G.js → zonosStore-CDV83QyK.js} +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +6 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
- package/dist/collection/components/store/checkout/stripe.js +10 -12
- package/dist/collection/components/store/translationStore/strings.arabic.js +35 -2
- package/dist/collection/components/store/translationStore/strings.base.js +35 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +35 -2
- package/dist/collection/components/store/translationStore/strings.french.js +35 -2
- package/dist/collection/components/store/translationStore/strings.german.js +35 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +35 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +35 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +35 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +35 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +35 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +35 -2
- package/dist/collection/components/store/zonosStore.js +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +5 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +37 -22
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +5 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +34 -21
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +24 -35
- package/dist/collection/components/utils/checkout/getCheckoutTaxIdPayload.js +16 -0
- package/dist/collection/components/utils/checkout/getTaxIdFieldState.js +26 -0
- package/dist/collection/components/utils/checkout/isHostedVsNativeTestAllowed.js +13 -0
- package/dist/collection/components/utils/checkout/itemCustomization.js +53 -0
- package/dist/collection/components/utils/checkout/parseItemCustomizations.js +6 -0
- package/dist/collection/components/utils/checkout/resolveTaxIdSelection.js +23 -0
- package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +7 -11
- package/dist/collection/components/utils/checkout/taxIdFields.js +29 -0
- package/dist/collection/components/utils/taxId/taxIdRules.js +44 -0
- package/dist/collection/components/utils/taxIdValidationResult.js +57 -58
- package/dist/collection/index.js +1 -0
- package/dist/collection/types/checkout/TaxId.js +31 -0
- package/dist/collection/types/checkout/itemCustomization.js +1 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +32 -1
- package/dist/esm/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +88 -53
- package/dist/esm/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +3 -3
- package/dist/esm/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +1 -1
- package/dist/esm/{debounce-CrmpwbEE.js → debounce-DWqMT4lo.js} +2 -2
- package/dist/esm/{getBorderRadius-DYfkeXdx.js → getBorderRadius-BiGd45jw.js} +1 -1
- package/dist/esm/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +1 -1
- package/dist/esm/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
- package/dist/esm/index.js +9 -8
- package/dist/esm/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-BIh-4pc_.js → localization-DHM91diu.js} +701 -41
- package/dist/esm/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +4 -4
- package/dist/esm/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
- package/dist/esm/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +19 -0
- package/dist/esm/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
- package/dist/esm/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
- package/dist/esm/taxIdFields-ByEYfsO5.js +139 -0
- package/dist/esm/taxIdRules-xYlx7ZXW.js +47 -0
- package/dist/esm/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +23 -28
- package/dist/esm/zonos-address-display_2.entry.js +3 -3
- package/dist/esm/zonos-address_4.entry.js +25 -28
- package/dist/esm/zonos-airwallex-payment.entry.js +7 -6
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +8 -7
- package/dist/esm/zonos-cart-items_12.entry.js +147 -79
- package/dist/esm/zonos-checkbox_2.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +31 -20
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -5
- package/dist/esm/zonos-collect-finish_6.entry.js +12 -11
- package/dist/esm/zonos-collect.entry.js +9 -8
- package/dist/esm/zonos-controller.entry.js +7 -6
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +3 -3
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +4 -4
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -7
- package/dist/esm/zonos-invoice-finish_5.entry.js +12 -11
- package/dist/esm/zonos-invoice.entry.js +9 -8
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +7 -6
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +2 -1
- package/dist/esm-es5/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +2 -1
- package/dist/esm-es5/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +64 -53
- package/dist/esm-es5/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +1 -1
- package/dist/esm-es5/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +7 -7
- package/dist/esm-es5/debounce-DWqMT4lo.js +1 -0
- package/dist/esm-es5/getBorderRadius-BiGd45jw.js +8 -0
- package/dist/esm-es5/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
- package/dist/esm-es5/index.js +11 -11
- package/dist/esm-es5/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-DHM91diu.js +348 -0
- package/dist/esm-es5/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
- package/dist/esm-es5/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +8 -0
- package/dist/esm-es5/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
- package/dist/esm-es5/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
- package/dist/esm-es5/taxIdFields-ByEYfsO5.js +46 -0
- package/dist/esm-es5/taxIdRules-xYlx7ZXW.js +6 -0
- package/dist/esm-es5/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +253 -254
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +8 -9
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.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 +40 -26
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +7 -7
- package/dist/esm-es5/zonos-collapse.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 +2 -2
- 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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
- 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-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +1 -1
- package/dist/scripts/index.d.ts +97 -1
- 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/store/checkout/stripe.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +34 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +34 -1
- package/dist/types/components/store/zonosStore.d.ts +2 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +4 -1
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +4 -1
- package/dist/types/components/utils/checkout/getCheckoutTaxIdPayload.d.ts +6 -0
- package/dist/types/components/utils/checkout/getTaxIdFieldState.d.ts +18 -0
- package/dist/types/components/utils/checkout/isHostedVsNativeTestAllowed.d.ts +11 -0
- package/dist/types/components/utils/checkout/itemCustomization.d.ts +23 -0
- package/dist/types/components/utils/checkout/parseItemCustomizations.d.ts +7 -0
- package/dist/types/components/utils/checkout/resolveTaxIdSelection.d.ts +12 -0
- package/dist/types/components/utils/checkout/shouldRenderTaxIdInput.d.ts +2 -1
- package/dist/types/components/utils/checkout/taxIdFields.d.ts +11 -0
- package/dist/types/components/utils/taxId/taxIdRules.d.ts +37 -0
- package/dist/types/components/utils/taxIdValidationResult.d.ts +8 -2
- package/dist/types/components.d.ts +22 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/checkout/TaxId.d.ts +45 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +11 -0
- package/dist/types/types/checkout/api/CreateParty.d.ts +2 -0
- package/dist/types/types/checkout/itemCustomization.d.ts +4 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +5 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-7bd99479.system.entry.js → p-064d8829.system.entry.js} +26 -26
- package/dist/zonos-elements/p-107f287b.entry.js +1 -0
- package/dist/zonos-elements/{p-51400242.system.entry.js → p-1199baef.system.entry.js} +3 -3
- package/dist/zonos-elements/p-12b24ebb.entry.js +1 -0
- package/dist/zonos-elements/{p-9c33f7ed.system.entry.js → p-189cc594.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3d0656a.entry.js → p-1a5acbcd.entry.js} +1 -1
- package/dist/zonos-elements/{p-11defdca.system.entry.js → p-1cc42a98.system.entry.js} +18 -18
- package/dist/zonos-elements/p-1e6db427.entry.js +1 -0
- package/dist/zonos-elements/{p-5016d71b.system.entry.js → p-1fda4aec.system.entry.js} +132 -117
- package/dist/zonos-elements/{p-756d303f.system.entry.js → p-20eb00de.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5967a1c1.system.entry.js → p-216a908d.system.entry.js} +5 -5
- package/dist/zonos-elements/p-25eb99d4.entry.js +1 -0
- package/dist/zonos-elements/{p-23352709.system.entry.js → p-2b63865a.system.entry.js} +4 -4
- package/dist/zonos-elements/{p-6db7c0b1.system.entry.js → p-2ca826b9.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-6c41b00c.entry.js → p-2d513aa3.entry.js} +1 -1
- package/dist/zonos-elements/{p-c961caaf.entry.js → p-3e705c9b.entry.js} +1 -1
- package/dist/zonos-elements/{p-acd50b0b.entry.js → p-4612facd.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b80aff2.system.entry.js → p-46a839d2.system.entry.js} +24 -24
- package/dist/zonos-elements/p-46b9f0cf.entry.js +1 -0
- package/dist/zonos-elements/{p-244e0302.system.entry.js → p-4715045c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d168023b.entry.js → p-4917b74d.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b81f8b9.system.entry.js → p-53eac12f.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-17c7ea4a.system.entry.js → p-55813e9f.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-06030d3b.system.entry.js → p-5585db86.system.entry.js} +45 -45
- package/dist/zonos-elements/p-59fc32af.entry.js +1 -0
- package/dist/zonos-elements/{p-193d9722.entry.js → p-61312d5b.entry.js} +1 -1
- package/dist/zonos-elements/p-636b71d4.entry.js +1 -0
- package/dist/zonos-elements/{p-155ed3d3.system.entry.js → p-6410fa11.system.entry.js} +24 -24
- package/dist/zonos-elements/{p-0fca452b.entry.js → p-65817880.entry.js} +1 -1
- package/dist/zonos-elements/p-678b9214.entry.js +1 -0
- package/dist/zonos-elements/p-6e691736.entry.js +1 -0
- package/dist/zonos-elements/p-6vSUiBfr.system.js +348 -0
- package/dist/zonos-elements/p-74659d88.entry.js +1 -0
- package/dist/zonos-elements/p-7dc7f328.entry.js +1 -0
- package/dist/zonos-elements/{p-55916c90.entry.js → p-7f1bea9b.entry.js} +1 -1
- package/dist/zonos-elements/{p-1c150f26.entry.js → p-821e413a.entry.js} +1 -1
- package/dist/zonos-elements/{p-c403f004.system.entry.js → p-82e45d0c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84e76348.entry.js +1 -0
- package/dist/zonos-elements/{p-1409de3b.system.entry.js → p-88e20e99.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-195f6e38.system.entry.js → p-89a3c4db.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4679f0ec.entry.js → p-8f9d8795.entry.js} +1 -1
- package/dist/zonos-elements/p-8fa6cfff.entry.js +1 -0
- package/dist/zonos-elements/{p-92fe9a1f.system.entry.js → p-902cca23.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0a4a7742.system.entry.js → p-93860183.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-69c3e367.system.entry.js → p-941a95a1.system.entry.js} +10 -10
- package/dist/zonos-elements/{p-b5882fbb.system.entry.js → p-9449b4f4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6abec43f.system.entry.js → p-960070d0.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-1bac5ac1.system.entry.js → p-990fcf81.system.entry.js} +1 -1
- package/dist/zonos-elements/p-BD-9rD53.js +1 -0
- package/dist/zonos-elements/p-BMPYH-LT.js +1 -0
- package/dist/zonos-elements/{p-DI2vXnXc.system.js → p-BrQ8n8NS.system.js} +3 -3
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +2 -2
- package/dist/zonos-elements/{p-CUaf1cEg.js → p-C70h5mKA.js} +1 -1
- package/dist/zonos-elements/{p-B4Ufchqh.system.js → p-C9XLkmmb.system.js} +3 -3
- package/dist/zonos-elements/{p-CZD8WvyY.system.js → p-CBUz18kA.system.js} +1 -1
- package/dist/zonos-elements/{p-kaOxUR9u.system.js → p-CGNVm52g.system.js} +6 -6
- package/dist/zonos-elements/p-CHKKvuiz.js +1 -0
- package/dist/zonos-elements/{p-0mGRBGcf.js → p-CMo3ZweU.js} +1 -1
- package/dist/zonos-elements/p-CTiqplrr.js +1 -0
- package/dist/zonos-elements/p-CYxMfUL7.system.js +1 -0
- package/dist/zonos-elements/{p-D4MevhAL.system.js → p-CbhN65lj.system.js} +3 -3
- package/dist/zonos-elements/p-Ch1w0Lr7.js +1 -0
- package/dist/zonos-elements/{p-W82paT5F.js → p-CqB9AfBf.js} +1 -1
- package/dist/zonos-elements/p-CzKlS3E-.system.js +6 -0
- package/dist/zonos-elements/p-D1SmY_fZ.js +1 -0
- package/dist/zonos-elements/{p-sz4L-ZnB.js → p-D1e9zNDA.js} +1 -1
- package/dist/zonos-elements/{p-c9QtIdJX.js → p-D6xXnsM_.js} +1 -1
- package/dist/zonos-elements/{p-8PPEbm_0.system.js → p-DIab60nK.system.js} +12 -12
- package/dist/zonos-elements/{p-Cye-evFK.js → p-DMIgN_sT.js} +1 -1
- package/dist/zonos-elements/{p-DCS8qcL6.system.js → p-DQrMfUzi.system.js} +41 -41
- package/dist/zonos-elements/{p-BuU_p5DP.system.js → p-DTgUqgwV.system.js} +2 -2
- package/dist/zonos-elements/p-DW7I0zOF.js +1 -0
- package/dist/zonos-elements/p-DZdkJHK9.system.js +7 -0
- package/dist/zonos-elements/{p-XqkqjeNV.system.js → p-DgUrB-1a.system.js} +1 -1
- package/dist/zonos-elements/p-DiMEP3mh.js +1 -0
- package/dist/zonos-elements/p-DprOoI2W.system.js +528 -0
- package/dist/zonos-elements/{p-7abqRc9V.js → p-DpwmHU8R.js} +2 -2
- package/dist/zonos-elements/p-DqVePqqx.system.js +8 -0
- package/dist/zonos-elements/{p-Cby4EkFu.system.js → p-DsBuZ6ob.system.js} +2 -1
- package/dist/zonos-elements/{p-XDxdMlQl.system.js → p-Dtu_Japy.system.js} +39 -39
- package/dist/zonos-elements/p-Dwg61Ft_.js +1 -0
- package/dist/zonos-elements/p-U33isUJG.js +1 -0
- package/dist/zonos-elements/{p-Be3Hpms1.system.js → p-XoQH3S7Z.system.js} +1 -1
- package/dist/zonos-elements/{p-474e8a92.system.entry.js → p-a1022808.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-83aa1c8c.entry.js → p-ad04bba2.entry.js} +1 -1
- package/dist/zonos-elements/{p-a938c174.entry.js → p-b51010b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-dfc87b10.system.entry.js → p-c33b8f6a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a40fd99b.system.entry.js → p-cccaad60.system.entry.js} +39 -40
- package/dist/zonos-elements/p-d3345b2c.entry.js +1 -0
- package/dist/zonos-elements/{p-249c1ee1.system.entry.js → p-d8f375da.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-2603dce0.entry.js → p-e216cc8c.entry.js} +1 -1
- package/dist/zonos-elements/{p-b79036fc.entry.js → p-e7fdb2c9.entry.js} +1 -1
- package/dist/zonos-elements/p-ebe157b5.entry.js +1 -0
- package/dist/zonos-elements/p-ef5344ea.entry.js +1 -0
- package/dist/zonos-elements/{p-be1237fc.system.entry.js → p-f3d9a380.system.entry.js} +97 -97
- package/dist/zonos-elements/{p-31043c2e.system.entry.js → p-f5f95990.system.entry.js} +296 -297
- package/dist/zonos-elements/p-fda89981.system.entry.js +13 -0
- package/dist/zonos-elements/{p-d4d2b39e.entry.js → p-fddf3556.entry.js} +1 -1
- package/dist/zonos-elements/p-iAIzUA4k.js +1 -0
- package/dist/zonos-elements/{p-BpDCLBwW.js → p-n5PZKz1k.js} +1 -1
- package/dist/zonos-elements/{p-DoEHepOc.system.js → p-ojtNq-r5.system.js} +1 -1
- package/dist/zonos-elements/{p-C_z9WL8a.js → p-r-YGHhLa.js} +1 -1
- package/dist/zonos-elements/{p-CBx5nYet.system.js → p-vTIygnHq.system.js} +1 -1
- package/dist/zonos-elements/{p-DQZncB2d.system.js → p-zsTASoh2.system.js} +3 -3
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/item-customization.d.ts +25 -0
- package/item-customization.js +52 -0
- package/package.json +7 -4
- package/dist/cjs/shouldRenderTaxIdInput-TxekHCp7.js +0 -43
- package/dist/esm/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -40
- package/dist/esm/throttle-Cvlvb-dm.js +0 -85
- package/dist/esm-es5/debounce-CrmpwbEE.js +0 -1
- package/dist/esm-es5/getBorderRadius-DYfkeXdx.js +0 -8
- package/dist/esm-es5/localization-BIh-4pc_.js +0 -348
- package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -17
- package/dist/esm-es5/throttle-Cvlvb-dm.js +0 -46
- package/dist/zonos-elements/p-0457f579.entry.js +0 -1
- package/dist/zonos-elements/p-06fe2939.entry.js +0 -1
- package/dist/zonos-elements/p-24f3c547.entry.js +0 -1
- package/dist/zonos-elements/p-34656e6c.entry.js +0 -1
- package/dist/zonos-elements/p-39ee1558.entry.js +0 -1
- package/dist/zonos-elements/p-3a2da031.entry.js +0 -1
- package/dist/zonos-elements/p-4806b264.system.entry.js +0 -13
- package/dist/zonos-elements/p-725e29bb.entry.js +0 -1
- package/dist/zonos-elements/p-BGktDPwA.system.js +0 -1
- package/dist/zonos-elements/p-Bi-s0fp_.system.js +0 -17
- package/dist/zonos-elements/p-CEK_Wk6v.system.js +0 -7
- package/dist/zonos-elements/p-CFbfEmjN.js +0 -1
- package/dist/zonos-elements/p-CcJF6xhQ.js +0 -1
- package/dist/zonos-elements/p-Cxuiqv1I.js +0 -1
- package/dist/zonos-elements/p-D-bZg-Pc.js +0 -1
- package/dist/zonos-elements/p-DOD2I44l.system.js +0 -348
- package/dist/zonos-elements/p-DS-qw_qc.system.js +0 -517
- package/dist/zonos-elements/p-DZ2mevDK.js +0 -1
- package/dist/zonos-elements/p-DnjGkbEy.js +0 -1
- package/dist/zonos-elements/p-FRWZayxL.js +0 -1
- package/dist/zonos-elements/p-Mrz_lnC1.js +0 -1
- package/dist/zonos-elements/p-ad9ff14c.entry.js +0 -1
- package/dist/zonos-elements/p-bb3546c0.entry.js +0 -1
- package/dist/zonos-elements/p-c1cbfdba.entry.js +0 -1
- package/dist/zonos-elements/p-c47ce656.entry.js +0 -1
- package/dist/zonos-elements/p-c9d5d8f1.entry.js +0 -1
- package/dist/zonos-elements/p-clDfq9AL.js +0 -1
- package/dist/zonos-elements/p-d74bc3e8.entry.js +0 -1
- package/dist/zonos-elements/p-d8b312e5.entry.js +0 -1
- package/dist/zonos-elements/p-db87b0dd.entry.js +0 -1
- package/dist/zonos-elements/p-defc2d18.entry.js +0 -1
- package/dist/zonos-elements/p-rVp8hgWw.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { z as zonosStore, c as createStore } from './zonosStore-
|
|
2
|
-
import { x as cartStoreNextStep, j as cartStoreClearCheckoutInterval, t as trackConversionEvent, y as isPolicyConsentRequired, G as policyConsentStore, C as validateCheckoutSession, b as stripeStore, d as cartStore, n as stripeStoreHandleInventoryCheck, A as storeCreditStoreApplyCredit, T as stripeStoreRecordPolicyConsent, B as storeCreditStoreCoversFullAmount, D as storeCreditStoreCreateOrder, K as storeCreditStoreGetEffectiveAmount } from './cart-
|
|
3
|
-
import { s as storageStore, t as translate } from './localization-
|
|
1
|
+
import { z as zonosStore, c as createStore } from './zonosStore-BXP9FvIt.js';
|
|
2
|
+
import { x as cartStoreNextStep, j as cartStoreClearCheckoutInterval, t as trackConversionEvent, y as isPolicyConsentRequired, G as policyConsentStore, C as validateCheckoutSession, b as stripeStore, d as cartStore, n as stripeStoreHandleInventoryCheck, A as storeCreditStoreApplyCredit, T as stripeStoreRecordPolicyConsent, B as storeCreditStoreCoversFullAmount, D as storeCreditStoreCreateOrder, K as storeCreditStoreGetEffectiveAmount } from './cart-DmJkjiDE.js';
|
|
3
|
+
import { s as storageStore, t as translate } from './localization-DHM91diu.js';
|
|
4
4
|
import { h as handleFetch, g as getIsTestMode, l as logError, j as jsonParse } from './handleFetch-D5GYDF-O.js';
|
|
5
5
|
import { i as isContrastColor } from './isContrastColor-CWLU13s9.js';
|
|
6
6
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
7
|
-
import { i as isAnalyticsRelayInIframe, a as enqueueRelayEvent, s as submitGtag } from './submitGtag-
|
|
7
|
+
import { i as isAnalyticsRelayInIframe, a as enqueueRelayEvent, s as submitGtag } from './submitGtag-BEFrutel.js';
|
|
8
8
|
|
|
9
9
|
/*!
|
|
10
10
|
* paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-DmJkjiDE.js';
|
|
2
|
+
import { s as storageStore } from './localization-DHM91diu.js';
|
|
3
3
|
import { l as logError, h as handleFetch } from './handleFetch-D5GYDF-O.js';
|
|
4
4
|
|
|
5
5
|
const placeTestOrder = async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-DmJkjiDE.js';
|
|
2
|
+
import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-DHM91diu.js';
|
|
3
3
|
|
|
4
4
|
const getDisplayCurrency = () => {
|
|
5
5
|
var _a, _b;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { c as countryRequireShortAddressCode } from './ShortAddressCode-nJ6oI8-n.js';
|
|
2
|
+
|
|
3
|
+
const isInShortAddressCodeCountry = (countryCode) => {
|
|
4
|
+
return countryRequireShortAddressCode.includes(countryCode);
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Checks if the short address code input should be rendered based on the country code.
|
|
8
|
+
*/
|
|
9
|
+
const shouldRenderShortAddressCodeInput = ({ countryCode, }) => {
|
|
10
|
+
// If country require short address code, show the input
|
|
11
|
+
const isCountryRequireShortAddressCode = isInShortAddressCodeCountry(countryCode);
|
|
12
|
+
if (isCountryRequireShortAddressCode) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
// If country doesn't require short address code, no need to show the input
|
|
16
|
+
return false;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { shouldRenderShortAddressCodeInput as s };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { r as requireIsObject, f as getDefaultExportFromCjs } from './zonosStore-BXP9FvIt.js';
|
|
2
|
+
import { r as requireDebounce } from './debounce-DHj2iHA1.js';
|
|
3
|
+
import { h } from './index-_lt63o7c.js';
|
|
4
|
+
import { V as resolveTaxIdSelection, b as stripeStore } from './cart-DmJkjiDE.js';
|
|
5
|
+
import { t as translate } from './localization-DHM91diu.js';
|
|
6
|
+
import { t as taxIdLabelForCheckout, d as isCheckoutTaxIdTypeValue } from './taxIdRules-xYlx7ZXW.js';
|
|
7
|
+
|
|
8
|
+
var throttle_1;
|
|
9
|
+
var hasRequiredThrottle;
|
|
10
|
+
|
|
11
|
+
function requireThrottle () {
|
|
12
|
+
if (hasRequiredThrottle) return throttle_1;
|
|
13
|
+
hasRequiredThrottle = 1;
|
|
14
|
+
var debounce = requireDebounce(),
|
|
15
|
+
isObject = requireIsObject();
|
|
16
|
+
|
|
17
|
+
/** Error message constants. */
|
|
18
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Creates a throttled function that only invokes `func` at most once per
|
|
22
|
+
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
23
|
+
* method to cancel delayed `func` invocations and a `flush` method to
|
|
24
|
+
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
25
|
+
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
26
|
+
* timeout. The `func` is invoked with the last arguments provided to the
|
|
27
|
+
* throttled function. Subsequent calls to the throttled function return the
|
|
28
|
+
* result of the last `func` invocation.
|
|
29
|
+
*
|
|
30
|
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
31
|
+
* invoked on the trailing edge of the timeout only if the throttled function
|
|
32
|
+
* is invoked more than once during the `wait` timeout.
|
|
33
|
+
*
|
|
34
|
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
35
|
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
36
|
+
*
|
|
37
|
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
38
|
+
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
39
|
+
*
|
|
40
|
+
* @static
|
|
41
|
+
* @memberOf _
|
|
42
|
+
* @since 0.1.0
|
|
43
|
+
* @category Function
|
|
44
|
+
* @param {Function} func The function to throttle.
|
|
45
|
+
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
46
|
+
* @param {Object} [options={}] The options object.
|
|
47
|
+
* @param {boolean} [options.leading=true]
|
|
48
|
+
* Specify invoking on the leading edge of the timeout.
|
|
49
|
+
* @param {boolean} [options.trailing=true]
|
|
50
|
+
* Specify invoking on the trailing edge of the timeout.
|
|
51
|
+
* @returns {Function} Returns the new throttled function.
|
|
52
|
+
* @example
|
|
53
|
+
*
|
|
54
|
+
* // Avoid excessively updating the position while scrolling.
|
|
55
|
+
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
56
|
+
*
|
|
57
|
+
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
58
|
+
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
59
|
+
* jQuery(element).on('click', throttled);
|
|
60
|
+
*
|
|
61
|
+
* // Cancel the trailing throttled invocation.
|
|
62
|
+
* jQuery(window).on('popstate', throttled.cancel);
|
|
63
|
+
*/
|
|
64
|
+
function throttle(func, wait, options) {
|
|
65
|
+
var leading = true,
|
|
66
|
+
trailing = true;
|
|
67
|
+
|
|
68
|
+
if (typeof func != 'function') {
|
|
69
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
70
|
+
}
|
|
71
|
+
if (isObject(options)) {
|
|
72
|
+
leading = 'leading' in options ? !!options.leading : leading;
|
|
73
|
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
74
|
+
}
|
|
75
|
+
return debounce(func, wait, {
|
|
76
|
+
'leading': leading,
|
|
77
|
+
'maxWait': wait,
|
|
78
|
+
'trailing': trailing
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
throttle_1 = throttle;
|
|
83
|
+
return throttle_1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var throttleExports = requireThrottle();
|
|
87
|
+
var throttle = /*@__PURE__*/getDefaultExportFromCjs(throttleExports);
|
|
88
|
+
|
|
89
|
+
const getTaxIdFieldState = ({ companyName, countryCode, errorField, errorMessage, shouldRequirePeruTaxId, taxIdType, }) => {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
const { rendered, selectedType, send, typeOptions } = resolveTaxIdSelection({
|
|
92
|
+
companyName,
|
|
93
|
+
countryCode,
|
|
94
|
+
shouldRequirePeruTaxId,
|
|
95
|
+
taxIdType,
|
|
96
|
+
});
|
|
97
|
+
if (!rendered) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
const singleTypeLabel = typeOptions
|
|
101
|
+
? null
|
|
102
|
+
: taxIdLabelForCheckout(countryCode);
|
|
103
|
+
return {
|
|
104
|
+
inputLabel: (_a = selectedType === null || selectedType === void 0 ? void 0 : selectedType.label) !== null && _a !== void 0 ? _a : singleTypeLabel === null || singleTypeLabel === void 0 ? void 0 : singleTypeLabel.friendlyName,
|
|
105
|
+
inputPlaceholder: (_b = selectedType === null || selectedType === void 0 ? void 0 : selectedType.placeholder) !== null && _b !== void 0 ? _b : singleTypeLabel === null || singleTypeLabel === void 0 ? void 0 : singleTypeLabel.placeholder,
|
|
106
|
+
selectedValue: (selectedType === null || selectedType === void 0 ? void 0 : selectedType.value) || '',
|
|
107
|
+
showValueInput: send,
|
|
108
|
+
typeError: errorField === 'type' ? errorMessage : '',
|
|
109
|
+
typeOptions,
|
|
110
|
+
valueError: errorField === 'value' ? errorMessage : '',
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const renderTaxIdFields = ({ companyName, countryCode, errorField, errorMessage, onTaxIdChange, shouldRequirePeruTaxId, taxId, taxIdType, }) => {
|
|
115
|
+
const state = getTaxIdFieldState({
|
|
116
|
+
companyName,
|
|
117
|
+
countryCode,
|
|
118
|
+
errorField,
|
|
119
|
+
errorMessage,
|
|
120
|
+
shouldRequirePeruTaxId,
|
|
121
|
+
taxIdType,
|
|
122
|
+
});
|
|
123
|
+
if (!state) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
return (h("div", { class: "zonos--tax-id-input" }, state.typeOptions && (h("zonos-stripe-select", { error: state.typeError, isError: !!state.typeError, onSelectChange: (event) => {
|
|
127
|
+
if (isCheckoutTaxIdTypeValue(event.detail)) {
|
|
128
|
+
stripeStore.taxIdType = event.detail;
|
|
129
|
+
}
|
|
130
|
+
}, options: state.typeOptions.map(option => ({
|
|
131
|
+
label: translate(option.label),
|
|
132
|
+
value: option.value,
|
|
133
|
+
})), selectLabel: translate('Tax id type'), selectedValue: state.selectedValue, value: state.selectedValue })), state.showValueInput && (h("zonos-stripe-input", { error: state.valueError, inputLabel: state.inputLabel ? translate(state.inputLabel) : '', inputPlaceholder: state.inputPlaceholder || '', inputValue: taxId, isError: !!state.valueError, onInputChange: (event) => {
|
|
134
|
+
stripeStore.taxId = event.detail;
|
|
135
|
+
onTaxIdChange === null || onTaxIdChange === void 0 ? void 0 : onTaxIdChange(event.detail);
|
|
136
|
+
} }))));
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export { renderTaxIdFields as r, throttle as t };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { t as taxIdTypeOptions, p as peruTaxIdDigitLength, a as checkoutTaxIdTypeValues, i as isCountryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-DMIgN_sT.js';
|
|
2
|
+
|
|
3
|
+
const stripTaxIdSeparators = (taxId) => taxId.replace(/[\s-]/g, '');
|
|
4
|
+
const rfcRegex = /^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/;
|
|
5
|
+
const curpRegex = /^[A-Z]{4}[0-9]{6}[HMX][A-Z]{5}[A-Z0-9][0-9]$/;
|
|
6
|
+
const isMexicoTaxIdType = (taxIdType) => taxIdTypeOptions.MX.some(option => option.value === taxIdType);
|
|
7
|
+
const isPeruTaxIdType = (taxIdType) => taxIdTypeOptions.PE.some(option => option.value === taxIdType);
|
|
8
|
+
const isCheckoutTaxIdTypeValue = (taxIdType) => checkoutTaxIdTypeValues.some(value => value === taxIdType);
|
|
9
|
+
/** 8 digits are a DNI, 9 a carné, 11 an RUC. Anything else is not a Peru tax id. */
|
|
10
|
+
const peruTaxIdTypeFromValue = (taxId) => {
|
|
11
|
+
const digits = stripTaxIdSeparators(taxId);
|
|
12
|
+
if (!/^\d+$/.test(digits)) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
if (digits.length === peruTaxIdDigitLength.DNI) {
|
|
16
|
+
return 'DNI';
|
|
17
|
+
}
|
|
18
|
+
if (digits.length === peruTaxIdDigitLength.CE) {
|
|
19
|
+
return 'CE';
|
|
20
|
+
}
|
|
21
|
+
if (digits.length === peruTaxIdDigitLength.RUC) {
|
|
22
|
+
return 'RUC';
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
26
|
+
const isPeruTaxIdActive = ({ countryCode, shouldRequirePeruTaxId, }) => shouldRequirePeruTaxId && countryCode === 'PE';
|
|
27
|
+
/**
|
|
28
|
+
* Peru stays off `countryRequireTaxId`. The API flag decides which stores see it.
|
|
29
|
+
* Mexico and Peru pick the kind from a dropdown instead of a regex.
|
|
30
|
+
*/
|
|
31
|
+
const taxIdTypeOptionsForCheckout = ({ countryCode, shouldRequirePeruTaxId, }) => {
|
|
32
|
+
if (isPeruTaxIdActive({ countryCode, shouldRequirePeruTaxId })) {
|
|
33
|
+
return taxIdTypeOptions.PE;
|
|
34
|
+
}
|
|
35
|
+
if (countryCode === 'MX') {
|
|
36
|
+
return taxIdTypeOptions.MX;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
const taxIdLabelForCheckout = (countryCode) => {
|
|
41
|
+
if (isCountryRequireTaxId(countryCode)) {
|
|
42
|
+
return shipToTaxIdLabels[countryCode];
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { isPeruTaxIdType as a, isPeruTaxIdActive as b, curpRegex as c, isCheckoutTaxIdTypeValue as d, taxIdTypeOptionsForCheckout as e, isMexicoTaxIdType as i, peruTaxIdTypeFromValue as p, rfcRegex as r, stripTaxIdSeparators as s, taxIdLabelForCheckout as t };
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { t as translate, s as storageStore, z as storageStoreOnChange, l as localizationStore } from './localization-
|
|
3
|
-
import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore-
|
|
4
|
-
import { M as MIN_POSTAL_CODE_LENGTH } from './getMissingRequiredShippingFields-
|
|
2
|
+
import { t as translate, s as storageStore, z as storageStoreOnChange, l as localizationStore } from './localization-DHM91diu.js';
|
|
3
|
+
import { z as zonosStore, e as getShouldRequirePeruTaxId, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
4
|
+
import { M as MIN_POSTAL_CODE_LENGTH } from './getMissingRequiredShippingFields-DljgpDZe.js';
|
|
5
5
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
6
|
-
import { U as extractName, b as stripeStore, w as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-
|
|
6
|
+
import { U as extractName, b as stripeStore, w as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-DmJkjiDE.js';
|
|
7
7
|
import { R as RemoveIcon$1 } from './RemoveIcon-C2QMVeWW.js';
|
|
8
8
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
|
|
9
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
10
|
-
import { t as throttle } from './
|
|
9
|
+
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
10
|
+
import { t as throttle, r as renderTaxIdFields } from './taxIdFields-ByEYfsO5.js';
|
|
11
11
|
import { i as isCheckoutMobile } from './handleFetch-D5GYDF-O.js';
|
|
12
|
-
import {
|
|
12
|
+
import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
|
|
13
13
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
14
|
-
import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-Cye-evFK.js';
|
|
15
14
|
import { i as inheritAriaAttributes, a as inheritAttributes } from './helpers-DJIdCwJ5.js';
|
|
16
15
|
import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
|
|
17
|
-
import './
|
|
16
|
+
import './taxIdRules-xYlx7ZXW.js';
|
|
17
|
+
import './TaxId-DMIgN_sT.js';
|
|
18
|
+
import './debounce-DHj2iHA1.js';
|
|
18
19
|
import './ShortAddressCode-nJ6oI8-n.js';
|
|
19
20
|
|
|
20
21
|
const zonosAddressCompletionDialogCss = () => `: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--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:24px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-bottom:5px;gap:20px;-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--selected-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--completion-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--completion-name-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--completion-name-row zonos-input{-ms-flex:1;flex:1}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--completion-name-row{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--submit-btn{-ms-flex-order:1;order:1}`;
|
|
@@ -532,7 +533,7 @@ const mergeAddress = ({ addresses, delimiter = ' ', }) => {
|
|
|
532
533
|
return Array.from(addressSet).join(delimiter);
|
|
533
534
|
};
|
|
534
535
|
|
|
535
|
-
const zonosCustomAddressCss = () => `.sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}`;
|
|
536
|
+
const zonosCustomAddressCss = () => `.sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}`;
|
|
536
537
|
|
|
537
538
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
538
539
|
var t = {};
|
|
@@ -556,6 +557,10 @@ const ZonosAddress = class {
|
|
|
556
557
|
* Default address for stripe
|
|
557
558
|
*/
|
|
558
559
|
this.defaultAddress = [];
|
|
560
|
+
/**
|
|
561
|
+
* Which tax id control the error belongs on. Empty when there is no error.
|
|
562
|
+
*/
|
|
563
|
+
this.taxIdErrorField = '';
|
|
559
564
|
/**
|
|
560
565
|
* Error message for tax id input
|
|
561
566
|
*/
|
|
@@ -882,9 +887,6 @@ const ZonosAddress = class {
|
|
|
882
887
|
const hasErrors = line1 || postalCode || state || city || firstName || lastName || phone;
|
|
883
888
|
return !hasErrors;
|
|
884
889
|
}
|
|
885
|
-
isInTaxIdCountry(countryCode) {
|
|
886
|
-
return countryRequireTaxId.includes(countryCode);
|
|
887
|
-
}
|
|
888
890
|
/**
|
|
889
891
|
* Render tax id input based on ship to country code
|
|
890
892
|
*/
|
|
@@ -899,22 +901,15 @@ const ZonosAddress = class {
|
|
|
899
901
|
if (!countryCode) {
|
|
900
902
|
return null;
|
|
901
903
|
}
|
|
902
|
-
|
|
903
|
-
if (!this.isInTaxIdCountry(countryCode)) {
|
|
904
|
-
return null;
|
|
905
|
-
}
|
|
906
|
-
const taxIdInputRendered = shouldRenderTaxIdInput({
|
|
904
|
+
return renderTaxIdFields({
|
|
907
905
|
companyName: stripeStore.companyName,
|
|
908
906
|
countryCode,
|
|
907
|
+
errorField: this.taxIdErrorField,
|
|
908
|
+
errorMessage: this.taxIdErrorMessage,
|
|
909
|
+
shouldRequirePeruTaxId: getShouldRequirePeruTaxId(),
|
|
910
|
+
taxId: stripeStore.taxId || '',
|
|
911
|
+
taxIdType: stripeStore.taxIdType,
|
|
909
912
|
});
|
|
910
|
-
// Don't render tax id input if the country doesn't require tax id
|
|
911
|
-
if (!taxIdInputRendered) {
|
|
912
|
-
return null;
|
|
913
|
-
}
|
|
914
|
-
const taxIdInputInfo = shipToTaxIdLabels[countryCode];
|
|
915
|
-
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { error: this.taxIdErrorMessage, inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
|
|
916
|
-
stripeStore.taxId = event.detail;
|
|
917
|
-
} })));
|
|
918
913
|
}
|
|
919
914
|
/**
|
|
920
915
|
* Render short address code input based on ship to country code
|
|
@@ -1451,10 +1446,10 @@ const ZonosAddress = class {
|
|
|
1451
1446
|
this.country = localizationStore.selectedCountryCode;
|
|
1452
1447
|
}
|
|
1453
1448
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
1454
|
-
return (h(Host, { key: '
|
|
1449
|
+
return (h(Host, { key: 'd3bb2635d41dd74ba52ff37034f348fc0a763366', class: classes([
|
|
1455
1450
|
'zonos--address zonos--elements',
|
|
1456
1451
|
`zonos--${this.type}-address`,
|
|
1457
|
-
]) }, h("zonos-text", { key: '
|
|
1452
|
+
]) }, h("zonos-text", { key: '7d3f67988eac13616f3470f46f05060e194c2df7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: '1bd63bd015542ec3302f087bcbf3d9549f342c25', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
|
|
1458
1453
|
}
|
|
1459
1454
|
get el() { return getElement(this); }
|
|
1460
1455
|
static get watchers() { return {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, d as createEvent } from './index-_lt63o7c.js';
|
|
2
|
-
import { t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { t as translate, l as localizationStore } from './localization-DHM91diu.js';
|
|
3
3
|
import { i as isTextContainsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
|
|
4
|
-
import { a as zonosStoreFontFamily } from './zonosStore-
|
|
4
|
+
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
5
5
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
6
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
6
|
+
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
7
7
|
import './handleFetch-D5GYDF-O.js';
|
|
8
8
|
import './VarianceTest-BJmZPrZl.js';
|
|
9
9
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { t as throttle } from './
|
|
3
|
-
import { U as extractName, w as stripeStorePrefetchLandedCost, b as stripeStore, t as trackConversionEvent, J as stripeStoreOnChange, d as cartStore } from './cart-
|
|
4
|
-
import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-
|
|
5
|
-
import { z as zonosStore, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { t as throttle, r as renderTaxIdFields } from './taxIdFields-ByEYfsO5.js';
|
|
3
|
+
import { U as extractName, w as stripeStorePrefetchLandedCost, b as stripeStore, t as trackConversionEvent, J as stripeStoreOnChange, d as cartStore } from './cart-DmJkjiDE.js';
|
|
4
|
+
import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-DHM91diu.js';
|
|
5
|
+
import { e as getShouldRequirePeruTaxId, z as zonosStore, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
6
6
|
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-D5GYDF-O.js';
|
|
7
|
-
import {
|
|
7
|
+
import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
|
|
8
8
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
9
9
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import './
|
|
10
|
+
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
11
|
+
import './debounce-DHj2iHA1.js';
|
|
12
|
+
import './taxIdRules-xYlx7ZXW.js';
|
|
13
|
+
import './TaxId-DMIgN_sT.js';
|
|
13
14
|
import './isDarkColor-YdrG78th.js';
|
|
14
15
|
import './ShortAddressCode-nJ6oI8-n.js';
|
|
15
16
|
|
|
@@ -70,7 +71,7 @@ const buildAddressContacts = ({ currentEvent, defaultAddress, }) => {
|
|
|
70
71
|
return [currentContact, ...defaultAddress];
|
|
71
72
|
};
|
|
72
73
|
|
|
73
|
-
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}`;
|
|
74
|
+
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--tax-id-input.sc-zonos-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}`;
|
|
74
75
|
|
|
75
76
|
const ZonosAddress = class {
|
|
76
77
|
constructor(hostRef) {
|
|
@@ -86,6 +87,10 @@ const ZonosAddress = class {
|
|
|
86
87
|
* Default address for stripe
|
|
87
88
|
*/
|
|
88
89
|
this.defaultAddress = [];
|
|
90
|
+
/**
|
|
91
|
+
* Which tax id control the error belongs on. Empty when there is no error.
|
|
92
|
+
*/
|
|
93
|
+
this.taxIdErrorField = '';
|
|
89
94
|
/**
|
|
90
95
|
* Error message for tax id input
|
|
91
96
|
*/
|
|
@@ -294,9 +299,6 @@ const ZonosAddress = class {
|
|
|
294
299
|
}
|
|
295
300
|
void this.watchInitStripe();
|
|
296
301
|
}
|
|
297
|
-
isInTaxIdCountry(countryCode) {
|
|
298
|
-
return countryRequireTaxId.includes(countryCode);
|
|
299
|
-
}
|
|
300
302
|
/**
|
|
301
303
|
* Render tax id input based on ship to country code
|
|
302
304
|
*/
|
|
@@ -311,23 +313,18 @@ const ZonosAddress = class {
|
|
|
311
313
|
if (!countryCode) {
|
|
312
314
|
return null;
|
|
313
315
|
}
|
|
314
|
-
|
|
315
|
-
if (!this.isInTaxIdCountry(countryCode)) {
|
|
316
|
-
return null;
|
|
317
|
-
}
|
|
318
|
-
const taxIdInputRendered = shouldRenderTaxIdInput({
|
|
316
|
+
return renderTaxIdFields({
|
|
319
317
|
companyName: stripeStore.companyName,
|
|
320
318
|
countryCode,
|
|
319
|
+
errorField: this.taxIdErrorField,
|
|
320
|
+
errorMessage: this.taxIdErrorMessage,
|
|
321
|
+
onTaxIdChange: value => {
|
|
322
|
+
this.taxIdChanged.emit(value);
|
|
323
|
+
},
|
|
324
|
+
shouldRequirePeruTaxId: getShouldRequirePeruTaxId(),
|
|
325
|
+
taxId: stripeStore.taxId || '',
|
|
326
|
+
taxIdType: stripeStore.taxIdType,
|
|
321
327
|
});
|
|
322
|
-
// Don't render tax id input if the country doesn't require tax id
|
|
323
|
-
if (!taxIdInputRendered) {
|
|
324
|
-
return null;
|
|
325
|
-
}
|
|
326
|
-
const taxIdInputInfo = shipToTaxIdLabels[countryCode];
|
|
327
|
-
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) => {
|
|
328
|
-
stripeStore.taxId = event.detail;
|
|
329
|
-
this.taxIdChanged.emit(event.detail);
|
|
330
|
-
} }), this.taxIdErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.taxIdErrorMessage))));
|
|
331
328
|
}
|
|
332
329
|
/**
|
|
333
330
|
* Render short address code input based on ship to country code
|
|
@@ -414,11 +411,11 @@ const ZonosAddress = class {
|
|
|
414
411
|
this.isAddressFilled = true;
|
|
415
412
|
}
|
|
416
413
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
417
|
-
return (h(Host, { key: '
|
|
414
|
+
return (h(Host, { key: 'bbf12ad9213fbbbaf6c14ecb0cb7acb0679f3d6e', class: classes([
|
|
418
415
|
'zonos--address',
|
|
419
416
|
'zonos--elements',
|
|
420
417
|
`zonos--${this.type}-address`,
|
|
421
|
-
]) }, this.titleText && (h("zonos-text", { key: '
|
|
418
|
+
]) }, this.titleText && (h("zonos-text", { key: 'a81550755a359e1a9c46acc99eef7749959187ee', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: 'bdba9c19992622bcf0354366080b1932c0e28bb2', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: 'b376efea8ef5d57f525be9b6eed3f98c67b2834e', class: "zonos--address-component" })));
|
|
422
419
|
}
|
|
423
420
|
get el() { return getElement(this); }
|
|
424
421
|
static get watchers() { return {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-
|
|
3
|
-
import { d as cartStore } from './cart-
|
|
4
|
-
import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-
|
|
5
|
-
import { z as zonosStore } from './zonosStore-
|
|
2
|
+
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-BV5GTPmh.js';
|
|
3
|
+
import { d as cartStore } from './cart-DmJkjiDE.js';
|
|
4
|
+
import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-DHM91diu.js';
|
|
5
|
+
import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
|
|
6
6
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
7
7
|
import { l as logError } from './handleFetch-D5GYDF-O.js';
|
|
8
|
+
import './taxIdRules-xYlx7ZXW.js';
|
|
9
|
+
import './TaxId-DMIgN_sT.js';
|
|
8
10
|
import './isDarkColor-YdrG78th.js';
|
|
9
|
-
import './getBorderRadius-
|
|
10
|
-
import './TaxId-Cye-evFK.js';
|
|
11
|
+
import './getBorderRadius-BiGd45jw.js';
|
|
11
12
|
|
|
12
13
|
const zonosAirwallexPaymentCss = () => `.sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}`;
|
|
13
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { a as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
3
3
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
4
4
|
import './VarianceTest-BJmZPrZl.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { a as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
3
3
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
4
4
|
import './VarianceTest-BJmZPrZl.js';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
3
3
|
import { i as inheritAriaAttributes, a as inheritAttributes } from './helpers-DJIdCwJ5.js';
|
|
4
4
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
5
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
5
|
+
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
6
6
|
import { i as isColorVariable } from './isColorVariable-DXXUq2Lv.js';
|
|
7
7
|
import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
|
|
8
8
|
import { s as styles } from './styles-BTIeCf3T.js';
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement, d as createEvent } from './index-_lt63o7c.js';
|
|
2
|
-
import { a as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
|
|
3
3
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
5
|
-
import { b as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
|
|
5
|
+
import { b as stripeStore, t as trackConversionEvent } from './cart-DmJkjiDE.js';
|
|
6
|
+
import { s as storageStore } from './localization-DHM91diu.js';
|
|
7
7
|
import { l as logError } from './handleFetch-D5GYDF-O.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-BfW5aLJw.js';
|
|
9
9
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
10
|
+
import './taxIdRules-xYlx7ZXW.js';
|
|
11
|
+
import './TaxId-DMIgN_sT.js';
|
|
10
12
|
import './isDarkColor-YdrG78th.js';
|
|
11
|
-
import './TaxId-Cye-evFK.js';
|
|
12
13
|
import './isContrastColor-CWLU13s9.js';
|
|
13
|
-
import './submitGtag-
|
|
14
|
+
import './submitGtag-BEFrutel.js';
|
|
14
15
|
|
|
15
16
|
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)}`;
|
|
16
17
|
|