@zonos/elements 1.3.42 → 1.3.44

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.
Files changed (136) hide show
  1. package/dist/cjs/{cart-99a1ed87.js → cart-89b4f62d.js} +412 -59
  2. package/dist/cjs/index.cjs.js +6 -6
  3. package/dist/cjs/{paypal-5509a76f.js → paypal-1a1882c4.js} +1 -1
  4. package/dist/cjs/{sendErrorLog-21996939.js → sendErrorLog-a966a8c1.js} +1 -1
  5. package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
  6. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +3 -3
  7. package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
  8. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +43 -9
  12. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-notification_3.cjs.entry.js +2 -2
  15. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +42 -8
  16. package/dist/collection/components/store/hello/localization.js +12 -19
  17. package/dist/collection/components/store/translationStore/strings.arabic.js +20 -2
  18. package/dist/collection/components/store/translationStore/strings.base.js +20 -2
  19. package/dist/collection/components/store/translationStore/strings.chinese.js +20 -2
  20. package/dist/collection/components/store/translationStore/strings.danish.js +20 -2
  21. package/dist/collection/components/store/translationStore/strings.dutch.js +20 -2
  22. package/dist/collection/components/store/translationStore/strings.french.js +20 -2
  23. package/dist/collection/components/store/translationStore/strings.german.js +20 -2
  24. package/dist/collection/components/store/translationStore/strings.hebrew.js +20 -2
  25. package/dist/collection/components/store/translationStore/strings.indonesian.js +20 -2
  26. package/dist/collection/components/store/translationStore/strings.italian.js +20 -2
  27. package/dist/collection/components/store/translationStore/strings.japanese.js +20 -2
  28. package/dist/collection/components/store/translationStore/strings.korean.js +20 -2
  29. package/dist/collection/components/store/translationStore/strings.norwegian.js +20 -2
  30. package/dist/collection/components/store/translationStore/strings.polish.js +20 -2
  31. package/dist/collection/components/store/translationStore/strings.portuguese.js +20 -2
  32. package/dist/collection/components/store/translationStore/strings.russian.js +20 -2
  33. package/dist/collection/components/store/translationStore/strings.spanish.js +20 -2
  34. package/dist/collection/components/store/translationStore/strings.swedish.js +20 -2
  35. package/dist/collection/components/store/translationStore/strings.turkish.js +20 -2
  36. package/dist/collection/components/store/translationStore/strings.vietnamese.js +20 -2
  37. package/dist/collection/types/generated/graphql.customer.types.js +19 -10
  38. package/dist/esm/{cart-bc217300.js → cart-9f40efd7.js} +412 -59
  39. package/dist/esm/index.js +6 -6
  40. package/dist/esm/{paypal-fa96e7c3.js → paypal-f4bb6ce7.js} +1 -1
  41. package/dist/esm/{sendErrorLog-c40b553a.js → sendErrorLog-aea606c0.js} +1 -1
  42. package/dist/esm/zonos-address_8.entry.js +1 -1
  43. package/dist/esm/zonos-cart-items_12.entry.js +3 -3
  44. package/dist/esm/zonos-checkout.entry.js +3 -3
  45. package/dist/esm/zonos-controller.entry.js +1 -1
  46. package/dist/esm/zonos-country-flag.entry.js +1 -1
  47. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  48. package/dist/esm/zonos-hello-dialog.entry.js +43 -9
  49. package/dist/esm/zonos-hello.entry.js +1 -1
  50. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  51. package/dist/esm/zonos-notification_3.entry.js +2 -2
  52. package/dist/esm-es5/cart-9f40efd7.js +1 -0
  53. package/dist/esm-es5/index.js +1 -1
  54. package/dist/esm-es5/{paypal-fa96e7c3.js → paypal-f4bb6ce7.js} +1 -1
  55. package/dist/esm-es5/{sendErrorLog-c40b553a.js → sendErrorLog-aea606c0.js} +1 -1
  56. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  57. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  58. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  59. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  60. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  61. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  62. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  63. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  64. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  65. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  66. package/dist/scripts/index.d.ts +1 -18
  67. package/dist/scripts/index.js +1 -1
  68. package/dist/scripts/loadZonos.js +1 -1
  69. package/dist/scripts/zonos.js +1 -1
  70. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -0
  71. package/dist/types/components/store/hello/localization.d.ts +2 -2
  72. package/dist/types/components/store/translationStore/strings.arabic.d.ts +19 -1
  73. package/dist/types/components/store/translationStore/strings.base.d.ts +19 -1
  74. package/dist/types/components/store/translationStore/strings.chinese.d.ts +19 -1
  75. package/dist/types/components/store/translationStore/strings.danish.d.ts +19 -1
  76. package/dist/types/components/store/translationStore/strings.dutch.d.ts +19 -1
  77. package/dist/types/components/store/translationStore/strings.french.d.ts +19 -1
  78. package/dist/types/components/store/translationStore/strings.german.d.ts +19 -1
  79. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +19 -1
  80. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +19 -1
  81. package/dist/types/components/store/translationStore/strings.italian.d.ts +19 -1
  82. package/dist/types/components/store/translationStore/strings.japanese.d.ts +19 -1
  83. package/dist/types/components/store/translationStore/strings.korean.d.ts +19 -1
  84. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +19 -1
  85. package/dist/types/components/store/translationStore/strings.polish.d.ts +19 -1
  86. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +19 -1
  87. package/dist/types/components/store/translationStore/strings.russian.d.ts +19 -1
  88. package/dist/types/components/store/translationStore/strings.spanish.d.ts +19 -1
  89. package/dist/types/components/store/translationStore/strings.swedish.d.ts +19 -1
  90. package/dist/types/components/store/translationStore/strings.turkish.d.ts +19 -1
  91. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +19 -1
  92. package/dist/types/components/store/translationStore.d.ts +1 -1
  93. package/dist/types/components/utils/api/getInclusivePricing.d.ts +2 -4
  94. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  95. package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
  96. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
  97. package/dist/types/types/ICountryJson.d.ts +1 -19
  98. package/dist/types/types/generated/graphql.customer.types.d.ts +45 -13
  99. package/dist/types/types/generated/graphql.customer.types.ts +47 -18
  100. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  101. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  102. package/dist/zonos-elements/index.esm.js +1 -1
  103. package/dist/zonos-elements/{p-a0581551.system.js → p-0641784b.system.js} +1 -1
  104. package/dist/zonos-elements/{p-a9ae78e3.entry.js → p-09988f34.entry.js} +1 -1
  105. package/dist/zonos-elements/{p-7d67bbb8.system.entry.js → p-0bfe455c.system.entry.js} +1 -1
  106. package/dist/zonos-elements/{p-2cc469c3.entry.js → p-21d07dda.entry.js} +1 -1
  107. package/dist/zonos-elements/{p-a8a94872.system.js → p-29f4cce5.system.js} +1 -1
  108. package/dist/zonos-elements/{p-23748211.system.entry.js → p-2d01b8e6.system.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-211e3529.system.entry.js → p-2e12d178.system.entry.js} +1 -1
  110. package/dist/zonos-elements/{p-1041cbd0.js → p-3490d40f.js} +1 -1
  111. package/dist/zonos-elements/{p-d27489bb.system.entry.js → p-37c9fdd2.system.entry.js} +1 -1
  112. package/dist/zonos-elements/{p-35679ed2.system.entry.js → p-4204ccf9.system.entry.js} +1 -1
  113. package/dist/zonos-elements/p-43d3cafd.system.js +1 -0
  114. package/dist/zonos-elements/{p-558486eb.entry.js → p-567b457b.entry.js} +1 -1
  115. package/dist/zonos-elements/{p-16dd23e1.entry.js → p-578f42c1.entry.js} +1 -1
  116. package/dist/zonos-elements/{p-7338ea95.system.entry.js → p-5845029a.system.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-668fb530.system.js → p-6f759c76.system.js} +1 -1
  118. package/dist/zonos-elements/{p-fc2676e3.entry.js → p-744180f1.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-23fd4673.entry.js → p-76291114.entry.js} +1 -1
  120. package/dist/zonos-elements/p-7b8099ed.js +1 -0
  121. package/dist/zonos-elements/p-8618e185.entry.js +1 -0
  122. package/dist/zonos-elements/{p-c0aec0ca.system.entry.js → p-8630168f.system.entry.js} +1 -1
  123. package/dist/zonos-elements/{p-5230520c.entry.js → p-8bf1af28.entry.js} +1 -1
  124. package/dist/zonos-elements/{p-29ed14b8.entry.js → p-9aef3a35.entry.js} +1 -1
  125. package/dist/zonos-elements/{p-3b1ea7c8.system.entry.js → p-acf9a97e.system.entry.js} +1 -1
  126. package/dist/zonos-elements/{p-73c56565.system.entry.js → p-aee29731.system.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-f59666e6.system.entry.js → p-c10099bd.system.entry.js} +1 -1
  128. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  129. package/dist/zonos-elements/{p-7a902328.entry.js → p-c7952400.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-f97ffbfb.js → p-d99e58f2.js} +1 -1
  131. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  132. package/package.json +9 -2
  133. package/dist/esm-es5/cart-bc217300.js +0 -1
  134. package/dist/zonos-elements/p-68bb8de4.entry.js +0 -1
  135. package/dist/zonos-elements/p-90f517f5.js +0 -1
  136. package/dist/zonos-elements/p-98a0fda1.system.js +0 -1
