@zonos/elements 1.3.281 → 1.3.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-3313cb0c.js → cart-dc31b242.js} +2 -1
- package/dist/cjs/{collect-2659c5af.js → collect-463ab3d7.js} +2 -2
- package/dist/cjs/getMissingRequiredShippingFields-7cd21100.js +50 -0
- package/dist/cjs/{hasInclusivePrice-d132daaa.js → hasInclusivePrice-d14b9d71.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-26f52c07.js → invoice-8c995041.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-6189080f.js → localization-491121ad.js} +240 -0
- package/dist/cjs/{paypal-f6a256b5.js → paypal-2a4c374c.js} +2 -2
- package/dist/cjs/{placeTestOrder-695f2b32.js → placeTestOrder-a940a2e9.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-fe56094f.js → renderCheckoutCurrency-ab39875a.js} +2 -2
- package/dist/cjs/{zonos-address-display_8.cjs.entry.js → zonos-address-completion-dialog_7.cjs.entry.js} +141 -149
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +150 -0
- package/dist/cjs/zonos-address_4.cjs.entry.js +73 -12
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +3 -3
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +9 -9
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +89 -20
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +19 -19
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -8
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +14 -14
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-completion-dialog/zonos-address-completion-dialog.css +105 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-completion-dialog/zonos-address-completion-dialog.js +341 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +5 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +52 -2
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/stripe.js +1 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
- package/dist/collection/components/store/translationStore/strings.base.js +12 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
- package/dist/collection/components/store/translationStore/strings.french.js +12 -0
- package/dist/collection/components/store/translationStore/strings.german.js +12 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +11 -6
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/applyAddressCompletion.js +23 -0
- package/dist/collection/components/utils/checkout/buildAddressContacts.js +57 -0
- package/dist/collection/components/utils/checkout/getMissingRequiredShippingFields.js +44 -0
- package/dist/esm/{cart-c66ec17e.js → cart-5282f6c1.js} +2 -2
- package/dist/esm/{collect-915fd59d.js → collect-fdbab973.js} +2 -2
- package/dist/esm/getMissingRequiredShippingFields-bdeecbff.js +47 -0
- package/dist/esm/{hasInclusivePrice-6fd935f3.js → hasInclusivePrice-161e203f.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-2a17c93c.js → invoice-cf6ad79e.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-6d36209f.js → localization-0953a048.js} +240 -0
- package/dist/esm/{paypal-cae1d404.js → paypal-7c82eac4.js} +2 -2
- package/dist/esm/{placeTestOrder-955269d2.js → placeTestOrder-6a746207.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-951386a5.js → renderCheckoutCurrency-44f897a1.js} +2 -2
- package/dist/esm/{zonos-address-display_8.entry.js → zonos-address-completion-dialog_7.entry.js} +142 -149
- package/dist/esm/zonos-address-display_2.entry.js +145 -0
- package/dist/esm/zonos-address_4.entry.js +73 -12
- package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +9 -9
- package/dist/esm/zonos-cart-items_12.entry.js +90 -21
- package/dist/esm/zonos-checkbox_2.entry.js +5 -5
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -6
- package/dist/esm/zonos-collect-finish_6.entry.js +19 -19
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +10 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +6 -6
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -8
- package/dist/esm/zonos-invoice-finish_5.entry.js +14 -14
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +4 -4
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/{cart-c66ec17e.js → cart-5282f6c1.js} +1 -1
- package/dist/esm-es5/{collect-915fd59d.js → collect-fdbab973.js} +1 -1
- package/dist/esm-es5/getMissingRequiredShippingFields-bdeecbff.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-6fd935f3.js → hasInclusivePrice-161e203f.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-2a17c93c.js → invoice-cf6ad79e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-0953a048.js +1 -0
- package/dist/esm-es5/{paypal-cae1d404.js → paypal-7c82eac4.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-955269d2.js → placeTestOrder-6a746207.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-951386a5.js → renderCheckoutCurrency-44f897a1.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -0
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- 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-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 +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- 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-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_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-input.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-link.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-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +123 -0
- 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-address-completion-dialog/zonos-address-completion-dialog.d.ts +75 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +16 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
- package/dist/types/components/utils/checkout/applyAddressCompletion.d.ts +25 -0
- package/dist/types/components/utils/checkout/buildAddressContacts.d.ts +21 -0
- package/dist/types/components/utils/checkout/getMissingRequiredShippingFields.d.ts +35 -0
- package/dist/types/components.d.ts +97 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-0287f9cd.system.js +1 -0
- package/dist/zonos-elements/{p-5aee5de5.system.entry.js → p-05cb0a0d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-03fda4a8.entry.js → p-0fb4e032.entry.js} +1 -1
- package/dist/zonos-elements/{p-727387ed.entry.js → p-10584546.entry.js} +1 -1
- package/dist/zonos-elements/p-193fc2da.entry.js +1 -0
- package/dist/zonos-elements/p-1977f4b5.js +1 -0
- package/dist/zonos-elements/p-1cf5e2ce.system.entry.js +1 -0
- package/dist/zonos-elements/p-1cf76dd3.entry.js +1 -0
- package/dist/zonos-elements/p-1d31b966.system.js +1 -0
- package/dist/zonos-elements/{p-0ad6a92b.system.entry.js → p-21489ff1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-734d646b.entry.js → p-21f7d57b.entry.js} +1 -1
- package/dist/zonos-elements/p-2394b186.system.js +1 -0
- package/dist/zonos-elements/{p-edf613ea.entry.js → p-23eee868.entry.js} +1 -1
- package/dist/zonos-elements/{p-b5f67807.entry.js → p-26bf0c31.entry.js} +1 -1
- package/dist/zonos-elements/{p-ddf68916.system.js → p-28ee0860.system.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-6df6cb8a.entry.js → p-30cfc9f4.entry.js} +1 -1
- package/dist/zonos-elements/{p-5677d31f.entry.js → p-323279b8.entry.js} +1 -1
- package/dist/zonos-elements/{p-8c54aaec.entry.js → p-32b53999.entry.js} +1 -1
- package/dist/zonos-elements/{p-c15476a1.system.entry.js → p-333f6018.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3642dd99.entry.js +1 -0
- package/dist/zonos-elements/p-3c62acbd.js +1 -0
- package/dist/zonos-elements/{p-4441c451.entry.js → p-4417475f.entry.js} +1 -1
- package/dist/zonos-elements/p-543b25f9.entry.js +1 -0
- package/dist/zonos-elements/{p-1992fd91.entry.js → p-55c5977b.entry.js} +1 -1
- package/dist/zonos-elements/{p-b406bb39.entry.js → p-56e9a29e.entry.js} +1 -1
- package/dist/zonos-elements/{p-5e1aad7d.entry.js → p-59518657.entry.js} +1 -1
- package/dist/zonos-elements/p-5953208b.js +1 -0
- package/dist/zonos-elements/p-5987dea1.js +1 -0
- package/dist/zonos-elements/{p-a44591f6.system.entry.js → p-5a37683b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-36b311f9.system.entry.js → p-5b11bbca.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a34269b1.system.entry.js → p-5d6b018c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-63b462dd.system.entry.js +1 -0
- package/dist/zonos-elements/p-646e6b47.system.entry.js +1 -0
- package/dist/zonos-elements/{p-060c521b.system.entry.js → p-68631285.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-683ec0bf.entry.js → p-6f874ed9.entry.js} +1 -1
- package/dist/zonos-elements/p-71fc8a22.js +1 -0
- package/dist/zonos-elements/{p-a6773627.entry.js → p-76e36d6d.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3d3ce5d.system.entry.js → p-781b3345.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-156891c5.js → p-7ab15d20.js} +1 -1
- package/dist/zonos-elements/{p-3246d120.js → p-7c70e0c7.js} +1 -1
- package/dist/zonos-elements/p-8418aa07.entry.js +1 -0
- package/dist/zonos-elements/{p-99e8743e.system.entry.js → p-8fa3a8f8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a61c301.system.entry.js → p-8fb15a6b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-30067eed.entry.js → p-95042e71.entry.js} +1 -1
- package/dist/zonos-elements/p-987b5d8f.js +1 -0
- package/dist/zonos-elements/{p-39695a8b.system.js → p-a4eddf6c.system.js} +1 -1
- package/dist/zonos-elements/{p-3e6bbf0b.system.entry.js → p-aa1f3060.system.entry.js} +1 -1
- package/dist/zonos-elements/p-aa37f436.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f314217a.system.js → p-ab61ef19.system.js} +1 -1
- package/dist/zonos-elements/{p-4c3f5fda.system.entry.js → p-b91a8f31.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-15097876.system.entry.js → p-b93013f7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-746bdebe.entry.js → p-c121b2b8.entry.js} +1 -1
- package/dist/zonos-elements/{p-54a8d4cf.system.entry.js → p-c12ca8fe.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c5bfe522.system.js +1 -0
- package/dist/zonos-elements/{p-732e7373.system.entry.js → p-c634546a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a5f8dc19.js → p-c8bc4ede.js} +1 -1
- package/dist/zonos-elements/{p-f156e2e5.system.entry.js → p-c8df5eee.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e0ec0aa3.system.entry.js → p-c9e44c77.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-179caaea.system.entry.js → p-ca9231a0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e058b4e.entry.js → p-cb376f03.entry.js} +1 -1
- package/dist/zonos-elements/{p-717cbe90.system.js → p-cd3f7fd7.system.js} +1 -1
- package/dist/zonos-elements/{p-ee3c7b11.system.entry.js → p-d06486ba.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e7a45f6c.entry.js → p-d0767f88.entry.js} +1 -1
- package/dist/zonos-elements/{p-8308f7d6.system.entry.js → p-d2cb99ee.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ddd0e703.system.entry.js +1 -0
- package/dist/zonos-elements/{p-09da3c76.entry.js → p-dfd83cff.entry.js} +1 -1
- package/dist/zonos-elements/{p-4efd7178.entry.js → p-e0cbc7c7.entry.js} +1 -1
- package/dist/zonos-elements/{p-3f6fe80a.system.entry.js → p-e101b0de.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd6da3de.entry.js → p-e3d0d8ff.entry.js} +1 -1
- package/dist/zonos-elements/{p-8005e102.system.js → p-e57f862d.system.js} +1 -1
- package/dist/zonos-elements/{p-38879af9.entry.js → p-e6e3a303.entry.js} +1 -1
- package/dist/zonos-elements/{p-5d4201d5.entry.js → p-ef2c264c.entry.js} +1 -1
- package/dist/zonos-elements/{p-40b96482.system.entry.js → p-f1298203.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-86d6961c.system.entry.js → p-f1aa60fd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-429ab545.system.entry.js → p-f1dbeb85.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2825431d.entry.js → p-f2431e47.entry.js} +1 -1
- package/dist/zonos-elements/{p-29c1703c.system.entry.js → p-f2511b86.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-08e78d79.entry.js → p-fa80a973.entry.js} +1 -1
- package/dist/zonos-elements/p-fb8dc23f.system.js +1 -0
- package/dist/zonos-elements/{p-f59514e9.entry.js → p-fc45b3a5.entry.js} +1 -1
- package/dist/zonos-elements/{p-a23d3b3f.system.entry.js → p-fdd7ec44.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/localization-6d36209f.js +0 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +0 -1
- package/dist/zonos-elements/p-0ac1aa87.system.js +0 -1
- package/dist/zonos-elements/p-1577a739.js +0 -1
- package/dist/zonos-elements/p-1ee5f392.entry.js +0 -1
- package/dist/zonos-elements/p-26ca8ce7.js +0 -1
- package/dist/zonos-elements/p-56fc3210.js +0 -1
- package/dist/zonos-elements/p-6df034d6.entry.js +0 -1
- package/dist/zonos-elements/p-71cb16da.system.entry.js +0 -1
- package/dist/zonos-elements/p-8051403a.js +0 -1
- package/dist/zonos-elements/p-9448d960.js +0 -1
- package/dist/zonos-elements/p-a6535773.system.entry.js +0 -1
- package/dist/zonos-elements/p-ae30e6c0.system.entry.js +0 -1
- package/dist/zonos-elements/p-bf942ef0.system.js +0 -1
- package/dist/zonos-elements/p-c345d1f5.system.js +0 -1
- package/dist/zonos-elements/p-d4337686.entry.js +0 -1
- package/dist/zonos-elements/p-df8b8827.entry.js +0 -1
- package/dist/zonos-elements/p-e210edd9.system.js +0 -1
- package/dist/zonos-elements/p-f3e1a6a7.system.entry.js +0 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { r as registerInstance, h, a as Host, d as createEvent } from './index-cfd394c8.js';
|
|
2
|
+
import { t as translate, l as localizationStore } from './localization-0953a048.js';
|
|
3
|
+
import { i as isTextContainsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
4
|
+
import { f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
5
|
+
import { c as classes } from './classes-0d95c529.js';
|
|
6
|
+
import { g as getBorderRadius } from './getBorderRadius-dc982fe6.js';
|
|
7
|
+
import './handleFetch-a844cac1.js';
|
|
8
|
+
import './VarianceTest-572cecf5.js';
|
|
9
|
+
|
|
10
|
+
const zonosAddressDisplayCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:\", \";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}";
|
|
11
|
+
const ZonosAddressDisplayStyle0 = zonosAddressDisplayCss;
|
|
12
|
+
|
|
13
|
+
const ZonosAddressDisplay = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
registerInstance(this, hostRef);
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
var _a;
|
|
19
|
+
const { city, country, email, line1, line2, name, phone, postal_code, state, } = this.currentAddress;
|
|
20
|
+
const shippingZoneCountry = (_a = localizationStore.shippingZoneCountries) === null || _a === void 0 ? void 0 : _a[country];
|
|
21
|
+
const renderEnteredInfoText = ({ bold, content, }) => {
|
|
22
|
+
const textColor = isTextContainsNonLatinChars(content)
|
|
23
|
+
? 'red-600'
|
|
24
|
+
: 'gray-1000';
|
|
25
|
+
return (h("zonos-text", { textColor: textColor, type: bold ? 'boldLabel' : 'body' }, content));
|
|
26
|
+
};
|
|
27
|
+
return (h(Host, { class: "zonos--address-form zonos--elements" }, h("div", { class: "zonos--title" }, h("zonos-text", { textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
|
|
28
|
+
? translate('Shipping')
|
|
29
|
+
: translate('Billing'))), h("div", { class: "zonos--address-group" }, name && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), shippingZoneCountry && (h("div", { class: "zonos--address-line" }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: shippingZoneCountry.code }), ' ', renderEnteredInfoText({
|
|
30
|
+
content: shippingZoneCountry.displayName,
|
|
31
|
+
}))))));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
ZonosAddressDisplay.style = ZonosAddressDisplayStyle0;
|
|
35
|
+
|
|
36
|
+
const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
|
|
37
|
+
|
|
38
|
+
const zonosDialogCss = ":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--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:4px;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--loading-text,:host .zonos--loading-title{max-width:100%;padding:0 32px;text-align:center}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";
|
|
39
|
+
const ZonosDialogStyle0 = zonosDialogCss;
|
|
40
|
+
|
|
41
|
+
const ZonosDialog = class {
|
|
42
|
+
constructor(hostRef) {
|
|
43
|
+
registerInstance(this, hostRef);
|
|
44
|
+
this.closeDialog = createEvent(this, "closeDialog", 3);
|
|
45
|
+
/**
|
|
46
|
+
* Whether or not the dialog is open
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
this.open = false;
|
|
50
|
+
/**
|
|
51
|
+
* The header text for the dialog
|
|
52
|
+
*/
|
|
53
|
+
this.headerText = '';
|
|
54
|
+
/**
|
|
55
|
+
* The width of the dialog
|
|
56
|
+
* @default 460px
|
|
57
|
+
*/
|
|
58
|
+
this.width = '460px';
|
|
59
|
+
/**
|
|
60
|
+
* Whether or not to show the header
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
this.noHeader = false;
|
|
64
|
+
/**
|
|
65
|
+
* Whether or not to have body padding
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
this.noBodyPadding = false;
|
|
69
|
+
/**
|
|
70
|
+
* Whether or not to have body padding
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
this.noBorder = false;
|
|
74
|
+
/**
|
|
75
|
+
* Whether or not to show the close button
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
this.noCloseButton = false;
|
|
79
|
+
/**
|
|
80
|
+
* Whether or not to close the dialog when clicking outside of it
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
this.noClickOutside = false;
|
|
84
|
+
/**
|
|
85
|
+
* Flag to determine if the checkout is on mobile
|
|
86
|
+
*/
|
|
87
|
+
this.mobile = false;
|
|
88
|
+
/**
|
|
89
|
+
* Load loading spinner for the dialog or not
|
|
90
|
+
*/
|
|
91
|
+
this.isLoading = true;
|
|
92
|
+
this.isMobile = false;
|
|
93
|
+
this.isMobileMode = () => {
|
|
94
|
+
return this.mobile || window.innerWidth <= 768;
|
|
95
|
+
};
|
|
96
|
+
this.closeButtonHandler = () => {
|
|
97
|
+
// Only do the action if the dialog is open
|
|
98
|
+
if (!this.open) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.closeDialog.emit();
|
|
102
|
+
};
|
|
103
|
+
this.clickOutsideDialogHandler = (event) => {
|
|
104
|
+
if (event.target === event.currentTarget && !this.noClickOutside) {
|
|
105
|
+
this.closeDialog.emit();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
handleWindowResize() {
|
|
110
|
+
this.isMobile = this.isMobileMode();
|
|
111
|
+
}
|
|
112
|
+
handleKeyDown(ev) {
|
|
113
|
+
if (ev.key === 'Escape') {
|
|
114
|
+
this.closeButtonHandler();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
componentDidLoad() {
|
|
118
|
+
this.isMobile = this.isMobileMode();
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
const borderStyle = getBorderRadius({
|
|
122
|
+
overrideBorderStyle: this.borderStyle,
|
|
123
|
+
});
|
|
124
|
+
return (h(Host, { key: '93de5ea91ebef1927a2d7dc91a00f87277755ac7', class: classes([
|
|
125
|
+
'zonos--elements',
|
|
126
|
+
this.open && 'open',
|
|
127
|
+
this.isLoading && 'is-loading',
|
|
128
|
+
this.noBorder && 'no-border',
|
|
129
|
+
this.isMobile && 'mobile',
|
|
130
|
+
]), style: {
|
|
131
|
+
'--zonos--border-radius': borderStyle,
|
|
132
|
+
'--zonos--font-family': zonosStoreFontFamily(),
|
|
133
|
+
'--zonos--height': this.height || 'initial',
|
|
134
|
+
'--zonos--min-height': this.minHeight || '500px',
|
|
135
|
+
'--zonos--width': this.width,
|
|
136
|
+
} }, h("div", { key: '86330a3de751f262a3f0f80fbeb436bb6e2b206f', class: "zonos--backdrop" }), h("div", { key: 'a6702c9a9b5bba9f3523503cd85ba6e6ae77fc9d', class: "zonos--dialog-layout", inert: !this.open, onClick: this.clickOutsideDialogHandler }, h("div", { key: '2c4d6e9170fbe80a2ea249d3f40cbc72e5df05d3', class: "zonos--dialog" }, this.isLoading && (h("div", { key: 'e83dcb53e9cd7504d588b124c6468535e81ce71d', class: "zonos--loading" }, h("zonos-spinner", { key: '5e8b3451b5358c76c2fdf47a0ad5eecc8394d012', size: 30 }), this.loadingTitle && (h("zonos-text", { key: '671203125d8fd7e8cb811b61b7190f826221507a', class: "zonos--loading-title", size: "l", weight: 700 }, this.loadingTitle)), this.loadingText && (h("zonos-text", { key: '791a95ed2bdad0c3bfb136c9e42d7d8e920110d9', class: "zonos--loading-text" }, this.loadingText)))), (this.headerText || !this.noCloseButton) && (h("div", { key: '8d4f7a2e12cd56d6341cf5aa17be1a7f151ca45b', class: "zonos--header" }, this.headerText && (h("h3", { key: '4bdd26b40a2209ccf44d85440cfbf173724f9aaa', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: 'c8f5d7eaff8c9ba94d60d587b5601472e80ea79a', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, title: "Close dialog", variant: "subtle" })))), h("div", { key: 'e5d91fb3bb3546e559566f8782aa9d939d0f1d04', class: classes([
|
|
137
|
+
'zonos--body',
|
|
138
|
+
this.noBodyPadding && 'zonos--no-body-padding',
|
|
139
|
+
]) }, h("slot", { key: '2da7a3c7a978bb520c255a0043f96bf15b2dd006' })), h("slot", { key: '38ec2165a11c9cc2b121122124482590f9cd31e9', name: "dialog-footer" })))));
|
|
140
|
+
}
|
|
141
|
+
static get assetsDirs() { return ["assets"]; }
|
|
142
|
+
};
|
|
143
|
+
ZonosDialog.style = ZonosDialogStyle0;
|
|
144
|
+
|
|
145
|
+
export { ZonosAddressDisplay as zonos_address_display, ZonosDialog as zonos_dialog };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
2
|
import { t as throttle_1 } from './throttle-44bfb6b5.js';
|
|
3
|
-
import {
|
|
4
|
-
import { s as storageStore, z as getFallbackDefaultCountryCode, t as translate, y as storageStoreOnChange, l as localizationStore } from './localization-
|
|
3
|
+
import { U as extractName, b as stripeStore, t as trackConversionEvent, H as stripeStoreOnChange, u as stripeStorePrefetchLandedCost, d as cartStore } from './cart-5282f6c1.js';
|
|
4
|
+
import { s as storageStore, z as getFallbackDefaultCountryCode, t as translate, y as storageStoreOnChange, l as localizationStore } from './localization-0953a048.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
6
6
|
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-ef7b5860.js';
|
|
@@ -13,6 +13,63 @@ import './debounce-c8d67b17.js';
|
|
|
13
13
|
import './isDarkColor-039ef212.js';
|
|
14
14
|
import './ShortAddressCode-7620e622.js';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Map a Stripe address change event value into a Stripe `ContactOption`, used to
|
|
18
|
+
* pre-seed the address element's saved-address (contacts) list on remount.
|
|
19
|
+
*/
|
|
20
|
+
const mapAddressEventToContact = (value) => {
|
|
21
|
+
const { firstName, lastName } = extractName({
|
|
22
|
+
firstName: value.firstName,
|
|
23
|
+
lastName: value.lastName,
|
|
24
|
+
name: value.name,
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
address: {
|
|
28
|
+
city: value.address.city,
|
|
29
|
+
country: value.address.country,
|
|
30
|
+
line1: value.address.line1,
|
|
31
|
+
line2: value.address.line2 || undefined,
|
|
32
|
+
postal_code: value.address.postal_code,
|
|
33
|
+
state: value.address.state,
|
|
34
|
+
},
|
|
35
|
+
name: (value.name || `${firstName} ${lastName}`).trim(),
|
|
36
|
+
phone: value.phone || undefined,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Build a dedupe key for a contact so we don't add a duplicate saved address. Compared
|
|
41
|
+
* case- and whitespace-insensitively on the distinguishing fields.
|
|
42
|
+
*/
|
|
43
|
+
const getContactDedupKey = (contact) => {
|
|
44
|
+
var _a, _b, _c;
|
|
45
|
+
return [
|
|
46
|
+
contact.name,
|
|
47
|
+
(_a = contact.address) === null || _a === void 0 ? void 0 : _a.line1,
|
|
48
|
+
(_b = contact.address) === null || _b === void 0 ? void 0 : _b.postal_code,
|
|
49
|
+
(_c = contact.address) === null || _c === void 0 ? void 0 : _c.country,
|
|
50
|
+
]
|
|
51
|
+
.map(value => (value || '').trim().toLowerCase())
|
|
52
|
+
.join('|');
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Prepend the currently selected address (from the latest Stripe address event) to the
|
|
56
|
+
* list of default saved addresses so it stays selected when the address element is
|
|
57
|
+
* remounted (e.g. navigating between the customer and shipping steps). Avoids adding a
|
|
58
|
+
* duplicate contact when the current address already exists in the list.
|
|
59
|
+
*/
|
|
60
|
+
const buildAddressContacts = ({ currentEvent, defaultAddress, }) => {
|
|
61
|
+
if (!currentEvent) {
|
|
62
|
+
return defaultAddress;
|
|
63
|
+
}
|
|
64
|
+
const currentContact = mapAddressEventToContact(currentEvent.value);
|
|
65
|
+
const currentKey = getContactDedupKey(currentContact);
|
|
66
|
+
const alreadyExists = defaultAddress.some(contact => getContactDedupKey(contact) === currentKey);
|
|
67
|
+
if (alreadyExists) {
|
|
68
|
+
return defaultAddress;
|
|
69
|
+
}
|
|
70
|
+
return [currentContact, ...defaultAddress];
|
|
71
|
+
};
|
|
72
|
+
|
|
16
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}";
|
|
17
74
|
const ZonosAddressStyle0 = zonosAddressCss;
|
|
18
75
|
|
|
@@ -140,10 +197,14 @@ const ZonosAddress = class {
|
|
|
140
197
|
log(`Stripe country code: ${defaultAddressCountry}`, 'info');
|
|
141
198
|
const addressElement = stripeElements.create('address', {
|
|
142
199
|
allowedCountries: checkoutAllCountries ? [] : allowedCountries,
|
|
143
|
-
//
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
200
|
+
// Prepend the currently selected address so it stays selected across remounts
|
|
201
|
+
// (customer <-> shipping step navigation), de-duped against the default addresses.
|
|
202
|
+
// Contacts are computed once here at create() time and never mutated afterwards—
|
|
203
|
+
// mutating the contacts value after a remount breaks the element's onChange events.
|
|
204
|
+
contacts: buildAddressContacts({
|
|
205
|
+
currentEvent: stripeAddressEventData,
|
|
206
|
+
defaultAddress,
|
|
207
|
+
}),
|
|
147
208
|
defaultValues: {
|
|
148
209
|
address: Object.assign(Object.assign({}, stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address), { country: defaultAddressCountry }),
|
|
149
210
|
firstName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName,
|
|
@@ -354,11 +415,11 @@ const ZonosAddress = class {
|
|
|
354
415
|
this.isAddressFilled = true;
|
|
355
416
|
}
|
|
356
417
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
357
|
-
return (h(Host, { key: '
|
|
418
|
+
return (h(Host, { key: '195940efdd29696d99b1ab6524a53e6a03776c6a', class: classes([
|
|
358
419
|
'zonos--address',
|
|
359
420
|
'zonos--elements',
|
|
360
421
|
`zonos--${this.type}-address`,
|
|
361
|
-
]) }, this.titleText && (h("zonos-text", { key: '
|
|
422
|
+
]) }, this.titleText && (h("zonos-text", { key: '968d5990fce9c1eb22cd10b58744e6d00f2e622d', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: 'ae6dd70dcaa5ecd3465c065736e0f31fb40e72d3', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: '0bf3075670d3fcd945f9ddcbe096399e2dc213ed', class: "zonos--address-component" })));
|
|
362
423
|
}
|
|
363
424
|
get el() { return getElement(this); }
|
|
364
425
|
static get watchers() { return {
|
|
@@ -490,13 +551,13 @@ const ZonosConfirmDialog = class {
|
|
|
490
551
|
const borderStyle = getBorderRadius();
|
|
491
552
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
492
553
|
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
493
|
-
return (h(Host, { key: '
|
|
554
|
+
return (h(Host, { key: 'dc074c5b88b642e06edd8942408a3aeed05e5cdb', class: classes([this.dialogOpen && 'open', 'zonos--elements']), "data-dialog-type": this.dialogType, "data-theme": theme, style: {
|
|
494
555
|
'--zonos--border-radius': borderStyle,
|
|
495
556
|
'--zonos--dialog-width': `${this.dialogWidth}px`,
|
|
496
557
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
497
|
-
} }, h("div", { key: '
|
|
558
|
+
} }, h("div", { key: '119a9c201e44a670fb1df61f6663d96f7148ecc6', class: "zonos--backdrop", tabIndex: -1 }), h("div", { key: '9534a92f69dd3d692c1a2fd86fa1cf148f68cdfa', class: classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, h("div", { key: 'e79aaf3a80b57634f78575b15a75d7b549ed20ee', class: "zonos--confirm-dialog", onBlur: () => {
|
|
498
559
|
this.focusDialog();
|
|
499
|
-
} }, h("div", { key: '
|
|
560
|
+
} }, h("div", { key: '44367b178f46c66dfb236485e05f6832ae63a63b', class: "wrapper" }, h("div", { key: '42d10d17180ec7364710682c27d6cd4fef0b8abe', class: "icon-wrapper" }, this.renderIcon()), h("div", { key: 'b5f7563fb43e1b147db669e1df71f4fafb5284df', class: "content" }, h("div", { key: '38b78e383833b5e49908c8e95c35b9ad23c0f956', class: "title" }, h("zonos-text", { key: '726f5308881671e7e17bd0591521485bd7142c1e', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (h("div", { key: '58d663842d51a512b3c8799a907bd1ed58e4fb31', class: "subtitle" }, h("zonos-text", { key: '4411400d8906a22fd5f31652a1eeb314cae8ad68', textColor: "gray-800" }, this.dialogSubtitle)))), h("div", { key: 'df0452b2af633dd558858db824336fd5925aef50', class: "footer" }, this.dialogType === 'confirm' && (h("zonos-button", { key: '50f88e85e18129ef4ee209615b951683c5ff6fa8', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText || translate('Cancel'))), h("zonos-button", { key: '314b8be8954241b8c261c62d5a4bbe8155cc6914', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
|
|
500
561
|
}
|
|
501
562
|
static get assetsDirs() { return ["assets"]; }
|
|
502
563
|
get el() { return getElement(this); }
|
|
@@ -730,7 +791,7 @@ const ZonosLoadingOverlay = class {
|
|
|
730
791
|
this.size = 40;
|
|
731
792
|
}
|
|
732
793
|
render() {
|
|
733
|
-
return (h(Host, { key: '
|
|
794
|
+
return (h(Host, { key: 'e284a5ada0945f1895dbd9b40039e9d2ef600111', class: classes(['zonos--elements', this.open && 'zonos--open']) }, h("div", { key: 'fb68155fe133ba8cd1d923a0fbb37a382ecabc34', class: "zonos--loading-overlay" }, h("zonos-spinner", { key: '50dc3d4b1f53173240d23ffeac966f7463546fde', size: this.size, spinnerColor: this.spinnerColor }))));
|
|
734
795
|
}
|
|
735
796
|
};
|
|
736
797
|
ZonosLoadingOverlay.style = ZonosLoadingOverlayStyle0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-cfd394c8.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 { e as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-fdbab973.js';
|
|
3
|
+
import { d as cartStore } from './cart-5282f6c1.js';
|
|
4
|
+
import { e as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-0953a048.js';
|
|
5
5
|
import { z as zonosStore } from './zonosStore-b7d3f9b0.js';
|
|
6
6
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
@@ -46,16 +46,16 @@ const ZonosBadge = class {
|
|
|
46
46
|
this.loading = false;
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: 'c8d29084d1a10f985bcb52409881fff004a73118', class: classes(['zonos--elements zonos--badge']), style: {
|
|
50
50
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
51
|
-
} }, h("div", { key: '
|
|
51
|
+
} }, h("div", { key: '28cd3711c8e8d6b362c56589553401707456fdc6', class: classes([
|
|
52
52
|
'zonos--badge-content',
|
|
53
53
|
this.badgeColor,
|
|
54
54
|
this.rounded && 'rounded',
|
|
55
55
|
this.iconRight && 'icon-right',
|
|
56
56
|
this.size,
|
|
57
57
|
this.bold && 'bold',
|
|
58
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
58
|
+
]) }, this.icon, h("zonos-text", { key: '9dcb72621037e37fc11d5cabe915f6dad9798c2a', textColor: `${this.badgeColor}-800` }, h("slot", { key: '7599b4c4689100dc637a3842287a93a42b4edd41' })), this.dismissHandler && (h("zonos-icon", { key: '861156179b8c8a8d8db1b4ee72717581d2eb7222', "aria-label": "Remove action", class: "zonos--badge-dismiss", content: RemoveLineIcon, onClick: () => { var _a; return (_a = this.dismissHandler) === null || _a === void 0 ? void 0 : _a.call(this); } })))));
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
ZonosBadge.style = ZonosBadgeStyle0;
|
|
@@ -207,13 +207,13 @@ const ZonosButton = class {
|
|
|
207
207
|
const borderStyle = getBorderRadius({
|
|
208
208
|
overrideBorderStyle: this.borderStyle,
|
|
209
209
|
});
|
|
210
|
-
return (h(Host, { key: '
|
|
210
|
+
return (h(Host, { key: '6e6b961c9215370bdbfce09715d1a16d878d2d85', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
211
211
|
'--zonos--background-color': backgroundColor,
|
|
212
212
|
'--zonos--border-radius': borderStyle,
|
|
213
213
|
'--zonos--color': color,
|
|
214
214
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
215
215
|
'--zonos--font-weight': this.bold ? 'bold' : 'normal',
|
|
216
|
-
}) }, h("button", Object.assign({ key: '
|
|
216
|
+
}) }, h("button", Object.assign({ key: '3941358241e37fb19b2ace0fa0d892002c6967f0' }, this.inheritedAttributes, { class: classes([
|
|
217
217
|
this.hasIcon && 'has-icon',
|
|
218
218
|
this.hasContent && 'has-content',
|
|
219
219
|
this.noBackground && 'no-background',
|
|
@@ -228,7 +228,7 @@ const ZonosButton = class {
|
|
|
228
228
|
backgroundColor && variant === 'standard' && 'override-background',
|
|
229
229
|
]), disabled: disabled, style: {
|
|
230
230
|
justifyContent: this.justifyContent,
|
|
231
|
-
} }), this.loading && (h("div", { key: '
|
|
231
|
+
} }), this.loading && (h("div", { key: '769b699dd66e0e5f960efe018b0be7fed2a2ecd3', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: 'e7be35423da99ccc0bf9ba2269f030f0c2ea9223', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'cacea287ce83b46f57aae7753805d8bf4e580f82', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
232
232
|
}
|
|
233
233
|
static get delegatesFocus() { return true; }
|
|
234
234
|
get ele() { return getElement(this); }
|
|
@@ -2,10 +2,10 @@ import { r as registerInstance, h, a as Host, g as getElement, d as createEvent
|
|
|
2
2
|
import { f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-dc982fe6.js';
|
|
5
|
-
import { b as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
5
|
+
import { b as stripeStore, t as trackConversionEvent } from './cart-5282f6c1.js';
|
|
6
|
+
import { s as storageStore } from './localization-0953a048.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-7c82eac4.js';
|
|
9
9
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-039ef212.js';
|
|
11
11
|
import './TaxId-63a14057.js';
|
|
@@ -36,16 +36,16 @@ const ZonosCard = class {
|
|
|
36
36
|
customRoundRadius: `${this.borderRadius}px`,
|
|
37
37
|
overrideBorderStyle: 'ROUNDED',
|
|
38
38
|
});
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '2e397f11a2f497f2bafcf5f6a0f5922e66488845', style: {
|
|
40
40
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
41
|
-
} }, h("div", { key: '
|
|
41
|
+
} }, h("div", { key: '300923b5b9b7db94cad3e47060174245ea61b75e', class: classes(['styled-card']), style: {
|
|
42
42
|
'--zonos--background-color': backgroundColor,
|
|
43
43
|
'--zonos--border-radius': borderRadius,
|
|
44
44
|
padding: this.spacing,
|
|
45
|
-
} }, this.label && (h("header", { key: '
|
|
45
|
+
} }, this.label && (h("header", { key: '021cc3d1e0b79ab31c19212891d17fbaf5a5b77a', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: '82f3d6ea4a52d822801d80b2a3c9cf35ed574464', type: "subheader" }, this.label), h("h-stack", { key: 'c272945368a1074513bcc06b7c306ca5c62ae8e9', spacing: 8 }, this.actions))), h("slot", { key: 'f1c1a3360eb8331e4f4ab69aec8c1dbd7dca2119' }), (this.footerActions || this.footerContent) && (h("footer", { key: '13f8e6d12545203c8a8a9ec5056e38df691eb907', class: "card-footer", style: {
|
|
46
46
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
47
47
|
padding: this.spacing,
|
|
48
|
-
} }, h("div", { key: '
|
|
48
|
+
} }, h("div", { key: 'aad83f26fe6816d98edd96ffc28c24b82085a5e9' }, this.footerContent), h("h-stack", { key: 'fd6bf6f1069f9e85d7b17fb944d26dd5fc7e0151', spacing: 8 }, this.footerActions))))));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
ZonosCard.style = ZonosCardStyle0;
|
|
@@ -258,7 +258,7 @@ const ZonosPayment = class {
|
|
|
258
258
|
}
|
|
259
259
|
render() {
|
|
260
260
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
261
|
-
return (h(Host, { key: '
|
|
261
|
+
return (h(Host, { key: '8ccf61c2c78fac6b3d981b18dedae1e32921eb14', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: '5ae4d0452d284b793ac179254b1891c183d63f03', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '251e74ccefed8ee31135cc29cdd71497f7cb1a8a', class: "zonos--payment-component" }), h("div", { key: 'b32c007382c63482f3e7f9af7c60afaaf8b4dbb9', class: "zonos--payment-paypal-container" })));
|
|
262
262
|
}
|
|
263
263
|
get el() { return getElement(this); }
|
|
264
264
|
static get watchers() { return {
|
|
@@ -322,7 +322,7 @@ const ZonosPaypalPayment = class {
|
|
|
322
322
|
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
323
323
|
}
|
|
324
324
|
render() {
|
|
325
|
-
return (h(Host, { key: '
|
|
325
|
+
return (h(Host, { key: 'd652adf83bc2620a8c21a7b2e6d8c0c419be8a1b', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: 'd6fdb79be6b31b5a2fb5ad6cc11c6001d4ac31e9', class: "zonos--payment-paypal-container" })));
|
|
326
326
|
}
|
|
327
327
|
get el() { return getElement(this); }
|
|
328
328
|
};
|