@zonos/elements 1.3.212 → 1.3.213
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-d04009b9.js → cart-e0b62259.js} +6 -0
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-3a2d4501.js → paypal-93e5de01.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_14.cjs.entry.js +8 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +4 -3
- package/dist/collection/components/store/checkout/cart.js +6 -0
- package/dist/esm/{cart-f36b8065.js → cart-c3540cd7.js} +7 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-4dd540c7.js → paypal-5963c1ab.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +1 -1
- package/dist/esm/zonos-cart-items_14.entry.js +8 -8
- package/dist/esm/zonos-checkout.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
- package/dist/esm-es5/{cart-f36b8065.js → cart-c3540cd7.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-4dd540c7.js → paypal-5963c1ab.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/scripts/index.d.ts +4 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/types/utils/ZonosSettings.d.ts +4 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-0fd105fa.system.entry.js +1 -0
- package/dist/zonos-elements/{p-67da7b6d.entry.js → p-1d0e40b7.entry.js} +1 -1
- package/dist/zonos-elements/{p-dba65101.system.entry.js → p-299efbcf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8b57a34d.entry.js → p-6d7e45f3.entry.js} +1 -1
- package/dist/zonos-elements/{p-3464e486.system.entry.js → p-6e5236eb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1cc5b4f7.system.entry.js → p-6e8354c1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-20584d36.system.js → p-7567bb2f.system.js} +1 -1
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/{p-f0e8e81e.entry.js → p-9004bdda.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6aabc2f.system.js → p-adbc4643.system.js} +1 -1
- package/dist/zonos-elements/p-aeae5a7f.entry.js +1 -0
- package/dist/zonos-elements/{p-b0643c40.js → p-c8433f89.js} +1 -1
- package/dist/zonos-elements/{p-002b5c5f.system.entry.js → p-e72b61c1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-24a5352e.entry.js → p-ec7a6d28.entry.js} +1 -1
- package/dist/zonos-elements/{p-23079911.js → p-f979a131.js} +1 -1
- package/dist/zonos-elements/{p-9b2aafa6.system.js → p-fb898c4f.system.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-0595e3f8.entry.js +0 -1
- package/dist/zonos-elements/p-1ed7c17d.system.entry.js +0 -1
|
@@ -1969,6 +1969,12 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
1969
1969
|
* For some service levels, the landed cost that's DAP and we do remittance on behalf of the merchant, these landed cost should be treated as DDP
|
|
1970
1970
|
*/
|
|
1971
1971
|
const cartStoreGetMethod = (landedCost) => {
|
|
1972
|
+
var _a, _b, _c;
|
|
1973
|
+
// If the landed cost is DAP and the country is domestic, then treat it as DDP since no duty or fee is due at the door
|
|
1974
|
+
if (landedCost.method === 'DAP' &&
|
|
1975
|
+
((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US'))) {
|
|
1976
|
+
return 'DDP';
|
|
1977
|
+
}
|
|
1972
1978
|
if (landedCost.method === 'DAP' &&
|
|
1973
1979
|
landedCost.remittance.length &&
|
|
1974
1980
|
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -132,7 +132,7 @@ const getZonosQaUrl = () => {
|
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
134
134
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
135
|
-
const cdnUrl = "https://v1.3.
|
|
135
|
+
const cdnUrl = "https://v1.3.213.js.zonos.com";
|
|
136
136
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
137
137
|
if (!qaUrl &&
|
|
138
138
|
(cdnUrl.includes('test.') ||
|
|
@@ -375,10 +375,10 @@ const zonosLoadUrl = (() => {
|
|
|
375
375
|
}
|
|
376
376
|
return null;
|
|
377
377
|
})();
|
|
378
|
-
const ZONOS_URL = "https://v1.3.
|
|
379
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
380
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
381
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
378
|
+
const ZONOS_URL = "https://v1.3.213.js.zonos.com";
|
|
379
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.213";
|
|
380
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.213";
|
|
381
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.213";
|
|
382
382
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
383
383
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
384
384
|
class Zonos {
|
|
@@ -396,7 +396,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
396
396
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
397
397
|
: null;
|
|
398
398
|
Zonos.isBigCommerce = false;
|
|
399
|
-
Zonos.releaseDate = "
|
|
399
|
+
Zonos.releaseDate = "1749249803483";
|
|
400
400
|
Zonos.isLegacyCheckout = false;
|
|
401
401
|
Zonos.domain = typeof window !== 'undefined'
|
|
402
402
|
? // domain that embeds the iframe
|
|
@@ -414,7 +414,7 @@ Zonos.isNpm = true;
|
|
|
414
414
|
Zonos.zonosQaUrl = null;
|
|
415
415
|
Zonos.zonosQaUrlApi = null;
|
|
416
416
|
Zonos.trackEventLogs = [];
|
|
417
|
-
Zonos.version = `v${"1.3.
|
|
417
|
+
Zonos.version = `v${"1.3.213"}`;
|
|
418
418
|
Zonos.modeAlerted = false;
|
|
419
419
|
Zonos.cartData = null;
|
|
420
420
|
Zonos.paypal = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-e0b62259.js');
|
|
5
5
|
const localization = require('./localization-91bcde0e.js');
|
|
6
6
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
7
7
|
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
6
|
const debounce$1 = require('./debounce-465a4328.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-e0b62259.js');
|
|
9
9
|
const localization = require('./localization-91bcde0e.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
11
11
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-e0b62259.js');
|
|
7
7
|
const localization = require('./localization-91bcde0e.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const paypal = require('./paypal-3a2d4501.js');
|
|
10
9
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
10
|
+
const paypal = require('./paypal-93e5de01.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
12
12
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
13
13
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
@@ -1220,9 +1220,9 @@ const ZonosCartSubtotal = class {
|
|
|
1220
1220
|
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cart.cartStore.selectedShippingOption.displayName), cart.cartStore.selectedShippingOptionTransitTime && (index.h("zonos-text", { class: "zonos--caption", type: "caption" }, cart.cartStore.selectedShippingOptionTransitTime))));
|
|
1221
1221
|
};
|
|
1222
1222
|
const renderLandedCost = () => {
|
|
1223
|
-
var _a;
|
|
1223
|
+
var _a, _b, _c;
|
|
1224
1224
|
// Domestic US doesn't have duty applied, just taxes and fees
|
|
1225
|
-
if (((_a = cart.stripeStore.stripeAddressEventData) === null ||
|
|
1225
|
+
if ((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = cart.stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')) {
|
|
1226
1226
|
return (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Taxes and fees'))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("div", { class: "zonos--cart-duty-tax-price" }, cart.cartStore.dutiesTaxesFees !== null ||
|
|
1227
1227
|
cart.cartStore.dutiesTaxesFeesEstimate !== null
|
|
1228
1228
|
? renderCheckoutCurrency({
|
|
@@ -2679,7 +2679,6 @@ const ZonosCustomerInfo = class {
|
|
|
2679
2679
|
catch (_a) { }
|
|
2680
2680
|
}
|
|
2681
2681
|
componentWillLoad() {
|
|
2682
|
-
this.watchShouldEnabledCustomAddress();
|
|
2683
2682
|
this.storeUnsubscribeList = [
|
|
2684
2683
|
zonosStore.zonosStoreOnChange('genericSettings', () => {
|
|
2685
2684
|
this.genericSettings = zonosStore.zonosStore.genericSettings;
|
|
@@ -2691,6 +2690,7 @@ const ZonosCustomerInfo = class {
|
|
|
2691
2690
|
this.addressFormRenderType = cart.cartStore.addressFormRenderType;
|
|
2692
2691
|
}),
|
|
2693
2692
|
];
|
|
2693
|
+
this.watchShouldEnabledCustomAddress();
|
|
2694
2694
|
}
|
|
2695
2695
|
render() {
|
|
2696
2696
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -2962,11 +2962,11 @@ const ZonosShipping = class {
|
|
|
2962
2962
|
this.continueClicked.emit();
|
|
2963
2963
|
};
|
|
2964
2964
|
this.getLandedCostMethodLabelSuffix = (method) => {
|
|
2965
|
-
var _a;
|
|
2965
|
+
var _a, _b, _c;
|
|
2966
2966
|
switch (true) {
|
|
2967
2967
|
// DAP description for non-US countries only
|
|
2968
2968
|
case method === 'DAP' &&
|
|
2969
|
-
((_a = cart.stripeStore.stripeAddressEventData) === null ||
|
|
2969
|
+
!((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = cart.stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')):
|
|
2970
2970
|
return localization.translate(` (Duties due at door)`);
|
|
2971
2971
|
default:
|
|
2972
2972
|
return '';
|
|
@@ -3056,7 +3056,6 @@ const ZonosShipping = class {
|
|
|
3056
3056
|
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
3057
3057
|
}
|
|
3058
3058
|
componentWillLoad() {
|
|
3059
|
-
void this.preselectFirstShippingMethod();
|
|
3060
3059
|
this.storeUnsubscribeList = [
|
|
3061
3060
|
cart.cartStoreOnChange('shippingData', () => {
|
|
3062
3061
|
if (this.isOutdatedShippingData()) {
|
|
@@ -3071,6 +3070,7 @@ const ZonosShipping = class {
|
|
|
3071
3070
|
}
|
|
3072
3071
|
}),
|
|
3073
3072
|
];
|
|
3073
|
+
void this.preselectFirstShippingMethod();
|
|
3074
3074
|
}
|
|
3075
3075
|
render() {
|
|
3076
3076
|
// re-init service levels if the currency is toggled
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-e0b62259.js');
|
|
7
|
+
const paypal = require('./paypal-93e5de01.js');
|
|
8
8
|
const localization = require('./localization-91bcde0e.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-e0b62259.js');
|
|
7
7
|
const localization = require('./localization-91bcde0e.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
9
9
|
const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
|
|
@@ -6,10 +6,10 @@ const index = require('./index-1c710d00.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-e0b62259.js');
|
|
10
10
|
const localization = require('./localization-91bcde0e.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
12
|
-
const paypal = require('./paypal-
|
|
12
|
+
const paypal = require('./paypal-93e5de01.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
14
14
|
require('./isDarkColor-428965f4.js');
|
|
15
15
|
|
|
@@ -2,6 +2,7 @@ import { Fragment, h, Host } from "@stencil/core";
|
|
|
2
2
|
import { cartStore, cartStoreHasOneEligibleItem, } from "../../../store/checkout/cart";
|
|
3
3
|
import { stripeStore, stripeStoreApplyPromoCode, stripeStoreRemovePromoCode, } from "../../../store/checkout/stripe";
|
|
4
4
|
import { translate } from "../../../store/translationStore";
|
|
5
|
+
import { zonosStore } from "../../../store/zonosStore";
|
|
5
6
|
import { renderCheckoutCurrency } from "../../../utils/checkout/renderCheckoutCurrency";
|
|
6
7
|
export class ZonosCartSubtotal {
|
|
7
8
|
constructor() {
|
|
@@ -46,9 +47,9 @@ export class ZonosCartSubtotal {
|
|
|
46
47
|
return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cartStore.selectedShippingOption.displayName), cartStore.selectedShippingOptionTransitTime && (h("zonos-text", { class: "zonos--caption", type: "caption" }, cartStore.selectedShippingOptionTransitTime))));
|
|
47
48
|
};
|
|
48
49
|
const renderLandedCost = () => {
|
|
49
|
-
var _a;
|
|
50
|
+
var _a, _b, _c;
|
|
50
51
|
// Domestic US doesn't have duty applied, just taxes and fees
|
|
51
|
-
if (((_a =
|
|
52
|
+
if ((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')) {
|
|
52
53
|
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes and fees'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null ||
|
|
53
54
|
cartStore.dutiesTaxesFeesEstimate !== null
|
|
54
55
|
? renderCheckoutCurrency({
|
|
@@ -341,7 +341,6 @@ export class ZonosCustomerInfo {
|
|
|
341
341
|
catch (_a) { }
|
|
342
342
|
}
|
|
343
343
|
componentWillLoad() {
|
|
344
|
-
this.watchShouldEnabledCustomAddress();
|
|
345
344
|
this.storeUnsubscribeList = [
|
|
346
345
|
zonosStoreOnChange('genericSettings', () => {
|
|
347
346
|
this.genericSettings = zonosStore.genericSettings;
|
|
@@ -353,6 +352,7 @@ export class ZonosCustomerInfo {
|
|
|
353
352
|
this.addressFormRenderType = cartStore.addressFormRenderType;
|
|
354
353
|
}),
|
|
355
354
|
];
|
|
355
|
+
this.watchShouldEnabledCustomAddress();
|
|
356
356
|
}
|
|
357
357
|
render() {
|
|
358
358
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -3,6 +3,7 @@ import { cartStore, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartSto
|
|
|
3
3
|
import { stripeStore, stripeStoreAsyncAddressUpdate, } from "../../../store/checkout/stripe";
|
|
4
4
|
import { storageStore } from "../../../store/storageStore";
|
|
5
5
|
import { translate } from "../../../store/translationStore";
|
|
6
|
+
import { zonosStore } from "../../../store/zonosStore";
|
|
6
7
|
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
7
8
|
import { renderCheckoutCurrency } from "../../../utils/checkout/renderCheckoutCurrency";
|
|
8
9
|
import { sortServiceLevelOptionsByAmount } from "../../../utils/checkout/sortServiceLevelOptionsByAmount";
|
|
@@ -89,11 +90,11 @@ export class ZonosShipping {
|
|
|
89
90
|
this.continueClicked.emit();
|
|
90
91
|
};
|
|
91
92
|
this.getLandedCostMethodLabelSuffix = (method) => {
|
|
92
|
-
var _a;
|
|
93
|
+
var _a, _b, _c;
|
|
93
94
|
switch (true) {
|
|
94
95
|
// DAP description for non-US countries only
|
|
95
96
|
case method === 'DAP' &&
|
|
96
|
-
((_a =
|
|
97
|
+
!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')):
|
|
97
98
|
return translate(` (Duties due at door)`);
|
|
98
99
|
default:
|
|
99
100
|
return '';
|
|
@@ -183,7 +184,6 @@ export class ZonosShipping {
|
|
|
183
184
|
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
184
185
|
}
|
|
185
186
|
componentWillLoad() {
|
|
186
|
-
void this.preselectFirstShippingMethod();
|
|
187
187
|
this.storeUnsubscribeList = [
|
|
188
188
|
cartStoreOnChange('shippingData', () => {
|
|
189
189
|
if (this.isOutdatedShippingData()) {
|
|
@@ -198,6 +198,7 @@ export class ZonosShipping {
|
|
|
198
198
|
}
|
|
199
199
|
}),
|
|
200
200
|
];
|
|
201
|
+
void this.preselectFirstShippingMethod();
|
|
201
202
|
}
|
|
202
203
|
render() {
|
|
203
204
|
// re-init service levels if the currency is toggled
|
|
@@ -270,6 +270,12 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
270
270
|
* For some service levels, the landed cost that's DAP and we do remittance on behalf of the merchant, these landed cost should be treated as DDP
|
|
271
271
|
*/
|
|
272
272
|
const cartStoreGetMethod = (landedCost) => {
|
|
273
|
+
var _a, _b, _c;
|
|
274
|
+
// If the landed cost is DAP and the country is domestic, then treat it as DDP since no duty or fee is due at the door
|
|
275
|
+
if (landedCost.method === 'DAP' &&
|
|
276
|
+
((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US'))) {
|
|
277
|
+
return 'DDP';
|
|
278
|
+
}
|
|
273
279
|
if (landedCost.method === 'DAP' &&
|
|
274
280
|
landedCost.remittance.length &&
|
|
275
281
|
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
|
@@ -1967,6 +1967,12 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
1967
1967
|
* For some service levels, the landed cost that's DAP and we do remittance on behalf of the merchant, these landed cost should be treated as DDP
|
|
1968
1968
|
*/
|
|
1969
1969
|
const cartStoreGetMethod = (landedCost) => {
|
|
1970
|
+
var _a, _b, _c;
|
|
1971
|
+
// If the landed cost is DAP and the country is domestic, then treat it as DDP since no duty or fee is due at the door
|
|
1972
|
+
if (landedCost.method === 'DAP' &&
|
|
1973
|
+
((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US'))) {
|
|
1974
|
+
return 'DDP';
|
|
1975
|
+
}
|
|
1970
1976
|
if (landedCost.method === 'DAP' &&
|
|
1971
1977
|
landedCost.remittance.length &&
|
|
1972
1978
|
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
|
@@ -2141,4 +2147,4 @@ const cartStoreResetTabItems = () => {
|
|
|
2141
2147
|
cartStoreResetSelectedShippingOption();
|
|
2142
2148
|
};
|
|
2143
2149
|
|
|
2144
|
-
export { cartStoreHasOneEligibleItem as A, stripeStoreApplyPromoCode as B, stripeStoreRemovePromoCode as C, stripeStoreResetPromoCode as D, stripeStoreMessageBasedOnStatus as E, stripeStoreTranslateAddressToLatin as F, cartStoreOnChange as G, stripeStoreAsyncAddressUpdate as H, cartStoreUpdateSelectedShippingOption as I, cartStoreGetShippingTransitInfo as J,
|
|
2150
|
+
export { cartStoreHasOneEligibleItem as A, stripeStoreApplyPromoCode as B, stripeStoreRemovePromoCode as C, stripeStoreResetPromoCode as D, stripeStoreMessageBasedOnStatus as E, stripeStoreTranslateAddressToLatin as F, cartStoreOnChange as G, stripeStoreAsyncAddressUpdate as H, cartStoreUpdateSelectedShippingOption as I, cartStoreGetShippingTransitInfo as J, cartStoreGetMethod as K, sortServiceLevelOptionsByAmount as L, stripeStoreCleanupDomesticShippingSession as a, stripeStoreSaveDomesticShippingSession as b, stripeStore as c, stripeStoreRetrievePayment as d, cartStore as e, cartStoreUpdateItems as f, cartStoreReset as g, cartStoreResetTabItems as h, initStripeElements as i, cartStoreClearCheckoutInterval as j, stripeStoreInitCheckoutSession as k, stripeStoreGetPaymentIntent as l, cartStoreStartCheckoutInterval as m, getCheckoutSessionBody as n, cartStoreUpdateToErrorState as o, cartStoreSetCheckoutSession as p, stripeStorePrefetchLandedCost as q, cartStoreNextStep as r, stripeStoreGetDomesticShippingSession as s, trackConversionEvent as t, stripeStoreUpdateCheckoutSessionBaseCurrency as u, stripeStoreHandleInventoryCheck as v, stripeStoreConfirmPayment as w, stripeStoreHandleInventoryRefund as x, stripeStoreReset as y, validateCheckoutSession as z };
|
package/dist/esm/index.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.213.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.') ||
|
|
@@ -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.213.js.zonos.com";
|
|
376
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.213";
|
|
377
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.213";
|
|
378
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.213";
|
|
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 = "1749249803483";
|
|
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.213"}`;
|
|
415
415
|
Zonos.modeAlerted = false;
|
|
416
416
|
Zonos.cartData = null;
|
|
417
417
|
Zonos.paypal = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-c456b933.js';
|
|
2
|
-
import { t as trackConversionEvent, z as validateCheckoutSession, c as stripeStore, e as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, j as cartStoreClearCheckoutInterval } from './cart-
|
|
2
|
+
import { t as trackConversionEvent, z as validateCheckoutSession, c as stripeStore, e as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, j as cartStoreClearCheckoutInterval } from './cart-c3540cd7.js';
|
|
3
3
|
import { t as translate, s as storageStore } from './localization-cf31c728.js';
|
|
4
4
|
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-dd74bbb1.js';
|
|
5
5
|
import { t as tinycolor } from './isDarkColor-1f58b6be.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
2
|
import { d as debounce_1 } from './debounce-c34d1270.js';
|
|
3
3
|
import { d as isObject_1, z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-c456b933.js';
|
|
4
|
-
import { c as stripeStore, t as trackConversionEvent, q as stripeStorePrefetchLandedCost, e as cartStore } from './cart-
|
|
4
|
+
import { c as stripeStore, t as trackConversionEvent, q as stripeStorePrefetchLandedCost, e as cartStore } from './cart-c3540cd7.js';
|
|
5
5
|
import { s as storageStore, n as storageStoreOnChange, o as getFallbackDefaultCountryCode, t as translate, l as localizationStore } from './localization-cf31c728.js';
|
|
6
6
|
import { b as logError, l as log, i as isCheckoutMobile } from './handleFetch-dd74bbb1.js';
|
|
7
7
|
import { s as shouldRenderTaxIdInput, i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './shouldRenderTaxIdInput-8bc112bb.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, d as getAssetPath, h, H as Host, F as Fragment, c as createEvent, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { e as cartStore, A as cartStoreHasOneEligibleItem, B as stripeStoreApplyPromoCode, C as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, D as stripeStoreResetPromoCode, E as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, F as stripeStoreTranslateAddressToLatin, G as cartStoreOnChange, H as stripeStoreAsyncAddressUpdate, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo, K as
|
|
2
|
+
import { e as cartStore, A as cartStoreHasOneEligibleItem, B as stripeStoreApplyPromoCode, C as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, D as stripeStoreResetPromoCode, E as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, F as stripeStoreTranslateAddressToLatin, G as cartStoreOnChange, H as stripeStoreAsyncAddressUpdate, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo, K as cartStoreGetMethod, L as sortServiceLevelOptionsByAmount } from './cart-c3540cd7.js';
|
|
3
3
|
import { d as currencyFormat, t as translate, s as storageStore, l as localizationStore, c as localizationStoreOnChange } from './localization-cf31c728.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-4dd540c7.js';
|
|
6
5
|
import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily, h as zonosStoreOnChange } from './zonosStore-c456b933.js';
|
|
6
|
+
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-5963c1ab.js';
|
|
7
7
|
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, i as isCheckoutMobile, b as logError, a as getIsStagingMode } from './handleFetch-dd74bbb1.js';
|
|
8
8
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-87593ff4.js';
|
|
@@ -1216,9 +1216,9 @@ const ZonosCartSubtotal = class {
|
|
|
1216
1216
|
return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cartStore.selectedShippingOption.displayName), cartStore.selectedShippingOptionTransitTime && (h("zonos-text", { class: "zonos--caption", type: "caption" }, cartStore.selectedShippingOptionTransitTime))));
|
|
1217
1217
|
};
|
|
1218
1218
|
const renderLandedCost = () => {
|
|
1219
|
-
var _a;
|
|
1219
|
+
var _a, _b, _c;
|
|
1220
1220
|
// Domestic US doesn't have duty applied, just taxes and fees
|
|
1221
|
-
if (((_a =
|
|
1221
|
+
if ((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')) {
|
|
1222
1222
|
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes and fees'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null ||
|
|
1223
1223
|
cartStore.dutiesTaxesFeesEstimate !== null
|
|
1224
1224
|
? renderCheckoutCurrency({
|
|
@@ -2675,7 +2675,6 @@ const ZonosCustomerInfo = class {
|
|
|
2675
2675
|
catch (_a) { }
|
|
2676
2676
|
}
|
|
2677
2677
|
componentWillLoad() {
|
|
2678
|
-
this.watchShouldEnabledCustomAddress();
|
|
2679
2678
|
this.storeUnsubscribeList = [
|
|
2680
2679
|
zonosStoreOnChange('genericSettings', () => {
|
|
2681
2680
|
this.genericSettings = zonosStore.genericSettings;
|
|
@@ -2687,6 +2686,7 @@ const ZonosCustomerInfo = class {
|
|
|
2687
2686
|
this.addressFormRenderType = cartStore.addressFormRenderType;
|
|
2688
2687
|
}),
|
|
2689
2688
|
];
|
|
2689
|
+
this.watchShouldEnabledCustomAddress();
|
|
2690
2690
|
}
|
|
2691
2691
|
render() {
|
|
2692
2692
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -2958,11 +2958,11 @@ const ZonosShipping = class {
|
|
|
2958
2958
|
this.continueClicked.emit();
|
|
2959
2959
|
};
|
|
2960
2960
|
this.getLandedCostMethodLabelSuffix = (method) => {
|
|
2961
|
-
var _a;
|
|
2961
|
+
var _a, _b, _c;
|
|
2962
2962
|
switch (true) {
|
|
2963
2963
|
// DAP description for non-US countries only
|
|
2964
2964
|
case method === 'DAP' &&
|
|
2965
|
-
((_a =
|
|
2965
|
+
!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')):
|
|
2966
2966
|
return translate(` (Duties due at door)`);
|
|
2967
2967
|
default:
|
|
2968
2968
|
return '';
|
|
@@ -3052,7 +3052,6 @@ const ZonosShipping = class {
|
|
|
3052
3052
|
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
3053
3053
|
}
|
|
3054
3054
|
componentWillLoad() {
|
|
3055
|
-
void this.preselectFirstShippingMethod();
|
|
3056
3055
|
this.storeUnsubscribeList = [
|
|
3057
3056
|
cartStoreOnChange('shippingData', () => {
|
|
3058
3057
|
if (this.isOutdatedShippingData()) {
|
|
@@ -3067,6 +3066,7 @@ const ZonosShipping = class {
|
|
|
3067
3066
|
}
|
|
3068
3067
|
}),
|
|
3069
3068
|
];
|
|
3069
|
+
void this.preselectFirstShippingMethod();
|
|
3070
3070
|
}
|
|
3071
3071
|
render() {
|
|
3072
3072
|
// re-init service levels if the currency is toggled
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-55a03023.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreCleanupDomesticShippingSession, b as stripeStoreSaveDomesticShippingSession, c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as cartStoreUpdateItems, g as cartStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreCleanupDomesticShippingSession, b as stripeStoreSaveDomesticShippingSession, c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as cartStoreUpdateItems, g as cartStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset } from './cart-c3540cd7.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-5963c1ab.js';
|
|
4
4
|
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-cf31c728.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-c456b933.js';
|
|
6
6
|
import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, e as getAdditionalLogMetadata, g as getIsTestMode, j as jsonParse, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-dd74bbb1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-55a03023.js';
|
|
2
|
-
import { c as stripeStore } from './cart-
|
|
2
|
+
import { c as stripeStore } from './cart-c3540cd7.js';
|
|
3
3
|
import { i as isValidSelector, e as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-cf31c728.js';
|
|
4
4
|
import { z as zonosStore, e as zonosStoreInitSetting, f as zonosStoreFontFamily } from './zonosStore-c456b933.js';
|
|
5
5
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-0bc3e118.js';
|
|
@@ -2,10 +2,10 @@ import { r as registerInstance, h, H as Host, a as getElement, c as createEvent
|
|
|
2
2
|
import { f as zonosStoreFontFamily } from './zonosStore-c456b933.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-87593ff4.js';
|
|
5
|
-
import { c as stripeStore, t as trackConversionEvent } from './cart-
|
|
5
|
+
import { c as stripeStore, t as trackConversionEvent } from './cart-c3540cd7.js';
|
|
6
6
|
import { s as storageStore } from './localization-cf31c728.js';
|
|
7
7
|
import { b as logError, l as log } from './handleFetch-dd74bbb1.js';
|
|
8
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons } from './paypal-5963c1ab.js';
|
|
9
9
|
import './VarianceTest-fef2d958.js';
|
|
10
10
|
import './isDarkColor-1f58b6be.js';
|
|
11
11
|
|