@zonos/elements 1.3.114 → 1.3.116

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 (272) hide show
  1. package/dist/cjs/{CheckoutConfig-5d7cf0c0.js → CheckoutConfig-f2622b6b.js} +1 -1
  2. package/dist/cjs/{cart-6d966eea.js → cart-b3f6a451.js} +143 -55
  3. package/dist/cjs/{getBorderRadius-53c35cd1.js → getBorderRadius-61ed5601.js} +1 -1
  4. package/dist/cjs/index.cjs.js +36 -13
  5. package/dist/cjs/{isDarkColor-87ee1eb7.js → isDarkColor-d206c6fa.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{paypal-ae7bd9f2.js → paypal-aab541fd.js} +3 -3
  8. package/dist/cjs/zonos-address_7.cjs.entry.js +12 -12
  9. package/dist/cjs/zonos-badge.cjs.entry.js +4 -4
  10. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-button_3.cjs.entry.js +6 -6
  12. package/dist/cjs/zonos-card.cjs.entry.js +6 -6
  13. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +32 -25
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +19 -8
  15. package/dist/cjs/zonos-collapse.cjs.entry.js +3 -3
  16. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  17. package/dist/cjs/zonos-controller.cjs.entry.js +28 -5
  18. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  19. package/dist/cjs/zonos-country-select_4.cjs.entry.js +12 -12
  20. package/dist/cjs/zonos-elements.cjs.js +1 -1
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +8 -8
  22. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  23. package/dist/cjs/zonos-input.cjs.entry.js +6 -6
  24. package/dist/cjs/zonos-language-select_2.cjs.entry.js +8 -8
  25. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-notification_3.cjs.entry.js +7 -7
  28. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  29. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  30. package/dist/cjs/zonos-toggle.cjs.entry.js +3 -3
  31. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-v-stack.cjs.entry.js +3 -3
  33. package/dist/cjs/{zonosStore-b18fe6b6.js → zonosStore-e12d459c.js} +1 -0
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +13 -2
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +13 -2
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +3 -6
  38. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  39. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  40. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  41. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  42. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  43. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  44. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  45. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  46. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  47. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  48. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  49. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  50. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  51. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  52. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  53. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  54. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  55. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  56. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  57. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  58. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  59. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +1 -1
  60. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  61. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  62. package/dist/collection/components/main/zonos-controller.js +1 -1
  63. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  64. package/dist/collection/components/store/checkout/stripe.js +38 -11
  65. package/dist/collection/components/store/hello/localization.js +28 -29
  66. package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
  67. package/dist/collection/components/store/translationStore/strings.base.js +3 -0
  68. package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
  69. package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
  70. package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
  71. package/dist/collection/components/store/translationStore/strings.french.js +3 -0
  72. package/dist/collection/components/store/translationStore/strings.german.js +3 -0
  73. package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
  74. package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
  75. package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
  76. package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
  77. package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
  78. package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
  79. package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
  80. package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
  81. package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
  82. package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
  83. package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
  84. package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
  85. package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
  86. package/dist/collection/components/store/zonosStore.js +1 -0
  87. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  88. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  89. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  90. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +14 -12
  91. package/dist/collection/components/utils/cleanHtmlMarkdown.js +1 -1
  92. package/dist/collection/components/utils/hello/initHello.js +23 -0
  93. package/dist/collection/scripts/_getTempCartById.js +1 -1
  94. package/dist/collection/scripts/_zonosBase.js +28 -5
  95. package/dist/esm/{CheckoutConfig-32f33d8b.js → CheckoutConfig-018263e2.js} +1 -1
  96. package/dist/esm/{cart-89bc298d.js → cart-fdaeeb8d.js} +143 -55
  97. package/dist/esm/{getBorderRadius-e55a9df1.js → getBorderRadius-008516a4.js} +1 -1
  98. package/dist/esm/index.js +37 -14
  99. package/dist/esm/{isDarkColor-4261bc3c.js → isDarkColor-dc08fa26.js} +1 -1
  100. package/dist/esm/loader.js +1 -1
  101. package/dist/esm/{paypal-804a4bcb.js → paypal-fb68deeb.js} +3 -3
  102. package/dist/esm/zonos-address_7.entry.js +12 -12
  103. package/dist/esm/zonos-badge.entry.js +4 -4
  104. package/dist/esm/zonos-banner.entry.js +1 -1
  105. package/dist/esm/zonos-button_3.entry.js +6 -6
  106. package/dist/esm/zonos-card.entry.js +6 -6
  107. package/dist/esm/zonos-cart-items_13.entry.js +32 -25
  108. package/dist/esm/zonos-checkout.entry.js +19 -8
  109. package/dist/esm/zonos-collapse.entry.js +3 -3
  110. package/dist/esm/zonos-component.entry.js +1 -1
  111. package/dist/esm/zonos-controller.entry.js +28 -5
  112. package/dist/esm/zonos-country-flag.entry.js +4 -4
  113. package/dist/esm/zonos-country-select_4.entry.js +12 -12
  114. package/dist/esm/zonos-elements.js +1 -1
  115. package/dist/esm/zonos-hello-dialog.entry.js +8 -8
  116. package/dist/esm/zonos-hello.entry.js +5 -5
  117. package/dist/esm/zonos-input.entry.js +6 -6
  118. package/dist/esm/zonos-language-select_2.entry.js +8 -8
  119. package/dist/esm/zonos-link.entry.js +1 -1
  120. package/dist/esm/zonos-logo.entry.js +3 -3
  121. package/dist/esm/zonos-notification_3.entry.js +7 -7
  122. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  123. package/dist/esm/zonos-text.entry.js +1 -1
  124. package/dist/esm/zonos-toggle.entry.js +3 -3
  125. package/dist/esm/zonos-tooltip.entry.js +2 -2
  126. package/dist/esm/zonos-v-stack.entry.js +3 -3
  127. package/dist/esm/{zonosStore-7798ac16.js → zonosStore-6b5bd87c.js} +1 -0
  128. package/dist/esm-es5/{CheckoutConfig-32f33d8b.js → CheckoutConfig-018263e2.js} +1 -1
  129. package/dist/esm-es5/cart-fdaeeb8d.js +1 -0
  130. package/dist/esm-es5/{getBorderRadius-e55a9df1.js → getBorderRadius-008516a4.js} +1 -1
  131. package/dist/esm-es5/index.js +1 -1
  132. package/dist/esm-es5/{isDarkColor-4261bc3c.js → isDarkColor-dc08fa26.js} +1 -1
  133. package/dist/esm-es5/loader.js +1 -1
  134. package/dist/esm-es5/{paypal-804a4bcb.js → paypal-fb68deeb.js} +1 -1
  135. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  136. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  137. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  138. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  139. package/dist/esm-es5/zonos-card.entry.js +1 -1
  140. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  141. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  142. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  143. package/dist/esm-es5/zonos-component.entry.js +1 -1
  144. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  145. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  146. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  147. package/dist/esm-es5/zonos-elements.js +1 -1
  148. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  149. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  150. package/dist/esm-es5/zonos-input.entry.js +1 -1
  151. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  152. package/dist/esm-es5/zonos-link.entry.js +1 -1
  153. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  154. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  155. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  156. package/dist/esm-es5/zonos-text.entry.js +1 -1
  157. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  158. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  159. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  160. package/dist/esm-es5/{zonosStore-7798ac16.js → zonosStore-6b5bd87c.js} +1 -1
  161. package/dist/scripts/index.d.ts +25 -12
  162. package/dist/scripts/index.js +1 -1
  163. package/dist/scripts/loadZonos.js +1 -1
  164. package/dist/scripts/zonos.js +1 -1
  165. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +5 -0
  166. package/dist/types/components/store/hello/localization.d.ts +1 -1
  167. package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
  168. package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
  169. package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
  170. package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
  171. package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
  172. package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
  173. package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
  174. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
  175. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
  176. package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
  177. package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
  178. package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
  179. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
  180. package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
  181. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
  182. package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
  183. package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
  184. package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
  185. package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
  186. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
  187. package/dist/types/components/store/translationStore.d.ts +1 -1
  188. package/dist/types/components/utils/api/prepCalculateLandedCost.d.ts +1 -1
  189. package/dist/types/components/utils/cleanHtmlMarkdown.d.ts +1 -1
  190. package/dist/types/components/utils/hello/initHello.d.ts +1 -0
  191. package/dist/types/components/utils/mergeConfig.d.ts +1 -1
  192. package/dist/types/scripts/_zonosBase.d.ts +1 -1
  193. package/dist/types/types/checkout/CheckoutConfig.d.ts +12 -11
  194. package/dist/types/types/global.d.ts +4 -0
  195. package/dist/types/types/hello/HelloConfig.d.ts +8 -0
  196. package/dist/zonos-elements/index.esm.js +1 -1
  197. package/dist/zonos-elements/{p-15750a04.system.js → p-00dc1507.system.js} +1 -1
  198. package/dist/zonos-elements/{p-ad733913.entry.js → p-069a1891.entry.js} +1 -1
  199. package/dist/zonos-elements/p-0b4a06cc.entry.js +1 -0
  200. package/dist/zonos-elements/p-0c57d568.system.entry.js +1 -0
  201. package/dist/zonos-elements/p-0c868b63.system.entry.js +1 -0
  202. package/dist/zonos-elements/p-0cedb17a.system.entry.js +1 -0
  203. package/dist/zonos-elements/p-122c318e.system.js +1 -0
  204. package/dist/zonos-elements/{p-c652212b.entry.js → p-149612d6.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-1769c0d2.entry.js → p-15fbb3a5.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-e4a69ce9.system.entry.js → p-1aed6403.system.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-1c1ab3c8.system.entry.js → p-1e4f7997.system.entry.js} +1 -1
  208. package/dist/zonos-elements/p-2628189b.js +1 -0
  209. package/dist/zonos-elements/{p-9d7a79e3.entry.js → p-26be7ea7.entry.js} +1 -1
  210. package/dist/zonos-elements/{p-7cb4523f.system.entry.js → p-28b79606.system.entry.js} +1 -1
  211. package/dist/zonos-elements/{p-a2edb77e.entry.js → p-2c9b4d6f.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-ead95c3b.entry.js → p-30b1eae9.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-55735806.system.entry.js → p-383f6e8c.system.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-d01cfb8b.system.entry.js → p-3a410b06.system.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-45214b34.system.entry.js → p-3dacae53.system.entry.js} +1 -1
  216. package/dist/zonos-elements/{p-1deb01e3.entry.js → p-3e2aa5e2.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-42d9d3af.system.entry.js → p-3f5b6e7a.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-2aa5575f.entry.js → p-44991bcf.entry.js} +1 -1
  219. package/dist/zonos-elements/{p-c598b3c5.entry.js → p-46d96a0d.entry.js} +1 -1
  220. package/dist/zonos-elements/{p-3c326d01.system.entry.js → p-48b42c33.system.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-ab9af87d.system.entry.js → p-55d26aaa.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-8f9198f2.system.js → p-579932dc.system.js} +1 -1
  223. package/dist/zonos-elements/p-5c37e64d.entry.js +1 -0
  224. package/dist/zonos-elements/{p-b35e67f7.system.entry.js → p-60e5a6a2.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-e5e63927.system.entry.js → p-66303c89.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-e559d12d.js → p-67a32cc5.js} +1 -1
  227. package/dist/zonos-elements/{p-05d558c2.entry.js → p-6b52ae05.entry.js} +1 -1
  228. package/dist/zonos-elements/{p-1c7e19f7.entry.js → p-6de38759.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-33b57fab.system.js → p-6e2f4ea1.system.js} +1 -1
  230. package/dist/zonos-elements/{p-019028d5.entry.js → p-7a4170ba.entry.js} +1 -1
  231. package/dist/zonos-elements/{p-ac97f26c.system.entry.js → p-80733970.system.entry.js} +1 -1
  232. package/dist/zonos-elements/{p-d3c1ad61.system.entry.js → p-86f0d69c.system.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-a24da794.js → p-91cfbf46.js} +1 -1
  234. package/dist/zonos-elements/{p-f26c4392.entry.js → p-93626c76.entry.js} +1 -1
  235. package/dist/zonos-elements/{p-8e6bbf2c.entry.js → p-99ab4440.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-42b0fca8.system.entry.js → p-9a89de05.system.entry.js} +1 -1
  237. package/dist/zonos-elements/{p-d49cdf77.system.entry.js → p-9e757bf5.system.entry.js} +1 -1
  238. package/dist/zonos-elements/{p-56d405d0.js → p-9eae2294.js} +1 -1
  239. package/dist/zonos-elements/{p-3c90f724.system.entry.js → p-b31095d5.system.entry.js} +1 -1
  240. package/dist/zonos-elements/p-b82e527a.entry.js +1 -0
  241. package/dist/zonos-elements/p-c325fd7b.entry.js +1 -0
  242. package/dist/zonos-elements/{p-daab619c.system.js → p-c3e98be6.system.js} +1 -1
  243. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  244. package/dist/zonos-elements/{p-2cce0f21.system.js → p-c85b4e43.system.js} +1 -1
  245. package/dist/zonos-elements/{p-514b42a4.system.entry.js → p-d1a3fa94.system.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-0a8b6b4a.system.entry.js → p-d3472a00.system.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-31acf417.entry.js → p-d91da318.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-e132bc3d.js → p-dd8fb969.js} +1 -1
  249. package/dist/zonos-elements/{p-f20b3656.entry.js → p-de2fe7f5.entry.js} +1 -1
  250. package/dist/zonos-elements/{p-032159ed.js → p-e1ce04b1.js} +1 -1
  251. package/dist/zonos-elements/{p-1605dd48.entry.js → p-e46bd90a.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-ec26f25a.system.entry.js → p-e47cba8e.system.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-1a0e138c.entry.js → p-ebb97202.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-442a308c.system.entry.js → p-eeb2c2f4.system.entry.js} +1 -1
  255. package/dist/zonos-elements/p-f1a5d662.system.entry.js +1 -0
  256. package/dist/zonos-elements/{p-ed222a50.entry.js → p-f8c88d80.entry.js} +1 -1
  257. package/dist/zonos-elements/p-fbedb337.system.js +1 -0
  258. package/dist/zonos-elements/{p-b34ccbfd.entry.js → p-ff6e4ea6.entry.js} +1 -1
  259. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  260. package/package.json +2 -2
  261. package/dist/esm-es5/cart-89bc298d.js +0 -1
  262. package/dist/zonos-elements/p-007c64dc.system.js +0 -1
  263. package/dist/zonos-elements/p-02b1e030.system.entry.js +0 -1
  264. package/dist/zonos-elements/p-30b8dbd4.entry.js +0 -1
  265. package/dist/zonos-elements/p-347c0756.entry.js +0 -1
  266. package/dist/zonos-elements/p-3cfa837c.entry.js +0 -1
  267. package/dist/zonos-elements/p-6ae2485b.system.js +0 -1
  268. package/dist/zonos-elements/p-97114032.js +0 -1
  269. package/dist/zonos-elements/p-d1f334d8.system.entry.js +0 -1
  270. package/dist/zonos-elements/p-ece0b7ab.system.entry.js +0 -1
  271. package/dist/zonos-elements/p-f25f6bf9.system.entry.js +0 -1
  272. package/dist/zonos-elements/p-fe781493.entry.js +0 -1
@@ -41,7 +41,7 @@ export class ZonosPaypalPayment {
41
41
  void this.loadPaypal();
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: '7be3c38f702c8fb105c54e652774f69fbbcfd34c', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: '6845b53c2a5d1f2637f3ae9d867d2c6de48ab1b5', class: "zonos--payment-paypal-container" })));
44
+ return (h(Host, { key: 'a09fe5b66b1ac971c10529ecb6213479f2870f08', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: '6ba337785b8a90965e0cba05fd62681bc92633fe', class: "zonos--payment-paypal-container" })));
45
45
  }
