@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,429 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ import { translate } from "../../../store/translationStore";
3
+ import { zonosStore } from "../../../store/zonosStore";
4
+ import { classes } from "../../../utils/classes";
5
+ import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
6
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
7
+ import RemoveIcon from "./../assets/RemoveIcon.svg";
8
+ export class ZonosAddressUpdateDialog {
9
+ constructor() {
10
+ /**
11
+ * handler for close button click
12
+ */
13
+ this.closeDialogHandler = () => {
14
+ this.closeDialog.emit();
15
+ };
16
+ /**
17
+ * Extract value from translated object
18
+ */
19
+ this.getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
20
+ var _a, _b, _c, _d, _e, _f;
21
+ const { city, line1, line2, name, postal_code, state } = currentAddress;
22
+ return {
23
+ city: ((_a = translatedAddress.city) === null || _a === void 0 ? void 0 : _a[city]) || city,
24
+ line1: ((_b = translatedAddress.line1) === null || _b === void 0 ? void 0 : _b[line1]) || line1,
25
+ line2: ((_c = translatedAddress.line2) === null || _c === void 0 ? void 0 : _c[line2]) || line2,
26
+ name: ((_d = translatedAddress.name) === null || _d === void 0 ? void 0 : _d[name]) || name,
27
+ postal_code: ((_e = translatedAddress.postal_code) === null || _e === void 0 ? void 0 : _e[postal_code]) || postal_code,
28
+ state: ((_f = translatedAddress.state) === null || _f === void 0 ? void 0 : _f[state]) || state,
29
+ };
30
+ };
31
+ /**
32
+ * handler for continue button click
33
+ */
34
+ this.continueClickHandler = async () => {
35
+ var _a, _b, _c;
36
+ // set spinner for the continue button
37
+ this.continueLoading = true;
38
+ const translatedBillingAddress = this.billingAddress
39
+ ? this.getTranslatedAddress({
40
+ currentAddress: this.billingAddress,
41
+ translatedAddress: this.translatedBillingAddressState,
42
+ })
43
+ : null;
44
+ const translatedShippingAddress = this.getTranslatedAddress({
45
+ currentAddress: this.shippingAddress,
46
+ translatedAddress: this.translatedShippingAddressState,
47
+ });
48
+ // check to see if there are still non-latin characters in the translated address
49
+ const shippingNonlatinChars = containsNonLatinChars(Object.assign(Object.assign({}, translatedShippingAddress), { country: this.shippingAddress.country }));
50
+ // get list of non-latin characters field in the billing address
51
+ const billingNonLatinChars = translatedBillingAddress &&
52
+ this.billingAddress &&
53
+ containsNonLatinChars(Object.assign(Object.assign({}, translatedBillingAddress), { country: this.billingAddress.country }));
54
+ const shippingHasNonLatinChars = !!Object.keys(shippingNonlatinChars)
55
+ .length;
56
+ const billingHasNonLatinChars = !!billingNonLatinChars && !!Object.keys(billingNonLatinChars).length;
57
+ // if there are non-latin characters in the translated address, scroll to the error input so user can see and fix it
58
+ if (shippingHasNonLatinChars || billingHasNonLatinChars) {
59
+ // get scroll top of the first input has "has-error" class
60
+ const addressForms = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('zonos-address-form');
61
+ const shippingAddressForm = addressForms === null || addressForms === void 0 ? void 0 : addressForms[0];
62
+ const billingAddressForm = addressForms === null || addressForms === void 0 ? void 0 : addressForms[1];
63
+ const errorInput = ((_b = shippingAddressForm === null || shippingAddressForm === void 0 ? void 0 : shippingAddressForm.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.has-error')) ||
64
+ ((_c = billingAddressForm === null || billingAddressForm === void 0 ? void 0 : billingAddressForm.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.has-error'));
65
+ // scroll to the first error input
66
+ if (errorInput) {
67
+ errorInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
68
+ }
69
+ this.continueLoading = false;
70
+ return;
71
+ }
72
+ // Submit the translated address to the parent component
73
+ this.continueClicked.emit({
74
+ billingAddress: translatedBillingAddress,
75
+ shippingAddress: translatedShippingAddress,
76
+ });
77
+ };
78
+ /**
79
+ * This function builds a state object for a translated address.
80
+ * It takes the current and translated address as input and returns an object where each field is an object itself.
81
+ * 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.
82
+ *
83
+ * @param {Object} params - The parameters for the function.
84
+ * @param {EnteredInfo} params.currentAddress - The current address information.
85
+ * @param {EnteredInfo} params.translatedAddress - The translated address information.
86
+ *
87
+ */
88
+ this.buildTranslateAddressState = ({ currentAddress, translatedAddress, }) => {
89
+ const { city, line1, line2, name, postal_code, state } = currentAddress;
90
+ return {
91
+ city: {
92
+ [city]: translatedAddress.city,
93
+ },
94
+ line1: {
95
+ [line1]: translatedAddress.line1,
96
+ },
97
+ line2: {
98
+ [line2]: translatedAddress.line2,
99
+ },
100
+ name: {
101
+ [name]: translatedAddress.name,
102
+ },
103
+ postal_code: {
104
+ [postal_code]: translatedAddress.postal_code,
105
+ },
106
+ state: {
107
+ [state]: translatedAddress.state,
108
+ },
109
+ };
110
+ };
111
+ this.continueLoading = false;
112
+ this.dialogLoading = undefined;
113
+ this.dialogOpen = false;
114
+ this.submitBtnType = undefined;
115
+ this.submitBtnColor = undefined;
116
+ this.isMobile = false;
117
+ this.shippingAddress = undefined;
118
+ this.billingAddress = undefined;
119
+ this.translatedShippingAddress = undefined;
120
+ this.translatedBillingAddress = undefined;
121
+ this.showErrorBanner = false;
122
+ this.translatedShippingAddressState = {};
123
+ this.translatedBillingAddressState = {};
124
+ }
125
+ watchTranslatedShippingAddress() {
126
+ this.translatedShippingAddressState = this.translatedShippingAddress;
127
+ }
128
+ watchTranslatedBillingAddress() {
129
+ this.translatedBillingAddressState = this.translatedBillingAddress;
130
+ }
131
+ componentWillLoad() {
132
+ // update the state with the initial props
133
+ this.watchTranslatedBillingAddress();
134
+ this.watchTranslatedShippingAddress();
135
+ }
136
+ render() {
137
+ // dialog background white, so when the button background is also white, we need to change the button type to outline so it's visible
138
+ const submitBtnColor = this.submitBtnColor || zonosStore.appearance.colorSecondary;
139
+ const submitBtnType = submitBtnColor === '#ffffff'
140
+ ? 'outline'
141
+ : this.submitBtnType || 'standard';
142
+ const billing = this.billingAddress;
143
+ const shipping = this.shippingAddress;
144
+ return (h(Host, { key: '03535edacb348258592641baa349e9dcf14bf78c', class: classes([
145
+ 'zonos--address-update-dialog zonos--elements',
146
+ this.isMobile && 'mobile',
147
+ ]) }, 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 => {
148
+ const address = e.detail;
149
+ this.translatedShippingAddressState =
150
+ this.buildTranslateAddressState({
151
+ currentAddress: shipping,
152
+ translatedAddress: address,
153
+ });
154
+ }, translatedAddress: this.translatedShippingAddressState }), billing && (h("zonos-address-form", { key: '9bf5ebd6fb08851716a72c855451bfeb3ee0ed68', addressType: "billing", class: "zonos--billing-address-form", currentAddress: billing, onAddressChange: e => {
155
+ const address = e.detail;
156
+ this.translatedBillingAddressState =
157
+ this.buildTranslateAddressState({
158
+ currentAddress: billing,
159
+ translatedAddress: address,
160
+ });
161
+ }, 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'))))))));
162
+ }
163
+ static get is() { return "zonos-address-update-dialog"; }
164
+ static get encapsulation() { return "shadow"; }
165
+ static get originalStyleUrls() {
166
+ return {
167
+ "$": ["zonos-address-update-dialog.scss"]
168
+ };
169
+ }
170
+ static get styleUrls() {
171
+ return {
172
+ "$": ["zonos-address-update-dialog.css"]
173
+ };
174
+ }
175
+ static get properties() {
176
+ return {
177
+ "continueLoading": {
178
+ "type": "boolean",
179
+ "mutable": false,
180
+ "complexType": {
181
+ "original": "boolean",
182
+ "resolved": "boolean",
183
+ "references": {}
184
+ },
185
+ "required": false,
186
+ "optional": false,
187
+ "docs": {
188
+ "tags": [],
189
+ "text": "Whether or not the continue button is loading"
190
+ },
191
+ "attribute": "continue-loading",
192
+ "reflect": false,
193
+ "defaultValue": "false"
194
+ },
195
+ "dialogLoading": {
196
+ "type": "boolean",
197
+ "mutable": false,
198
+ "complexType": {
199
+ "original": "boolean",
200
+ "resolved": "boolean",
201
+ "references": {}
202
+ },
203
+ "required": true,
204
+ "optional": false,
205
+ "docs": {
206
+ "tags": [],
207
+ "text": "Whether or not the dialog is loading"
208
+ },
209
+ "attribute": "dialog-loading",
210
+ "reflect": false
211
+ },
212
+ "dialogOpen": {
213
+ "type": "boolean",
214
+ "mutable": false,
215
+ "complexType": {
216
+ "original": "boolean",
217
+ "resolved": "boolean",
218
+ "references": {}
219
+ },
220
+ "required": false,
221
+ "optional": false,
222
+ "docs": {
223
+ "tags": [],
224
+ "text": "Whether or not the dialog is open"
225
+ },
226
+ "attribute": "dialog-open",
227
+ "reflect": false,
228
+ "defaultValue": "false"
229
+ },
230
+ "submitBtnType": {
231
+ "type": "string",
232
+ "mutable": false,
233
+ "complexType": {
234
+ "original": "HTMLZonosButtonElement['variant']",
235
+ "resolved": "\"danger\" | \"outline\" | \"primary\" | \"standard\" | \"subtle\" | \"success\" | \"warning\" | undefined",
236
+ "references": {
237
+ "HTMLZonosButtonElement": {
238
+ "location": "global",
239
+ "id": "global::HTMLZonosButtonElement"
240
+ }
241
+ }
242
+ },
243
+ "required": false,
244
+ "optional": true,
245
+ "docs": {
246
+ "tags": [],
247
+ "text": "Button type of the submit button"
248
+ },
249
+ "attribute": "submit-btn-type",
250
+ "reflect": false
251
+ },
252
+ "submitBtnColor": {
253
+ "type": "string",
254
+ "mutable": false,
255
+ "complexType": {
256
+ "original": "string",
257
+ "resolved": "string | undefined",
258
+ "references": {}
259
+ },
260
+ "required": false,
261
+ "optional": true,
262
+ "docs": {
263
+ "tags": [],
264
+ "text": "Button color of the submit button"
265
+ },
266
+ "attribute": "submit-btn-color",
267
+ "reflect": false
268
+ },
269
+ "isMobile": {
270
+ "type": "boolean",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "boolean",
274
+ "resolved": "boolean",
275
+ "references": {}
276
+ },
277
+ "required": false,
278
+ "optional": false,
279
+ "docs": {
280
+ "tags": [],
281
+ "text": "Whether or not the dialog is open"
282
+ },
283
+ "attribute": "is-mobile",
284
+ "reflect": false,
285
+ "defaultValue": "false"
286
+ },
287
+ "shippingAddress": {
288
+ "type": "unknown",
289
+ "mutable": false,
290
+ "complexType": {
291
+ "original": "EnteredInfo",
292
+ "resolved": "{ city: string; country: CountryCode; email: string; line1: string; line2: string; name: string; phone: string; postal_code: string; state: string; }",
293
+ "references": {
294
+ "EnteredInfo": {
295
+ "location": "import",
296
+ "path": "src/types/checkout/TranslatedText",
297
+ "id": "src/types/checkout/TranslatedText.ts::EnteredInfo"
298
+ }
299
+ }
300
+ },
301
+ "required": true,
302
+ "optional": false,
303
+ "docs": {
304
+ "tags": [],
305
+ "text": "Shipping address that user has entered"
306
+ }
307
+ },
308
+ "billingAddress": {
309
+ "type": "unknown",
310
+ "mutable": false,
311
+ "complexType": {
312
+ "original": "EnteredInfo | null",
313
+ "resolved": "null | { city: string; country: CountryCode; email: string; line1: string; line2: string; name: string; phone: string; postal_code: string; state: string; }",
314
+ "references": {
315
+ "EnteredInfo": {
316
+ "location": "import",
317
+ "path": "src/types/checkout/TranslatedText",
318
+ "id": "src/types/checkout/TranslatedText.ts::EnteredInfo"
319
+ }
320
+ }
321
+ },
322
+ "required": true,
323
+ "optional": false,
324
+ "docs": {
325
+ "tags": [],
326
+ "text": "Billing address that user has entered (optional if billing is the same as shipping)"
327
+ }
328
+ },
329
+ "translatedShippingAddress": {
330
+ "type": "unknown",
331
+ "mutable": false,
332
+ "complexType": {
333
+ "original": "TranslatedAddressObject",
334
+ "resolved": "{ line1?: TranslatedText | undefined; line2?: TranslatedText | undefined; city?: TranslatedText | undefined; state?: TranslatedText | undefined; postal_code?: TranslatedText | undefined; name?: TranslatedText | undefined; }",
335
+ "references": {
336
+ "TranslatedAddressObject": {
337
+ "location": "import",
338
+ "path": "src/types/checkout/TranslatedText",
339
+ "id": "src/types/checkout/TranslatedText.ts::TranslatedAddressObject"
340
+ }
341
+ }
342
+ },
343
+ "required": true,
344
+ "optional": false,
345
+ "docs": {
346
+ "tags": [],
347
+ "text": "Translated address fields that GPT has translated"
348
+ }
349
+ },
350
+ "translatedBillingAddress": {
351
+ "type": "unknown",
352
+ "mutable": false,
353
+ "complexType": {
354
+ "original": "TranslatedAddressObject",
355
+ "resolved": "{ line1?: TranslatedText | undefined; line2?: TranslatedText | undefined; city?: TranslatedText | undefined; state?: TranslatedText | undefined; postal_code?: TranslatedText | undefined; name?: TranslatedText | undefined; }",
356
+ "references": {
357
+ "TranslatedAddressObject": {
358
+ "location": "import",
359
+ "path": "src/types/checkout/TranslatedText",
360
+ "id": "src/types/checkout/TranslatedText.ts::TranslatedAddressObject"
361
+ }
362
+ }
363
+ },
364
+ "required": true,
365
+ "optional": false,
366
+ "docs": {
367
+ "tags": [],
368
+ "text": "Translated address fields that GPT has translated"
369
+ }
370
+ }
371
+ };
372
+ }
373
+ static get states() {
374
+ return {
375
+ "showErrorBanner": {},
376
+ "translatedShippingAddressState": {},
377
+ "translatedBillingAddressState": {}
378
+ };
379
+ }
380
+ static get events() {
381
+ return [{
382
+ "method": "closeDialog",
383
+ "name": "closeDialog",
384
+ "bubbles": true,
385
+ "cancelable": true,
386
+ "composed": true,
387
+ "docs": {
388
+ "tags": [],
389
+ "text": "Close dialog button click"
390
+ },
391
+ "complexType": {
392
+ "original": "void",
393
+ "resolved": "void",
394
+ "references": {}
395
+ }
396
+ }, {
397
+ "method": "continueClicked",
398
+ "name": "continueClicked",
399
+ "bubbles": true,
400
+ "cancelable": true,
401
+ "composed": true,
402
+ "docs": {
403
+ "tags": [],
404
+ "text": "Event to emit when the continue button is clicked"
405
+ },
406
+ "complexType": {
407
+ "original": "SubmitEventData",
408
+ "resolved": "{ billingAddress: Record<\"line1\" | \"line2\" | \"city\" | \"state\" | \"postal_code\" | \"name\", string> | null; shippingAddress: Record<\"line1\" | \"line2\" | \"city\" | \"state\" | \"postal_code\" | \"name\", string>; }",
409
+ "references": {
410
+ "SubmitEventData": {
411
+ "location": "local",
412
+ "path": "/home/runner/work/zonos-elements/zonos-elements/src/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.tsx",
413
+ "id": "src/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.tsx::SubmitEventData"
414
+ }
415
+ }
416
+ }
417
+ }];
418
+ }
419
+ static get elementRef() { return "el"; }
420
+ static get watchers() {
421
+ return [{
422
+ "propName": "translatedShippingAddress",
423
+ "methodName": "watchTranslatedShippingAddress"
424
+ }, {
425
+ "propName": "translatedBillingAddress",
426
+ "methodName": "watchTranslatedBillingAddress"
427
+ }];
428
+ }
429
+ }
@@ -9,7 +9,7 @@ export class ZonosCartItems {
9
9
  var _a;
10
10
  const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');
11
11
  const rate = ((_a = cartStore.exchangeRate) === null || _a === void 0 ? void 0 : _a.rate) || 1;
12
- return (h(Host, { key: '945bd402bb5f8a73bc02dc8f30d187c43b78050e', class: "zonos--cart-items zonos--elements" }, h("table", { key: '600b545e20eb81d7e744c2bf66a9cec2eb68c8e7', class: "zonos--cart-table" }, h("tbody", { key: 'cd12a4372e97b8018af37433e6b2daba5403e621' }, cartStore.items.map(item => {
12
+ return (h(Host, { key: 'e2d53d541a342f816efe95f3a0b5551ea7f95e38', class: "zonos--cart-items zonos--elements" }, h("table", { key: 'f2dbf582004f7db5947e55b5b93f1437dc9d2a95', class: "zonos--cart-table" }, h("tbody", { key: 'a9948cbeb5ad9886d582e518d3bbe0ab9c5dda9d' }, cartStore.items.map(item => {
13
13
  const itemImg = item.imageUrl;
14
14
  return (h("tr", { class: "zonos--cart-item" }, h("td", { class: "zonos--column zonos--cart-item-image" }, itemImg && !this.errorImages.includes(itemImg) ? (h("img", { alt: item.name, onError: () => {
15
15
  this.errorImages = [...this.errorImages, itemImg];
@@ -153,9 +153,11 @@ export class ZonosCheckoutFinish {
153
153
  // const totalItems = this.order?.items?.reduce((acc, item) => {
154
154
  // return acc + item.quantity;
155
155
  // }, 0);
156
- return (h(Host, { key: '8c2087b3a0578cbbd7979fff5e6b696a4325e548', class: "zonos--checkout-finish zonos--elements", style: {
157
- '--border-radius': getBorderRadius(this.borderRadius),
158
- } }, this.isLoading && (h("div", { key: 'dd86d26aee1eb604b8e9b2e7328706db43c80467', class: "loading-wrapper" }, h("zonos-spinner", { key: 'a2f07a512a1d45df0be48461b0e989681b6cb78d' }))), !this.isLoading && (h(Fragment, null, h("div", { key: 'f147c24eefb4aa36ed556c581c2f64a096dbe17b', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '33a02654ede8a7ef7d884b0138c6e2c96406372f', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: 'c179ac24421803973ae8509a338cc34a4c80ac54' }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: '488594968d4e957856218b0f804ed9b9947102aa', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Keep shopping')))))));
156
+ return (h(Host, { key: 'fffe0cbefd173f892f3a0359ac45a8b97392172e', class: "zonos--checkout-finish zonos--elements", style: {
157
+ '--border-radius': getBorderRadius({
158
+ overrideBorderStyle: this.borderRadius,
159
+ }),
160
+ } }, this.isLoading && (h("div", { key: 'b0a8c67102f0eb841d114e8cd1cd7e44fe895df4', class: "loading-wrapper" }, h("zonos-spinner", { key: 'e45f13d061cd94f777abfef5f12a8dc9a927c9e1' }))), !this.isLoading && (h(Fragment, null, h("div", { key: '81ca150772d4f6b38563bb46d5c76ebc51f9628c', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'c88feb2cc5956087fc91c5a00edb4e142efbfee0', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '621b100ed02aa5dc37f1da5be90c8f14568a21f3' }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: '9fff5bc809f97f8126a8117b2896f984e07fc1be', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Keep shopping')))))));
159
161
  }
160
162
  static get is() { return "zonos-checkout-finish"; }
161
163
  static get encapsulation() { return "shadow"; }
@@ -33,10 +33,10 @@ export class ZonosCheckoutFooter {
33
33
  const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
34
34
  // reverse color when on desktop. With the coversheet backdrop, the color should be white
35
35
  const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1200';
36
- return (h(Host, { key: 'fae1e5cb1250e834ecf3b09f11785ddea61be3b2', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: 'f3d48fcc675458dd38ca48e21f24a003b5ff9b56', class: "zonos--checkout-footer" }, h("div", { key: '97daec871630cf2bb33956b668abee2e715eceb5', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: 'cd6e12e8d1320e3e6542eef16f15ab27921748c3', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'bdc6d9311d2d039e87c261ead45474b7bf1fe992', class: classes([
36
+ return (h(Host, { key: 'c66117f4ec54d24eba7e22271294aeb08746a9e1', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: 'a7b49ac9b5d52c2289c46c6b24c6082e68db64b5', class: "zonos--checkout-footer" }, h("div", { key: 'b2c4beb76236c9fe2eb58d0a27ecddf266c7a103', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: 'b981389f14c0b5696208dbb7ad3fabf0687a168f', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'c0d5b4ab335af157789395632cf4278f55ace3fb', class: classes([
37
37
  'zonos--checkout-footer-dialog',
38
38
  this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
39
- ]) }, h("zonos-language-select", { key: '7318bb4137e160e9ed05a423fb80f1806c4f0104', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: '55c76c6cf6777407532c00cf167d59e3cefc5eab', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: 'e2cf10499ed764fb2e7086761ece106580cd6440', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: '0fe6c810a6d7f84a781655cefc47ec6cbb5131c9', textColor: colorDesktop }, "Privacy policy")), h("div", { key: '50401876a45161e80f593971e602e4c449e78dbe', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: '0f69d9d9955165de13a49ff00a7044090b141800', textColor: colorDesktop }, "Powered by"), h("a", { key: '680e6fe4d0a783e2ebc55a51ffb55846ad997249', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '22aee1eb21306141e620bcc1b0dbf035bd710fba', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 })))))));
39
+ ]) }, h("zonos-language-select", { key: 'd1442fb364997399f35d657e9f5823da34872c71', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: 'ff8ee730b995a5d8a7b9a3939b96444958390ca5', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: 'b2e896b9b37b1b0ba2bbb77034c7b0f6cf5c16a7', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: 'd1fe8d2bc28f3606b2f766659d52496ad4603c17', textColor: colorDesktop }, "Privacy policy")), h("div", { key: '4875d6ad0e0efc60f299a2db427608bf23b062f6', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: '13e2c1634ba3d8070f9ff14205fa3c3e9f8f5843', textColor: colorDesktop }, "Powered by"), h("a", { key: 'e00bec78174a8de0963c1a5caf721fd352dc9490', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '5910c724a05c686a7642385955a3faa042efe654', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 })))))));
40
40
  }
41
41
  static get is() { return "zonos-checkout-footer"; }
42
42
  static get encapsulation() { return "shadow"; }
@@ -217,6 +217,7 @@ export class ZonosCheckout {
217
217
  postal_code: legacyShippingInfo.customerZip,
218
218
  state: legacyShippingInfo.customerState,
219
219
  },
220
+ email: legacyShippingInfo.customerEmail || '',
220
221
  name: legacyShippingInfo.customerName,
221
222
  phone: legacyShippingInfo.customerPhone,
222
223
  };
@@ -241,6 +242,7 @@ export class ZonosCheckout {
241
242
  postal_code: shippingAddressSession.postalCode,
242
243
  state: shippingAddressSession.state,
243
244
  },
245
+ email: '',
244
246
  name: `${shippingAddressSession.firstName} ${shippingAddressSession.lastName}`,
245
247
  phone: shippingAddressSession.phone,
246
248
  };
@@ -455,10 +457,10 @@ export class ZonosCheckout {
455
457
  };
456
458
  const renderContent = () => {
457
459
  return (h("div", { class: 'zonos--content', style: {
458
- '--border-radius': getBorderRadius(style),
460
+ '--border-radius': getBorderRadius({ overrideBorderStyle: style }),
459
461
  } }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, h("div", { class: "zonos--left", "data-theme": leftSideTheme, style: {
460
462
  '--primary-color': !this.isMobile ? colorPrimary : '',
461
- } }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
463
+ } }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
462
464
  // do nothing if it's not mobile
463
465
  if (!this.isMobile) {
464
466
  return;
@@ -481,7 +483,7 @@ export class ZonosCheckout {
481
483
  hasFooter && 'has-footer',
482
484
  this.preview && 'preview',
483
485
  this.isMobile && 'mobile',
484
- ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent()))));
486
+ ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent()))));
485
487
  }
486
488
  static get is() { return "zonos-checkout"; }
487
489
  static get encapsulation() { return "scoped"; }
@@ -564,7 +566,7 @@ export class ZonosCheckout {
564
566
  "mutable": false,
565
567
  "complexType": {
566
568
  "original": "ContactOption | null",
567
- "resolved": "null | { address: { city: string; country: string; line1: string; line2?: string | undefined; postal_code: string; state: string; }; name: string; phone?: string | undefined; }",
569
+ "resolved": "null | { address: { city: string; country: string; line1: string; line2?: string | undefined; postal_code: string; state: string; }; email: string; name: string; phone?: string | undefined; }",
568
570
  "references": {
569
571
  "ContactOption": {
570
572
  "location": "import",