@zonos/elements 1.3.143 → 1.3.145
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/{cart-6ac8dc06.js → cart-9d5e2816.js} +296 -41
- 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 +12 -11
- package/dist/cjs/{isDarkColor-434d71dd.js → isDarkColor-2acf30d1.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{paypal-ea8b4ca0.js → paypal-f9015045.js} +4 -4
- package/dist/cjs/zonos-address_8.cjs.entry.js +96 -18
- 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 +128 -30
- package/dist/cjs/zonos-checkout.cjs.entry.js +47 -27
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +31 -10
- package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +6 -6
- 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} +86 -8
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +7 -7
- 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 +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-8971eb65.js → zonosStore-46809186.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -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 +73 -18
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +10 -0
- 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 +3 -3
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +52 -8
- package/dist/collection/components/common/zonos-text/zonos-text.js +8 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +4 -0
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +4 -0
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -0
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +10 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +6 -0
- 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 +7 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -2
- package/dist/collection/components/main/zonos-controller.js +30 -5
- package/dist/collection/components/store/checkout/cart.js +3 -0
- package/dist/collection/components/store/checkout/stripe.js +112 -39
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +6 -0
- 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/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/api/PlaceTestOrder.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +13 -1
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/{CheckoutConfig-262008fe.js → CheckoutConfig-573bd959.js} +13 -3
- package/dist/esm/{cart-acba54d0.js → cart-887f7d66.js} +296 -41
- 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 +13 -12
- package/dist/esm/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{paypal-3401f757.js → paypal-6fd5749b.js} +4 -4
- package/dist/esm/zonos-address_8.entry.js +96 -18
- 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 +126 -28
- package/dist/esm/zonos-checkout.entry.js +45 -25
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +31 -10
- package/dist/esm/zonos-country-flag.entry.js +6 -6
- package/dist/esm/zonos-country-select_4.entry.js +6 -6
- package/dist/esm/zonos-elements.js +4 -4
- package/dist/esm/{zonos-notification_3.entry.js → zonos-empty-state-payment_4.entry.js} +86 -9
- package/dist/esm/zonos-hello-dialog.entry.js +7 -7
- 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 +2 -2
- package/dist/esm/zonos-tooltip.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
- package/dist/esm-es5/CheckoutConfig-573bd959.js +1 -0
- package/dist/esm-es5/cart-887f7d66.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-3401f757.js → paypal-6fd5749b.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- 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 +61 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/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/common/zonos-stripe-input/zonos-stripe-input.d.ts +7 -3
- package/dist/types/components/main/zonos-controller.d.ts +1 -0
- package/dist/types/components/store/checkout/cart.d.ts +5 -0
- package/dist/types/components/store/checkout/stripe.d.ts +8 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +6 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- 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 +61 -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.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 +87 -12
- package/dist/types/types/generated/graphql.internal.types.ts +104 -14
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-d3867033.entry.js → p-0028d158.entry.js} +1 -1
- package/dist/zonos-elements/{p-54058b57.entry.js → p-05013308.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e84f647.system.entry.js → p-0e9826d2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c0164a3c.system.js → p-12546668.system.js} +1 -1
- package/dist/zonos-elements/p-18e5b741.system.js +1 -0
- package/dist/zonos-elements/{p-f2d07062.entry.js → p-1d466ac6.entry.js} +1 -1
- package/dist/zonos-elements/{p-654fc23d.system.entry.js → p-2e6265cc.system.entry.js} +1 -1
- 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-8ac02349.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-2ab5e362.system.entry.js → p-3bd17598.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-3f282167.system.entry.js +1 -0
- package/dist/zonos-elements/{p-381874b0.system.entry.js → p-41e26cc4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -0
- package/dist/zonos-elements/p-49b8760c.system.entry.js +1 -0
- package/dist/zonos-elements/p-4caffd96.system.js +2 -0
- package/dist/zonos-elements/{p-0ab29580.entry.js → p-4d353108.entry.js} +1 -1
- package/dist/zonos-elements/p-595f5dd2.js +1 -0
- package/dist/zonos-elements/{p-a4f045d4.js → p-5e4b6b77.js} +1 -1
- package/dist/zonos-elements/{p-4c7f0417.entry.js → p-5e76c269.entry.js} +1 -1
- package/dist/zonos-elements/{p-2761ad55.system.entry.js → p-619c07c6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9d7a860c.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-df9c0bfa.system.entry.js → p-794b2d24.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-44dd4269.entry.js → p-7f288336.entry.js} +1 -1
- package/dist/zonos-elements/{p-78e4f877.system.entry.js → p-81084be5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-81a5dd5c.js +1 -0
- package/dist/zonos-elements/{p-0b5c9f89.system.js → p-826b5d0c.system.js} +1 -1
- package/dist/zonos-elements/{p-33e1d25e.system.entry.js → p-86e825f0.system.entry.js} +1 -1
- package/dist/zonos-elements/p-896dca32.entry.js +1 -0
- package/dist/zonos-elements/{p-d9511c4a.entry.js → p-9024f5a1.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-98db517b.entry.js +1 -0
- package/dist/zonos-elements/p-9ae29c27.system.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-ab68ad11.js +2 -0
- package/dist/zonos-elements/{p-4b685549.js → p-b0616716.js} +1 -1
- package/dist/zonos-elements/p-b0ced00a.system.js +1 -0
- package/dist/zonos-elements/{p-1e3ea4ae.entry.js → p-b12fbc07.entry.js} +1 -1
- package/dist/zonos-elements/p-b18c4d1d.js +1 -0
- package/dist/zonos-elements/{p-dba6147b.system.entry.js → p-b2292b70.system.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-b4823b13.entry.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-0db28495.system.entry.js → p-b7a40db9.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-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-3f991022.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-b0174a8f.js → p-e02fd9ae.js} +1 -1
- package/dist/zonos-elements/p-e3abf96c.system.entry.js +1 -0
- package/dist/zonos-elements/p-e4d509be.entry.js +1 -0
- package/dist/zonos-elements/{p-ab6973a5.entry.js → p-e8926f59.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a8862a6.system.entry.js → p-e8c70c7d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f0c8150e.js +1 -0
- package/dist/zonos-elements/p-f824a75f.entry.js +1 -0
- package/dist/zonos-elements/{p-d5a3851d.system.entry.js → p-fc4ebe6b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fdb592a8.system.js +1 -0
- package/dist/zonos-elements/p-fec7bdd4.system.entry.js +1 -0
- 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-acba54d0.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-notification_3.entry.js +0 -1
- package/dist/zonos-elements/p-1198c874.entry.js +0 -1
- package/dist/zonos-elements/p-1460f917.js +0 -1
- package/dist/zonos-elements/p-302f5d25.entry.js +0 -1
- package/dist/zonos-elements/p-386325ae.system.js +0 -1
- package/dist/zonos-elements/p-38d0c496.system.entry.js +0 -1
- package/dist/zonos-elements/p-64372f93.system.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-8e30228d.system.entry.js +0 -1
- package/dist/zonos-elements/p-8f26cc7e.entry.js +0 -1
- package/dist/zonos-elements/p-9da2d116.entry.js +0 -1
- package/dist/zonos-elements/p-a08ea336.js +0 -1
- package/dist/zonos-elements/p-a5b294d7.js +0 -1
- package/dist/zonos-elements/p-b2ea7adb.entry.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-c437d76c.system.js +0 -1
- package/dist/zonos-elements/p-d1afd314.system.entry.js +0 -1
- package/dist/zonos-elements/p-e9964a5a.system.js +0 -1
- package/dist/zonos-elements/p-f9aef1fc.system.entry.js +0 -1
- package/dist/zonos-elements/p-fa538a74.system.entry.js +0 -1
|
@@ -173,6 +173,9 @@ export const stringsPortuguese = {
|
|
|
173
173
|
'No countries found': {
|
|
174
174
|
value: 'Nenhum país encontrado',
|
|
175
175
|
},
|
|
176
|
+
'No payment method needed for staging': {
|
|
177
|
+
value: 'Nenhum método de pagamento necessário para encenação',
|
|
178
|
+
},
|
|
176
179
|
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
177
180
|
value: 'Nenhuma classificação de envio selecionada. Por favor, volte para a etapa de "Envio" e selecione uma classificação de envio para prosseguir.',
|
|
178
181
|
},
|
|
@@ -230,6 +233,9 @@ export const stringsPortuguese = {
|
|
|
230
233
|
'Phone number': {
|
|
231
234
|
value: 'Número de telefone',
|
|
232
235
|
},
|
|
236
|
+
'Place test order': {
|
|
237
|
+
value: 'Fazer pedido de teste',
|
|
238
|
+
},
|
|
233
239
|
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
234
240
|
value: 'Por favor, certifique-se de que seu texto utilize apenas o alfabeto latino (A-Z, a-z).',
|
|
235
241
|
},
|
|
@@ -332,6 +338,9 @@ export const stringsPortuguese = {
|
|
|
332
338
|
'Spend [threshold] tax free.': {
|
|
333
339
|
value: 'Gaste [threshold] livre de impostos.',
|
|
334
340
|
},
|
|
341
|
+
'Staging mode': {
|
|
342
|
+
value: 'Modo de encenação',
|
|
343
|
+
},
|
|
335
344
|
State: {
|
|
336
345
|
value: 'Estado',
|
|
337
346
|
},
|
|
@@ -173,6 +173,9 @@ export const stringsRussian = {
|
|
|
173
173
|
'No countries found': {
|
|
174
174
|
value: 'Страны не найдены',
|
|
175
175
|
},
|
|
176
|
+
'No payment method needed for staging': {
|
|
177
|
+
value: 'Для постановки не требуется способ оплаты',
|
|
178
|
+
},
|
|
176
179
|
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
177
180
|
value: 'Не выбран рейтинг доставки. Пожалуйста, вернитесь к шагу "Доставка" и выберите рейтинг доставки, чтобы продолжить.',
|
|
178
181
|
},
|
|
@@ -230,6 +233,9 @@ export const stringsRussian = {
|
|
|
230
233
|
'Phone number': {
|
|
231
234
|
value: 'Номер телефона',
|
|
232
235
|
},
|
|
236
|
+
'Place test order': {
|
|
237
|
+
value: 'Разместить тестовый заказ',
|
|
238
|
+
},
|
|
233
239
|
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
234
240
|
value: 'Пожалуйста, убедитесь, что ваш текст использует только латинский алфавит (A-Z, a-z).',
|
|
235
241
|
},
|
|
@@ -332,6 +338,9 @@ export const stringsRussian = {
|
|
|
332
338
|
'Spend [threshold] tax free.': {
|
|
333
339
|
value: 'Тратьте [threshold] без налогов.',
|
|
334
340
|
},
|
|
341
|
+
'Staging mode': {
|
|
342
|
+
value: 'Режим постановки',
|
|
343
|
+
},
|
|
335
344
|
State: {
|
|
336
345
|
value: 'Штат',
|
|
337
346
|
},
|
|
@@ -173,6 +173,9 @@ export const stringsSpanish = {
|
|
|
173
173
|
'No countries found': {
|
|
174
174
|
value: 'No se encontraron países',
|
|
175
175
|
},
|
|
176
|
+
'No payment method needed for staging': {
|
|
177
|
+
value: 'No se necesita método de pago para la puesta en escena',
|
|
178
|
+
},
|
|
176
179
|
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
177
180
|
value: 'No se ha seleccionado una calificación de envío. Por favor, regrese al paso de "Envío" y seleccione una calificación de envío para continuar.',
|
|
178
181
|
},
|
|
@@ -230,6 +233,9 @@ export const stringsSpanish = {
|
|
|
230
233
|
'Phone number': {
|
|
231
234
|
value: 'Número de teléfono',
|
|
232
235
|
},
|
|
236
|
+
'Place test order': {
|
|
237
|
+
value: 'Realizar pedido de prueba',
|
|
238
|
+
},
|
|
233
239
|
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
234
240
|
value: 'Por favor, asegúrese de que su texto use solo el alfabeto latino (A-Z, a-z).',
|
|
235
241
|
},
|
|
@@ -332,6 +338,9 @@ export const stringsSpanish = {
|
|
|
332
338
|
'Spend [threshold] tax free.': {
|
|
333
339
|
value: 'Gasta [threshold] libre de impuestos.',
|
|
334
340
|
},
|
|
341
|
+
'Staging mode': {
|
|
342
|
+
value: 'Modo de ensayo',
|
|
343
|
+
},
|
|
335
344
|
State: {
|
|
336
345
|
value: 'Estado',
|
|
337
346
|
},
|
|
@@ -173,6 +173,9 @@ export const stringsSwedish = {
|
|
|
173
173
|
'No countries found': {
|
|
174
174
|
value: 'Inga länder hittades',
|
|
175
175
|
},
|
|
176
|
+
'No payment method needed for staging': {
|
|
177
|
+
value: 'Ingen betalningsmetod behövs för iscensättning',
|
|
178
|
+
},
|
|
176
179
|
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
177
180
|
value: 'Ingen fraktbedömning vald. Gå tillbaka till steget "Frakt" och välj en fraktbedömning för att fortsätta.',
|
|
178
181
|
},
|
|
@@ -230,6 +233,9 @@ export const stringsSwedish = {
|
|
|
230
233
|
'Phone number': {
|
|
231
234
|
value: 'Telefonnummer',
|
|
232
235
|
},
|
|
236
|
+
'Place test order': {
|
|
237
|
+
value: 'Lägg testorder',
|
|
238
|
+
},
|
|
233
239
|
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
234
240
|
value: 'Vänligen se till att din text endast använder det latinska alfabetet (A-Z, a-z).',
|
|
235
241
|
},
|
|
@@ -332,6 +338,9 @@ export const stringsSwedish = {
|
|
|
332
338
|
'Spend [threshold] tax free.': {
|
|
333
339
|
value: 'Spendera [threshold] skattefritt.',
|
|
334
340
|
},
|
|
341
|
+
'Staging mode': {
|
|
342
|
+
value: 'Staging-läge',
|
|
343
|
+
},
|
|
335
344
|
State: {
|
|
336
345
|
value: 'Stat',
|
|
337
346
|
},
|
|
@@ -173,6 +173,9 @@ export const stringsTurkish = {
|
|
|
173
173
|
'No countries found': {
|
|
174
174
|
value: 'Ülke bulunamadı',
|
|
175
175
|
},
|
|
176
|
+
'No payment method needed for staging': {
|
|
177
|
+
value: 'Sahneleme için ödeme yöntemi gerekmez',
|
|
178
|
+
},
|
|
176
179
|
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
177
180
|
value: 'Gönderi derecelendirmesi seçilmedi. Lütfen "Kargo" adımına geri dönün ve devam etmek için bir gönderi derecelendirmesi seçin.',
|
|
178
181
|
},
|
|
@@ -230,6 +233,9 @@ export const stringsTurkish = {
|
|
|
230
233
|
'Phone number': {
|
|
231
234
|
value: 'Telefon numarası',
|
|
232
235
|
},
|
|
236
|
+
'Place test order': {
|
|
237
|
+
value: 'Test siparişi ver',
|
|
238
|
+
},
|
|
233
239
|
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
234
240
|
value: 'Lütfen metninizin sadece Latin alfabesini kullandığından emin olun (A-Z, a-z).',
|
|
235
241
|
},
|
|
@@ -332,6 +338,9 @@ export const stringsTurkish = {
|
|
|
332
338
|
'Spend [threshold] tax free.': {
|
|
333
339
|
value: '[threshold] vergi ödemeden harcayın.',
|
|
334
340
|
},
|
|
341
|
+
'Staging mode': {
|
|
342
|
+
value: 'Sahneleme modu',
|
|
343
|
+
},
|
|
335
344
|
State: {
|
|
336
345
|
value: 'Eyalet',
|
|
337
346
|
},
|
|
@@ -173,6 +173,9 @@ export const stringsVietnamese = {
|
|
|
173
173
|
'No countries found': {
|
|
174
174
|
value: 'Không tìm thấy quốc gia nào',
|
|
175
175
|
},
|
|
176
|
+
'No payment method needed for staging': {
|
|
177
|
+
value: 'Không cần phương thức thanh toán cho dàn dựng',
|
|
178
|
+
},
|
|
176
179
|
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
177
180
|
value: 'Chưa chọn đánh giá vận chuyển. Vui lòng quay lại bước "Vận chuyển" và chọn đánh giá vận chuyển để tiếp tục.',
|
|
178
181
|
},
|
|
@@ -230,6 +233,9 @@ export const stringsVietnamese = {
|
|
|
230
233
|
'Phone number': {
|
|
231
234
|
value: 'Số điện thoại',
|
|
232
235
|
},
|
|
236
|
+
'Place test order': {
|
|
237
|
+
value: 'Đặt hàng thử',
|
|
238
|
+
},
|
|
233
239
|
'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
|
|
234
240
|
value: 'Vui lòng đảm bảo rằng văn bản của bạn chỉ sử dụng bảng chữ cái Latinh (A-Z, a-z).',
|
|
235
241
|
},
|
|
@@ -332,6 +338,9 @@ export const stringsVietnamese = {
|
|
|
332
338
|
'Spend [threshold] tax free.': {
|
|
333
339
|
value: 'Chi tiêu [threshold] miễn thuế.',
|
|
334
340
|
},
|
|
341
|
+
'Staging mode': {
|
|
342
|
+
value: 'Chế độ dàn dựng',
|
|
343
|
+
},
|
|
335
344
|
State: {
|
|
336
345
|
value: 'Bang',
|
|
337
346
|
},
|
|
@@ -168,6 +168,8 @@ export class ZonosAddress {
|
|
|
168
168
|
"tags": [],
|
|
169
169
|
"text": "The type of address element to render"
|
|
170
170
|
},
|
|
171
|
+
"getter": false,
|
|
172
|
+
"setter": false,
|
|
171
173
|
"attribute": "type",
|
|
172
174
|
"reflect": false
|
|
173
175
|
},
|
|
@@ -185,6 +187,8 @@ export class ZonosAddress {
|
|
|
185
187
|
"tags": [],
|
|
186
188
|
"text": "The title text for the address element"
|
|
187
189
|
},
|
|
190
|
+
"getter": false,
|
|
191
|
+
"setter": false,
|
|
188
192
|
"attribute": "title-text",
|
|
189
193
|
"reflect": false
|
|
190
194
|
},
|
|
@@ -208,6 +212,8 @@ export class ZonosAddress {
|
|
|
208
212
|
"tags": [],
|
|
209
213
|
"text": "Default address for stripe"
|
|
210
214
|
},
|
|
215
|
+
"getter": false,
|
|
216
|
+
"setter": false,
|
|
211
217
|
"defaultValue": "null"
|
|
212
218
|
}
|
|
213
219
|
};
|
package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js
CHANGED
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { h, Host, } from "@stencil/core";
|
|
3
|
+
import { cartStore } from "../../store/checkout/cart";
|
|
3
4
|
import { stripeStore } from "../../store/checkout/stripe";
|
|
4
5
|
import { translate } from "../../store/translationStore";
|
|
5
6
|
import { getBorderRadius } from "../../utils/getBorderRadius";
|
|
6
7
|
import { logError } from "../../utils/logging/logError";
|
|
8
|
+
import { validateEmailValue } from "../../utils/validateEmailValue";
|
|
7
9
|
/**
|
|
8
10
|
* This component is a wrapper for the stripe authentication element that would render default style object
|
|
9
11
|
*/
|
|
10
12
|
export class ZonosLinkAuthentication {
|
|
11
13
|
constructor() {
|
|
14
|
+
this.setCustomEmailInputToLinkEvent = (emailValue) => {
|
|
15
|
+
// check if the email is valid
|
|
16
|
+
const isValid = validateEmailValue(emailValue);
|
|
17
|
+
const simulateLinkEvent = {
|
|
18
|
+
complete: !!isValid,
|
|
19
|
+
elementType: 'linkAuthentication',
|
|
20
|
+
empty: !emailValue,
|
|
21
|
+
value: {
|
|
22
|
+
email: emailValue,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
stripeStore.stripeLinkEventData = simulateLinkEvent;
|
|
26
|
+
};
|
|
27
|
+
this.handleNormalEmailInput = (event) => {
|
|
28
|
+
var _a;
|
|
29
|
+
const inputValue = event.detail;
|
|
30
|
+
this.setCustomEmailInputToLinkEvent(inputValue);
|
|
31
|
+
(_a = this.linkAuthenticationChange) === null || _a === void 0 ? void 0 : _a.emit();
|
|
32
|
+
};
|
|
12
33
|
this.titleText = undefined;
|
|
13
34
|
this.defaultEmail = null;
|
|
14
35
|
this.isEmailError = false;
|
|
15
36
|
this.stripe = stripeStore.stripe;
|
|
37
|
+
this.isStagingMode = cartStore.isStagingMode;
|
|
38
|
+
this.clientSecret = stripeStore.clientSecret;
|
|
39
|
+
}
|
|
40
|
+
watchIsStagingMode() {
|
|
41
|
+
// Wait for the DOM to be ready before re-initializing Link element
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
this.watchInitStripe();
|
|
44
|
+
}, 0);
|
|
16
45
|
}
|
|
17
46
|
watchInitStripe() {
|
|
18
47
|
if (!this.stripe || !stripeStore.stripeElements) {
|
|
19
48
|
return;
|
|
20
49
|
}
|
|
50
|
+
// No need to initialize link if this is staging mode since we will render the email input field
|
|
51
|
+
if (cartStore.isStagingMode) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
21
54
|
const defaultValues = this.defaultEmail
|
|
22
55
|
? {
|
|
23
56
|
email: this.defaultEmail,
|
|
@@ -41,15 +74,46 @@ export class ZonosLinkAuthentication {
|
|
|
41
74
|
});
|
|
42
75
|
stripeStore.stripeLinkElement = linkAuthenticationElement;
|
|
43
76
|
}
|
|
77
|
+
watchDefaultEmail() {
|
|
78
|
+
if (!this.defaultEmail) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.setCustomEmailInputToLinkEvent(this.defaultEmail);
|
|
82
|
+
}
|
|
44
83
|
componentDidLoad() {
|
|
45
84
|
// @Watch doesn't get trigger on initial load
|
|
46
85
|
this.watchInitStripe();
|
|
86
|
+
if (!this.defaultEmail) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
// set default email value to stripeLinkEventData if default email is provided
|
|
90
|
+
this.setCustomEmailInputToLinkEvent(this.defaultEmail);
|
|
47
91
|
}
|
|
48
92
|
render() {
|
|
93
|
+
this.isStagingMode = cartStore.isStagingMode;
|
|
94
|
+
this.clientSecret = stripeStore.clientSecret;
|
|
95
|
+
const renderEmailAddress = () => {
|
|
96
|
+
var _a;
|
|
97
|
+
if (cartStore.isStagingMode) {
|
|
98
|
+
return (h("zonos-stripe-input", { inputLabel: translate('Email'), inputValue: this.defaultEmail ||
|
|
99
|
+
((_a = stripeStore.stripeLinkEventData) === null || _a === void 0 ? void 0 : _a.value.email) ||
|
|
100
|
+
'', isError: this.isEmailError, onBlur: () => {
|
|
101
|
+
var _a;
|
|
102
|
+
const emailValue = ((_a = stripeStore.stripeLinkEventData) === null || _a === void 0 ? void 0 : _a.value.email) || '';
|
|
103
|
+
if (!emailValue) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
// check if the email is valid
|
|
107
|
+
const isValid = validateEmailValue(emailValue);
|
|
108
|
+
this.isEmailError = !isValid;
|
|
109
|
+
}, onInputChange: this.handleNormalEmailInput }));
|
|
110
|
+
}
|
|
111
|
+
return (h("div", { class: `zonos--link-authentication-component ${this.isEmailError && 'zonos--input-invalid'}` }));
|
|
112
|
+
};
|
|
49
113
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
50
|
-
return (h(Host, {
|
|
114
|
+
return (h(Host, { class: "zonos--link-authentication zonos--elements", style: {
|
|
51
115
|
'--zonos--border-radius': getBorderRadius(),
|
|
52
|
-
} }, h("zonos-text", {
|
|
116
|
+
} }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText), renderEmailAddress(), this.isEmailError && (h("zonos-text", { textColor: "red-600" }, translate('Please enter a valid email address.')))));
|
|
53
117
|
}
|
|
54
118
|
static get is() { return "zonos-link-authentication"; }
|
|
55
119
|
static get encapsulation() { return "scoped"; }
|
|
@@ -79,6 +143,8 @@ export class ZonosLinkAuthentication {
|
|
|
79
143
|
"tags": [],
|
|
80
144
|
"text": "The title text for the authentication element"
|
|
81
145
|
},
|
|
146
|
+
"getter": false,
|
|
147
|
+
"setter": false,
|
|
82
148
|
"attribute": "title-text",
|
|
83
149
|
"reflect": false
|
|
84
150
|
},
|
|
@@ -96,6 +162,8 @@ export class ZonosLinkAuthentication {
|
|
|
96
162
|
"tags": [],
|
|
97
163
|
"text": "Default email for stripe"
|
|
98
164
|
},
|
|
165
|
+
"getter": false,
|
|
166
|
+
"setter": false,
|
|
99
167
|
"attribute": "default-email",
|
|
100
168
|
"reflect": false,
|
|
101
169
|
"defaultValue": "null"
|
|
@@ -114,6 +182,8 @@ export class ZonosLinkAuthentication {
|
|
|
114
182
|
"tags": [],
|
|
115
183
|
"text": "Email error text to dispaly"
|
|
116
184
|
},
|
|
185
|
+
"getter": false,
|
|
186
|
+
"setter": false,
|
|
117
187
|
"attribute": "is-email-error",
|
|
118
188
|
"reflect": false,
|
|
119
189
|
"defaultValue": "false"
|
|
@@ -122,7 +192,9 @@ export class ZonosLinkAuthentication {
|
|
|
122
192
|
}
|
|
123
193
|
static get states() {
|
|
124
194
|
return {
|
|
125
|
-
"stripe": {}
|
|
195
|
+
"stripe": {},
|
|
196
|
+
"isStagingMode": {},
|
|
197
|
+
"clientSecret": {}
|
|
126
198
|
};
|
|
127
199
|
}
|
|
128
200
|
static get events() {
|
|
@@ -146,8 +218,17 @@ export class ZonosLinkAuthentication {
|
|
|
146
218
|
static get elementRef() { return "el"; }
|
|
147
219
|
static get watchers() {
|
|
148
220
|
return [{
|
|
221
|
+
"propName": "isStagingMode",
|
|
222
|
+
"methodName": "watchIsStagingMode"
|
|
223
|
+
}, {
|
|
149
224
|
"propName": "stripe",
|
|
150
225
|
"methodName": "watchInitStripe"
|
|
226
|
+
}, {
|
|
227
|
+
"propName": "clientSecret",
|
|
228
|
+
"methodName": "watchInitStripe"
|
|
229
|
+
}, {
|
|
230
|
+
"propName": "defaultEmail",
|
|
231
|
+
"methodName": "watchDefaultEmail"
|
|
151
232
|
}];
|
|
152
233
|
}
|
|
153
234
|
}
|
|
@@ -36,7 +36,7 @@ export class ZonosPayment {
|
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '2d664521944c4f02f34fe3130f8ebb853e562476', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: '11f683a0f6094d801103a9f04054d038b405718f', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '0c962441697499b3a7eb279175ce025d76d4c0fa', class: "zonos--payment-component" }), h("div", { key: 'a96af74f05521fcccc1912c0ec1dcbe64cfc1ae7', class: "zonos--payment-paypal-container" })));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "zonos-payment"; }
|
|
42
42
|
static get encapsulation() { return "scoped"; }
|
|
@@ -66,6 +66,8 @@ export class ZonosPayment {
|
|
|
66
66
|
"tags": [],
|
|
67
67
|
"text": "The title text for the authentication element"
|
|
68
68
|
},
|
|
69
|
+
"getter": false,
|
|
70
|
+
"setter": false,
|
|
69
71
|
"attribute": "title-text",
|
|
70
72
|
"reflect": false
|
|
71
73
|
}
|
|
@@ -7,7 +7,7 @@ export const getCheckoutSession = async () => {
|
|
|
7
7
|
json: null,
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
const searchParams = new URLSearchParams(
|
|
10
|
+
const searchParams = new URLSearchParams();
|
|
11
11
|
searchParams.set('checkoutSessionId', cartStore.checkoutSessionId);
|
|
12
12
|
const { errors, json } = await handleFetch(`/api/zonos-elements/get-checkout-session?${searchParams.toString()}`);
|
|
13
13
|
return { errors, json };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cartStore } from "../../store/checkout/cart";
|
|
2
|
+
import { handleFetch } from "../handleFetch";
|
|
3
|
+
import { logError } from "../logging/logError";
|
|
4
|
+
export const placeTestOrder = async () => {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
const shipToPartyId = (_a = cartStore.partiesData.find(party => party.type === 'DESTINATION')) === null || _a === void 0 ? void 0 : _a.id;
|
|
7
|
+
const billToPartyId = (_b = cartStore.partiesData.find(party => party.type === 'PAYOR')) === null || _b === void 0 ? void 0 : _b.id;
|
|
8
|
+
const checkoutSessionId = cartStore.checkoutSessionId;
|
|
9
|
+
if (!checkoutSessionId || !billToPartyId || !shipToPartyId) {
|
|
10
|
+
logError('Missing required data', {
|
|
11
|
+
billToPartyId,
|
|
12
|
+
checkoutSessionId,
|
|
13
|
+
shipToPartyId,
|
|
14
|
+
});
|
|
15
|
+
return {
|
|
16
|
+
errors: ['Missing required data'],
|
|
17
|
+
json: null,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const payload = {
|
|
21
|
+
billToPartyId,
|
|
22
|
+
checkoutSessionId,
|
|
23
|
+
shipToPartyId,
|
|
24
|
+
};
|
|
25
|
+
const { errors, json } = await handleFetch('/api/zonos-elements/place-test-order', {
|
|
26
|
+
body: payload,
|
|
27
|
+
method: 'POST',
|
|
28
|
+
});
|
|
29
|
+
if (errors.length || !json) {
|
|
30
|
+
logError('Error occurs when placing test order', errors);
|
|
31
|
+
return {
|
|
32
|
+
errors: errors.map(error => error.message),
|
|
33
|
+
json: null,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
errors: [],
|
|
38
|
+
json,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getIsStagingMode = () => window.location.search.includes('zonosStagingMode=1');
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export const getIsTestMode = () => {
|
|
1
|
+
export const getIsTestMode = () => {
|
|
2
|
+
var _a;
|
|
3
|
+
return ((_a = window.Zonos.zonosApiKey) === null || _a === void 0 ? void 0 : _a.includes('test')) ||
|
|
4
|
+
window.location.search.includes('zonosTestMode=1');
|
|
5
|
+
};
|
|
@@ -10,6 +10,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
+
import { getIsStagingMode } from "./checkout/getIsStagingMode";
|
|
14
|
+
import { getIsTestMode } from "./checkout/getIsTestMode";
|
|
13
15
|
import { fallbackApiList, getNextFallbackApiType, MAIN_BASE_API_TYPE, } from "./getNextFallbackApi";
|
|
14
16
|
import { jsonParse } from "./jsonParse";
|
|
15
17
|
import { log } from "./logging/log";
|
|
@@ -106,6 +108,23 @@ const handleRequest = async ({ basePathType, options, path, }) => {
|
|
|
106
108
|
response,
|
|
107
109
|
shouldThrow: true,
|
|
108
110
|
});
|
|
111
|
+
// Parse and access "errors" from the response if possible
|
|
112
|
+
if (data && 'errors' in data && Array.isArray(data.errors)) {
|
|
113
|
+
const errors = data.errors;
|
|
114
|
+
const mappedErrors = errors.map(error => {
|
|
115
|
+
if (typeof error === 'string') {
|
|
116
|
+
return { message: error, type: status };
|
|
117
|
+
}
|
|
118
|
+
return error;
|
|
119
|
+
});
|
|
120
|
+
return {
|
|
121
|
+
baseUrl,
|
|
122
|
+
errors: mappedErrors,
|
|
123
|
+
json: null,
|
|
124
|
+
response,
|
|
125
|
+
zonosMode,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
109
128
|
const message = JSON.stringify(data);
|
|
110
129
|
return {
|
|
111
130
|
baseUrl,
|
|
@@ -182,7 +201,9 @@ export const handleFetch = async (path, _opts) => {
|
|
|
182
201
|
const body = opts.body ? JSON.stringify(opts.body) : undefined;
|
|
183
202
|
const method = opts.method || 'GET';
|
|
184
203
|
// headers content type
|
|
185
|
-
const headers = Object.assign({ 'Content-Type': 'application/json', 'Zonos-Is-BigCommerce': window.Zonos.isBigCommerce.toString(), 'Zonos-Referer': window.location.hostname, 'Zonos-Version': window.Zonos.version, credentialtoken: window.Zonos.zonosApiKey || 'Empty credential token from zonos-elements' }, opts.headers);
|
|
204
|
+
const headers = Object.assign({ 'Content-Type': 'application/json', 'Zonos-Is-BigCommerce': window.Zonos.isBigCommerce.toString(), 'Zonos-Referer': window.location.hostname, 'Zonos-Staging-Mode': getIsStagingMode() ? '1' : undefined, 'Zonos-Test-Mode': getIsTestMode() ? '1' : undefined, 'Zonos-Version': window.Zonos.version, credentialtoken: window.Zonos.zonosApiKey || 'Empty credential token from zonos-elements' }, opts.headers);
|
|
205
|
+
// filter all underfined headers
|
|
206
|
+
Object.keys(headers).forEach(key => headers[key] === undefined && delete headers[key]);
|
|
186
207
|
const options = Object.assign(Object.assign({}, opts), { body: method === 'GET' ? undefined : body, headers,
|
|
187
208
|
method });
|
|
188
209
|
// This is for testing fallback API, set fallback API type to start with
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { getIsTestMode } from "../components/utils/checkout/getIsTestMode";
|
|
1
2
|
import { handleFetch } from "../components/utils/handleFetch";
|
|
2
3
|
import { log } from "../components/utils/logging/log";
|
|
3
4
|
export const getTempCartById = async ({ cartId, retries, }) => {
|
|
4
|
-
const
|
|
5
|
-
const isTestMode = urlParams.get('zonosTestMode') === '1';
|
|
5
|
+
const isTestMode = getIsTestMode();
|
|
6
6
|
const { errors, json } = await handleFetch('/api/zonos-elements/get-temp-cart', {
|
|
7
7
|
body: { isTestMode, tempCartUUID: cartId },
|
|
8
8
|
headers: {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getIsStagingMode } from "../components/utils/checkout/getIsStagingMode";
|
|
2
|
+
import { getIsTestMode } from "../components/utils/checkout/getIsTestMode";
|
|
1
3
|
import { handleFetch } from "../components/utils/handleFetch";
|
|
2
4
|
import { log } from "../components/utils/logging/log";
|
|
3
5
|
import { logError } from "../components/utils/logging/logError";
|
|
@@ -5,9 +7,10 @@ import { logError } from "../components/utils/logging/logError";
|
|
|
5
7
|
* Attempt to get test public credential to window.Zonos.zonosApiKey if needed
|
|
6
8
|
*/
|
|
7
9
|
export const getWithTestPublicCredential = async () => {
|
|
8
|
-
const isTestMode =
|
|
10
|
+
const isTestMode = getIsTestMode();
|
|
11
|
+
const isStagingMode = getIsStagingMode();
|
|
9
12
|
// Do nothing if the test mode is not enabled or the public credential
|
|
10
|
-
if (!isTestMode || !window.Zonos.zonosApiKey) {
|
|
13
|
+
if ((!isTestMode && !isStagingMode) || !window.Zonos.zonosApiKey) {
|
|
11
14
|
return null;
|
|
12
15
|
}
|
|
13
16
|
log('[ZONOS - loadZonos] Attempt test public credential', 'info');
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
const baseRe = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/;
|
|
2
2
|
const uuidRe = new RegExp(`^${baseRe.source}$`);
|
|
3
3
|
const cartUuidRe = new RegExp(`^cart_${baseRe.source}$`);
|
|
4
|
+
const tsidRe = /^[a-zA-Z0-9]{2,}$/;
|
|
5
|
+
const cartTsidRe = /^cart_[a-zA-Z0-9]{2,}$/;
|
|
4
6
|
export const _getIsValidCartId = (cartId) => {
|
|
5
7
|
if (!cartId) {
|
|
6
8
|
return { isDgsCartId: false, isLegacyCartId: false };
|
|
7
9
|
}
|
|
10
|
+
if (cartId.includes('undefined')) {
|
|
11
|
+
return { isDgsCartId: false, isLegacyCartId: false };
|
|
12
|
+
}
|
|
13
|
+
if (cartTsidRe.test(cartId)) {
|
|
14
|
+
return { isDgsCartId: true, isLegacyCartId: false };
|
|
15
|
+
}
|
|
16
|
+
if (tsidRe.test(cartId)) {
|
|
17
|
+
return { isDgsCartId: false, isLegacyCartId: true };
|
|
18
|
+
}
|
|
8
19
|
if (cartUuidRe.test(cartId)) {
|
|
9
20
|
return { isDgsCartId: true, isLegacyCartId: false };
|
|
10
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -86,7 +86,7 @@ export const amountDetailSubtotalType = {
|
|
|
86
86
|
Shipping: 'SHIPPING',
|
|
87
87
|
Tax: 'TAX',
|
|
88
88
|
};
|
|
89
|
-
export const
|
|
89
|
+
export const amountDetailTarget = {
|
|
90
90
|
BillingCompany: 'BILLING_COMPANY',
|
|
91
91
|
MerchantBase: 'MERCHANT_BASE',
|
|
92
92
|
MerchantProvided: 'MERCHANT_PROVIDED',
|
|
@@ -304,6 +304,10 @@ export const catalogStatus = {
|
|
|
304
304
|
Disabled: 'DISABLED',
|
|
305
305
|
Enabled: 'ENABLED',
|
|
306
306
|
};
|
|
307
|
+
export const checkoutSessionCreationModeType = {
|
|
308
|
+
WithPaymentIntent: 'WITH_PAYMENT_INTENT',
|
|
309
|
+
WithoutPaymentIntent: 'WITHOUT_PAYMENT_INTENT',
|
|
310
|
+
};
|
|
307
311
|
export const checkoutStatus = {
|
|
308
312
|
Disabled: 'DISABLED',
|
|
309
313
|
Enabled: 'ENABLED',
|
|
@@ -639,6 +643,7 @@ export const contentType = {
|
|
|
639
643
|
Csv: 'CSV',
|
|
640
644
|
};
|
|
641
645
|
export const controlType = {
|
|
646
|
+
Carrier: 'CARRIER',
|
|
642
647
|
Export: 'EXPORT',
|
|
643
648
|
Import: 'IMPORT',
|
|
644
649
|
};
|
|
@@ -1656,6 +1661,7 @@ export const landedCostMethod = {
|
|
|
1656
1661
|
DdpPreferred: 'DDP_PREFERRED',
|
|
1657
1662
|
};
|
|
1658
1663
|
export const landedCostQuoteType = {
|
|
1664
|
+
Api: 'API',
|
|
1659
1665
|
Auditing: 'AUDITING',
|
|
1660
1666
|
Checkout: 'CHECKOUT',
|
|
1661
1667
|
InclusivePrice: 'INCLUSIVE_PRICE',
|
|
@@ -2479,6 +2485,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
2479
2485
|
checkoutSessionCreate(variables, requestHeaders) {
|
|
2480
2486
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'checkoutSessionCreate', 'mutation');
|
|
2481
2487
|
},
|
|
2488
|
+
checkoutSessionPaymentIntentCreate(variables, requestHeaders) {
|
|
2489
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'checkoutSessionPaymentIntentCreate', 'mutation');
|
|
2490
|
+
},
|
|
2482
2491
|
checkoutSessionUpdate(variables, requestHeaders) {
|
|
2483
2492
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'checkoutSessionUpdate', 'mutation');
|
|
2484
2493
|
},
|
|
@@ -2524,6 +2533,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
2524
2533
|
onlineStoreSettings(variables, requestHeaders) {
|
|
2525
2534
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'onlineStoreSettings', 'query');
|
|
2526
2535
|
},
|
|
2536
|
+
orderCreate(variables, requestHeaders) {
|
|
2537
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'orderCreate', 'mutation');
|
|
2538
|
+
},
|
|
2527
2539
|
orderUpdateAccountOrderNumber(variables, requestHeaders) {
|
|
2528
2540
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'orderUpdateAccountOrderNumber', 'mutation');
|
|
2529
2541
|
},
|
|
@@ -6,6 +6,7 @@ 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';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { h as handleFetch, l as log,
|
|
1
|
+
import { g as getIsTestMode, h as handleFetch, l as log, b as logError } from './handleFetch-b4633675.js';
|
|
2
2
|
|
|
3
3
|
const getTempCartById = async ({ cartId, retries, }) => {
|
|
4
|
-
const
|
|
5
|
-
const isTestMode = urlParams.get('zonosTestMode') === '1';
|
|
4
|
+
const isTestMode = getIsTestMode();
|
|
6
5
|
const { errors, json } = await handleFetch('/api/zonos-elements/get-temp-cart', {
|
|
7
6
|
body: { isTestMode, tempCartUUID: cartId },
|
|
8
7
|
headers: {
|
|
@@ -28,10 +27,21 @@ const getTempCartById = async ({ cartId, retries, }) => {
|
|
|
28
27
|
const baseRe = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/;
|
|
29
28
|
const uuidRe = new RegExp(`^${baseRe.source}$`);
|
|
30
29
|
const cartUuidRe = new RegExp(`^cart_${baseRe.source}$`);
|
|
30
|
+
const tsidRe = /^[a-zA-Z0-9]{2,}$/;
|
|
31
|
+
const cartTsidRe = /^cart_[a-zA-Z0-9]{2,}$/;
|
|
31
32
|
const _getIsValidCartId = (cartId) => {
|
|
32
33
|
if (!cartId) {
|
|
33
34
|
return { isDgsCartId: false, isLegacyCartId: false };
|
|
34
35
|
}
|
|
36
|
+
if (cartId.includes('undefined')) {
|
|
37
|
+
return { isDgsCartId: false, isLegacyCartId: false };
|
|
38
|
+
}
|
|
39
|
+
if (cartTsidRe.test(cartId)) {
|
|
40
|
+
return { isDgsCartId: true, isLegacyCartId: false };
|
|
41
|
+
}
|
|
42
|
+
if (tsidRe.test(cartId)) {
|
|
43
|
+
return { isDgsCartId: false, isLegacyCartId: true };
|
|
44
|
+
}
|
|
35
45
|
if (cartUuidRe.test(cartId)) {
|
|
36
46
|
return { isDgsCartId: true, isLegacyCartId: false };
|
|
37
47
|
}
|