@zonos/elements 1.3.257 → 1.3.258
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-cd0a054b.js → cart-c618fd5b.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-3650109c.js → hasInclusivePrice-58a9f15d.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-1cea739b.js → invoice-c9cb6683.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-65c71740.js → isCollectMobileTablet-93a5194a.js} +2 -2
- package/dist/cjs/{localization-adaab93f.js → localization-5994d4de.js} +25 -3
- package/dist/cjs/{paypal-326d7bc5.js → paypal-091e089e.js} +2 -2
- package/dist/cjs/{placeTestOrder-53f2fe97.js → placeTestOrder-b07f8edb.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-cf2e3b93.js → renderCheckoutCurrency-7876a1d4.js} +2 -2
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- 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-hello-dialog.cjs.entry.js +45 -12
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +43 -10
- package/dist/collection/components/store/hello/localization.js +25 -3
- package/dist/esm/{cart-4cd47a1b.js → cart-76fb528f.js} +1 -1
- package/dist/esm/{hasInclusivePrice-7a3dc4c3.js → hasInclusivePrice-275b1048.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-03ff7bbb.js → invoice-9efcb941.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-9eb77c9a.js → isCollectMobileTablet-a7e5b909.js} +2 -2
- package/dist/esm/{localization-79e08480.js → localization-76ce3e29.js} +25 -3
- package/dist/esm/{paypal-67c86683.js → paypal-75c5c66d.js} +2 -2
- package/dist/esm/{placeTestOrder-e81fff15.js → placeTestOrder-22633bf2.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-1fc00db4.js → renderCheckoutCurrency-d27b0082.js} +2 -2
- package/dist/esm/zonos-address-display_8.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +6 -6
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- 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-hello-dialog.entry.js +45 -12
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-store-credit.entry.js +3 -3
- package/dist/esm-es5/{cart-4cd47a1b.js → cart-76fb528f.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-7a3dc4c3.js → hasInclusivePrice-275b1048.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-03ff7bbb.js → invoice-9efcb941.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-9eb77c9a.js → isCollectMobileTablet-a7e5b909.js} +1 -1
- package/dist/esm-es5/{localization-79e08480.js → localization-76ce3e29.js} +1 -1
- package/dist/esm-es5/{paypal-67c86683.js → paypal-75c5c66d.js} +2 -2
- package/dist/esm-es5/{placeTestOrder-e81fff15.js → placeTestOrder-22633bf2.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-1fc00db4.js → renderCheckoutCurrency-d27b0082.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.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-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-store-credit.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/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +6 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-aa3e3438.system.entry.js → p-055c8d6c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ce2fd652.entry.js → p-0a9741f7.entry.js} +1 -1
- package/dist/zonos-elements/{p-3fc43187.system.entry.js → p-10da499b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2c1c6d60.system.entry.js → p-14d35979.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-271eebd3.system.js → p-1523f6a8.system.js} +1 -1
- package/dist/zonos-elements/{p-c585d169.entry.js → p-1661f938.entry.js} +1 -1
- package/dist/zonos-elements/{p-3092ec40.system.entry.js → p-1e9e284e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7559c494.js → p-1ebb59a3.js} +1 -1
- package/dist/zonos-elements/{p-4e2262e8.js → p-24f41959.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-0ca6ee9b.entry.js → p-29d16ad0.entry.js} +1 -1
- package/dist/zonos-elements/{p-0f4822cc.system.entry.js → p-2b2b1c8c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-91eeccaa.entry.js → p-2d854a75.entry.js} +1 -1
- package/dist/zonos-elements/{p-a90c977a.system.js → p-2ec799e4.system.js} +1 -1
- package/dist/zonos-elements/{p-d0690cdc.system.js → p-3600280d.system.js} +1 -1
- package/dist/zonos-elements/p-3ee8496e.js +1 -0
- package/dist/zonos-elements/{p-21519ebe.entry.js → p-425f747b.entry.js} +1 -1
- package/dist/zonos-elements/{p-9f3aab4e.system.entry.js → p-4b138a6e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-da7e1143.system.entry.js → p-50b32476.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5182e492.entry.js +1 -0
- package/dist/zonos-elements/{p-7aeb496e.entry.js → p-5262f6e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-b53856bf.system.js → p-567abb43.system.js} +1 -1
- package/dist/zonos-elements/{p-9d435f12.system.entry.js → p-5fa3d1c8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e9f36d6b.system.entry.js → p-6cf8fe49.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8adc0a13.system.js → p-6d36b307.system.js} +1 -1
- package/dist/zonos-elements/{p-380143db.entry.js → p-6e50f6f5.entry.js} +1 -1
- package/dist/zonos-elements/{p-80ba5f70.entry.js → p-7157a5a3.entry.js} +1 -1
- package/dist/zonos-elements/{p-ddb27b4a.entry.js → p-733f118d.entry.js} +1 -1
- package/dist/zonos-elements/{p-3675766a.entry.js → p-788c6839.entry.js} +1 -1
- package/dist/zonos-elements/{p-a7b0345b.entry.js → p-791e13e7.entry.js} +1 -1
- package/dist/zonos-elements/{p-e173fbd1.system.entry.js → p-8585c761.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e5f5b086.system.js → p-867d05d7.system.js} +1 -1
- package/dist/zonos-elements/p-868a8667.js +1 -0
- package/dist/zonos-elements/{p-c2139758.entry.js → p-9460919d.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b83ac7f.entry.js → p-99d92a84.entry.js} +1 -1
- package/dist/zonos-elements/{p-0740f8a4.system.entry.js → p-9a9c9441.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e6feafc1.system.entry.js → p-9c97671b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a60544cc.entry.js → p-9cff66a7.entry.js} +1 -1
- package/dist/zonos-elements/{p-b3824361.entry.js → p-a0f6910c.entry.js} +1 -1
- package/dist/zonos-elements/{p-7caa75bb.js → p-a18adf27.js} +1 -1
- package/dist/zonos-elements/{p-8b35e475.system.entry.js → p-a4b6865d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c23e2501.system.entry.js → p-a89096d6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e3f9779a.system.entry.js → p-afca19b0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-429c1d0c.entry.js → p-afdb4445.entry.js} +1 -1
- package/dist/zonos-elements/{p-4a84387a.system.entry.js → p-b34f1336.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5818f4a7.entry.js → p-bba9af4c.entry.js} +1 -1
- package/dist/zonos-elements/{p-e62342c3.js → p-bd938f80.js} +1 -1
- package/dist/zonos-elements/{p-8ed0fad5.js → p-bdb3f7a2.js} +2 -2
- package/dist/zonos-elements/p-c85e988d.system.js +1 -0
- package/dist/zonos-elements/{p-e80832cb.system.entry.js → p-e5f48239.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-22bb7836.system.js → p-e6168c82.system.js} +1 -1
- package/dist/zonos-elements/{p-e56f5954.system.js → p-e8a68ce7.system.js} +1 -1
- package/dist/zonos-elements/p-ed03b7fd.js +1 -0
- package/dist/zonos-elements/{p-b414b484.system.entry.js → p-edb0306c.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-0e83d193.js +0 -1
- package/dist/zonos-elements/p-6bcbe651.js +0 -1
- package/dist/zonos-elements/p-7cbbf483.system.js +0 -1
- package/dist/zonos-elements/p-ac7b93c9.js +0 -1
- package/dist/zonos-elements/p-fed19033.entry.js +0 -1
|
@@ -74,6 +74,17 @@ export class ZonosHelloDialog {
|
|
|
74
74
|
var _a;
|
|
75
75
|
return (_a = localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
|
|
76
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Selected country is configured as a domestic country for the merchant,
|
|
79
|
+
* meaning the order ships within the merchant's origin country and no
|
|
80
|
+
* duty will be assessed on it.
|
|
81
|
+
*/
|
|
82
|
+
this.isDomesticCountry = () => {
|
|
83
|
+
var _a, _b;
|
|
84
|
+
const { selectedCountryCode } = localizationStore;
|
|
85
|
+
return (!!selectedCountryCode &&
|
|
86
|
+
!!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(selectedCountryCode)));
|
|
87
|
+
};
|
|
77
88
|
/**
|
|
78
89
|
* Some countries don't have threshold. So we need to show generic message for them
|
|
79
90
|
*/
|
|
@@ -93,6 +104,11 @@ export class ZonosHelloDialog {
|
|
|
93
104
|
return countryCodes.includes(countryCode);
|
|
94
105
|
};
|
|
95
106
|
this.getDutyMessage = () => {
|
|
107
|
+
// Domestic orders stay within the merchant's origin country, so no
|
|
108
|
+
// duty is ever assessed — surface that instead of a de minimis threshold.
|
|
109
|
+
if (this.isDomesticCountry()) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
96
112
|
const countryLandedCost = localizationStore.countryLandedCost;
|
|
97
113
|
// For GB, if the store doesn't allow low value orders, we would like to tell shopper that duties will always apply as there would be a custom message saying "Orders to United Kingdom must be over .* to ship."
|
|
98
114
|
if (!(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.allowLowValueOrders) &&
|
|
@@ -112,6 +128,11 @@ export class ZonosHelloDialog {
|
|
|
112
128
|
};
|
|
113
129
|
this.getTaxMessage = () => {
|
|
114
130
|
const { countryLandedCost } = localizationStore;
|
|
131
|
+
// Domestic orders stay within the merchant's origin country, so no
|
|
132
|
+
// duty is ever assessed — surface that instead of a de minimis threshold.
|
|
133
|
+
if (this.isDomesticCountry()) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
115
136
|
// For GB, if the store doesn't allow low value orders, we would like to tell shopper that taxes will always apply as there would be a custom message saying "Orders to United Kingdom must be over .* to ship."
|
|
116
137
|
if (!(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.allowLowValueOrders) &&
|
|
117
138
|
(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode) === 'GB') {
|
|
@@ -239,12 +260,7 @@ export class ZonosHelloDialog {
|
|
|
239
260
|
}
|
|
240
261
|
return null;
|
|
241
262
|
};
|
|
242
|
-
this.renderHelloMessage = () => {
|
|
243
|
-
// If deminimis is undefined or null, assume it's $0
|
|
244
|
-
const dutyDeMinimisMessage = this.getDutyMessage();
|
|
245
|
-
// If deminimis is undefined or null, assume it's $0
|
|
246
|
-
const taxDeMinimisMessage = this.getTaxMessage();
|
|
247
|
-
const inclusivePriceMessage = this.getInclusivePriceMessage();
|
|
263
|
+
this.renderHelloMessage = ({ dutyDeMinimisMessage, inclusivePriceMessage, taxDeMinimisMessage, }) => {
|
|
248
264
|
if (hasInclusivePrice() && inclusivePriceMessage) {
|
|
249
265
|
switch (inclusivePriceMessage.inclusiveType) {
|
|
250
266
|
case 'DUTIES_FEES': {
|
|
@@ -268,6 +284,11 @@ export class ZonosHelloDialog {
|
|
|
268
284
|
if (!localizationStore.countryLandedCost) {
|
|
269
285
|
return null;
|
|
270
286
|
}
|
|
287
|
+
// Domestic orders aren't subject to the foreign import-tax regimes these
|
|
288
|
+
// additional messages describe (e.g., UK/EU IOSS, AU/NZ/SG GST).
|
|
289
|
+
if (this.isDomesticCountry()) {
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
271
292
|
// only show the message if the store has a tax id for selected country
|
|
272
293
|
if (!this.hasTaxId()) {
|
|
273
294
|
return null;
|
|
@@ -319,18 +340,30 @@ export class ZonosHelloDialog {
|
|
|
319
340
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
320
341
|
const currentPage = this.getCurrentPageEnum();
|
|
321
342
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
322
|
-
|
|
343
|
+
// If deminimis is undefined or null, assume it's $0
|
|
344
|
+
const dutyDeMinimisMessage = this.getDutyMessage();
|
|
345
|
+
// If deminimis is undefined or null, assume it's $0
|
|
346
|
+
const taxDeMinimisMessage = this.getTaxMessage();
|
|
347
|
+
const inclusivePriceMessage = this.getInclusivePriceMessage();
|
|
348
|
+
return (h(Host, { key: '1278dbea844ec9e53b8224ede278281614be2fc6', class: "zonos--elements" }, h("div", { key: '5728be8b327198f0c09cf5865df43ae8bbe60beb', class: classes([
|
|
323
349
|
'zonos--hello-dialog',
|
|
324
350
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
325
351
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
326
352
|
!!this.mobileLocationOverride &&
|
|
327
353
|
'zonos--hello-dialog-mobile-override',
|
|
328
354
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
329
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
355
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'cbaa0d35c446529f07bcca4d7e12980e61d9bd7b' }, h("div", { key: '7da2f46a06fb320f07300232e2c910ba572ee5ad', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'ebe6f3cc03afdb1ffa5e8fb13c311dcd2249c002', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: 'ccfe32e9dda067e0c95cd28a3e3ee283f2efbdff', spacing: 24 }, h("zonos-country-flag", { key: 'ead0ffe10deb11ef18ef39def2710faf43b286a7', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '4927c2cb517003ccc55d57c0c7ab5cb55db5b369', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '732277a98d48d4041eef395db5d06a5c4214fd4d', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '88a0fec8b49e5a998688e5be8eb444cde1c04295', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '9e004f4aedff3236736efc3287f4f94759f426a3', spacing: 8 }, this.restrictedItems.map(item => {
|
|
330
356
|
var _a;
|
|
331
357
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
332
|
-
}),
|
|
333
|
-
|
|
358
|
+
}), (dutyDeMinimisMessage ||
|
|
359
|
+
taxDeMinimisMessage ||
|
|
360
|
+
inclusivePriceMessage ||
|
|
361
|
+
!!(additionalInformation === null || additionalInformation === void 0 ? void 0 : additionalInformation.length)) && (h("zonos-card", { key: 'bb2f4d2442f1ef0926dcc3740d3b66e4ef0a3c53', spacing: "12px" }, h("zonos-v-stack", { key: 'a2459ed448da424b89298c24ef7df3629a7fca81', spacing: 12 }, this.renderHelloMessage({
|
|
362
|
+
dutyDeMinimisMessage,
|
|
363
|
+
inclusivePriceMessage,
|
|
364
|
+
taxDeMinimisMessage,
|
|
365
|
+
}), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
366
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info }))))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '1480a6212aa6a620549962b2b58349592c2474c0', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'af985242d03159913dc3e3dc832fdd6bbb48d905' }, h("zonos-country-select", { key: 'e98898e3cba56bc3299832345c9e47608acd6176', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '3fc35b6383376e25c8d810d1631b7ccbe5541843' }, h("zonos-language-select", { key: 'ed782d71214f8668f14c468171231428b55e712a', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
334
367
|
}
|
|
335
368
|
static get is() { return "zonos-hello-dialog"; }
|
|
336
369
|
static get encapsulation() { return "shadow"; }
|
|
@@ -191,9 +191,31 @@ const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelecte
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
if (!currencyCode) {
|
|
194
|
-
// Non-shippable country:
|
|
195
|
-
//
|
|
196
|
-
|
|
194
|
+
// Non-shippable country: revert any previously-converted international
|
|
195
|
+
// prices back to the merchant's domestic (source) currency before bailing.
|
|
196
|
+
if (localizationStore.exchangeRateTimeout) {
|
|
197
|
+
clearTimeout(localizationStore.exchangeRateTimeout);
|
|
198
|
+
localizationStore.exchangeRateTimeout = undefined;
|
|
199
|
+
}
|
|
200
|
+
const sourceCurrency = zonosStore.sourceCurrency;
|
|
201
|
+
localizationStore.targetCurrency = sourceCurrency;
|
|
202
|
+
localizationStore.exchangeRate = {
|
|
203
|
+
rate: 1,
|
|
204
|
+
targetFormat: {
|
|
205
|
+
currencyCode: sourceCurrency,
|
|
206
|
+
decimalDelimiter: '.',
|
|
207
|
+
scale: 2,
|
|
208
|
+
symbol: '',
|
|
209
|
+
symbolLocation: 'before',
|
|
210
|
+
thousandsDelimiter: ',',
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
localizationStore.countryLandedCost = null;
|
|
214
|
+
localizationStore.inclusivePricingConfigurations = [];
|
|
215
|
+
currencyDisplay();
|
|
216
|
+
// Clear session so the next visit falls back to geolocation, but keep
|
|
217
|
+
// the current shopper's explicit selection visible in the URL (so a
|
|
218
|
+
// same-tab reload still honors it) and on the hello element.
|
|
197
219
|
window.sessionStorage.removeItem('zonos--country');
|
|
198
220
|
setZCountryUrlParam(selectedCountryCode);
|
|
199
221
|
(_b = document
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
-
import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-
|
|
2
|
+
import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-76ce3e29.js';
|
|
3
3
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
4
4
|
import { h as handleFetch, l as logError, f as fallbackApiList, g as getIsTestMode, a as getIsStagingMode, s as sendErrorLog, j as jsonParse } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-8092a9fb.js';
|
package/dist/esm/index.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.258.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.') ||
|
|
@@ -379,10 +379,10 @@ const zonosLoadUrl = (() => {
|
|
|
379
379
|
return null;
|
|
380
380
|
})();
|
|
381
381
|
const startLoadTime = Date.now();
|
|
382
|
-
const ZONOS_URL = "https://v1.3.
|
|
383
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
384
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
385
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
382
|
+
const ZONOS_URL = "https://v1.3.258.js.zonos.com";
|
|
383
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.258";
|
|
384
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.258";
|
|
385
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.258";
|
|
386
386
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
387
387
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
388
388
|
class Zonos {
|
|
@@ -400,7 +400,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
400
400
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
401
401
|
: null;
|
|
402
402
|
Zonos.isBigCommerce = false;
|
|
403
|
-
Zonos.releaseDate = "
|
|
403
|
+
Zonos.releaseDate = "1776786532180";
|
|
404
404
|
Zonos.isLegacyCheckout = false;
|
|
405
405
|
Zonos.googleAnalyticId = null;
|
|
406
406
|
Zonos.googleAnalyticReady = false;
|
|
@@ -423,7 +423,7 @@ Zonos.isNpm = true;
|
|
|
423
423
|
Zonos.zonosQaUrl = null;
|
|
424
424
|
Zonos.zonosQaUrlApi = null;
|
|
425
425
|
Zonos.trackEventLogs = [];
|
|
426
|
-
Zonos.version = `v${"1.3.
|
|
426
|
+
Zonos.version = `v${"1.3.258"}`;
|
|
427
427
|
Zonos.modeAlerted = false;
|
|
428
428
|
Zonos.cartData = null;
|
|
429
429
|
Zonos.paypal = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
-
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
2
|
+
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-76fb528f.js';
|
|
3
|
+
import { s as storageStore } from './localization-76ce3e29.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
-
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
2
|
+
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-76fb528f.js';
|
|
3
|
+
import { s as storageStore } from './localization-76ce3e29.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
6
|
|
|
@@ -17286,9 +17286,31 @@ const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelecte
|
|
|
17286
17286
|
});
|
|
17287
17287
|
}
|
|
17288
17288
|
if (!currencyCode) {
|
|
17289
|
-
// Non-shippable country:
|
|
17290
|
-
//
|
|
17291
|
-
|
|
17289
|
+
// Non-shippable country: revert any previously-converted international
|
|
17290
|
+
// prices back to the merchant's domestic (source) currency before bailing.
|
|
17291
|
+
if (localizationStore.exchangeRateTimeout) {
|
|
17292
|
+
clearTimeout(localizationStore.exchangeRateTimeout);
|
|
17293
|
+
localizationStore.exchangeRateTimeout = undefined;
|
|
17294
|
+
}
|
|
17295
|
+
const sourceCurrency = zonosStore.sourceCurrency;
|
|
17296
|
+
localizationStore.targetCurrency = sourceCurrency;
|
|
17297
|
+
localizationStore.exchangeRate = {
|
|
17298
|
+
rate: 1,
|
|
17299
|
+
targetFormat: {
|
|
17300
|
+
currencyCode: sourceCurrency,
|
|
17301
|
+
decimalDelimiter: '.',
|
|
17302
|
+
scale: 2,
|
|
17303
|
+
symbol: '',
|
|
17304
|
+
symbolLocation: 'before',
|
|
17305
|
+
thousandsDelimiter: ',',
|
|
17306
|
+
},
|
|
17307
|
+
};
|
|
17308
|
+
localizationStore.countryLandedCost = null;
|
|
17309
|
+
localizationStore.inclusivePricingConfigurations = [];
|
|
17310
|
+
currencyDisplay();
|
|
17311
|
+
// Clear session so the next visit falls back to geolocation, but keep
|
|
17312
|
+
// the current shopper's explicit selection visible in the URL (so a
|
|
17313
|
+
// same-tab reload still honors it) and on the hello element.
|
|
17292
17314
|
window.sessionStorage.removeItem('zonos--country');
|
|
17293
17315
|
setZCountryUrlParam(selectedCountryCode);
|
|
17294
17316
|
(_b = document
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
-
import { t as trackConversionEvent, y as validateCheckoutSession, b as stripeStore, d as cartStore, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, z as storeCreditStoreCreateOrder, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval, F as storeCreditStoreGetEffectiveAmount } from './cart-
|
|
3
|
-
import { t as translate, s as storageStore } from './localization-
|
|
2
|
+
import { t as trackConversionEvent, y as validateCheckoutSession, b as stripeStore, d as cartStore, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, z as storeCreditStoreCreateOrder, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval, F as storeCreditStoreGetEffectiveAmount } from './cart-76fb528f.js';
|
|
3
|
+
import { t as translate, s as storageStore } from './localization-76ce3e29.js';
|
|
4
4
|
import { h as handleFetch, l as logError, j as jsonParse } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { i as isContrastColor } from './isContrastColor-f9e65e70.js';
|
|
6
6
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-76fb528f.js';
|
|
2
|
+
import { s as storageStore } from './localization-76ce3e29.js';
|
|
3
3
|
import { l as logError, h as handleFetch } from './handleFetch-a844cac1.js';
|
|
4
4
|
|
|
5
5
|
const placeTestOrder = async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { o as applyInclusiveEffectiveRate, d as currencyFormat } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-76fb528f.js';
|
|
2
|
+
import { o as applyInclusiveEffectiveRate, d as currencyFormat } from './localization-76ce3e29.js';
|
|
3
3
|
|
|
4
4
|
const getDisplayCurrency = () => {
|
|
5
5
|
var _a, _b;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, d as createEvent, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-
|
|
2
|
+
import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-76ce3e29.js';
|
|
3
3
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
4
|
-
import { Q as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-
|
|
4
|
+
import { Q as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-76fb528f.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
7
7
|
import { z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
2
|
import { t as throttle_1 } from './throttle-5a66b4fd.js';
|
|
3
|
-
import { b as stripeStore, t as trackConversionEvent, Q as extractName, E as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-
|
|
4
|
-
import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-
|
|
3
|
+
import { b as stripeStore, t as trackConversionEvent, Q as extractName, E as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-76fb528f.js';
|
|
4
|
+
import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-76ce3e29.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
6
6
|
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-2572bf77.js';
|
|
@@ -2,10 +2,10 @@ import { r as registerInstance, h, a as Host, g as getElement, d as createEvent
|
|
|
2
2
|
import { f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
5
|
-
import { b as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
5
|
+
import { b as stripeStore, t as trackConversionEvent } from './cart-76fb528f.js';
|
|
6
|
+
import { s as storageStore } from './localization-76ce3e29.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-75c5c66d.js';
|
|
9
9
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-8092a9fb.js';
|
|
11
11
|
import './isContrastColor-f9e65e70.js';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host, F as Fragment, d as createEvent, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { d as cartStore, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, b as stripeStore, C as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, M as stripeStoreMessageBasedOnStatus, N as storeCreditStore, O as storeCreditStoreReset, x as storeCreditStoreCoversFullAmount, r as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as extractName, D as cartStoreOnChange, R as stripeStoreAsyncAddressUpdate, H as cartStoreUpdateSelectedShippingOption, S as cartStoreGetShippingTransitInfo, T as cartStoreGetMethod, U as sortServiceLevelOptionsByAmount } from './cart-
|
|
3
|
-
import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-
|
|
4
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
2
|
+
import { d as cartStore, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, b as stripeStore, C as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, M as stripeStoreMessageBasedOnStatus, N as storeCreditStore, O as storeCreditStoreReset, x as storeCreditStoreCoversFullAmount, r as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as extractName, D as cartStoreOnChange, R as stripeStoreAsyncAddressUpdate, H as cartStoreUpdateSelectedShippingOption, S as cartStoreGetShippingTransitInfo, T as cartStoreGetMethod, U as sortServiceLevelOptionsByAmount } from './cart-76fb528f.js';
|
|
3
|
+
import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-76ce3e29.js';
|
|
4
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-d27b0082.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-5f7856f2.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
7
|
import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
8
|
-
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-
|
|
9
|
-
import { c as paypalStoreReset, a as paypalStore } from './paypal-
|
|
8
|
+
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-275b1048.js';
|
|
9
|
+
import { c as paypalStoreReset, a as paypalStore } from './paypal-75c5c66d.js';
|
|
10
10
|
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
11
11
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
12
12
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
13
13
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
14
14
|
import { s as submitGtag } from './submitGtag-543058f9.js';
|
|
15
15
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
16
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
16
|
+
import { p as placeTestOrder } from './placeTestOrder-22633bf2.js';
|
|
17
17
|
import { i as isDarkColor } from './isDarkColor-8092a9fb.js';
|
|
18
18
|
import { g as getContrastColor } from './getContrastColor-e14f95a7.js';
|
|
19
19
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, y as validateCheckoutSession, z as storeCreditStoreCreateOrder, A as stripeStoreConfirmPayment, B as stripeStoreHandleInventoryRefund, C as stripeStoreReset, D as cartStoreOnChange, E as stripeStoreOnChange, F as storeCreditStoreGetEffectiveAmount } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
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-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, y as validateCheckoutSession, z as storeCreditStoreCreateOrder, A as stripeStoreConfirmPayment, B as stripeStoreHandleInventoryRefund, C as stripeStoreReset, D as cartStoreOnChange, E as stripeStoreOnChange, F as storeCreditStoreGetEffectiveAmount } from './cart-76fb528f.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore, b as paypalInitScript } from './paypal-75c5c66d.js';
|
|
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-76ce3e29.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-f1d45eac.js';
|
|
6
6
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
7
7
|
import { h as handleFetch, g as getIsTestMode, l as logError, b as getAdditionalLogMetadata, j as jsonParse, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-a844cac1.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { d as cartStore } from './cart-
|
|
2
|
+
import { d as cartStore } from './cart-76fb528f.js';
|
|
3
3
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-5f7856f2.js';
|
|
4
4
|
import { f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
7
|
-
import './localization-
|
|
7
|
+
import './localization-76ce3e29.js';
|
|
8
8
|
import './handleFetch-a844cac1.js';
|
|
9
9
|
import './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-8092a9fb.js';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, C as stripeStoreReset, M as stripeStoreMessageBasedOnStatus, d as cartStore, r as cartStoreNextStep, D as cartStoreOnChange } from './cart-
|
|
3
|
-
import { c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { t as translate, s as storageStore, l as localizationStore, p as translationStoreOnChange } from './localization-
|
|
2
|
+
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, C as stripeStoreReset, M as stripeStoreMessageBasedOnStatus, d as cartStore, r as cartStoreNextStep, D as cartStoreOnChange } from './cart-76fb528f.js';
|
|
3
|
+
import { c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-75c5c66d.js';
|
|
4
|
+
import { t as translate, s as storageStore, l as localizationStore, p as translationStoreOnChange } from './localization-76ce3e29.js';
|
|
5
5
|
import { z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
6
6
|
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
8
8
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
9
9
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import { s as submitGtag } from './submitGtag-543058f9.js';
|
|
11
|
-
import { i as isCollectMobile, a as isCollectTablet, e as collectStore } from './isCollectMobileTablet-
|
|
11
|
+
import { i as isCollectMobile, a as isCollectTablet, e as collectStore } from './isCollectMobileTablet-a7e5b909.js';
|
|
12
12
|
import { c as classes } from './classes-0d95c529.js';
|
|
13
13
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
14
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
15
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
14
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-d27b0082.js';
|
|
15
|
+
import { p as placeTestOrder } from './placeTestOrder-22633bf2.js';
|
|
16
16
|
import { r as renderFallback } from './renderFallback-b250f4e9.js';
|
|
17
17
|
import './isDarkColor-8092a9fb.js';
|
|
18
18
|
import './isContrastColor-f9e65e70.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, F as Fragment } from './index-cfd394c8.js';
|
|
2
|
-
import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, n as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, A as stripeStoreConfirmPayment, E as stripeStoreOnChange, C as stripeStoreReset, f as cartStoreReset } from './cart-
|
|
3
|
-
import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore } from './isCollectMobileTablet-
|
|
4
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-
|
|
5
|
-
import { s as storageStore, t as translate, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-
|
|
2
|
+
import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, n as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, A as stripeStoreConfirmPayment, E as stripeStoreOnChange, C as stripeStoreReset, f as cartStoreReset } from './cart-76fb528f.js';
|
|
3
|
+
import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore } from './isCollectMobileTablet-a7e5b909.js';
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-75c5c66d.js';
|
|
5
|
+
import { s as storageStore, t as translate, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-76ce3e29.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
7
7
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
8
8
|
import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-a844cac1.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { b as stripeStore } from './cart-
|
|
3
|
-
import { e as getOverridenZCountry, i as isValidSelector, h as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-
|
|
2
|
+
import { b as stripeStore } from './cart-76fb528f.js';
|
|
3
|
+
import { e as getOverridenZCountry, i as isValidSelector, h as initLocalizationStore, s as storageStore, a as localizationStoreUpdateSelectedCountryCode } from './localization-76ce3e29.js';
|
|
4
4
|
import { z as zonosStore, e as zonosStoreInitSetting, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
5
5
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-0bc3e118.js';
|
|
6
6
|
import { h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { l as localizationStore } from './localization-
|
|
2
|
+
import { l as localizationStore } from './localization-76ce3e29.js';
|
|
3
3
|
import { f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-a844cac1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './localization-76ce3e29.js';
|
|
3
3
|
import { f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-8092a9fb.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { l as localizationStore, t as translate, d as currencyFormat } from './localization-
|
|
2
|
+
import { l as localizationStore, t as translate, d as currencyFormat } from './localization-76ce3e29.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
6
|
-
import { h as hasInclusivePrice, T as TAXES_KEY, D as DUTY_KEY } from './hasInclusivePrice-
|
|
6
|
+
import { h as hasInclusivePrice, T as TAXES_KEY, D as DUTY_KEY } from './hasInclusivePrice-275b1048.js';
|
|
7
7
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
8
8
|
import { e as euCountryCodes } from './TaxId-50d72254.js';
|
|
9
9
|
import './handleFetch-a844cac1.js';
|
|
@@ -108,6 +108,17 @@ const ZonosHelloDialog = class {
|
|
|
108
108
|
var _a;
|
|
109
109
|
return (_a = localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
|
|
110
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Selected country is configured as a domestic country for the merchant,
|
|
113
|
+
* meaning the order ships within the merchant's origin country and no
|
|
114
|
+
* duty will be assessed on it.
|
|
115
|
+
*/
|
|
116
|
+
this.isDomesticCountry = () => {
|
|
117
|
+
var _a, _b;
|
|
118
|
+
const { selectedCountryCode } = localizationStore;
|
|
119
|
+
return (!!selectedCountryCode &&
|
|
120
|
+
!!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(selectedCountryCode)));
|
|
121
|
+
};
|
|
111
122
|
/**
|
|
112
123
|
* Some countries don't have threshold. So we need to show generic message for them
|
|
113
124
|
*/
|
|
@@ -127,6 +138,11 @@ const ZonosHelloDialog = class {
|
|
|
127
138
|
return countryCodes.includes(countryCode);
|
|
128
139
|
};
|
|
129
140
|
this.getDutyMessage = () => {
|
|
141
|
+
// Domestic orders stay within the merchant's origin country, so no
|
|
142
|
+
// duty is ever assessed — surface that instead of a de minimis threshold.
|
|
143
|
+
if (this.isDomesticCountry()) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
130
146
|
const countryLandedCost = localizationStore.countryLandedCost;
|
|
131
147
|
// For GB, if the store doesn't allow low value orders, we would like to tell shopper that duties will always apply as there would be a custom message saying "Orders to United Kingdom must be over .* to ship."
|
|
132
148
|
if (!(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.allowLowValueOrders) &&
|
|
@@ -146,6 +162,11 @@ const ZonosHelloDialog = class {
|
|
|
146
162
|
};
|
|
147
163
|
this.getTaxMessage = () => {
|
|
148
164
|
const { countryLandedCost } = localizationStore;
|
|
165
|
+
// Domestic orders stay within the merchant's origin country, so no
|
|
166
|
+
// duty is ever assessed — surface that instead of a de minimis threshold.
|
|
167
|
+
if (this.isDomesticCountry()) {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
149
170
|
// For GB, if the store doesn't allow low value orders, we would like to tell shopper that taxes will always apply as there would be a custom message saying "Orders to United Kingdom must be over .* to ship."
|
|
150
171
|
if (!(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.allowLowValueOrders) &&
|
|
151
172
|
(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode) === 'GB') {
|
|
@@ -273,12 +294,7 @@ const ZonosHelloDialog = class {
|
|
|
273
294
|
}
|
|
274
295
|
return null;
|
|
275
296
|
};
|
|
276
|
-
this.renderHelloMessage = () => {
|
|
277
|
-
// If deminimis is undefined or null, assume it's $0
|
|
278
|
-
const dutyDeMinimisMessage = this.getDutyMessage();
|
|
279
|
-
// If deminimis is undefined or null, assume it's $0
|
|
280
|
-
const taxDeMinimisMessage = this.getTaxMessage();
|
|
281
|
-
const inclusivePriceMessage = this.getInclusivePriceMessage();
|
|
297
|
+
this.renderHelloMessage = ({ dutyDeMinimisMessage, inclusivePriceMessage, taxDeMinimisMessage, }) => {
|
|
282
298
|
if (hasInclusivePrice() && inclusivePriceMessage) {
|
|
283
299
|
switch (inclusivePriceMessage.inclusiveType) {
|
|
284
300
|
case 'DUTIES_FEES': {
|
|
@@ -302,6 +318,11 @@ const ZonosHelloDialog = class {
|
|
|
302
318
|
if (!localizationStore.countryLandedCost) {
|
|
303
319
|
return null;
|
|
304
320
|
}
|
|
321
|
+
// Domestic orders aren't subject to the foreign import-tax regimes these
|
|
322
|
+
// additional messages describe (e.g., UK/EU IOSS, AU/NZ/SG GST).
|
|
323
|
+
if (this.isDomesticCountry()) {
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
305
326
|
// only show the message if the store has a tax id for selected country
|
|
306
327
|
if (!this.hasTaxId()) {
|
|
307
328
|
return null;
|
|
@@ -353,18 +374,30 @@ const ZonosHelloDialog = class {
|
|
|
353
374
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
354
375
|
const currentPage = this.getCurrentPageEnum();
|
|
355
376
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
356
|
-
|
|
377
|
+
// If deminimis is undefined or null, assume it's $0
|
|
378
|
+
const dutyDeMinimisMessage = this.getDutyMessage();
|
|
379
|
+
// If deminimis is undefined or null, assume it's $0
|
|
380
|
+
const taxDeMinimisMessage = this.getTaxMessage();
|
|
381
|
+
const inclusivePriceMessage = this.getInclusivePriceMessage();
|
|
382
|
+
return (h(Host, { key: '1278dbea844ec9e53b8224ede278281614be2fc6', class: "zonos--elements" }, h("div", { key: '5728be8b327198f0c09cf5865df43ae8bbe60beb', class: classes([
|
|
357
383
|
'zonos--hello-dialog',
|
|
358
384
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
359
385
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
360
386
|
!!this.mobileLocationOverride &&
|
|
361
387
|
'zonos--hello-dialog-mobile-override',
|
|
362
388
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
363
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
389
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'cbaa0d35c446529f07bcca4d7e12980e61d9bd7b' }, h("div", { key: '7da2f46a06fb320f07300232e2c910ba572ee5ad', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'ebe6f3cc03afdb1ffa5e8fb13c311dcd2249c002', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: 'ccfe32e9dda067e0c95cd28a3e3ee283f2efbdff', spacing: 24 }, h("zonos-country-flag", { key: 'ead0ffe10deb11ef18ef39def2710faf43b286a7', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '4927c2cb517003ccc55d57c0c7ab5cb55db5b369', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '732277a98d48d4041eef395db5d06a5c4214fd4d', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '88a0fec8b49e5a998688e5be8eb444cde1c04295', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '9e004f4aedff3236736efc3287f4f94759f426a3', spacing: 8 }, this.restrictedItems.map(item => {
|
|
364
390
|
var _a;
|
|
365
391
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
366
|
-
}),
|
|
367
|
-
|
|
392
|
+
}), (dutyDeMinimisMessage ||
|
|
393
|
+
taxDeMinimisMessage ||
|
|
394
|
+
inclusivePriceMessage ||
|
|
395
|
+
!!(additionalInformation === null || additionalInformation === void 0 ? void 0 : additionalInformation.length)) && (h("zonos-card", { key: 'bb2f4d2442f1ef0926dcc3740d3b66e4ef0a3c53', spacing: "12px" }, h("zonos-v-stack", { key: 'a2459ed448da424b89298c24ef7df3629a7fca81', spacing: 12 }, this.renderHelloMessage({
|
|
396
|
+
dutyDeMinimisMessage,
|
|
397
|
+
inclusivePriceMessage,
|
|
398
|
+
taxDeMinimisMessage,
|
|
399
|
+
}), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
400
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info }))))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '1480a6212aa6a620549962b2b58349592c2474c0', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'af985242d03159913dc3e3dc832fdd6bbb48d905' }, h("zonos-country-select", { key: 'e98898e3cba56bc3299832345c9e47608acd6176', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '3fc35b6383376e25c8d810d1631b7ccbe5541843' }, h("zonos-language-select", { key: 'ed782d71214f8668f14c468171231428b55e712a', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
368
401
|
}
|
|
369
402
|
static get assetsDirs() { return ["assets"]; }
|
|
370
403
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
2
|
import { d as debounce_1 } from './debounce-8faafc9f.js';
|
|
3
|
-
import { l as localizationStore, i as isValidSelector, t as translate, g as getZCountryUrlParam, j as setZCountryUrlParam, k as currencyDisplay, m as currencyConvertAndFormat, n as currencyConvert, d as currencyFormat } from './localization-
|
|
3
|
+
import { l as localizationStore, i as isValidSelector, t as translate, g as getZCountryUrlParam, j as setZCountryUrlParam, k as currencyDisplay, m as currencyConvertAndFormat, n as currencyConvert, d as currencyFormat } from './localization-76ce3e29.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-f1d45eac.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|