@zonos/elements 1.3.142 → 1.3.144
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/{CheckoutConfig-eaaf62a1.js → CheckoutConfig-d25d548d.js} +13 -3
- package/dist/cjs/TaxId-4632639d.js +29 -0
- package/dist/cjs/{cart-199b0751.js → cart-2398abd4.js} +547 -42
- package/dist/cjs/{createCustomEvent-3e982e57.js → createCustomEvent-7b6fad95.js} +0 -3
- package/dist/cjs/{getBorderRadius-f97c99ad.js → getBorderRadius-7d0772bf.js} +1 -1
- package/dist/cjs/{handleFetch-864d3c53.js → handleFetch-3673a0c2.js} +30 -1
- package/dist/cjs/{index-b678ce0c.js → index-2f90486e.js} +209 -157
- package/dist/cjs/index.cjs.js +15 -11
- package/dist/cjs/{isDarkColor-434d71dd.js → isDarkColor-2acf30d1.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{paypal-4f1ee604.js → paypal-7ed9dfb7.js} +4 -4
- package/dist/cjs/{zonos-address_7.cjs.entry.js → zonos-address_8.cjs.entry.js} +143 -10
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +151 -32
- package/dist/cjs/zonos-checkout.cjs.entry.js +36 -16
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +8 -8
- package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
- package/dist/cjs/zonos-elements.cjs.js +3 -3
- package/dist/cjs/{zonos-notification_3.cjs.entry.js → zonos-empty-state-payment_4.cjs.entry.js} +87 -9
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +10 -10
- package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -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-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
- package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
- package/dist/cjs/{zonosStore-8971eb65.js → zonosStore-46809186.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +24 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +34 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +109 -18
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateDarkIcon.svg +22 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateLightIcon.svg +22 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.css +51 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +90 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +62 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +32 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +6 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +18 -2
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +30 -0
- package/dist/collection/components/common/zonos-card/zonos-card.js +20 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +14 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +4 -0
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +4 -0
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +22 -0
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +4 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -0
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -0
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +26 -0
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -0
- package/dist/collection/components/common/zonos-input/zonos-input.js +12 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -0
- package/dist/collection/components/common/zonos-link/zonos-link.js +8 -0
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -0
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +6 -0
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +4 -0
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +11 -1
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +162 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +264 -0
- package/dist/collection/components/common/zonos-text/zonos-text.js +8 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +6 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +6 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +4 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +12 -4
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +7 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +7 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +9 -3
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +17 -5
- package/dist/collection/components/main/zonos-controller.js +7 -3
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +3 -0
- package/dist/collection/components/store/checkout/stripe.js +121 -40
- package/dist/collection/components/store/translationStore/strings.arabic.js +21 -0
- package/dist/collection/components/store/translationStore/strings.base.js +21 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +21 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +21 -0
- package/dist/collection/components/store/translationStore/strings.french.js +21 -0
- package/dist/collection/components/store/translationStore/strings.german.js +21 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +21 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +21 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +21 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +21 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +7 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +84 -3
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -1
- package/dist/collection/components/utils/api/getCheckoutSession.js +1 -1
- package/dist/collection/components/utils/api/placeTestOrder.js +40 -0
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
- package/dist/collection/components/utils/checkout/getIsStagingMode.js +1 -0
- package/dist/collection/components/utils/checkout/getIsTestMode.js +5 -1
- package/dist/collection/components/utils/handleFetch.js +22 -1
- package/dist/collection/components/utils/validateEmailValue.js +4 -0
- package/dist/collection/scripts/_getTempCartById.js +2 -2
- package/dist/collection/scripts/_getWithTestPublicCredential.js +5 -2
- package/dist/collection/scripts/cart/_getIsValidCartId.js +11 -0
- package/dist/collection/types/checkout/TaxId.js +24 -0
- package/dist/collection/types/checkout/api/PlaceTestOrder.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +64 -0
- package/dist/collection/types/index.js +2 -0
- package/dist/esm/{CheckoutConfig-262008fe.js → CheckoutConfig-573bd959.js} +13 -3
- package/dist/esm/TaxId-915ef042.js +26 -0
- package/dist/esm/{cart-cf87ec6f.js → cart-3427ee25.js} +547 -42
- package/dist/esm/{createCustomEvent-31a792d3.js → createCustomEvent-58159025.js} +1 -3
- package/dist/esm/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
- package/dist/esm/{handleFetch-badf4543.js → handleFetch-b4633675.js} +29 -2
- package/dist/esm/{index-986b5ff2.js → index-d82f06f2.js} +209 -157
- package/dist/esm/index.js +14 -12
- package/dist/esm/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{paypal-b7124cc4.js → paypal-4e2f9753.js} +4 -4
- package/dist/esm/{zonos-address_7.entry.js → zonos-address_8.entry.js} +143 -11
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-card.entry.js +3 -3
- package/dist/esm/zonos-cart-items_13.entry.js +149 -30
- package/dist/esm/zonos-checkout.entry.js +34 -14
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +8 -8
- package/dist/esm/zonos-country-flag.entry.js +6 -6
- package/dist/esm/zonos-country-select_4.entry.js +10 -10
- package/dist/esm/zonos-elements.js +4 -4
- package/dist/esm/{zonos-notification_3.entry.js → zonos-empty-state-payment_4.entry.js} +87 -10
- package/dist/esm/zonos-hello-dialog.entry.js +10 -10
- package/dist/esm/zonos-hello.entry.js +6 -6
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +6 -6
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +4 -4
- package/dist/esm/zonos-tooltip.entry.js +3 -3
- package/dist/esm/zonos-v-stack.entry.js +4 -4
- package/dist/esm/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
- package/dist/esm-es5/CheckoutConfig-573bd959.js +1 -0
- package/dist/esm-es5/TaxId-915ef042.js +1 -0
- package/dist/esm-es5/cart-3427ee25.js +1 -0
- package/dist/esm-es5/createCustomEvent-58159025.js +1 -0
- package/dist/esm-es5/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
- package/dist/esm-es5/handleFetch-b4633675.js +1 -0
- package/dist/esm-es5/index-d82f06f2.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-b7124cc4.js → paypal-4e2f9753.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -0
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -0
- 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-shipping-rich-radio.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/esm-es5/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
- package/dist/scripts/index.d.ts +170 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +18 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.d.ts +13 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +5 -0
- package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +46 -0
- package/dist/types/components/store/checkout/cart.d.ts +5 -0
- package/dist/types/components/store/checkout/stripe.d.ts +16 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +21 -0
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +6 -0
- package/dist/types/components/utils/api/placeTestOrder.d.ts +7 -0
- package/dist/types/components/utils/checkout/getIsStagingMode.d.ts +1 -0
- package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -1
- package/dist/types/components/utils/validateEmailValue.d.ts +1 -0
- package/dist/types/components.d.ts +161 -0
- package/dist/types/types/checkout/TaxId.d.ts +20 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +8 -2
- package/dist/types/types/checkout/api/PlaceTestOrder.d.ts +7 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +144 -109
- package/dist/types/types/generated/graphql.internal.types.ts +180 -99
- package/dist/types/types/index.d.ts +2 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-68d79b58.entry.js → p-00136c20.entry.js} +1 -1
- package/dist/zonos-elements/{p-d381288e.entry.js → p-0028d158.entry.js} +1 -1
- package/dist/zonos-elements/{p-72256333.entry.js → p-05013308.entry.js} +1 -1
- package/dist/zonos-elements/{p-c1b098de.system.js → p-0e6a3cd2.system.js} +1 -1
- package/dist/zonos-elements/{p-c0164a3c.system.js → p-12546668.system.js} +1 -1
- package/dist/zonos-elements/p-12a6b7bd.system.js +1 -0
- package/dist/zonos-elements/p-1423ebbe.js +1 -0
- package/dist/zonos-elements/p-18e5b741.system.js +1 -0
- package/dist/zonos-elements/p-2deae669.entry.js +1 -0
- package/dist/zonos-elements/{p-36dfc7ac.system.js → p-32912caf.system.js} +1 -1
- package/dist/zonos-elements/{p-fc4658a6.entry.js → p-36f97fd9.entry.js} +1 -1
- package/dist/zonos-elements/{p-983f23a1.system.entry.js → p-3a213429.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e6554a6f.system.entry.js → p-3aa4841a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a13d5957.system.entry.js → p-3d221556.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-381874b0.system.entry.js → p-41e26cc4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d514c1d.system.entry.js → p-463e44b6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -0
- package/dist/zonos-elements/{p-6271e108.js → p-485d89a4.js} +1 -1
- package/dist/zonos-elements/p-48bca3d4.system.entry.js +1 -0
- package/dist/zonos-elements/p-4caffd96.system.js +2 -0
- package/dist/zonos-elements/{p-0920500d.entry.js → p-50896f89.entry.js} +1 -1
- package/dist/zonos-elements/{p-2e152517.system.entry.js → p-515e3606.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5834c218.system.js +1 -0
- package/dist/zonos-elements/p-595f5dd2.js +1 -0
- package/dist/zonos-elements/p-5bd927f2.js +1 -0
- package/dist/zonos-elements/{p-2761ad55.system.entry.js → p-619c07c6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2b8cddb7.entry.js → p-69f84611.entry.js} +1 -1
- package/dist/zonos-elements/{p-766dd01f.js → p-6c578d26.js} +1 -1
- package/dist/zonos-elements/{p-28295342.entry.js → p-709c7e9e.entry.js} +1 -1
- package/dist/zonos-elements/{p-0197a9bf.system.entry.js → p-7140439f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7302a081.system.entry.js +1 -0
- package/dist/zonos-elements/p-7e47f6cf.entry.js +1 -0
- package/dist/zonos-elements/{p-44dd4269.entry.js → p-7f288336.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e54432c.system.entry.js → p-81084be5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-81a5dd5c.js +1 -0
- package/dist/zonos-elements/p-84e5fc0b.entry.js +1 -0
- package/dist/zonos-elements/{p-33e1d25e.system.entry.js → p-86e825f0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b5f4ca7.system.entry.js → p-91fc6c24.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9951462e.entry.js +1 -0
- package/dist/zonos-elements/{p-a2bce31d.system.entry.js → p-9cf018c8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-232963d3.system.entry.js → p-9e05e259.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b490b0a.system.entry.js → p-a8cf3542.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ab68ad11.js +2 -0
- package/dist/zonos-elements/{p-4b685549.js → p-b0616716.js} +1 -1
- package/dist/zonos-elements/{p-1e3ea4ae.entry.js → p-b12fbc07.entry.js} +1 -1
- package/dist/zonos-elements/{p-d198421b.system.entry.js → p-b2292b70.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-58a09715.entry.js → p-b262b93e.entry.js} +1 -1
- package/dist/zonos-elements/{p-545c05ce.entry.js → p-b288c2ed.entry.js} +1 -1
- package/dist/zonos-elements/p-b3882a73.system.js +1 -0
- package/dist/zonos-elements/{p-9306a835.entry.js → p-b5c360af.entry.js} +1 -1
- package/dist/zonos-elements/{p-2cfc00b8.system.entry.js → p-b6bbdb59.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f295030e.system.entry.js → p-bb92882d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bf37ccc7.system.js +1 -0
- package/dist/zonos-elements/{p-21b538ea.system.js → p-c015be06.system.js} +1 -1
- package/dist/zonos-elements/p-c8b0bc02.system.entry.js +1 -0
- package/dist/zonos-elements/{p-39cac2c1.entry.js → p-cbd5d932.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c5c0a85.entry.js → p-cdfca133.entry.js} +1 -1
- package/dist/zonos-elements/{p-675f60b4.entry.js → p-d2f2c685.entry.js} +1 -1
- package/dist/zonos-elements/{p-2c19f5e2.entry.js → p-d6061c79.entry.js} +1 -1
- package/dist/zonos-elements/p-da6a29e4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-65069140.entry.js → p-db3f381d.entry.js} +1 -1
- package/dist/zonos-elements/{p-9dec2b74.entry.js → p-de221545.entry.js} +1 -1
- package/dist/zonos-elements/{p-2949faf3.entry.js → p-e01ccb27.entry.js} +1 -1
- package/dist/zonos-elements/{p-b0174a8f.js → p-e02fd9ae.js} +1 -1
- package/dist/zonos-elements/{p-3cf30d83.entry.js → p-e2f1fa53.entry.js} +1 -1
- package/dist/zonos-elements/{p-ebdd9b64.system.entry.js → p-e8c70c7d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a8bd492d.system.entry.js → p-ea35b237.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f0c8150e.js +1 -0
- package/dist/zonos-elements/p-f3b0a097.system.js +1 -0
- package/dist/zonos-elements/{p-d5a3851d.system.entry.js → p-fc4ebe6b.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +9 -8
- package/dist/esm-es5/CheckoutConfig-262008fe.js +0 -1
- package/dist/esm-es5/cart-cf87ec6f.js +0 -1
- package/dist/esm-es5/createCustomEvent-31a792d3.js +0 -1
- package/dist/esm-es5/handleFetch-badf4543.js +0 -1
- package/dist/esm-es5/index-986b5ff2.js +0 -2
- package/dist/esm-es5/zonos-address_7.entry.js +0 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +0 -1
- package/dist/zonos-elements/p-076388d3.entry.js +0 -1
- package/dist/zonos-elements/p-0cda2818.system.js +0 -1
- package/dist/zonos-elements/p-0d2cf216.entry.js +0 -1
- package/dist/zonos-elements/p-1460f917.js +0 -1
- package/dist/zonos-elements/p-272052bd.system.entry.js +0 -1
- package/dist/zonos-elements/p-3cb4468f.system.entry.js +0 -1
- package/dist/zonos-elements/p-3d82e70e.js +0 -1
- package/dist/zonos-elements/p-64372f93.system.js +0 -1
- package/dist/zonos-elements/p-673b4402.system.entry.js +0 -1
- package/dist/zonos-elements/p-680d3694.js +0 -2
- package/dist/zonos-elements/p-7b999a40.js +0 -1
- package/dist/zonos-elements/p-7c643376.system.js +0 -1
- package/dist/zonos-elements/p-866bb93e.system.js +0 -1
- package/dist/zonos-elements/p-8c487480.entry.js +0 -1
- package/dist/zonos-elements/p-9b720cf4.entry.js +0 -1
- package/dist/zonos-elements/p-a5b294d7.js +0 -1
- package/dist/zonos-elements/p-b50667b6.system.js +0 -2
- package/dist/zonos-elements/p-bfcfd29b.system.js +0 -1
- package/dist/zonos-elements/p-ded984d9.system.entry.js +0 -1
- package/dist/zonos-elements/p-e9964a5a.system.js +0 -1
|
@@ -126,6 +126,56 @@ export const allowedCharacterSets = {
|
|
|
126
126
|
|
|
127
127
|
export type AllowedCharacterSets =
|
|
128
128
|
(typeof allowedCharacterSets)[keyof typeof allowedCharacterSets];
|
|
129
|
+
export const allowedSettlementCurrencies = {
|
|
130
|
+
Local: 'LOCAL',
|
|
131
|
+
LocalAndUsd: 'LOCAL_AND_USD',
|
|
132
|
+
} as const;
|
|
133
|
+
|
|
134
|
+
export type AllowedSettlementCurrencies =
|
|
135
|
+
(typeof allowedSettlementCurrencies)[keyof typeof allowedSettlementCurrencies];
|
|
136
|
+
export const amountDetailRefundSourceType = {
|
|
137
|
+
Discount: 'DISCOUNT',
|
|
138
|
+
DutyTaxFee: 'DUTY_TAX_FEE',
|
|
139
|
+
Item: 'ITEM',
|
|
140
|
+
Shipping: 'SHIPPING',
|
|
141
|
+
} as const;
|
|
142
|
+
|
|
143
|
+
export type AmountDetailRefundSourceType =
|
|
144
|
+
(typeof amountDetailRefundSourceType)[keyof typeof amountDetailRefundSourceType];
|
|
145
|
+
export const amountDetailSourceType = {
|
|
146
|
+
Discount: 'DISCOUNT',
|
|
147
|
+
Duty: 'DUTY',
|
|
148
|
+
DutyTaxFee: 'DUTY_TAX_FEE',
|
|
149
|
+
Fee: 'FEE',
|
|
150
|
+
Item: 'ITEM',
|
|
151
|
+
Shipping: 'SHIPPING',
|
|
152
|
+
Tax: 'TAX',
|
|
153
|
+
} as const;
|
|
154
|
+
|
|
155
|
+
export type AmountDetailSourceType =
|
|
156
|
+
(typeof amountDetailSourceType)[keyof typeof amountDetailSourceType];
|
|
157
|
+
export const amountDetailSubtotalType = {
|
|
158
|
+
Discount: 'DISCOUNT',
|
|
159
|
+
Duty: 'DUTY',
|
|
160
|
+
Fee: 'FEE',
|
|
161
|
+
Item: 'ITEM',
|
|
162
|
+
Shipping: 'SHIPPING',
|
|
163
|
+
Tax: 'TAX',
|
|
164
|
+
} as const;
|
|
165
|
+
|
|
166
|
+
export type AmountDetailSubtotalType =
|
|
167
|
+
(typeof amountDetailSubtotalType)[keyof typeof amountDetailSubtotalType];
|
|
168
|
+
export const amountDetailTarget = {
|
|
169
|
+
BillingCompany: 'BILLING_COMPANY',
|
|
170
|
+
MerchantBase: 'MERCHANT_BASE',
|
|
171
|
+
MerchantProvided: 'MERCHANT_PROVIDED',
|
|
172
|
+
MerchantSettled: 'MERCHANT_SETTLED',
|
|
173
|
+
ShopperPresented: 'SHOPPER_PRESENTED',
|
|
174
|
+
ZonosBase: 'ZONOS_BASE',
|
|
175
|
+
} as const;
|
|
176
|
+
|
|
177
|
+
export type AmountDetailTarget =
|
|
178
|
+
(typeof amountDetailTarget)[keyof typeof amountDetailTarget];
|
|
129
179
|
export type AmountRange = {
|
|
130
180
|
max?: InputMaybe<Scalars['Decimal']['input']>;
|
|
131
181
|
min?: InputMaybe<Scalars['Decimal']['input']>;
|
|
@@ -145,6 +195,7 @@ export const analyticsProviderType = {
|
|
|
145
195
|
|
|
146
196
|
export type AnalyticsProviderType =
|
|
147
197
|
(typeof analyticsProviderType)[keyof typeof analyticsProviderType];
|
|
198
|
+
|
|
148
199
|
export const apiUsageRecordStatus = {
|
|
149
200
|
Failed: 'FAILED',
|
|
150
201
|
ManualIntervention: 'MANUAL_INTERVENTION',
|
|
@@ -488,6 +539,14 @@ export const catalogStatus = {
|
|
|
488
539
|
|
|
489
540
|
export type CatalogStatus = (typeof catalogStatus)[keyof typeof catalogStatus];
|
|
490
541
|
|
|
542
|
+
export const checkoutSessionCreationModeType = {
|
|
543
|
+
WithPaymentIntent: 'WITH_PAYMENT_INTENT',
|
|
544
|
+
WithoutPaymentIntent: 'WITHOUT_PAYMENT_INTENT',
|
|
545
|
+
} as const;
|
|
546
|
+
|
|
547
|
+
export type CheckoutSessionCreationModeType =
|
|
548
|
+
(typeof checkoutSessionCreationModeType)[keyof typeof checkoutSessionCreationModeType];
|
|
549
|
+
|
|
491
550
|
export const checkoutStatus = {
|
|
492
551
|
Disabled: 'DISABLED',
|
|
493
552
|
Enabled: 'ENABLED',
|
|
@@ -901,6 +960,7 @@ export const contentType = {
|
|
|
901
960
|
|
|
902
961
|
export type ContentType = (typeof contentType)[keyof typeof contentType];
|
|
903
962
|
export const controlType = {
|
|
963
|
+
Carrier: 'CARRIER',
|
|
904
964
|
Export: 'EXPORT',
|
|
905
965
|
Import: 'IMPORT',
|
|
906
966
|
} as const;
|
|
@@ -2041,8 +2101,10 @@ export type ItemKeyPreference =
|
|
|
2041
2101
|
(typeof itemKeyPreference)[keyof typeof itemKeyPreference];
|
|
2042
2102
|
|
|
2043
2103
|
export const itemMeasurementType = {
|
|
2104
|
+
AlcoholByVolume: 'ALCOHOL_BY_VOLUME',
|
|
2044
2105
|
Height: 'HEIGHT',
|
|
2045
2106
|
Length: 'LENGTH',
|
|
2107
|
+
Volume: 'VOLUME',
|
|
2046
2108
|
Weight: 'WEIGHT',
|
|
2047
2109
|
Width: 'WIDTH',
|
|
2048
2110
|
} as const;
|
|
@@ -2085,9 +2147,12 @@ export const itemUnitOfMeasure = {
|
|
|
2085
2147
|
Gram: 'GRAM',
|
|
2086
2148
|
Inch: 'INCH',
|
|
2087
2149
|
Kilogram: 'KILOGRAM',
|
|
2150
|
+
Liter: 'LITER',
|
|
2088
2151
|
Meter: 'METER',
|
|
2152
|
+
Milliliter: 'MILLILITER',
|
|
2089
2153
|
Millimeter: 'MILLIMETER',
|
|
2090
2154
|
Ounce: 'OUNCE',
|
|
2155
|
+
Percentage: 'PERCENTAGE',
|
|
2091
2156
|
Pound: 'POUND',
|
|
2092
2157
|
Yard: 'YARD',
|
|
2093
2158
|
} as const;
|
|
@@ -2188,6 +2253,7 @@ export const landedCostFeeType = {
|
|
|
2188
2253
|
Country: 'COUNTRY',
|
|
2189
2254
|
CurrencyConversionFee: 'CURRENCY_CONVERSION_FEE',
|
|
2190
2255
|
DdpServiceFee: 'DDP_SERVICE_FEE',
|
|
2256
|
+
Discount: 'DISCOUNT',
|
|
2191
2257
|
Duty: 'DUTY',
|
|
2192
2258
|
InclusivePriceAdjustment: 'INCLUSIVE_PRICE_ADJUSTMENT',
|
|
2193
2259
|
InclusivePricing: 'INCLUSIVE_PRICING',
|
|
@@ -2235,6 +2301,7 @@ export const landedCostMethod = {
|
|
|
2235
2301
|
export type LandedCostMethod =
|
|
2236
2302
|
(typeof landedCostMethod)[keyof typeof landedCostMethod];
|
|
2237
2303
|
export const landedCostQuoteType = {
|
|
2304
|
+
Api: 'API',
|
|
2238
2305
|
Auditing: 'AUDITING',
|
|
2239
2306
|
Checkout: 'CHECKOUT',
|
|
2240
2307
|
InclusivePrice: 'INCLUSIVE_PRICE',
|
|
@@ -3050,6 +3117,7 @@ export const storeFeeRuleType = {
|
|
|
3050
3117
|
RequiredNegotiable: 'REQUIRED_NEGOTIABLE',
|
|
3051
3118
|
RequiredNonNegotiable: 'REQUIRED_NON_NEGOTIABLE',
|
|
3052
3119
|
Transitory: 'TRANSITORY',
|
|
3120
|
+
TransitoryCustom: 'TRANSITORY_CUSTOM',
|
|
3053
3121
|
} as const;
|
|
3054
3122
|
|
|
3055
3123
|
export type StoreFeeRuleType =
|
|
@@ -3175,7 +3243,9 @@ export type TaxCalculationType =
|
|
|
3175
3243
|
|
|
3176
3244
|
export const taxIdType = {
|
|
3177
3245
|
Cnp: 'CNP',
|
|
3246
|
+
Cuil: 'CUIL',
|
|
3178
3247
|
Dan: 'DAN',
|
|
3248
|
+
Dni: 'DNI',
|
|
3179
3249
|
Dtf: 'DTF',
|
|
3180
3250
|
Dun: 'DUN',
|
|
3181
3251
|
Ein: 'EIN',
|
|
@@ -3186,7 +3256,12 @@ export const taxIdType = {
|
|
|
3186
3256
|
Hmrc: 'HMRC',
|
|
3187
3257
|
Ioss: 'IOSS',
|
|
3188
3258
|
Lvg: 'LVG',
|
|
3259
|
+
Npwp: 'NPWP',
|
|
3189
3260
|
Osr: 'OSR',
|
|
3261
|
+
Pan: 'PAN',
|
|
3262
|
+
Pccc: 'PCCC',
|
|
3263
|
+
Rfc: 'RFC',
|
|
3264
|
+
Run: 'RUN',
|
|
3190
3265
|
Ssn: 'SSN',
|
|
3191
3266
|
Sta: 'STA',
|
|
3192
3267
|
Tan: 'TAN',
|
|
@@ -3671,6 +3746,18 @@ export type FulfillmentCenterQuery = {
|
|
|
3671
3746
|
}> | null;
|
|
3672
3747
|
};
|
|
3673
3748
|
|
|
3749
|
+
export type PartyInfoQuery = {
|
|
3750
|
+
party: {
|
|
3751
|
+
person: {
|
|
3752
|
+
email: string | null;
|
|
3753
|
+
firstName: string | null;
|
|
3754
|
+
lastName: string | null;
|
|
3755
|
+
metadata: Array<{ key: string; value: string | null } | null> | null;
|
|
3756
|
+
phone: string | null;
|
|
3757
|
+
} | null;
|
|
3758
|
+
} | null;
|
|
3759
|
+
};
|
|
3760
|
+
|
|
3674
3761
|
export type PaypalOrderCaptureMutation = {
|
|
3675
3762
|
paypalOrderCapture: { order: { id: string } | null };
|
|
3676
3763
|
};
|
|
@@ -3758,6 +3845,49 @@ export type CheckoutSessionCreateMutation = {
|
|
|
3758
3845
|
};
|
|
3759
3846
|
};
|
|
3760
3847
|
|
|
3848
|
+
export type CheckoutSessionPaymentIntentCreateMutation = {
|
|
3849
|
+
checkoutSessionPaymentIntentCreate: {
|
|
3850
|
+
cartId: string | null;
|
|
3851
|
+
clientSecret: string;
|
|
3852
|
+
id: string;
|
|
3853
|
+
landedCost: {
|
|
3854
|
+
amountSubtotals: {
|
|
3855
|
+
discounts: number | null;
|
|
3856
|
+
duties: number;
|
|
3857
|
+
fees: number;
|
|
3858
|
+
items: number;
|
|
3859
|
+
landedCostTotal: number;
|
|
3860
|
+
shipping: number;
|
|
3861
|
+
taxes: number;
|
|
3862
|
+
} | null;
|
|
3863
|
+
id: string;
|
|
3864
|
+
landedCostGuaranteeCode: LandedCostGuaranteeCode;
|
|
3865
|
+
method: IncotermCode;
|
|
3866
|
+
shipmentRating: { displayName: string };
|
|
3867
|
+
} | null;
|
|
3868
|
+
metadata: Array<{ key: string; value: string } | null> | null;
|
|
3869
|
+
organizationId: string;
|
|
3870
|
+
subtotals: {
|
|
3871
|
+
adjustments: number;
|
|
3872
|
+
duties: number;
|
|
3873
|
+
exchangeRate: {
|
|
3874
|
+
id: string;
|
|
3875
|
+
rate: number;
|
|
3876
|
+
sourceCurrencyCode: CurrencyCode;
|
|
3877
|
+
targetCurrencyCode: CurrencyCode;
|
|
3878
|
+
type: ExchangeRateType;
|
|
3879
|
+
};
|
|
3880
|
+
fees: number;
|
|
3881
|
+
items: number;
|
|
3882
|
+
landedCostTotal: number;
|
|
3883
|
+
presentmentCurrencyCode: CurrencyCode;
|
|
3884
|
+
shipping: number;
|
|
3885
|
+
taxes: number;
|
|
3886
|
+
total: number;
|
|
3887
|
+
};
|
|
3888
|
+
};
|
|
3889
|
+
};
|
|
3890
|
+
|
|
3761
3891
|
export type PaypalOrderCreateMutation = {
|
|
3762
3892
|
paypalOrderCreate: { paypalOrderId: string | null };
|
|
3763
3893
|
};
|
|
@@ -3780,8 +3910,12 @@ export type ExchangeRateCreateMutation = {
|
|
|
3780
3910
|
|
|
3781
3911
|
export type GetCheckoutSessionQuery = {
|
|
3782
3912
|
checkoutSession: {
|
|
3783
|
-
landedCost: {
|
|
3913
|
+
landedCost: {
|
|
3914
|
+
id: string;
|
|
3915
|
+
root: { parties: Array<{ id: string } | null> | null } | null;
|
|
3916
|
+
} | null;
|
|
3784
3917
|
order: { id: string } | null;
|
|
3918
|
+
subtotals: { presentmentCurrencyCode: CurrencyCode };
|
|
3785
3919
|
};
|
|
3786
3920
|
};
|
|
3787
3921
|
|
|
@@ -3809,6 +3943,8 @@ export type GetInclusivePriceSettingByCountryQuery = {
|
|
|
3809
3943
|
} | null;
|
|
3810
3944
|
};
|
|
3811
3945
|
|
|
3946
|
+
export type OrderCreateMutation = { orderCreate: { id: string } | null };
|
|
3947
|
+
|
|
3812
3948
|
export type ShippingZonesQuery = {
|
|
3813
3949
|
shippingZones: Array<{
|
|
3814
3950
|
countryCodes: Array<CountryCode> | null;
|
|
@@ -4200,104 +4336,6 @@ export type GetOrderQuery = {
|
|
|
4200
4336
|
} | null;
|
|
4201
4337
|
};
|
|
4202
4338
|
|
|
4203
|
-
export type OrderFragmentFragment = {
|
|
4204
|
-
accountOrderNumber: string | null;
|
|
4205
|
-
amountSubtotals: {
|
|
4206
|
-
duties: number;
|
|
4207
|
-
fees: number;
|
|
4208
|
-
items: number;
|
|
4209
|
-
shipping: number;
|
|
4210
|
-
taxes: number;
|
|
4211
|
-
variance: number;
|
|
4212
|
-
};
|
|
4213
|
-
createdAt: string;
|
|
4214
|
-
currencyCode: CurrencyCode;
|
|
4215
|
-
id: string;
|
|
4216
|
-
items: Array<{
|
|
4217
|
-
amount: number;
|
|
4218
|
-
attributes: Array<{
|
|
4219
|
-
key: string | null;
|
|
4220
|
-
value: string | null;
|
|
4221
|
-
} | null> | null;
|
|
4222
|
-
countryOfOrigin: CountryCode | null;
|
|
4223
|
-
description: string | null;
|
|
4224
|
-
hsCode: string | null;
|
|
4225
|
-
metadata: Array<{ key: string | null; value: string | null } | null> | null;
|
|
4226
|
-
name: string | null;
|
|
4227
|
-
productId: string;
|
|
4228
|
-
quantity: number;
|
|
4229
|
-
sku: string | null;
|
|
4230
|
-
}> | null;
|
|
4231
|
-
landedCosts: Array<{
|
|
4232
|
-
amountSubtotals: {
|
|
4233
|
-
duties: number;
|
|
4234
|
-
fees: number;
|
|
4235
|
-
items: number;
|
|
4236
|
-
landedCostTotal: number;
|
|
4237
|
-
shipping: number;
|
|
4238
|
-
taxes: number;
|
|
4239
|
-
} | null;
|
|
4240
|
-
appliedAdjustments: Array<{
|
|
4241
|
-
amount: number;
|
|
4242
|
-
item: { amount: number; name: string | null } | null;
|
|
4243
|
-
}> | null;
|
|
4244
|
-
duties: Array<{
|
|
4245
|
-
exchangeRate: {
|
|
4246
|
-
rate: number;
|
|
4247
|
-
sourceCurrencyCode: CurrencyCode;
|
|
4248
|
-
targetCurrencyCode: CurrencyCode;
|
|
4249
|
-
} | null;
|
|
4250
|
-
}>;
|
|
4251
|
-
shipmentRating: {
|
|
4252
|
-
amount: number;
|
|
4253
|
-
currencyCode: CurrencyCode;
|
|
4254
|
-
details: Array<{
|
|
4255
|
-
amount: number;
|
|
4256
|
-
carrierCode: string;
|
|
4257
|
-
type: ShipmentAmountType;
|
|
4258
|
-
}> | null;
|
|
4259
|
-
displayName: string;
|
|
4260
|
-
id: string;
|
|
4261
|
-
serviceLevelCode: string;
|
|
4262
|
-
};
|
|
4263
|
-
}> | null;
|
|
4264
|
-
metadata: Array<{ key: string; value: string } | null> | null;
|
|
4265
|
-
mode: Mode;
|
|
4266
|
-
parties: Array<{
|
|
4267
|
-
location: {
|
|
4268
|
-
administrativeArea: string | null;
|
|
4269
|
-
administrativeAreaCode: string | null;
|
|
4270
|
-
countryCode: CountryCode;
|
|
4271
|
-
line1: string | null;
|
|
4272
|
-
line2: string | null;
|
|
4273
|
-
line3: string | null;
|
|
4274
|
-
line4: string | null;
|
|
4275
|
-
locality: string | null;
|
|
4276
|
-
longitude: number | null;
|
|
4277
|
-
postalCode: string | null;
|
|
4278
|
-
} | null;
|
|
4279
|
-
person: {
|
|
4280
|
-
companyName: string | null;
|
|
4281
|
-
email: string | null;
|
|
4282
|
-
firstName: string | null;
|
|
4283
|
-
lastName: string | null;
|
|
4284
|
-
phone: string | null;
|
|
4285
|
-
} | null;
|
|
4286
|
-
type: PartyType | null;
|
|
4287
|
-
}> | null;
|
|
4288
|
-
references: Array<{ key: string | null; value: string | null }> | null;
|
|
4289
|
-
root: {
|
|
4290
|
-
exchangeRates: Array<{
|
|
4291
|
-
rate: number;
|
|
4292
|
-
sourceCurrencyCode: CurrencyCode;
|
|
4293
|
-
targetCurrencyCode: CurrencyCode;
|
|
4294
|
-
type: ExchangeRateType;
|
|
4295
|
-
}>;
|
|
4296
|
-
} | null;
|
|
4297
|
-
status: OrderStatus;
|
|
4298
|
-
trackingNumbers: Array<string | null> | null;
|
|
4299
|
-
};
|
|
4300
|
-
|
|
4301
4339
|
export type OrderUpdateAccountOrderNumberMutation = {
|
|
4302
4340
|
orderUpdateAccountOrderNumber: { accountOrderNumber: string | null };
|
|
4303
4341
|
};
|
|
@@ -4592,6 +4630,21 @@ export function getSdk(
|
|
|
4592
4630
|
'mutation',
|
|
4593
4631
|
);
|
|
4594
4632
|
},
|
|
4633
|
+
checkoutSessionPaymentIntentCreate(
|
|
4634
|
+
variables?: { [x: string]: never },
|
|
4635
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
4636
|
+
): Promise<CheckoutSessionPaymentIntentCreateMutation> {
|
|
4637
|
+
return withWrapper(
|
|
4638
|
+
wrappedRequestHeaders =>
|
|
4639
|
+
client.request<CheckoutSessionPaymentIntentCreateMutation>(
|
|
4640
|
+
'',
|
|
4641
|
+
variables,
|
|
4642
|
+
{ ...requestHeaders, ...wrappedRequestHeaders },
|
|
4643
|
+
),
|
|
4644
|
+
'checkoutSessionPaymentIntentCreate',
|
|
4645
|
+
'mutation',
|
|
4646
|
+
);
|
|
4647
|
+
},
|
|
4595
4648
|
checkoutSessionUpdate(
|
|
4596
4649
|
variables?: { [x: string]: never },
|
|
4597
4650
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
@@ -4804,6 +4857,20 @@ export function getSdk(
|
|
|
4804
4857
|
'query',
|
|
4805
4858
|
);
|
|
4806
4859
|
},
|
|
4860
|
+
orderCreate(
|
|
4861
|
+
variables?: { [x: string]: never },
|
|
4862
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
4863
|
+
): Promise<OrderCreateMutation> {
|
|
4864
|
+
return withWrapper(
|
|
4865
|
+
wrappedRequestHeaders =>
|
|
4866
|
+
client.request<OrderCreateMutation>('', variables, {
|
|
4867
|
+
...requestHeaders,
|
|
4868
|
+
...wrappedRequestHeaders,
|
|
4869
|
+
}),
|
|
4870
|
+
'orderCreate',
|
|
4871
|
+
'mutation',
|
|
4872
|
+
);
|
|
4873
|
+
},
|
|
4807
4874
|
orderUpdateAccountOrderNumber(
|
|
4808
4875
|
variables?: { [x: string]: never },
|
|
4809
4876
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
@@ -4832,6 +4899,20 @@ export function getSdk(
|
|
|
4832
4899
|
'query',
|
|
4833
4900
|
);
|
|
4834
4901
|
},
|
|
4902
|
+
partyInfo(
|
|
4903
|
+
variables?: { [x: string]: never },
|
|
4904
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
4905
|
+
): Promise<PartyInfoQuery> {
|
|
4906
|
+
return withWrapper(
|
|
4907
|
+
wrappedRequestHeaders =>
|
|
4908
|
+
client.request<PartyInfoQuery>('', variables, {
|
|
4909
|
+
...requestHeaders,
|
|
4910
|
+
...wrappedRequestHeaders,
|
|
4911
|
+
}),
|
|
4912
|
+
'partyInfo',
|
|
4913
|
+
'query',
|
|
4914
|
+
);
|
|
4915
|
+
},
|
|
4835
4916
|
paypalOrderCapture(
|
|
4836
4917
|
variables?: { [x: string]: never },
|
|
4837
4918
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
@@ -6,9 +6,11 @@ export * from './checkout/api/CheckoutSession';
|
|
|
6
6
|
export * from './checkout/api/legacy/InventoryCheck';
|
|
7
7
|
export * from './checkout/api/NormalizedTempCart';
|
|
8
8
|
export * from './checkout/api/Paypal';
|
|
9
|
+
export * from './checkout/api/PlaceTestOrder';
|
|
9
10
|
export * from './checkout/api/StoreDiscountEnabled';
|
|
10
11
|
export * from './checkout/api/ValidateAddress';
|
|
11
12
|
export * from './checkout/CheckoutConfig';
|
|
13
|
+
export * from './checkout/TaxId';
|
|
12
14
|
export * from './ConversionEvent';
|
|
13
15
|
export * from './hello/HelloConfig';
|
|
14
16
|
export * from './JsonError';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e,h as n,a as t}from"./p-a5b294d7.js";import{s as o,c as s}from"./p-1460f917.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-1460f917.js";const i=["jsdelivr","cdnjs","unpkg","vercel"],r="jsdelivr",l=e=>{const n=i.indexOf(e);return i[n+1]||null},u=()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const t=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.142.js.zonos.com";if(!t&&(o.includes("test.")||o.includes("test-")))return o;if(!t&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!t)return null;if("dev-elements"===t)return"https://dev.elements.zonos.com";const s=`https://${t}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s},a="https://js.stripe.com/v3",m=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,p="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let w=null;const f=Promise.resolve().then((()=>{return e=null,null!==w||(w=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(p),window.Stripe)n(window.Stripe);else try{let s=(()=>{const e=document.querySelectorAll(`script[src^="${a}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&m.test(t.src))return t}return null})();s&&e?console.warn(p):s||(s=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${a}${n}`;const s=document.head||document.body;return s?(s.appendChild(o),o):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==s||s.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==s||s.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),w;var e}));let h=!1;var v;f.catch((e=>{h||console.warn(e)}));const y=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),z="https://v1.3.142.js.zonos.com",S=y||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.142",g="https://fonts.googleapis.com",j=/^https:\/\/fonts\.googleapis\.com/;class O{}v=O,O.doneInit=!1,O.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),O.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),O._paypalMockResponse=null,O.isBigCommerce=!1,O.releaseDate="1734472646609",O.isLegacyCheckout=!1,O.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",O.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),O.isNpm=!0,O.zonosQaUrl=null,O.zonosQaUrlApi=null,O.version="v1.3.142",O.modeAlerted=!1,O.cartData=null,O.paypal=null,O.getCurrentTimestamp=()=>(new Date).getTime(),O.zonosController=null,O.init=async i=>{const{appearance:r,checkoutSettings:c,currencyConverter:d,helloSettings:l,onCountryChange:a,overrideCurrencyFormat:m,storeId:p,zonosApiKey:w}=i;if(v.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),v.doneInit)return;if(e(`====== ZONOS DEBUG MODE: on (${v.version}) ======`),v.zonosApiKey=w,v.storeId=p,v.isNpm){e("====== ZONOS LOADING FROM NPM ======");const s=u();if(s&&!window.isZonosPreview){e(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${s} ======`,"info");const n=document.createElement("script");return n.src=`${s}/dist/scripts/zonos.js`,document.head.appendChild(n),n.addEventListener("load",(()=>{window.Zonos.isNpm=v.isNpm,window.Zonos.isBigCommerce=v.isBigCommerce,window.Zonos.isLegacyCheckout=v.isLegacyCheckout,window.Zonos.init(i)})),n.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${s}`)})),void(window.isZonosPreview=!0)}if(!w&&!v.cartId)return void t("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!v.cartData&&v.cartId){e("Initialize cart data");const n=await o(v.cartId);if(!n)return void t("Failed to get cart data");v.cartData=n.cartData,v.zonosApiKey=n.zonosApiKey}const r=await(async()=>{if(!window.location.search.includes("zonosTestMode=1")||!window.Zonos.zonosApiKey)return null;if(e("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return e("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:s}=await n("/api/get-test-public-credential");if(o.length||!s)return t("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const i=s.publicCredential;return i?(e(`[ZONOS - loadZonos] Retrieve new test public token ${i}`,"info"),i):(t("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();r&&(v.zonosApiKey=r)}const f=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(v.cartId&&v.cartData||f){e("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const n=document.createElement("button");n.style.display="none",n.id=`${s}`,document.body.appendChild(n)}e("init zonos"),v.injectCustomScriptForHostedCheckout(),v.injectZonosCdn(),v.injectZonosCss(),v.injectFonts(),v.injectController({config:{appearance:r,checkoutSettings:c,currencyConverter:d,helloSettings:l,onCountryChange:a,overrideCurrencyFormat:m}}),v.doneInit=!0},O.injectCustomScriptForHostedCheckout=()=>{const n=v.cartData,t=(null==n?void 0:n.metadata)||[],o=t.find((e=>"customHeaderScript"===e.key)),s=t.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||s)){if(o){e("Injecting custom header script");const n=document.createElement("script");n.textContent=o.value,document.head.appendChild(n)}if(s){e("Injecting custom footer script");const n=document.createElement("script");n.textContent=s.value,document.body.appendChild(n)}}else e("Skip injecting custom script for hosted checkout","info",{footerScript:s,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},O.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},O.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},O.showNotification=e=>{var n;null===(n=v.zonosController)||void 0===n||n.showNotification(e)},O.updateOrganizationName=e=>{var n;null===(n=v.zonosController)||void 0===n||n.updateOrganizationName(e)},O.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},O.injectController=({config:n})=>{var o;if(document.querySelector("zonos-controller"))return;if(null===(o=n.checkoutSettings)||void 0===o?void 0:o.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;v.disablePlaceOrderButtons({config:n,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{v.disablePlaceOrderButtons({config:n,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=v.zonosApiKey||"",s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const i=await(async(...e)=>{h=!0;const n=Date.now();return f.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(o.publishableKey);i?(window.Zonos.stripe=i,s.initCheckoutElement(i)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),v.zonosController=s,e("Zonos controller injected!")},O.injectScript=({cdnType:n,isModule:o,theRestUrl:s})=>{const i=`${v.getZonosUrl(n)}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const r=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{t(`Failed to load ${c.src}`);const e=l(n);e&&v.injectScript({cdnType:e,isModule:o,theRestUrl:s})},r.appendChild(c)},O.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return S;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.142";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.142";case"vercel":return z}};return v.isNpm&&u()||n()},O.injectZonosCdn=()=>{v.injectScript({cdnType:r,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),v.injectScript({cdnType:r,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},O.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=v.getZonosUrl(e),s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${z}/`,s.appendChild(i);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{t(`Failed to load ${r.href}`);const o=l(e);o&&v.injectStylesheet({cdnType:o,theRestUrl:n})},s.appendChild(r)},O.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(v.injectStylesheet({cdnType:r,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},O.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${g}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!j.test(t.href))return t}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,t=document.createElement("link");t.rel="preconnect",t.href=g,n.appendChild(t);const o=document.createElement("link");o.rel="stylesheet",o.href=`${g}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,n.appendChild(o),e("Zonos font injected!")},O.setupGoogleFont=e=>{var n;null===(n=v.zonosController)||void 0===n||n.setupGoogleFont(e)},O.injectSupportGoogleFont=n=>{var t;e(`[FONT] injecting ${n}`);const o=null===(t=n.match(/family=(.*?):/))||void 0===t?void 0:t[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${g}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=g,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const i=document.createElement("link");i.rel="stylesheet",i.href=n,s.appendChild(i),e(`[FONT] ${o} font injected!`)};export{O as Zonos}
|
|
1
|
+
import{g as e,a as n,l as t,h as o,b as i}from"./p-f0c8150e.js";import{s as r,c as l}from"./p-81a5dd5c.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-81a5dd5c.js";export{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./p-5bd927f2.js";const a=["jsdelivr","cdnjs","unpkg","vercel"],u="jsdelivr",m=e=>{const n=a.indexOf(e);return a[n+1]||null},p=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.144.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const s=`https://${n}.preview.js.zonos.com`;return t(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s},w="https://js.stripe.com/v3",f=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,h="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let v=null;const y=Promise.resolve().then((()=>{return e=null,null!==v||(v=new Promise(((n,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(h),window.Stripe)n(window.Stripe);else try{let o=(()=>{const e=document.querySelectorAll(`script[src^="${w}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&f.test(t.src))return t}return null})();o&&e?console.warn(h):o||(o=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src=`${w}${n}`;const o=document.head||document.body;return o?(o.appendChild(t),t):(i("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==o||o.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):t(new Error("Stripe.js not available"))})),null==o||o.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else n(null)}))),v;var e}));let z=!1;var g;y.catch((e=>{z||console.warn(e)}));const j=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),S="https://v1.3.144.js.zonos.com",O=j||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.144",k="https://fonts.googleapis.com",b=/^https:\/\/fonts\.googleapis\.com/;class ${}g=$,$.doneInit=!1,$.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),$.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),$._paypalMockResponse=null,$.isBigCommerce=!1,$.releaseDate="1735934720716",$.isLegacyCheckout=!1,$.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",$.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),$.isNpm=!0,$.zonosQaUrl=null,$.zonosQaUrlApi=null,$.version="v1.3.144",$.modeAlerted=!1,$.cartData=null,$.paypal=null,$.getCurrentTimestamp=()=>(new Date).getTime(),$.zonosController=null,$.init=async s=>{const{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w,storeId:f,zonosApiKey:h}=s;if(g.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),g.doneInit)return;if(t(`====== ZONOS DEBUG MODE: on (${g.version}) ======`),g.zonosApiKey=h,g.storeId=f,g.isNpm){t("====== ZONOS LOADING FROM NPM ======");const c=p();if(c&&!window.isZonosPreview){t(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${c} ======`,"info");const e=document.createElement("script");return e.src=`${c}/dist/scripts/zonos.js`,document.head.appendChild(e),e.addEventListener("load",(()=>{window.Zonos.isNpm=g.isNpm,window.Zonos.isBigCommerce=g.isBigCommerce,window.Zonos.isLegacyCheckout=g.isLegacyCheckout,window.Zonos.init(s)})),e.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${c}`)})),void(window.isZonosPreview=!0)}if(!h&&!g.cartId)return void i("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!g.cartData&&g.cartId){t("Initialize cart data");const e=await r(g.cartId);if(!e)return void i("Failed to get cart data");g.cartData=e.cartData,g.zonosApiKey=e.zonosApiKey}const d=await(async()=>{const s=e(),r=n();if(!s&&!r||!window.Zonos.zonosApiKey)return null;if(t("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return t("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:c,json:d}=await o("/api/get-test-public-credential");if(c.length||!d)return i("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",c),null;const l=d.publicCredential;return l?(t(`[ZONOS - loadZonos] Retrieve new test public token ${l}`,"info"),l):(i("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();d&&(g.zonosApiKey=d)}const v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(g.cartId&&g.cartData||v){t("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${l}`,document.body.appendChild(e)}t("init zonos"),g.injectCustomScriptForHostedCheckout(),g.injectZonosCdn(),g.injectZonosCss(),g.injectFonts(),g.injectController({config:{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w}}),g.doneInit=!0},$.injectCustomScriptForHostedCheckout=()=>{const e=g.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),s=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||s)){if(o){t("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(s){t("Injecting custom footer script");const e=document.createElement("script");e.textContent=s.value,document.body.appendChild(e)}}else t("Skip injecting custom script for hosted checkout","info",{footerScript:s,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},$.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},$.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},$.showNotification=e=>{var n;null===(n=g.zonosController)||void 0===n||n.showNotification(e)},$.updateOrganizationName=e=>{var n;null===(n=g.zonosController)||void 0===n||n.updateOrganizationName(e)},$.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},$.injectController=({config:e})=>{var n;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const o=document.createElement("zonos-controller");o.config=e,o.zonosApiKey=g.zonosApiKey||"",o.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;t("loading Stripe");const s=await(async(...e)=>{z=!0;const n=Date.now();return y.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(n.publishableKey);s?(window.Zonos.stripe=s,o.initCheckoutElement(s)):i("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(o),g.zonosController=o,t("Zonos controller injected!")},$.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const s=`${g.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${s}"]`))return void t(`Zonos script "${s}" already exists in the document`,"warn");const r=document.head||document.body,c=document.createElement("script");n?c.type="module":c.noModule=!0,c.src=s,c.crossOrigin="anonymous",c.onerror=()=>{i(`Failed to load ${c.src}`);const t=m(e);t&&g.injectScript({cdnType:t,isModule:n,theRestUrl:o})},r.appendChild(c)},$.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return O;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.144";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.144";case"vercel":return S}};return g.isNpm&&p()||n()},$.injectZonosCdn=()=>{g.injectScript({cdnType:u,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),g.injectScript({cdnType:u,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),t("Zonos cdn script injected!")},$.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const t=g.getZonosUrl(e),o=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${S}/`,o.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${t}/${n}`,r.onerror=()=>{i(`Failed to load ${r.href}`);const t=m(e);t&&g.injectStylesheet({cdnType:t,theRestUrl:n})},o.appendChild(r)},$.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?t("Zonos style links already injected","warn"):(g.injectStylesheet({cdnType:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),t("Zonos style css injected!"))},$.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${k}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!b.test(t.href))return t}return null})())return void t("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=k,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${k}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),t("Zonos font injected!")},$.setupGoogleFont=e=>{var n;null===(n=g.zonosController)||void 0===n||n.setupGoogleFont(e)},$.injectSupportGoogleFont=e=>{var n;t(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${k}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=k,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t(`[FONT] ${o} font already injected`,"warn");const i=document.createElement("link");i.rel="stylesheet",i.href=e,s.appendChild(i),t(`[FONT] ${o} font injected!`)};export{$ as Zonos}
|