@zonos/elements 1.3.18-alpha.2 → 1.3.18-alpha.3

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 (334) hide show
  1. package/README.md +341 -96
  2. package/dist/cjs/{cart-941a31dd.js → cart-5468dfd1.js} +29 -84
  3. package/dist/cjs/index.cjs.js +624 -0
  4. package/dist/cjs/logError-4e2f2020.js +58 -0
  5. package/dist/cjs/{submitGtag-9210b4fe.js → submitGtag-127a220f.js} +3 -2
  6. package/dist/cjs/zonos-address_8.cjs.entry.js +13 -12
  7. package/dist/cjs/zonos-badge_2.cjs.entry.js +3 -3
  8. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  9. package/dist/cjs/zonos-card_2.cjs.entry.js +7 -6
  10. package/dist/cjs/zonos-cart-items_11.cjs.entry.js +11 -10
  11. package/dist/cjs/zonos-checkout.cjs.entry.js +15 -14
  12. package/dist/cjs/zonos-controller.cjs.entry.js +25 -20
  13. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -1
  14. package/dist/cjs/zonos-country-select_3.cjs.entry.js +6 -5
  15. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -1
  16. package/dist/cjs/zonos-hello.cjs.entry.js +10 -9
  17. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  18. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  19. package/dist/cjs/zonos-payment.cjs.entry.js +3 -2
  20. package/dist/collection/__mocks__/zonos-url/index.js +1 -0
  21. package/dist/collection/__tests__/build-utils/urlCheckOne.js +1 -1
  22. package/dist/collection/collection-manifest.json +1 -1
  23. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -9
  24. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -3
  25. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +3 -3
  26. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  27. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  28. package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
  29. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  30. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  31. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  32. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  33. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  34. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  35. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  36. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  37. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  38. package/dist/collection/components/common/{component-template/zonos-link → zonos-link}/zonos-link.js +1 -1
  39. package/dist/collection/components/main/zonos-controller.js +10 -6
  40. package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -3
  41. package/dist/collection/environment.js +0 -2
  42. package/dist/collection/index.js +1 -0
  43. package/dist/collection/scripts/_extractZonosQaUrl.js +26 -0
  44. package/dist/collection/scripts/_getZonosQaUrl.js +40 -0
  45. package/dist/collection/scripts/{loadStripe.js → _loadStripe.js} +1 -1
  46. package/dist/collection/scripts/{zonosBase.js → _zonosBase.js} +29 -6
  47. package/dist/collection/scripts/index.js +2 -0
  48. package/dist/collection/types/generated/graphql.customer.types.js +1 -0
  49. package/dist/collection/types/generated/graphql.frontend.types.js +1 -0
  50. package/dist/esm/{cart-cc593c2b.js → cart-63d120e1.js} +2 -55
  51. package/dist/esm/index.js +621 -0
  52. package/dist/esm/logError-c456c092.js +55 -0
  53. package/dist/esm/{submitGtag-e50f903f.js → submitGtag-35bb3945.js} +2 -1
  54. package/dist/esm/zonos-address_8.entry.js +11 -10
  55. package/dist/esm/zonos-badge_2.entry.js +3 -3
  56. package/dist/esm/zonos-button_3.entry.js +3 -3
  57. package/dist/esm/zonos-card_2.entry.js +7 -6
  58. package/dist/esm/zonos-cart-items_11.entry.js +11 -10
  59. package/dist/esm/zonos-checkout.entry.js +3 -2
  60. package/dist/esm/zonos-controller.entry.js +8 -3
  61. package/dist/esm/zonos-country-flag.entry.js +2 -1
  62. package/dist/esm/zonos-country-select_3.entry.js +6 -5
  63. package/dist/esm/zonos-hello-dialog.entry.js +2 -1
  64. package/dist/esm/zonos-hello.entry.js +2 -1
  65. package/dist/esm/zonos-input.entry.js +4 -4
  66. package/dist/esm/zonos-link.entry.js +1 -1
  67. package/dist/esm/zonos-payment.entry.js +2 -1
  68. package/dist/esm-es5/cart-63d120e1.js +1 -0
  69. package/dist/esm-es5/index.js +1 -0
  70. package/dist/esm-es5/logError-c456c092.js +1 -0
  71. package/dist/esm-es5/submitGtag-35bb3945.js +1 -0
  72. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  73. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  74. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  75. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  76. package/dist/esm-es5/zonos-cart-items_11.entry.js +1 -1
  77. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  78. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  79. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  80. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  81. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  82. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  83. package/dist/esm-es5/zonos-input.entry.js +1 -1
  84. package/dist/esm-es5/zonos-link.entry.js +1 -1
  85. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  86. package/dist/scripts/index.d.ts +3908 -0
  87. package/dist/scripts/index.js +1 -0
  88. package/dist/scripts/loadZonos.d.ts +3954 -0
  89. package/dist/scripts/loadZonos.js +1 -1
  90. package/dist/scripts/zonos.js +1 -1
  91. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +5 -7
  92. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +2 -2
  93. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +2 -2
  94. package/dist/types/components/main/zonos-controller.d.ts +1 -1
  95. package/dist/types/components/store/checkout/stripe.d.ts +1 -1
  96. package/dist/types/components/store/zonosStore.d.ts +1 -1
  97. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -2
  98. package/dist/types/components/utils/styles.d.ts +1 -0
  99. package/dist/types/components.d.ts +22 -14
  100. package/dist/types/index.d.ts +1 -0
  101. package/dist/types/scripts/_extractZonosQaUrl.d.ts +11 -0
  102. package/dist/types/scripts/_getZonosQaUrl.d.ts +4 -0
  103. package/dist/types/scripts/{loadStripe.d.ts → _loadStripe.d.ts} +1 -1
  104. package/dist/types/scripts/{zonosBase.d.ts → _zonosBase.d.ts} +36 -2
  105. package/dist/types/scripts/index.d.ts +2 -0
  106. package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
  107. package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +9 -0
  108. package/dist/types/types/generated/graphql.customer.types.d.ts +1 -0
  109. package/dist/types/types/generated/graphql.customer.types.ts +3 -0
  110. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -0
  111. package/dist/types/types/generated/graphql.frontend.types.ts +1 -0
  112. package/dist/types/types/global.d.ts +1 -1
  113. package/dist/zonos-elements/index.esm.js +1 -0
  114. package/dist/zonos-elements/p-023c764c.system.entry.js +1 -0
  115. package/dist/zonos-elements/p-06b6ce37.system.entry.js +1 -0
  116. package/dist/zonos-elements/p-07c53d83.entry.js +1 -0
  117. package/dist/zonos-elements/{p-9aab3ad7.entry.js → p-0d5b5bcc.entry.js} +1 -1
  118. package/dist/zonos-elements/p-200b661c.entry.js +1 -0
  119. package/dist/zonos-elements/p-3b66df06.system.entry.js +1 -0
  120. package/dist/zonos-elements/{p-020a9b86.entry.js → p-3ba8838a.entry.js} +1 -1
  121. package/dist/zonos-elements/p-428c034a.entry.js +1 -0
  122. package/dist/zonos-elements/p-43b2d28d.system.entry.js +1 -0
  123. package/dist/zonos-elements/p-47a42a30.js +1 -0
  124. package/dist/zonos-elements/{p-d0bc8902.system.entry.js → p-4f72bfee.system.entry.js} +1 -1
  125. package/dist/zonos-elements/p-4fc1459c.entry.js +1 -0
  126. package/dist/zonos-elements/p-4fca8fd5.system.entry.js +1 -0
  127. package/dist/zonos-elements/{p-9e9c318b.entry.js → p-58fc8ec1.entry.js} +1 -1
  128. package/dist/zonos-elements/p-63db40b9.system.js +1 -0
  129. package/dist/zonos-elements/{p-c20e5430.entry.js → p-6cb9812b.entry.js} +1 -1
  130. package/dist/zonos-elements/p-6df1fc3a.system.entry.js +1 -0
  131. package/dist/zonos-elements/p-6f6f160d.entry.js +1 -0
  132. package/dist/zonos-elements/p-7c78e340.entry.js +1 -0
  133. package/dist/zonos-elements/p-808fa731.js +1 -0
  134. package/dist/zonos-elements/p-80f174b9.system.js +1 -0
  135. package/dist/zonos-elements/p-85f3d13f.system.js +1 -0
  136. package/dist/zonos-elements/p-8aeb0629.entry.js +1 -0
  137. package/dist/zonos-elements/p-9288fd21.system.entry.js +1 -0
  138. package/dist/zonos-elements/p-98ad4ab3.system.entry.js +1 -0
  139. package/dist/zonos-elements/p-b1567fa3.system.entry.js +1 -0
  140. package/dist/zonos-elements/p-b81562f5.entry.js +1 -0
  141. package/dist/zonos-elements/{p-96b8c9ba.system.entry.js → p-bdfa3705.system.entry.js} +1 -1
  142. package/dist/zonos-elements/p-cfae51c1.system.js +1 -0
  143. package/dist/zonos-elements/p-d6eb260c.entry.js +1 -0
  144. package/dist/zonos-elements/p-dc40a60c.entry.js +1 -0
  145. package/dist/zonos-elements/{p-3e26d7b3.system.entry.js → p-dda78e8e.system.entry.js} +1 -1
  146. package/dist/zonos-elements/p-de405d7e.system.entry.js +1 -0
  147. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  148. package/dist/zonos-elements/p-eaa335e1.js +1 -0
  149. package/dist/zonos-elements/{p-e13bfbda.system.entry.js → p-ed3524ae.system.entry.js} +1 -1
  150. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  151. package/package.json +4 -2
  152. package/dist/components/ILanguage.js +0 -24
  153. package/dist/components/classes.js +0 -12
  154. package/dist/components/containsNonLatinChars.js +0 -21
  155. package/dist/components/formatCurrency.js +0 -11
  156. package/dist/components/getBorderRadius.js +0 -18
  157. package/dist/components/index.d.ts +0 -33
  158. package/dist/components/index.js +0 -1
  159. package/dist/components/isCheckoutMobile.js +0 -6
  160. package/dist/components/isColorVariable.js +0 -14
  161. package/dist/components/isDarkColor.js +0 -1199
  162. package/dist/components/stripe.js +0 -1691
  163. package/dist/components/submitGtag.js +0 -19
  164. package/dist/components/trackConversionEvent.js +0 -37
  165. package/dist/components/translationStore.js +0 -5611
  166. package/dist/components/zonos-address-display.d.ts +0 -11
  167. package/dist/components/zonos-address-display.js +0 -6
  168. package/dist/components/zonos-address-display2.js +0 -64
  169. package/dist/components/zonos-address-form.d.ts +0 -11
  170. package/dist/components/zonos-address-form.js +0 -6
  171. package/dist/components/zonos-address-form2.js +0 -84
  172. package/dist/components/zonos-address-update-dialog.d.ts +0 -11
  173. package/dist/components/zonos-address-update-dialog.js +0 -6
  174. package/dist/components/zonos-address-update-dialog2.js +0 -264
  175. package/dist/components/zonos-address.d.ts +0 -11
  176. package/dist/components/zonos-address.js +0 -6
  177. package/dist/components/zonos-address2.js +0 -176
  178. package/dist/components/zonos-badge.d.ts +0 -11
  179. package/dist/components/zonos-badge.js +0 -6
  180. package/dist/components/zonos-badge2.js +0 -61
  181. package/dist/components/zonos-banner.d.ts +0 -11
  182. package/dist/components/zonos-banner.js +0 -6
  183. package/dist/components/zonos-banner2.js +0 -95
  184. package/dist/components/zonos-button.d.ts +0 -11
  185. package/dist/components/zonos-button.js +0 -6
  186. package/dist/components/zonos-button2.js +0 -186
  187. package/dist/components/zonos-card.d.ts +0 -11
  188. package/dist/components/zonos-card.js +0 -6
  189. package/dist/components/zonos-card2.js +0 -57
  190. package/dist/components/zonos-cart-items.d.ts +0 -11
  191. package/dist/components/zonos-cart-items.js +0 -6
  192. package/dist/components/zonos-cart-items2.js +0 -57
  193. package/dist/components/zonos-cart-restricted-items.d.ts +0 -11
  194. package/dist/components/zonos-cart-restricted-items.js +0 -6
  195. package/dist/components/zonos-cart-restricted-items2.js +0 -135
  196. package/dist/components/zonos-cart-subtotal.d.ts +0 -11
  197. package/dist/components/zonos-cart-subtotal.js +0 -6
  198. package/dist/components/zonos-cart-subtotal2.js +0 -91
  199. package/dist/components/zonos-checkbox.d.ts +0 -11
  200. package/dist/components/zonos-checkbox.js +0 -6
  201. package/dist/components/zonos-checkbox2.js +0 -96
  202. package/dist/components/zonos-checkout-finish.d.ts +0 -11
  203. package/dist/components/zonos-checkout-finish.js +0 -6
  204. package/dist/components/zonos-checkout-finish2.js +0 -246
  205. package/dist/components/zonos-checkout-footer.d.ts +0 -11
  206. package/dist/components/zonos-checkout-footer.js +0 -6
  207. package/dist/components/zonos-checkout-footer2.js +0 -125
  208. package/dist/components/zonos-checkout-payment.d.ts +0 -11
  209. package/dist/components/zonos-checkout-payment.js +0 -6
  210. package/dist/components/zonos-checkout-payment2.js +0 -104
  211. package/dist/components/zonos-checkout-progress-tabs.d.ts +0 -11
  212. package/dist/components/zonos-checkout-progress-tabs.js +0 -6
  213. package/dist/components/zonos-checkout-progress-tabs2.js +0 -138
  214. package/dist/components/zonos-checkout.d.ts +0 -11
  215. package/dist/components/zonos-checkout.js +0 -1051
  216. package/dist/components/zonos-collapse.d.ts +0 -11
  217. package/dist/components/zonos-collapse.js +0 -6
  218. package/dist/components/zonos-collapse2.js +0 -78
  219. package/dist/components/zonos-component.d.ts +0 -11
  220. package/dist/components/zonos-component.js +0 -48
  221. package/dist/components/zonos-confirm-dialog.d.ts +0 -11
  222. package/dist/components/zonos-confirm-dialog.js +0 -6
  223. package/dist/components/zonos-confirm-dialog2.js +0 -161
  224. package/dist/components/zonos-controller.d.ts +0 -11
  225. package/dist/components/zonos-controller.js +0 -309
  226. package/dist/components/zonos-country-flag.d.ts +0 -11
  227. package/dist/components/zonos-country-flag.js +0 -6
  228. package/dist/components/zonos-country-flag2.js +0 -54
  229. package/dist/components/zonos-country-select.d.ts +0 -11
  230. package/dist/components/zonos-country-select.js +0 -6
  231. package/dist/components/zonos-country-select2.js +0 -1891
  232. package/dist/components/zonos-custom-message.d.ts +0 -11
  233. package/dist/components/zonos-custom-message.js +0 -6
  234. package/dist/components/zonos-custom-message2.js +0 -72
  235. package/dist/components/zonos-customer-info.d.ts +0 -11
  236. package/dist/components/zonos-customer-info.js +0 -6
  237. package/dist/components/zonos-customer-info2.js +0 -316
  238. package/dist/components/zonos-dialog.d.ts +0 -11
  239. package/dist/components/zonos-dialog.js +0 -6
  240. package/dist/components/zonos-dialog2.js +0 -136
  241. package/dist/components/zonos-hello-dialog-footer.d.ts +0 -11
  242. package/dist/components/zonos-hello-dialog-footer.js +0 -6
  243. package/dist/components/zonos-hello-dialog-footer2.js +0 -83
  244. package/dist/components/zonos-hello-dialog.d.ts +0 -11
  245. package/dist/components/zonos-hello-dialog.js +0 -6
  246. package/dist/components/zonos-hello-dialog2.js +0 -305
  247. package/dist/components/zonos-hello.d.ts +0 -11
  248. package/dist/components/zonos-hello.js +0 -879
  249. package/dist/components/zonos-icon.d.ts +0 -11
  250. package/dist/components/zonos-icon.js +0 -6
  251. package/dist/components/zonos-icon2.js +0 -55
  252. package/dist/components/zonos-input.d.ts +0 -11
  253. package/dist/components/zonos-input.js +0 -6
  254. package/dist/components/zonos-input2.js +0 -78
  255. package/dist/components/zonos-language-select.d.ts +0 -11
  256. package/dist/components/zonos-language-select.js +0 -6
  257. package/dist/components/zonos-language-select2.js +0 -88
  258. package/dist/components/zonos-link-authentication.d.ts +0 -11
  259. package/dist/components/zonos-link-authentication.js +0 -6
  260. package/dist/components/zonos-link-authentication2.js +0 -80
  261. package/dist/components/zonos-link.d.ts +0 -11
  262. package/dist/components/zonos-link.js +0 -43
  263. package/dist/components/zonos-logo.d.ts +0 -11
  264. package/dist/components/zonos-logo.js +0 -49
  265. package/dist/components/zonos-notification.d.ts +0 -11
  266. package/dist/components/zonos-notification.js +0 -6
  267. package/dist/components/zonos-notification2.js +0 -92
  268. package/dist/components/zonos-payment.d.ts +0 -11
  269. package/dist/components/zonos-payment.js +0 -6
  270. package/dist/components/zonos-payment2.js +0 -77
  271. package/dist/components/zonos-review.d.ts +0 -11
  272. package/dist/components/zonos-review.js +0 -6
  273. package/dist/components/zonos-review2.js +0 -89
  274. package/dist/components/zonos-select-dialog-header.d.ts +0 -11
  275. package/dist/components/zonos-select-dialog-header.js +0 -6
  276. package/dist/components/zonos-select-dialog-header2.js +0 -71
  277. package/dist/components/zonos-shipping-rich-radio.d.ts +0 -11
  278. package/dist/components/zonos-shipping-rich-radio.js +0 -6
  279. package/dist/components/zonos-shipping-rich-radio2.js +0 -88
  280. package/dist/components/zonos-shipping.d.ts +0 -11
  281. package/dist/components/zonos-shipping.js +0 -6
  282. package/dist/components/zonos-shipping2.js +0 -159
  283. package/dist/components/zonos-spinner.d.ts +0 -11
  284. package/dist/components/zonos-spinner.js +0 -6
  285. package/dist/components/zonos-spinner2.js +0 -43
  286. package/dist/components/zonos-text.d.ts +0 -11
  287. package/dist/components/zonos-text.js +0 -6
  288. package/dist/components/zonos-text2.js +0 -182
  289. package/dist/components/zonos-tooltip.d.ts +0 -11
  290. package/dist/components/zonos-tooltip.js +0 -6
  291. package/dist/components/zonos-tooltip2.js +0 -48
  292. package/dist/components/zonos-v-stack.d.ts +0 -11
  293. package/dist/components/zonos-v-stack.js +0 -6
  294. package/dist/components/zonos-v-stack2.js +0 -38
  295. package/dist/components/zonosStore.js +0 -2881
  296. package/dist/esm-es5/cart-cc593c2b.js +0 -1
  297. package/dist/esm-es5/submitGtag-e50f903f.js +0 -1
  298. package/dist/scripts/checkIfLoadVersionDomain.js +0 -1
  299. package/dist/scripts/extractZonosQaUrl.js +0 -1
  300. package/dist/scripts/getTempCartById.js +0 -1
  301. package/dist/scripts/loadStripe.js +0 -1
  302. package/dist/scripts/stripe.js +0 -1
  303. package/dist/scripts/zonosBase.js +0 -1
  304. package/dist/zonos-elements/p-04030a48.entry.js +0 -1
  305. package/dist/zonos-elements/p-0e892292.entry.js +0 -1
  306. package/dist/zonos-elements/p-0fac99e7.entry.js +0 -1
  307. package/dist/zonos-elements/p-1795c760.system.entry.js +0 -1
  308. package/dist/zonos-elements/p-24ac1c6f.entry.js +0 -1
  309. package/dist/zonos-elements/p-26a60a6e.entry.js +0 -1
  310. package/dist/zonos-elements/p-32744531.entry.js +0 -1
  311. package/dist/zonos-elements/p-35ac375a.system.entry.js +0 -1
  312. package/dist/zonos-elements/p-3bc88c3c.system.entry.js +0 -1
  313. package/dist/zonos-elements/p-4caaaaeb.system.entry.js +0 -1
  314. package/dist/zonos-elements/p-50ea2036.system.js +0 -1
  315. package/dist/zonos-elements/p-5e783394.entry.js +0 -1
  316. package/dist/zonos-elements/p-6366e7e3.entry.js +0 -1
  317. package/dist/zonos-elements/p-7c8ee4b9.system.entry.js +0 -1
  318. package/dist/zonos-elements/p-80ea85b8.entry.js +0 -1
  319. package/dist/zonos-elements/p-8da16d53.system.js +0 -1
  320. package/dist/zonos-elements/p-98a0b694.system.entry.js +0 -1
  321. package/dist/zonos-elements/p-b98cdf39.system.entry.js +0 -1
  322. package/dist/zonos-elements/p-d7b8c1c1.system.entry.js +0 -1
  323. package/dist/zonos-elements/p-dd0fd351.entry.js +0 -1
  324. package/dist/zonos-elements/p-e015cb0e.js +0 -1
  325. package/dist/zonos-elements/p-e1fbd05d.system.entry.js +0 -1
  326. package/dist/zonos-elements/p-e553dd19.js +0 -1
  327. package/dist/zonos-elements/p-e6fa0ebc.system.js +0 -1
  328. package/dist/zonos-elements/p-f6546bf4.system.entry.js +0 -1
  329. /package/dist/collection/components/common/{component-template/zonos-link → zonos-link}/zonos-link.css +0 -0
  330. /package/dist/collection/scripts/{checkIfLoadVersionDomain.js → _checkIfLoadVersionDomain.js} +0 -0
  331. /package/dist/collection/scripts/{stripe.js → _stripe.js} +0 -0
  332. /package/dist/types/components/common/{component-template/zonos-link → zonos-link}/zonos-link.d.ts +0 -0
  333. /package/dist/types/scripts/{checkIfLoadVersionDomain.d.ts → _checkIfLoadVersionDomain.d.ts} +0 -0
  334. /package/dist/types/scripts/{stripe.d.ts → _stripe.d.ts} +0 -0
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-7c6205ca.js');
4
+ const logError = require('./logError-4e2f2020.js');
4
5
  const isDarkColor = require('./isDarkColor-b0393089.js');
