@zonos/elements 1.3.230 → 1.3.232

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 (350) hide show
  1. package/dist/cjs/{cart-ad82a680.js → cart-bc615014.js} +9 -5
  2. package/dist/cjs/{debounce-2c9f3f1e.js → debounce-815d1517.js} +1 -1
  3. package/dist/cjs/{getBorderRadius-c7d9f676.js → getBorderRadius-2ef1170d.js} +1 -1
  4. package/dist/cjs/hasInclusivePrice-84145546.js +24 -0
  5. package/dist/cjs/{index-1c710d00.js → index-69fa8852.js} +352 -4
  6. package/dist/cjs/index.cjs.js +7 -7
  7. package/dist/cjs/{isDarkColor-994c38e4.js → isDarkColor-878e600e.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/{localization-31e3dfe3.js → localization-39516612.js} +119 -31
  10. package/dist/cjs/{paypal-88b5e878.js → paypal-1d6f1a71.js} +5 -5
  11. package/dist/cjs/{placeTestOrder-6aefbf9c.js → placeTestOrder-a5469e40.js} +11 -7
  12. package/dist/cjs/{renderFallback-87c908ad.js → renderFallback-c2576fbe.js} +4 -4
  13. package/dist/cjs/{translationStore-b8b25e9d.js → translationStore-08d3ff9c.js} +602 -362
  14. package/dist/cjs/{updateCheckoutSessionAttributes-a4899e90.js → updateCheckoutSessionAttributes-3a1db9de.js} +1 -1
  15. package/dist/cjs/zonos-address_11.cjs.entry.js +31 -15
  16. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  17. package/dist/cjs/zonos-banner_2.cjs.entry.js +3 -3
  18. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  19. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +193 -25
  20. package/dist/cjs/zonos-checkout.cjs.entry.js +14 -11
  21. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +7 -7
  23. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +10 -10
  24. package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
  25. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +4 -4
  27. package/dist/cjs/zonos-controller.cjs.entry.js +16 -9
  28. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  29. package/dist/cjs/zonos-country-select_4.cjs.entry.js +12 -9
  30. package/dist/cjs/zonos-elements.cjs.js +2 -2
  31. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +9 -9
  32. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +57 -47
  33. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  34. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  35. package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
  36. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  37. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  38. package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
  39. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  40. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  41. package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
  42. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  43. package/dist/cjs/{zonosStore-5d489c65.js → zonosStore-37a4b4f4.js} +1 -1
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +68 -7
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  46. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +4 -0
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +115 -6
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -1
  49. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -4
  50. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -43
  51. package/dist/collection/components/main/zonos-controller.js +5 -2
  52. package/dist/collection/components/store/hello/localization.js +47 -16
  53. package/dist/collection/components/store/translationStore/strings.arabic.js +30 -18
  54. package/dist/collection/components/store/translationStore/strings.base.js +30 -18
  55. package/dist/collection/components/store/translationStore/strings.chinese.js +30 -18
  56. package/dist/collection/components/store/translationStore/strings.danish.js +30 -18
  57. package/dist/collection/components/store/translationStore/strings.dutch.js +30 -18
  58. package/dist/collection/components/store/translationStore/strings.french.js +30 -18
  59. package/dist/collection/components/store/translationStore/strings.german.js +30 -18
  60. package/dist/collection/components/store/translationStore/strings.hebrew.js +30 -18
  61. package/dist/collection/components/store/translationStore/strings.indonesian.js +30 -18
  62. package/dist/collection/components/store/translationStore/strings.italian.js +30 -18
  63. package/dist/collection/components/store/translationStore/strings.japanese.js +30 -18
  64. package/dist/collection/components/store/translationStore/strings.korean.js +30 -18
  65. package/dist/collection/components/store/translationStore/strings.norwegian.js +30 -18
  66. package/dist/collection/components/store/translationStore/strings.polish.js +30 -18
  67. package/dist/collection/components/store/translationStore/strings.portuguese.js +30 -18
  68. package/dist/collection/components/store/translationStore/strings.russian.js +30 -18
  69. package/dist/collection/components/store/translationStore/strings.spanish.js +30 -18
  70. package/dist/collection/components/store/translationStore/strings.swedish.js +30 -18
  71. package/dist/collection/components/store/translationStore/strings.turkish.js +30 -18
  72. package/dist/collection/components/store/translationStore/strings.vietnamese.js +30 -18
  73. package/dist/collection/components/store/translationStore.js +1 -1
  74. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  75. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  76. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  77. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +18 -2
  78. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  79. package/dist/collection/components/utils/api/{getInclusivePricing.js → getInclusivePriceConfigurations.js} +1 -1
  80. package/dist/collection/components/utils/api/getLocalization.js +2 -5
  81. package/dist/collection/components/utils/api/getZonosSettings.js +5 -0
  82. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +6 -0
  83. package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -5
  84. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +4 -1
  85. package/dist/collection/components/utils/getOverridenZCountry.js +11 -0
  86. package/dist/collection/components/utils/hasInclusivePrice.js +10 -0
  87. package/dist/collection/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.js +10 -0
  88. package/dist/collection/components/utils/hello/currencyConversion/applyInclusivePrice.js +39 -0
  89. package/dist/collection/components/utils/hello/currencyConversion/calculateInclusivePrice.js +32 -0
  90. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +11 -6
  91. package/dist/collection/constants/key.js +9 -0
  92. package/dist/collection/types/InclusivePricing.js +1 -0
  93. package/dist/collection/types/InputFieldLabel.js +1 -0
  94. package/dist/collection/types/generated/graphql.internal.types.js +574 -3
  95. package/dist/collection/types/index.js +1 -0
  96. package/dist/collection/utils/performBlurCurrency.js +38 -5
  97. package/dist/esm/{cart-c74f9aaa.js → cart-14f305b3.js} +9 -5
  98. package/dist/esm/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
  99. package/dist/esm/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
  100. package/dist/esm/hasInclusivePrice-0eda8ba9.js +20 -0
  101. package/dist/esm/{index-55a03023.js → index-0bbe9693.js} +352 -4
  102. package/dist/esm/index.js +7 -7
  103. package/dist/esm/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
  104. package/dist/esm/loader.js +3 -3
  105. package/dist/esm/{localization-106476cb.js → localization-c5029ffc.js} +118 -32
  106. package/dist/esm/{paypal-bf3a2bdd.js → paypal-fded8844.js} +5 -5
  107. package/dist/esm/{placeTestOrder-891295e8.js → placeTestOrder-2250f719.js} +11 -7
  108. package/dist/esm/{renderFallback-ce0e238a.js → renderFallback-dbf1e3ae.js} +4 -4
  109. package/dist/esm/{translationStore-766b7521.js → translationStore-690c4e04.js} +602 -362
  110. package/dist/esm/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
  111. package/dist/esm/zonos-address_11.entry.js +31 -15
  112. package/dist/esm/zonos-badge.entry.js +2 -2
  113. package/dist/esm/zonos-banner_2.entry.js +3 -3
  114. package/dist/esm/zonos-button_3.entry.js +4 -4
  115. package/dist/esm/zonos-cart-items_13.entry.js +193 -25
  116. package/dist/esm/zonos-checkout.entry.js +14 -11
  117. package/dist/esm/zonos-collapse.entry.js +2 -2
  118. package/dist/esm/zonos-collect-cart-items_3.entry.js +7 -7
  119. package/dist/esm/zonos-collect-finish_6.entry.js +10 -10
  120. package/dist/esm/zonos-collect.entry.js +9 -9
  121. package/dist/esm/zonos-component.entry.js +1 -1
  122. package/dist/esm/zonos-confirm-dialog_2.entry.js +4 -4
  123. package/dist/esm/zonos-controller.entry.js +16 -9
  124. package/dist/esm/zonos-country-flag.entry.js +4 -4
  125. package/dist/esm/zonos-country-select_4.entry.js +12 -9
  126. package/dist/esm/zonos-elements.js +3 -3
  127. package/dist/esm/zonos-empty-state-payment_4.entry.js +9 -9
  128. package/dist/esm/zonos-hello-dialog.entry.js +57 -47
  129. package/dist/esm/zonos-hello.entry.js +5 -5
  130. package/dist/esm/zonos-input.entry.js +3 -3
  131. package/dist/esm/zonos-language-select_2.entry.js +4 -4
  132. package/dist/esm/zonos-logo.entry.js +2 -2
  133. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  134. package/dist/esm/zonos-stripe-input.entry.js +4 -4
  135. package/dist/esm/zonos-text.entry.js +2 -2
  136. package/dist/esm/zonos-toggle.entry.js +2 -2
  137. package/dist/esm/zonos-tooltip.entry.js +1 -1
  138. package/dist/esm/zonos-v-stack.entry.js +2 -2
  139. package/dist/esm/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
  140. package/dist/esm-es5/cart-14f305b3.js +1 -0
  141. package/dist/esm-es5/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
  142. package/dist/esm-es5/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
  143. package/dist/esm-es5/hasInclusivePrice-0eda8ba9.js +1 -0
  144. package/dist/esm-es5/index-0bbe9693.js +2 -0
  145. package/dist/esm-es5/index.js +1 -1
  146. package/dist/esm-es5/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
  147. package/dist/esm-es5/loader.js +1 -1
  148. package/dist/esm-es5/localization-c5029ffc.js +1 -0
  149. package/dist/esm-es5/{paypal-bf3a2bdd.js → paypal-fded8844.js} +1 -1
  150. package/dist/esm-es5/placeTestOrder-2250f719.js +1 -0
  151. package/dist/esm-es5/{renderFallback-ce0e238a.js → renderFallback-dbf1e3ae.js} +1 -1
  152. package/dist/esm-es5/translationStore-690c4e04.js +1 -0
  153. package/dist/esm-es5/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
  154. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  155. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  156. package/dist/esm-es5/zonos-banner_2.entry.js +1 -1
  157. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  158. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  159. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  160. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  161. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  162. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  163. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  164. package/dist/esm-es5/zonos-component.entry.js +1 -1
  165. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
  166. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  167. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  168. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  169. package/dist/esm-es5/zonos-elements.js +1 -1
  170. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  171. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  172. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  173. package/dist/esm-es5/zonos-input.entry.js +1 -1
  174. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  175. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  176. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  177. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  178. package/dist/esm-es5/zonos-text.entry.js +1 -1
  179. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  180. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  181. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  182. package/dist/esm-es5/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
  183. package/dist/scripts/blurCurrencyOnInit.js +1 -1
  184. package/dist/scripts/index.d.ts +62 -8
  185. package/dist/scripts/index.js +1 -1
  186. package/dist/scripts/loadZonos.js +1 -1
  187. package/dist/scripts/zonos.js +1 -1
  188. package/dist/types/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.d.ts +2 -0
  189. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +11 -0
  190. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -1
  191. package/dist/types/components/store/checkout/cart.d.ts +3 -0
  192. package/dist/types/components/store/hello/localization.d.ts +14 -3
  193. package/dist/types/components/store/translationStore/strings.arabic.d.ts +27 -15
  194. package/dist/types/components/store/translationStore/strings.base.d.ts +27 -15
  195. package/dist/types/components/store/translationStore/strings.chinese.d.ts +27 -15
  196. package/dist/types/components/store/translationStore/strings.danish.d.ts +27 -15
  197. package/dist/types/components/store/translationStore/strings.dutch.d.ts +27 -15
  198. package/dist/types/components/store/translationStore/strings.french.d.ts +27 -15
  199. package/dist/types/components/store/translationStore/strings.german.d.ts +27 -15
  200. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +27 -15
  201. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +27 -15
  202. package/dist/types/components/store/translationStore/strings.italian.d.ts +27 -15
  203. package/dist/types/components/store/translationStore/strings.japanese.d.ts +27 -15
  204. package/dist/types/components/store/translationStore/strings.korean.d.ts +27 -15
  205. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +27 -15
  206. package/dist/types/components/store/translationStore/strings.polish.d.ts +27 -15
  207. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +27 -15
  208. package/dist/types/components/store/translationStore/strings.russian.d.ts +27 -15
  209. package/dist/types/components/store/translationStore/strings.spanish.d.ts +27 -15
  210. package/dist/types/components/store/translationStore/strings.swedish.d.ts +27 -15
  211. package/dist/types/components/store/translationStore/strings.turkish.d.ts +27 -15
  212. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +27 -15
  213. package/dist/types/components/store/translationStore.d.ts +1 -1
  214. package/dist/types/components/utils/api/getInclusivePriceConfigurations.d.ts +2 -0
  215. package/dist/types/components/utils/getOverridenZCountry.d.ts +5 -0
  216. package/dist/types/components/utils/hasInclusivePrice.d.ts +1 -0
  217. package/dist/types/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.d.ts +1 -0
  218. package/dist/types/components/utils/hello/currencyConversion/applyInclusivePrice.d.ts +1 -0
  219. package/dist/types/components/utils/hello/currencyConversion/calculateInclusivePrice.d.ts +27 -0
  220. package/dist/types/constants/key.d.ts +9 -0
  221. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +1 -0
  222. package/dist/types/types/InclusivePricing.d.ts +13 -0
  223. package/dist/types/types/InputFieldLabel.d.ts +1 -0
  224. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +1 -0
  225. package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +2 -0
  226. package/dist/types/types/generated/graphql.internal.types.d.ts +686 -53
  227. package/dist/types/types/generated/graphql.internal.types.ts +740 -52
  228. package/dist/types/types/index.d.ts +1 -0
  229. package/dist/types/types/utils/ZonosSettings.d.ts +2 -0
  230. package/dist/types/utils/performBlurCurrency.d.ts +12 -0
  231. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  232. package/dist/zonos-elements/index.esm.js +1 -1
  233. package/dist/zonos-elements/{p-b91df44b.system.entry.js → p-00ac999f.system.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-4523b982.entry.js → p-00ec22b2.entry.js} +1 -1
  235. package/dist/zonos-elements/{p-bd373de0.system.entry.js → p-03ff7b01.system.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-5f7a9b69.system.entry.js → p-0a90dd80.system.entry.js} +1 -1
  237. package/dist/zonos-elements/p-100f6a88.system.entry.js +1 -0
  238. package/dist/zonos-elements/{p-cf56b990.entry.js → p-143d706b.entry.js} +1 -1
  239. package/dist/zonos-elements/p-14d7489d.js +1 -0
  240. package/dist/zonos-elements/p-1d5aa016.system.js +1 -0
  241. package/dist/zonos-elements/p-1eae4987.entry.js +1 -0
  242. package/dist/zonos-elements/p-1f894984.js +1 -0
  243. package/dist/zonos-elements/{p-6c8e4f01.system.entry.js → p-23b45714.system.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-433d76b4.system.js → p-23d497e3.system.js} +1 -1
  245. package/dist/zonos-elements/p-2557b96b.js +1 -0
  246. package/dist/zonos-elements/{p-f912e9c3.entry.js → p-27874c22.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-b0a75761.entry.js → p-2ca8b037.entry.js} +1 -1
  248. package/dist/zonos-elements/p-2dbcecf4.entry.js +1 -0
  249. package/dist/zonos-elements/p-30e835a8.entry.js +1 -0
  250. package/dist/zonos-elements/{p-236e0144.system.entry.js → p-316f9052.system.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-5608ac9d.entry.js → p-3185968f.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-fa90adb8.entry.js → p-31975752.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-6bab9096.entry.js → p-31af91f0.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-38f42f10.system.entry.js → p-452fb638.system.entry.js} +1 -1
  255. package/dist/zonos-elements/{p-c998e4ed.entry.js → p-4592ae49.entry.js} +1 -1
  256. package/dist/zonos-elements/p-4e41143a.system.entry.js +1 -0
  257. package/dist/zonos-elements/{p-f548807d.system.entry.js → p-52b87408.system.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-cb11d11b.system.entry.js → p-540cec7e.system.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-d2f7ea09.entry.js → p-55e2e4ed.entry.js} +1 -1
  260. package/dist/zonos-elements/p-561be3a2.system.js +1 -0
  261. package/dist/zonos-elements/{p-a199bb13.js → p-5762e217.js} +1 -1
  262. package/dist/zonos-elements/{p-e688e493.js → p-57fa64d7.js} +1 -1
  263. package/dist/zonos-elements/{p-360d7101.system.entry.js → p-59ebb8c7.system.entry.js} +1 -1
  264. package/dist/zonos-elements/p-5c680f72.js +1 -0
  265. package/dist/zonos-elements/{p-cbb01de9.entry.js → p-5f398c28.entry.js} +1 -1
  266. package/dist/zonos-elements/p-5f77d19e.js +1 -0
  267. package/dist/zonos-elements/p-60469388.system.entry.js +1 -0
  268. package/dist/zonos-elements/{p-caebc1f8.system.js → p-652e80f0.system.js} +1 -1
  269. package/dist/zonos-elements/{p-4da7b6a8.system.entry.js → p-6adfb3af.system.entry.js} +1 -1
  270. package/dist/zonos-elements/{p-2b84039a.entry.js → p-74ca7739.entry.js} +1 -1
  271. package/dist/zonos-elements/{p-de984173.system.js → p-767a31a8.system.js} +1 -1
  272. package/dist/zonos-elements/{p-38f2f63f.system.entry.js → p-770852bf.system.entry.js} +1 -1
  273. package/dist/zonos-elements/p-7c705c76.system.js +1 -0
  274. package/dist/zonos-elements/{p-2db90c99.system.entry.js → p-81ba2820.system.entry.js} +1 -1
  275. package/dist/zonos-elements/{p-964a4d85.js → p-82739127.js} +2 -2
  276. package/dist/zonos-elements/p-88ea9f82.entry.js +1 -0
  277. package/dist/zonos-elements/p-8a23bbf5.js +1 -0
  278. package/dist/zonos-elements/{p-10894d36.entry.js → p-905d2490.entry.js} +1 -1
  279. package/dist/zonos-elements/{p-24e26a2c.system.js → p-909e2bc3.system.js} +1 -1
  280. package/dist/zonos-elements/{p-b658c28a.entry.js → p-936b54c1.entry.js} +1 -1
  281. package/dist/zonos-elements/{p-288f5a5b.system.entry.js → p-93f2e1ee.system.entry.js} +1 -1
  282. package/dist/zonos-elements/p-989d3af9.system.js +2 -0
  283. package/dist/zonos-elements/{p-d96545ae.entry.js → p-9b8750f3.entry.js} +1 -1
  284. package/dist/zonos-elements/p-a0a4e43d.system.entry.js +1 -0
  285. package/dist/zonos-elements/{p-c89e9d56.system.js → p-a25428eb.system.js} +1 -1
  286. package/dist/zonos-elements/{p-7a97e1cf.system.entry.js → p-a2819807.system.entry.js} +1 -1
  287. package/dist/zonos-elements/{p-6d423364.entry.js → p-a6e74856.entry.js} +1 -1
  288. package/dist/zonos-elements/p-ab41bab5.js +2 -0
  289. package/dist/zonos-elements/p-ae940a99.js +1 -0
  290. package/dist/zonos-elements/{p-dc56b469.system.entry.js → p-b1fd1ec2.system.entry.js} +1 -1
  291. package/dist/zonos-elements/{p-7af39c98.js → p-b2a0ab4a.js} +1 -1
  292. package/dist/zonos-elements/{p-23f6a2fb.system.entry.js → p-b7ea5f4f.system.entry.js} +1 -1
  293. package/dist/zonos-elements/{p-c81f6387.entry.js → p-bf9d889f.entry.js} +1 -1
  294. package/dist/zonos-elements/p-c1ecab92.entry.js +1 -0
  295. package/dist/zonos-elements/{p-81b357f7.system.js → p-c2442878.system.js} +1 -1
  296. package/dist/zonos-elements/{p-7e5bd9af.system.entry.js → p-c288c6da.system.entry.js} +1 -1
  297. package/dist/zonos-elements/{p-b4bf2f03.entry.js → p-c50cc926.entry.js} +1 -1
  298. package/dist/zonos-elements/{p-b6ef4a5e.system.entry.js → p-c5cb2364.system.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-57413c34.system.js → p-c6e3d747.system.js} +1 -1
  300. package/dist/zonos-elements/{p-2dc38ef3.entry.js → p-c7b658cb.entry.js} +1 -1
  301. package/dist/zonos-elements/p-cf765af3.system.js +1 -0
  302. package/dist/zonos-elements/{p-89c5164b.system.js → p-d45285aa.system.js} +1 -1
  303. package/dist/zonos-elements/{p-bccd49d7.system.entry.js → p-d556c6d1.system.entry.js} +1 -1
  304. package/dist/zonos-elements/{p-1a67ae71.system.entry.js → p-db628e49.system.entry.js} +1 -1
  305. package/dist/zonos-elements/p-e03e1a62.entry.js +1 -0
  306. package/dist/zonos-elements/{p-6f1024de.system.entry.js → p-e7874318.system.entry.js} +1 -1
  307. package/dist/zonos-elements/p-e8949e7e.entry.js +1 -0
  308. package/dist/zonos-elements/p-ea0b5d10.system.js +1 -0
  309. package/dist/zonos-elements/p-eae3462c.entry.js +1 -0
  310. package/dist/zonos-elements/{p-b669050d.system.entry.js → p-eea0eb57.system.entry.js} +1 -1
  311. package/dist/zonos-elements/p-f892595d.system.entry.js +1 -0
  312. package/dist/zonos-elements/{p-23c46dfa.system.js → p-f8d56ba9.system.js} +1 -1
  313. package/dist/zonos-elements/p-fc776473.js +1 -0
  314. package/dist/zonos-elements/p-fd3b46ee.entry.js +1 -0
  315. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  316. package/dist/zonos-elements/zonos-elements.js +1 -1
  317. package/package.json +3 -3
  318. package/dist/esm-es5/cart-c74f9aaa.js +0 -1
  319. package/dist/esm-es5/index-55a03023.js +0 -2
  320. package/dist/esm-es5/localization-106476cb.js +0 -1
  321. package/dist/esm-es5/placeTestOrder-891295e8.js +0 -1
  322. package/dist/esm-es5/translationStore-766b7521.js +0 -1
  323. package/dist/types/components/utils/api/getInclusivePricing.d.ts +0 -6
  324. package/dist/zonos-elements/p-053a042e.entry.js +0 -1
  325. package/dist/zonos-elements/p-0ffd710e.js +0 -1
  326. package/dist/zonos-elements/p-1d15662c.js +0 -1
  327. package/dist/zonos-elements/p-203c7fda.js +0 -1
  328. package/dist/zonos-elements/p-21b251f0.system.entry.js +0 -1
  329. package/dist/zonos-elements/p-225a61c4.system.entry.js +0 -1
  330. package/dist/zonos-elements/p-258570ce.entry.js +0 -1
  331. package/dist/zonos-elements/p-462f8857.entry.js +0 -1
  332. package/dist/zonos-elements/p-57ee34aa.system.entry.js +0 -1
  333. package/dist/zonos-elements/p-595668d7.system.js +0 -1
  334. package/dist/zonos-elements/p-5fc34563.system.js +0 -2
  335. package/dist/zonos-elements/p-62803534.entry.js +0 -1
  336. package/dist/zonos-elements/p-6497ce22.entry.js +0 -1
  337. package/dist/zonos-elements/p-65db3219.entry.js +0 -1
  338. package/dist/zonos-elements/p-783e7fa7.entry.js +0 -1
  339. package/dist/zonos-elements/p-9972941a.entry.js +0 -1
  340. package/dist/zonos-elements/p-ad7be556.system.entry.js +0 -1
  341. package/dist/zonos-elements/p-b30c2ad9.js +0 -2
  342. package/dist/zonos-elements/p-b4fe3604.system.js +0 -1
  343. package/dist/zonos-elements/p-b8293509.js +0 -1
  344. package/dist/zonos-elements/p-bdeb20cb.js +0 -1
  345. package/dist/zonos-elements/p-c3c3cd98.js +0 -1
  346. package/dist/zonos-elements/p-c6d0e87d.system.entry.js +0 -1
  347. package/dist/zonos-elements/p-cdaf52f4.system.js +0 -1
  348. package/dist/zonos-elements/p-cef1e888.system.js +0 -1
  349. package/dist/zonos-elements/p-eea0d8af.js +0 -1
  350. 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: 'أسعار المنتجات تشمل الرسوم الجمركية بالفعل. لن تتم إضافة رسوم جمركية إضافية عند الدفع، باستثناءات نادرة.',
445
- },
446
- 'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.': {
447
- value: 'أسعار المنتجات تشمل الرسوم بالفعل. لن يتم إضافة أي رسوم إضافية عند الدفع، باستثناءات نادرة.',
440
+ 'Product prices already include duties and fees. No additional duties or fees will be added at checkout.': {
441
+ value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب. لن يتم إضافة أي رسوم أو ضرائب إضافية عند الدفع.',
448
442
  },
449
- 'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
450
- value: 'أسعار المنتجات تشمل بالفعل الضرائب والرسوم. لن يتم إضافة أي ضرائب أو رسوم إضافية عند الدفع، باستثناءات نادرة.',
443
+ 'Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.': {
444
+ value: 'أسعار المنتجات تشمل بالفعل الرسوم والضرائب والرسوم. لن تتم إضافة أي رسوم أو ضرائب أو رسوم إضافية عند الدفع.',
451
445
  },
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: 'مقاطعة',
@@ -548,6 +542,9 @@ export const stringsArabic = {
548
542
  'State/Province': {
549
543
  value: 'الولاية/المقاطعة',
550
544
  },
545
+ 'State/Province/Region/Prefecture': {
546
+ value: 'ولاية/مقاطعة/منطقة/محافظة',
547
+ },
551
548
  'Street address': {
552
549
  value: 'عنوان الشارع',
553
550
  },
@@ -575,9 +572,15 @@ export const stringsArabic = {
575
572
  'Taxes and fees': {
576
573
  value: 'الضرائب والرسوم',
577
574
  },
575
+ 'Taxes included': {
576
+ value: 'الضرائب مشمولة',
577
+ },
578
578
  'Taxes will apply to all orders.': {
579
579
  value: 'سيتم تطبيق الضرائب على جميع الطلبات.',
580
580
  },
581
+ 'Taxes, duties, and fees included': {
582
+ value: 'الضرائب والرسوم والرسوم مشمولة',
583
+ },
581
584
  'Test cards': {
582
585
  value: 'بطاقات اختبار',
583
586
  },
@@ -599,6 +602,9 @@ export const stringsArabic = {
599
602
  'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
600
603
  value: 'ينطبق قانون ضريبة السلع والخدمات منخفض القيمة الذي أُقر في 1 يوليو 2018 على هذا التاجر.',
601
604
  },
605
+ 'The purchase price covers duties, taxes and fees.': {
606
+ value: 'سعر الشراء يغطي الرسوم والضرائب والرسوم.',
607
+ },
602
608
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
603
609
  value: 'حدث خطأ في إنشاء جلسة الخروج الخاصة بك. يرجى إعادة التحميل والمحاولة مرة أخرى أو الاتصال بالدعم إذا استمر الخطأ',
604
610
  },
@@ -707,6 +713,12 @@ export const stringsArabic = {
707
713
  Zip: {
708
714
  value: 'الرمز البريدي',
709
715
  },
716
+ '[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
717
+ value: '[fieldLabel] يحتوي على [currentLength] حرفًا. يرجى تقصيرها إلى [maxLength] أو أقل أو نقل الباقي إلى سطر العنوان 2.',
718
+ },
719
+ '[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
720
+ value: '[fieldLabel] يحتوي على [currentLength] حرفًا. يرجى تقصيرها إلى [maxLength] أو أقل.',
721
+ },
710
722
  '[percentage] GST due on any order above [threshold].': {
711
723
  value: '[percentage] ضريبة القيمة المضافة مستحقة على أي طلب يتجاوز [threshold].',
712
724
  },
@@ -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.',
446
- },
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.',
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.',
449
443
  },
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.',
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.',
452
446
  },
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',
@@ -549,6 +543,9 @@ export const stringsBase = {
549
543
  'State/Province': {
550
544
  value: 'State/Province',
551
545
  },
546
+ 'State/Province/Region/Prefecture': {
547
+ value: 'State/Province/Region/Prefecture',
548
+ },
552
549
  'Street address': {
553
550
  value: 'Street address',
554
551
  },
@@ -576,9 +573,15 @@ export const stringsBase = {
576
573
  'Taxes and fees': {
577
574
  value: 'Taxes and fees',
578
575
  },
576
+ 'Taxes included': {
577
+ value: 'Taxes included',
578
+ },
579
579
  'Taxes will apply to all orders.': {
580
580
  value: 'Taxes will apply to all orders.',
581
581
  },
582
+ 'Taxes, duties, and fees included': {
583
+ value: 'Taxes, duties, and fees included',
584
+ },
582
585
  'Test cards': {
583
586
  value: 'Test cards',
584
587
  },
@@ -600,6 +603,9 @@ export const stringsBase = {
600
603
  'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
601
604
  value: 'The low-value GST law passed July 1st, 2018 applies to this retailer.',
602
605
  },
606
+ 'The purchase price covers duties, taxes and fees.': {
607
+ value: 'The purchase price covers duties, taxes and fees.',
608
+ },
603
609
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
604
610
  value: "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists",
605
611
  },
@@ -708,6 +714,12 @@ export const stringsBase = {
708
714
  Zip: {
709
715
  value: 'Zip',
710
716
  },
717
+ '[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
718
+ value: '[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.',
719
+ },
720
+ '[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
721
+ value: '[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.',
722
+ },
711
723
  '[percentage] GST due on any order above [threshold].': {
712
724
  value: '[percentage] GST due on any order above [threshold].',
713
725
  },