@zonos/elements 1.3.200 → 1.3.202
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/VarianceTest-0cb1e118.js +12 -0
- package/dist/cjs/cart-637ba3d0.js +1943 -0
- package/dist/cjs/{debounce-d393fafe.js → debounce-94e1b7ff.js} +1 -1
- package/dist/cjs/{getBorderRadius-3d0a563e.js → getBorderRadius-8d3b1049.js} +1 -1
- package/dist/cjs/index.cjs.js +10 -8
- package/dist/cjs/{isDarkColor-92a10a85.js → isDarkColor-bcf49625.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{cart-add8fe50.js → localization-2f17c95f.js} +74 -1926
- package/dist/cjs/{paypal-afc19dec.js → paypal-0eceff03.js} +10 -9
- package/dist/cjs/zonos-address_11.cjs.entry.js +98 -72
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -3
- package/dist/cjs/zonos-card.cjs.entry.js +3 -2
- package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_14.cjs.entry.js} +99 -80
- package/dist/cjs/zonos-checkout.cjs.entry.js +395 -50
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -1
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +13 -11
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -5
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +13 -13
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +10 -8
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +41 -42
- package/dist/cjs/zonos-hello.cjs.entry.js +30 -31
- package/dist/cjs/zonos-input.cjs.entry.js +3 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +8 -9
- package/dist/cjs/zonos-logo.cjs.entry.js +4 -3
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +8 -7
- package/dist/cjs/zonos-text.cjs.entry.js +2 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +4 -3
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -3
- package/dist/cjs/{zonosStore-c466b127.js → zonosStore-9264749e.js} +15 -5
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +18 -17
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +235 -15
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +2 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.css +62 -0
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +90 -0
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +3 -3
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +15 -16
- package/dist/collection/components/store/checkout/paypal.js +2 -1
- package/dist/collection/components/store/checkout/stripe.js +33 -13
- package/dist/collection/components/store/hello/localization.js +5 -5
- package/dist/collection/components/store/storageStore.js +32 -0
- package/dist/collection/components/store/zonosStore.js +12 -6
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +18 -6
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +19 -7
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -3
- package/dist/collection/components/utils/api/getCheckoutSession.js +3 -3
- package/dist/collection/components/utils/api/placeTestOrder.js +2 -1
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +3 -2
- package/dist/collection/components/utils/api/selectVarianceTest.js +20 -0
- package/dist/collection/components/utils/buildCartUrl.js +44 -0
- package/dist/collection/components/utils/getLegacyQueryParams.js +42 -0
- package/dist/collection/components/utils/varianceTest/filterExpiredTests.js +6 -0
- package/dist/collection/components/utils/varianceTest/filterValidTests.js +23 -0
- package/dist/collection/components/utils/varianceTest/getSelectedTestVariant.js +6 -0
- package/dist/collection/components/utils/varianceTest/hasAtLeastOneAvailableTestKey.js +14 -0
- package/dist/collection/components/utils/varianceTest/isInAvailableTestKey.js +4 -0
- package/dist/collection/components/utils/varianceTest/isTestEnabled.js +4 -0
- package/dist/collection/components/utils/varianceTest/isTestKeysAllVariantSelected.js +6 -0
- package/dist/collection/components/utils/varianceTest/mergeTest.js +13 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +2 -2
- package/dist/collection/types/checkout/api/VarianceTest.js +8 -0
- package/dist/collection/types/generated/graphql.internal.types.js +12 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/VarianceTest-fef2d958.js +10 -0
- package/dist/esm/cart-b7c15b61.js +1907 -0
- package/dist/esm/{debounce-a2121722.js → debounce-3a9f27a0.js} +1 -1
- package/dist/esm/{getBorderRadius-413e97eb.js → getBorderRadius-78b28b4d.js} +1 -1
- package/dist/esm/index.js +9 -8
- package/dist/esm/{isDarkColor-4c7b2ffc.js → isDarkColor-31dd7dff.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{cart-e03d615e.js → localization-bf7224aa.js} +70 -1892
- package/dist/esm/{paypal-23dd5023.js → paypal-932fd3dd.js} +5 -4
- package/dist/esm/zonos-address_11.entry.js +54 -28
- package/dist/esm/zonos-badge.entry.js +2 -1
- package/dist/esm/zonos-banner.entry.js +2 -1
- package/dist/esm/zonos-button_3.entry.js +4 -3
- package/dist/esm/zonos-card.entry.js +3 -2
- package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_14.entry.js} +48 -30
- package/dist/esm/zonos-checkout.entry.js +363 -18
- package/dist/esm/zonos-collapse.entry.js +2 -1
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +8 -6
- package/dist/esm/zonos-country-flag.entry.js +3 -4
- package/dist/esm/zonos-country-select_4.entry.js +8 -8
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +10 -8
- package/dist/esm/zonos-hello-dialog.entry.js +7 -8
- package/dist/esm/zonos-hello.entry.js +4 -5
- package/dist/esm/zonos-input.entry.js +3 -2
- package/dist/esm/zonos-language-select_2.entry.js +5 -6
- package/dist/esm/zonos-logo.entry.js +4 -3
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -2
- package/dist/esm/zonos-stripe-input.entry.js +8 -7
- package/dist/esm/zonos-text.entry.js +2 -1
- package/dist/esm/zonos-toggle.entry.js +4 -3
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +4 -3
- package/dist/esm/{zonosStore-cdabc848.js → zonosStore-d10a829f.js} +15 -5
- package/dist/esm-es5/VarianceTest-fef2d958.js +1 -0
- package/dist/esm-es5/cart-b7c15b61.js +1 -0
- package/dist/esm-es5/{debounce-a2121722.js → debounce-3a9f27a0.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-413e97eb.js → getBorderRadius-78b28b4d.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-4c7b2ffc.js → isDarkColor-31dd7dff.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-bf7224aa.js +1 -0
- package/dist/esm-es5/{paypal-23dd5023.js → paypal-932fd3dd.js} +2 -2
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.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_14.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-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 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/zonosStore-d10a829f.js +1 -0
- package/dist/scripts/index.d.ts +839 -765
- 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.d.ts +16 -0
- package/dist/types/components/common/zonos-loading-overlay/zonos-loading-overlay.d.ts +16 -0
- package/dist/types/components/store/checkout/cart.d.ts +0 -1
- package/dist/types/components/store/checkout/stripe.d.ts +2 -2
- package/dist/types/components/store/hello/localization.d.ts +2 -2
- package/dist/types/components/store/storageStore.d.ts +13 -0
- package/dist/types/components/store/zonosStore.d.ts +7 -2
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -0
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +2 -0
- package/dist/types/components/utils/api/selectVarianceTest.d.ts +6 -0
- package/dist/types/components/utils/buildCartUrl.d.ts +10 -0
- package/dist/types/components/utils/getLegacyQueryParams.d.ts +2 -0
- package/dist/types/components/utils/varianceTest/filterExpiredTests.d.ts +2 -0
- package/dist/types/components/utils/varianceTest/filterValidTests.d.ts +9 -0
- package/dist/types/components/utils/varianceTest/getSelectedTestVariant.d.ts +2 -0
- package/dist/types/components/utils/varianceTest/hasAtLeastOneAvailableTestKey.d.ts +8 -0
- package/dist/types/components/utils/varianceTest/isInAvailableTestKey.d.ts +2 -0
- package/dist/types/components/utils/varianceTest/isTestEnabled.d.ts +2 -0
- package/dist/types/components/utils/varianceTest/isTestKeysAllVariantSelected.d.ts +9 -0
- package/dist/types/components/utils/varianceTest/mergeTest.d.ts +5 -0
- package/dist/types/components.d.ts +51 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +7 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +13 -1
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +7 -0
- package/dist/types/types/checkout/api/VarianceTest.d.ts +30 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +163 -0
- package/dist/types/types/generated/graphql.internal.types.ts +199 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +7 -6
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-609c32a3.system.entry.js → p-01987cb2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-04a01cb1.js +1 -0
- package/dist/zonos-elements/p-04b43dd5.entry.js +1 -0
- package/dist/zonos-elements/p-0f77d087.system.entry.js +1 -0
- package/dist/zonos-elements/{p-329efa8c.system.entry.js → p-1dcdb65f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-26a634a5.system.entry.js +1 -0
- package/dist/zonos-elements/p-27987298.system.entry.js +1 -0
- package/dist/zonos-elements/p-2af2eb6f.system.entry.js +1 -0
- package/dist/zonos-elements/p-2b8f787a.entry.js +1 -0
- package/dist/zonos-elements/p-30cfa524.entry.js +1 -0
- package/dist/zonos-elements/p-32320d9a.system.js +1 -0
- package/dist/zonos-elements/p-3284f459.system.entry.js +1 -0
- package/dist/zonos-elements/{p-13796f98.js → p-3d82a352.js} +1 -1
- package/dist/zonos-elements/p-452070af.system.entry.js +1 -0
- package/dist/zonos-elements/p-45ebc788.entry.js +1 -0
- package/dist/zonos-elements/p-4c81112f.entry.js +1 -0
- package/dist/zonos-elements/p-4efa8187.js +1 -0
- package/dist/zonos-elements/p-5170bc41.entry.js +1 -0
- package/dist/zonos-elements/p-5a2dd041.system.js +1 -0
- package/dist/zonos-elements/p-5c74e5c9.system.entry.js +1 -0
- package/dist/zonos-elements/p-5d0f7364.system.js +1 -0
- package/dist/zonos-elements/p-6a52a2bc.system.entry.js +1 -0
- package/dist/zonos-elements/p-715d0f59.system.entry.js +1 -0
- package/dist/zonos-elements/{p-b8d87932.js → p-72f37935.js} +1 -1
- package/dist/zonos-elements/p-7ae5cd60.entry.js +1 -0
- package/dist/zonos-elements/p-80bbd9c0.system.entry.js +1 -0
- package/dist/zonos-elements/p-851c642e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-623a30aa.entry.js → p-8d870d4c.entry.js} +1 -1
- package/dist/zonos-elements/p-98b65387.entry.js +1 -0
- package/dist/zonos-elements/p-9af5e93a.entry.js +1 -0
- package/dist/zonos-elements/p-aa1193bc.entry.js +1 -0
- package/dist/zonos-elements/{p-8fc08673.js → p-aae60057.js} +2 -2
- package/dist/zonos-elements/p-ab176281.system.entry.js +1 -0
- package/dist/zonos-elements/p-b52aba52.entry.js +1 -0
- package/dist/zonos-elements/p-bc220d35.system.js +1 -0
- package/dist/zonos-elements/p-bc8bda92.entry.js +1 -0
- package/dist/zonos-elements/p-be5afc91.system.entry.js +1 -0
- package/dist/zonos-elements/p-bec2a3ce.entry.js +1 -0
- package/dist/zonos-elements/p-c291bac1.entry.js +1 -0
- package/dist/zonos-elements/p-c3d2422e.entry.js +1 -0
- package/dist/zonos-elements/{p-f28eb1dd.system.js → p-c50b3100.system.js} +1 -1
- package/dist/zonos-elements/p-c58acd4c.system.entry.js +1 -0
- package/dist/zonos-elements/p-c5fcbc92.system.entry.js +1 -0
- package/dist/zonos-elements/p-c767242b.entry.js +1 -0
- package/dist/zonos-elements/p-c9aa902e.system.entry.js +1 -0
- package/dist/zonos-elements/p-cb823c4d.system.js +1 -0
- package/dist/zonos-elements/{p-24554580.system.js → p-d2466fbd.system.js} +2 -2
- package/dist/zonos-elements/{p-d422ad1d.system.js → p-d42dfd32.system.js} +1 -1
- package/dist/zonos-elements/p-d46349d3.system.entry.js +1 -0
- package/dist/zonos-elements/p-d60ca44b.system.entry.js +1 -0
- package/dist/zonos-elements/{p-b2241919.entry.js → p-d6a10007.entry.js} +1 -1
- package/dist/zonos-elements/p-db025dfc.system.entry.js +1 -0
- package/dist/zonos-elements/p-db3968a2.js +1 -0
- package/dist/zonos-elements/p-dcd6acd4.system.entry.js +1 -0
- package/dist/zonos-elements/p-dd1cfa74.entry.js +1 -0
- package/dist/zonos-elements/p-df4c46a6.entry.js +1 -0
- package/dist/zonos-elements/{p-4593324c.js → p-e26c9e83.js} +1 -1
- package/dist/zonos-elements/p-e68d5219.entry.js +1 -0
- package/dist/zonos-elements/p-ea6d87a1.system.js +1 -1
- package/dist/zonos-elements/p-ef3e05e5.system.js +1 -0
- package/dist/zonos-elements/p-f255e822.js +1 -0
- package/dist/zonos-elements/p-f655ec36.entry.js +1 -0
- package/dist/zonos-elements/{p-e91b244c.entry.js → p-f891d470.entry.js} +1 -1
- package/dist/zonos-elements/p-f8d0d488.system.entry.js +1 -0
- package/dist/zonos-elements/{p-240ee490.system.entry.js → p-fbe36bc8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fcc2e712.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-e03d615e.js +0 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
- package/dist/esm-es5/zonosStore-cdabc848.js +0 -1
- package/dist/zonos-elements/p-06ed3582.system.js +0 -1
- package/dist/zonos-elements/p-0a2101d4.system.js +0 -1
- package/dist/zonos-elements/p-0aa20875.system.entry.js +0 -1
- package/dist/zonos-elements/p-0bfd23da.entry.js +0 -1
- package/dist/zonos-elements/p-0f3568a7.entry.js +0 -1
- package/dist/zonos-elements/p-147ca395.entry.js +0 -1
- package/dist/zonos-elements/p-190398dd.entry.js +0 -1
- package/dist/zonos-elements/p-1eddec23.entry.js +0 -1
- package/dist/zonos-elements/p-1f2c3f5c.system.entry.js +0 -1
- package/dist/zonos-elements/p-24a2e899.system.entry.js +0 -1
- package/dist/zonos-elements/p-2882b9f4.entry.js +0 -1
- package/dist/zonos-elements/p-28ba5a6b.system.entry.js +0 -1
- package/dist/zonos-elements/p-33488109.system.entry.js +0 -1
- package/dist/zonos-elements/p-337fab4e.js +0 -1
- package/dist/zonos-elements/p-35573f66.entry.js +0 -1
- package/dist/zonos-elements/p-394d468f.system.js +0 -1
- package/dist/zonos-elements/p-3ddecaa4.system.entry.js +0 -1
- package/dist/zonos-elements/p-48f70043.system.entry.js +0 -1
- package/dist/zonos-elements/p-55711b80.system.entry.js +0 -1
- package/dist/zonos-elements/p-578bf5d7.entry.js +0 -1
- package/dist/zonos-elements/p-5b8e5d1a.entry.js +0 -1
- package/dist/zonos-elements/p-5c061a35.entry.js +0 -1
- package/dist/zonos-elements/p-6096c1c5.entry.js +0 -1
- package/dist/zonos-elements/p-6adc6e27.entry.js +0 -1
- package/dist/zonos-elements/p-7bb9c330.entry.js +0 -1
- package/dist/zonos-elements/p-7c6b8d3f.entry.js +0 -1
- package/dist/zonos-elements/p-85270076.system.entry.js +0 -1
- package/dist/zonos-elements/p-8a9d4605.system.entry.js +0 -1
- package/dist/zonos-elements/p-94e3e50d.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f272e8e.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f6dd86a.entry.js +0 -1
- package/dist/zonos-elements/p-a64ab131.system.entry.js +0 -1
- package/dist/zonos-elements/p-aac95779.system.entry.js +0 -1
- package/dist/zonos-elements/p-ad3c5358.entry.js +0 -1
- package/dist/zonos-elements/p-ad8a0584.entry.js +0 -1
- package/dist/zonos-elements/p-aeaba33e.system.entry.js +0 -1
- package/dist/zonos-elements/p-af6af82e.system.js +0 -1
- package/dist/zonos-elements/p-b2e76636.system.entry.js +0 -1
- package/dist/zonos-elements/p-b6afcf3f.system.entry.js +0 -1
- package/dist/zonos-elements/p-b8d91f99.entry.js +0 -1
- package/dist/zonos-elements/p-be8fa9a5.system.entry.js +0 -1
- package/dist/zonos-elements/p-c770044a.system.entry.js +0 -1
- package/dist/zonos-elements/p-d4842d10.system.entry.js +0 -1
- package/dist/zonos-elements/p-e390725f.js +0 -1
- package/dist/zonos-elements/p-eb85f0b6.system.entry.js +0 -1
- package/dist/zonos-elements/p-ef3d0394.entry.js +0 -1
- package/dist/zonos-elements/p-f6e587bb.entry.js +0 -1
- package/dist/zonos-elements/p-ff23980c.entry.js +0 -1
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-637ba3d0.js');
|
|
7
|
+
const localization = require('./localization-2f17c95f.js');
|
|
7
8
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
9
|
-
const zonosStore = require('./zonosStore-
|
|
9
|
+
const paypal = require('./paypal-0eceff03.js');
|
|
10
|
+
const zonosStore = require('./zonosStore-9264749e.js');
|
|
10
11
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
11
12
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
12
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
13
|
+
const getBorderRadius = require('./getBorderRadius-8d3b1049.js');
|
|
13
14
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
14
|
-
const isDarkColor = require('./isDarkColor-
|
|
15
|
+
const isDarkColor = require('./isDarkColor-bcf49625.js');
|
|
15
16
|
const isColorVariable = require('./isColorVariable-525dbfa7.js');
|
|
16
17
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
|
|
17
18
|
const TaxId = require('./TaxId-12acedde.js');
|
|
19
|
+
require('./VarianceTest-0cb1e118.js');
|
|
18
20
|
|
|
19
21
|
const getDisplayCurrency = () => {
|
|
20
22
|
var _a, _b;
|
|
@@ -39,7 +41,7 @@ const renderCheckoutCurrency = ({ amount, isForeign }) => {
|
|
|
39
41
|
const displayAmount = shouldDisplayBaseCurrency
|
|
40
42
|
? amount / targetRate
|
|
41
43
|
: amount;
|
|
42
|
-
return
|
|
44
|
+
return localization.currencyFormat({
|
|
43
45
|
amount: displayAmount,
|
|
44
46
|
currency: displayCurrency,
|
|
45
47
|
});
|
|
@@ -48,7 +50,7 @@ const renderCheckoutCurrency = ({ amount, isForeign }) => {
|
|
|
48
50
|
const displayAmount = shouldDisplayBaseCurrency
|
|
49
51
|
? amount
|
|
50
52
|
: amount * targetRate;
|
|
51
|
-
return
|
|
53
|
+
return localization.currencyFormat({
|
|
52
54
|
amount: displayAmount,
|
|
53
55
|
currency: displayCurrency,
|
|
54
56
|
});
|
|
@@ -1069,7 +1071,7 @@ const ZonosCartItems = class {
|
|
|
1069
1071
|
this.errorImages = [...this.errorImages, itemImg];
|
|
1070
1072
|
}, src: item.imageUrl, style: {
|
|
1071
1073
|
'min-width': '40px',
|
|
1072
|
-
}, width: 40 })) : (index.h("img", { alt: item.name, src: emptyItemImg, width: 40 }))), index.h("td", { class: "zonos--column zonos--cart-item-name" }, index.h("div", null, cleanedItemNames.map(name => (index.h("zonos-text", { type: "label" }, name)))), index.h("zonos-text", { textColor: "gray-600", type: "caption" },
|
|
1074
|
+
}, width: 40 })) : (index.h("img", { alt: item.name, src: emptyItemImg, width: 40 }))), index.h("td", { class: "zonos--column zonos--cart-item-name" }, index.h("div", null, cleanedItemNames.map(name => (index.h("zonos-text", { type: "label" }, name)))), index.h("zonos-text", { textColor: "gray-600", type: "caption" }, localization.translate('Quantity'), ": ", item.quantity)), index.h("td", { class: "zonos--column zonos--cart-item-price" }, index.h("zonos-text", { type: "semiBoldLabel", weight: 600 }, renderCheckoutCurrency({
|
|
1073
1075
|
amount,
|
|
1074
1076
|
isForeign: false,
|
|
1075
1077
|
})))));
|
|
@@ -1142,7 +1144,7 @@ const ZonosCartRestrictedItems = class {
|
|
|
1142
1144
|
this.internalCollapsed && 'collapsed',
|
|
1143
1145
|
]), onClick: () => {
|
|
1144
1146
|
this.internalCollapsed = !this.internalCollapsed;
|
|
1145
|
-
} }, index.h("div", { class: "zonos--title-wrapper" }, index.h("zonos-text", { textColor: "red-600", type: "label" }, `${
|
|
1147
|
+
} }, index.h("div", { class: "zonos--title-wrapper" }, index.h("zonos-text", { textColor: "red-600", type: "label" }, `${localization.translate(this.internalCollapsed ? 'Show' : 'Hide')} ${restrictedItemTotal} ${localization.translate('restricted items')}`), index.h("zonos-icon", { content: ChevronUpIcon$2, iconColor: "red-600" }))), index.h("zonos-collapse", { collapsed: this.internalCollapsed }, index.h("zonos-banner", { bannerTitle: localization.translate('The following items are unable to be shipped to your country and are not included in your cart total.'), intent: "error" }), index.h("table", { class: "zonos--cart-table" }, index.h("tbody", null, cart.cartStore.restrictedItems.map((item, index$1) => {
|
|
1146
1148
|
var _a, _b;
|
|
1147
1149
|
const itemImg = item.imageUrl;
|
|
1148
1150
|
return (index.h("tr", { class: "zonos--cart-item" }, index.h("td", { class: "zonos--column zonos--cart-item-image" }, itemImg && !this.errorImages.includes(itemImg) ? (index.h("img", { alt:
|
|
@@ -1204,7 +1206,7 @@ const ZonosCartSubtotal = class {
|
|
|
1204
1206
|
};
|
|
1205
1207
|
const renderShippingInfo = () => {
|
|
1206
1208
|
if (!cart.cartStore.selectedShippingOption) {
|
|
1207
|
-
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" },
|
|
1209
|
+
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Shipping')), index.h("zonos-text", { class: "zonos--caption", type: "caption" }, localization.translate('No shipping method selected'))));
|
|
1208
1210
|
}
|
|
1209
1211
|
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cart.cartStore.selectedShippingOption.displayName), cart.cartStore.selectedShippingOptionTransitTime && (index.h("zonos-text", { class: "zonos--caption", type: "caption" }, cart.cartStore.selectedShippingOptionTransitTime))));
|
|
1210
1212
|
};
|
|
@@ -1212,7 +1214,7 @@ const ZonosCartSubtotal = class {
|
|
|
1212
1214
|
var _a;
|
|
1213
1215
|
// Domestic US doesn't have duty applied, just taxes and fees
|
|
1214
1216
|
if (((_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) === 'US') {
|
|
1215
|
-
return (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" },
|
|
1217
|
+
return (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Taxes and fees'))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("div", { class: "zonos--cart-duty-tax-price" }, cart.cartStore.dutiesTaxesFees !== null ||
|
|
1216
1218
|
cart.cartStore.dutiesTaxesFeesEstimate !== null
|
|
1217
1219
|
? renderCheckoutCurrency({
|
|
1218
1220
|
amount: cart.cartStore.dutiesTaxesFees ||
|
|
@@ -1223,23 +1225,23 @@ const ZonosCartSubtotal = class {
|
|
|
1223
1225
|
: '-'))));
|
|
1224
1226
|
}
|
|
1225
1227
|
if (cart.cartStore.landedCostMethod === 'DAP') {
|
|
1226
|
-
return (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" },
|
|
1227
|
-
? `${
|
|
1228
|
+
return (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Duties, taxes, and fees')), cart.cartStore.dutiesTaxesFeesEstimate !== null
|
|
1229
|
+
? `${localization.translate('Estimated [amount]', {
|
|
1228
1230
|
amount: renderCheckoutCurrency({
|
|
1229
1231
|
amount: cart.cartStore.dutiesTaxesFeesEstimate,
|
|
1230
1232
|
isForeign: true,
|
|
1231
1233
|
}),
|
|
1232
1234
|
})}`
|
|
1233
|
-
: '-'), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("div", { class: "zonos--cart-duty-tax-price" },
|
|
1235
|
+
: '-'), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("div", { class: "zonos--cart-duty-tax-price" }, localization.translate('Due at delivery')))));
|
|
1234
1236
|
}
|
|
1235
|
-
return (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" },
|
|
1237
|
+
return (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Duties, taxes, and fees')), index.h("zonos-text", { class: "zonos--caption", type: "caption" }, localization.translate('Nothing due at the door'))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("div", { class: "zonos--cart-duty-tax-price" }, cart.cartStore.dutiesTaxesFees !== null
|
|
1236
1238
|
? renderCheckoutCurrency({
|
|
1237
1239
|
amount: cart.cartStore.dutiesTaxesFees,
|
|
1238
1240
|
isForeign: true,
|
|
1239
1241
|
})
|
|
1240
1242
|
: '-'))));
|
|
1241
1243
|
};
|
|
1242
|
-
return (index.h(index.Host, { class: "zonos--cart-subtotal zonos--elements" }, index.h("table", { class: "zonos--cart-table" }, index.h("tr", { class: "zonos--row zonos--cart-subtotal" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { type: "semiBoldLabel" },
|
|
1244
|
+
return (index.h(index.Host, { class: "zonos--cart-subtotal zonos--elements" }, index.h("table", { class: "zonos--cart-table" }, index.h("tr", { class: "zonos--row zonos--cart-subtotal" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { type: "semiBoldLabel" }, localization.translate('Cart subtotal'))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
1243
1245
|
amount: subtotal,
|
|
1244
1246
|
isForeign: true,
|
|
1245
1247
|
})))), index.h("tr", { class: "zonos--row zonos--cart-shipping" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, renderShippingInfo()), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, cart.cartStore.shipping
|
|
@@ -1247,14 +1249,14 @@ const ZonosCartSubtotal = class {
|
|
|
1247
1249
|
amount: cart.cartStore.shipping,
|
|
1248
1250
|
isForeign: true,
|
|
1249
1251
|
})
|
|
1250
|
-
: '-')), showDutyTaxesInfo && (index.h("tr", { class: "zonos--row zonos--cart-duties" }, index.h("td", { class: "zonos--column" }), renderLandedCost())), shouldRenderPromoInput && (index.h("tr", { class: "zonos--row zonos--cart-promo-code" }, index.h("td", { class: "zonos--column" }), !!appliedPromoCode ? (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-promo-code-col" }, this.loading ? (index.h("zonos-spinner", { size: 16 })) : (index.h("zonos-badge", { dismissHandler: () => removePromoCode() }, cart.cartStore.promoCode))), index.h("td", { class: "zonos--column zonos--cart-promo-code-col" }))) : (index.h("td", { class: "zonos--column zonos--cart-promo-code-col", colSpan: 2 }, index.h("div", { class: "zonos--cart-promo-code-input-wrapper" }, index.h("zonos-input", { class: "zonos--cart-promo-code-input", inputLabel:
|
|
1252
|
+
: '-')), showDutyTaxesInfo && (index.h("tr", { class: "zonos--row zonos--cart-duties" }, index.h("td", { class: "zonos--column" }), renderLandedCost())), shouldRenderPromoInput && (index.h("tr", { class: "zonos--row zonos--cart-promo-code" }, index.h("td", { class: "zonos--column" }), !!appliedPromoCode ? (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-promo-code-col" }, this.loading ? (index.h("zonos-spinner", { size: 16 })) : (index.h("zonos-badge", { dismissHandler: () => removePromoCode() }, cart.cartStore.promoCode))), index.h("td", { class: "zonos--column zonos--cart-promo-code-col" }))) : (index.h("td", { class: "zonos--column zonos--cart-promo-code-col", colSpan: 2 }, index.h("div", { class: "zonos--cart-promo-code-input-wrapper" }, index.h("zonos-input", { class: "zonos--cart-promo-code-input", inputLabel: localization.translate('Add promotional code'), inputValue: cart.cartStore.promoCode, isError: cart.cartStore.promoCodeError, onInputChange: e => (cart.cartStore.promoCode = e.detail.trim()), onKeyDown: e => {
|
|
1251
1253
|
if (e.key === 'Enter') {
|
|
1252
1254
|
void applyPromoCode();
|
|
1253
1255
|
}
|
|
1254
|
-
} }), index.h("zonos-button", { loading: this.loading, onClick: () => applyPromoCode(), variant: "primary" },
|
|
1256
|
+
} }), index.h("zonos-button", { loading: this.loading, onClick: () => applyPromoCode(), variant: "primary" }, localization.translate('Apply'))))))), !!cart.cartStore.adjustmentTotal && (index.h("tr", { class: "zonos--row zonos--cart-discount" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("div", { class: "zonos--title-with-icon" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Discounts')))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
1255
1257
|
amount: cart.cartStore.adjustmentTotal,
|
|
1256
1258
|
isForeign: true,
|
|
1257
|
-
}))))), index.h("tr", { class: "zonos--row zonos--cart-pay-total" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" },
|
|
1259
|
+
}))))), index.h("tr", { class: "zonos--row zonos--cart-pay-total" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Order total'))), index.h("td", { class: "zonos--column zonos--cart-total-price" }, index.h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
1258
1260
|
amount: total,
|
|
1259
1261
|
isForeign: true,
|
|
1260
1262
|
})))))));
|
|
@@ -1280,7 +1282,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1280
1282
|
this.closeClick = index.createEvent(this, "closeClick", 7);
|
|
1281
1283
|
this.pullOrder = async () => {
|
|
1282
1284
|
var _a, _b;
|
|
1283
|
-
const checkoutSessionId =
|
|
1285
|
+
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
1284
1286
|
const searchParams = new URLSearchParams();
|
|
1285
1287
|
searchParams.set('checkoutSessionId', checkoutSessionId || '');
|
|
1286
1288
|
const { baseUrl, errors, json } = await handleFetch.handleFetch(`/api/zonos-elements/get-order?${searchParams.toString()}`);
|
|
@@ -1303,7 +1305,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1303
1305
|
this.redirectToUrl = (url) => {
|
|
1304
1306
|
// reset store and checkout session id before redirecting
|
|
1305
1307
|
cart.stripeStoreReset();
|
|
1306
|
-
|
|
1308
|
+
localization.storageStore.checkoutSessionId = null;
|
|
1307
1309
|
// If it is iframed, redirect the parent window
|
|
1308
1310
|
if (window.parent) {
|
|
1309
1311
|
window.parent.location.href = url;
|
|
@@ -1360,10 +1362,10 @@ const ZonosCheckoutFinish = class {
|
|
|
1360
1362
|
case successBehavior === 'REDIRECT_TO_SUCCESS_PAGE':
|
|
1361
1363
|
case !!cart.cartStore.externalConfirmationPageURL: {
|
|
1362
1364
|
// use different default notification message if we are redirecting to a different page
|
|
1363
|
-
this.notificationTitle =
|
|
1365
|
+
this.notificationTitle = localization.translate('Order complete!');
|
|
1364
1366
|
this.notificationMessages = [
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
+
localization.translate('Your order has been successfully placed.'),
|
|
1368
|
+
localization.translate("You will be redirected back to the merchant's site in a few seconds."),
|
|
1367
1369
|
];
|
|
1368
1370
|
// stop loading spinner to show the redirecting notification
|
|
1369
1371
|
this.isLoading = false;
|
|
@@ -1409,7 +1411,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1409
1411
|
const { baseUrl, order } = await this.pullOrder();
|
|
1410
1412
|
const { isLegacyCheckout } = window.Zonos;
|
|
1411
1413
|
const foundLegacyOrderNumber = !!((_b = (_a = order === null || order === void 0 ? void 0 : order.references) === null || _a === void 0 ? void 0 : _a.find(entry => (entry === null || entry === void 0 ? void 0 : entry.key) === 'zonosOrderNumber')) === null || _b === void 0 ? void 0 : _b.value);
|
|
1412
|
-
const checkoutSessionId =
|
|
1414
|
+
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
1413
1415
|
const maxRetries = parseFloat(new URLSearchParams(window.location.search).get('maxPollingRetries') ||
|
|
1414
1416
|
'0') || MAX_RETRIES;
|
|
1415
1417
|
handleFetch.log(`=== Polling order (${attempts} attemps)`, 'info');
|
|
@@ -1430,7 +1432,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1430
1432
|
],
|
|
1431
1433
|
metadata: {
|
|
1432
1434
|
allLogs: handleFetch.allLogs,
|
|
1433
|
-
checkoutSessionId:
|
|
1435
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId || '',
|
|
1434
1436
|
orderId: order.id,
|
|
1435
1437
|
storeId: zonosStore.zonosStore.storeId,
|
|
1436
1438
|
},
|
|
@@ -1444,7 +1446,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1444
1446
|
errors: [`Order found after ${attempts} attempts`],
|
|
1445
1447
|
metadata: {
|
|
1446
1448
|
allLogs: handleFetch.allLogs,
|
|
1447
|
-
checkoutSessionId:
|
|
1449
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId || '',
|
|
1448
1450
|
orderId: order.id,
|
|
1449
1451
|
storeId: zonosStore.zonosStore.storeId,
|
|
1450
1452
|
},
|
|
@@ -1463,7 +1465,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1463
1465
|
errors: [`Order not found after ${maxRetries} attempts`],
|
|
1464
1466
|
metadata: {
|
|
1465
1467
|
allLogs: handleFetch.allLogs,
|
|
1466
|
-
checkoutSessionId:
|
|
1468
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId || '',
|
|
1467
1469
|
storeId: zonosStore.zonosStore.storeId,
|
|
1468
1470
|
},
|
|
1469
1471
|
});
|
|
@@ -1490,8 +1492,8 @@ const ZonosCheckoutFinish = class {
|
|
|
1490
1492
|
this.notificationType = isError ? 'error' : 'success';
|
|
1491
1493
|
this.notificationMessages = messages || [];
|
|
1492
1494
|
this.notificationTitle = isError
|
|
1493
|
-
?
|
|
1494
|
-
:
|
|
1495
|
+
? localization.translate('Payment failed')
|
|
1496
|
+
: localization.translate("You're all set!");
|
|
1495
1497
|
handleFetch.log('=== Payment intent retrieve status', 'info', {
|
|
1496
1498
|
clientSecret,
|
|
1497
1499
|
error,
|
|
@@ -1512,7 +1514,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1512
1514
|
void handleFetch.sendErrorLog({
|
|
1513
1515
|
endpoint: 'Stripe payment failed',
|
|
1514
1516
|
errors: [
|
|
1515
|
-
`Payment intent "${paymentIntentId}" status: ${status} - checkout session: ${
|
|
1517
|
+
`Payment intent "${paymentIntentId}" status: ${status} - checkout session: ${localization.storageStore.checkoutSessionId}`,
|
|
1516
1518
|
],
|
|
1517
1519
|
metadata: {
|
|
1518
1520
|
allLogs: handleFetch.allLogs,
|
|
@@ -1524,7 +1526,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1524
1526
|
// Save new order info in case the user reloads before we get order info
|
|
1525
1527
|
this.saveOrderIdForDuplicationIssue();
|
|
1526
1528
|
paypal.submitGtag('zonos-checkout-success');
|
|
1527
|
-
const checkoutSessionId =
|
|
1529
|
+
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
1528
1530
|
void cart.trackConversionEvent({
|
|
1529
1531
|
checkoutSessionId,
|
|
1530
1532
|
eventName: 'checkout_orderCompleted',
|
|
@@ -1542,11 +1544,11 @@ const ZonosCheckoutFinish = class {
|
|
|
1542
1544
|
// reset promo when checkout is finished
|
|
1543
1545
|
cart.stripeStoreResetPromoCode();
|
|
1544
1546
|
cart.stripeStoreReset();
|
|
1545
|
-
|
|
1547
|
+
localization.storageStore.checkoutSessionId = null;
|
|
1546
1548
|
};
|
|
1547
1549
|
this.checkStagingOrderStatus = async () => {
|
|
1548
1550
|
this.notificationType = 'success';
|
|
1549
|
-
this.notificationTitle =
|
|
1551
|
+
this.notificationTitle = localization.translate("You're all set!");
|
|
1550
1552
|
this.notificationMessages =
|
|
1551
1553
|
cart.stripeStoreMessageBasedOnStatus('succeeded').messages;
|
|
1552
1554
|
// override title if notification type is success
|
|
@@ -1556,13 +1558,13 @@ const ZonosCheckoutFinish = class {
|
|
|
1556
1558
|
cart.stripeStoreResetPromoCode();
|
|
1557
1559
|
cart.stripeStoreReset();
|
|
1558
1560
|
paypal.paypalStoreReset();
|
|
1559
|
-
|
|
1561
|
+
localization.storageStore.checkoutSessionId = null;
|
|
1560
1562
|
};
|
|
1561
1563
|
this.checkPaypalPaymentStatus = async () => {
|
|
1562
1564
|
// render error message if there's an error
|
|
1563
1565
|
if (paypal.paypalStore.paypalErrorMessage) {
|
|
1564
1566
|
this.notificationType = 'error';
|
|
1565
|
-
this.notificationTitle =
|
|
1567
|
+
this.notificationTitle = localization.translate('Payment failed');
|
|
1566
1568
|
this.notificationMessages = [paypal.paypalStore.paypalErrorMessage];
|
|
1567
1569
|
this.isLoading = false;
|
|
1568
1570
|
return;
|
|
@@ -1571,13 +1573,13 @@ const ZonosCheckoutFinish = class {
|
|
|
1571
1573
|
this.isLoading = false;
|
|
1572
1574
|
if (paypal.paypalStore.orderIdCreated) {
|
|
1573
1575
|
paypal.submitGtag('zonos-checkout-success');
|
|
1574
|
-
const checkoutSessionId =
|
|
1576
|
+
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
1575
1577
|
void cart.trackConversionEvent({
|
|
1576
1578
|
checkoutSessionId,
|
|
1577
1579
|
eventName: 'checkout_orderCompleted',
|
|
1578
1580
|
});
|
|
1579
1581
|
this.notificationType = 'success';
|
|
1580
|
-
this.notificationTitle =
|
|
1582
|
+
this.notificationTitle = localization.translate("You're all set!");
|
|
1581
1583
|
this.notificationMessages =
|
|
1582
1584
|
cart.stripeStoreMessageBasedOnStatus('succeeded').messages;
|
|
1583
1585
|
// override title if notification type is success
|
|
@@ -1589,7 +1591,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1589
1591
|
cart.stripeStoreResetPromoCode();
|
|
1590
1592
|
cart.stripeStoreReset();
|
|
1591
1593
|
paypal.paypalStoreReset();
|
|
1592
|
-
|
|
1594
|
+
localization.storageStore.checkoutSessionId = null;
|
|
1593
1595
|
};
|
|
1594
1596
|
this.closeClickHandler = () => {
|
|
1595
1597
|
this.closeClick.emit();
|
|
@@ -1600,7 +1602,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1600
1602
|
const placedOrderTime = {
|
|
1601
1603
|
cartId: window.Zonos.cartId || null,
|
|
1602
1604
|
checkoutSessionId: (existingPlacedOrderInfo === null || existingPlacedOrderInfo === void 0 ? void 0 : existingPlacedOrderInfo.checkoutSessionId) ||
|
|
1603
|
-
|
|
1605
|
+
localization.storageStore.checkoutSessionId ||
|
|
1604
1606
|
'',
|
|
1605
1607
|
orderId: ((_a = this.order) === null || _a === void 0 ? void 0 : _a.id) || null,
|
|
1606
1608
|
time: (existingPlacedOrderInfo === null || existingPlacedOrderInfo === void 0 ? void 0 : existingPlacedOrderInfo.time) || Date.now(),
|
|
@@ -1615,7 +1617,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1615
1617
|
this.notificationType = 'success';
|
|
1616
1618
|
this.notificationTitle = '';
|
|
1617
1619
|
this.notificationMessages = [];
|
|
1618
|
-
this.notificationActionText =
|
|
1620
|
+
this.notificationActionText = localization.translate('Keep shopping');
|
|
1619
1621
|
this.order = null;
|
|
1620
1622
|
this.isWaitingToRedirect = true;
|
|
1621
1623
|
}
|
|
@@ -1642,11 +1644,11 @@ const ZonosCheckoutFinish = class {
|
|
|
1642
1644
|
}
|
|
1643
1645
|
render() {
|
|
1644
1646
|
const isTestMode = handleFetch.getIsTestMode();
|
|
1645
|
-
return (index.h(index.Host, { key: '
|
|
1647
|
+
return (index.h(index.Host, { key: '971e0f8daa53ce2f99b2d1d06088fa6a9a37686c', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1646
1648
|
'--zonos--border-radius': getBorderRadius.getBorderRadius({
|
|
1647
1649
|
overrideBorderStyle: this.borderRadius,
|
|
1648
1650
|
}),
|
|
1649
|
-
} }, !this.isLoading && (index.h("div", { key: '
|
|
1651
|
+
} }, !this.isLoading && (index.h("div", { key: '284fb3adcb71840ad3f5cd94e169c723e29e3c42', class: "zonos--finish-details" }, index.h("div", { key: '485b63dae4714360af0ee65314e65de8b54ab311', class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { key: 'c73f31ed5a9690af97e1884d0bbfff93734f266d', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: '126118933ea6863384d98bf8f013a4130ab411cd', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (index.h("zonos-button", { key: '95bdb39e56a16004cc3896531458d0e86fa38bb4',
|
|
1650
1652
|
// Only show loading spinner if it's not an error notification
|
|
1651
1653
|
loading: this.isWaitingToRedirect &&
|
|
1652
1654
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -1657,10 +1659,10 @@ const ZonosCheckoutFinish = class {
|
|
|
1657
1659
|
return;
|
|
1658
1660
|
}
|
|
1659
1661
|
this.closeClickHandler();
|
|
1660
|
-
}, size: "md", variant: "primary" },
|
|
1661
|
-
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '
|
|
1662
|
+
}, size: "md", variant: "primary" }, localization.translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
1663
|
+
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '325fd258d5d71668ba190a24ddc0e231b4b75208', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
1662
1664
|
cart.cartStore.step === 'finish' &&
|
|
1663
|
-
this.notificationType === 'success' && (index.h("div", { key: '
|
|
1665
|
+
this.notificationType === 'success' && (index.h("div", { key: '00116d9f6380fa1f4547eb0cb6d229aca380bffb', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: '5c5334198095729ae8e07e4868b6b248f0750ac3', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: '76fb0725306246ac9b9c88a41bca1937d65e3f01', onClick: () => {
|
|
1664
1666
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
1665
1667
|
this.redirectToUrl(isZonosDashboard
|
|
1666
1668
|
? '/orders/all'
|
|
@@ -1710,7 +1712,7 @@ const ZonosCheckoutFooter = class {
|
|
|
1710
1712
|
}
|
|
1711
1713
|
render() {
|
|
1712
1714
|
var _a;
|
|
1713
|
-
const languageLabel = (_a = ILanguage.languages.find(x => x.code ===
|
|
1715
|
+
const languageLabel = (_a = ILanguage.languages.find(x => x.code === localization.localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
1714
1716
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
1715
1717
|
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1000';
|
|
1716
1718
|
return (index.h(index.Host, { key: '348667bda79c9d8c69f1481262f3dd74068b4f16', class: classes.classes(['zonos--elements', this.isMobile && 'mobile']) }, index.h("div", { key: '8751d01d35e0ca75ab4f3866d2964fbbe9cabd91', class: "zonos--checkout-footer" }, index.h("div", { key: '0745cc39cb134d0dee746d6e8dbe75192c226e7b', class: "zonos--checkout-locale-wrapper" }, index.h("zonos-button", { key: 'a1a6ba67ad35c4e3e04959e5895a959c5b3fa4b3', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: index.h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), index.h("div", { key: 'e82c276c99eb723af2be002f8f749bf7e6e005c3', class: classes.classes([
|
|
@@ -1729,7 +1731,7 @@ const placeTestOrder = async () => {
|
|
|
1729
1731
|
var _a, _b;
|
|
1730
1732
|
const shipToPartyId = (_a = cart.cartStore.partiesData.find(party => party.type === 'DESTINATION')) === null || _a === void 0 ? void 0 : _a.id;
|
|
1731
1733
|
const billToPartyId = (_b = cart.cartStore.partiesData.find(party => party.type === 'PAYOR')) === null || _b === void 0 ? void 0 : _b.id;
|
|
1732
|
-
const checkoutSessionId =
|
|
1734
|
+
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
1733
1735
|
if (!checkoutSessionId || !billToPartyId || !shipToPartyId) {
|
|
1734
1736
|
handleFetch.logError('Missing required data', {
|
|
1735
1737
|
billToPartyId,
|
|
@@ -1824,7 +1826,7 @@ const ZonosCheckoutPayment = class {
|
|
|
1824
1826
|
document.body.removeChild(hiddenTextarea);
|
|
1825
1827
|
}
|
|
1826
1828
|
window.Zonos.showNotification({
|
|
1827
|
-
message:
|
|
1829
|
+
message: localization.translate('Card number copied to clipboard'),
|
|
1828
1830
|
timeout: 4000,
|
|
1829
1831
|
type: 'success',
|
|
1830
1832
|
});
|
|
@@ -1887,14 +1889,14 @@ const ZonosCheckoutPayment = class {
|
|
|
1887
1889
|
const theme = this.isMobile
|
|
1888
1890
|
? zonosStore.zonosStore.appearance.theme
|
|
1889
1891
|
: themeBasedColor;
|
|
1890
|
-
return (index.h(index.Fragment, null, this.stagingOrderCreateErrorMessage && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, this.stagingOrderCreateErrorMessage)), index.h("zonos-empty-state-payment", { emptyStateText:
|
|
1892
|
+
return (index.h(index.Fragment, null, this.stagingOrderCreateErrorMessage && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, this.stagingOrderCreateErrorMessage)), index.h("zonos-empty-state-payment", { emptyStateText: localization.translate('No payment method needed for staging'), theme: theme }), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.internalContinueLoading, onClick: () => {
|
|
1891
1893
|
void this.placeTestOrder();
|
|
1892
1894
|
}, size: "lg",
|
|
1893
1895
|
// use primary type when on mobile mode
|
|
1894
|
-
variant: this.submitBtnType },
|
|
1896
|
+
variant: this.submitBtnType }, localization.translate('Place test order')))));
|
|
1895
1897
|
}
|
|
1896
|
-
return (index.h(index.Fragment, null, this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" },
|
|
1897
|
-
|
|
1898
|
+
return (index.h(index.Fragment, null, this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, localization.translate('Missing required fields. Make sure all fields are completed.'))), this.hasStripePaymentError && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, cart.stripeStore.customErrorMessage ||
|
|
1899
|
+
localization.translate("We couldn't complete your payment. Please verify the payment details and try again."))), paypal.paypalStore.paypalErrorMessage && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, paypal.paypalStore.paypalErrorMessage)), index.h("zonos-payment", null), index.h("div", { class: "zonos--group-btn" }, !isPaypalTabSelected && (index.h(index.Fragment, null, index.h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, isDisabled: this.continueLoading &&
|
|
1898
1900
|
cart.stripeStore.checkoutSettlementCurrency === 'USD', loading: this.continueLoading &&
|
|
1899
1901
|
cart.stripeStore.checkoutSettlementCurrency !== 'USD', onClick: async () => {
|
|
1900
1902
|
if (!cart.cartStore.checkoutSession) {
|
|
@@ -1907,7 +1909,7 @@ const ZonosCheckoutPayment = class {
|
|
|
1907
1909
|
});
|
|
1908
1910
|
}, size: "lg",
|
|
1909
1911
|
// use primary type when on mobile mode
|
|
1910
|
-
variant: this.submitBtnType },
|
|
1912
|
+
variant: this.submitBtnType }, localization.translate('Pay [orderTotal]', {
|
|
1911
1913
|
orderTotal: renderCheckoutCurrency({
|
|
1912
1914
|
amount: cart.cartStore.total,
|
|
1913
1915
|
isForeign: true,
|
|
@@ -1918,13 +1920,13 @@ const ZonosCheckoutPayment = class {
|
|
|
1918
1920
|
await this.continueClickHandler({
|
|
1919
1921
|
currencyCode: 'USD',
|
|
1920
1922
|
});
|
|
1921
|
-
}, size: "lg", variant: "subtle" },
|
|
1923
|
+
}, size: "lg", variant: "subtle" }, localization.translate('Click to pay in USD'))))), index.h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
|
|
1922
1924
|
this.paypalSessionDone.emit(orderId);
|
|
1923
1925
|
}, onPaypalSessionFail: () => this.paypalSessionFailed.emit(), style: {
|
|
1924
1926
|
display: isPaypalTabSelected ? 'block' : 'none',
|
|
1925
|
-
} })), isTestMode && (index.h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, index.h("zonos-v-stack", { spacing: 16 }, index.h("div", null, index.h("zonos-text", { type: "semiBoldLabel" },
|
|
1927
|
+
} })), isTestMode && (index.h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, index.h("zonos-v-stack", { spacing: 16 }, index.h("div", null, index.h("zonos-text", { type: "semiBoldLabel" }, localization.translate('Test cards')), index.h("zonos-text", { textColor: "gray-700" }, localization.translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), index.h("zonos-button", { icon: index.h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, localization.translate('Success'), " (****4242)"), index.h("zonos-button", { icon: index.h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, localization.translate('Failure'), " (****0002)")), index.h("zonos-notification", null)))));
|
|
1926
1928
|
};
|
|
1927
|
-
return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" },
|
|
1929
|
+
return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Payment method')), renderPayment())));
|
|
1928
1930
|
}
|
|
1929
1931
|
get ele() { return index.getElement(this); }
|
|
1930
1932
|
static get watchers() { return {
|
|
@@ -2056,7 +2058,7 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
2056
2058
|
'zonos--tab-item',
|
|
2057
2059
|
tab.value === selectedStep && 'selected',
|
|
2058
2060
|
tab.isDone && 'done',
|
|
2059
|
-
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => this.setTabSelected(tab.value) }, index.h("div", { class: "zonos--tab-index" }, index.h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index$1 + 1), index.h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), index.h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" },
|
|
2061
|
+
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => this.setTabSelected(tab.value) }, index.h("div", { class: "zonos--tab-index" }, index.h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index$1 + 1), index.h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), index.h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, localization.translate(tab.label))));
|
|
2060
2062
|
})), index.h("div", { key: '1e8dbcee0cc21837b030760250755fe5292bd261', class: "zonos--tab-progress" }, index.h("div", { key: 'a9250c1ca7b7a40f5b6d0bbbeca24f657471cda1', class: "zonos--progress-bar-fill" }))));
|
|
2061
2063
|
}
|
|
2062
2064
|
static get assetsDirs() { return ["assets"]; }
|
|
@@ -2092,7 +2094,7 @@ const ZonosConfirmDialog = class {
|
|
|
2092
2094
|
this.closeDialogHandler();
|
|
2093
2095
|
}
|
|
2094
2096
|
};
|
|
2095
|
-
this.dialogTitle =
|
|
2097
|
+
this.dialogTitle = localization.translate('Are you sure?');
|
|
2096
2098
|
this.dialogIntent = 'info';
|
|
2097
2099
|
this.dialogSubtitle = null;
|
|
2098
2100
|
this.submitBtnColor = undefined;
|
|
@@ -2165,7 +2167,7 @@ const ZonosConfirmDialog = class {
|
|
|
2165
2167
|
'--zonos--font-family': zonosStore.zonosStoreFontFamily(),
|
|
2166
2168
|
} }, index.h("div", { key: 'e2b1358dedfb3e5a3dc42099330be1d3bb6845e5', class: "zonos--backdrop", tabIndex: -1 }), index.h("div", { key: 'f4cf0ddf4ee1695bef503809a810710902c2e810', class: classes.classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, index.h("div", { key: 'a8910f985165f18399e628b05b5075d04487007b', class: "zonos--confirm-dialog", onBlur: () => {
|
|
2167
2169
|
this.focusDialog();
|
|
2168
|
-
} }, index.h("div", { key: '723b4753614273bafe03488cdc5eb7a2a14cfb2c', class: "wrapper" }, index.h("div", { key: '53faf2cbdcec3acdff25f8471a37afdfb4298ef3', class: "icon-wrapper" }, this.renderIcon()), index.h("div", { key: '8e6ee33eb8ee48acb99066ce964b52e81086176f', class: "content" }, index.h("div", { key: '6c800bbc27a2e62756b20068b97e5777ebf5fbb2', class: "title" }, index.h("zonos-text", { key: '7bcad323167f954ae83c9afd7c4473efc5e32c37', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (index.h("div", { key: '85ffc3c1492dd432953bc645103590bacd9a3912', class: "subtitle" }, index.h("zonos-text", { key: 'f7e859f0c8256ead95db3d74b78b50fe6ea84700', textColor: "gray-800" }, this.dialogSubtitle)))), index.h("div", { key: 'c35405667155231fb6037147ac35d0c1f5ed0dd0', class: "footer" }, this.dialogType === 'confirm' && (index.h("zonos-button", { key: '082731ae55230c6fe05307871ef5e6a124616e33', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText ||
|
|
2170
|
+
} }, index.h("div", { key: '723b4753614273bafe03488cdc5eb7a2a14cfb2c', class: "wrapper" }, index.h("div", { key: '53faf2cbdcec3acdff25f8471a37afdfb4298ef3', class: "icon-wrapper" }, this.renderIcon()), index.h("div", { key: '8e6ee33eb8ee48acb99066ce964b52e81086176f', class: "content" }, index.h("div", { key: '6c800bbc27a2e62756b20068b97e5777ebf5fbb2', class: "title" }, index.h("zonos-text", { key: '7bcad323167f954ae83c9afd7c4473efc5e32c37', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (index.h("div", { key: '85ffc3c1492dd432953bc645103590bacd9a3912', class: "subtitle" }, index.h("zonos-text", { key: 'f7e859f0c8256ead95db3d74b78b50fe6ea84700', textColor: "gray-800" }, this.dialogSubtitle)))), index.h("div", { key: 'c35405667155231fb6037147ac35d0c1f5ed0dd0', class: "footer" }, this.dialogType === 'confirm' && (index.h("zonos-button", { key: '082731ae55230c6fe05307871ef5e6a124616e33', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText || localization.translate('Cancel'))), index.h("zonos-button", { key: '4873b0e88c691197104b95658fc00940d97d44b9', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
|
|
2169
2171
|
}
|
|
2170
2172
|
static get assetsDirs() { return ["assets"]; }
|
|
2171
2173
|
get el() { return index.getElement(this); }
|
|
@@ -2444,7 +2446,7 @@ const ZonosCustomerInfo = class {
|
|
|
2444
2446
|
shippingCountry: this.shippingCountry,
|
|
2445
2447
|
taxId: cart.stripeStore.taxId,
|
|
2446
2448
|
});
|
|
2447
|
-
this.taxIdErrorMessage = !valid ?
|
|
2449
|
+
this.taxIdErrorMessage = !valid ? localization.translate(error) : '';
|
|
2448
2450
|
if (!isValidBilling || !isValidShipping || !isValidLink || !valid) {
|
|
2449
2451
|
return false;
|
|
2450
2452
|
}
|
|
@@ -2476,7 +2478,7 @@ const ZonosCustomerInfo = class {
|
|
|
2476
2478
|
};
|
|
2477
2479
|
this.renderAddressComponent = (type) => {
|
|
2478
2480
|
var _a, _b;
|
|
2479
|
-
if (!
|
|
2481
|
+
if (!localization.localizationStore.selectedCountryCode) {
|
|
2480
2482
|
void handleFetch.sendErrorLog({
|
|
2481
2483
|
endpoint: 'NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT',
|
|
2482
2484
|
errors: ['No country selected when rendering address component'],
|
|
@@ -2488,16 +2490,16 @@ const ZonosCustomerInfo = class {
|
|
|
2488
2490
|
}
|
|
2489
2491
|
// Only use the default address for shipping address
|
|
2490
2492
|
const defaultAddress = type === 'shipping' ? this.defaultAddress : [];
|
|
2491
|
-
const shouldUseCustomAddressForm = !!
|
|
2493
|
+
const shouldUseCustomAddressForm = !!localization.localizationStore.selectedCountryCode &&
|
|
2492
2494
|
this.shouldEnabledCustomAddress &&
|
|
2493
|
-
!!((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.countryCustomAddressEnabled) === null || _b === void 0 ? void 0 : _b.includes(
|
|
2495
|
+
!!((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.countryCustomAddressEnabled) === null || _b === void 0 ? void 0 : _b.includes(localization.localizationStore.selectedCountryCode));
|
|
2494
2496
|
// Should only record the form type used once
|
|
2495
2497
|
if (type === 'shipping' &&
|
|
2496
|
-
|
|
2498
|
+
localization.storageStore.checkoutSessionId &&
|
|
2497
2499
|
!this.recordedFormTypeUsed) {
|
|
2498
2500
|
void handleFetch.handleFetch('/api/zonos-elements/update-checkout-session-metadata', {
|
|
2499
2501
|
body: {
|
|
2500
|
-
id:
|
|
2502
|
+
id: localization.storageStore.checkoutSessionId,
|
|
2501
2503
|
metadata: [
|
|
2502
2504
|
{
|
|
2503
2505
|
key: 'ZONOS_FORM_TYPE_USING',
|
|
@@ -2511,10 +2513,10 @@ const ZonosCustomerInfo = class {
|
|
|
2511
2513
|
}
|
|
2512
2514
|
// Render custom address component if the custom address form is enabled
|
|
2513
2515
|
if (shouldUseCustomAddressForm) {
|
|
2514
|
-
return (index.h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText:
|
|
2516
|
+
return (index.h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: localization.translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }));
|
|
2515
2517
|
}
|
|
2516
2518
|
// Render Stripe address component by default
|
|
2517
|
-
return (index.h("zonos-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText:
|
|
2519
|
+
return (index.h("zonos-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: localization.translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }));
|
|
2518
2520
|
};
|
|
2519
2521
|
this.continueLoading = false;
|
|
2520
2522
|
this.submitBtnType = undefined;
|
|
@@ -2592,11 +2594,11 @@ const ZonosCustomerInfo = class {
|
|
|
2592
2594
|
const defaultEmail = ((_c = this.defaultAddress.find(Boolean)) === null || _c === void 0 ? void 0 : _c.email) ||
|
|
2593
2595
|
((_f = (_e = (_d = cart.stripeStore.customerProfile) === null || _d === void 0 ? void 0 : _d.locations) === null || _e === void 0 ? void 0 : _e.find(Boolean)) === null || _f === void 0 ? void 0 : _f.email) ||
|
|
2594
2596
|
((_g = cart.stripeStore.customerProfile) === null || _g === void 0 ? void 0 : _g.email);
|
|
2595
|
-
return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" },
|
|
2597
|
+
return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Customer information')), this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, localization.translate('Missing required fields. Make sure all fields are completed.'))), index.h("zonos-link-authentication", { defaultEmail: defaultEmail, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: localization.translate('Contact') }), this.renderAddressComponent('shipping'), index.h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: cart.stripeStore.stripeShippingSameAsBilling, label: localization.translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
2596
2598
|
cart.stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
2597
2599
|
} }), index.h("zonos-collapse", { collapsed: !showBilling }, this.renderAddressComponent('billing')), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
2598
2600
|
// use primary type when on mobile mode
|
|
2599
|
-
variant: this.submitBtnType },
|
|
2601
|
+
variant: this.submitBtnType }, localization.translate('Continue to shipping')))), cart.stripeStore.stripeAddressEventData && (index.h("zonos-address-update-dialog", { billingAddress: !cart.stripeStore.stripeShippingSameAsBilling &&
|
|
2600
2602
|
cart.stripeStore.stripeBillingAddressEventData
|
|
2601
2603
|
? this.prepareAddressObject(cart.stripeStore.stripeBillingAddressEventData)
|
|
2602
2604
|
: null, "data-theme": theme, dialogLoading: this.isValidatingAddress, dialogOpen: this.openAddressValidationDialog, isMobile: this.isMobile, onCloseUpdateDialog: () => (this.openAddressValidationDialog = false), onContinueClicked: e => {
|
|
@@ -2618,6 +2620,22 @@ const ZonosCustomerInfo = class {
|
|
|
2618
2620
|
};
|
|
2619
2621
|
ZonosCustomerInfo.style = ZonosCustomerInfoStyle0;
|
|
2620
2622
|
|
|
2623
|
+
const zonosLoadingOverlayCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";
|
|
2624
|
+
const ZonosLoadingOverlayStyle0 = zonosLoadingOverlayCss;
|
|
2625
|
+
|
|
2626
|
+
const ZonosLoadingOverlay = class {
|
|
2627
|
+
constructor(hostRef) {
|
|
2628
|
+
index.registerInstance(this, hostRef);
|
|
2629
|
+
this.open = false;
|
|
2630
|
+
this.spinnerColor = undefined;
|
|
2631
|
+
this.size = 40;
|
|
2632
|
+
}
|
|
2633
|
+
render() {
|
|
2634
|
+
return (index.h(index.Host, { key: 'eff20c3fe4c4a998748ac07567cc5449efc398cd', class: classes.classes(['zonos--elements', this.open && 'zonos--open']) }, index.h("div", { key: '1b37bfc1a150720e0f4f84075ac661e5395aee3b', class: "zonos--loading-overlay" }, index.h("zonos-spinner", { key: '42ac91e723802b23897b6e5cd99e0aea7d964da5', size: this.size, spinnerColor: this.spinnerColor }))));
|
|
2635
|
+
}
|
|
2636
|
+
};
|
|
2637
|
+
ZonosLoadingOverlay.style = ZonosLoadingOverlayStyle0;
|
|
2638
|
+
|
|
2621
2639
|
const zonosRestStateCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{height:100%;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;gap:20px}:host .zonos--restState-image{width:124px;height:124px;margin-bottom:15px}:host .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:8px}";
|
|
2622
2640
|
const ZonosRestStateStyle0 = zonosRestStateCss;
|
|
2623
2641
|
|
|
@@ -2635,11 +2653,11 @@ const ZonosRestState = class {
|
|
|
2635
2653
|
}
|
|
2636
2654
|
render() {
|
|
2637
2655
|
const imageUrl = this.getImageRestState();
|
|
2638
|
-
return (index.h(index.Host, { key: '
|
|
2656
|
+
return (index.h(index.Host, { key: '754bdcff113a9ec5351d1053ddaea5e542111bbc', class: classes.classes(['zonos--elements zonos--restState']), style: {
|
|
2639
2657
|
'--zonos--font-family': zonosStore.zonosStoreFontFamily(),
|
|
2640
|
-
} }, index.h("div", { key: '
|
|
2658
|
+
} }, index.h("div", { key: '3037acffd2d7da9bac11ada7cd4e06e2ae976f72', class: "zonos--restState-image" }, index.h("img", { key: 'd462d07f452caaaf87af20e1b2aad6ac45b43107', alt: this.restStateType, onError: () => {
|
|
2641
2659
|
this.isErrorImageLoad = true;
|
|
2642
|
-
}, src: imageUrl })), index.h("div", { key: '
|
|
2660
|
+
}, src: imageUrl })), index.h("div", { key: '9acf78ef8358ad75df01bbbb1ed52b680f896255', class: "content" }, index.h("zonos-text", { key: '8310474f006a1fc1dcf96bac09c770572b20590a', class: "title", type: "boldSubheader" }, this.restStateTitle), index.h("zonos-text", { key: '623dc98d57eaae5fb1059c658391300aa41a13fb', class: "subtitle" }, this.restStateSubtitle)), index.h("div", { key: 'f69613147698a147447a0aac330ad1c67739fed0', class: "action" }, index.h("slot", { key: '823ff6075ecac4598299c29ab2e44a6d5fb6a5d8' }))));
|
|
2643
2661
|
}
|
|
2644
2662
|
static get assetsDirs() { return ["assets"]; }
|
|
2645
2663
|
};
|
|
@@ -2685,7 +2703,7 @@ const ZonosReview = class {
|
|
|
2685
2703
|
return (index.h(index.Host, { class: classes.classes([
|
|
2686
2704
|
'zonos--review zonos--elements',
|
|
2687
2705
|
this.isMobile && 'mobile',
|
|
2688
|
-
]) }, index.h("div", { class: "zonos--title" }, index.h("zonos-text", { textColor: titleTextColor, type: titleTextType },
|
|
2706
|
+
]) }, index.h("div", { class: "zonos--title" }, index.h("zonos-text", { textColor: titleTextColor, type: titleTextType }, localization.translate('Pay [organizationName]', {
|
|
2689
2707
|
organizationName: zonosStore.zonosStore.organizationName,
|
|
2690
2708
|
})), renderCollapseIcon()), index.h("div", { class: "zonos--total-pay" }, index.h("zonos-text", { type: totalTextType }, renderCheckoutCurrency({
|
|
2691
2709
|
amount: total,
|
|
@@ -2769,7 +2787,7 @@ const ZonosShipping = class {
|
|
|
2769
2787
|
}
|
|
2770
2788
|
// submit google tag when the form is complete
|
|
2771
2789
|
paypal.submitGtag('zonos-checkout-shipping-info');
|
|
2772
|
-
const checkoutSessionId =
|
|
2790
|
+
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
2773
2791
|
void cart.trackConversionEvent({
|
|
2774
2792
|
checkoutSessionId,
|
|
2775
2793
|
eventName: 'checkout_shippingInfoCompleted',
|
|
@@ -2786,7 +2804,7 @@ const ZonosShipping = class {
|
|
|
2786
2804
|
// DAP description for non-US countries only
|
|
2787
2805
|
case method === 'DAP' &&
|
|
2788
2806
|
((_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) !== 'US':
|
|
2789
|
-
return
|
|
2807
|
+
return localization.translate(` (Duties due at door)`);
|
|
2790
2808
|
default:
|
|
2791
2809
|
return '';
|
|
2792
2810
|
}
|
|
@@ -2907,13 +2925,13 @@ const ZonosShipping = class {
|
|
|
2907
2925
|
this.collapsedDAPOptions && 'collapsed',
|
|
2908
2926
|
]), onClick: () => {
|
|
2909
2927
|
this.collapsedDAPOptions = !this.collapsedDAPOptions;
|
|
2910
|
-
} }, index.h("div", { class: "zonos--title-wrapper" }, index.h("zonos-text", { type: "label" }, `${
|
|
2928
|
+
} }, index.h("div", { class: "zonos--title-wrapper" }, index.h("zonos-text", { type: "label" }, `${localization.translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), index.h("zonos-icon", { content: ChevronUpIcon })))), index.h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, index.h("div", { class: "zonos--dap-wrapper" }, index.h("zonos-banner", { bannerTitle: localization.translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, localization.translate('You may incur additional fees from the shipping carrier by not prepaying.')), index.h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
|
|
2911
2929
|
};
|
|
2912
|
-
return (index.h(index.Host, { class: "zonos--shipping zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" },
|
|
2930
|
+
return (index.h(index.Host, { class: "zonos--shipping zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Delivery options')), this.showErrorBanner && !!this.serviceLevelsAll.length && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, localization.translate('No shipping method selected'))), index.h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, localization.translate('Shipping method')), !this.serviceLevelsAll.length ? (index.h("zonos-banner", { bannerTitle: cart.cartStore.customQuotingError
|
|
2913
2931
|
? cart.cartStore.customQuotingError
|
|
2914
|
-
:
|
|
2932
|
+
: localization.translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), class: "zonos--shipping-method-error", intent: "error" })) : (index.h("div", { class: "zonos--shipping-options-wrapper" }, renderServiceLevels())), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
2915
2933
|
// use primary type when on mobile mode
|
|
2916
|
-
variant: this.submitBtnType },
|
|
2934
|
+
variant: this.submitBtnType }, localization.translate('Go to payment'))))));
|
|
2917
2935
|
}
|
|
2918
2936
|
};
|
|
2919
2937
|
ZonosShipping.style = ZonosShippingStyle0;
|
|
@@ -2928,6 +2946,7 @@ exports.zonos_checkout_progress_tabs = ZonosCheckoutProgressTabs;
|
|
|
2928
2946
|
exports.zonos_confirm_dialog = ZonosConfirmDialog;
|
|
2929
2947
|
exports.zonos_currency_toggle = ZonosCurrencyToggle;
|
|
2930
2948
|
exports.zonos_customer_info = ZonosCustomerInfo;
|
|
2949
|
+
exports.zonos_loading_overlay = ZonosLoadingOverlay;
|
|
2931
2950
|
exports.zonos_rest_state = ZonosRestState;
|
|
2932
2951
|
exports.zonos_review = ZonosReview;
|
|
2933
2952
|
exports.zonos_shipping = ZonosShipping;
|