@zonos/elements 1.3.272 → 1.3.273
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-f1374a56.js → cart-660e115c.js} +32 -2
- package/dist/cjs/collect-286a9d04.js +3107 -0
- package/dist/cjs/{hasInclusivePrice-2f1232e3.js → hasInclusivePrice-b35e81aa.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-3760bec0.js → invoice-f032089f.js} +2 -2
- package/dist/cjs/isCollectMobileTablet-884d4280.js +15 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-503c8477.js → localization-f4a64f6f.js} +120 -0
- package/dist/cjs/{paypal-5e9b8224.js → paypal-125259ab.js} +2 -2
- package/dist/cjs/{placeTestOrder-d1be2c8e.js → placeTestOrder-02001a99.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-4486b06e.js → renderCheckoutCurrency-cad156a7.js} +2 -2
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +18 -18
- package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +170 -0
- 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 +19 -19
- 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 +150 -36
- package/dist/cjs/zonos-collect.cjs.entry.js +176 -38
- 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/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.css +43 -0
- package/dist/collection/components/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.js +215 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +4 -4
- 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-checkout.js +1 -1
- 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 +110 -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-order-details/zonos-collect-order-details.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +1 -17
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +21 -0
- 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-collect/zonos-collect.js +167 -29
- 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/airwallex.js +195 -0
- package/dist/collection/components/store/checkout/collect.js +4 -1
- package/dist/collection/components/store/checkout/stripe.js +26 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +6 -0
- package/dist/collection/components/store/translationStore/strings.base.js +6 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +6 -0
- package/dist/collection/components/store/translationStore/strings.french.js +6 -0
- package/dist/collection/components/store/translationStore/strings.german.js +6 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +6 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- 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/types/generated/graphql.internal.types.js +3 -0
- package/dist/esm/{cart-1415dcf0.js → cart-23e29950.js} +32 -2
- package/dist/esm/collect-a235299d.js +3092 -0
- package/dist/esm/{hasInclusivePrice-a3b0f71c.js → hasInclusivePrice-5e106f84.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-117efa2c.js → invoice-78f069c7.js} +2 -2
- package/dist/esm/isCollectMobileTablet-111b0dd7.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-29723d89.js → localization-17546792.js} +120 -0
- package/dist/esm/{paypal-cb5559d4.js → paypal-5bc6b0d0.js} +2 -2
- package/dist/esm/{placeTestOrder-443376eb.js → placeTestOrder-e842854a.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-8390b5bf.js → renderCheckoutCurrency-e3953f67.js} +2 -2
- package/dist/esm/zonos-address-display_8.entry.js +18 -18
- package/dist/esm/zonos-address_4.entry.js +8 -8
- package/dist/esm/zonos-airwallex-payment.entry.js +166 -0
- 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 +19 -19
- 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 +135 -21
- package/dist/esm/zonos-collect.entry.js +171 -33
- 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-23e29950.js +1 -0
- package/dist/esm-es5/collect-a235299d.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-a3b0f71c.js → hasInclusivePrice-5e106f84.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-117efa2c.js → invoice-78f069c7.js} +1 -1
- package/dist/esm-es5/isCollectMobileTablet-111b0dd7.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-17546792.js +1 -0
- package/dist/esm-es5/{paypal-cb5559d4.js → paypal-5bc6b0d0.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-443376eb.js → placeTestOrder-e842854a.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-8390b5bf.js → renderCheckoutCurrency-e3953f67.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -0
- 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 +61 -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/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.d.ts +46 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.d.ts +7 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.d.ts +4 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect.d.ts +29 -0
- package/dist/types/components/store/checkout/airwallex.d.ts +83 -0
- package/dist/types/components/store/checkout/collect.d.ts +12 -1
- package/dist/types/components/store/checkout/stripe.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +6 -0
- package/dist/types/components.d.ts +42 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +11 -1
- package/dist/types/types/checkout/api/PartyInfo.d.ts +6 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +20 -0
- package/dist/types/types/generated/graphql.internal.types.ts +29 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +6 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-013575f2.entry.js +1 -0
- package/dist/zonos-elements/{p-344a1fee.entry.js → p-055ef910.entry.js} +1 -1
- package/dist/zonos-elements/{p-3efe0875.entry.js → p-08b48608.entry.js} +1 -1
- package/dist/zonos-elements/{p-26ae4ee7.system.entry.js → p-0a54dae6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aafc2155.system.entry.js → p-0b59076d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c92a5ae5.system.entry.js → p-10571f94.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-658ab5e2.entry.js → p-12a05647.entry.js} +1 -1
- package/dist/zonos-elements/{p-b453ae2b.system.js → p-14018649.system.js} +2 -2
- package/dist/zonos-elements/{p-d2ba9e3c.system.entry.js → p-1678d8b4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-171d0f9f.system.js +1 -0
- package/dist/zonos-elements/{p-5bd47a30.system.entry.js → p-1a105d6e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1a4083be.system.js +1 -0
- package/dist/zonos-elements/{p-792fce17.system.entry.js → p-1f31f5a0.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2197d6ab.js +1 -0
- package/dist/zonos-elements/{p-536cbab5.system.entry.js → p-27e50593.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b4ba025.entry.js → p-2825431d.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-73730eb9.system.entry.js → p-2a1247f4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2adbbce7.system.js +1 -0
- package/dist/zonos-elements/{p-f98cdb98.system.entry.js → p-306e5499.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-831bcfb6.entry.js → p-31577ebd.entry.js} +1 -1
- package/dist/zonos-elements/{p-889a44fc.entry.js → p-328fd90e.entry.js} +1 -1
- package/dist/zonos-elements/p-33910e8b.js +1 -0
- package/dist/zonos-elements/{p-fb684748.system.entry.js → p-36b311f9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b4e5608.system.entry.js → p-3eba657b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-41619f29.js +1 -0
- package/dist/zonos-elements/{p-cdea0f7d.js → p-42948a52.js} +1 -1
- package/dist/zonos-elements/p-46e72a90.entry.js +1 -0
- package/dist/zonos-elements/p-49d8a10f.entry.js +1 -0
- package/dist/zonos-elements/{p-54a9c772.system.entry.js → p-4a960329.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-93324ee5.entry.js → p-4b371b65.entry.js} +1 -1
- package/dist/zonos-elements/p-539bc46c.js +1 -0
- package/dist/zonos-elements/p-579932a7.js +1 -0
- package/dist/zonos-elements/{p-2afecda7.entry.js → p-59b10526.entry.js} +1 -1
- package/dist/zonos-elements/{p-98bea13e.system.entry.js → p-5aa35d1c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd849c69.system.js → p-62c68aee.system.js} +1 -1
- package/dist/zonos-elements/{p-48f3e2d2.system.entry.js → p-6c19310e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-16948eea.system.entry.js → p-732e7373.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e8c4a29.entry.js → p-734d646b.entry.js} +1 -1
- package/dist/zonos-elements/{p-60f0ff42.entry.js → p-7eb47eb0.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb254a96.system.entry.js → p-86a9f048.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8af57c2a.js +1 -0
- package/dist/zonos-elements/{p-18c9565b.system.entry.js → p-8c4761d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c45df586.system.entry.js → p-8e77a3cd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-919c5500.entry.js +1 -0
- package/dist/zonos-elements/p-91b921a4.system.js +1 -0
- package/dist/zonos-elements/{p-3b600b89.system.js → p-9574695a.system.js} +1 -1
- package/dist/zonos-elements/p-97917371.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7ce6b8f7.system.entry.js → p-9b003a15.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-53be08c8.entry.js → p-9c3276c8.entry.js} +1 -1
- package/dist/zonos-elements/p-9cd41234.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5f92db80.system.entry.js → p-a1a05de4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4c94cfd3.entry.js → p-a968ccba.entry.js} +1 -1
- package/dist/zonos-elements/{p-ee00f232.entry.js → p-abd485df.entry.js} +1 -1
- package/dist/zonos-elements/{p-7d859914.entry.js → p-ad961f5d.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b87101d.system.entry.js → p-b5c01288.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bf8c98ab.system.js +1 -0
- package/dist/zonos-elements/{p-2d1055d5.entry.js → p-c13d2e3f.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b46f3bd.system.entry.js → p-c15476a1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e36a7cf.system.entry.js → p-c6823974.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dae881f2.entry.js → p-c83bc4b3.entry.js} +1 -1
- package/dist/zonos-elements/{p-134c5010.system.entry.js → p-c846a5f3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7aca66cd.entry.js → p-cc508de8.entry.js} +1 -1
- package/dist/zonos-elements/{p-6609467e.entry.js → p-ccd14aa5.entry.js} +1 -1
- package/dist/zonos-elements/{p-318e704a.system.js → p-d25759fb.system.js} +1 -1
- package/dist/zonos-elements/{p-a956e28f.entry.js → p-d5e66ea6.entry.js} +1 -1
- package/dist/zonos-elements/{p-7536cf94.system.entry.js → p-daf57db3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b35a0b1e.entry.js → p-dcef2202.entry.js} +1 -1
- package/dist/zonos-elements/{p-283ffaad.entry.js → p-dd6da3de.entry.js} +1 -1
- package/dist/zonos-elements/{p-bd2daace.entry.js → p-df6fbf3f.entry.js} +1 -1
- package/dist/zonos-elements/{p-c16c7978.entry.js → p-e643346a.entry.js} +1 -1
- package/dist/zonos-elements/{p-b375372e.entry.js → p-e8cb382e.entry.js} +1 -1
- package/dist/zonos-elements/{p-f4be6ce5.system.entry.js → p-e8ec88a9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e9afd736.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c425d3d9.js → p-e9c8a235.js} +1 -1
- package/dist/zonos-elements/{p-ccc8d669.system.entry.js → p-f0eb6317.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f1cc659c.js +1 -0
- package/dist/zonos-elements/{p-b1b7d786.entry.js → p-f53c8a9f.entry.js} +1 -1
- package/dist/zonos-elements/{p-777d396e.entry.js → p-f72642de.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb77dd11.system.js → p-fcaec700.system.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +2 -1
- package/dist/cjs/isCollectMobileTablet-d5c1a9ea.js +0 -176
- package/dist/esm/isCollectMobileTablet-2c62fdaa.js +0 -169
- package/dist/esm-es5/cart-1415dcf0.js +0 -1
- package/dist/esm-es5/isCollectMobileTablet-2c62fdaa.js +0 -1
- package/dist/esm-es5/localization-29723d89.js +0 -1
- package/dist/zonos-elements/p-0fa932e6.system.js +0 -1
- package/dist/zonos-elements/p-15c2dfea.entry.js +0 -1
- package/dist/zonos-elements/p-17c7a727.system.js +0 -1
- package/dist/zonos-elements/p-24aa6708.js +0 -1
- package/dist/zonos-elements/p-2585034d.entry.js +0 -1
- package/dist/zonos-elements/p-2cda42d5.system.js +0 -1
- package/dist/zonos-elements/p-53b65b80.js +0 -1
- package/dist/zonos-elements/p-58521b25.js +0 -1
- package/dist/zonos-elements/p-9259e19b.system.entry.js +0 -1
- package/dist/zonos-elements/p-99ef86c3.js +0 -1
- package/dist/zonos-elements/p-aa3a7538.js +0 -1
- package/dist/zonos-elements/p-c935390d.js +0 -1
- package/dist/zonos-elements/p-e77dd304.system.js +0 -1
- package/dist/zonos-elements/p-ea91600a.entry.js +0 -1
- package/dist/zonos-elements/p-f5d9e5e5.system.entry.js +0 -1
package/dist/collection/components/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.js
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { createElement, } from "@airwallex/components-sdk";
|
|
2
|
+
import { h, Host, } from "@stencil/core";
|
|
3
|
+
import { airwallexStore, airwallexStoreGetLocale, airwallexStoreInitSdk, airwallexStoreOnChange, } from "../../store/checkout/airwallex";
|
|
4
|
+
import { cartStore } from "../../store/checkout/cart";
|
|
5
|
+
import { collectStore } from "../../store/checkout/collect";
|
|
6
|
+
import { localizationStore, localizationStoreOnChange, } from "../../store/hello/localization";
|
|
7
|
+
import { translate } from "../../store/translationStore";
|
|
8
|
+
import { zonosStore } from "../../store/zonosStore";
|
|
9
|
+
import { log } from "../../utils/logging/log";
|
|
10
|
+
import { logError } from "../../utils/logging/logError";
|
|
11
|
+
/**
|
|
12
|
+
* Renders the Airwallex payment element (drop-in) using the payment intent client
|
|
13
|
+
* secret returned on the collect checkout session (05CHECK-860).
|
|
14
|
+
*/
|
|
15
|
+
export class ZonosAirwallexPayment {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.element = null;
|
|
18
|
+
this.storeUnsubscribeList = [];
|
|
19
|
+
/** Client secret currently being mounted, to avoid overlapping mounts. */
|
|
20
|
+
this.mountingClientSecret = null;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the SDK failed to load or the element failed to mount.
|
|
23
|
+
*/
|
|
24
|
+
this.hasError = false;
|
|
25
|
+
/**
|
|
26
|
+
* Mirror of the store client secret so the element (re)mounts once it becomes
|
|
27
|
+
* available. The client secret is fetched asynchronously and is usually not yet
|
|
28
|
+
* set when this component first mounts.
|
|
29
|
+
*/
|
|
30
|
+
this.clientSecret = airwallexStore.clientSecret;
|
|
31
|
+
/**
|
|
32
|
+
* Build the full set of drop-in options. The SDK's `element.update` requires the
|
|
33
|
+
* first argument to contain the most up-to-date version of everything that was
|
|
34
|
+
* originally passed to `createElement`, so both calls share this.
|
|
35
|
+
*/
|
|
36
|
+
this.getDropInOptions = (clientSecret) => {
|
|
37
|
+
var _a;
|
|
38
|
+
// Authorize (hold) when a capture delay is configured, otherwise capture
|
|
39
|
+
// immediately — mirrors the PayPal intent logic in paypalInitScript.
|
|
40
|
+
const hasAuthorizeSettingSet = zonosStore.checkoutSettings.captureDelay &&
|
|
41
|
+
zonosStore.checkoutSettings.captureDelay > 0;
|
|
42
|
+
return {
|
|
43
|
+
autoCapture: !hasAuthorizeSettingSet,
|
|
44
|
+
client_secret: clientSecret,
|
|
45
|
+
// The shopper's ship-to country (from the collect shipping info).
|
|
46
|
+
country_code: ((_a = collectStore.shippingAddress) === null || _a === void 0 ? void 0 : _a.location.countryCode) || undefined,
|
|
47
|
+
currency: airwallexStore.currency || cartStore.currency,
|
|
48
|
+
intent_id: airwallexStore.paymentIntentId || undefined,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
this.mountPaymentElement = async () => {
|
|
52
|
+
var _a;
|
|
53
|
+
const clientSecret = this.clientSecret;
|
|
54
|
+
// The client secret arrives asynchronously — wait for it instead of erroring.
|
|
55
|
+
if (!clientSecret) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
// Skip if we are already mounting (or have mounted) this exact client secret.
|
|
59
|
+
if (this.mountingClientSecret === clientSecret) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this.mountingClientSecret = clientSecret;
|
|
63
|
+
const isReady = await airwallexStoreInitSdk();
|
|
64
|
+
if (!isReady) {
|
|
65
|
+
this.hasError = true;
|
|
66
|
+
this.mountingClientSecret = null;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const container = this.el.querySelector('.zonos--airwallex-payment-component');
|
|
70
|
+
if (!container) {
|
|
71
|
+
logError('Cannot find container element for Airwallex payment element');
|
|
72
|
+
this.hasError = true;
|
|
73
|
+
this.mountingClientSecret = null;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
// Tear down any previously mounted element before remounting.
|
|
78
|
+
(_a = this.element) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
79
|
+
this.element = null;
|
|
80
|
+
const element = await createElement('dropIn', this.getDropInOptions(clientSecret));
|
|
81
|
+
if (!element) {
|
|
82
|
+
logError('Failed to create Airwallex payment element');
|
|
83
|
+
this.hasError = true;
|
|
84
|
+
this.mountingClientSecret = null;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
element.mount(container);
|
|
88
|
+
element.on('success', () => {
|
|
89
|
+
log('Airwallex payment succeeded');
|
|
90
|
+
airwallexStore.hasPaymentError = false;
|
|
91
|
+
// The drop-in confirmed the payment — the finish step trusts this over a
|
|
92
|
+
// possibly-lagging payment intent status lookup.
|
|
93
|
+
airwallexStore.paymentConfirmed = true;
|
|
94
|
+
this.airwallexPaymentSuccess.emit();
|
|
95
|
+
});
|
|
96
|
+
element.on('error', payload => {
|
|
97
|
+
logError(payload);
|
|
98
|
+
airwallexStore.hasPaymentError = true;
|
|
99
|
+
this.airwallexPaymentError.emit();
|
|
100
|
+
});
|
|
101
|
+
this.element = element;
|
|
102
|
+
this.hasError = false;
|
|
103
|
+
}
|
|
104
|
+
catch (err) {
|
|
105
|
+
logError(err);
|
|
106
|
+
this.hasError = true;
|
|
107
|
+
this.mountingClientSecret = null;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Update the mounted element's locale whenever the shopper changes language.
|
|
112
|
+
*/
|
|
113
|
+
this.localeChangeHandler = () => {
|
|
114
|
+
if (!this.element || !this.clientSecret) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
// `update`'s first argument must carry the most up-to-date version of all the
|
|
118
|
+
// options originally passed to `createElement`.
|
|
119
|
+
this.element.update(this.getDropInOptions(this.clientSecret), {
|
|
120
|
+
locale: airwallexStoreGetLocale(localizationStore.selectedLocale),
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* (Re)mount the payment element whenever the client secret becomes available
|
|
126
|
+
* or changes.
|
|
127
|
+
*/
|
|
128
|
+
clientSecretWatcher() {
|
|
129
|
+
void this.mountPaymentElement();
|
|
130
|
+
}
|
|
131
|
+
componentWillLoad() {
|
|
132
|
+
this.storeUnsubscribeList = [
|
|
133
|
+
// Keep the local state in sync with the store so the @Watch above fires
|
|
134
|
+
// once the asynchronously-fetched client secret becomes available.
|
|
135
|
+
airwallexStoreOnChange('clientSecret', clientSecret => {
|
|
136
|
+
this.clientSecret = clientSecret;
|
|
137
|
+
}),
|
|
138
|
+
// Keep the Airwallex element locale in sync with the selected language.
|
|
139
|
+
localizationStoreOnChange('selectedLocale', this.localeChangeHandler),
|
|
140
|
+
];
|
|
141
|
+
}
|
|
142
|
+
componentDidLoad() {
|
|
143
|
+
// If the client secret is already available on first render, mount now —
|
|
144
|
+
// @Watch does not fire for the initial value.
|
|
145
|
+
void this.mountPaymentElement();
|
|
146
|
+
}
|
|
147
|
+
disconnectedCallback() {
|
|
148
|
+
var _a;
|
|
149
|
+
// unsubscribe from store subscriptions
|
|
150
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
151
|
+
(_a = this.element) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
152
|
+
this.element = null;
|
|
153
|
+
}
|
|
154
|
+
render() {
|
|
155
|
+
return (h(Host, { key: '3d5f4aaea91533348ae6273757b8af6f17a7ab59', class: "zonos--airwallex-payment zonos--elements" }, this.hasError && (h("zonos-banner", { key: '27fe7775145b9ff4f9b572ee592eb0cdc5f2ef13', class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("div", { key: '48a50ebcc6ad1e3b3cbf807ef5d466030995a171', class: "zonos--airwallex-payment-component" })));
|
|
156
|
+
}
|
|
157
|
+
static get is() { return "zonos-airwallex-payment"; }
|
|
158
|
+
static get encapsulation() { return "scoped"; }
|
|
159
|
+
static get originalStyleUrls() {
|
|
160
|
+
return {
|
|
161
|
+
"$": ["zonos-airwallex-payment.scss"]
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
static get styleUrls() {
|
|
165
|
+
return {
|
|
166
|
+
"$": ["zonos-airwallex-payment.css"]
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
static get states() {
|
|
170
|
+
return {
|
|
171
|
+
"hasError": {},
|
|
172
|
+
"clientSecret": {}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
static get events() {
|
|
176
|
+
return [{
|
|
177
|
+
"method": "airwallexPaymentSuccess",
|
|
178
|
+
"name": "airwallexPaymentSuccess",
|
|
179
|
+
"bubbles": true,
|
|
180
|
+
"cancelable": true,
|
|
181
|
+
"composed": true,
|
|
182
|
+
"docs": {
|
|
183
|
+
"tags": [],
|
|
184
|
+
"text": "Emitted when the Airwallex payment intent is confirmed successfully."
|
|
185
|
+
},
|
|
186
|
+
"complexType": {
|
|
187
|
+
"original": "void",
|
|
188
|
+
"resolved": "void",
|
|
189
|
+
"references": {}
|
|
190
|
+
}
|
|
191
|
+
}, {
|
|
192
|
+
"method": "airwallexPaymentError",
|
|
193
|
+
"name": "airwallexPaymentError",
|
|
194
|
+
"bubbles": true,
|
|
195
|
+
"cancelable": true,
|
|
196
|
+
"composed": true,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": "Emitted when the Airwallex payment fails."
|
|
200
|
+
},
|
|
201
|
+
"complexType": {
|
|
202
|
+
"original": "void",
|
|
203
|
+
"resolved": "void",
|
|
204
|
+
"references": {}
|
|
205
|
+
}
|
|
206
|
+
}];
|
|
207
|
+
}
|
|
208
|
+
static get elementRef() { return "el"; }
|
|
209
|
+
static get watchers() {
|
|
210
|
+
return [{
|
|
211
|
+
"propName": "clientSecret",
|
|
212
|
+
"methodName": "clientSecretWatcher"
|
|
213
|
+
}];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
@@ -27,15 +27,15 @@ export class ZonosAddressForm {
|
|
|
27
27
|
const { firstName, lastName } = extractName({
|
|
28
28
|
name,
|
|
29
29
|
});
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '45d9837eb2fa1799686031aae55b7a5b56683f44', class: "zonos--address-form zonos--elements" }, h("div", { key: '021635c62ccf3956099fbc4111a7cccacf87e6a1', class: "zonos--title" }, h("zonos-text", { key: 'f8a7f4423c3e1fe85d99f7a4baadfd8ec92c5e91', textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
|
|
31
31
|
? translate('Shipping')
|
|
32
|
-
: translate('Billing'))), h("div", { key: '
|
|
32
|
+
: translate('Billing'))), h("div", { key: '3989feba67adc4921dc27f4b245391c933065d78', class: "zonos--address-group" }, h("div", { key: '909ef4b8f44902a16334051fb8cde1edd4f87f8b', class: "zonos--contact" }, h("zonos-text", { key: '301eb71e15a331a7423d547486b668009ce19bd0', type: "label" }, translate('Contact')), h("zonos-input", { key: '473f22469d0628db079298abb02a18f908225350', class: "zonos--form-email", inputLabel: translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), h("div", { key: 'eaa32450d028bfd8a197a3b1172a1316d6080962', class: "zonos--name zonos--address-row" }, h("zonos-input", { key: '82b3b902539cd2eb67bddfccc9146f91f7061538', class: "zonos--form-first-name", inputLabel: translate('First name'), inputValue: firstName, isError: isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
|
|
33
33
|
key: 'name',
|
|
34
34
|
value: `${e.detail} ${lastName}`,
|
|
35
|
-
}) }), h("zonos-input", { key: '
|
|
35
|
+
}) }), h("zonos-input", { key: 'cf32104d4d575eb9d5843cf5d8701aebb02c4e3c', class: "zonos--form-last-name", inputLabel: translate('Last name'), inputValue: lastName, isError: isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
|
|
36
36
|
key: 'name',
|
|
37
37
|
value: `${firstName} ${e.detail}`,
|
|
38
|
-
}) }))), h("div", { key: '
|
|
38
|
+
}) }))), h("div", { key: 'd570f7e1849bcc9a8e1bc13a15195bb5ee9bf8f2', class: "zonos--address" }, h("zonos-text", { key: 'dec7847247e97ffa3dde6d04a1ccd17347d9e8c1', type: "label" }, translate('Address')), h("zonos-input", { key: '595f540e7feb57dada3ebcf93202a75492ff447f', class: "zonos--form-country", inputLabel: translate('Country'), inputValue: country, isDisabled: true }), h("zonos-input", { key: 'c7fa3e7736ceee4c23195179f9e50b9cd43aa25a', class: "zonos--form-line1", inputLabel: translate('Address line 1'), inputValue: line1, isError: isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), h("zonos-input", { key: 'e455495f96667f7228a5ed51fc67d080df0b7991', class: "zonos--form-line2", inputLabel: translate('Address line 2'), inputValue: line2, isError: isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), h("div", { key: '5312af811975d9a2e2809896d51ce992317af54d', class: "zonos--address-row" }, h("zonos-input", { key: '49537f098a054787550266d6a7698e6fe102cad6', class: "zonos--form-city", inputLabel: translate('City'), inputValue: city, isError: isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), this.currentAddress.state && (h("zonos-input", { key: '06d1c8c2e21300c300ddfbdaa4abaffef006793d', class: "zonos--form-state", inputLabel: translate('State/Province'), inputValue: state, isError: isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) }))), h("zonos-input", { key: '94081e11a3184e86eef1add3eee392c3e3afb11a', class: "zonos--form-postal-code", inputLabel: translate('Postal code'), inputValue: postal_code, isError: isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), h("zonos-input", { key: '00ce7f0931179ff2c86e2da0fc82eed71cd6af19', class: "zonos--form-phone", inputLabel: translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "zonos-address-form"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js
CHANGED
|
@@ -10,7 +10,7 @@ export class ZonosCartItems {
|
|
|
10
10
|
render() {
|
|
11
11
|
const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');
|
|
12
12
|
const nonRestrictedItems = cartStore.items.filter(item => !item.isRestricted);
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: 'ec83033ab6a41452e8d3f611ca59f571741d7c73', class: "zonos--cart-items zonos--elements" }, h("table", { key: '3f403b3e3943f13394e419b6d3e01629ed673cd8', class: "zonos--cart-table" }, h("tbody", { key: '0c2caccc03dd36d00453e88ac7df9d8e3c47b5f1' }, nonRestrictedItems.map(item => {
|
|
14
14
|
const itemImg = item.imageUrl;
|
|
15
15
|
const cleanedItemNames = cleanHtmlMarkdown(item.name);
|
|
16
16
|
const amount = item.amount * item.quantity;
|
|
@@ -583,11 +583,11 @@ export class ZonosCheckoutFinish {
|
|
|
583
583
|
}
|
|
584
584
|
render() {
|
|
585
585
|
const isTestMode = getIsTestMode();
|
|
586
|
-
return (h(Host, { key: '
|
|
586
|
+
return (h(Host, { key: '7bbe3b38422e6b6a0b7a98c8e9cacf4b6abbfd8f', class: "zonos--checkout-finish zonos--elements", style: {
|
|
587
587
|
'--zonos--border-radius': getBorderRadius({
|
|
588
588
|
overrideBorderStyle: this.borderRadius,
|
|
589
589
|
}),
|
|
590
|
-
} }, this.isImmediateRedirecting && (h("div", { key: '
|
|
590
|
+
} }, this.isImmediateRedirecting && (h("div", { key: '8608faad8369cb1ad3e208862d264cc176f37702', class: "loading-wrapper" }, h("zonos-spinner", { key: '749ea9f925a11859310a47280f906f4e54cff7b2', size: 48 }))), !this.isLoading && !this.isImmediateRedirecting && (h("div", { key: 'ccb75f51c73fa22e94771f4ff00456a042185fb7', class: "zonos--finish-details" }, h("div", { key: '4bb0e457e963c2c95517a1688d0dcfdaa2c94013', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '7b57ab0d072852734a54833153d9a4aef526f97d', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: 'b633c665c126225ab060f806e150d77e118b7f6a', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: 'f15e8bef4931917ec51a5c449b6d20e76c295cbf',
|
|
591
591
|
// Only show loading spinner if it's not an error notification
|
|
592
592
|
loading: this.isWaitingToRedirect &&
|
|
593
593
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -599,9 +599,9 @@ export class ZonosCheckoutFinish {
|
|
|
599
599
|
}
|
|
600
600
|
this.closeClickHandler();
|
|
601
601
|
}, size: "md", variant: "primary" }, translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
602
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
602
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: 'f450a254f244806612f269f90ce984167c787795', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
603
603
|
cartStore.step === 'finish' &&
|
|
604
|
-
this.notificationType === 'success' && (h("div", { key: '
|
|
604
|
+
this.notificationType === 'success' && (h("div", { key: 'd5ab67cad67c9b62e2e369c52f028aca0fb485b5', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '1ab66e026b3797e2fc0f44fe0bcea439dab85128', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '8fc0dc456bb32fb94ea390bf50a9590b35bbb04d', onClick: () => {
|
|
605
605
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
606
606
|
this.redirectToUrl(isZonosDashboard
|
|
607
607
|
? '/orders/all'
|
|
@@ -40,10 +40,10 @@ export class ZonosCheckoutFooter {
|
|
|
40
40
|
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
41
41
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
42
42
|
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1000';
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: 'edf9d7cfd7375fcd4f335caedccc2928f84a594e', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: '14f359b70f1f4610be37571ae5d32ae7791be012', class: "zonos--checkout-footer" }, h("div", { key: 'ae803331487f9759403633a8e27cc6e480b40f93', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: 'f173841a4c1b3af79a2c21ad9195b509f2891964', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, h("span", { key: '7148d2a6076b786954cb9a02e41c760ba4719d6b', class: "zonos--checkout-locale-label" }, languageLabel, h("zonos-icon", { key: '0a759d42576bf657893e6e2349cc3938855de6fc', "aria-hidden": "true", class: "zonos--checkout-locale-chevron", content: ChevronDownIcon, iconColor: colorDesktop, size: 18 }))), h("div", { key: '63b1ac3440c35349341272b051c4a3e04e19f818', class: classes([
|
|
44
44
|
'zonos--checkout-footer-dialog',
|
|
45
45
|
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
46
|
-
]) }, h("zonos-language-select", { key: '
|
|
46
|
+
]) }, h("zonos-language-select", { key: '5cad0220d288b722355715c5418928f065af07c1', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: '30ec30fd80133525889fea8ab0567179f3ffdd3a', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: 'a6900165737de98bed8fee21d88b4e269ad209e3', href: "https://zonos.com/docs/legal/zonos-privacy-policy", rel: "noopener noreferrer", target: "_blank" }, h("zonos-text", { key: 'ca88bc63b702dcb651530f41aee4764734a5ee84', textColor: colorDesktop }, translate('Privacy policy'))), h("div", { key: '8caa023f3aca229e464a27f55c289985114cc641', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: '9a3b6097c157dd86bd8a03c41887915051852930', textColor: colorDesktop }, translate('Powered by')), h("a", { key: '5e0657c052e71ce12c5717b8a5473e4fc5ca2926', href: "https://zonos.com", rel: "noopener noreferrer", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '1c6a13757a62a14a9898b3de06aaa1f717f3035d', autoHeight: true, content: colorDesktop === 'gray-1000'
|
|
47
47
|
? ZonosIconLight
|
|
48
48
|
: ZonosIconDark, size: 108 })))))));
|
|
49
49
|
}
|
|
@@ -2157,7 +2157,7 @@ export class ZonosCheckout {
|
|
|
2157
2157
|
"signature": "(session: CheckoutSessionDetailsFragment) => Promise<void>",
|
|
2158
2158
|
"parameters": [{
|
|
2159
2159
|
"name": "session",
|
|
2160
|
-
"type": "{ cartId: string | null; clientSecret: string; completedAt: string | null; customerProfile: { email: string | null; locations: { administrativeArea: string; countryCode: CountryCode; email: string | null; line1: string; line2: string | null; name: string | null; phone: string | null; locality: string; postalCode: string; }[] | null; name: string | null; storeCreditBalance: number | null; } | null; customerSessionClientSecret: string | null; id: string; landedCost: { amountSubtotals: { discounts: number | null; duties: number; fees: number; items: number; landedCostTotal: number; shipping: number; taxes: number; } | null; appliedAdjustments: { adjustment: { name: string | null; source: AdjustmentSource | null; } | null; amount: number; type: LandedCostAdjustmentType | null; item: { amount: number; } | null; }[] | null; currencyCode: CurrencyCode; deMinimis: { type: DeMinimisType; threshold: DeMinimisThreshold; method: IncotermCode; note: string; formula: string; }[]; duties: { amount: number; currencyCode: CurrencyCode; }[]; fees: { amount: number; currencyCode: CurrencyCode; }[]; landedCostGuaranteeCode: LandedCostGuaranteeCode; id: string; method: IncotermCode; remittance: { amount: number; description: string; }[]; rootId: string; shipmentRating: { amount: number; currencyCode: CurrencyCode; displayName: string; id: string; shippingProfile: { serviceLevel: { code: string; }; transitTime: { guaranteedDelivery: string | null; max: number | null; min: number | null; type: TransitTypeCode | null; } | null; } | null; }; taxes: { amount: number; currencyCode: CurrencyCode; }[]; } | null; metadata: ({ key: string; value: string; } | null)[] | null; organizationId: string; references: { inclusivePriceConfigurationId: string | null; } | null; subtotals: { adjustments: number; duties: number; exchangeRate: { id: string; rate: number; sourceCurrencyCode: CurrencyCode; targetCurrencyCode: CurrencyCode; type: ExchangeRateType; }; fees: number; items: number; landedCostTotal: number; presentmentCurrencyCode: CurrencyCode; shipping: number; storeCredit: number; taxes: number; total: number; }; varianceTestResults: { selectedVariantKey: string; testKey: string; }[] | null; }",
|
|
2160
|
+
"type": "{ cartId: string | null; clientSecret: string; completedAt: string | null; customerProfile: { email: string | null; locations: { administrativeArea: string; countryCode: CountryCode; email: string | null; line1: string; line2: string | null; name: string | null; phone: string | null; locality: string; postalCode: string; }[] | null; name: string | null; storeCreditBalance: number | null; } | null; customerSessionClientSecret: string | null; id: string; landedCost: { amountSubtotals: { discounts: number | null; duties: number; fees: number; items: number; landedCostTotal: number; shipping: number; taxes: number; } | null; appliedAdjustments: { adjustment: { name: string | null; source: AdjustmentSource | null; } | null; amount: number; type: LandedCostAdjustmentType | null; item: { amount: number; } | null; }[] | null; currencyCode: CurrencyCode; deMinimis: { type: DeMinimisType; threshold: DeMinimisThreshold; method: IncotermCode; note: string; formula: string; }[]; duties: { amount: number; currencyCode: CurrencyCode; }[]; fees: { amount: number; currencyCode: CurrencyCode; }[]; landedCostGuaranteeCode: LandedCostGuaranteeCode; id: string; method: IncotermCode; remittance: { amount: number; description: string; }[]; rootId: string; shipmentRating: { amount: number; currencyCode: CurrencyCode; displayName: string; id: string; shippingProfile: { serviceLevel: { code: string; }; transitTime: { guaranteedDelivery: string | null; max: number | null; min: number | null; type: TransitTypeCode | null; } | null; } | null; }; taxes: { amount: number; currencyCode: CurrencyCode; }[]; } | null; metadata: ({ key: string; value: string; } | null)[] | null; organizationId: string; paymentProcessor: CheckoutPaymentProcessorType | null; references: { inclusivePriceConfigurationId: string | null; } | null; subtotals: { adjustments: number; duties: number; exchangeRate: { id: string; rate: number; sourceCurrencyCode: CurrencyCode; targetCurrencyCode: CurrencyCode; type: ExchangeRateType; }; fees: number; items: number; landedCostTotal: number; presentmentCurrencyCode: CurrencyCode; shipping: number; storeCredit: number; taxes: number; total: number; }; varianceTestResults: { selectedVariantKey: string; testKey: string; }[] | null; }",
|
|
2161
2161
|
"docs": ""
|
|
2162
2162
|
}],
|
|
2163
2163
|
"references": {
|
|
@@ -8,7 +8,7 @@ export class ZonosCollectCartItems {
|
|
|
8
8
|
render() {
|
|
9
9
|
const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');
|
|
10
10
|
const nonRestrictedItems = cartStore.items.filter(item => !item.isRestricted);
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: 'b59fc5d56e5672ed47312fa930a1f35bf987b58d', class: "zonos--collect-cart-items zonos--elements" }, h("table", { key: '1f1020fd843fc2e86a12f426786f275e2c45c7c6', class: "zonos--cart-table" }, h("tbody", { key: 'b383812ea0967e3715701c09753fda8b3dbfe612' }, nonRestrictedItems.map(item => {
|
|
12
12
|
const itemImg = item.imageUrl;
|
|
13
13
|
const cleanedItemNames = cleanHtmlMarkdown(item.name);
|
|
14
14
|
return (h("tr", { class: "zonos--collect-cart-item" }, h("td", { class: "zonos--column zonos--cart-item-image" }, itemImg && !this.errorImages.includes(itemImg) ? (h("img", { alt: item.name, onError: () => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
|
+
import { airwallexStore, airwallexStoreIsPaidStatus, airwallexStoreMessageBasedOnStatus, airwallexStoreReset, airwallexStoreRetrievePaymentIntent, } from "../../../store/checkout/airwallex";
|
|
2
3
|
import { cartStore } from "../../../store/checkout/cart";
|
|
4
|
+
import { collectStore } from "../../../store/checkout/collect";
|
|
3
5
|
import { paypalStore, paypalStoreReset, } from "../../../store/checkout/paypal";
|
|
4
6
|
import { stripeStore, stripeStoreMessageBasedOnStatus, stripeStoreReset, stripeStoreResetPromoCode, stripeStoreRetrievePayment, } from "../../../store/checkout/stripe";
|
|
5
7
|
import { storageStore } from "../../../store/storageStore";
|
|
@@ -180,6 +182,109 @@ export class ZonosCollectFinish {
|
|
|
180
182
|
stripeStoreReset();
|
|
181
183
|
storageStore.checkoutSessionId = null;
|
|
182
184
|
};
|
|
185
|
+
/**
|
|
186
|
+
* Resolve the Airwallex payment intent id, preferring the value already in the
|
|
187
|
+
* store and falling back to re-fetching the collect checkout session (e.g. when
|
|
188
|
+
* the page was reloaded after a redirect).
|
|
189
|
+
*/
|
|
190
|
+
this.getAirwallexSessionInfo = async () => {
|
|
191
|
+
// When the payment intent id is already in the store (e.g. the drop-in just
|
|
192
|
+
// succeeded this session), there's no completed session to re-fetch.
|
|
193
|
+
if (airwallexStore.paymentIntentId) {
|
|
194
|
+
return {
|
|
195
|
+
isCompleted: false,
|
|
196
|
+
paymentIntentId: airwallexStore.paymentIntentId,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
200
|
+
if (!checkoutSessionId) {
|
|
201
|
+
return { isCompleted: false, paymentIntentId: null };
|
|
202
|
+
}
|
|
203
|
+
const { json } = await handleFetch('/api/zonos-elements/collect/get-checkout-session', {
|
|
204
|
+
body: {
|
|
205
|
+
checkoutSessionId,
|
|
206
|
+
},
|
|
207
|
+
method: 'POST',
|
|
208
|
+
});
|
|
209
|
+
const checkoutSession = json === null || json === void 0 ? void 0 : json.checkoutSession;
|
|
210
|
+
return {
|
|
211
|
+
// A completed session (or one with an order attached) is already paid.
|
|
212
|
+
isCompleted: !!((checkoutSession === null || checkoutSession === void 0 ? void 0 : checkoutSession.completedAt) || (checkoutSession === null || checkoutSession === void 0 ? void 0 : checkoutSession.order)),
|
|
213
|
+
paymentIntentId: (checkoutSession === null || checkoutSession === void 0 ? void 0 : checkoutSession.paymentIntentId) || null,
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
this.checkAirwallexPaymentStatus = async () => {
|
|
217
|
+
// If the drop-in already confirmed the payment in-widget this session, trust
|
|
218
|
+
// that result. A status lookup that fails or hasn't propagated yet must not
|
|
219
|
+
// show a payment failure after the shopper already completed payment.
|
|
220
|
+
const sdkConfirmed = airwallexStore.paymentConfirmed;
|
|
221
|
+
// A forced success status is set when recovery routes an already-completed /
|
|
222
|
+
// paid session to the finish step (mirrors the Stripe finish flow).
|
|
223
|
+
const forcedSuccess = this.storybookForceStatus === 'succeeded';
|
|
224
|
+
const { isCompleted, paymentIntentId } = await this.getAirwallexSessionInfo();
|
|
225
|
+
const { status } = paymentIntentId
|
|
226
|
+
? await airwallexStoreRetrievePaymentIntent(paymentIntentId)
|
|
227
|
+
: { status: null };
|
|
228
|
+
// Treat the payment as complete when the drop-in confirmed it in-widget, the
|
|
229
|
+
// session is already completed/paid (incl. the forced-success recovery path),
|
|
230
|
+
// or the payment intent reports a paid/authorized status. Pending states such
|
|
231
|
+
// as REQUIRES_CUSTOMER_ACTION (3DS not yet done) are not complete, so we must
|
|
232
|
+
// not show success or poll for an order.
|
|
233
|
+
const isPaid = sdkConfirmed ||
|
|
234
|
+
forcedSuccess ||
|
|
235
|
+
isCompleted ||
|
|
236
|
+
airwallexStoreIsPaidStatus(status);
|
|
237
|
+
const { messages } = sdkConfirmed || forcedSuccess || isCompleted
|
|
238
|
+
? airwallexStoreMessageBasedOnStatus('SUCCEEDED')
|
|
239
|
+
: airwallexStoreMessageBasedOnStatus(status);
|
|
240
|
+
log('=== Airwallex payment intent retrieve status', 'info', {
|
|
241
|
+
forcedSuccess,
|
|
242
|
+
isCompleted,
|
|
243
|
+
isPaid,
|
|
244
|
+
paymentIntentId,
|
|
245
|
+
sdkConfirmed,
|
|
246
|
+
status,
|
|
247
|
+
});
|
|
248
|
+
this.notificationType = isPaid ? 'success' : 'error';
|
|
249
|
+
this.notificationTitle = isPaid
|
|
250
|
+
? translate("You're all set!")
|
|
251
|
+
: translate('Payment failed');
|
|
252
|
+
this.notificationMessages = messages;
|
|
253
|
+
if (isPaid) {
|
|
254
|
+
submitAnalytics({ event: 'zonos-checkout-success' });
|
|
255
|
+
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
256
|
+
void trackConversionEvent({
|
|
257
|
+
checkoutSessionId,
|
|
258
|
+
eventName: 'checkout_orderCompleted',
|
|
259
|
+
});
|
|
260
|
+
const successEvent = createCustomEvent('zonos-checkout-success', {
|
|
261
|
+
message: 'Zonos Checkout successfully processed order',
|
|
262
|
+
});
|
|
263
|
+
document.dispatchEvent(successEvent);
|
|
264
|
+
// wait this to finish before resetting store and checkout session id
|
|
265
|
+
await this.handleSuccessBehavior();
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
submitAnalytics({ event: 'zonos-checkout-payment-fail' });
|
|
269
|
+
void sendErrorLog({
|
|
270
|
+
endpoint: 'Airwallex payment failed',
|
|
271
|
+
errors: [
|
|
272
|
+
`Payment intent "${paymentIntentId}" status: ${status} - checkout session: ${storageStore.checkoutSessionId}`,
|
|
273
|
+
],
|
|
274
|
+
metadata: {
|
|
275
|
+
allLogs,
|
|
276
|
+
credentialToken: window.Zonos.zonosApiKey,
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
// Make sure to stop the loading spinner even when there's an error
|
|
281
|
+
this.isLoading = false;
|
|
282
|
+
// reset promo when checkout is finished
|
|
283
|
+
stripeStoreResetPromoCode();
|
|
284
|
+
stripeStoreReset();
|
|
285
|
+
airwallexStoreReset();
|
|
286
|
+
storageStore.checkoutSessionId = null;
|
|
287
|
+
};
|
|
183
288
|
this.checkStagingOrderStatus = async () => {
|
|
184
289
|
this.notificationType = 'success';
|
|
185
290
|
this.notificationTitle = translate("You're all set!");
|
|
@@ -251,6 +356,9 @@ export class ZonosCollectFinish {
|
|
|
251
356
|
if (cartStore.isStagingMode) {
|
|
252
357
|
void this.checkStagingOrderStatus();
|
|
253
358
|
}
|
|
359
|
+
else if (collectStore.paymentProcessor === 'AIRWALLEX') {
|
|
360
|
+
void this.checkAirwallexPaymentStatus();
|
|
361
|
+
}
|
|
254
362
|
else if (paypalStore.orderIdCreated) {
|
|
255
363
|
void this.checkPaypalPaymentStatus();
|
|
256
364
|
}
|
|
@@ -260,11 +368,11 @@ export class ZonosCollectFinish {
|
|
|
260
368
|
}
|
|
261
369
|
render() {
|
|
262
370
|
const cartId = window.Zonos.cartId;
|
|
263
|
-
return (h(Host, { key: '
|
|
371
|
+
return (h(Host, { key: 'fe3107670230caeaacc834983d9215422a7828ae', class: "zonos--checkout-finish zonos--elements", style: {
|
|
264
372
|
'--zonos--border-radius': getBorderRadius({
|
|
265
373
|
overrideBorderStyle: this.borderRadius,
|
|
266
374
|
}),
|
|
267
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
375
|
+
} }, !this.isLoading && (h("div", { key: 'fefefedc7ec022318cbc6da23b327079afec981b', class: "zonos--finish-details" }, h("div", { key: '4428271e11c3a96db732726719c5747364a18097', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '0c3371b3bed8fd83e437075f1c35179fbb7e5e09', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), this.confirmationId && (h("zonos-badge", { key: 'dbb263f0f95a62d93ae3c5ac455625512eb1f63e', badgeColor: "gray" }, this.confirmationId)), h("zonos-text", { key: '07e2733ad91ced8e5260e0f8fea627610b864ebf', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.order && cartId && (h("div", { key: 'ecb7332cb4b7c28d398f2957d3b521c6328163eb', class: "zonos--button-container" }, h("zonos-button", { key: 'c8303e2a61d573b6e028ab38df2427fa98471e9f', onClick: () => {
|
|
268
376
|
window.open(this.getReceiptUrl({ cartId }), '_blank');
|
|
269
377
|
}, size: "lg", variant: "primary" }, translate('View receipt')))))))));
|
|
270
378
|
}
|
|
@@ -46,15 +46,15 @@ export class ZonosCollectFooter {
|
|
|
46
46
|
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
47
47
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
48
48
|
const colorDesktop = 'gray-1000';
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '52908f4538918641b708887436e1cfe3b643376f', class: classes([
|
|
50
50
|
'zonos--elements',
|
|
51
51
|
this.isMobile && 'mobile',
|
|
52
52
|
this.isTablet && 'tablet',
|
|
53
|
-
]) }, h("div", { key: '
|
|
53
|
+
]) }, h("div", { key: '46a1c762d78396a7f993bad323c93f8e6bc71f1b', class: "zonos--collect-footer" }, h("div", { key: 'a6a98539cdb901ecd162f5e5b98591c9b8b7321a', class: "zonos--collect-locale-wrapper" }, h("zonos-button", { key: '8a5c4a18bc1030c3e74e412ff14a59c299f59e9a', buttonColor: colorDesktop, class: "zonos--collect-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, h("span", { key: '03bc4235862d1382cd8f0cdb007fd708bf2bfe87', class: "zonos--collect-locale-label" }, languageLabel, h("zonos-icon", { key: '4b3bbcd5bcd4039f3cb1f1c4c12698cba1894308', "aria-hidden": "true", class: "zonos--collect-locale-chevron", content: ChevronDownIcon, iconColor: colorDesktop, size: 18 }))), h("div", { key: '5508629b0cdc334b81ad4d4d5a034ced133d6744', class: classes([
|
|
54
54
|
'zonos--collect-language-dialog',
|
|
55
55
|
this.showLanguageDialog &&
|
|
56
56
|
'zonos--collect-language-dialog-open',
|
|
57
|
-
]) }, h("zonos-language-select", { key: '
|
|
57
|
+
]) }, h("zonos-language-select", { key: 'ca4b77d72dfd9db8743290d333b7fcde15d090d6', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: '98f0d0c35e3c6b4fde833e4b9ae334549fe46f1f', class: "zonos--collect-footer-icon-wrapper" }, h("div", { key: 'b3039948472d797bf04a23d3aca839472f6c6946', class: "zonos--collect-footer-logo" }, h("zonos-text", { key: '75123a6fb2bcdce07e0ebe433a28d81eefaec9ea', textColor: colorDesktop }, "Powered by"), h("a", { key: '2a0f4e2bc5df9d383ac4b91c589d2ce7149c6b3d', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '436005434f2a9d2ff1228cd36d873b8de7d339f2', autoHeight: true, content: ZonosWordmark, size: 42 }))), h("div", { key: 'c488b5eefba54424a0e66af61415d78d8f3d46fa', class: "dot" }), h("a", { key: 'd98fc7646d4877179b94bee6d3f8a7a283bbc756', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: '54fe3d9316ee5b22f5620b7acde145627b66cbe3', textColor: colorDesktop }, "Privacy policy"))))));
|
|
58
58
|
}
|
|
59
59
|
static get is() { return "zonos-collect-footer"; }
|
|
60
60
|
static get encapsulation() { return "shadow"; }
|
|
@@ -68,7 +68,7 @@ export class ZonosCollectOrderDetails {
|
|
|
68
68
|
this.isMobile && 'mobile',
|
|
69
69
|
]) }, h("div", { class: "zonos--wrapper" }, h("button", { class: "zonos--order-details-header", onClick: () => {
|
|
70
70
|
this.collapseState = !this.collapseState;
|
|
71
|
-
}, type: "button" }, h("zonos-text", { type: "semiBoldLabel" }, translate('
|
|
71
|
+
}, type: "button" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Shipment details')), renderCollapseIcon()), h("div", { class: "zonos--order-details-wrapper" }, h("zonos-collapse", { collapsed: this.collapseState }, h("div", { class: "zonos--collect-order-details-content" }, h("zonos-collect-cart-items", null), h("div", { class: "zonos--collect-order-info" }, h("div", { class: "zonos--collect-order-details-row" }, collectStore.amountTotalPaid !== null && (h("div", { class: "zonos--collect-order-details-column" }, h("zonos-text", { type: "smallHeader" }, translate('Total paid')), h("zonos-text", null, renderCheckoutCurrency({
|
|
72
72
|
amount: collectStore.amountTotalPaid || 0,
|
|
73
73
|
isForeign: true,
|
|
74
74
|
})))), collectStore.originCompanyName && (h("div", { class: "zonos--collect-order-details-column" }, h("zonos-text", { type: "smallHeader" }, translate('Ordered from')), h("zonos-text", null, collectStore.originCompanyName || '')))), this.renderShippingAddress())))))));
|
|
@@ -42,27 +42,11 @@
|
|
|
42
42
|
}
|
|
43
43
|
:host .zonos--group {
|
|
44
44
|
margin-bottom: 20px;
|
|
45
|
-
overflow:
|
|
45
|
+
overflow: visible;
|
|
46
46
|
padding: 5px;
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
flex: 1;
|
|
50
|
-
overscroll-behavior: contain;
|
|
51
|
-
}
|
|
52
|
-
:host .zonos--group::-webkit-scrollbar {
|
|
53
|
-
width: 10px;
|
|
54
|
-
}
|
|
55
|
-
:host .zonos--group::-webkit-scrollbar-track {
|
|
56
|
-
background: var(--zonos-elements-gray-50);
|
|
57
|
-
}
|
|
58
|
-
:host .zonos--group::-webkit-scrollbar-thumb {
|
|
59
|
-
border-radius: 10px;
|
|
60
|
-
background: #cccccc;
|
|
61
|
-
border: 3px solid transparent;
|
|
62
|
-
background-clip: content-box;
|
|
63
|
-
}
|
|
64
|
-
:host .zonos--group::-webkit-scrollbar-thumb:hover {
|
|
65
|
-
background: #d6d6d6;
|
|
66
50
|
}
|
|
67
51
|
:host .zonos--payment-error-banner {
|
|
68
52
|
margin-bottom: 8px;
|
|
@@ -141,6 +141,12 @@ export class ZonosCollectPayment {
|
|
|
141
141
|
}
|
|
142
142
|
render() {
|
|
143
143
|
var _a;
|
|
144
|
+
// Airwallex (05CHECK-860) renders its own drop-in element which collects the
|
|
145
|
+
// payment details and exposes its own pay button, so it bypasses the Stripe
|
|
146
|
+
// elements/client-secret guards and the Stripe continue buttons below.
|
|
147
|
+
if (collectStore.paymentProcessor === 'AIRWALLEX') {
|
|
148
|
+
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), h("zonos-airwallex-payment", { onAirwallexPaymentSuccess: () => this.airwallexPaymentDone.emit() }))));
|
|
149
|
+
}
|
|
144
150
|
this.hasStripePaymentError = stripeStore.hasPaymentError;
|
|
145
151
|
if (!stripeStore.stripeElements) {
|
|
146
152
|
return null;
|
|
@@ -354,6 +360,21 @@ export class ZonosCollectPayment {
|
|
|
354
360
|
"resolved": "string",
|
|
355
361
|
"references": {}
|
|
356
362
|
}
|
|
363
|
+
}, {
|
|
364
|
+
"method": "airwallexPaymentDone",
|
|
365
|
+
"name": "airwallexPaymentDone",
|
|
366
|
+
"bubbles": true,
|
|
367
|
+
"cancelable": true,
|
|
368
|
+
"composed": true,
|
|
369
|
+
"docs": {
|
|
370
|
+
"tags": [],
|
|
371
|
+
"text": "Event to emit when the Airwallex payment is completed successfully"
|
|
372
|
+
},
|
|
373
|
+
"complexType": {
|
|
374
|
+
"original": "void",
|
|
375
|
+
"resolved": "void",
|
|
376
|
+
"references": {}
|
|
377
|
+
}
|
|
357
378
|
}];
|
|
358
379
|
}
|
|
359
380
|
static get elementRef() { return "ele"; }
|
|
@@ -39,13 +39,13 @@ export class ZonosCollectReview {
|
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
41
|
const titleTextColor = this.isMobile ? 'gray-1000' : 'gray-800';
|
|
42
|
-
return (h(Host, { key: '
|
|
42
|
+
return (h(Host, { key: '7f1709df3a42ae9917e26a86e9c90703b2243ab7', class: classes([
|
|
43
43
|
'zonos--collect-review zonos--elements',
|
|
44
44
|
this.isMobile && 'mobile',
|
|
45
45
|
this.isTablet && 'tablet',
|
|
46
|
-
]) }, h("div", { key: '
|
|
46
|
+
]) }, h("div", { key: '5ed5f5c7da922a9393501b5e31da9a20b9724d9c', class: "zonos--title" }, h("zonos-text", { key: 'd54511663bb32405e16349b20807b9ccddb5fd03', textColor: titleTextColor, type: 'semiBoldLabel' }, translate('Pay [organizationName] duties, taxes and fees for your shipment', {
|
|
47
47
|
organizationName: zonosStore.organizationName,
|
|
48
|
-
}))), h("div", { key: '
|
|
48
|
+
}))), h("div", { key: '82967c3614ee91cf95955372bb013837f93822d1', class: "zonos--total-pay" }, renderFallback({
|
|
49
49
|
content: (h("zonos-text", { type: 'secondaryPageHeader' }, renderCheckoutCurrency({
|
|
50
50
|
amount: collectStore.amountDutyTaxFeeTotal || 0,
|
|
51
51
|
isForeign: true,
|