@zonos/elements 1.3.218 → 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-c54d05ce.js → cart-9a2b32e4.js} +90 -47
- package/dist/cjs/cleanHtmlMarkdown-577d0a77.js +999 -0
- package/dist/cjs/index.cjs.js +19 -9
- 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-d36b5dd1.js → paypal-e80871d0.js} +12 -8
- package/dist/cjs/placeTestOrder-8222fe95.js +93 -0
- package/dist/cjs/{localization-ab7e1902.js → translationStore-20a6d8bf.js} +963 -734
- package/dist/cjs/zonos-address_11.cjs.entry.js +102 -72
- 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} +73 -1292
- package/dist/cjs/zonos-checkout.cjs.entry.js +25 -48
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +92 -0
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +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 +84 -28
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +11 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +15 -5
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +34 -33
- package/dist/cjs/zonos-hello.cjs.entry.js +8 -7
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +8 -5
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-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/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-bb0ee971.js → cart-acf4ebf5.js} +68 -27
- package/dist/esm/cleanHtmlMarkdown-b5b18743.js +997 -0
- package/dist/esm/index.js +19 -9
- 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-bd4520eb.js → paypal-2fa930eb.js} +7 -4
- package/dist/esm/placeTestOrder-d1ad9cf6.js +90 -0
- package/dist/esm/{localization-d8326254.js → translationStore-c9743292.js} +963 -718
- package/dist/esm/zonos-address_11.entry.js +71 -41
- 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} +23 -1240
- package/dist/esm/zonos-checkout.entry.js +6 -29
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +86 -0
- package/dist/esm/zonos-collect-finish_6.entry.js +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 +84 -28
- package/dist/esm/zonos-country-flag.entry.js +2 -1
- package/dist/esm/zonos-country-select_4.entry.js +11 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +15 -5
- package/dist/esm/zonos-hello-dialog.entry.js +6 -5
- package/dist/esm/zonos-hello.entry.js +2 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +6 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +9 -6
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/buildCartItemsByTempCart-c4488f73.js +1 -0
- package/dist/esm-es5/cart-acf4ebf5.js +1 -0
- package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/isCollectMobileTablet-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/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +1 -0
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -0
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -0
- package/dist/esm-es5/zonos-collect.entry.js +1 -0
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -0
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +470 -3
- 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/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-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-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-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-bb0ee971.js +0 -1
- package/dist/esm-es5/localization-d8326254.js +0 -1
- package/dist/esm-es5/paypal-bd4520eb.js +0 -17
- package/dist/esm-es5/zonos-banner.entry.js +0 -1
- package/dist/esm-es5/zonos-card.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +0 -1
- package/dist/zonos-elements/p-043f57e8.system.entry.js +0 -1
- package/dist/zonos-elements/p-0631d2b9.js +0 -1
- package/dist/zonos-elements/p-0a6ac265.system.js +0 -1
- package/dist/zonos-elements/p-0f041dc5.system.entry.js +0 -1
- package/dist/zonos-elements/p-1432a217.system.entry.js +0 -1
- package/dist/zonos-elements/p-1b51b738.system.entry.js +0 -1
- package/dist/zonos-elements/p-3a1513ae.system.entry.js +0 -1
- package/dist/zonos-elements/p-3b8d11dd.entry.js +0 -1
- package/dist/zonos-elements/p-4333afcb.entry.js +0 -1
- package/dist/zonos-elements/p-4d0d89da.system.entry.js +0 -1
- package/dist/zonos-elements/p-5dd9cb44.system.entry.js +0 -1
- package/dist/zonos-elements/p-605a21ac.entry.js +0 -1
- package/dist/zonos-elements/p-674981ad.system.js +0 -1
- package/dist/zonos-elements/p-6d090b53.entry.js +0 -1
- package/dist/zonos-elements/p-73c8c551.system.entry.js +0 -1
- package/dist/zonos-elements/p-795d223d.entry.js +0 -1
- package/dist/zonos-elements/p-8218ff62.system.entry.js +0 -1
- package/dist/zonos-elements/p-82f80c8a.entry.js +0 -1
- package/dist/zonos-elements/p-88f7256d.js +0 -1
- package/dist/zonos-elements/p-8b083884.entry.js +0 -1
- package/dist/zonos-elements/p-a449940d.entry.js +0 -1
- package/dist/zonos-elements/p-a5a4ad2f.entry.js +0 -1
- package/dist/zonos-elements/p-a5d45585.system.entry.js +0 -1
- package/dist/zonos-elements/p-a751e819.system.entry.js +0 -1
- package/dist/zonos-elements/p-ad556be6.entry.js +0 -1
- package/dist/zonos-elements/p-b4792af0.entry.js +0 -1
- package/dist/zonos-elements/p-b9ff6458.entry.js +0 -1
- package/dist/zonos-elements/p-d3dbae8c.system.js +0 -1
- package/dist/zonos-elements/p-d55aec11.system.entry.js +0 -1
- package/dist/zonos-elements/p-ebb9b902.system.js +0 -17
- package/dist/zonos-elements/p-ef1ce617.system.entry.js +0 -1
- package/dist/zonos-elements/p-ef75da6f.js +0 -17
- package/dist/zonos-elements/p-f3dbe934.entry.js +0 -1
- package/dist/zonos-elements/p-f741407e.system.entry.js +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Map the items from tempCart like how we do it in dgs
|
|
5
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L393
|
|
6
|
+
*/
|
|
7
|
+
const buildCartItemsByTempCart = (tempCartData) => {
|
|
8
|
+
const tempCartItems = tempCartData.items.map(item => ({
|
|
9
|
+
amount: item.amount,
|
|
10
|
+
attributes: item.attributes || [],
|
|
11
|
+
countryOfOrigin: item.countryOfOrigin || undefined,
|
|
12
|
+
currencyCode: item.currencyCode,
|
|
13
|
+
description: item.description || '',
|
|
14
|
+
imageUrl: item.imageUrl || '',
|
|
15
|
+
itemType: item.itemType || 'PHYSICAL_GOOD',
|
|
16
|
+
measurements: item.measurements || [],
|
|
17
|
+
name: item.name || item.description || '',
|
|
18
|
+
productId: item.productId || '',
|
|
19
|
+
quantity: item.quantity || 0,
|
|
20
|
+
sku: item.sku || '',
|
|
21
|
+
})) || [];
|
|
22
|
+
return {
|
|
23
|
+
adjustments: tempCartData.adjustments,
|
|
24
|
+
cartItems: tempCartItems,
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.buildCartItemsByTempCart = buildCartItemsByTempCart;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
4
|
-
const localization = require('./localization-
|
|
4
|
+
const localization = require('./localization-b12edb2a.js');
|
|
5
|
+
const translationStore = require('./translationStore-20a6d8bf.js');
|
|
5
6
|
const handleFetch = require('./handleFetch-45f35cac.js');
|
|
6
7
|
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
7
8
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
@@ -532,7 +533,7 @@ const validateCheckoutSession = async () => {
|
|
|
532
533
|
metadata: { allLogs: handleFetch.allLogs },
|
|
533
534
|
});
|
|
534
535
|
return {
|
|
535
|
-
errorMessage:
|
|
536
|
+
errorMessage: translationStore.translate('Unable to retrieve the checkout session at the moment. Please try again or contact our support team.'),
|
|
536
537
|
valid: false,
|
|
537
538
|
};
|
|
538
539
|
}
|
|
@@ -545,7 +546,7 @@ const validateCheckoutSession = async () => {
|
|
|
545
546
|
metadata: { allLogs: handleFetch.allLogs },
|
|
546
547
|
});
|
|
547
548
|
return {
|
|
548
|
-
errorMessage:
|
|
549
|
+
errorMessage: translationStore.translate('No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.'),
|
|
549
550
|
valid: false,
|
|
550
551
|
};
|
|
551
552
|
}
|
|
@@ -755,15 +756,15 @@ const initStripeElements = async (props) => {
|
|
|
755
756
|
JSON.stringify(stripeStore.stripeElementsOptions);
|
|
756
757
|
if (!stripeStore.stripeElements ||
|
|
757
758
|
!stripeStore.stripeElementsForBillingAddress) {
|
|
759
|
+
// init stripe elements for billing address
|
|
760
|
+
stripeStore.stripeElementsForBillingAddress =
|
|
761
|
+
(_a = stripeStore.stripe) === null || _a === void 0 ? void 0 : _a.elements(stripeOptions);
|
|
762
|
+
handleFetch.log('Stripe elements for billing address initialized');
|
|
758
763
|
// init stripe elements if it doesn't exist
|
|
759
|
-
stripeStore.stripeElements = (
|
|
764
|
+
stripeStore.stripeElements = (_b = stripeStore.stripe) === null || _b === void 0 ? void 0 : _b.elements(stripeOptions);
|
|
760
765
|
// save stripe elements options for later comparison
|
|
761
766
|
stripeStore.stripeElementsOptions = stripeOptions;
|
|
762
767
|
handleFetch.log('Stripe elements initialized');
|
|
763
|
-
// init stripe elements for billing address
|
|
764
|
-
stripeStore.stripeElementsForBillingAddress =
|
|
765
|
-
(_b = stripeStore.stripe) === null || _b === void 0 ? void 0 : _b.elements(stripeOptions);
|
|
766
|
-
handleFetch.log('Stripe elements for billing address initialized');
|
|
767
768
|
return;
|
|
768
769
|
}
|
|
769
770
|
if (!isSameOptions) {
|
|
@@ -809,7 +810,7 @@ const checkIsAddressOutdatedForAsyncAddressUpdate = () => {
|
|
|
809
810
|
isTaxIdDirty ||
|
|
810
811
|
isCompanyNameDirty);
|
|
811
812
|
};
|
|
812
|
-
const
|
|
813
|
+
const stripeStoreBuildAddressForPartyCreate = ({ address, firstName, lastName, name, phone, }) => {
|
|
813
814
|
const { firstName: _firstName, lastName: _lastName } = extractName({
|
|
814
815
|
firstName,
|
|
815
816
|
lastName,
|
|
@@ -891,7 +892,7 @@ const stripeStoreAsyncAddressUpdate = async () => {
|
|
|
891
892
|
partiesCreated: false,
|
|
892
893
|
};
|
|
893
894
|
}
|
|
894
|
-
const address =
|
|
895
|
+
const address = stripeStoreBuildAddressForPartyCreate({
|
|
895
896
|
address: stripeStore.stripeAddressEventData.value.address,
|
|
896
897
|
firstName: stripeStore.stripeAddressEventData.value.firstName,
|
|
897
898
|
lastName: stripeStore.stripeAddressEventData.value.lastName,
|
|
@@ -900,7 +901,7 @@ const stripeStoreAsyncAddressUpdate = async () => {
|
|
|
900
901
|
});
|
|
901
902
|
const billingAddress = stripeStore.stripeShippingSameAsBilling
|
|
902
903
|
? address
|
|
903
|
-
:
|
|
904
|
+
: stripeStoreBuildAddressForPartyCreate({
|
|
904
905
|
address: stripeStore.stripeBillingAddressEventData.value.address,
|
|
905
906
|
firstName: stripeStore.stripeBillingAddressEventData.value.firstName,
|
|
906
907
|
lastName: stripeStore.stripeBillingAddressEventData.value.lastName,
|
|
@@ -1210,7 +1211,11 @@ const stripeStoreApplyPromoCode = async () => {
|
|
|
1210
1211
|
if (!cheapestServiceLevel || !matchLandedCost) {
|
|
1211
1212
|
return;
|
|
1212
1213
|
}
|
|
1213
|
-
await cartStoreUpdateSelectedShippingOption(
|
|
1214
|
+
await cartStoreUpdateSelectedShippingOption({
|
|
1215
|
+
applySubtotalsOnly: false,
|
|
1216
|
+
landedCostId: matchLandedCost.landedCostId,
|
|
1217
|
+
selectedShippingOption: cheapestServiceLevel,
|
|
1218
|
+
});
|
|
1214
1219
|
};
|
|
1215
1220
|
const stripeStoreResetPromoCode = () => {
|
|
1216
1221
|
cartStore.promoCode = '';
|
|
@@ -1230,6 +1235,7 @@ const stripeStoreRemovePromoCode = async () => {
|
|
|
1230
1235
|
const stripeStoreMessageBasedOnStatus = (status) => {
|
|
1231
1236
|
let messages = [];
|
|
1232
1237
|
let isError = true;
|
|
1238
|
+
const isCollect = window.Zonos.isCollect;
|
|
1233
1239
|
// Inspect the PaymentIntent `status` to indicate the status of the payment
|
|
1234
1240
|
// to your customer.
|
|
1235
1241
|
//
|
|
@@ -1240,35 +1246,47 @@ const stripeStoreMessageBasedOnStatus = (status) => {
|
|
|
1240
1246
|
switch (status) {
|
|
1241
1247
|
case 'succeeded': {
|
|
1242
1248
|
messages = [
|
|
1243
|
-
|
|
1249
|
+
translationStore.translate('Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.'),
|
|
1244
1250
|
'',
|
|
1245
|
-
|
|
1251
|
+
translationStore.translate("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time."),
|
|
1246
1252
|
];
|
|
1253
|
+
if (isCollect) {
|
|
1254
|
+
messages = [
|
|
1255
|
+
translationStore.translate('Thank you for submitting your payment. We appreciate your prompt attention.'),
|
|
1256
|
+
'',
|
|
1257
|
+
translationStore.translate('A confirmation email with your payment details has been sent for your records. If you have any questions or need support, our team is here to help.'),
|
|
1258
|
+
];
|
|
1259
|
+
}
|
|
1247
1260
|
isError = false;
|
|
1248
1261
|
break;
|
|
1249
1262
|
}
|
|
1250
1263
|
case 'requires_capture':
|
|
1251
1264
|
case 'processing': {
|
|
1252
1265
|
messages = [
|
|
1253
|
-
|
|
1266
|
+
translationStore.translate("Payment processing. We'll update you when payment is received."),
|
|
1254
1267
|
];
|
|
1255
1268
|
isError = false;
|
|
1256
1269
|
break;
|
|
1257
1270
|
}
|
|
1258
1271
|
case 'requires_payment_method': {
|
|
1259
1272
|
messages = [
|
|
1260
|
-
|
|
1273
|
+
translationStore.translate('Payment failed. Please try another payment method.'),
|
|
1261
1274
|
];
|
|
1275
|
+
if (isCollect) {
|
|
1276
|
+
messages = [
|
|
1277
|
+
translationStore.translate('Payment failed. Please reload the page and try another payment method.'),
|
|
1278
|
+
];
|
|
1279
|
+
}
|
|
1262
1280
|
break;
|
|
1263
1281
|
}
|
|
1264
1282
|
case 'requires_action': {
|
|
1265
1283
|
isError = false;
|
|
1266
1284
|
messages = [
|
|
1267
|
-
|
|
1285
|
+
translationStore.translate('Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.'),
|
|
1268
1286
|
];
|
|
1269
1287
|
}
|
|
1270
1288
|
default: {
|
|
1271
|
-
messages = [
|
|
1289
|
+
messages = [translationStore.translate('Something went wrong.')];
|
|
1272
1290
|
break;
|
|
1273
1291
|
}
|
|
1274
1292
|
}
|
|
@@ -1300,7 +1318,7 @@ const stripeStoreHandleInventoryCheck = async () => {
|
|
|
1300
1318
|
}
|
|
1301
1319
|
// Proceed if the item is available
|
|
1302
1320
|
if (!json.available || json.status === 204) {
|
|
1303
|
-
return
|
|
1321
|
+
return translationStore.translate("The item you're looking for is currently unavailable in our inventory. Please check back later or contact support for assistance with availability.");
|
|
1304
1322
|
}
|
|
1305
1323
|
if (json.available || json.status === 200) {
|
|
1306
1324
|
stripeStore.shouldInventoryRefund = true;
|
|
@@ -1358,7 +1376,7 @@ const stripeStoreRetrievePayment = async ({ clientSecret: _clientSecret, storybo
|
|
|
1358
1376
|
const clientSecret = _clientSecret || stripeStore.clientSecret;
|
|
1359
1377
|
if (!stripeStore.stripe || !clientSecret) {
|
|
1360
1378
|
handleFetch.logError('Failed to retrieve payment intent. Stripe is not initialized');
|
|
1361
|
-
return { error: true, message: [
|
|
1379
|
+
return { error: true, message: [translationStore.translate('Something went wrong.')] };
|
|
1362
1380
|
}
|
|
1363
1381
|
const { paymentIntent } = await stripeStore.stripe.retrievePaymentIntent(clientSecret);
|
|
1364
1382
|
const status = paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status;
|
|
@@ -1371,14 +1389,15 @@ const stripeStoreRetrievePayment = async ({ clientSecret: _clientSecret, storybo
|
|
|
1371
1389
|
status,
|
|
1372
1390
|
};
|
|
1373
1391
|
};
|
|
1374
|
-
const stripeStoreConfirmPayment = async () => {
|
|
1392
|
+
const stripeStoreConfirmPayment = async (props) => {
|
|
1375
1393
|
var _a, _b;
|
|
1376
1394
|
const stripePaymentReady = !!((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
1377
1395
|
const stripeElements = stripeStore.stripeElements;
|
|
1378
1396
|
const stripe = stripeStore.stripe;
|
|
1379
1397
|
const stripeClientSecret = stripeStore.clientSecret;
|
|
1380
1398
|
stripeStore.customErrorMessage = null;
|
|
1381
|
-
if (!((_b = cartStore.selectedLandedCost) === null || _b === void 0 ? void 0 : _b.landedCost.id)
|
|
1399
|
+
if (!((_b = cartStore.selectedLandedCost) === null || _b === void 0 ? void 0 : _b.landedCost.id) &&
|
|
1400
|
+
!(props === null || props === void 0 ? void 0 : props.noLandedCostCheck)) {
|
|
1382
1401
|
throw new Error('Attempted to confirm the payment when no landed cost is found in store');
|
|
1383
1402
|
}
|
|
1384
1403
|
// Check if the checkout session is valid before proceeding
|
|
@@ -1409,7 +1428,7 @@ const stripeStoreConfirmPayment = async () => {
|
|
|
1409
1428
|
});
|
|
1410
1429
|
handleFetch.log('Payment intent confirmed', 'info', { error, paymentIntent });
|
|
1411
1430
|
if ((paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status) === 'requires_action') {
|
|
1412
|
-
throw new Error(
|
|
1431
|
+
throw new Error(translationStore.translate('Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.'));
|
|
1413
1432
|
}
|
|
1414
1433
|
if (error) {
|
|
1415
1434
|
if (error.type === 'card_error' || error.type === 'validation_error') {
|
|
@@ -1426,7 +1445,7 @@ const stripeStoreConfirmPayment = async () => {
|
|
|
1426
1445
|
}
|
|
1427
1446
|
if (paymentIntent.status === 'requires_payment_method') {
|
|
1428
1447
|
// Failed to confirm payment, allows user to try another payment method
|
|
1429
|
-
throw new Error(
|
|
1448
|
+
throw new Error(translationStore.translate('Payment failed. Please try another payment method.'));
|
|
1430
1449
|
}
|
|
1431
1450
|
}
|
|
1432
1451
|
};
|
|
@@ -1439,6 +1458,7 @@ const getCheckoutSessionBody = () => {
|
|
|
1439
1458
|
cartId: window.Zonos.cartId,
|
|
1440
1459
|
currency: ((_a = cartStore.items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode) || '',
|
|
1441
1460
|
customerAuthenticationToken: cartStore.customerAuthenticationToken || undefined,
|
|
1461
|
+
isCollect: window.Zonos.isCollect,
|
|
1442
1462
|
itemsAmount: total,
|
|
1443
1463
|
metadata: [
|
|
1444
1464
|
{
|
|
@@ -1466,9 +1486,9 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
1466
1486
|
});
|
|
1467
1487
|
cartStoreUpdateToErrorState({
|
|
1468
1488
|
messages: [
|
|
1469
|
-
|
|
1489
|
+
translationStore.translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists"),
|
|
1470
1490
|
],
|
|
1471
|
-
title:
|
|
1491
|
+
title: translationStore.translate('Error creating Checkout'),
|
|
1472
1492
|
});
|
|
1473
1493
|
return;
|
|
1474
1494
|
}
|
|
@@ -1494,9 +1514,9 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
1494
1514
|
});
|
|
1495
1515
|
cartStoreUpdateToErrorState({
|
|
1496
1516
|
messages: [
|
|
1497
|
-
|
|
1517
|
+
translationStore.translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists"),
|
|
1498
1518
|
],
|
|
1499
|
-
title:
|
|
1519
|
+
title: translationStore.translate('Error creating Checkout'),
|
|
1500
1520
|
});
|
|
1501
1521
|
return;
|
|
1502
1522
|
}
|
|
@@ -1800,12 +1820,12 @@ const { onChange: cartStoreOnChange, reset, state: cartStore, } = zonosStore.cre
|
|
|
1800
1820
|
const getTransitUnit = (type) => {
|
|
1801
1821
|
switch (type) {
|
|
1802
1822
|
case 'DAYS':
|
|
1803
|
-
return
|
|
1823
|
+
return translationStore.translate('days');
|
|
1804
1824
|
case 'WEEKS':
|
|
1805
|
-
return
|
|
1825
|
+
return translationStore.translate('weeks');
|
|
1806
1826
|
case 'BUSINESS_DAYS':
|
|
1807
1827
|
default:
|
|
1808
|
-
return
|
|
1828
|
+
return translationStore.translate('business days');
|
|
1809
1829
|
}
|
|
1810
1830
|
};
|
|
1811
1831
|
/**
|
|
@@ -1971,9 +1991,9 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
1971
1991
|
if (!success) {
|
|
1972
1992
|
cartStoreUpdateToErrorState({
|
|
1973
1993
|
messages: [
|
|
1974
|
-
|
|
1994
|
+
translationStore.translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists"),
|
|
1975
1995
|
],
|
|
1976
|
-
title:
|
|
1996
|
+
title: translationStore.translate('Error creating Checkout'),
|
|
1977
1997
|
});
|
|
1978
1998
|
return false;
|
|
1979
1999
|
}
|
|
@@ -2010,8 +2030,12 @@ const cartStoreGetMethod = (landedCost) => {
|
|
|
2010
2030
|
}
|
|
2011
2031
|
return landedCost.method;
|
|
2012
2032
|
};
|
|
2013
|
-
const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption,
|
|
2033
|
+
const cartStoreUpdateSelectedShippingOption = async ({ applySubtotalsOnly, landedCostId, selectedShippingOption, }) => {
|
|
2014
2034
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
2035
|
+
handleFetch.log('Updating selected shipping option', 'info', {
|
|
2036
|
+
landedCostId,
|
|
2037
|
+
selectedShippingOption,
|
|
2038
|
+
});
|
|
2015
2039
|
cartStore.selectedShippingOption = selectedShippingOption;
|
|
2016
2040
|
// update shipping transit info
|
|
2017
2041
|
const transitData = cartStoreGetShippingTransitInfo(cartStore.selectedShippingOption);
|
|
@@ -2046,16 +2070,33 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
2046
2070
|
const isAboveDeminimis = !!((_e = (_d = selectedLandedCost === null || selectedLandedCost === void 0 ? void 0 : selectedLandedCost.landedCost) === null || _d === void 0 ? void 0 : _d.deMinimis) === null || _e === void 0 ? void 0 : _e.find(item => ['DUTY', 'TAX'].includes(item.type) && item.threshold === 'ABOVE'));
|
|
2047
2071
|
cartStore.isSelectedShippingAboveDeminimis = isAboveDeminimis;
|
|
2048
2072
|
cartStore.isSelectedShippingGuarantee = isGuarantee;
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2073
|
+
let updateCalculateStatus = false;
|
|
2074
|
+
/**
|
|
2075
|
+
* For collect, we are trying to mimic the behavior that checkout is currently doing, where there is already a checkout session, we already updated with the landed cost.
|
|
2076
|
+
* But we need to call this function so that we can use all of the information that already in place in cartStore, so to avoid latency issue, we only apply subtotals here.
|
|
2077
|
+
*/
|
|
2078
|
+
if (applySubtotalsOnly) {
|
|
2079
|
+
const subtotals = selectedLandedCost.subtotals;
|
|
2080
|
+
cartStoreApplySubtotals({
|
|
2081
|
+
dutiesTaxesFeesEstimate,
|
|
2082
|
+
method: cartStore.landedCostMethod,
|
|
2083
|
+
subtotals,
|
|
2084
|
+
});
|
|
2085
|
+
handleFetch.log('Exchange rate updated for cart items (landed cost subtotal)', 'info', cartStore.exchangeRate);
|
|
2086
|
+
updateCalculateStatus = true;
|
|
2087
|
+
}
|
|
2088
|
+
else {
|
|
2089
|
+
// update session with selected landed cost
|
|
2090
|
+
updateCalculateStatus = await cartStoreReCalculateTotal({
|
|
2091
|
+
adjustmentsAmount: cartStore.adjustmentTotal,
|
|
2092
|
+
billToPartyId: stripeStore.partyBillingId,
|
|
2093
|
+
cartId: window.Zonos.cartId,
|
|
2094
|
+
dutiesTaxesFeesEstimate: dutiesTaxesFeesEstimate,
|
|
2095
|
+
landedCostId: (_f = selectedLandedCost.landedCost) === null || _f === void 0 ? void 0 : _f.id,
|
|
2096
|
+
shipToPartyId: stripeStore.partyShippingId,
|
|
2097
|
+
varianceTestInput: localization.storageStore.enabledVariantTestKeys || [],
|
|
2098
|
+
});
|
|
2099
|
+
}
|
|
2059
2100
|
// update conditionally render pay in USD button
|
|
2060
2101
|
const firstItem = (_g = cartStore.items.find(Boolean)) === null || _g === void 0 ? void 0 : _g.currencyCode;
|
|
2061
2102
|
// Stripe address event data should be available at this point
|
|
@@ -2097,7 +2138,7 @@ const cartStoreResetCartItems = () => {
|
|
|
2097
2138
|
cartStore.items = cartStore.items.map(item => (Object.assign(Object.assign({}, item), { isRestricted: false })));
|
|
2098
2139
|
cartStore.restrictedItems = [];
|
|
2099
2140
|
};
|
|
2100
|
-
const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
2141
|
+
const cartStoreUpdateItems = async ({ adjustments, cartItems, landedCostId, shouldInitSessionOnFailure = true, }) => {
|
|
2101
2142
|
var _a;
|
|
2102
2143
|
// Update adjustments and items
|
|
2103
2144
|
cartStore.adjustments = adjustments;
|
|
@@ -2121,9 +2162,9 @@ const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
|
2121
2162
|
currency: currency,
|
|
2122
2163
|
dutiesTaxesFeesEstimate: 0,
|
|
2123
2164
|
itemsAmount: total,
|
|
2165
|
+
landedCostId,
|
|
2124
2166
|
shipToPartyId: stripeStore.partyShippingId,
|
|
2125
|
-
|
|
2126
|
-
shouldInitSessionOnFailure: true,
|
|
2167
|
+
shouldInitSessionOnFailure,
|
|
2127
2168
|
varianceTestInput: localization.storageStore.enabledVariantTestKeys || [],
|
|
2128
2169
|
});
|
|
2129
2170
|
stripeStore.isFetchingSession = false;
|
|
@@ -2198,6 +2239,7 @@ exports.sortServiceLevelOptionsByAmount = sortServiceLevelOptionsByAmount;
|
|
|
2198
2239
|
exports.stripeStore = stripeStore;
|
|
2199
2240
|
exports.stripeStoreApplyPromoCode = stripeStoreApplyPromoCode;
|
|
2200
2241
|
exports.stripeStoreAsyncAddressUpdate = stripeStoreAsyncAddressUpdate;
|
|
2242
|
+
exports.stripeStoreBuildAddressForPartyCreate = stripeStoreBuildAddressForPartyCreate;
|
|
2201
2243
|
exports.stripeStoreCleanupDomesticShippingSession = stripeStoreCleanupDomesticShippingSession;
|
|
2202
2244
|
exports.stripeStoreConfirmPayment = stripeStoreConfirmPayment;
|
|
2203
2245
|
exports.stripeStoreGetDomesticShippingSession = stripeStoreGetDomesticShippingSession;
|
|
@@ -2206,6 +2248,7 @@ exports.stripeStoreHandleInventoryCheck = stripeStoreHandleInventoryCheck;
|
|
|
2206
2248
|
exports.stripeStoreHandleInventoryRefund = stripeStoreHandleInventoryRefund;
|
|
2207
2249
|
exports.stripeStoreInitCheckoutSession = stripeStoreInitCheckoutSession;
|
|
2208
2250
|
exports.stripeStoreMessageBasedOnStatus = stripeStoreMessageBasedOnStatus;
|
|
2251
|
+
exports.stripeStoreOnChange = stripeStoreOnChange;
|
|
2209
2252
|
exports.stripeStorePrefetchLandedCost = stripeStorePrefetchLandedCost;
|
|
2210
2253
|
exports.stripeStoreRemovePromoCode = stripeStoreRemovePromoCode;
|
|
2211
2254
|
exports.stripeStoreReset = stripeStoreReset;
|