@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
@@ -8,7 +8,7 @@ import { log } from "../../utils/logging/log";
8
8
  import { logError } from "../../utils/logging/logError";
9
9
  import { sendErrorLog } from "../../utils/logging/sendErrorLog";
10
10
  import { validateEmailValue } from "../../utils/validateEmailValue";
11
- const MAX_RETRIES_INITIALIZE_LINK = 11;
11
+ const MAX_RETRIES_INITIALIZE_LINK = 51;
12
12
  /**
13
13
  * This component is a wrapper for the stripe authentication element that would render default style object
14
14
  */
@@ -85,6 +85,22 @@ export class ZonosLinkAuthentication {
85
85
  });
86
86
  stripeStore.stripeLinkElement = linkAuthenticationElement;
87
87
  this.retriesInitializeLink = 0;
88
+ // 10 seconds
89
+ if (this.retriesInitializeLink > 11) {
90
+ log('Stripe link element initialized', 'info', {
91
+ retriesInitializeLink: this.retriesInitializeLink,
92
+ stripe: this.stripe,
93
+ });
94
+ void sendErrorLog({
95
+ endpoint: 'stripe-link-authentication-init-long-running',
96
+ errors: [
97
+ 'Stripe link element initialized after 20 retries - 10 seconds',
98
+ ],
99
+ metadata: {
100
+ retriesInitializeLink: this.retriesInitializeLink,
101
+ },
102
+ });
103
+ }
88
104
  }
89
105
  catch (error) {
90
106
  if (error instanceof Error) {
@@ -99,7 +115,7 @@ export class ZonosLinkAuthentication {
99
115
  endpoint: 'stripe-link-authentication-init-error',
100
116
  errors: [error.message],
101
117
  metadata: {
102
- clientSecret: this.clientSecret,
118
+ retriesInitializeLink: this.retriesInitializeLink,
103
119
  },
104
120
  });
105
121
  }
@@ -65,7 +65,7 @@ export class ZonosPayment {
65
65
  }
66
66
  render() {
67
67
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
68
- return (h(Host, { key: 'c0b27f25785a9f6de2705e16d97f1bf5f7bcb0a4', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: '1cfdb16f94a5219882da9da013a6e2de6a6b3c3f', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: 'bb5ac07b4c32f2469f4825426160542d9729d332', class: "zonos--payment-component" }), h("div", { key: '34f805b56fa151e8a3102361df9fb8b3e636dc75', class: "zonos--payment-paypal-container" })));
68
+ return (h(Host, { key: 'ecf135f9da39d699a2287558a99310acd8e5fbd2', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: '67048977556c556826c26120f2c0654885f30c57', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '7762163776ac5ee3f8bbc7c65e31b5dc833bb011', class: "zonos--payment-component" }), h("div", { key: '4f12427f8db85442e0b41dd5eb194f374c6f1d86', class: "zonos--payment-paypal-container" })));
69
69
  }
70
70
  static get is() { return "zonos-payment"; }
71
71
  static get encapsulation() { return "scoped"; }
@@ -1,6 +1,6 @@
1
1
  import { handleFetch } from "../handleFetch";
2
2
  import { logError } from "../logging/logError";
