@zonos/elements 1.3.6 → 1.3.7-alpha.1
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/{localization-2c9f5765.js → cart-89d9fff4.js} +863 -89
- package/dist/cjs/formatStringWithLinks-52341fc7.js +17 -0
- package/dist/cjs/{getBorderRadius-b252096d.js → getBorderRadius-d8f18958.js} +1 -1
- package/dist/cjs/{isDarkColor-168002d6.js → isDarkColor-57860b44.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/submitGtag-24740560.js +55 -0
- package/dist/cjs/zonos-address_4.cjs.entry.js +36 -18
- 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 +10 -8
- package/dist/cjs/zonos-cart-items_9.cjs.entry.js +66 -56
- package/dist/cjs/zonos-checkout.cjs.entry.js +170 -34
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +51 -32
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -3
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +21 -12
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +23 -19
- package/dist/cjs/zonos-hello.cjs.entry.js +51 -34
- 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 +5 -6
- 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-5d94dabb.js → zonosStore-138c5555.js} +9 -7
- 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 +27 -13
- 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 +39 -18
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +5 -1
- 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 +26 -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 +50 -11
- 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 -1
- package/dist/collection/components/store/checkout/cart.js +2 -2
- package/dist/collection/components/store/checkout/stripe.js +29 -4
- package/dist/collection/components/store/hello/localization.js +34 -7
- package/dist/collection/components/store/zonosStore.js +9 -7
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- 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 -1
- 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 +20 -9
- package/dist/collection/components/utils/logging/logError.js +2 -1
- 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 -31
- package/dist/collection/styles/stripe/addressRuleStyle.js +4 -0
- package/dist/collection/types/generated/graphql.customer.types.js +7 -4
- package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
- package/dist/components/stripe.js +4097 -7
- package/dist/components/submitGtag.js +1 -1
- package/dist/components/trackConversionEvent.js +24 -0
- package/dist/components/zonos-address2.js +2 -3
- 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 +2 -8
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +44 -16
- package/dist/components/zonos-checkout-footer2.js +1 -1
- package/dist/components/zonos-checkout-payment2.js +2 -3
- package/dist/components/zonos-checkout.js +157 -19
- package/dist/components/zonos-collapse2.js +26 -6
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +25 -6
- package/dist/components/zonos-country-flag2.js +1 -1
- 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 +4 -3
- package/dist/components/zonos-dialog2.js +3 -3
- package/dist/components/zonos-hello-dialog-footer2.js +3 -3
- package/dist/components/zonos-hello-dialog2.js +6 -5
- package/dist/components/zonos-hello.js +23 -7
- package/dist/components/zonos-language-select2.js +3 -3
- package/dist/components/zonos-link-authentication2.js +1 -1
- 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 +1 -1
- package/dist/components/zonos-review2.js +2 -8
- 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 -3
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/components/zonosStore.js +9 -7
- package/dist/esm/{localization-d8f6453b.js → cart-1bbb7662.js} +846 -90
- package/dist/esm/formatStringWithLinks-9e819405.js +15 -0
- package/dist/esm/{getBorderRadius-e9736f7e.js → getBorderRadius-19787feb.js} +1 -1
- package/dist/esm/{isDarkColor-e982fa09.js → isDarkColor-2344e7a5.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/submitGtag-d3d11f1a.js +51 -0
- package/dist/esm/zonos-address_4.entry.js +33 -15
- 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 -6
- package/dist/esm/zonos-cart-items_9.entry.js +47 -37
- package/dist/esm/zonos-checkout.entry.js +158 -22
- 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 -2
- package/dist/esm/zonos-country-select_3.entry.js +19 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +9 -5
- package/dist/esm/zonos-hello.entry.js +24 -7
- 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 +5 -6
- 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-e6c7be3a.js → zonosStore-00bce01b.js} +9 -7
- package/dist/esm-es5/cart-1bbb7662.js +1 -0
- package/dist/esm-es5/formatStringWithLinks-9e819405.js +1 -0
- package/dist/esm-es5/{getBorderRadius-e9736f7e.js → getBorderRadius-19787feb.js} +1 -1
- package/dist/esm-es5/{isDarkColor-e982fa09.js → isDarkColor-2344e7a5.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-d3d11f1a.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-e6c7be3a.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 +26 -1
- package/dist/types/components/store/hello/localization.d.ts +1 -1
- package/dist/types/components/store/zonosStore.d.ts +2 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- 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/hello/currencyConversion/getLanguageCode.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/ICountryJson.d.ts +2 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +23 -53
- package/dist/types/types/generated/graphql.customer.types.ts +42 -62
- package/dist/types/types/generated/graphql.frontend.types.d.ts +9 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +19 -1
- package/dist/zonos-elements/p-0318632a.entry.js +1 -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-127b480c.entry.js +1 -0
- package/dist/zonos-elements/p-135ab559.system.entry.js +1 -0
- package/dist/zonos-elements/{p-b81a0577.system.entry.js → p-143dc0d9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-32bca9c8.system.entry.js → p-14d27ce1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-15a80c4a.entry.js +1 -0
- package/dist/zonos-elements/p-17e87be1.entry.js +1 -0
- package/dist/zonos-elements/{p-0c7480a5.entry.js → p-1e0dd491.entry.js} +1 -1
- package/dist/zonos-elements/{p-a33745e9.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-dd7729fd.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-50287643.system.js → p-49f6a985.system.js} +1 -1
- package/dist/zonos-elements/p-57b65321.system.entry.js +1 -0
- package/dist/zonos-elements/p-58c1ddef.system.js +1 -0
- package/dist/zonos-elements/{p-06652d87.system.entry.js → p-58e2f6a1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5ee03db0.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5a113c3d.system.entry.js → p-61e5cf29.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-49a764e9.system.entry.js → p-799d8a17.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7a32526c.entry.js +1 -0
- package/dist/zonos-elements/p-7b87b82f.js +1 -0
- package/dist/zonos-elements/{p-9cbbf261.system.entry.js → p-7c45ce37.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84f4f00f.entry.js +1 -0
- package/dist/zonos-elements/{p-e8a9bc56.entry.js → p-857cfe35.entry.js} +1 -1
- package/dist/zonos-elements/p-87e9c42f.entry.js +1 -0
- package/dist/zonos-elements/{p-e99d79d9.system.js → p-91797d4e.system.js} +1 -1
- package/dist/zonos-elements/{p-17550a10.js → p-95e0fc06.js} +1 -1
- package/dist/zonos-elements/{p-7a6144b1.entry.js → p-a3cc0f84.entry.js} +1 -1
- package/dist/zonos-elements/p-a5f12396.entry.js +1 -0
- package/dist/zonos-elements/p-a87561b8.js +1 -0
- package/dist/zonos-elements/{p-ba43275e.entry.js → p-ac0a7b8f.entry.js} +1 -1
- package/dist/zonos-elements/p-ae82a9ae.js +1 -0
- package/dist/zonos-elements/p-b0462325.system.entry.js +1 -0
- package/dist/zonos-elements/p-b2c0ec71.system.entry.js +1 -0
- package/dist/zonos-elements/{p-fcc4f140.system.js → p-b4725505.system.js} +1 -1
- package/dist/zonos-elements/p-bef54fb1.entry.js +1 -0
- package/dist/zonos-elements/p-c0d431f6.system.entry.js +1 -0
- package/dist/zonos-elements/p-d054788b.system.js +1 -0
- package/dist/zonos-elements/p-d407c93a.system.entry.js +1 -0
- package/dist/zonos-elements/p-e55dd932.js +1 -0
- package/dist/zonos-elements/p-ec37439e.entry.js +1 -0
- package/dist/zonos-elements/p-edace42b.entry.js +1 -0
- package/dist/zonos-elements/p-f478c814.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7dd8e8ba.system.entry.js → p-f6eaef7b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bd6a2095.entry.js → p-f7c36fcc.entry.js} +1 -1
- package/dist/zonos-elements/p-f862b97f.system.entry.js +1 -0
- package/dist/zonos-elements/p-fd642725.entry.js +1 -0
- package/dist/zonos-elements/p-fdb72530.system.entry.js +1 -0
- 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/cart-b8bbf22d.js +0 -698
- package/dist/cjs/submitGtag-792fe45d.js +0 -21
- package/dist/collection/scripts/extractZonosQaUrl.js +0 -26
- package/dist/components/localization.js +0 -4016
- package/dist/esm/cart-bc3bb22e.js +0 -682
- package/dist/esm/submitGtag-bebe2cb0.js +0 -19
- package/dist/esm-es5/cart-bc3bb22e.js +0 -1
- package/dist/esm-es5/localization-d8f6453b.js +0 -1
- package/dist/esm-es5/submitGtag-bebe2cb0.js +0 -1
- package/dist/types/scripts/extractZonosQaUrl.d.ts +0 -11
- package/dist/zonos-elements/p-00d63df1.system.entry.js +0 -1
- package/dist/zonos-elements/p-04f63cea.entry.js +0 -1
- package/dist/zonos-elements/p-16b74c31.system.js +0 -1
- package/dist/zonos-elements/p-1d16a6fb.js +0 -1
- package/dist/zonos-elements/p-1ea68e3b.entry.js +0 -1
- package/dist/zonos-elements/p-1ed530cc.entry.js +0 -1
- package/dist/zonos-elements/p-289c8b1a.system.entry.js +0 -1
- package/dist/zonos-elements/p-2a00c270.system.entry.js +0 -1
- package/dist/zonos-elements/p-37f53a79.entry.js +0 -1
- package/dist/zonos-elements/p-394cf1cf.js +0 -1
- package/dist/zonos-elements/p-3ef27745.js +0 -1
- package/dist/zonos-elements/p-458fd100.system.entry.js +0 -1
- package/dist/zonos-elements/p-47fac33f.js +0 -1
- package/dist/zonos-elements/p-4fafb2a5.system.entry.js +0 -1
- package/dist/zonos-elements/p-4fb71a93.js +0 -1
- package/dist/zonos-elements/p-5276c61b.system.entry.js +0 -1
- package/dist/zonos-elements/p-6308b347.entry.js +0 -1
- package/dist/zonos-elements/p-63d1b1fe.entry.js +0 -1
- package/dist/zonos-elements/p-7347ee7c.system.entry.js +0 -1
- package/dist/zonos-elements/p-8c26a080.system.js +0 -1
- package/dist/zonos-elements/p-96aabe02.entry.js +0 -1
- package/dist/zonos-elements/p-a682fd38.system.entry.js +0 -1
- package/dist/zonos-elements/p-ba1a111a.system.entry.js +0 -1
- package/dist/zonos-elements/p-c4321084.system.entry.js +0 -1
- package/dist/zonos-elements/p-cdf114a2.entry.js +0 -1
- package/dist/zonos-elements/p-d5ae3cbb.system.entry.js +0 -1
- package/dist/zonos-elements/p-d5d7c8f5.entry.js +0 -1
- package/dist/zonos-elements/p-de339fb6.entry.js +0 -1
- package/dist/zonos-elements/p-ec25f180.entry.js +0 -1
- package/dist/zonos-elements/p-f49dfd06.system.js +0 -1
- package/dist/zonos-elements/p-f6f5f644.entry.js +0 -1
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
10
|
-
const submitGtag = require('./submitGtag-792fe45d.js');
|
|
6
|
+
const cart = require('./cart-89d9fff4.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
8
|
+
const submitGtag = require('./submitGtag-24740560.js');
|
|
9
|
+
const getBorderRadius = require('./getBorderRadius-d8f18958.js');
|
|
11
10
|
const classes = require('./classes-b7918f56.js');
|
|
12
|
-
const isDarkColor = require('./isDarkColor-
|
|
11
|
+
const isDarkColor = require('./isDarkColor-57860b44.js');
|
|
13
12
|
const ILanguage = require('./ILanguage-d247b45b.js');
|
|
14
13
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
15
14
|
|
|
@@ -65,15 +64,14 @@ const ZonosCartSubtotal = class {
|
|
|
65
64
|
index.registerInstance(this, hostRef);
|
|
66
65
|
}
|
|
67
66
|
render() {
|
|
68
|
-
const totalWithoutTaxes = cart.cartStore.total - cart.cartStore.dutiesTaxFees;
|
|
69
67
|
const showDutyTaxesInfo = cart.cartStore.step === 'payment' || cart.cartStore.step === 'shipping';
|
|
70
68
|
const renderShippingInfo = () => {
|
|
71
69
|
if (!cart.cartStore.selectedShippingOption) {
|
|
72
|
-
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" },
|
|
70
|
+
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cart.translate('Shipping')), index.h("zonos-text", { class: "zonos--caption", type: "caption" }, cart.translate('No shipping method selected'))));
|
|
73
71
|
}
|
|
74
|
-
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cart.cartStore.selectedShippingOption.displayName), cart.cartStore.selectedShippingOptionTransitTime && (index.h("zonos-text", { class: "zonos--caption", type: "caption" }, cart.cartStore.selectedShippingOptionTransitTime, ' ',
|
|
72
|
+
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cart.cartStore.selectedShippingOption.displayName), cart.cartStore.selectedShippingOptionTransitTime && (index.h("zonos-text", { class: "zonos--caption", type: "caption" }, cart.cartStore.selectedShippingOptionTransitTime, ' ', cart.translate('business days')))));
|
|
75
73
|
};
|
|
76
|
-
return (index.h(index.Host, { class: "zonos--cart-subtotal zonos--elements" }, index.h("table", { class: "zonos--cart-table" }, index.h("tr", { class: "zonos--row zonos--cart-subtotal" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { type: "semiBoldLabel" },
|
|
74
|
+
return (index.h(index.Host, { class: "zonos--cart-subtotal zonos--elements" }, index.h("table", { class: "zonos--cart-table" }, index.h("tr", { class: "zonos--row zonos--cart-subtotal" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { type: "semiBoldLabel" }, cart.translate('Cart subtotal'))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("zonos-text", { type: "semiBoldLabel" }, formatCurrency({
|
|
77
75
|
amount: cart.cartStore.subtotal,
|
|
78
76
|
currency: cart.cartStore.currency,
|
|
79
77
|
})))), index.h("tr", { class: "zonos--row zonos--cart-shipping" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, renderShippingInfo()), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, cart.cartStore.shipping
|
|
@@ -81,17 +79,13 @@ const ZonosCartSubtotal = class {
|
|
|
81
79
|
amount: cart.cartStore.shipping,
|
|
82
80
|
currency: cart.cartStore.currency,
|
|
83
81
|
})
|
|
84
|
-
: '-')), showDutyTaxesInfo && (index.h("tr", { class: "zonos--row zonos--cart-duties" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("div", { class: "zonos--title-with-icon" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" },
|
|
82
|
+
: '-')), showDutyTaxesInfo && (index.h("tr", { class: "zonos--row zonos--cart-duties" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("div", { class: "zonos--title-with-icon" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cart.translate('Duties, taxes, and fees')), index.h("zonos-tooltip", { label: cart.translate('Nothing due at the door') }, index.h("zonos-icon", { "aria-label": "Learn more about duties, taxes, and fees", content: InfoIcon, size: 16 }))), !!cart.cartStore.isSelectedShippingAboveDeminimis && (index.h("zonos-text", { textColor: "gray-800", type: "body" }, cart.translate('Order is over the de minimis threshold for both duty and tax')))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("div", { class: "zonos--cart-duty-tax-price" }, cart.cartStore.dutiesTaxFees
|
|
85
83
|
? formatCurrency({
|
|
86
84
|
amount: cart.cartStore.dutiesTaxFees,
|
|
87
85
|
currency: cart.cartStore.currency,
|
|
88
86
|
})
|
|
89
|
-
: '-', cart.cartStore.isSelectedShippingGuarantee && (index.h("zonos-badge", null,
|
|
90
|
-
amount:
|
|
91
|
-
// show total without taxes when step is shipping, show total with taxes when step is payment
|
|
92
|
-
cart.cartStore.step === 'shipping'
|
|
93
|
-
? totalWithoutTaxes
|
|
94
|
-
: cart.cartStore.total,
|
|
87
|
+
: '-', cart.cartStore.isSelectedShippingGuarantee && (index.h("zonos-badge", null, cart.translate('Guaranteed'))))))), index.h("tr", { class: "zonos--row zonos--cart-pay-total" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cart.translate('Order total'))), index.h("td", { class: "zonos--column" }, index.h("zonos-text", { type: "semiBoldLabel" }, formatCurrency({
|
|
88
|
+
amount: cart.cartStore.total,
|
|
95
89
|
currency: cart.cartStore.currency,
|
|
96
90
|
})))))));
|
|
97
91
|
}
|
|
@@ -114,7 +108,7 @@ const ZonosCheckoutFinish = class {
|
|
|
114
108
|
var _a, _b;
|
|
115
109
|
const baseUrl = "https://v1.route.js.zonos.com";
|
|
116
110
|
const checkoutSessionId = cart.cartStore.checkoutSessionId;
|
|
117
|
-
const { errors, json } = await
|
|
111
|
+
const { errors, json } = await cart.handleFetch(`${baseUrl}/api/zonos-elements/get-order?checkoutSessionId=${checkoutSessionId}`);
|
|
118
112
|
if (errors.length || !(json === null || json === void 0 ? void 0 : json.id)) {
|
|
119
113
|
return null;
|
|
120
114
|
}
|
|
@@ -125,25 +119,34 @@ const ZonosCheckoutFinish = class {
|
|
|
125
119
|
this.handleSuccessBehavior = (orderId) => {
|
|
126
120
|
const { successBehavior } = zonosStore.zonosStore.checkoutSettings;
|
|
127
121
|
switch (successBehavior) {
|
|
128
|
-
case 'REDIRECT_TO_SUCCESS_PAGE':
|
|
122
|
+
case 'REDIRECT_TO_SUCCESS_PAGE': {
|
|
129
123
|
const redirectUrl = zonosStore.zonosStore.checkoutSettings.successRedirectUrl;
|
|
130
124
|
if (redirectUrl) {
|
|
125
|
+
// reset store and checkout session id before redirecting
|
|
126
|
+
cart.stripeStoreReset();
|
|
127
|
+
cart.cartStore.checkoutSessionId = null;
|
|
131
128
|
window.location.href = `${redirectUrl}?zOrderNumber=${orderId}`;
|
|
132
129
|
}
|
|
133
130
|
// If no redirect URL, break and display Zonos success page
|
|
134
131
|
break;
|
|
132
|
+
}
|
|
135
133
|
case 'CLOSE_MODAL':
|
|
136
134
|
this.closeClickHandler();
|
|
137
135
|
break;
|
|
136
|
+
case 'ZONOS_SUCCESS_PAGE':
|
|
137
|
+
default:
|
|
138
|
+
// Do nothing, display Zonos success page
|
|
139
|
+
this.isLoading = false;
|
|
140
|
+
break;
|
|
138
141
|
}
|
|
139
142
|
};
|
|
140
143
|
// TODO: This method of pulling orders is temporary. Once we have a working event registry system, we will rely on that to tell us when the order is ready to trigger onOrderSuccess
|
|
141
144
|
this.getPullOrder = async (attempts = 0) => {
|
|
142
145
|
const order = await this.pullOrder();
|
|
143
146
|
if (order) {
|
|
147
|
+
void submitGtag.trackConversionEvent('checkout_orderCompleted');
|
|
144
148
|
this.order = order;
|
|
145
149
|
this.handleSuccessBehavior(order.id);
|
|
146
|
-
this.isLoading = false;
|
|
147
150
|
}
|
|
148
151
|
else if (!order && attempts < 5) {
|
|
149
152
|
// Wait for 1 second before the next attempt
|
|
@@ -153,18 +156,16 @@ const ZonosCheckoutFinish = class {
|
|
|
153
156
|
else {
|
|
154
157
|
// Set loading to false to display generic success page and log error
|
|
155
158
|
this.isLoading = false;
|
|
156
|
-
const
|
|
157
|
-
|
|
159
|
+
const baseUrl = "https://v1.route.js.zonos.com";
|
|
160
|
+
const checkoutSessionId = cart.cartStore.checkoutSessionId;
|
|
161
|
+
void submitGtag.sendErrorLog({
|
|
162
|
+
endpoint: `${baseUrl}/api/zonos-elements/get-order?checkoutSessionId=${checkoutSessionId}`,
|
|
158
163
|
errors: ['Order not found after multiple attempts'],
|
|
159
164
|
metadata: {
|
|
160
165
|
checkoutSessionId: cart.cartStore.checkoutSessionId || '',
|
|
161
166
|
domain: window.location.hostname,
|
|
162
167
|
storeId: zonosStore.zonosStore.storeId,
|
|
163
168
|
},
|
|
164
|
-
};
|
|
165
|
-
void localization.handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
|
|
166
|
-
body: errorObject,
|
|
167
|
-
method: 'POST',
|
|
168
169
|
});
|
|
169
170
|
}
|
|
170
171
|
};
|
|
@@ -172,20 +173,23 @@ const ZonosCheckoutFinish = class {
|
|
|
172
173
|
this.isLoading = true;
|
|
173
174
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || cart.stripeStore.clientSecret;
|
|
174
175
|
if (clientSecret || this.storybookForceStatus) {
|
|
175
|
-
const { error, messages } = await cart.stripeStoreRetrievePayment({
|
|
176
|
+
const { error, messages, paymentMethod } = await cart.stripeStoreRetrievePayment({
|
|
176
177
|
clientSecret,
|
|
177
178
|
storybookForceStatus: this.storybookForceStatus,
|
|
178
179
|
});
|
|
179
180
|
this.notificationType = error ? 'error' : 'success';
|
|
180
181
|
this.notificationMessages = messages || [];
|
|
181
182
|
this.notificationTitle = error
|
|
182
|
-
?
|
|
183
|
-
:
|
|
183
|
+
? cart.translate('Payment failed')
|
|
184
|
+
: cart.translate("You're all set!");
|
|
184
185
|
if (error) {
|
|
185
186
|
submitGtag.submitGtag('zonos-checkout-payment-fail');
|
|
186
187
|
}
|
|
187
188
|
else {
|
|
188
189
|
submitGtag.submitGtag('zonos-checkout-success');
|
|
190
|
+
void submitGtag.trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
191
|
+
paymentMethod,
|
|
192
|
+
});
|
|
189
193
|
const successEvent = new CustomEvent('zonos-checkout-success', {
|
|
190
194
|
detail: {
|
|
191
195
|
message: 'Zonos Checkout successfully processed order',
|
|
@@ -195,12 +199,18 @@ const ZonosCheckoutFinish = class {
|
|
|
195
199
|
}
|
|
196
200
|
// Attempt to pull the order details from the graph every second on 5 attempts
|
|
197
201
|
if (this.notificationType === 'success') {
|
|
198
|
-
this
|
|
199
|
-
|
|
202
|
+
// wait this to finish before resetting store and checkout session id
|
|
203
|
+
await this.getPullOrder();
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
this.isLoading = false;
|
|
200
207
|
}
|
|
201
208
|
}
|
|
209
|
+
else {
|
|
210
|
+
this.isLoading = false;
|
|
211
|
+
}
|
|
202
212
|
cart.stripeStoreReset();
|
|
203
|
-
|
|
213
|
+
cart.cartStore.checkoutSessionId = null;
|
|
204
214
|
};
|
|
205
215
|
this.closeClickHandler = () => {
|
|
206
216
|
this.closeClick.emit();
|
|
@@ -233,9 +243,9 @@ const ZonosCheckoutFinish = class {
|
|
|
233
243
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
234
244
|
// return acc + item.quantity;
|
|
235
245
|
// }, 0);
|
|
236
|
-
return (index.h(index.Host, { key: '
|
|
246
|
+
return (index.h(index.Host, { key: 'fe08bfd0c0b60f4dce1aa9a6f3ba273dccd70a92', class: "zonos--checkout-finish zonos--elements", style: {
|
|
237
247
|
'--border-radius': getBorderRadius.getBorderRadius(this.borderRadius),
|
|
238
|
-
} }, this.isLoading && (index.h("div", { class: "loading-wrapper" }, index.h("zonos-spinner", null))), !this.isLoading && (index.h(index.Fragment, null, index.h("div", { class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon$1, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", null, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), index.h("zonos-button", { onClick: () => this.closeClickHandler(), size: "md", variant: "primary" },
|
|
248
|
+
} }, this.isLoading && (index.h("div", { class: "loading-wrapper" }, index.h("zonos-spinner", null))), !this.isLoading && (index.h(index.Fragment, null, index.h("div", { class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon$1, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", null, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), index.h("zonos-button", { onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, cart.translate('Keep shopping')))))));
|
|
239
249
|
}
|
|
240
250
|
static get assetsDirs() { return ["assets"]; }
|
|
241
251
|
};
|
|
@@ -273,7 +283,7 @@ const ZonosCheckoutFooter = class {
|
|
|
273
283
|
var _a, _b;
|
|
274
284
|
const primaryColor = (_a = zonosStore.zonosStore.appearance) === null || _a === void 0 ? void 0 : _a.colorPrimary;
|
|
275
285
|
const footerTheme = primaryColor && isDarkColor.isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
|
|
276
|
-
const languageLabel = (_b = ILanguage.languages.find(x => x.code ===
|
|
286
|
+
const languageLabel = (_b = ILanguage.languages.find(x => x.code === cart.localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.label;
|
|
277
287
|
return (index.h(index.Host, { key: 'cadd2ef8877c716cdeb1f5f40642e41cabc2a55d', class: "zonos--elements" }, index.h("div", { key: '480995fd1ca7bc41702d15dd40d64e02a9ba09dd', class: "zonos--checkout-footer", "data-theme": footerTheme, style: { '--primary-color': primaryColor } }, index.h("div", { key: 'b83ebb3203542f7f4a227b50b26010cbeb914294', class: "zonos--checkout-locale-wrapper" }, index.h("zonos-button", { key: '66ad21d85629d159b4ff3341e82c92d6bd19ceca', class: "zonos--checkout-footer-language-button", icon: index.h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: "gray-700" }), onClick: () => this.toggleDialog(), variant: "subtle" }, languageLabel), index.h("div", { key: '1e8dce34f3866570f267233644c6d5549cf02c9b', class: classes.classes([
|
|
278
288
|
'zonos--checkout-footer-dialog',
|
|
279
289
|
this.showDialog && 'zonos--checkout-footer-dialog-open',
|
|
@@ -283,7 +293,7 @@ const ZonosCheckoutFooter = class {
|
|
|
283
293
|
};
|
|
284
294
|
ZonosCheckoutFooter.style = ZonosCheckoutFooterStyle0;
|
|
285
295
|
|
|
286
|
-
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}";
|
|
296
|
+
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}";
|
|
287
297
|
const ZonosCheckoutPaymentStyle0 = zonosCheckoutPaymentCss;
|
|
288
298
|
|
|
289
299
|
const ZonosCheckoutPayment = class {
|
|
@@ -314,7 +324,7 @@ const ZonosCheckoutPayment = class {
|
|
|
314
324
|
return null;
|
|
315
325
|
}
|
|
316
326
|
this.disabled = !((_a = cart.stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
317
|
-
return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" },
|
|
327
|
+
return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Payment method')), this.paymentError && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, cart.translate("We couldn't complete your payment. Please verify the payment details and try again."))), index.h("zonos-payment", null), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
318
328
|
// use primary type when on mobile mode
|
|
319
329
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
320
330
|
amount: cart.cartStore.total,
|
|
@@ -327,7 +337,7 @@ const ZonosCheckoutPayment = class {
|
|
|
327
337
|
};
|
|
328
338
|
ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
|
|
329
339
|
|
|
330
|
-
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:
|
|
340
|
+
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:var(--amino-space-8);margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
331
341
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
332
342
|
|
|
333
343
|
const ZonosCustomerInfo = class {
|
|
@@ -350,6 +360,7 @@ const ZonosCustomerInfo = class {
|
|
|
350
360
|
if (!this.disabled) {
|
|
351
361
|
// submit google tag when the form is complete
|
|
352
362
|
submitGtag.submitGtag('zonos-checkout-customer-info');
|
|
363
|
+
void submitGtag.trackConversionEvent('checkout_customerInfoCompleted');
|
|
353
364
|
}
|
|
354
365
|
}
|
|
355
366
|
render() {
|
|
@@ -367,11 +378,11 @@ const ZonosCustomerInfo = class {
|
|
|
367
378
|
!((_c = cart.stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.complete) ||
|
|
368
379
|
!((_d = cart.stripeStore.stripeLinkEventData) === null || _d === void 0 ? void 0 : _d.complete);
|
|
369
380
|
const showBilling = !cart.stripeStore.stripeShippingSameAsBilling;
|
|
370
|
-
return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" },
|
|
381
|
+
return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Customer information')), index.h("zonos-link-authentication", { titleText: cart.translate('Contact') }), index.h("zonos-address", { defaultAddress: this.defaultAddress, titleText: cart.translate('Address'), type: "shipping" }), index.h("zonos-checkbox", { isChecked: cart.stripeStore.stripeShippingSameAsBilling, label: cart.translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
371
382
|
cart.stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
372
|
-
} }), index.h("zonos-collapse", { collapsed: !showBilling }, index.h("zonos-address", { defaultAddress: this.defaultAddress, titleText:
|
|
383
|
+
} }), index.h("zonos-collapse", { collapsed: !showBilling }, index.h("zonos-address", { defaultAddress: this.defaultAddress, titleText: cart.translate('Billing address'), type: "billing" })), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
373
384
|
// use primary type when on mobile mode
|
|
374
|
-
variant: this.submitBtnType },
|
|
385
|
+
variant: this.submitBtnType }, cart.translate('Continue to shipping'))))));
|
|
375
386
|
}
|
|
376
387
|
static get watchers() { return {
|
|
377
388
|
"disabled": ["watchFormComplete"]
|
|
@@ -429,7 +440,7 @@ const ZonosDialog = class {
|
|
|
429
440
|
document.body.style.overflow = 'auto';
|
|
430
441
|
}
|
|
431
442
|
const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle);
|
|
432
|
-
return (index.h(index.Host, { key: '
|
|
443
|
+
return (index.h(index.Host, { key: '3927d9cf0ebbd8b497a0ec42328c4392925d198a', class: classes.classes([
|
|
433
444
|
'zonos--elements',
|
|
434
445
|
this.open && 'open',
|
|
435
446
|
this.isLoading && 'is-loading',
|
|
@@ -440,10 +451,10 @@ const ZonosDialog = class {
|
|
|
440
451
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
441
452
|
'--height': this.height || 'initial',
|
|
442
453
|
'--width': this.width,
|
|
443
|
-
} }, index.h("div", { key: '
|
|
454
|
+
} }, index.h("div", { key: 'df93af61bfd856db3a572cdb98f60a8dd5c5bb7d', class: "zonos--backdrop" }), index.h("div", { key: 'f306feb4858dff642fbfd731e5aad849a8f29941', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, index.h("div", { key: 'b914ea2e54fb2af825008ae28e235c461dce67e9', class: "zonos--dialog" }, this.isLoading && (index.h("div", { class: "zonos--loading" }, index.h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (index.h("div", { class: "zonos--header" }, this.headerText && (index.h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), index.h("div", { key: '19219c0c8d167bbacec992ba10b1fe0f31a8b8f6', class: classes.classes([
|
|
444
455
|
'zonos--body',
|
|
445
456
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
446
|
-
]) }, index.h("slot", { key: '
|
|
457
|
+
]) }, index.h("slot", { key: '38f9b83418dacd47cc2395f253a32ff0a6723d54' })), this.footerRightAction && (index.h("div", { class: "zonos--footer" }, index.h("div", { class: "zonos--footer-right-action" }, this.footerRightAction)))))));
|
|
447
458
|
}
|
|
448
459
|
static get assetsDirs() { return ["assets"]; }
|
|
449
460
|
};
|
|
@@ -475,7 +486,6 @@ const ZonosReview = class {
|
|
|
475
486
|
? 'boldSubheader'
|
|
476
487
|
: 'secondaryPageHeader';
|
|
477
488
|
const titleTextColor = this.isMobile ? 'gray-1200' : 'gray-800';
|
|
478
|
-
const totalWithoutTaxes = cart.cartStore.total - cart.cartStore.dutiesTaxFees;
|
|
479
489
|
const renderCollapseIcon = () => {
|
|
480
490
|
// only display the collapse icon if the component is being rendered with mobile styles
|
|
481
491
|
if (!this.isMobile) {
|
|
@@ -489,12 +499,8 @@ const ZonosReview = class {
|
|
|
489
499
|
return (index.h(index.Host, { class: classes.classes([
|
|
490
500
|
'zonos--review zonos--elements',
|
|
491
501
|
this.isMobile && 'mobile',
|
|
492
|
-
]) }, index.h("div", { class: "zonos--title" }, index.h("zonos-text", { textColor: titleTextColor, type: titleTextType },
|
|
493
|
-
amount:
|
|
494
|
-
// show total without taxes when step is shipping, show total with taxes when step is payment
|
|
495
|
-
cart.cartStore.step === 'shipping'
|
|
496
|
-
? totalWithoutTaxes
|
|
497
|
-
: cart.cartStore.total,
|
|
502
|
+
]) }, index.h("div", { class: "zonos--title" }, index.h("zonos-text", { textColor: titleTextColor, type: titleTextType }, cart.translate('Pay'), " ", zonosStore.zonosStore.organizationName), renderCollapseIcon()), index.h("div", { class: "zonos--total-pay" }, index.h("zonos-text", { type: totalTextType }, formatCurrency({
|
|
503
|
+
amount: cart.cartStore.total,
|
|
498
504
|
currency: cart.cartStore.currency,
|
|
499
505
|
})))));
|
|
500
506
|
}
|
|
@@ -502,7 +508,7 @@ const ZonosReview = class {
|
|
|
502
508
|
};
|
|
503
509
|
ZonosReview.style = ZonosReviewStyle0;
|
|
504
510
|
|
|
505
|
-
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
511
|
+
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
506
512
|
const ZonosShippingStyle0 = zonosShippingCss;
|
|
507
513
|
|
|
508
514
|
const ZonosShipping = class {
|
|
@@ -539,9 +545,13 @@ const ZonosShipping = class {
|
|
|
539
545
|
this.disabled = true;
|
|
540
546
|
}
|
|
541
547
|
watchFormComplete() {
|
|
548
|
+
var _a;
|
|
542
549
|
if (!this.disabled) {
|
|
543
550
|
// submit google tag when the form is complete
|
|
544
551
|
submitGtag.submitGtag('zonos-checkout-shipping-info');
|
|
552
|
+
void submitGtag.trackConversionEvent('checkout_shippingInfoCompleted', {
|
|
553
|
+
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
554
|
+
});
|
|
545
555
|
}
|
|
546
556
|
}
|
|
547
557
|
render() {
|
|
@@ -550,10 +560,10 @@ const ZonosShipping = class {
|
|
|
550
560
|
var _a, _b;
|
|
551
561
|
const { expectedDate, maxTransit, minTransit } = cart.cartStoreGetShippingTransitInfo(item);
|
|
552
562
|
const sublabel = expectedDate
|
|
553
|
-
? `${
|
|
563
|
+
? `${cart.translate('Expected delivery')} ${expectedDate}`
|
|
554
564
|
: '';
|
|
555
565
|
const caption = minTransit && maxTransit
|
|
556
|
-
? `(${minTransit}-${maxTransit} ${
|
|
566
|
+
? `(${minTransit}-${maxTransit} ${cart.translate('business days')})`
|
|
557
567
|
: '';
|
|
558
568
|
const shippingAmount = ((_b = (_a = cart.cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(landedCostItem => { var _a; return ((_a = landedCostItem.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating.id) === item.id; })) === null || _b === void 0 ? void 0 : _b.subtotals.shipping) || 0;
|
|
559
569
|
return {
|
|
@@ -567,9 +577,9 @@ const ZonosShipping = class {
|
|
|
567
577
|
value: item.id,
|
|
568
578
|
};
|
|
569
579
|
});
|
|
570
|
-
return (index.h(index.Host, { class: "zonos--shipping zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" },
|
|
580
|
+
return (index.h(index.Host, { class: "zonos--shipping zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Shipping information')), index.h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, cart.translate('Shipping method')), !(serviceLevels === null || serviceLevels === void 0 ? void 0 : serviceLevels.length) ? (index.h("zonos-banner", { bannerTitle: "No shipping methods found - try editing your address or contacting support if the error persists", intent: "error" })) : (index.h("zonos-shipping-rich-radio", { items: serviceLevels || [], onRadioSelected: e => this.handleRadioSelected(e) })), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
571
581
|
// use primary type when on mobile mode
|
|
572
|
-
variant: this.submitBtnType },
|
|
582
|
+
variant: this.submitBtnType }, cart.translate('Go to payment'))))));
|
|
573
583
|
}
|
|
574
584
|
static get watchers() { return {
|
|
575
585
|
"disabled": ["watchFormComplete"]
|