@@ -94,7 +94,7 @@ const getZonosQaUrl = () => {
94
94
  return null;
95
95
  }
96
96
  const qaUrl = extractZonosQaUrl(window.location.href);
97
- const cdnUrl = "https://v1.3.42.js.zonos.com";
97
+ const cdnUrl = "https://v1.3.44.js.zonos.com";
98
98
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
99
99
  if (!qaUrl && cdnUrl.includes('test.')) {
100
100
  return cdnUrl;
@@ -264,10 +264,10 @@ const zonosLoadUrl = (() => {
264
264
  }
265
265
  return null;
266
266
  })();
267
- const ZONOS_URL = "https://v1.3.42.js.zonos.com";
268
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.42";
269
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.42";
270
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.42";
267
+ const ZONOS_URL = "https://v1.3.44.js.zonos.com";
268
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.44";
269
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.44";
270
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.44";
271
271
  const MAIN_LOAD_CDN_TYPE = 'jsdelivr';
272
272
  const INTER_FONT_URL = 'https://rsms.me';
273
273
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
@@ -288,7 +288,7 @@ Zonos.isBigCommerce = false;
288
288
  */
289
289
  Zonos.isNpm = true;
290
290
  Zonos.zonosQaUrl = null;
291
- Zonos.version = `v${"1.3.42"}`;
291
+ Zonos.version = `v${"1.3.44"}`;
292
292
  Zonos.modeAlerted = false;
