@zonos/elements 1.3.230 → 1.3.231

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 (233) hide show
  1. package/dist/cjs/{cart-ad82a680.js → cart-9b519566.js} +6 -2
  2. package/dist/cjs/hasInclusivePrice-12605be9.js +24 -0
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{localization-31e3dfe3.js → localization-38af974b.js} +118 -30
  5. package/dist/cjs/{paypal-88b5e878.js → paypal-e8fa2302.js} +3 -3
  6. package/dist/cjs/{placeTestOrder-6aefbf9c.js → placeTestOrder-6388881f.js} +11 -7
  7. package/dist/cjs/{renderFallback-87c908ad.js → renderFallback-bb2c4bce.js} +2 -2
  8. package/dist/cjs/{translationStore-b8b25e9d.js → translationStore-f2d5eae9.js} +420 -360
  9. package/dist/cjs/zonos-address_11.cjs.entry.js +21 -5
  10. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +73 -13
  11. package/dist/cjs/zonos-checkout.cjs.entry.js +8 -5
  12. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  14. package/dist/cjs/zonos-collect.cjs.entry.js +5 -5
  15. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +1 -1
  16. package/dist/cjs/zonos-controller.cjs.entry.js +12 -5
  17. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-country-select_4.cjs.entry.js +9 -6
  19. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +4 -4
  20. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +55 -45
  21. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  23. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +68 -7
  24. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  25. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -1
  26. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -4
  27. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -43
  28. package/dist/collection/components/main/zonos-controller.js +5 -2
  29. package/dist/collection/components/store/hello/localization.js +47 -16
  30. package/dist/collection/components/store/translationStore/strings.arabic.js +21 -18
  31. package/dist/collection/components/store/translationStore/strings.base.js +21 -18
  32. package/dist/collection/components/store/translationStore/strings.chinese.js +21 -18
  33. package/dist/collection/components/store/translationStore/strings.danish.js +21 -18
  34. package/dist/collection/components/store/translationStore/strings.dutch.js +21 -18
  35. package/dist/collection/components/store/translationStore/strings.french.js +21 -18
  36. package/dist/collection/components/store/translationStore/strings.german.js +21 -18
  37. package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -18
  38. package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -18
  39. package/dist/collection/components/store/translationStore/strings.italian.js +21 -18
  40. package/dist/collection/components/store/translationStore/strings.japanese.js +21 -18
  41. package/dist/collection/components/store/translationStore/strings.korean.js +21 -18
  42. package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -18
  43. package/dist/collection/components/store/translationStore/strings.polish.js +21 -18
  44. package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -18
  45. package/dist/collection/components/store/translationStore/strings.russian.js +21 -18
  46. package/dist/collection/components/store/translationStore/strings.spanish.js +21 -18
  47. package/dist/collection/components/store/translationStore/strings.swedish.js +21 -18
  48. package/dist/collection/components/store/translationStore/strings.turkish.js +21 -18
  49. package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -18
  50. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +18 -2
  51. package/dist/collection/components/utils/api/{getInclusivePricing.js → getInclusivePriceConfigurations.js} +1 -1
  52. package/dist/collection/components/utils/api/getLocalization.js +2 -5
  53. package/dist/collection/components/utils/api/getZonosSettings.js +5 -0
  54. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +6 -0
  55. package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -5
  56. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +4 -1
  57. package/dist/collection/components/utils/getOverridenZCountry.js +11 -0
  58. package/dist/collection/components/utils/hasInclusivePrice.js +10 -0
  59. package/dist/collection/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.js +10 -0
  60. package/dist/collection/components/utils/hello/currencyConversion/applyInclusivePrice.js +39 -0
  61. package/dist/collection/components/utils/hello/currencyConversion/calculateInclusivePrice.js +32 -0
  62. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +11 -6
  63. package/dist/collection/constants/key.js +9 -0
  64. package/dist/collection/types/InclusivePricing.js +1 -0
  65. package/dist/collection/types/generated/graphql.internal.types.js +87 -3
  66. package/dist/collection/types/index.js +1 -0
  67. package/dist/collection/utils/performBlurCurrency.js +38 -5
  68. package/dist/esm/{cart-c74f9aaa.js → cart-bc0e1598.js} +6 -2
  69. package/dist/esm/hasInclusivePrice-706cc09d.js +20 -0
  70. package/dist/esm/index.js +7 -7
  71. package/dist/esm/{localization-106476cb.js → localization-53f67640.js} +117 -31
  72. package/dist/esm/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +3 -3
  73. package/dist/esm/{placeTestOrder-891295e8.js → placeTestOrder-917731cf.js} +11 -7
  74. package/dist/esm/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +2 -2
  75. package/dist/esm/{translationStore-766b7521.js → translationStore-d241dcf7.js} +420 -360
  76. package/dist/esm/zonos-address_11.entry.js +21 -5
  77. package/dist/esm/zonos-cart-items_13.entry.js +73 -13
  78. package/dist/esm/zonos-checkout.entry.js +8 -5
  79. package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
  80. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  81. package/dist/esm/zonos-collect.entry.js +5 -5
  82. package/dist/esm/zonos-confirm-dialog_2.entry.js +1 -1
  83. package/dist/esm/zonos-controller.entry.js +12 -5
  84. package/dist/esm/zonos-country-flag.entry.js +2 -2
  85. package/dist/esm/zonos-country-select_4.entry.js +9 -6
  86. package/dist/esm/zonos-empty-state-payment_4.entry.js +4 -4
  87. package/dist/esm/zonos-hello-dialog.entry.js +55 -45
  88. package/dist/esm/zonos-hello.entry.js +2 -2
  89. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  90. package/dist/esm-es5/cart-bc0e1598.js +1 -0
  91. package/dist/esm-es5/hasInclusivePrice-706cc09d.js +1 -0
  92. package/dist/esm-es5/index.js +1 -1
  93. package/dist/esm-es5/localization-53f67640.js +1 -0
  94. package/dist/esm-es5/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +1 -1
  95. package/dist/esm-es5/placeTestOrder-917731cf.js +1 -0
  96. package/dist/esm-es5/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +1 -1
  97. package/dist/esm-es5/translationStore-d241dcf7.js +1 -0
  98. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  99. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  100. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  101. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  102. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  103. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  104. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
  105. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  106. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  107. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  108. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  109. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  110. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  111. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  112. package/dist/scripts/blurCurrencyOnInit.js +1 -1
  113. package/dist/scripts/index.d.ts +31 -6
  114. package/dist/scripts/index.js +1 -1
  115. package/dist/scripts/loadZonos.js +1 -1
  116. package/dist/scripts/zonos.js +1 -1
  117. package/dist/types/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.d.ts +2 -0
  118. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -1
  119. package/dist/types/components/store/checkout/cart.d.ts +3 -0
  120. package/dist/types/components/store/hello/localization.d.ts +14 -3
  121. package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -15
  122. package/dist/types/components/store/translationStore/strings.base.d.ts +18 -15
  123. package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -15
  124. package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -15
  125. package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -15
  126. package/dist/types/components/store/translationStore/strings.french.d.ts +18 -15
  127. package/dist/types/components/store/translationStore/strings.german.d.ts +18 -15
  128. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -15
  129. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -15
  130. package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -15
  131. package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -15
  132. package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -15
  133. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -15
  134. package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -15
  135. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -15
  136. package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -15
  137. package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -15
  138. package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -15
  139. package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -15
  140. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -15
  141. package/dist/types/components/utils/api/getInclusivePriceConfigurations.d.ts +2 -0
  142. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  143. package/dist/types/components/utils/getOverridenZCountry.d.ts +5 -0
  144. package/dist/types/components/utils/hasInclusivePrice.d.ts +1 -0
  145. package/dist/types/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.d.ts +1 -0
  146. package/dist/types/components/utils/hello/currencyConversion/applyInclusivePrice.d.ts +1 -0
  147. package/dist/types/components/utils/hello/currencyConversion/calculateInclusivePrice.d.ts +27 -0
  148. package/dist/types/constants/key.d.ts +9 -0
  149. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +1 -0
  150. package/dist/types/types/InclusivePricing.d.ts +13 -0
  151. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +1 -0
  152. package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +2 -0
  153. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  154. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  155. package/dist/types/types/generated/graphql.internal.types.d.ts +184 -51
  156. package/dist/types/types/generated/graphql.internal.types.ts +221 -50
  157. package/dist/types/types/index.d.ts +1 -0
  158. package/dist/types/types/utils/ZonosSettings.d.ts +2 -0
  159. package/dist/types/utils/performBlurCurrency.d.ts +12 -0
  160. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  161. package/dist/zonos-elements/index.esm.js +1 -1
  162. package/dist/zonos-elements/{p-c89e9d56.system.js → p-0047fecf.system.js} +1 -1
  163. package/dist/zonos-elements/{p-bd373de0.system.entry.js → p-0bc8e55c.system.entry.js} +1 -1
  164. package/dist/zonos-elements/{p-964a4d85.js → p-2008df67.js} +1 -1
  165. package/dist/zonos-elements/{p-2db90c99.system.entry.js → p-22338b4a.system.entry.js} +1 -1
  166. package/dist/zonos-elements/{p-38f2f63f.system.entry.js → p-2eaa5013.system.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-288f5a5b.system.entry.js → p-304bdbc2.system.entry.js} +1 -1
  168. package/dist/zonos-elements/p-30981f80.entry.js +1 -0
  169. package/dist/zonos-elements/p-3a242dfc.system.js +1 -0
  170. package/dist/zonos-elements/{p-5608ac9d.entry.js → p-3eda5c2c.entry.js} +1 -1
  171. package/dist/zonos-elements/p-3f0ca5f9.js +1 -0
  172. package/dist/zonos-elements/{p-23f6a2fb.system.entry.js → p-3f35b8b1.system.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-de984173.system.js → p-419c292c.system.js} +1 -1
  174. package/dist/zonos-elements/{p-7a97e1cf.system.entry.js → p-4697f061.system.entry.js} +1 -1
  175. package/dist/zonos-elements/p-4f5be8f0.entry.js +1 -0
  176. package/dist/zonos-elements/p-516a9666.system.js +1 -0
  177. package/dist/zonos-elements/p-55c6ff14.system.entry.js +1 -0
  178. package/dist/zonos-elements/p-6d563f33.system.entry.js +1 -0
  179. package/dist/zonos-elements/{p-caebc1f8.system.js → p-7730879e.system.js} +1 -1
  180. package/dist/zonos-elements/p-7920d79c.system.js +1 -0
  181. package/dist/zonos-elements/p-7c96a585.js +1 -0
  182. package/dist/zonos-elements/p-81b357f7.system.js +1 -1
  183. package/dist/zonos-elements/{p-2b84039a.entry.js → p-91fa43ef.entry.js} +1 -1
  184. package/dist/zonos-elements/p-9a444a82.system.entry.js +1 -0
  185. package/dist/zonos-elements/p-9bdad585.system.entry.js +1 -0
  186. package/dist/zonos-elements/p-abc0fb80.js +1 -0
  187. package/dist/zonos-elements/{p-b0a75761.entry.js → p-ac26a931.entry.js} +1 -1
  188. package/dist/zonos-elements/p-bb707dfd.system.js +1 -0
  189. package/dist/zonos-elements/{p-10894d36.entry.js → p-bc963b03.entry.js} +1 -1
  190. package/dist/zonos-elements/p-c0e080e3.js +1 -0
  191. package/dist/zonos-elements/p-c20429ea.entry.js +1 -0
  192. package/dist/zonos-elements/p-c28da00e.entry.js +1 -0
  193. package/dist/zonos-elements/p-c9be03e0.entry.js +1 -0
  194. package/dist/zonos-elements/{p-6c8e4f01.system.entry.js → p-cb70de13.system.entry.js} +1 -1
  195. package/dist/zonos-elements/p-cec35a21.entry.js +1 -0
  196. package/dist/zonos-elements/{p-cf56b990.entry.js → p-d15cd138.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-6f1024de.system.entry.js → p-d852d6da.system.entry.js} +1 -1
  198. package/dist/zonos-elements/p-d9486c57.entry.js +1 -0
  199. package/dist/zonos-elements/p-db73c11a.entry.js +1 -0
  200. package/dist/zonos-elements/{p-203c7fda.js → p-e27a9450.js} +1 -1
  201. package/dist/zonos-elements/{p-258570ce.entry.js → p-ede9e968.entry.js} +1 -1
  202. package/dist/zonos-elements/p-ee8fcde6.js +1 -0
  203. package/dist/zonos-elements/p-f688d7a4.system.js +1 -0
  204. package/dist/zonos-elements/{p-236e0144.system.entry.js → p-ff1722d0.system.entry.js} +1 -1
  205. package/dist/zonos-elements/p-ff522088.system.entry.js +1 -0
  206. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  207. package/package.json +3 -3
  208. package/dist/esm-es5/cart-c74f9aaa.js +0 -1
  209. package/dist/esm-es5/localization-106476cb.js +0 -1
  210. package/dist/esm-es5/placeTestOrder-891295e8.js +0 -1
  211. package/dist/esm-es5/translationStore-766b7521.js +0 -1
  212. package/dist/types/components/utils/api/getInclusivePricing.d.ts +0 -6
  213. package/dist/zonos-elements/p-053a042e.entry.js +0 -1
  214. package/dist/zonos-elements/p-1d15662c.js +0 -1
  215. package/dist/zonos-elements/p-21b251f0.system.entry.js +0 -1
  216. package/dist/zonos-elements/p-225a61c4.system.entry.js +0 -1
  217. package/dist/zonos-elements/p-462f8857.entry.js +0 -1
  218. package/dist/zonos-elements/p-57ee34aa.system.entry.js +0 -1
  219. package/dist/zonos-elements/p-595668d7.system.js +0 -1
  220. package/dist/zonos-elements/p-62803534.entry.js +0 -1
  221. package/dist/zonos-elements/p-6497ce22.entry.js +0 -1
  222. package/dist/zonos-elements/p-65db3219.entry.js +0 -1
  223. package/dist/zonos-elements/p-783e7fa7.entry.js +0 -1
  224. package/dist/zonos-elements/p-9972941a.entry.js +0 -1
  225. package/dist/zonos-elements/p-ad7be556.system.entry.js +0 -1
  226. package/dist/zonos-elements/p-b4fe3604.system.js +0 -1
  227. package/dist/zonos-elements/p-b8293509.js +0 -1
  228. package/dist/zonos-elements/p-c3c3cd98.js +0 -1
  229. package/dist/zonos-elements/p-c6d0e87d.system.entry.js +0 -1
  230. package/dist/zonos-elements/p-cdaf52f4.system.js +0 -1
  231. package/dist/zonos-elements/p-cef1e888.system.js +0 -1
  232. package/dist/zonos-elements/p-eea0d8af.js +0 -1
  233. package/dist/zonos-elements/p-f4085c23.entry.js +0 -1
