@zonos/elements 1.3.11-alpha.1 → 1.3.11-alpha.3
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-d9e9ecfc.js → cart-fcddc0e6.js} +71 -8
- package/dist/cjs/{getBorderRadius-9d619bf6.js → getBorderRadius-4fa738c3.js} +1 -1
- package/dist/cjs/{getContrastColor-af2386af.js → getContrastColor-c72796c6.js} +1 -1
- package/dist/cjs/{isDarkColor-a68274cf.js → isDarkColor-7faf0a82.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-b7ef5d5b.js → submitGtag-ec6ead54.js} +15 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +12 -9
- package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +19 -21
- package/dist/cjs/zonos-checkout.cjs.entry.js +238 -13
- package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +16 -4
- package/dist/cjs/zonos-icon.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- 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-21334303.js → zonosStore-bd2a0c59.js} +19 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +91 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- package/dist/collection/components/common/zonos-button/zonos-button.js +1 -1
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +5 -5
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +1 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +5 -4
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +5 -5
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +7 -7
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +17 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -5
- package/dist/collection/components/store/checkout/stripe.js +8 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- package/dist/collection/components/store/zonosStore.js +19 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +5 -2
- package/dist/collection/components/utils/api/buildCartItemsByTempCart.js +24 -0
- package/dist/collection/components/utils/api/tempCartItem/getAttributes.js +66 -0
- package/dist/collection/components/utils/api/tempCartItem/getMeasurements.js +58 -0
- package/dist/collection/components/utils/api/trackConversionEvent.js +2 -0
- package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -0
- package/dist/collection/components/utils/createCustomEvent.js +9 -0
- package/dist/collection/scripts/zonosBase.js +1 -0
- package/dist/collection/styles/stripe/addressRuleStyle.js +0 -3
- package/dist/collection/types/checkout/api/TempCart.js +1 -0
- package/dist/collection/types/generated/graphql.customer.types.js +73 -0
- package/dist/components/stripe.js +68 -5
- package/dist/components/trackConversionEvent.js +2 -0
- package/dist/components/zonos-address2.js +5 -2
- package/dist/components/zonos-button2.js +1 -1
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +14 -6
- package/dist/components/zonos-checkout-progress-tabs2.js +6 -6
- package/dist/components/zonos-checkout.js +238 -11
- package/dist/components/zonos-dialog2.js +3 -3
- package/dist/components/zonos-hello-dialog2.js +1 -1
- package/dist/components/zonos-hello.js +16 -2
- package/dist/components/zonos-review2.js +1 -1
- package/dist/components/zonos-shipping-rich-radio2.js +1 -1
- package/dist/components/zonos-shipping2.js +1 -1
- package/dist/components/zonosStore.js +19 -2
- package/dist/esm/{cart-6cfd7560.js → cart-228e1ef7.js} +71 -8
- package/dist/esm/{getBorderRadius-c5fb7746.js → getBorderRadius-a89e45fb.js} +1 -1
- package/dist/esm/{getContrastColor-a1a6f6aa.js → getContrastColor-5fbc4746.js} +1 -1
- package/dist/esm/{isDarkColor-810fcaa5.js → isDarkColor-6bf71e51.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-acca574d.js → submitGtag-c3727595.js} +15 -3
- package/dist/esm/zonos-address_4.entry.js +12 -9
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_2.entry.js +5 -5
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_10.entry.js +19 -21
- package/dist/esm/zonos-checkout.entry.js +238 -13
- package/dist/esm/zonos-controller.entry.js +4 -4
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +4 -4
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +16 -4
- package/dist/esm/zonos-icon.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +4 -4
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-e5f3d4da.js → zonosStore-c4c45591.js} +19 -2
- package/dist/esm-es5/cart-228e1ef7.js +1 -0
- package/dist/esm-es5/{getBorderRadius-c5fb7746.js → getBorderRadius-a89e45fb.js} +1 -1
- package/dist/esm-es5/getContrastColor-5fbc4746.js +1 -0
- package/dist/esm-es5/{isDarkColor-810fcaa5.js → isDarkColor-6bf71e51.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-c3727595.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_2.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.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-icon.entry.js +1 -1
- 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-e5f3d4da.js → zonosStore-c4c45591.js} +1 -1
- package/dist/scripts/getTempCartById.js +1 -0
- package/dist/scripts/loadZonos.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 +7 -0
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -1
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +1 -1
- package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +1 -1
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +2 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +2 -1
- package/dist/types/components/store/checkout/cart.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/store/zonosStore.d.ts +11 -2
- package/dist/types/components/utils/api/buildCartItemsByTempCart.d.ts +7 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/tempCartItem/getAttributes.d.ts +11 -0
- package/dist/types/components/utils/api/tempCartItem/getMeasurements.d.ts +7 -0
- package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
- package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
- package/dist/types/components/utils/createCustomEvent.d.ts +12 -0
- package/dist/types/components/utils/getBorderRadius.d.ts +1 -1
- package/dist/types/components/utils/handleFetch.d.ts +2 -1
- package/dist/types/components.d.ts +2 -4
- package/dist/types/scripts/zonosBase.d.ts +10 -1
- package/dist/types/styles/stripe/addressRuleStyle.d.ts +2 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +6 -1
- package/dist/types/types/checkout/api/TempCart.d.ts +80 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +97 -0
- package/dist/types/types/generated/graphql.customer.types.ts +135 -1
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/global.d.ts +10 -0
- package/dist/types/types/utils/deep/IDeepKeyofAtIndex.d.ts +1 -1
- package/dist/zonos-elements/{p-7e00a5dc.system.entry.js → p-001518eb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0082c5be.system.entry.js +1 -0
- package/dist/zonos-elements/p-07022f11.js +1 -0
- package/dist/zonos-elements/{p-ff17c03b.entry.js → p-11f1b5fb.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b51de7b.system.entry.js → p-145dd34a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-65a877e2.entry.js → p-14a2824f.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8b03017.system.entry.js → p-15cd4a76.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4862aab.system.entry.js → p-160cdf4e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1ee44c6.system.js → p-167b3369.system.js} +1 -1
- package/dist/zonos-elements/{p-59595553.entry.js → p-171eb334.entry.js} +1 -1
- package/dist/zonos-elements/{p-e74f27da.js → p-1bbdfae5.js} +1 -1
- package/dist/zonos-elements/{p-22db99c9.system.entry.js → p-1d833f22.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b9cde0c3.entry.js → p-215cd7ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a80f7f5.entry.js → p-223d72d8.entry.js} +1 -1
- package/dist/zonos-elements/{p-817e7f8e.entry.js → p-30cd191f.entry.js} +1 -1
- package/dist/zonos-elements/{p-824b8708.system.entry.js → p-35c328ba.system.entry.js} +1 -1
- package/dist/zonos-elements/p-397d8268.entry.js +1 -0
- package/dist/zonos-elements/{p-6db032ee.system.js → p-41c2b1c5.system.js} +1 -1
- package/dist/zonos-elements/{p-6dc606c6.entry.js → p-4515ec7b.entry.js} +1 -1
- package/dist/zonos-elements/{p-ac7155d7.entry.js → p-470284a3.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd8c50e8.system.entry.js → p-499d7f5d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b76909ab.entry.js → p-4c9367f1.entry.js} +1 -1
- package/dist/zonos-elements/{p-9a2c3874.system.entry.js → p-4d7b27af.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-60ac5342.system.entry.js → p-55940b5a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a641dfcd.entry.js → p-5d5c0fbf.entry.js} +1 -1
- package/dist/zonos-elements/{p-fac20c60.system.entry.js → p-5f6f0581.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6484bf31.system.js +1 -0
- package/dist/zonos-elements/{p-b2c48954.system.entry.js → p-67ff446b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-212992ec.system.entry.js → p-6c5c5377.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6e81adba.system.js +1 -1
- package/dist/zonos-elements/{p-ff962844.entry.js → p-72c6bf0f.entry.js} +1 -1
- package/dist/zonos-elements/p-7575a42a.js +1 -0
- package/dist/zonos-elements/p-770e5b9e.js +1 -0
- package/dist/zonos-elements/{p-a398bc59.system.entry.js → p-7ff3a533.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0f414d6a.system.js → p-86034f1e.system.js} +1 -1
- package/dist/zonos-elements/{p-6daa64bf.entry.js → p-925ae524.entry.js} +1 -1
- package/dist/zonos-elements/p-93dafeea.system.entry.js +1 -0
- package/dist/zonos-elements/{p-ed4d8d71.system.js → p-94bbf247.system.js} +1 -1
- package/dist/zonos-elements/p-960e4021.system.js +1 -0
- package/dist/zonos-elements/{p-a1a477c9.js → p-9a90fb56.js} +1 -1
- package/dist/zonos-elements/{p-d96f8d89.system.entry.js → p-a144d26a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ac5aecca.entry.js +1 -0
- package/dist/zonos-elements/p-c815e8b4.system.entry.js +1 -0
- package/dist/zonos-elements/p-d11b2449.js +1 -0
- package/dist/zonos-elements/{p-26aee7a0.entry.js → p-d31e5fcc.entry.js} +1 -1
- package/dist/zonos-elements/p-db1adc42.entry.js +1 -0
- package/dist/zonos-elements/{p-b0e9226a.entry.js → p-e3de496a.entry.js} +1 -1
- package/dist/zonos-elements/p-e5b5cbfd.system.entry.js +1 -0
- package/dist/zonos-elements/{p-51c32b3d.entry.js → p-f1037168.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d5a6a7f.system.entry.js → p-f42bffad.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fe8de89b.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-6cfd7560.js +0 -1
- package/dist/esm-es5/getContrastColor-a1a6f6aa.js +0 -1
- package/dist/esm-es5/submitGtag-acca574d.js +0 -1
- package/dist/zonos-elements/p-0dfd549e.system.entry.js +0 -1
- package/dist/zonos-elements/p-0f8acb62.js +0 -1
- package/dist/zonos-elements/p-2fdec8bc.system.entry.js +0 -1
- package/dist/zonos-elements/p-352ba771.system.js +0 -1
- package/dist/zonos-elements/p-4051a42d.js +0 -1
- package/dist/zonos-elements/p-5162f4cc.system.entry.js +0 -1
- package/dist/zonos-elements/p-55b8b98b.js +0 -1
- package/dist/zonos-elements/p-5a40684c.entry.js +0 -1
- package/dist/zonos-elements/p-61e08de7.system.entry.js +0 -1
- package/dist/zonos-elements/p-66cc1554.system.js +0 -1
- package/dist/zonos-elements/p-a7bfe188.entry.js +0 -1
- package/dist/zonos-elements/p-c6e44a9b.entry.js +0 -1
- package/dist/zonos-elements/p-cde25873.js +0 -1
- package/dist/zonos-elements/p-e2131057.entry.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { f as cartStore, t as translate, r as handleFetch, q as stripeStoreReset, j as stripeStore, C as stripeStoreRetrievePayment, l as localizationStore, D as cartStoreUpdateSelectedShippingOption, E as cartStoreGetShippingTransitInfo } from './cart-
|
|
3
|
-
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-
|
|
4
|
-
import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag } from './submitGtag-
|
|
5
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
2
|
+
import { f as cartStore, t as translate, r as handleFetch, q as stripeStoreReset, j as stripeStore, C as stripeStoreRetrievePayment, l as localizationStore, D as cartStoreUpdateSelectedShippingOption, E as cartStoreGetShippingTransitInfo } from './cart-228e1ef7.js';
|
|
3
|
+
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
|
+
import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag, c as createCustomEvent } from './submitGtag-c3727595.js';
|
|
5
|
+
import { g as getBorderRadius } from './getBorderRadius-a89e45fb.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
7
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
8
8
|
import { l as languages } from './ILanguage-97790bee.js';
|
|
9
|
-
import { g as getContrastColor } from './getContrastColor-
|
|
9
|
+
import { g as getContrastColor } from './getContrastColor-5fbc4746.js';
|
|
10
10
|
import { i as isColorVariable } from './isColorVariable-fbf2d80d.js';
|
|
11
|
-
import './isDarkColor-
|
|
11
|
+
import './isDarkColor-6bf71e51.js';
|
|
12
12
|
|
|
13
13
|
const formatCurrency = ({ amount, currency, showCurrencyText, }) => showCurrencyText
|
|
14
14
|
? `${new Intl.NumberFormat('en-US', {
|
|
@@ -188,10 +188,8 @@ const ZonosCheckoutFinish = class {
|
|
|
188
188
|
void trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
189
189
|
paymentMethod,
|
|
190
190
|
});
|
|
191
|
-
const successEvent =
|
|
192
|
-
|
|
193
|
-
message: 'Zonos Checkout successfully processed order',
|
|
194
|
-
},
|
|
191
|
+
const successEvent = createCustomEvent('zonos-checkout-success', {
|
|
192
|
+
message: 'Zonos Checkout successfully processed order',
|
|
195
193
|
});
|
|
196
194
|
document.dispatchEvent(successEvent);
|
|
197
195
|
}
|
|
@@ -241,7 +239,7 @@ const ZonosCheckoutFinish = class {
|
|
|
241
239
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
242
240
|
// return acc + item.quantity;
|
|
243
241
|
// }, 0);
|
|
244
|
-
return (h(Host, { key: '
|
|
242
|
+
return (h(Host, { key: '8c2087b3a0578cbbd7979fff5e6b696a4325e548', class: "zonos--checkout-finish zonos--elements", style: {
|
|
245
243
|
'--border-radius': getBorderRadius(this.borderRadius),
|
|
246
244
|
} }, this.isLoading && (h("div", { class: "loading-wrapper" }, h("zonos-spinner", null))), !this.isLoading && (h(Fragment, null, h("div", { class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon$1, iconColor: 'red-800', size: 50 })), h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", null, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Keep shopping')))))));
|
|
247
245
|
}
|
|
@@ -352,7 +350,7 @@ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none
|
|
|
352
350
|
</svg>
|
|
353
351
|
`;
|
|
354
352
|
|
|
355
|
-
const zonosCheckoutProgressTabsCss = ":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{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
353
|
+
const zonosCheckoutProgressTabsCss = ":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{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
356
354
|
const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
|
|
357
355
|
|
|
358
356
|
const ZonosCheckoutProgressTabs = class {
|
|
@@ -412,17 +410,17 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
412
410
|
color: labelSelectedColor,
|
|
413
411
|
})
|
|
414
412
|
: labelSelectedColor;
|
|
415
|
-
return (h(Host, { key: '
|
|
413
|
+
return (h(Host, { key: 'e79dc4967096d3b6f0ac25d58f02e77f773c8e95', class: "zonos--elements", style: {
|
|
416
414
|
'--color': contrastLabelColor,
|
|
417
415
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
418
|
-
} }, h("div", { key: '
|
|
416
|
+
} }, h("div", { key: '20e500d31c28ee0705c1999e0f258b679af9d73a', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
419
417
|
const isSelected = tab.value === selectedStep;
|
|
420
418
|
return (h("button", { class: classes([
|
|
421
419
|
'zonos--tab-item',
|
|
422
420
|
tab.value === selectedStep && 'selected',
|
|
423
421
|
tab.isDone && 'done',
|
|
424
|
-
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, tab.label)));
|
|
425
|
-
})), h("div", { key: '
|
|
422
|
+
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, translate(tab.label))));
|
|
423
|
+
})), h("div", { key: '129502b873f339192ef5f4c67ac8c06d533ccfca', class: "zonos--tab-progress" }, h("div", { key: '728a074d6a411b400be30929bf9a5fdc8431745d', class: "zonos--progress-bar-fill" }))));
|
|
426
424
|
}
|
|
427
425
|
static get assetsDirs() { return ["assets"]; }
|
|
428
426
|
get ele() { return getElement(this); }
|
|
@@ -546,7 +544,7 @@ const ZonosDialog = class {
|
|
|
546
544
|
document.body.style.overflow = 'auto';
|
|
547
545
|
}
|
|
548
546
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
549
|
-
return (h(Host, { key: '
|
|
547
|
+
return (h(Host, { key: 'f0aee4766d2c62f3f4feff18c99dba62ea97ca06', class: classes([
|
|
550
548
|
'zonos--elements',
|
|
551
549
|
this.open && 'open',
|
|
552
550
|
this.isLoading && 'is-loading',
|
|
@@ -557,10 +555,10 @@ const ZonosDialog = class {
|
|
|
557
555
|
'--font-family': zonosStoreFontFamily(),
|
|
558
556
|
'--height': this.height || 'initial',
|
|
559
557
|
'--width': this.width,
|
|
560
|
-
} }, h("div", { key: '
|
|
558
|
+
} }, h("div", { key: '42e8afd7ddc94ab9ec4951f4221e32729256694e', class: "zonos--backdrop" }), h("div", { key: '035c21c65ae5cabc12b41b6ad1684fa4dbc5b92e', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'b9a3299c9fb920f9af5783506b0489122b2eae11', 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: 'f5e5a75782ca6acd4a2c004756b800f3c2558129', class: classes([
|
|
561
559
|
'zonos--body',
|
|
562
560
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
563
|
-
]) }, h("slot", { key: '
|
|
561
|
+
]) }, h("slot", { key: '3fe4ec47852e99f1dc5b6a7a84a8b918594b8b7f' })), h("slot", { key: '5515f4109274b178249c05c6e6c91fdc30ce528a', name: "dialog-footer" })))));
|
|
564
562
|
}
|
|
565
563
|
static get assetsDirs() { return ["assets"]; }
|
|
566
564
|
};
|
|
@@ -570,7 +568,7 @@ const ChevronDownIcon = `<svg color="var(--amino-gray-400)" fill="none" height="
|
|
|
570
568
|
|
|
571
569
|
const ChevronUpIcon = `<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
572
570
|
|
|
573
|
-
const zonosReviewCss = ":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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--amino-gray-0);z-index:1}:host .zonos--total-pay{margin:var(--amino-space-8) 0 var(--amino-space-
|
|
571
|
+
const zonosReviewCss = ":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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--amino-gray-0);z-index:1}:host .zonos--total-pay{margin:var(--amino-space-8) 0 var(--amino-space-24)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8);background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";
|
|
574
572
|
const ZonosReviewStyle0 = zonosReviewCss;
|
|
575
573
|
|
|
576
574
|
const ZonosReview = class {
|
|
@@ -700,7 +698,7 @@ const ZonosShipping = class {
|
|
|
700
698
|
}
|
|
701
699
|
render() {
|
|
702
700
|
var _a, _b;
|
|
703
|
-
return (h(Host, { key: 'ab881bdb575ac0177154ffa8a2d84d668151c46d', class: "zonos--shipping zonos--elements" }, h("div", { key: 'b8738e0fb5c32b329ae03ccd2cb2d1a178a05aa8', class: "zonos--group" }, h("zonos-text", { key: 'd942ab3f4e77631145a0a38dae95999454a92b56', class: "zonos--title", type: "semiBoldSubheader" }, translate('Shipping information')), h("zonos-text", { key: '6855f44cf3458891776b3c215417bec329de89dc', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) ? (h("zonos-banner", { bannerTitle:
|
|
701
|
+
return (h(Host, { key: 'ab881bdb575ac0177154ffa8a2d84d668151c46d', class: "zonos--shipping zonos--elements" }, h("div", { key: 'b8738e0fb5c32b329ae03ccd2cb2d1a178a05aa8', class: "zonos--group" }, h("zonos-text", { key: 'd942ab3f4e77631145a0a38dae95999454a92b56', class: "zonos--title", type: "semiBoldSubheader" }, translate('Shipping information')), h("zonos-text", { key: '6855f44cf3458891776b3c215417bec329de89dc', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) ? (h("zonos-banner", { bannerTitle: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), intent: "error" })) : (h("zonos-shipping-rich-radio", { initialSelectedValue: (_b = this.selectedShippingMethod) === null || _b === void 0 ? void 0 : _b.value, items: this.serviceLevels, onRadioSelected: e => this.handleRadioSelected(e) })), h("div", { key: 'f6398edeecd18c603680ad6c7c8e1aa5f5cebe4a', class: "zonos--group-btn" }, h("zonos-button", { key: 'a548fb385ed341308ff86e615d9088e7cd4ec34d', backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
704
702
|
// use primary type when on mobile mode
|
|
705
703
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
706
704
|
}
|
|
@@ -1,11 +1,160 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, H as Host } from './index-dd40cc85.js';
|
|
2
|
-
import { l as localizationStore, a as log, s as stripeStoreGetDomesticShippingSession, b as localizationStoreUpdateSelectedCountryCode, c as stripeStoreCleanupDomesticShippingSession, d as logError, e as stripeStoreSaveDomesticShippingSession, i as initStripeElements, f as cartStore, g as cartStoreUpdateItems, h as cartStoreReset, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreUpdateToErrorState, n as stripeStorePrefetchLandedCost, o as cartStoreNextStep, p as stripeStoreConfirmPayment, q as stripeStoreReset, t as translate } from './cart-
|
|
3
|
-
import { z as zonosStore, m as mergeConfig } from './zonosStore-
|
|
4
|
-
import { s as sendErrorLog, a as submitGtag, t as trackConversionEvent } from './submitGtag-
|
|
2
|
+
import { l as localizationStore, a as log, s as stripeStoreGetDomesticShippingSession, b as localizationStoreUpdateSelectedCountryCode, c as stripeStoreCleanupDomesticShippingSession, d as logError, e as stripeStoreSaveDomesticShippingSession, i as initStripeElements, f as cartStore, g as cartStoreUpdateItems, h as cartStoreReset, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreUpdateToErrorState, n as stripeStorePrefetchLandedCost, o as cartStoreNextStep, p as stripeStoreConfirmPayment, q as stripeStoreReset, t as translate } from './cart-228e1ef7.js';
|
|
3
|
+
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-c4c45591.js';
|
|
4
|
+
import { c as createCustomEvent, s as sendErrorLog, a as submitGtag, t as trackConversionEvent } from './submitGtag-c3727595.js';
|
|
5
5
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
8
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
7
|
+
import { g as getBorderRadius } from './getBorderRadius-a89e45fb.js';
|
|
8
|
+
import { i as isDarkColor } from './isDarkColor-6bf71e51.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This is just function to make the key typesafe to enter
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
const objAttribute = ({ key, value, }) => value
|
|
15
|
+
? {
|
|
16
|
+
key,
|
|
17
|
+
value,
|
|
18
|
+
}
|
|
19
|
+
: null;
|
|
20
|
+
/**
|
|
21
|
+
* Map legacy item attribute to dgs item attributes
|
|
22
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L412
|
|
23
|
+
*/
|
|
24
|
+
const getAttributes = (item) => {
|
|
25
|
+
return [
|
|
26
|
+
objAttribute({
|
|
27
|
+
key: 'brand',
|
|
28
|
+
value: item.itemBrand,
|
|
29
|
+
}),
|
|
30
|
+
objAttribute({
|
|
31
|
+
key: 'material',
|
|
32
|
+
value: item.itemMaterial,
|
|
33
|
+
}),
|
|
34
|
+
objAttribute({
|
|
35
|
+
key: 'category',
|
|
36
|
+
value: item.itemCategory,
|
|
37
|
+
}),
|
|
38
|
+
objAttribute({
|
|
39
|
+
key: 'color',
|
|
40
|
+
value: item.itemColor,
|
|
41
|
+
}),
|
|
42
|
+
objAttribute({
|
|
43
|
+
key: 'customization',
|
|
44
|
+
value: item.itemCustomization,
|
|
45
|
+
}),
|
|
46
|
+
objAttribute({
|
|
47
|
+
key: 'descriptionDetailed',
|
|
48
|
+
value: item.itemDescriptionDetailed,
|
|
49
|
+
}),
|
|
50
|
+
objAttribute({
|
|
51
|
+
key: 'fabricContent',
|
|
52
|
+
value: item.itemFabricContent,
|
|
53
|
+
}),
|
|
54
|
+
objAttribute({
|
|
55
|
+
key: 'ltlClass',
|
|
56
|
+
value: item.itemLtlClass,
|
|
57
|
+
}),
|
|
58
|
+
objAttribute({
|
|
59
|
+
key: 'pickingLocation',
|
|
60
|
+
value: item.itemPickingLocation,
|
|
61
|
+
}),
|
|
62
|
+
objAttribute({
|
|
63
|
+
key: 'shipFromLocation',
|
|
64
|
+
value: item.itemShipFromLocation,
|
|
65
|
+
}),
|
|
66
|
+
objAttribute({
|
|
67
|
+
key: 'size',
|
|
68
|
+
value: item.itemSize,
|
|
69
|
+
}),
|
|
70
|
+
objAttribute({
|
|
71
|
+
key: 'status',
|
|
72
|
+
value: item.status,
|
|
73
|
+
}),
|
|
74
|
+
].filter(Boolean);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Map legacy weight units with dgs
|
|
79
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L483
|
|
80
|
+
*/
|
|
81
|
+
const getItemWeightUnit = (weightUnit) => {
|
|
82
|
+
if (!weightUnit) {
|
|
83
|
+
return 'POUND';
|
|
84
|
+
}
|
|
85
|
+
switch (weightUnit.toUpperCase()) {
|
|
86
|
+
case 'KG':
|
|
87
|
+
return 'KILOGRAM';
|
|
88
|
+
case 'OZ':
|
|
89
|
+
return 'OUNCE';
|
|
90
|
+
case 'G':
|
|
91
|
+
return 'GRAM';
|
|
92
|
+
default:
|
|
93
|
+
return 'POUND';
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Mapping legacy measurement with dgs
|
|
98
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L441
|
|
99
|
+
*/
|
|
100
|
+
const getMeasurements = (item) => {
|
|
101
|
+
if (!item) {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
const measurements = [];
|
|
105
|
+
if (item.length) {
|
|
106
|
+
measurements.push({
|
|
107
|
+
type: 'LENGTH',
|
|
108
|
+
unitOfMeasure: 'INCH',
|
|
109
|
+
value: item.length,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (item.width) {
|
|
113
|
+
measurements.push({
|
|
114
|
+
type: 'WIDTH',
|
|
115
|
+
unitOfMeasure: 'INCH',
|
|
116
|
+
value: item.width,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
if (item.weight) {
|
|
120
|
+
measurements.push({
|
|
121
|
+
type: 'WEIGHT',
|
|
122
|
+
unitOfMeasure: getItemWeightUnit(item.weightUnits),
|
|
123
|
+
value: item.weight,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
if (item.height) {
|
|
127
|
+
measurements.push({
|
|
128
|
+
type: 'HEIGHT',
|
|
129
|
+
unitOfMeasure: 'INCH',
|
|
130
|
+
value: item.height,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return measurements;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Map the items from tempCart like how we do it in dgs
|
|
138
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L393
|
|
139
|
+
*/
|
|
140
|
+
const buildCartItemsByTempCart = (tempCartData) => {
|
|
141
|
+
var _a;
|
|
142
|
+
const tempCartItems = ((_a = tempCartData === null || tempCartData === void 0 ? void 0 : tempCartData.items) === null || _a === void 0 ? void 0 : _a.map(item => ({
|
|
143
|
+
amount: item.unitPrice || 0,
|
|
144
|
+
attributes: getAttributes(item),
|
|
145
|
+
countryOfOrigin: item.countryOfOrigin || undefined,
|
|
146
|
+
currencyCode: 'USD',
|
|
147
|
+
description: item.itemDescriptionLong || '',
|
|
148
|
+
imageUrl: item.imageURL || '',
|
|
149
|
+
itemType: 'PHYSICAL_GOOD',
|
|
150
|
+
measurements: getMeasurements(item),
|
|
151
|
+
name: item.description || '',
|
|
152
|
+
productId: item.productId || '',
|
|
153
|
+
quantity: item.quantity || 0,
|
|
154
|
+
sku: item.sku || '',
|
|
155
|
+
}))) || [];
|
|
156
|
+
return tempCartItems;
|
|
157
|
+
};
|
|
9
158
|
|
|
10
159
|
const isShippableCountry = (showLog = true) => {
|
|
11
160
|
if (!localizationStore.localizationLoaded) {
|
|
@@ -13,6 +162,7 @@ const isShippableCountry = (showLog = true) => {
|
|
|
13
162
|
}
|
|
14
163
|
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
15
164
|
if (!localizationStore.isShippableCountry) {
|
|
165
|
+
document.dispatchEvent(createCustomEvent('legacyCheckoutError', 'Unable to initiate checkout process in a country where shipping is not available'));
|
|
16
166
|
if (showLog) {
|
|
17
167
|
log(`Checkout: not shippable country`);
|
|
18
168
|
}
|
|
@@ -178,6 +328,8 @@ const ZonosCheckout = class {
|
|
|
178
328
|
this.zonosReviewRef = undefined;
|
|
179
329
|
this.storybookPaymentStatusOverride = undefined;
|
|
180
330
|
this.domesticRedirectedBtnSelector = '#zonos--domestic-redirected-checkout-button';
|
|
331
|
+
this.legacyCheckoutHiddenBtnSelector = '#legacy-checkout-hidden-button';
|
|
332
|
+
this.isLegacyCheckout = false;
|
|
181
333
|
}
|
|
182
334
|
/**
|
|
183
335
|
* Init cart info handler event
|
|
@@ -200,7 +352,12 @@ const ZonosCheckout = class {
|
|
|
200
352
|
cartStore.step = 'customer-info';
|
|
201
353
|
}
|
|
202
354
|
async buildCartAndInit() {
|
|
203
|
-
if
|
|
355
|
+
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
356
|
+
if (window.Zonos.tempCartData) {
|
|
357
|
+
const tempCartData = buildCartItemsByTempCart(window.Zonos.tempCartData);
|
|
358
|
+
await cartStoreUpdateItems(tempCartData);
|
|
359
|
+
}
|
|
360
|
+
else if (zonosStore.checkoutSettings.buildCartDetail) {
|
|
204
361
|
log('build cart detail');
|
|
205
362
|
const cartItems = await zonosStore.checkoutSettings.buildCartDetail();
|
|
206
363
|
await cartStoreUpdateItems(cartItems);
|
|
@@ -267,12 +424,18 @@ const ZonosCheckout = class {
|
|
|
267
424
|
button.setAttribute('data-zonos-checkout-attached', 'true');
|
|
268
425
|
// if this button is the hidden button, trigger the click event
|
|
269
426
|
if (button.matches(this.domesticRedirectedBtnSelector)) {
|
|
270
|
-
button.dispatchEvent(
|
|
427
|
+
button.dispatchEvent(createCustomEvent('click'));
|
|
271
428
|
// cleanup shipping session after button is clicked
|
|
272
429
|
stripeStoreCleanupDomesticShippingSession();
|
|
273
430
|
// remove the button after it's clicked
|
|
274
431
|
button.remove();
|
|
275
432
|
}
|
|
433
|
+
if (button.matches(this.legacyCheckoutHiddenBtnSelector)) {
|
|
434
|
+
this.isLegacyCheckout = true;
|
|
435
|
+
// trigger the click event on the button
|
|
436
|
+
button.dispatchEvent(createCustomEvent('click'));
|
|
437
|
+
button.remove();
|
|
438
|
+
}
|
|
276
439
|
});
|
|
277
440
|
}
|
|
278
441
|
appearanceSettingsOverrideChanged() {
|
|
@@ -282,6 +445,45 @@ const ZonosCheckout = class {
|
|
|
282
445
|
// apply theme to stripe elements
|
|
283
446
|
void this.applyStripeTheme();
|
|
284
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* Set default address from query param if it's valid
|
|
450
|
+
*/
|
|
451
|
+
useLegacyQueryParam() {
|
|
452
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
453
|
+
const legacyShippingInfo = {
|
|
454
|
+
country: urlParams.get('country'),
|
|
455
|
+
customerAddress1: urlParams.get('customerAddress1'),
|
|
456
|
+
customerAddress2: urlParams.get('customerAddress2'),
|
|
457
|
+
customerCity: urlParams.get('customerCity'),
|
|
458
|
+
customerEmail: urlParams.get('customerEmail'),
|
|
459
|
+
customerName: urlParams.get('customerName'),
|
|
460
|
+
customerPhone: urlParams.get('customerPhone'),
|
|
461
|
+
customerState: urlParams.get('customerState'),
|
|
462
|
+
customerZip: urlParams.get('customerZip'),
|
|
463
|
+
};
|
|
464
|
+
// if one of the value is null, no need to preset the default address
|
|
465
|
+
if (!legacyShippingInfo.customerAddress1 ||
|
|
466
|
+
!legacyShippingInfo.customerCity ||
|
|
467
|
+
!legacyShippingInfo.customerName ||
|
|
468
|
+
!legacyShippingInfo.customerPhone ||
|
|
469
|
+
!legacyShippingInfo.customerState ||
|
|
470
|
+
!legacyShippingInfo.customerZip ||
|
|
471
|
+
!legacyShippingInfo.country) {
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
this.defaultAddress = {
|
|
475
|
+
address: {
|
|
476
|
+
city: legacyShippingInfo.customerCity,
|
|
477
|
+
country: legacyShippingInfo.country,
|
|
478
|
+
line1: legacyShippingInfo.customerAddress1,
|
|
479
|
+
line2: legacyShippingInfo.customerAddress2 || '',
|
|
480
|
+
postal_code: legacyShippingInfo.customerZip,
|
|
481
|
+
state: legacyShippingInfo.customerState,
|
|
482
|
+
},
|
|
483
|
+
name: legacyShippingInfo.customerName,
|
|
484
|
+
phone: legacyShippingInfo.customerPhone,
|
|
485
|
+
};
|
|
486
|
+
}
|
|
285
487
|
/**
|
|
286
488
|
* Setup all of the event listeners for the component on first load
|
|
287
489
|
*/
|
|
@@ -307,6 +509,12 @@ const ZonosCheckout = class {
|
|
|
307
509
|
};
|
|
308
510
|
},
|
|
309
511
|
});
|
|
512
|
+
/**
|
|
513
|
+
* When temp cart data is available, set default address if exist
|
|
514
|
+
*/
|
|
515
|
+
if (window.Zonos.tempCartData) {
|
|
516
|
+
this.useLegacyQueryParam();
|
|
517
|
+
}
|
|
310
518
|
const hideInternationalOrderInterval = setInterval(() => {
|
|
311
519
|
const internationalSelector = window.Zonos.internationalHideSelector;
|
|
312
520
|
if (!internationalSelector) {
|
|
@@ -425,6 +633,12 @@ const ZonosCheckout = class {
|
|
|
425
633
|
}
|
|
426
634
|
// reset cart store
|
|
427
635
|
cartStoreReset();
|
|
636
|
+
// redirect to vendor store url if this is legacy checkout.
|
|
637
|
+
if (this.isLegacyCheckout && window.Zonos.tempCartData) {
|
|
638
|
+
const contShoppingUrl = window.Zonos.tempCartData.contShoppingURL;
|
|
639
|
+
window.location.href = contShoppingUrl;
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
428
642
|
// reset url
|
|
429
643
|
const url = window.location.href;
|
|
430
644
|
// Remove query parameters
|
|
@@ -447,9 +661,18 @@ const ZonosCheckout = class {
|
|
|
447
661
|
void this.applyStripeTheme();
|
|
448
662
|
log(`mobile: ${this.isMobile}`);
|
|
449
663
|
}
|
|
664
|
+
handleAppearanceSettingsOverrideChange() {
|
|
665
|
+
var _a;
|
|
666
|
+
if ((_a = this.appearanceSettingsOverride) === null || _a === void 0 ? void 0 : _a.theme) {
|
|
667
|
+
// update theme to browser preference theme if appearance theme is system
|
|
668
|
+
this.appearanceSettingsOverride.theme = getZonosStoreTheme(this.appearanceSettingsOverride.theme);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
450
671
|
componentWillLoad() {
|
|
451
672
|
void this.init();
|
|
452
673
|
this.isMobile = isCheckoutMobile(this.mobile);
|
|
674
|
+
// update theme to browser preference theme if appearance theme is system
|
|
675
|
+
this.handleAppearanceSettingsOverrideChange();
|
|
453
676
|
log(`mobile: ${this.isMobile}`);
|
|
454
677
|
}
|
|
455
678
|
// do clean up when component is unmounted
|
|
@@ -482,15 +705,17 @@ const ZonosCheckout = class {
|
|
|
482
705
|
const localePageEnum = this.getCurrentLocalePageEnum();
|
|
483
706
|
const filteredMessages = customMessages.filter(x => x.pageName === localePageEnum);
|
|
484
707
|
const renderLogo = () => (h("div", { class: "zonos--logo" }, logoUrl && (h("img", { alt: `${zonosStore.organizationName} logo`, src: logoUrl, width: 100 }))));
|
|
485
|
-
const renderTopHeader = () =>
|
|
486
|
-
|
|
487
|
-
|
|
708
|
+
const renderTopHeader = () => {
|
|
709
|
+
return (h("zonos-v-stack", null, renderLogo(), h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
710
|
+
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
711
|
+
this.isMobile ? '--amino-gray-0' : null }), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
712
|
+
};
|
|
488
713
|
const renderContent = () => {
|
|
489
714
|
return (h("div", { class: 'zonos--content', style: {
|
|
490
715
|
'--border-radius': getBorderRadius(style),
|
|
491
716
|
} }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, h("div", { class: "zonos--left", "data-theme": leftSideTheme, style: {
|
|
492
717
|
'--primary-color': !this.isMobile ? colorPrimary : '',
|
|
493
|
-
} }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
718
|
+
} }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
494
719
|
// do nothing if it's not mobile
|
|
495
720
|
if (!this.isMobile) {
|
|
496
721
|
return;
|
|
@@ -513,11 +738,11 @@ const ZonosCheckout = class {
|
|
|
513
738
|
hasFooter && 'has-footer',
|
|
514
739
|
this.preview && 'preview',
|
|
515
740
|
this.isMobile && 'mobile',
|
|
516
|
-
]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style,
|
|
741
|
+
]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent()))));
|
|
517
742
|
}
|
|
518
743
|
static get assetsDirs() { return ["assets"]; }
|
|
519
744
|
static get watchers() { return {
|
|
520
|
-
"appearanceSettingsOverride": ["appearanceSettingsOverrideChanged"],
|
|
745
|
+
"appearanceSettingsOverride": ["appearanceSettingsOverrideChanged", "handleAppearanceSettingsOverrideChange"],
|
|
521
746
|
"mobile": ["handleMobileChange"]
|
|
522
747
|
}; }
|
|
523
748
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-dd40cc85.js';
|
|
2
|
-
import { r as handleFetch, d as logError, u as isValidSelector, a as log, j as stripeStore, v as initLocalizationStore, b as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
3
|
-
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-
|
|
4
|
-
import './isDarkColor-
|
|
5
|
-
import './getBorderRadius-
|
|
2
|
+
import { r as handleFetch, d as logError, u as isValidSelector, a as log, j as stripeStore, v as initLocalizationStore, b as localizationStoreUpdateSelectedCountryCode } from './cart-228e1ef7.js';
|
|
3
|
+
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
|
+
import './isDarkColor-6bf71e51.js';
|
|
5
|
+
import './getBorderRadius-a89e45fb.js';
|
|
6
6
|
|
|
7
7
|
const getZonosSettings = async () => {
|
|
8
8
|
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/zonos-settings`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
3
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { l as localizationStore } from './cart-228e1ef7.js';
|
|
3
|
+
import { d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import './isDarkColor-
|
|
6
|
-
import './getBorderRadius-
|
|
5
|
+
import './isDarkColor-6bf71e51.js';
|
|
6
|
+
import './getBorderRadius-a89e45fb.js';
|
|
7
7
|
|
|
8
8
|
const zonosCountryFlagCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";
|
|
9
9
|
const ZonosCountryFlagStyle0 = zonosCountryFlagCss;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { b as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-
|
|
3
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { b as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-228e1ef7.js';
|
|
3
|
+
import { d as zonosStoreFontFamily } from './zonosStore-c4c45591.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
5
|
+
import { i as isDarkColor } from './isDarkColor-6bf71e51.js';
|
|
6
6
|
import { l as languages } from './ILanguage-97790bee.js';
|
|
7
|
-
import './getBorderRadius-
|
|
7
|
+
import './getBorderRadius-a89e45fb.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)
|
|
@@ -16,5 +16,5 @@ const patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"domesticRedirectedBtnSelector":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}]]],["zonos-address_4",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"hasInvalidCharacters":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_10",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"disabled":[32],"serviceLevels":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"domesticRedirectedBtnSelector":[32],"legacyCheckoutHiddenBtnSelector":[32],"isLegacyCheckout":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}]]],["zonos-address_4",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"hasInvalidCharacters":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_10",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"disabled":[32],"serviceLevels":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-dd40cc85.js';
|
|
2
|
-
import { B as currencyFormat, l as localizationStore, t as translate } from './cart-
|
|
3
|
-
import { z as zonosStore } from './zonosStore-
|
|
2
|
+
import { B as currencyFormat, l as localizationStore, t as translate } from './cart-228e1ef7.js';
|
|
3
|
+
import { z as zonosStore } from './zonosStore-c4c45591.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
7
|
-
import './isDarkColor-
|
|
8
|
-
import './getBorderRadius-
|
|
7
|
+
import './isDarkColor-6bf71e51.js';
|
|
8
|
+
import './getBorderRadius-a89e45fb.js';
|
|
9
9
|
|
|
10
10
|
const getHasMoreSpaceAbove = (ref) => {
|
|
11
11
|
const componentRect = ref.getBoundingClientRect();
|
|
@@ -118,7 +118,7 @@ const ZonosHelloDialog = class {
|
|
|
118
118
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
119
119
|
const currentPage = this.getCurrentPageEnum();
|
|
120
120
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
121
|
-
return (h(Host, { key: '
|
|
121
|
+
return (h(Host, { key: 'dcd4c055999375785e289cc273c37e50c358d594', class: "zonos--elements" }, h("div", { key: 'a8921afb921ee0b4c0adb31dca0da646c91bdecc', "aria-hidden": "true", class: classes([
|
|
122
122
|
'zonos--hello-dialog',
|
|
123
123
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
124
124
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|