@zonos/elements 1.3.246 → 1.3.248
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/ShortAddressCode-bec338b0.js +7 -0
- package/dist/cjs/{cart-52cf3366.js → cart-28310848.js} +37 -6
- package/dist/cjs/getContrastColor-30848800.js +37 -0
- package/dist/cjs/{hasInclusivePrice-dbb82df8.js → hasInclusivePrice-134b0250.js} +1 -1
- package/dist/cjs/index.cjs.js +16 -7
- package/dist/cjs/{invoice-972f1ab3.js → invoice-2e8e5879.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-fd11246c.js → isCollectMobileTablet-bd0f4556.js} +2 -2
- package/dist/cjs/isContrastColor-09f5924a.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-b1075a8c.js → localization-00e73920.js} +180 -0
- package/dist/cjs/{paypal-e339cc8c.js → paypal-3019ae94.js} +24 -29
- package/dist/cjs/{placeTestOrder-3dfbe3d6.js → placeTestOrder-b0369cfd.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-55056c97.js → renderCheckoutCurrency-9e919b9f.js} +2 -2
- package/dist/cjs/{shouldRenderTaxIdInput-eda13ef8.js → shouldRenderTaxIdInput-b8abf6de.js} +18 -0
- package/dist/cjs/submitGtag-a50ab32e.js +116 -0
- package/dist/cjs/zonos-address-display_9.cjs.entry.js +35 -5
- package/dist/cjs/zonos-address_4.cjs.entry.js +37 -7
- package/dist/cjs/zonos-card_5.cjs.entry.js +5 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +170 -57
- package/dist/cjs/zonos-checkout.cjs.entry.js +31 -9
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +14 -12
- package/dist/cjs/zonos-collect.cjs.entry.js +6 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +14 -12
- package/dist/cjs/zonos-invoice.cjs.entry.js +6 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +18 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +88 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +9 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +26 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +16 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +31 -6
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +5 -5
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +5 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +1 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
- package/dist/collection/components/main/zonos-controller.js +4 -1
- package/dist/collection/components/store/checkout/paypal.js +19 -1
- package/dist/collection/components/store/checkout/stripe.js +34 -5
- 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.css +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +53 -3
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -2
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
- package/dist/collection/components/utils/checkout/shouldRenderShortAddressCodeInput.js +16 -0
- package/dist/collection/components/utils/shortAddressCodeValidationResult.js +37 -0
- package/dist/collection/components/utils/submitGtag.js +90 -2
- package/dist/collection/scripts/_zonosBase.js +7 -0
- package/dist/collection/types/analyticsRelay.js +6 -0
- package/dist/collection/types/checkout/ShortAddressCode.js +3 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +135 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/ShortAddressCode-7620e622.js +5 -0
- package/dist/esm/{cart-7f4704dc.js → cart-ba8f3890.js} +37 -6
- package/dist/esm/getContrastColor-28c18704.js +35 -0
- package/dist/esm/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
- package/dist/esm/index.js +15 -7
- package/dist/esm/{invoice-d3d256fb.js → invoice-055bb6e5.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-797cea8b.js} +2 -2
- package/dist/esm/isContrastColor-69778cea.js +10 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-401ec6d4.js → localization-853b48a9.js} +180 -0
- package/dist/esm/{paypal-61270b79.js → paypal-8d8518c0.js} +25 -28
- package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-0a74923e.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-bd059ecf.js} +2 -2
- package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
- package/dist/esm/submitGtag-89d6e9cb.js +113 -0
- package/dist/esm/zonos-address-display_9.entry.js +35 -5
- package/dist/esm/zonos-address_4.entry.js +37 -7
- package/dist/esm/zonos-card_5.entry.js +5 -3
- package/dist/esm/zonos-cart-items_12.entry.js +170 -57
- package/dist/esm/zonos-checkout.entry.js +31 -9
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +14 -12
- package/dist/esm/zonos-collect.entry.js +6 -4
- package/dist/esm/zonos-controller.entry.js +6 -3
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +14 -12
- package/dist/esm/zonos-invoice.entry.js +6 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +19 -5
- package/dist/esm-es5/ShortAddressCode-7620e622.js +1 -0
- package/dist/esm-es5/cart-ba8f3890.js +1 -0
- package/dist/esm-es5/getContrastColor-28c18704.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-d3d256fb.js → invoice-055bb6e5.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-797cea8b.js} +1 -1
- package/dist/esm-es5/isContrastColor-69778cea.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-853b48a9.js +1 -0
- package/dist/esm-es5/paypal-8d8518c0.js +17 -0
- package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-0a74923e.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-bd059ecf.js} +1 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
- package/dist/esm-es5/submitGtag-89d6e9cb.js +1 -0
- package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.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-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/scripts/analyticsRelayOnInit.js +1 -0
- package/dist/scripts/index.d.ts +61 -4
- 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 +4 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -0
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
- package/dist/types/components/store/checkout/stripe.d.ts +10 -0
- 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-address/zonos-address.d.ts +8 -0
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +8 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/shouldRenderShortAddressCodeInput.d.ts +6 -0
- package/dist/types/components/utils/shortAddressCodeValidationResult.d.ts +12 -0
- package/dist/types/components/utils/submitGtag.d.ts +32 -2
- package/dist/types/components.d.ts +32 -0
- package/dist/types/scripts/_zonosBase.d.ts +11 -0
- package/dist/types/types/analyticsRelay.d.ts +12 -0
- package/dist/types/types/checkout/ShortAddressCode.d.ts +2 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
- package/dist/types/types/checkout/api/CreateParty.d.ts +1 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +157 -30
- package/dist/types/types/generated/graphql.internal.types.ts +194 -37
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-002e45f9.system.js +17 -0
- package/dist/zonos-elements/p-0792688d.system.entry.js +1 -0
- package/dist/zonos-elements/p-09aabce0.js +1 -0
- package/dist/zonos-elements/p-0b7beb16.system.entry.js +1 -0
- package/dist/zonos-elements/p-0f787f5d.entry.js +1 -0
- package/dist/zonos-elements/p-0ff93ca6.entry.js +1 -0
- package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-367c13db.system.entry.js → p-1acf0a71.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1d42cd20.js +1 -0
- package/dist/zonos-elements/p-1dbeeab2.entry.js +1 -0
- package/dist/zonos-elements/p-291f7ccb.system.entry.js +1 -0
- package/dist/zonos-elements/{p-67820c21.system.entry.js → p-2f55895c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-37bb5f2d.entry.js +1 -0
- package/dist/zonos-elements/{p-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3972663a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-39fa55c7.entry.js} +1 -1
- package/dist/zonos-elements/p-3e85b9f5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-cee69784.entry.js → p-403b9fca.entry.js} +1 -1
- package/dist/zonos-elements/p-41299ffb.js +1 -0
- package/dist/zonos-elements/p-443e1f30.system.js +1 -0
- package/dist/zonos-elements/p-48475755.entry.js +1 -0
- package/dist/zonos-elements/p-48d55793.system.js +1 -0
- package/dist/zonos-elements/{p-3f46d83e.entry.js → p-58248f03.entry.js} +1 -1
- package/dist/zonos-elements/p-5edef7c3.system.js +1 -0
- package/dist/zonos-elements/p-63a383f4.js +1 -0
- package/dist/zonos-elements/{p-415c2a90.system.js → p-63a3d3b9.system.js} +1 -1
- package/dist/zonos-elements/p-64661dd1.js +1 -0
- package/dist/zonos-elements/p-655ec440.system.js +1 -0
- package/dist/zonos-elements/p-69212d0f.entry.js +1 -0
- package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
- package/dist/zonos-elements/p-719403e0.system.js +1 -0
- package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-71a8d971.system.entry.js} +1 -1
- package/dist/zonos-elements/p-71d855b8.system.entry.js +1 -0
- package/dist/zonos-elements/p-71f10bf0.entry.js +1 -0
- package/dist/zonos-elements/p-72ff005c.entry.js +1 -0
- package/dist/zonos-elements/p-786d1c24.js +1 -0
- package/dist/zonos-elements/{p-87206522.system.entry.js → p-7b400b5f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7dba5f23.system.js +1 -0
- package/dist/zonos-elements/{p-6b9b7cfb.system.entry.js → p-8205ae87.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a88a130.entry.js → p-83377e23.entry.js} +1 -1
- package/dist/zonos-elements/p-85e59f3a.system.entry.js +1 -0
- package/dist/zonos-elements/p-866afec1.js +1 -0
- package/dist/zonos-elements/p-942358eb.system.js +1 -0
- package/dist/zonos-elements/p-94c5fbfc.system.entry.js +1 -0
- package/dist/zonos-elements/p-a12cb7ce.entry.js +1 -0
- package/dist/zonos-elements/p-abf38ed6.js +1 -0
- package/dist/zonos-elements/{p-e0809901.system.js → p-ae16dda9.system.js} +1 -1
- package/dist/zonos-elements/p-ae26aec5.system.js +1 -0
- package/dist/zonos-elements/p-af85846e.system.js +1 -0
- package/dist/zonos-elements/{p-78c8bb58.system.entry.js → p-b54a95ea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a79f3685.js → p-bc4bfa06.js} +1 -1
- package/dist/zonos-elements/p-bf5e47e2.entry.js +1 -0
- package/dist/zonos-elements/p-c027a832.system.js +1 -0
- package/dist/zonos-elements/p-c2442878.system.js +1 -1
- package/dist/zonos-elements/p-c2f34b10.system.entry.js +1 -0
- package/dist/zonos-elements/p-c36696f9.js +1 -0
- package/dist/zonos-elements/p-c7311ce5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-288aab46.js → p-de8899bc.js} +1 -1
- package/dist/zonos-elements/p-e17bbcee.entry.js +1 -0
- package/dist/zonos-elements/p-eea7ac64.js +1 -0
- package/dist/zonos-elements/p-f6c2c743.entry.js +1 -0
- package/dist/zonos-elements/p-fe06c9ea.js +17 -0
- package/dist/zonos-elements/p-fe96e239.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-7f4704dc.js +0 -1
- package/dist/esm-es5/localization-401ec6d4.js +0 -1
- package/dist/esm-es5/paypal-61270b79.js +0 -17
- package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +0 -1
- package/dist/zonos-elements/p-01b0a2e2.js +0 -1
- package/dist/zonos-elements/p-095f43ec.entry.js +0 -1
- package/dist/zonos-elements/p-1d91e5d1.entry.js +0 -1
- package/dist/zonos-elements/p-21fb6b39.js +0 -1
- package/dist/zonos-elements/p-2601538e.entry.js +0 -1
- package/dist/zonos-elements/p-276faa43.js +0 -1
- package/dist/zonos-elements/p-27874c22.entry.js +0 -1
- package/dist/zonos-elements/p-2889a485.system.entry.js +0 -1
- package/dist/zonos-elements/p-291b85f7.entry.js +0 -1
- package/dist/zonos-elements/p-2d2c627a.system.js +0 -1
- package/dist/zonos-elements/p-3b1898bc.system.entry.js +0 -1
- package/dist/zonos-elements/p-3f078bf5.system.entry.js +0 -1
- package/dist/zonos-elements/p-518b501c.system.entry.js +0 -1
- package/dist/zonos-elements/p-59ebb8c7.system.entry.js +0 -1
- package/dist/zonos-elements/p-5f956a0d.entry.js +0 -1
- package/dist/zonos-elements/p-6c29de12.entry.js +0 -1
- package/dist/zonos-elements/p-74e258ff.system.js +0 -1
- package/dist/zonos-elements/p-775c1122.system.js +0 -1
- package/dist/zonos-elements/p-7a6ab319.system.entry.js +0 -1
- package/dist/zonos-elements/p-85430ec1.js +0 -1
- package/dist/zonos-elements/p-872f9c22.system.entry.js +0 -1
- package/dist/zonos-elements/p-95524f54.js +0 -1
- package/dist/zonos-elements/p-993723c2.system.entry.js +0 -1
- package/dist/zonos-elements/p-a0a62b7e.js +0 -17
- package/dist/zonos-elements/p-a3411f20.entry.js +0 -1
- package/dist/zonos-elements/p-a556ec07.system.js +0 -17
- package/dist/zonos-elements/p-a6489088.js +0 -1
- package/dist/zonos-elements/p-acc0eee3.system.js +0 -1
- package/dist/zonos-elements/p-bd10e82a.system.entry.js +0 -1
- package/dist/zonos-elements/p-c62b6741.system.entry.js +0 -1
- package/dist/zonos-elements/p-c6aa780e.entry.js +0 -1
- package/dist/zonos-elements/p-d1effb76.system.js +0 -1
- package/dist/zonos-elements/p-e7543082.system.js +0 -1
- package/dist/zonos-elements/p-e7df8394.entry.js +0 -1
- package/dist/zonos-elements/p-e90e9584.entry.js +0 -1
- package/dist/zonos-elements/p-eb9ee025.system.js +0 -1
- package/dist/zonos-elements/p-ebef34e3.entry.js +0 -1
- package/dist/zonos-elements/p-f6c6b6d3.system.entry.js +0 -1
|
@@ -3,27 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
8
|
-
const renderCheckoutCurrency = require('./renderCheckoutCurrency-
|
|
6
|
+
const cart = require('./cart-28310848.js');
|
|
7
|
+
const localization = require('./localization-00e73920.js');
|
|
8
|
+
const renderCheckoutCurrency = require('./renderCheckoutCurrency-9e919b9f.js');
|
|
9
9
|
const cleanHtmlMarkdown = require('./cleanHtmlMarkdown-577d0a77.js');
|
|
10
10
|
const classes = require('./classes-b7918f56.js');
|
|
11
11
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
12
|
-
const hasInclusivePrice = require('./hasInclusivePrice-
|
|
13
|
-
const paypal = require('./paypal-
|
|
12
|
+
const hasInclusivePrice = require('./hasInclusivePrice-134b0250.js');
|
|
13
|
+
const paypal = require('./paypal-3019ae94.js');
|
|
14
14
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
15
15
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
16
16
|
const getBorderRadius = require('./getBorderRadius-2ef1170d.js');
|
|
17
17
|
const VarianceTest = require('./VarianceTest-bec00ea8.js');
|
|
18
|
+
const submitGtag = require('./submitGtag-a50ab32e.js');
|
|
18
19
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
19
|
-
const placeTestOrder = require('./placeTestOrder-
|
|
20
|
+
const placeTestOrder = require('./placeTestOrder-b0369cfd.js');
|
|
20
21
|
const isDarkColor = require('./isDarkColor-878e600e.js');
|
|
22
|
+
const getContrastColor = require('./getContrastColor-30848800.js');
|
|
21
23
|
const isColorVariable = require('./isColorVariable-525dbfa7.js');
|
|
22
24
|
const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-3a1db9de.js');
|
|
23
25
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
24
|
-
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-
|
|
26
|
+
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-b8abf6de.js');
|
|
25
27
|
const TaxId = require('./TaxId-12acedde.js');
|
|
28
|
+
require('./isContrastColor-09f5924a.js');
|
|
26
29
|
require('./debounce-815d1517.js');
|
|
30
|
+
require('./ShortAddressCode-bec338b0.js');
|
|
27
31
|
|
|
28
32
|
const zonosCartItemsCss = ":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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}";
|
|
29
33
|
const ZonosCartItemsStyle0 = zonosCartItemsCss;
|
|
@@ -356,6 +360,56 @@ const ZonosCheckoutFinish = class {
|
|
|
356
360
|
order: json,
|
|
357
361
|
};
|
|
358
362
|
};
|
|
363
|
+
/**
|
|
364
|
+
* Metadata for purchase event in GA4
|
|
365
|
+
*/
|
|
366
|
+
this.buildPurchaseMetadata = ({ checkoutSessionId, currency, }) => {
|
|
367
|
+
var _a, _b, _c, _d, _e, _f;
|
|
368
|
+
const items = cart.cartStore.items
|
|
369
|
+
.filter(item => item.amount >= 0)
|
|
370
|
+
.map(item => ({
|
|
371
|
+
item_id: item.sku || item.productId || item.name,
|
|
372
|
+
item_name: item.name,
|
|
373
|
+
price: item.amount,
|
|
374
|
+
quantity: item.quantity,
|
|
375
|
+
}));
|
|
376
|
+
/**
|
|
377
|
+
* The value of this parameter should be the sum of all item amounts in the transaction (without shipping and tax).
|
|
378
|
+
* @ref https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag#parameters_22
|
|
379
|
+
*/
|
|
380
|
+
const subtotal = ((_a = cart.cartStore.checkoutSession) === null || _a === void 0 ? void 0 : _a.subtotals.items) ||
|
|
381
|
+
((_b = this.order) === null || _b === void 0 ? void 0 : _b.amountSubtotals.items);
|
|
382
|
+
const currencyCode = ((_c = cart.cartStore.checkoutSession) === null || _c === void 0 ? void 0 : _c.subtotals.presentmentCurrencyCode) ||
|
|
383
|
+
((_d = this.order) === null || _d === void 0 ? void 0 : _d.currencyCode) ||
|
|
384
|
+
(currency === null || currency === void 0 ? void 0 : currency.toUpperCase());
|
|
385
|
+
// Cart subtotal amount, can be different on the final checkout session/payment intent, therefore only use it if the order/checkout session can not be found.
|
|
386
|
+
const cartSubtotal = items.reduce((acc, item) => acc + item.price * item.quantity, 0);
|
|
387
|
+
const cartCurrency = (_e = cart.cartStore.items.find(Boolean)) === null || _e === void 0 ? void 0 : _e.currencyCode;
|
|
388
|
+
const transactionId = ((_f = this.order) === null || _f === void 0 ? void 0 : _f.id) || checkoutSessionId || new Date().getTime().toString();
|
|
389
|
+
if (currencyCode && subtotal) {
|
|
390
|
+
return {
|
|
391
|
+
currency: currencyCode,
|
|
392
|
+
items,
|
|
393
|
+
transaction_id: transactionId,
|
|
394
|
+
value: subtotal,
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
// Use cart currency and subtotal if the order/checkout session can not be found
|
|
398
|
+
if (cartCurrency && cartSubtotal) {
|
|
399
|
+
return {
|
|
400
|
+
currency: cartCurrency,
|
|
401
|
+
items,
|
|
402
|
+
transaction_id: transactionId,
|
|
403
|
+
value: cartSubtotal,
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
return {
|
|
407
|
+
currency: undefined,
|
|
408
|
+
items,
|
|
409
|
+
transaction_id: transactionId,
|
|
410
|
+
value: undefined,
|
|
411
|
+
};
|
|
412
|
+
};
|
|
359
413
|
this.redirectToUrl = (url) => {
|
|
360
414
|
// reset store and checkout session id before redirecting
|
|
361
415
|
cart.stripeStoreReset();
|
|
@@ -538,7 +592,7 @@ const ZonosCheckoutFinish = class {
|
|
|
538
592
|
this.checkStripePaymentStatus = async () => {
|
|
539
593
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || cart.stripeStore.clientSecret;
|
|
540
594
|
if (clientSecret || this.storybookForceStatus) {
|
|
541
|
-
const { error, messages, status } = await cart.stripeStoreRetrievePayment({
|
|
595
|
+
const { currency, error, messages, status } = await cart.stripeStoreRetrievePayment({
|
|
542
596
|
clientSecret,
|
|
543
597
|
storybookForceStatus: this.storybookForceStatus,
|
|
544
598
|
});
|
|
@@ -564,7 +618,12 @@ const ZonosCheckoutFinish = class {
|
|
|
564
618
|
window.history.replaceState({}, '', url.toString());
|
|
565
619
|
// Payment doesn't go through
|
|
566
620
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
567
|
-
|
|
621
|
+
submitGtag.submitGtag({
|
|
622
|
+
event: 'zonos-checkout-payment-fail',
|
|
623
|
+
metadata: {
|
|
624
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
625
|
+
},
|
|
626
|
+
});
|
|
568
627
|
void handleFetch.sendErrorLog({
|
|
569
628
|
endpoint: 'Stripe payment failed',
|
|
570
629
|
errors: [
|
|
@@ -579,8 +638,21 @@ const ZonosCheckoutFinish = class {
|
|
|
579
638
|
else {
|
|
580
639
|
// Save new order info in case the user reloads before we get order info
|
|
581
640
|
this.saveOrderIdForDuplicationIssue();
|
|
582
|
-
paypal.submitGtag('zonos-checkout-success');
|
|
583
641
|
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
642
|
+
submitGtag.submitGtag({
|
|
643
|
+
event: 'zonos-checkout-success',
|
|
644
|
+
metadata: this.buildPurchaseMetadata({
|
|
645
|
+
checkoutSessionId: checkoutSessionId || '',
|
|
646
|
+
currency: currency === null || currency === void 0 ? void 0 : currency.toUpperCase(),
|
|
647
|
+
}),
|
|
648
|
+
});
|
|
649
|
+
submitGtag.submitGtag({
|
|
650
|
+
event: 'purchase',
|
|
651
|
+
metadata: this.buildPurchaseMetadata({
|
|
652
|
+
checkoutSessionId: checkoutSessionId || '',
|
|
653
|
+
currency: currency === null || currency === void 0 ? void 0 : currency.toUpperCase(),
|
|
654
|
+
}),
|
|
655
|
+
});
|
|
584
656
|
void cart.trackConversionEvent({
|
|
585
657
|
checkoutSessionId,
|
|
586
658
|
eventName: 'checkout_orderCompleted',
|
|
@@ -626,7 +698,18 @@ const ZonosCheckoutFinish = class {
|
|
|
626
698
|
// show success message right away when order id is already created
|
|
627
699
|
this.isLoading = false;
|
|
628
700
|
if (paypal.paypalStore.orderIdCreated) {
|
|
629
|
-
|
|
701
|
+
submitGtag.submitGtag({
|
|
702
|
+
event: 'zonos-checkout-success',
|
|
703
|
+
metadata: this.buildPurchaseMetadata({
|
|
704
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId || '',
|
|
705
|
+
}),
|
|
706
|
+
});
|
|
707
|
+
submitGtag.submitGtag({
|
|
708
|
+
event: 'purchase',
|
|
709
|
+
metadata: this.buildPurchaseMetadata({
|
|
710
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId || '',
|
|
711
|
+
}),
|
|
712
|
+
});
|
|
630
713
|
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
631
714
|
void cart.trackConversionEvent({
|
|
632
715
|
checkoutSessionId,
|
|
@@ -688,11 +771,11 @@ const ZonosCheckoutFinish = class {
|
|
|
688
771
|
}
|
|
689
772
|
render() {
|
|
690
773
|
const isTestMode = handleFetch.getIsTestMode();
|
|
691
|
-
return (index.h(index.Host, { key: '
|
|
774
|
+
return (index.h(index.Host, { key: '80a543fca5dbc63dde41806702b2f6dd4fa849ab', class: "zonos--checkout-finish zonos--elements", style: {
|
|
692
775
|
'--zonos--border-radius': getBorderRadius.getBorderRadius({
|
|
693
776
|
overrideBorderStyle: this.borderRadius,
|
|
694
777
|
}),
|
|
695
|
-
} }, !this.isLoading && (index.h("div", { key: '
|
|
778
|
+
} }, !this.isLoading && (index.h("div", { key: '6cab293041902e156563f37db6f0e77caaeeaaf9', class: "zonos--finish-details" }, index.h("div", { key: '6bf32844fa9d38eae6e9f337e56b7918e49bf793', 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: 'bf13e59b7bc2380609ffba879fa2b1d8c5d9a9e0', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: 'c246affb94a9799e0c556affb73b2ebfb69a9c7f', 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: '61fa4fa0e09c0ce2905281b2696f42172c7a2bcd',
|
|
696
779
|
// Only show loading spinner if it's not an error notification
|
|
697
780
|
loading: this.isWaitingToRedirect &&
|
|
698
781
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -704,9 +787,9 @@ const ZonosCheckoutFinish = class {
|
|
|
704
787
|
}
|
|
705
788
|
this.closeClickHandler();
|
|
706
789
|
}, size: "md", variant: "primary" }, localization.translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
707
|
-
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '
|
|
790
|
+
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '9227d7832ed477be556cb6d59c644a74c293c740', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
708
791
|
cart.cartStore.step === 'finish' &&
|
|
709
|
-
this.notificationType === 'success' && (index.h("div", { key: '
|
|
792
|
+
this.notificationType === 'success' && (index.h("div", { key: '9107be1ef7895b0a5e3fe0a985036a11de7011d3', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: 'b0de8743bea8dd9ac7099bd5b77811f80d80a380', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: 'f90749b9af4c17eac554efb6d3d12cc41ac6e3c8', onClick: () => {
|
|
710
793
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
711
794
|
this.redirectToUrl(isZonosDashboard
|
|
712
795
|
? '/orders/all'
|
|
@@ -824,7 +907,7 @@ const ZonosCheckoutPayment = class {
|
|
|
824
907
|
* handler for continue button click
|
|
825
908
|
*/
|
|
826
909
|
this.continueClickHandler = async ({ currencyCode, }) => {
|
|
827
|
-
var _a;
|
|
910
|
+
var _a, _b;
|
|
828
911
|
if (!this.handleValidate()) {
|
|
829
912
|
this.showErrorBanner = true;
|
|
830
913
|
// Attempt to submit the form so the missing input error will be shown in Stripe
|
|
@@ -839,7 +922,13 @@ const ZonosCheckoutPayment = class {
|
|
|
839
922
|
}
|
|
840
923
|
cart.stripeStore.checkoutSettlementCurrency = currencyCode;
|
|
841
924
|
// submit google tag when the form is complete
|
|
842
|
-
|
|
925
|
+
submitGtag.submitGtag({
|
|
926
|
+
event: 'zonos-checkout-payment-info',
|
|
927
|
+
metadata: {
|
|
928
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
929
|
+
paymentMethod: (_b = cart.stripeStore.stripePaymentEventData) === null || _b === void 0 ? void 0 : _b.value.type,
|
|
930
|
+
},
|
|
931
|
+
});
|
|
843
932
|
this.continueClicked.emit();
|
|
844
933
|
};
|
|
845
934
|
this.copyCardToClipboard = async (cardNumber) => {
|
|
@@ -965,37 +1054,6 @@ const ZonosCheckoutPayment = class {
|
|
|
965
1054
|
};
|
|
966
1055
|
ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
|
|
967
1056
|
|
|
968
|
-
const getContrastColor = ({ backgroundColor, color, }) => {
|
|
969
|
-
if (backgroundColor === color) {
|
|
970
|
-
if (isDarkColor.isDarkColor(color)) {
|
|
971
|
-
const ligherColor = isDarkColor.tinycolor(color).lighten(40).toHexString();
|
|
972
|
-
return ligherColor;
|
|
973
|
-
}
|
|
974
|
-
const darkerColor = isDarkColor.tinycolor(color).darken(40).toHexString();
|
|
975
|
-
return darkerColor;
|
|
976
|
-
}
|
|
977
|
-
// get readibility of the color
|
|
978
|
-
const isContrastEnough = paypal.isContrastColor({
|
|
979
|
-
backgroundColor1: backgroundColor,
|
|
980
|
-
backgroundColor2: color,
|
|
981
|
-
});
|
|
982
|
-
if (isContrastEnough) {
|
|
983
|
-
// no need to change the color if it's already contrast enough
|
|
984
|
-
return color;
|
|
985
|
-
}
|
|
986
|
-
if (isDarkColor.isDarkColor(color)) {
|
|
987
|
-
return '#ffffff';
|
|
988
|
-
}
|
|
989
|
-
const newDarkerColor = isDarkColor.tinycolor(color).darken(25).toHexString();
|
|
990
|
-
const newLigherColor = isDarkColor.tinycolor(color).lighten(25).toHexString();
|
|
991
|
-
// get readibility of the color
|
|
992
|
-
const isNewColorContrastEnough = paypal.isContrastColor({
|
|
993
|
-
backgroundColor1: backgroundColor,
|
|
994
|
-
backgroundColor2: newDarkerColor,
|
|
995
|
-
});
|
|
996
|
-
return isNewColorContrastEnough ? newDarkerColor : newLigherColor;
|
|
997
|
-
};
|
|
998
|
-
|
|
999
1057
|
/**
|
|
1000
1058
|
* Reset any done tabs after selected tab to undone. This is to force user to go through all tabs again
|
|
1001
1059
|
*/
|
|
@@ -1083,7 +1141,7 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
1083
1141
|
const backgroundColor = this.backgroundColor || zonosStore.zonosStore.appearance.colorPrimary || '';
|
|
1084
1142
|
// If the background color and the tab color are not contrat enough, increase the contrast of the label color
|
|
1085
1143
|
const contrastLabelColor = backgroundColor && labelSelectedColor
|
|
1086
|
-
? getContrastColor({
|
|
1144
|
+
? getContrastColor.getContrastColor({
|
|
1087
1145
|
backgroundColor: isColorVariable.isColorVariable(backgroundColor)
|
|
1088
1146
|
? window
|
|
1089
1147
|
.getComputedStyle(this.ele)
|
|
@@ -1143,6 +1201,43 @@ const ZonosCurrencyToggle = class {
|
|
|
1143
1201
|
static get assetsDirs() { return ["assets"]; }
|
|
1144
1202
|
};
|
|
1145
1203
|
|
|
1204
|
+
const shortAddressCodeValidationResult = ({ shippingCountry, shortAddressCode, }) => {
|
|
1205
|
+
// Check to see if we are required to collect short address code for the shipping country or not
|
|
1206
|
+
const isShortAddressCodeInputRendered = shouldRenderTaxIdInput.shouldRenderShortAddressCodeInput({
|
|
1207
|
+
countryCode: shippingCountry,
|
|
1208
|
+
});
|
|
1209
|
+
// If the short address code input is not even rendered, no need to validate anything and allow to proceed. Validate when short address code input is not even rendered would prevent the user from checking out
|
|
1210
|
+
if (!isShortAddressCodeInputRendered) {
|
|
1211
|
+
return {
|
|
1212
|
+
error: null,
|
|
1213
|
+
valid: true,
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* If the short address code input is rendered, the input should be filled
|
|
1218
|
+
*/
|
|
1219
|
+
if (!shortAddressCode) {
|
|
1220
|
+
return {
|
|
1221
|
+
error: 'Short address code is required.',
|
|
1222
|
+
valid: false,
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
if (shippingCountry === 'SA') {
|
|
1226
|
+
const isValid = /^[A-Za-z]{4}\s*[0-9]{4}$/.test(shortAddressCode);
|
|
1227
|
+
if (!isValid) {
|
|
1228
|
+
return {
|
|
1229
|
+
error: 'Invalid short address code format. Must be 4 letters and 4 numbers.',
|
|
1230
|
+
valid: false,
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
// Other countries doesn't need to validate short address code in the right format
|
|
1235
|
+
return {
|
|
1236
|
+
error: null,
|
|
1237
|
+
valid: true,
|
|
1238
|
+
};
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1146
1241
|
const isTaxIdRequired = (shippingCountry) => {
|
|
1147
1242
|
const requireTaxIdCountry = [
|
|
1148
1243
|
'MX',
|
|
@@ -1275,6 +1370,10 @@ const ZonosCustomerInfo = class {
|
|
|
1275
1370
|
* Whether or not the tax id input is invalid
|
|
1276
1371
|
*/
|
|
1277
1372
|
this.taxIdErrorMessage = '';
|
|
1373
|
+
/**
|
|
1374
|
+
* Whether or not the short address code input is invalid
|
|
1375
|
+
*/
|
|
1376
|
+
this.shortAddressCodeErrorMessage = '';
|
|
1278
1377
|
/**
|
|
1279
1378
|
* Whether or not the shipping address contains invalid characters
|
|
1280
1379
|
*/
|
|
@@ -1526,7 +1625,14 @@ const ZonosCustomerInfo = class {
|
|
|
1526
1625
|
shippingCountry: this.shippingCountry,
|
|
1527
1626
|
taxId: cart.stripeStore.taxId,
|
|
1528
1627
|
});
|
|
1628
|
+
const { error: shortAddressCodeError, valid: validShortAddressCode } = shortAddressCodeValidationResult({
|
|
1629
|
+
shippingCountry: this.shippingCountry,
|
|
1630
|
+
shortAddressCode: cart.stripeStore.shortAddressCode,
|
|
1631
|
+
});
|
|
1529
1632
|
this.taxIdErrorMessage = !validTaxId ? localization.translate(error) : '';
|
|
1633
|
+
this.shortAddressCodeErrorMessage = !validShortAddressCode
|
|
1634
|
+
? localization.translate(shortAddressCodeError)
|
|
1635
|
+
: '';
|
|
1530
1636
|
const addressLengthErrorList = this.validateAddressLength({
|
|
1531
1637
|
address: cart.stripeStore.stripeAddressEventData,
|
|
1532
1638
|
type: 'shipping',
|
|
@@ -1543,6 +1649,7 @@ const ZonosCustomerInfo = class {
|
|
|
1543
1649
|
!isValidShipping ||
|
|
1544
1650
|
!isValidLink ||
|
|
1545
1651
|
!validTaxId ||
|
|
1652
|
+
!validShortAddressCode ||
|
|
1546
1653
|
this.exceededCharacterLimitErrorFieldList.length > 0) {
|
|
1547
1654
|
return false;
|
|
1548
1655
|
}
|
|
@@ -1623,10 +1730,10 @@ const ZonosCustomerInfo = class {
|
|
|
1623
1730
|
}
|
|
1624
1731
|
// Render custom address component if the custom address form is enabled
|
|
1625
1732
|
if (this.addressFormRenderType === 'zonos') {
|
|
1626
|
-
return (index.h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: localization.translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
|
|
1733
|
+
return (index.h("zonos-custom-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: localization.translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
|
|
1627
1734
|
}
|
|
1628
1735
|
// Render Stripe address component by default
|
|
1629
|
-
return (index.h("zonos-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: localization.translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
|
|
1736
|
+
return (index.h("zonos-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: localization.translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
|
|
1630
1737
|
};
|
|
1631
1738
|
}
|
|
1632
1739
|
watchShowErrorBanner() {
|
|
@@ -1928,20 +2035,26 @@ const ZonosShipping = class {
|
|
|
1928
2035
|
* handler for continue button click
|
|
1929
2036
|
*/
|
|
1930
2037
|
this.continueClickHandler = () => {
|
|
1931
|
-
var _a;
|
|
2038
|
+
var _a, _b;
|
|
1932
2039
|
// show error banner if the form is not complete
|
|
1933
2040
|
if (!this.handleValidate()) {
|
|
1934
2041
|
this.showErrorBanner = true;
|
|
1935
2042
|
return;
|
|
1936
2043
|
}
|
|
1937
2044
|
// submit google tag when the form is complete
|
|
1938
|
-
|
|
2045
|
+
submitGtag.submitGtag({
|
|
2046
|
+
event: 'zonos-checkout-shipping-info',
|
|
2047
|
+
metadata: {
|
|
2048
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
2049
|
+
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
2050
|
+
},
|
|
2051
|
+
});
|
|
1939
2052
|
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
1940
2053
|
void cart.trackConversionEvent({
|
|
1941
2054
|
checkoutSessionId,
|
|
1942
2055
|
eventName: 'checkout_shippingInfoCompleted',
|
|
1943
2056
|
metadata: {
|
|
1944
|
-
serviceLevelId: (
|
|
2057
|
+
serviceLevelId: (_b = this.selectedShippingMethod) === null || _b === void 0 ? void 0 : _b.value,
|
|
1945
2058
|
},
|
|
1946
2059
|
});
|
|
1947
2060
|
this.showErrorBanner = false;
|
|
@@ -2075,15 +2188,15 @@ const ZonosShipping = class {
|
|
|
2075
2188
|
var _a;
|
|
2076
2189
|
// Render all service levels for US since domestic shipping doesn't have DDP/DAP
|
|
2077
2190
|
if (((_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) === 'US') {
|
|
2078
|
-
return (index.h("zonos-shipping-rich-radio", { items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
|
|
2191
|
+
return (index.h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
|
|
2079
2192
|
}
|
|
2080
|
-
return (index.h(index.Fragment, null, index.h("zonos-shipping-rich-radio", { items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
|
|
2193
|
+
return (index.h(index.Fragment, null, index.h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
|
|
2081
2194
|
!!this.serviceLevelsDAP.length && (index.h("button", { class: classes.classes([
|
|
2082
2195
|
'zonos--shipping-options-collapse-trigger',
|
|
2083
2196
|
this.collapsedDAPOptions && 'collapsed',
|
|
2084
2197
|
]), onClick: () => {
|
|
2085
2198
|
this.collapsedDAPOptions = !this.collapsedDAPOptions;
|
|
2086
|
-
} }, 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 })))));
|
|
2199
|
+
} }, 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", { isMobile: this.isMobile, items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
|
|
2087
2200
|
};
|
|
2088
2201
|
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
|
|
2089
2202
|
? cart.cartStore.customQuotingError
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
8
|
-
const localization = require('./localization-
|
|
6
|
+
const cart = require('./cart-28310848.js');
|
|
7
|
+
const paypal = require('./paypal-3019ae94.js');
|
|
8
|
+
const localization = require('./localization-00e73920.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
10
10
|
const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
@@ -17,7 +17,9 @@ const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
|
17
17
|
const getBorderRadius = require('./getBorderRadius-2ef1170d.js');
|
|
18
18
|
const isDarkColor = require('./isDarkColor-878e600e.js');
|
|
19
19
|
const styles = require('./styles-d1e64fb9.js');
|
|
20
|
+
const submitGtag = require('./submitGtag-a50ab32e.js');
|
|
20
21
|
const RemoveIcon = require('./RemoveIcon-081ac073.js');
|
|
22
|
+
require('./isContrastColor-09f5924a.js');
|
|
21
23
|
require('./debounce-815d1517.js');
|
|
22
24
|
|
|
23
25
|
/**
|
|
@@ -912,7 +914,12 @@ const ZonosCheckout = class {
|
|
|
912
914
|
}
|
|
913
915
|
// Close the confirm dialog
|
|
914
916
|
this.confirmDialogOpen = false;
|
|
915
|
-
|
|
917
|
+
submitGtag.submitGtag({
|
|
918
|
+
event: 'zonos-checkout-close',
|
|
919
|
+
metadata: {
|
|
920
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
921
|
+
},
|
|
922
|
+
});
|
|
916
923
|
this.open = this.forceDialogOpen || false;
|
|
917
924
|
if (!this.preview && cart.cartStore.step === 'finish') {
|
|
918
925
|
// reset cart store if it's not preview mode and only when checkout is in the finish step.
|
|
@@ -1198,7 +1205,12 @@ const ZonosCheckout = class {
|
|
|
1198
1205
|
isPreview: this.preview,
|
|
1199
1206
|
sessionTimeout: CHECKOUT_SESSION_TIMEOUT,
|
|
1200
1207
|
});
|
|
1201
|
-
|
|
1208
|
+
submitGtag.submitGtag({
|
|
1209
|
+
event: 'zonos-checkout-start',
|
|
1210
|
+
metadata: {
|
|
1211
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
1212
|
+
},
|
|
1213
|
+
});
|
|
1202
1214
|
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
1203
1215
|
void cart.trackConversionEvent({
|
|
1204
1216
|
checkoutSessionId,
|
|
@@ -1519,7 +1531,12 @@ const ZonosCheckout = class {
|
|
|
1519
1531
|
async handleCustomerInfoContinue() {
|
|
1520
1532
|
var _a, _b, _c, _d;
|
|
1521
1533
|
// submit google tag when the form is complete
|
|
1522
|
-
|
|
1534
|
+
submitGtag.submitGtag({
|
|
1535
|
+
event: 'zonos-checkout-customer-info',
|
|
1536
|
+
metadata: {
|
|
1537
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
1538
|
+
},
|
|
1539
|
+
});
|
|
1523
1540
|
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
1524
1541
|
void cart.trackConversionEvent({
|
|
1525
1542
|
checkoutSessionId,
|
|
@@ -1658,7 +1675,12 @@ const ZonosCheckout = class {
|
|
|
1658
1675
|
}
|
|
1659
1676
|
catch (err) {
|
|
1660
1677
|
handleFetch.logError(err);
|
|
1661
|
-
|
|
1678
|
+
submitGtag.submitGtag({
|
|
1679
|
+
event: 'zonos-checkout-payment-fail',
|
|
1680
|
+
metadata: {
|
|
1681
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
1682
|
+
},
|
|
1683
|
+
});
|
|
1662
1684
|
cart.stripeStore.hasPaymentError = true;
|
|
1663
1685
|
// should request inventory refund if there's an error during payment
|
|
1664
1686
|
if (cart.stripeStore.shouldInventoryRefund) {
|
|
@@ -1915,7 +1937,7 @@ const ZonosCheckout = class {
|
|
|
1915
1937
|
'--zonos--primary-color': !this.isMobile
|
|
1916
1938
|
? colorPrimary
|
|
1917
1939
|
: undefined,
|
|
1918
|
-
}) }, !this.isMobile && renderTopHeader(), cart.cartStore.step === 'customer-info' && (index.h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.getDefaultAddress(), isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'shipping' && (index.h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'payment' && (index.h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
|
|
1940
|
+
}) }, !this.isMobile && renderTopHeader(), cart.cartStore.step === 'customer-info' && (index.h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.getDefaultAddress(), isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'shipping' && (index.h("zonos-shipping", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'payment' && (index.h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
|
|
1919
1941
|
await this.handleStripePaymentContinue();
|
|
1920
1942
|
}, submitBtnColor: submitButtonColor }))), index.h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), index.h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (index.h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon.RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), index.h("div", { class: "flex--wrapper" }, index.h("div", { class: "zonos--wrapper" }, index.h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
1921
1943
|
// do nothing if it's not mobile
|
|
@@ -1943,7 +1965,7 @@ const ZonosCheckout = class {
|
|
|
1943
1965
|
this.isMobile && 'mobile',
|
|
1944
1966
|
this.isIframed && 'iframed',
|
|
1945
1967
|
this.hiddenMode && 'hidden-mode',
|
|
1946
|
-
]) }, this.preview ? (renderContent()) : (index.h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), index.h("zonos-dialog", { isLoading: true, loadingText: localization.translate('You will be redirected to international checkout shortly.'), loadingTitle: localization.translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), index.h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: localization.translate("Don't close"), dialogConfirmBtnText: localization.translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: localization.translate('Would you like to close checkout and return to the site?'), dialogTitle: localization.translate('Are you sure?'), onCancelClicked: () => {
|
|
1968
|
+
]) }, this.preview ? (renderContent()) : (index.h("zonos-dialog", { borderStyle: style, class: "zonos--checkout-dialog", "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), index.h("zonos-dialog", { isLoading: true, loadingText: localization.translate('You will be redirected to international checkout shortly.'), loadingTitle: localization.translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), index.h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: localization.translate("Don't close"), dialogConfirmBtnText: localization.translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: localization.translate('Would you like to close checkout and return to the site?'), dialogTitle: localization.translate('Are you sure?'), onCancelClicked: () => {
|
|
1947
1969
|
this.confirmDialogOpen = false;
|
|
1948
1970
|
},
|
|
1949
1971
|
// Mark user selected confirm to close the dialog
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-28310848.js');
|
|
7
7
|
const cleanHtmlMarkdown = require('./cleanHtmlMarkdown-577d0a77.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
9
9
|
const classes = require('./classes-b7918f56.js');
|
|
10
10
|
const styles = require('./styles-d1e64fb9.js');
|
|
11
|
-
require('./localization-
|
|
11
|
+
require('./localization-00e73920.js');
|
|
12
12
|
require('./handleFetch-954f30e1.js');
|
|
13
13
|
require('./VarianceTest-bec00ea8.js');
|
|
14
14
|
require('./isDarkColor-878e600e.js');
|
|
@@ -3,21 +3,23 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
8
|
-
const localization = require('./localization-
|
|
6
|
+
const cart = require('./cart-28310848.js');
|
|
7
|
+
const paypal = require('./paypal-3019ae94.js');
|
|
8
|
+
const localization = require('./localization-00e73920.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
11
11
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
12
12
|
const getBorderRadius = require('./getBorderRadius-2ef1170d.js');
|
|
13
13
|
const VarianceTest = require('./VarianceTest-bec00ea8.js');
|
|
14
|
-
const
|
|
14
|
+
const submitGtag = require('./submitGtag-a50ab32e.js');
|
|
15
|
+
const isCollectMobileTablet = require('./isCollectMobileTablet-bd0f4556.js');
|
|
15
16
|
const classes = require('./classes-b7918f56.js');
|
|
16
17
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
17
|
-
const renderCheckoutCurrency = require('./renderCheckoutCurrency-
|
|
18
|
-
const placeTestOrder = require('./placeTestOrder-
|
|
18
|
+
const renderCheckoutCurrency = require('./renderCheckoutCurrency-9e919b9f.js');
|
|
19
|
+
const placeTestOrder = require('./placeTestOrder-b0369cfd.js');
|
|
19
20
|
const renderFallback = require('./renderFallback-78b54537.js');
|
|
20
21
|
require('./isDarkColor-878e600e.js');
|
|
22
|
+
require('./isContrastColor-09f5924a.js');
|
|
21
23
|
|
|
22
24
|
const RemoveIcon = `<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
23
25
|
|
|
@@ -156,7 +158,7 @@ const ZonosCollectFinish = class {
|
|
|
156
158
|
window.history.replaceState({}, '', url.toString());
|
|
157
159
|
// Payment doesn't go through
|
|
158
160
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
159
|
-
|
|
161
|
+
submitGtag.submitGtag({ event: 'zonos-checkout-payment-fail' });
|
|
160
162
|
void handleFetch.sendErrorLog({
|
|
161
163
|
endpoint: 'Stripe payment failed',
|
|
162
164
|
errors: [
|
|
@@ -169,7 +171,7 @@ const ZonosCollectFinish = class {
|
|
|
169
171
|
});
|
|
170
172
|
}
|
|
171
173
|
else {
|
|
172
|
-
|
|
174
|
+
submitGtag.submitGtag({ event: 'zonos-checkout-success' });
|
|
173
175
|
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
174
176
|
void cart.trackConversionEvent({
|
|
175
177
|
checkoutSessionId,
|
|
@@ -214,7 +216,7 @@ const ZonosCollectFinish = class {
|
|
|
214
216
|
// show success message right away when order id is already created
|
|
215
217
|
this.isLoading = false;
|
|
216
218
|
if (paypal.paypalStore.orderIdCreated) {
|
|
217
|
-
|
|
219
|
+
submitGtag.submitGtag({ event: 'zonos-checkout-success' });
|
|
218
220
|
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
219
221
|
void cart.trackConversionEvent({
|
|
220
222
|
checkoutSessionId,
|
|
@@ -270,11 +272,11 @@ const ZonosCollectFinish = class {
|
|
|
270
272
|
}
|
|
271
273
|
render() {
|
|
272
274
|
const cartId = window.Zonos.cartId;
|
|
273
|
-
return (index.h(index.Host, { key: '
|
|
275
|
+
return (index.h(index.Host, { key: 'c085862ecf1f50752634fb44f99b5cb5d82a9e24', class: "zonos--checkout-finish zonos--elements", style: {
|
|
274
276
|
'--zonos--border-radius': getBorderRadius.getBorderRadius({
|
|
275
277
|
overrideBorderStyle: this.borderRadius,
|
|
276
278
|
}),
|
|
277
|
-
} }, !this.isLoading && (index.h("div", { key: '
|
|
279
|
+
} }, !this.isLoading && (index.h("div", { key: '9b30b12c817c3422b355a2f544bbf2908f736c80', class: "zonos--finish-details" }, index.h("div", { key: '697fff3258a6e74d99500ec25f5d3923f8c7cfc2', 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: '8457c0c9b22c2fb6374b60e492099981026d2690', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), this.confirmationId && (index.h("zonos-badge", { key: '21ab18878abb37a2c37d873c494d71aee3d4ed71', badgeColor: "gray" }, this.confirmationId)), index.h("zonos-text", { key: '389918dd57e6ce5744b7192baa3c06c6db3f70cd', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), this.order && cartId && (index.h("div", { key: 'cca6b625a6bea62b788cf8dd6bb9e03e6505d81c', class: "zonos--button-container" }, index.h("zonos-button", { key: '0f45987515ae99045e5b449b5b1aaae11d70d9fb', onClick: () => {
|
|
278
280
|
window.open(this.getReceiptUrl({ cartId }), '_blank');
|
|
279
281
|
}, size: "lg", variant: "primary" }, localization.translate('View receipt')))))))));
|
|
280
282
|
}
|
|
@@ -496,7 +498,7 @@ const ZonosCollectPayment = class {
|
|
|
496
498
|
}
|
|
497
499
|
cart.stripeStore.checkoutSettlementCurrency = currencyCode;
|
|
498
500
|
// submit google tag when the form is complete
|
|
499
|
-
|
|
501
|
+
submitGtag.submitGtag({ event: 'zonos-checkout-payment-info' });
|
|
500
502
|
this.continueClicked.emit();
|
|
501
503
|
};
|
|
502
504
|
this.copyCardToClipboard = async (cardNumber) => {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const isCollectMobileTablet = require('./isCollectMobileTablet-
|
|
8
|
-
const paypal = require('./paypal-
|
|
9
|
-
const localization = require('./localization-
|
|
6
|
+
const cart = require('./cart-28310848.js');
|
|
7
|
+
const isCollectMobileTablet = require('./isCollectMobileTablet-bd0f4556.js');
|
|
8
|
+
const paypal = require('./paypal-3019ae94.js');
|
|
9
|
+
const localization = require('./localization-00e73920.js');
|
|
10
10
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
11
11
|
const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
|
|
12
12
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
@@ -16,6 +16,8 @@ const renderFallback = require('./renderFallback-78b54537.js');
|
|
|
16
16
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
17
17
|
require('./isDarkColor-878e600e.js');
|
|
18
18
|
require('./getBorderRadius-2ef1170d.js');
|
|
19
|
+
require('./isContrastColor-09f5924a.js');
|
|
20
|
+
require('./submitGtag-a50ab32e.js');
|
|
19
21
|
|
|
20
22
|
const ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
21
23
|
|