@zonos/elements 1.3.218 → 1.3.220
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/buildCartItemsByTempCart-309fcebf.js +28 -0
- package/dist/cjs/{cart-c54d05ce.js → cart-9a9ae4b9.js} +90 -47
- package/dist/cjs/cleanHtmlMarkdown-577d0a77.js +999 -0
- package/dist/cjs/index.cjs.js +19 -9
- package/dist/cjs/isCollectMobileTablet-7a9413e3.js +175 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/localization-0169b27d.js +738 -0
- package/dist/cjs/{paypal-d36b5dd1.js → paypal-9ee374a0.js} +12 -8
- package/dist/cjs/placeTestOrder-0dfff170.js +93 -0
- package/dist/cjs/{localization-ab7e1902.js → translationStore-0c67178f.js} +1023 -734
- package/dist/cjs/zonos-address_11.cjs.entry.js +116 -74
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/{zonos-banner.cjs.entry.js → zonos-banner_2.cjs.entry.js} +40 -0
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/{zonos-cart-items_14.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +70 -1292
- package/dist/cjs/zonos-checkout.cjs.entry.js +25 -48
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +92 -0
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +811 -0
- package/dist/cjs/zonos-collect.cjs.entry.js +468 -0
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +168 -0
- package/dist/cjs/zonos-controller.cjs.entry.js +84 -28
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +11 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +23 -5
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +34 -33
- package/dist/cjs/zonos-hello.cjs.entry.js +8 -7
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -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-stripe-input.cjs.entry.js +8 -5
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- 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 +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -1
- package/dist/collection/components/checkout/zonos-collect/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/assets/empty-item.jpeg +0 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.css +60 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +39 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/assets/RemoveIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/assets/SuccessIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.css +90 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +405 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/chevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/globe.svg +3 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosIconDark.svg +10 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosIconLight.svg +10 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosWordmark.svg +7 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.css +152 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +164 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/assets/ChevronUpIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.css +109 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +194 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/assets/CheckmarkLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +98 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +369 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.css +71 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +151 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.css +78 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +115 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.css +349 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +547 -0
- 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.css +38 -0
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +63 -0
- 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/assets/RemoveLineIcon.svg +3 -0
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.css +40 -0
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +102 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +8 -5
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
- package/dist/collection/components/common/zonos-text/zonos-text.css +1 -0
- 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 +91 -25
- package/dist/collection/components/paypal/zonos-paypal-payment.js +13 -2
- package/dist/collection/components/store/checkout/cart.js +36 -15
- package/dist/collection/components/store/checkout/collect.js +160 -0
- package/dist/collection/components/store/checkout/paypal.js +4 -2
- package/dist/collection/components/store/checkout/stripe.js +31 -12
- package/dist/collection/components/store/translationStore/strings.arabic.js +51 -0
- package/dist/collection/components/store/translationStore/strings.base.js +51 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +51 -0
- package/dist/collection/components/store/translationStore/strings.french.js +51 -0
- package/dist/collection/components/store/translationStore/strings.german.js +51 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +51 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +51 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +51 -0
- package/dist/collection/components/store/translationStore.js +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +35 -18
- 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-link-authentication/zonos-link-authentication.js +29 -4
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +9 -1
- package/dist/collection/components/utils/checkout/initCollect.js +15 -0
- package/dist/collection/components/utils/checkout/isCollectMobileTablet.js +10 -0
- package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -1
- package/dist/collection/components/utils/renderFallback.js +7 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +5 -1
- package/dist/collection/scripts/_zonosBase.js +7 -1
- package/dist/collection/types/checkout/api/PartyInfo.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +113 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/buildCartItemsByTempCart-c4488f73.js +26 -0
- package/dist/esm/{cart-bb0ee971.js → cart-b2dd578c.js} +68 -27
- package/dist/esm/cleanHtmlMarkdown-b5b18743.js +997 -0
- package/dist/esm/index.js +19 -9
- package/dist/esm/isCollectMobileTablet-7f9a5e2b.js +168 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/localization-d7125e4e.js +719 -0
- package/dist/esm/{paypal-bd4520eb.js → paypal-555bbf1e.js} +7 -4
- package/dist/esm/placeTestOrder-2d67c1a9.js +90 -0
- package/dist/esm/{localization-d8326254.js → translationStore-13502f49.js} +1023 -718
- package/dist/esm/zonos-address_11.entry.js +85 -43
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/{zonos-banner.entry.js → zonos-banner_2.entry.js} +40 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/{zonos-cart-items_14.entry.js → zonos-cart-items_12.entry.js} +20 -1240
- package/dist/esm/zonos-checkout.entry.js +6 -29
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +86 -0
- package/dist/esm/zonos-collect-finish_6.entry.js +802 -0
- package/dist/esm/zonos-collect.entry.js +464 -0
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-confirm-dialog_2.entry.js +163 -0
- package/dist/esm/zonos-controller.entry.js +84 -28
- package/dist/esm/zonos-country-flag.entry.js +2 -1
- package/dist/esm/zonos-country-select_4.entry.js +11 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +23 -5
- package/dist/esm/zonos-hello-dialog.entry.js +6 -5
- package/dist/esm/zonos-hello.entry.js +2 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +6 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +9 -6
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/buildCartItemsByTempCart-c4488f73.js +1 -0
- package/dist/esm-es5/cart-b2dd578c.js +1 -0
- package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/isCollectMobileTablet-7f9a5e2b.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-d7125e4e.js +1 -0
- package/dist/esm-es5/paypal-555bbf1e.js +17 -0
- package/dist/esm-es5/placeTestOrder-2d67c1a9.js +1 -0
- package/dist/esm-es5/translationStore-13502f49.js +1 -0
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +1 -0
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
- 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 -0
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -0
- package/dist/esm-es5/zonos-collect.entry.js +1 -0
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -0
- 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-empty-state-payment_4.entry.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-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-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.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 +470 -2
- 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-collect/zonos-collect-cart-items/zonos-collect-cart-items.d.ts +4 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.d.ts +50 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.d.ts +25 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.d.ts +29 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.d.ts +62 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.d.ts +22 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.d.ts +10 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect.d.ts +86 -0
- package/dist/types/components/common/zonos-h-stack/zonos-h-stack.d.ts +9 -0
- package/dist/types/components/common/zonos-skeleton/zonos-skeleton.d.ts +17 -0
- package/dist/types/components/main/zonos-controller.d.ts +5 -0
- package/dist/types/components/paypal/zonos-paypal-payment.d.ts +3 -0
- package/dist/types/components/store/checkout/cart.d.ts +23 -3
- package/dist/types/components/store/checkout/collect.d.ts +21 -0
- package/dist/types/components/store/checkout/paypal.d.ts +4 -3
- package/dist/types/components/store/checkout/stripe.d.ts +6 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +51 -0
- package/dist/types/components/store/translationStore.d.ts +2 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +1 -2
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +3 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/initCollect.d.ts +1 -0
- package/dist/types/components/utils/checkout/isCollectMobileTablet.d.ts +4 -0
- package/dist/types/components/utils/renderFallback.d.ts +6 -0
- package/dist/types/components.d.ts +401 -2
- package/dist/types/scripts/_zonosBase.d.ts +5 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +9 -1
- package/dist/types/types/checkout/api/CreateParty.d.ts +24 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +6 -1
- package/dist/types/types/checkout/api/PartyInfo.d.ts +24 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +616 -5
- package/dist/types/types/generated/graphql.internal.types.ts +626 -6
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-7b5de646.entry.js → p-02667a58.entry.js} +1 -1
- package/dist/zonos-elements/p-031d646e.system.js +1 -0
- package/dist/zonos-elements/p-0e07e1d6.entry.js +1 -0
- package/dist/zonos-elements/p-0ef2a242.js +1 -0
- package/dist/zonos-elements/p-126087a2.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c7d5d45d.entry.js → p-14f9bc8c.entry.js} +1 -1
- package/dist/zonos-elements/p-27d9abab.js +1 -0
- package/dist/zonos-elements/p-2813d72e.system.js +1 -0
- package/dist/zonos-elements/p-295d9c07.system.entry.js +1 -0
- package/dist/zonos-elements/p-29c80a34.js +1 -0
- package/dist/zonos-elements/p-2a6c964d.js +1 -0
- package/dist/zonos-elements/p-2b3c7c77.system.entry.js +1 -0
- package/dist/zonos-elements/p-2b8897d1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-544c173a.system.entry.js → p-30432622.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3462e9e4.system.entry.js +1 -0
- package/dist/zonos-elements/p-372c2fc5.entry.js +1 -0
- package/dist/zonos-elements/p-3c1b1be1.system.entry.js +1 -0
- package/dist/zonos-elements/p-40a4266f.js +1 -0
- package/dist/zonos-elements/{p-47ffacd8.system.entry.js → p-421dfb66.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-288761b1.system.entry.js → p-4f8563ad.system.entry.js} +1 -1
- package/dist/zonos-elements/p-52d35358.system.entry.js +1 -0
- package/dist/zonos-elements/p-567f7de7.entry.js +1 -0
- package/dist/zonos-elements/p-5d9410da.entry.js +1 -0
- package/dist/zonos-elements/p-637b22ee.system.entry.js +1 -0
- package/dist/zonos-elements/p-63a42823.entry.js +1 -0
- package/dist/zonos-elements/p-69451a50.system.js +1 -0
- package/dist/zonos-elements/p-6b3a0874.entry.js +1 -0
- package/dist/zonos-elements/p-73c1e91f.js +1 -0
- package/dist/zonos-elements/p-759ef3ca.entry.js +1 -0
- package/dist/zonos-elements/p-79d8c3f3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3f31901f.entry.js → p-7c4e7651.entry.js} +1 -1
- package/dist/zonos-elements/{p-1c45cd15.entry.js → p-7d2d2c94.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ac8bfbb.system.entry.js → p-7e5bd9af.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7ecbb2cb.entry.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/p-82e88a33.system.js +1 -0
- package/dist/zonos-elements/p-849b47aa.entry.js +1 -0
- package/dist/zonos-elements/p-8dd47520.system.entry.js +1 -0
- package/dist/zonos-elements/p-932600b7.js +1 -0
- package/dist/zonos-elements/p-960e0ab1.system.entry.js +1 -0
- package/dist/zonos-elements/p-9c5b8239.system.js +1 -0
- package/dist/zonos-elements/{p-d55aec11.system.entry.js → p-9fdd3264.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a08a005d.entry.js +1 -0
- package/dist/zonos-elements/p-a10de7fb.entry.js +1 -0
- package/dist/zonos-elements/p-a49b5e7f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-62813488.entry.js → p-a5b0a636.entry.js} +1 -1
- package/dist/zonos-elements/p-a61a9b65.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d6fa2dc2.entry.js → p-a77ed1b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-eeb01de6.system.entry.js → p-a800965d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b2ae8eb7.system.js +1 -0
- package/dist/zonos-elements/p-b3d5bcf9.entry.js +1 -0
- package/dist/zonos-elements/{p-da4c01da.system.entry.js → p-b669050d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b9e9b82f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-714c28b1.system.entry.js → p-ba18c5f5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bbf48b31.entry.js +1 -0
- package/dist/zonos-elements/{p-77666360.entry.js → p-c4b3c878.entry.js} +1 -1
- package/dist/zonos-elements/p-c7b57886.js +17 -0
- package/dist/zonos-elements/p-c803753e.entry.js +1 -0
- package/dist/zonos-elements/{p-e640e8b8.entry.js → p-cbb01de9.entry.js} +1 -1
- package/dist/zonos-elements/p-ce15d62d.system.js +1 -0
- package/dist/zonos-elements/p-d291e964.system.entry.js +1 -0
- package/dist/zonos-elements/p-d3485a03.system.js +1 -0
- package/dist/zonos-elements/{p-59eaebe3.system.entry.js → p-de626806.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e5388438.system.entry.js +1 -0
- package/dist/zonos-elements/p-e77b6e42.entry.js +1 -0
- package/dist/zonos-elements/p-ea8aff21.system.js +17 -0
- package/dist/zonos-elements/{p-7ab62a26.system.entry.js → p-eb6a35ce.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-92cc26b7.system.entry.js → p-ee6f8c02.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a98b1e8d.entry.js → p-efa6203f.entry.js} +1 -1
- package/dist/zonos-elements/{p-edc77ea1.entry.js → p-f4fa8720.entry.js} +1 -1
- package/dist/zonos-elements/{p-ebaaaee9.entry.js → p-fa90adb8.entry.js} +1 -1
- package/dist/zonos-elements/p-fe7e2dc4.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/zonos-card.cjs.entry.js +0 -49
- package/dist/esm/zonos-card.entry.js +0 -45
- package/dist/esm-es5/cart-bb0ee971.js +0 -1
- package/dist/esm-es5/localization-d8326254.js +0 -1
- package/dist/esm-es5/paypal-bd4520eb.js +0 -17
- package/dist/esm-es5/zonos-banner.entry.js +0 -1
- package/dist/esm-es5/zonos-card.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +0 -1
- package/dist/zonos-elements/p-043f57e8.system.entry.js +0 -1
- package/dist/zonos-elements/p-0631d2b9.js +0 -1
- package/dist/zonos-elements/p-0a6ac265.system.js +0 -1
- package/dist/zonos-elements/p-0f041dc5.system.entry.js +0 -1
- package/dist/zonos-elements/p-1432a217.system.entry.js +0 -1
- package/dist/zonos-elements/p-1b51b738.system.entry.js +0 -1
- package/dist/zonos-elements/p-3a1513ae.system.entry.js +0 -1
- package/dist/zonos-elements/p-3b8d11dd.entry.js +0 -1
- package/dist/zonos-elements/p-4333afcb.entry.js +0 -1
- package/dist/zonos-elements/p-4d0d89da.system.entry.js +0 -1
- package/dist/zonos-elements/p-5dd9cb44.system.entry.js +0 -1
- package/dist/zonos-elements/p-605a21ac.entry.js +0 -1
- package/dist/zonos-elements/p-674981ad.system.js +0 -1
- package/dist/zonos-elements/p-6d090b53.entry.js +0 -1
- package/dist/zonos-elements/p-73c8c551.system.entry.js +0 -1
- package/dist/zonos-elements/p-795d223d.entry.js +0 -1
- package/dist/zonos-elements/p-8218ff62.system.entry.js +0 -1
- package/dist/zonos-elements/p-82f80c8a.entry.js +0 -1
- package/dist/zonos-elements/p-88f7256d.js +0 -1
- package/dist/zonos-elements/p-8b083884.entry.js +0 -1
- package/dist/zonos-elements/p-a449940d.entry.js +0 -1
- package/dist/zonos-elements/p-a5a4ad2f.entry.js +0 -1
- package/dist/zonos-elements/p-a5d45585.system.entry.js +0 -1
- package/dist/zonos-elements/p-a751e819.system.entry.js +0 -1
- package/dist/zonos-elements/p-ad556be6.entry.js +0 -1
- package/dist/zonos-elements/p-b4792af0.entry.js +0 -1
- package/dist/zonos-elements/p-b9ff6458.entry.js +0 -1
- package/dist/zonos-elements/p-d3dbae8c.system.js +0 -1
- package/dist/zonos-elements/p-ebb9b902.system.js +0 -17
- package/dist/zonos-elements/p-ef1ce617.system.entry.js +0 -1
- package/dist/zonos-elements/p-ef75da6f.js +0 -17
- package/dist/zonos-elements/p-f3dbe934.entry.js +0 -1
- package/dist/zonos-elements/p-f741407e.system.entry.js +0 -1
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
6
|
const debounce$1 = require('./debounce-465a4328.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const localization = require('./localization-
|
|
8
|
+
const cart = require('./cart-9a9ae4b9.js');
|
|
9
|
+
const localization = require('./localization-0169b27d.js');
|
|
10
|
+
const translationStore = require('./translationStore-0c67178f.js');
|
|
10
11
|
const handleFetch = require('./handleFetch-45f35cac.js');
|
|
11
12
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
|
|
12
|
-
const TaxId = require('./TaxId-12acedde.js');
|
|
13
13
|
const classes = require('./classes-b7918f56.js');
|
|
14
|
+
const TaxId = require('./TaxId-12acedde.js');
|
|
14
15
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
15
16
|
const RemoveIcon$2 = require('./RemoveIcon-081ac073.js');
|
|
16
17
|
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
@@ -95,7 +96,7 @@ const ZonosAddress$1 = class {
|
|
|
95
96
|
index.registerInstance(this, hostRef);
|
|
96
97
|
this.invalidCharacters = index.createEvent(this, "invalidCharacters", 7);
|
|
97
98
|
this.taxIdChanged = index.createEvent(this, "taxIdChanged", 7);
|
|
98
|
-
this.
|
|
99
|
+
this.storeUnsubscribeList = [];
|
|
99
100
|
/**
|
|
100
101
|
* Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
|
|
101
102
|
*/
|
|
@@ -131,14 +132,6 @@ const ZonosAddress$1 = class {
|
|
|
131
132
|
*/
|
|
132
133
|
this.trackingSent = false;
|
|
133
134
|
this.prefetchLandedCost = throttle_1(cart.stripeStorePrefetchLandedCost, 1000);
|
|
134
|
-
this.onStoreCheckoutSessionIdChanged = () => {
|
|
135
|
-
const onCheckoutSessionIdChange = () => {
|
|
136
|
-
this.checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
137
|
-
};
|
|
138
|
-
// Trigger it once on init because onChange doesn't get triggered on initial load
|
|
139
|
-
onCheckoutSessionIdChange();
|
|
140
|
-
this.onStoreCheckoutSessionIdChangedSubscription = localization.storageStoreOnChange('checkoutSessionId', onCheckoutSessionIdChange);
|
|
141
|
-
};
|
|
142
135
|
}
|
|
143
136
|
getStripeAddressInstance() {
|
|
144
137
|
if (this.type === 'billing') {
|
|
@@ -342,22 +335,24 @@ const ZonosAddress$1 = class {
|
|
|
342
335
|
return null;
|
|
343
336
|
}
|
|
344
337
|
const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
|
|
345
|
-
return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { inputLabel:
|
|
338
|
+
return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { inputLabel: translationStore.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
|
|
346
339
|
cart.stripeStore.taxId = event.detail;
|
|
347
340
|
this.taxIdChanged.emit(event.detail);
|
|
348
341
|
} }), this.taxIdErrorMessage && (index.h("zonos-text", { textColor: 'red-600', type: "caption" }, this.taxIdErrorMessage))));
|
|
349
342
|
}
|
|
350
343
|
renderCompanyNameInput() {
|
|
351
|
-
// No need to render company name for billing address
|
|
352
|
-
if (this.type === 'billing') {
|
|
344
|
+
// No need to render company name for billing address (only allow for Collect)
|
|
345
|
+
if (this.type === 'billing' && !window.Zonos.isCollect) {
|
|
353
346
|
return null;
|
|
354
347
|
}
|
|
355
|
-
// only render the company input if the setting is enabled
|
|
356
|
-
const isCompanyNameEnabled = zonosStore.zonosStore.checkoutSettings.companyFieldsStatus === 'ENABLED'
|
|
348
|
+
// only render the company input if the setting is enabled or the cart is collect
|
|
349
|
+
const isCompanyNameEnabled = zonosStore.zonosStore.checkoutSettings.companyFieldsStatus === 'ENABLED' ||
|
|
350
|
+
!!window.Zonos.isCollect;
|
|
351
|
+
// No need to render company name for billing address (only allow for Collect)
|
|
357
352
|
if (!isCompanyNameEnabled) {
|
|
358
353
|
return null;
|
|
359
354
|
}
|
|
360
|
-
return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel:
|
|
355
|
+
return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: translationStore.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
|
|
361
356
|
cart.stripeStore.companyName = event.detail;
|
|
362
357
|
} }));
|
|
363
358
|
}
|
|
@@ -365,8 +360,11 @@ const ZonosAddress$1 = class {
|
|
|
365
360
|
// destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
|
|
366
361
|
const stripeElement = this.getStripeAddressInstance().stripeAddressElement;
|
|
367
362
|
stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.destroy();
|
|
368
|
-
//
|
|
369
|
-
|
|
363
|
+
// unsubscribe from store subscriptions
|
|
364
|
+
try {
|
|
365
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
366
|
+
}
|
|
367
|
+
catch (_a) { }
|
|
370
368
|
}
|
|
371
369
|
componentDidLoad() {
|
|
372
370
|
const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
|
|
@@ -375,7 +373,22 @@ const ZonosAddress$1 = class {
|
|
|
375
373
|
stripeAddressEventData.value.address.line1.length > 0;
|
|
376
374
|
// @Watch doesn't get trigger on initial load
|
|
377
375
|
void this.watchInitStripe();
|
|
378
|
-
this.
|
|
376
|
+
this.checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
377
|
+
this.storeUnsubscribeList = [
|
|
378
|
+
localization.storageStoreOnChange('checkoutSessionId', () => {
|
|
379
|
+
this.checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
380
|
+
}),
|
|
381
|
+
cart.stripeStoreOnChange('stripeElements', () => {
|
|
382
|
+
if (this.type === 'shipping') {
|
|
383
|
+
void this.watchInitStripe();
|
|
384
|
+
}
|
|
385
|
+
}),
|
|
386
|
+
cart.stripeStoreOnChange('stripeElementsForBillingAddress', () => {
|
|
387
|
+
if (this.type === 'billing') {
|
|
388
|
+
void this.watchInitStripe();
|
|
389
|
+
}
|
|
390
|
+
}),
|
|
391
|
+
];
|
|
379
392
|
}
|
|
380
393
|
render() {
|
|
381
394
|
var _a;
|
|
@@ -384,7 +397,11 @@ const ZonosAddress$1 = class {
|
|
|
384
397
|
this.isAddressFilled = true;
|
|
385
398
|
}
|
|
386
399
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
387
|
-
return (index.h(index.Host, { key: '
|
|
400
|
+
return (index.h(index.Host, { key: '15928518601e48825589ce4de4580263fec6a745', class: classes.classes([
|
|
401
|
+
'zonos--address',
|
|
402
|
+
'zonos--elements',
|
|
403
|
+
`zonos--${this.type}-address`,
|
|
404
|
+
]) }, this.titleText && (index.h("zonos-text", { key: '2e666ed81597ac95d3de575a2d901d083e9100cc', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), this.renderCompanyNameInput(), this.renderTaxIdInput(), index.h("div", { key: '51aa6d2415bf6c7e067d0565b11a0d2c0629200b', class: "zonos--address-component" })));
|
|
388
405
|
}
|
|
389
406
|
get el() { return index.getElement(this); }
|
|
390
407
|
static get watchers() { return {
|
|
@@ -414,8 +431,8 @@ const ZonosAddressDisplay = class {
|
|
|
414
431
|
return (index.h("zonos-text", { textColor: textColor, type: bold ? 'boldLabel' : 'body' }, content));
|
|
415
432
|
};
|
|
416
433
|
return (index.h(index.Host, { class: "zonos--address-form zonos--elements" }, index.h("div", { class: "zonos--title" }, index.h("zonos-text", { textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
|
|
417
|
-
?
|
|
418
|
-
:
|
|
434
|
+
? translationStore.translate('Shipping')
|
|
435
|
+
: translationStore.translate('Billing'))), index.h("div", { class: "zonos--address-group" }, name && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), index.h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), shippingZoneCountry && (index.h("div", { class: "zonos--address-line" }, index.h("zonos-country-flag", { class: "zonos--country-flag", countryCode: shippingZoneCountry.code }), ' ', renderEnteredInfoText({
|
|
419
436
|
content: shippingZoneCountry.displayName,
|
|
420
437
|
}))))));
|
|
421
438
|
}
|
|
@@ -453,14 +470,14 @@ const ZonosAddressForm = class {
|
|
|
453
470
|
name,
|
|
454
471
|
});
|
|
455
472
|
return (index.h(index.Host, { key: '22d085e462e69a4100a8cb1763367f53b933ed1d', class: "zonos--address-form zonos--elements" }, index.h("div", { key: '17d6c92370343ffbd1b4a85b3c49055a5a7f9d72', class: "zonos--title" }, index.h("zonos-text", { key: 'a4cb01bd8fed154567e0b7ade87777a1552ea815', textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
|
|
456
|
-
?
|
|
457
|
-
:
|
|
473
|
+
? translationStore.translate('Shipping')
|
|
474
|
+
: translationStore.translate('Billing'))), index.h("div", { key: '4a1dddabc011e465d295b5c2994fda3a2531c96e', class: "zonos--address-group" }, index.h("div", { key: '60df882b5717b2f557a5051f492b2c838f938cd9', class: "zonos--contact" }, index.h("zonos-text", { key: '90b6613ccf1b2a445baae5f700f392d195924688', type: "label" }, translationStore.translate('Contact')), index.h("zonos-input", { key: '125815769a366e113b61d5581578ef6ecbdffa79', class: "zonos--form-email", inputLabel: translationStore.translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), index.h("div", { key: 'd0d331fb33f40243ce23824db5ba9551fd5636f8', class: "zonos--name zonos--address-row" }, index.h("zonos-input", { key: '46323db8f305e491215df03ef2092e76eec38355', class: "zonos--form-first-name", inputLabel: translationStore.translate('First name'), inputValue: firstName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
|
|
458
475
|
key: 'name',
|
|
459
476
|
value: `${e.detail} ${lastName}`,
|
|
460
|
-
}) }), index.h("zonos-input", { key: '3c055ee2f1fcaf93ebcbd8f11ad6609cd33e9e14', class: "zonos--form-last-name", inputLabel:
|
|
477
|
+
}) }), index.h("zonos-input", { key: '3c055ee2f1fcaf93ebcbd8f11ad6609cd33e9e14', class: "zonos--form-last-name", inputLabel: translationStore.translate('Last name'), inputValue: lastName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
|
|
461
478
|
key: 'name',
|
|
462
479
|
value: `${firstName} ${e.detail}`,
|
|
463
|
-
}) }))), index.h("div", { key: 'ce30f816d03b497eb4491d2554eb63c0aabf110c', class: "zonos--address" }, index.h("zonos-text", { key: '304867c5354ac55071c88944a63bba88ea3fb86f', type: "label" },
|
|
480
|
+
}) }))), index.h("div", { key: 'ce30f816d03b497eb4491d2554eb63c0aabf110c', class: "zonos--address" }, index.h("zonos-text", { key: '304867c5354ac55071c88944a63bba88ea3fb86f', type: "label" }, translationStore.translate('Address')), index.h("zonos-input", { key: 'f0efe937603a38761643af1486b53359a19593e5', class: "zonos--form-country", inputLabel: translationStore.translate('Country'), inputValue: country, isDisabled: true }), index.h("zonos-input", { key: '8360a4ae65c8963e886a3fb8322e0e539d121142', class: "zonos--form-line1", inputLabel: translationStore.translate('Address line 1'), inputValue: line1, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), index.h("zonos-input", { key: '2c9374917b705c2c9306d3d4d7fc4b4043c2b73b', class: "zonos--form-line2", inputLabel: translationStore.translate('Address line 2'), inputValue: line2, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), index.h("div", { key: 'fd067074070cadba3d895503f35c344ff817fec2', class: "zonos--address-row" }, index.h("zonos-input", { key: 'a565bee68e2498403df2801eb90005e8cb2d6f44', class: "zonos--form-city", inputLabel: translationStore.translate('City'), inputValue: city, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), index.h("zonos-input", { key: '89bae75b691aacdd62b624f65eee303bfb3fc811', class: "zonos--form-state", inputLabel: translationStore.translate('State/Province'), inputValue: state, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), index.h("zonos-input", { key: '9a851b9f449ed135859b7b828bf362168caf76fb', class: "zonos--form-postal-code", inputLabel: translationStore.translate('Postal code'), inputValue: postal_code, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), index.h("zonos-input", { key: 'a51b8ba1e22d5a12eac9021abe83fdc20f8eb1a6', class: "zonos--form-phone", inputLabel: translationStore.translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
|
|
464
481
|
}
|
|
465
482
|
static get watchers() { return {
|
|
466
483
|
"translatedAddress": ["watchCurrentAddress"]
|
|
@@ -546,9 +563,9 @@ const ZonosAddressSuggestions = class {
|
|
|
546
563
|
return segments;
|
|
547
564
|
}
|
|
548
565
|
render() {
|
|
549
|
-
return (index.h(index.Host, { key: '
|
|
566
|
+
return (index.h(index.Host, { key: '8ef1b971b88cd2280c40e69e1f6824f64e618467', class: "zonos--address-suggestions", role: "group", style: {
|
|
550
567
|
'--zonos--border-radius': getBorderRadius.getBorderRadius(),
|
|
551
|
-
} }, index.h("ul", { key: '
|
|
568
|
+
} }, index.h("ul", { key: '383e615d02815aad0f06d468dfcfbef3640fd5f5', "aria-label": "Suggestions", class: "wrapper", role: "listbox" }, !!this.localSuggestions.length && (index.h("li", { key: 'f2e6b766f567b0933263e19666e440cf692f248c', "aria-selected": false, class: "powered-by option", role: "option" }, index.h("div", { key: 'd629272b98461726f7eda75fde4cf1070946cd70', class: "powered-by-container" }, index.h("zonos-text", { key: '5b5591b04da2034b783f61394dbdc8f172484972', type: "caption" }, "Suggestions powered by"), index.h("zonos-text", { key: '45352a7ba4314ee1d68c2a53bb722368182283ee', type: "semiBoldLabel" }, "Google")), index.h("zonos-button", { key: '506450cf69ef74cde9ed5159633040701994f455', "aria-label": "Clear suggestions", icon: index.h("zonos-icon", { content: RemoveIcon$1 }), noBackground: true, onClick: () => {
|
|
552
569
|
this.localSuggestions = [];
|
|
553
570
|
} }))), this.localSuggestions.map(suggestion => (
|
|
554
571
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
@@ -731,7 +748,7 @@ const ZonosAddressUpdateDialog = class {
|
|
|
731
748
|
return (index.h(index.Host, { key: '655845cef04f4af526b1a1c4e49243c4f2b4c7f6', class: classes.classes([
|
|
732
749
|
'zonos--address-update-dialog zonos--elements',
|
|
733
750
|
this.isMobile && 'mobile',
|
|
734
|
-
]) }, index.h("zonos-dialog", { key: 'eab429bb78ce6f05ba463d8748d7edd5499402fa', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeUpdateDialog.emit(), open: this.dialogOpen, width: "568px" }, index.h("div", { key: '08f0400e62addfcaffd91bf5200999d29bbd2da9', class: "zonos--body" }, index.h("div", { key: '8699df5e2f823e19066fbb552ba2a66c127c05e9', class: "zonos--dialog-header" }, index.h("div", { key: '92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3', class: "zonos--dialog-title" }, index.h("zonos-text", { key: 'aaac3375526bddb319ce7c8f49bde30da7210264', type: "title" },
|
|
751
|
+
]) }, index.h("zonos-dialog", { key: 'eab429bb78ce6f05ba463d8748d7edd5499402fa', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeUpdateDialog.emit(), open: this.dialogOpen, width: "568px" }, index.h("div", { key: '08f0400e62addfcaffd91bf5200999d29bbd2da9', class: "zonos--body" }, index.h("div", { key: '8699df5e2f823e19066fbb552ba2a66c127c05e9', class: "zonos--dialog-header" }, index.h("div", { key: '92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3', class: "zonos--dialog-title" }, index.h("zonos-text", { key: 'aaac3375526bddb319ce7c8f49bde30da7210264', type: "title" }, translationStore.translate('Update your address')), index.h("zonos-button", { key: '474cc2421cd3150daa46bfe215da6ae7df9c6087', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon$2.RemoveIcon }), noBackground: true, onClick: () => this.closeUpdateDialogHandler(), title: "Close checkout dialog" })), index.h("zonos-text", { key: '6d019250cce57e8b30dd790a184df7273bdb234f' }, translationStore.translate('To ensure delivery all address details must be in Latin characters.'))), index.h("div", { key: '80ee681844f4f4f43fce69d977b634b1fbc3d5f5', class: "zonos--group" }, index.h("zonos-text", { key: '940e510eceec156a74f32de84cf58ffebd796435', class: "zonos--what-you-entered", type: "semiBoldLabel" }, translationStore.translate('What you entered')), index.h("div", { key: 'f626127f5c399c29ab1022deb66aaee8f8a49601', class: "zonos--address-display-group" }, index.h("zonos-address-display", { key: '9dfcba1037325c3a1f9e82b8e4797e7872dd7e3f', addressType: "shipping", currentAddress: shipping }), billing && (index.h("zonos-address-display", { key: 'fee8ae2c6786d735133c2a0a42f3e3d40d7f9ea9', addressType: "billing", currentAddress: billing }))), index.h("div", { key: '5a82195018ff8cdfd1126f4424062a26c25ee757', class: "zonos--address-form-section" }, index.h("zonos-text", { key: 'f694dfad166697e4c034cea51057133b69b1c144', type: "semiBoldLabel" }, translationStore.translate('Translated address')), index.h("zonos-address-form", { key: '4a99c841cf4800de43c612cce3d56d956d02c22f', addressType: "shipping", class: "zonos--shipping-address-form", currentAddress: shipping, onAddressChange: e => {
|
|
735
752
|
const address = e.detail;
|
|
736
753
|
this.translatedShippingAddressState =
|
|
737
754
|
this.buildTranslateAddressState({
|
|
@@ -745,7 +762,7 @@ const ZonosAddressUpdateDialog = class {
|
|
|
745
762
|
currentAddress: billing,
|
|
746
763
|
translatedAddress: address,
|
|
747
764
|
});
|
|
748
|
-
}, translatedAddress: this.translatedBillingAddressState })))), index.h("div", { key: '918c3271579c3fc7a7efff0473b0ccf48fb575a2', class: "zonos--group-btn" }, index.h("div", { key: 'f73be0c1124d3a4d340bc6e8512f6be8356c655d', class: "zonos--button-wrapper" }, index.h("zonos-button", { key: '172a6cc0a7b75afb400802ef6b87faae6e7e2483', class: "zonos--cancel-btn", onClick: () => this.closeUpdateDialogHandler(), variant: "subtle" },
|
|
765
|
+
}, translatedAddress: this.translatedBillingAddressState })))), index.h("div", { key: '918c3271579c3fc7a7efff0473b0ccf48fb575a2', class: "zonos--group-btn" }, index.h("div", { key: 'f73be0c1124d3a4d340bc6e8512f6be8356c655d', class: "zonos--button-wrapper" }, index.h("zonos-button", { key: '172a6cc0a7b75afb400802ef6b87faae6e7e2483', class: "zonos--cancel-btn", onClick: () => this.closeUpdateDialogHandler(), variant: "subtle" }, translationStore.translate('Cancel')), index.h("zonos-button", { key: '8fd08bc79b60eb9a0064c06ff9d840b1ecb09123', backgroundColor: this.submitBtnColor, class: "zonos--update-btn", loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "sm", variant: submitBtnType }, translationStore.translate('Update address'))))))));
|
|
749
766
|
}
|
|
750
767
|
get el() { return index.getElement(this); }
|
|
751
768
|
static get watchers() { return {
|
|
@@ -818,14 +835,14 @@ const ZonosCheckbox = class {
|
|
|
818
835
|
customRoundRadius: '4px',
|
|
819
836
|
overrideBorderStyle: this.borderStyle,
|
|
820
837
|
});
|
|
821
|
-
return (index.h(index.Host, { key: '
|
|
838
|
+
return (index.h(index.Host, { key: 'bef392ce775e35da3f0640dcbb8271437995daa7', class: classes.classes(['zonos--elements zonos--checkbox']), style: {
|
|
822
839
|
'--zonos--background-color': backgroundColor,
|
|
823
840
|
'--zonos--border-radius': borderStyle,
|
|
824
841
|
'--zonos--font-family': zonosStore.zonosStoreFontFamily(),
|
|
825
842
|
'--zonos--size': `${this.size}px`,
|
|
826
|
-
} }, index.h("label", { key: '
|
|
843
|
+
} }, index.h("label", { key: '059e2eabc4825738a6607cd307694b252ba55905', class: classes.classes([this.isDisabled && 'disabled']), htmlFor: this.inputId }, index.h("input", { key: 'a35c086ae478d5ac932608859e6b3250738c870f', checked: this.isChecked, disabled: this.isDisabled, hidden: true, id: this.inputId, onChange: e => {
|
|
827
844
|
this.checkboxSelected.emit(e.target.checked);
|
|
828
|
-
}, type: "checkbox" }), index.h("span", { key: '
|
|
845
|
+
}, type: "checkbox" }), index.h("span", { key: '2482799b470a2ef5050709b6de36469ec8321b04', class: "checkmark-container" }, index.h("svg", { key: '1034db2d054e98fe06688b602346097b3e7c7d9d', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'b926b486910470ea3180a904e8ec5ca2cf8e452f', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (index.h("zonos-text", { key: '5a31f075fb462c7419597f0d15b5e4a2f4e40148', size: this.fontSize }, this.label)))));
|
|
829
846
|
}
|
|
830
847
|
};
|
|
831
848
|
ZonosCheckbox.style = ZonosCheckboxStyle0;
|
|
@@ -1019,7 +1036,7 @@ const ZonosAddress = class {
|
|
|
1019
1036
|
(((_b = this.countryField) === null || _b === void 0 ? void 0 : _b.cityRequired) && !!(value === null || value === void 0 ? void 0 : value.trim()));
|
|
1020
1037
|
customErrors.city = '';
|
|
1021
1038
|
if (!isValid) {
|
|
1022
|
-
customErrors.city =
|
|
1039
|
+
customErrors.city = translationStore.translate('The field is incomplete');
|
|
1023
1040
|
}
|
|
1024
1041
|
break;
|
|
1025
1042
|
}
|
|
@@ -1028,7 +1045,7 @@ const ZonosAddress = class {
|
|
|
1028
1045
|
(((_d = this.countryField) === null || _d === void 0 ? void 0 : _d.stateRequired) && !!(value === null || value === void 0 ? void 0 : value.trim()));
|
|
1029
1046
|
customErrors.state = '';
|
|
1030
1047
|
if (!isValid) {
|
|
1031
|
-
customErrors.state =
|
|
1048
|
+
customErrors.state = translationStore.translate('The field is incomplete');
|
|
1032
1049
|
}
|
|
1033
1050
|
break;
|
|
1034
1051
|
}
|
|
@@ -1039,7 +1056,7 @@ const ZonosAddress = class {
|
|
|
1039
1056
|
});
|
|
1040
1057
|
customErrors.postalCode = '';
|
|
1041
1058
|
if (!isValid) {
|
|
1042
|
-
customErrors.postalCode =
|
|
1059
|
+
customErrors.postalCode = translationStore.translate('Your [zipLabel] is invalid', {
|
|
1043
1060
|
zipLabel: ((_e = this.countryField) === null || _e === void 0 ? void 0 : _e.zipLabel) || 'ZIP',
|
|
1044
1061
|
});
|
|
1045
1062
|
}
|
|
@@ -1049,7 +1066,7 @@ const ZonosAddress = class {
|
|
|
1049
1066
|
const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
|
|
1050
1067
|
customErrors.firstName = '';
|
|
1051
1068
|
if (!isValid) {
|
|
1052
|
-
customErrors.firstName =
|
|
1069
|
+
customErrors.firstName = translationStore.translate('Please provide your first name.');
|
|
1053
1070
|
}
|
|
1054
1071
|
break;
|
|
1055
1072
|
}
|
|
@@ -1057,7 +1074,7 @@ const ZonosAddress = class {
|
|
|
1057
1074
|
const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
|
|
1058
1075
|
customErrors.lastName = '';
|
|
1059
1076
|
if (!isValid) {
|
|
1060
|
-
customErrors.lastName =
|
|
1077
|
+
customErrors.lastName = translationStore.translate('Please provide your last name.');
|
|
1061
1078
|
}
|
|
1062
1079
|
break;
|
|
1063
1080
|
}
|
|
@@ -1065,7 +1082,7 @@ const ZonosAddress = class {
|
|
|
1065
1082
|
const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
|
|
1066
1083
|
customErrors.line1 = '';
|
|
1067
1084
|
if (!isValid) {
|
|
1068
|
-
customErrors.line1 =
|
|
1085
|
+
customErrors.line1 = translationStore.translate('The field is incomplete');
|
|
1069
1086
|
}
|
|
1070
1087
|
break;
|
|
1071
1088
|
}
|
|
@@ -1075,17 +1092,17 @@ const ZonosAddress = class {
|
|
|
1075
1092
|
const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
|
|
1076
1093
|
customErrors.phone = '';
|
|
1077
1094
|
if (!isValid) {
|
|
1078
|
-
customErrors.phone =
|
|
1095
|
+
customErrors.phone = translationStore.translate('Please provide a mobile phone number.');
|
|
1079
1096
|
}
|
|
1080
1097
|
}
|
|
1081
1098
|
else {
|
|
1082
1099
|
customErrors.phone = '';
|
|
1083
1100
|
// If the phone number is empty, set the error message
|
|
1084
1101
|
if (phoneValidateInfo.isEmpty) {
|
|
1085
|
-
customErrors.phone =
|
|
1102
|
+
customErrors.phone = translationStore.translate('Please provide a mobile phone number.');
|
|
1086
1103
|
}
|
|
1087
1104
|
else if (phoneValidateInfo.wrongFormat) {
|
|
1088
|
-
customErrors.phone =
|
|
1105
|
+
customErrors.phone = translationStore.translate('Your mobile phone number is incomplete.');
|
|
1089
1106
|
}
|
|
1090
1107
|
}
|
|
1091
1108
|
break;
|
|
@@ -1210,7 +1227,7 @@ const ZonosAddress = class {
|
|
|
1210
1227
|
return null;
|
|
1211
1228
|
}
|
|
1212
1229
|
const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
|
|
1213
|
-
return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { error: this.taxIdErrorMessage, inputLabel:
|
|
1230
|
+
return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { error: this.taxIdErrorMessage, inputLabel: translationStore.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
|
|
1214
1231
|
cart.stripeStore.taxId = event.detail;
|
|
1215
1232
|
} })));
|
|
1216
1233
|
}
|
|
@@ -1224,7 +1241,7 @@ const ZonosAddress = class {
|
|
|
1224
1241
|
if (!isCompanyNameEnabled) {
|
|
1225
1242
|
return null;
|
|
1226
1243
|
}
|
|
1227
|
-
return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel:
|
|
1244
|
+
return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: translationStore.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
|
|
1228
1245
|
cart.stripeStore.companyName = event.detail;
|
|
1229
1246
|
} }));
|
|
1230
1247
|
}
|
|
@@ -1531,7 +1548,7 @@ const ZonosAddress = class {
|
|
|
1531
1548
|
value: region.interpayCode,
|
|
1532
1549
|
}))
|
|
1533
1550
|
.sort((a, b) => a.label.localeCompare(b.label));
|
|
1534
|
-
return (index.h("div", { "aria-label": `${this.type} address form`, class: "zonos--custom-address-form", role: "form" }, index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.firstName : undefined, inputLabel:
|
|
1551
|
+
return (index.h("div", { "aria-label": `${this.type} address form`, class: "zonos--custom-address-form", role: "form" }, index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.firstName : undefined, inputLabel: translationStore.translate('First name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName, onInputChange: (event) => {
|
|
1535
1552
|
this.validate({
|
|
1536
1553
|
type: this.type,
|
|
1537
1554
|
value: event.detail,
|
|
@@ -1545,7 +1562,7 @@ const ZonosAddress = class {
|
|
|
1545
1562
|
* Therefore, we must update the value after validation to ensure correct error state
|
|
1546
1563
|
*/
|
|
1547
1564
|
this.firstName = event.detail;
|
|
1548
|
-
}, required: true }), index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.lastName : undefined, inputLabel:
|
|
1565
|
+
}, required: true }), index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.lastName : undefined, inputLabel: translationStore.translate('Last name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName, onInputChange: (event) => {
|
|
1549
1566
|
this.validate({
|
|
1550
1567
|
type: this.type,
|
|
1551
1568
|
value: event.detail,
|
|
@@ -1588,9 +1605,9 @@ const ZonosAddress = class {
|
|
|
1588
1605
|
this.city = '';
|
|
1589
1606
|
this.state = '';
|
|
1590
1607
|
this.postalCode = '';
|
|
1591
|
-
}, options: this.shipToCountries || [], required: true, selectLabel:
|
|
1608
|
+
}, options: this.shipToCountries || [], required: true, selectLabel: translationStore.translate('Country'), selectedValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
|
|
1592
1609
|
localization.localizationStore.selectedCountryCode ||
|
|
1593
|
-
(firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.value), title: `${this.type} country` }), index.h("div", { class: "zonos--custom-address-form-line1-wrapper" }, index.h("zonos-stripe-input", { "aria-autocomplete": "list", "aria-controls": "autocomplete-search", "aria-required": "true", autoComplete: "shipping address-line1", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.line1 : undefined, inputLabel:
|
|
1610
|
+
(firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.value), title: `${this.type} country` }), index.h("div", { class: "zonos--custom-address-form-line1-wrapper" }, index.h("zonos-stripe-input", { "aria-autocomplete": "list", "aria-controls": "autocomplete-search", "aria-required": "true", autoComplete: "shipping address-line1", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.line1 : undefined, inputLabel: translationStore.translate('Address line 1'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line1, name: "address-line1", onInputChange: (event) => {
|
|
1594
1611
|
this.validate({
|
|
1595
1612
|
type: this.type,
|
|
1596
1613
|
value: event.detail,
|
|
@@ -1621,9 +1638,9 @@ const ZonosAddress = class {
|
|
|
1621
1638
|
}, suggestions: this.addressSuggestions, type: this.type })), index.h("div", { "aria-label": "Additional address details", class: classes.classes([
|
|
1622
1639
|
'zonos--custom-address-form-additional-fields',
|
|
1623
1640
|
countryCode && this.isAddressLine1Entered ? 'zonos--show' : '',
|
|
1624
|
-
]), role: "group" }, index.h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel:
|
|
1641
|
+
]), role: "group" }, index.h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel: translationStore.translate(((_c = this.countryField) === null || _c === void 0 ? void 0 : _c.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
|
|
1625
1642
|
this.line2 = event.detail;
|
|
1626
|
-
} }), ((_d = this.countryField) === null || _d === void 0 ? void 0 : _d.cityShow) && (index.h("zonos-stripe-input", { "aria-required": ((_e = this.countryField) === null || _e === void 0 ? void 0 : _e.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel:
|
|
1643
|
+
} }), ((_d = this.countryField) === null || _d === void 0 ? void 0 : _d.cityShow) && (index.h("zonos-stripe-input", { "aria-required": ((_e = this.countryField) === null || _e === void 0 ? void 0 : _e.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: translationStore.translate(((_f = this.countryField) === null || _f === void 0 ? void 0 : _f.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
|
|
1627
1644
|
this.validate({
|
|
1628
1645
|
type: this.type,
|
|
1629
1646
|
value: event.detail,
|
|
@@ -1651,9 +1668,9 @@ const ZonosAddress = class {
|
|
|
1651
1668
|
* Therefore, we must update the value after validation to ensure correct error state
|
|
1652
1669
|
*/
|
|
1653
1670
|
this.state = event.detail;
|
|
1654
|
-
}, options: stateOptions, required: (_k = this.countryField) === null || _k === void 0 ? void 0 : _k.stateRequired, selectLabel:
|
|
1671
|
+
}, options: stateOptions, required: (_k = this.countryField) === null || _k === void 0 ? void 0 : _k.stateRequired, selectLabel: translationStore.translate(((_l = this.countryField) === null || _l === void 0 ? void 0 : _l.stateLabel) || 'State'), selectedValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.state, title: `${this.type} state` })), ((_m = this.countryField) === null || _m === void 0 ? void 0 : _m.zipShow) && (index.h("zonos-stripe-input", { "aria-describedby": ((_o = this.countryField) === null || _o === void 0 ? void 0 : _o.zipFormat)
|
|
1655
1672
|
? `zip-format-${this.type}`
|
|
1656
|
-
: undefined, "aria-required": ((_p = this.countryField) === null || _p === void 0 ? void 0 : _p.zipRequired) ? 'true' : 'false', autoComplete: "shipping postal-code", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.postalCode : undefined, inputLabel:
|
|
1673
|
+
: undefined, "aria-required": ((_p = this.countryField) === null || _p === void 0 ? void 0 : _p.zipRequired) ? 'true' : 'false', autoComplete: "shipping postal-code", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.postalCode : undefined, inputLabel: translationStore.translate(((_q = this.countryField) === null || _q === void 0 ? void 0 : _q.zipLabel) || 'Zip'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.postal_code) || '', name: "postalCode", onInputChange: (event) => {
|
|
1657
1674
|
this.validate({
|
|
1658
1675
|
type: this.type,
|
|
1659
1676
|
value: event.detail,
|
|
@@ -1667,7 +1684,7 @@ const ZonosAddress = class {
|
|
|
1667
1684
|
* Therefore, we must update the value after validation to ensure correct error state
|
|
1668
1685
|
*/
|
|
1669
1686
|
this.postalCode = event.detail;
|
|
1670
|
-
}, required: (_r = this.countryField) === null || _r === void 0 ? void 0 : _r.zipRequired, title: `${this.type} zip code` }))), index.h("zonos-stripe-phone-input", { autoComplete: "shipping tel", class: "zonos--custom-address-form-input", countryCode: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country, countryOptions: (_s = zonosStore.zonosStore.genericSettings) === null || _s === void 0 ? void 0 : _s.countryFields, error: showError ? customAddressErrors.phone : undefined, inputLabel:
|
|
1687
|
+
}, required: (_r = this.countryField) === null || _r === void 0 ? void 0 : _r.zipRequired, title: `${this.type} zip code` }))), index.h("zonos-stripe-phone-input", { autoComplete: "shipping tel", class: "zonos--custom-address-form-input", countryCode: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country, countryOptions: (_s = zonosStore.zonosStore.genericSettings) === null || _s === void 0 ? void 0 : _s.countryFields, error: showError ? customAddressErrors.phone : undefined, inputLabel: translationStore.translate('Phone number'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone) || '', onInputValueChange: event => {
|
|
1671
1688
|
const { isEmpty, phoneNumber, valid, wrongFormat } = event.detail;
|
|
1672
1689
|
// Validate the phone number
|
|
1673
1690
|
this.validate({
|
|
@@ -1738,10 +1755,10 @@ const ZonosAddress = class {
|
|
|
1738
1755
|
this.country = localization.localizationStore.selectedCountryCode;
|
|
1739
1756
|
}
|
|
1740
1757
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
1741
|
-
return (index.h(index.Host, { key: '
|
|
1758
|
+
return (index.h(index.Host, { key: 'dcddfc6f0c63371c49f223f86a6c00df7ab30eed', class: classes.classes([
|
|
1742
1759
|
'zonos--address zonos--elements',
|
|
1743
1760
|
`zonos--${this.type}-address`,
|
|
1744
|
-
]) }, index.h("zonos-text", { key: '
|
|
1761
|
+
]) }, index.h("zonos-text", { key: '70139b5412028d5dba2cc51ee8e3a81e182fd19a', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
|
|
1745
1762
|
}
|
|
1746
1763
|
get el() { return index.getElement(this); }
|
|
1747
1764
|
static get watchers() { return {
|
|
@@ -1851,7 +1868,7 @@ const ZonosDialog = class {
|
|
|
1851
1868
|
const borderStyle = getBorderRadius.getBorderRadius({
|
|
1852
1869
|
overrideBorderStyle: this.borderStyle,
|
|
1853
1870
|
});
|
|
1854
|
-
return (index.h(index.Host, { key: '
|
|
1871
|
+
return (index.h(index.Host, { key: '6e673f681a3111d8e33c8cf4e8ab0c8f27c75d48', class: classes.classes([
|
|
1855
1872
|
'zonos--elements',
|
|
1856
1873
|
this.open && 'open',
|
|
1857
1874
|
this.isLoading && 'is-loading',
|
|
@@ -1863,10 +1880,10 @@ const ZonosDialog = class {
|
|
|
1863
1880
|
'--zonos--height': this.height || 'initial',
|
|
1864
1881
|
'--zonos--min-height': this.minHeight || '500px',
|
|
1865
1882
|
'--zonos--width': this.width,
|
|
1866
|
-
} }, index.h("div", { key: '
|
|
1883
|
+
} }, index.h("div", { key: 'f245de30fb680fd673bd8531f3982b73ed506308', class: "zonos--backdrop" }), index.h("div", { key: 'ee75ecd48e28f38be08b5db9078c0b3b28b9bd9f', class: "zonos--dialog-layout", inert: !this.open, onClick: this.clickOutsideDialogHandler }, index.h("div", { key: 'ce7d2273f358001b5899ba7a6ea8d5bd91ab55cb', class: "zonos--dialog" }, this.isLoading && (index.h("div", { key: 'e2cd0f877ed4f8b78b549a4aaedf1e67a234b0f7', class: "zonos--loading" }, index.h("zonos-spinner", { key: 'e0507e5fea599494979287fc4f13a7da08be758b', size: 30 }))), (this.headerText || !this.noCloseButton) && (index.h("div", { key: '8d6cac393a445febf36cc6fb1811c00223518481', class: "zonos--header" }, this.headerText && (index.h("h3", { key: 'cb634d14db0a14144a370d66e3d5aa9147914038', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { key: 'd11ff8473046b201bad444c9b81a0566dd400829', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, title: "Close dialog", variant: "subtle" })))), index.h("div", { key: '356588fe85cce5298e4c2e862c31dab3018602a5', class: classes.classes([
|
|
1867
1884
|
'zonos--body',
|
|
1868
1885
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
1869
|
-
]) }, index.h("slot", { key: '
|
|
1886
|
+
]) }, index.h("slot", { key: 'd525f4fab2449a219d42ccb45b4497076b5973c9' })), index.h("slot", { key: 'febb4e4ab0cb950b3a346052d60fa70ec8346be4', name: "dialog-footer" })))));
|
|
1870
1887
|
}
|
|
1871
1888
|
static get assetsDirs() { return ["assets"]; }
|
|
1872
1889
|
};
|
|
@@ -1884,6 +1901,7 @@ const ZonosLinkAuthentication = class {
|
|
|
1884
1901
|
constructor(hostRef) {
|
|
1885
1902
|
index.registerInstance(this, hostRef);
|
|
1886
1903
|
this.linkAuthenticationChange = index.createEvent(this, "linkAuthenticationChange", 7);
|
|
1904
|
+
this.storeUnsubscribeList = [];
|
|
1887
1905
|
/**
|
|
1888
1906
|
* Default email for stripe
|
|
1889
1907
|
*/
|
|
@@ -1918,10 +1936,10 @@ const ZonosLinkAuthentication = class {
|
|
|
1918
1936
|
watchIsStagingMode() {
|
|
1919
1937
|
// Wait for the DOM to be ready before re-initializing Link element
|
|
1920
1938
|
setTimeout(() => {
|
|
1921
|
-
this.watchInitStripe();
|
|
1939
|
+
void this.watchInitStripe();
|
|
1922
1940
|
}, 0);
|
|
1923
1941
|
}
|
|
1924
|
-
watchInitStripe() {
|
|
1942
|
+
async watchInitStripe() {
|
|
1925
1943
|
if (!this.stripe || !cart.stripeStore.stripeElements) {
|
|
1926
1944
|
return;
|
|
1927
1945
|
}
|
|
@@ -1980,7 +1998,31 @@ const ZonosLinkAuthentication = class {
|
|
|
1980
1998
|
void this.watchInitStripe();
|
|
1981
1999
|
}, 5);
|
|
1982
2000
|
}
|
|
2001
|
+
disconnectedCallback() {
|
|
2002
|
+
// unsubscribe from store subscriptions
|
|
2003
|
+
try {
|
|
2004
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
2005
|
+
}
|
|
2006
|
+
catch (_a) { }
|
|
2007
|
+
}
|
|
1983
2008
|
componentDidLoad() {
|
|
2009
|
+
this.storeUnsubscribeList = [
|
|
2010
|
+
cart.stripeStoreOnChange('stripeElements', async () => {
|
|
2011
|
+
// Wait for the stripe elements to be ready with the new client secret
|
|
2012
|
+
await new Promise(resolve => setTimeout(resolve, 1));
|
|
2013
|
+
void this.watchInitStripe();
|
|
2014
|
+
}),
|
|
2015
|
+
cart.stripeStoreOnChange('clientSecret', async () => {
|
|
2016
|
+
// Wait for the stripe elements to be ready with the new client secret
|
|
2017
|
+
await new Promise(resolve => setTimeout(resolve, 1));
|
|
2018
|
+
this.clientSecret = cart.stripeStore.clientSecret;
|
|
2019
|
+
}),
|
|
2020
|
+
cart.stripeStoreOnChange('stripe', async () => {
|
|
2021
|
+
// Wait for the stripe elements to be ready with the new client secret
|
|
2022
|
+
await new Promise(resolve => setTimeout(resolve, 1));
|
|
2023
|
+
this.stripe = cart.stripeStore.stripe;
|
|
2024
|
+
}),
|
|
2025
|
+
];
|
|
1984
2026
|
// @Watch doesn't get trigger on initial load
|
|
1985
2027
|
this.watchInitStripe();
|
|
1986
2028
|
if (!this.defaultEmail) {
|
|
@@ -1995,7 +2037,7 @@ const ZonosLinkAuthentication = class {
|
|
|
1995
2037
|
const renderEmailAddress = () => {
|
|
1996
2038
|
var _a;
|
|
1997
2039
|
if (cart.cartStore.isStagingMode) {
|
|
1998
|
-
return (index.h("zonos-stripe-input", { inputLabel:
|
|
2040
|
+
return (index.h("zonos-stripe-input", { inputLabel: translationStore.translate('Email'), inputValue: this.defaultEmail ||
|
|
1999
2041
|
((_a = cart.stripeStore.stripeLinkEventData) === null || _a === void 0 ? void 0 : _a.value.email) ||
|
|
2000
2042
|
'', isError: this.isEmailError, onBlur: () => {
|
|
2001
2043
|
var _a;
|
|
@@ -2013,7 +2055,7 @@ const ZonosLinkAuthentication = class {
|
|
|
2013
2055
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
2014
2056
|
return (index.h(index.Host, { class: "zonos--link-authentication zonos--elements", style: {
|
|
2015
2057
|
'--zonos--border-radius': getBorderRadius.getBorderRadius(),
|
|
2016
|
-
} }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText), renderEmailAddress(), this.isEmailError && (index.h("zonos-text", { textColor: "red-600" },
|
|
2058
|
+
} }, this.titleText && (index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), renderEmailAddress(), this.isEmailError && (index.h("zonos-text", { textColor: "red-600" }, translationStore.translate('Please enter a valid email address.')))));
|
|
2017
2059
|
}
|
|
2018
2060
|
get el() { return index.getElement(this); }
|
|
2019
2061
|
static get watchers() { return {
|
|
@@ -8049,24 +8091,24 @@ const ZonosStripePhoneInput = class {
|
|
|
8049
8091
|
.filter(Boolean)
|
|
8050
8092
|
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
|
8051
8093
|
: [];
|
|
8052
|
-
return (index.h(index.Host, { key: '
|
|
8094
|
+
return (index.h(index.Host, { key: 'ed5b02d0f617b0611ecba382cf8447570c3cee76', class: classes.classes([
|
|
8053
8095
|
'zonos--phone-input zonos--elements',
|
|
8054
8096
|
isDark && 'dark',
|
|
8055
|
-
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '
|
|
8097
|
+
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '8644eb1a24b4a2cdf491a8176f70e2fa35389fa6', class: classes.classes([
|
|
8056
8098
|
'zonos--label-wrapper',
|
|
8057
8099
|
this.disabled && 'disabled',
|
|
8058
8100
|
this.isFocused && 'focused',
|
|
8059
8101
|
hasContent && 'has-content',
|
|
8060
8102
|
this.error && 'has-error',
|
|
8061
8103
|
this.inputLabel && 'has-label',
|
|
8062
|
-
]) }, index.h("select", { key: '
|
|
8104
|
+
]) }, index.h("select", { key: '747109b80d3d02778ded01392d853a050f675114', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
|
|
8063
8105
|
var _a;
|
|
8064
8106
|
return (index.h("option", { key: option.countryCode, selected: option.countryCode === ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.countryCode), value: option.countryCode }, option.displayName, " (+", option.phoneCode, ")"));
|
|
8065
|
-
})), index.h("div", { key: '
|
|
8107
|
+
})), index.h("div", { key: '399beecaead5791d81ffd1db679f5b235c056769', class: "zonos--input-group" }, index.h("div", { key: '599a287f610935762e3229577bf35cfaee8ffe7f', class: "zonos--select-wrapper" }, index.h("div", { key: 'a1402a12ffa599e4dd42523696121d0a1cec60b6', class: "zonos--country-select" }, index.h("div", { key: 'a798cf4e8f4f5cfef5554404c578076f507d0dd2', class: "zonos--country-select-content" }, this.selectedCountry && (index.h("div", { key: '6a0313b6cd969a095002b18830fcbbd104e42570', class: "zonos--country-select-selected" }, index.h("div", { key: 'b6d2403854632f40dfd23d15b1eb8ef5625e1059', class: "zonos--country-flag-wrapper" }, index.h("zonos-country-flag", { key: '60397bbbbc9c6083064de1427cedeb148f36a35d', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), index.h("div", { key: 'effc1b9bc5fa1cd832e686b6e87ccac87e41ffb8', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), index.h("div", { key: '8e5aa3603dc4a869ce7335c2903a15903d5e61d4', class: "zonos--select-chevron-wrapper" }, index.h("zonos-icon", { key: '8b9ea89b5234a345d556d06649add11401baa184', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon$1, iconColor: "gray-800" }))))), index.h("div", { key: '21514d3e3f66095b79eb53e47fff6a98fbf12fba', class: classes.classes([
|
|
8066
8108
|
'zonos--input-container',
|
|
8067
8109
|
this.inputLabel && 'has-label',
|
|
8068
8110
|
hasContent && 'has-content',
|
|
8069
|
-
]) }, index.h("input", Object.assign({ key: '
|
|
8111
|
+
]) }, index.h("input", Object.assign({ key: '50421e7a8343203ee623a4e61f957abd115d0495' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (index.h("div", { key: '5025154c17fc9145b1b2bf2036ec7796287094ea', class: "zonos--floated-label" }, index.h("label", { key: '9af81cc3320de319ea84637bbb923c4b81a506d1', htmlFor: this.inputId }, this.inputLabel || translationStore.translate('Phone number'))))))), this.error && (index.h("zonos-text", { key: '523df8b2d650663ac43516d8ae9954ffd208c5e8', textColor: "red-600" }, this.error))));
|
|
8070
8112
|
}
|
|
8071
8113
|
get el() { return index.getElement(this); }
|
|
8072
8114
|
static get watchers() { return {
|
|
@@ -8182,14 +8224,14 @@ const ZonosStripeSelect = class {
|
|
|
8182
8224
|
const fontSize = zonosStore.zonosStore.appearance.fontSizeInputValue || 16;
|
|
8183
8225
|
const hasContent = this.internalValue || this.selectPlaceholder;
|
|
8184
8226
|
const showClearButton = this.isClearable && this.internalValue && !this.isDisabled;
|
|
8185
|
-
return (index.h(index.Host, { key: '
|
|
8227
|
+
return (index.h(index.Host, { key: 'e781d691f1f1f72ceed06c488af7f427ed4f82d0', class: classes.classes([
|
|
8186
8228
|
'zonos--select zonos--elements',
|
|
8187
8229
|
isDark && 'dark',
|
|
8188
8230
|
this.isError && 'has-error',
|
|
8189
|
-
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '
|
|
8231
|
+
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '4df83fa9bcb12e94e2d4bba3d6f31a4f56006097', class: classes.classes([
|
|
8190
8232
|
'zonos--label-wrapper',
|
|
8191
8233
|
this.isDisabled && 'disabled',
|
|
8192
|
-
]) }, index.h("select", Object.assign({ key: '
|
|
8234
|
+
]) }, index.h("select", Object.assign({ key: '31daa88fdaeb8a35055b97ade6aa10bbd234568a' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes.classes([
|
|
8193
8235
|
'zonos--floated-select',
|
|
8194
8236
|
!!this.selectLabel && 'has-label',
|
|
8195
8237
|
hasContent && 'has-content',
|
|
@@ -8199,9 +8241,9 @@ const ZonosStripeSelect = class {
|
|
|
8199
8241
|
this.selectChange.emit(select.value);
|
|
8200
8242
|
this.selectedValue = select.value;
|
|
8201
8243
|
this.el.dispatchEvent(new Event('change'));
|
|
8202
|
-
}, required: this.required }), index.h("option", { key: '
|
|
8244
|
+
}, required: this.required }), index.h("option", { key: '4c5c09493d0e9d38bc56860682c092017dc927ff', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || translationStore.translate('Select')), this.internalOptions.map(option => (index.h("option", { key: option.value, selected: this.internalValue === option.value ||
|
|
8203
8245
|
// Sometimes google returns the label not the code for some countries
|
|
8204
|
-
this.internalValue === option.label, value: option.value }, option.label)))), index.h("div", { key: '
|
|
8246
|
+
this.internalValue === option.label, value: option.value }, option.label)))), index.h("div", { key: 'abe6ea181a207b8b85232226078c92ab1a8b6618', class: "zonos--floated-label" }, index.h("label", { key: 'c079f2f21289e5ba06906fd7e29b3c8216c6ae01', htmlFor: this.selectId }, this.selectLabel)), index.h("div", { key: '3cad61609828a9b38a4a38625629481c9fb5411e', class: "zonos--actions-wrapper" }, showClearButton && (index.h("button", { key: 'f24323bdbd652cff52bec827f3a93a2e343e35c4', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, index.h("zonos-icon", { key: 'e8fe204b510477855de4dfee29d1200f30c50933', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), index.h("zonos-icon", { key: 'f071765d705d67b741f9381bbe96e2e8beb0968d', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (index.h("zonos-text", { key: '7425ced4032df77a7f1219f9c03caedcd1a55841', textColor: "red-600" }, this.error))));
|
|
8205
8247
|
}
|
|
8206
8248
|
get el() { return index.getElement(this); }
|
|
8207
8249
|
static get watchers() { return {
|