@zonos/elements 1.3.202 → 1.3.203
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-637ba3d0.js → cart-0d91ad0b.js} +13 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-0eceff03.js → paypal-9953115b.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 -4
- 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-shipping/zonos-shipping.js +7 -3
- package/dist/collection/components/store/checkout/cart.js +13 -2
- package/dist/collection/types/generated/graphql.internal.types.js +14 -7
- package/dist/esm/{cart-b7c15b61.js → cart-db61eb95.js} +13 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-932fd3dd.js → paypal-2e0ffb07.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +1 -1
- package/dist/esm/zonos-cart-items_14.entry.js +8 -4
- 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-b7c15b61.js → cart-db61eb95.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-932fd3dd.js → paypal-2e0ffb07.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 +5 -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/store/checkout/cart.d.ts +5 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +43 -22
- package/dist/types/types/generated/graphql.internal.types.ts +36 -19
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-d2466fbd.system.js → p-0693422b.system.js} +1 -1
- package/dist/zonos-elements/{p-30cfa524.entry.js → p-06f25f75.entry.js} +1 -1
- package/dist/zonos-elements/{p-98b65387.entry.js → p-0c62cfb3.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a52a2bc.system.entry.js → p-25970cb8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c58acd4c.system.entry.js → p-2bb8ca7d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bec2a3ce.entry.js → p-2f70d0eb.entry.js} +1 -1
- package/dist/zonos-elements/{p-2b8f787a.entry.js → p-411b8e10.entry.js} +1 -1
- package/dist/zonos-elements/{p-2af2eb6f.system.entry.js → p-54cdc47f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-32320d9a.system.js → p-6b6a9dd6.system.js} +1 -1
- package/dist/zonos-elements/{p-bc220d35.system.js → p-7cd09f1f.system.js} +1 -1
- package/dist/zonos-elements/{p-aae60057.js → p-a9307caa.js} +1 -1
- package/dist/zonos-elements/{p-d60ca44b.system.entry.js → p-cdd3087f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d2165441.system.entry.js +1 -0
- package/dist/zonos-elements/{p-db3968a2.js → p-d99d9e00.js} +1 -1
- package/dist/zonos-elements/p-dfd1ba1d.entry.js +1 -0
- package/dist/zonos-elements/p-ea6d87a1.system.js +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-0f77d087.system.entry.js +0 -1
- package/dist/zonos-elements/p-b52aba52.entry.js +0 -1
|
@@ -1743,6 +1743,17 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
1743
1743
|
cartStoreSetCheckoutSession(json.checkoutSessionUpdate);
|
|
1744
1744
|
return true;
|
|
1745
1745
|
};
|
|
1746
|
+
/**
|
|
1747
|
+
* 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
|
|
1748
|
+
*/
|
|
1749
|
+
const cartStoreGetMethod = (landedCost) => {
|
|
1750
|
+
if (landedCost.method === 'DAP' &&
|
|
1751
|
+
landedCost.remittance.length &&
|
|
1752
|
+
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
|
1753
|
+
return 'DDP';
|
|
1754
|
+
}
|
|
1755
|
+
return landedCost.method;
|
|
1756
|
+
};
|
|
1746
1757
|
const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, landedCostId) => {
|
|
1747
1758
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1748
1759
|
cartStore.selectedShippingOption = selectedShippingOption;
|
|
@@ -1770,7 +1781,7 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
1770
1781
|
if (dutiesTaxesFeesEstimate) {
|
|
1771
1782
|
handleFetch.log(`DAP quote, using estimate: ${dutiesTaxesFeesEstimate}`, 'info');
|
|
1772
1783
|
}
|
|
1773
|
-
cartStore.landedCostMethod = selectedLandedCost.landedCost
|
|
1784
|
+
cartStore.landedCostMethod = cartStoreGetMethod(selectedLandedCost.landedCost);
|
|
1774
1785
|
// update shipping value and dutiesTaxFees on selectedShippingOption change
|
|
1775
1786
|
cartStore.shipping = selectedLandedCost.subtotals.shipping;
|
|
1776
1787
|
// update deminimis status
|
|
@@ -1908,6 +1919,7 @@ const cartStoreResetTabItems = () => {
|
|
|
1908
1919
|
|
|
1909
1920
|
exports.cartStore = cartStore;
|
|
1910
1921
|
exports.cartStoreClearCheckoutInterval = cartStoreClearCheckoutInterval;
|
|
1922
|
+
exports.cartStoreGetMethod = cartStoreGetMethod;
|
|
1911
1923
|
exports.cartStoreGetShippingTransitInfo = cartStoreGetShippingTransitInfo;
|
|
1912
1924
|
exports.cartStoreHasOneEligibleItem = cartStoreHasOneEligibleItem;
|
|
1913
1925
|
exports.cartStoreNextStep = cartStoreNextStep;
|
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.203.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.') ||
|
|
@@ -373,10 +373,10 @@ const zonosLoadUrl = (() => {
|
|
|
373
373
|
}
|
|
374
374
|
return null;
|
|
375
375
|
})();
|
|
376
|
-
const ZONOS_URL = "https://v1.3.
|
|
377
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
378
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
379
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
376
|
+
const ZONOS_URL = "https://v1.3.203.js.zonos.com";
|
|
377
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.203";
|
|
378
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.203";
|
|
379
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.203";
|
|
380
380
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
381
381
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
382
382
|
class Zonos {
|
|
@@ -394,7 +394,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
394
394
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
395
395
|
: null;
|
|
396
396
|
Zonos.isBigCommerce = false;
|
|
397
|
-
Zonos.releaseDate = "
|
|
397
|
+
Zonos.releaseDate = "1747253461839";
|
|
398
398
|
Zonos.isLegacyCheckout = false;
|
|
399
399
|
Zonos.domain = typeof window !== 'undefined'
|
|
400
400
|
? // domain that embeds the iframe
|
|
@@ -412,7 +412,7 @@ Zonos.isNpm = true;
|
|
|
412
412
|
Zonos.zonosQaUrl = null;
|
|
413
413
|
Zonos.zonosQaUrlApi = null;
|
|
414
414
|
Zonos.trackEventLogs = [];
|
|
415
|
-
Zonos.version = `v${"1.3.
|
|
415
|
+
Zonos.version = `v${"1.3.203"}`;
|
|
416
416
|
Zonos.modeAlerted = false;
|
|
417
417
|
Zonos.cartData = null;
|
|
418
418
|
Zonos.paypal = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-9264749e.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-0d91ad0b.js');
|
|
5
5
|
const localization = require('./localization-2f17c95f.js');
|
|
6
6
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
7
7
|
const isDarkColor = require('./isDarkColor-bcf49625.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-0d91ad0b.js');
|
|
7
7
|
const localization = require('./localization-2f17c95f.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-9264749e.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
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-0d91ad0b.js');
|
|
7
7
|
const localization = require('./localization-2f17c95f.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const paypal = require('./paypal-
|
|
9
|
+
const paypal = require('./paypal-9953115b.js');
|
|
10
10
|
const zonosStore = require('./zonosStore-9264749e.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
12
12
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
@@ -2820,11 +2820,15 @@ const ZonosShipping = class {
|
|
|
2820
2820
|
const matchedLandedCosts = (_a = cart.cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.filter(landedCostItem => { var _a; return ((_a = landedCostItem.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating.id) === item.id; });
|
|
2821
2821
|
return ((matchedLandedCosts === null || matchedLandedCosts === void 0 ? void 0 : matchedLandedCosts.map(landedCost => {
|
|
2822
2822
|
const shippingAmount = landedCost.subtotals.shipping;
|
|
2823
|
+
/**
|
|
2824
|
+
* 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
|
|
2825
|
+
*/
|
|
2826
|
+
const method = cart.cartStoreGetMethod(landedCost.landedCost);
|
|
2823
2827
|
const option = {
|
|
2824
2828
|
amount: shippingAmount,
|
|
2825
|
-
label: `${item.displayName}${this.getLandedCostMethodLabelSuffix(
|
|
2829
|
+
label: `${item.displayName}${this.getLandedCostMethodLabelSuffix(method)}`,
|
|
2826
2830
|
landedCostId: landedCost.landedCostId,
|
|
2827
|
-
method
|
|
2831
|
+
method,
|
|
2828
2832
|
price: renderCheckoutCurrency({
|
|
2829
2833
|
amount: shippingAmount,
|
|
2830
2834
|
isForeign: true,
|
|
@@ -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-0d91ad0b.js');
|
|
7
|
+
const paypal = require('./paypal-9953115b.js');
|
|
8
8
|
const localization = require('./localization-2f17c95f.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-9264749e.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-0d91ad0b.js');
|
|
7
7
|
const localization = require('./localization-2f17c95f.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-9264749e.js');
|
|
9
9
|
const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
|
|
@@ -6,10 +6,10 @@ const index = require('./index-0993f42d.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-9264749e.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-8d3b1049.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-0d91ad0b.js');
|
|
10
10
|
const localization = require('./localization-2f17c95f.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
12
|
-
const paypal = require('./paypal-
|
|
12
|
+
const paypal = require('./paypal-9953115b.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
14
14
|
require('./isDarkColor-bcf49625.js');
|
|
15
15
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
|
-
import { cartStore, cartStoreGetShippingTransitInfo, cartStoreUpdateSelectedShippingOption, } from "../../../store/checkout/cart";
|
|
2
|
+
import { cartStore, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreUpdateSelectedShippingOption, } from "../../../store/checkout/cart";
|
|
3
3
|
import { stripeStore } from "../../../store/checkout/stripe";
|
|
4
4
|
import { storageStore } from "../../../store/storageStore";
|
|
5
5
|
import { translate } from "../../../store/translationStore";
|
|
@@ -86,11 +86,15 @@ export class ZonosShipping {
|
|
|
86
86
|
const matchedLandedCosts = (_a = cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.filter(landedCostItem => { var _a; return ((_a = landedCostItem.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating.id) === item.id; });
|
|
87
87
|
return ((matchedLandedCosts === null || matchedLandedCosts === void 0 ? void 0 : matchedLandedCosts.map(landedCost => {
|
|
88
88
|
const shippingAmount = landedCost.subtotals.shipping;
|
|
89
|
+
/**
|
|
90
|
+
* 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
|
|
91
|
+
*/
|
|
92
|
+
const method = cartStoreGetMethod(landedCost.landedCost);
|
|
89
93
|
const option = {
|
|
90
94
|
amount: shippingAmount,
|
|
91
|
-
label: `${item.displayName}${this.getLandedCostMethodLabelSuffix(
|
|
95
|
+
label: `${item.displayName}${this.getLandedCostMethodLabelSuffix(method)}`,
|
|
92
96
|
landedCostId: landedCost.landedCostId,
|
|
93
|
-
method
|
|
97
|
+
method,
|
|
94
98
|
price: renderCheckoutCurrency({
|
|
95
99
|
amount: shippingAmount,
|
|
96
100
|
isForeign: true,
|
|
@@ -263,6 +263,17 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
263
263
|
cartStoreSetCheckoutSession(json.checkoutSessionUpdate);
|
|
264
264
|
return true;
|
|
265
265
|
};
|
|
266
|
+
/**
|
|
267
|
+
* 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
|
|
268
|
+
*/
|
|
269
|
+
const cartStoreGetMethod = (landedCost) => {
|
|
270
|
+
if (landedCost.method === 'DAP' &&
|
|
271
|
+
landedCost.remittance.length &&
|
|
272
|
+
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
|
273
|
+
return 'DDP';
|
|
274
|
+
}
|
|
275
|
+
return landedCost.method;
|
|
276
|
+
};
|
|
266
277
|
const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, landedCostId) => {
|
|
267
278
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
268
279
|
cartStore.selectedShippingOption = selectedShippingOption;
|
|
@@ -290,7 +301,7 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
290
301
|
if (dutiesTaxesFeesEstimate) {
|
|
291
302
|
log(`DAP quote, using estimate: ${dutiesTaxesFeesEstimate}`, 'info');
|
|
292
303
|
}
|
|
293
|
-
cartStore.landedCostMethod = selectedLandedCost.landedCost
|
|
304
|
+
cartStore.landedCostMethod = cartStoreGetMethod(selectedLandedCost.landedCost);
|
|
294
305
|
// update shipping value and dutiesTaxFees on selectedShippingOption change
|
|
295
306
|
cartStore.shipping = selectedLandedCost.subtotals.shipping;
|
|
296
307
|
// update deminimis status
|
|
@@ -425,4 +436,4 @@ const cartStoreResetTabItems = () => {
|
|
|
425
436
|
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
426
437
|
cartStoreResetSelectedShippingOption();
|
|
427
438
|
};
|
|
428
|
-
export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStorePreviousStep, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
|
|
439
|
+
export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStorePreviousStep, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
|
|
@@ -213,6 +213,9 @@ export const carrierApiSupportType = {
|
|
|
213
213
|
Supported: 'SUPPORTED',
|
|
214
214
|
Unsupported: 'UNSUPPORTED',
|
|
215
215
|
};
|
|
216
|
+
export const carrierBillingInvoiceCarrier = {
|
|
217
|
+
BroadReach: 'BROAD_REACH',
|
|
218
|
+
};
|
|
216
219
|
export const carrierBillingInvoiceFeeType = {
|
|
217
220
|
RevShareAmount: 'REV_SHARE_AMOUNT',
|
|
218
221
|
RevSharePercent: 'REV_SHARE_PERCENT',
|
|
@@ -1521,16 +1524,10 @@ export const incotermCode = {
|
|
|
1521
1524
|
Fob: 'FOB',
|
|
1522
1525
|
};
|
|
1523
1526
|
export const invoiceCarrier = {
|
|
1524
|
-
Apc: 'APC',
|
|
1525
|
-
Asendia: 'ASENDIA',
|
|
1526
|
-
BoxC: 'BOX_C',
|
|
1527
|
-
BroadReach: 'BROAD_REACH',
|
|
1528
1527
|
Dhl: 'DHL',
|
|
1529
|
-
DhlEcom: 'DHL_ECOM',
|
|
1530
|
-
Epost: 'EPOST',
|
|
1531
1528
|
Fedex: 'FEDEX',
|
|
1532
|
-
Landmark: 'LANDMARK',
|
|
1533
1529
|
Ups: 'UPS',
|
|
1530
|
+
Zonos: 'ZONOS',
|
|
1534
1531
|
};
|
|
1535
1532
|
export const invoiceLanguageCode = {
|
|
1536
1533
|
Bg: 'BG',
|
|
@@ -1580,6 +1577,14 @@ export const invoiceStatus = {
|
|
|
1580
1577
|
Reconciled: 'RECONCILED',
|
|
1581
1578
|
Voided: 'VOIDED',
|
|
1582
1579
|
};
|
|
1580
|
+
export const invoiceUploadStatus = {
|
|
1581
|
+
Error: 'ERROR',
|
|
1582
|
+
FailedReconciliation: 'FAILED_RECONCILIATION',
|
|
1583
|
+
PartiallyReconciled: 'PARTIALLY_RECONCILED',
|
|
1584
|
+
ProcessingReconciliation: 'PROCESSING_RECONCILIATION',
|
|
1585
|
+
Received: 'RECEIVED',
|
|
1586
|
+
Reconciled: 'RECONCILED',
|
|
1587
|
+
};
|
|
1583
1588
|
export const itemAmountTargetType = {
|
|
1584
1589
|
BillingCompany: 'BILLING_COMPANY',
|
|
1585
1590
|
ItemProvided: 'ITEM_PROVIDED',
|
|
@@ -2531,6 +2536,8 @@ export const storeFeeRuleDetailCategoryIdCreateType = {
|
|
|
2531
2536
|
DdpServiceFee: 'DDP_SERVICE_FEE',
|
|
2532
2537
|
DutyBuffer: 'DUTY_BUFFER',
|
|
2533
2538
|
DutyTaxBuffer: 'DUTY_TAX_BUFFER',
|
|
2539
|
+
LandedCostGuaranteeBuffer: 'LANDED_COST_GUARANTEE_BUFFER',
|
|
2540
|
+
LandedCostGuaranteeSubsidy: 'LANDED_COST_GUARANTEE_SUBSIDY',
|
|
2534
2541
|
MagentoCrossDockingBuffer: 'MAGENTO_CROSS_DOCKING_BUFFER',
|
|
2535
2542
|
MagentoGuaranteeOrder: 'MAGENTO_GUARANTEE_ORDER',
|
|
2536
2543
|
MagentoGuaranteePercent: 'MAGENTO_GUARANTEE_PERCENT',
|
|
@@ -1741,6 +1741,17 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
1741
1741
|
cartStoreSetCheckoutSession(json.checkoutSessionUpdate);
|
|
1742
1742
|
return true;
|
|
1743
1743
|
};
|
|
1744
|
+
/**
|
|
1745
|
+
* 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
|
|
1746
|
+
*/
|
|
1747
|
+
const cartStoreGetMethod = (landedCost) => {
|
|
1748
|
+
if (landedCost.method === 'DAP' &&
|
|
1749
|
+
landedCost.remittance.length &&
|
|
1750
|
+
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
|
1751
|
+
return 'DDP';
|
|
1752
|
+
}
|
|
1753
|
+
return landedCost.method;
|
|
1754
|
+
};
|
|
1744
1755
|
const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, landedCostId) => {
|
|
1745
1756
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1746
1757
|
cartStore.selectedShippingOption = selectedShippingOption;
|
|
@@ -1768,7 +1779,7 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
1768
1779
|
if (dutiesTaxesFeesEstimate) {
|
|
1769
1780
|
log(`DAP quote, using estimate: ${dutiesTaxesFeesEstimate}`, 'info');
|
|
1770
1781
|
}
|
|
1771
|
-
cartStore.landedCostMethod = selectedLandedCost.landedCost
|
|
1782
|
+
cartStore.landedCostMethod = cartStoreGetMethod(selectedLandedCost.landedCost);
|
|
1772
1783
|
// update shipping value and dutiesTaxFees on selectedShippingOption change
|
|
1773
1784
|
cartStore.shipping = selectedLandedCost.subtotals.shipping;
|
|
1774
1785
|
// update deminimis status
|
|
@@ -1904,4 +1915,4 @@ const cartStoreResetTabItems = () => {
|
|
|
1904
1915
|
cartStoreResetSelectedShippingOption();
|
|
1905
1916
|
};
|
|
1906
1917
|
|
|
1907
|
-
export { cartStoreHasOneEligibleItem as A, stripeStoreApplyPromoCode as B, stripeStoreRemovePromoCode as C, stripeStoreResetPromoCode as D, stripeStoreMessageBasedOnStatus as E, stripeStoreTranslateAddressToLatin as F, cartStoreUpdateSelectedShippingOption as G, cartStoreGetShippingTransitInfo as H, sortServiceLevelOptionsByAmount as I, stripeStoreCleanupDomesticShippingSession as a, stripeStoreSaveDomesticShippingSession as b, stripeStoreRetrievePayment as c, stripeStore 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 };
|
|
1918
|
+
export { cartStoreHasOneEligibleItem as A, stripeStoreApplyPromoCode as B, stripeStoreRemovePromoCode as C, stripeStoreResetPromoCode as D, stripeStoreMessageBasedOnStatus as E, stripeStoreTranslateAddressToLatin as F, cartStoreUpdateSelectedShippingOption as G, cartStoreGetShippingTransitInfo as H, sortServiceLevelOptionsByAmount as I, cartStoreGetMethod as J, stripeStoreCleanupDomesticShippingSession as a, stripeStoreSaveDomesticShippingSession as b, stripeStoreRetrievePayment as c, stripeStore 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.203.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.') ||
|
|
@@ -370,10 +370,10 @@ const zonosLoadUrl = (() => {
|
|
|
370
370
|
}
|
|
371
371
|
return null;
|
|
372
372
|
})();
|
|
373
|
-
const ZONOS_URL = "https://v1.3.
|
|
374
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
375
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
376
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
373
|
+
const ZONOS_URL = "https://v1.3.203.js.zonos.com";
|
|
374
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.203";
|
|
375
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.203";
|
|
376
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.203";
|
|
377
377
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
378
378
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
379
379
|
class Zonos {
|
|
@@ -391,7 +391,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
391
391
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
392
392
|
: null;
|
|
393
393
|
Zonos.isBigCommerce = false;
|
|
394
|
-
Zonos.releaseDate = "
|
|
394
|
+
Zonos.releaseDate = "1747253461839";
|
|
395
395
|
Zonos.isLegacyCheckout = false;
|
|
396
396
|
Zonos.domain = typeof window !== 'undefined'
|
|
397
397
|
? // domain that embeds the iframe
|
|
@@ -409,7 +409,7 @@ Zonos.isNpm = true;
|
|
|
409
409
|
Zonos.zonosQaUrl = null;
|
|
410
410
|
Zonos.zonosQaUrlApi = null;
|
|
411
411
|
Zonos.trackEventLogs = [];
|
|
412
|
-
Zonos.version = `v${"1.3.
|
|
412
|
+
Zonos.version = `v${"1.3.203"}`;
|
|
413
413
|
Zonos.modeAlerted = false;
|
|
414
414
|
Zonos.cartData = null;
|
|
415
415
|
Zonos.paypal = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-d10a829f.js';
|
|
2
|
-
import { t as trackConversionEvent, z as validateCheckoutSession, d as stripeStore, e as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, j as cartStoreClearCheckoutInterval } from './cart-
|
|
2
|
+
import { t as trackConversionEvent, z as validateCheckoutSession, d as stripeStore, e as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, j as cartStoreClearCheckoutInterval } from './cart-db61eb95.js';
|
|
3
3
|
import { t as translate, s as storageStore } from './localization-bf7224aa.js';
|
|
4
4
|
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-621e45bc.js';
|
|
5
5
|
import { t as tinycolor } from './isDarkColor-31dd7dff.js';
|
|
@@ -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 { d as stripeStore, t as trackConversionEvent, e as cartStore } from './cart-
|
|
2
|
+
import { d as stripeStore, t as trackConversionEvent, e as cartStore } from './cart-db61eb95.js';
|
|
3
3
|
import { n as storageStoreOnChange, s as storageStore, o as getFallbackDefaultCountryCode, t as translate, l as localizationStore } from './localization-bf7224aa.js';
|
|
4
4
|
import { z as zonosStore, d as zonosStoreFontFamily, f as isObject_1 } from './zonosStore-d10a829f.js';
|
|
5
5
|
import { b as logError, l as log, i as isCheckoutMobile } from './handleFetch-621e45bc.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
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, A as cartStoreHasOneEligibleItem, B as stripeStoreApplyPromoCode, C as stripeStoreRemovePromoCode, d as stripeStore, y as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, D as stripeStoreResetPromoCode, E as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, F as stripeStoreTranslateAddressToLatin, G as cartStoreUpdateSelectedShippingOption, H as cartStoreGetShippingTransitInfo, I as sortServiceLevelOptionsByAmount } from './cart-
|
|
2
|
+
import { e as cartStore, A as cartStoreHasOneEligibleItem, B as stripeStoreApplyPromoCode, C as stripeStoreRemovePromoCode, d as stripeStore, y as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, D as stripeStoreResetPromoCode, E as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, F as stripeStoreTranslateAddressToLatin, G as cartStoreUpdateSelectedShippingOption, H as cartStoreGetShippingTransitInfo, I as sortServiceLevelOptionsByAmount, J as cartStoreGetMethod } from './cart-db61eb95.js';
|
|
3
3
|
import { d as currencyFormat, t as translate, s as storageStore, l as localizationStore } from './localization-bf7224aa.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-
|
|
5
|
+
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-2e0ffb07.js';
|
|
6
6
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-d10a829f.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-621e45bc.js';
|
|
8
8
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
@@ -2816,11 +2816,15 @@ const ZonosShipping = class {
|
|
|
2816
2816
|
const matchedLandedCosts = (_a = cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.filter(landedCostItem => { var _a; return ((_a = landedCostItem.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating.id) === item.id; });
|
|
2817
2817
|
return ((matchedLandedCosts === null || matchedLandedCosts === void 0 ? void 0 : matchedLandedCosts.map(landedCost => {
|
|
2818
2818
|
const shippingAmount = landedCost.subtotals.shipping;
|
|
2819
|
+
/**
|
|
2820
|
+
* 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
|
|
2821
|
+
*/
|
|
2822
|
+
const method = cartStoreGetMethod(landedCost.landedCost);
|
|
2819
2823
|
const option = {
|
|
2820
2824
|
amount: shippingAmount,
|
|
2821
|
-
label: `${item.displayName}${this.getLandedCostMethodLabelSuffix(
|
|
2825
|
+
label: `${item.displayName}${this.getLandedCostMethodLabelSuffix(method)}`,
|
|
2822
2826
|
landedCostId: landedCost.landedCostId,
|
|
2823
|
-
method
|
|
2827
|
+
method,
|
|
2824
2828
|
price: renderCheckoutCurrency({
|
|
2825
2829
|
amount: shippingAmount,
|
|
2826
2830
|
isForeign: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-a457c60c.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreCleanupDomesticShippingSession, b as stripeStoreSaveDomesticShippingSession, i as initStripeElements, c as stripeStoreRetrievePayment, d as stripeStore, 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 paypalInitScript, b as paypalStore } from './paypal-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreCleanupDomesticShippingSession, b as stripeStoreSaveDomesticShippingSession, i as initStripeElements, c as stripeStoreRetrievePayment, d as stripeStore, 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-db61eb95.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-2e0ffb07.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-bf7224aa.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-d10a829f.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-621e45bc.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a457c60c.js';
|
|
2
|
-
import { d as stripeStore } from './cart-
|
|
2
|
+
import { d as stripeStore } from './cart-db61eb95.js';
|
|
3
3
|
import { i as isValidSelector, e as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-bf7224aa.js';
|
|
4
4
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-d10a829f.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, d as getElement, c as createEvent
|
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-d10a829f.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-78b28b4d.js';
|
|
5
|
-
import { d as stripeStore, t as trackConversionEvent } from './cart-
|
|
5
|
+
import { d as stripeStore, t as trackConversionEvent } from './cart-db61eb95.js';
|
|
6
6
|
import { s as storageStore } from './localization-bf7224aa.js';
|
|
7
7
|
import { b as logError, l as log } from './handleFetch-621e45bc.js';
|
|
8
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons } from './paypal-2e0ffb07.js';
|
|
9
9
|
import './VarianceTest-fef2d958.js';
|
|
10
10
|
import './isDarkColor-31dd7dff.js';
|
|
11
11
|
|