@zonos/elements 1.3.194 → 1.3.196
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-bc882927.js → cart-2e3968e9.js} +7 -2
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-608fa681.js → paypal-b5c80f16.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +5 -5
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -44
- 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 -42
- package/dist/collection/components/store/checkout/stripe.js +7 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +1 -1
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +3 -3
- package/dist/esm/{cart-2f0ee51d.js → cart-006b6633.js} +7 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-3ecdf234.js → paypal-86483f34.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +5 -5
- package/dist/esm/zonos-cart-items_13.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +9 -44
- 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-2f0ee51d.js → cart-006b6633.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-3ecdf234.js → paypal-86483f34.js} +1 -1
- package/dist/esm-es5/zonos-address_11.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/checkout/zonos-checkout/zonos-checkout.d.ts +0 -4
- package/dist/types/types/generated/graphql.internal.types.d.ts +8 -0
- package/dist/types/types/generated/graphql.internal.types.ts +8 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-39e369f6.system.entry.js → p-06547c8c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e15061e.system.entry.js → p-0d5fe109.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4931d780.entry.js → p-1383ab6b.entry.js} +1 -1
- package/dist/zonos-elements/{p-127deab4.system.entry.js → p-2abcaaa1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-de73fec0.system.js → p-3bcf2091.system.js} +1 -1
- package/dist/zonos-elements/p-3febb54a.entry.js +1 -0
- package/dist/zonos-elements/{p-5d7c9ac3.entry.js → p-4e11db81.entry.js} +1 -1
- package/dist/zonos-elements/{p-2f34e29a.js → p-63bfe67c.js} +1 -1
- package/dist/zonos-elements/{p-0fe6efef.system.entry.js → p-76468d91.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-649d3e92.entry.js → p-7b1e8a42.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e27aaff.system.entry.js → p-81bf423c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e275d241.entry.js → p-8558486d.entry.js} +1 -1
- package/dist/zonos-elements/p-8caac4e2.entry.js +1 -0
- package/dist/zonos-elements/{p-dc1b3bcb.entry.js → p-9350f23a.entry.js} +1 -1
- package/dist/zonos-elements/{p-de47028a.system.js → p-98753f6e.system.js} +1 -1
- package/dist/zonos-elements/{p-8df9a41b.entry.js → p-a35aab84.entry.js} +1 -1
- package/dist/zonos-elements/{p-c7f0941d.system.entry.js → p-b1970c2c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8253ae4.system.entry.js → p-bde07ab8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6ccb1b13.entry.js → p-c1173557.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a31eb14.system.js → p-c69c3219.system.js} +1 -1
- package/dist/zonos-elements/{p-4abc1b34.system.entry.js → p-d319e084.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-23752a7e.entry.js → p-ddbeb2ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-fccf8c66.system.entry.js → p-e5d4705e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ea6d87a1.system.js +1 -1
- package/dist/zonos-elements/{p-264e7688.js → p-f57b0170.js} +1 -1
- package/dist/zonos-elements/p-fb75b13f.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-02787d8c.entry.js +0 -1
- package/dist/zonos-elements/p-6b2358f2.entry.js +0 -1
- package/dist/zonos-elements/p-a2df5a4b.system.entry.js +0 -1
|
@@ -14932,7 +14932,7 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
14932
14932
|
* @returns {boolean} whether or not the checkout session is successfully created
|
|
14933
14933
|
*/
|
|
14934
14934
|
const stripeStoreInitCheckoutSession = async () => {
|
|
14935
|
-
var _a;
|
|
14935
|
+
var _a, _b;
|
|
14936
14936
|
if (!localizationStore.targetCurrency) {
|
|
14937
14937
|
handleFetch.logError(`Failed to create checkout session - missing localizationStore.targetCurrency`);
|
|
14938
14938
|
return false;
|
|
@@ -14946,6 +14946,11 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
14946
14946
|
});
|
|
14947
14947
|
stripeStore.isFetchingSession = false;
|
|
14948
14948
|
if (errors.length || !json) {
|
|
14949
|
+
const messages = (_a = errors.find(error => error.message)) === null || _a === void 0 ? void 0 : _a.message;
|
|
14950
|
+
// check if the error is related to expired cart and thow error so we can show error message accordingly
|
|
14951
|
+
if (messages.some(message => message.message === 'Cart is expired.')) {
|
|
14952
|
+
throw new Error('Cart is expired.');
|
|
14953
|
+
}
|
|
14949
14954
|
handleFetch.logError('Error occurred when creating checkout session', JSON.stringify(errors, null, 2));
|
|
14950
14955
|
return false;
|
|
14951
14956
|
}
|
|
@@ -14953,7 +14958,7 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
14953
14958
|
// update cart store with updated information
|
|
14954
14959
|
cartStoreSetCheckoutSession(result);
|
|
14955
14960
|
cartStoreApplySubtotals({
|
|
14956
|
-
method: ((
|
|
14961
|
+
method: ((_b = result.landedCost) === null || _b === void 0 ? void 0 : _b.method) || 'DDP',
|
|
14957
14962
|
subtotals: result.subtotals,
|
|
14958
14963
|
});
|
|
14959
14964
|
handleFetch.log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -131,7 +131,7 @@ const getZonosQaUrl = () => {
|
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
133
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
134
|
-
const cdnUrl = "https://v1.3.
|
|
134
|
+
const cdnUrl = "https://v1.3.196.js.zonos.com";
|
|
135
135
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
136
136
|
if (!qaUrl &&
|
|
137
137
|
(cdnUrl.includes('test.') ||
|
|
@@ -372,10 +372,10 @@ const zonosLoadUrl = (() => {
|
|
|
372
372
|
}
|
|
373
373
|
return null;
|
|
374
374
|
})();
|
|
375
|
-
const ZONOS_URL = "https://v1.3.
|
|
376
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
377
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
378
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
375
|
+
const ZONOS_URL = "https://v1.3.196.js.zonos.com";
|
|
376
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.196";
|
|
377
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.196";
|
|
378
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.196";
|
|
379
379
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
380
380
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
381
381
|
class Zonos {
|
|
@@ -393,7 +393,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
393
393
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
394
394
|
: null;
|
|
395
395
|
Zonos.isBigCommerce = false;
|
|
396
|
-
Zonos.releaseDate = "
|
|
396
|
+
Zonos.releaseDate = "1746458422535";
|
|
397
397
|
Zonos.isLegacyCheckout = false;
|
|
398
398
|
Zonos.domain = typeof window !== 'undefined'
|
|
399
399
|
? // domain that embeds the iframe
|
|
@@ -411,7 +411,7 @@ Zonos.isNpm = true;
|
|
|
411
411
|
Zonos.zonosQaUrl = null;
|
|
412
412
|
Zonos.zonosQaUrlApi = null;
|
|
413
413
|
Zonos.trackEventLogs = [];
|
|
414
|
-
Zonos.version = `v${"1.3.
|
|
414
|
+
Zonos.version = `v${"1.3.196"}`;
|
|
415
415
|
Zonos.modeAlerted = false;
|
|
416
416
|
Zonos.cartData = null;
|
|
417
417
|
Zonos.paypal = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-2e3968e9.js');
|
|
5
5
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-92a10a85.js');
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-2e3968e9.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
9
9
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
|
|
@@ -774,7 +774,7 @@ const mergeAddress = ({ addresses, delimiter = ' ', }) => {
|
|
|
774
774
|
return Array.from(addressSet).join(delimiter);
|
|
775
775
|
};
|
|
776
776
|
|
|
777
|
-
const zonosCustomAddressCss = ".sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.show.sc-zonos-custom-address{opacity:1;height:auto}";
|
|
777
|
+
const zonosCustomAddressCss = ".sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}";
|
|
778
778
|
const ZonosCustomAddressStyle0 = zonosCustomAddressCss;
|
|
779
779
|
|
|
780
780
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
@@ -1459,7 +1459,7 @@ const ZonosAddress = class {
|
|
|
1459
1459
|
});
|
|
1460
1460
|
}, suggestions: this.addressSuggestions, type: this.type })), index.h("div", { "aria-label": "Additional address details", class: classes.classes([
|
|
1461
1461
|
'zonos--custom-address-form-additional-fields',
|
|
1462
|
-
countryCode && this.isAddressLine1Entered ? 'show' : '',
|
|
1462
|
+
countryCode && this.isAddressLine1Entered ? 'zonos--show' : '',
|
|
1463
1463
|
]), role: "group" }, index.h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel: cart.translate(((_f = this.countryField) === null || _f === void 0 ? void 0 : _f.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
|
|
1464
1464
|
this.line2 = event.detail;
|
|
1465
1465
|
} }), ((_g = this.countryField) === null || _g === void 0 ? void 0 : _g.cityShow) && (index.h("zonos-stripe-input", { "aria-required": ((_h = this.countryField) === null || _h === void 0 ? void 0 : _h.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: cart.translate(((_j = this.countryField) === null || _j === void 0 ? void 0 : _j.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
|
|
@@ -1573,10 +1573,10 @@ const ZonosAddress = class {
|
|
|
1573
1573
|
this.country = cart.localizationStore.selectedCountryCode;
|
|
1574
1574
|
}
|
|
1575
1575
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
1576
|
-
return (index.h(index.Host, { key: '
|
|
1576
|
+
return (index.h(index.Host, { key: 'bb1f01c899ecdc1ed52eb8be7a680fdbb2ce9a7b', class: classes.classes([
|
|
1577
1577
|
'zonos--address zonos--elements',
|
|
1578
1578
|
`zonos--${this.type}-address`,
|
|
1579
|
-
]) }, index.h("zonos-text", { key: '
|
|
1579
|
+
]) }, index.h("zonos-text", { key: 'f6ad6d23ec141fe192908b639802f69ad565958e', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
|
|
1580
1580
|
}
|
|
1581
1581
|
get el() { return index.getElement(this); }
|
|
1582
1582
|
static get watchers() { return {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-2e3968e9.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
8
|
+
const paypal = require('./paypal-b5c80f16.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-969d05d8.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-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-2e3968e9.js');
|
|
7
|
+
const paypal = require('./paypal-b5c80f16.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
10
10
|
const classes = require('./classes-b7918f56.js');
|
|
@@ -335,35 +335,6 @@ const ZonosCheckout = class {
|
|
|
335
335
|
paypalEnabled: paypal.paypalStoreHasPaypalEnabled(),
|
|
336
336
|
});
|
|
337
337
|
};
|
|
338
|
-
/**
|
|
339
|
-
* Check if the cart is expired, return `true` if the cart is expired
|
|
340
|
-
*/
|
|
341
|
-
this.handleCartExpiredCheck = () => {
|
|
342
|
-
var _a;
|
|
343
|
-
// don't check for cart expiration if the cart is in test mode
|
|
344
|
-
if (handleFetch.getIsTestMode()) {
|
|
345
|
-
handleFetch.log('Not checking for cart expiration in test mode');
|
|
346
|
-
return false;
|
|
347
|
-
}
|
|
348
|
-
// Do nothing if no cart data or cart expiration is not set
|
|
349
|
-
if (!zonosStore.zonosStore.checkoutSettings.defaultCartExpiration ||
|
|
350
|
-
!((_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.createdAt)) {
|
|
351
|
-
return false;
|
|
352
|
-
}
|
|
353
|
-
const cartCreatedAt = new Date(window.Zonos.cartData.createdAt).getTime();
|
|
354
|
-
const currentTime = new Date().getTime();
|
|
355
|
-
const timeDiff = currentTime - cartCreatedAt;
|
|
356
|
-
const timeDiffInSeconds = Math.floor(timeDiff / 1000);
|
|
357
|
-
handleFetch.log(`currentTime: ${currentTime} | cartCreatedAt: ${cartCreatedAt}`);
|
|
358
|
-
handleFetch.log(`Cart has been created for ${timeDiffInSeconds / 60} minutes`);
|
|
359
|
-
if (zonosStore.zonosStore.checkoutSettings.defaultCartExpiration) {
|
|
360
|
-
if (timeDiffInSeconds > zonosStore.zonosStore.checkoutSettings.defaultCartExpiration) {
|
|
361
|
-
this.isCartExpired = true;
|
|
362
|
-
return true;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return false;
|
|
366
|
-
};
|
|
367
338
|
/**
|
|
368
339
|
* Check if stripe payment intent is succeeded or in a good state to move forward
|
|
369
340
|
*/
|
|
@@ -571,22 +542,12 @@ const ZonosCheckout = class {
|
|
|
571
542
|
return false;
|
|
572
543
|
}
|
|
573
544
|
window.Zonos.cartData = cartData;
|
|
574
|
-
const isExpired = this.handleCartExpiredCheck();
|
|
575
|
-
if (isExpired) {
|
|
576
|
-
// Do not proceed if the cart is expired
|
|
577
|
-
return false;
|
|
578
|
-
}
|
|
579
545
|
const { adjustments, cartItems } = buildCartItemsByTempCart(cartData);
|
|
580
546
|
await cart.cartStoreUpdateItems({ adjustments, cartItems });
|
|
581
547
|
}
|
|
582
548
|
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
583
549
|
else if (window.Zonos.cartData) {
|
|
584
550
|
handleFetch.log('tempCartUUID is provided, start building cart');
|
|
585
|
-
const isExpired = this.handleCartExpiredCheck();
|
|
586
|
-
if (isExpired) {
|
|
587
|
-
// Do not proceed if the cart is expired
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
551
|
const { adjustments, cartItems } = buildCartItemsByTempCart(window.Zonos.cartData);
|
|
591
552
|
await cart.cartStoreUpdateItems({ adjustments, cartItems });
|
|
592
553
|
}
|
|
@@ -777,9 +738,6 @@ const ZonosCheckout = class {
|
|
|
777
738
|
try {
|
|
778
739
|
// buildCartDetail may throw an error
|
|
779
740
|
const result = await this.buildCartAndInit();
|
|
780
|
-
if (this.isCartExpired) {
|
|
781
|
-
throw new Error('This shopping cart is expired');
|
|
782
|
-
}
|
|
783
741
|
if (!result) {
|
|
784
742
|
throw new Error('Error building cart');
|
|
785
743
|
}
|
|
@@ -808,6 +766,13 @@ const ZonosCheckout = class {
|
|
|
808
766
|
}
|
|
809
767
|
}
|
|
810
768
|
catch (err) {
|
|
769
|
+
if (err instanceof Error) {
|
|
770
|
+
const message = err.message;
|
|
771
|
+
if (message === 'Cart is expired.') {
|
|
772
|
+
this.isCartExpired = true;
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
811
776
|
// stop loading
|
|
812
777
|
cart.stripeStore.isFetchingSession = false;
|
|
813
778
|
handleFetch.logError(err);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-2e3968e9.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
8
8
|
const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-2e3968e9.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./handleFetch-969d05d8.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-2e3968e9.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-92a10a85.js');
|
|
@@ -6,9 +6,9 @@ const index = require('./index-0993f42d.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-3d0a563e.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-2e3968e9.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
11
|
-
const paypal = require('./paypal-
|
|
11
|
+
const paypal = require('./paypal-b5c80f16.js');
|
|
12
12
|
require('./isDarkColor-92a10a85.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-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-2e3968e9.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-c466b127.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-0993f42d.js');
|
|
6
6
|
const debounce = require('./debounce-d393fafe.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-2e3968e9.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
9
9
|
const classes = require('./classes-b7918f56.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0993f42d.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-2e3968e9.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-c466b127.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./handleFetch-969d05d8.js');
|
|
@@ -61,35 +61,6 @@ export class ZonosCheckout {
|
|
|
61
61
|
paypalEnabled: paypalStoreHasPaypalEnabled(),
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
-
/**
|
|
65
|
-
* Check if the cart is expired, return `true` if the cart is expired
|
|
66
|
-
*/
|
|
67
|
-
this.handleCartExpiredCheck = () => {
|
|
68
|
-
var _a;
|
|
69
|
-
// don't check for cart expiration if the cart is in test mode
|
|
70
|
-
if (getIsTestMode()) {
|
|
71
|
-
log('Not checking for cart expiration in test mode');
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
// Do nothing if no cart data or cart expiration is not set
|
|
75
|
-
if (!zonosStore.checkoutSettings.defaultCartExpiration ||
|
|
76
|
-
!((_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.createdAt)) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
const cartCreatedAt = new Date(window.Zonos.cartData.createdAt).getTime();
|
|
80
|
-
const currentTime = new Date().getTime();
|
|
81
|
-
const timeDiff = currentTime - cartCreatedAt;
|
|
82
|
-
const timeDiffInSeconds = Math.floor(timeDiff / 1000);
|
|
83
|
-
log(`currentTime: ${currentTime} | cartCreatedAt: ${cartCreatedAt}`);
|
|
84
|
-
log(`Cart has been created for ${timeDiffInSeconds / 60} minutes`);
|
|
85
|
-
if (zonosStore.checkoutSettings.defaultCartExpiration) {
|
|
86
|
-
if (timeDiffInSeconds > zonosStore.checkoutSettings.defaultCartExpiration) {
|
|
87
|
-
this.isCartExpired = true;
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
-
};
|
|
93
64
|
/**
|
|
94
65
|
* Check if stripe payment intent is succeeded or in a good state to move forward
|
|
95
66
|
*/
|
|
@@ -297,22 +268,12 @@ export class ZonosCheckout {
|
|
|
297
268
|
return false;
|
|
298
269
|
}
|
|
299
270
|
window.Zonos.cartData = cartData;
|
|
300
|
-
const isExpired = this.handleCartExpiredCheck();
|
|
301
|
-
if (isExpired) {
|
|
302
|
-
// Do not proceed if the cart is expired
|
|
303
|
-
return false;
|
|
304
|
-
}
|
|
305
271
|
const { adjustments, cartItems } = buildCartItemsByTempCart(cartData);
|
|
306
272
|
await cartStoreUpdateItems({ adjustments, cartItems });
|
|
307
273
|
}
|
|
308
274
|
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
309
275
|
else if (window.Zonos.cartData) {
|
|
310
276
|
log('tempCartUUID is provided, start building cart');
|
|
311
|
-
const isExpired = this.handleCartExpiredCheck();
|
|
312
|
-
if (isExpired) {
|
|
313
|
-
// Do not proceed if the cart is expired
|
|
314
|
-
return false;
|
|
315
|
-
}
|
|
316
277
|
const { adjustments, cartItems } = buildCartItemsByTempCart(window.Zonos.cartData);
|
|
317
278
|
await cartStoreUpdateItems({ adjustments, cartItems });
|
|
318
279
|
}
|
|
@@ -503,9 +464,6 @@ export class ZonosCheckout {
|
|
|
503
464
|
try {
|
|
504
465
|
// buildCartDetail may throw an error
|
|
505
466
|
const result = await this.buildCartAndInit();
|
|
506
|
-
if (this.isCartExpired) {
|
|
507
|
-
throw new Error('This shopping cart is expired');
|
|
508
|
-
}
|
|
509
467
|
if (!result) {
|
|
510
468
|
throw new Error('Error building cart');
|
|
511
469
|
}
|
|
@@ -534,6 +492,13 @@ export class ZonosCheckout {
|
|
|
534
492
|
}
|
|
535
493
|
}
|
|
536
494
|
catch (err) {
|
|
495
|
+
if (err instanceof Error) {
|
|
496
|
+
const message = err.message;
|
|
497
|
+
if (message === 'Cart is expired.') {
|
|
498
|
+
this.isCartExpired = true;
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
537
502
|
// stop loading
|
|
538
503
|
stripeStore.isFetchingSession = false;
|
|
539
504
|
logError(err);
|
|
@@ -657,7 +657,7 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
657
657
|
* @returns {boolean} whether or not the checkout session is successfully created
|
|
658
658
|
*/
|
|
659
659
|
const stripeStoreInitCheckoutSession = async () => {
|
|
660
|
-
var _a;
|
|
660
|
+
var _a, _b;
|
|
661
661
|
if (!localizationStore.targetCurrency) {
|
|
662
662
|
logError(`Failed to create checkout session - missing localizationStore.targetCurrency`);
|
|
663
663
|
return false;
|
|
@@ -671,6 +671,11 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
671
671
|
});
|
|
672
672
|
stripeStore.isFetchingSession = false;
|
|
673
673
|
if (errors.length || !json) {
|
|
674
|
+
const messages = (_a = errors.find(error => error.message)) === null || _a === void 0 ? void 0 : _a.message;
|
|
675
|
+
// check if the error is related to expired cart and thow error so we can show error message accordingly
|
|
676
|
+
if (messages.some(message => message.message === 'Cart is expired.')) {
|
|
677
|
+
throw new Error('Cart is expired.');
|
|
678
|
+
}
|
|
674
679
|
logError('Error occurred when creating checkout session', JSON.stringify(errors, null, 2));
|
|
675
680
|
return false;
|
|
676
681
|
}
|
|
@@ -678,7 +683,7 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
678
683
|
// update cart store with updated information
|
|
679
684
|
cartStoreSetCheckoutSession(result);
|
|
680
685
|
cartStoreApplySubtotals({
|
|
681
|
-
method: ((
|
|
686
|
+
method: ((_b = result.landedCost) === null || _b === void 0 ? void 0 : _b.method) || 'DDP',
|
|
682
687
|
subtotals: result.subtotals,
|
|
683
688
|
});
|
|
684
689
|
log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
|
@@ -695,7 +695,7 @@ export class ZonosAddress {
|
|
|
695
695
|
});
|
|
696
696
|
}, suggestions: this.addressSuggestions, type: this.type })), h("div", { "aria-label": "Additional address details", class: classes([
|
|
697
697
|
'zonos--custom-address-form-additional-fields',
|
|
698
|
-
countryCode && this.isAddressLine1Entered ? 'show' : '',
|
|
698
|
+
countryCode && this.isAddressLine1Entered ? 'zonos--show' : '',
|
|
699
699
|
]), role: "group" }, h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel: translate(((_f = this.countryField) === null || _f === void 0 ? void 0 : _f.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
|
|
700
700
|
this.line2 = event.detail;
|
|
701
701
|
} }), ((_g = this.countryField) === null || _g === void 0 ? void 0 : _g.cityShow) && (h("zonos-stripe-input", { "aria-required": ((_h = this.countryField) === null || _h === void 0 ? void 0 : _h.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: translate(((_j = this.countryField) === null || _j === void 0 ? void 0 : _j.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
|
|
@@ -809,10 +809,10 @@ export class ZonosAddress {
|
|
|
809
809
|
this.country = localizationStore.selectedCountryCode;
|
|
810
810
|
}
|
|
811
811
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
812
|
-
return (h(Host, { key: '
|
|
812
|
+
return (h(Host, { key: 'bb1f01c899ecdc1ed52eb8be7a680fdbb2ce9a7b', class: classes([
|
|
813
813
|
'zonos--address zonos--elements',
|
|
814
814
|
`zonos--${this.type}-address`,
|
|
815
|
-
]) }, h("zonos-text", { key: '
|
|
815
|
+
]) }, h("zonos-text", { key: 'f6ad6d23ec141fe192908b639802f69ad565958e', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
|
|
816
816
|
}
|
|
817
817
|
static get is() { return "zonos-custom-address"; }
|
|
818
818
|
static get encapsulation() { return "scoped"; }
|
|
@@ -14930,7 +14930,7 @@ const stripeStoreGetPaymentIntent = async () => {
|
|
|
14930
14930
|
* @returns {boolean} whether or not the checkout session is successfully created
|
|
14931
14931
|
*/
|
|
14932
14932
|
const stripeStoreInitCheckoutSession = async () => {
|
|
14933
|
-
var _a;
|
|
14933
|
+
var _a, _b;
|
|
14934
14934
|
if (!localizationStore.targetCurrency) {
|
|
14935
14935
|
logError(`Failed to create checkout session - missing localizationStore.targetCurrency`);
|
|
14936
14936
|
return false;
|
|
@@ -14944,6 +14944,11 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
14944
14944
|
});
|
|
14945
14945
|
stripeStore.isFetchingSession = false;
|
|
14946
14946
|
if (errors.length || !json) {
|
|
14947
|
+
const messages = (_a = errors.find(error => error.message)) === null || _a === void 0 ? void 0 : _a.message;
|
|
14948
|
+
// check if the error is related to expired cart and thow error so we can show error message accordingly
|
|
14949
|
+
if (messages.some(message => message.message === 'Cart is expired.')) {
|
|
14950
|
+
throw new Error('Cart is expired.');
|
|
14951
|
+
}
|
|
14947
14952
|
logError('Error occurred when creating checkout session', JSON.stringify(errors, null, 2));
|
|
14948
14953
|
return false;
|
|
14949
14954
|
}
|
|
@@ -14951,7 +14956,7 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
14951
14956
|
// update cart store with updated information
|
|
14952
14957
|
cartStoreSetCheckoutSession(result);
|
|
14953
14958
|
cartStoreApplySubtotals({
|
|
14954
|
-
method: ((
|
|
14959
|
+
method: ((_b = result.landedCost) === null || _b === void 0 ? void 0 : _b.method) || 'DDP',
|
|
14955
14960
|
subtotals: result.subtotals,
|
|
14956
14961
|
});
|
|
14957
14962
|
log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
package/dist/esm/index.js
CHANGED
|
@@ -128,7 +128,7 @@ const getZonosQaUrl = () => {
|
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
130
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
131
|
-
const cdnUrl = "https://v1.3.
|
|
131
|
+
const cdnUrl = "https://v1.3.196.js.zonos.com";
|
|
132
132
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
133
133
|
if (!qaUrl &&
|
|
134
134
|
(cdnUrl.includes('test.') ||
|
|
@@ -369,10 +369,10 @@ const zonosLoadUrl = (() => {
|
|
|
369
369
|
}
|
|
370
370
|
return null;
|
|
371
371
|
})();
|
|
372
|
-
const ZONOS_URL = "https://v1.3.
|
|
373
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
374
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
375
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
372
|
+
const ZONOS_URL = "https://v1.3.196.js.zonos.com";
|
|
373
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.196";
|
|
374
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.196";
|
|
375
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.196";
|
|
376
376
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
377
377
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
378
378
|
class Zonos {
|
|
@@ -390,7 +390,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
390
390
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
391
391
|
: null;
|
|
392
392
|
Zonos.isBigCommerce = false;
|
|
393
|
-
Zonos.releaseDate = "
|
|
393
|
+
Zonos.releaseDate = "1746458422535";
|
|
394
394
|
Zonos.isLegacyCheckout = false;
|
|
395
395
|
Zonos.domain = typeof window !== 'undefined'
|
|
396
396
|
? // domain that embeds the iframe
|
|
@@ -408,7 +408,7 @@ Zonos.isNpm = true;
|
|
|
408
408
|
Zonos.zonosQaUrl = null;
|
|
409
409
|
Zonos.zonosQaUrlApi = null;
|
|
410
410
|
Zonos.trackEventLogs = [];
|
|
411
|
-
Zonos.version = `v${"1.3.
|
|
411
|
+
Zonos.version = `v${"1.3.196"}`;
|
|
412
412
|
Zonos.modeAlerted = false;
|
|
413
413
|
Zonos.cartData = null;
|
|
414
414
|
Zonos.paypal = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-cdabc848.js';
|
|
2
|
-
import { t as trackConversionEvent, F as validateCheckoutSession, f as stripeStore, e as cartStore, z as stripeStoreHandleInventoryCheck, r as translate, x as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-
|
|
2
|
+
import { t as trackConversionEvent, F as validateCheckoutSession, f as stripeStore, e as cartStore, z as stripeStoreHandleInventoryCheck, r as translate, x as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-006b6633.js';
|
|
3
3
|
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-621e45bc.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-4c7b2ffc.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-a457c60c.js';
|
|
2
|
-
import { e as cartStore, f as stripeStore, t as trackConversionEvent, V as getFallbackDefaultCountryCode, r as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { e as cartStore, f as stripeStore, t as trackConversionEvent, V as getFallbackDefaultCountryCode, r as translate, l as localizationStore } from './cart-006b6633.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreFontFamily, f as isObject_1 } from './zonosStore-cdabc848.js';
|
|
4
4
|
import { b as logError, l as log, i as isCheckoutMobile } from './handleFetch-621e45bc.js';
|
|
5
5
|
import { s as shouldRenderTaxIdInput, i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './shouldRenderTaxIdInput-8bc112bb.js';
|
|
@@ -770,7 +770,7 @@ const mergeAddress = ({ addresses, delimiter = ' ', }) => {
|
|
|
770
770
|
return Array.from(addressSet).join(delimiter);
|
|
771
771
|
};
|
|
772
772
|
|
|
773
|
-
const zonosCustomAddressCss = ".sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.show.sc-zonos-custom-address{opacity:1;height:auto}";
|
|
773
|
+
const zonosCustomAddressCss = ".sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}";
|
|
774
774
|
const ZonosCustomAddressStyle0 = zonosCustomAddressCss;
|
|
775
775
|
|
|
776
776
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
@@ -1455,7 +1455,7 @@ const ZonosAddress = class {
|
|
|
1455
1455
|
});
|
|
1456
1456
|
}, suggestions: this.addressSuggestions, type: this.type })), h("div", { "aria-label": "Additional address details", class: classes([
|
|
1457
1457
|
'zonos--custom-address-form-additional-fields',
|
|
1458
|
-
countryCode && this.isAddressLine1Entered ? 'show' : '',
|
|
1458
|
+
countryCode && this.isAddressLine1Entered ? 'zonos--show' : '',
|
|
1459
1459
|
]), role: "group" }, h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel: translate(((_f = this.countryField) === null || _f === void 0 ? void 0 : _f.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
|
|
1460
1460
|
this.line2 = event.detail;
|
|
1461
1461
|
} }), ((_g = this.countryField) === null || _g === void 0 ? void 0 : _g.cityShow) && (h("zonos-stripe-input", { "aria-required": ((_h = this.countryField) === null || _h === void 0 ? void 0 : _h.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: translate(((_j = this.countryField) === null || _j === void 0 ? void 0 : _j.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
|
|
@@ -1569,10 +1569,10 @@ const ZonosAddress = class {
|
|
|
1569
1569
|
this.country = localizationStore.selectedCountryCode;
|
|
1570
1570
|
}
|
|
1571
1571
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
1572
|
-
return (h(Host, { key: '
|
|
1572
|
+
return (h(Host, { key: 'bb1f01c899ecdc1ed52eb8be7a680fdbb2ce9a7b', class: classes([
|
|
1573
1573
|
'zonos--address zonos--elements',
|
|
1574
1574
|
`zonos--${this.type}-address`,
|
|
1575
|
-
]) }, h("zonos-text", { key: '
|
|
1575
|
+
]) }, h("zonos-text", { key: 'f6ad6d23ec141fe192908b639802f69ad565958e', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
|
|
1576
1576
|
}
|
|
1577
1577
|
get el() { return getElement(this); }
|
|
1578
1578
|
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-a457c60c.js';
|
|
2
|
-
import { e as cartStore, E as currencyFormat, r as translate, M as cartStoreHasOneEligibleItem, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, f as stripeStore, C as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, l as localizationStore, x as cartStoreNextStep, R as stripeStoreTranslateAddressToLatin, S as cartStoreUpdateSelectedShippingOption, T as cartStoreGetShippingTransitInfo, U as sortServiceLevelOptionsByAmount } from './cart-
|
|
2
|
+
import { e as cartStore, E as currencyFormat, r as translate, M as cartStoreHasOneEligibleItem, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, f as stripeStore, C as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, l as localizationStore, x as cartStoreNextStep, R as stripeStoreTranslateAddressToLatin, S as cartStoreUpdateSelectedShippingOption, T as cartStoreGetShippingTransitInfo, U as sortServiceLevelOptionsByAmount } from './cart-006b6633.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-86483f34.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-cdabc848.js';
|
|
6
6
|
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-621e45bc.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|