@zonos/elements 1.3.11-alpha.1 → 1.3.11-alpha.2
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-b34c001b.js} +66 -6
- 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-1f1fbe1c.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 +4 -4
- 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-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 +3 -0
- 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 +63 -3
- package/dist/components/trackConversionEvent.js +2 -0
- package/dist/components/zonos-address2.js +5 -2
- 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-cc09eaef.js} +66 -6
- 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-2eedb117.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 +4 -4
- 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-cc09eaef.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-2eedb117.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-07022f11.js +1 -0
- package/dist/zonos-elements/p-0fe52bae.system.entry.js +1 -0
- package/dist/zonos-elements/{p-26aee7a0.entry.js → p-105a2e51.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-824b8708.system.entry.js → p-1df9ab6a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1f54c83e.entry.js +1 -0
- package/dist/zonos-elements/{p-b9cde0c3.entry.js → p-215cd7ec.entry.js} +1 -1
- package/dist/zonos-elements/p-26e8f37a.entry.js +1 -0
- package/dist/zonos-elements/{p-6db032ee.system.js → p-41c2b1c5.system.js} +1 -1
- package/dist/zonos-elements/p-425865fd.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6daa64bf.entry.js → p-43022147.entry.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-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-55519ef5.system.js +1 -0
- package/dist/zonos-elements/{p-fac20c60.system.entry.js → p-5ba91f13.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6484bf31.system.js +1 -0
- package/dist/zonos-elements/p-6a1b934d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-817e7f8e.entry.js → p-6bd4b5e6.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-0b51de7b.system.entry.js → p-7f9889bd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0f414d6a.system.js → p-86034f1e.system.js} +1 -1
- package/dist/zonos-elements/p-9a1db995.entry.js +1 -0
- package/dist/zonos-elements/{p-a1a477c9.js → p-9a90fb56.js} +1 -1
- package/dist/zonos-elements/{p-ff17c03b.entry.js → p-9bdcd7b6.entry.js} +1 -1
- package/dist/zonos-elements/{p-d96f8d89.system.entry.js → p-a144d26a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a398bc59.system.entry.js → p-a2f71e4f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd8c50e8.system.entry.js → p-b4c23bb5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-65a877e2.entry.js → p-b8718429.entry.js} +1 -1
- package/dist/zonos-elements/{p-60ac5342.system.entry.js → p-ba5596ae.system.entry.js} +1 -1
- package/dist/zonos-elements/p-beba218e.js +1 -0
- package/dist/zonos-elements/p-c7f11c60.entry.js +1 -0
- package/dist/zonos-elements/{p-a641dfcd.entry.js → p-d4222f1f.entry.js} +1 -1
- package/dist/zonos-elements/p-dde4c859.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6a80f7f5.entry.js → p-e3a3e376.entry.js} +1 -1
- package/dist/zonos-elements/{p-b0e9226a.entry.js → p-e3de496a.entry.js} +1 -1
- package/dist/zonos-elements/{p-ed4d8d71.system.js → p-ed23a5df.system.js} +1 -1
- package/dist/zonos-elements/{p-b2c48954.system.entry.js → p-ed597cc9.system.entry.js} +1 -1
- 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-fa3d0aea.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
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-564fe383.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
8
|
-
const submitGtag = require('./submitGtag-
|
|
9
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
6
|
+
const cart = require('./cart-b34c001b.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-bd2a0c59.js');
|
|
8
|
+
const submitGtag = require('./submitGtag-1f1fbe1c.js');
|
|
9
|
+
const getBorderRadius = require('./getBorderRadius-4fa738c3.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
12
12
|
const ILanguage = require('./ILanguage-d247b45b.js');
|
|
13
|
-
const getContrastColor = require('./getContrastColor-
|
|
13
|
+
const getContrastColor = require('./getContrastColor-c72796c6.js');
|
|
14
14
|
const isColorVariable = require('./isColorVariable-fff5e469.js');
|
|
15
|
-
require('./isDarkColor-
|
|
15
|
+
require('./isDarkColor-7faf0a82.js');
|
|
16
16
|
|
|
17
17
|
const formatCurrency = ({ amount, currency, showCurrencyText, }) => showCurrencyText
|
|
18
18
|
? `${new Intl.NumberFormat('en-US', {
|
|
@@ -192,10 +192,8 @@ const ZonosCheckoutFinish = class {
|
|
|
192
192
|
void submitGtag.trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
193
193
|
paymentMethod,
|
|
194
194
|
});
|
|
195
|
-
const successEvent =
|
|
196
|
-
|
|
197
|
-
message: 'Zonos Checkout successfully processed order',
|
|
198
|
-
},
|
|
195
|
+
const successEvent = submitGtag.createCustomEvent('zonos-checkout-success', {
|
|
196
|
+
message: 'Zonos Checkout successfully processed order',
|
|
199
197
|
});
|
|
200
198
|
document.dispatchEvent(successEvent);
|
|
201
199
|
}
|
|
@@ -245,7 +243,7 @@ const ZonosCheckoutFinish = class {
|
|
|
245
243
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
246
244
|
// return acc + item.quantity;
|
|
247
245
|
// }, 0);
|
|
248
|
-
return (index.h(index.Host, { key: '
|
|
246
|
+
return (index.h(index.Host, { key: '8c2087b3a0578cbbd7979fff5e6b696a4325e548', class: "zonos--checkout-finish zonos--elements", style: {
|
|
249
247
|
'--border-radius': getBorderRadius.getBorderRadius(this.borderRadius),
|
|
250
248
|
} }, this.isLoading && (index.h("div", { class: "loading-wrapper" }, index.h("zonos-spinner", null))), !this.isLoading && (index.h(index.Fragment, null, index.h("div", { class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon$1, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", null, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), index.h("zonos-button", { onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, cart.translate('Keep shopping')))))));
|
|
251
249
|
}
|
|
@@ -356,7 +354,7 @@ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none
|
|
|
356
354
|
</svg>
|
|
357
355
|
`;
|
|
358
356
|
|
|
359
|
-
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}";
|
|
357
|
+
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}";
|
|
360
358
|
const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
|
|
361
359
|
|
|
362
360
|
const ZonosCheckoutProgressTabs = class {
|
|
@@ -416,17 +414,17 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
416
414
|
color: labelSelectedColor,
|
|
417
415
|
})
|
|
418
416
|
: labelSelectedColor;
|
|
419
|
-
return (index.h(index.Host, { key: '
|
|
417
|
+
return (index.h(index.Host, { key: 'e79dc4967096d3b6f0ac25d58f02e77f773c8e95', class: "zonos--elements", style: {
|
|
420
418
|
'--color': contrastLabelColor,
|
|
421
419
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
422
|
-
} }, index.h("div", { key: '
|
|
420
|
+
} }, index.h("div", { key: '20e500d31c28ee0705c1999e0f258b679af9d73a', class: "zonos--tab-wrapper" }, Object.values(cart.cartStore.tabItems).map((tab, index$1) => {
|
|
423
421
|
const isSelected = tab.value === selectedStep;
|
|
424
422
|
return (index.h("button", { class: classes.classes([
|
|
425
423
|
'zonos--tab-item',
|
|
426
424
|
tab.value === selectedStep && 'selected',
|
|
427
425
|
tab.isDone && 'done',
|
|
428
|
-
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cart.cartStore.step = tab.value) }, index.h("div", { class: "zonos--tab-index" }, index.h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index$1 + 1), index.h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), index.h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, tab.label)));
|
|
429
|
-
})), index.h("div", { key: '
|
|
426
|
+
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cart.cartStore.step = tab.value) }, index.h("div", { class: "zonos--tab-index" }, index.h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index$1 + 1), index.h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), index.h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, cart.translate(tab.label))));
|
|
427
|
+
})), index.h("div", { key: '129502b873f339192ef5f4c67ac8c06d533ccfca', class: "zonos--tab-progress" }, index.h("div", { key: '728a074d6a411b400be30929bf9a5fdc8431745d', class: "zonos--progress-bar-fill" }))));
|
|
430
428
|
}
|
|
431
429
|
static get assetsDirs() { return ["assets"]; }
|
|
432
430
|
get ele() { return index.getElement(this); }
|
|
@@ -550,7 +548,7 @@ const ZonosDialog = class {
|
|
|
550
548
|
document.body.style.overflow = 'auto';
|
|
551
549
|
}
|
|
552
550
|
const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle);
|
|
553
|
-
return (index.h(index.Host, { key: '
|
|
551
|
+
return (index.h(index.Host, { key: 'f0aee4766d2c62f3f4feff18c99dba62ea97ca06', class: classes.classes([
|
|
554
552
|
'zonos--elements',
|
|
555
553
|
this.open && 'open',
|
|
556
554
|
this.isLoading && 'is-loading',
|
|
@@ -561,10 +559,10 @@ const ZonosDialog = class {
|
|
|
561
559
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
562
560
|
'--height': this.height || 'initial',
|
|
563
561
|
'--width': this.width,
|
|
564
|
-
} }, index.h("div", { key: '
|
|
562
|
+
} }, index.h("div", { key: '42e8afd7ddc94ab9ec4951f4221e32729256694e', class: "zonos--backdrop" }), index.h("div", { key: '035c21c65ae5cabc12b41b6ad1684fa4dbc5b92e', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, index.h("div", { key: 'b9a3299c9fb920f9af5783506b0489122b2eae11', class: "zonos--dialog" }, this.isLoading && (index.h("div", { class: "zonos--loading" }, index.h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (index.h("div", { class: "zonos--header" }, this.headerText && (index.h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), index.h("div", { key: 'f5e5a75782ca6acd4a2c004756b800f3c2558129', class: classes.classes([
|
|
565
563
|
'zonos--body',
|
|
566
564
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
567
|
-
]) }, index.h("slot", { key: '
|
|
565
|
+
]) }, index.h("slot", { key: '3fe4ec47852e99f1dc5b6a7a84a8b918594b8b7f' })), index.h("slot", { key: '5515f4109274b178249c05c6e6c91fdc30ce528a', name: "dialog-footer" })))));
|
|
568
566
|
}
|
|
569
567
|
static get assetsDirs() { return ["assets"]; }
|
|
570
568
|
};
|
|
@@ -574,7 +572,7 @@ const ChevronDownIcon = `<svg color="var(--amino-gray-400)" fill="none" height="
|
|
|
574
572
|
|
|
575
573
|
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>`;
|
|
576
574
|
|
|
577
|
-
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-
|
|
575
|
+
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}";
|
|
578
576
|
const ZonosReviewStyle0 = zonosReviewCss;
|
|
579
577
|
|
|
580
578
|
const ZonosReview = class {
|
|
@@ -704,7 +702,7 @@ const ZonosShipping = class {
|
|
|
704
702
|
}
|
|
705
703
|
render() {
|
|
706
704
|
var _a, _b;
|
|
707
|
-
return (index.h(index.Host, { key: 'ab881bdb575ac0177154ffa8a2d84d668151c46d', class: "zonos--shipping zonos--elements" }, index.h("div", { key: 'b8738e0fb5c32b329ae03ccd2cb2d1a178a05aa8', class: "zonos--group" }, index.h("zonos-text", { key: 'd942ab3f4e77631145a0a38dae95999454a92b56', class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Shipping information')), index.h("zonos-text", { key: '6855f44cf3458891776b3c215417bec329de89dc', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, cart.translate('Shipping method')), !((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) ? (index.h("zonos-banner", { bannerTitle:
|
|
705
|
+
return (index.h(index.Host, { key: 'ab881bdb575ac0177154ffa8a2d84d668151c46d', class: "zonos--shipping zonos--elements" }, index.h("div", { key: 'b8738e0fb5c32b329ae03ccd2cb2d1a178a05aa8', class: "zonos--group" }, index.h("zonos-text", { key: 'd942ab3f4e77631145a0a38dae95999454a92b56', class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Shipping information')), index.h("zonos-text", { key: '6855f44cf3458891776b3c215417bec329de89dc', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, cart.translate('Shipping method')), !((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) ? (index.h("zonos-banner", { bannerTitle: cart.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" })) : (index.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) })), index.h("div", { key: 'f6398edeecd18c603680ad6c7c8e1aa5f5cebe4a', class: "zonos--group-btn" }, index.h("zonos-button", { key: 'a548fb385ed341308ff86e615d9088e7cd4ec34d', backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
708
706
|
// use primary type when on mobile mode
|
|
709
707
|
variant: this.submitBtnType }, cart.translate('Go to payment'))))));
|
|
710
708
|
}
|
|
@@ -3,13 +3,162 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-564fe383.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
8
|
-
const submitGtag = require('./submitGtag-
|
|
6
|
+
const cart = require('./cart-b34c001b.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-bd2a0c59.js');
|
|
8
|
+
const submitGtag = require('./submitGtag-1f1fbe1c.js');
|
|
9
9
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
10
10
|
const classes = require('./classes-b7918f56.js');
|
|
11
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
12
|
-
const isDarkColor = require('./isDarkColor-
|
|
11
|
+
const getBorderRadius = require('./getBorderRadius-4fa738c3.js');
|
|
12
|
+
const isDarkColor = require('./isDarkColor-7faf0a82.js');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* This is just function to make the key typesafe to enter
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
const objAttribute = ({ key, value, }) => value
|
|
19
|
+
? {
|
|
20
|
+
key,
|
|
21
|
+
value,
|
|
22
|
+
}
|
|
23
|
+
: null;
|
|
24
|
+
/**
|
|
25
|
+
* Map legacy item attribute to dgs item attributes
|
|
26
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L412
|
|
27
|
+
*/
|
|
28
|
+
const getAttributes = (item) => {
|
|
29
|
+
return [
|
|
30
|
+
objAttribute({
|
|
31
|
+
key: 'brand',
|
|
32
|
+
value: item.itemBrand,
|
|
33
|
+
}),
|
|
34
|
+
objAttribute({
|
|
35
|
+
key: 'material',
|
|
36
|
+
value: item.itemMaterial,
|
|
37
|
+
}),
|
|
38
|
+
objAttribute({
|
|
39
|
+
key: 'category',
|
|
40
|
+
value: item.itemCategory,
|
|
41
|
+
}),
|
|
42
|
+
objAttribute({
|
|
43
|
+
key: 'color',
|
|
44
|
+
value: item.itemColor,
|
|
45
|
+
}),
|
|
46
|
+
objAttribute({
|
|
47
|
+
key: 'customization',
|
|
48
|
+
value: item.itemCustomization,
|
|
49
|
+
}),
|
|
50
|
+
objAttribute({
|
|
51
|
+
key: 'descriptionDetailed',
|
|
52
|
+
value: item.itemDescriptionDetailed,
|
|
53
|
+
}),
|
|
54
|
+
objAttribute({
|
|
55
|
+
key: 'fabricContent',
|
|
56
|
+
value: item.itemFabricContent,
|
|
57
|
+
}),
|
|
58
|
+
objAttribute({
|
|
59
|
+
key: 'ltlClass',
|
|
60
|
+
value: item.itemLtlClass,
|
|
61
|
+
}),
|
|
62
|
+
objAttribute({
|
|
63
|
+
key: 'pickingLocation',
|
|
64
|
+
value: item.itemPickingLocation,
|
|
65
|
+
}),
|
|
66
|
+
objAttribute({
|
|
67
|
+
key: 'shipFromLocation',
|
|
68
|
+
value: item.itemShipFromLocation,
|
|
69
|
+
}),
|
|
70
|
+
objAttribute({
|
|
71
|
+
key: 'size',
|
|
72
|
+
value: item.itemSize,
|
|
73
|
+
}),
|
|
74
|
+
objAttribute({
|
|
75
|
+
key: 'status',
|
|
76
|
+
value: item.status,
|
|
77
|
+
}),
|
|
78
|
+
].filter(Boolean);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Map legacy weight units with dgs
|
|
83
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L483
|
|
84
|
+
*/
|
|
85
|
+
const getItemWeightUnit = (weightUnit) => {
|
|
86
|
+
if (!weightUnit) {
|
|
87
|
+
return 'POUND';
|
|
88
|
+
}
|
|
89
|
+
switch (weightUnit.toUpperCase()) {
|
|
90
|
+
case 'KG':
|
|
91
|
+
return 'KILOGRAM';
|
|
92
|
+
case 'OZ':
|
|
93
|
+
return 'OUNCE';
|
|
94
|
+
case 'G':
|
|
95
|
+
return 'GRAM';
|
|
96
|
+
default:
|
|
97
|
+
return 'POUND';
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Mapping legacy measurement with dgs
|
|
102
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L441
|
|
103
|
+
*/
|
|
104
|
+
const getMeasurements = (item) => {
|
|
105
|
+
if (!item) {
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
const measurements = [];
|
|
109
|
+
if (item.length) {
|
|
110
|
+
measurements.push({
|
|
111
|
+
type: 'LENGTH',
|
|
112
|
+
unitOfMeasure: 'INCH',
|
|
113
|
+
value: item.length,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (item.width) {
|
|
117
|
+
measurements.push({
|
|
118
|
+
type: 'WIDTH',
|
|
119
|
+
unitOfMeasure: 'INCH',
|
|
120
|
+
value: item.width,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if (item.weight) {
|
|
124
|
+
measurements.push({
|
|
125
|
+
type: 'WEIGHT',
|
|
126
|
+
unitOfMeasure: getItemWeightUnit(item.weightUnits),
|
|
127
|
+
value: item.weight,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (item.height) {
|
|
131
|
+
measurements.push({
|
|
132
|
+
type: 'HEIGHT',
|
|
133
|
+
unitOfMeasure: 'INCH',
|
|
134
|
+
value: item.height,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return measurements;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Map the items from tempCart like how we do it in dgs
|
|
142
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L393
|
|
143
|
+
*/
|
|
144
|
+
const buildCartItemsByTempCart = (tempCartData) => {
|
|
145
|
+
var _a;
|
|
146
|
+
const tempCartItems = ((_a = tempCartData === null || tempCartData === void 0 ? void 0 : tempCartData.items) === null || _a === void 0 ? void 0 : _a.map(item => ({
|
|
147
|
+
amount: item.unitPrice || 0,
|
|
148
|
+
attributes: getAttributes(item),
|
|
149
|
+
countryOfOrigin: item.countryOfOrigin || undefined,
|
|
150
|
+
currencyCode: 'USD',
|
|
151
|
+
description: item.itemDescriptionLong || '',
|
|
152
|
+
imageUrl: item.imageURL || '',
|
|
153
|
+
itemType: 'PHYSICAL_GOOD',
|
|
154
|
+
measurements: getMeasurements(item),
|
|
155
|
+
name: item.description || '',
|
|
156
|
+
productId: item.productId || '',
|
|
157
|
+
quantity: item.quantity || 0,
|
|
158
|
+
sku: item.sku || '',
|
|
159
|
+
}))) || [];
|
|
160
|
+
return tempCartItems;
|
|
161
|
+
};
|
|
13
162
|
|
|
14
163
|
const isShippableCountry = (showLog = true) => {
|
|
15
164
|
if (!cart.localizationStore.localizationLoaded) {
|
|
@@ -17,6 +166,7 @@ const isShippableCountry = (showLog = true) => {
|
|
|
17
166
|
}
|
|
18
167
|
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
19
168
|
if (!cart.localizationStore.isShippableCountry) {
|
|
169
|
+
document.dispatchEvent(submitGtag.createCustomEvent('legacyCheckoutError', 'Unable to initiate checkout process in a country where shipping is not available'));
|
|
20
170
|
if (showLog) {
|
|
21
171
|
cart.log(`Checkout: not shippable country`);
|
|
22
172
|
}
|
|
@@ -182,6 +332,8 @@ const ZonosCheckout = class {
|
|
|
182
332
|
this.zonosReviewRef = undefined;
|
|
183
333
|
this.storybookPaymentStatusOverride = undefined;
|
|
184
334
|
this.domesticRedirectedBtnSelector = '#zonos--domestic-redirected-checkout-button';
|
|
335
|
+
this.legacyCheckoutHiddenBtnSelector = '#legacy-checkout-hidden-button';
|
|
336
|
+
this.isLegacyCheckout = false;
|
|
185
337
|
}
|
|
186
338
|
/**
|
|
187
339
|
* Init cart info handler event
|
|
@@ -204,7 +356,12 @@ const ZonosCheckout = class {
|
|
|
204
356
|
cart.cartStore.step = 'customer-info';
|
|
205
357
|
}
|
|
206
358
|
async buildCartAndInit() {
|
|
207
|
-
if
|
|
359
|
+
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
360
|
+
if (window.Zonos.tempCartData) {
|
|
361
|
+
const tempCartData = buildCartItemsByTempCart(window.Zonos.tempCartData);
|
|
362
|
+
await cart.cartStoreUpdateItems(tempCartData);
|
|
363
|
+
}
|
|
364
|
+
else if (zonosStore.zonosStore.checkoutSettings.buildCartDetail) {
|
|
208
365
|
cart.log('build cart detail');
|
|
209
366
|
const cartItems = await zonosStore.zonosStore.checkoutSettings.buildCartDetail();
|
|
210
367
|
await cart.cartStoreUpdateItems(cartItems);
|
|
@@ -271,12 +428,18 @@ const ZonosCheckout = class {
|
|
|
271
428
|
button.setAttribute('data-zonos-checkout-attached', 'true');
|
|
272
429
|
// if this button is the hidden button, trigger the click event
|
|
273
430
|
if (button.matches(this.domesticRedirectedBtnSelector)) {
|
|
274
|
-
button.dispatchEvent(
|
|
431
|
+
button.dispatchEvent(submitGtag.createCustomEvent('click'));
|
|
275
432
|
// cleanup shipping session after button is clicked
|
|
276
433
|
cart.stripeStoreCleanupDomesticShippingSession();
|
|
277
434
|
// remove the button after it's clicked
|
|
278
435
|
button.remove();
|
|
279
436
|
}
|
|
437
|
+
if (button.matches(this.legacyCheckoutHiddenBtnSelector)) {
|
|
438
|
+
this.isLegacyCheckout = true;
|
|
439
|
+
// trigger the click event on the button
|
|
440
|
+
button.dispatchEvent(submitGtag.createCustomEvent('click'));
|
|
441
|
+
button.remove();
|
|
442
|
+
}
|
|
280
443
|
});
|
|
281
444
|
}
|
|
282
445
|
appearanceSettingsOverrideChanged() {
|
|
@@ -286,6 +449,45 @@ const ZonosCheckout = class {
|
|
|
286
449
|
// apply theme to stripe elements
|
|
287
450
|
void this.applyStripeTheme();
|
|
288
451
|
}
|
|
452
|
+
/**
|
|
453
|
+
* Set default address from query param if it's valid
|
|
454
|
+
*/
|
|
455
|
+
useLegacyQueryParam() {
|
|
456
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
457
|
+
const legacyShippingInfo = {
|
|
458
|
+
country: urlParams.get('country'),
|
|
459
|
+
customerAddress1: urlParams.get('customerAddress1'),
|
|
460
|
+
customerAddress2: urlParams.get('customerAddress2'),
|
|
461
|
+
customerCity: urlParams.get('customerCity'),
|
|
462
|
+
customerEmail: urlParams.get('customerEmail'),
|
|
463
|
+
customerName: urlParams.get('customerName'),
|
|
464
|
+
customerPhone: urlParams.get('customerPhone'),
|
|
465
|
+
customerState: urlParams.get('customerState'),
|
|
466
|
+
customerZip: urlParams.get('customerZip'),
|
|
467
|
+
};
|
|
468
|
+
// if one of the value is null, no need to preset the default address
|
|
469
|
+
if (!legacyShippingInfo.customerAddress1 ||
|
|
470
|
+
!legacyShippingInfo.customerCity ||
|
|
471
|
+
!legacyShippingInfo.customerName ||
|
|
472
|
+
!legacyShippingInfo.customerPhone ||
|
|
473
|
+
!legacyShippingInfo.customerState ||
|
|
474
|
+
!legacyShippingInfo.customerZip ||
|
|
475
|
+
!legacyShippingInfo.country) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
this.defaultAddress = {
|
|
479
|
+
address: {
|
|
480
|
+
city: legacyShippingInfo.customerCity,
|
|
481
|
+
country: legacyShippingInfo.country,
|
|
482
|
+
line1: legacyShippingInfo.customerAddress1,
|
|
483
|
+
line2: legacyShippingInfo.customerAddress2 || '',
|
|
484
|
+
postal_code: legacyShippingInfo.customerZip,
|
|
485
|
+
state: legacyShippingInfo.customerState,
|
|
486
|
+
},
|
|
487
|
+
name: legacyShippingInfo.customerName,
|
|
488
|
+
phone: legacyShippingInfo.customerPhone,
|
|
489
|
+
};
|
|
490
|
+
}
|
|
289
491
|
/**
|
|
290
492
|
* Setup all of the event listeners for the component on first load
|
|
291
493
|
*/
|
|
@@ -311,6 +513,12 @@ const ZonosCheckout = class {
|
|
|
311
513
|
};
|
|
312
514
|
},
|
|
313
515
|
});
|
|
516
|
+
/**
|
|
517
|
+
* When temp cart data is available, set default address if exist
|
|
518
|
+
*/
|
|
519
|
+
if (window.Zonos.tempCartData) {
|
|
520
|
+
this.useLegacyQueryParam();
|
|
521
|
+
}
|
|
314
522
|
const hideInternationalOrderInterval = setInterval(() => {
|
|
315
523
|
const internationalSelector = window.Zonos.internationalHideSelector;
|
|
316
524
|
if (!internationalSelector) {
|
|
@@ -429,6 +637,12 @@ const ZonosCheckout = class {
|
|
|
429
637
|
}
|
|
430
638
|
// reset cart store
|
|
431
639
|
cart.cartStoreReset();
|
|
640
|
+
// redirect to vendor store url if this is legacy checkout.
|
|
641
|
+
if (this.isLegacyCheckout && window.Zonos.tempCartData) {
|
|
642
|
+
const contShoppingUrl = window.Zonos.tempCartData.contShoppingURL;
|
|
643
|
+
window.location.href = contShoppingUrl;
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
432
646
|
// reset url
|
|
433
647
|
const url = window.location.href;
|
|
434
648
|
// Remove query parameters
|
|
@@ -451,9 +665,18 @@ const ZonosCheckout = class {
|
|
|
451
665
|
void this.applyStripeTheme();
|
|
452
666
|
cart.log(`mobile: ${this.isMobile}`);
|
|
453
667
|
}
|
|
668
|
+
handleAppearanceSettingsOverrideChange() {
|
|
669
|
+
var _a;
|
|
670
|
+
if ((_a = this.appearanceSettingsOverride) === null || _a === void 0 ? void 0 : _a.theme) {
|
|
671
|
+
// update theme to browser preference theme if appearance theme is system
|
|
672
|
+
this.appearanceSettingsOverride.theme = zonosStore.getZonosStoreTheme(this.appearanceSettingsOverride.theme);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
454
675
|
componentWillLoad() {
|
|
455
676
|
void this.init();
|
|
456
677
|
this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
|
|
678
|
+
// update theme to browser preference theme if appearance theme is system
|
|
679
|
+
this.handleAppearanceSettingsOverrideChange();
|
|
457
680
|
cart.log(`mobile: ${this.isMobile}`);
|
|
458
681
|
}
|
|
459
682
|
// do clean up when component is unmounted
|
|
@@ -486,15 +709,17 @@ const ZonosCheckout = class {
|
|
|
486
709
|
const localePageEnum = this.getCurrentLocalePageEnum();
|
|
487
710
|
const filteredMessages = customMessages.filter(x => x.pageName === localePageEnum);
|
|
488
711
|
const renderLogo = () => (index.h("div", { class: "zonos--logo" }, logoUrl && (index.h("img", { alt: `${zonosStore.zonosStore.organizationName} logo`, src: logoUrl, width: 100 }))));
|
|
489
|
-
const renderTopHeader = () =>
|
|
490
|
-
|
|
491
|
-
|
|
712
|
+
const renderTopHeader = () => {
|
|
713
|
+
return (index.h("zonos-v-stack", null, renderLogo(), index.h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
714
|
+
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
715
|
+
this.isMobile ? '--amino-gray-0' : null }), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
716
|
+
};
|
|
492
717
|
const renderContent = () => {
|
|
493
718
|
return (index.h("div", { class: 'zonos--content', style: {
|
|
494
719
|
'--border-radius': getBorderRadius.getBorderRadius(style),
|
|
495
720
|
} }, cart.cartStore.step !== 'finish' && cart.cartStore.step !== 'error' && (index.h(index.Fragment, null, index.h("div", { class: "zonos--left", "data-theme": leftSideTheme, style: {
|
|
496
721
|
'--primary-color': !this.isMobile ? colorPrimary : '',
|
|
497
|
-
} }, !this.isMobile && renderTopHeader(), cart.cartStore.step === 'customer-info' && (index.h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'shipping' && (index.h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'payment' && (index.h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor }))), index.h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }), index.h("div", { class: "flex--wrapper" }, index.h("div", { class: "zonos--wrapper" }, index.h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
722
|
+
} }, !this.isMobile && renderTopHeader(), cart.cartStore.step === 'customer-info' && (index.h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'shipping' && (index.h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'payment' && (index.h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor }))), index.h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isLegacyCheckout && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), index.h("div", { class: "flex--wrapper" }, index.h("div", { class: "zonos--wrapper" }, index.h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
498
723
|
// do nothing if it's not mobile
|
|
499
724
|
if (!this.isMobile) {
|
|
500
725
|
return;
|
|
@@ -517,11 +742,11 @@ const ZonosCheckout = class {
|
|
|
517
742
|
hasFooter && 'has-footer',
|
|
518
743
|
this.preview && 'preview',
|
|
519
744
|
this.isMobile && 'mobile',
|
|
520
|
-
]) }, this.preview ? (renderContent()) : (index.h("zonos-dialog", { borderStyle: style,
|
|
745
|
+
]) }, this.preview ? (renderContent()) : (index.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()))));
|
|
521
746
|
}
|
|
522
747
|
static get assetsDirs() { return ["assets"]; }
|
|
523
748
|
static get watchers() { return {
|
|
524
|
-
"appearanceSettingsOverride": ["appearanceSettingsOverrideChanged"],
|
|
749
|
+
"appearanceSettingsOverride": ["appearanceSettingsOverrideChanged", "handleAppearanceSettingsOverrideChange"],
|
|
525
750
|
"mobile": ["handleMobileChange"]
|
|
526
751
|
}; }
|
|
527
752
|
};
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-564fe383.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
8
|
-
require('./isDarkColor-
|
|
9
|
-
require('./getBorderRadius-
|
|
6
|
+
const cart = require('./cart-b34c001b.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-bd2a0c59.js');
|
|
8
|
+
require('./isDarkColor-7faf0a82.js');
|
|
9
|
+
require('./getBorderRadius-4fa738c3.js');
|
|
10
10
|
|
|
11
11
|
const getZonosSettings = async () => {
|
|
12
12
|
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/zonos-settings`;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-564fe383.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-b34c001b.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-bd2a0c59.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./isDarkColor-
|
|
10
|
-
require('./getBorderRadius-
|
|
9
|
+
require('./isDarkColor-7faf0a82.js');
|
|
10
|
+
require('./getBorderRadius-4fa738c3.js');
|
|
11
11
|
|
|
12
12
|
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}";
|
|
13
13
|
const ZonosCountryFlagStyle0 = zonosCountryFlagCss;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-564fe383.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-b34c001b.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-bd2a0c59.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
|
-
const isDarkColor = require('./isDarkColor-
|
|
9
|
+
const isDarkColor = require('./isDarkColor-7faf0a82.js');
|
|
10
10
|
const ILanguage = require('./ILanguage-d247b45b.js');
|
|
11
|
-
require('./getBorderRadius-
|
|
11
|
+
require('./getBorderRadius-4fa738c3.js');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)
|
|
@@ -19,7 +19,7 @@ const patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["zonos-checkout.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[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.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[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.cjs",[[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.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon.cjs",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2.cjs",[[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.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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);
|
|
22
|
+
return index.bootstrapLazy([["zonos-checkout.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[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.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[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.cjs",[[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.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon.cjs",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2.cjs",[[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.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-564fe383.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-b34c001b.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-bd2a0c59.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
|
-
require('./isDarkColor-
|
|
12
|
-
require('./getBorderRadius-
|
|
11
|
+
require('./isDarkColor-7faf0a82.js');
|
|
12
|
+
require('./getBorderRadius-4fa738c3.js');
|
|
13
13
|
|
|
14
14
|
const getHasMoreSpaceAbove = (ref) => {
|
|
15
15
|
const componentRect = ref.getBoundingClientRect();
|
|
@@ -122,7 +122,7 @@ const ZonosHelloDialog = class {
|
|
|
122
122
|
const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
|
|
123
123
|
const currentPage = this.getCurrentPageEnum();
|
|
124
124
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
125
|
-
return (index.h(index.Host, { key: '
|
|
125
|
+
return (index.h(index.Host, { key: 'dcd4c055999375785e289cc273c37e50c358d594', class: "zonos--elements" }, index.h("div", { key: 'a8921afb921ee0b4c0adb31dca0da646c91bdecc', "aria-hidden": "true", class: classes.classes([
|
|
126
126
|
'zonos--hello-dialog',
|
|
127
127
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
128
128
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|