@zonos/elements 1.3.247 → 1.3.249
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/{cart-97a2d20a.js → cart-eca56521.js} +6 -4
- package/dist/cjs/{cleanHtmlMarkdown-577d0a77.js → cleanHtmlMarkdown-31da84b7.js} +9 -7
- package/dist/cjs/{debounce-815d1517.js → debounce-0c75ba33.js} +1 -1
- package/dist/cjs/{getBorderRadius-2ef1170d.js → getBorderRadius-27a74844.js} +1 -1
- package/dist/cjs/{getContrastColor-30848800.js → getContrastColor-cc087c53.js} +2 -2
- package/dist/cjs/{hasInclusivePrice-134b0250.js → hasInclusivePrice-e7d67b45.js} +1 -1
- package/dist/cjs/index-b1f95d96.js +4065 -0
- package/dist/cjs/index.cjs.js +14 -7
- package/dist/cjs/{invoice-05a10ee1.js → invoice-918f2c2b.js} +3 -3
- package/dist/cjs/{isCollectMobileTablet-edd4804c.js → isCollectMobileTablet-89911215.js} +3 -3
- package/dist/cjs/{isContrastColor-09f5924a.js → isContrastColor-d1936a5c.js} +1 -1
- package/dist/cjs/{isDarkColor-878e600e.js → isDarkColor-a68abf7a.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-00e73920.js → localization-878ef681.js} +1 -1
- package/dist/cjs/{paypal-0b4b352b.js → paypal-6acca678.js} +71 -37
- package/dist/cjs/{placeTestOrder-07b46688.js → placeTestOrder-f1c1e939.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-dd3b0609.js → renderCheckoutCurrency-d9590e81.js} +2 -2
- package/dist/cjs/{renderFallback-78b54537.js → renderFallback-bc20ee20.js} +1 -1
- package/dist/cjs/submitGtag-cb4fb332.js +116 -0
- package/dist/cjs/{throttle-7dd64984.js → throttle-ff483793.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-3a1db9de.js → updateCheckoutSessionAttributes-8be63b63.js} +1 -1
- package/dist/cjs/zonos-address-display_9.cjs.entry.js +1314 -1608
- package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-card_5.cjs.entry.js +9 -8
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +120 -28
- package/dist/cjs/zonos-checkout.cjs.entry.js +35 -14
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +19 -18
- package/dist/cjs/zonos-collect.cjs.entry.js +11 -10
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +10 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +29 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +9 -9
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +19 -18
- package/dist/cjs/zonos-invoice.cjs.entry.js +10 -9
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +6 -6
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-37a4b4f4.js → zonosStore-f5a61112.js} +110 -25
- 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 +24 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +9 -3
- 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-button/zonos-button.css +3 -1
- package/dist/collection/components/common/zonos-input/zonos-input.css +3 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +3 -1
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.css +3 -1
- 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 +2 -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/esm/{cart-99ec4a3d.js → cart-efb30253.js} +6 -4
- package/dist/esm/{cleanHtmlMarkdown-b5b18743.js → cleanHtmlMarkdown-5f7856f2.js} +9 -7
- package/dist/esm/{debounce-c4785346.js → debounce-efc0e473.js} +1 -1
- package/dist/esm/{getBorderRadius-877f6389.js → getBorderRadius-c21a42e5.js} +1 -1
- package/dist/esm/{getContrastColor-28c18704.js → getContrastColor-98f0d1d5.js} +2 -2
- package/dist/esm/{hasInclusivePrice-6fcc712f.js → hasInclusivePrice-565ddbe5.js} +1 -1
- package/dist/esm/index-cfd394c8.js +4028 -0
- package/dist/esm/index.js +14 -7
- package/dist/esm/{invoice-44e97c22.js → invoice-0e462fcc.js} +3 -3
- package/dist/esm/{isCollectMobileTablet-566ff0aa.js → isCollectMobileTablet-0bcba25a.js} +3 -3
- package/dist/esm/{isContrastColor-69778cea.js → isContrastColor-c17e83c9.js} +1 -1
- package/dist/esm/{isDarkColor-9ddd90cc.js → isDarkColor-3537021b.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{localization-853b48a9.js → localization-c1aff677.js} +1 -1
- package/dist/esm/{paypal-56534e48.js → paypal-06b67be0.js} +72 -37
- package/dist/esm/{placeTestOrder-9e0ab5fd.js → placeTestOrder-6c9a6c8a.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-1bd40006.js → renderCheckoutCurrency-910fea67.js} +2 -2
- package/dist/esm/{renderFallback-3f010b48.js → renderFallback-b250f4e9.js} +1 -1
- package/dist/esm/submitGtag-13de9f1f.js +113 -0
- package/dist/esm/{throttle-ce2432ab.js → throttle-0504ba2c.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-047a6cd4.js → updateCheckoutSessionAttributes-b9f7e982.js} +1 -1
- package/dist/esm/zonos-address-display_9.entry.js +1314 -1608
- package/dist/esm/zonos-address_4.entry.js +8 -8
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +5 -5
- package/dist/esm/zonos-card_5.entry.js +9 -8
- package/dist/esm/zonos-cart-items_12.entry.js +120 -28
- package/dist/esm/zonos-checkout.entry.js +35 -14
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +7 -7
- package/dist/esm/zonos-collect-finish_6.entry.js +19 -18
- package/dist/esm/zonos-collect.entry.js +11 -10
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +10 -7
- package/dist/esm/zonos-country-flag.entry.js +3 -3
- package/dist/esm/zonos-country-select_4.entry.js +4 -4
- package/dist/esm/zonos-elements.js +30 -3
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +4 -4
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +9 -9
- package/dist/esm/zonos-invoice-finish_5.entry.js +19 -18
- package/dist/esm/zonos-invoice.entry.js +10 -9
- package/dist/esm/zonos-language-select_2.entry.js +3 -3
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +6 -6
- package/dist/esm/zonos-stripe-input.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-b434e436.js → zonosStore-5242a58d.js} +110 -25
- package/dist/esm-es5/{cart-99ec4a3d.js → cart-efb30253.js} +1 -1
- package/dist/esm-es5/cleanHtmlMarkdown-5f7856f2.js +1 -0
- package/dist/esm-es5/{debounce-c4785346.js → debounce-efc0e473.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-877f6389.js → getBorderRadius-c21a42e5.js} +1 -1
- package/dist/esm-es5/{getContrastColor-28c18704.js → getContrastColor-98f0d1d5.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-6fcc712f.js → hasInclusivePrice-565ddbe5.js} +1 -1
- package/dist/esm-es5/index-cfd394c8.js +13 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-44e97c22.js → invoice-0e462fcc.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-566ff0aa.js → isCollectMobileTablet-0bcba25a.js} +1 -1
- package/dist/esm-es5/{isContrastColor-69778cea.js → isContrastColor-c17e83c9.js} +1 -1
- package/dist/esm-es5/{isDarkColor-9ddd90cc.js → isDarkColor-3537021b.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-853b48a9.js → localization-c1aff677.js} +1 -1
- package/dist/esm-es5/paypal-06b67be0.js +17 -0
- package/dist/esm-es5/{placeTestOrder-9e0ab5fd.js → placeTestOrder-6c9a6c8a.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-1bd40006.js → renderCheckoutCurrency-910fea67.js} +1 -1
- package/dist/esm-es5/{renderFallback-3f010b48.js → renderFallback-b250f4e9.js} +1 -1
- package/dist/esm-es5/submitGtag-13de9f1f.js +1 -0
- package/dist/esm-es5/{throttle-ce2432ab.js → throttle-0504ba2c.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-047a6cd4.js → updateCheckoutSessionAttributes-b9f7e982.js} +1 -1
- 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-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_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-collapse.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-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-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-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-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-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-5242a58d.js +1 -0
- package/dist/scripts/analyticsRelayOnInit.js +1 -0
- package/dist/scripts/index.d.ts +13 -2
- 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/store/checkout/stripe.d.ts +6 -0
- package/dist/types/components/utils/submitGtag.d.ts +32 -2
- package/dist/types/environment.d.ts +2 -2
- package/dist/types/scripts/_zonosBase.d.ts +11 -0
- package/dist/types/types/analyticsRelay.d.ts +12 -0
- package/dist/types/types/global.d.ts +2 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-058f6124.js +1 -0
- package/dist/zonos-elements/{p-d5b7d3c3.entry.js → p-06e2bc14.entry.js} +1 -1
- package/dist/zonos-elements/p-079bc009.system.entry.js +1 -0
- package/dist/zonos-elements/p-09110bb7.system.entry.js +1 -0
- package/dist/zonos-elements/{p-dca14319.system.js → p-096182f0.system.js} +1 -1
- package/dist/zonos-elements/{p-8205ae87.system.entry.js → p-0a2abbab.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0aeba2c7.system.js +1 -0
- package/dist/zonos-elements/{p-7aa50ef2.entry.js → p-0d18d94b.entry.js} +1 -1
- package/dist/zonos-elements/{p-7b400b5f.system.entry.js → p-101226f3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c01f86b4.entry.js → p-12459b59.entry.js} +1 -1
- package/dist/zonos-elements/p-127e0395.js +17 -0
- package/dist/zonos-elements/p-18d411c3.system.entry.js +1 -0
- package/dist/zonos-elements/p-197d9b23.system.entry.js +1 -0
- package/dist/zonos-elements/{p-678331f0.system.js → p-1b5f89d5.system.js} +1 -1
- package/dist/zonos-elements/p-1b8771bb.js +1 -0
- package/dist/zonos-elements/{p-382601a9.system.entry.js → p-1f1bf95c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5062dcf3.system.entry.js → p-234f0339.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2c2a1339.system.entry.js → p-25dd58f8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-53a9da45.entry.js → p-26718a78.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -0
- package/dist/zonos-elements/{p-1c4d12f0.entry.js → p-2aa44601.entry.js} +1 -1
- package/dist/zonos-elements/{p-3908f78d.system.entry.js → p-302b7105.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-46ece7ae.js → p-321d2963.js} +1 -1
- package/dist/zonos-elements/p-34d10122.js +1 -0
- package/dist/zonos-elements/p-358dfb9e.entry.js +1 -0
- package/dist/zonos-elements/{p-b54a95ea.system.entry.js → p-36bea5d5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-14c920b2.system.entry.js → p-38881641.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3ad2a9a3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-2f55895c.system.entry.js → p-3ece0f96.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c6e3d747.system.js → p-3fbd9cc0.system.js} +1 -1
- package/dist/zonos-elements/p-445072f8.js +1 -0
- package/dist/zonos-elements/{p-1b86711b.js → p-456c0e52.js} +1 -1
- package/dist/zonos-elements/p-45bd8072.system.js +1 -0
- package/dist/zonos-elements/p-4a395eea.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9c49daa4.entry.js → p-4aefd668.entry.js} +1 -1
- package/dist/zonos-elements/p-4c087a8e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-403b9fca.entry.js → p-4d081ce8.entry.js} +1 -1
- package/dist/zonos-elements/p-4d4b7faa.entry.js +1 -0
- package/dist/zonos-elements/{p-a359e0a2.system.entry.js → p-4e4fa1fb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4f7d64f6.js +1 -0
- package/dist/zonos-elements/{p-09aabce0.js → p-507f00d2.js} +1 -1
- package/dist/zonos-elements/p-53db5f85.system.js +1 -0
- package/dist/zonos-elements/p-54c95926.entry.js +1 -0
- package/dist/zonos-elements/p-5dd86dd9.system.js +1 -0
- package/dist/zonos-elements/{p-83377e23.entry.js → p-5eaa0de1.entry.js} +1 -1
- package/dist/zonos-elements/p-5f628e57.entry.js +1 -0
- package/dist/zonos-elements/{p-ae26aec5.system.js → p-5fd0cd66.system.js} +1 -1
- package/dist/zonos-elements/p-661cd4ce.system.entry.js +1 -0
- package/dist/zonos-elements/{p-aa028d91.entry.js → p-66d72216.entry.js} +1 -1
- package/dist/zonos-elements/{p-57fa64d7.js → p-67897a0d.js} +1 -1
- package/dist/zonos-elements/p-6d37f669.entry.js +1 -0
- package/dist/zonos-elements/{p-917f714c.system.entry.js → p-6f19845a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-232b0fb5.system.entry.js → p-70c8a47d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7261e245.system.js +13 -0
- package/dist/zonos-elements/{p-3e67ca05.entry.js → p-7427dd1e.entry.js} +1 -1
- package/dist/zonos-elements/{p-23d497e3.system.js → p-7501c637.system.js} +1 -1
- package/dist/zonos-elements/{p-c1fb3a2d.entry.js → p-777e0a81.entry.js} +1 -1
- package/dist/zonos-elements/p-7d7ffb42.js +1 -0
- package/dist/zonos-elements/p-7e77b055.system.entry.js +1 -0
- package/dist/zonos-elements/p-80524eac.entry.js +1 -0
- package/dist/zonos-elements/{p-cfb9b847.system.entry.js → p-87d89870.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-69b9b711.entry.js → p-8a424412.entry.js} +1 -1
- package/dist/zonos-elements/p-8b206982.system.js +1 -0
- package/dist/zonos-elements/{p-443e1f30.system.js → p-8c6624b6.system.js} +1 -1
- package/dist/zonos-elements/p-8d1efd7b.entry.js +1 -0
- package/dist/zonos-elements/{p-57cee1b5.system.entry.js → p-8d5f928c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5762e217.js → p-908f13ae.js} +1 -1
- package/dist/zonos-elements/{p-8f0f6449.entry.js → p-939ba2a5.entry.js} +1 -1
- package/dist/zonos-elements/p-9581bffb.js +1 -0
- package/dist/zonos-elements/p-959918fe.system.js +1 -0
- package/dist/zonos-elements/{p-f6f1d779.system.entry.js → p-9c64ca98.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8d56ba9.system.js → p-9d44fef6.system.js} +1 -1
- package/dist/zonos-elements/p-9eea270b.entry.js +1 -0
- package/dist/zonos-elements/{p-fb9fb873.system.entry.js → p-a1c476d6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-10355cf6.system.entry.js → p-a75b3efc.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ab25379f.system.js +1 -0
- package/dist/zonos-elements/p-ac30b7a8.system.js +1 -0
- package/dist/zonos-elements/{p-37bb5f2d.entry.js → p-b004146f.entry.js} +1 -1
- package/dist/zonos-elements/{p-2e8f842c.entry.js → p-b360ee5b.entry.js} +1 -1
- package/dist/zonos-elements/p-b589f621.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d0411b2d.entry.js → p-b9a4430c.entry.js} +1 -1
- package/dist/zonos-elements/p-bc6b33fa.entry.js +1 -0
- package/dist/zonos-elements/p-bd004403.system.js +1 -0
- package/dist/zonos-elements/{p-84cf1a90.system.entry.js → p-bdaf94a4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-231baaf8.entry.js → p-c1ab70d2.entry.js} +1 -1
- package/dist/zonos-elements/{p-ce98e472.js → p-c4e358f2.js} +1 -1
- package/dist/zonos-elements/p-c87d3d50.system.js +1 -0
- package/dist/zonos-elements/{p-aedd3911.entry.js → p-c9d4eb42.entry.js} +1 -1
- package/dist/zonos-elements/{p-df6e62f8.system.js → p-c9e3bc98.system.js} +1 -1
- package/dist/zonos-elements/p-cda52300.js +1 -0
- package/dist/zonos-elements/p-ce75b047.js +2 -0
- package/dist/zonos-elements/{p-909e2bc3.system.js → p-d18a2b2c.system.js} +1 -1
- package/dist/zonos-elements/p-d233ef0d.entry.js +1 -0
- package/dist/zonos-elements/{p-14735e9a.system.entry.js → p-dbb3db89.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4592ae49.entry.js → p-ddcbea81.entry.js} +1 -1
- package/dist/zonos-elements/p-def2d465.js +1 -0
- package/dist/zonos-elements/p-e219d011.js +1 -0
- package/dist/zonos-elements/{p-6adfb3af.system.entry.js → p-ed61dedd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ee217693.entry.js +1 -0
- package/dist/zonos-elements/p-f0938b51.system.entry.js +1 -0
- package/dist/zonos-elements/p-f31fbbf0.entry.js +1 -0
- package/dist/zonos-elements/p-f830f800.js +1 -0
- package/dist/zonos-elements/p-f8f7d491.js +1 -0
- package/dist/zonos-elements/p-fc0aa91e.system.js +18 -0
- package/dist/zonos-elements/zonos-elements.css +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +70 -52
- package/dist/cjs/index-69fa8852.js +0 -1961
- package/dist/esm/index-0bbe9693.js +0 -1928
- package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +0 -1
- package/dist/esm-es5/index-0bbe9693.js +0 -2
- package/dist/esm-es5/paypal-56534e48.js +0 -17
- package/dist/esm-es5/zonosStore-b434e436.js +0 -1
- package/dist/zonos-elements/p-01dada4e.js +0 -1
- package/dist/zonos-elements/p-08365fdb.system.js +0 -1
- package/dist/zonos-elements/p-0c201c39.system.entry.js +0 -1
- package/dist/zonos-elements/p-0cb5f151.system.entry.js +0 -1
- package/dist/zonos-elements/p-0ef2a242.js +0 -1
- package/dist/zonos-elements/p-1dbeeab2.entry.js +0 -1
- package/dist/zonos-elements/p-1f894984.js +0 -1
- package/dist/zonos-elements/p-27f6930b.js +0 -1
- package/dist/zonos-elements/p-2c10b067.system.entry.js +0 -1
- package/dist/zonos-elements/p-3bec13dd.system.js +0 -1
- package/dist/zonos-elements/p-3e2f175c.entry.js +0 -1
- package/dist/zonos-elements/p-41299ffb.js +0 -1
- package/dist/zonos-elements/p-43a22d85.entry.js +0 -1
- package/dist/zonos-elements/p-4ffbb0d6.system.js +0 -1
- package/dist/zonos-elements/p-5295d36e.entry.js +0 -1
- package/dist/zonos-elements/p-64870563.entry.js +0 -1
- package/dist/zonos-elements/p-695e0803.system.entry.js +0 -1
- package/dist/zonos-elements/p-6e3cf6eb.entry.js +0 -1
- package/dist/zonos-elements/p-6f430d6f.system.entry.js +0 -1
- package/dist/zonos-elements/p-71185d24.system.js +0 -1
- package/dist/zonos-elements/p-786d1c24.js +0 -1
- package/dist/zonos-elements/p-794d29dc.entry.js +0 -1
- package/dist/zonos-elements/p-8defdf0d.system.js +0 -17
- package/dist/zonos-elements/p-8e98a7c8.js +0 -1
- package/dist/zonos-elements/p-95348ebf.system.entry.js +0 -1
- package/dist/zonos-elements/p-989d3af9.system.js +0 -2
- package/dist/zonos-elements/p-9a066833.system.entry.js +0 -1
- package/dist/zonos-elements/p-9fa90292.system.entry.js +0 -1
- package/dist/zonos-elements/p-aa6c2348.system.entry.js +0 -1
- package/dist/zonos-elements/p-ab41bab5.js +0 -2
- package/dist/zonos-elements/p-ada8841a.js +0 -1
- package/dist/zonos-elements/p-af85846e.system.js +0 -1
- package/dist/zonos-elements/p-b2a0ab4a.js +0 -1
- package/dist/zonos-elements/p-b2ae8eb7.system.js +0 -1
- package/dist/zonos-elements/p-c2442878.system.js +0 -1
- package/dist/zonos-elements/p-c75b7c47.entry.js +0 -1
- package/dist/zonos-elements/p-caff391d.system.entry.js +0 -1
- package/dist/zonos-elements/p-d45285aa.system.js +0 -1
- package/dist/zonos-elements/p-dcf999d8.entry.js +0 -1
- package/dist/zonos-elements/p-dd19d9d8.js +0 -17
- package/dist/zonos-elements/p-df90bccf.entry.js +0 -1
- package/dist/zonos-elements/p-e07aaf09.system.js +0 -1
- package/dist/zonos-elements/p-e458f737.entry.js +0 -1
- package/dist/zonos-elements/p-e9e6bea7.system.entry.js +0 -1
- package/dist/zonos-elements/p-eea7ac64.js +0 -1
- package/dist/zonos-elements/p-f8eb618b.entry.js +0 -1
- package/dist/zonos-elements/p-fc776473.js +0 -1
- package/dist/zonos-elements/p-fe96e239.system.js +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -131,7 +131,7 @@ const getZonosQaUrl = () => {
|
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
133
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
134
|
-
const cdnUrl = "https://v1.3.
|
|
134
|
+
const cdnUrl = "https://v1.3.249.js.zonos.com";
|
|
135
135
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
136
136
|
if (!qaUrl &&
|
|
137
137
|
(cdnUrl.includes('test.') ||
|
|
@@ -379,10 +379,10 @@ const zonosLoadUrl = (() => {
|
|
|
379
379
|
return null;
|
|
380
380
|
})();
|
|
381
381
|
const startLoadTime = Date.now();
|
|
382
|
-
const ZONOS_URL = "https://v1.3.
|
|
383
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
384
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
385
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
382
|
+
const ZONOS_URL = "https://v1.3.249.js.zonos.com";
|
|
383
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.249";
|
|
384
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.249";
|
|
385
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.249";
|
|
386
386
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
387
387
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
388
388
|
class Zonos {
|
|
@@ -400,8 +400,10 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
400
400
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
401
401
|
: null;
|
|
402
402
|
Zonos.isBigCommerce = false;
|
|
403
|
-
Zonos.releaseDate = "
|
|
403
|
+
Zonos.releaseDate = "1773254826070";
|
|
404
404
|
Zonos.isLegacyCheckout = false;
|
|
405
|
+
Zonos.googleAnalyticId = null;
|
|
406
|
+
Zonos.googleAnalyticReady = false;
|
|
405
407
|
Zonos.startLoadTime = startLoadTime;
|
|
406
408
|
Zonos.domain = typeof window !== 'undefined'
|
|
407
409
|
? // domain that embeds the iframe
|
|
@@ -421,7 +423,7 @@ Zonos.isNpm = true;
|
|
|
421
423
|
Zonos.zonosQaUrl = null;
|
|
422
424
|
Zonos.zonosQaUrlApi = null;
|
|
423
425
|
Zonos.trackEventLogs = [];
|
|
424
|
-
Zonos.version = `v${"1.3.
|
|
426
|
+
Zonos.version = `v${"1.3.249"}`;
|
|
425
427
|
Zonos.modeAlerted = false;
|
|
426
428
|
Zonos.cartData = null;
|
|
427
429
|
Zonos.paypal = null;
|
|
@@ -441,6 +443,10 @@ Zonos.init = async (params) => {
|
|
|
441
443
|
log(`====== ZONOS DEBUG MODE: on (${_a.version}) ======`);
|
|
442
444
|
_a.zonosApiKey = zonosApiKey;
|
|
443
445
|
_a.storeId = storeId;
|
|
446
|
+
// When not in iframe, GA is ready (gtag works directly). When in iframe, relay will set this after parent configures.
|
|
447
|
+
if (typeof window !== 'undefined' && window.parent === window) {
|
|
448
|
+
_a.googleAnalyticReady = true;
|
|
449
|
+
}
|
|
444
450
|
if (_a.isNpm) {
|
|
445
451
|
log('====== ZONOS LOADING FROM NPM ======');
|
|
446
452
|
const zonosQaUrl = getZonosQaUrl();
|
|
@@ -545,6 +551,7 @@ Zonos.injectCustomScriptForHostedCheckout = () => {
|
|
|
545
551
|
const metadata = (cartData === null || cartData === void 0 ? void 0 : cartData.metadata) || [];
|
|
546
552
|
const headerScript = metadata.find(meta => meta.key === 'customHeaderScript');
|
|
547
553
|
const footerScript = metadata.find(meta => meta.key === 'customFooterScript');
|
|
554
|
+
// googleAnalyticId is set by customHTML in checkoutSettings (e.g. <script>window.Zonos.googleAnalyticId = "G-XXX";</script>), injected by zonos-controller
|
|
548
555
|
// Only inject the script if checkout is on Zonos hosted checkout and custom script is available
|
|
549
556
|
if (!window.Zonos.isLegacyCheckout || (!headerScript && !footerScript)) {
|
|
550
557
|
log('Skip injecting custom script for hosted checkout', 'info', {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
2
|
-
import { b as stripeStore, C as stripeStoreBuildAddressForPartyCreate, d as cartStore, D as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-5242a58d.js';
|
|
2
|
+
import { b as stripeStore, C as stripeStoreBuildAddressForPartyCreate, d as cartStore, D as cartStoreUpdateSelectedShippingOption } from './cart-efb30253.js';
|
|
3
|
+
import { s as storageStore } from './localization-c1aff677.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
2
|
-
import { b as stripeStore, C as stripeStoreBuildAddressForPartyCreate, d as cartStore, D as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-5242a58d.js';
|
|
2
|
+
import { b as stripeStore, C as stripeStoreBuildAddressForPartyCreate, d as cartStore, D as cartStoreUpdateSelectedShippingOption } from './cart-efb30253.js';
|
|
3
|
+
import { s as storageStore } from './localization-c1aff677.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
6
|
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-cfd394c8.js';
|
|
2
|
+
export { s as setNonce } from './index-cfd394c8.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-5242a58d.js';
|
|
2
2
|
import { j as jsonParse, h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
3
3
|
import { a as availableTestKeys, l as log } from './VarianceTest-572cecf5.js';
|
|
4
4
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as trackConversionEvent, A as validateCheckoutSession, b as stripeStore, d as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-
|
|
3
|
-
import { t as translate, s as storageStore } from './localization-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-5242a58d.js';
|
|
2
|
+
import { t as trackConversionEvent, A as validateCheckoutSession, b as stripeStore, d as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-efb30253.js';
|
|
3
|
+
import { t as translate, s as storageStore } from './localization-c1aff677.js';
|
|
4
4
|
import { h as handleFetch, l as logError, j as jsonParse } from './handleFetch-a844cac1.js';
|
|
5
|
-
import { i as isContrastColor } from './isContrastColor-
|
|
5
|
+
import { i as isContrastColor } from './isContrastColor-c17e83c9.js';
|
|
6
6
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
7
|
+
import { s as submitGtag } from './submitGtag-13de9f1f.js';
|
|
7
8
|
|
|
8
9
|
/*!
|
|
9
|
-
* paypal-js v8.
|
|
10
|
+
* paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
|
|
10
11
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
11
12
|
*
|
|
12
13
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -21,6 +22,40 @@ import { l as log } from './VarianceTest-572cecf5.js';
|
|
|
21
22
|
* See the License for the specific language governing permissions and
|
|
22
23
|
* limitations under the License.
|
|
23
24
|
*/
|
|
25
|
+
/******************************************************************************
|
|
26
|
+
Copyright (c) Microsoft Corporation.
|
|
27
|
+
|
|
28
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
29
|
+
purpose with or without fee is hereby granted.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
32
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
33
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
34
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
35
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
36
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
37
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
38
|
+
***************************************************************************** */
|
|
39
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
function __rest(s, e) {
|
|
43
|
+
var t = {};
|
|
44
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
45
|
+
t[p] = s[p];
|
|
46
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
47
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
48
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
49
|
+
t[p[i]] = s[p[i]];
|
|
50
|
+
}
|
|
51
|
+
return t;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
55
|
+
var e = new Error(message);
|
|
56
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
57
|
+
};
|
|
58
|
+
|
|
24
59
|
function findScript(url, attributes) {
|
|
25
60
|
var currentScript = document.querySelector("script[src=\"".concat(url, "\"]"));
|
|
26
61
|
if (currentScript === null)
|
|
@@ -50,21 +85,11 @@ function insertScriptElement(_a) {
|
|
|
50
85
|
newScript.onload = onSuccess;
|
|
51
86
|
document.head.insertBefore(newScript, document.head.firstElementChild);
|
|
52
87
|
}
|
|
53
|
-
function processOptions(
|
|
54
|
-
var environment =
|
|
55
|
-
|
|
56
|
-
// In the future this logic needs to be changed to use sandbox domain as default instead of production.
|
|
57
|
-
var sdkBaseUrl = environment === "sandbox"
|
|
58
|
-
? "https://www.sandbox.paypal.com/sdk/js"
|
|
59
|
-
: "https://www.paypal.com/sdk/js";
|
|
60
|
-
// env is not an allowed key for sdk/js url.
|
|
61
|
-
delete options.environment;
|
|
62
|
-
if (options.sdkBaseUrl) {
|
|
63
|
-
sdkBaseUrl = options.sdkBaseUrl;
|
|
64
|
-
delete options.sdkBaseUrl;
|
|
65
|
-
}
|
|
88
|
+
function processOptions(_a) {
|
|
89
|
+
var customSdkBaseUrl = _a.sdkBaseUrl, environment = _a.environment, options = __rest(_a, ["sdkBaseUrl", "environment"]);
|
|
90
|
+
var sdkBaseUrl = customSdkBaseUrl || processSdkBaseUrl(environment);
|
|
66
91
|
var optionsWithStringIndex = options;
|
|
67
|
-
var
|
|
92
|
+
var _b = Object.keys(optionsWithStringIndex)
|
|
68
93
|
.filter(function (key) {
|
|
69
94
|
return (typeof optionsWithStringIndex[key] !== "undefined" &&
|
|
70
95
|
optionsWithStringIndex[key] !== null &&
|
|
@@ -83,7 +108,7 @@ function processOptions(options) {
|
|
|
83
108
|
}, {
|
|
84
109
|
queryParams: {},
|
|
85
110
|
attributes: {},
|
|
86
|
-
}), queryParams =
|
|
111
|
+
}), queryParams = _b.queryParams, attributes = _b.attributes;
|
|
87
112
|
if (queryParams["merchant-id"] &&
|
|
88
113
|
queryParams["merchant-id"].indexOf(",") !== -1) {
|
|
89
114
|
attributes["data-merchant-id"] = queryParams["merchant-id"];
|
|
@@ -109,6 +134,13 @@ function objectToQueryString(params) {
|
|
|
109
134
|
});
|
|
110
135
|
return queryString;
|
|
111
136
|
}
|
|
137
|
+
function processSdkBaseUrl(environment) {
|
|
138
|
+
// Keeping production as default to maintain backward compatibility.
|
|
139
|
+
// In the future this logic needs to be changed to use sandbox domain as default instead of production.
|
|
140
|
+
return environment === "sandbox"
|
|
141
|
+
? "https://www.sandbox.paypal.com/sdk/js"
|
|
142
|
+
: "https://www.paypal.com/sdk/js";
|
|
143
|
+
}
|
|
112
144
|
function createScriptElement(url, attributes) {
|
|
113
145
|
if (attributes === void 0) { attributes = {}; }
|
|
114
146
|
var newScript = document.createElement("script");
|
|
@@ -224,21 +256,6 @@ const paypalCreateOrder = async ({ checkoutSessionId, intent, }) => {
|
|
|
224
256
|
return { errors, json };
|
|
225
257
|
};
|
|
226
258
|
|
|
227
|
-
/**
|
|
228
|
-
* Submit a gtag event if the gtag function is available.
|
|
229
|
-
*/
|
|
230
|
-
const submitGtag = (event) => {
|
|
231
|
-
const googleAnalyticSetting = zonosStore.checkoutSettings.analyticsProviders.find(item => item.type === 'GOOGLE_ANALYTICS');
|
|
232
|
-
// only submit if googleAnalytic in checkout setting is on.
|
|
233
|
-
if (!googleAnalyticSetting || (googleAnalyticSetting === null || googleAnalyticSetting === void 0 ? void 0 : googleAnalyticSetting.status) === 'DISABLED') {
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
if (typeof window.gtag === 'function') {
|
|
237
|
-
log('Zonos submits gtag event', 'log', event);
|
|
238
|
-
window.gtag('event', event, {});
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
259
|
const { onChange: paypalStoreOnChange, reset: paypalStoreReset, state: paypalStore, } = createStore(() => ({
|
|
243
260
|
intent: 'capture',
|
|
244
261
|
orderIdCreated: null,
|
|
@@ -319,6 +336,12 @@ const paypalButtonOptions = ({ checkoutSessionId, onPaypalFail, onPaypalSessionD
|
|
|
319
336
|
// reset stripe error message
|
|
320
337
|
stripeStore.hasPaymentError = false;
|
|
321
338
|
stripeStore.customErrorMessage = null;
|
|
339
|
+
submitGtag({
|
|
340
|
+
event: 'zonos-checkout-payment-fail',
|
|
341
|
+
metadata: {
|
|
342
|
+
checkoutSessionId,
|
|
343
|
+
},
|
|
344
|
+
});
|
|
322
345
|
onPaypalFail === null || onPaypalFail === void 0 ? void 0 : onPaypalFail();
|
|
323
346
|
return '';
|
|
324
347
|
}
|
|
@@ -351,6 +374,12 @@ const paypalButtonOptions = ({ checkoutSessionId, onPaypalFail, onPaypalSessionD
|
|
|
351
374
|
// reset stripe error message
|
|
352
375
|
stripeStore.hasPaymentError = false;
|
|
353
376
|
stripeStore.customErrorMessage = null;
|
|
377
|
+
submitGtag({
|
|
378
|
+
event: 'zonos-checkout-payment-fail',
|
|
379
|
+
metadata: {
|
|
380
|
+
checkoutSessionId,
|
|
381
|
+
},
|
|
382
|
+
});
|
|
354
383
|
// trigger fail event
|
|
355
384
|
onPaypalFail === null || onPaypalFail === void 0 ? void 0 : onPaypalFail();
|
|
356
385
|
return '';
|
|
@@ -361,7 +390,13 @@ const paypalButtonOptions = ({ checkoutSessionId, onPaypalFail, onPaypalSessionD
|
|
|
361
390
|
// reset paypal error banner
|
|
362
391
|
paypalStore.paypalErrorMessage = null;
|
|
363
392
|
// submit google tag when the form is complete
|
|
364
|
-
submitGtag(
|
|
393
|
+
submitGtag({
|
|
394
|
+
event: 'zonos-checkout-payment-info',
|
|
395
|
+
metadata: {
|
|
396
|
+
checkoutSessionId,
|
|
397
|
+
paymentMethod: 'paypal',
|
|
398
|
+
},
|
|
399
|
+
});
|
|
365
400
|
const orderId = await paypalStoreCaptureOrder({
|
|
366
401
|
checkoutSessionId,
|
|
367
402
|
paypalMockResponse: window.Zonos._paypalMockResponse,
|
|
@@ -476,4 +511,4 @@ const paypalStoreHasPaypalEnabled = () => {
|
|
|
476
511
|
return paypalEnabledInSetting || !!paypalStore.paypalButtons.length;
|
|
477
512
|
};
|
|
478
513
|
|
|
479
|
-
export { paypalStore as a, paypalInitScript as b, paypalStoreReset as c, paypalStoreInitButtons as d, paypalStoreOnChange as e, paypalStoreHasPaypalEnabled as p
|
|
514
|
+
export { paypalStore as a, paypalInitScript as b, paypalStoreReset as c, paypalStoreInitButtons as d, paypalStoreOnChange as e, paypalStoreHasPaypalEnabled as p };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-efb30253.js';
|
|
2
|
+
import { s as storageStore } from './localization-c1aff677.js';
|
|
3
3
|
import { l as logError, h as handleFetch } from './handleFetch-a844cac1.js';
|
|
4
4
|
|
|
5
5
|
const placeTestOrder = async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { o as applyInclusiveEffectiveRate, d as currencyFormat } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-efb30253.js';
|
|
2
|
+
import { o as applyInclusiveEffectiveRate, d as currencyFormat } from './localization-c1aff677.js';
|
|
3
3
|
|
|
4
4
|
const getDisplayCurrency = () => {
|
|
5
5
|
var _a, _b;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { z as zonosStore } from './zonosStore-5242a58d.js';
|
|
2
|
+
import { g as getIsTestMode } from './handleFetch-a844cac1.js';
|
|
3
|
+
import { l as log } from './VarianceTest-572cecf5.js';
|
|
4
|
+
|
|
5
|
+
/** Message type for zonos-analytic events sent from iframe to parent. */
|
|
6
|
+
const ZONOS_ANALYTIC_TYPE = 'zonos-analytic';
|
|
7
|
+
/** Ping sent by iframe to configure parent's analytics relay (e.g. GA) and get ready signal. */
|
|
8
|
+
const RELAY_PING_TYPE = 'zonos-analytics-relay-ping';
|
|
9
|
+
/** Response from parent when analytics relay (e.g. gtag) is ready. */
|
|
10
|
+
const RELAY_READY_TYPE = 'zonos-analytics-relay-ready';
|
|
11
|
+
|
|
12
|
+
let parentGtagReady = false;
|
|
13
|
+
let relayListenerAdded = false;
|
|
14
|
+
const queuedEvents = [];
|
|
15
|
+
function flushQueuedEvents() {
|
|
16
|
+
while (queuedEvents.length > 0) {
|
|
17
|
+
const { event, payload } = queuedEvents.shift();
|
|
18
|
+
try {
|
|
19
|
+
window.parent.postMessage({
|
|
20
|
+
event,
|
|
21
|
+
metadata: payload,
|
|
22
|
+
type: ZONOS_ANALYTIC_TYPE,
|
|
23
|
+
}, '*');
|
|
24
|
+
}
|
|
25
|
+
catch (_a) {
|
|
26
|
+
// Ignore postMessage failures
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function ensureRelayListener() {
|
|
31
|
+
if (relayListenerAdded)
|
|
32
|
+
return;
|
|
33
|
+
relayListenerAdded = true;
|
|
34
|
+
window.addEventListener('message', (e) => {
|
|
35
|
+
var _a;
|
|
36
|
+
if (((_a = e.data) === null || _a === void 0 ? void 0 : _a.type) === RELAY_READY_TYPE) {
|
|
37
|
+
parentGtagReady = true;
|
|
38
|
+
if (typeof window.Zonos !== 'undefined') {
|
|
39
|
+
window.Zonos.googleAnalyticReady = true;
|
|
40
|
+
}
|
|
41
|
+
flushQueuedEvents();
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function sendPingToParent() {
|
|
46
|
+
try {
|
|
47
|
+
const googleAnalyticId = typeof window.Zonos !== 'undefined'
|
|
48
|
+
? window.Zonos.googleAnalyticId
|
|
49
|
+
: undefined;
|
|
50
|
+
window.parent.postMessage({ googleAnalyticId, type: RELAY_PING_TYPE }, '*');
|
|
51
|
+
}
|
|
52
|
+
catch (_a) {
|
|
53
|
+
// Ignore postMessage failures
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Sends ping to parent with googleAnalyticId so parent can inject/configure GA and respond with ready.
|
|
58
|
+
* Call after customHTML or custom script sets window.Zonos.googleAnalyticId.
|
|
59
|
+
*/
|
|
60
|
+
function ensureAnalyticsRelayPing() {
|
|
61
|
+
if (typeof window === 'undefined' ||
|
|
62
|
+
window.parent === window ||
|
|
63
|
+
parentGtagReady) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
ensureRelayListener();
|
|
67
|
+
sendPingToParent();
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Submit a gtag event if the gtag function is available.
|
|
71
|
+
* When running inside an iframe, only posts to parent after the parent has
|
|
72
|
+
* confirmed (via analyticsRelayOnInit) that gtag is available.
|
|
73
|
+
*/
|
|
74
|
+
const submitGtag = ({ event, metadata }) => {
|
|
75
|
+
const googleAnalyticSetting = zonosStore.checkoutSettings.analyticsProviders.find(item => item.type === 'GOOGLE_ANALYTICS');
|
|
76
|
+
// only submit if googleAnalytic in checkout setting is on.
|
|
77
|
+
if (!googleAnalyticSetting || (googleAnalyticSetting === null || googleAnalyticSetting === void 0 ? void 0 : googleAnalyticSetting.status) === 'DISABLED') {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const isTestMode = getIsTestMode();
|
|
81
|
+
const payload = Object.assign(Object.assign({}, metadata), (isTestMode && { isTestMode: true }));
|
|
82
|
+
// filter null key
|
|
83
|
+
const filteredPayload = Object.fromEntries(Object.entries(payload).filter(([_, value]) => value !== null));
|
|
84
|
+
const isInIframe = typeof window !== 'undefined' && window.parent !== window;
|
|
85
|
+
if (isInIframe) {
|
|
86
|
+
// gtag does not work in iframe; must relay to parent via postMessage
|
|
87
|
+
ensureRelayListener();
|
|
88
|
+
if (parentGtagReady) {
|
|
89
|
+
try {
|
|
90
|
+
window.parent.postMessage({
|
|
91
|
+
event,
|
|
92
|
+
metadata: filteredPayload,
|
|
93
|
+
type: ZONOS_ANALYTIC_TYPE,
|
|
94
|
+
}, '*');
|
|
95
|
+
}
|
|
96
|
+
catch (_a) {
|
|
97
|
+
// Ignore postMessage failures
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
queuedEvents.push({ event, payload: filteredPayload });
|
|
102
|
+
sendPingToParent();
|
|
103
|
+
}
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
// Not in iframe: call gtag directly
|
|
107
|
+
if (typeof window.gtag === 'function') {
|
|
108
|
+
log('Zonos submits gtag event', 'log', event);
|
|
109
|
+
window.gtag('event', event, filteredPayload);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export { ensureAnalyticsRelayPing as e, submitGtag as s };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as debounce_1 } from './debounce-
|
|
2
|
-
import { d as isObject_1 } from './zonosStore-
|
|
1
|
+
import { d as debounce_1 } from './debounce-efc0e473.js';
|
|
2
|
+
import { d as isObject_1 } from './zonosStore-5242a58d.js';
|
|
3
3
|
|
|
4
4
|
var debounce = debounce_1,
|
|
5
5
|
isObject = isObject_1;
|