@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,468 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-1c710d00.js');
|
|
6
|
+
const cart = require('./cart-9a2b32e4.js');
|
|
7
|
+
const isCollectMobileTablet = require('./isCollectMobileTablet-7e57fd90.js');
|
|
8
|
+
const paypal = require('./paypal-e80871d0.js');
|
|
9
|
+
const localization = require('./localization-b12edb2a.js');
|
|
10
|
+
const translationStore = require('./translationStore-20a6d8bf.js');
|
|
11
|
+
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
12
|
+
const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-309fcebf.js');
|
|
13
|
+
const handleFetch = require('./handleFetch-45f35cac.js');
|
|
14
|
+
const classes = require('./classes-b7918f56.js');
|
|
15
|
+
const ILanguage = require('./ILanguage-98b04442.js');
|
|
16
|
+
require('./isDarkColor-428965f4.js');
|
|
17
|
+
require('./getBorderRadius-1b5e33cf.js');
|
|
18
|
+
require('./VarianceTest-0cb1e118.js');
|
|
19
|
+
|
|
20
|
+
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>`;
|
|
21
|
+
|
|
22
|
+
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}";
|
|
23
|
+
const ZonosCollectStyle0 = zonosCollectCss;
|
|
24
|
+
|
|
25
|
+
const ZonosCollect = class {
|
|
26
|
+
constructor(hostRef) {
|
|
27
|
+
index.registerInstance(this, hostRef);
|
|
28
|
+
this.storeUnsubscribeList = [];
|
|
29
|
+
/**
|
|
30
|
+
* Listener for locale change in localization store
|
|
31
|
+
*/
|
|
32
|
+
this.onChangeLocaleListener = () => { };
|
|
33
|
+
/**
|
|
34
|
+
* Flag to determine if the checkout is on mobile
|
|
35
|
+
*/
|
|
36
|
+
this.mobile = false;
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not the component is being rendered with tablet styles
|
|
39
|
+
*/
|
|
40
|
+
this.tablet = false;
|
|
41
|
+
/**
|
|
42
|
+
* The stripe instance
|
|
43
|
+
*/
|
|
44
|
+
this.stripe = window.Zonos.stripe;
|
|
45
|
+
/**
|
|
46
|
+
* Whether or not the language dialog is open
|
|
47
|
+
*/
|
|
48
|
+
this.showLanguageDialogMobile = false;
|
|
49
|
+
/**
|
|
50
|
+
* Whether or not the submit button is loading in `step` component
|
|
51
|
+
*/
|
|
52
|
+
this.submitLoading = false;
|
|
53
|
+
// default to collapse the review
|
|
54
|
+
this.collapseReview = true;
|
|
55
|
+
this.isMobile = false;
|
|
56
|
+
this.isTablet = false;
|
|
57
|
+
// @State() isCollect = window.Zonos.isCollect;
|
|
58
|
+
this.isOverlayLoading = true;
|
|
59
|
+
/**
|
|
60
|
+
* Confirm dialog open state
|
|
61
|
+
*/
|
|
62
|
+
this.isCartCollected = false;
|
|
63
|
+
/**
|
|
64
|
+
* Cart expired state to show the cart expired dialog
|
|
65
|
+
*/
|
|
66
|
+
this.isCartExpired = false;
|
|
67
|
+
/**
|
|
68
|
+
* Pay in USD confirm dialog open state
|
|
69
|
+
*/
|
|
70
|
+
this.payInUsdConfirmDialogOpen = false;
|
|
71
|
+
/**
|
|
72
|
+
* Error message from onInventoryCheck callback
|
|
73
|
+
*/
|
|
74
|
+
this.inventoryCheckErrorMessage = null;
|
|
75
|
+
/**
|
|
76
|
+
* Confirmation id for collect finish component
|
|
77
|
+
*/
|
|
78
|
+
this.confirmationId = null;
|
|
79
|
+
/**
|
|
80
|
+
* Client secret value
|
|
81
|
+
*/
|
|
82
|
+
this.clientSecret = cart.stripeStore.clientSecret;
|
|
83
|
+
/**
|
|
84
|
+
* Client secret value of customer session (use to load saved payment method and render saved consent)
|
|
85
|
+
*/
|
|
86
|
+
this.stripeCustomerSessionClientSecret = cart.stripeStore.stripeCustomerSessionClientSecret;
|
|
87
|
+
this.getBaseCurrencySettlementInfo = () => {
|
|
88
|
+
const selectedLandedCost = cart.cartStore.selectedLandedCost;
|
|
89
|
+
if (!selectedLandedCost) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
const { landedCost: { amountSubtotals }, } = selectedLandedCost;
|
|
93
|
+
if (!amountSubtotals) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
const total = (amountSubtotals.discounts || 0) +
|
|
97
|
+
amountSubtotals.items +
|
|
98
|
+
amountSubtotals.landedCostTotal +
|
|
99
|
+
amountSubtotals.shipping;
|
|
100
|
+
return {
|
|
101
|
+
settlementAmount: total,
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
this.applyStripeTheme = async () => {
|
|
105
|
+
const theme = zonosStore.zonosStore.appearance.theme;
|
|
106
|
+
await cart.initStripeElements({
|
|
107
|
+
// only override theme or theme from appearance if it's mobile
|
|
108
|
+
overrideTheme: this.isMobile ? theme : undefined,
|
|
109
|
+
paypalEnabled: paypal.paypalStoreHasPaypalEnabled(),
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
this.fetchCheckoutSession = async (checkoutSessionId) => {
|
|
113
|
+
const { json } = await handleFetch.handleFetch(`/api/zonos-elements/collect/get-checkout-session`, {
|
|
114
|
+
body: {
|
|
115
|
+
checkoutSessionId,
|
|
116
|
+
},
|
|
117
|
+
method: 'POST',
|
|
118
|
+
});
|
|
119
|
+
return json;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Check if stripe payment intent is succeeded or in a good state to move forward
|
|
123
|
+
*/
|
|
124
|
+
this.checkStripePaymentIntentStatus = async () => {
|
|
125
|
+
var _a;
|
|
126
|
+
const isCartDataAvailable = !!window.Zonos.cartData;
|
|
127
|
+
const searchParams = new URL(window.location.href).searchParams;
|
|
128
|
+
const stripeClientSecret = searchParams.get('payment_intent_client_secret');
|
|
129
|
+
const zonosCheckoutSessionId = searchParams.get('zonosCheckoutSessionId');
|
|
130
|
+
handleFetch.log('Payment intent exist, checking stripe payment intent status');
|
|
131
|
+
// Allow to proceed to order if there's no stripe client secret and cart data is available
|
|
132
|
+
if (!stripeClientSecret) {
|
|
133
|
+
handleFetch.log('No stripe client secret found in the URL, proceed to order if cart data is available');
|
|
134
|
+
return { shouldAllowOrder: isCartDataAvailable };
|
|
135
|
+
}
|
|
136
|
+
const { error, status } = await cart.stripeStoreRetrievePayment({
|
|
137
|
+
clientSecret: stripeClientSecret,
|
|
138
|
+
});
|
|
139
|
+
// check if this is redirect after order
|
|
140
|
+
const isJustRedirected = new URLSearchParams(window.location.search).get('redirect_status');
|
|
141
|
+
// If just redirected from Payment provider, show the success screen or error screen based on the status
|
|
142
|
+
if (isJustRedirected && zonosCheckoutSessionId) {
|
|
143
|
+
if (!error) {
|
|
144
|
+
handleFetch.log('Payment intent is succeeded or in a good state to move forward, show success screen');
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
handleFetch.log('Payment intent failed, show status from error');
|
|
148
|
+
}
|
|
149
|
+
// Attempt to retrieve the checkout session
|
|
150
|
+
const json = await this.fetchCheckoutSession(zonosCheckoutSessionId);
|
|
151
|
+
this.confirmationId = ((_a = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _a === void 0 ? void 0 : _a.shortId) || null;
|
|
152
|
+
localization.storageStore.checkoutSessionId = zonosCheckoutSessionId;
|
|
153
|
+
cart.stripeStore.clientSecret = stripeClientSecret;
|
|
154
|
+
void this.setToFinishStep(status);
|
|
155
|
+
return { shouldAllowOrder: false };
|
|
156
|
+
}
|
|
157
|
+
if (!isCartDataAvailable) {
|
|
158
|
+
handleFetch.log('Cart data is not available, only check payment intent status, skip order.');
|
|
159
|
+
return { shouldAllowOrder: false };
|
|
160
|
+
}
|
|
161
|
+
handleFetch.log('Payment intent is not succeeded, proceed to order');
|
|
162
|
+
return { shouldAllowOrder: true };
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Listen to resize event to update the isMobile state
|
|
167
|
+
*/
|
|
168
|
+
resizeListener() {
|
|
169
|
+
this.isMobile = isCollectMobileTablet.isCollectMobile(this.mobile);
|
|
170
|
+
this.isTablet = isCollectMobileTablet.isCollectTablet(this.tablet);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
|
|
174
|
+
*/
|
|
175
|
+
async setToFinishStep(forcePaymentStatus) {
|
|
176
|
+
cart.stripeStore.stripe = window.Zonos.stripe;
|
|
177
|
+
cart.cartStore.step = 'finish';
|
|
178
|
+
this.storybookPaymentStatusOverride = forcePaymentStatus;
|
|
179
|
+
this.isOverlayLoading = false;
|
|
180
|
+
}
|
|
181
|
+
async initCollectCart() {
|
|
182
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
183
|
+
// Should not happen since we will throw error way earlier if cartData is not available
|
|
184
|
+
if (!window.Zonos.cartData) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
// change currency to the currency of the cart
|
|
188
|
+
const cartCurrency = (_b = (_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.items[0]) === null || _b === void 0 ? void 0 : _b.currencyCode;
|
|
189
|
+
if (cartCurrency) {
|
|
190
|
+
cart.cartStore.currency = cartCurrency;
|
|
191
|
+
}
|
|
192
|
+
const cartCheckoutSessionId = (_d = (_c = window.Zonos.cartData) === null || _c === void 0 ? void 0 : _c.references) === null || _d === void 0 ? void 0 : _d.checkoutSessionId;
|
|
193
|
+
const cartLandedCostId = (_f = (_e = window.Zonos.cartData) === null || _e === void 0 ? void 0 : _e.references) === null || _f === void 0 ? void 0 : _f.landedCostId;
|
|
194
|
+
if (!cartLandedCostId) {
|
|
195
|
+
cart.cartStoreUpdateToErrorState({
|
|
196
|
+
messages: [
|
|
197
|
+
translationStore.translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
|
|
198
|
+
organizationName: zonosStore.zonosStore.organizationName,
|
|
199
|
+
}),
|
|
200
|
+
],
|
|
201
|
+
title: translationStore.translate('Invalid session'),
|
|
202
|
+
});
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
// Override checkout session id for collect if we found one in the cart reference
|
|
206
|
+
if (cartCheckoutSessionId) {
|
|
207
|
+
handleFetch.log('Setting checkout session id from cart reference', 'info', cartCheckoutSessionId);
|
|
208
|
+
localization.storageStore.checkoutSessionId = cartCheckoutSessionId;
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
handleFetch.log('Clear checkout session id from storage so we start from a fresh session for the collect cart');
|
|
212
|
+
localization.storageStore.checkoutSessionId = null;
|
|
213
|
+
}
|
|
214
|
+
const { shouldAllowOrder } = await this.checkStripePaymentIntentStatus();
|
|
215
|
+
if (!shouldAllowOrder) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
try {
|
|
219
|
+
const { adjustments, cartItems } = buildCartItemsByTempCart.buildCartItemsByTempCart(window.Zonos.cartData);
|
|
220
|
+
await cart.cartStoreUpdateItems({
|
|
221
|
+
adjustments,
|
|
222
|
+
cartItems,
|
|
223
|
+
landedCostId: cartLandedCostId,
|
|
224
|
+
// 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
|
|
225
|
+
shouldInitSessionOnFailure: false,
|
|
226
|
+
});
|
|
227
|
+
// if checkoutSessionId is not available, request a new one, only if no checkout session id is found in cart references
|
|
228
|
+
if (!localization.storageStore.checkoutSessionId && !cartCheckoutSessionId) {
|
|
229
|
+
const success = await cart.stripeStoreInitCheckoutSession();
|
|
230
|
+
handleFetch.log(`stripeStoreInitCheckoutSession: ${success}`);
|
|
231
|
+
if (!success) {
|
|
232
|
+
throw new Error('Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential');
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
// 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
|
|
236
|
+
if ((!cart.cartStore.checkoutSession ||
|
|
237
|
+
((_g = cart.cartStore.checkoutSession) === null || _g === void 0 ? void 0 : _g.completedAt)) &&
|
|
238
|
+
cartCheckoutSessionId) {
|
|
239
|
+
// Attempt to retrieve the checkout session
|
|
240
|
+
const json = await this.fetchCheckoutSession(cartCheckoutSessionId);
|
|
241
|
+
// Some merchants use landed cost id as the confirmation id
|
|
242
|
+
this.confirmationId = ((_h = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _h === void 0 ? void 0 : _h.shortId) || null;
|
|
243
|
+
// If checkout session is already completed, set to finish step
|
|
244
|
+
if (!!(json === null || json === void 0 ? void 0 : json.checkoutSession.completedAt)) {
|
|
245
|
+
void this.setToFinishStep('succeeded');
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (json === null || json === void 0 ? void 0 : json.checkoutSession.clientSecret) {
|
|
249
|
+
const { status } = await cart.stripeStoreRetrievePayment({
|
|
250
|
+
clientSecret: json.checkoutSession.clientSecret,
|
|
251
|
+
});
|
|
252
|
+
// If payment intent is still processing or succeeded, set to finish step
|
|
253
|
+
if (status === 'processing' || status === 'succeeded') {
|
|
254
|
+
void this.setToFinishStep(status);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
void handleFetch.sendErrorLog({
|
|
259
|
+
endpoint: 'INVALID_COLLECT_CHECKOUT_SESSION',
|
|
260
|
+
errors: [
|
|
261
|
+
'Invalid checkout session, can not retrieve the checkout session after failing to update it',
|
|
262
|
+
],
|
|
263
|
+
metadata: {
|
|
264
|
+
cartCheckoutSessionId,
|
|
265
|
+
cartId: (_j = window.Zonos.cartData) === null || _j === void 0 ? void 0 : _j.id,
|
|
266
|
+
cartLandedCostId,
|
|
267
|
+
},
|
|
268
|
+
});
|
|
269
|
+
throw new Error('Invalid checkout session, can not retrieve the checkout session after failing to update it');
|
|
270
|
+
}
|
|
271
|
+
if (!cart.cartStore.checkoutSession) {
|
|
272
|
+
void handleFetch.sendErrorLog({
|
|
273
|
+
endpoint: 'FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION',
|
|
274
|
+
errors: [
|
|
275
|
+
'Could not update/create checkout session for this collect cart',
|
|
276
|
+
],
|
|
277
|
+
metadata: {
|
|
278
|
+
cartCheckoutSessionId: cartCheckoutSessionId || 'N/A',
|
|
279
|
+
cartId: (_k = window.Zonos.cartData) === null || _k === void 0 ? void 0 : _k.id,
|
|
280
|
+
cartLandedCostId: cartLandedCostId || 'N/A',
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
throw new Error('Could not update/create checkout session for this collect cart');
|
|
284
|
+
}
|
|
285
|
+
// const checkoutSessionId = storageStore.checkoutSessionId;
|
|
286
|
+
void cart.stripeStoreGetPaymentIntent();
|
|
287
|
+
const landedCost = (_l = cart.cartStore.checkoutSession) === null || _l === void 0 ? void 0 : _l.landedCost;
|
|
288
|
+
if (!landedCost) {
|
|
289
|
+
throw new Error('Landed cost could not be found in checkout session after creating/updating them');
|
|
290
|
+
}
|
|
291
|
+
await isCollectMobileTablet.collectStoreUpdateSelectedShippingOption(Object.assign(Object.assign({}, cart.cartStore.checkoutSession), { id: localization.storageStore.checkoutSessionId || '' }));
|
|
292
|
+
void isCollectMobileTablet.collectStoreInitShippingInfo({
|
|
293
|
+
landedCostId: landedCost.id,
|
|
294
|
+
});
|
|
295
|
+
void this.applyStripeTheme();
|
|
296
|
+
}
|
|
297
|
+
catch (err) {
|
|
298
|
+
handleFetch.logError(err);
|
|
299
|
+
cart.cartStoreUpdateToErrorState({
|
|
300
|
+
messages: [
|
|
301
|
+
translationStore.translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
|
|
302
|
+
organizationName: zonosStore.zonosStore.organizationName,
|
|
303
|
+
}),
|
|
304
|
+
],
|
|
305
|
+
title: translationStore.translate('Invalid session'),
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
this.isOverlayLoading = false;
|
|
309
|
+
}
|
|
310
|
+
toggleLanguageDialog() {
|
|
311
|
+
this.showLanguageDialogMobile = !this.showLanguageDialogMobile;
|
|
312
|
+
}
|
|
313
|
+
async handleStripePaymentContinue() {
|
|
314
|
+
var _a, _b, _c, _d;
|
|
315
|
+
// Attempt to get the value of the billing address element to validate the form
|
|
316
|
+
void ((_a = cart.stripeStore.stripeBillingAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
|
|
317
|
+
// If the email is not complete, scroll to the link authentication section
|
|
318
|
+
if (!((_b = cart.stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete)) {
|
|
319
|
+
// Scroll to the billing section
|
|
320
|
+
const linkAuthentication = document.querySelector('zonos-link-authentication');
|
|
321
|
+
linkAuthentication === null || linkAuthentication === void 0 ? void 0 : linkAuthentication.scrollIntoView({ behavior: 'smooth' });
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
if (!((_c = cart.stripeStore.stripeBillingAddressEventData) === null || _c === void 0 ? void 0 : _c.complete)) {
|
|
325
|
+
// Scroll to the billing section
|
|
326
|
+
const billingSection = document.querySelector('.zonos--billing-address');
|
|
327
|
+
billingSection === null || billingSection === void 0 ? void 0 : billingSection.scrollIntoView({ behavior: 'smooth' });
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
const shouldConfirmPayInUsd = cart.stripeStore.checkoutSettlementCurrency === 'USD';
|
|
331
|
+
// open the confirm dialog if the settlement currency is in USD, and if call this method again, proceed and confirm with Stripe.
|
|
332
|
+
if (shouldConfirmPayInUsd &&
|
|
333
|
+
cart.stripeStore.shouldRenderPayInUsdButton &&
|
|
334
|
+
!this.payInUsdConfirmDialogOpen) {
|
|
335
|
+
this.payInUsdConfirmDialogOpen = true;
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
// Close the dialog after the user confirms to proceed with the payment in USD
|
|
339
|
+
this.payInUsdConfirmDialogOpen = false;
|
|
340
|
+
// reset paypal error message
|
|
341
|
+
paypal.paypalStore.paypalErrorMessage = null;
|
|
342
|
+
// reset error state
|
|
343
|
+
cart.stripeStore.hasPaymentError = false;
|
|
344
|
+
this.submitLoading = true;
|
|
345
|
+
// reset inventory check message
|
|
346
|
+
cart.cartStore.inventoryCheckErrorMessage = null;
|
|
347
|
+
// Attempt to change settlement currency to USD
|
|
348
|
+
const baseCurrencyUpdateSuccess = await cart.stripeStoreUpdateCheckoutSessionBaseCurrency();
|
|
349
|
+
// Should not proceed to confirm payment if base currency update failed
|
|
350
|
+
if (!baseCurrencyUpdateSuccess) {
|
|
351
|
+
cart.stripeStore.hasPaymentError = true;
|
|
352
|
+
cart.stripeStore.customErrorMessage = translationStore.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.', {
|
|
353
|
+
currency: cart.stripeStore.checkoutSettlementCurrency,
|
|
354
|
+
});
|
|
355
|
+
this.submitLoading = false;
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
// Update the billing party id to the checkout session
|
|
359
|
+
await isCollectMobileTablet.collectStoreAsyncAddressUpdate();
|
|
360
|
+
try {
|
|
361
|
+
await cart.stripeStoreConfirmPayment({
|
|
362
|
+
noLandedCostCheck: true,
|
|
363
|
+
});
|
|
364
|
+
cart.cartStore.step = 'finish';
|
|
365
|
+
// Some merchants use landed cost id as the confirmation id
|
|
366
|
+
this.confirmationId =
|
|
367
|
+
isCollectMobileTablet.collectStore.landedCostShortId ||
|
|
368
|
+
((_d = cart.cartStore.selectedLandedCost) === null || _d === void 0 ? void 0 : _d.landedCostId) ||
|
|
369
|
+
null;
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
catch (err) {
|
|
373
|
+
handleFetch.logError(err);
|
|
374
|
+
cart.stripeStore.hasPaymentError = true;
|
|
375
|
+
}
|
|
376
|
+
this.submitLoading = false;
|
|
377
|
+
}
|
|
378
|
+
componentWillLoad() {
|
|
379
|
+
cart.stripeStore.stripe = window.Zonos.stripe;
|
|
380
|
+
// Set the step to payment
|
|
381
|
+
cart.cartStore.step = 'payment';
|
|
382
|
+
void this.initCollectCart();
|
|
383
|
+
this.resizeListener();
|
|
384
|
+
this.storeUnsubscribeList = [
|
|
385
|
+
cart.stripeStoreOnChange('clientSecret', () => {
|
|
386
|
+
void this.applyStripeTheme();
|
|
387
|
+
}),
|
|
388
|
+
localization.localizationStoreOnChange('selectedLocale', () => {
|
|
389
|
+
void this.applyStripeTheme();
|
|
390
|
+
}),
|
|
391
|
+
];
|
|
392
|
+
handleFetch.log(`mobile: ${this.isMobile}`);
|
|
393
|
+
}
|
|
394
|
+
// do clean up when component is unmounted
|
|
395
|
+
disconnectedCallback() {
|
|
396
|
+
// reset stripe store
|
|
397
|
+
cart.stripeStoreReset();
|
|
398
|
+
// reset cart store
|
|
399
|
+
cart.cartStoreReset();
|
|
400
|
+
// cleanup onChange listener
|
|
401
|
+
this.onChangeLocaleListener();
|
|
402
|
+
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
403
|
+
}
|
|
404
|
+
render() {
|
|
405
|
+
// Set client secret so that we can add this to @Watch listener
|
|
406
|
+
this.clientSecret = cart.stripeStore.clientSecret;
|
|
407
|
+
// 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`.
|
|
408
|
+
if (cart.stripeStore.stripeCustomerSessionClientSecret) {
|
|
409
|
+
// Set stripe customer session client secret so that we can add this to @Watch listener
|
|
410
|
+
this.stripeCustomerSessionClientSecret =
|
|
411
|
+
cart.stripeStore.stripeCustomerSessionClientSecret;
|
|
412
|
+
}
|
|
413
|
+
const baseCurrencySettlementInfo = this.getBaseCurrencySettlementInfo();
|
|
414
|
+
const { logoUrl, theme } = zonosStore.zonosStore.appearance;
|
|
415
|
+
const renderLogo = () => {
|
|
416
|
+
// add timestamp to logo url so browser won't cache it on the dashboard setting
|
|
417
|
+
const logo = `${logoUrl}?timestamp=${Date.now()}`;
|
|
418
|
+
return (index.h("div", { class: "zonos--logo" }, logo && (index.h("img", { alt: `${zonosStore.zonosStore.organizationName} logo`, src: logo }))));
|
|
419
|
+
};
|
|
420
|
+
const isTestMode = handleFetch.getIsTestMode();
|
|
421
|
+
const renderTopHeader = () => {
|
|
422
|
+
var _a;
|
|
423
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
424
|
+
const zonosQaUrl = urlParams.get('zonosQaUrl');
|
|
425
|
+
const zonosDebug = urlParams.get('zonosDebug');
|
|
426
|
+
const languageLabel = (_a = ILanguage.languages.find(x => x.code === localization.localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
427
|
+
return (index.h(index.Fragment, null, index.h("zonos-h-stack", { class: "zonos--header-wrapper", spacing: 16 }, index.h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (index.h("zonos-badge", { badgeColor: "orange", size: "small" }, translationStore.translate('Test mode'))), zonosDebug === '1' && (index.h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (index.h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl))), index.h("div", { class: "zonos--header-right" }, index.h("zonos-button", { backgroundColor: 'gray-0', class: "zonos--header-right-button", onClick: () => this.toggleLanguageDialog(), variant: "outline" }, languageLabel, index.h("zonos-icon", { "aria-label": "Language select", content: ChevronDownIcon, iconColor: "gray-1200" })), index.h("div", { class: classes.classes([
|
|
428
|
+
'zonos--collect-language-dialog',
|
|
429
|
+
this.showLanguageDialogMobile &&
|
|
430
|
+
'zonos--collect-language-dialog-open',
|
|
431
|
+
]) }, index.h("zonos-language-select", { handleOnClose: () => this.toggleLanguageDialog() })))), index.h("zonos-text", { class: "zonos--header-title", type: "header" }, translationStore.translate('Customs fees for your recent purchase from [companyName] are ready for payment', {
|
|
432
|
+
companyName: zonosStore.zonosStore.organizationName,
|
|
433
|
+
}))));
|
|
434
|
+
};
|
|
435
|
+
const renderContent = () => {
|
|
436
|
+
if (this.isOverlayLoading || cart.stripeStore.isFetchingSession) {
|
|
437
|
+
return null;
|
|
438
|
+
}
|
|
439
|
+
return (index.h("div", { class: 'zonos--content' }, cart.cartStore.step !== 'finish' && cart.cartStore.step !== 'error' && (index.h(index.Fragment, null, (this.isMobile || this.isTablet) && renderTopHeader(), index.h("div", { class: "zonos--left", "data-theme": theme }, !this.isMobile && !this.isTablet && renderTopHeader(), index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translationStore.translate('Billing info')), index.h("zonos-v-stack", { spacing: 16 }, index.h("zonos-link-authentication", { titleText: "" }), index.h("zonos-address", { titleText: "", type: "billing" })), index.h("zonos-collect-payment", { class: classes.classes(['zonos--collect-container']), continueLoading: this.submitLoading, onContinueClicked: async () => {
|
|
440
|
+
await this.handleStripePaymentContinue();
|
|
441
|
+
} })), index.h("div", { class: "zonos--right", "data-theme": theme }, index.h("zonos-collect-review", { mobile: this.isMobile, tablet: this.isTablet }), index.h("div", { class: "zonos--order-details-container" }, index.h("zonos-collect-order-details", { collapsed: this.collapseReview, mobile: this.isMobile, onCollapseClicked: () => {
|
|
442
|
+
this.collapseReview = !this.collapseReview;
|
|
443
|
+
} })), index.h("div", { class: "flex--wrapper" }, index.h("zonos-v-stack", { spacing: 16 }, index.h("zonos-collect-subtotal", null)), !this.isMobile && !this.isTablet && (index.h("zonos-collect-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet })))))), (cart.cartStore.step === 'finish' || cart.cartStore.step === 'error') && (index.h("div", { class: "zonos--done", "data-theme": theme }, index.h("div", { class: "zonos--header" }, renderLogo()), index.h("zonos-collect-finish", { confirmationId: this.confirmationId, overrideNotification: cart.cartStore.step === 'error' && !!cart.cartStore.error
|
|
444
|
+
? Object.assign(Object.assign({}, cart.cartStore.error), { type: 'error' }) : undefined, storybookForceStatus: this.storybookPaymentStatusOverride }))), (this.isMobile ||
|
|
445
|
+
this.isTablet ||
|
|
446
|
+
cart.cartStore.step === 'finish' ||
|
|
447
|
+
cart.cartStore.step === 'error') && (index.h("zonos-collect-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet }))));
|
|
448
|
+
};
|
|
449
|
+
return (index.h(index.Host, { class: classes.classes([
|
|
450
|
+
'zonos--collect zonos--elements',
|
|
451
|
+
this.isMobile && 'mobile',
|
|
452
|
+
this.isTablet && 'tablet',
|
|
453
|
+
]), "data-theme": theme }, renderContent(), baseCurrencySettlementInfo && (index.h("zonos-confirm-dialog", { class: "zonos--pay-in-usd-dialog", dialogCancelBtnText: translationStore.translate('Cancel'), dialogConfirmBtnText: translationStore.translate('Pay [orderTotal]', {
|
|
454
|
+
orderTotal: localization.currencyFormat({
|
|
455
|
+
amount: baseCurrencySettlementInfo.settlementAmount,
|
|
456
|
+
currency: 'USD',
|
|
457
|
+
}),
|
|
458
|
+
}), dialogIntent: "warn", dialogOpen: this.payInUsdConfirmDialogOpen, dialogSubtitle: translationStore.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: translationStore.translate('Pay in USD (United States Dollar)?'), dialogType: "confirm", dialogWidth: 480, onCancelClicked: () => {
|
|
459
|
+
this.payInUsdConfirmDialogOpen = false;
|
|
460
|
+
},
|
|
461
|
+
// Mark user selected confirm to continue with payment
|
|
462
|
+
onConfirmClicked: () => this.handleStripePaymentContinue() })), index.h("zonos-loading-overlay", { open: this.isOverlayLoading })));
|
|
463
|
+
}
|
|
464
|
+
static get assetsDirs() { return ["assets"]; }
|
|
465
|
+
};
|
|
466
|
+
ZonosCollect.style = ZonosCollectStyle0;
|
|
467
|
+
|
|
468
|
+
exports.zonos_collect = ZonosCollect;
|
|
@@ -31,7 +31,7 @@ const ZonosComponent = class {
|
|
|
31
31
|
return format(this.first, this.middle, this.last);
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return index.h("div", { key: '
|
|
34
|
+
return index.h("div", { key: '757e42d63a24b18216b900937089c2566dd44a93' }, "Hello, World! I'm ", this.getText());
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
ZonosComponent.style = ZonosComponentStyle0;
|