293
293
  Zonos.tempCartData = null;
294
294
  Zonos.paypal = null;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-56401fdb.js');
4
- const cart = require('./cart-99a1ed87.js');
4
+ const cart = require('./cart-89b4f62d.js');
5
5
  const isDarkColor = require('./isDarkColor-4eb96a1e.js');
6
6
  const logError = require('./logError-4e2f2020.js');
7
7
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-99a1ed87.js');
3
+ const cart = require('./cart-89b4f62d.js');
4
4
  const zonosStore = require('./zonosStore-56401fdb.js');
5
5
 
6
6
  const trackConversionEvent = async (eventName, metadata) => {
@@ -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-99a1ed87.js');
6
+ const cart = require('./cart-89b4f62d.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-99a1ed87.js');
6
+ const cart = require('./cart-89b4f62d.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const paypal = require('./paypal-5509a76f.js');
8
+ const paypal = require('./paypal-1a1882c4.js');
9
9
  const zonosStore = require('./zonosStore-56401fdb.js');
10
- const sendErrorLog = require('./sendErrorLog-21996939.js');
10
+ const sendErrorLog = require('./sendErrorLog-a966a8c1.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-99a1ed87.js');
7
- const paypal = require('./paypal-5509a76f.js');
6
+ const cart = require('./cart-89b4f62d.js');
7
+ const paypal = require('./paypal-1a1882c4.js');
8
8
  const zonosStore = require('./zonosStore-56401fdb.js');
9
- const sendErrorLog = require('./sendErrorLog-21996939.js');
9
+ const sendErrorLog = require('./sendErrorLog-a966a8c1.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-99a1ed87.js');
6
+ const cart = require('./cart-89b4f62d.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-99a1ed87.js');
6
+ const cart = require('./cart-89b4f62d.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-99a1ed87.js');
6
+ const cart = require('./cart-89b4f62d.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');
@@ -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-99a1ed87.js');
6
+ const cart = require('./cart-89b4f62d.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
- return cart.localizationStore.hasInclusivePrices;
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 (cart.localizationStore.hasInclusivePrices) {
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 (cart.localizationStore.hasInclusivePrices) {
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: '7dec47839d142b9d3580dffda8b8eea28af9974f', class: "zonos--elements" }, index.h("div", { key: 'ea71e8885de2be45be5a2dcc9dbe44ef99261102', class: classes.classes([
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: '2e66e1610e534de2fd4f4f5bce29e899f6c65877' }, index.h("div", { key: '598ffd431b5fcab10f7a7cb3c453fd959abdd881', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: '68998e9634998a6b6d244540776c2bc18fb54c27', 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: '660c8ae672b70185a046280d9e27b3fce8ad3e00', spacing: 24 }, index.h("zonos-country-flag", { key: '46f9733add5cf8038944e2c7c48a14f6f39f831a', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: 'e0571eae7cfd1a6555b16dd3ac450a8545095231', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: 'fffa08e2519973aafc2813246b7df2f9e4895a0d', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: 'ef78eead5a3fd2ce7ad881deb6472ca70e18032d', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: 'cd2632bb7a2655a240715601c32df6c807c283a1', spacing: 8 }, this.restrictedItems.map(item => {
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: 'ad5f69b84e2fd80864a6772216aa28b6558f12c4', spacing: "12px" }, index.h("zonos-v-stack", { key: '86b8c89c17b9b1348bf56c9a6fa2be3de11cb841', 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 :
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: '2dc162a5dc40d781009379ef8276ebcd38a26494', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: 'a86eaaa8536432db2d4e63c3d3b4122349edeba6' }, index.h("zonos-country-select", { key: '2d0ec209c2500763b1656f07f8685818ee329e1e', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: 'd1c7f801e301635028dd2f6a478a93d72fc968f7' }, index.h("zonos-language-select", { key: '95e40b3c1e44d437d466fbc704c7e95ebdf8ec3c', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
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-99a1ed87.js');
7
+ const cart = require('./cart-89b4f62d.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-99a1ed87.js');
6
+ const cart = require('./cart-89b4f62d.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-99a1ed87.js');
8
+ const cart = require('./cart-89b4f62d.js');
9
9
  const logError = require('./logError-4e2f2020.js');
10
- const paypal = require('./paypal-5509a76f.js');
10
+ const paypal = require('./paypal-1a1882c4.js');
11
11
  require('./isDarkColor-4eb96a1e.js');
12
12
  require('./getBorderRadius-4413e191.js');
13
13
 
@@ -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
- return localizationStore.hasInclusivePrices;
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 (localizationStore.hasInclusivePrices) {
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 (localizationStore.hasInclusivePrices) {
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: '7dec47839d142b9d3580dffda8b8eea28af9974f', class: "zonos--elements" }, h("div", { key: 'ea71e8885de2be45be5a2dcc9dbe44ef99261102', class: classes([
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: '2e66e1610e534de2fd4f4f5bce29e899f6c65877' }, h("div", { key: '598ffd431b5fcab10f7a7cb3c453fd959abdd881', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '68998e9634998a6b6d244540776c2bc18fb54c27', 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: '660c8ae672b70185a046280d9e27b3fce8ad3e00', spacing: 24 }, h("zonos-country-flag", { key: '46f9733add5cf8038944e2c7c48a14f6f39f831a', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'e0571eae7cfd1a6555b16dd3ac450a8545095231', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: 'fffa08e2519973aafc2813246b7df2f9e4895a0d', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: 'ef78eead5a3fd2ce7ad881deb6472ca70e18032d', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: 'cd2632bb7a2655a240715601c32df6c807c283a1', spacing: 8 }, this.restrictedItems.map(item => {
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: 'ad5f69b84e2fd80864a6772216aa28b6558f12c4', spacing: "12px" }, h("zonos-v-stack", { key: '86b8c89c17b9b1348bf56c9a6fa2be3de11cb841', 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 :
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: '2dc162a5dc40d781009379ef8276ebcd38a26494', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'a86eaaa8536432db2d4e63c3d3b4122349edeba6' }, h("zonos-country-select", { key: '2d0ec209c2500763b1656f07f8685818ee329e1e', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: 'd1c7f801e301635028dd2f6a478a93d72fc968f7' }, h("zonos-language-select", { key: '95e40b3c1e44d437d466fbc704c7e95ebdf8ec3c', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
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.hasInclusivePrices =
64
- ((_a = (await getInclusivePricing(selectedCountryCode))) === null || _a === void 0 ? void 0 : _a.hasEnabledInclusivePrices) || false;
65
- if (localizationStore.hasInclusivePrices) {
66
- log(`Inclusive prices are enabled for the country ${selectedCountryCode}`);
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 ||
@@ -145,28 +145,21 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
145
145
  }
146
146
  };
147
147
  const initHelloCountryList = (allCountries) => {
148
- const showCountrylist = zonosStore.helloSettings.showCountryList;
148
+ const showCountryList = zonosStore.helloSettings.showCountryList;
149
149
  const hellCountryList = localizationStore.shippingZoneCountries;
150
- if (!showCountrylist || showCountrylist === 'ONLY_SHIPPABLE') {
150
+ if (!showCountryList || showCountryList === 'ONLY_SHIPPABLE') {
151
151
  // just use the shipping zone countries
152
152
  localizationStore.helloCountryList = hellCountryList;
153
153
  return;
154
154
  }
155
- if (showCountrylist === 'ALL') {
156
- // Get all active countries
157
- localizationStore.helloCountryList = Object.entries(allCountries || {}).reduce((current, [countryCode, countryInfo]) => {
158
- const isActive = countryInfo.active;
159
- if (!isActive) {
160
- return current;
161
- }
162
- return Object.assign(Object.assign({}, current), { [countryCode]: countryInfo });
163
- }, {});
155
+ if (showCountryList === 'ALL') {
156
+ localizationStore.helloCountryList = allCountries;
164
157
  return;
165
158
  }
166
159
  // get all active countries in the showCountryList
167
- localizationStore.helloCountryList = showCountrylist.reduce((acc, countryCode) => {
160
+ localizationStore.helloCountryList = showCountryList.reduce((acc, countryCode) => {
168
161
  const countryInfo = allCountries === null || allCountries === void 0 ? void 0 : allCountries[countryCode];
169
- return countryInfo && countryInfo.active
162
+ return countryInfo
170
163
  ? Object.assign(Object.assign({}, acc), { [countryCode]: countryInfo }) : acc;
171
164
  }, {});
172
165
  };
@@ -176,7 +169,7 @@ const initLocalizationStore = async () => {
176
169
  // Filter countries to only include countries in the shipping zone
177
170
  const filteredCountries = shippingZoneCountries === null || shippingZoneCountries === void 0 ? void 0 : shippingZoneCountries.reduce((acc, countryCode) => {
178
171
  const countryInfo = allCountries === null || allCountries === void 0 ? void 0 : allCountries[countryCode];
179
- return countryInfo && countryInfo.active
172
+ return countryInfo
180
173
  ? Object.assign(Object.assign({}, acc), { [countryCode]: countryInfo }) : acc;
181
174
  }, {});
182
175
  localizationStore.shippingZoneCountries = filteredCountries || null;
@@ -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, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions.': {
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, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions.': {
195
- value: 'Product prices already include duties, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions.',
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',
@@ -191,8 +191,26 @@ export const stringsChinese = {
191
191
  'Prepay duties and taxes at checkout': {
192
192
  value: '在结账时预付关税和税款',
193
193
  },
194
- 'Product prices already include duties, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions.': {
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 stringsDanish = {
191
191
  'Prepay duties and taxes at checkout': {
192
192
  value: 'Betal told og skatter på forhånd ved kassen',
193
193
  },
194
- 'Product prices already include duties, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions.': {
195
- value: 'Produktpriser inkluderer allerede told, skatter og gebyrer. Ingen yderligere told eller skatter vil blive tilføjet ved kassen, med sjældne undtagelser.',
194
+ 'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
195
+ value: 'Produktpriser inkluderer allerede told og gebyrer. Ingen yderligere told eller gebyrer vil blive tilføjet ved kassen, med sjældne undtagelser.',
196
+ },
197
+ 'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.': {
198
+ value: 'Produktpriser inkluderer allerede told og skatter. Ingen yderligere told eller skatter vil blive tilføjet ved kassen, med sjældne undtagelser.',
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: 'Produktpriser inkluderer allerede told, skatter og gebyrer. Ingen yderligere told, skatter eller gebyrer vil blive tilføjet ved kassen, med sjældne undtagelser.',
202
+ },
203
+ 'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.': {
204
+ value: 'Produktpriser inkluderer allerede told. Ingen yderligere told vil blive tilføjet ved kassen, med sjældne undtagelser.',
205
+ },
206
+ 'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.': {
207
+ value: 'Produktpriser inkluderer allerede gebyrer. Ingen yderligere gebyrer vil blive tilføjet ved kassen, med sjældne undtagelser.',
208
+ },
209
+ 'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
210
+ value: 'Produktpriser inkluderer allerede skatter og gebyrer. Ingen yderligere skatter eller gebyrer vil blive tilføjet ved kassen, med sjældne undtagelser.',
211
+ },
212
+ 'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
213
+ value: 'Produktpriser inkluderer allerede skatter. Ingen yderligere skatter vil blive tilføjet ved kassen, med sjældne undtagelser.',
196
214
  },
197
215
  Reload: {
198
216
  value: 'Genindlæs',