@zonos/elements 1.3.229 → 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 (237) hide show
  1. package/dist/cjs/{buildCartItemsByTempCart-309fcebf.js → buildCartItemsByTempCart-edddbf4b.js} +1 -0
  2. package/dist/cjs/{cart-ad82a680.js → cart-9b519566.js} +6 -2
  3. package/dist/cjs/hasInclusivePrice-12605be9.js +24 -0
  4. package/dist/cjs/index.cjs.js +7 -7
  5. package/dist/cjs/{localization-31e3dfe3.js → localization-38af974b.js} +118 -30
  6. package/dist/cjs/{paypal-88b5e878.js → paypal-e8fa2302.js} +3 -3
  7. package/dist/cjs/{placeTestOrder-6aefbf9c.js → placeTestOrder-6388881f.js} +11 -7
  8. package/dist/cjs/{renderFallback-87c908ad.js → renderFallback-bb2c4bce.js} +2 -2
  9. package/dist/cjs/{translationStore-b8b25e9d.js → translationStore-f2d5eae9.js} +420 -360
  10. package/dist/cjs/zonos-address_11.cjs.entry.js +21 -5
  11. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +73 -13
  12. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -6
  13. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
  14. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  15. package/dist/cjs/zonos-collect.cjs.entry.js +6 -6
  16. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +1 -1
  17. package/dist/cjs/zonos-controller.cjs.entry.js +12 -5
  18. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-country-select_4.cjs.entry.js +9 -6
  20. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +4 -4
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +55 -45
  22. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  23. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  24. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +68 -7
  25. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  26. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -1
  27. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -4
  28. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -43
  29. package/dist/collection/components/main/zonos-controller.js +5 -2
  30. package/dist/collection/components/store/hello/localization.js +47 -16
  31. package/dist/collection/components/store/translationStore/strings.arabic.js +21 -18
  32. package/dist/collection/components/store/translationStore/strings.base.js +21 -18
  33. package/dist/collection/components/store/translationStore/strings.chinese.js +21 -18
  34. package/dist/collection/components/store/translationStore/strings.danish.js +21 -18
  35. package/dist/collection/components/store/translationStore/strings.dutch.js +21 -18
  36. package/dist/collection/components/store/translationStore/strings.french.js +21 -18
  37. package/dist/collection/components/store/translationStore/strings.german.js +21 -18
  38. package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -18
  39. package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -18
  40. package/dist/collection/components/store/translationStore/strings.italian.js +21 -18
  41. package/dist/collection/components/store/translationStore/strings.japanese.js +21 -18
  42. package/dist/collection/components/store/translationStore/strings.korean.js +21 -18
  43. package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -18
  44. package/dist/collection/components/store/translationStore/strings.polish.js +21 -18
  45. package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -18
  46. package/dist/collection/components/store/translationStore/strings.russian.js +21 -18
  47. package/dist/collection/components/store/translationStore/strings.spanish.js +21 -18
  48. package/dist/collection/components/store/translationStore/strings.swedish.js +21 -18
  49. package/dist/collection/components/store/translationStore/strings.turkish.js +21 -18
  50. package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -18
  51. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +18 -2
  52. package/dist/collection/components/utils/api/buildCartItemsByTempCart.js +1 -0
  53. package/dist/collection/components/utils/api/{getInclusivePricing.js → getInclusivePriceConfigurations.js} +1 -1
  54. package/dist/collection/components/utils/api/getLocalization.js +2 -5
  55. package/dist/collection/components/utils/api/getZonosSettings.js +5 -0
  56. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +6 -0
  57. package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -5
  58. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +4 -1
  59. package/dist/collection/components/utils/getOverridenZCountry.js +11 -0
  60. package/dist/collection/components/utils/hasInclusivePrice.js +10 -0
  61. package/dist/collection/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.js +10 -0
  62. package/dist/collection/components/utils/hello/currencyConversion/applyInclusivePrice.js +39 -0
  63. package/dist/collection/components/utils/hello/currencyConversion/calculateInclusivePrice.js +32 -0
  64. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +11 -6
  65. package/dist/collection/constants/key.js +9 -0
  66. package/dist/collection/types/InclusivePricing.js +1 -0
  67. package/dist/collection/types/generated/graphql.internal.types.js +87 -3
  68. package/dist/collection/types/index.js +1 -0
  69. package/dist/collection/utils/performBlurCurrency.js +38 -5
  70. package/dist/esm/{buildCartItemsByTempCart-c4488f73.js → buildCartItemsByTempCart-a117f75d.js} +1 -0
  71. package/dist/esm/{cart-c74f9aaa.js → cart-bc0e1598.js} +6 -2
  72. package/dist/esm/hasInclusivePrice-706cc09d.js +20 -0
  73. package/dist/esm/index.js +7 -7
  74. package/dist/esm/{localization-106476cb.js → localization-53f67640.js} +117 -31
  75. package/dist/esm/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +3 -3
  76. package/dist/esm/{placeTestOrder-891295e8.js → placeTestOrder-917731cf.js} +11 -7
  77. package/dist/esm/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +2 -2
  78. package/dist/esm/{translationStore-766b7521.js → translationStore-d241dcf7.js} +420 -360
  79. package/dist/esm/zonos-address_11.entry.js +21 -5
  80. package/dist/esm/zonos-cart-items_13.entry.js +73 -13
  81. package/dist/esm/zonos-checkout.entry.js +9 -6
  82. package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
  83. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  84. package/dist/esm/zonos-collect.entry.js +6 -6
  85. package/dist/esm/zonos-confirm-dialog_2.entry.js +1 -1
  86. package/dist/esm/zonos-controller.entry.js +12 -5
  87. package/dist/esm/zonos-country-flag.entry.js +2 -2
  88. package/dist/esm/zonos-country-select_4.entry.js +9 -6
  89. package/dist/esm/zonos-empty-state-payment_4.entry.js +4 -4
  90. package/dist/esm/zonos-hello-dialog.entry.js +55 -45
  91. package/dist/esm/zonos-hello.entry.js +2 -2
  92. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  93. package/dist/esm-es5/buildCartItemsByTempCart-a117f75d.js +1 -0
  94. package/dist/esm-es5/cart-bc0e1598.js +1 -0
  95. package/dist/esm-es5/hasInclusivePrice-706cc09d.js +1 -0
  96. package/dist/esm-es5/index.js +1 -1
  97. package/dist/esm-es5/localization-53f67640.js +1 -0
  98. package/dist/esm-es5/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +1 -1
  99. package/dist/esm-es5/placeTestOrder-917731cf.js +1 -0
  100. package/dist/esm-es5/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +1 -1
  101. package/dist/esm-es5/translationStore-d241dcf7.js +1 -0
  102. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  103. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  104. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  105. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  106. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  107. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  108. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
  109. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  110. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  111. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  112. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  113. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  114. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  115. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  116. package/dist/scripts/blurCurrencyOnInit.js +1 -1
  117. package/dist/scripts/index.d.ts +39 -6
  118. package/dist/scripts/index.js +1 -1
  119. package/dist/scripts/loadZonos.js +1 -1
  120. package/dist/scripts/zonos.js +1 -1
  121. package/dist/types/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.d.ts +2 -0
  122. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -1
  123. package/dist/types/components/store/checkout/cart.d.ts +3 -0
  124. package/dist/types/components/store/hello/localization.d.ts +14 -3
  125. package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -15
  126. package/dist/types/components/store/translationStore/strings.base.d.ts +18 -15
  127. package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -15
  128. package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -15
  129. package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -15
  130. package/dist/types/components/store/translationStore/strings.french.d.ts +18 -15
  131. package/dist/types/components/store/translationStore/strings.german.d.ts +18 -15
  132. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -15
  133. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -15
  134. package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -15
  135. package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -15
  136. package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -15
  137. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -15
  138. package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -15
  139. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -15
  140. package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -15
  141. package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -15
  142. package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -15
  143. package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -15
  144. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -15
  145. package/dist/types/components/utils/api/getInclusivePriceConfigurations.d.ts +2 -0
  146. package/dist/types/components/utils/getOverridenZCountry.d.ts +5 -0
  147. package/dist/types/components/utils/hasInclusivePrice.d.ts +1 -0
  148. package/dist/types/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.d.ts +1 -0
  149. package/dist/types/components/utils/hello/currencyConversion/applyInclusivePrice.d.ts +1 -0
  150. package/dist/types/components/utils/hello/currencyConversion/calculateInclusivePrice.d.ts +27 -0
  151. package/dist/types/constants/key.d.ts +9 -0
  152. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
  153. package/dist/types/types/InclusivePricing.d.ts +13 -0
  154. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +1 -0
  155. package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +6 -0
  156. package/dist/types/types/generated/graphql.internal.types.d.ts +192 -51
  157. package/dist/types/types/generated/graphql.internal.types.ts +229 -50
  158. package/dist/types/types/index.d.ts +1 -0
  159. package/dist/types/types/utils/ZonosSettings.d.ts +2 -0
  160. package/dist/types/utils/performBlurCurrency.d.ts +12 -0
  161. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  162. package/dist/zonos-elements/index.esm.js +1 -1
  163. package/dist/zonos-elements/{p-c89e9d56.system.js → p-0047fecf.system.js} +1 -1
  164. package/dist/zonos-elements/{p-bd373de0.system.entry.js → p-0bc8e55c.system.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-964a4d85.js → p-2008df67.js} +1 -1
  166. package/dist/zonos-elements/{p-2db90c99.system.entry.js → p-22338b4a.system.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-3d2925c5.system.entry.js → p-2eaa5013.system.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-288f5a5b.system.entry.js → p-304bdbc2.system.entry.js} +1 -1
  169. package/dist/zonos-elements/p-30981f80.entry.js +1 -0
  170. package/dist/zonos-elements/{p-69451a50.system.js → p-398d9022.system.js} +1 -1
  171. package/dist/zonos-elements/p-3a242dfc.system.js +1 -0
  172. package/dist/zonos-elements/{p-5608ac9d.entry.js → p-3eda5c2c.entry.js} +1 -1
  173. package/dist/zonos-elements/p-3f0ca5f9.js +1 -0
  174. package/dist/zonos-elements/{p-23f6a2fb.system.entry.js → p-3f35b8b1.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-de984173.system.js → p-419c292c.system.js} +1 -1
  176. package/dist/zonos-elements/{p-7a97e1cf.system.entry.js → p-4697f061.system.entry.js} +1 -1
  177. package/dist/zonos-elements/p-4f5be8f0.entry.js +1 -0
  178. package/dist/zonos-elements/p-516a9666.system.js +1 -0
  179. package/dist/zonos-elements/p-55c6ff14.system.entry.js +1 -0
  180. package/dist/zonos-elements/p-6d563f33.system.entry.js +1 -0
  181. package/dist/zonos-elements/{p-9c728733.system.js → p-7730879e.system.js} +1 -1
  182. package/dist/zonos-elements/p-7920d79c.system.js +1 -0
  183. package/dist/zonos-elements/p-7c96a585.js +1 -0
  184. package/dist/zonos-elements/p-81b357f7.system.js +1 -1
  185. package/dist/zonos-elements/{p-29c80a34.js → p-83666056.js} +1 -1
  186. package/dist/zonos-elements/{p-2b84039a.entry.js → p-91fa43ef.entry.js} +1 -1
  187. package/dist/zonos-elements/p-9a444a82.system.entry.js +1 -0
  188. package/dist/zonos-elements/p-9bdad585.system.entry.js +1 -0
  189. package/dist/zonos-elements/p-abc0fb80.js +1 -0
  190. package/dist/zonos-elements/{p-b0a75761.entry.js → p-ac26a931.entry.js} +1 -1
  191. package/dist/zonos-elements/p-bb707dfd.system.js +1 -0
  192. package/dist/zonos-elements/{p-10894d36.entry.js → p-bc963b03.entry.js} +1 -1
  193. package/dist/zonos-elements/p-c0e080e3.js +1 -0
  194. package/dist/zonos-elements/p-c20429ea.entry.js +1 -0
  195. package/dist/zonos-elements/p-c28da00e.entry.js +1 -0
  196. package/dist/zonos-elements/p-c9be03e0.entry.js +1 -0
  197. package/dist/zonos-elements/{p-6c8e4f01.system.entry.js → p-cb70de13.system.entry.js} +1 -1
  198. package/dist/zonos-elements/p-cec35a21.entry.js +1 -0
  199. package/dist/zonos-elements/{p-cf56b990.entry.js → p-d15cd138.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-6f1024de.system.entry.js → p-d852d6da.system.entry.js} +1 -1
  201. package/dist/zonos-elements/p-d9486c57.entry.js +1 -0
  202. package/dist/zonos-elements/p-db73c11a.entry.js +1 -0
  203. package/dist/zonos-elements/{p-203c7fda.js → p-e27a9450.js} +1 -1
  204. package/dist/zonos-elements/{p-76f924b3.entry.js → p-ede9e968.entry.js} +1 -1
  205. package/dist/zonos-elements/p-ee8fcde6.js +1 -0
  206. package/dist/zonos-elements/p-f688d7a4.system.js +1 -0
  207. package/dist/zonos-elements/{p-236e0144.system.entry.js → p-ff1722d0.system.entry.js} +1 -1
  208. package/dist/zonos-elements/p-ff522088.system.entry.js +1 -0
  209. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  210. package/package.json +3 -3
  211. package/dist/esm-es5/buildCartItemsByTempCart-c4488f73.js +0 -1
  212. package/dist/esm-es5/cart-c74f9aaa.js +0 -1
  213. package/dist/esm-es5/localization-106476cb.js +0 -1
  214. package/dist/esm-es5/placeTestOrder-891295e8.js +0 -1
  215. package/dist/esm-es5/translationStore-766b7521.js +0 -1
  216. package/dist/types/components/utils/api/getInclusivePricing.d.ts +0 -6
  217. package/dist/zonos-elements/p-053a042e.entry.js +0 -1
  218. package/dist/zonos-elements/p-0d3767ec.entry.js +0 -1
  219. package/dist/zonos-elements/p-1d15662c.js +0 -1
  220. package/dist/zonos-elements/p-21b251f0.system.entry.js +0 -1
  221. package/dist/zonos-elements/p-225a61c4.system.entry.js +0 -1
  222. package/dist/zonos-elements/p-462f8857.entry.js +0 -1
  223. package/dist/zonos-elements/p-57ee34aa.system.entry.js +0 -1
  224. package/dist/zonos-elements/p-595668d7.system.js +0 -1
  225. package/dist/zonos-elements/p-62803534.entry.js +0 -1
  226. package/dist/zonos-elements/p-6497ce22.entry.js +0 -1
  227. package/dist/zonos-elements/p-65db3219.entry.js +0 -1
  228. package/dist/zonos-elements/p-94853366.system.entry.js +0 -1
  229. package/dist/zonos-elements/p-9972941a.entry.js +0 -1
  230. package/dist/zonos-elements/p-ad7be556.system.entry.js +0 -1
  231. package/dist/zonos-elements/p-b4fe3604.system.js +0 -1
  232. package/dist/zonos-elements/p-b8293509.js +0 -1
  233. package/dist/zonos-elements/p-c3c3cd98.js +0 -1
  234. package/dist/zonos-elements/p-cdaf52f4.system.js +0 -1
  235. package/dist/zonos-elements/p-cef1e888.system.js +0 -1
  236. package/dist/zonos-elements/p-eea0d8af.js +0 -1
  237. package/dist/zonos-elements/p-f4085c23.entry.js +0 -1
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const localization = require('./localization-31e3dfe3.js');
7
- const translationStore = require('./translationStore-b8b25e9d.js');
6
+ const localization = require('./localization-38af974b.js');
7
+ const translationStore = require('./translationStore-f2d5eae9.js');
8
8
  const zonosStore = require('./zonosStore-5d489c65.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
11
+ const hasInclusivePrice = require('./hasInclusivePrice-12605be9.js');
11
12
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
12
13
  const TaxId = require('./TaxId-12acedde.js');
13
14
  require('./handleFetch-954f30e1.js');
@@ -112,10 +113,6 @@ const ZonosHelloDialog = class {
112
113
  var _a;
113
114
  return (_a = localization.localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
114
115
  };
115
- this.hasInclusivePrices = () => {
116
- var _a;
117
- return ((_a = localization.localizationStore.inclusivePricing) === null || _a === void 0 ? void 0 : _a.status) === 'ENABLED';
118
- };
119
116
  /**
120
117
  * Some countries don't have threshold. So we need to show generic message for them
121
118
  */
@@ -200,7 +197,7 @@ const ZonosHelloDialog = class {
200
197
  ];
201
198
  };
202
199
  this.getAustraliaDutyTaxMessage = (landedCost) => {
203
- if (this.hasInclusivePrices()) {
200
+ if (hasInclusivePrice.hasInclusivePrice()) {
204
201
  return [];
205
202
  }
206
203
  return [
@@ -213,7 +210,7 @@ const ZonosHelloDialog = class {
213
210
  ];
214
211
  };
215
212
  this.getNewZealandDutyTaxMessge = (landedCost) => {
216
- if (this.hasInclusivePrices()) {
213
+ if (hasInclusivePrice.hasInclusivePrice()) {
217
214
  return null;
218
215
  }
219
216
  return [
@@ -226,7 +223,7 @@ const ZonosHelloDialog = class {
226
223
  ];
227
224
  };
228
225
  this.getNorwayDutyTaxMessage = (landedCost) => {
229
- if (this.hasInclusivePrices()) {
226
+ if (hasInclusivePrice.hasInclusivePrice()) {
230
227
  return null;
231
228
  }
232
229
  return [
@@ -239,7 +236,7 @@ const ZonosHelloDialog = class {
239
236
  ];
240
237
  };
241
238
  this.getSingaporeDutyTaxMessage = (landedCost) => {
242
- if (this.hasInclusivePrices()) {
239
+ if (hasInclusivePrice.hasInclusivePrice()) {
243
240
  return null;
244
241
  }
245
242
  return [
@@ -252,38 +249,57 @@ const ZonosHelloDialog = class {
252
249
  ];
253
250
  };
254
251
  this.getInclusivePriceMessage = () => {
255
- const setting = localization.localizationStore.inclusivePricing;
256
- if ((setting === null || setting === void 0 ? void 0 : setting.status) !== 'ENABLED') {
252
+ const settings = localization.localizationStore.inclusivePricingConfigurations;
253
+ const foundConfiguration = settings === null || settings === void 0 ? void 0 : settings.find(Boolean);
254
+ const taxConfiguration = foundConfiguration === null || foundConfiguration === void 0 ? void 0 : foundConfiguration.configurations[hasInclusivePrice.TAXES_KEY];
255
+ const dutyConfiguration = foundConfiguration === null || foundConfiguration === void 0 ? void 0 : foundConfiguration.configurations[hasInclusivePrice.DUTY_KEY];
256
+ if ((taxConfiguration === null || taxConfiguration === void 0 ? void 0 : taxConfiguration.status) === 'DISABLED' &&
257
+ (dutyConfiguration === null || dutyConfiguration === void 0 ? void 0 : dutyConfiguration.status) === 'DISABLED') {
257
258
  return null;
258
259
  }
259
- if (setting.duty.status === 'INCLUDED' &&
260
- setting.tax.status === 'INCLUDED' &&
261
- setting.fee.status === 'INCLUDED') {
262
- return translationStore.translate('Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.');
263
- }
264
- if (setting.duty.status === 'INCLUDED' &&
265
- setting.tax.status === 'INCLUDED') {
266
- return translationStore.translate('Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.');
267
- }
268
- if (setting.duty.status === 'INCLUDED' &&
269
- setting.fee.status === 'INCLUDED') {
270
- return translationStore.translate('Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.');
260
+ if ((dutyConfiguration === null || dutyConfiguration === void 0 ? void 0 : dutyConfiguration.status) === 'ENABLED' &&
261
+ (taxConfiguration === null || taxConfiguration === void 0 ? void 0 : taxConfiguration.status) === 'ENABLED') {
262
+ return {
263
+ inclusiveType: 'DUTIES_TAXES_AND_FEES',
264
+ message: translationStore.translate('Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.'),
265
+ };
271
266
  }
272
- if (setting.tax.status === 'INCLUDED' &&
273
- setting.fee.status === 'INCLUDED') {
274
- return translationStore.translate('Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.');
267
+ if ((dutyConfiguration === null || dutyConfiguration === void 0 ? void 0 : dutyConfiguration.status) === 'ENABLED') {
268
+ return {
269
+ inclusiveType: 'DUTIES_FEES',
270
+ message: translationStore.translate('Product prices already include duties and fees. No additional duties or fees will be added at checkout.'),
271
+ };
275
272
  }
276
- if (setting.duty.status === 'INCLUDED') {
277
- return translationStore.translate('Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.');
278
- }
279
- if (setting.tax.status === 'INCLUDED') {
280
- return translationStore.translate('Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.');
281
- }
282
- if (setting.fee.status === 'INCLUDED') {
283
- return translationStore.translate('Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.');
273
+ if ((taxConfiguration === null || taxConfiguration === void 0 ? void 0 : taxConfiguration.status) === 'ENABLED') {
274
+ return {
275
+ inclusiveType: 'TAXES',
276
+ message: translationStore.translate('Product prices already include taxes. No additional taxes will be added at checkout.'),
277
+ };
284
278
  }
285
279
  return null;
286
280
  };
281
+ this.renderHelloMessage = () => {
282
+ // If deminimis is undefined or null, assume it's $0
283
+ const dutyDeMinimisMessage = this.getDutyMessage();
284
+ // If deminimis is undefined or null, assume it's $0
285
+ const taxDeMinimisMessage = this.getTaxMessage();
286
+ const inclusivePriceMessage = this.getInclusivePriceMessage();
287
+ if (hasInclusivePrice.hasInclusivePrice() && inclusivePriceMessage) {
288
+ switch (inclusivePriceMessage.inclusiveType) {
289
+ case 'DUTIES_FEES': {
290
+ return (index.h(index.Fragment, null, inclusivePriceMessage.message && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty inclusive pricing icon", content: InclusivePricingIcon }), index.h("zonos-text", { "aria-label": "Duty inclusive pricing message" }, inclusivePriceMessage.message))), taxDeMinimisMessage && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), index.h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage)))));
291
+ }
292
+ case 'TAXES': {
293
+ return (index.h(index.Fragment, null, inclusivePriceMessage.message && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax inclusive pricing icon", content: InclusivePricingIcon }), index.h("zonos-text", { "aria-label": "Tax inclusive pricing message" }, inclusivePriceMessage.message))), dutyDeMinimisMessage && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), index.h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage)))));
294
+ }
295
+ case 'DUTIES_TAXES_AND_FEES':
296
+ default: {
297
+ return (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), index.h("zonos-text", null, inclusivePriceMessage.message)));
298
+ }
299
+ }
300
+ }
301
+ return (index.h(index.Fragment, null, dutyDeMinimisMessage && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), index.h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), index.h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage)))));
302
+ };
287
303
  /**
288
304
  * Get additional duty tax message if selected country has tax id
289
305
  */
@@ -328,12 +344,6 @@ const ZonosHelloDialog = class {
328
344
  render() {
329
345
  var _a;
330
346
  const { selectedCountryCode } = localization.localizationStore;
331
- const hasInclusivePrices = this.hasInclusivePrices();
332
- const inclusivePriceMessage = this.getInclusivePriceMessage();
333
- // If deminimis is undefined or null, assume it's $0
334
- const dutyDeMinimisMessage = this.getDutyMessage();
335
- // If deminimis is undefined or null, assume it's $0
336
- const taxDeMinimisMessage = this.getTaxMessage();
337
347
  // Show additional information if selected country has tax id
338
348
  const additionalInformation = this.getAdditionalDutyTaxMessage();
339
349
  const animateLeft = this.animateFromLeftOverride ||
@@ -348,18 +358,18 @@ const ZonosHelloDialog = class {
348
358
  const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
349
359
  const currentPage = this.getCurrentPageEnum();
350
360
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
351
- return (index.h(index.Host, { key: '178654e9b701bb68a4d47495897445cf87806c37', class: "zonos--elements" }, index.h("div", { key: 'eb0f3ced0226513df3911e0664aff10d523fdac7', class: classes.classes([
361
+ return (index.h(index.Host, { key: '9b72c4f7b35ebdb1179430d4fc6baec2f9c7d9ca', class: "zonos--elements" }, index.h("div", { key: '821ea623e2c2764a647c493887bce1b9d6d21756', class: classes.classes([
352
362
  'zonos--hello-dialog',
353
363
  animateLeft && 'zonos--hello-dialog-animate-from-left',
354
364
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
355
365
  !!this.mobileLocationOverride &&
356
366
  'zonos--hello-dialog-mobile-override',
357
367
  this.isOpen && 'zonos--hello-dialog-open',
358
- ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: 'f185f2d707a3b9628896a7e15f2a0ad20da112ec' }, index.h("div", { key: '80c53ad6728b221bedbfaec2ec77fee96029e12b', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: '31b71832bee5e4515dbf060746f022d9c91502af', 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: '5f11c3b0355ba0c85cf134522b6e21fd28dfe16c', spacing: 24 }, index.h("zonos-country-flag", { key: '6d6dcad7e3700f67c4261995d867aacb42715404', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: '7a325a9b94e58dc5f8dba5baba9a00f835466ee2', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: '24e2407475b740b50ca07fe9278363fdefc27d01', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: '6b38dee6ec6fcf39e02c5225155e2af69c367a39', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: '567d126d05f236fa0aab764d78b1692ebfe82f8b', spacing: 8 }, this.restrictedItems.map(item => {
368
+ ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: 'e2aa3326f46296c22733a836078e980afd9e736c' }, index.h("div", { key: '683e1d862da858facf1cf513271a3ce470bd1389', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: '90bdcf789ad76957a4c5623c52f25d6c4c4d0e16', 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: 'ebae01dd1e80f6b6c3e9e6f310468feb940532b5', spacing: 24 }, index.h("zonos-country-flag", { key: '94c73321eae6a57d1bc5db1067564bbc415a8bb1', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: 'a06e2bc0e4c712a86e4bd2ed8fdef054a6c33776', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: '4d487ee5c7ba3092e0630e4ceeaa43c562bfccf5', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: 'cd8e2a7bfacdb82262d7e3d54019b220b27aff9a', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: '612dd0f2d812b957fa02c6da598db8b067f6d32d', spacing: 8 }, this.restrictedItems.map(item => {
359
369
  var _a;
360
370
  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)))));
361
- }), index.h("zonos-card", { key: 'e96943bc58d47531f748217858939ddf2a586441', spacing: "12px" }, index.h("zonos-v-stack", { key: '3e1850a86542ad66c224e4b81f1c5442e7716f6d', 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, dutyDeMinimisMessage && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), index.h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), index.h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage))))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
362
- additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), index.h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: '33e41b69e4a5b00623f3e412609e7162cb560c38', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: 'fa17c20b3d893ed9f2249bbceca5237fa48bc64e' }, index.h("zonos-country-select", { key: '15a5924f176c4a805405684c3eda90f47979cf0b', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: 'ab1d061a3c9c68b43c4203fa14af2ffcf7d33e82' }, index.h("zonos-language-select", { key: '97f4c760e65d7af39160a1ff978d8a7b0864a763', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
371
+ }), index.h("zonos-card", { key: '12b7726f5afd1fd37bf00558e1059dd6a4ae4301', spacing: "12px" }, index.h("zonos-v-stack", { key: '1a935c9c54b8410ad6255bcc9d652e71ed5b0d55', spacing: 12 }, this.renderHelloMessage(), additionalInformation === null || additionalInformation === void 0 ? void 0 :
372
+ additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), index.h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: '76d5ac661a9b67dd34b9950b88b6e6fece9267d4', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: '154934865bc0791c462f7b05e50b8186ddf1ef69' }, index.h("zonos-country-select", { key: '74a170a0cce0d78761f53a80a588ca42a883fbd0', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: '09be0a1d26f4753f455e4ea35d60acd17967270e' }, index.h("zonos-language-select", { key: 'b904c114352a255af58461fbbcb352d0a883e85c', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
363
373
  }
364
374
  static get assetsDirs() { return ["assets"]; }
365
375
  static get watchers() { return {
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
6
  const debounce = require('./debounce-2c9f3f1e.js');
7
- const localization = require('./localization-31e3dfe3.js');
8
- const translationStore = require('./translationStore-b8b25e9d.js');
7
+ const localization = require('./localization-38af974b.js');
8
+ const translationStore = require('./translationStore-f2d5eae9.js');
9
9
  const zonosStore = require('./zonosStore-5d489c65.js');
10
10
  const classes = require('./classes-b7918f56.js');
11
11
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const localization = require('./localization-31e3dfe3.js');
7
- const translationStore = require('./translationStore-b8b25e9d.js');
6
+ const localization = require('./localization-38af974b.js');
7
+ const translationStore = require('./translationStore-f2d5eae9.js');
8
8
  const zonosStore = require('./zonosStore-5d489c65.js');
9
9
  const ILanguage = require('./ILanguage-98b04442.js');
10
10
  require('./handleFetch-954f30e1.js');
@@ -1,21 +1,55 @@
1
1
  import { Fragment, h, Host } from "@stencil/core";
2
2
  import { cartStore, cartStoreHasOneEligibleItem, } from "../../../store/checkout/cart";
3
3
  import { stripeStore, stripeStoreApplyPromoCode, stripeStoreRemovePromoCode, } from "../../../store/checkout/stripe";
4
+ import { localizationStore } from "../../../store/hello/localization";
4
5
  import { translate } from "../../../store/translationStore";
5
6
  import { zonosStore } from "../../../store/zonosStore";
6
7
  import { renderCheckoutCurrency } from "../../../utils/checkout/renderCheckoutCurrency";
8
+ import { hasInclusivePrice } from "../../../utils/hasInclusivePrice";
9
+ import { DUTY_KEY, TAXES_KEY } from "../../../../constants/key";
7
10
  export class ZonosCartSubtotal {
8
11
  constructor() {
9
12
  /**
10
13
  * Loading state for apply promo code button
11
14
  */
12
15
  this.loading = false;
16
+ this.getInclusivePriceType = () => {
17
+ var _a, _b;
18
+ const inclusivePriceConfiguration = localizationStore.inclusivePricingConfigurations.find(Boolean);
19
+ const dutyInclusive = ((_a = inclusivePriceConfiguration === null || inclusivePriceConfiguration === void 0 ? void 0 : inclusivePriceConfiguration.configurations[DUTY_KEY]) === null || _a === void 0 ? void 0 : _a.status) ===
20
+ 'ENABLED';
21
+ const taxInclusive = ((_b = inclusivePriceConfiguration === null || inclusivePriceConfiguration === void 0 ? void 0 : inclusivePriceConfiguration.configurations[TAXES_KEY]) === null || _b === void 0 ? void 0 : _b.status) ===
22
+ 'ENABLED';
23
+ if (dutyInclusive && taxInclusive) {
24
+ return 'DUTY_TAX_AND_FEE';
25
+ }
26
+ // Fee would also be included with duty if it's inclusive
27
+ if (dutyInclusive) {
28
+ return 'DUTY_AND_FEE';
29
+ }
30
+ if (taxInclusive) {
31
+ return 'TAX';
32
+ }
33
+ return null;
34
+ };
35
+ this.getCartSubtotalSubtitle = () => {
36
+ const inclusivePriceType = this.getInclusivePriceType();
37
+ if (inclusivePriceType === 'DUTY_AND_FEE') {
38
+ return (h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Duties and fees included')));
39
+ }
40
+ if (inclusivePriceType === 'TAX') {
41
+ return (h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Taxes included')));
42
+ }
43
+ return null;
44
+ };
13
45
  }
14
46
  render() {
15
47
  var _a, _b, _c, _d, _e;
48
+ // Since now we are prefetching the landed cost, we need to not show the total that includes the landed cost and shipping
49
+ const cartTotal = cartStore.step === 'customer-info' ? cartStore.subtotal : cartStore.total;
16
50
  const showDutyTaxesInfo = cartStore.step === 'payment' || cartStore.step === 'shipping';
17
51
  // Show 0 for subtotal and total when all items are restricted
18
- const total = cartStoreHasOneEligibleItem() ? cartStore.total : 0;
52
+ const total = cartStoreHasOneEligibleItem() ? cartTotal : 0;
19
53
  // Total is in target currency, devide by target rate to get base currency
20
54
  const subtotal = cartStoreHasOneEligibleItem() ? cartStore.subtotal : 0;
21
55
  const shouldRenderPromoInput =
@@ -41,16 +75,43 @@ export class ZonosCartSubtotal {
41
75
  this.loading = false;
42
76
  };
43
77
  const renderShippingInfo = () => {
44
- if (!cartStore.selectedShippingOption) {
78
+ if (!cartStore.selectedShippingOption ||
79
+ // Should not show shipping info at customer info step
80
+ cartStore.step === 'customer-info') {
45
81
  return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Shipping')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('No shipping method selected'))));
46
82
  }
47
83
  return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cartStore.selectedShippingOption.displayName), cartStore.selectedShippingOptionTransitTime && (h("zonos-text", { class: "zonos--caption", type: "caption" }, cartStore.selectedShippingOptionTransitTime))));
48
84
  };
49
85
  const renderLandedCost = () => {
50
86
  var _a, _b, _c;
87
+ // At the moment, inclusive price only support for US merchant
88
+ if (hasInclusivePrice()) {
89
+ const inclusivePriceType = this.getInclusivePriceType();
90
+ // This should not happen, put it here to exclude null from the type
91
+ if (!inclusivePriceType) {
92
+ return null;
93
+ }
94
+ if (inclusivePriceType === 'TAX') {
95
+ return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties and fees')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Nothing due at the door'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
96
+ ? renderCheckoutCurrency({
97
+ amount: cartStore.dutiesTaxesFees,
98
+ isForeign: true,
99
+ })
100
+ : '-'))));
101
+ }
102
+ if (inclusivePriceType === 'DUTY_AND_FEE') {
103
+ return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
104
+ ? renderCheckoutCurrency({
105
+ amount: cartStore.dutiesTaxesFees,
106
+ isForeign: true,
107
+ })
108
+ : '-'))));
109
+ }
110
+ return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('The purchase price covers duties, taxes and fees.'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, "-"))));
111
+ }
51
112
  // Domestic US doesn't have duty applied, just taxes and fees
52
113
  if ((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')) {
53
- return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes and fees'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null ||
114
+ return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes and fees'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null ||
54
115
  cartStore.dutiesTaxesFeesEstimate !== null
55
116
  ? renderCheckoutCurrency({
56
117
  amount: cartStore.dutiesTaxesFees ||
@@ -61,23 +122,23 @@ export class ZonosCartSubtotal {
61
122
  : '-'))));
62
123
  }
63
124
  if (cartStore.landedCostMethod === 'DAP') {
64
- return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), cartStore.dutiesTaxesFeesEstimate !== null
125
+ return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), cartStore.dutiesTaxesFeesEstimate !== null
65
126
  ? `${translate('Estimated [amount]', {
66
127
  amount: renderCheckoutCurrency({
67
128
  amount: cartStore.dutiesTaxesFeesEstimate,
68
129
  isForeign: true,
69
130
  }),
70
131
  })}`
71
- : '-'), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, translate('Due at delivery')))));
132
+ : '-'), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, translate('Due at delivery')))));
72
133
  }
73
- return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Nothing due at the door'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
134
+ return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title zonos--landed-cost" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Nothing due at the door'))), h("td", { class: "zonos--column zonos--cart-subtotal-price zonos--landed-cost" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
74
135
  ? renderCheckoutCurrency({
75
136
  amount: cartStore.dutiesTaxesFees,
76
137
  isForeign: true,
77
138
  })
78
139
  : '-'))));