3
- export const getInclusivePricing = async (countryCode) => {
3
+ export const getInclusivePriceConfigurations = async (countryCode) => {
4
4
  var _a;
5
5
  if (!countryCode) {
6
6
  return null;
@@ -1,11 +1,8 @@
1
+ import { getOverridenZCountry } from "../getOverridenZCountry";
1
2
  import { handleFetch } from "../handleFetch";
2
- import { getZCountryUrlParam } from "../hello/getZCountryUrlParam";
3
3
  export const getLocalization = async () => {
4
4
  try {
5
- const currentUrl = new URL(window.location.href);
6
- // load and use country from session storage when zCountry query param is not present
7
- const countryLoadedSession = window.sessionStorage.getItem('zonos--country');
8
- const zCountry = getZCountryUrlParam(currentUrl.searchParams) || countryLoadedSession;
5
+ const zCountry = getOverridenZCountry();
9
6
  const searchParams = new URLSearchParams();
10
7
  if (zCountry) {
11
8
  searchParams.set('zCountry', zCountry);
@@ -1,4 +1,5 @@
1
1
  import { getGenericSettingsOverride } from "./getGenericSettingsOverride";
2
+ import { getOverridenZCountry } from "../getOverridenZCountry";
2
3
  import { handleFetch } from "../handleFetch";
3
4
  import { log } from "../logging/log";
4
5
  import { logError } from "../logging/logError";
@@ -16,6 +17,10 @@ export const getZonosSettings = async () => {
16
17
  if (overrideSettings.overrideShouldEnabledCustomAddress) {
17
18
  params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
18
19
  }
20
+ const zCountry = getOverridenZCountry();
21
+ if (zCountry) {
22
+ params.set('zCountry', zCountry);
23
+ }
19
24
  const { errors, json, zonosMode } = await handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
20
25
  if (errors.length) {
21
26
  logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
@@ -1,7 +1,9 @@
1
1
  import { cartStore } from "../../store/checkout/cart";
2
2
  import { stripeStore } from "../../store/checkout/stripe";
3
+ import { localizationStore } from "../../store/hello/localization";
3
4
  import { storageStore } from "../../store/storageStore";
4
5
  import { extractName } from "../extractName";
6
+ import { getOverridenZCountry } from "../getOverridenZCountry";
5
7
  import { log } from "../logging/log";
6
8
  /**
7
9
  * Extract value from translated object
@@ -52,6 +54,7 @@ export const prepCartCalculateLandedCost = (cartId) => {
52
54
  const { firstName: billingFirstName, lastName: billingLastName } = extractName({
53
55
  name: translatedBillingAddress.name,
54
56
  });
57
+ const checkoutSessionCountry = getOverridenZCountry() || 'US';
55
58
  return {
56
59
  billingAddress: {
57
60
  addressLine1: translatedBillingAddress.line1,
@@ -71,6 +74,9 @@ export const prepCartCalculateLandedCost = (cartId) => {
71
74
  // Use the first item's currency code
72
75
  cartCurrencyCode: (_a = cartStore.items[0]) === null || _a === void 0 ? void 0 : _a.currencyCode,
73
76
  cartId,
77
+ checkoutSessionCountry: checkoutSessionCountry ||
78
+ localizationStore.selectedCountryCode ||
79
+ undefined,
74
80
  checkoutSessionId: storageStore.checkoutSessionId || '',
75
81
  contact: {
76
82
  companyName: stripeStore.companyName,
@@ -1,5 +1,6 @@
1
1
  import { cartStore } from "../../store/checkout/cart";
2
2
  import { getDisplayCurrency } from "./getDisplayCurrency";
3
+ import { applyInclusiveEffectiveRate } from "../hello/currencyConversion/applyInclusiveEffectiveRate";
3
4
  import { currencyFormat } from "../hello/currencyConversion/currencyFormat";
4
5
  /**
5
6
  * Unified currency rendering for checkout amounts.
@@ -8,12 +9,16 @@ import { currencyFormat } from "../hello/currencyConversion/currencyFormat";
8
9
  export const renderCheckoutCurrency = ({ amount, isForeign }) => {
9
10
  var _a, _b;
10
11
  const targetRate = ((_a = cartStore.exchangeRate) === null || _a === void 0 ? void 0 : _a.rate) || 1;
12
+ // If the amount already in foreign currency, no need to apply the inclusive effective rate since it's already has the inclusive effective rate applied
13
+ const appliedAmount = isForeign
14
+ ? amount
15
+ : applyInclusiveEffectiveRate(amount);
11
16
  const presentmentCurrency = cartStore.currency;
12
17
  const itemCurrency = (_b = cartStore.items[0]) === null || _b === void 0 ? void 0 : _b.currencyCode;
13
18
  // If the item currency is the same as the presentment currency, we can just return the amount in the presentment currency in the same format
14
19
  if (itemCurrency === presentmentCurrency) {
15
20
  return currencyFormat({
16
- amount,
21
+ amount: appliedAmount,
17
22
  currency: presentmentCurrency,
18
23
  });
19
24
  }
@@ -22,8 +27,8 @@ export const renderCheckoutCurrency = ({ amount, isForeign }) => {
22
27
  if (isForeign) {
23
28
  // Amount is in foreign currency, divide by the rate to convert it to the base currency if displaying in base currency
24
29
  const displayAmount = shouldDisplayBaseCurrency
25
- ? amount / targetRate
26
- : amount;
30
+ ? appliedAmount / targetRate
31
+ : appliedAmount;
27
32
  return currencyFormat({
28
33
  amount: displayAmount,
29
34
  currency: displayCurrency,
@@ -31,8 +36,8 @@ export const renderCheckoutCurrency = ({ amount, isForeign }) => {
31
36
  }
32
37
  // Amount is already in base currency, need to multiply rate to convert to foreign currency if display in foreign currency
33
38
  const displayAmount = shouldDisplayBaseCurrency
34
- ? amount
35
- : amount * targetRate;
39
+ ? appliedAmount
40
+ : appliedAmount * targetRate;
36
41
  return currencyFormat({
37
42
  amount: displayAmount,
38
43
  currency: displayCurrency,
@@ -44,7 +44,10 @@ export const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector
44
44
  return;
45
45
  }
46
46
  // update the country code in localization store and check if it's shippable
47
- localizationStoreUpdateSelectedCountryCode(shippingCountry);
47
+ localizationStoreUpdateSelectedCountryCode({
48
+ isInitializing: false,
49
+ newSelectedCountryCode: shippingCountry,
50
+ });
48
51
  // do nothing if the country is still domestic
49
52
  if (!isShippableCountry(false)) {
50
53
  // cleanup the domestic shipping session if it's domestic because we will open the intl checkout after redirecting
@@ -0,0 +1,11 @@
1
+ import { getZCountryUrlParam } from "./hello/getZCountryUrlParam";
2
+ /**
3
+ * Retrieve the zCountry from the URL or session storage.
4
+ */
5
+ export const getOverridenZCountry = () => {
6
+ const currentUrl = new URL(window.location.href);
7
+ // load and use country from session storage when zCountry query param is not present
8
+ const countryLoadedSession = window.sessionStorage.getItem('zonos--country');
9
+ const zCountry = getZCountryUrlParam(currentUrl.searchParams) || countryLoadedSession;
10
+ return zCountry;
11
+ };
@@ -0,0 +1,10 @@
1
+ import { localizationStore } from "../store/hello/localization";
2
+ import { DUTY_KEY, TAXES_KEY } from "../../constants/key";
3
+ export const hasInclusivePrice = () => {
4
+ var _a;
5
+ return (_a = localizationStore.inclusivePricingConfigurations) === null || _a === void 0 ? void 0 : _a.some(x => {
6
+ var _a, _b;
7
+ return ((_a = x.configurations[DUTY_KEY]) === null || _a === void 0 ? void 0 : _a.status) === 'ENABLED' ||
8
+ ((_b = x.configurations[TAXES_KEY]) === null || _b === void 0 ? void 0 : _b.status) === 'ENABLED';
9
+ });
10
+ };
@@ -0,0 +1,10 @@
1
+ import { localizationStore } from "../../../store/hello/localization";
2
+ export const applyInclusiveEffectiveRate = (amount) => {
3
+ const inclusivePrice = localizationStore.inclusivePricingConfigurations.find(x => x.shipToCountry === localizationStore.selectedCountryCode);
4
+ if (!inclusivePrice) {
5
+ return amount;
6
+ }
7
+ const effectiveRate = inclusivePrice.effectiveRate;
8
+ // Just multiply the amount by the effective rate to get the new amount for inclusive pricing
9
+ return amount * (1 + effectiveRate);
10
+ };
@@ -0,0 +1,39 @@
1
+ import { localizationStore } from "../../../store/hello/localization";
2
+ import { calculateInclusivePrice } from "./calculateInclusivePrice";
3
+ import { DUTY_KEY, NON_ZONOS_FEE_KEY, TAXES_KEY, ZONOS_FEE_KEY, } from "../../../../constants/key";
4
+ export const applyInclusivePrice = (amount) => {
5
+ const inclusivePrice = localizationStore.inclusivePricingConfigurations.find(x => x.shipToCountry === localizationStore.selectedCountryCode);
6
+ if (!inclusivePrice) {
7
+ return amount;
8
+ }
9
+ const dutyConfiguration = inclusivePrice.configurations[DUTY_KEY] || {
10
+ rate: 0,
11
+ status: 'DISABLED',
12
+ };
13
+ const taxConfiguration = inclusivePrice.configurations[TAXES_KEY] || {
14
+ rate: 0,
15
+ status: 'DISABLED',
16
+ };
17
+ const nonZonosFeeConfiguration = inclusivePrice.configurations[NON_ZONOS_FEE_KEY] || {
18
+ rate: 0,
19
+ status: 'DISABLED',
20
+ };
21
+ const zonosFeeConfiguration = inclusivePrice.configurations[ZONOS_FEE_KEY] || {
22
+ rate: 0,
23
+ status: 'DISABLED',
24
+ };
25
+ // Only use the rate if the configuration is enabled
26
+ const dutyRate = dutyConfiguration.status === 'ENABLED' ? dutyConfiguration.rate : 0;
27
+ const taxRate = taxConfiguration.status === 'ENABLED' ? taxConfiguration.rate : 0;
28
+ const nonZonosFeeRate = nonZonosFeeConfiguration.status === 'ENABLED'
29
+ ? nonZonosFeeConfiguration.rate
30
+ : 0;
31
+ const zonosFeeRate = zonosFeeConfiguration.status === 'ENABLED' ? zonosFeeConfiguration.rate : 0;
32
+ return calculateInclusivePrice({
33
+ amount,
34
+ dutyBuffer: dutyRate,
35
+ nonZonosFee: nonZonosFeeRate,
36
+ taxBuffer: taxRate,
37
+ zonosFee: zonosFeeRate,
38
+ });
39
+ };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Base item: $10
3
+ * Duty: 10%
4
+ * Taxes: 5%
5
+ * Zonos Fee: 14%
6
+ * Non-Zonos Fee: 7%
7
+ *
8
+ * Duty: $10 * 10% = $1
9
+ * Taxes: ($10 + $1) * 5% = $0.55
10
+ * Non-Zonos Fee: $10 * 7% = $0.7
11
+ * Zonos Fee: ($1 + $0.55 + $0.7) * 14% = $0.315
12
+ * Total: $10 + $1 + $0.55 + $0.7 + $0.315 = $12.565
13
+ *
14
+ * The calculation is performed as follows:
15
+ * - Duty: amount * dutyBuffer
16
+ * - Tax: (amount + duty) * taxBuffer
17
+ * - Non-Zonos Fee: amount * nonZonosFee
18
+ * - Zonos Fee: (duty + tax + nonZonosFee) * zonosFee
19
+ * - Total: amount + duty + tax + nonZonosFee + zonosFee
20
+ */
21
+ export const calculateInclusivePrice = ({ amount, dutyBuffer, nonZonosFee, taxBuffer, zonosFee, }) => {
22
+ const dutyBufferedAmount = amount * dutyBuffer;
23
+ const taxBufferedAmount = (amount + dutyBufferedAmount) * taxBuffer;
24
+ const nonZonosFeeBufferedAmount = amount * nonZonosFee;
25
+ const zonosFeeBufferedAmount = (dutyBufferedAmount + taxBufferedAmount + nonZonosFeeBufferedAmount) *
26
+ zonosFee;
27
+ return (amount +
28
+ dutyBufferedAmount +
29
+ taxBufferedAmount +
30
+ nonZonosFeeBufferedAmount +
31
+ zonosFeeBufferedAmount);
32
+ };
@@ -1,12 +1,13 @@
1
1
  import { localizationStore } from "../../../store/hello/localization";
2
2
  import { zonosStore } from "../../../store/zonosStore";
3
+ import { applyInclusiveEffectiveRate } from "./applyInclusiveEffectiveRate";
3
4
  import { currencyConvert } from "./currencyConvert";
4
5
  import { currencyConvertAndFormat } from "./currencyConvertAndFormat";
5
6
  import { currencyFormat } from "./currencyFormat";
6
7
  import { getCurrencyElements } from "./getCurrencyElements";
7
8
  import { getInitialElementAmount } from "./getInitialElementAmount";
8
9
  import { logError } from "../../logging/logError";
9
- import { performBlurCurrency, removeBlurCurrency, } from "../../../../utils/performBlurCurrency";
10
+ import { performBlurSpecificElement, removeBlurSpecificElement, } from "../../../../utils/performBlurCurrency";
10
11
  const convertCurrency = (element) => {
11
12
  var _a;
12
13
  const amount = getInitialElementAmount(element);
@@ -31,18 +32,20 @@ const convertCurrency = (element) => {
31
32
  // Update currency when the country code changes
32
33
  currentCountryValue !== localizationStore.selectedCountryCode)) {
33
34
  // Hide the currency until DOM is ready to display the new value
34
- performBlurCurrency();
35
+ const timeoutId = performBlurSpecificElement(element);
36
+ const appliedInclusivePrice = applyInclusiveEffectiveRate(amount);
35
37
  const customizedCurrencyFormat = typeof zonosStore.currencyConverter === 'function' &&
36
38
  zonosStore.currencyConverter({
37
39
  convert: currencyConvert,
38
40
  convertAndFormat: currencyConvertAndFormat,
39
41
  currencyCode: localizationStore.targetCurrency,
40
42
  format: (value) => currencyFormat({ amount: value }),
41
- originalAmount: amount,
43
+ originalAmount: appliedInclusivePrice,
42
44
  selector: element,
43
45
  });
44
46
  // default to the currencyConvertAndFormat if the currencyConverter function does not return a value, or invalid value. This is to make sure we don't break the merchant's price.
45
- const observedFormattedValue = customizedCurrencyFormat || currencyConvertAndFormat(amount);
47
+ const observedFormattedValue = customizedCurrencyFormat ||
48
+ currencyConvertAndFormat(appliedInclusivePrice);
46
49
  if (observedFormattedValue !== element.textContent) {
47
50
  // Only set textContent if the value has changed, this is to prevent it redrawing the element if the value is the same
48
51
  element.textContent = observedFormattedValue;
@@ -52,9 +55,11 @@ const convertCurrency = (element) => {
52
55
  // save the new value to the data-zintl attribute
53
56
  element.setAttribute('data-zintl', observedFormattedValue);
54
57
  element.setAttribute('data-zcountry-code', localizationStore.selectedCountryCode || '');
58
+ void removeBlurSpecificElement({
59
+ specificSelector: element,
60
+ timeoutId,
61
+ });
55
62
  }
56
- // Remove blur effect after the currency is converted
57
- void removeBlurCurrency();
58
63
  };
59
64
  export const defaultCurrencyConverter = () => {
60
65
  const { currencyElementSelector } = zonosStore.helloSettings;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Since the backend and the frontend are using the same keys,
3
+ * make sure to not change the key value below since if it changes
4
+ * and the frontend script is cached, the formula may not work as expected.
5
+ */
6
+ export const DUTY_KEY = 'gkjqw123';
7
+ export const NON_ZONOS_FEE_KEY = 'jUwjs2Hs3';
8
+ export const TAXES_KEY = 'Kq93wqw3';
9
+ export const ZONOS_FEE_KEY = 'eius22kk';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};