46
46
  static get is() { return "zonos-paypal-payment"; }
47
47
  static get encapsulation() { return "scoped"; }
@@ -248,15 +248,7 @@ const stripeStorePrefetchLandedCost = async (params) => {
248
248
  // prefetch landed cost will not update shipping and taxes since we haven't selected shipping method yet
249
249
  cartStoreApplySubtotals({
250
250
  method: (matchLandedCost === null || matchLandedCost === void 0 ? void 0 : matchLandedCost.landedCost.method) || 'DDP',
251
- subtotals: {
252
- adjustments: subtotals.adjustments,
253
- exchangeRate: subtotals.exchangeRate,
254
- items: subtotals.items,
255
- landedCostTotal: subtotals.landedCostTotal,
256
- presentmentCurrencyCode: subtotals.presentmentCurrencyCode,
257
- shipping: subtotals.shipping,
258
- total: subtotals.total,
259
- },
251
+ subtotals,
260
252
  });
261
253
  }
262
254
  }
@@ -484,7 +476,24 @@ const stripeStoreInitCheckoutSession = async () => {
484
476
  cartId: window.Zonos.cartId,
485
477
  currency: ((_a = cartStore.items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode) || '',
486
478
  itemsAmount: total,
487
- metadata: [{ key: 'language', value: localizationStore.selectedLocale }],
479
+ metadata: [
480
+ {
481
+ key: 'language',
482
+ value: localizationStore.selectedLocale,
483
+ },
484
+ {
485
+ key: 'appVersion',
486
+ value: window.Zonos.version,
487
+ },
488
+ {
489
+ key: 'appVersionNpmIntegration',
490
+ value: window.Zonos.isNpm ? '1' : '0',
491
+ },
492
+ {
493
+ key: 'legacyCheckoutFacade',
494
+ value: window.Zonos.isLegacyCheckout ? '1' : '0',
495
+ },
496
+ ],
488
497
  presentmentCountryCode: localizationStore.selectedCountryCode,
489
498
  };
490
499
  log('Checkout session body', 'info', body);
@@ -503,7 +512,7 @@ const stripeStoreInitCheckoutSession = async () => {
503
512
  stripeStore.clientSecret = result.clientSecret;
504
513
  cartStoreApplySubtotals({
505
514
  method: ((_b = result.landedCost) === null || _b === void 0 ? void 0 : _b.method) || 'DDP',
506
- subtotals: Object.assign(Object.assign({}, result.subtotals), { landedCostTotal: 0, shipping: 0, total: result.subtotals.items }),
515
+ subtotals: result.subtotals,
507
516
  });
508
517
  log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
509
518
  log('done-init-checkout-session');
@@ -523,6 +532,24 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
523
532
  id,
524
533
  itemsAmount,
525
534
  landedCostId,
535
+ metadata: [
536
+ {
537
+ key: 'language',
538
+ value: localizationStore.selectedLocale,
539
+ },
540
+ {
541
+ key: 'appVersion',
542
+ value: window.Zonos.version,
543
+ },
544
+ {
545
+ key: 'appVersionNpmIntegration',
546
+ value: window.Zonos.isNpm ? '1' : '0',
547
+ },
548
+ {
549
+ key: 'legacyCheckoutFacade',
550
+ value: window.Zonos.isLegacyCheckout ? '1' : '0',
551
+ },
552
+ ],
526
553
  presentmentCountryCode,
527
554
  },
528
555
  method: 'POST',
@@ -189,6 +189,33 @@ const initHelloCountryList = (allCountries) => {
189
189
  ? Object.assign(Object.assign({}, acc), { [countryCode]: countryInfo }) : acc;
190
190
  }, {});
