@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-5ea9f81d.js';
|
|
2
|
-
import {
|
|
2
|
+
import { f as zonosStoreFontFamily } from './zonosStore-00975763.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-71b3b8ab.js';
|
|
5
5
|
import './VarianceTest-fef2d958.js';
|
|
6
6
|
|
|
7
7
|
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)}";
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-5ea9f81d.js';
|
|
2
|
-
import { e as cartStore, A as cartStoreHasOneEligibleItem, B as stripeStoreApplyPromoCode, C as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, D as stripeStoreResetPromoCode, E as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, F as stripeStoreTranslateAddressToLatin, G as
|
|
3
|
-
import { d as currencyFormat, t as translate, s as storageStore, l as localizationStore } from './localization-
|
|
2
|
+
import { e as cartStore, A as cartStoreHasOneEligibleItem, B as stripeStoreApplyPromoCode, C as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, D as stripeStoreResetPromoCode, E as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, F as stripeStoreTranslateAddressToLatin, G as cartStoreOnChange, H as stripeStoreAsyncAddressUpdate, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo, K as sortServiceLevelOptionsByAmount, L as cartStoreGetMethod } from './cart-2f84f632.js';
|
|
3
|
+
import { d as currencyFormat, t as translate, s as storageStore, l as localizationStore, c as localizationStoreOnChange } from './localization-e17c211b.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { s as submitGtag, c as paypalStoreReset,
|
|
6
|
-
import { z as zonosStore, g as getZonosStoreTheme,
|
|
7
|
-
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, i as isCheckoutMobile, b as logError, a as getIsStagingMode } from './handleFetch-
|
|
5
|
+
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-1cf701aa.js';
|
|
6
|
+
import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily, h as zonosStoreOnChange } from './zonosStore-00975763.js';
|
|
7
|
+
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, i as isCheckoutMobile, b as logError, a as getIsStagingMode } from './handleFetch-7dd4622b.js';
|
|
8
8
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
9
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
9
|
+
import { g as getBorderRadius } from './getBorderRadius-71b3b8ab.js';
|
|
10
10
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
11
|
-
import { i as isDarkColor, t as tinycolor } from './isDarkColor-
|
|
11
|
+
import { i as isDarkColor, t as tinycolor } from './isDarkColor-3a9d6108.js';
|
|
12
12
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|
|
13
|
+
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-5097e715.js';
|
|
13
14
|
import { s as shouldRenderTaxIdInput, c as containsNonLatinChars } from './shouldRenderTaxIdInput-8bc112bb.js';
|
|
14
15
|
import { e as euCountryCodes } from './TaxId-50d72254.js';
|
|
15
16
|
import './VarianceTest-fef2d958.js';
|
|
17
|
+
import './debounce-0e42da22.js';
|
|
16
18
|
|
|
17
19
|
const getDisplayCurrency = () => {
|
|
18
20
|
var _a, _b;
|
|
@@ -2085,12 +2087,12 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
2085
2087
|
'--zonos--progress-percent': this.getTotalSuccessStep(),
|
|
2086
2088
|
} }, h("div", { key: 'd173893ab0da684a189127ab511db90ba3a0985c', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
2087
2089
|
const isSelected = tab.value === selectedStep;
|
|
2088
|
-
return (h("button", { class: classes([
|
|
2090
|
+
return (h("button", { "aria-label": `Tab ${tab.label}`, class: classes([
|
|
2089
2091
|
'zonos--tab-item',
|
|
2090
2092
|
tab.value === selectedStep && 'selected',
|
|
2091
2093
|
tab.isDone && 'done',
|
|
2092
2094
|
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => this.setTabSelected(tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, translate(tab.label))));
|
|
2093
|
-
})), h("div", { key: '
|
|
2095
|
+
})), h("div", { key: 'e424eda69e8338599446f71f407c76617d2b79cf', class: "zonos--tab-progress" }, h("div", { key: 'acccc44ce950da71c8c0ee0798dc2086d9656ed2', class: "zonos--progress-bar-fill" }))));
|
|
2094
2096
|
}
|
|
2095
2097
|
static get assetsDirs() { return ["assets"]; }
|
|
2096
2098
|
get ele() { return getElement(this); }
|
|
@@ -2344,6 +2346,7 @@ const ZonosCustomerInfo = class {
|
|
|
2344
2346
|
registerInstance(this, hostRef);
|
|
2345
2347
|
this.continueClicked = createEvent(this, "continueClicked", 7);
|
|
2346
2348
|
this.testContinueClicked = createEvent(this, "testContinueClicked", 7);
|
|
2349
|
+
this.storeUnsubscribeList = [];
|
|
2347
2350
|
/**
|
|
2348
2351
|
* Whether or not the continue button is loading
|
|
2349
2352
|
*/
|
|
@@ -2386,10 +2389,6 @@ const ZonosCustomerInfo = class {
|
|
|
2386
2389
|
* Handler for the dialog close button
|
|
2387
2390
|
*/
|
|
2388
2391
|
this.openAddressValidationDialog = false;
|
|
2389
|
-
/**
|
|
2390
|
-
* Whether or not the custom address form is enabled
|
|
2391
|
-
*/
|
|
2392
|
-
this.shouldEnabledCustomAddress = false;
|
|
2393
2392
|
/**
|
|
2394
2393
|
* Handler for the email error state
|
|
2395
2394
|
*/
|
|
@@ -2398,6 +2397,9 @@ const ZonosCustomerInfo = class {
|
|
|
2398
2397
|
* Whether or not the custom address form is used
|
|
2399
2398
|
*/
|
|
2400
2399
|
this.recordedFormTypeUsed = false;
|
|
2400
|
+
this.selectedCountryCode = localizationStore.selectedCountryCode;
|
|
2401
|
+
this.genericSettings = zonosStore.genericSettings;
|
|
2402
|
+
this.addressFormRenderType = cartStore.addressFormRenderType;
|
|
2401
2403
|
/**
|
|
2402
2404
|
* Handler for invalid characters in the address
|
|
2403
2405
|
*/
|
|
@@ -2517,7 +2519,7 @@ const ZonosCustomerInfo = class {
|
|
|
2517
2519
|
};
|
|
2518
2520
|
};
|
|
2519
2521
|
this.handleValidate = () => {
|
|
2520
|
-
var _a, _b
|
|
2522
|
+
var _a, _b;
|
|
2521
2523
|
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
2522
2524
|
const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
|
|
2523
2525
|
const stripeLinkEventData = stripeStore.stripeLinkEventData;
|
|
@@ -2531,11 +2533,11 @@ const ZonosCustomerInfo = class {
|
|
|
2531
2533
|
void ((_a = stripeStore.stripeAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
|
|
2532
2534
|
void ((_b = stripeStore.stripeBillingAddressElement) === null || _b === void 0 ? void 0 : _b.getValue());
|
|
2533
2535
|
// if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
|
|
2534
|
-
const isValidBilling =
|
|
2536
|
+
const isValidBilling = this.addressFormRenderType === 'zonos'
|
|
2535
2537
|
? this.validateCustomAddressForm('billing').isValid
|
|
2536
2538
|
: isValidStripeBilling;
|
|
2537
2539
|
// if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
|
|
2538
|
-
const isValidShipping =
|
|
2540
|
+
const isValidShipping = this.addressFormRenderType === 'zonos'
|
|
2539
2541
|
? this.validateCustomAddressForm('shipping').isValid
|
|
2540
2542
|
: isValidStripeShipping;
|
|
2541
2543
|
if (!isValidLink && (stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.empty)) {
|
|
@@ -2587,8 +2589,7 @@ const ZonosCustomerInfo = class {
|
|
|
2587
2589
|
};
|
|
2588
2590
|
};
|
|
2589
2591
|
this.renderAddressComponent = (type) => {
|
|
2590
|
-
|
|
2591
|
-
if (!localizationStore.selectedCountryCode) {
|
|
2592
|
+
if (!this.selectedCountryCode) {
|
|
2592
2593
|
void sendErrorLog({
|
|
2593
2594
|
endpoint: 'NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT',
|
|
2594
2595
|
errors: ['No country selected when rendering address component'],
|
|
@@ -2600,29 +2601,23 @@ const ZonosCustomerInfo = class {
|
|
|
2600
2601
|
}
|
|
2601
2602
|
// Only use the default address for shipping address
|
|
2602
2603
|
const defaultAddress = type === 'shipping' ? this.defaultAddress : [];
|
|
2603
|
-
const shouldUseCustomAddressForm = !!localizationStore.selectedCountryCode &&
|
|
2604
|
-
this.shouldEnabledCustomAddress &&
|
|
2605
|
-
!!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.countryCustomAddressEnabled) === null || _b === void 0 ? void 0 : _b.includes(localizationStore.selectedCountryCode));
|
|
2606
2604
|
// Should only record the form type used once
|
|
2607
2605
|
if (type === 'shipping' &&
|
|
2608
2606
|
storageStore.checkoutSessionId &&
|
|
2609
2607
|
!this.recordedFormTypeUsed) {
|
|
2610
|
-
void
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
],
|
|
2619
|
-
},
|
|
2620
|
-
method: 'POST',
|
|
2608
|
+
void updateCheckoutSessionAttributes({
|
|
2609
|
+
attributes: [
|
|
2610
|
+
{
|
|
2611
|
+
key: 'ZONOS_FORM_TYPE_USING',
|
|
2612
|
+
value: this.addressFormRenderType === 'zonos' ? 'custom' : 'stripe',
|
|
2613
|
+
},
|
|
2614
|
+
],
|
|
2615
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
2621
2616
|
});
|
|
2622
2617
|
this.recordedFormTypeUsed = true;
|
|
2623
2618
|
}
|
|
2624
2619
|
// Render custom address component if the custom address form is enabled
|
|
2625
|
-
if (
|
|
2620
|
+
if (this.addressFormRenderType === 'zonos') {
|
|
2626
2621
|
return (h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }));
|
|
2627
2622
|
}
|
|
2628
2623
|
// Render Stripe address component by default
|
|
@@ -2660,8 +2655,41 @@ const ZonosCustomerInfo = class {
|
|
|
2660
2655
|
}
|
|
2661
2656
|
return invalidList;
|
|
2662
2657
|
}
|
|
2658
|
+
watchShouldEnabledCustomAddress() {
|
|
2659
|
+
var _a, _b, _c;
|
|
2660
|
+
const shouldEnabledCustomAddress = this.shouldUseCustomAddressFormOverride ||
|
|
2661
|
+
!!((_a = this.genericSettings) === null || _a === void 0 ? void 0 : _a.shouldEnabledCustomAddress);
|
|
2662
|
+
const shouldUseCustomAddressForm = !!this.selectedCountryCode &&
|
|
2663
|
+
shouldEnabledCustomAddress &&
|
|
2664
|
+
!!((_c = (_b = this.genericSettings) === null || _b === void 0 ? void 0 : _b.countryCustomAddressEnabled) === null || _c === void 0 ? void 0 : _c.includes(this.selectedCountryCode));
|
|
2665
|
+
// Update the address form render type in the cart store
|
|
2666
|
+
cartStore.addressFormRenderType = shouldUseCustomAddressForm
|
|
2667
|
+
? 'zonos'
|
|
2668
|
+
: 'stripe';
|
|
2669
|
+
}
|
|
2670
|
+
disconnectedCallback() {
|
|
2671
|
+
// unsubscribe from store subscriptions
|
|
2672
|
+
try {
|
|
2673
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
2674
|
+
}
|
|
2675
|
+
catch (_a) { }
|
|
2676
|
+
}
|
|
2677
|
+
componentWillLoad() {
|
|
2678
|
+
this.watchShouldEnabledCustomAddress();
|
|
2679
|
+
this.storeUnsubscribeList = [
|
|
2680
|
+
zonosStoreOnChange('genericSettings', () => {
|
|
2681
|
+
this.genericSettings = zonosStore.genericSettings;
|
|
2682
|
+
}),
|
|
2683
|
+
localizationStoreOnChange('selectedCountryCode', () => {
|
|
2684
|
+
this.selectedCountryCode = localizationStore.selectedCountryCode;
|
|
2685
|
+
}),
|
|
2686
|
+
cartStoreOnChange('addressFormRenderType', () => {
|
|
2687
|
+
this.addressFormRenderType = cartStore.addressFormRenderType;
|
|
2688
|
+
}),
|
|
2689
|
+
];
|
|
2690
|
+
}
|
|
2663
2691
|
render() {
|
|
2664
|
-
var _a, _b, _c, _d, _e, _f
|
|
2692
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2665
2693
|
if (!stripeStore.stripeElements) {
|
|
2666
2694
|
return null;
|
|
2667
2695
|
}
|
|
@@ -2677,16 +2705,13 @@ const ZonosCustomerInfo = class {
|
|
|
2677
2705
|
this.shippingCountry =
|
|
2678
2706
|
stripeStore.stripeAddressEventData.value.address.country;
|
|
2679
2707
|
}
|
|
2680
|
-
this.shouldEnabledCustomAddress =
|
|
2681
|
-
this.shouldUseCustomAddressFormOverride ||
|
|
2682
|
-
!!((_b = zonosStore.genericSettings) === null || _b === void 0 ? void 0 : _b.shouldEnabledCustomAddress);
|
|
2683
2708
|
const showBilling = !stripeStore.stripeShippingSameAsBilling;
|
|
2684
2709
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
2685
2710
|
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
2686
2711
|
// Attempt to get the email from email from customer profile's locations, if not provided, just use the email from root customer profile
|
|
2687
|
-
const defaultEmail = ((
|
|
2688
|
-
((
|
|
2689
|
-
((
|
|
2712
|
+
const defaultEmail = ((_b = this.defaultAddress.find(Boolean)) === null || _b === void 0 ? void 0 : _b.email) ||
|
|
2713
|
+
((_e = (_d = (_c = 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) ||
|
|
2714
|
+
((_f = stripeStore.customerProfile) === null || _f === void 0 ? void 0 : _f.email);
|
|
2690
2715
|
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { defaultEmail: defaultEmail, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: translate('Contact') }), this.renderAddressComponent('shipping'), h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
2691
2716
|
stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
2692
2717
|
} }), h("zonos-collapse", { collapsed: !showBilling }, this.renderAddressComponent('billing')), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
@@ -2708,7 +2733,10 @@ const ZonosCustomerInfo = class {
|
|
|
2708
2733
|
}
|
|
2709
2734
|
get el() { return getElement(this); }
|
|
2710
2735
|
static get watchers() { return {
|
|
2711
|
-
"showErrorBanner": ["watchShowErrorBanner"]
|
|
2736
|
+
"showErrorBanner": ["watchShowErrorBanner"],
|
|
2737
|
+
"shouldUseCustomAddressFormOverride": ["watchShouldEnabledCustomAddress"],
|
|
2738
|
+
"genericSettings": ["watchShouldEnabledCustomAddress"],
|
|
2739
|
+
"selectedCountryCode": ["watchShouldEnabledCustomAddress"]
|
|
2712
2740
|
}; }
|
|
2713
2741
|
};
|
|
2714
2742
|
ZonosCustomerInfo.style = ZonosCustomerInfoStyle0;
|
|
@@ -2853,6 +2881,7 @@ const ZonosShipping = class {
|
|
|
2853
2881
|
constructor(hostRef) {
|
|
2854
2882
|
registerInstance(this, hostRef);
|
|
2855
2883
|
this.continueClicked = createEvent(this, "continueClicked", 7);
|
|
2884
|
+
this.storeUnsubscribeList = [];
|
|
2856
2885
|
/**
|
|
2857
2886
|
* Whether or not the continue button is loading
|
|
2858
2887
|
*/
|
|
@@ -2873,6 +2902,7 @@ const ZonosShipping = class {
|
|
|
2873
2902
|
this.serviceLevelsOther = [];
|
|
2874
2903
|
this.serviceLevelsAll = [];
|
|
2875
2904
|
this.displayBaseCurrency = false;
|
|
2905
|
+
this.shippingData = [];
|
|
2876
2906
|
this.handleRadioSelected = async (e) => {
|
|
2877
2907
|
var _a;
|
|
2878
2908
|
this.selectedShippingMethod = e.detail;
|
|
@@ -2884,6 +2914,8 @@ const ZonosShipping = class {
|
|
|
2884
2914
|
return;
|
|
2885
2915
|
}
|
|
2886
2916
|
this.isSelecting = true;
|
|
2917
|
+
// update the address async if we already got landed cost data
|
|
2918
|
+
await stripeStoreAsyncAddressUpdate();
|
|
2887
2919
|
// save selected shipping option to store
|
|
2888
2920
|
await cartStoreUpdateSelectedShippingOption(selectedShippingOption, e.detail.landedCostId);
|
|
2889
2921
|
this.isSelecting = false;
|
|
@@ -2938,6 +2970,7 @@ const ZonosShipping = class {
|
|
|
2938
2970
|
};
|
|
2939
2971
|
this.initServiceLevels = () => {
|
|
2940
2972
|
var _a;
|
|
2973
|
+
this.collapsedDAPOptions = true;
|
|
2941
2974
|
const serviceLevels = ((_a = cartStore.shippingData) === null || _a === void 0 ? void 0 : _a.flatMap(item => {
|
|
2942
2975
|
var _a;
|
|
2943
2976
|
const transitData = cartStoreGetShippingTransitInfo(item);
|
|
@@ -2995,12 +3028,14 @@ const ZonosShipping = class {
|
|
|
2995
3028
|
}
|
|
2996
3029
|
return false;
|
|
2997
3030
|
};
|
|
2998
|
-
this.preselectFirstShippingMethod = () => {
|
|
3031
|
+
this.preselectFirstShippingMethod = async () => {
|
|
2999
3032
|
this.initServiceLevels();
|
|
3000
3033
|
const selectedServiceLevel = this.serviceLevelsAll.find(item => { var _a; return item.shipmentRatingId === ((_a = cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
|
|
3001
3034
|
if (selectedServiceLevel) {
|
|
3002
3035
|
// keep the selected shipping method
|
|
3003
|
-
this.
|
|
3036
|
+
void this.handleRadioSelected({
|
|
3037
|
+
detail: selectedServiceLevel,
|
|
3038
|
+
});
|
|
3004
3039
|
return;
|
|
3005
3040
|
}
|
|
3006
3041
|
const firstServiceLevel = this.serviceLevelsAll.find(Boolean);
|
|
@@ -3012,16 +3047,30 @@ const ZonosShipping = class {
|
|
|
3012
3047
|
}
|
|
3013
3048
|
};
|
|
3014
3049
|
}
|
|
3050
|
+
disconnectedCallback() {
|
|
3051
|
+
// unsubscribe from store subscriptions
|
|
3052
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
3053
|
+
}
|
|
3015
3054
|
componentWillLoad() {
|
|
3016
|
-
this.preselectFirstShippingMethod();
|
|
3055
|
+
void this.preselectFirstShippingMethod();
|
|
3056
|
+
this.storeUnsubscribeList = [
|
|
3057
|
+
cartStoreOnChange('shippingData', () => {
|
|
3058
|
+
if (this.isOutdatedShippingData()) {
|
|
3059
|
+
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
3060
|
+
void this.preselectFirstShippingMethod();
|
|
3061
|
+
}
|
|
3062
|
+
}),
|
|
3063
|
+
cartStoreOnChange('landedCostData', () => {
|
|
3064
|
+
if (this.isOutdatedShippingData()) {
|
|
3065
|
+
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
3066
|
+
void this.preselectFirstShippingMethod();
|
|
3067
|
+
}
|
|
3068
|
+
}),
|
|
3069
|
+
];
|
|
3017
3070
|
}
|
|
3018
3071
|
render() {
|
|
3019
|
-
if (this.isOutdatedShippingData()) {
|
|
3020
|
-
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
3021
|
-
this.preselectFirstShippingMethod();
|
|
3022
|
-
}
|
|
3023
3072
|
// re-init service levels if the currency is toggled
|
|
3024
|
-
|
|
3073
|
+
if (this.isCurrencyToggled()) {
|
|
3025
3074
|
this.initServiceLevels();
|
|
3026
3075
|
}
|
|
3027
3076
|
const defaultShownServiceLevels = [
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-5ea9f81d.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreCleanupDomesticShippingSession, b as stripeStoreSaveDomesticShippingSession, c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as cartStoreUpdateItems, g as cartStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as
|
|
4
|
-
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-
|
|
5
|
-
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-
|
|
6
|
-
import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, e as getAdditionalLogMetadata, g as getIsTestMode, j as jsonParse, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreCleanupDomesticShippingSession, b as stripeStoreSaveDomesticShippingSession, c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as cartStoreUpdateItems, g as cartStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset } from './cart-2f84f632.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-1cf701aa.js';
|
|
4
|
+
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-e17c211b.js';
|
|
5
|
+
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-00975763.js';
|
|
6
|
+
import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, e as getAdditionalLogMetadata, g as getIsTestMode, j as jsonParse, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-7dd4622b.js';
|
|
7
|
+
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-5097e715.js';
|
|
8
|
+
import { _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, a as checkoutHiddenInternationalBtnSelector, d as domesticRedirectedBtnSelector, g as getAbandonedCartRenewTokenValue } from './CheckoutConfig-724d7bae.js';
|
|
7
9
|
import { c as classes } from './classes-0d95c529.js';
|
|
8
10
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
9
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
10
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
11
|
+
import { g as getBorderRadius } from './getBorderRadius-71b3b8ab.js';
|
|
12
|
+
import { i as isDarkColor } from './isDarkColor-3a9d6108.js';
|
|
11
13
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
12
|
-
import { _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, a as checkoutHiddenInternationalBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-eb7d6954.js';
|
|
13
14
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
14
15
|
import './VarianceTest-fef2d958.js';
|
|
16
|
+
import './debounce-0e42da22.js';
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* Map the items from tempCart like how we do it in dgs
|
|
@@ -985,6 +987,29 @@ const ZonosCheckout = class {
|
|
|
985
987
|
this.placedOrderInfo = existingPlacedOrderInfo;
|
|
986
988
|
log('=== Showing order duplication confirmation', 'warn');
|
|
987
989
|
}
|
|
990
|
+
recordCheckoutInfo() {
|
|
991
|
+
if (!storageStore.checkoutSessionId) {
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
// Record the order duplication consent so we know user did see the notification and proceed with the order duplication
|
|
995
|
+
void updateCheckoutSessionAttributes({
|
|
996
|
+
attributes: [
|
|
997
|
+
{
|
|
998
|
+
key: 'APP_VERSION',
|
|
999
|
+
value: window.Zonos.version,
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
key: 'APP_VERSION_NPM_INTEGRATION',
|
|
1003
|
+
value: window.Zonos.isNpm ? '1' : '0',
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
key: 'LEGACY_CHECKOUT_FACADE',
|
|
1007
|
+
value: window.Zonos.isLegacyCheckout ? '1' : '0',
|
|
1008
|
+
},
|
|
1009
|
+
],
|
|
1010
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
988
1013
|
confirmProceedWithOrderDuplication() {
|
|
989
1014
|
// Reset the placed order info
|
|
990
1015
|
this.placedOrderInfo = null;
|
|
@@ -992,17 +1017,18 @@ const ZonosCheckout = class {
|
|
|
992
1017
|
return;
|
|
993
1018
|
}
|
|
994
1019
|
// Record the order duplication consent so we know user did see the notification and proceed with the order duplication
|
|
995
|
-
void
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1020
|
+
void updateCheckoutSessionAttributes({
|
|
1021
|
+
attributes: [{ key: 'ORDER_DUPLICATION_CONSENT', value: '1' }],
|
|
1022
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
markTheSessionAsAbandonedCart() {
|
|
1026
|
+
if (!storageStore.checkoutSessionId) {
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
void updateCheckoutSessionAttributes({
|
|
1030
|
+
attributes: [{ key: 'WITH_ABANDONED_CART_TOKEN', value: '1' }],
|
|
1031
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
1006
1032
|
});
|
|
1007
1033
|
}
|
|
1008
1034
|
handleCancelOrderDuplication() {
|
|
@@ -1149,6 +1175,12 @@ const ZonosCheckout = class {
|
|
|
1149
1175
|
const loadTime = endTime - startTime;
|
|
1150
1176
|
void sendLoadNativeCheckoutLog({ loadTime });
|
|
1151
1177
|
}
|
|
1178
|
+
this.recordCheckoutInfo();
|
|
1179
|
+
// update checkout session attribute to know the current cart is abandoned
|
|
1180
|
+
const isAbandonedCart = !!getAbandonedCartRenewTokenValue();
|
|
1181
|
+
if (isAbandonedCart) {
|
|
1182
|
+
this.markTheSessionAsAbandonedCart();
|
|
1183
|
+
}
|
|
1152
1184
|
}
|
|
1153
1185
|
catch (err) {
|
|
1154
1186
|
if (err instanceof Error) {
|
|
@@ -1435,6 +1467,7 @@ const ZonosCheckout = class {
|
|
|
1435
1467
|
}
|
|
1436
1468
|
}
|
|
1437
1469
|
async handleCustomerInfoContinue() {
|
|
1470
|
+
var _a, _b, _c, _d;
|
|
1438
1471
|
// submit google tag when the form is complete
|
|
1439
1472
|
submitGtag('zonos-checkout-customer-info');
|
|
1440
1473
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
@@ -1444,10 +1477,26 @@ const ZonosCheckout = class {
|
|
|
1444
1477
|
});
|
|
1445
1478
|
this.submitLoading = true;
|
|
1446
1479
|
// fetch landed cost data if we not fetching.
|
|
1447
|
-
await stripeStorePrefetchLandedCost();
|
|
1448
|
-
//
|
|
1449
|
-
|
|
1450
|
-
|
|
1480
|
+
const { isRequestNotReady } = await stripeStorePrefetchLandedCost();
|
|
1481
|
+
// If the request is not ready at the time user click Continue, logging it out so we can investigate the issue
|
|
1482
|
+
if (isRequestNotReady && cartStore.addressFormRenderType === 'stripe') {
|
|
1483
|
+
void sendErrorLog({
|
|
1484
|
+
endpoint: 'ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE',
|
|
1485
|
+
errors: ['Address not ready at customer info continue'],
|
|
1486
|
+
metadata: {
|
|
1487
|
+
address: (_b = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.address,
|
|
1488
|
+
billingAddress: (_d = (_c = stripeStore.stripeBillingAddressEventData) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.address,
|
|
1489
|
+
cartId: window.Zonos.cartId,
|
|
1490
|
+
},
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
const moveToNextStep = (interval) => {
|
|
1494
|
+
if (cartStore.step !== 'customer-info') {
|
|
1495
|
+
// stop interval if the step is not customer-info
|
|
1496
|
+
clearInterval(interval);
|
|
1497
|
+
return;
|
|
1498
|
+
}
|
|
1499
|
+
if (!stripeStore.isFetchingLandedCost) {
|
|
1451
1500
|
if (cartStore.landedCostData) {
|
|
1452
1501
|
// start init paypal with the presentment currency when landed cost is fetched
|
|
1453
1502
|
void paypalInitScript({
|
|
@@ -1457,17 +1506,24 @@ const ZonosCheckout = class {
|
|
|
1457
1506
|
cartStoreNextStep();
|
|
1458
1507
|
}
|
|
1459
1508
|
this.submitLoading = false;
|
|
1460
|
-
|
|
1509
|
+
if (interval) {
|
|
1510
|
+
clearInterval(interval);
|
|
1511
|
+
}
|
|
1461
1512
|
}
|
|
1462
|
-
}
|
|
1513
|
+
};
|
|
1514
|
+
// Immediately move to the next step
|
|
1515
|
+
moveToNextStep();
|
|
1516
|
+
// keep checking landed cost data until it's ready to move to next screen
|
|
1517
|
+
const interval = setInterval(() => {
|
|
1518
|
+
moveToNextStep(interval);
|
|
1519
|
+
}, 20);
|
|
1520
|
+
// cleanup interval if no data is fetched after 10 seconds
|
|
1521
|
+
setTimeout(() => {
|
|
1522
|
+
clearInterval(interval);
|
|
1523
|
+
}, 10000);
|
|
1463
1524
|
}
|
|
1464
1525
|
async handleShippingContinue() {
|
|
1465
|
-
|
|
1466
|
-
// show loading for the button for a bit
|
|
1467
|
-
setTimeout(() => {
|
|
1468
|
-
cartStoreNextStep();
|
|
1469
|
-
this.submitLoading = false;
|
|
1470
|
-
}, 500);
|
|
1526
|
+
cartStoreNextStep();
|
|
1471
1527
|
}
|
|
1472
1528
|
handleInventoryCheckDialogConfirm() {
|
|
1473
1529
|
// reset inventory check message to close the inventory check alert
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-5ea9f81d.js';
|
|
2
|
-
import {
|
|
2
|
+
import { f as zonosStoreFontFamily } from './zonosStore-00975763.js';
|
|
3
3
|
import './VarianceTest-fef2d958.js';
|
|
4
4
|
|
|
5
5
|
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}";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-5ea9f81d.js';
|
|
2
|
-
import { c as stripeStore } from './cart-
|
|
3
|
-
import { i as isValidSelector, e as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-
|
|
4
|
-
import { z as zonosStore,
|
|
2
|
+
import { c as stripeStore } from './cart-2f84f632.js';
|
|
3
|
+
import { i as isValidSelector, e as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-e17c211b.js';
|
|
4
|
+
import { z as zonosStore, e as zonosStoreInitSetting, f as zonosStoreFontFamily } from './zonosStore-00975763.js';
|
|
5
5
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-0bc3e118.js';
|
|
6
|
-
import { h as handleFetch, b as logError, l as log } from './handleFetch-
|
|
7
|
-
import './isDarkColor-
|
|
8
|
-
import './getBorderRadius-
|
|
6
|
+
import { h as handleFetch, b as logError, l as log } from './handleFetch-7dd4622b.js';
|
|
7
|
+
import './isDarkColor-3a9d6108.js';
|
|
8
|
+
import './getBorderRadius-71b3b8ab.js';
|
|
9
9
|
import './VarianceTest-fef2d958.js';
|
|
10
10
|
|
|
11
11
|
const getZonosSettings = async () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-5ea9f81d.js';
|
|
2
|
-
import { l as localizationStore } from './localization-
|
|
3
|
-
import {
|
|
2
|
+
import { l as localizationStore } from './localization-e17c211b.js';
|
|
3
|
+
import { f as zonosStoreFontFamily } from './zonosStore-00975763.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-7dd4622b.js';
|
|
6
6
|
import './VarianceTest-fef2d958.js';
|
|
7
7
|
|
|
8
8
|
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}";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-5ea9f81d.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './localization-
|
|
3
|
-
import {
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './localization-e17c211b.js';
|
|
3
|
+
import { f as zonosStoreFontFamily } from './zonosStore-00975763.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
5
|
+
import { i as isDarkColor } from './isDarkColor-3a9d6108.js';
|
|
6
6
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
7
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
8
|
-
import './handleFetch-
|
|
8
|
+
import './handleFetch-7dd4622b.js';
|
|
9
9
|
import './VarianceTest-fef2d958.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -1837,9 +1837,9 @@ const ZonosCountrySelect = class {
|
|
|
1837
1837
|
};
|
|
1838
1838
|
}
|
|
1839
1839
|
componentDidRender() {
|
|
1840
|
-
var _a
|
|
1841
|
-
|
|
1842
|
-
(
|
|
1840
|
+
var _a;
|
|
1841
|
+
this.inputRef.autocomplete = 'off';
|
|
1842
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1843
1843
|
}
|
|
1844
1844
|
render() {
|
|
1845
1845
|
const { helloCountryList } = localizationStore;
|
|
@@ -1854,9 +1854,13 @@ const ZonosCountrySelect = class {
|
|
|
1854
1854
|
? fuseObject.map(country => country.item)
|
|
1855
1855
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1856
1856
|
const isEmpty = !filteredCountries.length;
|
|
1857
|
-
return (h(Host, { key: '
|
|
1857
|
+
return (h(Host, { key: '83c9005b99e1dc8d3b4a4d50e6edbed0f17ce6e0', class: "zonos--elements", style: {
|
|
1858
1858
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
1859
|
-
} }, h("div", { key: '
|
|
1859
|
+
} }, h("div", { key: '173d6c9d1808e80cdcb808b6418a9e3928e6a971', class: "zonos--country-select" }, h("zonos-v-stack", { key: '47118836d03e8505f9bd87e795387ea19cf67843', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'c5be83953dd01e47dbe814cbe83a114d700de830', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '2afe5eed1f156b8923a10564cf2b96d2cd6eb9bb', autoComplete: "off", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), ref: el => {
|
|
1860
|
+
if (el) {
|
|
1861
|
+
this.inputRef = el;
|
|
1862
|
+
}
|
|
1863
|
+
}, type: "text", value: this.inputValue }))), h("div", { key: '4d64a4d3c08292ae1f574973c09aa9ec42b48c37', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: 'dc30685daa60063cb9e6c6e7730f54cc5a25249b', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '69f6d39cf40abd951857542d734424623cbd7031', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
|
|
1860
1864
|
const country = filteredCountries[index];
|
|
1861
1865
|
if (!country) {
|
|
1862
1866
|
return null;
|