@@ -4,10 +4,12 @@ import { translate } from "../../store/translationStore";
4
4
  import { zonosStore } from "../../store/zonosStore";
5
5
  import { classes } from "../../utils/classes";
6
6
  import { formatStringWithLinks } from "../../utils/formatStringWithLinks";
7
+ import { hasInclusivePrice } from "../../utils/hasInclusivePrice";
7
8
  import { currencyFormat } from "../../utils/hello/currencyConversion/currencyFormat";
8
9
  import { getHasMoreSpaceAbove } from "../../utils/hello/getHasMoreSpaceAbove";
9
10
  import { getHasMoreSpaceOnRight } from "../../utils/hello/getHasMoreSpaceOnRight";
10
11
  import { wrapStringWithLink } from "../../utils/wrapStringWithLink";
12
+ import { DUTY_KEY, TAXES_KEY } from "../../../constants/key";
11
13
  import { euCountryCodes } from "../../../types/checkout/Tax";
12
14
  // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
13
15
  import BagIcon from "./assets/bagIcon.svg";
@@ -72,10 +74,6 @@ export class ZonosHelloDialog {
72
74
  var _a;
73
75
  return (_a = localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
74
76
  };
75
- this.hasInclusivePrices = () => {
76
- var _a;
77
- return ((_a = localizationStore.inclusivePricing) === null || _a === void 0 ? void 0 : _a.status) === 'ENABLED';
78
- };
79
77
  /**
80
78
  * Some countries don't have threshold. So we need to show generic message for them
81
79
  */
@@ -160,7 +158,7 @@ export class ZonosHelloDialog {
160
158
  ];
161
159
  };