191
191
  };
192
+ const updateCheckoutSessionLanguage = async () => {
193
+ if (!cartStore.checkoutSessionId) {
194
+ return null;
195
+ }
196
+ const { errors, json } = await handleFetch('/api/zonos-elements/update-checkout-session-metadata', {
197
+ body: {
198
+ id: cartStore.checkoutSessionId,
199
+ metadata: [
200
+ {
201
+ key: 'language',
202
+ value: localizationStore.selectedLocale,
203
+ },
204
+ ],
205
+ },
206
+ method: 'POST',
207
+ });
208
+ if (errors.length || !json) {
209
+ logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
210
+ return { errors, json };
211
+ }
212
+ return { errors: [], json };
213
+ };
214
+ const localizationStoreUpdateSelectedLocale = (newSelectedLocale) => {
215
+ localizationStore.selectedLocale = newSelectedLocale;
216
+ translationStoreUpdateLanguage(newSelectedLocale);
217
+ void updateCheckoutSessionLanguage();
218
+ };
192
219
  const initLocalizationStore = async () => {
193
220
  // all countries from countries.json, shipping zone and localization
194
221
  const [allCountries, shippingZoneCountries, localization] = await Promise.all([getCountries(), getShippingZones(), getLocalization()]);
@@ -207,8 +234,7 @@ const initLocalizationStore = async () => {
207
234
  localizationStoreUpdateSelectedCountryCode(country);
208
235
  // use locale from params if it exists, otherwise use locale from localization
209
236
  const overrideLocale = getOverrideLocale();
210
- localizationStore.selectedLocale = overrideLocale || locale || 'en';
211
- translationStoreUpdateLanguage(localizationStore.selectedLocale);
237
+ localizationStoreUpdateSelectedLocale(overrideLocale || locale || 'en');
212
238
  const devSites = [
213
239
  'dev.storybook.elements',
214
240
  'dev.elements',
@@ -223,31 +249,4 @@ const initLocalizationStore = async () => {
223
249
  }
224
250
  localizationStore.localizationLoaded = true;
225
251
  };
226
- const updateCheckoutSessionLanguage = async () => {
227
- if (!cartStore.checkoutSessionId) {
228
- return null;
229
- }
230
- const { errors, json } = await handleFetch('/api/zonos-elements/update-checkout-session-metadata', {
231
- body: {
232
- id: cartStore.checkoutSessionId,
233
- metadata: [
234
- {
235
- key: 'language',
236
- value: localizationStore.selectedLocale,
237
- },
238
- ],
239
- },
240
- method: 'POST',
241
- });
242
- if (errors.length || !json) {
243
- logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
244
- return { errors, json };
245
- }
246
- return { errors: [], json };
247
- };
248
- const localizationStoreUpdateSelectedLocale = (newSelectedLocale) => {
249
- localizationStore.selectedLocale = newSelectedLocale;
250
- translationStoreUpdateLanguage(newSelectedLocale);
251
- void updateCheckoutSessionLanguage();
252
- };
253
252
  export { initLocalizationStore, localizationDispose, localizationStore, localizationStoreOnUpdate, localizationStoreUpdateSelectedCountryCode, localizationStoreUpdateSelectedLocale, };
@@ -149,6 +149,9 @@ export const stringsArabic = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'يبدو أنك قدمت طلبًا قبل بضع دقائق فقط ([date] في [time]). تحقق من بريدك الإلكتروني لتأكيد الطلب. هل أنت متأكد أنك تريد تقديم طلب آخر؟',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'استمر في التسوق',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'تعرف على الرسوم والضرائب قبل الشراء. اشترِ بثقة!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsBase = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Keep shopping',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Know about duties and taxes before you buy. Shop with confidence!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsChinese = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: '您似乎在几分钟前下了订单([date] [time])。请检查您的电子邮件以获取订单确认。您确定要再下一个订单吗?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: '继续购物',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: '在购买之前了解关税和税款。放心购物!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsDanish = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Det ser ud til, at du har afgivet en ordre for få minutter siden ([date] kl. [time]). Tjek din e-mail for ordrebekræftelsen. Er du sikker på, at du vil afgive en til?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Fortsæt med at handle',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Lær om told og skatter, før du køber. Handle trygt!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsDutch = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Het lijkt erop dat je een paar minuten geleden een bestelling hebt geplaatst ([date] om [time]). Controleer je e-mail voor de orderbevestiging. Weet je zeker dat je er nog een wilt plaatsen?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Blijf winkelen',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Weet wat de heffingen en belastingen zijn voordat je koopt. Winkel met vertrouwen!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsFrench = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Il semble que vous ayez passé une commande il y a quelques minutes ([date] à [time]). Vérifiez votre e-mail pour la confirmation de commande. Êtes-vous sûr de vouloir en passer une autre?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Continuez vos achats',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: "Renseignez-vous sur les droits et taxes avant d'acheter. Achetez en toute confiance !",
154
157
  },
@@ -149,6 +149,9 @@ export const stringsGerman = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Es sieht so aus, als hätten Sie vor ein paar Minuten eine Bestellung aufgegeben ([date] um [time]). Überprüfen Sie Ihre E-Mails auf die Bestellbestätigung. Sind Sie sicher, dass Sie eine weitere aufgeben möchten?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Weiter einkaufen',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Informieren Sie sich vor dem Kauf über Zölle und Steuern. Kaufen Sie vertrauensvoll!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsHebrew = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'נראה שהזמנת לפני כמה דקות בלבד ([date] ב-[time]). בדוק את הדוא"ל שלך לאישור ההזמנה. האם אתה בטוח שברצונך לבצע הזמנה נוספת?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'המשך לקנות',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'למד על מכסים ומסים לפני שאתה קונה. קנה בביטחון!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsIndonesian = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Sepertinya Anda baru saja melakukan pemesanan beberapa menit yang lalu ([date] pukul [time]). Periksa email Anda untuk konfirmasi pesanan. Apakah Anda yakin ingin melakukan pemesanan lagi?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Lanjutkan berbelanja',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Ketahui tentang bea masuk dan pajak sebelum Anda membeli. Belanja dengan percaya diri!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsItalian = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: "Sembra che tu abbia effettuato un ordine solo pochi minuti fa ([date] alle [time]). Controlla la tua email per la conferma dell'ordine. Sei sicuro di volerne fare un altro?",
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Continua a fare acquisti',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Informati su dazi e tasse prima di acquistare. Acquista con fiducia!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsJapanese = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: '数分前に注文をしたようです([date] [time])。注文確認のメールを確認してください。もう一つ注文しますか?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: '買い物を続ける',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: '購入前に関税と税金を確認してください。安心してご利用ください!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsKorean = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: '몇 분 전에 주문하신 것 같습니다 ([date] [time]). 주문 확인 이메일을 확인하세요. 또 다른 주문을 하시겠습니까?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: '쇼핑 계속하기',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: '구매하기 전에 관세와 세금에 대해 알아보세요. 자신감 있게 쇼핑하세요!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsNorwegian = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Det ser ut som du la inn en bestilling for bare noen få minutter siden ([date] kl. [time]). Sjekk e-posten din for ordrebekreftelsen. Er du sikker på at du vil legge inn en til?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Fortsett å handle',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Finn ut om avgifter og skatt før du handler. Handle trygt!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsPolish = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Wygląda na to, że złożyłeś zamówienie zaledwie kilka minut temu ([date] o [time]). Sprawdź swoją skrzynkę e-mail, aby potwierdzić zamówienie. Czy na pewno chcesz złożyć kolejne?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Kontynuuj zakupy',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Dowiedz się o cłach i podatkach przed zakupem. Kupuj pewnie!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsPortuguese = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Parece que você fez um pedido há apenas alguns minutos ([date] às [time]). Verifique seu e-mail para a confirmação do pedido. Tem certeza de que deseja fazer outro?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Continue comprando',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Saiba sobre impostos e taxas antes de comprar. Compre com confiança!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsRussian = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Похоже, вы сделали заказ всего несколько минут назад ([date] в [time]). Проверьте свою электронную почту для подтверждения заказа. Вы уверены, что хотите сделать еще один?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Продолжайте покупки',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Узнайте о пошлинах и налогах перед покупкой. Покупайте с уверенностью!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsSpanish = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Parece que realizaste un pedido hace solo unos minutos ([date] a las [time]). Revisa tu correo electrónico para la confirmación del pedido. ¿Estás seguro de que quieres hacer otro?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Sigue comprando',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Conozca los aranceles e impuestos antes de comprar. ¡Compre con confianza!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsSwedish = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Det verkar som att du lade en beställning för bara några minuter sedan ([date] kl. [time]). Kontrollera din e-post för orderbekräftelsen. Är du säker på att du vill göra en till?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Fortsätt handla',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Känn till tull och skatter innan du köper. Handla med förtroende!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsTurkish = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Görünüşe göre birkaç dakika önce bir sipariş verdiniz ([date] saat [time]). Sipariş onayı için e-postanızı kontrol edin. Başka bir sipariş vermek istediğinizden emin misiniz?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Alışverişe devam et',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Satın almadan önce vergi ve gümrük vergileri hakkında bilgi edinin. Güvenle alışveriş yapın!',
154
157
  },
