@zonos/elements 1.3.148 → 1.3.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-ff5887f0.js → cart-a19315fd.js} +3 -8
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-dd767dbc.js → paypal-5d326579.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +16 -5
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +8 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -3
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +3 -3
- package/dist/collection/components/store/checkout/stripe.js +2 -8
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +12 -1
- package/dist/esm/{cart-9de02093.js → cart-260f8518.js} +3 -9
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-1efe64a0.js → paypal-5453a7db.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +16 -5
- package/dist/esm/zonos-cart-items_13.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +8 -4
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/{cart-9de02093.js → cart-260f8518.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-1efe64a0.js → paypal-5453a7db.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.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-language-select_2.entry.js +1 -1
- 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/stripe/zonos-address/zonos-address.d.ts +4 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-9dd24661.entry.js → p-0728843a.entry.js} +1 -1
- package/dist/zonos-elements/{p-0a0eccae.entry.js → p-08be2f4d.entry.js} +1 -1
- package/dist/zonos-elements/{p-8dc3edd5.system.entry.js → p-1cace07e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aa273ce7.system.js → p-2ae03baf.system.js} +1 -1
- package/dist/zonos-elements/p-366be853.system.entry.js +1 -0
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-f4929b6e.entry.js → p-50bbb2f5.entry.js} +1 -1
- package/dist/zonos-elements/{p-cfce4fa3.system.entry.js → p-526d2758.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6d2cd324.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4b0cb1ce.entry.js → p-7cad853b.entry.js} +1 -1
- package/dist/zonos-elements/{p-da6d01bc.system.entry.js → p-7ccbd8cb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fac2a983.system.entry.js → p-84bcd390.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-afd32c67.system.entry.js → p-85e7f592.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e99dec7d.js → p-92d5df16.js} +1 -1
- package/dist/zonos-elements/{p-8455a72e.system.entry.js → p-a50c36b5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5831e9ba.system.js → p-a5a1a1d9.system.js} +1 -1
- package/dist/zonos-elements/{p-6adea6aa.entry.js → p-c1859837.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8fb55dc.entry.js → p-caf27d12.entry.js} +1 -1
- package/dist/zonos-elements/{p-e901deff.entry.js → p-cb4500cc.entry.js} +1 -1
- package/dist/zonos-elements/{p-36cd38ba.system.js → p-d512afcf.system.js} +1 -1
- package/dist/zonos-elements/{p-f70b072b.system.entry.js → p-dca47550.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ea5b3c72.js +17 -0
- package/dist/zonos-elements/p-ea866dd3.entry.js +1 -0
- package/dist/zonos-elements/{p-f4958bec.system.entry.js → p-ebe1a0bb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-00182783.entry.js → p-f946289f.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd26a3cc.entry.js → p-fbf89adf.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-4f398271.entry.js +0 -1
- package/dist/zonos-elements/p-9c6ed828.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f5789a5.js +0 -17
- package/dist/zonos-elements/p-e3131c5e.system.entry.js +0 -1
|
@@ -11236,6 +11236,8 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
11236
11236
|
// update stripe store with updated information
|
|
11237
11237
|
stripeStore.clientSecret =
|
|
11238
11238
|
json.checkoutSessionPaymentIntentCreate.clientSecret;
|
|
11239
|
+
// update cart store checkout session with updated from checkout session payment intent creation call so the checkout session and payment intent are in sync
|
|
11240
|
+
cartStoreSetCheckoutSession(json.checkoutSessionPaymentIntentCreate);
|
|
11239
11241
|
};
|
|
11240
11242
|
/**
|
|
11241
11243
|
* Init checkout session
|
|
@@ -11269,10 +11271,6 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
11269
11271
|
});
|
|
11270
11272
|
handleFetch.log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
|
11271
11273
|
handleFetch.log('done-init-checkout-session');
|
|
11272
|
-
// get and set payment intent async except for staging mode
|
|
11273
|
-
if (!cartStore.isStagingMode) {
|
|
11274
|
-
void stripeStoreGetPaymentIntent();
|
|
11275
|
-
}
|
|
11276
11274
|
return true;
|
|
11277
11275
|
};
|
|
11278
11276
|
/**
|
|
@@ -11316,10 +11314,6 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
|
|
|
11316
11314
|
handleFetch.logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
|
|
11317
11315
|
return { errors, json };
|
|
11318
11316
|
}
|
|
11319
|
-
// get and set payment intent async except for staging mode
|
|
11320
|
-
if (!cartStore.isStagingMode) {
|
|
11321
|
-
void stripeStoreGetPaymentIntent();
|
|
11322
|
-
}
|
|
11323
11317
|
return { errors: [], json };
|
|
11324
11318
|
};
|
|
11325
11319
|
/**
|
|
@@ -11872,6 +11866,7 @@ exports.stripeStoreApplyPromoCode = stripeStoreApplyPromoCode;
|
|
|
11872
11866
|
exports.stripeStoreCleanupDomesticShippingSession = stripeStoreCleanupDomesticShippingSession;
|
|
11873
11867
|
exports.stripeStoreConfirmPayment = stripeStoreConfirmPayment;
|
|
11874
11868
|
exports.stripeStoreGetDomesticShippingSession = stripeStoreGetDomesticShippingSession;
|
|
11869
|
+
exports.stripeStoreGetPaymentIntent = stripeStoreGetPaymentIntent;
|
|
11875
11870
|
exports.stripeStoreHandleInventoryCheck = stripeStoreHandleInventoryCheck;
|
|
11876
11871
|
exports.stripeStoreHandleInventoryRefund = stripeStoreHandleInventoryRefund;
|
|
11877
11872
|
exports.stripeStoreInitCheckoutSession = stripeStoreInitCheckoutSession;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -129,7 +129,7 @@ const getZonosQaUrl = () => {
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
132
|
-
const cdnUrl = "https://v1.3.
|
|
132
|
+
const cdnUrl = "https://v1.3.150.js.zonos.com";
|
|
133
133
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
134
134
|
if (!qaUrl &&
|
|
135
135
|
(cdnUrl.includes('test.') ||
|
|
@@ -313,10 +313,10 @@ const zonosLoadUrl = (() => {
|
|
|
313
313
|
}
|
|
314
314
|
return null;
|
|
315
315
|
})();
|
|
316
|
-
const ZONOS_URL = "https://v1.3.
|
|
317
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
318
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
319
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
316
|
+
const ZONOS_URL = "https://v1.3.150.js.zonos.com";
|
|
317
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.150";
|
|
318
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.150";
|
|
319
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.150";
|
|
320
320
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
321
321
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
322
322
|
class Zonos {
|
|
@@ -330,7 +330,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
330
330
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
331
331
|
Zonos._paypalMockResponse = null;
|
|
332
332
|
Zonos.isBigCommerce = false;
|
|
333
|
-
Zonos.releaseDate = "
|
|
333
|
+
Zonos.releaseDate = "1737148584151";
|
|
334
334
|
Zonos.isLegacyCheckout = false;
|
|
335
335
|
Zonos.domain = typeof window !== 'undefined'
|
|
336
336
|
? // domain that embeds the iframe
|
|
@@ -346,7 +346,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
346
346
|
Zonos.isNpm = true;
|
|
347
347
|
Zonos.zonosQaUrl = null;
|
|
348
348
|
Zonos.zonosQaUrlApi = null;
|
|
349
|
-
Zonos.version = `v${"1.3.
|
|
349
|
+
Zonos.version = `v${"1.3.150"}`;
|
|
350
350
|
Zonos.modeAlerted = false;
|
|
351
351
|
Zonos.cartData = null;
|
|
352
352
|
Zonos.paypal = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-a19315fd.js');
|
|
5
5
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-2acf30d1.js');
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
@@ -20,6 +20,10 @@ const ZonosAddress = class {
|
|
|
20
20
|
constructor(hostRef) {
|
|
21
21
|
index.registerInstance(this, hostRef);
|
|
22
22
|
this.invalidCharacters = index.createEvent(this, "invalidCharacters", 7);
|
|
23
|
+
/**
|
|
24
|
+
* Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
|
|
25
|
+
*/
|
|
26
|
+
this.isAutoCompleteAdjusted = false;
|
|
23
27
|
this.type = undefined;
|
|
24
28
|
this.titleText = undefined;
|
|
25
29
|
this.defaultAddress = null;
|
|
@@ -111,6 +115,13 @@ const ZonosAddress = class {
|
|
|
111
115
|
this.isDirtyAddress = true;
|
|
112
116
|
// stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
|
|
113
117
|
setTimeout(() => {
|
|
118
|
+
if (!this.isAutoCompleteAdjusted) {
|
|
119
|
+
const googleAutoComplete = this.el.querySelector('iframe[src*="autocomplete-suggestions"]');
|
|
120
|
+
if (googleAutoComplete) {
|
|
121
|
+
googleAutoComplete.style.zIndex = '2';
|
|
122
|
+
}
|
|
123
|
+
this.isAutoCompleteAdjusted = true;
|
|
124
|
+
}
|
|
114
125
|
// scroll directly into view if it's mobile
|
|
115
126
|
if (isCheckoutMobile.isCheckoutMobile()) {
|
|
116
127
|
this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
|
|
@@ -149,7 +160,7 @@ const ZonosAddress = class {
|
|
|
149
160
|
}
|
|
150
161
|
render() {
|
|
151
162
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
152
|
-
return (index.h(index.Host, { key: '
|
|
163
|
+
return (index.h(index.Host, { key: '614a515a62e0f5dac7a91979b81b626fb326a420', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: 'e6942f54dfd8ca61da3b62fe0036fa14ea0ce758', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: 'e3ddd7a347588babb5f35a67b793766d039200f4', class: "zonos--address-component" })));
|
|
153
164
|
}
|
|
154
165
|
get el() { return index.getElement(this); }
|
|
155
166
|
static get watchers() { return {
|
|
@@ -704,17 +715,17 @@ const ZonosStripeInput = class {
|
|
|
704
715
|
} }, index.h("div", { key: 'a3e7f765b0081a564c5955e387ff4b521a28d1a5', class: classes.classes([
|
|
705
716
|
'zonos--label-wrapper',
|
|
706
717
|
this.isDisabled && 'disabled',
|
|
707
|
-
]) }, index.h("input", { key: '
|
|
718
|
+
]) }, index.h("input", { key: '181c5230ddeb02e9cea646b7f0a8efa3a530796e', class: classes.classes([
|
|
708
719
|
'zonos--floated-input',
|
|
709
720
|
!!this.inputLabel && 'has-label',
|
|
710
721
|
this.internalValue && 'has-content',
|
|
711
722
|
this.isError && 'has-error',
|
|
712
|
-
]), disabled: this.isDisabled, id: "zonos--input",
|
|
723
|
+
]), disabled: this.isDisabled, id: "zonos--input", onChange: e => {
|
|
713
724
|
const input = e.target;
|
|
714
725
|
this.inputChange.emit(input.value);
|
|
715
726
|
this.el.inputValue = input.value;
|
|
716
727
|
this.el.dispatchEvent(new Event('change'));
|
|
717
|
-
}, placeholder: this.inputPlaceholder, type: "text", value: this.internalValue }), index.h("div", { key: '
|
|
728
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.internalValue }), index.h("div", { key: 'ac6e97971905ba130c3533da6a409de60f99ed6d', class: "zonos--floated-label" }, index.h("label", { key: '1643ab4ef5b9449332351c854f8e43db8d192164', htmlFor: "zonos--input" }, this.inputLabel)))));
|
|
718
729
|
}
|
|
719
730
|
get el() { return index.getElement(this); }
|
|
720
731
|
static get watchers() { return {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
8
|
+
const paypal = require('./paypal-5d326579.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
11
11
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
|
+
const paypal = require('./paypal-5d326579.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
@@ -503,14 +503,18 @@ const ZonosCheckout = class {
|
|
|
503
503
|
}));
|
|
504
504
|
await cart.cartStoreUpdateItems({ adjustments, cartItems: cartItemsFiltered });
|
|
505
505
|
}
|
|
506
|
-
// if
|
|
507
|
-
if (!cart.
|
|
506
|
+
// if checkoutSessionId is not available, request a new one.
|
|
507
|
+
if (!cart.cartStore.checkoutSessionId) {
|
|
508
508
|
const success = await cart.stripeStoreInitCheckoutSession();
|
|
509
509
|
handleFetch.log(`stripeStoreInitCheckoutSession: ${success}`);
|
|
510
510
|
if (!success) {
|
|
511
511
|
return false;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
+
// get and set payment intent async except for staging mode
|
|
515
|
+
if (!cart.cartStore.isStagingMode) {
|
|
516
|
+
void cart.stripeStoreGetPaymentIntent();
|
|
517
|
+
}
|
|
514
518
|
// apply theme to stripe elements
|
|
515
519
|
await this.applyStripeTheme();
|
|
516
520
|
this.isRedirectAfterOrder =
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
9
9
|
require('./isDarkColor-2acf30d1.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./handleFetch-3673a0c2.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-2acf30d1.js');
|
|
@@ -6,9 +6,9 @@ const index = require('./index-2f90486e.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-7d0772bf.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-a19315fd.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
11
|
-
const paypal = require('./paypal-
|
|
11
|
+
const paypal = require('./paypal-5d326579.js');
|
|
12
12
|
require('./isDarkColor-2acf30d1.js');
|
|
13
13
|
|
|
14
14
|
const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-a19315fd.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-3673a0c2.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-a19315fd.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-46809186.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./handleFetch-3673a0c2.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
2
|
import { cartStore, cartStoreClearCheckoutInterval, cartStoreNextStep, cartStoreReset, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
|
|
3
3
|
import { paypalInitScript, paypalStore, paypalStoreHasPaypalEnabled, } from "../../store/checkout/paypal";
|
|
4
|
-
import { getCheckoutSessionBody, initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, } from "../../store/checkout/stripe";
|
|
4
|
+
import { getCheckoutSessionBody, initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetPaymentIntent, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, } from "../../store/checkout/stripe";
|
|
5
5
|
import { localizationStore, localizationStoreOnUpdate, } from "../../store/hello/localization";
|
|
6
6
|
import { translate } from "../../store/translationStore";
|
|
7
7
|
import { getZonosStoreTheme, zonosStore, } from "../../store/zonosStore";
|
|
@@ -293,14 +293,18 @@ export class ZonosCheckout {
|
|
|
293
293
|
}));
|
|
294
294
|
await cartStoreUpdateItems({ adjustments, cartItems: cartItemsFiltered });
|
|
295
295
|
}
|
|
296
|
-
// if
|
|
297
|
-
if (!
|
|
296
|
+
// if checkoutSessionId is not available, request a new one.
|
|
297
|
+
if (!cartStore.checkoutSessionId) {
|
|
298
298
|
const success = await stripeStoreInitCheckoutSession();
|
|
299
299
|
log(`stripeStoreInitCheckoutSession: ${success}`);
|
|
300
300
|
if (!success) {
|
|
301
301
|
return false;
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
+
// get and set payment intent async except for staging mode
|
|
305
|
+
if (!cartStore.isStagingMode) {
|
|
306
|
+
void stripeStoreGetPaymentIntent();
|
|
307
|
+
}
|
|
304
308
|
// apply theme to stripe elements
|
|
305
309
|
await this.applyStripeTheme();
|
|
306
310
|
this.isRedirectAfterOrder =
|
|
@@ -43,17 +43,17 @@ export class ZonosStripeInput {
|
|
|
43
43
|
} }, h("div", { key: 'a3e7f765b0081a564c5955e387ff4b521a28d1a5', class: classes([
|
|
44
44
|
'zonos--label-wrapper',
|
|
45
45
|
this.isDisabled && 'disabled',
|
|
46
|
-
]) }, h("input", { key: '
|
|
46
|
+
]) }, h("input", { key: '181c5230ddeb02e9cea646b7f0a8efa3a530796e', class: classes([
|
|
47
47
|
'zonos--floated-input',
|
|
48
48
|
!!this.inputLabel && 'has-label',
|
|
49
49
|
this.internalValue && 'has-content',
|
|
50
50
|
this.isError && 'has-error',
|
|
51
|
-
]), disabled: this.isDisabled, id: "zonos--input",
|
|
51
|
+
]), disabled: this.isDisabled, id: "zonos--input", onChange: e => {
|
|
52
52
|
const input = e.target;
|
|
53
53
|
this.inputChange.emit(input.value);
|
|
54
54
|
this.el.inputValue = input.value;
|
|
55
55
|
this.el.dispatchEvent(new Event('change'));
|
|
56
|
-
}, placeholder: this.inputPlaceholder, type: "text", value: this.internalValue }), h("div", { key: '
|
|
56
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.internalValue }), h("div", { key: 'ac6e97971905ba130c3533da6a409de60f99ed6d', class: "zonos--floated-label" }, h("label", { key: '1643ab4ef5b9449332351c854f8e43db8d192164', htmlFor: "zonos--input" }, this.inputLabel)))));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "zonos-stripe-input"; }
|
|
59
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -615,6 +615,8 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
615
615
|
// update stripe store with updated information
|
|
616
616
|
stripeStore.clientSecret =
|
|
617
617
|
json.checkoutSessionPaymentIntentCreate.clientSecret;
|
|
618
|
+
// update cart store checkout session with updated from checkout session payment intent creation call so the checkout session and payment intent are in sync
|
|
619
|
+
cartStoreSetCheckoutSession(json.checkoutSessionPaymentIntentCreate);
|
|
618
620
|
};
|
|
619
621
|
/**
|
|
620
622
|
* Init checkout session
|
|
@@ -648,10 +650,6 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
648
650
|
});
|
|
649
651
|
log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
|
650
652
|
log('done-init-checkout-session');
|
|
651
|
-
// get and set payment intent async except for staging mode
|
|
652
|
-
if (!cartStore.isStagingMode) {
|
|
653
|
-
void stripeStoreGetPaymentIntent();
|
|
654
|
-
}
|
|
655
653
|
return true;
|
|
656
654
|
};
|
|
657
655
|
/**
|
|
@@ -695,10 +693,6 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
|
|
|
695
693
|
logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
|
|
696
694
|
return { errors, json };
|
|
697
695
|
}
|
|
698
|
-
// get and set payment intent async except for staging mode
|
|
699
|
-
if (!cartStore.isStagingMode) {
|
|
700
|
-
void stripeStoreGetPaymentIntent();
|
|
701
|
-
}
|
|
702
696
|
return { errors: [], json };
|
|
703
697
|
};
|
|
704
698
|
/**
|
|
@@ -9,6 +9,10 @@ import { logError } from "../../utils/logging/logError";
|
|
|
9
9
|
*/
|
|
10
10
|
export class ZonosAddress {
|
|
11
11
|
constructor() {
|
|
12
|
+
/**
|
|
13
|
+
* Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
|
|
14
|
+
*/
|
|
15
|
+
this.isAutoCompleteAdjusted = false;
|
|
12
16
|
this.type = undefined;
|
|
13
17
|
this.titleText = undefined;
|
|
14
18
|
this.defaultAddress = null;
|
|
@@ -100,6 +104,13 @@ export class ZonosAddress {
|
|
|
100
104
|
this.isDirtyAddress = true;
|
|
101
105
|
// stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
|
|
102
106
|
setTimeout(() => {
|
|
107
|
+
if (!this.isAutoCompleteAdjusted) {
|
|
108
|
+
const googleAutoComplete = this.el.querySelector('iframe[src*="autocomplete-suggestions"]');
|
|
109
|
+
if (googleAutoComplete) {
|
|
110
|
+
googleAutoComplete.style.zIndex = '2';
|
|
111
|
+
}
|
|
112
|
+
this.isAutoCompleteAdjusted = true;
|
|
113
|
+
}
|
|
103
114
|
// scroll directly into view if it's mobile
|
|
104
115
|
if (isCheckoutMobile()) {
|
|
105
116
|
this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
|
|
@@ -138,7 +149,7 @@ export class ZonosAddress {
|
|
|
138
149
|
}
|
|
139
150
|
render() {
|
|
140
151
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
141
|
-
return (h(Host, { key: '
|
|
152
|
+
return (h(Host, { key: '614a515a62e0f5dac7a91979b81b626fb326a420', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'e6942f54dfd8ca61da3b62fe0036fa14ea0ce758', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'e3ddd7a347588babb5f35a67b793766d039200f4', class: "zonos--address-component" })));
|
|
142
153
|
}
|
|
143
154
|
static get is() { return "zonos-address"; }
|
|
144
155
|
static get encapsulation() { return "scoped"; }
|
|
@@ -11234,6 +11234,8 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
11234
11234
|
// update stripe store with updated information
|
|
11235
11235
|
stripeStore.clientSecret =
|
|
11236
11236
|
json.checkoutSessionPaymentIntentCreate.clientSecret;
|
|
11237
|
+
// update cart store checkout session with updated from checkout session payment intent creation call so the checkout session and payment intent are in sync
|
|
11238
|
+
cartStoreSetCheckoutSession(json.checkoutSessionPaymentIntentCreate);
|
|
11237
11239
|
};
|
|
11238
11240
|
/**
|
|
11239
11241
|
* Init checkout session
|
|
@@ -11267,10 +11269,6 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
11267
11269
|
});
|
|
11268
11270
|
log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
|
11269
11271
|
log('done-init-checkout-session');
|
|
11270
|
-
// get and set payment intent async except for staging mode
|
|
11271
|
-
if (!cartStore.isStagingMode) {
|
|
11272
|
-
void stripeStoreGetPaymentIntent();
|
|
11273
|
-
}
|
|
11274
11272
|
return true;
|
|
11275
11273
|
};
|
|
11276
11274
|
/**
|
|
@@ -11314,10 +11312,6 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
|
|
|
11314
11312
|
logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
|
|
11315
11313
|
return { errors, json };
|
|
11316
11314
|
}
|
|
11317
|
-
// get and set payment intent async except for staging mode
|
|
11318
|
-
if (!cartStore.isStagingMode) {
|
|
11319
|
-
void stripeStoreGetPaymentIntent();
|
|
11320
|
-
}
|
|
11321
11315
|
return { errors: [], json };
|
|
11322
11316
|
};
|
|
11323
11317
|
/**
|
|
@@ -11837,4 +11831,4 @@ const cartStoreResetTabItems = () => {
|
|
|
11837
11831
|
cartStoreResetSelectedShippingOption();
|
|
11838
11832
|
};
|
|
11839
11833
|
|
|
11840
|
-
export {
|
|
11834
|
+
export { stripeStoreHandleInventoryRefund as A, stripeStoreReset as B, localizationStoreOnUpdate as C, validateCheckoutSession as D, isValidSelector as E, initLocalizationStore as F, setZCountryUrlParam as G, currencyDisplay as H, currencyConvertAndFormat as I, currencyConvert as J, currencyFormat as K, cartStoreHasOneEligibleItem as L, stripeStoreApplyPromoCode as M, stripeStoreRemovePromoCode as N, stripeStoreResetPromoCode as O, stripeStoreMessageBasedOnStatus as P, stripeStoreTranslateAddressToLatin as Q, cartStoreUpdateSelectedShippingOption as R, cartStoreGetShippingTransitInfo as S, sortServiceLevelOptionsByAmount as T, getFallbackDefaultCountryCode as U, localizationStoreUpdateSelectedLocale as V, localizationStoreUpdateSelectedCountryCode as a, stripeStoreCleanupDomesticShippingSession as b, stripeStoreSaveDomesticShippingSession as c, stripeStoreRetrievePayment as d, cartStore as e, stripeStore as f, cartStoreUpdateItems as g, cartStoreReset as h, initStripeElements as i, cartStoreResetTabItems as j, cartStoreClearCheckoutInterval as k, localizationStore as l, stripeStoreInitCheckoutSession as m, stripeStoreGetPaymentIntent as n, cartStoreStartCheckoutInterval as o, getCheckoutSessionBody as p, cartStoreUpdateToErrorState as q, translate as r, stripeStoreGetDomesticShippingSession as s, trackConversionEvent as t, getZCountryUrlParam as u, cartStoreSetCheckoutSession as v, stripeStorePrefetchLandedCost as w, cartStoreNextStep as x, stripeStoreHandleInventoryCheck as y, stripeStoreConfirmPayment as z };
|
package/dist/esm/index.js
CHANGED
|
@@ -126,7 +126,7 @@ const getZonosQaUrl = () => {
|
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
128
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
129
|
-
const cdnUrl = "https://v1.3.
|
|
129
|
+
const cdnUrl = "https://v1.3.150.js.zonos.com";
|
|
130
130
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
131
131
|
if (!qaUrl &&
|
|
132
132
|
(cdnUrl.includes('test.') ||
|
|
@@ -310,10 +310,10 @@ const zonosLoadUrl = (() => {
|
|
|
310
310
|
}
|
|
311
311
|
return null;
|
|
312
312
|
})();
|
|
313
|
-
const ZONOS_URL = "https://v1.3.
|
|
314
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
315
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
316
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
313
|
+
const ZONOS_URL = "https://v1.3.150.js.zonos.com";
|
|
314
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.150";
|
|
315
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.150";
|
|
316
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.150";
|
|
317
317
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
318
318
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
319
319
|
class Zonos {
|
|
@@ -327,7 +327,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
327
327
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
328
328
|
Zonos._paypalMockResponse = null;
|
|
329
329
|
Zonos.isBigCommerce = false;
|
|
330
|
-
Zonos.releaseDate = "
|
|
330
|
+
Zonos.releaseDate = "1737148584151";
|
|
331
331
|
Zonos.isLegacyCheckout = false;
|
|
332
332
|
Zonos.domain = typeof window !== 'undefined'
|
|
333
333
|
? // domain that embeds the iframe
|
|
@@ -343,7 +343,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
343
343
|
Zonos.isNpm = true;
|
|
344
344
|
Zonos.zonosQaUrl = null;
|
|
345
345
|
Zonos.zonosQaUrlApi = null;
|
|
346
|
-
Zonos.version = `v${"1.3.
|
|
346
|
+
Zonos.version = `v${"1.3.150"}`;
|
|
347
347
|
Zonos.modeAlerted = false;
|
|
348
348
|
Zonos.cartData = null;
|
|
349
349
|
Zonos.paypal = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-44efd080.js';
|
|
2
|
-
import {
|
|
2
|
+
import { D as validateCheckoutSession, f as stripeStore, e as cartStore, y as stripeStoreHandleInventoryCheck, r as translate, x as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-260f8518.js';
|
|
3
3
|
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-b4633675.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-10f38df6.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { f as stripeStore,
|
|
2
|
+
import { f as stripeStore, U as getFallbackDefaultCountryCode, l as localizationStore, r as translate, e as cartStore } from './cart-260f8518.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
4
|
import { b as logError, l as log } from './handleFetch-b4633675.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
@@ -16,6 +16,10 @@ const ZonosAddress = class {
|
|
|
16
16
|
constructor(hostRef) {
|
|
17
17
|
registerInstance(this, hostRef);
|
|
18
18
|
this.invalidCharacters = createEvent(this, "invalidCharacters", 7);
|
|
19
|
+
/**
|
|
20
|
+
* Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
|
|
21
|
+
*/
|
|
22
|
+
this.isAutoCompleteAdjusted = false;
|
|
19
23
|
this.type = undefined;
|
|
20
24
|
this.titleText = undefined;
|
|
21
25
|
this.defaultAddress = null;
|
|
@@ -107,6 +111,13 @@ const ZonosAddress = class {
|
|
|
107
111
|
this.isDirtyAddress = true;
|
|
108
112
|
// stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
|
|
109
113
|
setTimeout(() => {
|
|
114
|
+
if (!this.isAutoCompleteAdjusted) {
|
|
115
|
+
const googleAutoComplete = this.el.querySelector('iframe[src*="autocomplete-suggestions"]');
|
|
116
|
+
if (googleAutoComplete) {
|
|
117
|
+
googleAutoComplete.style.zIndex = '2';
|
|
118
|
+
}
|
|
119
|
+
this.isAutoCompleteAdjusted = true;
|
|
120
|
+
}
|
|
110
121
|
// scroll directly into view if it's mobile
|
|
111
122
|
if (isCheckoutMobile()) {
|
|
112
123
|
this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
|
|
@@ -145,7 +156,7 @@ const ZonosAddress = class {
|
|
|
145
156
|
}
|
|
146
157
|
render() {
|
|
147
158
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
148
|
-
return (h(Host, { key: '
|
|
159
|
+
return (h(Host, { key: '614a515a62e0f5dac7a91979b81b626fb326a420', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'e6942f54dfd8ca61da3b62fe0036fa14ea0ce758', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'e3ddd7a347588babb5f35a67b793766d039200f4', class: "zonos--address-component" })));
|
|
149
160
|
}
|
|
150
161
|
get el() { return getElement(this); }
|
|
151
162
|
static get watchers() { return {
|
|
@@ -700,17 +711,17 @@ const ZonosStripeInput = class {
|
|
|
700
711
|
} }, h("div", { key: 'a3e7f765b0081a564c5955e387ff4b521a28d1a5', class: classes([
|
|
701
712
|
'zonos--label-wrapper',
|
|
702
713
|
this.isDisabled && 'disabled',
|
|
703
|
-
]) }, h("input", { key: '
|
|
714
|
+
]) }, h("input", { key: '181c5230ddeb02e9cea646b7f0a8efa3a530796e', class: classes([
|
|
704
715
|
'zonos--floated-input',
|
|
705
716
|
!!this.inputLabel && 'has-label',
|
|
706
717
|
this.internalValue && 'has-content',
|
|
707
718
|
this.isError && 'has-error',
|
|
708
|
-
]), disabled: this.isDisabled, id: "zonos--input",
|
|
719
|
+
]), disabled: this.isDisabled, id: "zonos--input", onChange: e => {
|
|
709
720
|
const input = e.target;
|
|
710
721
|
this.inputChange.emit(input.value);
|
|
711
722
|
this.el.inputValue = input.value;
|
|
712
723
|
this.el.dispatchEvent(new Event('change'));
|
|
713
|
-
}, placeholder: this.inputPlaceholder, type: "text", value: this.internalValue }), h("div", { key: '
|
|
724
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.internalValue }), h("div", { key: 'ac6e97971905ba130c3533da6a409de60f99ed6d', class: "zonos--floated-label" }, h("label", { key: '1643ab4ef5b9449332351c854f8e43db8d192164', htmlFor: "zonos--input" }, this.inputLabel)))));
|
|
714
725
|
}
|
|
715
726
|
get el() { return getElement(this); }
|
|
716
727
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { e as cartStore,
|
|
2
|
+
import { e as cartStore, K as currencyFormat, r as translate, L as cartStoreHasOneEligibleItem, M as stripeStoreApplyPromoCode, N as stripeStoreRemovePromoCode, f as stripeStore, B as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, O as stripeStoreResetPromoCode, P as stripeStoreMessageBasedOnStatus, l as localizationStore, x as cartStoreNextStep, Q as stripeStoreTranslateAddressToLatin, R as cartStoreUpdateSelectedShippingOption, S as cartStoreGetShippingTransitInfo, T as sortServiceLevelOptionsByAmount } from './cart-260f8518.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-5453a7db.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
6
6
|
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, b as logError, a as getIsStagingMode } from './handleFetch-b4633675.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-d82f06f2.js';
|
|
2
|
-
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as cartStoreStartCheckoutInterval, t as trackConversionEvent,
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-
|
|
2
|
+
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as stripeStoreGetPaymentIntent, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, p as getCheckoutSessionBody, q as cartStoreUpdateToErrorState, r as translate, u as getZCountryUrlParam, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as stripeStoreHandleInventoryCheck, z as stripeStoreConfirmPayment, A as stripeStoreHandleInventoryRefund, B as stripeStoreReset, C as localizationStoreOnUpdate } from './cart-260f8518.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-5453a7db.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-44efd080.js';
|
|
5
5
|
import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, g as getIsTestMode, j as jsonParse, a as getIsStagingMode } from './handleFetch-b4633675.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
@@ -499,14 +499,18 @@ const ZonosCheckout = class {
|
|
|
499
499
|
}));
|
|
500
500
|
await cartStoreUpdateItems({ adjustments, cartItems: cartItemsFiltered });
|
|
501
501
|
}
|
|
502
|
-
// if
|
|
503
|
-
if (!
|
|
502
|
+
// if checkoutSessionId is not available, request a new one.
|
|
503
|
+
if (!cartStore.checkoutSessionId) {
|
|
504
504
|
const success = await stripeStoreInitCheckoutSession();
|
|
505
505
|
log(`stripeStoreInitCheckoutSession: ${success}`);
|
|
506
506
|
if (!success) {
|
|
507
507
|
return false;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
+
// get and set payment intent async except for staging mode
|
|
511
|
+
if (!cartStore.isStagingMode) {
|
|
512
|
+
void stripeStoreGetPaymentIntent();
|
|
513
|
+
}
|
|
510
514
|
// apply theme to stripe elements
|
|
511
515
|
await this.applyStripeTheme();
|
|
512
516
|
this.isRedirectAfterOrder =
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-d82f06f2.js';
|
|
2
|
-
import {
|
|
2
|
+
import { E as isValidSelector, f as stripeStore, F as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-260f8518.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
4
4
|
import { h as handleFetch, b as logError, l as log } from './handleFetch-b4633675.js';
|
|
5
5
|
import './isDarkColor-10f38df6.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-260f8518.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-b4633675.js';
|