@zonos/elements 1.3.15-alpha.3 → 1.3.15

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 (373) hide show
  1. package/dist/cjs/RemoveIcon-6c79a2a1.js +5 -0
  2. package/dist/cjs/{cart-1b1d39af.js → cart-db549f04.js} +976 -138
  3. package/dist/cjs/containsNonLatinChars-2be5129b.js +24 -0
  4. package/dist/cjs/{getBorderRadius-c8cc2bb3.js → getBorderRadius-44b3eca1.js} +4 -6
  5. package/dist/cjs/index-654a6001.js +1361 -0
  6. package/dist/cjs/isCheckoutMobile-f491ca7c.js +8 -0
  7. package/dist/cjs/{isDarkColor-f5473002.js → isDarkColor-01f45d3f.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/{submitGtag-ab287a34.js → submitGtag-fd8acad5.js} +21 -2
  10. package/dist/cjs/zonos-address_8.cjs.entry.js +642 -0
  11. package/dist/cjs/zonos-badge_2.cjs.entry.js +7 -7
  12. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  13. package/dist/cjs/{zonos-button_2.cjs.entry.js → zonos-button_3.cjs.entry.js} +53 -13
  14. package/dist/cjs/zonos-card_2.cjs.entry.js +10 -10
  15. package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +135 -109
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +18 -17
  17. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
  20. package/dist/cjs/zonos-country-select_3.cjs.entry.js +12 -12
  21. package/dist/cjs/zonos-elements.cjs.js +10 -10
  22. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +8 -8
  23. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  24. package/dist/cjs/zonos-input.cjs.entry.js +57 -0
  25. package/dist/cjs/zonos-link.cjs.entry.js +2 -2
  26. package/dist/cjs/zonos-logo.cjs.entry.js +4 -4
  27. package/dist/cjs/zonos-notification.cjs.entry.js +4 -4
  28. package/dist/cjs/zonos-payment.cjs.entry.js +6 -6
  29. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +6 -6
  30. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +7 -5
  31. package/dist/cjs/zonos-text.cjs.entry.js +3 -2
  32. package/dist/cjs/{zonosStore-aee974e0.js → zonosStore-d8bb0bda.js} +1 -1
  33. package/dist/collection/collection-manifest.json +5 -1
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.css +62 -0
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +80 -0
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.css +59 -0
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +148 -0
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.css +115 -0
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +429 -0
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -3
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +6 -4
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +135 -20
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
  46. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
  47. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  48. package/dist/collection/components/common/zonos-button/zonos-button.css +1 -0
  49. package/dist/collection/components/common/zonos-button/zonos-button.js +17 -8
  50. package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
  51. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +1 -0
  52. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +22 -4
  53. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  54. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  55. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  56. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  57. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +3 -3
  58. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +6 -4
  59. package/dist/collection/components/common/zonos-input/zonos-input.css +176 -0
  60. package/dist/collection/components/common/zonos-input/zonos-input.js +193 -0
  61. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  62. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  63. package/dist/collection/components/common/zonos-notification/zonos-notification.js +2 -2
  64. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  65. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +4 -2
  66. package/dist/collection/components/common/zonos-text/zonos-text.js +1 -0
  67. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  68. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  69. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  70. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +7 -8
  71. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  72. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
  73. package/dist/collection/components/main/zonos-controller.js +2 -2
  74. package/dist/collection/components/store/checkout/stripe.js +153 -14
  75. package/dist/collection/components/store/translationStore/strings.arabic.js +36 -6
  76. package/dist/collection/components/store/translationStore/strings.base.js +36 -6
  77. package/dist/collection/components/store/translationStore/strings.chinese.js +36 -6
  78. package/dist/collection/components/store/translationStore/strings.danish.js +36 -6
  79. package/dist/collection/components/store/translationStore/strings.dutch.js +36 -6
  80. package/dist/collection/components/store/translationStore/strings.french.js +36 -6
  81. package/dist/collection/components/store/translationStore/strings.german.js +36 -6
  82. package/dist/collection/components/store/translationStore/strings.hebrew.js +36 -6
  83. package/dist/collection/components/store/translationStore/strings.indonesian.js +36 -6
  84. package/dist/collection/components/store/translationStore/strings.italian.js +36 -6
  85. package/dist/collection/components/store/translationStore/strings.japanese.js +36 -6
  86. package/dist/collection/components/store/translationStore/strings.korean.js +36 -6
  87. package/dist/collection/components/store/translationStore/strings.norwegian.js +36 -6
  88. package/dist/collection/components/store/translationStore/strings.polish.js +36 -6
  89. package/dist/collection/components/store/translationStore/strings.portuguese.js +36 -6
  90. package/dist/collection/components/store/translationStore/strings.russian.js +36 -6
  91. package/dist/collection/components/store/translationStore/strings.spanish.js +36 -6
  92. package/dist/collection/components/store/translationStore/strings.swedish.js +36 -6
  93. package/dist/collection/components/store/translationStore/strings.turkish.js +36 -6
  94. package/dist/collection/components/store/translationStore/strings.vietnamese.js +36 -6
  95. package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -71
  96. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +29 -5
  97. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  98. package/dist/collection/components/utils/checkout/buildTranslateRequestBody.js +98 -0
  99. package/dist/collection/components/utils/containsNonLatinChars.js +10 -8
  100. package/dist/collection/components/utils/getBorderRadius.js +3 -5
  101. package/dist/collection/styles/stripe/defaultVariable.js +2 -2
  102. package/dist/collection/types/checkout/TranslatedText.js +1 -0
  103. package/dist/collection/types/checkout/api/ValidateAddressRequest.js +1 -0
  104. package/dist/components/containsNonLatinChars.js +21 -0
  105. package/dist/components/getBorderRadius.js +3 -5
  106. package/dist/components/stripe.js +255 -4545
  107. package/dist/components/trackConversionEvent.js +1 -1
  108. package/dist/components/translationStore.js +5131 -0
  109. package/dist/components/zonos-address-display.d.ts +11 -0
  110. package/dist/components/zonos-address-display.js +6 -0
  111. package/dist/components/zonos-address-display2.js +64 -0
  112. package/dist/components/zonos-address-form.d.ts +11 -0
  113. package/dist/components/zonos-address-form.js +6 -0
  114. package/dist/components/zonos-address-form2.js +84 -0
  115. package/dist/components/zonos-address-update-dialog.d.ts +11 -0
  116. package/dist/components/zonos-address-update-dialog.js +6 -0
  117. package/dist/components/zonos-address-update-dialog2.js +264 -0
  118. package/dist/components/zonos-address2.js +3 -93
  119. package/dist/components/zonos-badge2.js +3 -3
  120. package/dist/components/zonos-button2.js +18 -9
  121. package/dist/components/zonos-card2.js +3 -3
  122. package/dist/components/zonos-cart-items2.js +1 -1
  123. package/dist/components/zonos-cart-subtotal2.js +2 -1
  124. package/dist/components/zonos-checkbox2.js +15 -6
  125. package/dist/components/zonos-checkout-finish2.js +26 -6
  126. package/dist/components/zonos-checkout-footer2.js +2 -2
  127. package/dist/components/zonos-checkout-payment2.js +2 -1
  128. package/dist/components/zonos-checkout-progress-tabs2.js +5 -4
  129. package/dist/components/zonos-checkout.js +71 -41
  130. package/dist/components/zonos-collapse2.js +2 -2
  131. package/dist/components/zonos-component.js +1 -1
  132. package/dist/components/zonos-controller.js +2 -2
  133. package/dist/components/zonos-country-select2.js +2 -2
  134. package/dist/components/zonos-custom-message2.js +2 -2
  135. package/dist/components/zonos-customer-info2.js +170 -29
  136. package/dist/components/zonos-dialog2.js +7 -5
  137. package/dist/components/zonos-hello-dialog-footer2.js +3 -3
  138. package/dist/components/zonos-hello-dialog2.js +5 -4
  139. package/dist/components/zonos-hello.js +2 -1
  140. package/dist/components/zonos-input.d.ts +11 -0
  141. package/dist/components/zonos-input.js +6 -0
  142. package/dist/components/zonos-input2.js +78 -0
  143. package/dist/components/zonos-language-select2.js +4 -3
  144. package/dist/components/zonos-link-authentication2.js +12 -5
  145. package/dist/components/zonos-link.js +1 -1
  146. package/dist/components/zonos-logo.js +2 -2
  147. package/dist/components/zonos-notification2.js +2 -2
  148. package/dist/components/zonos-payment2.js +1 -1
  149. package/dist/components/zonos-review2.js +2 -1
  150. package/dist/components/zonos-select-dialog-header2.js +2 -2
  151. package/dist/components/zonos-shipping-rich-radio2.js +4 -2
  152. package/dist/components/zonos-shipping2.js +3 -2
  153. package/dist/components/zonos-text2.js +1 -0
  154. package/dist/components/zonos-tooltip2.js +2 -2
  155. package/dist/components/zonos-v-stack2.js +2 -2
  156. package/dist/esm/RemoveIcon-f6715b36.js +3 -0
  157. package/dist/esm/{cart-10bcd2e0.js → cart-462e89a6.js} +976 -139
  158. package/dist/esm/containsNonLatinChars-2d8810c3.js +21 -0
  159. package/dist/esm/{getBorderRadius-8129b0cb.js → getBorderRadius-567f1786.js} +4 -6
  160. package/dist/esm/index-e063389c.js +1328 -0
  161. package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
  162. package/dist/esm/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
  163. package/dist/esm/loader.js +3 -3
  164. package/dist/esm/{submitGtag-84886899.js → submitGtag-ac7c3c89.js} +21 -3
  165. package/dist/esm/zonos-address_8.entry.js +631 -0
  166. package/dist/esm/zonos-badge_2.entry.js +7 -7
  167. package/dist/esm/zonos-banner.entry.js +2 -2
  168. package/dist/esm/{zonos-button_2.entry.js → zonos-button_3.entry.js} +53 -14
  169. package/dist/esm/zonos-card_2.entry.js +10 -10
  170. package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +131 -104
  171. package/dist/esm/zonos-checkout.entry.js +13 -12
  172. package/dist/esm/zonos-component.entry.js +2 -2
  173. package/dist/esm/zonos-controller.entry.js +6 -6
  174. package/dist/esm/zonos-country-flag.entry.js +5 -5
  175. package/dist/esm/zonos-country-select_3.entry.js +12 -12
  176. package/dist/esm/zonos-elements.js +11 -11
  177. package/dist/esm/zonos-hello-dialog.entry.js +8 -8
  178. package/dist/esm/zonos-hello.entry.js +5 -5
  179. package/dist/esm/zonos-input.entry.js +53 -0
  180. package/dist/esm/zonos-link.entry.js +2 -2
  181. package/dist/esm/zonos-logo.entry.js +4 -4
  182. package/dist/esm/zonos-notification.entry.js +4 -4
  183. package/dist/esm/zonos-payment.entry.js +6 -6
  184. package/dist/esm/zonos-select-dialog-header_2.entry.js +6 -6
  185. package/dist/esm/zonos-shipping-rich-radio.entry.js +7 -5
  186. package/dist/esm/zonos-text.entry.js +3 -2
  187. package/dist/esm/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
  188. package/dist/esm-es5/RemoveIcon-f6715b36.js +1 -0
  189. package/dist/esm-es5/cart-462e89a6.js +1 -0
  190. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
  191. package/dist/esm-es5/getBorderRadius-567f1786.js +1 -0
  192. package/dist/esm-es5/index-e063389c.js +2 -0
  193. package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
  194. package/dist/esm-es5/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
  195. package/dist/esm-es5/loader.js +1 -1
  196. package/dist/esm-es5/submitGtag-ac7c3c89.js +1 -0
  197. package/dist/esm-es5/zonos-address_8.entry.js +1 -0
  198. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  199. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  200. package/dist/esm-es5/zonos-button_3.entry.js +1 -0
  201. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  202. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -0
  203. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  204. package/dist/esm-es5/zonos-component.entry.js +1 -1
  205. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  206. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  207. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  208. package/dist/esm-es5/zonos-elements.js +1 -1
  209. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  210. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  211. package/dist/esm-es5/zonos-input.entry.js +1 -0
  212. package/dist/esm-es5/zonos-link.entry.js +1 -1
  213. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  214. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  215. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  216. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  217. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  218. package/dist/esm-es5/zonos-text.entry.js +1 -1
  219. package/dist/esm-es5/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
  220. package/dist/scripts/loadStripe.js +1 -1
  221. package/dist/scripts/loadZonos.js +1 -1
  222. package/dist/scripts/stripe.js +1 -1
  223. package/dist/scripts/zonos.js +1 -1
  224. package/dist/scripts/zonosBase.js +1 -1
  225. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.d.ts +12 -0
  226. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.d.ts +28 -0
  227. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.d.ts +96 -0
  228. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +22 -2
  229. package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
  230. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +0 -3
  231. package/dist/types/components/common/zonos-input/zonos-input.d.ts +35 -0
  232. package/dist/types/components/store/checkout/stripe.d.ts +25 -1
  233. package/dist/types/components/store/translationStore/strings.arabic.d.ts +35 -5
  234. package/dist/types/components/store/translationStore/strings.base.d.ts +35 -5
  235. package/dist/types/components/store/translationStore/strings.chinese.d.ts +35 -5
  236. package/dist/types/components/store/translationStore/strings.danish.d.ts +35 -5
  237. package/dist/types/components/store/translationStore/strings.dutch.d.ts +35 -5
  238. package/dist/types/components/store/translationStore/strings.french.d.ts +35 -5
  239. package/dist/types/components/store/translationStore/strings.german.d.ts +35 -5
  240. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +35 -5
  241. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +35 -5
  242. package/dist/types/components/store/translationStore/strings.italian.d.ts +35 -5
  243. package/dist/types/components/store/translationStore/strings.japanese.d.ts +35 -5
  244. package/dist/types/components/store/translationStore/strings.korean.d.ts +35 -5
  245. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +35 -5
  246. package/dist/types/components/store/translationStore/strings.polish.d.ts +35 -5
  247. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +35 -5
  248. package/dist/types/components/store/translationStore/strings.russian.d.ts +35 -5
  249. package/dist/types/components/store/translationStore/strings.spanish.d.ts +35 -5
  250. package/dist/types/components/store/translationStore/strings.swedish.d.ts +35 -5
  251. package/dist/types/components/store/translationStore/strings.turkish.d.ts +35 -5
  252. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +35 -5
  253. package/dist/types/components/store/translationStore.d.ts +1 -1
  254. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -10
  255. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +4 -0
  256. package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
  257. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
  258. package/dist/types/components/utils/checkout/buildTranslateRequestBody.d.ts +26 -0
  259. package/dist/types/components/utils/containsNonLatinChars.d.ts +1 -0
  260. package/dist/types/components/utils/getBorderRadius.d.ts +7 -1
  261. package/dist/types/components.d.ts +308 -6
  262. package/dist/types/types/checkout/TranslatedText.d.ts +23 -0
  263. package/dist/types/types/checkout/api/ValidateAddressRequest.d.ts +20 -0
  264. package/dist/types/types/generated/graphql.customer.types.d.ts +2 -0
  265. package/dist/types/types/generated/graphql.customer.types.ts +2 -0
  266. package/dist/zonos-elements/{p-593948b5.system.entry.js → p-029f11dd.system.entry.js} +1 -1
  267. package/dist/zonos-elements/{p-af8391bb.entry.js → p-094c0ee8.entry.js} +1 -1
  268. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  269. package/dist/zonos-elements/p-11504442.entry.js +1 -0
  270. package/dist/zonos-elements/p-11bef836.system.entry.js +1 -0
  271. package/dist/zonos-elements/{p-bc3a0f7c.entry.js → p-11f1b78c.entry.js} +1 -1
  272. package/dist/zonos-elements/p-13ddaf31.js +2 -0
  273. package/dist/zonos-elements/p-154aaf95.system.js +1 -0
  274. package/dist/zonos-elements/p-163ff5b5.system.js +2 -0
  275. package/dist/zonos-elements/{p-5ee8a685.entry.js → p-1e934274.entry.js} +1 -1
  276. package/dist/zonos-elements/p-20582e58.system.entry.js +1 -0
  277. package/dist/zonos-elements/{p-bfa8d9a4.system.entry.js → p-2439c82f.system.entry.js} +1 -1
  278. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  279. package/dist/zonos-elements/p-321226b0.entry.js +1 -0
  280. package/dist/zonos-elements/{p-d149bc5d.system.entry.js → p-3221530d.system.entry.js} +1 -1
  281. package/dist/zonos-elements/{p-e9fafda6.entry.js → p-32d27535.entry.js} +1 -1
  282. package/dist/zonos-elements/p-3d10866d.entry.js +1 -0
  283. package/dist/zonos-elements/{p-1a5f8df7.entry.js → p-3d8667a7.entry.js} +1 -1
  284. package/dist/zonos-elements/p-3f05d130.system.entry.js +1 -0
  285. package/dist/zonos-elements/p-430eefd4.entry.js +1 -0
  286. package/dist/zonos-elements/{p-fc35d717.system.entry.js → p-49825866.system.entry.js} +1 -1
  287. package/dist/zonos-elements/p-5525b740.entry.js +1 -0
  288. package/dist/zonos-elements/p-578f0aad.system.js +1 -0
  289. package/dist/zonos-elements/{p-3e417d7c.entry.js → p-58a8ef6c.entry.js} +1 -1
  290. package/dist/zonos-elements/p-5d993965.js +1 -0
  291. package/dist/zonos-elements/{p-262b8e1e.system.entry.js → p-5f9c066d.system.entry.js} +1 -1
  292. package/dist/zonos-elements/{p-49120f0e.system.entry.js → p-60e262f0.system.entry.js} +1 -1
  293. package/dist/zonos-elements/p-64b594f4.js +1 -0
  294. package/dist/zonos-elements/{p-7891f8d2.entry.js → p-66471df6.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-95c864ca.system.entry.js → p-679877b1.system.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-fc4da55c.system.js → p-771fbeb3.system.js} +1 -1
  297. package/dist/zonos-elements/p-79f3c4f5.system.js +1 -0
  298. package/dist/zonos-elements/{p-e1ac5b2a.system.entry.js → p-80d78980.system.entry.js} +1 -1
  299. package/dist/zonos-elements/p-81a54668.js +1 -0
  300. package/dist/zonos-elements/p-83cc2936.js +1 -0
  301. package/dist/zonos-elements/{p-520e8e63.system.js → p-87badea9.system.js} +1 -1
  302. package/dist/zonos-elements/p-8a61a04f.system.entry.js +1 -0
  303. package/dist/zonos-elements/p-8b32f560.system.entry.js +1 -0
  304. package/dist/zonos-elements/{p-d01576d7.js → p-909a331c.js} +1 -1
  305. package/dist/zonos-elements/{p-031086ba.system.entry.js → p-94b15a5e.system.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-9768840a.system.entry.js → p-9a45fae5.system.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-24fee841.entry.js → p-9ec93319.entry.js} +1 -1
  308. package/dist/zonos-elements/p-a6d7ac46.js +1 -0
  309. package/dist/zonos-elements/{p-2a99c8b5.system.entry.js → p-a6eeb4bd.system.entry.js} +1 -1
  310. package/dist/zonos-elements/{p-1950dda7.entry.js → p-a93f2e84.entry.js} +1 -1
  311. package/dist/zonos-elements/p-aed0098c.system.js +1 -0
  312. package/dist/zonos-elements/{p-92446677.entry.js → p-b19d51e0.entry.js} +1 -1
  313. package/dist/zonos-elements/{p-46f9c93e.system.entry.js → p-b9652402.system.entry.js} +1 -1
  314. package/dist/zonos-elements/{p-d3772fd3.entry.js → p-baee62a4.entry.js} +1 -1
  315. package/dist/zonos-elements/{p-eff12c31.system.entry.js → p-bf32179a.system.entry.js} +1 -1
  316. package/dist/zonos-elements/p-cd1cc224.entry.js +1 -0
  317. package/dist/zonos-elements/{p-ae4a4634.system.entry.js → p-d1b63cec.system.entry.js} +1 -1
  318. package/dist/zonos-elements/p-d6b103d5.system.js +1 -0
  319. package/dist/zonos-elements/{p-376bdf70.entry.js → p-da6767d8.entry.js} +1 -1
  320. package/dist/zonos-elements/p-dde1383b.entry.js +1 -0
  321. package/dist/zonos-elements/p-df192668.system.js +1 -0
  322. package/dist/zonos-elements/{p-70ede197.system.entry.js → p-df24d548.system.entry.js} +1 -1
  323. package/dist/zonos-elements/{p-6743734f.entry.js → p-e7b4b756.entry.js} +1 -1
  324. package/dist/zonos-elements/{p-d41b5762.js → p-f1962041.js} +1 -1
  325. package/dist/zonos-elements/{p-a0abc499.system.entry.js → p-f3d3c754.system.entry.js} +1 -1
  326. package/dist/zonos-elements/p-f79682b5.entry.js +1 -0
  327. package/dist/zonos-elements/zonos-elements.css +3 -3
  328. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  329. package/dist/zonos-elements/zonos-elements.js +1 -1
  330. package/package.json +3 -2
  331. package/dist/cjs/index-3b4816ef.js +0 -2088
  332. package/dist/cjs/sendErrorLog-29e50f7e.js +0 -29
  333. package/dist/cjs/zonos-address_4.cjs.entry.js +0 -388
  334. package/dist/cjs/zonos-icon.cjs.entry.js +0 -39
  335. package/dist/components/sendErrorLog.js +0 -21
  336. package/dist/esm/index-0e31d804.js +0 -2055
  337. package/dist/esm/sendErrorLog-8642e94a.js +0 -26
  338. package/dist/esm/zonos-address_4.entry.js +0 -381
  339. package/dist/esm/zonos-icon.entry.js +0 -35
  340. package/dist/esm-es5/cart-10bcd2e0.js +0 -1
  341. package/dist/esm-es5/getBorderRadius-8129b0cb.js +0 -1
  342. package/dist/esm-es5/index-0e31d804.js +0 -2
  343. package/dist/esm-es5/sendErrorLog-8642e94a.js +0 -1
  344. package/dist/esm-es5/submitGtag-84886899.js +0 -1
  345. package/dist/esm-es5/zonos-address_4.entry.js +0 -1
  346. package/dist/esm-es5/zonos-button_2.entry.js +0 -1
  347. package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
  348. package/dist/esm-es5/zonos-icon.entry.js +0 -1
  349. package/dist/scripts/insertTranslations.js +0 -1
  350. package/dist/zonos-elements/p-0253aeae.entry.js +0 -1
  351. package/dist/zonos-elements/p-1264b362.entry.js +0 -1
  352. package/dist/zonos-elements/p-2244534c.js +0 -2
  353. package/dist/zonos-elements/p-2825570c.system.js +0 -2
  354. package/dist/zonos-elements/p-33abdb30.js +0 -1
  355. package/dist/zonos-elements/p-450942a3.system.js +0 -1
  356. package/dist/zonos-elements/p-48a2b8b0.entry.js +0 -1
  357. package/dist/zonos-elements/p-5ca09163.entry.js +0 -1
  358. package/dist/zonos-elements/p-5ff27485.js +0 -1
  359. package/dist/zonos-elements/p-6d9dbecb.system.entry.js +0 -1
  360. package/dist/zonos-elements/p-6e8d43de.entry.js +0 -1
  361. package/dist/zonos-elements/p-6f5761e8.js +0 -1
  362. package/dist/zonos-elements/p-78d22069.system.entry.js +0 -1
  363. package/dist/zonos-elements/p-8b44e558.system.js +0 -1
  364. package/dist/zonos-elements/p-8bc0e56a.system.entry.js +0 -1
  365. package/dist/zonos-elements/p-9350d19f.entry.js +0 -1
  366. package/dist/zonos-elements/p-9e8f1065.system.entry.js +0 -1
  367. package/dist/zonos-elements/p-a6bbf6de.system.entry.js +0 -1
  368. package/dist/zonos-elements/p-b8e8330b.system.js +0 -1
  369. package/dist/zonos-elements/p-be022d8e.entry.js +0 -1
  370. package/dist/zonos-elements/p-c6170bec.system.js +0 -1
  371. package/dist/zonos-elements/p-e705c44c.entry.js +0 -1
  372. package/dist/zonos-elements/p-ed2e94d2.js +0 -1
  373. package/dist/zonos-elements/p-f4c38bfc.system.js +0 -1
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ZonosAddressDisplay extends Components.ZonosAddressDisplay, HTMLElement {}
4
+ export const ZonosAddressDisplay: {
5
+ prototype: ZonosAddressDisplay;
6
+ new (): ZonosAddressDisplay;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { Z as ZonosAddressDisplay$1, d as defineCustomElement$1 } from './zonos-address-display2.js';
2
+
3
+ const ZonosAddressDisplay = ZonosAddressDisplay$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { ZonosAddressDisplay, defineCustomElement };
@@ -0,0 +1,64 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { a as localizationStore } from './stripe.js';
3
+ import { a as translate } from './translationStore.js';
4
+ import { i as isTextContainsNonLatinChars } from './containsNonLatinChars.js';
5
+ import { d as defineCustomElement$2 } from './zonos-country-flag2.js';
6
+ import { d as defineCustomElement$1 } from './zonos-text2.js';
7
+
8
+ const zonosAddressDisplayCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:\", \";color:var(--amino-gray-1200);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}";
9
+ const ZonosAddressDisplayStyle0 = zonosAddressDisplayCss;
10
+
11
+ const ZonosAddressDisplay = /*@__PURE__*/ proxyCustomElement(class ZonosAddressDisplay extends HTMLElement {
12
+ constructor() {
13
+ super();
14
+ this.__registerHost();
15
+ this.__attachShadow();
16
+ this.currentAddress = undefined;
17
+ this.addressType = undefined;
18
+ }
19
+ render() {
20
+ var _a;
21
+ const { city, country, email, line1, line2, name, phone, postal_code, state, } = this.currentAddress;
22
+ const shippingZoneCountry = (_a = localizationStore.shippingZoneCountries) === null || _a === void 0 ? void 0 : _a[country];
23
+ const renderEnteredInfoText = ({ bold, content, }) => {
24
+ const textColor = isTextContainsNonLatinChars(content)
25
+ ? 'red-600'
26
+ : 'gray-1200';
27
+ return (h("zonos-text", { textColor: textColor, type: bold ? 'boldLabel' : 'body' }, content));
28
+ };
29
+ return (h(Host, { class: "zonos--address-form zonos--elements" }, h("div", { class: "zonos--title" }, h("zonos-text", { textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
30
+ ? translate('Shipping')
31
+ : translate('Billing'))), h("div", { class: "zonos--address-group" }, name && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), shippingZoneCountry && (h("div", { class: "zonos--address-line" }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: shippingZoneCountry.code }), ' ', renderEnteredInfoText({
32
+ content: shippingZoneCountry.displayName,
33
+ }))))));
34
+ }
35
+ static get style() { return ZonosAddressDisplayStyle0; }
36
+ }, [1, "zonos-address-display", {
37
+ "currentAddress": [16],
38
+ "addressType": [1, "address-type"]
39
+ }]);
40
+ function defineCustomElement() {
41
+ if (typeof customElements === "undefined") {
42
+ return;
43
+ }
44
+ const components = ["zonos-address-display", "zonos-country-flag", "zonos-text"];
45
+ components.forEach(tagName => { switch (tagName) {
46
+ case "zonos-address-display":
47
+ if (!customElements.get(tagName)) {
48
+ customElements.define(tagName, ZonosAddressDisplay);
49
+ }
50
+ break;
51
+ case "zonos-country-flag":
52
+ if (!customElements.get(tagName)) {
53
+ defineCustomElement$2();
54
+ }
55
+ break;
56
+ case "zonos-text":
57
+ if (!customElements.get(tagName)) {
58
+ defineCustomElement$1();
59
+ }
60
+ break;
61
+ } });
62
+ }
63
+
64
+ export { ZonosAddressDisplay as Z, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ZonosAddressForm extends Components.ZonosAddressForm, HTMLElement {}
4
+ export const ZonosAddressForm: {
5
+ prototype: ZonosAddressForm;
6
+ new (): ZonosAddressForm;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { Z as ZonosAddressForm$1, d as defineCustomElement$1 } from './zonos-address-form2.js';
2
+
3
+ const ZonosAddressForm = ZonosAddressForm$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { ZonosAddressForm, defineCustomElement };
@@ -0,0 +1,84 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { a as translate } from './translationStore.js';
3
+ import { i as isTextContainsNonLatinChars } from './containsNonLatinChars.js';
4
+ import { d as defineCustomElement$2 } from './zonos-input2.js';
5
+ import { d as defineCustomElement$1 } from './zonos-text2.js';
6
+
7
+ const zonosAddressFormCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";
8
+ const ZonosAddressFormStyle0 = zonosAddressFormCss;
9
+
10
+ const ZonosAddressForm = /*@__PURE__*/ proxyCustomElement(class ZonosAddressForm extends HTMLElement {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ this.addressChange = createEvent(this, "addressChange", 7);
16
+ this.onInputChange = ({ key, value, }) => {
17
+ this.addressChange.emit(Object.assign(Object.assign({}, this.localAddress), { [key]: value }));
18
+ };
19
+ this.currentAddress = undefined;
20
+ this.translatedAddress = undefined;
21
+ this.addressType = undefined;
22
+ this.localAddress = this.currentAddress;
23
+ }
24
+ watchCurrentAddress() {
25
+ var _a, _b, _c, _d, _e, _f;
26
+ const { city, line1, line2, name, postal_code, state } = this.currentAddress;
27
+ // Update the local address when the current address changes
28
+ // If translated address is available, use that instead
29
+ this.localAddress = Object.assign(Object.assign({}, this.currentAddress), { city: ((_a = this.translatedAddress.city) === null || _a === void 0 ? void 0 : _a[city]) || city, line1: ((_b = this.translatedAddress.line1) === null || _b === void 0 ? void 0 : _b[line1]) || line1, line2: ((_c = this.translatedAddress.line2) === null || _c === void 0 ? void 0 : _c[line2]) || line2, name: ((_d = this.translatedAddress.name) === null || _d === void 0 ? void 0 : _d[name]) || name, postal_code: ((_e = this.translatedAddress.postal_code) === null || _e === void 0 ? void 0 : _e[postal_code]) || postal_code, state: ((_f = this.translatedAddress.state) === null || _f === void 0 ? void 0 : _f[state]) || state });
30
+ }
31
+ componentWillLoad() {
32
+ this.watchCurrentAddress();
33
+ }
34
+ render() {
35
+ const { city, country, line1, line2, name, phone, postal_code, state } = this.localAddress;
36
+ const firstName = name.split(' ')[0] || '';
37
+ const lastName = name.split(' ')[1] || '';
38
+ return (h(Host, { key: '9c1ee87200d1f90e9dfac58c49aabba1777373a9', class: "zonos--address-form zonos--elements" }, h("div", { key: 'eec3416268ff2324fd751408552705086905423d', class: "zonos--title" }, h("zonos-text", { key: 'a4c254f78420dcfc712e1a83b20dd3ac9e64c460', textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
39
+ ? translate('Shipping')
40
+ : translate('Billing'))), h("div", { key: 'b8109545d282fb8c06a2e791c30088018d6ffec0', class: "zonos--address-group" }, h("div", { key: '833a395984cd75242e5d97697fd6566f11932d1b', class: "zonos--contact" }, h("zonos-text", { key: 'e60f574e95162aabf6465b878fc9b16c708e8029', type: "label" }, translate('Contact')), h("zonos-input", { key: '24cd24a362a1bbc76d0c91718c48ae32baa20ae6', class: "zonos--form-email", inputLabel: translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), h("div", { key: '84e64ef44eb3b39ac7ab542e07d7a52a95377cae', class: "zonos--name zonos--address-row" }, h("zonos-input", { key: '26621aca0d57a7fee743874b8d11af5f58c91b69', class: "zonos--form-first-name", inputLabel: translate('First name'), inputValue: firstName, isError: isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
41
+ key: 'name',
42
+ value: `${e.detail} ${lastName}`,
43
+ }) }), h("zonos-input", { key: '01e3e5038b4a4311dd5874a1213f936451dc300d', class: "zonos--form-last-name", inputLabel: translate('Last name'), inputValue: lastName, isError: isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
44
+ key: 'name',
45
+ value: `${firstName} ${e.detail}`,
46
+ }) }))), h("div", { key: 'eb42dece28082ff16a453110b3208de5b44b9fdb', class: "zonos--address" }, h("zonos-text", { key: '3557122c716533be7b36a8bd395ea616a7061665', type: "label" }, translate('Address')), h("zonos-input", { key: 'bcc7d84d530f2f3a10537117eb6ef143df7cc8e2', class: "zonos--form-country", inputLabel: translate('Country'), inputValue: country, isDisabled: true }), h("zonos-input", { key: '6ce78e25151a129b69b501cf768604134a395e85', class: "zonos--form-line1", inputLabel: translate('Address line 1'), inputValue: line1, isError: isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), h("zonos-input", { key: '6f7a18010e2d8131327154a31ba58544df56768c', class: "zonos--form-line2", inputLabel: translate('Address line 2'), inputValue: line2, isError: isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), h("div", { key: '48afbf7a3cbd26fddfea4f2799005a51b1c3d3c6', class: "zonos--address-row" }, h("zonos-input", { key: '6decf8c430d8d25b2c555b110009da74e0ac9e5f', class: "zonos--form-city", inputLabel: translate('City'), inputValue: city, isError: isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), h("zonos-input", { key: '065e1be213d3cfec7749ab32890f96b0b484a25a', class: "zonos--form-state", inputLabel: translate('State/Province'), inputValue: state, isError: isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), h("zonos-input", { key: 'a69244bf84c9fd007c9ad4aad2b6cc6d44420775', class: "zonos--form-postal-code", inputLabel: translate('Postal code'), inputValue: postal_code, isError: isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), h("zonos-input", { key: '0bcc89de1ecc4aae8a69d74eff42dfd117ada40b', class: "zonos--form-phone", inputLabel: translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
47
+ }
48
+ static get watchers() { return {
49
+ "translatedAddress": ["watchCurrentAddress"]
50
+ }; }
51
+ static get style() { return ZonosAddressFormStyle0; }
52
+ }, [1, "zonos-address-form", {
53
+ "currentAddress": [16],
54
+ "translatedAddress": [16],
55
+ "addressType": [1, "address-type"],
56
+ "localAddress": [32]
57
+ }, undefined, {
58
+ "translatedAddress": ["watchCurrentAddress"]
59
+ }]);
60
+ function defineCustomElement() {
61
+ if (typeof customElements === "undefined") {
62
+ return;
63
+ }
64
+ const components = ["zonos-address-form", "zonos-input", "zonos-text"];
65
+ components.forEach(tagName => { switch (tagName) {
66
+ case "zonos-address-form":
67
+ if (!customElements.get(tagName)) {
68
+ customElements.define(tagName, ZonosAddressForm);
69
+ }
70
+ break;
71
+ case "zonos-input":
72
+ if (!customElements.get(tagName)) {
73
+ defineCustomElement$2();
74
+ }
75
+ break;
76
+ case "zonos-text":
77
+ if (!customElements.get(tagName)) {
78
+ defineCustomElement$1();
79
+ }
80
+ break;
81
+ } });
82
+ }
83
+
84
+ export { ZonosAddressForm as Z, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ZonosAddressUpdateDialog extends Components.ZonosAddressUpdateDialog, HTMLElement {}
4
+ export const ZonosAddressUpdateDialog: {
5
+ prototype: ZonosAddressUpdateDialog;
6
+ new (): ZonosAddressUpdateDialog;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { Z as ZonosAddressUpdateDialog$1, d as defineCustomElement$1 } from './zonos-address-update-dialog2.js';
2
+
3
+ const ZonosAddressUpdateDialog = ZonosAddressUpdateDialog$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { ZonosAddressUpdateDialog, defineCustomElement };
@@ -0,0 +1,264 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { a as translate } from './translationStore.js';
3
+ import { z as zonosStore } from './zonosStore.js';
4
+ import { c as classes } from './classes.js';
5
+ import { c as containsNonLatinChars } from './containsNonLatinChars.js';
6
+ import { d as defineCustomElement$9 } from './zonos-address-display2.js';
7
+ import { d as defineCustomElement$8 } from './zonos-address-form2.js';
8
+ import { d as defineCustomElement$7 } from './zonos-button2.js';
9
+ import { d as defineCustomElement$6 } from './zonos-country-flag2.js';
10
+ import { d as defineCustomElement$5 } from './zonos-dialog2.js';
11
+ import { d as defineCustomElement$4 } from './zonos-icon2.js';
12
+ import { d as defineCustomElement$3 } from './zonos-input2.js';
13
+ import { d as defineCustomElement$2 } from './zonos-spinner2.js';
14
+ import { d as defineCustomElement$1 } from './zonos-text2.js';
15
+
16
+ const RemoveIcon = `<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
17
+
18
+ const zonosAddressUpdateDialogCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--amino-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--amino-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--amino-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";
19
+ const ZonosAddressUpdateDialogStyle0 = zonosAddressUpdateDialogCss;
20
+
21
+ const ZonosAddressUpdateDialog = /*@__PURE__*/ proxyCustomElement(class ZonosAddressUpdateDialog extends HTMLElement {
22
+ constructor() {
23
+ super();
24
+ this.__registerHost();
25
+ this.__attachShadow();
26
+ this.closeDialog = createEvent(this, "closeDialog", 7);
27
+ this.continueClicked = createEvent(this, "continueClicked", 7);
28
+ /**
29
+ * handler for close button click
30
+ */
31
+ this.closeDialogHandler = () => {
32
+ this.closeDialog.emit();
33
+ };
34
+ /**
35
+ * Extract value from translated object
36
+ */
37
+ this.getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
38
+ var _a, _b, _c, _d, _e, _f;
39
+ const { city, line1, line2, name, postal_code, state } = currentAddress;
40
+ return {
41
+ city: ((_a = translatedAddress.city) === null || _a === void 0 ? void 0 : _a[city]) || city,
42
+ line1: ((_b = translatedAddress.line1) === null || _b === void 0 ? void 0 : _b[line1]) || line1,
43
+ line2: ((_c = translatedAddress.line2) === null || _c === void 0 ? void 0 : _c[line2]) || line2,
44
+ name: ((_d = translatedAddress.name) === null || _d === void 0 ? void 0 : _d[name]) || name,
45
+ postal_code: ((_e = translatedAddress.postal_code) === null || _e === void 0 ? void 0 : _e[postal_code]) || postal_code,
46
+ state: ((_f = translatedAddress.state) === null || _f === void 0 ? void 0 : _f[state]) || state,
47
+ };
48
+ };
49
+ /**
50
+ * handler for continue button click
51
+ */
52
+ this.continueClickHandler = async () => {
53
+ var _a, _b, _c;
54
+ // set spinner for the continue button
55
+ this.continueLoading = true;
56
+ const translatedBillingAddress = this.billingAddress
57
+ ? this.getTranslatedAddress({
58
+ currentAddress: this.billingAddress,
59
+ translatedAddress: this.translatedBillingAddressState,
60
+ })
61
+ : null;
62
+ const translatedShippingAddress = this.getTranslatedAddress({
63
+ currentAddress: this.shippingAddress,
64
+ translatedAddress: this.translatedShippingAddressState,
65
+ });
66
+ // check to see if there are still non-latin characters in the translated address
67
+ const shippingNonlatinChars = containsNonLatinChars(Object.assign(Object.assign({}, translatedShippingAddress), { country: this.shippingAddress.country }));
68
+ // get list of non-latin characters field in the billing address
69
+ const billingNonLatinChars = translatedBillingAddress &&
70
+ this.billingAddress &&
71
+ containsNonLatinChars(Object.assign(Object.assign({}, translatedBillingAddress), { country: this.billingAddress.country }));
72
+ const shippingHasNonLatinChars = !!Object.keys(shippingNonlatinChars)
73
+ .length;
74
+ const billingHasNonLatinChars = !!billingNonLatinChars && !!Object.keys(billingNonLatinChars).length;
75
+ // if there are non-latin characters in the translated address, scroll to the error input so user can see and fix it
76
+ if (shippingHasNonLatinChars || billingHasNonLatinChars) {
77
+ // get scroll top of the first input has "has-error" class
78
+ const addressForms = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('zonos-address-form');
79
+ const shippingAddressForm = addressForms === null || addressForms === void 0 ? void 0 : addressForms[0];
80
+ const billingAddressForm = addressForms === null || addressForms === void 0 ? void 0 : addressForms[1];
81
+ const errorInput = ((_b = shippingAddressForm === null || shippingAddressForm === void 0 ? void 0 : shippingAddressForm.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.has-error')) ||
82
+ ((_c = billingAddressForm === null || billingAddressForm === void 0 ? void 0 : billingAddressForm.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.has-error'));
83
+ // scroll to the first error input
84
+ if (errorInput) {
85
+ errorInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
86
+ }
87
+ this.continueLoading = false;
88
+ return;
89
+ }
90
+ // Submit the translated address to the parent component
91
+ this.continueClicked.emit({
92
+ billingAddress: translatedBillingAddress,
93
+ shippingAddress: translatedShippingAddress,
94
+ });
95
+ };
96
+ /**
97
+ * This function builds a state object for a translated address.
98
+ * It takes the current and translated address as input and returns an object where each field is an object itself.
99
+ * The key of each field's object is the current address's field value and the value is the corresponding translated address's field value.
100
+ *
101
+ * @param {Object} params - The parameters for the function.
102
+ * @param {EnteredInfo} params.currentAddress - The current address information.
103
+ * @param {EnteredInfo} params.translatedAddress - The translated address information.
104
+ *
105
+ */
106
+ this.buildTranslateAddressState = ({ currentAddress, translatedAddress, }) => {
107
+ const { city, line1, line2, name, postal_code, state } = currentAddress;
108
+ return {
109
+ city: {
110
+ [city]: translatedAddress.city,
111
+ },
112
+ line1: {
113
+ [line1]: translatedAddress.line1,
114
+ },
115
+ line2: {
116
+ [line2]: translatedAddress.line2,
117
+ },
118
+ name: {
119
+ [name]: translatedAddress.name,
120
+ },
121
+ postal_code: {
122
+ [postal_code]: translatedAddress.postal_code,
123
+ },
124
+ state: {
125
+ [state]: translatedAddress.state,
126
+ },
127
+ };
128
+ };
129
+ this.continueLoading = false;
130
+ this.dialogLoading = undefined;
131
+ this.dialogOpen = false;
132
+ this.submitBtnType = undefined;
133
+ this.submitBtnColor = undefined;
134
+ this.isMobile = false;
135
+ this.shippingAddress = undefined;
136
+ this.billingAddress = undefined;
137
+ this.translatedShippingAddress = undefined;
138
+ this.translatedBillingAddress = undefined;
139
+ this.showErrorBanner = false;
140
+ this.translatedShippingAddressState = {};
141
+ this.translatedBillingAddressState = {};
142
+ }
143
+ watchTranslatedShippingAddress() {
144
+ this.translatedShippingAddressState = this.translatedShippingAddress;
145
+ }
146
+ watchTranslatedBillingAddress() {
147
+ this.translatedBillingAddressState = this.translatedBillingAddress;
148
+ }
149
+ componentWillLoad() {
150
+ // update the state with the initial props
151
+ this.watchTranslatedBillingAddress();
152
+ this.watchTranslatedShippingAddress();
153
+ }
154
+ render() {
155
+ // dialog background white, so when the button background is also white, we need to change the button type to outline so it's visible
156
+ const submitBtnColor = this.submitBtnColor || zonosStore.appearance.colorSecondary;
157
+ const submitBtnType = submitBtnColor === '#ffffff'
158
+ ? 'outline'
159
+ : this.submitBtnType || 'standard';
160
+ const billing = this.billingAddress;
161
+ const shipping = this.shippingAddress;
162
+ return (h(Host, { key: '03535edacb348258592641baa349e9dcf14bf78c', class: classes([
163
+ 'zonos--address-update-dialog zonos--elements',
164
+ this.isMobile && 'mobile',
165
+ ]) }, h("zonos-dialog", { key: 'c16871425dffe955d422ffa5b9aee1ece0da2890', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialog.emit(), open: this.dialogOpen, width: "568px" }, h("div", { key: 'e4fad501f7cfedc5783774d8b1bf785d6947d3c8', class: "zonos--body" }, h("div", { key: '973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0', class: "zonos--dialog-header" }, h("div", { key: '89c82b6ff3723056d161560da22bd16a992afee7', class: "zonos--dialog-title" }, h("zonos-text", { key: 'bf92ef0b40ea67a492164fedb95dd68b7d023e85', type: "title" }, translate('Update your address')), h("zonos-button", { key: '4e7a1905c976cec396db5c34f633b383bba0d55a', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("zonos-text", { key: '47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38' }, translate('To ensure delivery all address details must be in Latin characters.'))), h("div", { key: '28d9804f0a18f143ce541c2c511cbfa21a2a416f', class: "zonos--group" }, h("zonos-text", { key: '43ec5a9fc8594d065b256952ca8e9392fba03839', class: "zonos--what-you-entered", type: "semiBoldLabel" }, translate('What you entered')), h("div", { key: 'b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1', class: "zonos--address-display-group" }, h("zonos-address-display", { key: '152c53176a46575677723ca47386e484c659927a', addressType: "shipping", currentAddress: shipping }), billing && (h("zonos-address-display", { key: '6c7ac2b49d121c26ce45f09a1eac9ef456d45910', addressType: "billing", currentAddress: billing }))), h("div", { key: '2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d', class: "zonos--address-form-section" }, h("zonos-text", { key: '87d3380072a049ccde71ba1b752aedd36830348b', type: "semiBoldLabel" }, translate('Translated address')), h("zonos-address-form", { key: '2cb36251c6549da05e272183b2c37478b4166fea', addressType: "shipping", class: "zonos--shipping-address-form", currentAddress: shipping, onAddressChange: e => {
166
+ const address = e.detail;
167
+ this.translatedShippingAddressState =
168
+ this.buildTranslateAddressState({
169
+ currentAddress: shipping,
170
+ translatedAddress: address,
171
+ });
172
+ }, translatedAddress: this.translatedShippingAddressState }), billing && (h("zonos-address-form", { key: '9bf5ebd6fb08851716a72c855451bfeb3ee0ed68', addressType: "billing", class: "zonos--billing-address-form", currentAddress: billing, onAddressChange: e => {
173
+ const address = e.detail;
174
+ this.translatedBillingAddressState =
175
+ this.buildTranslateAddressState({
176
+ currentAddress: billing,
177
+ translatedAddress: address,
178
+ });
179
+ }, translatedAddress: this.translatedBillingAddressState })))), h("div", { key: '621df9c8919973b37c62aca5727bde3635086a6b', class: "zonos--group-btn" }, h("div", { key: '95e9fd31418abc8e89ceef24af7cc251ee45ac93', class: "zonos--button-wrapper" }, h("zonos-button", { key: 'bef31fc81e7cc0f2b3f7ab875a29978b07865b6a', class: "zonos--cancel-btn", onClick: () => this.closeDialogHandler(), variant: "subtle" }, translate('Cancel')), h("zonos-button", { key: '9d183153541766b421c3420681c1159ffa599682', backgroundColor: this.submitBtnColor, class: "zonos--update-btn", loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "sm", variant: submitBtnType }, translate('Update address'))))))));
180
+ }
181
+ get el() { return this; }
182
+ static get watchers() { return {
183
+ "translatedShippingAddress": ["watchTranslatedShippingAddress"],
184
+ "translatedBillingAddress": ["watchTranslatedBillingAddress"]
185
+ }; }
186
+ static get style() { return ZonosAddressUpdateDialogStyle0; }
187
+ }, [1, "zonos-address-update-dialog", {
188
+ "continueLoading": [4, "continue-loading"],
189
+ "dialogLoading": [4, "dialog-loading"],
190
+ "dialogOpen": [4, "dialog-open"],
191
+ "submitBtnType": [1, "submit-btn-type"],
192
+ "submitBtnColor": [1, "submit-btn-color"],
193
+ "isMobile": [4, "is-mobile"],
194
+ "shippingAddress": [16],
195
+ "billingAddress": [16],
196
+ "translatedShippingAddress": [16],
197
+ "translatedBillingAddress": [16],
198
+ "showErrorBanner": [32],
199
+ "translatedShippingAddressState": [32],
200
+ "translatedBillingAddressState": [32]
201
+ }, undefined, {
202
+ "translatedShippingAddress": ["watchTranslatedShippingAddress"],
203
+ "translatedBillingAddress": ["watchTranslatedBillingAddress"]
204
+ }]);
205
+ function defineCustomElement() {
206
+ if (typeof customElements === "undefined") {
207
+ return;
208
+ }
209
+ const components = ["zonos-address-update-dialog", "zonos-address-display", "zonos-address-form", "zonos-button", "zonos-country-flag", "zonos-dialog", "zonos-icon", "zonos-input", "zonos-spinner", "zonos-text"];
210
+ components.forEach(tagName => { switch (tagName) {
211
+ case "zonos-address-update-dialog":
212
+ if (!customElements.get(tagName)) {
213
+ customElements.define(tagName, ZonosAddressUpdateDialog);
214
+ }
215
+ break;
216
+ case "zonos-address-display":
217
+ if (!customElements.get(tagName)) {
218
+ defineCustomElement$9();
219
+ }
220
+ break;
221
+ case "zonos-address-form":
222
+ if (!customElements.get(tagName)) {
223
+ defineCustomElement$8();
224
+ }
225
+ break;
226
+ case "zonos-button":
227
+ if (!customElements.get(tagName)) {
228
+ defineCustomElement$7();
229
+ }
230
+ break;
231
+ case "zonos-country-flag":
232
+ if (!customElements.get(tagName)) {
233
+ defineCustomElement$6();
234
+ }
235
+ break;
236
+ case "zonos-dialog":
237
+ if (!customElements.get(tagName)) {
238
+ defineCustomElement$5();
239
+ }
240
+ break;
241
+ case "zonos-icon":
242
+ if (!customElements.get(tagName)) {
243
+ defineCustomElement$4();
244
+ }
245
+ break;
246
+ case "zonos-input":
247
+ if (!customElements.get(tagName)) {
248
+ defineCustomElement$3();
249
+ }
250
+ break;
251
+ case "zonos-spinner":
252
+ if (!customElements.get(tagName)) {
253
+ defineCustomElement$2();
254
+ }
255
+ break;
256
+ case "zonos-text":
257
+ if (!customElements.get(tagName)) {
258
+ defineCustomElement$1();
259
+ }
260
+ break;
261
+ } });
262
+ }
263
+
264
+ export { RemoveIcon as R, ZonosAddressUpdateDialog as Z, defineCustomElement as d };
@@ -1,41 +1,11 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { s as stripeStore, l as logError, a as localizationStore, t as translate } from './stripe.js';
3
- import { z as zonosStore } from './zonosStore.js';
2
+ import { s as stripeStore, l as logError, a as localizationStore } from './stripe.js';
4
3
  import { i as isCheckoutMobile } from './isCheckoutMobile.js';
5
- import { s as sendErrorLog } from './sendErrorLog.js';
6
- import { d as defineCustomElement$2 } from './zonos-banner2.js';
7
4
  import { d as defineCustomElement$1 } from './zonos-text2.js';
8
5
 
9
- /**
10
- * Check if the given address object contains non-latin characters
11
- * @returns an object with the same keys as the input object, and a boolean value indicating if the value contains non-latin characters
12
- */
13
- const containsNonLatinChars = (params) => {
14
- const specialCharacters = /[ʼˮ՚ߴߵ']{1}/u;
15
- /**
16
- * This regex matches any character that is not a latin character, punctuation, symbol, number, separator, control, or mark
17
- * I limited the character found to 1 in the regex, so that we can return early if we find any non-latin character
18
- **/
19
- const nonLatinRegex = /[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;
20
- const nonLatinValueList = Object.entries(params).reduce((prev, [key, value]) => nonLatinRegex.test(value) &&
21
- // allow special characters like web apostrophe and quotation mark
22
- !specialCharacters.test(value)
23
- ? Object.assign(Object.assign({}, prev), { [key]: true }) : prev, {});
24
- return nonLatinValueList;
25
- };
26
-
27
6
  const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
28
7
  const ZonosAddressStyle0 = zonosAddressCss;
29
8
 
30
- const mappedFields = {
31
- city: 'City',
32
- country: 'Country',
33
- line1: 'Address line 1',
34
- line2: 'Address line 2',
35
- name: 'Name',
36
- postal_code: 'Postal code',
37
- state: 'State',
38
- };
39
9
  const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends HTMLElement {
40
10
  constructor() {
41
11
  super();
@@ -45,8 +15,6 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
45
15
  this.titleText = undefined;
46
16
  this.defaultAddress = null;
47
17
  this.stripe = window.Zonos.stripe;
48
- this.reportedInvalidCharacters = false;
49
- this.invalidCharacterList = null;
50
18
  this.isDirtyAddress = false;
51
19
  }
52
20
  getStripeAddressInstance() {
@@ -72,9 +40,6 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
72
40
  stripeStore.stripeAddressEventData = event;
73
41
  break;
74
42
  }
75
- const invalidCharacterList = this.checkInvalidCharacters(event);
76
- this.invalidCharacterList = invalidCharacterList;
77
- this.invalidCharacters.emit(!!invalidCharacterList);
78
43
  }
79
44
  updateAddressElement({ stripeAddressElement, type, }) {
80
45
  if (type === 'shipping') {
@@ -83,47 +48,6 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
83
48
  }
84
49
  stripeStore.stripeBillingAddressElement = stripeAddressElement;
85
50
  }
86
- checkInvalidCharacters(address) {
87
- // Do nothing if the allowed character sets is ALL or the address is incomplete
88
- if (!address.complete ||
89
- zonosStore.checkoutSettings.allowedCharacterSets === 'ALL') {
90
- return null;
91
- }
92
- const { address: addressValue, firstName, lastName, name } = address.value;
93
- const { city, country, line1, line2, postal_code, state } = addressValue;
94
- const invalidList = containsNonLatinChars({
95
- city,
96
- country,
97
- line1,
98
- line2: line2 || '',
99
- name: name || `${firstName} ${lastName}`,
100
- postal_code,
101
- state,
102
- });
103
- if (!Object.keys(invalidList).length) {
104
- return null;
105
- }
106
- // send error event only once so we know what value is invalid
107
- if (!this.reportedInvalidCharacters) {
108
- this.reportedInvalidCharacters = true;
109
- void sendErrorLog({
110
- endpoint: 'NonLatinInput',
111
- errors: Object.keys(invalidList).map(fieldName => {
112
- var _a;
113
- if (fieldName !== 'name') {
114
- // trim all number so we don't send sensitive information
115
- const trimmedAddress = (_a = addressValue[fieldName]) === null || _a === void 0 ? void 0 : _a.replace(/[\d\w]+/g, '');
116
- return `Invalid character found ${fieldName}: "${trimmedAddress}"`;
117
- }
118
- const customerName = name || `${firstName} ${lastName}`;
119
- const trimmedName = customerName.replace(/[\d\w]+/g, '');
120
- return `Invalid character found ${fieldName}: "${trimmedName}"`;
121
- }),
122
- metadata: {},
123
- });
124
- }
125
- return invalidList;
126
- }
127
51
  async watchInitStripe() {
128
52
  var _a, _b;
129
53
  this.stripe = window.Zonos.stripe;
@@ -211,17 +135,10 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
211
135
  stripeAddressEventData.value.address.line1.length > 0;
212
136
  // @Watch doesn't get trigger on initial load
213
137
  void this.watchInitStripe();
214
- setTimeout(() => {
215
- // check if the address contains invalid characters after address is loaded
216
- const newStripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
217
- if (newStripeAddressEventData) {
218
- this.checkInvalidCharacters(newStripeAddressEventData);
219
- }
220
- }, 500);
221
138
  }
222
139
  render() {
223
140
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
224
- return (h(Host, { key: 'd5100d824d84c5e5b238f4877d489ca1b3f7b886', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '0fd51ddf9b08b4f62aa75a5f2e919d40e52f6fc3', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '3a53ec2a36e96639ec5437b928d4be4b84fb3aff', class: "zonos--address-component" }), this.invalidCharacterList && (h("zonos-banner", { key: '1141be407cff5b6741a40a06712a71e881d3a082', bannerTitle: translate('Please resolve the following errors:'), intent: "error" }, Object.keys(this.invalidCharacterList).map(fieldName => (h("zonos-text", null, `- ${translate(mappedFields[fieldName])}: ${translate('only supports Latin characters (A-Z, a-z)')}`)))))));
141
+ return (h(Host, { key: 'f45a7bbe9d6b5ffac15671a862b3ad4f2eb4a87b', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'a9119e6e0c4e5c81a7d17ebe4d6bec925404a3dd', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '7dc12043c6e75ebabd646490c390bafdc2cd4a1d', class: "zonos--address-component" })));
225
142
  }
226
143
  get el() { return this; }
227
144
  static get watchers() { return {
@@ -233,8 +150,6 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
233
150
  "titleText": [1, "title-text"],
234
151
  "defaultAddress": [16],
235
152
  "stripe": [32],
236
- "reportedInvalidCharacters": [32],
237
- "invalidCharacterList": [32],
238
153
  "isDirtyAddress": [32]
239
154
  }, undefined, {
240
155
  "stripe": ["watchInitStripe"]
@@ -243,18 +158,13 @@ function defineCustomElement() {
243
158
  if (typeof customElements === "undefined") {
244
159
  return;
245
160
  }
246
- const components = ["zonos-address", "zonos-banner", "zonos-text"];
161
+ const components = ["zonos-address", "zonos-text"];
247
162
  components.forEach(tagName => { switch (tagName) {
248
163
  case "zonos-address":
249
164
  if (!customElements.get(tagName)) {
250
165
  customElements.define(tagName, ZonosAddress);
251
166
  }
252
167
  break;
253
- case "zonos-banner":
254
- if (!customElements.get(tagName)) {
255
- defineCustomElement$2();
256
- }
257
- break;
258
168
  case "zonos-text":
259
169
  if (!customElements.get(tagName)) {
260
170
  defineCustomElement$1();