@@ -149,6 +149,9 @@ export const stringsVietnamese = {
149
149
  'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
150
  value: 'Có vẻ như bạn đã đặt hàng chỉ vài phút trước ([date] lúc [time]). Kiểm tra email của bạn để xác nhận đơn hàng. Bạn có chắc chắn muốn đặt thêm một cái nữa không?',
151
151
  },
152
+ 'Keep shopping': {
153
+ value: 'Tiếp tục mua sắm',
154
+ },
152
155
  'Know about duties and taxes before you buy. Shop with confidence!': {
153
156
  value: 'Tìm hiểu về thuế và phí trước khi mua hàng. Mua sắm với sự tự tin!',
154
157
  },
@@ -64,6 +64,7 @@ const { dispose: zonosStoreDispose, reset, state: zonosStore, } = createStore(()
64
64
  homepageUrlPattern: '',
65
65
  mobileLocation: 'BOTTOM_RIGHT',
66
66
  mode: 'LIVE',
67
+ notFoundElementFallback: null,
67
68
  organization: '',
68
69
  peekMessageBehavior: 'ENABLED',
69
70
  peekMessageDelay: 0,
@@ -138,7 +138,7 @@ export class ZonosAddress {
138
138
  }
139
139
  render() {
140
140
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
141
- return (h(Host, { key: 'e66063ffb032f5c5506e2fe72c5b8986b7c63b16', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'bd0e6d1f9a895b9c97f72b3e2a872ddc6420550f', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'e3fde23bbe25238a8d29005c9fe11b2d9f7f1cff', class: "zonos--address-component" })));
141
+ return (h(Host, { key: '50871d11c001d37882b61476acdc227fcf3e2abd', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '90ffd3b0cc76446c88f3afe864a9bc9ecabb3997', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '98c2bd4c328bc3df138ae61f767b70b18524e877', class: "zonos--address-component" })));
142
142
  }
