@zonos/elements 1.3.207 → 1.3.209
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/{CheckoutConfig-4afc683b.js → CheckoutConfig-27c82f94.js} +19 -0
- package/dist/cjs/{cart-3d961c6e.js → cart-2ec8cac2.js} +285 -64
- package/dist/cjs/{debounce-0b9c0f8a.js → debounce-465a4328.js} +1 -1
- package/dist/cjs/{getBorderRadius-c424eb05.js → getBorderRadius-1b5e33cf.js} +1 -1
- package/dist/cjs/{handleFetch-969d05d8.js → handleFetch-05227713.js} +2 -6
- package/dist/cjs/index.cjs.js +29 -9
- package/dist/cjs/{isDarkColor-35e8daec.js → isDarkColor-428965f4.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-ff33875b.js → localization-9b43376c.js} +3 -2
- package/dist/cjs/{paypal-dee5c109.js → paypal-6449314e.js} +5 -5
- package/dist/cjs/updateCheckoutSessionAttributes-a31bb681.js +50 -0
- package/dist/cjs/zonos-address_11.cjs.entry.js +104 -84
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_14.cjs.entry.js +98 -49
- package/dist/cjs/zonos-checkout.cjs.entry.js +87 -31
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-flag.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +13 -9
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +7 -7
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-7c1e1bc1.js → zonosStore-f8ee56aa.js} +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +79 -24
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +71 -36
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +33 -11
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +9 -5
- package/dist/collection/components/store/checkout/cart.js +9 -2
- package/dist/collection/components/store/checkout/stripe.js +266 -55
- package/dist/collection/components/store/hello/localization.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +24 -3
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +2 -1
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +7 -5
- package/dist/collection/components/utils/api/cartCalculateLandedCost.js +3 -2
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -2
- package/dist/collection/components/utils/api/updateCheckoutSessionAttributes.js +46 -0
- package/dist/collection/components/utils/checkout/getAbandonedCartRenewTokenValue.js +17 -0
- package/dist/collection/components/utils/handleFetch.js +2 -1
- package/dist/collection/components/utils/logging/log.js +0 -5
- package/dist/collection/scripts/_getCartInfoById.js +3 -0
- package/dist/collection/types/checkout/api/CheckoutSession.js +14 -1
- package/dist/collection/types/checkout/api/CreateParty.js +1 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +15 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/{CheckoutConfig-eb7d6954.js → CheckoutConfig-724d7bae.js} +19 -1
- package/dist/esm/{cart-5835676d.js → cart-2f84f632.js} +284 -65
- package/dist/esm/{debounce-eaee3a94.js → debounce-0e42da22.js} +1 -1
- package/dist/esm/{getBorderRadius-b18c924f.js → getBorderRadius-71b3b8ab.js} +1 -1
- package/dist/esm/{handleFetch-621e45bc.js → handleFetch-7dd4622b.js} +2 -6
- package/dist/esm/index.js +28 -11
- package/dist/esm/{isDarkColor-d8bb8659.js → isDarkColor-3a9d6108.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-4c7f64e8.js → localization-e17c211b.js} +3 -2
- package/dist/esm/{paypal-b4f106be.js → paypal-1cf701aa.js} +6 -6
- package/dist/esm/updateCheckoutSessionAttributes-5097e715.js +48 -0
- package/dist/esm/zonos-address_11.entry.js +104 -84
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +2 -2
- package/dist/esm/zonos-cart-items_14.entry.js +98 -49
- package/dist/esm/zonos-checkout.entry.js +87 -31
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +6 -6
- package/dist/esm/zonos-country-flag.entry.js +3 -3
- package/dist/esm/zonos-country-select_4.entry.js +13 -9
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +7 -7
- package/dist/esm/zonos-hello-dialog.entry.js +3 -3
- package/dist/esm/zonos-hello.entry.js +4 -4
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +3 -3
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-toggle.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-1e015fa5.js → zonosStore-00975763.js} +1 -1
- package/dist/esm-es5/CheckoutConfig-724d7bae.js +1 -0
- package/dist/esm-es5/cart-2f84f632.js +1 -0
- package/dist/esm-es5/{debounce-eaee3a94.js → debounce-0e42da22.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-b18c924f.js → getBorderRadius-71b3b8ab.js} +1 -1
- package/dist/esm-es5/handleFetch-7dd4622b.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-d8bb8659.js → isDarkColor-3a9d6108.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-4c7f64e8.js → localization-e17c211b.js} +1 -1
- package/dist/esm-es5/{paypal-b4f106be.js → paypal-1cf701aa.js} +2 -2
- package/dist/esm-es5/updateCheckoutSessionAttributes-5097e715.js +1 -0
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.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_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-1e015fa5.js → zonosStore-00975763.js} +1 -1
- package/dist/scripts/index.d.ts +10 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +2 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +8 -4
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +3 -0
- package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +1 -0
- package/dist/types/components/store/checkout/cart.d.ts +6 -2
- package/dist/types/components/store/checkout/stripe.d.ts +33 -6
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +6 -0
- package/dist/types/components/utils/api/updateCheckoutSessionAttributes.d.ts +7 -0
- package/dist/types/components/utils/checkout/getAbandonedCartRenewTokenValue.d.ts +1 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +1 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +16 -0
- package/dist/types/types/checkout/api/CreateParty.d.ts +34 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +2 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +2 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +2 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +61 -5
- package/dist/types/types/generated/graphql.internal.types.ts +105 -3
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +6 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-4e9c8f9e.system.js → p-0751b878.system.js} +1 -1
- package/dist/zonos-elements/{p-abe218ab.system.entry.js → p-08b29f73.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-74bcb5cc.entry.js → p-0ca1d6dd.entry.js} +1 -1
- package/dist/zonos-elements/{p-12cd9d3a.entry.js → p-144b5006.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e9ac7a2.system.js → p-19182dc7.system.js} +1 -1
- package/dist/zonos-elements/{p-eca09508.system.entry.js → p-1dc78af3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e337fa88.js → p-207bd04a.js} +1 -1
- package/dist/zonos-elements/p-20839c46.js +1 -0
- package/dist/zonos-elements/{p-1aa24297.system.entry.js → p-2122d2cc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4fb88ebc.system.entry.js → p-239695e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3196bf98.entry.js → p-23fe7661.entry.js} +1 -1
- package/dist/zonos-elements/p-2652198d.js +1 -0
- package/dist/zonos-elements/p-30a9f802.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c666d557.system.js → p-3633a952.system.js} +1 -1
- package/dist/zonos-elements/{p-9b8a5372.entry.js → p-36b686b6.entry.js} +1 -1
- package/dist/zonos-elements/{p-658936c9.js → p-371d91d1.js} +2 -2
- package/dist/zonos-elements/{p-019f8637.entry.js → p-3934b38a.entry.js} +1 -1
- package/dist/zonos-elements/p-3c752420.system.js +1 -0
- package/dist/zonos-elements/p-3ee44728.system.js +1 -1
- package/dist/zonos-elements/p-40a4c8a2.system.js +1 -0
- package/dist/zonos-elements/{p-91c996d3.system.js → p-44c0a584.system.js} +2 -2
- package/dist/zonos-elements/{p-eb2560b6.system.entry.js → p-45a2f9b1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1327b935.system.js → p-4a1b4a2d.system.js} +1 -1
- package/dist/zonos-elements/p-4c70fd75.entry.js +1 -0
- package/dist/zonos-elements/{p-bab19e2a.entry.js → p-4d62f3de.entry.js} +1 -1
- package/dist/zonos-elements/{p-848e08e8.entry.js → p-4dbaa2c2.entry.js} +1 -1
- package/dist/zonos-elements/p-4ed73ff8.entry.js +1 -0
- package/dist/zonos-elements/{p-47e2cd31.entry.js → p-4f5513dc.entry.js} +1 -1
- package/dist/zonos-elements/p-542acc2c.js +1 -0
- package/dist/zonos-elements/p-5711e187.system.js +1 -0
- package/dist/zonos-elements/{p-41c1d7c4.entry.js → p-5956a9e0.entry.js} +1 -1
- package/dist/zonos-elements/{p-5616b304.entry.js → p-5b7686f8.entry.js} +1 -1
- package/dist/zonos-elements/{p-0c4c8d63.entry.js → p-63a4dac5.entry.js} +1 -1
- package/dist/zonos-elements/{p-f4d741de.system.entry.js → p-695bf400.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9fa17353.js → p-6aa728f2.js} +1 -1
- package/dist/zonos-elements/{p-ed20f2f7.js → p-71c6bdc3.js} +1 -1
- package/dist/zonos-elements/p-738a49c0.system.js +1 -0
- package/dist/zonos-elements/{p-469ccc66.system.entry.js → p-74276b82.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e0587eeb.entry.js → p-77e22be4.entry.js} +1 -1
- package/dist/zonos-elements/{p-3afc27ef.entry.js → p-78dd1c53.entry.js} +1 -1
- package/dist/zonos-elements/{p-620deb03.system.entry.js → p-7f9bbbb3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-896f2358.system.entry.js +1 -0
- package/dist/zonos-elements/{p-719e14a8.system.entry.js → p-8f41d864.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4cb8b87f.system.entry.js → p-964e2587.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-93aeba62.system.entry.js → p-97831744.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2866fd29.system.entry.js → p-9d95c896.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-abc83d01.entry.js → p-a24870af.entry.js} +1 -1
- package/dist/zonos-elements/p-a411ce2a.system.js +1 -0
- package/dist/zonos-elements/{p-1bc09abe.system.entry.js → p-a4686344.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-edcfb3a3.js → p-a6f77d44.js} +1 -1
- package/dist/zonos-elements/{p-b21b0330.entry.js → p-a8f421ac.entry.js} +1 -1
- package/dist/zonos-elements/{p-18149db1.entry.js → p-aa40d402.entry.js} +1 -1
- package/dist/zonos-elements/{p-536f69eb.entry.js → p-ad1e1dbc.entry.js} +1 -1
- package/dist/zonos-elements/p-b1bfeec9.system.entry.js +1 -0
- package/dist/zonos-elements/p-b2d81c98.js +1 -0
- package/dist/zonos-elements/{p-7777d85f.system.entry.js → p-baa88176.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ad099ec.system.entry.js → p-bf9cb85f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bfdb4e7a.entry.js +1 -0
- package/dist/zonos-elements/{p-858b7908.system.entry.js → p-c345b306.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-22cb6880.system.entry.js → p-d1697144.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d1c0bf92.entry.js +1 -0
- package/dist/zonos-elements/{p-16678764.js → p-d6a53ea6.js} +1 -1
- package/dist/zonos-elements/{p-265af369.system.entry.js → p-db424e02.system.entry.js} +1 -1
- package/dist/zonos-elements/p-eb77c0bf.system.js +1 -0
- package/dist/zonos-elements/{p-30778fde.system.entry.js → p-ef1ccec6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-42a9557f.entry.js → p-fdf5b8f4.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/CheckoutConfig-eb7d6954.js +0 -1
- package/dist/esm-es5/cart-5835676d.js +0 -1
- package/dist/esm-es5/handleFetch-621e45bc.js +0 -1
- package/dist/zonos-elements/p-0de2c731.system.js +0 -1
- package/dist/zonos-elements/p-0fc02cde.js +0 -1
- package/dist/zonos-elements/p-1b75aa35.system.js +0 -1
- package/dist/zonos-elements/p-3a50124e.entry.js +0 -1
- package/dist/zonos-elements/p-3f1a2d31.js +0 -1
- package/dist/zonos-elements/p-5e1b2654.system.js +0 -1
- package/dist/zonos-elements/p-666164d9.system.js +0 -1
- package/dist/zonos-elements/p-9f78b79e.entry.js +0 -1
- package/dist/zonos-elements/p-a2b55d11.entry.js +0 -1
- package/dist/zonos-elements/p-aafcd40f.system.entry.js +0 -1
- package/dist/zonos-elements/p-b922c441.system.js +0 -1
- package/dist/zonos-elements/p-ba027b70.system.entry.js +0 -1
- package/dist/zonos-elements/p-c4e0f49a.system.entry.js +0 -1
- package/dist/zonos-elements/p-dbd23bea.entry.js +0 -1
- package/dist/zonos-elements/p-f9664811.js +0 -1
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
9
9
|
require('./VarianceTest-0cb1e118.js');
|
|
10
10
|
|
|
11
11
|
const zonosCardCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";
|
|
@@ -3,20 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
6
|
+
const cart = require('./cart-2ec8cac2.js');
|
|
7
|
+
const localization = require('./localization-9b43376c.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const paypal = require('./paypal-
|
|
10
|
-
const zonosStore = require('./zonosStore-
|
|
11
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const paypal = require('./paypal-6449314e.js');
|
|
10
|
+
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
11
|
+
const handleFetch = require('./handleFetch-05227713.js');
|
|
12
12
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
13
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
13
|
+
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
14
14
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
15
|
-
const isDarkColor = require('./isDarkColor-
|
|
15
|
+
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
16
16
|
const isColorVariable = require('./isColorVariable-525dbfa7.js');
|
|
17
|
+
const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-a31bb681.js');
|
|
17
18
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
|
|
18
19
|
const TaxId = require('./TaxId-12acedde.js');
|
|
19
20
|
require('./VarianceTest-0cb1e118.js');
|
|
21
|
+
require('./debounce-465a4328.js');
|
|
20
22
|
|
|
21
23
|
const getDisplayCurrency = () => {
|
|
22
24
|
var _a, _b;
|
|
@@ -2089,12 +2091,12 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
2089
2091
|
'--zonos--progress-percent': this.getTotalSuccessStep(),
|
|
2090
2092
|
} }, index.h("div", { key: 'd173893ab0da684a189127ab511db90ba3a0985c', class: "zonos--tab-wrapper" }, Object.values(cart.cartStore.tabItems).map((tab, index$1) => {
|
|
2091
2093
|
const isSelected = tab.value === selectedStep;
|
|
2092
|
-
return (index.h("button", { class: classes.classes([
|
|
2094
|
+
return (index.h("button", { "aria-label": `Tab ${tab.label}`, class: classes.classes([
|
|
2093
2095
|
'zonos--tab-item',
|
|
2094
2096
|
tab.value === selectedStep && 'selected',
|
|
2095
2097
|
tab.isDone && 'done',
|
|
2096
2098
|
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => this.setTabSelected(tab.value) }, index.h("div", { class: "zonos--tab-index" }, index.h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index$1 + 1), index.h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), index.h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, localization.translate(tab.label))));
|
|
2097
|
-
})), index.h("div", { key: '
|
|
2099
|
+
})), index.h("div", { key: 'e424eda69e8338599446f71f407c76617d2b79cf', class: "zonos--tab-progress" }, index.h("div", { key: 'acccc44ce950da71c8c0ee0798dc2086d9656ed2', class: "zonos--progress-bar-fill" }))));
|
|
2098
2100
|
}
|
|
2099
2101
|
static get assetsDirs() { return ["assets"]; }
|
|
2100
2102
|
get ele() { return index.getElement(this); }
|
|
@@ -2348,6 +2350,7 @@ const ZonosCustomerInfo = class {
|
|
|
2348
2350
|
index.registerInstance(this, hostRef);
|
|
2349
2351
|
this.continueClicked = index.createEvent(this, "continueClicked", 7);
|
|
2350
2352
|
this.testContinueClicked = index.createEvent(this, "testContinueClicked", 7);
|
|
2353
|
+
this.storeUnsubscribeList = [];
|
|
2351
2354
|
/**
|
|
2352
2355
|
* Whether or not the continue button is loading
|
|
2353
2356
|
*/
|
|
@@ -2390,10 +2393,6 @@ const ZonosCustomerInfo = class {
|
|
|
2390
2393
|
* Handler for the dialog close button
|
|
2391
2394
|
*/
|
|
2392
2395
|
this.openAddressValidationDialog = false;
|
|
2393
|
-
/**
|
|
2394
|
-
* Whether or not the custom address form is enabled
|
|
2395
|
-
*/
|
|
2396
|
-
this.shouldEnabledCustomAddress = false;
|
|
2397
2396
|
/**
|
|
2398
2397
|
* Handler for the email error state
|
|
2399
2398
|
*/
|
|
@@ -2402,6 +2401,9 @@ const ZonosCustomerInfo = class {
|
|
|
2402
2401
|
* Whether or not the custom address form is used
|
|
2403
2402
|
*/
|
|
2404
2403
|
this.recordedFormTypeUsed = false;
|
|
2404
|
+
this.selectedCountryCode = localization.localizationStore.selectedCountryCode;
|
|
2405
|
+
this.genericSettings = zonosStore.zonosStore.genericSettings;
|
|
2406
|
+
this.addressFormRenderType = cart.cartStore.addressFormRenderType;
|
|
2405
2407
|
/**
|
|
2406
2408
|
* Handler for invalid characters in the address
|
|
2407
2409
|
*/
|
|
@@ -2521,7 +2523,7 @@ const ZonosCustomerInfo = class {
|
|
|
2521
2523
|
};
|
|
2522
2524
|
};
|
|
2523
2525
|
this.handleValidate = () => {
|
|
2524
|
-
var _a, _b
|
|
2526
|
+
var _a, _b;
|
|
2525
2527
|
const stripeShippingAddressEventData = cart.stripeStore.stripeAddressEventData;
|
|
2526
2528
|
const stripeBillingAddressEventData = cart.stripeStore.stripeBillingAddressEventData;
|
|
2527
2529
|
const stripeLinkEventData = cart.stripeStore.stripeLinkEventData;
|
|
@@ -2535,11 +2537,11 @@ const ZonosCustomerInfo = class {
|
|
|
2535
2537
|
void ((_a = cart.stripeStore.stripeAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
|
|
2536
2538
|
void ((_b = cart.stripeStore.stripeBillingAddressElement) === null || _b === void 0 ? void 0 : _b.getValue());
|
|
2537
2539
|
// if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
|
|
2538
|
-
const isValidBilling =
|
|
2540
|
+
const isValidBilling = this.addressFormRenderType === 'zonos'
|
|
2539
2541
|
? this.validateCustomAddressForm('billing').isValid
|
|
2540
2542
|
: isValidStripeBilling;
|
|
2541
2543
|
// if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
|
|
2542
|
-
const isValidShipping =
|
|
2544
|
+
const isValidShipping = this.addressFormRenderType === 'zonos'
|
|
2543
2545
|
? this.validateCustomAddressForm('shipping').isValid
|
|
2544
2546
|
: isValidStripeShipping;
|
|
2545
2547
|
if (!isValidLink && (stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.empty)) {
|
|
@@ -2591,8 +2593,7 @@ const ZonosCustomerInfo = class {
|
|
|
2591
2593
|
};
|
|
2592
2594
|
};
|
|
2593
2595
|
this.renderAddressComponent = (type) => {
|
|
2594
|
-
|
|
2595
|
-
if (!localization.localizationStore.selectedCountryCode) {
|
|
2596
|
+
if (!this.selectedCountryCode) {
|
|
2596
2597
|
void handleFetch.sendErrorLog({
|
|
2597
2598
|
endpoint: 'NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT',
|
|
2598
2599
|
errors: ['No country selected when rendering address component'],
|
|
@@ -2604,29 +2605,23 @@ const ZonosCustomerInfo = class {
|
|
|
2604
2605
|
}
|
|
2605
2606
|
// Only use the default address for shipping address
|
|
2606
2607
|
const defaultAddress = type === 'shipping' ? this.defaultAddress : [];
|
|
2607
|
-
const shouldUseCustomAddressForm = !!localization.localizationStore.selectedCountryCode &&
|
|
2608
|
-
this.shouldEnabledCustomAddress &&
|
|
2609
|
-
!!((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.countryCustomAddressEnabled) === null || _b === void 0 ? void 0 : _b.includes(localization.localizationStore.selectedCountryCode));
|
|
2610
2608
|
// Should only record the form type used once
|
|
2611
2609
|
if (type === 'shipping' &&
|
|
2612
2610
|
localization.storageStore.checkoutSessionId &&
|
|
2613
2611
|
!this.recordedFormTypeUsed) {
|
|
2614
|
-
void
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
],
|
|
2623
|
-
},
|
|
2624
|
-
method: 'POST',
|
|
2612
|
+
void updateCheckoutSessionAttributes.updateCheckoutSessionAttributes({
|
|
2613
|
+
attributes: [
|
|
2614
|
+
{
|
|
2615
|
+
key: 'ZONOS_FORM_TYPE_USING',
|
|
2616
|
+
value: this.addressFormRenderType === 'zonos' ? 'custom' : 'stripe',
|
|
2617
|
+
},
|
|
2618
|
+
],
|
|
2619
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
2625
2620
|
});
|
|
2626
2621
|
this.recordedFormTypeUsed = true;
|
|
2627
2622
|
}
|
|
2628
2623
|
// Render custom address component if the custom address form is enabled
|
|
2629
|
-
if (
|
|
2624
|
+
if (this.addressFormRenderType === 'zonos') {
|
|
2630
2625
|
return (index.h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: localization.translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }));
|
|
2631
2626
|
}
|
|
2632
2627
|
// Render Stripe address component by default
|
|
@@ -2664,8 +2659,41 @@ const ZonosCustomerInfo = class {
|
|
|
2664
2659
|
}
|
|
2665
2660
|
return invalidList;
|
|
2666
2661
|
}
|
|
2662
|
+
watchShouldEnabledCustomAddress() {
|
|
2663
|
+
var _a, _b, _c;
|
|
2664
|
+
const shouldEnabledCustomAddress = this.shouldUseCustomAddressFormOverride ||
|
|
2665
|
+
!!((_a = this.genericSettings) === null || _a === void 0 ? void 0 : _a.shouldEnabledCustomAddress);
|
|
2666
|
+
const shouldUseCustomAddressForm = !!this.selectedCountryCode &&
|
|
2667
|
+
shouldEnabledCustomAddress &&
|
|
2668
|
+
!!((_c = (_b = this.genericSettings) === null || _b === void 0 ? void 0 : _b.countryCustomAddressEnabled) === null || _c === void 0 ? void 0 : _c.includes(this.selectedCountryCode));
|
|
2669
|
+
// Update the address form render type in the cart store
|
|
2670
|
+
cart.cartStore.addressFormRenderType = shouldUseCustomAddressForm
|
|
2671
|
+
? 'zonos'
|
|
2672
|
+
: 'stripe';
|
|
2673
|
+
}
|
|
2674
|
+
disconnectedCallback() {
|
|
2675
|
+
// unsubscribe from store subscriptions
|
|
2676
|
+
try {
|
|
2677
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
2678
|
+
}
|
|
2679
|
+
catch (_a) { }
|
|
2680
|
+
}
|
|
2681
|
+
componentWillLoad() {
|
|
2682
|
+
this.watchShouldEnabledCustomAddress();
|
|
2683
|
+
this.storeUnsubscribeList = [
|
|
2684
|
+
zonosStore.zonosStoreOnChange('genericSettings', () => {
|
|
2685
|
+
this.genericSettings = zonosStore.zonosStore.genericSettings;
|
|
2686
|
+
}),
|
|
2687
|
+
localization.localizationStoreOnChange('selectedCountryCode', () => {
|
|
2688
|
+
this.selectedCountryCode = localization.localizationStore.selectedCountryCode;
|
|
2689
|
+
}),
|
|
2690
|
+
cart.cartStoreOnChange('addressFormRenderType', () => {
|
|
2691
|
+
this.addressFormRenderType = cart.cartStore.addressFormRenderType;
|
|
2692
|
+
}),
|
|
2693
|
+
];
|
|
2694
|
+
}
|
|
2667
2695
|
render() {
|
|
2668
|
-
var _a, _b, _c, _d, _e, _f
|
|
2696
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2669
2697
|
if (!cart.stripeStore.stripeElements) {
|
|
2670
2698
|
return null;
|
|
2671
2699
|
}
|
|
@@ -2681,16 +2709,13 @@ const ZonosCustomerInfo = class {
|
|
|
2681
2709
|
this.shippingCountry =
|
|
2682
2710
|
cart.stripeStore.stripeAddressEventData.value.address.country;
|
|
2683
2711
|
}
|
|
2684
|
-
this.shouldEnabledCustomAddress =
|
|
2685
|
-
this.shouldUseCustomAddressFormOverride ||
|
|
2686
|
-
!!((_b = zonosStore.zonosStore.genericSettings) === null || _b === void 0 ? void 0 : _b.shouldEnabledCustomAddress);
|
|
2687
2712
|
const showBilling = !cart.stripeStore.stripeShippingSameAsBilling;
|
|
2688
2713
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
2689
2714
|
const theme = zonosStore.getZonosStoreTheme(zonosStore.zonosStore.appearance.theme);
|
|
2690
2715
|
// Attempt to get the email from email from customer profile's locations, if not provided, just use the email from root customer profile
|
|
2691
|
-
const defaultEmail = ((
|
|
2692
|
-
((
|
|
2693
|
-
((
|
|
2716
|
+
const defaultEmail = ((_b = this.defaultAddress.find(Boolean)) === null || _b === void 0 ? void 0 : _b.email) ||
|
|
2717
|
+
((_e = (_d = (_c = cart.stripeStore.customerProfile) === null || _c === void 0 ? void 0 : _c.locations) === null || _d === void 0 ? void 0 : _d.find(Boolean)) === null || _e === void 0 ? void 0 : _e.email) ||
|
|
2718
|
+
((_f = cart.stripeStore.customerProfile) === null || _f === void 0 ? void 0 : _f.email);
|
|
2694
2719
|
return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Customer information')), this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, localization.translate('Missing required fields. Make sure all fields are completed.'))), index.h("zonos-link-authentication", { defaultEmail: defaultEmail, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: localization.translate('Contact') }), this.renderAddressComponent('shipping'), index.h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: cart.stripeStore.stripeShippingSameAsBilling, label: localization.translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
2695
2720
|
cart.stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
2696
2721
|
} }), index.h("zonos-collapse", { collapsed: !showBilling }, this.renderAddressComponent('billing')), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
@@ -2712,7 +2737,10 @@ const ZonosCustomerInfo = class {
|
|
|
2712
2737
|
}
|
|
2713
2738
|
get el() { return index.getElement(this); }
|
|
2714
2739
|
static get watchers() { return {
|
|
2715
|
-
"showErrorBanner": ["watchShowErrorBanner"]
|
|
2740
|
+
"showErrorBanner": ["watchShowErrorBanner"],
|
|
2741
|
+
"shouldUseCustomAddressFormOverride": ["watchShouldEnabledCustomAddress"],
|
|
2742
|
+
"genericSettings": ["watchShouldEnabledCustomAddress"],
|
|
2743
|
+
"selectedCountryCode": ["watchShouldEnabledCustomAddress"]
|
|
2716
2744
|
}; }
|
|
2717
2745
|
};
|
|
2718
2746
|
ZonosCustomerInfo.style = ZonosCustomerInfoStyle0;
|
|
@@ -2857,6 +2885,7 @@ const ZonosShipping = class {
|
|
|
2857
2885
|
constructor(hostRef) {
|
|
2858
2886
|
index.registerInstance(this, hostRef);
|
|
2859
2887
|
this.continueClicked = index.createEvent(this, "continueClicked", 7);
|
|
2888
|
+
this.storeUnsubscribeList = [];
|
|
2860
2889
|
/**
|
|
2861
2890
|
* Whether or not the continue button is loading
|
|
2862
2891
|
*/
|
|
@@ -2877,6 +2906,7 @@ const ZonosShipping = class {
|
|
|
2877
2906
|
this.serviceLevelsOther = [];
|
|
2878
2907
|
this.serviceLevelsAll = [];
|
|
2879
2908
|
this.displayBaseCurrency = false;
|
|
2909
|
+
this.shippingData = [];
|
|
2880
2910
|
this.handleRadioSelected = async (e) => {
|
|
2881
2911
|
var _a;
|
|
2882
2912
|
this.selectedShippingMethod = e.detail;
|
|
@@ -2888,6 +2918,8 @@ const ZonosShipping = class {
|
|
|
2888
2918
|
return;
|
|
2889
2919
|
}
|
|
2890
2920
|
this.isSelecting = true;
|
|
2921
|
+
// update the address async if we already got landed cost data
|
|
2922
|
+
await cart.stripeStoreAsyncAddressUpdate();
|
|
2891
2923
|
// save selected shipping option to store
|
|
2892
2924
|
await cart.cartStoreUpdateSelectedShippingOption(selectedShippingOption, e.detail.landedCostId);
|
|
2893
2925
|
this.isSelecting = false;
|
|
@@ -2942,6 +2974,7 @@ const ZonosShipping = class {
|
|
|
2942
2974
|
};
|
|
2943
2975
|
this.initServiceLevels = () => {
|
|
2944
2976
|
var _a;
|
|
2977
|
+
this.collapsedDAPOptions = true;
|
|
2945
2978
|
const serviceLevels = ((_a = cart.cartStore.shippingData) === null || _a === void 0 ? void 0 : _a.flatMap(item => {
|
|
2946
2979
|
var _a;
|
|
2947
2980
|
const transitData = cart.cartStoreGetShippingTransitInfo(item);
|
|
@@ -2999,12 +3032,14 @@ const ZonosShipping = class {
|
|
|
2999
3032
|
}
|
|
3000
3033
|
return false;
|
|
3001
3034
|
};
|
|
3002
|
-
this.preselectFirstShippingMethod = () => {
|
|
3035
|
+
this.preselectFirstShippingMethod = async () => {
|
|
3003
3036
|
this.initServiceLevels();
|
|
3004
3037
|
const selectedServiceLevel = this.serviceLevelsAll.find(item => { var _a; return item.shipmentRatingId === ((_a = cart.cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
|
|
3005
3038
|
if (selectedServiceLevel) {
|
|
3006
3039
|
// keep the selected shipping method
|
|
3007
|
-
this.
|
|
3040
|
+
void this.handleRadioSelected({
|
|
3041
|
+
detail: selectedServiceLevel,
|
|
3042
|
+
});
|
|
3008
3043
|
return;
|
|
3009
3044
|
}
|
|
3010
3045
|
const firstServiceLevel = this.serviceLevelsAll.find(Boolean);
|
|
@@ -3016,16 +3051,30 @@ const ZonosShipping = class {
|
|
|
3016
3051
|
}
|
|
3017
3052
|
};
|
|
3018
3053
|
}
|
|
3054
|
+
disconnectedCallback() {
|
|
3055
|
+
// unsubscribe from store subscriptions
|
|
3056
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
3057
|
+
}
|
|
3019
3058
|
componentWillLoad() {
|
|
3020
|
-
this.preselectFirstShippingMethod();
|
|
3059
|
+
void this.preselectFirstShippingMethod();
|
|
3060
|
+
this.storeUnsubscribeList = [
|
|
3061
|
+
cart.cartStoreOnChange('shippingData', () => {
|
|
3062
|
+
if (this.isOutdatedShippingData()) {
|
|
3063
|
+
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
3064
|
+
void this.preselectFirstShippingMethod();
|
|
3065
|
+
}
|
|
3066
|
+
}),
|
|
3067
|
+
cart.cartStoreOnChange('landedCostData', () => {
|
|
3068
|
+
if (this.isOutdatedShippingData()) {
|
|
3069
|
+
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
3070
|
+
void this.preselectFirstShippingMethod();
|
|
3071
|
+
}
|
|
3072
|
+
}),
|
|
3073
|
+
];
|
|
3021
3074
|
}
|
|
3022
3075
|
render() {
|
|
3023
|
-
if (this.isOutdatedShippingData()) {
|
|
3024
|
-
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
3025
|
-
this.preselectFirstShippingMethod();
|
|
3026
|
-
}
|
|
3027
3076
|
// re-init service levels if the currency is toggled
|
|
3028
|
-
|
|
3077
|
+
if (this.isCurrencyToggled()) {
|
|
3029
3078
|
this.initServiceLevels();
|
|
3030
3079
|
}
|
|
3031
3080
|
const defaultShownServiceLevels = [
|
|
@@ -3,19 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
8
|
-
const localization = require('./localization-
|
|
9
|
-
const zonosStore = require('./zonosStore-
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
6
|
+
const cart = require('./cart-2ec8cac2.js');
|
|
7
|
+
const paypal = require('./paypal-6449314e.js');
|
|
8
|
+
const localization = require('./localization-9b43376c.js');
|
|
9
|
+
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
10
|
+
const handleFetch = require('./handleFetch-05227713.js');
|
|
11
|
+
const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-a31bb681.js');
|
|
12
|
+
const CheckoutConfig = require('./CheckoutConfig-27c82f94.js');
|
|
11
13
|
const classes = require('./classes-b7918f56.js');
|
|
12
14
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
13
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
14
|
-
const isDarkColor = require('./isDarkColor-
|
|
15
|
+
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
16
|
+
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
15
17
|
const styles = require('./styles-d1e64fb9.js');
|
|
16
|
-
const CheckoutConfig = require('./CheckoutConfig-4afc683b.js');
|
|
17
18
|
const RemoveIcon = require('./RemoveIcon-081ac073.js');
|
|
18
19
|
require('./VarianceTest-0cb1e118.js');
|
|
20
|
+
require('./debounce-465a4328.js');
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Map the items from tempCart like how we do it in dgs
|
|
@@ -989,6 +991,29 @@ const ZonosCheckout = class {
|
|
|
989
991
|
this.placedOrderInfo = existingPlacedOrderInfo;
|
|
990
992
|
handleFetch.log('=== Showing order duplication confirmation', 'warn');
|
|
991
993
|
}
|
|
994
|
+
recordCheckoutInfo() {
|
|
995
|
+
if (!localization.storageStore.checkoutSessionId) {
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
// Record the order duplication consent so we know user did see the notification and proceed with the order duplication
|
|
999
|
+
void updateCheckoutSessionAttributes.updateCheckoutSessionAttributes({
|
|
1000
|
+
attributes: [
|
|
1001
|
+
{
|
|
1002
|
+
key: 'APP_VERSION',
|
|
1003
|
+
value: window.Zonos.version,
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
key: 'APP_VERSION_NPM_INTEGRATION',
|
|
1007
|
+
value: window.Zonos.isNpm ? '1' : '0',
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
key: 'LEGACY_CHECKOUT_FACADE',
|
|
1011
|
+
value: window.Zonos.isLegacyCheckout ? '1' : '0',
|
|
1012
|
+
},
|
|
1013
|
+
],
|
|
1014
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
992
1017
|
confirmProceedWithOrderDuplication() {
|
|
993
1018
|
// Reset the placed order info
|
|
994
1019
|
this.placedOrderInfo = null;
|
|
@@ -996,17 +1021,18 @@ const ZonosCheckout = class {
|
|
|
996
1021
|
return;
|
|
997
1022
|
}
|
|
998
1023
|
// Record the order duplication consent so we know user did see the notification and proceed with the order duplication
|
|
999
|
-
void
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1024
|
+
void updateCheckoutSessionAttributes.updateCheckoutSessionAttributes({
|
|
1025
|
+
attributes: [{ key: 'ORDER_DUPLICATION_CONSENT', value: '1' }],
|
|
1026
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
markTheSessionAsAbandonedCart() {
|
|
1030
|
+
if (!localization.storageStore.checkoutSessionId) {
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
void updateCheckoutSessionAttributes.updateCheckoutSessionAttributes({
|
|
1034
|
+
attributes: [{ key: 'WITH_ABANDONED_CART_TOKEN', value: '1' }],
|
|
1035
|
+
checkoutSessionId: localization.storageStore.checkoutSessionId,
|
|
1010
1036
|
});
|
|
1011
1037
|
}
|
|
1012
1038
|
handleCancelOrderDuplication() {
|
|
@@ -1153,6 +1179,12 @@ const ZonosCheckout = class {
|
|
|
1153
1179
|
const loadTime = endTime - startTime;
|
|
1154
1180
|
void sendLoadNativeCheckoutLog({ loadTime });
|
|
1155
1181
|
}
|
|
1182
|
+
this.recordCheckoutInfo();
|
|
1183
|
+
// update checkout session attribute to know the current cart is abandoned
|
|
1184
|
+
const isAbandonedCart = !!CheckoutConfig.getAbandonedCartRenewTokenValue();
|
|
1185
|
+
if (isAbandonedCart) {
|
|
1186
|
+
this.markTheSessionAsAbandonedCart();
|
|
1187
|
+
}
|
|
1156
1188
|
}
|
|
1157
1189
|
catch (err) {
|
|
1158
1190
|
if (err instanceof Error) {
|
|
@@ -1439,6 +1471,7 @@ const ZonosCheckout = class {
|
|
|
1439
1471
|
}
|
|
1440
1472
|
}
|
|
1441
1473
|
async handleCustomerInfoContinue() {
|
|
1474
|
+
var _a, _b, _c, _d;
|
|
1442
1475
|
// submit google tag when the form is complete
|
|
1443
1476
|
paypal.submitGtag('zonos-checkout-customer-info');
|
|
1444
1477
|
const checkoutSessionId = localization.storageStore.checkoutSessionId;
|
|
@@ -1448,10 +1481,26 @@ const ZonosCheckout = class {
|
|
|
1448
1481
|
});
|
|
1449
1482
|
this.submitLoading = true;
|
|
1450
1483
|
// fetch landed cost data if we not fetching.
|
|
1451
|
-
await cart.stripeStorePrefetchLandedCost();
|
|
1452
|
-
//
|
|
1453
|
-
|
|
1454
|
-
|
|
1484
|
+
const { isRequestNotReady } = await cart.stripeStorePrefetchLandedCost();
|
|
1485
|
+
// If the request is not ready at the time user click Continue, logging it out so we can investigate the issue
|
|
1486
|
+
if (isRequestNotReady && cart.cartStore.addressFormRenderType === 'stripe') {
|
|
1487
|
+
void handleFetch.sendErrorLog({
|
|
1488
|
+
endpoint: 'ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE',
|
|
1489
|
+
errors: ['Address not ready at customer info continue'],
|
|
1490
|
+
metadata: {
|
|
1491
|
+
address: (_b = (_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.address,
|
|
1492
|
+
billingAddress: (_d = (_c = cart.stripeStore.stripeBillingAddressEventData) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.address,
|
|
1493
|
+
cartId: window.Zonos.cartId,
|
|
1494
|
+
},
|
|
1495
|
+
});
|
|
1496
|
+
}
|
|
1497
|
+
const moveToNextStep = (interval) => {
|
|
1498
|
+
if (cart.cartStore.step !== 'customer-info') {
|
|
1499
|
+
// stop interval if the step is not customer-info
|
|
1500
|
+
clearInterval(interval);
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
if (!cart.stripeStore.isFetchingLandedCost) {
|
|
1455
1504
|
if (cart.cartStore.landedCostData) {
|
|
1456
1505
|
// start init paypal with the presentment currency when landed cost is fetched
|
|
1457
1506
|
void paypal.paypalInitScript({
|
|
@@ -1461,17 +1510,24 @@ const ZonosCheckout = class {
|
|
|
1461
1510
|
cart.cartStoreNextStep();
|
|
1462
1511
|
}
|
|
1463
1512
|
this.submitLoading = false;
|
|
1464
|
-
|
|
1513
|
+
if (interval) {
|
|
1514
|
+
clearInterval(interval);
|
|
1515
|
+
}
|
|
1465
1516
|
}
|
|
1466
|
-
}
|
|
1517
|
+
};
|
|
1518
|
+
// Immediately move to the next step
|
|
1519
|
+
moveToNextStep();
|
|
1520
|
+
// keep checking landed cost data until it's ready to move to next screen
|
|
1521
|
+
const interval = setInterval(() => {
|
|
1522
|
+
moveToNextStep(interval);
|
|
1523
|
+
}, 20);
|
|
1524
|
+
// cleanup interval if no data is fetched after 10 seconds
|
|
1525
|
+
setTimeout(() => {
|
|
1526
|
+
clearInterval(interval);
|
|
1527
|
+
}, 10000);
|
|
1467
1528
|
}
|
|
1468
1529
|
async handleShippingContinue() {
|
|
1469
|
-
|
|
1470
|
-
// show loading for the button for a bit
|
|
1471
|
-
setTimeout(() => {
|
|
1472
|
-
cart.cartStoreNextStep();
|
|
1473
|
-
this.submitLoading = false;
|
|
1474
|
-
}, 500);
|
|
1530
|
+
cart.cartStoreNextStep();
|
|
1475
1531
|
}
|
|
1476
1532
|
handleInventoryCheckDialogConfirm() {
|
|
1477
1533
|
// reset inventory check message to close the inventory check alert
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
7
7
|
require('./VarianceTest-0cb1e118.js');
|
|
8
8
|
|
|
9
9
|
const zonosCollapseCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
8
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-2ec8cac2.js');
|
|
7
|
+
const localization = require('./localization-9b43376c.js');
|
|
8
|
+
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
9
9
|
const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
11
|
-
require('./isDarkColor-
|
|
12
|
-
require('./getBorderRadius-
|
|
10
|
+
const handleFetch = require('./handleFetch-05227713.js');
|
|
11
|
+
require('./isDarkColor-428965f4.js');
|
|
12
|
+
require('./getBorderRadius-1b5e33cf.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
14
14
|
|
|
15
15
|
const getZonosSettings = async () => {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const localization = require('./localization-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const localization = require('./localization-9b43376c.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-05227713.js');
|
|
10
10
|
require('./VarianceTest-0cb1e118.js');
|
|
11
11
|
|
|
12
12
|
const zonosCountryFlagCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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}";
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const localization = require('./localization-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const localization = require('./localization-9b43376c.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
|
-
const isDarkColor = require('./isDarkColor-
|
|
9
|
+
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
10
10
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
12
|
-
require('./handleFetch-
|
|
12
|
+
require('./handleFetch-05227713.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -1841,9 +1841,9 @@ const ZonosCountrySelect = class {
|
|
|
1841
1841
|
};
|
|
1842
1842
|
}
|
|
1843
1843
|
componentDidRender() {
|
|
1844
|
-
var _a
|
|
1845
|
-
|
|
1846
|
-
(
|
|
1844
|
+
var _a;
|
|
1845
|
+
this.inputRef.autocomplete = 'off';
|
|
1846
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1847
1847
|
}
|
|
1848
1848
|
render() {
|
|
1849
1849
|
const { helloCountryList } = localization.localizationStore;
|
|
@@ -1858,9 +1858,13 @@ const ZonosCountrySelect = class {
|
|
|
1858
1858
|
? fuseObject.map(country => country.item)
|
|
1859
1859
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1860
1860
|
const isEmpty = !filteredCountries.length;
|
|
1861
|
-
return (index.h(index.Host, { key: '
|
|
1861
|
+
return (index.h(index.Host, { key: '83c9005b99e1dc8d3b4a4d50e6edbed0f17ce6e0', class: "zonos--elements", style: {
|
|
1862
1862
|
'--zonos--font-family': zonosStore.zonosStoreFontFamily(),
|
|
1863
|
-
} }, index.h("div", { key: '
|
|
1863
|
+
} }, index.h("div", { key: '173d6c9d1808e80cdcb808b6418a9e3928e6a971', class: "zonos--country-select" }, index.h("zonos-v-stack", { key: '47118836d03e8505f9bd87e795387ea19cf67843', class: "zonos--country-select-header", spacing: 8 }, index.h("zonos-select-dialog-header", { key: 'c5be83953dd01e47dbe814cbe83a114d700de830', handleOnClose: () => this.handleOnClose(), label: localization.translate('Select a country') }, index.h("input", { key: '2afe5eed1f156b8923a10564cf2b96d2cd6eb9bb', autoComplete: "off", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: localization.translate('Search countries'), ref: el => {
|
|
1864
|
+
if (el) {
|
|
1865
|
+
this.inputRef = el;
|
|
1866
|
+
}
|
|
1867
|
+
}, type: "text", value: this.inputValue }))), index.h("div", { key: '4d64a4d3c08292ae1f574973c09aa9ec42b48c37', class: "zonos--country-select-content" }, isEmpty && (index.h("zonos-text", { key: 'dc30685daa60063cb9e6c6e7730f54cc5a25249b', class: "no-country", textColor: "gray-800" }, localization.translate('No countries found'))), index.h("zonos-virtual-scroll", { key: '69f6d39cf40abd951857542d734424623cbd7031', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index$1 => {
|
|
1864
1868
|
const country = filteredCountries[index$1];
|
|
1865
1869
|
if (!country) {
|
|
1866
1870
|
return null;
|