162
160
  this.getAustraliaDutyTaxMessage = (landedCost) => {
163
- if (this.hasInclusivePrices()) {
161
+ if (hasInclusivePrice()) {
164
162
  return [];
165
163
  }
166
164
  return [
@@ -173,7 +171,7 @@ export class ZonosHelloDialog {
173
171
  ];
174
172
  };
175
173
  this.getNewZealandDutyTaxMessge = (landedCost) => {
176
- if (this.hasInclusivePrices()) {
174
+ if (hasInclusivePrice()) {
177
175
  return null;
178
176
  }
179
177
  return [
@@ -186,7 +184,7 @@ export class ZonosHelloDialog {
186
184
  ];
187
185
  };
188
186
  this.getNorwayDutyTaxMessage = (landedCost) => {
189
- if (this.hasInclusivePrices()) {
187
+ if (hasInclusivePrice()) {
190
188
  return null;
191
189
  }
192
190
  return [
@@ -199,7 +197,7 @@ export class ZonosHelloDialog {
199
197
  ];
200
198
  };
201
199
  this.getSingaporeDutyTaxMessage = (landedCost) => {
202
- if (this.hasInclusivePrices()) {
200
+ if (hasInclusivePrice()) {
203
201
  return null;
204
202
  }
205
203
  return [
@@ -212,38 +210,57 @@ export class ZonosHelloDialog {
212
210
  ];
213
211
  };
214
212
  this.getInclusivePriceMessage = () => {
215
- const setting = localizationStore.inclusivePricing;
216
- if ((setting === null || setting === void 0 ? void 0 : setting.status) !== 'ENABLED') {
213
+ const settings = localizationStore.inclusivePricingConfigurations;
214
+ const foundConfiguration = settings === null || settings === void 0 ? void 0 : settings.find(Boolean);
215
+ const taxConfiguration = foundConfiguration === null || foundConfiguration === void 0 ? void 0 : foundConfiguration.configurations[TAXES_KEY];
216
+ const dutyConfiguration = foundConfiguration === null || foundConfiguration === void 0 ? void 0 : foundConfiguration.configurations[DUTY_KEY];
217
+ if ((taxConfiguration === null || taxConfiguration === void 0 ? void 0 : taxConfiguration.status) === 'DISABLED' &&
218
+ (dutyConfiguration === null || dutyConfiguration === void 0 ? void 0 : dutyConfiguration.status) === 'DISABLED') {
217
219
  return null;
218
220
  }
219
- if (setting.duty.status === 'INCLUDED' &&
220
- setting.tax.status === 'INCLUDED' &&
221
- setting.fee.status === 'INCLUDED') {
222
- return translate('Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.');
223
- }
224
- if (setting.duty.status === 'INCLUDED' &&
225
- setting.tax.status === 'INCLUDED') {
226
- return translate('Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.');
227
- }
228
- if (setting.duty.status === 'INCLUDED' &&
229
- setting.fee.status === 'INCLUDED') {
230
- return translate('Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.');
221
+ if ((dutyConfiguration === null || dutyConfiguration === void 0 ? void 0 : dutyConfiguration.status) === 'ENABLED' &&
222
+ (taxConfiguration === null || taxConfiguration === void 0 ? void 0 : taxConfiguration.status) === 'ENABLED') {
223
+ return {
224
+ inclusiveType: 'DUTIES_TAXES_AND_FEES',
225
+ message: translate('Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.'),
226
+ };
231
227
  }
232
- if (setting.tax.status === 'INCLUDED' &&
233
- setting.fee.status === 'INCLUDED') {
234
- return translate('Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.');
228
+ if ((dutyConfiguration === null || dutyConfiguration === void 0 ? void 0 : dutyConfiguration.status) === 'ENABLED') {
229
+ return {
230
+ inclusiveType: 'DUTIES_FEES',
231
+ message: translate('Product prices already include duties and fees. No additional duties or fees will be added at checkout.'),
232
+ };
235
233
  }
236
- if (setting.duty.status === 'INCLUDED') {
237
- return translate('Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.');
238
- }
239
- if (setting.tax.status === 'INCLUDED') {
240
- return translate('Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.');
241
- }
242
- if (setting.fee.status === 'INCLUDED') {
243
- return translate('Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.');
234
+ if ((taxConfiguration === null || taxConfiguration === void 0 ? void 0 : taxConfiguration.status) === 'ENABLED') {
235
+ return {
236
+ inclusiveType: 'TAXES',
237
+ message: translate('Product prices already include taxes. No additional taxes will be added at checkout.'),
238
+ };
244
239
  }
245
240
  return null;
246
241
  };
242
+ this.renderHelloMessage = () => {
243
+ // If deminimis is undefined or null, assume it's $0
244
+ const dutyDeMinimisMessage = this.getDutyMessage();
245
+ // If deminimis is undefined or null, assume it's $0
246
+ const taxDeMinimisMessage = this.getTaxMessage();
247
+ const inclusivePriceMessage = this.getInclusivePriceMessage();
248
+ if (hasInclusivePrice() && inclusivePriceMessage) {
249
+ switch (inclusivePriceMessage.inclusiveType) {
250
+ case 'DUTIES_FEES': {
251
+ return (h(Fragment, null, inclusivePriceMessage.message && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty inclusive pricing icon", content: InclusivePricingIcon }), h("zonos-text", { "aria-label": "Duty inclusive pricing message" }, inclusivePriceMessage.message))), taxDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage)))));
252
+ }
253
+ case 'TAXES': {
254
+ return (h(Fragment, null, inclusivePriceMessage.message && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax inclusive pricing icon", content: InclusivePricingIcon }), h("zonos-text", { "aria-label": "Tax inclusive pricing message" }, inclusivePriceMessage.message))), dutyDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage)))));
255
+ }
256
+ case 'DUTIES_TAXES_AND_FEES':
257
+ default: {
258
+ return (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage.message)));
259
+ }
260
+ }
261
+ }
262
+ return (h(Fragment, null, dutyDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage)))));
263
+ };
247
264
  /**
248
265
  * Get additional duty tax message if selected country has tax id
249
266
  */
@@ -288,12 +305,6 @@ export class ZonosHelloDialog {
288
305
  render() {
289
306
  var _a;
290
307
  const { selectedCountryCode } = localizationStore;
291
- const hasInclusivePrices = this.hasInclusivePrices();
292
- const inclusivePriceMessage = this.getInclusivePriceMessage();
293
- // If deminimis is undefined or null, assume it's $0
294
- const dutyDeMinimisMessage = this.getDutyMessage();
295
- // If deminimis is undefined or null, assume it's $0
296
- const taxDeMinimisMessage = this.getTaxMessage();
297
308
  // Show additional information if selected country has tax id
298
309
  const additionalInformation = this.getAdditionalDutyTaxMessage();
299
310
  const animateLeft = this.animateFromLeftOverride ||
@@ -308,18 +319,18 @@ export class ZonosHelloDialog {
308
319
  const defaultMessage = formatStringWithLinks(defaultMessageStr);
309
320
  const currentPage = this.getCurrentPageEnum();
310
321
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
311
- return (h(Host, { key: '178654e9b701bb68a4d47495897445cf87806c37', class: "zonos--elements" }, h("div", { key: 'eb0f3ced0226513df3911e0664aff10d523fdac7', class: classes([
322
+ return (h(Host, { key: '9b72c4f7b35ebdb1179430d4fc6baec2f9c7d9ca', class: "zonos--elements" }, h("div", { key: '821ea623e2c2764a647c493887bce1b9d6d21756', class: classes([
312
323
  'zonos--hello-dialog',
313
324
  animateLeft && 'zonos--hello-dialog-animate-from-left',
314
325
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
315
326
  !!this.mobileLocationOverride &&
316
327
  'zonos--hello-dialog-mobile-override',
317
328
  this.isOpen && 'zonos--hello-dialog-open',
318
- ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'f185f2d707a3b9628896a7e15f2a0ad20da112ec' }, h("div", { key: '80c53ad6728b221bedbfaec2ec77fee96029e12b', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '31b71832bee5e4515dbf060746f022d9c91502af', 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: '5f11c3b0355ba0c85cf134522b6e21fd28dfe16c', spacing: 24 }, h("zonos-country-flag", { key: '6d6dcad7e3700f67c4261995d867aacb42715404', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '7a325a9b94e58dc5f8dba5baba9a00f835466ee2', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '24e2407475b740b50ca07fe9278363fdefc27d01', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '6b38dee6ec6fcf39e02c5225155e2af69c367a39', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '567d126d05f236fa0aab764d78b1692ebfe82f8b', spacing: 8 }, this.restrictedItems.map(item => {
329
+ ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'e2aa3326f46296c22733a836078e980afd9e736c' }, h("div", { key: '683e1d862da858facf1cf513271a3ce470bd1389', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '90bdcf789ad76957a4c5623c52f25d6c4c4d0e16', 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: 'ebae01dd1e80f6b6c3e9e6f310468feb940532b5', spacing: 24 }, h("zonos-country-flag", { key: '94c73321eae6a57d1bc5db1067564bbc415a8bb1', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'a06e2bc0e4c712a86e4bd2ed8fdef054a6c33776', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '4d487ee5c7ba3092e0630e4ceeaa43c562bfccf5', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: 'cd8e2a7bfacdb82262d7e3d54019b220b27aff9a', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '612dd0f2d812b957fa02c6da598db8b067f6d32d', spacing: 8 }, this.restrictedItems.map(item => {
319
330
  var _a;
320
331
  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)))));
321
- }), h("zonos-card", { key: 'e96943bc58d47531f748217858939ddf2a586441', spacing: "12px" }, h("zonos-v-stack", { key: '3e1850a86542ad66c224e4b81f1c5442e7716f6d', 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, dutyDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage))))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
322
- additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '33e41b69e4a5b00623f3e412609e7162cb560c38', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'fa17c20b3d893ed9f2249bbceca5237fa48bc64e' }, h("zonos-country-select", { key: '15a5924f176c4a805405684c3eda90f47979cf0b', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: 'ab1d061a3c9c68b43c4203fa14af2ffcf7d33e82' }, h("zonos-language-select", { key: '97f4c760e65d7af39160a1ff978d8a7b0864a763', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
332
+ }), h("zonos-card", { key: '12b7726f5afd1fd37bf00558e1059dd6a4ae4301', spacing: "12px" }, h("zonos-v-stack", { key: '1a935c9c54b8410ad6255bcc9d652e71ed5b0d55', spacing: 12 }, this.renderHelloMessage(), additionalInformation === null || additionalInformation === void 0 ? void 0 :
333
+ additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '76d5ac661a9b67dd34b9950b88b6e6fece9267d4', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '154934865bc0791c462f7b05e50b8186ddf1ef69' }, h("zonos-country-select", { key: '74a170a0cce0d78761f53a80a588ca42a883fbd0', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '09be0a1d26f4753f455e4ea35d60acd17967270e' }, h("zonos-language-select", { key: 'b904c114352a255af58461fbbcb352d0a883e85c', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
323
334
  }
324
335
  static get is() { return "zonos-hello-dialog"; }
325
336
  static get encapsulation() { return "shadow"; }
@@ -295,7 +295,10 @@ export class ZonosController {
295
295
  */
296
296
  async overrideCountry(countryCode) {
297
297
  log(`Override country code to ${countryCode}`);
298
- void localizationStoreUpdateSelectedCountryCode(countryCode);
298
+ void localizationStoreUpdateSelectedCountryCode({
299
+ isInitializing: false,
300
+ newSelectedCountryCode: countryCode,
301
+ });
299
302
  }
300
303
  /**
301
304
  * Get appearance from setting
@@ -310,7 +313,7 @@ export class ZonosController {
310
313
  zonosStore.organizationName = organizationName;
311
314
  }
312
315
  render() {
313
- return h(Host, { key: '9554e2f66703eea438104c61265d0e6571d07741', class: "zonos--elements" });
316
+ return h(Host, { key: 'c3c33e5e4422b4b05f68fc876a23eb30c9b0f11d', class: "zonos--elements" });
314
317
  }
315
318
  static get is() { return "zonos-controller"; }
316
319
  static get encapsulation() { return "shadow"; }
@@ -5,7 +5,7 @@ import { zonosStore } from "../zonosStore";
5
5
  import { getCountries } from "../../utils/api/getCountries";
6
6
  import { getCountryLandedCost, } from "../../utils/api/getCountryLandedCost";
7
7
  import { getExchangeRate, } from "../../utils/api/getExchangeRate";
8
- import { getInclusivePricing } from "../../utils/api/getInclusivePricing";
8
+ import { getInclusivePriceConfigurations } from "../../utils/api/getInclusivePriceConfigurations";
9
9
  import { getLocaleMessages } from "../../utils/api/getLocaleMessages";
10
10
  import { getLocalization } from "../../utils/api/getLocalization";
11
11
  import { getShippingZones } from "../../utils/api/getShippingZones";
@@ -15,13 +15,14 @@ import { getCurrencyCode } from "../../utils/hello/currencyConversion/getCurrenc
15
15
  import { setZCountryUrlParam } from "../../utils/hello/setZCountryUrlParam";
16
16
  import { log } from "../../utils/logging/log";
17
17
  import { logError } from "../../utils/logging/logError";
18
- import { performBlurCurrency } from "../../../utils/performBlurCurrency";
18
+ import { performBlurCurrency, removeBlurCurrency, } from "../../../utils/performBlurCurrency";
19
19
  const { dispose: localizationDispose, onChange: localizationStoreOnChange, state: localizationStore, } = createStore({
20
20
  countryLandedCost: null,
21
21
  customMessages: [],
22
22
  exchangeRate: null,
23
23
  helloCountryList: null,
24
- inclusivePricing: null,
24
+ inclusivePricingConfigurations: [],
25
+ inclusivePricingIsFetching: false,
25
26
  isDisabledCountry: true,
26
27
  isShippableCountry: false,
27
28
  localizationLoaded: false,
@@ -55,6 +56,17 @@ export const getFallbackDefaultCountryCode = (allowedCountries) => {
55
56
  // Don't check if it is allowed. If it is not allowed it will fallback to Albania (first option).
56
57
  return DEFAULT_COUNTRY_CODE_LEGACY_CHECKOUT;
57
58
  };
59
+ const refreshInclusivePricingConfigurations = async (countryCode) => {
60
+ if (!countryCode) {
61
+ return;
62
+ }
63
+ // These requests are only needed for Hello, so we can skip them for legacy checkout
64
+ localizationStore.inclusivePricingIsFetching = true;
65
+ const inclusivePricingConfigurations = await getInclusivePriceConfigurations(countryCode);
66
+ localizationStore.inclusivePricingConfigurations =
67
+ inclusivePricingConfigurations || [];
68
+ localizationStore.inclusivePricingIsFetching = false;
69
+ };
58
70
  // This recursive function is for users who step away from their computer and come back needing a new exchange rate
59
71
  const startExchangeRateTimeout = ({ isGuaranteed, maxAge, }) => {
60
72
  if (localizationStore.exchangeRateTimeout) {
@@ -65,12 +77,14 @@ const startExchangeRateTimeout = ({ isGuaranteed, maxAge, }) => {
65
77
  const maxAgeToUse = maxAge || defaultMaxAge;
66
78
  // Recursively set timeouts to get new exchange rates when the current one expires
67
79
  localizationStore.exchangeRateTimeout = setTimeout(async () => {
80
+ // Refresh inclusive pricing configurations before getting a new exchange rate, so hello can use the new effective rate
81
+ await refreshInclusivePricingConfigurations(localizationStore.selectedCountryCode);
68
82
  const { maxAge: newMaxAge } = await triggerGetExchangeRate(isGuaranteed);
69
83
  startExchangeRateTimeout({ isGuaranteed, maxAge: newMaxAge });
70
84
  }, maxAgeToUse * 1000);
71
85
  };
72
- const getNewLocalization = async () => {
73
- var _a;
86
+ const getNewLocalization = async ({ isInitializing, }) => {
87
+ var _a, _b;
74
88
  log('get new localization store');
75
89
  const { isDisabledCountry, isShippableCountry, selectedCountryCode } = localizationStore;
76
90
  if (zonosStore.helloSettings.currencyBehavior === 'DISABLED' ||
@@ -84,14 +98,22 @@ const getNewLocalization = async () => {
84
98
  performBlurCurrency();
85
99
  const { maxAge } = await triggerGetExchangeRate(isGuaranteed);
86
100
  startExchangeRateTimeout({ isGuaranteed, maxAge });
101
+ if (isInitializing &&
102
+ ((_a = window.Zonos.cartSettings) === null || _a === void 0 ? void 0 : _a.inclusivePriceConfigurations)) {
103
+ localizationStore.inclusivePricingConfigurations =
104
+ ((_b = window.Zonos.cartSettings) === null || _b === void 0 ? void 0 : _b.inclusivePriceConfigurations) || [];
105
+ void removeBlurCurrency();
106
+ }
107
+ // These requests are only needed for Hello, so we can skip them for legacy checkout
87
108
  if (!window.Zonos.isLegacyCheckout) {
88
- // These requests are only needed for Hello, so we can skip them for legacy checkout
89
- localizationStore.countryLandedCost = await getCountryLandedCost(localizationStore.selectedCountryCode);
90
- localizationStore.inclusivePricing =
91
- ((_a = (await getInclusivePricing(selectedCountryCode))) === null || _a === void 0 ? void 0 : _a.setting) || null;
92
- if (localizationStore.inclusivePricing) {
93
- log(`Inclusive price setting found for this country (${selectedCountryCode}) ${JSON.stringify(localizationStore.inclusivePricing, null, 2)}`);
94
- }
109
+ localizationStore.inclusivePricingIsFetching = true;
110
+ const [countryLandedCost] = await Promise.all([
111
+ getCountryLandedCost(localizationStore.selectedCountryCode),
112
+ refreshInclusivePricingConfigurations(localizationStore.selectedCountryCode),
113
+ ]);
114
+ localizationStore.countryLandedCost = countryLandedCost;
115
+ // Remove blur effect after the currency is converted
116
+ void removeBlurCurrency();
95
117
  }
96
118
  else {
97
119
  log('Skipping country landed cost and inclusive pricing requests, because this is a legacy checkout');
@@ -136,7 +158,7 @@ const getValidCountryCode = (countryCode) => {
136
158
  }
137
159
  return countryCode;
138
160
  };
139
- const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
161
+ const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelectedCountryCode, }) => {
140
162
  var _a, _b;
141
163
  log(`Updating selected country code to ${newSelectedCountryCode}`);
142
164
  const isFirstTime = !localizationStore.selectedCountryCode;
@@ -172,7 +194,7 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
172
194
  return;
173
195
  }
174
196
  localizationStore.targetCurrency = currencyCode;
175
- void getNewLocalization();
197
+ void getNewLocalization({ isInitializing: isInitializing });
176
198
  // Save the country code to session storage for later use
177
199
  window.sessionStorage.setItem('zonos--country', selectedCountryCode);
178
200
  // Update the URL query param with the new country code
@@ -229,6 +251,7 @@ const localizationStoreUpdateSelectedLocale = (newSelectedLocale) => {
229
251
  void getCustomMessages();
230
252
  };
231
253
  const initLocalizationStore = async () => {
254
+ var _a;
232
255
  // all countries from countries.json, shipping zone and localization
233
256
  const [allCountries, shippingZoneCountries, localization] = await Promise.all([getCountries(), getShippingZones(), getLocalization()]);
234
257
  // Filter countries to only include countries in the shipping zone
@@ -238,13 +261,18 @@ const initLocalizationStore = async () => {
238
261
  ? Object.assign(Object.assign({}, acc), { [countryCode]: countryInfo }) : acc;
239
262
  }, {});
240
263
  localizationStore.shippingZoneCountries = filteredCountries || null;
264
+ localizationStore.inclusivePricingConfigurations =
265
+ ((_a = window.Zonos.cartSettings) === null || _a === void 0 ? void 0 : _a.inclusivePriceConfigurations) || [];
241
266
  // Initialize the country list for the hello widget
242
267
  initHelloCountryList(allCountries || {});
243
268
  const { country, locale } = localization;
244
269
  log(`Country code from localization: ${country}`);
245
270
  log(`Locale from localization: ${locale}`);
246
271
  // update selected country code in store
247
- localizationStoreUpdateSelectedCountryCode(country);
272
+ localizationStoreUpdateSelectedCountryCode({
273
+ isInitializing: true,
274
+ newSelectedCountryCode: country || null,
275
+ });
248
276
  // use locale from params if it exists, otherwise use locale from localization
249
277
  const overrideLocale = getOverrideLocale();
250
278
  localizationStoreUpdateSelectedLocale(overrideLocale || locale || 'en');
@@ -258,7 +286,10 @@ const initLocalizationStore = async () => {
258
286
  if (!localizationStore.selectedCountryCode &&
259
287
  devSites.some(site => window.location.origin.includes(site))) {
260
288
  // update selected country code in store
261
- localizationStoreUpdateSelectedCountryCode('CA');
289
+ localizationStoreUpdateSelectedCountryCode({
290
+ isInitializing: true,
291
+ newSelectedCountryCode: 'CA',
292
+ });
262
293
  }
263
294
  localizationStore.localizationLoaded = true;
264
295
  };
@@ -194,6 +194,12 @@ export const stringsArabic = {
194
194
  Duties: {
195
195
  value: 'واجبات',
196
196
  },
197
+ 'Duties and fees': {
198
+ value: 'الرسوم والضرائب',
199
+ },
200
+ 'Duties and fees included': {
201
+ value: 'الرسوم والضرائب مشمولة',
202
+ },
197
203
  'Duties and taxes will be applied to items and shipping.': {
198
204
  value: 'سيتم تطبيق الرسوم والضرائب على العناصر والشحن.',
199
205
  },
@@ -431,26 +437,14 @@ export const stringsArabic = {
431
437
  'Proceed with order': {
432
438
  value: 'المتابعة مع الطلب',
433
439
  },
434
- 'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
435
- value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب. لن يتم إضافة أي رسوم أو ضرائب إضافية عند الدفع، باستثناءات نادرة.',
436
- },
437
- 'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.': {
438
- value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب. لن يتم إضافة أي رسوم أو ضرائب إضافية عند الدفع، باستثناءات نادرة.',
439
- },
440
- 'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.': {
441
- value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب والرسوم. لن تتم إضافة أي رسوم أو ضرائب أو رسوم إضافية عند الدفع، باستثناءات نادرة.',
442
- },
443
- 'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.': {
444
- value: 'أسعار المنتجات تشمل الرسوم الجمركية بالفعل. لن تتم إضافة رسوم جمركية إضافية عند الدفع، باستثناءات نادرة.',
440
+ 'Product prices already include duties and fees. No additional duties or fees will be added at checkout.': {
441
+ value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب. لن يتم إضافة أي رسوم أو ضرائب إضافية عند الدفع.',
445
442
  },
446
- 'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.': {
447
- value: 'أسعار المنتجات تشمل الرسوم بالفعل. لن يتم إضافة أي رسوم إضافية عند الدفع، باستثناءات نادرة.',
443
+ 'Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.': {
444
+ value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب والرسوم. لن تتم إضافة أي رسوم أو ضرائب أو رسوم إضافية عند الدفع.',
448
445
  },
449
- 'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
450
- value: 'أسعار المنتجات تشمل بالفعل الضرائب والرسوم. لن يتم إضافة أي ضرائب أو رسوم إضافية عند الدفع، باستثناءات نادرة.',
451
- },
452
- 'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
453
- value: 'أسعار المنتجات تشمل الضرائب بالفعل. لن يتم إضافة ضرائب إضافية عند الدفع، باستثناءات نادرة.',
446
+ 'Product prices already include taxes. No additional taxes will be added at checkout.': {
447
+ value: 'أسعار المنتجات تشمل الضرائب بالفعل. لن يتم إضافة ضرائب إضافية عند الدفع.',
454
448
  },
455
449
  Province: {
456
450
  value: 'مقاطعة',
@@ -575,9 +569,15 @@ export const stringsArabic = {
575
569
  'Taxes and fees': {
576
570
  value: 'الضرائب والرسوم',
577
571
  },
572
+ 'Taxes included': {
573
+ value: 'الضرائب مشمولة',
574
+ },
578
575
  'Taxes will apply to all orders.': {
579
576
  value: 'سيتم تطبيق الضرائب على جميع الطلبات.',
580
577
  },
578
+ 'Taxes, duties, and fees included': {
579
+ value: 'الضرائب والرسوم والرسوم مشمولة',
580
+ },
581
581
  'Test cards': {
582
582
  value: 'بطاقات اختبار',
583
583
  },
@@ -599,6 +599,9 @@ export const stringsArabic = {
599
599
  'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
600
600
  value: 'ينطبق قانون ضريبة السلع والخدمات منخفض القيمة الذي أُقر في 1 يوليو 2018 على هذا التاجر.',
601
601
  },
602
+ 'The purchase price covers duties, taxes and fees.': {
603
+ value: 'سعر الشراء يغطي الرسوم والضرائب والرسوم.',
604
+ },
602
605
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
603
606
  value: 'حدث خطأ في إنشاء جلسة الخروج الخاصة بك. يرجى إعادة التحميل والمحاولة مرة أخرى أو الاتصال بالدعم إذا استمر الخطأ',
604
607
  },
@@ -195,6 +195,12 @@ export const stringsBase = {
195
195
  Duties: {
196
196
  value: 'Duties',
197
197
  },
198
+ 'Duties and fees': {
199
+ value: 'Duties and fees',
200
+ },
201
+ 'Duties and fees included': {
202
+ value: 'Duties and fees included',
203
+ },
198
204
  'Duties and taxes will be applied to items and shipping.': {
199
205
  value: 'Duties and taxes will be applied to items and shipping.',
200
206
  },
@@ -432,26 +438,14 @@ export const stringsBase = {
432
438
  'Proceed with order': {
433
439
  value: 'Proceed with order',
434
440
  },
435
- 'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
436
- value: 'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.',
437
- },
438
- 'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.': {
439
- value: 'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.',
440
- },
441
- 'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.': {
442
- value: 'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.',
443
- },
444
- 'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.': {
445
- value: 'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.',
441
+ 'Product prices already include duties and fees. No additional duties or fees will be added at checkout.': {
442
+ value: 'Product prices already include duties and fees. No additional duties or fees will be added at checkout.',
446
443
  },
447
- 'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.': {
448
- value: 'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.',
444
+ 'Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.': {
445
+ value: 'Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.',
449
446
  },
450
- 'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
451
- value: 'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.',
452
- },
453
- 'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
454
- value: 'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.',
447
+ 'Product prices already include taxes. No additional taxes will be added at checkout.': {
448
+ value: 'Product prices already include taxes. No additional taxes will be added at checkout.',
455
449
  },
456
450
  Province: {
457
451
  value: 'Province',
@@ -576,9 +570,15 @@ export const stringsBase = {
576
570
  'Taxes and fees': {
577
571
  value: 'Taxes and fees',
578
572
  },
573
+ 'Taxes included': {
574
+ value: 'Taxes included',
575
+ },
579
576
  'Taxes will apply to all orders.': {
580
577
  value: 'Taxes will apply to all orders.',
581
578
  },
579
+ 'Taxes, duties, and fees included': {
580
+ value: 'Taxes, duties, and fees included',
581
+ },
582
582
  'Test cards': {
583
583
  value: 'Test cards',
584
584
  },
@@ -600,6 +600,9 @@ export const stringsBase = {
600
600
  'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
601
601
  value: 'The low-value GST law passed July 1st, 2018 applies to this retailer.',
602
602
  },
603
+ 'The purchase price covers duties, taxes and fees.': {
604
+ value: 'The purchase price covers duties, taxes and fees.',
605
+ },
603
606
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
604
607
  value: "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists",
605
608
  },
@@ -194,6 +194,12 @@ export const stringsChinese = {
194
194
  Duties: {
195
195
  value: '职责',
196
196
  },
197
+ 'Duties and fees': {
198
+ value: '关税和费用',
199
+ },
200
+ 'Duties and fees included': {
201
+ value: '包含关税和费用',
202
+ },
197
203
  'Duties and taxes will be applied to items and shipping.': {
198
204
  value: '商品和运费将征收关税和税款。',
199
205
  },
@@ -431,26 +437,14 @@ export const stringsChinese = {
431
437
  'Proceed with order': {
432
438
  value: '继续订单',
433
439
  },
434
- 'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
435
- value: '产品价格已包含关税和费用。结账时不会增加额外的关税或费用,极少数情况除外。',
436
- },
437
- 'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.': {
438
- value: '产品价格已包含关税和税费。结账时不会增加额外的关税或税费,极少数情况除外。',
439
- },
440
- 'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.': {
441
- value: '产品价格已包含关税、税费和费用。结账时不会增加额外的关税、税费或费用,极少数情况除外。',
442
- },
443
- 'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.': {
444
- value: '产品价格已包含关税。结账时不会增加额外的关税,极少数情况除外。',
440
+ 'Product prices already include duties and fees. No additional duties or fees will be added at checkout.': {
441
+ value: '产品价格已包含关税和费用。结账时不会增加额外的关税或费用。',
445
442
  },
446
- 'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.': {
447
- value: '产品价格已包含费用。结账时不会增加额外费用,极少数情况除外。',
443
+ 'Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.': {
444
+ value: '产品价格已包含关税、税费和费用。结账时不会增加额外的关税、税费或费用。',
448
445
  },
449
- 'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
450
- value: '产品价格已包含税费。结账时不会增加额外的税费,极少数情况除外。',
451
- },
452
- 'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
453
- value: '产品价格已包含税费。结账时不会增加额外的税费,极少数情况除外。',
446
+ 'Product prices already include taxes. No additional taxes will be added at checkout.': {
447
+ value: '产品价格已包含税费。结账时不会增加额外的税费。',
454
448
  },
455
449
  Province: {
456
450
  value: '省',
@@ -575,9 +569,15 @@ export const stringsChinese = {
575
569
  'Taxes and fees': {
576
570
  value: '税费',
577
571
  },
572
+ 'Taxes included': {
573
+ value: '含税',
574
+ },
578
575
  'Taxes will apply to all orders.': {
579
576
  value: '所有订单将适用税款。',
580
577
  },
578
+ 'Taxes, duties, and fees included': {
579
+ value: '包括税费、关税和费用',
580
+ },
581
581
  'Test cards': {
582
582
  value: '测试卡',
583
583
  },
@@ -599,6 +599,9 @@ export const stringsChinese = {
599
599
  'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
600
600
  value: '2018年7月1日通过的低值GST法适用于本零售商。',
601
601
  },
602
+ 'The purchase price covers duties, taxes and fees.': {
603
+ value: '购买价格包括关税、税费和费用。',
604
+ },
602
605
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
603
606
  value: '创建您的结账会话时出现错误。如果错误仍然存在,请重新加载页面并重试,或联系支持',
604
607
  },