@zonos/elements 1.3.217 → 1.3.219
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-54ff39d6.js → cart-9a2b32e4.js} +91 -48
- package/dist/cjs/cleanHtmlMarkdown-577d0a77.js +999 -0
- package/dist/cjs/{handleFetch-0313ebba.js → handleFetch-45f35cac.js} +2 -1
- package/dist/cjs/index.cjs.js +20 -10
- package/dist/cjs/isCollectMobileTablet-7e57fd90.js +172 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/localization-b12edb2a.js +738 -0
- package/dist/cjs/{paypal-e7504122.js → paypal-e80871d0.js} +13 -9
- package/dist/cjs/placeTestOrder-8222fe95.js +93 -0
- package/dist/cjs/{localization-721a5ec3.js → translationStore-20a6d8bf.js} +963 -734
- package/dist/cjs/{updateCheckoutSessionAttributes-8db49644.js → updateCheckoutSessionAttributes-c0853fdd.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +103 -73
- 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} +75 -1294
- package/dist/cjs/zonos-checkout.cjs.entry.js +27 -50
- 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 +810 -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 +85 -29
- package/dist/cjs/zonos-country-flag.cjs.entry.js +3 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +12 -11
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +16 -6
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +35 -34
- package/dist/cjs/zonos-hello.cjs.entry.js +9 -8
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +7 -6
- 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-payment/zonos-checkout-payment.js +3 -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 +84 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +403 -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 +68 -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 +157 -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 +48 -0
- package/dist/collection/components/store/translationStore/strings.base.js +48 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +48 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +48 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +48 -0
- package/dist/collection/components/store/translationStore/strings.french.js +48 -0
- package/dist/collection/components/store/translationStore/strings.german.js +48 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +48 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +48 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +48 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +48 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +48 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +48 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +48 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +48 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +48 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +48 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +48 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +48 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +48 -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 +15 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -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/getNextFallbackApi.js +1 -1
- package/dist/collection/components/utils/handleFetch.js +1 -0
- 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 +103 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/buildCartItemsByTempCart-c4488f73.js +26 -0
- package/dist/esm/{cart-010402f9.js → cart-acf4ebf5.js} +69 -28
- package/dist/esm/cleanHtmlMarkdown-b5b18743.js +997 -0
- package/dist/esm/{handleFetch-fa90f7f6.js → handleFetch-99218189.js} +2 -1
- package/dist/esm/index.js +20 -10
- package/dist/esm/isCollectMobileTablet-b72b81c5.js +165 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/localization-8646f526.js +719 -0
- package/dist/esm/{paypal-70b140d9.js → paypal-2fa930eb.js} +8 -5
- package/dist/esm/placeTestOrder-d1ad9cf6.js +90 -0
- package/dist/esm/{localization-9db8b6e9.js → translationStore-c9743292.js} +963 -718
- package/dist/esm/{updateCheckoutSessionAttributes-691cdc6d.js → updateCheckoutSessionAttributes-92f42882.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +72 -42
- 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} +24 -1241
- package/dist/esm/zonos-checkout.entry.js +8 -31
- 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 +801 -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 +85 -29
- package/dist/esm/zonos-country-flag.entry.js +3 -2
- package/dist/esm/zonos-country-select_4.entry.js +12 -11
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +16 -6
- package/dist/esm/zonos-hello-dialog.entry.js +7 -6
- package/dist/esm/zonos-hello.entry.js +3 -2
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +7 -6
- 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-acf4ebf5.js +1 -0
- package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +1 -0
- package/dist/esm-es5/{handleFetch-fa90f7f6.js → handleFetch-99218189.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/isCollectMobileTablet-b72b81c5.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-8646f526.js +1 -0
- package/dist/esm-es5/paypal-2fa930eb.js +17 -0
- package/dist/esm-es5/placeTestOrder-d1ad9cf6.js +1 -0
- package/dist/esm-es5/translationStore-c9743292.js +1 -0
- package/dist/esm-es5/{updateCheckoutSessionAttributes-691cdc6d.js → updateCheckoutSessionAttributes-92f42882.js} +1 -1
- 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 +471 -4
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-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 +49 -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 +48 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +48 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +48 -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 +2 -0
- 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/getNextFallbackApi.d.ts +2 -2
- 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 +431 -9
- package/dist/types/types/generated/graphql.internal.types.ts +428 -10
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-288761b1.system.entry.js → p-009c3ac5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c7d5d45d.entry.js → p-03980f76.entry.js} +1 -1
- package/dist/zonos-elements/{p-c1d86f32.system.js → p-062430f9.system.js} +1 -1
- package/dist/zonos-elements/p-07bea979.system.js +1 -0
- package/dist/zonos-elements/p-0cec2dd2.system.entry.js +1 -0
- package/dist/zonos-elements/p-0d6c6a38.entry.js +1 -0
- package/dist/zonos-elements/p-0e28207a.js +1 -0
- package/dist/zonos-elements/{p-1efc348b.system.js → p-0ed63ce0.system.js} +1 -1
- package/dist/zonos-elements/p-0ef2a242.js +1 -0
- package/dist/zonos-elements/p-106ae0f1.entry.js +1 -0
- package/dist/zonos-elements/p-10797d2b.system.entry.js +1 -0
- package/dist/zonos-elements/p-195b33b6.system.entry.js +1 -0
- package/dist/zonos-elements/p-1fe5d4da.system.entry.js +1 -0
- package/dist/zonos-elements/{p-da4c01da.system.entry.js → p-2323ff0f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-23293a0b.entry.js +1 -0
- package/dist/zonos-elements/{p-62813488.entry.js → p-23735db6.entry.js} +1 -1
- package/dist/zonos-elements/{p-ebaaaee9.entry.js → p-26573347.entry.js} +1 -1
- package/dist/zonos-elements/{p-e640e8b8.entry.js → p-29499a5f.entry.js} +1 -1
- package/dist/zonos-elements/p-29c80a34.js +1 -0
- package/dist/zonos-elements/{p-edc77ea1.entry.js → p-2a9681b4.entry.js} +1 -1
- package/dist/zonos-elements/{p-3f31901f.entry.js → p-2c9381be.entry.js} +1 -1
- package/dist/zonos-elements/p-2cc031b3.js +17 -0
- package/dist/zonos-elements/{p-7ab62a26.system.entry.js → p-34a37ce7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3c9714a8.system.entry.js +1 -0
- package/dist/zonos-elements/p-485416ec.js +1 -0
- package/dist/zonos-elements/p-56ee6d4b.system.entry.js +1 -0
- package/dist/zonos-elements/p-58afbe2b.entry.js +1 -0
- package/dist/zonos-elements/p-5e372fb9.entry.js +1 -0
- package/dist/zonos-elements/p-5ff4f9df.system.js +1 -0
- package/dist/zonos-elements/{p-92cc26b7.system.entry.js → p-60c61982.system.entry.js} +1 -1
- package/dist/zonos-elements/p-61c2c336.entry.js +1 -0
- package/dist/zonos-elements/p-6696617a.system.entry.js +1 -0
- package/dist/zonos-elements/p-6761091e.entry.js +1 -0
- package/dist/zonos-elements/p-6761286d.js +1 -0
- package/dist/zonos-elements/p-69451a50.system.js +1 -0
- package/dist/zonos-elements/p-69fd1b88.js +1 -0
- package/dist/zonos-elements/p-6dd63754.system.js +1 -0
- package/dist/zonos-elements/p-6e8aae27.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1c45cd15.entry.js → p-70b81bbc.entry.js} +1 -1
- package/dist/zonos-elements/{p-eeb01de6.system.entry.js → p-750b7f32.system.entry.js} +1 -1
- package/dist/zonos-elements/p-772ac0b7.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/p-81e23f30.system.js +1 -0
- package/dist/zonos-elements/p-873b698a.entry.js +1 -0
- package/dist/zonos-elements/p-87e2a777.entry.js +1 -0
- package/dist/zonos-elements/p-8ca25e6c.entry.js +1 -0
- package/dist/zonos-elements/p-909d36bf.entry.js +1 -0
- package/dist/zonos-elements/p-95461a1b.system.entry.js +1 -0
- package/dist/zonos-elements/p-986ebccc.js +1 -0
- package/dist/zonos-elements/p-9c0b78bf.system.entry.js +1 -0
- package/dist/zonos-elements/p-a61a9b65.system.entry.js +1 -0
- package/dist/zonos-elements/p-a7204d41.entry.js +1 -0
- package/dist/zonos-elements/{p-d93ecc57.js → p-a8a312b2.js} +1 -1
- package/dist/zonos-elements/p-aca272ea.entry.js +1 -0
- package/dist/zonos-elements/p-b12ec9f2.system.entry.js +1 -0
- package/dist/zonos-elements/p-b1bd9fe7.system.entry.js +1 -0
- package/dist/zonos-elements/p-b2ae8eb7.system.js +1 -0
- package/dist/zonos-elements/{p-77666360.entry.js → p-b5406d26.entry.js} +1 -1
- package/dist/zonos-elements/p-bfbc081f.entry.js +1 -0
- package/dist/zonos-elements/p-c0a54cf6.system.js +1 -0
- package/dist/zonos-elements/p-c3c9b089.entry.js +1 -0
- package/dist/zonos-elements/p-c8784a01.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7b5de646.entry.js → p-d045e2e5.entry.js} +1 -1
- package/dist/zonos-elements/p-d26cffba.entry.js +1 -0
- package/dist/zonos-elements/{p-544c173a.system.entry.js → p-d351ece6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d63696ac.system.js +17 -0
- package/dist/zonos-elements/p-ddb29c2a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d6fa2dc2.entry.js → p-dfb92907.entry.js} +1 -1
- package/dist/zonos-elements/{p-714c28b1.system.entry.js → p-e2a45188.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ac8bfbb.system.entry.js → p-e455f060.system.entry.js} +1 -1
- package/dist/zonos-elements/p-eb54ece4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a98b1e8d.entry.js → p-efa6203f.entry.js} +1 -1
- package/dist/zonos-elements/{p-59eaebe3.system.entry.js → p-f0be0ca9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f129a83b.system.entry.js +1 -0
- package/dist/zonos-elements/p-f17fde5f.system.js +1 -0
- package/dist/zonos-elements/{p-47ffacd8.system.entry.js → p-f74a6b78.system.entry.js} +1 -1
- 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-010402f9.js +0 -1
- package/dist/esm-es5/localization-9db8b6e9.js +0 -1
- package/dist/esm-es5/paypal-70b140d9.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-0a7ef032.entry.js +0 -1
- package/dist/zonos-elements/p-0e8bdf5c.js +0 -1
- package/dist/zonos-elements/p-164ba7ae.system.entry.js +0 -1
- package/dist/zonos-elements/p-242dd7ca.system.entry.js +0 -1
- package/dist/zonos-elements/p-300e0d47.system.entry.js +0 -1
- package/dist/zonos-elements/p-37aa481c.system.entry.js +0 -1
- package/dist/zonos-elements/p-3a1513ae.system.entry.js +0 -1
- package/dist/zonos-elements/p-425096c9.js +0 -1
- package/dist/zonos-elements/p-4cd33d08.entry.js +0 -1
- package/dist/zonos-elements/p-57f391e6.system.entry.js +0 -1
- package/dist/zonos-elements/p-58b3a0fc.entry.js +0 -1
- package/dist/zonos-elements/p-605a21ac.entry.js +0 -1
- package/dist/zonos-elements/p-608f965f.system.js +0 -1
- package/dist/zonos-elements/p-65c68531.js +0 -1
- package/dist/zonos-elements/p-680149ed.entry.js +0 -1
- package/dist/zonos-elements/p-6d44f441.system.js +0 -1
- package/dist/zonos-elements/p-7c88d2ac.entry.js +0 -1
- package/dist/zonos-elements/p-9ddb4533.system.entry.js +0 -1
- package/dist/zonos-elements/p-a91024b6.system.entry.js +0 -1
- package/dist/zonos-elements/p-a9d41e7c.system.entry.js +0 -1
- package/dist/zonos-elements/p-ad556be6.entry.js +0 -1
- package/dist/zonos-elements/p-ad8b1fe8.entry.js +0 -1
- package/dist/zonos-elements/p-afa4b4f0.js +0 -17
- package/dist/zonos-elements/p-b83b382e.system.js +0 -1
- package/dist/zonos-elements/p-b9ff6458.entry.js +0 -1
- package/dist/zonos-elements/p-d55aec11.system.entry.js +0 -1
- package/dist/zonos-elements/p-dcedcdda.entry.js +0 -1
- package/dist/zonos-elements/p-e11c61a5.entry.js +0 -1
- package/dist/zonos-elements/p-e17ac0d1.system.js +0 -17
- package/dist/zonos-elements/p-e1a7a85f.system.entry.js +0 -1
- package/dist/zonos-elements/p-ef1ce617.system.entry.js +0 -1
- package/dist/zonos-elements/p-ef34e1ce.entry.js +0 -1
- package/dist/zonos-elements/p-f54123b5.entry.js +0 -1
- package/dist/zonos-elements/p-f7300f5b.system.entry.js +0 -1
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, F as Fragment } from './index-55a03023.js';
|
|
2
|
+
import { c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, o as cartStoreUpdateToErrorState, f as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, w as stripeStoreConfirmPayment, A as stripeStoreOnChange, y as stripeStoreReset, g as cartStoreReset } from './cart-acf4ebf5.js';
|
|
3
|
+
import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore } from './isCollectMobileTablet-b72b81c5.js';
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-2fa930eb.js';
|
|
5
|
+
import { s as storageStore, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-8646f526.js';
|
|
6
|
+
import { t as translate } from './translationStore-c9743292.js';
|
|
7
|
+
import { z as zonosStore } from './zonosStore-c456b933.js';
|
|
8
|
+
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-c4488f73.js';
|
|
9
|
+
import { h as handleFetch, l as log, s as sendErrorLog, b as logError, g as getIsTestMode } from './handleFetch-99218189.js';
|
|
10
|
+
import { c as classes } from './classes-0d95c529.js';
|
|
11
|
+
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
12
|
+
import './isDarkColor-1f58b6be.js';
|
|
13
|
+
import './getBorderRadius-87593ff4.js';
|
|
14
|
+
import './VarianceTest-fef2d958.js';
|
|
15
|
+
|
|
16
|
+
const ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
17
|
+
|
|
18
|
+
const zonosCollectCss = ".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-checkout-finish.sc-zonos-collect{-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:72px}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}";
|
|
19
|
+
const ZonosCollectStyle0 = zonosCollectCss;
|
|
20
|
+
|
|
21
|
+
const ZonosCollect = class {
|
|
22
|
+
constructor(hostRef) {
|
|
23
|
+
registerInstance(this, hostRef);
|
|
24
|
+
this.storeUnsubscribeList = [];
|
|
25
|
+
/**
|
|
26
|
+
* Listener for locale change in localization store
|
|
27
|
+
*/
|
|
28
|
+
this.onChangeLocaleListener = () => { };
|
|
29
|
+
/**
|
|
30
|
+
* Flag to determine if the checkout is on mobile
|
|
31
|
+
*/
|
|
32
|
+
this.mobile = false;
|
|
33
|
+
/**
|
|
34
|
+
* Whether or not the component is being rendered with tablet styles
|
|
35
|
+
*/
|
|
36
|
+
this.tablet = false;
|
|
37
|
+
/**
|
|
38
|
+
* The stripe instance
|
|
39
|
+
*/
|
|
40
|
+
this.stripe = window.Zonos.stripe;
|
|
41
|
+
/**
|
|
42
|
+
* Whether or not the language dialog is open
|
|
43
|
+
*/
|
|
44
|
+
this.showLanguageDialogMobile = false;
|
|
45
|
+
/**
|
|
46
|
+
* Whether or not the submit button is loading in `step` component
|
|
47
|
+
*/
|
|
48
|
+
this.submitLoading = false;
|
|
49
|
+
// default to collapse the review
|
|
50
|
+
this.collapseReview = true;
|
|
51
|
+
this.isMobile = false;
|
|
52
|
+
this.isTablet = false;
|
|
53
|
+
// @State() isCollect = window.Zonos.isCollect;
|
|
54
|
+
this.isOverlayLoading = true;
|
|
55
|
+
/**
|
|
56
|
+
* Confirm dialog open state
|
|
57
|
+
*/
|
|
58
|
+
this.isCartCollected = false;
|
|
59
|
+
/**
|
|
60
|
+
* Cart expired state to show the cart expired dialog
|
|
61
|
+
*/
|
|
62
|
+
this.isCartExpired = false;
|
|
63
|
+
/**
|
|
64
|
+
* Pay in USD confirm dialog open state
|
|
65
|
+
*/
|
|
66
|
+
this.payInUsdConfirmDialogOpen = false;
|
|
67
|
+
/**
|
|
68
|
+
* Error message from onInventoryCheck callback
|
|
69
|
+
*/
|
|
70
|
+
this.inventoryCheckErrorMessage = null;
|
|
71
|
+
/**
|
|
72
|
+
* Confirmation id for collect finish component
|
|
73
|
+
*/
|
|
74
|
+
this.confirmationId = null;
|
|
75
|
+
/**
|
|
76
|
+
* Client secret value
|
|
77
|
+
*/
|
|
78
|
+
this.clientSecret = stripeStore.clientSecret;
|
|
79
|
+
/**
|
|
80
|
+
* Client secret value of customer session (use to load saved payment method and render saved consent)
|
|
81
|
+
*/
|
|
82
|
+
this.stripeCustomerSessionClientSecret = stripeStore.stripeCustomerSessionClientSecret;
|
|
83
|
+
this.getBaseCurrencySettlementInfo = () => {
|
|
84
|
+
const selectedLandedCost = cartStore.selectedLandedCost;
|
|
85
|
+
if (!selectedLandedCost) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const { landedCost: { amountSubtotals }, } = selectedLandedCost;
|
|
89
|
+
if (!amountSubtotals) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
const total = (amountSubtotals.discounts || 0) +
|
|
93
|
+
amountSubtotals.items +
|
|
94
|
+
amountSubtotals.landedCostTotal +
|
|
95
|
+
amountSubtotals.shipping;
|
|
96
|
+
return {
|
|
97
|
+
settlementAmount: total,
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
this.applyStripeTheme = async () => {
|
|
101
|
+
const theme = zonosStore.appearance.theme;
|
|
102
|
+
await initStripeElements({
|
|
103
|
+
// only override theme or theme from appearance if it's mobile
|
|
104
|
+
overrideTheme: this.isMobile ? theme : undefined,
|
|
105
|
+
paypalEnabled: paypalStoreHasPaypalEnabled(),
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
this.fetchCheckoutSession = async (checkoutSessionId) => {
|
|
109
|
+
const { json } = await handleFetch(`/api/zonos-elements/collect/get-checkout-session`, {
|
|
110
|
+
body: {
|
|
111
|
+
checkoutSessionId,
|
|
112
|
+
},
|
|
113
|
+
method: 'POST',
|
|
114
|
+
});
|
|
115
|
+
return json;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Check if stripe payment intent is succeeded or in a good state to move forward
|
|
119
|
+
*/
|
|
120
|
+
this.checkStripePaymentIntentStatus = async () => {
|
|
121
|
+
var _a;
|
|
122
|
+
const isCartDataAvailable = !!window.Zonos.cartData;
|
|
123
|
+
const searchParams = new URL(window.location.href).searchParams;
|
|
124
|
+
const stripeClientSecret = searchParams.get('payment_intent_client_secret');
|
|
125
|
+
const zonosCheckoutSessionId = searchParams.get('zonosCheckoutSessionId');
|
|
126
|
+
log('Payment intent exist, checking stripe payment intent status');
|
|
127
|
+
// Allow to proceed to order if there's no stripe client secret and cart data is available
|
|
128
|
+
if (!stripeClientSecret) {
|
|
129
|
+
log('No stripe client secret found in the URL, proceed to order if cart data is available');
|
|
130
|
+
return { shouldAllowOrder: isCartDataAvailable };
|
|
131
|
+
}
|
|
132
|
+
const { error, status } = await stripeStoreRetrievePayment({
|
|
133
|
+
clientSecret: stripeClientSecret,
|
|
134
|
+
});
|
|
135
|
+
// check if this is redirect after order
|
|
136
|
+
const isJustRedirected = new URLSearchParams(window.location.search).get('redirect_status');
|
|
137
|
+
// If just redirected from Payment provider, show the success screen or error screen based on the status
|
|
138
|
+
if (isJustRedirected && zonosCheckoutSessionId) {
|
|
139
|
+
if (!error) {
|
|
140
|
+
log('Payment intent is succeeded or in a good state to move forward, show success screen');
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
log('Payment intent failed, show status from error');
|
|
144
|
+
}
|
|
145
|
+
// Attempt to retrieve the checkout session
|
|
146
|
+
const json = await this.fetchCheckoutSession(zonosCheckoutSessionId);
|
|
147
|
+
this.confirmationId = ((_a = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _a === void 0 ? void 0 : _a.shortId) || null;
|
|
148
|
+
storageStore.checkoutSessionId = zonosCheckoutSessionId;
|
|
149
|
+
stripeStore.clientSecret = stripeClientSecret;
|
|
150
|
+
void this.setToFinishStep(status);
|
|
151
|
+
return { shouldAllowOrder: false };
|
|
152
|
+
}
|
|
153
|
+
if (!isCartDataAvailable) {
|
|
154
|
+
log('Cart data is not available, only check payment intent status, skip order.');
|
|
155
|
+
return { shouldAllowOrder: false };
|
|
156
|
+
}
|
|
157
|
+
log('Payment intent is not succeeded, proceed to order');
|
|
158
|
+
return { shouldAllowOrder: true };
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Listen to resize event to update the isMobile state
|
|
163
|
+
*/
|
|
164
|
+
resizeListener() {
|
|
165
|
+
this.isMobile = isCollectMobile(this.mobile);
|
|
166
|
+
this.isTablet = isCollectTablet(this.tablet);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
|
|
170
|
+
*/
|
|
171
|
+
async setToFinishStep(forcePaymentStatus) {
|
|
172
|
+
stripeStore.stripe = window.Zonos.stripe;
|
|
173
|
+
cartStore.step = 'finish';
|
|
174
|
+
this.storybookPaymentStatusOverride = forcePaymentStatus;
|
|
175
|
+
this.isOverlayLoading = false;
|
|
176
|
+
}
|
|
177
|
+
async initCollectCart() {
|
|
178
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
179
|
+
// Should not happen since we will throw error way earlier if cartData is not available
|
|
180
|
+
if (!window.Zonos.cartData) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
// change currency to the currency of the cart
|
|
184
|
+
const cartCurrency = (_b = (_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.items[0]) === null || _b === void 0 ? void 0 : _b.currencyCode;
|
|
185
|
+
if (cartCurrency) {
|
|
186
|
+
cartStore.currency = cartCurrency;
|
|
187
|
+
}
|
|
188
|
+
const cartCheckoutSessionId = (_d = (_c = window.Zonos.cartData) === null || _c === void 0 ? void 0 : _c.references) === null || _d === void 0 ? void 0 : _d.checkoutSessionId;
|
|
189
|
+
const cartLandedCostId = (_f = (_e = window.Zonos.cartData) === null || _e === void 0 ? void 0 : _e.references) === null || _f === void 0 ? void 0 : _f.landedCostId;
|
|
190
|
+
if (!cartLandedCostId) {
|
|
191
|
+
cartStoreUpdateToErrorState({
|
|
192
|
+
messages: [
|
|
193
|
+
translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
|
|
194
|
+
organizationName: zonosStore.organizationName,
|
|
195
|
+
}),
|
|
196
|
+
],
|
|
197
|
+
title: translate('Invalid session'),
|
|
198
|
+
});
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
// Override checkout session id for collect if we found one in the cart reference
|
|
202
|
+
if (cartCheckoutSessionId) {
|
|
203
|
+
log('Setting checkout session id from cart reference', 'info', cartCheckoutSessionId);
|
|
204
|
+
storageStore.checkoutSessionId = cartCheckoutSessionId;
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
log('Clear checkout session id from storage so we start from a fresh session for the collect cart');
|
|
208
|
+
storageStore.checkoutSessionId = null;
|
|
209
|
+
}
|
|
210
|
+
const { shouldAllowOrder } = await this.checkStripePaymentIntentStatus();
|
|
211
|
+
if (!shouldAllowOrder) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
try {
|
|
215
|
+
const { adjustments, cartItems } = buildCartItemsByTempCart(window.Zonos.cartData);
|
|
216
|
+
await cartStoreUpdateItems({
|
|
217
|
+
adjustments,
|
|
218
|
+
cartItems,
|
|
219
|
+
landedCostId: cartLandedCostId,
|
|
220
|
+
// No need to init session on failure since we will always create a new one if there is no checkout session id in the cart references
|
|
221
|
+
shouldInitSessionOnFailure: false,
|
|
222
|
+
});
|
|
223
|
+
// if checkoutSessionId is not available, request a new one, only if no checkout session id is found in cart references
|
|
224
|
+
if (!storageStore.checkoutSessionId && !cartCheckoutSessionId) {
|
|
225
|
+
const success = await stripeStoreInitCheckoutSession();
|
|
226
|
+
log(`stripeStoreInitCheckoutSession: ${success}`);
|
|
227
|
+
if (!success) {
|
|
228
|
+
throw new Error('Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential');
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// If there is checkout session in collect cart references and we failed to retrieve it from `update-checkout-session`, it most likely means the cart is already completed / invalid landed cost
|
|
232
|
+
if ((!cartStore.checkoutSession ||
|
|
233
|
+
((_g = cartStore.checkoutSession) === null || _g === void 0 ? void 0 : _g.completedAt)) &&
|
|
234
|
+
cartCheckoutSessionId) {
|
|
235
|
+
// Attempt to retrieve the checkout session
|
|
236
|
+
const json = await this.fetchCheckoutSession(cartCheckoutSessionId);
|
|
237
|
+
// Some merchants use landed cost id as the confirmation id
|
|
238
|
+
this.confirmationId = ((_h = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _h === void 0 ? void 0 : _h.shortId) || null;
|
|
239
|
+
// If checkout session is already completed, set to finish step
|
|
240
|
+
if (!!(json === null || json === void 0 ? void 0 : json.checkoutSession.completedAt)) {
|
|
241
|
+
void this.setToFinishStep('succeeded');
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (json === null || json === void 0 ? void 0 : json.checkoutSession.clientSecret) {
|
|
245
|
+
const { status } = await stripeStoreRetrievePayment({
|
|
246
|
+
clientSecret: json.checkoutSession.clientSecret,
|
|
247
|
+
});
|
|
248
|
+
// If payment intent is still processing or succeeded, set to finish step
|
|
249
|
+
if (status === 'processing' || status === 'succeeded') {
|
|
250
|
+
void this.setToFinishStep(status);
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
void sendErrorLog({
|
|
255
|
+
endpoint: 'INVALID_COLLECT_CHECKOUT_SESSION',
|
|
256
|
+
errors: [
|
|
257
|
+
'Invalid checkout session, can not retrieve the checkout session after failing to update it',
|
|
258
|
+
],
|
|
259
|
+
metadata: {
|
|
260
|
+
cartCheckoutSessionId,
|
|
261
|
+
cartId: (_j = window.Zonos.cartData) === null || _j === void 0 ? void 0 : _j.id,
|
|
262
|
+
cartLandedCostId,
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
throw new Error('Invalid checkout session, can not retrieve the checkout session after failing to update it');
|
|
266
|
+
}
|
|
267
|
+
if (!cartStore.checkoutSession) {
|
|
268
|
+
void sendErrorLog({
|
|
269
|
+
endpoint: 'FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION',
|
|
270
|
+
errors: [
|
|
271
|
+
'Could not update/create checkout session for this collect cart',
|
|
272
|
+
],
|
|
273
|
+
metadata: {
|
|
274
|
+
cartCheckoutSessionId: cartCheckoutSessionId || 'N/A',
|
|
275
|
+
cartId: (_k = window.Zonos.cartData) === null || _k === void 0 ? void 0 : _k.id,
|
|
276
|
+
cartLandedCostId: cartLandedCostId || 'N/A',
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
throw new Error('Could not update/create checkout session for this collect cart');
|
|
280
|
+
}
|
|
281
|
+
// const checkoutSessionId = storageStore.checkoutSessionId;
|
|
282
|
+
void stripeStoreGetPaymentIntent();
|
|
283
|
+
const landedCost = (_l = cartStore.checkoutSession) === null || _l === void 0 ? void 0 : _l.landedCost;
|
|
284
|
+
if (!landedCost) {
|
|
285
|
+
throw new Error('Landed cost could not be found in checkout session after creating/updating them');
|
|
286
|
+
}
|
|
287
|
+
await collectStoreUpdateSelectedShippingOption(Object.assign(Object.assign({}, cartStore.checkoutSession), { id: storageStore.checkoutSessionId || '' }));
|
|
288
|
+
void collectStoreInitShippingInfo({
|
|
289
|
+
landedCostId: landedCost.id,
|
|
290
|
+
});
|
|
291
|
+
void this.applyStripeTheme();
|
|
292
|
+
}
|
|
293
|
+
catch (err) {
|
|
294
|
+
logError(err);
|
|
295
|
+
cartStoreUpdateToErrorState({
|
|
296
|
+
messages: [
|
|
297
|
+
translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
|
|
298
|
+
organizationName: zonosStore.organizationName,
|
|
299
|
+
}),
|
|
300
|
+
],
|
|
301
|
+
title: translate('Invalid session'),
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
this.isOverlayLoading = false;
|
|
305
|
+
}
|
|
306
|
+
toggleLanguageDialog() {
|
|
307
|
+
this.showLanguageDialogMobile = !this.showLanguageDialogMobile;
|
|
308
|
+
}
|
|
309
|
+
async handleStripePaymentContinue() {
|
|
310
|
+
var _a, _b, _c, _d;
|
|
311
|
+
// Attempt to get the value of the billing address element to validate the form
|
|
312
|
+
void ((_a = stripeStore.stripeBillingAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
|
|
313
|
+
// If the email is not complete, scroll to the link authentication section
|
|
314
|
+
if (!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete)) {
|
|
315
|
+
// Scroll to the billing section
|
|
316
|
+
const linkAuthentication = document.querySelector('zonos-link-authentication');
|
|
317
|
+
linkAuthentication === null || linkAuthentication === void 0 ? void 0 : linkAuthentication.scrollIntoView({ behavior: 'smooth' });
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
if (!((_c = stripeStore.stripeBillingAddressEventData) === null || _c === void 0 ? void 0 : _c.complete)) {
|
|
321
|
+
// Scroll to the billing section
|
|
322
|
+
const billingSection = document.querySelector('.zonos--billing-address');
|
|
323
|
+
billingSection === null || billingSection === void 0 ? void 0 : billingSection.scrollIntoView({ behavior: 'smooth' });
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
const shouldConfirmPayInUsd = stripeStore.checkoutSettlementCurrency === 'USD';
|
|
327
|
+
// open the confirm dialog if the settlement currency is in USD, and if call this method again, proceed and confirm with Stripe.
|
|
328
|
+
if (shouldConfirmPayInUsd &&
|
|
329
|
+
stripeStore.shouldRenderPayInUsdButton &&
|
|
330
|
+
!this.payInUsdConfirmDialogOpen) {
|
|
331
|
+
this.payInUsdConfirmDialogOpen = true;
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
// Close the dialog after the user confirms to proceed with the payment in USD
|
|
335
|
+
this.payInUsdConfirmDialogOpen = false;
|
|
336
|
+
// reset paypal error message
|
|
337
|
+
paypalStore.paypalErrorMessage = null;
|
|
338
|
+
// reset error state
|
|
339
|
+
stripeStore.hasPaymentError = false;
|
|
340
|
+
this.submitLoading = true;
|
|
341
|
+
// reset inventory check message
|
|
342
|
+
cartStore.inventoryCheckErrorMessage = null;
|
|
343
|
+
// Attempt to change settlement currency to USD
|
|
344
|
+
const baseCurrencyUpdateSuccess = await stripeStoreUpdateCheckoutSessionBaseCurrency();
|
|
345
|
+
// Should not proceed to confirm payment if base currency update failed
|
|
346
|
+
if (!baseCurrencyUpdateSuccess) {
|
|
347
|
+
stripeStore.hasPaymentError = true;
|
|
348
|
+
stripeStore.customErrorMessage = translate('Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.', {
|
|
349
|
+
currency: stripeStore.checkoutSettlementCurrency,
|
|
350
|
+
});
|
|
351
|
+
this.submitLoading = false;
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
// Update the billing party id to the checkout session
|
|
355
|
+
await collectStoreAsyncAddressUpdate();
|
|
356
|
+
try {
|
|
357
|
+
await stripeStoreConfirmPayment({
|
|
358
|
+
noLandedCostCheck: true,
|
|
359
|
+
});
|
|
360
|
+
cartStore.step = 'finish';
|
|
361
|
+
// Some merchants use landed cost id as the confirmation id
|
|
362
|
+
this.confirmationId =
|
|
363
|
+
collectStore.landedCostShortId ||
|
|
364
|
+
((_d = cartStore.selectedLandedCost) === null || _d === void 0 ? void 0 : _d.landedCostId) ||
|
|
365
|
+
null;
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
catch (err) {
|
|
369
|
+
logError(err);
|
|
370
|
+
stripeStore.hasPaymentError = true;
|
|
371
|
+
}
|
|
372
|
+
this.submitLoading = false;
|
|
373
|
+
}
|
|
374
|
+
componentWillLoad() {
|
|
375
|
+
stripeStore.stripe = window.Zonos.stripe;
|
|
376
|
+
// Set the step to payment
|
|
377
|
+
cartStore.step = 'payment';
|
|
378
|
+
void this.initCollectCart();
|
|
379
|
+
this.resizeListener();
|
|
380
|
+
this.storeUnsubscribeList = [
|
|
381
|
+
stripeStoreOnChange('clientSecret', () => {
|
|
382
|
+
void this.applyStripeTheme();
|
|
383
|
+
}),
|
|
384
|
+
localizationStoreOnChange('selectedLocale', () => {
|
|
385
|
+
void this.applyStripeTheme();
|
|
386
|
+
}),
|
|
387
|
+
];
|
|
388
|
+
log(`mobile: ${this.isMobile}`);
|
|
389
|
+
}
|
|
390
|
+
// do clean up when component is unmounted
|
|
391
|
+
disconnectedCallback() {
|
|
392
|
+
// reset stripe store
|
|
393
|
+
stripeStoreReset();
|
|
394
|
+
// reset cart store
|
|
395
|
+
cartStoreReset();
|
|
396
|
+
// cleanup onChange listener
|
|
397
|
+
this.onChangeLocaleListener();
|
|
398
|
+
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
399
|
+
}
|
|
400
|
+
render() {
|
|
401
|
+
// Set client secret so that we can add this to @Watch listener
|
|
402
|
+
this.clientSecret = stripeStore.clientSecret;
|
|
403
|
+
// Only set and update stripeCustomerSession state if it's available, since it would only be available at the time checkout session is created, afterward access checkout session the value would be `null`.
|
|
404
|
+
if (stripeStore.stripeCustomerSessionClientSecret) {
|
|
405
|
+
// Set stripe customer session client secret so that we can add this to @Watch listener
|
|
406
|
+
this.stripeCustomerSessionClientSecret =
|
|
407
|
+
stripeStore.stripeCustomerSessionClientSecret;
|
|
408
|
+
}
|
|
409
|
+
const baseCurrencySettlementInfo = this.getBaseCurrencySettlementInfo();
|
|
410
|
+
const { logoUrl, theme } = zonosStore.appearance;
|
|
411
|
+
const renderLogo = () => {
|
|
412
|
+
// add timestamp to logo url so browser won't cache it on the dashboard setting
|
|
413
|
+
const logo = `${logoUrl}?timestamp=${Date.now()}`;
|
|
414
|
+
return (h("div", { class: "zonos--logo" }, logo && (h("img", { alt: `${zonosStore.organizationName} logo`, src: logo }))));
|
|
415
|
+
};
|
|
416
|
+
const isTestMode = getIsTestMode();
|
|
417
|
+
const renderTopHeader = () => {
|
|
418
|
+
var _a;
|
|
419
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
420
|
+
const zonosQaUrl = urlParams.get('zonosQaUrl');
|
|
421
|
+
const zonosDebug = urlParams.get('zonosDebug');
|
|
422
|
+
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
423
|
+
return (h(Fragment, null, h("zonos-h-stack", { class: "zonos--header-wrapper", spacing: 16 }, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl))), h("div", { class: "zonos--header-right" }, h("zonos-button", { backgroundColor: 'gray-0', class: "zonos--header-right-button", onClick: () => this.toggleLanguageDialog(), variant: "outline" }, languageLabel, h("zonos-icon", { "aria-label": "Language select", content: ChevronDownIcon, iconColor: "gray-1200" })), h("div", { class: classes([
|
|
424
|
+
'zonos--collect-language-dialog',
|
|
425
|
+
this.showLanguageDialogMobile &&
|
|
426
|
+
'zonos--collect-language-dialog-open',
|
|
427
|
+
]) }, h("zonos-language-select", { handleOnClose: () => this.toggleLanguageDialog() })))), h("zonos-text", { class: "zonos--header-title", type: "header" }, translate('Customs fees for your recent purchase from [companyName] are ready for payment', {
|
|
428
|
+
companyName: zonosStore.organizationName,
|
|
429
|
+
}))));
|
|
430
|
+
};
|
|
431
|
+
const renderContent = () => {
|
|
432
|
+
if (this.isOverlayLoading || stripeStore.isFetchingSession) {
|
|
433
|
+
return null;
|
|
434
|
+
}
|
|
435
|
+
return (h("div", { class: 'zonos--content' }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, (this.isMobile || this.isTablet) && renderTopHeader(), h("div", { class: "zonos--left", "data-theme": theme }, !this.isMobile && !this.isTablet && renderTopHeader(), h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Billing info')), h("zonos-v-stack", { spacing: 16 }, h("zonos-link-authentication", { titleText: "" }), h("zonos-address", { titleText: "", type: "billing" })), h("zonos-collect-payment", { class: classes(['zonos--collect-container']), continueLoading: this.submitLoading, onContinueClicked: async () => {
|
|
436
|
+
await this.handleStripePaymentContinue();
|
|
437
|
+
} })), h("div", { class: "zonos--right", "data-theme": theme }, h("zonos-collect-review", { mobile: this.isMobile, tablet: this.isTablet }), h("div", { class: "zonos--order-details-container" }, h("zonos-collect-order-details", { collapsed: this.collapseReview, mobile: this.isMobile, onCollapseClicked: () => {
|
|
438
|
+
this.collapseReview = !this.collapseReview;
|
|
439
|
+
} })), h("div", { class: "flex--wrapper" }, h("zonos-v-stack", { spacing: 16 }, h("zonos-collect-subtotal", null)), !this.isMobile && !this.isTablet && (h("zonos-collect-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet })))))), (cartStore.step === 'finish' || cartStore.step === 'error') && (h("div", { class: "zonos--done", "data-theme": theme }, h("div", { class: "zonos--header" }, renderLogo()), h("zonos-collect-finish", { confirmationId: this.confirmationId, overrideNotification: cartStore.step === 'error' && !!cartStore.error
|
|
440
|
+
? Object.assign(Object.assign({}, cartStore.error), { type: 'error' }) : undefined, storybookForceStatus: this.storybookPaymentStatusOverride }))), (this.isMobile ||
|
|
441
|
+
this.isTablet ||
|
|
442
|
+
cartStore.step === 'finish' ||
|
|
443
|
+
cartStore.step === 'error') && (h("zonos-collect-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet }))));
|
|
444
|
+
};
|
|
445
|
+
return (h(Host, { class: classes([
|
|
446
|
+
'zonos--collect zonos--elements',
|
|
447
|
+
this.isMobile && 'mobile',
|
|
448
|
+
this.isTablet && 'tablet',
|
|
449
|
+
]), "data-theme": theme }, renderContent(), baseCurrencySettlementInfo && (h("zonos-confirm-dialog", { class: "zonos--pay-in-usd-dialog", dialogCancelBtnText: translate('Cancel'), dialogConfirmBtnText: translate('Pay [orderTotal]', {
|
|
450
|
+
orderTotal: currencyFormat({
|
|
451
|
+
amount: baseCurrencySettlementInfo.settlementAmount,
|
|
452
|
+
currency: 'USD',
|
|
453
|
+
}),
|
|
454
|
+
}), dialogIntent: "warn", dialogOpen: this.payInUsdConfirmDialogOpen, dialogSubtitle: translate('By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level.'), dialogTitle: translate('Pay in USD (United States Dollar)?'), dialogType: "confirm", dialogWidth: 480, onCancelClicked: () => {
|
|
455
|
+
this.payInUsdConfirmDialogOpen = false;
|
|
456
|
+
},
|
|
457
|
+
// Mark user selected confirm to continue with payment
|
|
458
|
+
onConfirmClicked: () => this.handleStripePaymentContinue() })), h("zonos-loading-overlay", { open: this.isOverlayLoading })));
|
|
459
|
+
}
|
|
460
|
+
static get assetsDirs() { return ["assets"]; }
|
|
461
|
+
};
|
|
462
|
+
ZonosCollect.style = ZonosCollectStyle0;
|
|
463
|
+
|
|
464
|
+
export { ZonosCollect as zonos_collect };
|
|
@@ -27,7 +27,7 @@ const ZonosComponent = class {
|
|
|
27
27
|
return format(this.first, this.middle, this.last);
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return h("div", { key: '
|
|
30
|
+
return h("div", { key: '757e42d63a24b18216b900937089c2566dd44a93' }, "Hello, World! I'm ", this.getText());
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
ZonosComponent.style = ZonosComponentStyle0;
|