@zonos/elements 1.3.7-alpha.0 → 1.3.7
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-ecc80eb0.js → cart-eee85bda.js} +145 -100
- package/dist/cjs/formatStringWithLinks-52341fc7.js +17 -0
- package/dist/cjs/{getBorderRadius-834c321d.js → getBorderRadius-d8f18958.js} +1 -1
- package/dist/cjs/{isDarkColor-924e6a7a.js → isDarkColor-57860b44.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/submitGtag-a2e1f652.js +55 -0
- package/dist/cjs/zonos-address_4.cjs.entry.js +21 -16
- package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +8 -8
- package/dist/cjs/zonos-card_2.cjs.entry.js +8 -8
- package/dist/cjs/zonos-cart-items_9.cjs.entry.js +35 -33
- package/dist/cjs/zonos-checkout.cjs.entry.js +159 -23
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +28 -9
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +18 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -7
- package/dist/cjs/zonos-hello.cjs.entry.js +25 -11
- package/dist/cjs/zonos-link.cjs.entry.js +24 -0
- package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +6 -7
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-49d4c92a.js → zonosStore-138c5555.js} +5 -3
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +1 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +19 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +41 -20
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +1 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -0
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.css +54 -0
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +97 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.css +2 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +4 -4
- package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +13 -6
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +8 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +52 -13
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -3
- package/dist/collection/components/main/zonos-controller.js +1 -2
- package/dist/collection/components/store/checkout/cart.js +2 -2
- package/dist/collection/components/store/checkout/stripe.js +26 -4
- package/dist/collection/components/store/hello/localization.js +7 -6
- package/dist/collection/components/store/zonosStore.js +5 -3
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +3 -3
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -3
- package/dist/collection/components/utils/api/getLocaleMessages.js +2 -2
- package/dist/collection/components/utils/api/trackConversionEvent.js +22 -0
- package/dist/collection/components/utils/checkout/isShippableCountry.js +15 -0
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +111 -0
- package/dist/collection/components/utils/formatStringWithLinks.js +13 -0
- package/dist/collection/components/utils/handleFetch.js +1 -1
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +25 -28
- package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js +2 -3
- package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js +8 -6
- package/dist/collection/components/utils/hello/initHello.js +23 -3
- package/dist/collection/components/utils/logging/log.js +19 -14
- package/dist/collection/components/utils/logging/logError.js +2 -2
- package/dist/collection/components/utils/logging/sendErrorLog.js +12 -0
- package/dist/collection/scripts/checkIfLoadVersionDomain.js +35 -0
- package/dist/collection/scripts/zonosBase.js +21 -34
- package/dist/collection/styles/stripe/addressRuleStyle.js +4 -0
- package/dist/collection/types/generated/graphql.customer.types.js +1 -4
- package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
- package/dist/components/stripe.js +140 -98
- package/dist/components/trackConversionEvent.js +24 -0
- package/dist/components/zonos-address2.js +1 -1
- package/dist/components/zonos-badge2.js +3 -3
- package/dist/components/zonos-button2.js +5 -5
- package/dist/components/zonos-card2.js +2 -2
- package/dist/components/zonos-cart-subtotal2.js +1 -6
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +32 -12
- package/dist/components/zonos-checkout-payment2.js +1 -1
- package/dist/components/zonos-checkout.js +158 -20
- package/dist/components/zonos-collapse2.js +13 -6
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +25 -6
- package/dist/components/zonos-country-select2.js +9 -3
- package/dist/components/zonos-custom-message2.js +18 -3
- package/dist/components/zonos-customer-info2.js +3 -1
- package/dist/components/zonos-dialog2.js +3 -3
- package/dist/components/zonos-hello-dialog-footer2.js +2 -2
- package/dist/components/zonos-hello-dialog2.js +6 -5
- package/dist/components/zonos-hello.js +24 -9
- package/dist/components/zonos-language-select2.js +3 -3
- package/dist/components/zonos-link-authentication2.js +3 -4
- package/dist/components/zonos-link.d.ts +11 -0
- package/dist/components/zonos-link.js +43 -0
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-payment2.js +3 -4
- package/dist/components/zonos-review2.js +1 -6
- package/dist/components/zonos-select-dialog-header2.js +2 -2
- package/dist/components/zonos-shipping-rich-radio2.js +1 -1
- package/dist/components/zonos-shipping2.js +7 -2
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/components/zonosStore.js +5 -3
- package/dist/esm/{cart-2a0a6871.js → cart-e261efc1.js} +143 -101
- package/dist/esm/formatStringWithLinks-9e819405.js +15 -0
- package/dist/esm/{getBorderRadius-0c7dfcf0.js → getBorderRadius-19787feb.js} +1 -1
- package/dist/esm/{isDarkColor-d0a57fd2.js → isDarkColor-2344e7a5.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/submitGtag-dfc6f1dc.js +51 -0
- package/dist/esm/zonos-address_4.entry.js +21 -16
- package/dist/esm/zonos-badge_2.entry.js +6 -6
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +8 -8
- package/dist/esm/zonos-card_2.entry.js +8 -8
- package/dist/esm/zonos-cart-items_9.entry.js +35 -33
- package/dist/esm/zonos-checkout.entry.js +159 -23
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +28 -9
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +19 -11
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +9 -7
- package/dist/esm/zonos-hello.entry.js +25 -11
- package/dist/esm/zonos-link.entry.js +20 -0
- package/dist/esm/zonos-logo.entry.js +3 -3
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +6 -7
- package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-dec6bd7e.js → zonosStore-00bce01b.js} +5 -3
- package/dist/esm-es5/{cart-2a0a6871.js → cart-e261efc1.js} +1 -1
- package/dist/esm-es5/formatStringWithLinks-9e819405.js +1 -0
- package/dist/esm-es5/{getBorderRadius-0c7dfcf0.js → getBorderRadius-19787feb.js} +1 -1
- package/dist/esm-es5/{isDarkColor-d0a57fd2.js → isDarkColor-2344e7a5.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-dfc6f1dc.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.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_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.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_3.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-link.entry.js +1 -0
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-dec6bd7e.js → zonosStore-00bce01b.js} +1 -1
- package/dist/scripts/checkIfLoadVersionDomain.js +1 -0
- package/dist/scripts/loadStripe.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/stripe.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -1
- package/dist/types/components/common/component-template/zonos-link/zonos-link.d.ts +19 -0
- package/dist/types/components/common/zonos-collapse/zonos-collapse.d.ts +1 -0
- package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +2 -0
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +9 -3
- package/dist/types/components/store/checkout/cart.d.ts +6 -3
- package/dist/types/components/store/checkout/stripe.d.ts +22 -1
- package/dist/types/components/store/hello/localization.d.ts +2 -3
- package/dist/types/components/store/zonosStore.d.ts +1 -0
- package/dist/types/components/utils/api/trackConversionEvent.d.ts +3 -0
- package/dist/types/components/utils/checkout/isShippableCountry.d.ts +1 -0
- package/dist/types/components/utils/checkout/watchBigcommerceDomesticCheckout.d.ts +20 -0
- package/dist/types/components/utils/formatStringWithLinks.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/getCurrencyElements.d.ts +1 -1
- package/dist/types/components/utils/logging/log.d.ts +1 -1
- package/dist/types/components/utils/logging/sendErrorLog.d.ts +7 -0
- package/dist/types/components.d.ts +53 -3
- package/dist/types/scripts/checkIfLoadVersionDomain.d.ts +13 -0
- package/dist/types/scripts/zonosBase.d.ts +2 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +8 -53
- package/dist/types/types/generated/graphql.customer.types.ts +18 -62
- package/dist/types/types/generated/graphql.frontend.types.d.ts +8 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +18 -0
- package/dist/zonos-elements/p-066c5893.system.js +1 -1
- package/dist/zonos-elements/p-07966463.entry.js +1 -0
- package/dist/zonos-elements/p-0c0aa552.js +1 -0
- package/dist/zonos-elements/{p-dfd3edcf.entry.js → p-0c91720b.entry.js} +1 -1
- package/dist/zonos-elements/p-1119dddf.system.entry.js +1 -0
- package/dist/zonos-elements/p-127b480c.entry.js +1 -0
- package/dist/zonos-elements/{p-e855966f.system.entry.js → p-143dc0d9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-14c3ef38.entry.js +1 -0
- package/dist/zonos-elements/{p-55970b10.system.entry.js → p-14d27ce1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7d1d862f.system.entry.js → p-165d469e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-17e87be1.entry.js +1 -0
- package/dist/zonos-elements/{p-a95c034c.entry.js → p-1e0dd491.entry.js} +1 -1
- package/dist/zonos-elements/{p-34efed1d.entry.js → p-279d1c5f.entry.js} +1 -1
- package/dist/zonos-elements/p-2d6557ee.system.js +1 -0
- package/dist/zonos-elements/p-314be538.system.entry.js +1 -0
- package/dist/zonos-elements/{p-79b910bf.system.entry.js → p-328b7f6f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-354603b3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1f85a98c.system.entry.js → p-389599d3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3a1e685f.entry.js +1 -0
- package/dist/zonos-elements/{p-a219689f.entry.js → p-3b23e462.entry.js} +1 -1
- package/dist/zonos-elements/{p-591eb6dd.system.js → p-49f6a985.system.js} +1 -1
- package/dist/zonos-elements/p-4fb77a38.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5b44abc8.system.js → p-5496951a.system.js} +1 -1
- package/dist/zonos-elements/{p-06652d87.system.entry.js → p-58e2f6a1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cc63a29f.system.entry.js → p-5c176b23.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5d9a000a.system.entry.js +1 -0
- package/dist/zonos-elements/p-5f4ba44c.entry.js +1 -0
- package/dist/zonos-elements/{p-88a55076.system.entry.js → p-61e5cf29.system.entry.js} +1 -1
- package/dist/zonos-elements/p-69e2c59e.entry.js +1 -0
- package/dist/zonos-elements/p-745cd869.system.entry.js +1 -0
- package/dist/zonos-elements/p-78ba2928.system.js +1 -0
- package/dist/zonos-elements/{p-67737613.system.entry.js → p-799d8a17.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-375c472a.system.entry.js → p-79b24786.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7b87b82f.js +1 -0
- package/dist/zonos-elements/{p-e2770968.system.entry.js → p-7c45ce37.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7f4f45b3.entry.js +1 -0
- package/dist/zonos-elements/{p-2d2e1831.entry.js → p-857cfe35.entry.js} +1 -1
- package/dist/zonos-elements/{p-ec4d08b3.system.js → p-91797d4e.system.js} +1 -1
- package/dist/zonos-elements/{p-34c03be2.js → p-95e0fc06.js} +1 -1
- package/dist/zonos-elements/p-9e6b489d.system.entry.js +1 -0
- package/dist/zonos-elements/p-9f4e02a1.entry.js +1 -0
- package/dist/zonos-elements/{p-afe40057.entry.js → p-a3cc0f84.entry.js} +1 -1
- package/dist/zonos-elements/p-a87561b8.js +1 -0
- package/dist/zonos-elements/{p-e161a08c.entry.js → p-ac0a7b8f.entry.js} +1 -1
- package/dist/zonos-elements/{p-549c181b.system.js → p-b4725505.system.js} +1 -1
- package/dist/zonos-elements/p-c060d475.js +1 -0
- package/dist/zonos-elements/p-c2e58ee1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9878a770.js → p-da767f8b.js} +1 -1
- package/dist/zonos-elements/p-dd9e8589.entry.js +1 -0
- package/dist/zonos-elements/p-f11a3d9e.entry.js +1 -0
- package/dist/zonos-elements/{p-8aeb4679.system.entry.js → p-f6eaef7b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c7098c3b.entry.js → p-f7c36fcc.entry.js} +1 -1
- package/dist/zonos-elements/{p-a4de3fb2.entry.js → p-ff64ddc5.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/submitGtag-907e71d3.js +0 -21
- package/dist/collection/scripts/extractZonosQaUrl.js +0 -26
- package/dist/esm/submitGtag-a38aed23.js +0 -19
- package/dist/esm-es5/submitGtag-a38aed23.js +0 -1
- package/dist/types/scripts/extractZonosQaUrl.d.ts +0 -11
- package/dist/zonos-elements/p-0057e374.entry.js +0 -1
- package/dist/zonos-elements/p-0c72fb79.system.entry.js +0 -1
- package/dist/zonos-elements/p-290c3670.entry.js +0 -1
- package/dist/zonos-elements/p-2f1e1cbb.system.entry.js +0 -1
- package/dist/zonos-elements/p-33080cde.system.entry.js +0 -1
- package/dist/zonos-elements/p-561e44d6.entry.js +0 -1
- package/dist/zonos-elements/p-5c4dc123.js +0 -1
- package/dist/zonos-elements/p-656c836b.entry.js +0 -1
- package/dist/zonos-elements/p-8d645a00.entry.js +0 -1
- package/dist/zonos-elements/p-a3d72a33.entry.js +0 -1
- package/dist/zonos-elements/p-a93c594f.entry.js +0 -1
- package/dist/zonos-elements/p-b10ff468.entry.js +0 -1
- package/dist/zonos-elements/p-b6992dc2.system.entry.js +0 -1
- package/dist/zonos-elements/p-bce46c41.js +0 -1
- package/dist/zonos-elements/p-c56d4a44.entry.js +0 -1
- package/dist/zonos-elements/p-cbb1e700.system.js +0 -1
- package/dist/zonos-elements/p-cd8bd5e9.system.entry.js +0 -1
- package/dist/zonos-elements/p-d36faf87.system.entry.js +0 -1
- package/dist/zonos-elements/p-e2c6ad57.entry.js +0 -1
- package/dist/zonos-elements/p-ea93943a.system.entry.js +0 -1
- package/dist/zonos-elements/p-f455e08c.js +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-72767498.js');
|
|
6
|
+
|
|
7
|
+
const zonosLinkCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{display:inline-block}:host a{padding-bottom:2px;color:var(--amino-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--amino-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--amino-primary);-webkit-box-shadow:0 1px 0 var(--amino-primary);box-shadow:0 1px 0 var(--amino-primary)}";
|
|
8
|
+
const ZonosLinkStyle0 = zonosLinkCss;
|
|
9
|
+
|
|
10
|
+
const ZonosLink = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.href = '';
|
|
14
|
+
this.rel = undefined;
|
|
15
|
+
this.target = undefined;
|
|
16
|
+
this.linkTitle = undefined;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (index.h(index.Host, { key: '99bf9ff46cf84f424739b76d3da8a8c770c0a88f', class: "zonos--elements" }, index.h("a", { key: 'bd3553a33f27b4815a7b0573a34862093242b456', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, index.h("slot", { key: 'ad80829c1ca5cd9b0e2dd62542025eeecf436196' }))));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
ZonosLink.style = ZonosLinkStyle0;
|
|
23
|
+
|
|
24
|
+
exports.zonos_link = ZonosLink;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosLogoCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";
|
|
@@ -19,11 +19,11 @@ const ZonosLogo = class {
|
|
|
19
19
|
const filterColor = this.theme === 'DARK'
|
|
20
20
|
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
21
21
|
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
22
|
-
return (index.h(index.Host, { key: '
|
|
22
|
+
return (index.h(index.Host, { key: 'b93db6ec62ecaacb3ded0ab07dd2f38ed488f8d1', class: classes.classes(['zonos--elements zonos--logo']), style: {
|
|
23
23
|
'--filter-color': filterColor,
|
|
24
24
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
25
25
|
'--width': this.width,
|
|
26
|
-
} }, index.h("img", { key: '
|
|
26
|
+
} }, index.h("img", { key: '026162477b24250e4204318fa3018b1cfd383ab5', alt: "Zonos Logo", src: index.getAssetPath('./assets/ZonosLogo.png') })));
|
|
27
27
|
}
|
|
28
28
|
static get assetsDirs() { return ["assets"]; }
|
|
29
29
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosNotificationCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999;bottom:var(--amino-space-24);gap:var(--amino-space-8);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:var(--amino-space-8);border-radius:var(--border-radius, var(--amino-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--amino-green-700)}:host .zonos--notification-item.error{background-color:var(--amino-red-700)}:host .zonos--notification-item.warning{background-color:var(--amino-orange-700)}";
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
require('./zonosStore-
|
|
8
|
-
require('./isDarkColor-
|
|
9
|
-
require('./getBorderRadius-
|
|
6
|
+
const cart = require('./cart-eee85bda.js');
|
|
7
|
+
require('./zonosStore-138c5555.js');
|
|
8
|
+
require('./isDarkColor-57860b44.js');
|
|
9
|
+
require('./getBorderRadius-d8f18958.js');
|
|
10
10
|
|
|
11
11
|
const zonosPaymentCss = ".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:var(--amino-space-16)}";
|
|
12
12
|
const ZonosPaymentStyle0 = zonosPaymentCss;
|
|
@@ -29,8 +29,7 @@ const ZonosPayment = class {
|
|
|
29
29
|
});
|
|
30
30
|
const paymentElementContainer = this.el.querySelector('.zonos--payment-component');
|
|
31
31
|
if (!paymentElementContainer) {
|
|
32
|
-
|
|
33
|
-
console.error('Cannot find container element for paymentElement');
|
|
32
|
+
cart.logError('Cannot find container element for paymentElement');
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
35
|
paymentElement.mount(paymentElementContainer);
|
|
@@ -45,7 +44,7 @@ const ZonosPayment = class {
|
|
|
45
44
|
}
|
|
46
45
|
render() {
|
|
47
46
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
48
|
-
return (index.h(index.Host, { key: '
|
|
47
|
+
return (index.h(index.Host, { key: 'e10a4ce1a9ecf05ad8efaceeb861284a92e475d2', class: "zonos--payment zonos--elements" }, this.titleText && (index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("div", { key: 'a1b52de6a2cec2f707e00c39ebcd7752ad191af6', class: "zonos--payment-component" })));
|
|
49
48
|
}
|
|
50
49
|
get el() { return index.getElement(this); }
|
|
51
50
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
|
|
@@ -18,9 +18,9 @@ const ZonosSelectDialogHeader = class {
|
|
|
18
18
|
this.label = '';
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (index.h(index.Host, { key: '
|
|
21
|
+
return (index.h(index.Host, { key: 'd0882c22934d6f9635bd0b31af5703283cd0a1be', class: "zonos--elements", style: {
|
|
22
22
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
23
|
-
} }, index.h("zonos-v-stack", { key: '
|
|
23
|
+
} }, index.h("zonos-v-stack", { key: '2e227c5bdeeeb0fa772847267007df5aea2e0824', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, index.h("div", { key: 'c43b72c938069ff1a99a985b3b388a785f94d100', class: "zonos--select-dialog-header" }, index.h("zonos-text", { key: 'b1008e43ca022ca1e1b63a60ab5c347d1228396e', type: "boldLabel" }, this.label), index.h("zonos-button", { key: '4722586c58eac765ded4a7baeeca8eb58d44dd0a', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), index.h("slot", { key: '36babf745ea5de00c82823520134b1dfcfc9d16d' }))));
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
ZonosSelectDialogHeader.style = ZonosSelectDialogHeaderStyle0;
|
|
@@ -34,9 +34,9 @@ const VStack = class {
|
|
|
34
34
|
this.spacing = 24;
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (index.h(index.Host, { key: '
|
|
37
|
+
return (index.h(index.Host, { key: 'a5d1a84d5b25d1a49abec676731eaf76f703e998', style: {
|
|
38
38
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
39
|
-
} }, index.h("div", { key: '
|
|
39
|
+
} }, index.h("div", { key: '456c8e1865a752dd258989888c45dfbdfd2c4f66', class: classes.classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, index.h("slot", { key: '2d3260c6b74d3def822acb98733f70a97a79f3fa' }))));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
VStack.style = ZonosVStackStyle0;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-d8f18958.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-41cacd82.js');
|
|
10
10
|
|
|
11
11
|
const zonosShippingRichRadioCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--amino-radius-10));border-bottom-left-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--amino-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
|
@@ -44,7 +44,7 @@ const ZonosShippingRichRadio = class {
|
|
|
44
44
|
return (index.h("div", { "aria-hidden": "true", class: classes.classes([
|
|
45
45
|
'zonos--shipping-rich-radio-item',
|
|
46
46
|
selected && 'selected',
|
|
47
|
-
]), onClick: () => this.handleRichRadioSelect(item) }, index.h("input", { checked: selected, class: "zonos--shipping-rich-radio-input", name: "zonos--shipping-rich-radio", type: "radio", value: item.value }), index.h("div", { class: "zonos--shipping-info" }, index.h("div", { class: "zonos--shipping-detail" }, index.h("zonos-text", { class: "zonos--shipping-label", type: "label" }, item.label), (item.sublabel || item.caption) && (index.h("div", { class: "zonos--sub-detail" }, item.sublabel && (index.h("zonos-text", { textColor: "gray-800" }, item.sublabel)), item.caption && (index.h("zonos-text", { textColor: "gray-
|
|
47
|
+
]), onClick: () => this.handleRichRadioSelect(item) }, index.h("input", { checked: selected, class: "zonos--shipping-rich-radio-input", name: "zonos--shipping-rich-radio", type: "radio", value: item.value }), index.h("div", { class: "zonos--shipping-info" }, index.h("div", { class: "zonos--shipping-detail" }, index.h("zonos-text", { class: "zonos--shipping-label", type: "label" }, item.label), (item.sublabel || item.caption) && (index.h("div", { class: "zonos--sub-detail" }, item.sublabel && (index.h("zonos-text", { textColor: "gray-800" }, item.sublabel)), item.caption && (index.h("zonos-text", { textColor: "gray-600" }, item.caption))))), index.h("zonos-text", { type: "semiBoldLabel" }, item.price))));
|
|
48
48
|
})));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const textOptions = {
|
|
@@ -2823,6 +2823,7 @@ const { reset, state: zonosStore } = createStore(() => ({
|
|
|
2823
2823
|
restrictionBehavior: 'DISABLED',
|
|
2824
2824
|
},
|
|
2825
2825
|
loadedConfig: false,
|
|
2826
|
+
organizationId: '',
|
|
2826
2827
|
organizationName: '',
|
|
2827
2828
|
sourceCurrency: 'USD',
|
|
2828
2829
|
storeId: null,
|
|
@@ -2835,7 +2836,7 @@ let savedZonosSettings = null;
|
|
|
2835
2836
|
* Init setting from zonos setting
|
|
2836
2837
|
*/
|
|
2837
2838
|
const zonosStoreInitSetting = ({ overrideSettings, zonosSettings, }) => {
|
|
2838
|
-
var _a, _b, _c;
|
|
2839
|
+
var _a, _b, _c, _d;
|
|
2839
2840
|
reset();
|
|
2840
2841
|
if (zonosSettings) {
|
|
2841
2842
|
// save zonos settings to be used later
|
|
@@ -2850,8 +2851,9 @@ const zonosStoreInitSetting = ({ overrideSettings, zonosSettings, }) => {
|
|
|
2850
2851
|
zonosStore.helloSettings = mergeConfig(zonosStore.helloSettings, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.helloSettings) || (zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.helloSettings) || null, overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.helloSettings);
|
|
2851
2852
|
// set flag to true to indicate that config is ready
|
|
2852
2853
|
zonosStore.loadedConfig = true;
|
|
2853
|
-
zonosStore.
|
|
2854
|
-
zonosStore.
|
|
2854
|
+
zonosStore.organizationId = ((_a = zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.organization) === null || _a === void 0 ? void 0 : _a.id) || '';
|
|
2855
|
+
zonosStore.organizationName = ((_b = zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.organization) === null || _b === void 0 ? void 0 : _b.name) || '';
|
|
2856
|
+
zonosStore.storeId = ((_d = (_c = zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.organization) === null || _c === void 0 ? void 0 : _c.references) === null || _d === void 0 ? void 0 : _d.storeId) || null;
|
|
2855
2857
|
zonosStore.currencyConverter = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.currencyConverter;
|
|
2856
2858
|
};
|
|
2857
2859
|
const zonosStoreFontFamily = () => {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js",
|
|
14
14
|
"components/checkout/zonos-checkout/zonos-review/zonos-review.js",
|
|
15
15
|
"components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js",
|
|
16
|
+
"components/common/component-template/zonos-link/zonos-link.js",
|
|
16
17
|
"components/common/zonos-badge/zonos-badge.js",
|
|
17
18
|
"components/common/zonos-button/zonos-button.js",
|
|
18
19
|
"components/common/zonos-card/zonos-card.js",
|
|
@@ -7,7 +7,6 @@ import { formatCurrency } from "../../../utils/formatCurrency";
|
|
|
7
7
|
import InfoIcon from "./assets/InfoIcon.svg";
|
|
8
8
|
export class ZonosCartSubtotal {
|
|
9
9
|
render() {
|
|
10
|
-
const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;
|
|
11
10
|
const showDutyTaxesInfo = cartStore.step === 'payment' || cartStore.step === 'shipping';
|
|
12
11
|
const renderShippingInfo = () => {
|
|
13
12
|
if (!cartStore.selectedShippingOption) {
|
|
@@ -29,11 +28,7 @@ export class ZonosCartSubtotal {
|
|
|
29
28
|
currency: cartStore.currency,
|
|
30
29
|
})
|
|
31
30
|
: '-', cartStore.isSelectedShippingGuarantee && (h("zonos-badge", null, translate('Guaranteed'))))))), h("tr", { class: "zonos--row zonos--cart-pay-total" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Order total'))), h("td", { class: "zonos--column" }, h("zonos-text", { type: "semiBoldLabel" }, formatCurrency({
|
|
32
|
-
amount:
|
|
33
|
-
// show total without taxes when step is shipping, show total with taxes when step is payment
|
|
34
|
-
cartStore.step === 'shipping'
|
|
35
|
-
? totalWithoutTaxes
|
|
36
|
-
: cartStore.total,
|
|
31
|
+
amount: cartStore.total,
|
|
37
32
|
currency: cartStore.currency,
|
|
38
33
|
})))))));
|
|
39
34
|
}
|
|
@@ -3,8 +3,10 @@ import { cartStore } from "../../../store/checkout/cart";
|
|
|
3
3
|
import { stripeStore, stripeStoreReset, stripeStoreRetrievePayment, } from "../../../store/checkout/stripe";
|
|
4
4
|
import { translate } from "../../../store/translationStore";
|
|
5
5
|
import { zonosStore } from "../../../store/zonosStore";
|
|
6
|
+
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
6
7
|
import { getBorderRadius } from "../../../utils/getBorderRadius";
|
|
7
8
|
import { handleFetch } from "../../../utils/handleFetch";
|
|
9
|
+
import { sendErrorLog } from "../../../utils/logging/sendErrorLog";
|
|
8
10
|
import { submitGtag } from "../../../utils/submitGtag";
|
|
9
11
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
10
12
|
import RemoveIcon from "./assets/RemoveIcon.svg";
|
|
@@ -28,13 +30,17 @@ export class ZonosCheckoutFinish {
|
|
|
28
30
|
this.handleSuccessBehavior = (orderId) => {
|
|
29
31
|
const { successBehavior } = zonosStore.checkoutSettings;
|
|
30
32
|
switch (successBehavior) {
|
|
31
|
-
case 'REDIRECT_TO_SUCCESS_PAGE':
|
|
33
|
+
case 'REDIRECT_TO_SUCCESS_PAGE': {
|
|
32
34
|
const redirectUrl = zonosStore.checkoutSettings.successRedirectUrl;
|
|
33
35
|
if (redirectUrl) {
|
|
36
|
+
// reset store and checkout session id before redirecting
|
|
37
|
+
stripeStoreReset();
|
|
38
|
+
cartStore.checkoutSessionId = null;
|
|
34
39
|
window.location.href = `${redirectUrl}?zOrderNumber=${orderId}`;
|
|
35
40
|
}
|
|
36
41
|
// If no redirect URL, break and display Zonos success page
|
|
37
42
|
break;
|
|
43
|
+
}
|
|
38
44
|
case 'CLOSE_MODAL':
|
|
39
45
|
this.closeClickHandler();
|
|
40
46
|
break;
|
|
@@ -49,6 +55,7 @@ export class ZonosCheckoutFinish {
|
|
|
49
55
|
this.getPullOrder = async (attempts = 0) => {
|
|
50
56
|
const order = await this.pullOrder();
|
|
51
57
|
if (order) {
|
|
58
|
+
void trackConversionEvent('checkout_orderCompleted');
|
|
52
59
|
this.order = order;
|
|
53
60
|
this.handleSuccessBehavior(order.id);
|
|
54
61
|
}
|
|
@@ -60,18 +67,16 @@ export class ZonosCheckoutFinish {
|
|
|
60
67
|
else {
|
|
61
68
|
// Set loading to false to display generic success page and log error
|
|
62
69
|
this.isLoading = false;
|
|
63
|
-
const
|
|
64
|
-
|
|
70
|
+
const baseUrl = process.env.NEXT_PUBLIC_ZONOS_ROUTE_URL;
|
|
71
|
+
const checkoutSessionId = cartStore.checkoutSessionId;
|
|
72
|
+
void sendErrorLog({
|
|
73
|
+
endpoint: `${baseUrl}/api/zonos-elements/get-order?checkoutSessionId=${checkoutSessionId}`,
|
|
65
74
|
errors: ['Order not found after multiple attempts'],
|
|
66
75
|
metadata: {
|
|
67
76
|
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
68
77
|
domain: window.location.hostname,
|
|
69
78
|
storeId: zonosStore.storeId,
|
|
70
79
|
},
|
|
71
|
-
};
|
|
72
|
-
void handleFetch(`${process.env.NEXT_PUBLIC_ZONOS_ROUTE_URL}/api/zonos-elements/log-error`, {
|
|
73
|
-
body: errorObject,
|
|
74
|
-
method: 'POST',
|
|
75
80
|
});
|
|
76
81
|
}
|
|
77
82
|
};
|
|
@@ -79,7 +84,7 @@ export class ZonosCheckoutFinish {
|
|
|
79
84
|
this.isLoading = true;
|
|
80
85
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || stripeStore.clientSecret;
|
|
81
86
|
if (clientSecret || this.storybookForceStatus) {
|
|
82
|
-
const { error, messages } = await stripeStoreRetrievePayment({
|
|
87
|
+
const { error, messages, paymentMethod } = await stripeStoreRetrievePayment({
|
|
83
88
|
clientSecret,
|
|
84
89
|
storybookForceStatus: this.storybookForceStatus,
|
|
85
90
|
});
|
|
@@ -93,6 +98,9 @@ export class ZonosCheckoutFinish {
|
|
|
93
98
|
}
|
|
94
99
|
else {
|
|
95
100
|
submitGtag('zonos-checkout-success');
|
|
101
|
+
void trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
102
|
+
paymentMethod,
|
|
103
|
+
});
|
|
96
104
|
const successEvent = new CustomEvent('zonos-checkout-success', {
|
|
97
105
|
detail: {
|
|
98
106
|
message: 'Zonos Checkout successfully processed order',
|
|
@@ -102,7 +110,8 @@ export class ZonosCheckoutFinish {
|
|
|
102
110
|
}
|
|
103
111
|
// Attempt to pull the order details from the graph every second on 5 attempts
|
|
104
112
|
if (this.notificationType === 'success') {
|
|
105
|
-
|
|
113
|
+
// wait this to finish before resetting store and checkout session id
|
|
114
|
+
await this.getPullOrder();
|
|
106
115
|
}
|
|
107
116
|
else {
|
|
108
117
|
this.isLoading = false;
|
|
@@ -145,7 +154,7 @@ export class ZonosCheckoutFinish {
|
|
|
145
154
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
146
155
|
// return acc + item.quantity;
|
|
147
156
|
// }, 0);
|
|
148
|
-
return (h(Host, { key: '
|
|
157
|
+
return (h(Host, { key: 'fe08bfd0c0b60f4dce1aa9a6f3ba273dccd70a92', class: "zonos--checkout-finish zonos--elements", style: {
|
|
149
158
|
'--border-radius': getBorderRadius(this.borderRadius),
|
|
150
159
|
} }, this.isLoading && (h("div", { class: "loading-wrapper" }, h("zonos-spinner", null))), !this.isLoading && (h(Fragment, null, h("div", { 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", { class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", null, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Keep shopping')))))));
|
|
151
160
|
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
2
|
import { cartStore, cartStoreNextStep, cartStorePreviousStep, cartStoreReset, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
|
|
3
|
-
import { initStripeElements, stripeStore, stripeStoreConfirmPayment, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, } from "../../store/checkout/stripe";
|
|
3
|
+
import { initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, } from "../../store/checkout/stripe";
|
|
4
4
|
import { localizationStore } from "../../store/hello/localization";
|
|
5
5
|
import { translate } from "../../store/translationStore";
|
|
6
6
|
import { zonosStore, } from "../../store/zonosStore";
|
|
7
|
+
import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
|
|
7
8
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
9
|
+
import { isShippableCountry } from "../../utils/checkout/isShippableCountry";
|
|
10
|
+
import { watchBigcommerceDomesticCheckout } from "../../utils/checkout/watchBigcommerceDomesticCheckout";
|
|
8
11
|
import { classes } from "../../utils/classes";
|
|
9
12
|
import { getBorderRadius } from "../../utils/getBorderRadius";
|
|
10
13
|
import { isDarkColor } from "../../utils/isDarkColor";
|
|
11
14
|
import { log } from "../../utils/logging/log";
|
|
15
|
+
import { logError } from "../../utils/logging/logError";
|
|
12
16
|
import { mergeConfig } from "../../utils/mergeConfig";
|
|
13
17
|
import { submitGtag } from "../../utils/submitGtag";
|
|
14
18
|
/** These assets neet to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested */
|
|
@@ -31,19 +35,6 @@ export class ZonosCheckout {
|
|
|
31
35
|
overrideTheme: this.isMobile ? theme : undefined,
|
|
32
36
|
});
|
|
33
37
|
};
|
|
34
|
-
this.isShippableCountry = (showLog = true) => {
|
|
35
|
-
if (!localizationStore.localizationLoaded) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
39
|
-
if (!localizationStore.isShippableCountry) {
|
|
40
|
-
if (showLog) {
|
|
41
|
-
log(`Checkout: not shippable country`);
|
|
42
|
-
}
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
return true;
|
|
46
|
-
};
|
|
47
38
|
this.getCurrentLocalePageEnum = () => {
|
|
48
39
|
switch (cartStore.step) {
|
|
49
40
|
case 'customer-info':
|
|
@@ -70,6 +61,7 @@ export class ZonosCheckout {
|
|
|
70
61
|
this.isMobile = false;
|
|
71
62
|
this.zonosReviewRef = undefined;
|
|
72
63
|
this.storybookPaymentStatusOverride = undefined;
|
|
64
|
+
this.domesticRedirectedBtnSelector = '#zonos--domestic-redirected-checkout-button';
|
|
73
65
|
}
|
|
74
66
|
/**
|
|
75
67
|
* Init cart info handler event
|
|
@@ -115,7 +107,8 @@ export class ZonosCheckout {
|
|
|
115
107
|
// do nothing if button element is not found
|
|
116
108
|
return;
|
|
117
109
|
}
|
|
118
|
-
|
|
110
|
+
// also attach event to hidden button if user was redirected with shipping address session
|
|
111
|
+
const buttonAnchorElements = document.querySelectorAll(`${buttonAnchorSelector}, ${this.domesticRedirectedBtnSelector}`);
|
|
119
112
|
// only attach event once, and looping through all of the button elements
|
|
120
113
|
buttonAnchorElements.forEach(button => {
|
|
121
114
|
const isEventAttached = button.getAttribute('data-zonos-checkout-attached');
|
|
@@ -125,7 +118,7 @@ export class ZonosCheckout {
|
|
|
125
118
|
}
|
|
126
119
|
button.addEventListener('click', async (e) => {
|
|
127
120
|
// do nothing if it's not shippable country
|
|
128
|
-
if (!
|
|
121
|
+
if (!isShippableCountry()) {
|
|
129
122
|
return;
|
|
130
123
|
}
|
|
131
124
|
e.preventDefault();
|
|
@@ -141,6 +134,7 @@ export class ZonosCheckout {
|
|
|
141
134
|
throw new Error('Error building cart');
|
|
142
135
|
}
|
|
143
136
|
submitGtag('zonos-checkout-start');
|
|
137
|
+
void trackConversionEvent('checkout_open');
|
|
144
138
|
}
|
|
145
139
|
catch (err) {
|
|
146
140
|
// stop loading
|
|
@@ -155,6 +149,14 @@ export class ZonosCheckout {
|
|
|
155
149
|
});
|
|
156
150
|
button.removeAttribute('disabled');
|
|
157
151
|
button.setAttribute('data-zonos-checkout-attached', 'true');
|
|
152
|
+
// if this button is the hidden button, trigger the click event
|
|
153
|
+
if (button.matches(this.domesticRedirectedBtnSelector)) {
|
|
154
|
+
button.dispatchEvent(new CustomEvent('click'));
|
|
155
|
+
// cleanup shipping session after button is clicked
|
|
156
|
+
stripeStoreCleanupDomesticShippingSession();
|
|
157
|
+
// remove the button after it's clicked
|
|
158
|
+
button.remove();
|
|
159
|
+
}
|
|
158
160
|
});
|
|
159
161
|
}
|
|
160
162
|
appearanceSettingsOverrideChanged() {
|
|
@@ -170,6 +172,25 @@ export class ZonosCheckout {
|
|
|
170
172
|
async init() {
|
|
171
173
|
stripeStore.stripe = window.Zonos.stripe;
|
|
172
174
|
this.stripe = window.Zonos.stripe;
|
|
175
|
+
// check if bigcommerce, if user enters the shipping address that's in the shipping zone at bigcommerce checkout
|
|
176
|
+
watchBigcommerceDomesticCheckout({
|
|
177
|
+
domesticRedirectedBtnSelector: this.domesticRedirectedBtnSelector,
|
|
178
|
+
onShippingAddressSessionFound: shippingAddressSession => {
|
|
179
|
+
// prefilled the default address if shipping address session is found for checkout on open
|
|
180
|
+
this.defaultAddress = {
|
|
181
|
+
address: {
|
|
182
|
+
city: shippingAddressSession.city,
|
|
183
|
+
country: shippingAddressSession.countryCode,
|
|
184
|
+
line1: shippingAddressSession.address1,
|
|
185
|
+
line2: shippingAddressSession.address2,
|
|
186
|
+
postal_code: shippingAddressSession.postalCode,
|
|
187
|
+
state: shippingAddressSession.state,
|
|
188
|
+
},
|
|
189
|
+
name: `${shippingAddressSession.firstName} ${shippingAddressSession.lastName}`,
|
|
190
|
+
phone: shippingAddressSession.phone,
|
|
191
|
+
};
|
|
192
|
+
},
|
|
193
|
+
});
|
|
173
194
|
const hideInternationalOrderInterval = setInterval(() => {
|
|
174
195
|
const internationalSelector = window.Zonos.internationalHideSelector;
|
|
175
196
|
if (!internationalSelector) {
|
|
@@ -178,7 +199,7 @@ export class ZonosCheckout {
|
|
|
178
199
|
return;
|
|
179
200
|
}
|
|
180
201
|
// hide the selector if it's international
|
|
181
|
-
const isInternationalOrder =
|
|
202
|
+
const isInternationalOrder = isShippableCountry(false);
|
|
182
203
|
const selector = document.querySelectorAll(internationalSelector);
|
|
183
204
|
if (!isInternationalOrder) {
|
|
184
205
|
// show the selector when it's domestic
|
|
@@ -273,8 +294,7 @@ export class ZonosCheckout {
|
|
|
273
294
|
cartStoreNextStep();
|
|
274
295
|
}
|
|
275
296
|
catch (err) {
|
|
276
|
-
|
|
277
|
-
console.error(err);
|
|
297
|
+
logError(err);
|
|
278
298
|
this.paymentError = true;
|
|
279
299
|
}
|
|
280
300
|
this.submitLoading = false;
|
|
@@ -507,7 +527,8 @@ export class ZonosCheckout {
|
|
|
507
527
|
"isAttachError": {},
|
|
508
528
|
"isMobile": {},
|
|
509
529
|
"zonosReviewRef": {},
|
|
510
|
-
"storybookPaymentStatusOverride": {}
|
|
530
|
+
"storybookPaymentStatusOverride": {},
|
|
531
|
+
"domesticRedirectedBtnSelector": {}
|
|
511
532
|
};
|
|
512
533
|
}
|
|
513
534
|
static get methods() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { stripeStore, } from "../../../store/checkout/stripe";
|
|
3
3
|
import { translate } from "../../../store/translationStore";
|
|
4
|
+
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
4
5
|
import { submitGtag } from "../../../utils/submitGtag";
|
|
5
6
|
export class ZonosCustomerInfo {
|
|
6
7
|
constructor() {
|
|
@@ -20,6 +21,7 @@ export class ZonosCustomerInfo {
|
|
|
20
21
|
if (!this.disabled) {
|
|
21
22
|
// submit google tag when the form is complete
|
|
22
23
|
submitGtag('zonos-checkout-customer-info');
|
|
24
|
+
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
render() {
|
|
@@ -28,7 +28,6 @@ export class ZonosReview {
|
|
|
28
28
|
? 'boldSubheader'
|
|
29
29
|
: 'secondaryPageHeader';
|
|
30
30
|
const titleTextColor = this.isMobile ? 'gray-1200' : 'gray-800';
|
|
31
|
-
const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;
|
|
32
31
|
const renderCollapseIcon = () => {
|
|
33
32
|
// only display the collapse icon if the component is being rendered with mobile styles
|
|
34
33
|
if (!this.isMobile) {
|
|
@@ -43,11 +42,7 @@ export class ZonosReview {
|
|
|
43
42
|
'zonos--review zonos--elements',
|
|
44
43
|
this.isMobile && 'mobile',
|
|
45
44
|
]) }, h("div", { class: "zonos--title" }, h("zonos-text", { textColor: titleTextColor, type: titleTextType }, translate('Pay'), " ", zonosStore.organizationName), renderCollapseIcon()), h("div", { class: "zonos--total-pay" }, h("zonos-text", { type: totalTextType }, formatCurrency({
|
|
46
|
-
amount:
|
|
47
|
-
// show total without taxes when step is shipping, show total with taxes when step is payment
|
|
48
|
-
cartStore.step === 'shipping'
|
|
49
|
-
? totalWithoutTaxes
|
|
50
|
-
: cartStore.total,
|
|
45
|
+
amount: cartStore.total,
|
|
51
46
|
currency: cartStore.currency,
|
|
52
47
|
})))));
|
|
53
48
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { cartStore, cartStoreGetShippingTransitInfo, cartStoreUpdateSelectedShippingOption, } from "../../../store/checkout/cart";
|
|
3
3
|
import { translate } from "../../../store/translationStore";
|
|
4
|
+
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
4
5
|
import { formatCurrency } from "../../../utils/formatCurrency";
|
|
5
6
|
import { submitGtag } from "../../../utils/submitGtag";
|
|
6
7
|
export class ZonosShipping {
|
|
@@ -35,9 +36,13 @@ export class ZonosShipping {
|
|
|
35
36
|
this.disabled = true;
|
|
36
37
|
}
|
|
37
38
|
watchFormComplete() {
|
|
39
|
+
var _a;
|
|
38
40
|
if (!this.disabled) {
|
|
39
41
|
// submit google tag when the form is complete
|
|
40
42
|
submitGtag('zonos-checkout-shipping-info');
|
|
43
|
+
void trackConversionEvent('checkout_shippingInfoCompleted', {
|
|
44
|
+
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
45
|
+
});
|
|
41
46
|
}
|
|
42
47
|
}
|
|
43
48
|
render() {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: var(--font-family, Inter), Inter;
|
|
3
|
+
display: block;
|
|
4
|
+
white-space: normal;
|
|
5
|
+
}
|
|
6
|
+
:host * {
|
|
7
|
+
font-family: var(--font-family, Inter), Inter;
|
|
8
|
+
}
|
|
9
|
+
:host img {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
:host dl,
|
|
13
|
+
:host dd,
|
|
14
|
+
:host h1,
|
|
15
|
+
:host h2,
|
|
16
|
+
:host h3,
|
|
17
|
+
:host h4,
|
|
18
|
+
:host h5,
|
|
19
|
+
:host h6,
|
|
20
|
+
:host hr,
|
|
21
|
+
:host figure,
|
|
22
|
+
:host p,
|
|
23
|
+
:host pre {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* All sets of variable are here */
|
|
28
|
+
/* smooth font rendering */
|
|
29
|
+
:host {
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
-webkit-font-smoothing: antialiased;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
}
|
|
37
|
+
:host a {
|
|
38
|
+
padding-bottom: 2px;
|
|
39
|
+
color: var(--amino-primary);
|
|
40
|
+
box-shadow: none;
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
/* Non standard for webkit */
|
|
43
|
+
word-break: break-word;
|
|
44
|
+
hyphens: auto;
|
|
45
|
+
overflow-wrap: break-word;
|
|
46
|
+
}
|
|
47
|
+
:host a:link, :host a:visited {
|
|
48
|
+
color: var(--amino-primary);
|
|
49
|
+
transition: all 150ms ease-in-out;
|
|
50
|
+
}
|
|
51
|
+
:host a:hover, :host a:active {
|
|
52
|
+
color: var(--amino-primary);
|
|
53
|
+
box-shadow: 0 1px 0 var(--amino-primary);
|
|
54
|
+
}
|