@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,16 +1,18 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import { cartStore, cartStoreOnChange, } from "../../../store/checkout/cart";
|
|
2
3
|
import { stripeStore, stripeStoreTranslateAddressToLatin, } from "../../../store/checkout/stripe";
|
|
3
|
-
import { localizationStore } from "../../../store/hello/localization";
|
|
4
|
+
import { localizationStore, localizationStoreOnChange, } from "../../../store/hello/localization";
|
|
4
5
|
import { storageStore } from "../../../store/storageStore";
|
|
5
6
|
import { translate } from "../../../store/translationStore";
|
|
6
|
-
import { getZonosStoreTheme, zonosStore, } from "../../../store/zonosStore";
|
|
7
|
+
import { getZonosStoreTheme, zonosStore, zonosStoreOnChange, } from "../../../store/zonosStore";
|
|
8
|
+
import { updateCheckoutSessionAttributes } from "../../../utils/api/updateCheckoutSessionAttributes";
|
|
7
9
|
import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
|
|
8
|
-
import { handleFetch } from "../../../utils/handleFetch";
|
|
9
10
|
import { log } from "../../../utils/logging/log";
|
|
10
11
|
import { sendErrorLog } from "../../../utils/logging/sendErrorLog";
|
|
11
12
|
import { taxIdValidationResult } from "../../../utils/taxIdValidationResult";
|
|
12
13
|
export class ZonosCustomerInfo {
|
|
13
14
|
constructor() {
|
|
15
|
+
this.storeUnsubscribeList = [];
|
|
14
16
|
/**
|
|
15
17
|
* Whether or not the continue button is loading
|
|
16
18
|
*/
|
|
@@ -53,10 +55,6 @@ export class ZonosCustomerInfo {
|
|
|
53
55
|
* Handler for the dialog close button
|
|
54
56
|
*/
|
|
55
57
|
this.openAddressValidationDialog = false;
|
|
56
|
-
/**
|
|
57
|
-
* Whether or not the custom address form is enabled
|
|
58
|
-
*/
|
|
59
|
-
this.shouldEnabledCustomAddress = false;
|
|
60
58
|
/**
|
|
61
59
|
* Handler for the email error state
|
|
62
60
|
*/
|
|
@@ -65,6 +63,9 @@ export class ZonosCustomerInfo {
|
|
|
65
63
|
* Whether or not the custom address form is used
|
|
66
64
|
*/
|
|
67
65
|
this.recordedFormTypeUsed = false;
|
|
66
|
+
this.selectedCountryCode = localizationStore.selectedCountryCode;
|
|
67
|
+
this.genericSettings = zonosStore.genericSettings;
|
|
68
|
+
this.addressFormRenderType = cartStore.addressFormRenderType;
|
|
68
69
|
/**
|
|
69
70
|
* Handler for invalid characters in the address
|
|
70
71
|
*/
|
|
@@ -184,7 +185,7 @@ export class ZonosCustomerInfo {
|
|
|
184
185
|
};
|
|
185
186
|
};
|
|
186
187
|
this.handleValidate = () => {
|
|
187
|
-
var _a, _b
|
|
188
|
+
var _a, _b;
|
|
188
189
|
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
189
190
|
const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
|
|
190
191
|
const stripeLinkEventData = stripeStore.stripeLinkEventData;
|
|
@@ -198,11 +199,11 @@ export class ZonosCustomerInfo {
|
|
|
198
199
|
void ((_a = stripeStore.stripeAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
|
|
199
200
|
void ((_b = stripeStore.stripeBillingAddressElement) === null || _b === void 0 ? void 0 : _b.getValue());
|
|
200
201
|
// if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
|
|
201
|
-
const isValidBilling =
|
|
202
|
+
const isValidBilling = this.addressFormRenderType === 'zonos'
|
|
202
203
|
? this.validateCustomAddressForm('billing').isValid
|
|
203
204
|
: isValidStripeBilling;
|
|
204
205
|
// if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
|
|
205
|
-
const isValidShipping =
|
|
206
|
+
const isValidShipping = this.addressFormRenderType === 'zonos'
|
|
206
207
|
? this.validateCustomAddressForm('shipping').isValid
|
|
207
208
|
: isValidStripeShipping;
|
|
208
209
|
if (!isValidLink && (stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.empty)) {
|
|
@@ -254,8 +255,7 @@ export class ZonosCustomerInfo {
|
|
|
254
255
|
};
|
|
255
256
|
};
|
|
256
257
|
this.renderAddressComponent = (type) => {
|
|
257
|
-
|
|
258
|
-
if (!localizationStore.selectedCountryCode) {
|
|
258
|
+
if (!this.selectedCountryCode) {
|
|
259
259
|
void sendErrorLog({
|
|
260
260
|
endpoint: 'NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT',
|
|
261
261
|
errors: ['No country selected when rendering address component'],
|
|
@@ -267,29 +267,23 @@ export class ZonosCustomerInfo {
|
|
|
267
267
|
}
|
|
268
268
|
// Only use the default address for shipping address
|
|
269
269
|
const defaultAddress = type === 'shipping' ? this.defaultAddress : [];
|
|
270
|
-
const shouldUseCustomAddressForm = !!localizationStore.selectedCountryCode &&
|
|
271
|
-
this.shouldEnabledCustomAddress &&
|
|
272
|
-
!!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.countryCustomAddressEnabled) === null || _b === void 0 ? void 0 : _b.includes(localizationStore.selectedCountryCode));
|
|
273
270
|
// Should only record the form type used once
|
|
274
271
|
if (type === 'shipping' &&
|
|
275
272
|
storageStore.checkoutSessionId &&
|
|
276
273
|
!this.recordedFormTypeUsed) {
|
|
277
|
-
void
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
],
|
|
286
|
-
},
|
|
287
|
-
method: 'POST',
|
|
274
|
+
void updateCheckoutSessionAttributes({
|
|
275
|
+
attributes: [
|
|
276
|
+
{
|
|
277
|
+
key: 'ZONOS_FORM_TYPE_USING',
|
|
278
|
+
value: this.addressFormRenderType === 'zonos' ? 'custom' : 'stripe',
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
288
282
|
});
|
|
289
283
|
this.recordedFormTypeUsed = true;
|
|
290
284
|
}
|
|
291
285
|
// Render custom address component if the custom address form is enabled
|
|
292
|
-
if (
|
|
286
|
+
if (this.addressFormRenderType === 'zonos') {
|
|
293
287
|
return (h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }));
|
|
294
288
|
}
|
|
295
289
|
// Render Stripe address component by default
|
|
@@ -327,8 +321,41 @@ export class ZonosCustomerInfo {
|
|
|
327
321
|
}
|
|
328
322
|
return invalidList;
|
|
329
323
|
}
|
|
324
|
+
watchShouldEnabledCustomAddress() {
|
|
325
|
+
var _a, _b, _c;
|
|
326
|
+
const shouldEnabledCustomAddress = this.shouldUseCustomAddressFormOverride ||
|
|
327
|
+
!!((_a = this.genericSettings) === null || _a === void 0 ? void 0 : _a.shouldEnabledCustomAddress);
|
|
328
|
+
const shouldUseCustomAddressForm = !!this.selectedCountryCode &&
|
|
329
|
+
shouldEnabledCustomAddress &&
|
|
330
|
+
!!((_c = (_b = this.genericSettings) === null || _b === void 0 ? void 0 : _b.countryCustomAddressEnabled) === null || _c === void 0 ? void 0 : _c.includes(this.selectedCountryCode));
|
|
331
|
+
// Update the address form render type in the cart store
|
|
332
|
+
cartStore.addressFormRenderType = shouldUseCustomAddressForm
|
|
333
|
+
? 'zonos'
|
|
334
|
+
: 'stripe';
|
|
335
|
+
}
|
|
336
|
+
disconnectedCallback() {
|
|
337
|
+
// unsubscribe from store subscriptions
|
|
338
|
+
try {
|
|
339
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
340
|
+
}
|
|
341
|
+
catch (_a) { }
|
|
342
|
+
}
|
|
343
|
+
componentWillLoad() {
|
|
344
|
+
this.watchShouldEnabledCustomAddress();
|
|
345
|
+
this.storeUnsubscribeList = [
|
|
346
|
+
zonosStoreOnChange('genericSettings', () => {
|
|
347
|
+
this.genericSettings = zonosStore.genericSettings;
|
|
348
|
+
}),
|
|
349
|
+
localizationStoreOnChange('selectedCountryCode', () => {
|
|
350
|
+
this.selectedCountryCode = localizationStore.selectedCountryCode;
|
|
351
|
+
}),
|
|
352
|
+
cartStoreOnChange('addressFormRenderType', () => {
|
|
353
|
+
this.addressFormRenderType = cartStore.addressFormRenderType;
|
|
354
|
+
}),
|
|
355
|
+
];
|
|
356
|
+
}
|
|
330
357
|
render() {
|
|
331
|
-
var _a, _b, _c, _d, _e, _f
|
|
358
|
+
var _a, _b, _c, _d, _e, _f;
|
|
332
359
|
if (!stripeStore.stripeElements) {
|
|
333
360
|
return null;
|
|
334
361
|
}
|
|
@@ -344,16 +371,13 @@ export class ZonosCustomerInfo {
|
|
|
344
371
|
this.shippingCountry =
|
|
345
372
|
stripeStore.stripeAddressEventData.value.address.country;
|
|
346
373
|
}
|
|
347
|
-
this.shouldEnabledCustomAddress =
|
|
348
|
-
this.shouldUseCustomAddressFormOverride ||
|
|
349
|
-
!!((_b = zonosStore.genericSettings) === null || _b === void 0 ? void 0 : _b.shouldEnabledCustomAddress);
|
|
350
374
|
const showBilling = !stripeStore.stripeShippingSameAsBilling;
|
|
351
375
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
352
376
|
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
353
377
|
// Attempt to get the email from email from customer profile's locations, if not provided, just use the email from root customer profile
|
|
354
|
-
const defaultEmail = ((
|
|
355
|
-
((
|
|
356
|
-
((
|
|
378
|
+
const defaultEmail = ((_b = this.defaultAddress.find(Boolean)) === null || _b === void 0 ? void 0 : _b.email) ||
|
|
379
|
+
((_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) ||
|
|
380
|
+
((_f = stripeStore.customerProfile) === null || _f === void 0 ? void 0 : _f.email);
|
|
357
381
|
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 => {
|
|
358
382
|
stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
359
383
|
} }), 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",
|
|
@@ -526,9 +550,11 @@ export class ZonosCustomerInfo {
|
|
|
526
550
|
"invalidShippingCharacterList": {},
|
|
527
551
|
"invalidBillingCharacterList": {},
|
|
528
552
|
"openAddressValidationDialog": {},
|
|
529
|
-
"shouldEnabledCustomAddress": {},
|
|
530
553
|
"isEmailError": {},
|
|
531
|
-
"recordedFormTypeUsed": {}
|
|
554
|
+
"recordedFormTypeUsed": {},
|
|
555
|
+
"selectedCountryCode": {},
|
|
556
|
+
"genericSettings": {},
|
|
557
|
+
"addressFormRenderType": {}
|
|
532
558
|
};
|
|
533
559
|
}
|
|
534
560
|
static get events() {
|
|
@@ -581,6 +607,15 @@ export class ZonosCustomerInfo {
|
|
|
581
607
|
return [{
|
|
582
608
|
"propName": "showErrorBanner",
|
|
583
609
|
"methodName": "watchShowErrorBanner"
|
|
610
|
+
}, {
|
|
611
|
+
"propName": "shouldUseCustomAddressFormOverride",
|
|
612
|
+
"methodName": "watchShouldEnabledCustomAddress"
|
|
613
|
+
}, {
|
|
614
|
+
"propName": "genericSettings",
|
|
615
|
+
"methodName": "watchShouldEnabledCustomAddress"
|
|
616
|
+
}, {
|
|
617
|
+
"propName": "selectedCountryCode",
|
|
618
|
+
"methodName": "watchShouldEnabledCustomAddress"
|
|
584
619
|
}];
|
|
585
620
|
}
|
|
586
621
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
|
-
import { cartStore, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreUpdateSelectedShippingOption, } from "../../../store/checkout/cart";
|
|
3
|
-
import { stripeStore } from "../../../store/checkout/stripe";
|
|
2
|
+
import { cartStore, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreOnChange, cartStoreUpdateSelectedShippingOption, } from "../../../store/checkout/cart";
|
|
3
|
+
import { stripeStore, stripeStoreAsyncAddressUpdate, } from "../../../store/checkout/stripe";
|
|
4
4
|
import { storageStore } from "../../../store/storageStore";
|
|
5
5
|
import { translate } from "../../../store/translationStore";
|
|
6
6
|
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
@@ -12,6 +12,7 @@ import { submitGtag } from "../../../utils/submitGtag";
|
|
|
12
12
|
import ChevronUpIcon from "./assets/ChevronUpIcon.svg";
|
|
13
13
|
export class ZonosShipping {
|
|
14
14
|
constructor() {
|
|
15
|
+
this.storeUnsubscribeList = [];
|
|
15
16
|
/**
|
|
16
17
|
* Whether or not the continue button is loading
|
|
17
18
|
*/
|
|
@@ -32,6 +33,7 @@ export class ZonosShipping {
|
|
|
32
33
|
this.serviceLevelsOther = [];
|
|
33
34
|
this.serviceLevelsAll = [];
|
|
34
35
|
this.displayBaseCurrency = false;
|
|
36
|
+
this.shippingData = [];
|
|
35
37
|
this.handleRadioSelected = async (e) => {
|
|
36
38
|
var _a;
|
|
37
39
|
this.selectedShippingMethod = e.detail;
|
|
@@ -43,6 +45,8 @@ export class ZonosShipping {
|
|
|
43
45
|
return;
|
|
44
46
|
}
|
|
45
47
|
this.isSelecting = true;
|
|
48
|
+
// update the address async if we already got landed cost data
|
|
49
|
+
await stripeStoreAsyncAddressUpdate();
|
|
46
50
|
// save selected shipping option to store
|
|
47
51
|
await cartStoreUpdateSelectedShippingOption(selectedShippingOption, e.detail.landedCostId);
|
|
48
52
|
this.isSelecting = false;
|
|
@@ -97,6 +101,7 @@ export class ZonosShipping {
|
|
|
97
101
|
};
|
|
98
102
|
this.initServiceLevels = () => {
|
|
99
103
|
var _a;
|
|
104
|
+
this.collapsedDAPOptions = true;
|
|
100
105
|
const serviceLevels = ((_a = cartStore.shippingData) === null || _a === void 0 ? void 0 : _a.flatMap(item => {
|
|
101
106
|
var _a;
|
|
102
107
|
const transitData = cartStoreGetShippingTransitInfo(item);
|
|
@@ -154,12 +159,14 @@ export class ZonosShipping {
|
|
|
154
159
|
}
|
|
155
160
|
return false;
|
|
156
161
|
};
|
|
157
|
-
this.preselectFirstShippingMethod = () => {
|
|
162
|
+
this.preselectFirstShippingMethod = async () => {
|
|
158
163
|
this.initServiceLevels();
|
|
159
164
|
const selectedServiceLevel = this.serviceLevelsAll.find(item => { var _a; return item.shipmentRatingId === ((_a = cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
|
|
160
165
|
if (selectedServiceLevel) {
|
|
161
166
|
// keep the selected shipping method
|
|
162
|
-
this.
|
|
167
|
+
void this.handleRadioSelected({
|
|
168
|
+
detail: selectedServiceLevel,
|
|
169
|
+
});
|
|
163
170
|
return;
|
|
164
171
|
}
|
|
165
172
|
const firstServiceLevel = this.serviceLevelsAll.find(Boolean);
|
|
@@ -171,16 +178,30 @@ export class ZonosShipping {
|
|
|
171
178
|
}
|
|
172
179
|
};
|
|
173
180
|
}
|
|
181
|
+
disconnectedCallback() {
|
|
182
|
+
// unsubscribe from store subscriptions
|
|
183
|
+
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
184
|
+
}
|
|
174
185
|
componentWillLoad() {
|
|
175
|
-
this.preselectFirstShippingMethod();
|
|
186
|
+
void this.preselectFirstShippingMethod();
|
|
187
|
+
this.storeUnsubscribeList = [
|
|
188
|
+
cartStoreOnChange('shippingData', () => {
|
|
189
|
+
if (this.isOutdatedShippingData()) {
|
|
190
|
+
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
191
|
+
void this.preselectFirstShippingMethod();
|
|
192
|
+
}
|
|
193
|
+
}),
|
|
194
|
+
cartStoreOnChange('landedCostData', () => {
|
|
195
|
+
if (this.isOutdatedShippingData()) {
|
|
196
|
+
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
197
|
+
void this.preselectFirstShippingMethod();
|
|
198
|
+
}
|
|
199
|
+
}),
|
|
200
|
+
];
|
|
176
201
|
}
|
|
177
202
|
render() {
|
|
178
|
-
if (this.isOutdatedShippingData()) {
|
|
179
|
-
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
180
|
-
this.preselectFirstShippingMethod();
|
|
181
|
-
}
|
|
182
203
|
// re-init service levels if the currency is toggled
|
|
183
|
-
|
|
204
|
+
if (this.isCurrencyToggled()) {
|
|
184
205
|
this.initServiceLevels();
|
|
185
206
|
}
|
|
186
207
|
const defaultShownServiceLevels = [
|
|
@@ -300,7 +321,8 @@ export class ZonosShipping {
|
|
|
300
321
|
"serviceLevelsDAP": {},
|
|
301
322
|
"serviceLevelsOther": {},
|
|
302
323
|
"serviceLevelsAll": {},
|
|
303
|
-
"displayBaseCurrency": {}
|
|
324
|
+
"displayBaseCurrency": {},
|
|
325
|
+
"shippingData": {}
|
|
304
326
|
};
|
|
305
327
|
}
|
|
306
328
|
static get events() {
|
|
@@ -82,12 +82,12 @@ export class ZonosCheckoutProgressTabs {
|
|
|
82
82
|
'--zonos--progress-percent': this.getTotalSuccessStep(),
|
|
83
83
|
} }, h("div", { key: 'd173893ab0da684a189127ab511db90ba3a0985c', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
84
84
|
const isSelected = tab.value === selectedStep;
|
|
85
|
-
return (h("button", { class: classes([
|
|
85
|
+
return (h("button", { "aria-label": `Tab ${tab.label}`, class: classes([
|
|
86
86
|
'zonos--tab-item',
|
|
87
87
|
tab.value === selectedStep && 'selected',
|
|
88
88
|
tab.isDone && 'done',
|
|
89
89
|
]), 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))));
|
|
90
|
-
})), h("div", { key: '
|
|
90
|
+
})), h("div", { key: 'e424eda69e8338599446f71f407c76617d2b79cf', class: "zonos--tab-progress" }, h("div", { key: 'acccc44ce950da71c8c0ee0798dc2086d9656ed2', class: "zonos--progress-bar-fill" }))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "zonos-checkout-progress-tabs"; }
|
|
93
93
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,9 +31,9 @@ export class ZonosCountrySelect {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
componentDidRender() {
|
|
34
|
-
var _a
|
|
35
|
-
|
|
36
|
-
(
|
|
34
|
+
var _a;
|
|
35
|
+
this.inputRef.autocomplete = 'off';
|
|
36
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
39
|
const { helloCountryList } = localizationStore;
|
|
@@ -48,9 +48,13 @@ export class ZonosCountrySelect {
|
|
|
48
48
|
? fuseObject.map(country => country.item)
|
|
49
49
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
50
50
|
const isEmpty = !filteredCountries.length;
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '83c9005b99e1dc8d3b4a4d50e6edbed0f17ce6e0', class: "zonos--elements", style: {
|
|
52
52
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
53
|
-
} }, h("div", { key: '
|
|
53
|
+
} }, 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 => {
|
|
54
|
+
if (el) {
|
|
55
|
+
this.inputRef = el;
|
|
56
|
+
}
|
|
57
|
+
}, 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 => {
|
|
54
58
|
const country = filteredCountries[index];
|
|
55
59
|
if (!country) {
|
|
56
60
|
return null;
|
|
@@ -9,7 +9,8 @@ import { allLogs, log } from "../../utils/logging/log";
|
|
|
9
9
|
import { logError } from "../../utils/logging/logError";
|
|
10
10
|
import { sendErrorLog } from "../../utils/logging/sendErrorLog";
|
|
11
11
|
import { filterValidTests } from "../../utils/varianceTest/filterValidTests";
|
|
12
|
-
const { reset, state: cartStore } = createStore(() => ({
|
|
12
|
+
const { onChange: cartStoreOnChange, reset, state: cartStore, } = createStore(() => ({
|
|
13
|
+
addressFormRenderType: 'stripe',
|
|
13
14
|
adjustmentTotal: 0,
|
|
14
15
|
adjustments: [],
|
|
15
16
|
checkoutSession: null,
|
|
@@ -224,12 +225,14 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
224
225
|
}
|
|
225
226
|
const { errors, json } = await stripeStoreUpdateCheckoutSession({
|
|
226
227
|
adjustmentsAmount,
|
|
228
|
+
billToPartyId: stripeStore.partyBillingId,
|
|
227
229
|
cartId,
|
|
228
230
|
currency,
|
|
229
231
|
id: storageStore.checkoutSessionId,
|
|
230
232
|
itemsAmount,
|
|
231
233
|
landedCostId,
|
|
232
234
|
presentmentCountryCode: localizationStore.selectedCountryCode,
|
|
235
|
+
shipToPartyId: stripeStore.partyShippingId,
|
|
233
236
|
varianceTestInput: storageStore.enabledVariantTestKeys || [],
|
|
234
237
|
});
|
|
235
238
|
if (errors.length > 0 || !json) {
|
|
@@ -313,9 +316,11 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
313
316
|
// update session with selected landed cost
|
|
314
317
|
const updateCalculateStatus = await cartStoreReCalculateTotal({
|
|
315
318
|
adjustmentsAmount: cartStore.adjustmentTotal,
|
|
319
|
+
billToPartyId: stripeStore.partyBillingId,
|
|
316
320
|
cartId: window.Zonos.cartId,
|
|
317
321
|
dutiesTaxesFeesEstimate: dutiesTaxesFeesEstimate,
|
|
318
322
|
landedCostId: (_f = selectedLandedCost.landedCost) === null || _f === void 0 ? void 0 : _f.id,
|
|
323
|
+
shipToPartyId: stripeStore.partyShippingId,
|
|
319
324
|
varianceTestInput: storageStore.enabledVariantTestKeys || [],
|
|
320
325
|
});
|
|
321
326
|
// update conditionally render pay in USD button
|
|
@@ -378,10 +383,12 @@ const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
|
378
383
|
stripeStore.isFetchingSession = true;
|
|
379
384
|
await cartStoreReCalculateTotal({
|
|
380
385
|
adjustmentsAmount: adjustmentTotal,
|
|
386
|
+
billToPartyId: stripeStore.partyBillingId,
|
|
381
387
|
cartId: window.Zonos.cartId,
|
|
382
388
|
currency: currency,
|
|
383
389
|
dutiesTaxesFeesEstimate: 0,
|
|
384
390
|
itemsAmount: total,
|
|
391
|
+
shipToPartyId: stripeStore.partyShippingId,
|
|
385
392
|
// attempt to init session on failure to update checkout session
|
|
386
393
|
shouldInitSessionOnFailure: true,
|
|
387
394
|
varianceTestInput: storageStore.enabledVariantTestKeys || [],
|
|
@@ -436,4 +443,4 @@ const cartStoreResetTabItems = () => {
|
|
|
436
443
|
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
437
444
|
cartStoreResetSelectedShippingOption();
|
|
438
445
|
};
|
|
439
|
-
export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStorePreviousStep, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
|
|
446
|
+
export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStoreOnChange, cartStorePreviousStep, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
|