143
143
  static get is() { return "zonos-address"; }
144
144
  static get encapsulation() { return "scoped"; }
@@ -42,7 +42,7 @@ export class ZonosLinkAuthentication {
42
42
  }
43
43
  render() {
44
44
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
45
- return (h(Host, { key: '715d58ba37c753ac4890aabf3b6979a759a5594a', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '1394e448a080a21522e91a62c8886d49c3616e59', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '417bc27477776220acfdc9d9f76acd91fd14c1ca', class: "zonos--link-authentication-component" })));
45
+ return (h(Host, { key: 'f0b26abf99ef99c6665dabdddebc9ff086b6816c', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '898dbdffac06fe2a68af90610a22044bb72391ce', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'e2ec9abb0cf76a39a1262e1366e375dd898450cd', class: "zonos--link-authentication-component" })));
46
46
  }
47
47
  static get is() { return "zonos-link-authentication"; }
48
48
  static get encapsulation() { return "scoped"; }
@@ -36,7 +36,7 @@ export class ZonosPayment {
36
36
  }
37
37
  render() {
38
38
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
39
- return (h(Host, { key: '7bab752dbac3a51f765e59355575801637ad8dd7', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: '755920aa1202842860391c3c6fe133878cbe84df', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '5224e2a003581bb1456d7eb05f443cee4c35fd76', class: "zonos--payment-component" }), h("div", { key: '58ff4898fbb318e6220611fdac63c6e58ef33aaf', class: "zonos--payment-paypal-container" })));
39
+ return (h(Host, { key: 'adcbeae4dadcaff59781ae47f779032e9fe43f5c', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: 'c83017ca67410a6715cacf6c0e524ed7b4304837', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '55c6d6dde8efaffec4411a838c62b7ede3efe30a', class: "zonos--payment-component" }), h("div", { key: 'd27b440253222daf94e4a6ad862c901efa54bfe5', class: "zonos--payment-paypal-container" })));
40
40
  }
