@zonos/elements 1.3.6 → 1.3.7-alpha.1

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 (306) hide show
  1. package/dist/cjs/{localization-2c9f5765.js → cart-89d9fff4.js} +863 -89
  2. package/dist/cjs/formatStringWithLinks-52341fc7.js +17 -0
  3. package/dist/cjs/{getBorderRadius-b252096d.js → getBorderRadius-d8f18958.js} +1 -1
  4. package/dist/cjs/{isDarkColor-168002d6.js → isDarkColor-57860b44.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/submitGtag-24740560.js +55 -0
  7. package/dist/cjs/zonos-address_4.cjs.entry.js +36 -18
  8. package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
  9. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-button_3.cjs.entry.js +8 -8
  11. package/dist/cjs/zonos-card_2.cjs.entry.js +10 -8
  12. package/dist/cjs/zonos-cart-items_9.cjs.entry.js +66 -56
  13. package/dist/cjs/zonos-checkout.cjs.entry.js +170 -34
  14. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  15. package/dist/cjs/zonos-controller.cjs.entry.js +51 -32
  16. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -3
  17. package/dist/cjs/zonos-country-select_3.cjs.entry.js +21 -12
  18. package/dist/cjs/zonos-elements.cjs.js +1 -1
  19. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +23 -19
  20. package/dist/cjs/zonos-hello.cjs.entry.js +51 -34
  21. package/dist/cjs/zonos-link.cjs.entry.js +24 -0
  22. package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
  23. package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-payment.cjs.entry.js +5 -6
  25. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +5 -5
  26. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  28. package/dist/cjs/{zonosStore-5d94dabb.js → zonosStore-138c5555.js} +9 -7
  29. package/dist/collection/collection-manifest.json +1 -0
  30. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +1 -6
  31. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +27 -13
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +39 -18
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +5 -1
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +2 -0
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +1 -6
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +3 -0
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -0
  39. package/dist/collection/components/common/component-template/zonos-link/zonos-link.css +54 -0
  40. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +97 -0
  41. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  42. package/dist/collection/components/common/zonos-button/zonos-button.css +2 -0
  43. package/dist/collection/components/common/zonos-button/zonos-button.js +4 -4
  44. package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
  45. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  46. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +26 -6
  47. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +8 -2
  48. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -2
  49. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  50. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  51. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  52. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  53. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
  54. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  55. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  56. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  57. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +50 -11
  58. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  59. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -3
  60. package/dist/collection/components/main/zonos-controller.js +1 -1
  61. package/dist/collection/components/store/checkout/cart.js +2 -2
  62. package/dist/collection/components/store/checkout/stripe.js +29 -4
  63. package/dist/collection/components/store/hello/localization.js +34 -7
  64. package/dist/collection/components/store/zonosStore.js +9 -7
  65. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  66. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  67. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  68. package/dist/collection/components/utils/api/trackConversionEvent.js +22 -0
  69. package/dist/collection/components/utils/checkout/isShippableCountry.js +15 -0
  70. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +111 -0
  71. package/dist/collection/components/utils/formatStringWithLinks.js +13 -0
  72. package/dist/collection/components/utils/handleFetch.js +1 -1
  73. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +25 -28
  74. package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js +2 -1
  75. package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js +8 -6
  76. package/dist/collection/components/utils/hello/initHello.js +23 -3
  77. package/dist/collection/components/utils/logging/log.js +20 -9
  78. package/dist/collection/components/utils/logging/logError.js +2 -1
  79. package/dist/collection/components/utils/logging/sendErrorLog.js +12 -0
  80. package/dist/collection/scripts/checkIfLoadVersionDomain.js +35 -0
  81. package/dist/collection/scripts/zonosBase.js +21 -31
  82. package/dist/collection/styles/stripe/addressRuleStyle.js +4 -0
  83. package/dist/collection/types/generated/graphql.customer.types.js +7 -4
  84. package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
  85. package/dist/components/stripe.js +4097 -7
  86. package/dist/components/submitGtag.js +1 -1
  87. package/dist/components/trackConversionEvent.js +24 -0
  88. package/dist/components/zonos-address2.js +2 -3
  89. package/dist/components/zonos-badge2.js +3 -3
  90. package/dist/components/zonos-button2.js +5 -5
  91. package/dist/components/zonos-card2.js +2 -2
  92. package/dist/components/zonos-cart-subtotal2.js +2 -8
  93. package/dist/components/zonos-checkbox2.js +3 -3
  94. package/dist/components/zonos-checkout-finish2.js +44 -16
  95. package/dist/components/zonos-checkout-footer2.js +1 -1
  96. package/dist/components/zonos-checkout-payment2.js +2 -3
  97. package/dist/components/zonos-checkout.js +157 -19
  98. package/dist/components/zonos-collapse2.js +26 -6
  99. package/dist/components/zonos-component.js +1 -1
  100. package/dist/components/zonos-controller.js +25 -6
  101. package/dist/components/zonos-country-flag2.js +1 -1
  102. package/dist/components/zonos-country-select2.js +9 -3
  103. package/dist/components/zonos-custom-message2.js +18 -3
  104. package/dist/components/zonos-customer-info2.js +4 -3
  105. package/dist/components/zonos-dialog2.js +3 -3
  106. package/dist/components/zonos-hello-dialog-footer2.js +3 -3
  107. package/dist/components/zonos-hello-dialog2.js +6 -5
  108. package/dist/components/zonos-hello.js +23 -7
  109. package/dist/components/zonos-language-select2.js +3 -3
  110. package/dist/components/zonos-link-authentication2.js +1 -1
  111. package/dist/components/zonos-link.d.ts +11 -0
  112. package/dist/components/zonos-link.js +43 -0
  113. package/dist/components/zonos-logo.js +2 -2
  114. package/dist/components/zonos-payment2.js +1 -1
  115. package/dist/components/zonos-review2.js +2 -8
  116. package/dist/components/zonos-select-dialog-header2.js +2 -2
  117. package/dist/components/zonos-shipping-rich-radio2.js +1 -1
  118. package/dist/components/zonos-shipping2.js +7 -3
  119. package/dist/components/zonos-tooltip2.js +2 -2
  120. package/dist/components/zonos-v-stack2.js +2 -2
  121. package/dist/components/zonosStore.js +9 -7
  122. package/dist/esm/{localization-d8f6453b.js → cart-1bbb7662.js} +846 -90
  123. package/dist/esm/formatStringWithLinks-9e819405.js +15 -0
  124. package/dist/esm/{getBorderRadius-e9736f7e.js → getBorderRadius-19787feb.js} +1 -1
  125. package/dist/esm/{isDarkColor-e982fa09.js → isDarkColor-2344e7a5.js} +1 -1
  126. package/dist/esm/loader.js +1 -1
  127. package/dist/esm/submitGtag-d3d11f1a.js +51 -0
  128. package/dist/esm/zonos-address_4.entry.js +33 -15
  129. package/dist/esm/zonos-badge_2.entry.js +6 -6
  130. package/dist/esm/zonos-banner.entry.js +1 -1
  131. package/dist/esm/zonos-button_3.entry.js +8 -8
  132. package/dist/esm/zonos-card_2.entry.js +8 -6
  133. package/dist/esm/zonos-cart-items_9.entry.js +47 -37
  134. package/dist/esm/zonos-checkout.entry.js +158 -22
  135. package/dist/esm/zonos-component.entry.js +1 -1
  136. package/dist/esm/zonos-controller.entry.js +28 -9
  137. package/dist/esm/zonos-country-flag.entry.js +4 -2
  138. package/dist/esm/zonos-country-select_3.entry.js +19 -10
  139. package/dist/esm/zonos-elements.js +1 -1
  140. package/dist/esm/zonos-hello-dialog.entry.js +9 -5
  141. package/dist/esm/zonos-hello.entry.js +24 -7
  142. package/dist/esm/zonos-link.entry.js +20 -0
  143. package/dist/esm/zonos-logo.entry.js +3 -3
  144. package/dist/esm/zonos-notification.entry.js +1 -1
  145. package/dist/esm/zonos-payment.entry.js +5 -6
  146. package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
  147. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  148. package/dist/esm/zonos-text.entry.js +1 -1
  149. package/dist/esm/{zonosStore-e6c7be3a.js → zonosStore-00bce01b.js} +9 -7
  150. package/dist/esm-es5/cart-1bbb7662.js +1 -0
  151. package/dist/esm-es5/formatStringWithLinks-9e819405.js +1 -0
  152. package/dist/esm-es5/{getBorderRadius-e9736f7e.js → getBorderRadius-19787feb.js} +1 -1
  153. package/dist/esm-es5/{isDarkColor-e982fa09.js → isDarkColor-2344e7a5.js} +1 -1
  154. package/dist/esm-es5/loader.js +1 -1
  155. package/dist/esm-es5/submitGtag-d3d11f1a.js +1 -0
  156. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  157. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  158. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  159. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  160. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  161. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
  162. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  163. package/dist/esm-es5/zonos-component.entry.js +1 -1
  164. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  165. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  166. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  167. package/dist/esm-es5/zonos-elements.js +1 -1
  168. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  169. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  170. package/dist/esm-es5/zonos-link.entry.js +1 -0
  171. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  172. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  173. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  174. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  175. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  176. package/dist/esm-es5/zonos-text.entry.js +1 -1
  177. package/dist/esm-es5/{zonosStore-e6c7be3a.js → zonosStore-00bce01b.js} +1 -1
  178. package/dist/scripts/checkIfLoadVersionDomain.js +1 -0
  179. package/dist/scripts/loadStripe.js +1 -1
  180. package/dist/scripts/loadZonos.js +1 -1
  181. package/dist/scripts/stripe.js +1 -1
  182. package/dist/scripts/zonos.js +1 -1
  183. package/dist/scripts/zonosBase.js +1 -1
  184. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -1
  185. package/dist/types/components/common/component-template/zonos-link/zonos-link.d.ts +19 -0
  186. package/dist/types/components/common/zonos-collapse/zonos-collapse.d.ts +1 -0
  187. package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +2 -0
  188. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +9 -3
  189. package/dist/types/components/store/checkout/cart.d.ts +6 -3
  190. package/dist/types/components/store/checkout/stripe.d.ts +26 -1
  191. package/dist/types/components/store/hello/localization.d.ts +1 -1
  192. package/dist/types/components/store/zonosStore.d.ts +2 -1
  193. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  194. package/dist/types/components/utils/api/trackConversionEvent.d.ts +3 -0
  195. package/dist/types/components/utils/checkout/isShippableCountry.d.ts +1 -0
  196. package/dist/types/components/utils/checkout/watchBigcommerceDomesticCheckout.d.ts +20 -0
  197. package/dist/types/components/utils/formatStringWithLinks.d.ts +1 -0
  198. package/dist/types/components/utils/hello/currencyConversion/getCurrencyElements.d.ts +1 -1
  199. package/dist/types/components/utils/hello/currencyConversion/getLanguageCode.d.ts +1 -1
  200. package/dist/types/components/utils/logging/log.d.ts +1 -1
  201. package/dist/types/components/utils/logging/sendErrorLog.d.ts +7 -0
  202. package/dist/types/components.d.ts +53 -3
  203. package/dist/types/scripts/checkIfLoadVersionDomain.d.ts +13 -0
  204. package/dist/types/scripts/zonosBase.d.ts +2 -0
  205. package/dist/types/types/ICountryJson.d.ts +2 -1
  206. package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
  207. package/dist/types/types/generated/graphql.customer.types.d.ts +23 -53
  208. package/dist/types/types/generated/graphql.customer.types.ts +42 -62
  209. package/dist/types/types/generated/graphql.frontend.types.d.ts +9 -1
  210. package/dist/types/types/generated/graphql.frontend.types.ts +19 -1
  211. package/dist/zonos-elements/p-0318632a.entry.js +1 -0
  212. package/dist/zonos-elements/p-066c5893.system.js +1 -1
  213. package/dist/zonos-elements/p-07966463.entry.js +1 -0
  214. package/dist/zonos-elements/p-0c0aa552.js +1 -0
  215. package/dist/zonos-elements/p-127b480c.entry.js +1 -0
  216. package/dist/zonos-elements/p-135ab559.system.entry.js +1 -0
  217. package/dist/zonos-elements/{p-b81a0577.system.entry.js → p-143dc0d9.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-32bca9c8.system.entry.js → p-14d27ce1.system.entry.js} +1 -1
  219. package/dist/zonos-elements/p-15a80c4a.entry.js +1 -0
  220. package/dist/zonos-elements/p-17e87be1.entry.js +1 -0
  221. package/dist/zonos-elements/{p-0c7480a5.entry.js → p-1e0dd491.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-a33745e9.entry.js → p-279d1c5f.entry.js} +1 -1
  223. package/dist/zonos-elements/p-2d6557ee.system.js +1 -0
  224. package/dist/zonos-elements/p-314be538.system.entry.js +1 -0
  225. package/dist/zonos-elements/{p-dd7729fd.system.entry.js → p-328b7f6f.system.entry.js} +1 -1
  226. package/dist/zonos-elements/p-354603b3.system.entry.js +1 -0
  227. package/dist/zonos-elements/{p-50287643.system.js → p-49f6a985.system.js} +1 -1
  228. package/dist/zonos-elements/p-57b65321.system.entry.js +1 -0
  229. package/dist/zonos-elements/p-58c1ddef.system.js +1 -0
  230. package/dist/zonos-elements/{p-06652d87.system.entry.js → p-58e2f6a1.system.entry.js} +1 -1
  231. package/dist/zonos-elements/p-5ee03db0.system.entry.js +1 -0
  232. package/dist/zonos-elements/{p-5a113c3d.system.entry.js → p-61e5cf29.system.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-49a764e9.system.entry.js → p-799d8a17.system.entry.js} +1 -1
  234. package/dist/zonos-elements/p-7a32526c.entry.js +1 -0
  235. package/dist/zonos-elements/p-7b87b82f.js +1 -0
  236. package/dist/zonos-elements/{p-9cbbf261.system.entry.js → p-7c45ce37.system.entry.js} +1 -1
  237. package/dist/zonos-elements/p-84f4f00f.entry.js +1 -0
  238. package/dist/zonos-elements/{p-e8a9bc56.entry.js → p-857cfe35.entry.js} +1 -1
  239. package/dist/zonos-elements/p-87e9c42f.entry.js +1 -0
  240. package/dist/zonos-elements/{p-e99d79d9.system.js → p-91797d4e.system.js} +1 -1
  241. package/dist/zonos-elements/{p-17550a10.js → p-95e0fc06.js} +1 -1
  242. package/dist/zonos-elements/{p-7a6144b1.entry.js → p-a3cc0f84.entry.js} +1 -1
  243. package/dist/zonos-elements/p-a5f12396.entry.js +1 -0
  244. package/dist/zonos-elements/p-a87561b8.js +1 -0
  245. package/dist/zonos-elements/{p-ba43275e.entry.js → p-ac0a7b8f.entry.js} +1 -1
  246. package/dist/zonos-elements/p-ae82a9ae.js +1 -0
  247. package/dist/zonos-elements/p-b0462325.system.entry.js +1 -0
  248. package/dist/zonos-elements/p-b2c0ec71.system.entry.js +1 -0
  249. package/dist/zonos-elements/{p-fcc4f140.system.js → p-b4725505.system.js} +1 -1
  250. package/dist/zonos-elements/p-bef54fb1.entry.js +1 -0
  251. package/dist/zonos-elements/p-c0d431f6.system.entry.js +1 -0
  252. package/dist/zonos-elements/p-d054788b.system.js +1 -0
  253. package/dist/zonos-elements/p-d407c93a.system.entry.js +1 -0
  254. package/dist/zonos-elements/p-e55dd932.js +1 -0
  255. package/dist/zonos-elements/p-ec37439e.entry.js +1 -0
  256. package/dist/zonos-elements/p-edace42b.entry.js +1 -0
  257. package/dist/zonos-elements/p-f478c814.system.entry.js +1 -0
  258. package/dist/zonos-elements/{p-7dd8e8ba.system.entry.js → p-f6eaef7b.system.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-bd6a2095.entry.js → p-f7c36fcc.entry.js} +1 -1
  260. package/dist/zonos-elements/p-f862b97f.system.entry.js +1 -0
  261. package/dist/zonos-elements/p-fd642725.entry.js +1 -0
  262. package/dist/zonos-elements/p-fdb72530.system.entry.js +1 -0
  263. package/dist/zonos-elements/{p-a4de3fb2.entry.js → p-ff64ddc5.entry.js} +1 -1
  264. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  265. package/package.json +1 -1
  266. package/dist/cjs/cart-b8bbf22d.js +0 -698
  267. package/dist/cjs/submitGtag-792fe45d.js +0 -21
  268. package/dist/collection/scripts/extractZonosQaUrl.js +0 -26
  269. package/dist/components/localization.js +0 -4016
  270. package/dist/esm/cart-bc3bb22e.js +0 -682
  271. package/dist/esm/submitGtag-bebe2cb0.js +0 -19
  272. package/dist/esm-es5/cart-bc3bb22e.js +0 -1
  273. package/dist/esm-es5/localization-d8f6453b.js +0 -1
  274. package/dist/esm-es5/submitGtag-bebe2cb0.js +0 -1
  275. package/dist/types/scripts/extractZonosQaUrl.d.ts +0 -11
  276. package/dist/zonos-elements/p-00d63df1.system.entry.js +0 -1
  277. package/dist/zonos-elements/p-04f63cea.entry.js +0 -1
  278. package/dist/zonos-elements/p-16b74c31.system.js +0 -1
  279. package/dist/zonos-elements/p-1d16a6fb.js +0 -1
  280. package/dist/zonos-elements/p-1ea68e3b.entry.js +0 -1
  281. package/dist/zonos-elements/p-1ed530cc.entry.js +0 -1
  282. package/dist/zonos-elements/p-289c8b1a.system.entry.js +0 -1
  283. package/dist/zonos-elements/p-2a00c270.system.entry.js +0 -1
  284. package/dist/zonos-elements/p-37f53a79.entry.js +0 -1
  285. package/dist/zonos-elements/p-394cf1cf.js +0 -1
  286. package/dist/zonos-elements/p-3ef27745.js +0 -1
  287. package/dist/zonos-elements/p-458fd100.system.entry.js +0 -1
  288. package/dist/zonos-elements/p-47fac33f.js +0 -1
  289. package/dist/zonos-elements/p-4fafb2a5.system.entry.js +0 -1
  290. package/dist/zonos-elements/p-4fb71a93.js +0 -1
  291. package/dist/zonos-elements/p-5276c61b.system.entry.js +0 -1
  292. package/dist/zonos-elements/p-6308b347.entry.js +0 -1
  293. package/dist/zonos-elements/p-63d1b1fe.entry.js +0 -1
  294. package/dist/zonos-elements/p-7347ee7c.system.entry.js +0 -1
  295. package/dist/zonos-elements/p-8c26a080.system.js +0 -1
  296. package/dist/zonos-elements/p-96aabe02.entry.js +0 -1
  297. package/dist/zonos-elements/p-a682fd38.system.entry.js +0 -1
  298. package/dist/zonos-elements/p-ba1a111a.system.entry.js +0 -1
  299. package/dist/zonos-elements/p-c4321084.system.entry.js +0 -1
  300. package/dist/zonos-elements/p-cdf114a2.entry.js +0 -1
  301. package/dist/zonos-elements/p-d5ae3cbb.system.entry.js +0 -1
  302. package/dist/zonos-elements/p-d5d7c8f5.entry.js +0 -1
  303. package/dist/zonos-elements/p-de339fb6.entry.js +0 -1
  304. package/dist/zonos-elements/p-ec25f180.entry.js +0 -1
  305. package/dist/zonos-elements/p-f49dfd06.system.js +0 -1
  306. package/dist/zonos-elements/p-f6f5f644.entry.js +0 -1
@@ -1 +1 @@
1
- (function(){"use strict";const e=(e,t,...n)=>{var o;if(!window.Zonos.debug)return;let r=document.querySelector("iframe#zonos---debug-logging-iframe");r||(r=document.createElement("iframe"),r.id="zonos---debug-logging-iframe",r.style.display="none",r.style.opacity="0",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.style.width="1px",r.style.height="1px",r.style.border="none",r.style.overflow="hidden",r.style.visibility="hidden",document.body.appendChild(r));const s=(null===(o=r.contentWindow)||void 0===o?void 0:o.window.console)||window.console;switch(t){case"warn":s.warn(e,...n);break;case"info":s.info(e,...n);break;default:s.groupCollapsed(e,...n),s.trace(),s.groupEnd()}},t=(e,...t)=>{console.error(e,...t)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var a;const d=(()=>{const e=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href);if(!e)return null;const t=`https://${e}.preview.js.zonos.com`;return console.warn(`[ZONOS-WARNING] using '${t}' for loading script`),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState({},"",o),window.location.reload(),null})),t})(),u=d||"https://v1.3.6.js.zonos.com",m="https://unpkg.com/@zonos/elements@1.3.6",p="https://rsms.me",h="https://fonts.googleapis.com",y=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class w{}a=w,w.doneInit=!1,w.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),w.isBigCommerce=!1,w.internationalHideSelector="",w.zonosQaUrl=d,w.version="v1.3.6",w.modeAlerted=!1,w.getCurrentTimestamp=()=>(new Date).getTime(),w.zonosController=null,w.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{a.doneInit||(e(`====== ZONOS DEBUG MODE: on (${a.version}) ======`),l?(a.zonosApiKey=l,a.storeId=i,e("init zonos"),a.injectSentryScript(),a.injectZonosCdn(),a.injectZonosCss(),a.injectFonts(),a.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),a.doneInit=!0):t("Missing Zonos API key"))},w.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},w.showNotification=e=>{var t;null===(t=a.zonosController)||void 0===t||t.showNotification(e)},w.updateOrganizationName=e=>{var t;null===(t=a.zonosController)||void 0===t||t.updateOrganizationName(e)},w.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},w.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;a.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{a.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),a.zonosController=s,e("Zonos controller injected!")},w.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${a.version}`})},o.appendChild(r)},w.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&a.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},w.injectZonosCdn=()=>{a.injectScript({fallBackDomain:m,isModule:!0,scriptDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),a.injectScript({fallBackDomain:m,isModule:!1,scriptDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},w.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${u}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&a.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},w.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(a.injectStylesheet({fallBackDomain:m,stylesheetDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},w.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${p}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!y.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=p,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${p}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},w.setupGoogleFont=e=>{var t;null===(t=a.zonosController)||void 0===t||t.setupGoogleFont(e)},w.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${h}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=h,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},window.Zonos=w})();
1
+ (function(){"use strict";const e=(e,t,...n)=>{var o,r;if(!(!(null===(o=window.Zonos)||void 0===o?void 0:o.debug)||!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...n);break;case"info":i.info(e,...n);break;case"error":i.error(e,...n);break;default:i.groupCollapsed(e,...n),i.trace(),i.groupEnd()}},t=(t,...n)=>{e(t,"error",...n)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var d;const a=(()=>{const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:n}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),o=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:o,isWhiteListed:n}})({loadScriptSrc:null==e?void 0:e.src});return n?t:null})()||"https://v1.3.7-alpha.1.js.zonos.com",u="https://unpkg.com/@zonos/elements@1.3.7-alpha.1",m="https://rsms.me",p="https://fonts.googleapis.com",h=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class y{}d=y,y.doneInit=!1,y.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),y.isBigCommerce=!1,y.internationalHideSelector="",y.zonosQaUrl=null,y.version="v1.3.7-alpha.1",y.modeAlerted=!1,y.getCurrentTimestamp=()=>(new Date).getTime(),y.zonosController=null,y.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{d.doneInit||(e(`====== ZONOS DEBUG MODE: on (${d.version}) ======`),l?(d.zonosApiKey=l,d.storeId=i,e("init zonos"),d.injectSentryScript(),d.injectZonosCdn(),d.injectZonosCss(),d.injectFonts(),d.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),d.doneInit=!0):t("Missing Zonos API key"))},y.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},y.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},y.showNotification=e=>{var t;null===(t=d.zonosController)||void 0===t||t.showNotification(e)},y.updateOrganizationName=e=>{var t;null===(t=d.zonosController)||void 0===t||t.updateOrganizationName(e)},y.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},y.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),d.zonosController=s,e("Zonos controller injected!")},y.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${d.version}`})},o.appendChild(r)},y.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&d.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},y.injectZonosCdn=()=>{d.injectScript({fallBackDomain:u,isModule:!0,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),d.injectScript({fallBackDomain:u,isModule:!1,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},y.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${a}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&d.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},y.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(d.injectStylesheet({fallBackDomain:u,stylesheetDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},y.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${m}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!h.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=m,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${m}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},y.setupGoogleFont=e=>{var t;null===(t=d.zonosController)||void 0===t||t.setupGoogleFont(e)},y.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${p}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=p,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},window.Zonos=y})();
@@ -1 +1 @@
1
- (function(){"use strict";const e=(e,t,...n)=>{var o;if(!window.Zonos.debug)return;let r=document.querySelector("iframe#zonos---debug-logging-iframe");r||(r=document.createElement("iframe"),r.id="zonos---debug-logging-iframe",r.style.display="none",r.style.opacity="0",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.style.width="1px",r.style.height="1px",r.style.border="none",r.style.overflow="hidden",r.style.visibility="hidden",document.body.appendChild(r));const s=(null===(o=r.contentWindow)||void 0===o?void 0:o.window.console)||window.console;switch(t){case"warn":s.warn(e,...n);break;case"info":s.info(e,...n);break;default:s.groupCollapsed(e,...n),s.trace(),s.groupEnd()}},t=(e,...t)=>{console.error(e,...t)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var a;const d=(()=>{const e=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href);if(!e)return null;const t=`https://${e}.preview.js.zonos.com`;return console.warn(`[ZONOS-WARNING] using '${t}' for loading script`),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState({},"",o),window.location.reload(),null})),t})(),u=d||"https://v1.3.6.js.zonos.com",m="https://unpkg.com/@zonos/elements@1.3.6",p="https://rsms.me",h="https://fonts.googleapis.com",y=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class w{}a=w,w.doneInit=!1,w.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),w.isBigCommerce=!1,w.internationalHideSelector="",w.zonosQaUrl=d,w.version="v1.3.6",w.modeAlerted=!1,w.getCurrentTimestamp=()=>(new Date).getTime(),w.zonosController=null,w.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{a.doneInit||(e(`====== ZONOS DEBUG MODE: on (${a.version}) ======`),l?(a.zonosApiKey=l,a.storeId=i,e("init zonos"),a.injectSentryScript(),a.injectZonosCdn(),a.injectZonosCss(),a.injectFonts(),a.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),a.doneInit=!0):t("Missing Zonos API key"))},w.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},w.showNotification=e=>{var t;null===(t=a.zonosController)||void 0===t||t.showNotification(e)},w.updateOrganizationName=e=>{var t;null===(t=a.zonosController)||void 0===t||t.updateOrganizationName(e)},w.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},w.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;a.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{a.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),a.zonosController=s,e("Zonos controller injected!")},w.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${a.version}`})},o.appendChild(r)},w.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&a.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},w.injectZonosCdn=()=>{a.injectScript({fallBackDomain:m,isModule:!0,scriptDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),a.injectScript({fallBackDomain:m,isModule:!1,scriptDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},w.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${u}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&a.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},w.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(a.injectStylesheet({fallBackDomain:m,stylesheetDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},w.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${p}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!y.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=p,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${p}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},w.setupGoogleFont=e=>{var t;null===(t=a.zonosController)||void 0===t||t.setupGoogleFont(e)},w.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${h}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=h,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},exports.Zonos=w})();
1
+ (function(){"use strict";const e=(e,t,...n)=>{var o,r;if(!(!(null===(o=window.Zonos)||void 0===o?void 0:o.debug)||!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...n);break;case"info":i.info(e,...n);break;case"error":i.error(e,...n);break;default:i.groupCollapsed(e,...n),i.trace(),i.groupEnd()}},t=(t,...n)=>{e(t,"error",...n)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var d;const a=(()=>{const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:n}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),o=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:o,isWhiteListed:n}})({loadScriptSrc:null==e?void 0:e.src});return n?t:null})()||"https://v1.3.7-alpha.1.js.zonos.com",u="https://unpkg.com/@zonos/elements@1.3.7-alpha.1",m="https://rsms.me",p="https://fonts.googleapis.com",h=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class y{}d=y,y.doneInit=!1,y.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),y.isBigCommerce=!1,y.internationalHideSelector="",y.zonosQaUrl=null,y.version="v1.3.7-alpha.1",y.modeAlerted=!1,y.getCurrentTimestamp=()=>(new Date).getTime(),y.zonosController=null,y.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{d.doneInit||(e(`====== ZONOS DEBUG MODE: on (${d.version}) ======`),l?(d.zonosApiKey=l,d.storeId=i,e("init zonos"),d.injectSentryScript(),d.injectZonosCdn(),d.injectZonosCss(),d.injectFonts(),d.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),d.doneInit=!0):t("Missing Zonos API key"))},y.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},y.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},y.showNotification=e=>{var t;null===(t=d.zonosController)||void 0===t||t.showNotification(e)},y.updateOrganizationName=e=>{var t;null===(t=d.zonosController)||void 0===t||t.updateOrganizationName(e)},y.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},y.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{d.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),d.zonosController=s,e("Zonos controller injected!")},y.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${d.version}`})},o.appendChild(r)},y.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&d.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},y.injectZonosCdn=()=>{d.injectScript({fallBackDomain:u,isModule:!0,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),d.injectScript({fallBackDomain:u,isModule:!1,scriptDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},y.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${a}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&d.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},y.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(d.injectStylesheet({fallBackDomain:u,stylesheetDomain:a,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},y.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${m}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!h.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=m,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${m}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},y.setupGoogleFont=e=>{var t;null===(t=d.zonosController)||void 0===t||t.setupGoogleFont(e)},y.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${p}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=p,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},exports.Zonos=y})();
@@ -48,6 +48,7 @@ export declare class ZonosCheckout {
48
48
  isMobile: boolean;
49
49
  zonosReviewRef?: HTMLZonosReviewElement;
50
50
  storybookPaymentStatusOverride?: PaymentIntent['status'];
51
+ domesticRedirectedBtnSelector: string;
51
52
  /**
52
53
  * Init cart info handler event
53
54
  */
@@ -59,7 +60,6 @@ export declare class ZonosCheckout {
59
60
  private applyStripeTheme;
60
61
  private buildCartAndInit;
61
62
  private attachCheckout;
62
- private isShippableCountry;
63
63
  appearanceSettingsOverrideChanged(): void;
64
64
  /**
65
65
  * Setup all of the event listeners for the component on first load
@@ -0,0 +1,19 @@
1
+ export declare class ZonosLink {
2
+ /**
3
+ * The href for the link
4
+ */
5
+ href: string;
6
+ /**
7
+ * The rel attribute for the link
8
+ */
9
+ rel?: string;
10
+ /**
11
+ * The target attribute for the link
12
+ */
13
+ target?: string;
14
+ /**
15
+ * The title attribute for the link
16
+ */
17
+ linkTitle?: string;
18
+ render(): any;
19
+ }
@@ -9,6 +9,7 @@ export declare class ZonosCollapse {
9
9
  collapseSize: number;
10
10
  el: HTMLZonosCollapseElement;
11
11
  height: number;
12
+ iframe: HTMLIFrameElement | null;
12
13
  private getElementHeight;
13
14
  componentDidLoad(): void;
14
15
  componentDidRender(): void;
@@ -5,7 +5,9 @@ export declare class ZonosCountrySelect {
5
5
  */
6
6
  handleOnClose: () => void;
7
7
  inputValue: string;
8
+ ele: HTMLZonosCountrySelectElement;
8
9
  private countrySelected;
9
10
  private handleInputChange;
11
+ componentDidRender(): void;
10
12
  render(): any;
11
13
  }
@@ -44,6 +44,7 @@ export declare class ZonosHello {
44
44
  private reloadHelloData;
45
45
  private handleProductCountChange;
46
46
  private watchProductCountChange;
47
+ private watchPriceChange;
47
48
  private updateHelloOnPageChange;
48
49
  componentWillLoad(): void;
49
50
  /**
@@ -55,18 +56,23 @@ export declare class ZonosHello {
55
56
  * This method will call convert and format, and return the converted and formatted string
56
57
  * @returns string
57
58
  */
58
- convertAndFormat(value: number): Promise<void>;
59
+ convertAndFormat(value: number): Promise<string>;
59
60
  /**
60
61
  * This method will convert the currency and return the converted value
61
62
  * @returns number
62
63
  */
63
- convert(value: number): Promise<void>;
64
+ convert(value: number): Promise<number>;
64
65
  /**
65
66
  * This method will format the currency and return the formatted string
66
67
  * @returns number
67
68
  */
68
- format(value: number): Promise<void>;
69
+ format(value: number): Promise<string>;
69
70
  private changeShowDialog;
71
+ /**
72
+ * This method show the hello dialog
73
+ * @returns void
74
+ */
75
+ openHelloDialog(value: boolean): Promise<void>;
70
76
  private shouldAnimateLeftDesktop;
71
77
  handleResize(): void;
72
78
  private isShippableCountry;
@@ -1,5 +1,5 @@
1
1
  import { stripeStoreUpdateCheckoutSession } from "./stripe";
2
- import type { CheckoutPresentmentFragment, CurrencyCode, ItemMeasurementType, ItemUnitOfMeasure, ShipmentRatingFragment } from "../../../types/generated/graphql.customer.types";
2
+ import type { CheckoutPresentmentFragment, CurrencyCode, ItemMeasurementType, ItemUnitOfMeasure, LandedCostFragment, ShipmentRatingFragment } from "../../../types/generated/graphql.customer.types";
3
3
  export type ItemMeasurement = {
4
4
  /** Indicates what type of `Measurement`, e.g. weight, specific dim unit. */
5
5
  type?: ItemMeasurementType;
@@ -8,6 +8,9 @@ export type ItemMeasurement = {
8
8
  /** The `Measurement` value. */
9
9
  value?: number;
10
10
  };
11
+ type MappedCheckoutLandedCost = CheckoutPresentmentFragment & {
12
+ landedCost: LandedCostFragment;
13
+ };
11
14
  export type CartItem = {
12
15
  amount: number;
13
16
  countryOfOrigin?: string;
@@ -42,8 +45,8 @@ type CartStore = {
42
45
  isSelectedShippingAboveDeminimis: boolean;
43
46
  isSelectedShippingGuarantee: boolean;
44
47
  items: CartItem[];
45
- landedCostData: CheckoutPresentmentFragment[] | null;
46
- selectedLandedCost: CheckoutPresentmentFragment | null;
48
+ landedCostData: MappedCheckoutLandedCost[] | null;
49
+ selectedLandedCost: MappedCheckoutLandedCost | null;
47
50
  selectedShippingOption: ShipmentRatingFragment | null;
48
51
  selectedShippingOptionExpectedDate: string;
49
52
  selectedShippingOptionTransitTime: string;
@@ -39,6 +39,20 @@ type StripeStore = {
39
39
  stripeShippingSameAsBilling: boolean;
40
40
  };
41
41
  declare const stripeStore: StripeStore;
42
+ export type DomesticShippingSession = {
43
+ address1: string;
44
+ address2: string;
45
+ city: string;
46
+ countryCode: string;
47
+ firstName: string;
48
+ lastName: string;
49
+ phone: string;
50
+ postalCode: string;
51
+ state: string;
52
+ };
53
+ declare const stripeStoreCleanupDomesticShippingSession: () => void;
54
+ declare const stripeStoreSaveDomesticShippingSession: (props: DomesticShippingSession) => void;
55
+ declare const stripeStoreGetDomesticShippingSession: () => DomesticShippingSession | null;
42
56
  declare const initStripeElements: (props?: {
43
57
  overrideBorderRaidus?: ElementsUiStyle;
44
58
  overridePrimaryColor?: string;
@@ -54,10 +68,17 @@ declare const stripeStoreRetrievePayment: ({ clientSecret: _clientSecret, storyb
54
68
  error: boolean;
55
69
  messages: string[];
56
70
  message?: undefined;
71
+ paymentMethod?: undefined;
57
72
  } | {
58
73
  error: boolean;
59
74
  message: string[];
60
75
  messages?: undefined;
76
+ paymentMethod?: undefined;
77
+ } | {
78
+ error: boolean;
79
+ messages: string[];
80
+ paymentMethod: string | import("@stripe/stripe-js").PaymentMethod | null | undefined;
81
+ message?: undefined;
61
82
  }>;
62
83
  declare const stripeStoreConfirmPayment: () => Promise<void>;
63
84
  /**
@@ -70,6 +91,10 @@ type CheckoutSessionUpdateRequest = {
70
91
  id: string;
71
92
  itemsAmount?: number;
72
93
  landedCostId?: string;
94
+ metadata?: {
95
+ key: string;
96
+ value: string;
97
+ }[];
73
98
  presentmentCountryCode: CountryCode | null;
74
99
  };
75
100
  /**
@@ -79,4 +104,4 @@ declare const stripeStoreUpdateCheckoutSession: ({ currency, id, itemsAmount, la
79
104
  errors: import("../../..").JsonError[];
80
105
  json: CheckoutSessionUpdateMutation | null;
81
106
  }>;
82
- export { initStripeElements, stripeStore, stripeStoreConfirmPayment, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, stripeStoreUpdateCheckoutSession, };
107
+ export { initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreUpdateCheckoutSession, };
@@ -27,7 +27,7 @@ type ILocaleMessageForUse = {
27
27
  pageName: Locale_PageName_Enum;
28
28
  };
29
29
  declare const localizationStore: LocalizationStore;
30
- declare const localizationStoreUpdateSelectedCountryCode: (newSelectedCountryCode: CountryCode | null) => Promise<void>;
30
+ declare const localizationStoreUpdateSelectedCountryCode: (newSelectedCountryCode: CountryCode | null) => void;
31
31
  declare const initLocalizationStore: () => Promise<void>;
32
32
  declare const localizationStoreUpdateSelectedLocale: (newSelectedLocale: Locale_ElementsSupportedLocationCode_Enum) => void;
33
33
  export { initLocalizationStore, localizationStore, localizationStoreUpdateSelectedCountryCode, localizationStoreUpdateSelectedLocale, };
@@ -17,6 +17,7 @@ export type ZonosConfig = {
17
17
  currencyConverter?: CurrencyConverter;
18
18
  currentHelloPage: Page | '';
19
19
  helloSettings: HelloConfig;
20
+ organizationId: string;
20
21
  organizationName: string;
21
22
  sourceCurrency: string;
22
23
  storeId: number | null;
@@ -31,7 +32,7 @@ declare const zonosStore: ZonosStore;
31
32
  * Init setting from zonos setting
32
33
  */
33
34
  declare const zonosStoreInitSetting: ({ overrideSettings, zonosSettings, }: {
34
- overrideSettings: LoadZonosParamsConfig;
35
+ overrideSettings?: LoadZonosParamsConfig | undefined;
35
36
  zonosSettings: ZonosSettingsQuery | null;
36
37
  }) => void;
37
38
  declare const zonosStoreFontFamily: () => string;
@@ -4,7 +4,7 @@ export declare const getLocaleMessages: ({ countryCode, localeTo, storeId, }: {
4
4
  localeTo?: string | undefined;
5
5
  storeId: number;
6
6
  }) => Promise<{
7
- countryCodes: string[];
7
+ countryCodes: string[] | null;
8
8
  countryCodesPageMessageLinks: {
9
9
  id: number;
10
10
  message: {
@@ -0,0 +1,3 @@
1
+ type ConversionEvent = 'checkout_open' | 'checkout_customerInfoCompleted' | 'checkout_shippingInfoCompleted' | 'checkout_paymentInfoCompleted' | 'checkout_orderCompleted';
2
+ export declare const trackConversionEvent: (eventName: ConversionEvent, metadata?: Record<string, unknown>) => Promise<void>;
3
+ export {};
@@ -0,0 +1 @@
1
+ export declare const isShippableCountry: (showLog?: boolean) => boolean;
@@ -0,0 +1,20 @@
1
+ type Params = {
2
+ domesticRedirectedBtnSelector: string;
3
+ onShippingAddressSessionFound?: (shippingAddress: {
4
+ address1: string;
5
+ address2: string;
6
+ city: string;
7
+ countryCode: string;
8
+ firstName: string;
9
+ lastName: string;
10
+ phone: string;
11
+ postalCode: string;
12
+ state: string;
13
+ }) => void;
14
+ };
15
+ /**
16
+ * Watch for changes in domestic checkout step, this is to redirect user to home page and open checkout if user enters the ship to country that's in the shipping zone
17
+ * @note Only works on default bigcommerce checkout page
18
+ */
19
+ export declare const watchBigcommerceDomesticCheckout: ({ domesticRedirectedBtnSelector, onShippingAddressSessionFound, }: Params) => void;
20
+ export {};
@@ -0,0 +1 @@
1
+ export declare const formatStringWithLinks: (str: string) => string;
@@ -1 +1 @@
1
- export declare const getCurrencyElements: (selector: string) => NodeListOf<Element> | null;
1
+ export declare const getCurrencyElements: (selector: string) => Element[] | null;
@@ -1,2 +1,2 @@
1
1
  import type { CountryCode } from "../../../../types/index";
2
- export declare const getLanguageCode: (code: CountryCode) => string | null;
2
+ export declare const getLanguageCode: (code: CountryCode) => import("../../../../types/generated/graphql.frontend.types").Locale_ElementsSupportedLocationCode_Enum | null;
@@ -1,3 +1,3 @@
1
- type LogType = 'warn' | 'info' | 'log';
1
+ type LogType = 'warn' | 'info' | 'log' | 'error';
2
2
  export declare const log: (message: unknown, type?: LogType, ...additionalInfo: unknown[]) => void;
3
3
  export {};
@@ -0,0 +1,7 @@
1
+ type Params = {
2
+ endpoint: string;
3
+ errors: string[];
4
+ metadata: Record<string, unknown>;
5
+ };
6
+ export declare const sendErrorLog: ({ endpoint, errors, metadata }: Params) => Promise<void>;
7
+ export {};
@@ -478,12 +478,12 @@ export namespace Components {
478
478
  * This method will convert the currency and return the converted value
479
479
  * @returns number
480
480
  */
481
- "convert": (value: number) => Promise<void>;
481
+ "convert": (value: number) => Promise<number>;
482
482
  /**
483
483
  * This method will call convert and format, and return the converted and formatted string
484
484
  * @returns string
485
485
  */
486
- "convertAndFormat": (value: number) => Promise<void>;
486
+ "convertAndFormat": (value: number) => Promise<string>;
487
487
  /**
488
488
  * This method will trigger the currency conversion and display the converted value
489
489
  * @returns void
@@ -493,12 +493,17 @@ export namespace Components {
493
493
  * This method will format the currency and return the formatted string
494
494
  * @returns number
495
495
  */
496
- "format": (value: number) => Promise<void>;
496
+ "format": (value: number) => Promise<string>;
497
497
  /**
498
498
  * Force mobile styling instead of media query and use the passed location value
499
499
  * @default false
500
500
  */
501
501
  "mobileLocationOverride"?: HelloMobileLocation;
502
+ /**
503
+ * This method show the hello dialog
504
+ * @returns void
505
+ */
506
+ "openHelloDialog": (value: boolean) => Promise<void>;
502
507
  }
503
508
  interface ZonosHelloDialog {
504
509
  /**
@@ -575,6 +580,24 @@ export namespace Components {
575
580
  */
576
581
  "handleOnClose": () => void;
577
582
  }
583
+ interface ZonosLink {
584
+ /**
585
+ * The href for the link
586
+ */
587
+ "href": string;
588
+ /**
589
+ * The title attribute for the link
590
+ */
591
+ "linkTitle"?: string;
592
+ /**
593
+ * The rel attribute for the link
594
+ */
595
+ "rel"?: string;
596
+ /**
597
+ * The target attribute for the link
598
+ */
599
+ "target"?: string;
600
+ }
578
601
  interface ZonosLinkAuthentication {
579
602
  /**
580
603
  * The title text for the authentication element
@@ -971,6 +994,12 @@ declare global {
971
994
  prototype: HTMLZonosLanguageSelectElement;
972
995
  new (): HTMLZonosLanguageSelectElement;
973
996
  };
997
+ interface HTMLZonosLinkElement extends Components.ZonosLink, HTMLStencilElement {
998
+ }
999
+ var HTMLZonosLinkElement: {
1000
+ prototype: HTMLZonosLinkElement;
1001
+ new (): HTMLZonosLinkElement;
1002
+ };
974
1003
  interface HTMLZonosLinkAuthenticationElement extends Components.ZonosLinkAuthentication, HTMLStencilElement {
975
1004
  }
976
1005
  var HTMLZonosLinkAuthenticationElement: {
@@ -1091,6 +1120,7 @@ declare global {
1091
1120
  "zonos-hello-dialog-footer": HTMLZonosHelloDialogFooterElement;
1092
1121
  "zonos-icon": HTMLZonosIconElement;
1093
1122
  "zonos-language-select": HTMLZonosLanguageSelectElement;
1123
+ "zonos-link": HTMLZonosLinkElement;
1094
1124
  "zonos-link-authentication": HTMLZonosLinkAuthenticationElement;
1095
1125
  "zonos-logo": HTMLZonosLogoElement;
1096
1126
  "zonos-notification": HTMLZonosNotificationElement;
@@ -1612,6 +1642,24 @@ declare namespace LocalJSX {
1612
1642
  */
1613
1643
  "handleOnClose"?: () => void;
1614
1644
  }
1645
+ interface ZonosLink {
1646
+ /**
1647
+ * The href for the link
1648
+ */
1649
+ "href"?: string;
1650
+ /**
1651
+ * The title attribute for the link
1652
+ */
1653
+ "linkTitle"?: string;
1654
+ /**
1655
+ * The rel attribute for the link
1656
+ */
1657
+ "rel"?: string;
1658
+ /**
1659
+ * The target attribute for the link
1660
+ */
1661
+ "target"?: string;
1662
+ }
1615
1663
  interface ZonosLinkAuthentication {
1616
1664
  /**
1617
1665
  * The title text for the authentication element
@@ -1773,6 +1821,7 @@ declare namespace LocalJSX {
1773
1821
  "zonos-hello-dialog-footer": ZonosHelloDialogFooter;
1774
1822
  "zonos-icon": ZonosIcon;
1775
1823
  "zonos-language-select": ZonosLanguageSelect;
1824
+ "zonos-link": ZonosLink;
1776
1825
  "zonos-link-authentication": ZonosLinkAuthentication;
1777
1826
  "zonos-logo": ZonosLogo;
1778
1827
  "zonos-notification": ZonosNotification;
@@ -1816,6 +1865,7 @@ declare module "@stencil/core" {
1816
1865
  "zonos-hello-dialog-footer": LocalJSX.ZonosHelloDialogFooter & JSXBase.HTMLAttributes<HTMLZonosHelloDialogFooterElement>;
1817
1866
  "zonos-icon": LocalJSX.ZonosIcon & JSXBase.HTMLAttributes<HTMLZonosIconElement>;
1818
1867
  "zonos-language-select": LocalJSX.ZonosLanguageSelect & JSXBase.HTMLAttributes<HTMLZonosLanguageSelectElement>;
1868
+ "zonos-link": LocalJSX.ZonosLink & JSXBase.HTMLAttributes<HTMLZonosLinkElement>;
1819
1869
  "zonos-link-authentication": LocalJSX.ZonosLinkAuthentication & JSXBase.HTMLAttributes<HTMLZonosLinkAuthenticationElement>;
1820
1870
  "zonos-logo": LocalJSX.ZonosLogo & JSXBase.HTMLAttributes<HTMLZonosLogoElement>;
1821
1871
  "zonos-notification": LocalJSX.ZonosNotification & JSXBase.HTMLAttributes<HTMLZonosNotificationElement>;
@@ -0,0 +1,13 @@
1
+ type Params = {
2
+ loadScriptSrc?: string;
3
+ };
4
+ /**
5
+ * Get the load version and url based on the loadScriptSrc and version
6
+ * @returns
7
+ */
8
+ export declare const checkIfLoadVersionDomain: ({ loadScriptSrc }: Params) => {
9
+ currentLoadScriptUrl: string;
10
+ isForceLoadVersionDomain: boolean;
11
+ isWhiteListed: boolean;
12
+ };
13
+ export {};
@@ -33,6 +33,7 @@ export interface Zonos {
33
33
  getCurrentTimestamp: () => number;
34
34
  init: (params: LoadZonosParams) => Promise<void>;
35
35
  injectSupportGoogleFont: (fontUrl: string) => void;
36
+ openHelloDialog: (state?: boolean) => void;
36
37
  setupGoogleFont: (fontFamily: string) => void;
37
38
  showNotification: (props: NotificationInit) => void;
38
39
  updateOrganizationName: (organizationName: string) => void;
@@ -52,6 +53,7 @@ export declare abstract class Zonos {
52
53
  private static zonosController;
53
54
  static init: ({ appearance, checkoutSettings, currencyConverter, helloSettings, storeId, zonosApiKey, }: LoadZonosParams) => Promise<void>;
54
55
  static displayCurrency: () => void;
56
+ static openHelloDialog: (value?: boolean) => void;
55
57
  static showNotification: (notification: NotificationInit) => void;
56
58
  static updateOrganizationName: (organizationName: string) => void;
57
59
  private static disablePlaceOrderButtons;
@@ -1,4 +1,5 @@
1
1
  import type { CountryCode } from "./generated/graphql.customer.types";
2
+ import type { Locale_ElementsSupportedLocationCode_Enum } from "./generated/graphql.frontend.types";
2
3
  declare const regions: readonly [
3
4
  'Africa',
4
5
  'Americas',
@@ -17,7 +18,7 @@ export type ICountry = {
17
18
  currencyCode: string;
18
19
  displayName: string;
19
20
  fraudRisk: number;
20
- languageCode: string;
21
+ languageCode: Locale_ElementsSupportedLocationCode_Enum;
21
22
  numericCode: string;
22
23
  region: IRegion;
23
24
  upsCode: string | null;
@@ -56,5 +56,5 @@ export type CheckoutConfig = {
56
56
  */
57
57
  buildCartDetail?: () => Promise<CartItem[]>;
58
58
  buildLandedCost?: (params: BuildLandedCostParams) => BuildLandedCostResponse;
59
- onOrderSuccess?: (zonosOrder: ZonosOrder) => void;
59
+ onOrderSuccess?: (zonosOrder: ZonosOrder) => Promise<void>;
60
60
  };