@zonos/elements 1.3.41 → 1.3.43
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-497bb434.js → cart-558e4d21.js} +409 -52
- package/dist/cjs/index.cjs.js +21 -7
- package/dist/cjs/{paypal-e65a287a.js → paypal-276d8f92.js} +1 -1
- package/dist/cjs/{sendErrorLog-c3c315a9.js → sendErrorLog-f914a34b.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +3 -3
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +43 -9
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +6 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +42 -8
- package/dist/collection/components/store/hello/localization.js +5 -5
- package/dist/collection/components/store/translationStore/strings.arabic.js +20 -2
- package/dist/collection/components/store/translationStore/strings.base.js +20 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +20 -2
- package/dist/collection/components/store/translationStore/strings.french.js +20 -2
- package/dist/collection/components/store/translationStore/strings.german.js +20 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +20 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +20 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +20 -2
- package/dist/collection/components/utils/handleFetch.js +0 -6
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +4 -1
- package/dist/collection/environment.js +6 -0
- package/dist/collection/scripts/_getNextFallbackUrl.js +1 -1
- package/dist/collection/scripts/_getZonosQaUrl.js +12 -1
- package/dist/collection/scripts/_zonosBase.js +4 -1
- package/dist/collection/types/generated/graphql.customer.types.js +19 -10
- package/dist/esm/{cart-f53c9f90.js → cart-c62e41b5.js} +409 -52
- package/dist/esm/index.js +21 -7
- package/dist/esm/{paypal-72296ae6.js → paypal-28d21865.js} +1 -1
- package/dist/esm/{sendErrorLog-f8d3ec4b.js → sendErrorLog-af1cd4bd.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +1 -1
- package/dist/esm/zonos-cart-items_12.entry.js +3 -3
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +43 -9
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +2 -2
- package/dist/esm-es5/cart-c62e41b5.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-72296ae6.js → paypal-28d21865.js} +1 -1
- package/dist/esm-es5/{sendErrorLog-f8d3ec4b.js → sendErrorLog-af1cd4bd.js} +1 -1
- package/dist/esm-es5/zonos-address_8.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-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-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/scripts/index.d.ts +62 -52
- 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/zonos-hello.d.ts +2 -1
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -0
- package/dist/types/components/store/hello/localization.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +19 -1
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getInclusivePricing.d.ts +2 -4
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components.d.ts +3 -1
- package/dist/types/environment.d.ts +4 -0
- package/dist/types/scripts/_getNextFallbackUrl.d.ts +3 -3
- package/dist/types/types/LogLoadScriptRequestBody.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +45 -13
- package/dist/types/types/generated/graphql.customer.types.ts +47 -18
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-fd54fbb9.system.entry.js → p-01961795.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0e9ca72b.system.js +1 -0
- package/dist/zonos-elements/p-0edd8829.system.js +1 -0
- package/dist/zonos-elements/p-21b38377.entry.js +1 -0
- package/dist/zonos-elements/{p-de53d9c3.entry.js → p-2a655e55.entry.js} +1 -1
- package/dist/zonos-elements/{p-5fe10991.system.entry.js → p-3754f86b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4db5be24.system.entry.js → p-387bc4f0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab11cca6.system.entry.js → p-437fd543.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-df69fa38.system.entry.js → p-4d5cafb1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-52fa9aab.entry.js → p-4fb3cbad.entry.js} +1 -1
- package/dist/zonos-elements/{p-f35ee203.entry.js → p-622cd68a.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4617501.entry.js → p-695fdbca.entry.js} +1 -1
- package/dist/zonos-elements/{p-67f22fbf.system.entry.js → p-6a3e8101.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d86c89e3.entry.js → p-71815183.entry.js} +1 -1
- package/dist/zonos-elements/p-75a6d31d.entry.js +1 -0
- package/dist/zonos-elements/{p-1ee2fa70.system.entry.js → p-77de5f08.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b3e825dc.system.js → p-7ab0cfbf.system.js} +1 -1
- package/dist/zonos-elements/{p-5922c099.entry.js → p-8855805d.entry.js} +1 -1
- package/dist/zonos-elements/{p-b689309d.system.entry.js → p-89c9cd2d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-05cdd3b4.js → p-c887765b.js} +1 -1
- package/dist/zonos-elements/{p-6de1c78a.entry.js → p-ceb9be2b.entry.js} +1 -1
- package/dist/zonos-elements/{p-6fbb4565.system.entry.js → p-d027eef2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-12266c9e.js → p-dba42d88.js} +1 -1
- package/dist/zonos-elements/p-e68503df.js +1 -0
- package/dist/zonos-elements/p-e88d33a6.system.js +1 -0
- package/dist/zonos-elements/{p-7833fa53.system.entry.js → p-eadd9525.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fdb4347f.entry.js → p-f97d6d55.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.css +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +9 -2
- package/dist/esm-es5/cart-f53c9f90.js +0 -1
- package/dist/zonos-elements/p-0f9804e3.entry.js +0 -1
- package/dist/zonos-elements/p-1a89c54a.js +0 -1
- package/dist/zonos-elements/p-678f1888.entry.js +0 -1
- package/dist/zonos-elements/p-79fd4f3c.system.js +0 -1
- package/dist/zonos-elements/p-9525cc44.system.js +0 -1
- package/dist/zonos-elements/p-c460665d.system.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -40,7 +40,7 @@ const checkIfLoadVersionDomain = ({ loadScriptSrc }) => {
|
|
|
40
40
|
return { currentLoadScriptUrl, isForceLoadVersionDomain, isWhiteListed };
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
const fallbackList = ['jsdelivr', 'unpkg', 'vercel'];
|
|
43
|
+
const fallbackList = ['jsdelivr', 'cdnjs', 'unpkg', 'vercel'];
|
|
44
44
|
/**
|
|
45
45
|
* Get the next cdn type in the fallback list
|
|
46
46
|
* @param currentCdnType The current cdn type that want to get the next fallback url
|
|
@@ -84,10 +84,21 @@ const extractZonosQaUrl = (url) => {
|
|
|
84
84
|
* Get the Zonos QA URL and return it. Will remove `zonosQaUrl` from the url query if it doesn't exists.
|
|
85
85
|
*/
|
|
86
86
|
const getZonosQaUrl = () => {
|
|
87
|
-
|
|
87
|
+
/**
|
|
88
|
+
* This is flag to force load cdn for testing purpose
|
|
89
|
+
* When developing, if the script load is from `dev.elements.zonos.com`,
|
|
90
|
+
* it would load script from that same domain instead of loading from cdn
|
|
91
|
+
*/
|
|
92
|
+
const shoudForceLoadCdn = window && window.location.href.includes('forceLoadCdn');
|
|
93
|
+
if (typeof window === 'undefined' || shoudForceLoadCdn) {
|
|
88
94
|
return null;
|
|
89
95
|
}
|
|
90
96
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
97
|
+
const cdnUrl = "https://v1.3.43.js.zonos.com";
|
|
98
|
+
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
99
|
+
if (!qaUrl && cdnUrl.includes('test.')) {
|
|
100
|
+
return cdnUrl;
|
|
101
|
+
}
|
|
91
102
|
// when local demo app is running, it needs to use the local dev script unless the qaUrl is set
|
|
92
103
|
if (!qaUrl && window.location.hostname === 'dev.demo.elements.zonos.com') {
|
|
93
104
|
return 'https://dev.elements.zonos.com';
|
|
@@ -253,9 +264,10 @@ const zonosLoadUrl = (() => {
|
|
|
253
264
|
}
|
|
254
265
|
return null;
|
|
255
266
|
})();
|
|
256
|
-
const ZONOS_URL = "https://v1.3.
|
|
257
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
258
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
267
|
+
const ZONOS_URL = "https://v1.3.43.js.zonos.com";
|
|
268
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.43";
|
|
269
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.43";
|
|
270
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.43";
|
|
259
271
|
const MAIN_LOAD_CDN_TYPE = 'jsdelivr';
|
|
260
272
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
261
273
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
@@ -276,7 +288,7 @@ Zonos.isBigCommerce = false;
|
|
|
276
288
|
*/
|
|
277
289
|
Zonos.isNpm = true;
|
|
278
290
|
Zonos.zonosQaUrl = null;
|
|
279
|
-
Zonos.version = `v${"1.3.
|
|
291
|
+
Zonos.version = `v${"1.3.43"}`;
|
|
280
292
|
Zonos.modeAlerted = false;
|
|
281
293
|
Zonos.tempCartData = null;
|
|
282
294
|
Zonos.paypal = null;
|
|
@@ -476,7 +488,9 @@ Zonos.getZonosUrl = (type) => {
|
|
|
476
488
|
return JS_DELIVR_ZONOS_URL;
|
|
477
489
|
case 'unpkg':
|
|
478
490
|
return UNPKG_ZONOS_URL;
|
|
479
|
-
|
|
491
|
+
case 'cdnjs':
|
|
492
|
+
return CDNJS_ZONOS_URL;
|
|
493
|
+
case 'vercel':
|
|
480
494
|
return ZONOS_URL;
|
|
481
495
|
}
|
|
482
496
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-558e4d21.js');
|
|
5
5
|
const isDarkColor = require('./isDarkColor-4eb96a1e.js');
|
|
6
6
|
const logError = require('./logError-4e2f2020.js');
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-558e4d21.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
8
|
const logError = require('./logError-4e2f2020.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-558e4d21.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
8
|
+
const paypal = require('./paypal-276d8f92.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
10
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
10
|
+
const sendErrorLog = require('./sendErrorLog-f914a34b.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-4413e191.js');
|
|
12
12
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
13
13
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-558e4d21.js');
|
|
7
|
+
const paypal = require('./paypal-276d8f92.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
9
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
9
|
+
const sendErrorLog = require('./sendErrorLog-f914a34b.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
11
11
|
const logError = require('./logError-4e2f2020.js');
|
|
12
12
|
const classes = require('./classes-b7918f56.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-558e4d21.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const logError = require('./logError-4e2f2020.js');
|
|
9
9
|
require('./isDarkColor-4eb96a1e.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-558e4d21.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./logError-4e2f2020.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-558e4d21.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-4eb96a1e.js');
|
|
@@ -1822,7 +1822,7 @@ const ZonosCountrySelect = class {
|
|
|
1822
1822
|
componentDidRender() {
|
|
1823
1823
|
var _a, _b;
|
|
1824
1824
|
// focus the input on render
|
|
1825
|
-
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-
|
|
1825
|
+
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-input')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1826
1826
|
}
|
|
1827
1827
|
render() {
|
|
1828
1828
|
const { helloCountryList } = cart.localizationStore;
|
|
@@ -1837,9 +1837,9 @@ const ZonosCountrySelect = class {
|
|
|
1837
1837
|
? fuseObject.map(country => country.item)
|
|
1838
1838
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1839
1839
|
const isEmpty = !filteredCountries.length;
|
|
1840
|
-
return (index.h(index.Host, { key: '
|
|
1840
|
+
return (index.h(index.Host, { key: 'd6d6a0736660d0c6e76f749f8ea78a8c95825b88', class: "zonos--elements", style: {
|
|
1841
1841
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
1842
|
-
} }, index.h("div", { key: '
|
|
1842
|
+
} }, index.h("div", { key: '0bc3773965c49f0ee4da2056b6acc0ae361e227a', class: "zonos--country-select" }, index.h("zonos-v-stack", { key: '9e00877189dc39b789861c0425702d276cdad410', class: "zonos--country-select-header", spacing: 8 }, index.h("zonos-select-dialog-header", { key: '9c098afdf6db8ef8e18dc855e19ab6d45b7db8be', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a country') }, index.h("input", { key: '10c59b07a42da02fb348e289dc0211ae33b96638', autocomplete: "off", autofocus: "autofocus", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: cart.translate('Search countries'), value: this.inputValue }))), index.h("div", { key: 'fec8fb874726377a3c4a03ac5d264fc7d8a94a21', class: "zonos--country-select-content" }, isEmpty && (index.h("zonos-text", { key: '182fb6955798519e63d63121752bc65ac6045770', class: "no-country", textColor: "gray-800" }, cart.translate('No countries found'))), index.h("zonos-virtual-scroll", { key: '3ccda154b37344857595d65ce3131ca6d2610a11', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index$1 => {
|
|
1843
1843
|
const country = filteredCountries[index$1];
|
|
1844
1844
|
if (!country) {
|
|
1845
1845
|
return null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-558e4d21.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
@@ -62,7 +62,6 @@ const dutyTaxMessage_AU_lowValueGST = `${cart.translate('The low-value GST law p
|
|
|
62
62
|
href: 'https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst',
|
|
63
63
|
text: cart.translate('Learn more.'),
|
|
64
64
|
})}`;
|
|
65
|
-
const inclusivePriceMessage = cart.translate('Product prices already include duties, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions.');
|
|
66
65
|
const ZonosHelloDialog = class {
|
|
67
66
|
constructor(hostRef) {
|
|
68
67
|
index.registerInstance(this, hostRef);
|
|
@@ -100,7 +99,8 @@ const ZonosHelloDialog = class {
|
|
|
100
99
|
return (_a = cart.localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
|
|
101
100
|
};
|
|
102
101
|
this.hasInclusivePrices = () => {
|
|
103
|
-
|
|
102
|
+
var _a;
|
|
103
|
+
return ((_a = cart.localizationStore.inclusivePricing) === null || _a === void 0 ? void 0 : _a.status) === 'ENABLED';
|
|
104
104
|
};
|
|
105
105
|
/**
|
|
106
106
|
* Some countries don't have threshold. So we need to show generic message for them
|
|
@@ -153,7 +153,7 @@ const ZonosHelloDialog = class {
|
|
|
153
153
|
];
|
|
154
154
|
};
|
|
155
155
|
this.getAustraliaDutyTaxMessage = (landedCost) => {
|
|
156
|
-
if (
|
|
156
|
+
if (this.hasInclusivePrices()) {
|
|
157
157
|
return [dutyTaxMessage_AU_lowValueGST];
|
|
158
158
|
}
|
|
159
159
|
return [
|
|
@@ -164,7 +164,7 @@ const ZonosHelloDialog = class {
|
|
|
164
164
|
];
|
|
165
165
|
};
|
|
166
166
|
this.getNewZealandDutyTaxMessge = (landedCost) => {
|
|
167
|
-
if (
|
|
167
|
+
if (this.hasInclusivePrices()) {
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
170
170
|
return [
|
|
@@ -174,6 +174,39 @@ const ZonosHelloDialog = class {
|
|
|
174
174
|
}),
|
|
175
175
|
];
|
|
176
176
|
};
|
|
177
|
+
this.getInclusivePriceMessage = () => {
|
|
178
|
+
const setting = cart.localizationStore.inclusivePricing;
|
|
179
|
+
if ((setting === null || setting === void 0 ? void 0 : setting.status) !== 'ENABLED') {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
183
|
+
setting.tax.status === 'INCLUDED' &&
|
|
184
|
+
setting.fee.status === 'INCLUDED') {
|
|
185
|
+
return cart.translate('Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.');
|
|
186
|
+
}
|
|
187
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
188
|
+
setting.tax.status === 'INCLUDED') {
|
|
189
|
+
return cart.translate('Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.');
|
|
190
|
+
}
|
|
191
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
192
|
+
setting.fee.status === 'INCLUDED') {
|
|
193
|
+
return cart.translate('Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.');
|
|
194
|
+
}
|
|
195
|
+
if (setting.tax.status === 'INCLUDED' &&
|
|
196
|
+
setting.fee.status === 'INCLUDED') {
|
|
197
|
+
return cart.translate('Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.');
|
|
198
|
+
}
|
|
199
|
+
if (setting.duty.status === 'INCLUDED') {
|
|
200
|
+
return cart.translate('Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.');
|
|
201
|
+
}
|
|
202
|
+
if (setting.tax.status === 'INCLUDED') {
|
|
203
|
+
return cart.translate('Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.');
|
|
204
|
+
}
|
|
205
|
+
if (setting.fee.status === 'INCLUDED') {
|
|
206
|
+
return cart.translate('Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.');
|
|
207
|
+
}
|
|
208
|
+
return null;
|
|
209
|
+
};
|
|
177
210
|
/**
|
|
178
211
|
* Get additional duty tax message if selected country has tax id
|
|
179
212
|
*/
|
|
@@ -220,6 +253,7 @@ const ZonosHelloDialog = class {
|
|
|
220
253
|
var _a;
|
|
221
254
|
const { selectedCountryCode } = cart.localizationStore;
|
|
222
255
|
const hasInclusivePrices = this.hasInclusivePrices();
|
|
256
|
+
const inclusivePriceMessage = this.getInclusivePriceMessage();
|
|
223
257
|
// If deminimis is undefined or null, assume it's $0
|
|
224
258
|
const dutyDeMinimisMessage = this.getDutyMessage();
|
|
225
259
|
// If deminimis is undefined or null, assume it's $0
|
|
@@ -238,18 +272,18 @@ const ZonosHelloDialog = class {
|
|
|
238
272
|
const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
|
|
239
273
|
const currentPage = this.getCurrentPageEnum();
|
|
240
274
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
241
|
-
return (index.h(index.Host, { key: '
|
|
275
|
+
return (index.h(index.Host, { key: 'df052224c778ebfceeef7c827fa3da0e8a2f3dc9', class: "zonos--elements" }, index.h("div", { key: '0ecff6a07d24a72fb4f200cce82ab09e40b48baf', class: classes.classes([
|
|
242
276
|
'zonos--hello-dialog',
|
|
243
277
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
244
278
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
245
279
|
!!this.mobileLocationOverride &&
|
|
246
280
|
'zonos--hello-dialog-mobile-override',
|
|
247
281
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
248
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: '
|
|
282
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: 'b2939d49930c8a34288a884582eb849a492080ff' }, index.h("div", { key: 'f1a22291d7865d57d37cbcd3c8f70c4aea57ed39', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: 'ee3794826efc9fed856f0a320cf6428a428b4ea4', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), index.h("zonos-v-stack", { key: '3d2ff0b68268c97e385eb3cf7fcc34454d2ed3b5', spacing: 24 }, index.h("zonos-country-flag", { key: 'e09645ac583e59354d11b3c194d4d3f6d4780c55', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: '42017a698c1678b90c8c7bbece5d623d0800e37b', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: 'ac30b7683dcc65773159832eadad8542d1d1bda8', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: '58cc0e8c51774c339b0fc735e4e98917ed614c8a', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: '0b3a3b2bf981ed72654506cc31f07edf6268b0a4', spacing: 8 }, this.restrictedItems.map(item => {
|
|
249
283
|
var _a;
|
|
250
284
|
return item && (index.h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (index.h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
251
|
-
}), index.h("zonos-card", { key: '
|
|
252
|
-
additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), index.h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: '
|
|
285
|
+
}), index.h("zonos-card", { key: '196a593b167fc979bf0a2bef7f266ad3778f6ca0', spacing: "12px" }, index.h("zonos-v-stack", { key: '94925c753ddfdd1a659580f7f78f8d6626cdcdaa', spacing: 12 }, hasInclusivePrices ? (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), index.h("zonos-text", null, inclusivePriceMessage))) : (index.h(index.Fragment, null, index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), index.h("zonos-text", null, dutyDeMinimisMessage)), index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), index.h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
286
|
+
additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), index.h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: '540006185ce1d28d610052801dcf9281773c5504', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: '886c371fdfa8c9c15188ef9d6cbb637162fb0d27' }, index.h("zonos-country-select", { key: '1365bee67831b64637e5c481f239c557f2649694', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: '44929f0c23627970b1706f6e8c76e51022201379' }, index.h("zonos-language-select", { key: '86b9f68c84da77f9e1af51dcb7d512eb6b289a27', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
253
287
|
}
|
|
254
288
|
static get assetsDirs() { return ["assets"]; }
|
|
255
289
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-558e4d21.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const logError = require('./logError-4e2f2020.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-558e4d21.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./logError-4e2f2020.js');
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-558e4d21.js');
|
|
9
9
|
const logError = require('./logError-4e2f2020.js');
|
|
10
|
-
const paypal = require('./paypal-
|
|
10
|
+
const paypal = require('./paypal-276d8f92.js');
|
|
11
11
|
require('./isDarkColor-4eb96a1e.js');
|
|
12
12
|
require('./getBorderRadius-4413e191.js');
|
|
13
13
|
|
|
@@ -29,7 +29,7 @@ export class ZonosCountrySelect {
|
|
|
29
29
|
componentDidRender() {
|
|
30
30
|
var _a, _b;
|
|
31
31
|
// focus the input on render
|
|
32
|
-
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-
|
|
32
|
+
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-input')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
35
|
const { helloCountryList } = localizationStore;
|
|
@@ -44,9 +44,9 @@ export class ZonosCountrySelect {
|
|
|
44
44
|
? fuseObject.map(country => country.item)
|
|
45
45
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
46
46
|
const isEmpty = !filteredCountries.length;
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: 'd6d6a0736660d0c6e76f749f8ea78a8c95825b88', class: "zonos--elements", style: {
|
|
48
48
|
'--font-family': zonosStoreFontFamily(),
|
|
49
|
-
} }, h("div", { key: '
|
|
49
|
+
} }, h("div", { key: '0bc3773965c49f0ee4da2056b6acc0ae361e227a', class: "zonos--country-select" }, h("zonos-v-stack", { key: '9e00877189dc39b789861c0425702d276cdad410', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '9c098afdf6db8ef8e18dc855e19ab6d45b7db8be', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '10c59b07a42da02fb348e289dc0211ae33b96638', autocomplete: "off", autofocus: "autofocus", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), value: this.inputValue }))), h("div", { key: 'fec8fb874726377a3c4a03ac5d264fc7d8a94a21', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: '182fb6955798519e63d63121752bc65ac6045770', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '3ccda154b37344857595d65ce3131ca6d2610a11', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
|
|
50
50
|
const country = filteredCountries[index];
|
|
51
51
|
if (!country) {
|
|
52
52
|
return null;
|
|
@@ -447,12 +447,17 @@ export class ZonosHello {
|
|
|
447
447
|
return {
|
|
448
448
|
"getCountryList": {
|
|
449
449
|
"complexType": {
|
|
450
|
-
"signature": "() => Promise<
|
|
450
|
+
"signature": "() => Promise<ICountryJson | null>",
|
|
451
451
|
"parameters": [],
|
|
452
452
|
"references": {
|
|
453
453
|
"Promise": {
|
|
454
454
|
"location": "global",
|
|
455
455
|
"id": "global::Promise"
|
|
456
|
+
},
|
|
457
|
+
"ICountryJson": {
|
|
458
|
+
"location": "import",
|
|
459
|
+
"path": "src/types/ICountryJson",
|
|
460
|
+
"id": "src/types/ICountryJson.ts::ICountryJson"
|
|
456
461
|
}
|
|
457
462
|
},
|
|
458
463
|
"return": "Promise<ICountryJson | null>"
|
|
@@ -24,7 +24,6 @@ const dutyTaxMessage_AU_lowValueGST = `${translate('The low-value GST law passed
|
|
|
24
24
|
href: 'https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst',
|
|
25
25
|
text: translate('Learn more.'),
|
|
26
26
|
})}`;
|
|
27
|
-
const inclusivePriceMessage = translate('Product prices already include duties, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions.');
|
|
28
27
|
export class ZonosHelloDialog {
|
|
29
28
|
constructor() {
|
|
30
29
|
this.clickOutsideDialogHandler = (e) => {
|
|
@@ -60,7 +59,8 @@ export class ZonosHelloDialog {
|
|
|
60
59
|
return (_a = localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
|
|
61
60
|
};
|
|
62
61
|
this.hasInclusivePrices = () => {
|
|
63
|
-
|
|
62
|
+
var _a;
|
|
63
|
+
return ((_a = localizationStore.inclusivePricing) === null || _a === void 0 ? void 0 : _a.status) === 'ENABLED';
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* Some countries don't have threshold. So we need to show generic message for them
|
|
@@ -113,7 +113,7 @@ export class ZonosHelloDialog {
|
|
|
113
113
|
];
|
|
114
114
|
};
|
|
115
115
|
this.getAustraliaDutyTaxMessage = (landedCost) => {
|
|
116
|
-
if (
|
|
116
|
+
if (this.hasInclusivePrices()) {
|
|
117
117
|
return [dutyTaxMessage_AU_lowValueGST];
|
|
118
118
|
}
|
|
119
119
|
return [
|
|
@@ -124,7 +124,7 @@ export class ZonosHelloDialog {
|
|
|
124
124
|
];
|
|
125
125
|
};
|
|
126
126
|
this.getNewZealandDutyTaxMessge = (landedCost) => {
|
|
127
|
-
if (
|
|
127
|
+
if (this.hasInclusivePrices()) {
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
130
|
return [
|
|
@@ -134,6 +134,39 @@ export class ZonosHelloDialog {
|
|
|
134
134
|
}),
|
|
135
135
|
];
|
|
136
136
|
};
|
|
137
|
+
this.getInclusivePriceMessage = () => {
|
|
138
|
+
const setting = localizationStore.inclusivePricing;
|
|
139
|
+
if ((setting === null || setting === void 0 ? void 0 : setting.status) !== 'ENABLED') {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
143
|
+
setting.tax.status === 'INCLUDED' &&
|
|
144
|
+
setting.fee.status === 'INCLUDED') {
|
|
145
|
+
return translate('Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.');
|
|
146
|
+
}
|
|
147
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
148
|
+
setting.tax.status === 'INCLUDED') {
|
|
149
|
+
return translate('Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.');
|
|
150
|
+
}
|
|
151
|
+
if (setting.duty.status === 'INCLUDED' &&
|
|
152
|
+
setting.fee.status === 'INCLUDED') {
|
|
153
|
+
return translate('Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.');
|
|
154
|
+
}
|
|
155
|
+
if (setting.tax.status === 'INCLUDED' &&
|
|
156
|
+
setting.fee.status === 'INCLUDED') {
|
|
157
|
+
return translate('Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.');
|
|
158
|
+
}
|
|
159
|
+
if (setting.duty.status === 'INCLUDED') {
|
|
160
|
+
return translate('Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.');
|
|
161
|
+
}
|
|
162
|
+
if (setting.tax.status === 'INCLUDED') {
|
|
163
|
+
return translate('Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.');
|
|
164
|
+
}
|
|
165
|
+
if (setting.fee.status === 'INCLUDED') {
|
|
166
|
+
return translate('Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.');
|
|
167
|
+
}
|
|
168
|
+
return null;
|
|
169
|
+
};
|
|
137
170
|
/**
|
|
138
171
|
* Get additional duty tax message if selected country has tax id
|
|
139
172
|
*/
|
|
@@ -180,6 +213,7 @@ export class ZonosHelloDialog {
|
|
|
180
213
|
var _a;
|
|
181
214
|
const { selectedCountryCode } = localizationStore;
|
|
182
215
|
const hasInclusivePrices = this.hasInclusivePrices();
|
|
216
|
+
const inclusivePriceMessage = this.getInclusivePriceMessage();
|
|
183
217
|
// If deminimis is undefined or null, assume it's $0
|
|
184
218
|
const dutyDeMinimisMessage = this.getDutyMessage();
|
|
185
219
|
// If deminimis is undefined or null, assume it's $0
|
|
@@ -198,18 +232,18 @@ export class ZonosHelloDialog {
|
|
|
198
232
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
199
233
|
const currentPage = this.getCurrentPageEnum();
|
|
200
234
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
201
|
-
return (h(Host, { key: '
|
|
235
|
+
return (h(Host, { key: 'df052224c778ebfceeef7c827fa3da0e8a2f3dc9', class: "zonos--elements" }, h("div", { key: '0ecff6a07d24a72fb4f200cce82ab09e40b48baf', class: classes([
|
|
202
236
|
'zonos--hello-dialog',
|
|
203
237
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
204
238
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
205
239
|
!!this.mobileLocationOverride &&
|
|
206
240
|
'zonos--hello-dialog-mobile-override',
|
|
207
241
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
208
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
242
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'b2939d49930c8a34288a884582eb849a492080ff' }, h("div", { key: 'f1a22291d7865d57d37cbcd3c8f70c4aea57ed39', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'ee3794826efc9fed856f0a320cf6428a428b4ea4', 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: '3d2ff0b68268c97e385eb3cf7fcc34454d2ed3b5', spacing: 24 }, h("zonos-country-flag", { key: 'e09645ac583e59354d11b3c194d4d3f6d4780c55', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '42017a698c1678b90c8c7bbece5d623d0800e37b', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: 'ac30b7683dcc65773159832eadad8542d1d1bda8', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '58cc0e8c51774c339b0fc735e4e98917ed614c8a', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '0b3a3b2bf981ed72654506cc31f07edf6268b0a4', spacing: 8 }, this.restrictedItems.map(item => {
|
|
209
243
|
var _a;
|
|
210
244
|
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)))));
|
|
211
|
-
}), h("zonos-card", { key: '
|
|
212
|
-
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '
|
|
245
|
+
}), h("zonos-card", { key: '196a593b167fc979bf0a2bef7f266ad3778f6ca0', spacing: "12px" }, h("zonos-v-stack", { key: '94925c753ddfdd1a659580f7f78f8d6626cdcdaa', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
246
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '540006185ce1d28d610052801dcf9281773c5504', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '886c371fdfa8c9c15188ef9d6cbb637162fb0d27' }, h("zonos-country-select", { key: '1365bee67831b64637e5c481f239c557f2649694', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '44929f0c23627970b1706f6e8c76e51022201379' }, h("zonos-language-select", { key: '86b9f68c84da77f9e1af51dcb7d512eb6b289a27', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
213
247
|
}
|
|
214
248
|
static get is() { return "zonos-hello-dialog"; }
|
|
215
249
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,8 +19,8 @@ const { dispose: localizationDispose, onChange: localizationStoreOnUpdate, state
|
|
|
19
19
|
countryLandedCost: null,
|
|
20
20
|
customMessages: [],
|
|
21
21
|
exchangeRate: null,
|
|
22
|
-
hasInclusivePrices: false,
|
|
23
22
|
helloCountryList: null,
|
|
23
|
+
inclusivePricing: null,
|
|
24
24
|
isShippableCountry: false,
|
|
25
25
|
localizationLoaded: false,
|
|
26
26
|
selectedCountryCode: null,
|
|
@@ -60,10 +60,10 @@ const getNewLocalization = async () => {
|
|
|
60
60
|
log('get new localization store');
|
|
61
61
|
const { isShippableCountry, selectedCountryCode } = localizationStore;
|
|
62
62
|
localizationStore.countryLandedCost = await getCountryLandedCost(localizationStore.selectedCountryCode);
|
|
63
|
-
localizationStore.
|
|
64
|
-
((_a = (await getInclusivePricing(selectedCountryCode))) === null || _a === void 0 ? void 0 : _a.
|
|
65
|
-
if (localizationStore.
|
|
66
|
-
log(`Inclusive
|
|
63
|
+
localizationStore.inclusivePricing =
|
|
64
|
+
((_a = (await getInclusivePricing(selectedCountryCode))) === null || _a === void 0 ? void 0 : _a.setting) || null;
|
|
65
|
+
if (localizationStore.inclusivePricing) {
|
|
66
|
+
log(`Inclusive price setting found for this country (${selectedCountryCode}) ${JSON.stringify(localizationStore.inclusivePricing, null, 2)}`);
|
|
67
67
|
}
|
|
68
68
|
if (zonosStore.helloSettings.currencyBehavior === 'DISABLED' ||
|
|
69
69
|
!isShippableCountry ||
|
|
@@ -191,8 +191,26 @@ export const stringsArabic = {
|
|
|
191
191
|
'Prepay duties and taxes at checkout': {
|
|
192
192
|
value: 'دفع الرسوم والضرائب مقدمًا عند الدفع',
|
|
193
193
|
},
|
|
194
|
-
'Product prices already include duties
|
|
195
|
-
value: 'أسعار المنتجات تشمل بالفعل الرسوم
|
|
194
|
+
'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
|
|
195
|
+
value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب. لن يتم إضافة أي رسوم أو ضرائب إضافية عند الدفع، باستثناءات نادرة.',
|
|
196
|
+
},
|
|
197
|
+
'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.': {
|
|
198
|
+
value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب. لن يتم إضافة أي رسوم أو ضرائب إضافية عند الدفع، باستثناءات نادرة.',
|
|
199
|
+
},
|
|
200
|
+
'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.': {
|
|
201
|
+
value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب والرسوم. لن تتم إضافة أي رسوم أو ضرائب أو رسوم إضافية عند الدفع، باستثناءات نادرة.',
|
|
202
|
+
},
|
|
203
|
+
'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.': {
|
|
204
|
+
value: 'أسعار المنتجات تشمل الرسوم الجمركية بالفعل. لن تتم إضافة رسوم جمركية إضافية عند الدفع، باستثناءات نادرة.',
|
|
205
|
+
},
|
|
206
|
+
'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.': {
|
|
207
|
+
value: 'أسعار المنتجات تشمل الرسوم بالفعل. لن يتم إضافة أي رسوم إضافية عند الدفع، باستثناءات نادرة.',
|
|
208
|
+
},
|
|
209
|
+
'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
|
|
210
|
+
value: 'أسعار المنتجات تشمل بالفعل الضرائب والرسوم. لن يتم إضافة أي ضرائب أو رسوم إضافية عند الدفع، باستثناءات نادرة.',
|
|
211
|
+
},
|
|
212
|
+
'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
|
|
213
|
+
value: 'أسعار المنتجات تشمل الضرائب بالفعل. لن يتم إضافة ضرائب إضافية عند الدفع، باستثناءات نادرة.',
|
|
196
214
|
},
|
|
197
215
|
Reload: {
|
|
198
216
|
value: 'إعادة تحميل',
|
|
@@ -191,8 +191,26 @@ export const stringsBase = {
|
|
|
191
191
|
'Prepay duties and taxes at checkout': {
|
|
192
192
|
value: 'Prepay duties and taxes at checkout',
|
|
193
193
|
},
|
|
194
|
-
'Product prices already include duties
|
|
195
|
-
value: 'Product prices already include duties
|
|
194
|
+
'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
|
|
195
|
+
value: 'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.',
|
|
196
|
+
},
|
|
197
|
+
'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.': {
|
|
198
|
+
value: 'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.',
|
|
199
|
+
},
|
|
200
|
+
'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.': {
|
|
201
|
+
value: 'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.',
|
|
202
|
+
},
|
|
203
|
+
'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.': {
|
|
204
|
+
value: 'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.',
|
|
205
|
+
},
|
|
206
|
+
'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.': {
|
|
207
|
+
value: 'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.',
|
|
208
|
+
},
|
|
209
|
+
'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
|
|
210
|
+
value: 'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.',
|
|
211
|
+
},
|
|
212
|
+
'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
|
|
213
|
+
value: 'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.',
|
|
196
214
|
},
|
|
197
215
|
Reload: {
|
|
198
216
|
value: 'Reload',
|