5
6
  const getBorderRadius = require('./getBorderRadius-bcb309a8.js');
6
7
 
@@ -5745,60 +5746,6 @@ const getCountries = async () => {
5745
5746
  }
5746
5747
  };
5747
5748
 
5748
- const log = (message, type, ...additionalInfo) => {
5749
- var _a, _b;
5750
- const isDebug = !!((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.debug) ||
5751
- !!window.location.search.match(/\?.*(&*)zonosDebug=1/);
5752
- // if debug is false, do not log
5753
- if (!isDebug) {
5754
- // log errors to the console if the type is error
5755
- if (type === 'error') {
5756
- // eslint-disable-next-line no-console
5757
- console.error(message, ...additionalInfo);
5758
- }
5759
- return;
5760
- }
5761
- let loggingIframe = document.querySelector('iframe#zonos---debug-logging-iframe');
5762
- if (!loggingIframe) {
5763
- // add a hidden iframe
5764
- loggingIframe = document.createElement('iframe');
5765
- loggingIframe.id = 'zonos---debug-logging-iframe';
5766
- loggingIframe.style.display = 'none';
5767
- loggingIframe.style.opacity = '0';
5768
- loggingIframe.style.position = 'absolute';
5769
- loggingIframe.style.top = '-9999px';
5770
- loggingIframe.style.left = '-9999px';
5771
- loggingIframe.style.width = '1px';
5772
- loggingIframe.style.height = '1px';
5773
- loggingIframe.style.border = 'none';
5774
- loggingIframe.style.overflow = 'hidden';
5775
- loggingIframe.style.visibility = 'hidden';
5776
- document.body.appendChild(loggingIframe);
5777
- }
5778
- // use the logging iframe's console to log just in case the console is disabled (overriden) by the site owner
5779
- const zConsole = ((_b = loggingIframe.contentWindow) === null || _b === void 0 ? void 0 : _b.window.console) || window.console;
5780
- switch (type) {
5781
- case 'warn':
5782
- zConsole.warn(message, ...additionalInfo);
5783
- break;
5784
- case 'info':
5785
- zConsole.info(message, ...additionalInfo);
5786
- break;
5787
- case 'error':
5788
- zConsole.error(message, ...additionalInfo);
5789
- break;
5790
- default:
5791
- zConsole.groupCollapsed(message, ...additionalInfo);
5792
- zConsole.trace();
5793
- zConsole.groupEnd();
5794
- break;
5795
- }
5796
- };
5797
-
5798
- const logError = (message, ...rest) => {
5799
- log(message, 'error', ...rest);
5800
- };
5801
-
5802
5749
  const getCountryLandedCost = async (countryCode) => {
5803
5750
  var _a;
5804
5751
  if (!countryCode) {
@@ -5807,7 +5754,7 @@ const getCountryLandedCost = async (countryCode) => {
5807
5754
  const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/country-landed-cost/${countryCode}`;
5808
5755
  const { errors, json } = await handleFetch(url);
5809
5756
  if (errors.length || !json) {
5810
- logError(`Error fetching country landed cost: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
5757
+ logError.logError(`Error fetching country landed cost: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
5811
5758
  return null;
5812
5759
  }
5813
5760
  return json || null;
@@ -5822,7 +5769,7 @@ const getExchangeRate = async ({ country, isGuaranteed, sourceCurrency, targetCu
5822
5769
  const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/exchange-rates?sourceCurrency=${sourceCurrency}&targetCurrency=${targetCurrency}&isGuaranteed=${isGuaranteed}&country=${country}`;
5823
5770
  const { errors, json } = await handleFetch(url);
5824
5771
  if (errors.length || !json) {
5825
- logError(`Error fetching country landed cost: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
5772
+ logError.logError(`Error fetching country landed cost: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
5826
5773
  return { exchangeRate: null, maxAge: null };
5827
5774
  }
5828
5775
  const { maxAge, rate, targetFormat } = json.exchangeRateCreate;
@@ -5839,7 +5786,7 @@ const getLocaleMessages = async ({ countryCode, localeTo, storeId, }) => {
5839
5786
  const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/locale-messages?countryCode=${countryCode}&storeId=${storeId}&localeTo=${localeTo}`;
5840
5787
  const { errors, json } = await handleFetch(url);
5841
5788
  if (errors.length || !json) {
5842
- logError('Error fetching exchange rate', (_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message);
5789
+ logError.logError('Error fetching exchange rate', (_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message);
5843
5790
  return [];
5844
5791
  }
5845
5792
  return json.locale_countryCodesPage;
@@ -5883,7 +5830,7 @@ const getShippingZones = async () => {
5883
5830
  const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/shipping-zones`;
5884
5831
  const { errors, json } = await handleFetch(url);
5885
5832
  if (errors.length || !json) {
5886
- logError(`Error fetching shipping zones: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
5833
+ logError.logError(`Error fetching shipping zones: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
5887
5834
  return null;
5888
5835
  }
5889
5836
  const shippingZones = (_b = json === null || json === void 0 ? void 0 : json.shippingZones) === null || _b === void 0 ? void 0 : _b.flatMap(zone => zone === null || zone === void 0 ? void 0 : zone.countryCodes).filter(Boolean);
@@ -5960,12 +5907,12 @@ const isValidSelector = (selector) => {
5960
5907
  const getCurrencyElements = (selector) => {
5961
5908
  const currencySelector = selector || '.money';
5962
5909
  if (!isValidSelector(currencySelector)) {
5963
- logError(`Currency element selector "${currencySelector}" is not valid.`);
5910
+ logError.logError(`Currency element selector "${currencySelector}" is not valid.`);
5964
5911
  return null;
5965
5912
  }
5966
5913
  const currencyElements = document.querySelectorAll(currencySelector);
5967
5914
  if (!currencyElements.length) {
5968
- log(`No currency elements found with selector "${currencySelector}"`, 'warn');
5915
+ logError.log(`No currency elements found with selector "${currencySelector}"`, 'warn');
5969
5916
  return null;
5970
5917
  }
5971
5918
  // return array of currency elements instead of a NodeList
@@ -6020,7 +5967,7 @@ const defaultCurrencyConverter = () => {
6020
5967
  return;
6021
5968
  }
6022
5969
  if (!localizationStore.exchangeRate) {
6023
- logError('Could not display currency. Exchange rate and format data is not available.');
5970
+ logError.logError('Could not display currency. Exchange rate and format data is not available.');
6024
5971
  return;
6025
5972
  }
6026
5973
  currencyElements.forEach((element) => {
@@ -6105,7 +6052,7 @@ const startExchangeRateTimeout = ({ isGuaranteed, maxAge, }) => {
6105
6052
  }, maxAgeToUse * 1000);
6106
6053
  };
6107
6054
  const getNewLocalization = async () => {
6108
- log('get new localization store');
6055
+ logError.log('get new localization store');
6109
6056
  const { isShippableCountry, selectedCountryCode } = localizationStore;
6110
6057
  if (zonosStore.zonosStore.helloSettings.currencyBehavior === 'DISABLED' ||
6111
6058
  !isShippableCountry ||
@@ -6143,7 +6090,7 @@ const getOverrideLocale = () => {
6143
6090
  };
6144
6091
  const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
6145
6092
  var _a, _b;
6146
- log('update selected country code');
6093
+ logError.log('update selected country code');
6147
6094
  localizationStore.selectedCountryCode = newSelectedCountryCode;
6148
6095
  const { selectedCountryCode, shippingZoneCountries } = localizationStore;
6149
6096
  const isShippableCountry = shippingZoneCountries &&
@@ -6151,7 +6098,7 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
6151
6098
  !!shippingZoneCountries[selectedCountryCode];
6152
6099
  // update shippable country
6153
6100
  localizationStore.isShippableCountry = !!isShippableCountry;
6154
- log(`Is shippable country: ${localizationStore.isShippableCountry}`);
6101
+ logError.log(`Is shippable country: ${localizationStore.isShippableCountry}`);
6155
6102
  if (!selectedCountryCode) {
6156
6103
  return;
6157
6104
  }
@@ -6223,7 +6170,7 @@ const updateCheckoutSessionLanguage = async () => {
6223
6170
  method: 'POST',
6224
6171
  });
6225
6172
  if (errors.length || !json) {
6226
- logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
6173
+ logError.logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
6227
6174
  return { errors, json };
6228
6175
  }
6229
6176
  return { errors: [], json };
@@ -6568,7 +6515,7 @@ const initStripeElements = async (props) => {
6568
6515
  var _a, _b;
6569
6516
  const clientSecret = stripeStore.clientSecret;
6570
6517
  if (!stripeStore.stripe) {
6571
- log('Skip. Stripe is not initialized');
6518
+ logError.log('Skip. Stripe is not initialized');
6572
6519
  return;
6573
6520
  }
6574
6521
  if (clientSecret) {
@@ -6588,11 +6535,11 @@ const initStripeElements = async (props) => {
6588
6535
  stripeStore.stripeElements = (_a = stripeStore.stripe) === null || _a === void 0 ? void 0 : _a.elements(stripeOptions);
6589
6536
  // save stripe elements options for later comparison
6590
6537
  stripeStore.stripeElementsOptions = stripeOptions;
6591
- log('Stripe elements initialized');
6538
+ logError.log('Stripe elements initialized');
6592
6539
  // init stripe elements for billing address
6593
6540
  stripeStore.stripeElementsForBillingAddress =
6594
6541
  (_b = stripeStore.stripe) === null || _b === void 0 ? void 0 : _b.elements(stripeOptions);
6595
- log('Stripe elements for billing address initialized');
6542
+ logError.log('Stripe elements for billing address initialized');
6596
6543
  return;
6597
6544
  }
6598
6545
  if (!isSameOptions) {
@@ -6603,7 +6550,7 @@ const initStripeElements = async (props) => {
6603
6550
  // save stripe elements options for later comparison
6604
6551
  stripeStore.stripeElementsOptions = stripeOptions;
6605
6552
  }
6606
- log('Stripe elements initialized');
6553
+ logError.log('Stripe elements initialized');
6607
6554
  }
6608
6555
  };
6609
6556
  const stripeStoreReset = () => {
@@ -6718,7 +6665,7 @@ const stripeStorePrefetchLandedCost = async () => {
6718
6665
  // default to empty array if we fail to fetch landed cost, so we can show the error message
6719
6666
  cartStore.landedCostData = [];
6720
6667
  cartStore.shippingData = [];
6721
- logError(err);
6668
+ logError.logError(err);
6722
6669
  }
6723
6670
  stripeStore.isFetchingLandedCost = false;
6724
6671
  }
@@ -6776,7 +6723,7 @@ const stripeStoreRetrievePayment = async ({ clientSecret: _clientSecret, storybo
6776
6723
  }
6777
6724
  const clientSecret = _clientSecret || stripeStore.clientSecret;
6778
6725
  if (!stripeStore.stripe || !clientSecret) {
6779
- logError('Failed to retrieve payment intent. Stripe is not initialized');
6726
+ logError.logError('Failed to retrieve payment intent. Stripe is not initialized');
6780
6727
  return { error: true, message: [translate('Something went wrong.')] };
6781
6728
  }
6782
6729
  const { paymentIntent } = await stripeStore.stripe.retrievePaymentIntent(clientSecret);
@@ -6829,7 +6776,7 @@ const stripeStoreInitCheckoutSession = async () => {
6829
6776
  var _a;
6830
6777
  const total = cartStore.items.reduce((amount, item) => amount + item.amount * item.quantity, 0);
6831
6778
  if (!total || !localizationStore.targetCurrency) {
6832
- logError('Fail to create checkout session - invalid total or currency');
6779
+ logError.logError('Fail to create checkout session - invalid total or currency');
6833
6780
  return false;
6834
6781
  }
6835
6782
  stripeStore.isFetchingSession = true;
@@ -6846,7 +6793,7 @@ const stripeStoreInitCheckoutSession = async () => {
6846
6793
  });
6847
6794
  stripeStore.isFetchingSession = false;
6848
6795
  if (errors.length || !json) {
6849
- logError('Error occurs when creating checkout session', JSON.stringify(errors, null, 2));
6796
+ logError.logError('Error occurs when creating checkout session', JSON.stringify(errors, null, 2));
6850
6797
  return false;
6851
6798
  }
6852
6799
  const result = json.checkoutSessionCreate;
@@ -6854,8 +6801,8 @@ const stripeStoreInitCheckoutSession = async () => {
6854
6801
  // update cart store with updated informations
6855
6802
  cartStore.checkoutSessionId = result.id;
6856
6803
  cartStoreApplySubtotals(Object.assign(Object.assign({}, result.subtotals), { landedCostTotal: 0, shipping: 0, total: result.subtotals.items }));
6857
- log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
6858
- log('done-init-checkout-session');
6804
+ logError.log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
6805
+ logError.log('done-init-checkout-session');
6859
6806
  return true;
6860
6807
  };
6861
6808
  /**
@@ -6875,7 +6822,7 @@ const stripeStoreUpdateCheckoutSession = async ({ currency, id, itemsAmount, lan
6875
6822
  method: 'POST',
6876
6823
  });
6877
6824
  if (errors.length || !json) {
6878
- logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
6825
+ logError.logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
6879
6826
  return { errors, json };
6880
6827
  }
6881
6828
  return { errors: [], json };
@@ -6969,7 +6916,7 @@ const stripeStoreTranslateAddressToLatin = async ({ addressInvalidCharactersList
6969
6916
  method: 'POST',
6970
6917
  });
6971
6918
  if (errors.length || !json) {
6972
- logError('Error occurs when translating address to latin', JSON.stringify(errors, null, 2));
6919
+ logError.logError('Error occurs when translating address to latin', JSON.stringify(errors, null, 2));
6973
6920
  // reset translated address if we fail to translate and let user manually fix it
6974
6921
  stripeStore.translatedAddress = {
6975
6922
  address: {},
@@ -7108,7 +7055,7 @@ const getMatchItem = ({ item1, item2, }) => {
7108
7055
  * Check and set restricted items in cart
7109
7056
  */
7110
7057
  const cartStoreCheckItemRestrictions = (itemsWorkflow) => {
7111
- log('Checking item restrictions');
7058
+ logError.log('Checking item restrictions');
7112
7059
  const mappedRestrictedItems = itemsWorkflow
7113
7060
  .map(item => {
7114
7061
  if (!item.restriction) {
@@ -7164,11 +7111,11 @@ const cartStoreReCalculateTotal = async ({ currency, itemsAmount, landedCostId,
7164
7111
  // update cart total right away if we have landed cost id to avoid order total flickering
7165
7112
  const subtotals = cartStore.selectedLandedCost.subtotals;
7166
7113
  cartStoreApplySubtotals(subtotals);
7167
- log('Exchange rate updated for cart items (landed cost subtotal)', 'info', cartStore.exchangeRate);
7114
+ logError.log('Exchange rate updated for cart items (landed cost subtotal)', 'info', cartStore.exchangeRate);
7168
7115
  }
7169
7116
  // update checkout session
7170
7117
  if (!cartStore.checkoutSessionId) {
7171
- logError('Could not update cart total without checkout session id');
7118
+ logError.logError('Could not update cart total without checkout session id');
7172
7119
  return false;
7173
7120
  }
7174
7121
  const { errors, json } = await stripeStoreUpdateCheckoutSession({
@@ -7180,7 +7127,7 @@ const cartStoreReCalculateTotal = async ({ currency, itemsAmount, landedCostId,
7180
7127
  });
7181
7128
  if (errors.length > 0 || !json) {
7182
7129
  // do nothing if we can't get checkout session
7183
- logError('Error occurs when updating checkout session');
7130
+ logError.logError('Error occurs when updating checkout session');
7184
7131
  cartStoreUpdateToErrorState({
7185
7132
  messages: [
7186
7133
  translate("There's been an error updating your checkout session. Please reload and try again or contact support if the error persists"),
@@ -7193,7 +7140,7 @@ const cartStoreReCalculateTotal = async ({ currency, itemsAmount, landedCostId,
7193
7140
  // This is when first open the checkout modal and we just want to get info from the old cart session.
7194
7141
  // use subtotals from checkout session to update cart total
7195
7142
  cartStoreApplySubtotals(json.checkoutSessionUpdate.subtotals);
7196
- log('Exchange rate updated for cart items (checkout session update)', 'info', cartStore.exchangeRate);
7143
+ logError.log('Exchange rate updated for cart items (checkout session update)', 'info', cartStore.exchangeRate);
7197
7144
  }
7198
7145
  return true;
7199
7146
  };
@@ -7319,8 +7266,6 @@ exports.localizationStore = localizationStore;
7319
7266
  exports.localizationStoreOnUpdate = localizationStoreOnUpdate;
7320
7267
  exports.localizationStoreUpdateSelectedCountryCode = localizationStoreUpdateSelectedCountryCode;
7321
7268
  exports.localizationStoreUpdateSelectedLocale = localizationStoreUpdateSelectedLocale;
7322
- exports.log = log;
7323
- exports.logError = logError;
7324
7269
  exports.setZCountryUrlParam = setZCountryUrlParam;
7325
7270
  exports.stripeStore = stripeStore;
7326
7271
  exports.stripeStoreCleanupDomesticShippingSession = stripeStoreCleanupDomesticShippingSession;