@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { u as handleFetch, l as logError, z as isValidSelector, d as log, s as stripeStore, A as initLocalizationStore, f as localizationStoreUpdateSelectedCountryCode } from './stripe.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreInitSetting, a as zonosStoreFontFamily } from './zonosStore.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './zonos-notification2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './zonos-text2.js';
|
|
@@ -35,13 +35,16 @@ const initCheckout = (config) => {
|
|
|
35
35
|
injectCheckoutElement();
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
const injectHelloComponent = (
|
|
38
|
+
const injectHelloComponent = (anchorElementSelector) => {
|
|
39
|
+
const triggerAnchorElement = document.querySelector(anchorElementSelector);
|
|
39
40
|
// append checkout component if doesn't exist
|
|
40
41
|
const helloElement = document.querySelector('zonos-hello');
|
|
41
42
|
if (!helloElement && triggerAnchorElement) {
|
|
42
43
|
const newHelloElement = document.createElement('zonos-hello');
|
|
43
44
|
triggerAnchorElement.appendChild(newHelloElement);
|
|
45
|
+
return true;
|
|
44
46
|
}
|
|
47
|
+
return false;
|
|
45
48
|
};
|
|
46
49
|
const initHello = async (helloSettings) => {
|
|
47
50
|
const { anchorElementSelector } = helloSettings;
|
|
@@ -50,9 +53,26 @@ const initHello = async (helloSettings) => {
|
|
|
50
53
|
logError(`Selector anchorElementSelector "${helloSettings.anchorElementSelector}" is not a valid selector.`);
|
|
51
54
|
return;
|
|
52
55
|
}
|
|
53
|
-
const triggerElement = document.querySelector(anchorElementSelector);
|
|
54
56
|
log('Hello init complete');
|
|
55
|
-
injectHelloComponent(
|
|
57
|
+
const isHelloInjected = injectHelloComponent(anchorElementSelector);
|
|
58
|
+
// keep watching for the anchor element to be added to the DOM, then inject hello component
|
|
59
|
+
if (!isHelloInjected) {
|
|
60
|
+
const observer = new MutationObserver(() => {
|
|
61
|
+
const injected = injectHelloComponent(anchorElementSelector);
|
|
62
|
+
if (injected) {
|
|
63
|
+
// disconnect observer if hello is successfully injected
|
|
64
|
+
observer.disconnect();
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
observer.observe(document.body, {
|
|
68
|
+
childList: true,
|
|
69
|
+
subtree: true,
|
|
70
|
+
});
|
|
71
|
+
// kill observer after 5 seconds if the hello still not injected, if the hello still not injected after 10 seconds, it's likely that the selector the user doesn't want to use hello
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
observer.disconnect();
|
|
74
|
+
}, 5000);
|
|
75
|
+
}
|
|
56
76
|
};
|
|
57
77
|
|
|
58
78
|
const zonosControllerCss = ":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{visibility:hidden;opacity:0;height:0}";
|
|
@@ -72,7 +92,6 @@ const ZonosController$1 = /*@__PURE__*/ proxyCustomElement(class ZonosController
|
|
|
72
92
|
*/
|
|
73
93
|
async initCheckoutElement(stripe) {
|
|
74
94
|
if (!stripe) {
|
|
75
|
-
// eslint-disable-next-line no-console
|
|
76
95
|
log('Stripe is not loaded yet - cannot init checkout element', 'warn');
|
|
77
96
|
return;
|
|
78
97
|
}
|
|
@@ -208,7 +227,7 @@ const ZonosController$1 = /*@__PURE__*/ proxyCustomElement(class ZonosController
|
|
|
208
227
|
zonosStore.organizationName = organizationName;
|
|
209
228
|
}
|
|
210
229
|
render() {
|
|
211
|
-
return h(Host, { key: '
|
|
230
|
+
return h(Host, { key: '0b734aaa82bd08277fb3a2694197b13242a4d0a6', class: "zonos--elements" });
|
|
212
231
|
}
|
|
213
232
|
static get style() { return ZonosControllerStyle0; }
|
|
214
233
|
}, [1, "zonos-controller", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { f as localizationStoreUpdateSelectedCountryCode, b as localizationStore } from './stripe.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore.js';
|
|
4
4
|
import { d as defineCustomElement$7 } from './zonos-button2.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './zonos-country-flag2.js';
|
|
@@ -1814,6 +1814,11 @@ const ZonosCountrySelect = /*@__PURE__*/ proxyCustomElement(class ZonosCountrySe
|
|
|
1814
1814
|
this.handleOnClose = () => { };
|
|
1815
1815
|
this.inputValue = '';
|
|
1816
1816
|
}
|
|
1817
|
+
componentDidRender() {
|
|
1818
|
+
var _a, _b;
|
|
1819
|
+
// focus the input on render
|
|
1820
|
+
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-select-input')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1821
|
+
}
|
|
1817
1822
|
render() {
|
|
1818
1823
|
const { shippingZoneCountries } = localizationStore;
|
|
1819
1824
|
const countries = shippingZoneCountries
|
|
@@ -1826,10 +1831,11 @@ const ZonosCountrySelect = /*@__PURE__*/ proxyCustomElement(class ZonosCountrySe
|
|
|
1826
1831
|
const filteredCountries = this.inputValue
|
|
1827
1832
|
? fuseObject.map(country => country.item)
|
|
1828
1833
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1829
|
-
return (h(Host, { key: '
|
|
1834
|
+
return (h(Host, { key: '2b8e15643f92ac489706aff7623b1d1efdebce70', class: "zonos--elements", style: {
|
|
1830
1835
|
'--font-family': zonosStoreFontFamily(),
|
|
1831
|
-
} }, h("div", { key: '
|
|
1836
|
+
} }, h("div", { key: '06b0c7765d8144ca102c9033e74cf1edb14743ac', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'f2af99575f518acb753448f7cb1f7aecd790de9d', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '296b92c476439aace00f6817b452a3fd3e1d353d', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: 'd988b856392f88a66bcc3016ccf55107bda4a411', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '4376bec824141dd7d2dbfb84f465ac4a48e1d050', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
|
|
1832
1837
|
}
|
|
1838
|
+
get ele() { return this; }
|
|
1833
1839
|
static get style() { return ZonosCountrySelectStyle0; }
|
|
1834
1840
|
}, [1, "zonos-country-select", {
|
|
1835
1841
|
"handleOnClose": [16],
|
|
@@ -4,6 +4,20 @@ import { d as defineCustomElement$3 } from './zonos-card2.js';
|
|
|
4
4
|
import { d as defineCustomElement$2 } from './zonos-icon2.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
6
6
|
|
|
7
|
+
const formatStringWithLinks = (str) => {
|
|
8
|
+
// Match Markdown-style links or standalone URLs not in Markdown format
|
|
9
|
+
const linkRegex = /\[([^\]]+)\]\((https?:\/\/[^\s\)]+)\)|(https?:\/\/[^\s]+)/g;
|
|
10
|
+
const messageWithLinks = str.replace(linkRegex, (_match, text, markdownUrl, url) => {
|
|
11
|
+
if (markdownUrl) {
|
|
12
|
+
return `<zonos-link href="${markdownUrl}" target="_blank" rel="noopener noreferrer">${text}</zonos-link>`;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return `<zonos-link href="${url}" target="_blank" rel="noopener noreferrer">${url}</zonos-link>`;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return messageWithLinks;
|
|
19
|
+
};
|
|
20
|
+
|
|
7
21
|
const zonosCustomMessageCss = ":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 .zonos--custom-message{background:var(--amino-gray-50);border-radius:var(--amino-radius-6)}:host .zonos--custom-message .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}";
|
|
8
22
|
const ZonosCustomMessageStyle0 = zonosCustomMessageCss;
|
|
9
23
|
|
|
@@ -16,9 +30,10 @@ const ZonosCustomMessage = /*@__PURE__*/ proxyCustomElement(class ZonosCustomMes
|
|
|
16
30
|
this.message = '';
|
|
17
31
|
}
|
|
18
32
|
render() {
|
|
19
|
-
|
|
33
|
+
const messageWithLinks = formatStringWithLinks(this.message);
|
|
34
|
+
return (h(Host, { key: '73091a3267f0989e8820800054aebc75168dc5d6', class: "zonos--elements", style: {
|
|
20
35
|
'--font-family': zonosStoreFontFamily(),
|
|
21
|
-
} }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message", content: this.icon }), h("zonos-text",
|
|
36
|
+
} }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { innerHTML: messageWithLinks }))))));
|
|
22
37
|
}
|
|
23
38
|
static get style() { return ZonosCustomMessageStyle0; }
|
|
24
39
|
}, [1, "zonos-custom-message", {
|
|
@@ -54,4 +69,4 @@ function defineCustomElement() {
|
|
|
54
69
|
} });
|
|
55
70
|
}
|
|
56
71
|
|
|
57
|
-
export { ZonosCustomMessage as Z, defineCustomElement as d };
|
|
72
|
+
export { ZonosCustomMessage as Z, defineCustomElement as d, formatStringWithLinks as f };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { s as stripeStore, t as translate } from './stripe.js';
|
|
3
|
+
import { t as trackConversionEvent } from './trackConversionEvent.js';
|
|
3
4
|
import { s as submitGtag } from './submitGtag.js';
|
|
4
5
|
import { d as defineCustomElement$7 } from './zonos-address2.js';
|
|
5
6
|
import { d as defineCustomElement$6 } from './zonos-button2.js';
|
|
@@ -9,7 +10,7 @@ import { d as defineCustomElement$3 } from './zonos-link-authentication2.js';
|
|
|
9
10
|
import { d as defineCustomElement$2 } from './zonos-spinner2.js';
|
|
10
11
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
11
12
|
|
|
12
|
-
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:-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%}";
|
|
13
|
+
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%}";
|
|
13
14
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
14
15
|
|
|
15
16
|
const ZonosCustomerInfo = /*@__PURE__*/ proxyCustomElement(class ZonosCustomerInfo extends HTMLElement {
|
|
@@ -33,6 +34,7 @@ const ZonosCustomerInfo = /*@__PURE__*/ proxyCustomElement(class ZonosCustomerIn
|
|
|
33
34
|
if (!this.disabled) {
|
|
34
35
|
// submit google tag when the form is complete
|
|
35
36
|
submitGtag('zonos-checkout-customer-info');
|
|
37
|
+
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
render() {
|
|
@@ -58,7 +58,7 @@ const ZonosDialog = /*@__PURE__*/ proxyCustomElement(class ZonosDialog extends H
|
|
|
58
58
|
document.body.style.overflow = 'auto';
|
|
59
59
|
}
|
|
60
60
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
61
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: '3927d9cf0ebbd8b497a0ec42328c4392925d198a', class: classes([
|
|
62
62
|
'zonos--elements',
|
|
63
63
|
this.open && 'open',
|
|
64
64
|
this.isLoading && 'is-loading',
|
|
@@ -69,10 +69,10 @@ const ZonosDialog = /*@__PURE__*/ proxyCustomElement(class ZonosDialog extends H
|
|
|
69
69
|
'--font-family': zonosStoreFontFamily(),
|
|
70
70
|
'--height': this.height || 'initial',
|
|
71
71
|
'--width': this.width,
|
|
72
|
-
} }, h("div", { key: '
|
|
72
|
+
} }, h("div", { key: 'df93af61bfd856db3a572cdb98f60a8dd5c5bb7d', class: "zonos--backdrop" }), h("div", { key: 'f306feb4858dff642fbfd731e5aad849a8f29941', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'b914ea2e54fb2af825008ae28e235c461dce67e9', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: '19219c0c8d167bbacec992ba10b1fe0f31a8b8f6', class: classes([
|
|
73
73
|
'zonos--body',
|
|
74
74
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
75
|
-
]) }, h("slot", { key: '
|
|
75
|
+
]) }, h("slot", { key: '38f9b83418dacd47cc2395f253a32ff0a6723d54' })), this.footerRightAction && (h("div", { class: "zonos--footer" }, h("div", { class: "zonos--footer-right-action" }, this.footerRightAction)))))));
|
|
76
76
|
}
|
|
77
77
|
static get assetsDirs() { return ["assets"]; }
|
|
78
78
|
static get style() { return ZonosDialogStyle0; }
|
|
@@ -36,9 +36,9 @@ const ZonosHelloDialogFooter = /*@__PURE__*/ proxyCustomElement(class ZonosHello
|
|
|
36
36
|
const primaryColor = (_a = this.appearanceSettings) === null || _a === void 0 ? void 0 : _a.colorPrimary;
|
|
37
37
|
const footerTheme = primaryColor && isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
|
|
38
38
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: 'f97688788d9f6d1a640f054a2a22dbae6955b83c', class: "zonos--elements" }, h("div", { key: '3539323f9044acef3890fc072bdd981e2495fc18', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
|
|
40
40
|
'--primary-color': (_c = this.appearanceSettings) === null || _c === void 0 ? void 0 : _c.colorPrimary,
|
|
41
|
-
} }, h("a", { key: '
|
|
41
|
+
} }, h("a", { key: '5e30052240f87211c6f0092ef6a27c217f3ecefb', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'c60142bcd26086c2944ac3464885ca1f96e5cfbe', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), h("div", { key: '67297b4c557ee5b49a4406a459588f2924183195', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '9348bff826187730f36d191f7e01f516f2b9785c', buttonColor: "gray-1200", icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'ecf1a8639e8e92a07a0e774abb560de53c19587c', buttonColor: "gray-1200", icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
42
42
|
}
|
|
43
43
|
static get style() { return ZonosHelloDialogFooterStyle0; }
|
|
44
44
|
}, [1, "zonos-hello-dialog-footer", {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { G as currencyFormat, b as localizationStore, t as translate } from './stripe.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
|
+
import { f as formatStringWithLinks, d as defineCustomElement$8 } from './zonos-custom-message2.js';
|
|
5
6
|
import { d as defineCustomElement$d } from './zonos-banner2.js';
|
|
6
7
|
import { d as defineCustomElement$c } from './zonos-button2.js';
|
|
7
8
|
import { d as defineCustomElement$b } from './zonos-card2.js';
|
|
8
9
|
import { d as defineCustomElement$a } from './zonos-country-flag2.js';
|
|
9
10
|
import { d as defineCustomElement$9 } from './zonos-country-select2.js';
|
|
10
|
-
import { d as defineCustomElement$8 } from './zonos-custom-message2.js';
|
|
11
11
|
import { d as defineCustomElement$7 } from './zonos-hello-dialog-footer2.js';
|
|
12
12
|
import { d as defineCustomElement$6 } from './zonos-icon2.js';
|
|
13
13
|
import { d as defineCustomElement$5 } from './zonos-language-select2.js';
|
|
@@ -131,18 +131,19 @@ const ZonosHelloDialog = /*@__PURE__*/ proxyCustomElement(class ZonosHelloDialog
|
|
|
131
131
|
const animateFromBottom = this.dialogRef && getHasMoreSpaceAbove(this.dialogRef);
|
|
132
132
|
const { customMessages } = localizationStore;
|
|
133
133
|
const welcomeMessage = `${translate('Welcome to')} ${zonosStore.organizationName}!`;
|
|
134
|
-
const
|
|
134
|
+
const defaultMessageStr = ((_a = customMessages.find(x => x.pageName === 'hello_default')) === null || _a === void 0 ? void 0 : _a.message) ||
|
|
135
135
|
translate('Know about duties and taxes before you buy. Shop with confidence!');
|
|
136
|
+
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
136
137
|
const currentPage = this.getCurrentPageEnum();
|
|
137
138
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
138
|
-
return (h(Host, { key: '
|
|
139
|
+
return (h(Host, { key: 'd5ac86955cf9f9a22e47fe2154dee6e10f6a9361', class: "zonos--elements" }, h("div", { key: 'd34dd3f937330cd5fdd2d7a11dc321c215983146', "aria-hidden": "true", class: classes([
|
|
139
140
|
'zonos--hello-dialog',
|
|
140
141
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
141
142
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
142
143
|
!!this.mobileLocationOverride &&
|
|
143
144
|
'zonos--hello-dialog-mobile-override',
|
|
144
145
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
145
|
-
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", null, h("div", { class: "zonos--hello-dialog-content" }, h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { textColor: "gray-800" }
|
|
146
|
+
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", null, h("div", { class: "zonos--hello-dialog-content" }, h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
|
|
146
147
|
var _a;
|
|
147
148
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
148
149
|
}), h("zonos-card", { spacing: "12px" }, h("zonos-v-stack", { spacing: 12 }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: BagIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", null, h("zonos-country-select", { handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", null, h("zonos-language-select", { handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore.js';
|
|
3
|
-
import {
|
|
3
|
+
import { u as handleFetch, l as logError, b as localizationStore, z as isValidSelector, t as translate, B as getZCountryUrlParam, C as setZCountryUrlParam, d as log, D as currencyDisplay, E as currencyConvertAndFormat, F as currencyConvert, G as currencyFormat } from './stripe.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
5
|
import { g as getHasMoreSpaceOnRight, d as defineCustomElement$9 } from './zonos-hello-dialog2.js';
|
|
6
6
|
import { d as defineCustomElement$f } from './zonos-banner2.js';
|
|
@@ -568,7 +568,6 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
568
568
|
this.reloadHelloData = async () => {
|
|
569
569
|
await this.handleItemRestrictions();
|
|
570
570
|
this.triggerShowPeekMessage();
|
|
571
|
-
void this.displayCurrency();
|
|
572
571
|
};
|
|
573
572
|
this.handleProductCountChange = debounce_1(() => {
|
|
574
573
|
const { productTitleElementSelector } = zonosStore.helloSettings;
|
|
@@ -591,6 +590,14 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
591
590
|
subtree: true,
|
|
592
591
|
});
|
|
593
592
|
};
|
|
593
|
+
this.watchPriceChange = () => {
|
|
594
|
+
const observer = new MutationObserver(() => void this.displayCurrency());
|
|
595
|
+
observer.observe(document.body, {
|
|
596
|
+
attributes: true,
|
|
597
|
+
childList: true,
|
|
598
|
+
subtree: true,
|
|
599
|
+
});
|
|
600
|
+
};
|
|
594
601
|
this.updateHelloOnPageChange = () => {
|
|
595
602
|
// If the product count changes on the same url (loading more products), update the peek message and item restrictions
|
|
596
603
|
this.watchProductCountChange();
|
|
@@ -662,6 +669,7 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
662
669
|
if (zonosStore.loadedConfig) {
|
|
663
670
|
this.helloRef.setAttribute('data-zonos-hello-loaded', '');
|
|
664
671
|
this.updateHelloOnPageChange();
|
|
672
|
+
this.watchPriceChange();
|
|
665
673
|
clearInterval(initInterval);
|
|
666
674
|
}
|
|
667
675
|
}, 100);
|
|
@@ -672,8 +680,7 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
672
680
|
*/
|
|
673
681
|
async displayCurrency() {
|
|
674
682
|
if (!localizationStore.exchangeRate) {
|
|
675
|
-
|
|
676
|
-
console.error('Could not display currency. Exchange rate and format data is not available.');
|
|
683
|
+
logError('Could not display currency. Exchange rate and format data is not available.');
|
|
677
684
|
return;
|
|
678
685
|
}
|
|
679
686
|
currencyDisplay();
|
|
@@ -683,21 +690,28 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
683
690
|
* @returns string
|
|
684
691
|
*/
|
|
685
692
|
async convertAndFormat(value) {
|
|
686
|
-
currencyConvertAndFormat(value);
|
|
693
|
+
return currencyConvertAndFormat(value);
|
|
687
694
|
}
|
|
688
695
|
/**
|
|
689
696
|
* This method will convert the currency and return the converted value
|
|
690
697
|
* @returns number
|
|
691
698
|
*/
|
|
692
699
|
async convert(value) {
|
|
693
|
-
currencyConvert(value);
|
|
700
|
+
return currencyConvert(value);
|
|
694
701
|
}
|
|
695
702
|
/**
|
|
696
703
|
* This method will format the currency and return the formatted string
|
|
697
704
|
* @returns number
|
|
698
705
|
*/
|
|
699
706
|
async format(value) {
|
|
700
|
-
currencyFormat(value);
|
|
707
|
+
return currencyFormat(value);
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* This method show the hello dialog
|
|
711
|
+
* @returns void
|
|
712
|
+
*/
|
|
713
|
+
async openHelloDialog(value) {
|
|
714
|
+
this.changeShowDialog(value);
|
|
701
715
|
}
|
|
702
716
|
handleResize() {
|
|
703
717
|
debounce_1(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
|
|
@@ -734,7 +748,7 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
734
748
|
!!this.allRestrictedItems.length &&
|
|
735
749
|
'zonos--hello-has-restrictions',
|
|
736
750
|
]), onClick: () => {
|
|
737
|
-
this.changeShowDialog(!this.showDialog);
|
|
751
|
+
void this.changeShowDialog(!this.showDialog);
|
|
738
752
|
}, onMouseEnter: () => this.enableShowPeekMessage(), onMouseLeave: () => (this.showPeekMessage = false), ref: el => el && (this.helloRef = el) }, h("zonos-text", { class: "zonos--hello-message" }, this.peekMessage), selectedCountryCode && (h("div", { class: "zonos--hello-country-flag-wrapper" }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode })))), h("div", { class: classes([
|
|
739
753
|
'zonos--hello-dialog-wrapper',
|
|
740
754
|
this.mobileLocationOverride &&
|
|
@@ -757,7 +771,8 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
757
771
|
"displayCurrency": [64],
|
|
758
772
|
"convertAndFormat": [64],
|
|
759
773
|
"convert": [64],
|
|
760
|
-
"format": [64]
|
|
774
|
+
"format": [64],
|
|
775
|
+
"openHelloDialog": [64]
|
|
761
776
|
}, [[9, "resize", "handleResize"]]]);
|
|
762
777
|
function defineCustomElement$1() {
|
|
763
778
|
if (typeof customElements === "undefined") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { w as localizationStoreUpdateSelectedLocale, t as translate, b as localizationStore } from './stripe.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore.js';
|
|
4
4
|
import { l as languages } from './ILanguage.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './zonos-button2.js';
|
|
@@ -32,9 +32,9 @@ const ZonosLanguageSelect = /*@__PURE__*/ proxyCustomElement(class ZonosLanguage
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
const { selectedLocale } = localizationStore;
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'd12676d6438941bb8d987826f68c1b72a7e02ccd', class: "zonos--elements", style: {
|
|
36
36
|
'--font-family': zonosStoreFontFamily(),
|
|
37
|
-
} }, h("div", { key: '
|
|
37
|
+
} }, h("div", { key: '259eaa6a8ae682cc96c98eaaab574757285188b9', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '88bff024a5f678b00bf4edd7b2497177a986af4c', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'be1d87991dec9ac2a3b530a0cf9129b9e191781b', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
38
38
|
}
|
|
39
39
|
static get style() { return ZonosLanguageSelectStyle0; }
|
|
40
40
|
}, [1, "zonos-language-select", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as stripeStore, a as stripeStorePrefetchLandedCost } from './stripe.js';
|
|
2
|
+
import { s as stripeStore, l as logError, a as stripeStorePrefetchLandedCost } from './stripe.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
4
4
|
|
|
5
5
|
const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";
|
|
@@ -21,8 +21,7 @@ const ZonosLinkAuthentication = /*@__PURE__*/ proxyCustomElement(class ZonosLink
|
|
|
21
21
|
stripeStore.stripeElements.create('linkAuthentication');
|
|
22
22
|
const linkAuthenticationElementContainer = this.el.querySelector('.zonos--link-authentication-component');
|
|
23
23
|
if (!linkAuthenticationElementContainer) {
|
|
24
|
-
|
|
25
|
-
console.error('Cannot find container element for linkAuthenticationElement');
|
|
24
|
+
logError('Cannot find container element for linkAuthenticationElement');
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
28
27
|
linkAuthenticationElement.mount(linkAuthenticationElementContainer);
|
|
@@ -39,7 +38,7 @@ const ZonosLinkAuthentication = /*@__PURE__*/ proxyCustomElement(class ZonosLink
|
|
|
39
38
|
}
|
|
40
39
|
render() {
|
|
41
40
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
42
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '671681b3ca3e95ab25a70cb44e84db7e2b3903e8', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '8d20c795500e3ce27b92cdeb0446908e550f9f13', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'b8374d7d7a4844b4c2cf6363b8d2d225bb52b21d', class: "zonos--link-authentication-component" })));
|
|
43
42
|
}
|
|
44
43
|
get el() { return this; }
|
|
45
44
|
static get watchers() { return {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ZonosLink extends Components.ZonosLink, HTMLElement {}
|
|
4
|
+
export const ZonosLink: {
|
|
5
|
+
prototype: ZonosLink;
|
|
6
|
+
new (): ZonosLink;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
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)}";
|
|
4
|
+
const ZonosLinkStyle0 = zonosLinkCss;
|
|
5
|
+
|
|
6
|
+
const ZonosLink$1 = /*@__PURE__*/ proxyCustomElement(class ZonosLink extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.href = '';
|
|
12
|
+
this.rel = undefined;
|
|
13
|
+
this.target = undefined;
|
|
14
|
+
this.linkTitle = undefined;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (h(Host, { key: '99bf9ff46cf84f424739b76d3da8a8c770c0a88f', class: "zonos--elements" }, h("a", { key: 'bd3553a33f27b4815a7b0573a34862093242b456', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: 'ad80829c1ca5cd9b0e2dd62542025eeecf436196' }))));
|
|
18
|
+
}
|
|
19
|
+
static get style() { return ZonosLinkStyle0; }
|
|
20
|
+
}, [1, "zonos-link", {
|
|
21
|
+
"href": [1],
|
|
22
|
+
"rel": [1],
|
|
23
|
+
"target": [1],
|
|
24
|
+
"linkTitle": [1, "link-title"]
|
|
25
|
+
}]);
|
|
26
|
+
function defineCustomElement$1() {
|
|
27
|
+
if (typeof customElements === "undefined") {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const components = ["zonos-link"];
|
|
31
|
+
components.forEach(tagName => { switch (tagName) {
|
|
32
|
+
case "zonos-link":
|
|
33
|
+
if (!customElements.get(tagName)) {
|
|
34
|
+
customElements.define(tagName, ZonosLink$1);
|
|
35
|
+
}
|
|
36
|
+
break;
|
|
37
|
+
} });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const ZonosLink = ZonosLink$1;
|
|
41
|
+
const defineCustomElement = defineCustomElement$1;
|
|
42
|
+
|
|
43
|
+
export { ZonosLink, defineCustomElement };
|
|
@@ -17,11 +17,11 @@ const ZonosLogo$1 = /*@__PURE__*/ proxyCustomElement(class ZonosLogo extends HTM
|
|
|
17
17
|
const filterColor = this.theme === 'DARK'
|
|
18
18
|
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
19
19
|
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'b93db6ec62ecaacb3ded0ab07dd2f38ed488f8d1', class: classes(['zonos--elements zonos--logo']), style: {
|
|
21
21
|
'--filter-color': filterColor,
|
|
22
22
|
'--font-family': zonosStoreFontFamily(),
|
|
23
23
|
'--width': this.width,
|
|
24
|
-
} }, h("img", { key: '
|
|
24
|
+
} }, h("img", { key: '026162477b24250e4204318fa3018b1cfd383ab5', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
|
|
25
25
|
}
|
|
26
26
|
static get assetsDirs() { return ["assets"]; }
|
|
27
27
|
static get style() { return ZonosLogoStyle0; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as stripeStore } from './stripe.js';
|
|
2
|
+
import { s as stripeStore, l as logError } from './stripe.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
4
4
|
|
|
5
5
|
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)}";
|
|
@@ -24,8 +24,7 @@ const ZonosPayment = /*@__PURE__*/ proxyCustomElement(class ZonosPayment extends
|
|
|
24
24
|
});
|
|
25
25
|
const paymentElementContainer = this.el.querySelector('.zonos--payment-component');
|
|
26
26
|
if (!paymentElementContainer) {
|
|
27
|
-
|
|
28
|
-
console.error('Cannot find container element for paymentElement');
|
|
27
|
+
logError('Cannot find container element for paymentElement');
|
|
29
28
|
return;
|
|
30
29
|
}
|
|
31
30
|
paymentElement.mount(paymentElementContainer);
|
|
@@ -40,7 +39,7 @@ const ZonosPayment = /*@__PURE__*/ proxyCustomElement(class ZonosPayment extends
|
|
|
40
39
|
}
|
|
41
40
|
render() {
|
|
42
41
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
43
|
-
return (h(Host, { key: '
|
|
42
|
+
return (h(Host, { key: 'e10a4ce1a9ecf05ad8efaceeb861284a92e475d2', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: 'a1b52de6a2cec2f707e00c39ebcd7752ad191af6', class: "zonos--payment-component" })));
|
|
44
43
|
}
|
|
45
44
|
get el() { return this; }
|
|
46
45
|
static get watchers() { return {
|
|
@@ -35,7 +35,6 @@ const ZonosReview = /*@__PURE__*/ proxyCustomElement(class ZonosReview extends H
|
|
|
35
35
|
? 'boldSubheader'
|
|
36
36
|
: 'secondaryPageHeader';
|
|
37
37
|
const titleTextColor = this.isMobile ? 'gray-1200' : 'gray-800';
|
|
38
|
-
const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;
|
|
39
38
|
const renderCollapseIcon = () => {
|
|
40
39
|
// only display the collapse icon if the component is being rendered with mobile styles
|
|
41
40
|
if (!this.isMobile) {
|
|
@@ -50,11 +49,7 @@ const ZonosReview = /*@__PURE__*/ proxyCustomElement(class ZonosReview extends H
|
|
|
50
49
|
'zonos--review zonos--elements',
|
|
51
50
|
this.isMobile && 'mobile',
|
|
52
51
|
]) }, 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({
|
|
53
|
-
amount:
|
|
54
|
-
// show total without taxes when step is shipping, show total with taxes when step is payment
|
|
55
|
-
cartStore.step === 'shipping'
|
|
56
|
-
? totalWithoutTaxes
|
|
57
|
-
: cartStore.total,
|
|
52
|
+
amount: cartStore.total,
|
|
58
53
|
currency: cartStore.currency,
|
|
59
54
|
})))));
|
|
60
55
|
}
|
|
@@ -20,9 +20,9 @@ const ZonosSelectDialogHeader = /*@__PURE__*/ proxyCustomElement(class ZonosSele
|
|
|
20
20
|
this.label = '';
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: 'd0882c22934d6f9635bd0b31af5703283cd0a1be', class: "zonos--elements", style: {
|
|
24
24
|
'--font-family': zonosStoreFontFamily(),
|
|
25
|
-
} }, h("zonos-v-stack", { key: '
|
|
25
|
+
} }, h("zonos-v-stack", { key: '2e227c5bdeeeb0fa772847267007df5aea2e0824', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: 'c43b72c938069ff1a99a985b3b388a785f94d100', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'b1008e43ca022ca1e1b63a60ab5c347d1228396e', type: "boldLabel" }, this.label), h("zonos-button", { key: '4722586c58eac765ded4a7baeeca8eb58d44dd0a', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: '36babf745ea5de00c82823520134b1dfcfc9d16d' }))));
|
|
26
26
|
}
|
|
27
27
|
static get style() { return ZonosSelectDialogHeaderStyle0; }
|
|
28
28
|
}, [1, "zonos-select-dialog-header", {
|
|
@@ -43,7 +43,7 @@ const ZonosShippingRichRadio = /*@__PURE__*/ proxyCustomElement(class ZonosShipp
|
|
|
43
43
|
return (h("div", { "aria-hidden": "true", class: classes([
|
|
44
44
|
'zonos--shipping-rich-radio-item',
|
|
45
45
|
selected && 'selected',
|
|
46
|
-
]), onClick: () => this.handleRichRadioSelect(item) }, h("input", { checked: selected, class: "zonos--shipping-rich-radio-input", name: "zonos--shipping-rich-radio", type: "radio", value: item.value }), h("div", { class: "zonos--shipping-info" }, h("div", { class: "zonos--shipping-detail" }, h("zonos-text", { class: "zonos--shipping-label", type: "label" }, item.label), (item.sublabel || item.caption) && (h("div", { class: "zonos--sub-detail" }, item.sublabel && (h("zonos-text", { textColor: "gray-800" }, item.sublabel)), item.caption && (h("zonos-text", { textColor: "gray-
|
|
46
|
+
]), onClick: () => this.handleRichRadioSelect(item) }, h("input", { checked: selected, class: "zonos--shipping-rich-radio-input", name: "zonos--shipping-rich-radio", type: "radio", value: item.value }), h("div", { class: "zonos--shipping-info" }, h("div", { class: "zonos--shipping-detail" }, h("zonos-text", { class: "zonos--shipping-label", type: "label" }, item.label), (item.sublabel || item.caption) && (h("div", { class: "zonos--sub-detail" }, item.sublabel && (h("zonos-text", { textColor: "gray-800" }, item.sublabel)), item.caption && (h("zonos-text", { textColor: "gray-600" }, item.caption))))), h("zonos-text", { type: "semiBoldLabel" }, item.price))));
|
|
47
47
|
})));
|
|
48
48
|
}
|
|
49
49
|
static get style() { return ZonosShippingRichRadioStyle0; }
|