@zonos/elements 1.3.143 → 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/{cart-6ac8dc06.js → cart-2398abd4.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-7ed9dfb7.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 +36 -16
- 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 +8 -8
- 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 +62 -7
- 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 +7 -3
- 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-3427ee25.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-4e2f9753.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 +34 -14
- 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 +8 -8
- 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-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-3401f757.js → paypal-4e2f9753.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/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 +75 -2
- package/dist/types/types/generated/graphql.internal.types.ts +92 -4
- 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-ab6973a5.entry.js → p-00136c20.entry.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-0b5c9f89.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-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-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-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-0db28495.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-485d89a4.js +17 -0
- 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-d9511c4a.entry.js → p-50896f89.entry.js} +1 -1
- package/dist/zonos-elements/{p-38d0c496.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-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-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-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-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-2ab5e362.system.entry.js → p-9e05e259.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-df9c0bfa.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-dba6147b.system.entry.js → p-b2292b70.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b2ea7adb.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-654fc23d.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-4c7f0417.entry.js → p-d6061c79.entry.js} +1 -1
- package/dist/zonos-elements/p-da6a29e4.system.entry.js +1 -0
- 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-0ab29580.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-f2d07062.entry.js → p-e2f1fa53.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-9e84f647.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-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-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-a4f045d4.js +0 -17
- 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-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
|
@@ -66,6 +66,8 @@ export class ZonosCheckoutFooter {
|
|
|
66
66
|
"tags": [],
|
|
67
67
|
"text": "Override mobile mode"
|
|
68
68
|
},
|
|
69
|
+
"getter": false,
|
|
70
|
+
"setter": false,
|
|
69
71
|
"attribute": "mobile",
|
|
70
72
|
"reflect": false,
|
|
71
73
|
"defaultValue": "false"
|
|
@@ -90,6 +92,8 @@ export class ZonosCheckoutFooter {
|
|
|
90
92
|
"tags": [],
|
|
91
93
|
"text": "Theme to change the color of the logo"
|
|
92
94
|
},
|
|
95
|
+
"getter": false,
|
|
96
|
+
"setter": false,
|
|
93
97
|
"attribute": "data-theme",
|
|
94
98
|
"reflect": false
|
|
95
99
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { h, Host, } from "@stencil/core";
|
|
2
|
-
import { cartStore } from "../../../store/checkout/cart";
|
|
1
|
+
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
|
+
import { cartStore, cartStoreNextStep, } from "../../../store/checkout/cart";
|
|
3
3
|
import { paypalStore } from "../../../store/checkout/paypal";
|
|
4
4
|
import { stripeStore } from "../../../store/checkout/stripe";
|
|
5
5
|
import { translate } from "../../../store/translationStore";
|
|
6
|
+
import { zonosStore } from "../../../store/zonosStore";
|
|
7
|
+
import { placeTestOrder } from "../../../utils/api/placeTestOrder";
|
|
8
|
+
import { getIsStagingMode } from "../../../utils/checkout/getIsStagingMode";
|
|
6
9
|
import { getIsTestMode } from "../../../utils/checkout/getIsTestMode";
|
|
7
10
|
import { renderCheckoutCurrency } from "../../../utils/checkout/renderCheckoutCurrency";
|
|
11
|
+
import { isDarkColor } from "../../../utils/isDarkColor";
|
|
8
12
|
import { submitGtag } from "../../../utils/submitGtag";
|
|
9
13
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
10
14
|
import CheckmarkLineIcon from "./assets/CheckmarkLineIcon.svg";
|
|
@@ -36,11 +40,31 @@ export class ZonosCheckoutPayment {
|
|
|
36
40
|
type: 'success',
|
|
37
41
|
});
|
|
38
42
|
};
|
|
43
|
+
this.placeTestOrder = async () => {
|
|
44
|
+
this.internalContinueLoading = true;
|
|
45
|
+
const { errors } = await placeTestOrder();
|
|
46
|
+
if (errors.length) {
|
|
47
|
+
this.stagingOrderCreateErrorMessage =
|
|
48
|
+
errors[0] || 'Failed to create staging order. Please try again.';
|
|
49
|
+
this.internalContinueLoading = false;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.internalContinueLoading = false;
|
|
53
|
+
// continue to the next step
|
|
54
|
+
cartStoreNextStep();
|
|
55
|
+
};
|
|
39
56
|
this.submitBtnType = undefined;
|
|
40
57
|
this.continueLoading = false;
|
|
41
58
|
this.submitBtnColor = undefined;
|
|
59
|
+
this.isMobile = false;
|
|
60
|
+
this.overridePrimaryColor = undefined;
|
|
42
61
|
this.showErrorBanner = false;
|
|
43
62
|
this.hasStripePaymentError = false;
|
|
63
|
+
this.stagingOrderCreateErrorMessage = '';
|
|
64
|
+
this.internalContinueLoading = this.continueLoading;
|
|
65
|
+
}
|
|
66
|
+
continueLoadingWatcher() {
|
|
67
|
+
this.internalContinueLoading = this.continueLoading;
|
|
44
68
|
}
|
|
45
69
|
stripePaymentErrorWatcher() {
|
|
46
70
|
if (this.hasStripePaymentError) {
|
|
@@ -64,22 +88,39 @@ export class ZonosCheckoutPayment {
|
|
|
64
88
|
this.showErrorBanner = !this.handleValidate();
|
|
65
89
|
}
|
|
66
90
|
const isTestMode = getIsTestMode();
|
|
91
|
+
const isStagingMode = cartStore.isStagingMode || getIsStagingMode();
|
|
67
92
|
const isPaypalTabSelected = ((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.value.type) === 'external_paypal';
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
const renderPayment = () => {
|
|
94
|
+
if (isStagingMode) {
|
|
95
|
+
const { colorPrimary } = zonosStore.appearance;
|
|
96
|
+
const themeBasedColor = colorPrimary && isDarkColor(colorPrimary) ? 'DARK' : 'LIGHT';
|
|
97
|
+
// If in mobile, use the theme from the store since the UI is solely by theme
|
|
98
|
+
const theme = this.isMobile
|
|
99
|
+
? zonosStore.appearance.theme
|
|
100
|
+
: themeBasedColor;
|
|
101
|
+
return (h(Fragment, null, this.stagingOrderCreateErrorMessage && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, this.stagingOrderCreateErrorMessage)), h("zonos-empty-state-payment", { emptyStateText: translate('No payment method needed for staging'), theme: theme }), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.internalContinueLoading, onClick: () => {
|
|
102
|
+
void this.placeTestOrder();
|
|
103
|
+
}, size: "lg",
|
|
104
|
+
// use primary type when on mobile mode
|
|
105
|
+
variant: this.submitBtnType }, translate('Place test order')))));
|
|
106
|
+
}
|
|
107
|
+
return (h(Fragment, null, this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), this.hasStripePaymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, stripeStore.customErrorMessage ||
|
|
108
|
+
translate("We couldn't complete your payment. Please verify the payment details and try again."))), paypalStore.paypalErrorMessage && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, paypalStore.paypalErrorMessage)), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, !isPaypalTabSelected && (h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => {
|
|
109
|
+
this.continueClickHandler();
|
|
110
|
+
}, size: "lg",
|
|
111
|
+
// use primary type when on mobile mode
|
|
112
|
+
variant: this.submitBtnType }, translate('Pay [orderTotal]', {
|
|
113
|
+
orderTotal: renderCheckoutCurrency({
|
|
114
|
+
amount: cartStore.total,
|
|
115
|
+
isForeign: true,
|
|
116
|
+
}),
|
|
117
|
+
}))), h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
|
|
118
|
+
this.paypalSessionDone.emit(orderId);
|
|
119
|
+
}, onPaypalSessionFail: () => this.paypalSessionFailed.emit(), style: {
|
|
120
|
+
display: isPaypalTabSelected ? 'block' : 'none',
|
|
121
|
+
} })), isTestMode && (h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, h("zonos-v-stack", { spacing: 16 }, h("div", null, h("zonos-text", { type: "semiBoldLabel" }, translate('Test cards')), h("zonos-text", { textColor: "gray-700" }, translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), h("zonos-button", { icon: h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, translate('Success'), " (****4242)"), h("zonos-button", { icon: h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, translate('Failure'), " (****0002)")), h("zonos-notification", null)))));
|
|
122
|
+
};
|
|
123
|
+
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), renderPayment())));
|
|
83
124
|
}
|
|
84
125
|
static get is() { return "zonos-checkout-payment"; }
|
|
85
126
|
static get encapsulation() { return "scoped"; }
|
|
@@ -114,6 +155,8 @@ export class ZonosCheckoutPayment {
|
|
|
114
155
|
"tags": [],
|
|
115
156
|
"text": "Whether or not the checkout is in mobile mode"
|
|
116
157
|
},
|
|
158
|
+
"getter": false,
|
|
159
|
+
"setter": false,
|
|
117
160
|
"attribute": "submit-btn-type",
|
|
118
161
|
"reflect": false
|
|
119
162
|
},
|
|
@@ -131,6 +174,8 @@ export class ZonosCheckoutPayment {
|
|
|
131
174
|
"tags": [],
|
|
132
175
|
"text": "Whether or not the continue button is loading"
|
|
133
176
|
},
|
|
177
|
+
"getter": false,
|
|
178
|
+
"setter": false,
|
|
134
179
|
"attribute": "continue-loading",
|
|
135
180
|
"reflect": false,
|
|
136
181
|
"defaultValue": "false"
|
|
@@ -149,15 +194,58 @@ export class ZonosCheckoutPayment {
|
|
|
149
194
|
"tags": [],
|
|
150
195
|
"text": "Submit button main color"
|
|
151
196
|
},
|
|
197
|
+
"getter": false,
|
|
198
|
+
"setter": false,
|
|
152
199
|
"attribute": "submit-btn-color",
|
|
153
200
|
"reflect": false
|
|
201
|
+
},
|
|
202
|
+
"isMobile": {
|
|
203
|
+
"type": "boolean",
|
|
204
|
+
"mutable": false,
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "boolean",
|
|
207
|
+
"resolved": "boolean",
|
|
208
|
+
"references": {}
|
|
209
|
+
},
|
|
210
|
+
"required": false,
|
|
211
|
+
"optional": false,
|
|
212
|
+
"docs": {
|
|
213
|
+
"tags": [],
|
|
214
|
+
"text": "Whether or not the checkout is in mobile mode"
|
|
215
|
+
},
|
|
216
|
+
"getter": false,
|
|
217
|
+
"setter": false,
|
|
218
|
+
"attribute": "is-mobile",
|
|
219
|
+
"reflect": false,
|
|
220
|
+
"defaultValue": "false"
|
|
221
|
+
},
|
|
222
|
+
"overridePrimaryColor": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "string",
|
|
227
|
+
"resolved": "string | undefined",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": true,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Primary color to override primary color from appearance primary color in setting."
|
|
235
|
+
},
|
|
236
|
+
"getter": false,
|
|
237
|
+
"setter": false,
|
|
238
|
+
"attribute": "override-primary-color",
|
|
239
|
+
"reflect": false
|
|
154
240
|
}
|
|
155
241
|
};
|
|
156
242
|
}
|
|
157
243
|
static get states() {
|
|
158
244
|
return {
|
|
159
245
|
"showErrorBanner": {},
|
|
160
|
-
"hasStripePaymentError": {}
|
|
246
|
+
"hasStripePaymentError": {},
|
|
247
|
+
"stagingOrderCreateErrorMessage": {},
|
|
248
|
+
"internalContinueLoading": {}
|
|
161
249
|
};
|
|
162
250
|
}
|
|
163
251
|
static get events() {
|
|
@@ -211,6 +299,9 @@ export class ZonosCheckoutPayment {
|
|
|
211
299
|
static get elementRef() { return "ele"; }
|
|
212
300
|
static get watchers() {
|
|
213
301
|
return [{
|
|
302
|
+
"propName": "continueLoading",
|
|
303
|
+
"methodName": "continueLoadingWatcher"
|
|
304
|
+
}, {
|
|
214
305
|
"propName": "hasStripePaymentError",
|
|
215
306
|
"methodName": "stripePaymentErrorWatcher"
|
|
216
307
|
}];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">
|
|
3
|
+
<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>
|
|
4
|
+
</mask>
|
|
5
|
+
<g mask="url(#mask0_3739_19124)">
|
|
6
|
+
<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>
|
|
7
|
+
<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>
|
|
8
|
+
<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>
|
|
9
|
+
<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>
|
|
10
|
+
<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>
|
|
11
|
+
<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>
|
|
12
|
+
<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>
|
|
13
|
+
<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>
|
|
14
|
+
<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>
|
|
15
|
+
</g>
|
|
16
|
+
<defs>
|
|
17
|
+
<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">
|
|
18
|
+
<stop offset="0.25" stop-color="white" stop-opacity="0"/>
|
|
19
|
+
<stop offset="0.75" stop-color="white"/>
|
|
20
|
+
</radialGradient>
|
|
21
|
+
</defs>
|
|
22
|
+
</svg>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">
|
|
3
|
+
<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>
|
|
4
|
+
</mask>
|
|
5
|
+
<g mask="url(#mask0_3739_19125)">
|
|
6
|
+
<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>
|
|
7
|
+
<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>
|
|
8
|
+
<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>
|
|
9
|
+
<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>
|
|
10
|
+
<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>
|
|
11
|
+
<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>
|
|
12
|
+
<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>
|
|
13
|
+
<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>
|
|
14
|
+
<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>
|
|
15
|
+
</g>
|
|
16
|
+
<defs>
|
|
17
|
+
<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">
|
|
18
|
+
<stop offset="0.25" stop-color="white" stop-opacity="0"/>
|
|
19
|
+
<stop offset="0.75" stop-color="white"/>
|
|
20
|
+
</radialGradient>
|
|
21
|
+
</defs>
|
|
22
|
+
</svg>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: var(--zonos--font-family, Inter), Inter;
|
|
3
|
+
display: block;
|
|
4
|
+
white-space: normal;
|
|
5
|
+
}
|
|
6
|
+
:host * {
|
|
7
|
+
font-family: var(--zonos--font-family, Inter), Inter;
|
|
8
|
+
}
|
|
9
|
+
:host img {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
:host dl,
|
|
13
|
+
:host dd,
|
|
14
|
+
:host h1,
|
|
15
|
+
:host h2,
|
|
16
|
+
:host h3,
|
|
17
|
+
:host h4,
|
|
18
|
+
:host h5,
|
|
19
|
+
:host h6,
|
|
20
|
+
:host hr,
|
|
21
|
+
:host figure,
|
|
22
|
+
:host p,
|
|
23
|
+
:host pre {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* All sets of variable are here */
|
|
28
|
+
/* smooth font rendering */
|
|
29
|
+
:host {
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
-webkit-font-smoothing: antialiased;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
position: relative;
|
|
37
|
+
}
|
|
38
|
+
:host zonos-text {
|
|
39
|
+
position: absolute;
|
|
40
|
+
left: 0;
|
|
41
|
+
right: 0;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
top: 0;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
}
|
|
48
|
+
:host svg {
|
|
49
|
+
width: var(--zonos--width);
|
|
50
|
+
height: var(--zonos--height);
|
|
51
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { zonosStoreFontFamily } from "../../../../store/zonosStore";
|
|
3
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
4
|
+
import PaymentEmptyStateDarkIcon from "./assets/PaymentEmptyStateDarkIcon.svg";
|
|
5
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
6
|
+
import PaymentEmptyStateLightIcon from "./assets/PaymentEmptyStateLightIcon.svg";
|
|
7
|
+
export class ZonosEmptyStatePayment {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.emptyStateText = undefined;
|
|
10
|
+
this.theme = 'LIGHT';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
if (!this.el.shadowRoot) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
if (this.theme === 'DARK') {
|
|
17
|
+
this.el.shadowRoot.innerHTML = PaymentEmptyStateDarkIcon;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
this.el.shadowRoot.innerHTML = PaymentEmptyStateLightIcon;
|
|
21
|
+
}
|
|
22
|
+
return (h(Host, { class: "zonos--elements", style: {
|
|
23
|
+
'--zonos--font-family': zonosStoreFontFamily(),
|
|
24
|
+
'--zonos--height': `100%`,
|
|
25
|
+
'--zonos--width': `100%`,
|
|
26
|
+
} }, h("zonos-text", { type: "semiBoldLabel" }, this.emptyStateText)));
|
|
27
|
+
}
|
|
28
|
+
static get is() { return "zonos-empty-state-payment"; }
|
|
29
|
+
static get encapsulation() { return "shadow"; }
|
|
30
|
+
static get originalStyleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["zonos-empty-state-payment.scss"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get styleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["zonos-empty-state-payment.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get properties() {
|
|
41
|
+
return {
|
|
42
|
+
"emptyStateText": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "string",
|
|
47
|
+
"resolved": "string",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": true,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": "Text to display in the empty state"
|
|
55
|
+
},
|
|
56
|
+
"getter": false,
|
|
57
|
+
"setter": false,
|
|
58
|
+
"attribute": "empty-state-text",
|
|
59
|
+
"reflect": false
|
|
60
|
+
},
|
|
61
|
+
"theme": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "ElementsUiTheme",
|
|
66
|
+
"resolved": "\"DARK\" | \"LIGHT\" | \"SYSTEM\"",
|
|
67
|
+
"references": {
|
|
68
|
+
"ElementsUiTheme": {
|
|
69
|
+
"location": "import",
|
|
70
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
71
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiTheme"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": false,
|
|
76
|
+
"optional": false,
|
|
77
|
+
"docs": {
|
|
78
|
+
"tags": [],
|
|
79
|
+
"text": "Theme color of the icon"
|
|
80
|
+
},
|
|
81
|
+
"getter": false,
|
|
82
|
+
"setter": false,
|
|
83
|
+
"attribute": "theme",
|
|
84
|
+
"reflect": false,
|
|
85
|
+
"defaultValue": "'LIGHT'"
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
static get elementRef() { return "el"; }
|
|
90
|
+
}
|
|
@@ -8,6 +8,7 @@ import { getZonosStoreTheme, zonosStore, } from "../../store/zonosStore";
|
|
|
8
8
|
import { buildCartItemsByTempCart } from "../../utils/api/buildCartItemsByTempCart";
|
|
9
9
|
import { isStoreDiscountEnabled } from "../../utils/api/isStoreDiscountEnabl";
|
|
10
10
|
import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
|
|
11
|
+
import { getIsStagingMode } from "../../utils/checkout/getIsStagingMode";
|
|
11
12
|
import { getIsTestMode } from "../../utils/checkout/getIsTestMode";
|
|
12
13
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
13
14
|
import { isDisabledCountry } from "../../utils/checkout/isDisabledCountry";
|
|
@@ -162,6 +163,7 @@ export class ZonosCheckout {
|
|
|
162
163
|
this.appearanceSettingsOverride = undefined;
|
|
163
164
|
this.preview = false;
|
|
164
165
|
this.mobile = false;
|
|
166
|
+
this.overrideStagingMode = undefined;
|
|
165
167
|
this.defaultAddress = null;
|
|
166
168
|
this.forceDialogOpen = false;
|
|
167
169
|
this.defaultAddressParams = null;
|
|
@@ -179,6 +181,7 @@ export class ZonosCheckout {
|
|
|
179
181
|
this.isCartExpired = false;
|
|
180
182
|
this.inventoryCheckErrorMessage = null;
|
|
181
183
|
this.placedOrderInfo = null;
|
|
184
|
+
this.clientSecret = stripeStore.clientSecret;
|
|
182
185
|
}
|
|
183
186
|
/**
|
|
184
187
|
* Init cart info handler event
|
|
@@ -235,7 +238,7 @@ export class ZonosCheckout {
|
|
|
235
238
|
const isExpired = this.handleCartExpiredCheck();
|
|
236
239
|
if (isExpired) {
|
|
237
240
|
// Do not proceed if the cart is expired
|
|
238
|
-
return;
|
|
241
|
+
return false;
|
|
239
242
|
}
|
|
240
243
|
const { adjustments, cartItems } = buildCartItemsByTempCart(window.Zonos.cartData);
|
|
241
244
|
await cartStoreUpdateItems({ adjustments, cartItems });
|
|
@@ -249,13 +252,13 @@ export class ZonosCheckout {
|
|
|
249
252
|
const cartData = cartResult === null || cartResult === void 0 ? void 0 : cartResult.cartData;
|
|
250
253
|
if (!cartData) {
|
|
251
254
|
logError('Failed to build cart, please try again.');
|
|
252
|
-
return;
|
|
255
|
+
return false;
|
|
253
256
|
}
|
|
254
257
|
window.Zonos.cartData = cartData;
|
|
255
258
|
const isExpired = this.handleCartExpiredCheck();
|
|
256
259
|
if (isExpired) {
|
|
257
260
|
// Do not proceed if the cart is expired
|
|
258
|
-
return;
|
|
261
|
+
return false;
|
|
259
262
|
}
|
|
260
263
|
const { adjustments, cartItems } = buildCartItemsByTempCart(cartData);
|
|
261
264
|
await cartStoreUpdateItems({ adjustments, cartItems });
|
|
@@ -547,12 +550,21 @@ export class ZonosCheckout {
|
|
|
547
550
|
phone,
|
|
548
551
|
};
|
|
549
552
|
}
|
|
553
|
+
overrideStagingModeChanged() {
|
|
554
|
+
cartStore.isStagingMode = !!this.overrideStagingMode;
|
|
555
|
+
}
|
|
550
556
|
/**
|
|
551
557
|
* Setup all of the event listeners for the component on first load
|
|
552
558
|
*/
|
|
553
559
|
async init() {
|
|
554
560
|
stripeStore.stripe = window.Zonos.stripe;
|
|
555
561
|
this.stripe = window.Zonos.stripe;
|
|
562
|
+
// Set staging mode on init
|
|
563
|
+
cartStore.isStagingMode = getIsStagingMode();
|
|
564
|
+
// Override staging mode if it's provided
|
|
565
|
+
if (typeof this.overrideStagingMode !== 'undefined') {
|
|
566
|
+
cartStore.isStagingMode = this.overrideStagingMode;
|
|
567
|
+
}
|
|
556
568
|
// check if bigcommerce, if user enters the shipping address that's in the shipping zone at bigcommerce checkout
|
|
557
569
|
watchBigcommerceDomesticCheckout({
|
|
558
570
|
domesticRedirectedBtnSelector: domesticRedirectedBtnSelector,
|
|
@@ -791,6 +803,10 @@ export class ZonosCheckout {
|
|
|
791
803
|
handleAddressChange() {
|
|
792
804
|
stripeStoreReset();
|
|
793
805
|
}
|
|
806
|
+
handleClientSecretChange() {
|
|
807
|
+
// apply theme to stripe elements
|
|
808
|
+
void this.applyStripeTheme();
|
|
809
|
+
}
|
|
794
810
|
handleOpenChange() {
|
|
795
811
|
const overflowAttrKey = 'data-zonos-overflow-origin';
|
|
796
812
|
const body = document.body;
|
|
@@ -855,6 +871,8 @@ export class ZonosCheckout {
|
|
|
855
871
|
}
|
|
856
872
|
render() {
|
|
857
873
|
var _a, _b, _c, _d;
|
|
874
|
+
// Set client secret so that we can add this to @Watch listener
|
|
875
|
+
this.clientSecret = stripeStore.clientSecret;
|
|
858
876
|
const dialogLoading =
|
|
859
877
|
// if it's last step, don't need to check stripe elements
|
|
860
878
|
(cartStore.step !== 'finish' &&
|
|
@@ -888,7 +906,8 @@ export class ZonosCheckout {
|
|
|
888
906
|
const zonosQaUrl = urlParams.get('zonosQaUrl');
|
|
889
907
|
const zonosDebug = urlParams.get('zonosDebug');
|
|
890
908
|
const zonosE2ETest = urlParams.get('zonosE2ETest');
|
|
891
|
-
|
|
909
|
+
const zonosStagingMode = this.overrideStagingMode || getIsStagingMode();
|
|
910
|
+
return (h("zonos-v-stack", null, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosStagingMode && (h("zonos-badge", { badgeColor: "red", size: "small" }, translate('Staging mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl)), zonosE2ETest && (h("zonos-badge", { badgeColor: "gray", size: "small" }, "E2E Test"))), h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
892
911
|
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
893
912
|
this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
894
913
|
};
|
|
@@ -904,7 +923,7 @@ export class ZonosCheckout {
|
|
|
904
923
|
'--zonos--primary-color': !this.isMobile
|
|
905
924
|
? colorPrimary
|
|
906
925
|
: undefined,
|
|
907
|
-
}) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress || this.defaultAddressParams, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: async () => {
|
|
926
|
+
}) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress || this.defaultAddressParams, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
|
|
908
927
|
await this.handleStripePaymentContinue();
|
|
909
928
|
}, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
910
929
|
// do nothing if it's not mobile
|
|
@@ -1006,7 +1025,9 @@ export class ZonosCheckout {
|
|
|
1006
1025
|
"docs": {
|
|
1007
1026
|
"tags": [],
|
|
1008
1027
|
"text": "Override appearance config"
|
|
1009
|
-
}
|
|
1028
|
+
},
|
|
1029
|
+
"getter": false,
|
|
1030
|
+
"setter": false
|
|
1010
1031
|
},
|
|
1011
1032
|
"preview": {
|
|
1012
1033
|
"type": "boolean",
|
|
@@ -1022,6 +1043,8 @@ export class ZonosCheckout {
|
|
|
1022
1043
|
"tags": [],
|
|
1023
1044
|
"text": "Preview checkout without needing to click on the button. This would be useful for demo purpose"
|
|
1024
1045
|
},
|
|
1046
|
+
"getter": false,
|
|
1047
|
+
"setter": false,
|
|
1025
1048
|
"attribute": "preview",
|
|
1026
1049
|
"reflect": false,
|
|
1027
1050
|
"defaultValue": "false"
|
|
@@ -1040,10 +1063,31 @@ export class ZonosCheckout {
|
|
|
1040
1063
|
"tags": [],
|
|
1041
1064
|
"text": "Flag to determine if the checkout is on mobile"
|
|
1042
1065
|
},
|
|
1066
|
+
"getter": false,
|
|
1067
|
+
"setter": false,
|
|
1043
1068
|
"attribute": "mobile",
|
|
1044
1069
|
"reflect": false,
|
|
1045
1070
|
"defaultValue": "false"
|
|
1046
1071
|
},
|
|
1072
|
+
"overrideStagingMode": {
|
|
1073
|
+
"type": "boolean",
|
|
1074
|
+
"mutable": false,
|
|
1075
|
+
"complexType": {
|
|
1076
|
+
"original": "boolean",
|
|
1077
|
+
"resolved": "boolean | undefined",
|
|
1078
|
+
"references": {}
|
|
1079
|
+
},
|
|
1080
|
+
"required": false,
|
|
1081
|
+
"optional": true,
|
|
1082
|
+
"docs": {
|
|
1083
|
+
"tags": [],
|
|
1084
|
+
"text": "Override staging mode. Solely use for storybook"
|
|
1085
|
+
},
|
|
1086
|
+
"getter": false,
|
|
1087
|
+
"setter": false,
|
|
1088
|
+
"attribute": "override-staging-mode",
|
|
1089
|
+
"reflect": false
|
|
1090
|
+
},
|
|
1047
1091
|
"defaultAddress": {
|
|
1048
1092
|
"type": "unknown",
|
|
1049
1093
|
"mutable": false,
|
|
@@ -1064,6 +1108,8 @@ export class ZonosCheckout {
|
|
|
1064
1108
|
"tags": [],
|
|
1065
1109
|
"text": "Default address to use for the checkout (preview mode)"
|
|
1066
1110
|
},
|
|
1111
|
+
"getter": false,
|
|
1112
|
+
"setter": false,
|
|
1067
1113
|
"defaultValue": "null"
|
|
1068
1114
|
},
|
|
1069
1115
|
"forceDialogOpen": {
|
|
@@ -1080,6 +1126,8 @@ export class ZonosCheckout {
|
|
|
1080
1126
|
"tags": [],
|
|
1081
1127
|
"text": "Force dialog to be open"
|
|
1082
1128
|
},
|
|
1129
|
+
"getter": false,
|
|
1130
|
+
"setter": false,
|
|
1083
1131
|
"attribute": "force-dialog-open",
|
|
1084
1132
|
"reflect": false,
|
|
1085
1133
|
"defaultValue": "false"
|
|
@@ -1102,7 +1150,8 @@ export class ZonosCheckout {
|
|
|
1102
1150
|
"confirmDialogOpen": {},
|
|
1103
1151
|
"isCartExpired": {},
|
|
1104
1152
|
"inventoryCheckErrorMessage": {},
|
|
1105
|
-
"placedOrderInfo": {}
|
|
1153
|
+
"placedOrderInfo": {},
|
|
1154
|
+
"clientSecret": {}
|
|
1106
1155
|
};
|
|
1107
1156
|
}
|
|
1108
1157
|
static get methods() {
|
|
@@ -1203,6 +1252,9 @@ export class ZonosCheckout {
|
|
|
1203
1252
|
return [{
|
|
1204
1253
|
"propName": "appearanceSettingsOverride",
|
|
1205
1254
|
"methodName": "appearanceSettingsOverrideChanged"
|
|
1255
|
+
}, {
|
|
1256
|
+
"propName": "overrideStagingMode",
|
|
1257
|
+
"methodName": "overrideStagingModeChanged"
|
|
1206
1258
|
}, {
|
|
1207
1259
|
"propName": "mobile",
|
|
1208
1260
|
"methodName": "handleMobileChange"
|
|
@@ -1212,6 +1264,9 @@ export class ZonosCheckout {
|
|
|
1212
1264
|
}, {
|
|
1213
1265
|
"propName": "defaultAddress",
|
|
1214
1266
|
"methodName": "handleAddressChange"
|
|
1267
|
+
}, {
|
|
1268
|
+
"propName": "clientSecret",
|
|
1269
|
+
"methodName": "handleClientSecretChange"
|
|
1215
1270
|
}, {
|
|
1216
1271
|
"propName": "open",
|
|
1217
1272
|
"methodName": "handleOpenChange"
|