41
41
  static get is() { return "zonos-payment"; }
42
42
  static get encapsulation() { return "scoped"; }
@@ -21,7 +21,7 @@ const getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
21
21
  };
22
22
  };
23
23
  /**
24
- * Similar to prepCalculateLandedCost except it only uses
24
+ * Similar to prepCalculateLandedCost except it only uses cart ID
25
25
  */
26
26
  export const prepCartCalculateLandedCost = (cartId) => {
27
27
  var _a;
@@ -120,6 +120,18 @@ export const prepCalculateLandedCost = () => {
120
120
  });
121
121
  const billingFirstName = translatedBillingAddress.name.split(' ')[0] || '';
122
122
  const billingLastName = translatedBillingAddress.name.split(' ').splice(1).join(' ') || '';
123
+ const adjustments = cartStore.promoCode
124
+ ? [
125
+ {
126
+ amount: 0,
127
+ productId: null,
128
+ promoCode: cartStore.promoCode,
129
+ sku: null,
130
+ type: 'PROMO_CODE',
131
+ },
132
+ ...cartStore.adjustments,
133
+ ]
134
+ : cartStore.adjustments;
123
135
  return {
124
136
  billingAddress: {
125
137
  addressLine1: translatedBillingAddress.line1,
@@ -146,17 +158,7 @@ export const prepCalculateLandedCost = () => {
146
158
  phone: translatedShippingAddress.phone,
147
159
  },
148
160
  items: cartStore.items,
149
- landedCostAdjustments: cartStore.promoCode
150
- ? [
151
- {
152
- amount: 0,
153
- productId: null,
154
- promoCode: cartStore.promoCode,
155
- sku: null,
156
- type: 'PROMO_CODE',
157
- },
158
- ]
159
- : [],
161
+ landedCostAdjustments: adjustments,
160
162
  shippingAddress: {
161
163
  addressLine1: translatedShippingAddress.line1,
162
164
  addressLine2: translatedShippingAddress.line2,
@@ -13,7 +13,7 @@ const turndownService = new TurndownService();
13
13
  * @example
14
14
  * const htmlInput = "<h1>Hello World</h1><p>This is a paragraph.</p>";
15
15
  * const result = cleanHtmlMarkdown(htmlInput);
16
- * console.log(result); // Outputs cleaned HTML after conversion and processing
16
+ * console.info(result); // Outputs cleaned HTML after conversion and processing
17
17
  */
18
18
  export const cleanHtmlMarkdown = (htmlString) => {
19
19
  const mdString = turndownService.turndown(htmlString);
@@ -12,6 +12,20 @@ const injectHelloComponent = (anchorElementSelector) => {
12
12
  }
13
13
  return false;
14
14
  };
15
+ const convertPosition = (position) => {
16
+ switch (position) {
17
+ case 'BOTTOM_RIGHT':
18
+ return 'bottom-right';
19
+ case 'BOTTOM_LEFT':
20
+ return 'bottom-left';
21
+ case 'TOP_LEFT':
22
+ return 'top-left';
23
+ case 'TOP_RIGHT':
24
+ return 'top-right';
25
+ default:
26
+ return 'bottom-right';
27
+ }
28
+ };
15
29
  /**
16
30
  * Injects the hello mobile wrapper to the DOM and returns the anchor element selector
17
31
  * @returns anchor element selector
@@ -87,5 +101,14 @@ export const initHello = async (helloSettings) => {
87
101
  // inject hello to mobile anchor if hello is still not found
88
102
  injectHelloComponent(helloAnchor);
89
103
  }, 1000);
104
+ setTimeout(() => {
105
+ if (helloSettings.notFoundElementFallback) {
106
+ log(`Hello anchor selector ${helloSettings.anchorElementSelector} not found after 3 seconds, falling back to 'notFoundElementFallback': ${helloSettings.notFoundElementFallback}`, 'info');
107
+ const defaultAnchor = injectDefaultWrapper({
108
+ position: convertPosition(helloSettings.notFoundElementFallback),
109
+ });
110
+ injectHelloComponent(defaultAnchor);
111
+ }
112
+ }, 3000);
90
113
  }
91
114
  };
@@ -16,7 +16,7 @@ export const getTempCartById = async ({ cartId, retries, }) => {
16
16
  retries,
17
17
  });
18
18
  // wait 1 second before retrying
19
- await new Promise(resolve => setTimeout(resolve, 1000));
19
+ await new Promise(resolve => setTimeout(resolve, 500));
20
20
  return getTempCartById({ cartId, retries: retries - 1 });
21
21
  }
22
22
  if (failedResponse) {
@@ -58,7 +58,8 @@ Zonos.cartData = null;
58
58
  Zonos.paypal = null;
59
59
  Zonos.getCurrentTimestamp = () => new Date().getTime();
60
60
  Zonos.zonosController = null;
61
- Zonos.init = async ({ appearance, checkoutSettings, currencyConverter, helloSettings, onCountryChange, overrideCurrencyFormat, storeId, zonosApiKey, }) => {
61
+ Zonos.init = async (params) => {
62
+ const { appearance, checkoutSettings, currencyConverter, helloSettings, onCountryChange, overrideCurrencyFormat, storeId, zonosApiKey, } = params;
62
63
  _a.cartId = getCartIdFromQueryParam();
63
64
  if (_a.doneInit) {
64
65
  // do nothing if zonos is already initialized
@@ -69,6 +70,28 @@ Zonos.init = async ({ appearance, checkoutSettings, currencyConverter, helloSett
69
70
  _a.storeId = storeId;
70
71
  if (_a.isNpm) {
71
72
  log('====== ZONOS LOADING FROM NPM ======');
73
+ const zonosQaUrl = getZonosQaUrl();
74
+ // if zonosQaUrl is available, inject the script from the zonosQaUrl and then call init again
75
+ if (zonosQaUrl && !window.isZonosPreview) {
76
+ log(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${zonosQaUrl} ======`, 'info');
77
+ // inject the script from zonosQaUrl
78
+ const script = document.createElement('script');
79
+ script.src = `${zonosQaUrl}/dist/scripts/zonos.js`;
80
+ document.head.appendChild(script);
81
+ script.addEventListener('load', () => {
82
+ window.Zonos.isNpm = _a.isNpm;
83
+ window.Zonos.isBigCommerce = _a.isBigCommerce;
84
+ window.Zonos.isLegacyCheckout = _a.isLegacyCheckout;
85
+ // call init again after the script is loaded
86
+ void window.Zonos.init(params);
87
+ });
88
+ script.addEventListener('error', () => {
89
+ alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${zonosQaUrl}`);
90
+ });
91
+ // Set so won't inject the preview script again
92
+ window.isZonosPreview = true;
93
+ return;
94
+ }
72
95
  // zonosApiKey is required if tempCartUUID in query params are not provided
73
96
  if (!zonosApiKey && !_a.cartId) {
74
97
  logError('Zonos API key is required unless `tempCartUUID` is provided in url query params.');
@@ -80,13 +103,13 @@ Zonos.init = async ({ appearance, checkoutSettings, currencyConverter, helloSett
80
103
  */
81
104
  if (!_a.cartData && _a.cartId) {
82
105
  log('Initialize cart data');
83
- const params = await setupCartData(_a.cartId);
84
- if (!params) {
106
+ const cartinfo = await setupCartData(_a.cartId);
107
+ if (!cartinfo) {
85
108
  logError('Failed to get cart data');
86
109
  return;
87
110
  }
88
- _a.cartData = params.cartData;
89
- _a.zonosApiKey = params.zonosApiKey;
111
+ _a.cartData = cartinfo.cartData;
112
+ _a.zonosApiKey = cartinfo.zonosApiKey;
90
113
  }
91
114
  }
92
115
  // inject hidden button to body to trigger checkout right away if we have cartData
@@ -16,7 +16,7 @@ const getTempCartById = async ({ cartId, retries, }) => {
16
16
  retries,
17
17
  });
18
18
  // wait 1 second before retrying
19
- await new Promise(resolve => setTimeout(resolve, 1000));
19
+ await new Promise(resolve => setTimeout(resolve, 500));
20
20
  return getTempCartById({ cartId, retries: retries - 1 });
21
21
  }
22
22
  if (failedResponse) {