@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
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-b1f95d96.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-f5a61112.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
require('./VarianceTest-bec00ea8.js');
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-b1f95d96.js');
|
|
6
6
|
const classes = require('./classes-b7918f56.js');
|
|
7
7
|
|
|
8
8
|
const zonosTooltipCss = ":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--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:12px;background-color:var(--zonos-elements-gray-1000);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--zonos-elements-radius-4);z-index:100;-webkit-box-shadow:var(--zonos-elements-v3-shadow-large);box-shadow:var(--zonos-elements-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-b1f95d96.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-f5a61112.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
require('./VarianceTest-bec00ea8.js');
|
|
9
9
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-b1f95d96.js');
|
|
4
4
|
const VarianceTest = require('./VarianceTest-bec00ea8.js');
|
|
5
5
|
|
|
6
6
|
const appendToMap = (map, propName, value) => {
|
|
7
|
-
|
|
8
|
-
if (!
|
|
9
|
-
|
|
7
|
+
let refs = map.get(propName);
|
|
8
|
+
if (!refs) {
|
|
9
|
+
refs = [];
|
|
10
|
+
map.set(propName, refs);
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
if (!refs.some((ref) => ref.deref() === value)) {
|
|
13
|
+
refs.push(new WeakRef(value));
|
|
13
14
|
}
|
|
14
15
|
};
|
|
15
16
|
const debounce = (fn, ms) => {
|
|
@@ -37,33 +38,54 @@ const debounce = (fn, ms) => {
|
|
|
37
38
|
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
38
39
|
const cleanupElements = debounce((map) => {
|
|
39
40
|
for (let key of map.keys()) {
|
|
40
|
-
|
|
41
|
+
const refs = map.get(key).filter((ref) => {
|
|
42
|
+
const elm = ref.deref();
|
|
43
|
+
return elm && isConnected(elm);
|
|
44
|
+
});
|
|
45
|
+
map.set(key, refs);
|
|
41
46
|
}
|
|
42
47
|
}, 2_000);
|
|
48
|
+
const core = index.StencilCore;
|
|
49
|
+
const forceUpdate = core.forceUpdate;
|
|
50
|
+
const getRenderingRef = core.getRenderingRef;
|
|
43
51
|
const stencilSubscription = () => {
|
|
44
|
-
if (typeof
|
|
52
|
+
if (typeof getRenderingRef !== 'function' || typeof forceUpdate !== 'function') {
|
|
45
53
|
// If we are not in a stencil project, we do nothing.
|
|
46
54
|
// This function is not really exported by @stencil/core.
|
|
47
55
|
return {};
|
|
48
56
|
}
|
|
57
|
+
const ensureForceUpdate = forceUpdate;
|
|
58
|
+
const ensureGetRenderingRef = getRenderingRef;
|
|
49
59
|
const elmsToUpdate = new Map();
|
|
50
60
|
return {
|
|
51
61
|
dispose: () => elmsToUpdate.clear(),
|
|
52
62
|
get: (propName) => {
|
|
53
|
-
const elm =
|
|
63
|
+
const elm = ensureGetRenderingRef();
|
|
54
64
|
if (elm) {
|
|
55
65
|
appendToMap(elmsToUpdate, propName, elm);
|
|
56
66
|
}
|
|
57
67
|
},
|
|
58
68
|
set: (propName) => {
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
|
|
69
|
+
const refs = elmsToUpdate.get(propName);
|
|
70
|
+
if (refs) {
|
|
71
|
+
const nextRefs = refs.filter((ref) => {
|
|
72
|
+
const elm = ref.deref();
|
|
73
|
+
if (!elm)
|
|
74
|
+
return false;
|
|
75
|
+
return ensureForceUpdate(elm);
|
|
76
|
+
});
|
|
77
|
+
elmsToUpdate.set(propName, nextRefs);
|
|
62
78
|
}
|
|
63
79
|
cleanupElements(elmsToUpdate);
|
|
64
80
|
},
|
|
65
81
|
reset: () => {
|
|
66
|
-
elmsToUpdate.forEach((
|
|
82
|
+
elmsToUpdate.forEach((refs) => {
|
|
83
|
+
refs.forEach((ref) => {
|
|
84
|
+
const elm = ref.deref();
|
|
85
|
+
if (elm)
|
|
86
|
+
ensureForceUpdate(elm);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
67
89
|
cleanupElements(elmsToUpdate);
|
|
68
90
|
},
|
|
69
91
|
};
|
|
@@ -71,18 +93,26 @@ const stencilSubscription = () => {
|
|
|
71
93
|
|
|
72
94
|
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
73
95
|
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
74
|
-
const
|
|
75
|
-
|
|
96
|
+
const resolveDefaultState = () => (unwrap(defaultState) ?? {});
|
|
97
|
+
const initialState = resolveDefaultState();
|
|
98
|
+
let states = new Map(Object.entries(initialState));
|
|
99
|
+
const proxyAvailable = typeof Proxy !== 'undefined';
|
|
100
|
+
const plainState = proxyAvailable ? null : {};
|
|
76
101
|
const handlers = {
|
|
77
102
|
dispose: [],
|
|
78
103
|
get: [],
|
|
79
104
|
set: [],
|
|
80
105
|
reset: [],
|
|
81
106
|
};
|
|
107
|
+
// Track onChange listeners to enable removeListener functionality
|
|
108
|
+
const changeListeners = new Map();
|
|
82
109
|
const reset = () => {
|
|
83
110
|
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
84
111
|
// otherwise, the state won't be properly reset
|
|
85
|
-
states = new Map(Object.entries(
|
|
112
|
+
states = new Map(Object.entries(resolveDefaultState()));
|
|
113
|
+
if (!proxyAvailable) {
|
|
114
|
+
syncPlainStateKeys();
|
|
115
|
+
}
|
|
86
116
|
handlers.reset.forEach((cb) => cb());
|
|
87
117
|
};
|
|
88
118
|
const dispose = () => {
|
|
@@ -99,12 +129,14 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
|
99
129
|
const oldValue = states.get(propName);
|
|
100
130
|
if (shouldUpdate(value, oldValue, propName)) {
|
|
101
131
|
states.set(propName, value);
|
|
132
|
+
if (!proxyAvailable) {
|
|
133
|
+
ensurePlainProperty(propName);
|
|
134
|
+
}
|
|
102
135
|
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
103
136
|
}
|
|
104
137
|
};
|
|
105
|
-
const state = (
|
|
106
|
-
? {
|
|
107
|
-
: new Proxy(unwrappedState, {
|
|
138
|
+
const state = (proxyAvailable
|
|
139
|
+
? new Proxy(initialState, {
|
|
108
140
|
get(_, propName) {
|
|
109
141
|
return get(propName);
|
|
110
142
|
},
|
|
@@ -124,7 +156,11 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
|
124
156
|
set(propName, value);
|
|
125
157
|
return true;
|
|
126
158
|
},
|
|
127
|
-
})
|
|
159
|
+
})
|
|
160
|
+
: (() => {
|
|
161
|
+
syncPlainStateKeys();
|
|
162
|
+
return plainState;
|
|
163
|
+
})());
|
|
128
164
|
const on = (eventName, callback) => {
|
|
129
165
|
handlers[eventName].push(callback);
|
|
130
166
|
return () => {
|
|
@@ -132,17 +168,24 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
|
132
168
|
};
|
|
133
169
|
};
|
|
134
170
|
const onChange = (propName, cb) => {
|
|
135
|
-
const
|
|
171
|
+
const setHandler = (key, newValue) => {
|
|
136
172
|
if (key === propName) {
|
|
137
173
|
cb(newValue);
|
|
138
174
|
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
175
|
+
};
|
|
176
|
+
const resetHandler = () => {
|
|
177
|
+
const snapshot = resolveDefaultState();
|
|
178
|
+
cb(snapshot[propName]);
|
|
179
|
+
};
|
|
180
|
+
// Register the handlers
|
|
181
|
+
const unSet = on('set', setHandler);
|
|
182
|
+
const unReset = on('reset', resetHandler);
|
|
183
|
+
// Track the relationship between the user callback and internal handlers
|
|
184
|
+
changeListeners.set(cb, { setHandler, resetHandler, propName });
|
|
143
185
|
return () => {
|
|
144
186
|
unSet();
|
|
145
187
|
unReset();
|
|
188
|
+
changeListeners.delete(cb);
|
|
146
189
|
};
|
|
147
190
|
};
|
|
148
191
|
const use = (...subscriptions) => {
|
|
@@ -167,6 +210,47 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
|
167
210
|
const oldValue = states.get(key);
|
|
168
211
|
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
169
212
|
};
|
|
213
|
+
const removeListener = (propName, listener) => {
|
|
214
|
+
const listenerInfo = changeListeners.get(listener);
|
|
215
|
+
if (listenerInfo && listenerInfo.propName === propName) {
|
|
216
|
+
// Remove the specific handlers that were created for this listener
|
|
217
|
+
removeFromArray(handlers.set, listenerInfo.setHandler);
|
|
218
|
+
removeFromArray(handlers.reset, listenerInfo.resetHandler);
|
|
219
|
+
changeListeners.delete(listener);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
function ensurePlainProperty(key) {
|
|
223
|
+
if (proxyAvailable || !plainState) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (Object.prototype.hasOwnProperty.call(plainState, key)) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
Object.defineProperty(plainState, key, {
|
|
230
|
+
configurable: true,
|
|
231
|
+
enumerable: true,
|
|
232
|
+
get() {
|
|
233
|
+
return get(key);
|
|
234
|
+
},
|
|
235
|
+
set(value) {
|
|
236
|
+
set(key, value);
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function syncPlainStateKeys() {
|
|
241
|
+
if (proxyAvailable || !plainState) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const knownKeys = new Set(states.keys());
|
|
245
|
+
for (const key of Object.keys(plainState)) {
|
|
246
|
+
if (!knownKeys.has(key)) {
|
|
247
|
+
delete plainState[key];
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
for (const key of knownKeys) {
|
|
251
|
+
ensurePlainProperty(key);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
170
254
|
return {
|
|
171
255
|
state,
|
|
172
256
|
get,
|
|
@@ -177,6 +261,7 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
|
177
261
|
dispose,
|
|
178
262
|
reset,
|
|
179
263
|
forceUpdate,
|
|
264
|
+
removeListener,
|
|
180
265
|
};
|
|
181
266
|
};
|
|
182
267
|
const removeFromArray = (array, item) => {
|
|
@@ -13,7 +13,7 @@ import { handleFetch } from "../../../utils/handleFetch";
|
|
|
13
13
|
import { jsonParse } from "../../../utils/jsonParse";
|
|
14
14
|
import { allLogs, log } from "../../../utils/logging/log";
|
|
15
15
|
import { sendErrorLog } from "../../../utils/logging/sendErrorLog";
|
|
16
|
-
import { submitGtag } from "../../../utils/submitGtag";
|
|
16
|
+
import { submitGtag, } from "../../../utils/submitGtag";
|
|
17
17
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
18
18
|
import RemoveIcon from "./assets/RemoveIcon.svg";
|
|
19
19
|
/* Need to use relative import because inline-svg-stencil couldn't resolve absolute path */
|
|
@@ -61,6 +61,56 @@ export class ZonosCheckoutFinish {
|
|
|
61
61
|
order: json,
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Metadata for purchase event in GA4
|
|
66
|
+
*/
|
|
67
|
+
this.buildPurchaseMetadata = ({ checkoutSessionId, currency, }) => {
|
|
68
|
+
var _a, _b, _c, _d, _e, _f;
|
|
69
|
+
const items = cartStore.items
|
|
70
|
+
.filter(item => item.amount >= 0)
|
|
71
|
+
.map(item => ({
|
|
72
|
+
item_id: item.sku || item.productId || item.name,
|
|
73
|
+
item_name: item.name,
|
|
74
|
+
price: item.amount,
|
|
75
|
+
quantity: item.quantity,
|
|
76
|
+
}));
|
|
77
|
+
/**
|
|
78
|
+
* The value of this parameter should be the sum of all item amounts in the transaction (without shipping and tax).
|
|
79
|
+
* @ref https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag#parameters_22
|
|
80
|
+
*/
|
|
81
|
+
const subtotal = ((_a = cartStore.checkoutSession) === null || _a === void 0 ? void 0 : _a.subtotals.items) ||
|
|
82
|
+
((_b = this.order) === null || _b === void 0 ? void 0 : _b.amountSubtotals.items);
|
|
83
|
+
const currencyCode = ((_c = cartStore.checkoutSession) === null || _c === void 0 ? void 0 : _c.subtotals.presentmentCurrencyCode) ||
|
|
84
|
+
((_d = this.order) === null || _d === void 0 ? void 0 : _d.currencyCode) ||
|
|
85
|
+
(currency === null || currency === void 0 ? void 0 : currency.toUpperCase());
|
|
86
|
+
// 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.
|
|
87
|
+
const cartSubtotal = items.reduce((acc, item) => acc + item.price * item.quantity, 0);
|
|
88
|
+
const cartCurrency = (_e = cartStore.items.find(Boolean)) === null || _e === void 0 ? void 0 : _e.currencyCode;
|
|
89
|
+
const transactionId = ((_f = this.order) === null || _f === void 0 ? void 0 : _f.id) || checkoutSessionId || new Date().getTime().toString();
|
|
90
|
+
if (currencyCode && subtotal) {
|
|
91
|
+
return {
|
|
92
|
+
currency: currencyCode,
|
|
93
|
+
items,
|
|
94
|
+
transaction_id: transactionId,
|
|
95
|
+
value: subtotal,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
// Use cart currency and subtotal if the order/checkout session can not be found
|
|
99
|
+
if (cartCurrency && cartSubtotal) {
|
|
100
|
+
return {
|
|
101
|
+
currency: cartCurrency,
|
|
102
|
+
items,
|
|
103
|
+
transaction_id: transactionId,
|
|
104
|
+
value: cartSubtotal,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
currency: undefined,
|
|
109
|
+
items,
|
|
110
|
+
transaction_id: transactionId,
|
|
111
|
+
value: undefined,
|
|
112
|
+
};
|
|
113
|
+
};
|
|
64
114
|
this.redirectToUrl = (url) => {
|
|
65
115
|
// reset store and checkout session id before redirecting
|
|
66
116
|
stripeStoreReset();
|
|
@@ -243,7 +293,7 @@ export class ZonosCheckoutFinish {
|
|
|
243
293
|
this.checkStripePaymentStatus = async () => {
|
|
244
294
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || stripeStore.clientSecret;
|
|
245
295
|
if (clientSecret || this.storybookForceStatus) {
|
|
246
|
-
const { error, messages, status } = await stripeStoreRetrievePayment({
|
|
296
|
+
const { currency, error, messages, status } = await stripeStoreRetrievePayment({
|
|
247
297
|
clientSecret,
|
|
248
298
|
storybookForceStatus: this.storybookForceStatus,
|
|
249
299
|
});
|
|
@@ -269,7 +319,12 @@ export class ZonosCheckoutFinish {
|
|
|
269
319
|
window.history.replaceState({}, '', url.toString());
|
|
270
320
|
// Payment doesn't go through
|
|
271
321
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
272
|
-
submitGtag(
|
|
322
|
+
submitGtag({
|
|
323
|
+
event: 'zonos-checkout-payment-fail',
|
|
324
|
+
metadata: {
|
|
325
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
326
|
+
},
|
|
327
|
+
});
|
|
273
328
|
void sendErrorLog({
|
|
274
329
|
endpoint: 'Stripe payment failed',
|
|
275
330
|
errors: [
|
|
@@ -284,8 +339,21 @@ export class ZonosCheckoutFinish {
|
|
|
284
339
|
else {
|
|
285
340
|
// Save new order info in case the user reloads before we get order info
|
|
286
341
|
this.saveOrderIdForDuplicationIssue();
|
|
287
|
-
submitGtag('zonos-checkout-success');
|
|
288
342
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
343
|
+
submitGtag({
|
|
344
|
+
event: 'zonos-checkout-success',
|
|
345
|
+
metadata: this.buildPurchaseMetadata({
|
|
346
|
+
checkoutSessionId: checkoutSessionId || '',
|
|
347
|
+
currency: currency === null || currency === void 0 ? void 0 : currency.toUpperCase(),
|
|
348
|
+
}),
|
|
349
|
+
});
|
|
350
|
+
submitGtag({
|
|
351
|
+
event: 'purchase',
|
|
352
|
+
metadata: this.buildPurchaseMetadata({
|
|
353
|
+
checkoutSessionId: checkoutSessionId || '',
|
|
354
|
+
currency: currency === null || currency === void 0 ? void 0 : currency.toUpperCase(),
|
|
355
|
+
}),
|
|
356
|
+
});
|
|
289
357
|
void trackConversionEvent({
|
|
290
358
|
checkoutSessionId,
|
|
291
359
|
eventName: 'checkout_orderCompleted',
|
|
@@ -331,7 +399,18 @@ export class ZonosCheckoutFinish {
|
|
|
331
399
|
// show success message right away when order id is already created
|
|
332
400
|
this.isLoading = false;
|
|
333
401
|
if (paypalStore.orderIdCreated) {
|
|
334
|
-
submitGtag(
|
|
402
|
+
submitGtag({
|
|
403
|
+
event: 'zonos-checkout-success',
|
|
404
|
+
metadata: this.buildPurchaseMetadata({
|
|
405
|
+
checkoutSessionId: storageStore.checkoutSessionId || '',
|
|
406
|
+
}),
|
|
407
|
+
});
|
|
408
|
+
submitGtag({
|
|
409
|
+
event: 'purchase',
|
|
410
|
+
metadata: this.buildPurchaseMetadata({
|
|
411
|
+
checkoutSessionId: storageStore.checkoutSessionId || '',
|
|
412
|
+
}),
|
|
413
|
+
});
|
|
335
414
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
336
415
|
void trackConversionEvent({
|
|
337
416
|
checkoutSessionId,
|
|
@@ -393,11 +472,11 @@ export class ZonosCheckoutFinish {
|
|
|
393
472
|
}
|
|
394
473
|
render() {
|
|
395
474
|
const isTestMode = getIsTestMode();
|
|
396
|
-
return (h(Host, { key: '
|
|
475
|
+
return (h(Host, { key: '80a543fca5dbc63dde41806702b2f6dd4fa849ab', class: "zonos--checkout-finish zonos--elements", style: {
|
|
397
476
|
'--zonos--border-radius': getBorderRadius({
|
|
398
477
|
overrideBorderStyle: this.borderRadius,
|
|
399
478
|
}),
|
|
400
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
479
|
+
} }, !this.isLoading && (h("div", { key: '6cab293041902e156563f37db6f0e77caaeeaaf9', class: "zonos--finish-details" }, h("div", { key: '6bf32844fa9d38eae6e9f337e56b7918e49bf793', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'bf13e59b7bc2380609ffba879fa2b1d8c5d9a9e0', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: 'c246affb94a9799e0c556affb73b2ebfb69a9c7f', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: '61fa4fa0e09c0ce2905281b2696f42172c7a2bcd',
|
|
401
480
|
// Only show loading spinner if it's not an error notification
|
|
402
481
|
loading: this.isWaitingToRedirect &&
|
|
403
482
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -409,9 +488,9 @@ export class ZonosCheckoutFinish {
|
|
|
409
488
|
}
|
|
410
489
|
this.closeClickHandler();
|
|
411
490
|
}, size: "md", variant: "primary" }, translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
412
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
491
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '9227d7832ed477be556cb6d59c644a74c293c740', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
413
492
|
cartStore.step === 'finish' &&
|
|
414
|
-
this.notificationType === 'success' && (h("div", { key: '
|
|
493
|
+
this.notificationType === 'success' && (h("div", { key: '9107be1ef7895b0a5e3fe0a985036a11de7011d3', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: 'b0de8743bea8dd9ac7099bd5b77811f80d80a380', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: 'f90749b9af4c17eac554efb6d3d12cc41ac6e3c8', onClick: () => {
|
|
415
494
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
416
495
|
this.redirectToUrl(isZonosDashboard
|
|
417
496
|
? '/orders/all'
|
|
@@ -2,6 +2,7 @@ import { Fragment, h, Host, } from "@stencil/core";
|
|
|
2
2
|
import { cartStore, cartStoreNextStep, } from "../../../store/checkout/cart";
|
|
3
3
|
import { paypalStore } from "../../../store/checkout/paypal";
|
|
4
4
|
import { stripeStore } from "../../../store/checkout/stripe";
|
|
5
|
+
import { storageStore } from "../../../store/storageStore";
|
|
5
6
|
import { translate } from "../../../store/translationStore";
|
|
6
7
|
import { zonosStore } from "../../../store/zonosStore";
|
|
7
8
|
import { placeTestOrder } from "../../../utils/api/placeTestOrder";
|
|
@@ -50,7 +51,7 @@ export class ZonosCheckoutPayment {
|
|
|
50
51
|
* handler for continue button click
|
|
51
52
|
*/
|
|
52
53
|
this.continueClickHandler = async ({ currencyCode, }) => {
|
|
53
|
-
var _a;
|
|
54
|
+
var _a, _b;
|
|
54
55
|
if (!this.handleValidate()) {
|
|
55
56
|
this.showErrorBanner = true;
|
|
56
57
|
// Attempt to submit the form so the missing input error will be shown in Stripe
|
|
@@ -65,7 +66,13 @@ export class ZonosCheckoutPayment {
|
|
|
65
66
|
}
|
|
66
67
|
stripeStore.checkoutSettlementCurrency = currencyCode;
|
|
67
68
|
// submit google tag when the form is complete
|
|
68
|
-
submitGtag(
|
|
69
|
+
submitGtag({
|
|
70
|
+
event: 'zonos-checkout-payment-info',
|
|
71
|
+
metadata: {
|
|
72
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
73
|
+
paymentMethod: (_b = stripeStore.stripePaymentEventData) === null || _b === void 0 ? void 0 : _b.value.type,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
69
76
|
this.continueClicked.emit();
|
|
70
77
|
};
|
|
71
78
|
this.copyCardToClipboard = async (cardNumber) => {
|
|
@@ -479,7 +479,12 @@ export class ZonosCheckout {
|
|
|
479
479
|
}
|
|
480
480
|
// Close the confirm dialog
|
|
481
481
|
this.confirmDialogOpen = false;
|
|
482
|
-
submitGtag(
|
|
482
|
+
submitGtag({
|
|
483
|
+
event: 'zonos-checkout-close',
|
|
484
|
+
metadata: {
|
|
485
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
486
|
+
},
|
|
487
|
+
});
|
|
483
488
|
this.open = this.forceDialogOpen || false;
|
|
484
489
|
if (!this.preview && cartStore.step === 'finish') {
|
|
485
490
|
// reset cart store if it's not preview mode and only when checkout is in the finish step.
|
|
@@ -765,7 +770,12 @@ export class ZonosCheckout {
|
|
|
765
770
|
isPreview: this.preview,
|
|
766
771
|
sessionTimeout: CHECKOUT_SESSION_TIMEOUT,
|
|
767
772
|
});
|
|
768
|
-
submitGtag(
|
|
773
|
+
submitGtag({
|
|
774
|
+
event: 'zonos-checkout-start',
|
|
775
|
+
metadata: {
|
|
776
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
777
|
+
},
|
|
778
|
+
});
|
|
769
779
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
770
780
|
void trackConversionEvent({
|
|
771
781
|
checkoutSessionId,
|
|
@@ -1086,7 +1096,12 @@ export class ZonosCheckout {
|
|
|
1086
1096
|
async handleCustomerInfoContinue() {
|
|
1087
1097
|
var _a, _b, _c, _d;
|
|
1088
1098
|
// submit google tag when the form is complete
|
|
1089
|
-
submitGtag(
|
|
1099
|
+
submitGtag({
|
|
1100
|
+
event: 'zonos-checkout-customer-info',
|
|
1101
|
+
metadata: {
|
|
1102
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
1103
|
+
},
|
|
1104
|
+
});
|
|
1090
1105
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
1091
1106
|
void trackConversionEvent({
|
|
1092
1107
|
checkoutSessionId,
|
|
@@ -1225,7 +1240,12 @@ export class ZonosCheckout {
|
|
|
1225
1240
|
}
|
|
1226
1241
|
catch (err) {
|
|
1227
1242
|
logError(err);
|
|
1228
|
-
submitGtag(
|
|
1243
|
+
submitGtag({
|
|
1244
|
+
event: 'zonos-checkout-payment-fail',
|
|
1245
|
+
metadata: {
|
|
1246
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
1247
|
+
},
|
|
1248
|
+
});
|
|
1229
1249
|
stripeStore.hasPaymentError = true;
|
|
1230
1250
|
// should request inventory refund if there's an error during payment
|
|
1231
1251
|
if (stripeStore.shouldInventoryRefund) {
|
|
@@ -74,20 +74,26 @@ export class ZonosShipping {
|
|
|
74
74
|
* handler for continue button click
|
|
75
75
|
*/
|
|
76
76
|
this.continueClickHandler = () => {
|
|
77
|
-
var _a;
|
|
77
|
+
var _a, _b;
|
|
78
78
|
// show error banner if the form is not complete
|
|
79
79
|
if (!this.handleValidate()) {
|
|
80
80
|
this.showErrorBanner = true;
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
// submit google tag when the form is complete
|
|
84
|
-
submitGtag(
|
|
84
|
+
submitGtag({
|
|
85
|
+
event: 'zonos-checkout-shipping-info',
|
|
86
|
+
metadata: {
|
|
87
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
88
|
+
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
85
91
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
86
92
|
void trackConversionEvent({
|
|
87
93
|
checkoutSessionId,
|
|
88
94
|
eventName: 'checkout_shippingInfoCompleted',
|
|
89
95
|
metadata: {
|
|
90
|
-
serviceLevelId: (
|
|
96
|
+
serviceLevelId: (_b = this.selectedShippingMethod) === null || _b === void 0 ? void 0 : _b.value,
|
|
91
97
|
},
|
|
92
98
|
});
|
|
93
99
|
this.showErrorBanner = false;
|
|
@@ -146,7 +146,7 @@ export class ZonosCollectFinish {
|
|
|
146
146
|
window.history.replaceState({}, '', url.toString());
|
|
147
147
|
// Payment doesn't go through
|
|
148
148
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
149
|
-
submitGtag('zonos-checkout-payment-fail');
|
|
149
|
+
submitGtag({ event: 'zonos-checkout-payment-fail' });
|
|
150
150
|
void sendErrorLog({
|
|
151
151
|
endpoint: 'Stripe payment failed',
|
|
152
152
|
errors: [
|
|
@@ -159,7 +159,7 @@ export class ZonosCollectFinish {
|
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
else {
|
|
162
|
-
submitGtag('zonos-checkout-success');
|
|
162
|
+
submitGtag({ event: 'zonos-checkout-success' });
|
|
163
163
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
164
164
|
void trackConversionEvent({
|
|
165
165
|
checkoutSessionId,
|
|
@@ -204,7 +204,7 @@ export class ZonosCollectFinish {
|
|
|
204
204
|
// show success message right away when order id is already created
|
|
205
205
|
this.isLoading = false;
|
|
206
206
|
if (paypalStore.orderIdCreated) {
|
|
207
|
-
submitGtag('zonos-checkout-success');
|
|
207
|
+
submitGtag({ event: 'zonos-checkout-success' });
|
|
208
208
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
209
209
|
void trackConversionEvent({
|
|
210
210
|
checkoutSessionId,
|
|
@@ -260,11 +260,11 @@ export class ZonosCollectFinish {
|
|
|
260
260
|
}
|
|
261
261
|
render() {
|
|
262
262
|
const cartId = window.Zonos.cartId;
|
|
263
|
-
return (h(Host, { key: '
|
|
263
|
+
return (h(Host, { key: 'c085862ecf1f50752634fb44f99b5cb5d82a9e24', class: "zonos--checkout-finish zonos--elements", style: {
|
|
264
264
|
'--zonos--border-radius': getBorderRadius({
|
|
265
265
|
overrideBorderStyle: this.borderRadius,
|
|
266
266
|
}),
|
|
267
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
267
|
+
} }, !this.isLoading && (h("div", { key: '9b30b12c817c3422b355a2f544bbf2908f736c80', class: "zonos--finish-details" }, h("div", { key: '697fff3258a6e74d99500ec25f5d3923f8c7cfc2', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '8457c0c9b22c2fb6374b60e492099981026d2690', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), this.confirmationId && (h("zonos-badge", { key: '21ab18878abb37a2c37d873c494d71aee3d4ed71', badgeColor: "gray" }, this.confirmationId)), h("zonos-text", { key: '389918dd57e6ce5744b7192baa3c06c6db3f70cd', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.order && cartId && (h("div", { key: 'cca6b625a6bea62b788cf8dd6bb9e03e6505d81c', class: "zonos--button-container" }, h("zonos-button", { key: '0f45987515ae99045e5b449b5b1aaae11d70d9fb', onClick: () => {
|
|
268
268
|
window.open(this.getReceiptUrl({ cartId }), '_blank');
|
|
269
269
|
}, size: "lg", variant: "primary" }, translate('View receipt')))))))));
|
|
270
270
|
}
|
|
@@ -64,7 +64,7 @@ export class ZonosCollectPayment {
|
|
|
64
64
|
}
|
|
65
65
|
stripeStore.checkoutSettlementCurrency = currencyCode;
|
|
66
66
|
// submit google tag when the form is complete
|
|
67
|
-
submitGtag('zonos-checkout-payment-info');
|
|
67
|
+
submitGtag({ event: 'zonos-checkout-payment-info' });
|
|
68
68
|
this.continueClicked.emit();
|
|
69
69
|
};
|
|
70
70
|
this.copyCardToClipboard = async (cardNumber) => {
|
|
@@ -146,7 +146,7 @@ export class ZonosInvoiceFinish {
|
|
|
146
146
|
window.history.replaceState({}, '', url.toString());
|
|
147
147
|
// Payment doesn't go through
|
|
148
148
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
149
|
-
submitGtag('zonos-checkout-payment-fail');
|
|
149
|
+
submitGtag({ event: 'zonos-checkout-payment-fail' });
|
|
150
150
|
void sendErrorLog({
|
|
151
151
|
endpoint: 'Stripe payment failed',
|
|
152
152
|
errors: [
|
|
@@ -159,7 +159,7 @@ export class ZonosInvoiceFinish {
|
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
else {
|
|
162
|
-
submitGtag('zonos-checkout-success');
|
|
162
|
+
submitGtag({ event: 'zonos-checkout-success' });
|
|
163
163
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
164
164
|
void trackConversionEvent({
|
|
165
165
|
checkoutSessionId,
|
|
@@ -204,7 +204,7 @@ export class ZonosInvoiceFinish {
|
|
|
204
204
|
// show success message right away when order id is already created
|
|
205
205
|
this.isLoading = false;
|
|
206
206
|
if (paypalStore.orderIdCreated) {
|
|
207
|
-
submitGtag('zonos-checkout-success');
|
|
207
|
+
submitGtag({ event: 'zonos-checkout-success' });
|
|
208
208
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
209
209
|
void trackConversionEvent({
|
|
210
210
|
checkoutSessionId,
|
|
@@ -260,11 +260,11 @@ export class ZonosInvoiceFinish {
|
|
|
260
260
|
}
|
|
261
261
|
render() {
|
|
262
262
|
const cartId = window.Zonos.cartId;
|
|
263
|
-
return (h(Host, { key: '
|
|
263
|
+
return (h(Host, { key: '5d2fc87bc549fa2cb6d622e664043bbfe55f8b0e', class: "zonos--checkout-finish zonos--elements", style: {
|
|
264
264
|
'--zonos--border-radius': getBorderRadius({
|
|
265
265
|
overrideBorderStyle: this.borderRadius,
|
|
266
266
|
}),
|
|
267
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
267
|
+
} }, !this.isLoading && (h("div", { key: '1268de9e5be1edc4cbe2e7e2f1d2590b168d8c7b', class: "zonos--finish-details" }, h("div", { key: 'ce63ee565c176ea5687fc1c0f721932e26b93ebd', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'a073858eac699426dc5947b85d3b3665868f164e', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), this.confirmationId && (h("zonos-badge", { key: 'a96c40f5cc977de82585f7827d6bc6aef55ba873', badgeColor: "gray" }, this.confirmationId)), h("zonos-text", { key: 'd97bc54085b9fe69eb05b44042deae25c379ee3a', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.order && cartId && (h("div", { key: '488c3442e40fedf65caedbd3e098bd8b95976aab', class: "zonos--button-container" }, h("zonos-button", { key: '9a01b9cca0e3747548d386345015ecea80dc29d3', onClick: () => {
|
|
268
268
|
window.open(this.getReceiptUrl({ cartId }), '_blank');
|
|
269
269
|
}, size: "lg", variant: "primary" }, translate('View receipt')))))))));
|
|
270
270
|
}
|