79
140
  };
80
- return (h(Host, { class: "zonos--cart-subtotal zonos--elements" }, h("table", { class: "zonos--cart-table" }, h("tr", { class: "zonos--row zonos--cart-subtotal" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Cart subtotal'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
141
+ return (h(Host, { class: "zonos--cart-subtotal zonos--elements" }, h("table", { class: "zonos--cart-table" }, h("tr", { class: "zonos--row zonos--cart-subtotal" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Cart subtotal')), h("zonos-text", { class: "zonos--caption", type: "caption" }, this.getCartSubtotalSubtitle())), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
81
142
  amount: subtotal,
82
143
  isForeign: true,
83
144
  })))), h("tr", { class: "zonos--row zonos--cart-shipping" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, renderShippingInfo()), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, cartStore.shipping
@@ -1812,7 +1812,7 @@ export class ZonosCheckout {
1812
1812
  "signature": "(session: CheckoutSessionDetailsFragment) => Promise<void>",
1813
1813
  "parameters": [{
1814
1814
  "name": "session",
1815
- "type": "{ cartId: string | null; clientSecret: string; completedAt: string | null; customerProfile: { email: string | null; locations: { administrativeArea: string; countryCode: CountryCode; email: string | null; line1: string; line2: string | null; locality: string; name: string | null; phone: string | null; postalCode: string; }[] | null; name: string | null; } | null; customerSessionClientSecret: string | null; id: string; landedCost: { amountSubtotals: { discounts: number | null; duties: number; fees: number; items: number; landedCostTotal: number; shipping: number; taxes: number; } | null; appliedAdjustments: { adjustment: { name: string | null; source: AdjustmentSource | null; } | null; amount: number; item: { amount: number; } | null; type: LandedCostAdjustmentType | null; }[] | null; currencyCode: CurrencyCode; deMinimis: { formula: string; threshold: DeMinimisThreshold; method: IncotermCode; note: string; type: DeMinimisType; }[]; duties: { amount: number; currencyCode: CurrencyCode; }[]; fees: { amount: number; currencyCode: CurrencyCode; }[]; id: string; landedCostGuaranteeCode: LandedCostGuaranteeCode; method: IncotermCode; remittance: { amount: number; description: string; }[]; rootId: string; shipmentRating: { amount: number; currencyCode: CurrencyCode; displayName: string; id: string; shippingProfile: { serviceLevel: { code: string; }; transitTime: { guaranteedDelivery: string | null; max: number | null; min: number | null; type: TransitTypeCode | null; } | null; } | null; }; taxes: { amount: number; currencyCode: CurrencyCode; }[]; } | null; metadata: ({ key: string; value: string; } | null)[] | null; organizationId: string; subtotals: { adjustments: number; duties: number; exchangeRate: { id: string; rate: number; sourceCurrencyCode: CurrencyCode; targetCurrencyCode: CurrencyCode; type: ExchangeRateType; }; fees: number; items: number; landedCostTotal: number; presentmentCurrencyCode: CurrencyCode; shipping: number; taxes: number; total: number; }; varianceTestResults: { selectedVariantKey: string; testKey: string; }[] | null; }",
1815
+ "type": "{ cartId: string | null; clientSecret: string; completedAt: string | null; customerProfile: { email: string | null; locations: { administrativeArea: string; countryCode: CountryCode; email: string | null; line1: string; line2: string | null; phone: string | null; name: string | null; locality: string; postalCode: string; }[] | null; name: string | null; } | null; customerSessionClientSecret: string | null; id: string; landedCost: { amountSubtotals: { discounts: number | null; duties: number; fees: number; items: number; landedCostTotal: number; shipping: number; taxes: number; } | null; appliedAdjustments: { adjustment: { name: string | null; source: AdjustmentSource | null; } | null; amount: number; type: LandedCostAdjustmentType | null; item: { amount: number; } | null; }[] | null; currencyCode: CurrencyCode; deMinimis: { type: DeMinimisType; threshold: DeMinimisThreshold; method: IncotermCode; note: string; formula: string; }[]; duties: { amount: number; currencyCode: CurrencyCode; }[]; fees: { amount: number; currencyCode: CurrencyCode; }[]; landedCostGuaranteeCode: LandedCostGuaranteeCode; id: string; method: IncotermCode; remittance: { amount: number; description: string; }[]; rootId: string; shipmentRating: { amount: number; currencyCode: CurrencyCode; displayName: string; id: string; shippingProfile: { serviceLevel: { code: string; }; transitTime: { guaranteedDelivery: string | null; max: number | null; min: number | null; type: TransitTypeCode | null; } | null; } | null; }; taxes: { amount: number; currencyCode: CurrencyCode; }[]; } | null; metadata: ({ key: string; value: string; } | null)[] | null; organizationId: string; references: { inclusivePriceConfigurationId: string | null; } | null; subtotals: { adjustments: number; duties: number; exchangeRate: { id: string; rate: number; sourceCurrencyCode: CurrencyCode; targetCurrencyCode: CurrencyCode; type: ExchangeRateType; }; fees: number; items: number; landedCostTotal: number; presentmentCurrencyCode: CurrencyCode; shipping: number; taxes: number; total: number; }; varianceTestResults: { selectedVariantKey: string; testKey: string; }[] | null; }",
1816
1816
  "docs": ""
1817
1817
  }],
1818
1818
  "references": {
@@ -31,7 +31,8 @@ export class ZonosReview {
31
31
  this.isMobile = isCheckoutMobile(this.mobile);
32
32
  }
33
33
  render() {
34
- const total = cartStoreHasOneEligibleItem() ? cartStore.total : 0;
34
+ const cartTotal = cartStore.step === 'customer-info' ? cartStore.subtotal : cartStore.total;
35
+ const total = cartStoreHasOneEligibleItem() ? cartTotal : 0;
35
36
  const titleTextType = this.isMobile ? 'boldSubheader' : 'semiBoldLabel';
36
37
  const totalTextType = this.isMobile
37
38
  ? 'boldSubheader'
@@ -15,7 +15,10 @@ export class ZonosCountrySelect {
15
15
  this.inputValue = '';
16
16
  this.countrySelected = (countryCode) => {
17
17
  // mutate the selected country code in store
18
- void localizationStoreUpdateSelectedCountryCode(countryCode);
18
+ void localizationStoreUpdateSelectedCountryCode({
19
+ isInitializing: false,
20
+ newSelectedCountryCode: countryCode,
21
+ });
19
22
  this.handleOnClose();
20
23
  };
21
24
  this.handleInputChange = (event) => {
@@ -48,13 +51,13 @@ export class ZonosCountrySelect {
48
51
  ? fuseObject.map(country => country.item)
49
52
  : countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
50
53
  const isEmpty = !filteredCountries.length;
51
- return (h(Host, { key: '87e346925730bb4ce7a5a0da35bbffe9fa209e79', class: "zonos--elements", style: {
54
+ return (h(Host, { key: '4bdbe0a40e52745510cf5c51826375eb46d6c85a', class: "zonos--elements", style: {
52
55
  '--zonos--font-family': zonosStoreFontFamily(),
53
- } }, h("div", { key: '557543582175b50bcd5e9e0e9362ecc85f0b0ec0', class: "zonos--country-select" }, h("zonos-v-stack", { key: '3e03b4624abfc1b2239560a62dd33659c30c7d26', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '9664de32cbfb119eb0b3658b71f31039f4d0e064', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: 'c5f28d334194471298bacc218f36dd7d56f57c1e', autoComplete: "off", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), ref: el => {
56
+ } }, h("div", { key: '82492f3baa43f2691fa9457fdde52fcc6d6b153e', class: "zonos--country-select" }, h("zonos-v-stack", { key: '56fa5efa199d1f83f8042b9280295d0e08c9d045', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '3b84b57f1b80152fcb0c4049672796c87744517a', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '68b9b5af5dbdf20d47e39c45b3c64df772afb56f', autoComplete: "off", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), ref: el => {
54
57
  if (el) {
55
58
  this.inputRef = el;
56
59
  }
57
- }, type: "text", value: this.inputValue }))), h("div", { key: '9f623511c7a1576961e527071c10672f3b800359', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: '3c37b29f38ce48ea953df2faf0ab9e349a8e538c', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: 'ebab93c3379e93fcbde6cd634174f981c06bff42', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
60
+ }, type: "text", value: this.inputValue }))), h("div", { key: '365e7ae9464070080182bb4b83f232d0952eb9c8', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: '025ae5379da4ef222c39544bee3b009bc3a3c7a4', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '3ae131cb44d63bd239e3c90cbfcaf8535817c663', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
58
61
  const country = filteredCountries[index];
59
62
  if (!country) {
60
63
  return null;