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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. package/README.md +341 -96
  2. package/dist/cjs/{cart-95209ae8.js → cart-5468dfd1.js} +284 -89
  3. package/dist/cjs/{getBorderRadius-44b3eca1.js → getBorderRadius-bcb309a8.js} +1 -1
  4. package/dist/cjs/{index-654a6001.js → index-b071017b.js} +4 -1
  5. package/dist/cjs/index.cjs.js +624 -0
  6. package/dist/cjs/{isDarkColor-01f45d3f.js → isDarkColor-b0393089.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/logError-4e2f2020.js +58 -0
  9. package/dist/cjs/{submitGtag-9d60f3bb.js → submitGtag-127a220f.js} +4 -3
  10. package/dist/cjs/zonos-address_8.cjs.entry.js +30 -18
  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_3.cjs.entry.js +22 -11
  14. package/dist/cjs/zonos-card_2.cjs.entry.js +11 -10
  15. package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_11.cjs.entry.js} +118 -11
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +47 -20
  17. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-controller.cjs.entry.js +29 -24
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -5
  20. package/dist/cjs/zonos-country-select_3.cjs.entry.js +12 -11
  21. package/dist/cjs/zonos-elements.cjs.js +2 -2
  22. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -8
  23. package/dist/cjs/zonos-hello.cjs.entry.js +14 -13
  24. package/dist/cjs/zonos-input.cjs.entry.js +7 -7
  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 +2 -2
  28. package/dist/cjs/zonos-payment.cjs.entry.js +8 -7
  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 +3 -3
  31. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  32. package/dist/cjs/{zonosStore-d8bb0bda.js → zonosStore-7c6205ca.js} +2 -1
  33. package/dist/collection/__mocks__/zonos-url/index.js +1 -0
  34. package/dist/collection/__tests__/build-utils/urlCheckOne.js +1 -1
  35. package/dist/collection/collection-manifest.json +2 -1
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -9
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +45 -8
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +3 -3
  39. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  40. package/dist/collection/components/common/zonos-button/zonos-button.css +12 -0
  41. package/dist/collection/components/common/zonos-button/zonos-button.js +43 -8
  42. package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
  43. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  44. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  45. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  46. package/dist/collection/components/common/zonos-confirm-dialog/assets/ExclamationMarkDuotoneIcon.svg +4 -0
  47. package/dist/collection/components/common/zonos-confirm-dialog/assets/HelpDuotoneIcon.svg +4 -0
  48. package/dist/collection/components/common/zonos-confirm-dialog/assets/WarningDuotoneIcon.svg +4 -0
  49. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.css +125 -0
  50. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +322 -0
  51. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  52. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  53. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +1 -4
  54. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +38 -4
  55. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  56. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  57. package/dist/collection/components/common/{component-template/zonos-link → zonos-link}/zonos-link.js +1 -1
  58. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  59. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  60. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  61. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  62. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  63. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  64. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
  65. package/dist/collection/components/main/zonos-controller.js +12 -8
  66. package/dist/collection/components/store/hello/localization.js +12 -2
  67. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  68. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  69. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  70. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  71. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  72. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  73. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  74. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  75. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  76. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  77. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  78. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  79. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  80. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  81. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  82. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  83. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  84. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  85. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  86. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  87. package/dist/collection/components/store/zonosStore.js +1 -0
  88. package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -3
  89. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  90. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  91. package/dist/collection/environment.js +0 -2
  92. package/dist/collection/index.js +1 -0
  93. package/dist/collection/scripts/_extractZonosQaUrl.js +26 -0
  94. package/dist/collection/scripts/_getZonosQaUrl.js +40 -0
  95. package/dist/collection/scripts/{loadStripe.js → _loadStripe.js} +1 -1
  96. package/dist/collection/scripts/{zonosBase.js → _zonosBase.js} +31 -7
  97. package/dist/collection/scripts/index.js +2 -0
  98. package/dist/collection/types/generated/graphql.customer.types.js +1 -0
  99. package/dist/collection/types/generated/graphql.frontend.types.js +1 -0
  100. package/dist/esm/{cart-6448e883.js → cart-63d120e1.js} +257 -60
  101. package/dist/{components/getBorderRadius.js → esm/getBorderRadius-d244b4b1.js} +1 -1
  102. package/dist/esm/{index-e063389c.js → index-3b46f3c3.js} +4 -1
  103. package/dist/esm/index.js +621 -0
  104. package/dist/{components/isDarkColor.js → esm/isDarkColor-39a36e82.js} +1 -1
  105. package/dist/esm/loader.js +3 -3
  106. package/dist/esm/logError-c456c092.js +55 -0
  107. package/dist/esm/{submitGtag-b7d369cd.js → submitGtag-35bb3945.js} +3 -2
  108. package/dist/esm/zonos-address_8.entry.js +28 -16
  109. package/dist/esm/zonos-badge_2.entry.js +7 -7
  110. package/dist/esm/zonos-banner.entry.js +2 -2
  111. package/dist/esm/zonos-button_3.entry.js +22 -11
  112. package/dist/esm/zonos-card_2.entry.js +11 -10
  113. package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_11.entry.js} +118 -12
  114. package/dist/esm/zonos-checkout.entry.js +35 -8
  115. package/dist/esm/zonos-component.entry.js +2 -2
  116. package/dist/esm/zonos-controller.entry.js +12 -7
  117. package/dist/esm/zonos-country-flag.entry.js +6 -5
  118. package/dist/esm/zonos-country-select_3.entry.js +12 -11
  119. package/dist/esm/zonos-elements.js +3 -3
  120. package/dist/esm/zonos-hello-dialog.entry.js +9 -8
  121. package/dist/esm/zonos-hello.entry.js +6 -5
  122. package/dist/esm/zonos-input.entry.js +7 -7
  123. package/dist/esm/zonos-link.entry.js +2 -2
  124. package/dist/esm/zonos-logo.entry.js +4 -4
  125. package/dist/esm/zonos-notification.entry.js +2 -2
  126. package/dist/esm/zonos-payment.entry.js +7 -6
  127. package/dist/esm/zonos-select-dialog-header_2.entry.js +6 -6
  128. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  129. package/dist/esm/zonos-text.entry.js +2 -2
  130. package/dist/esm/{zonosStore-33ff08ff.js → zonosStore-32e33a45.js} +2 -1
  131. package/dist/esm-es5/cart-63d120e1.js +1 -0
  132. package/dist/esm-es5/{getBorderRadius-567f1786.js → getBorderRadius-d244b4b1.js} +1 -1
  133. package/dist/esm-es5/{index-e063389c.js → index-3b46f3c3.js} +1 -1
  134. package/dist/esm-es5/index.js +1 -0
  135. package/dist/esm-es5/{isDarkColor-7f62035a.js → isDarkColor-39a36e82.js} +1 -1
  136. package/dist/esm-es5/loader.js +1 -1
  137. package/dist/esm-es5/logError-c456c092.js +1 -0
  138. package/dist/esm-es5/submitGtag-35bb3945.js +1 -0
  139. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  140. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  141. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  142. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  143. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  144. package/dist/esm-es5/zonos-cart-items_11.entry.js +1 -0
  145. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  146. package/dist/esm-es5/zonos-component.entry.js +1 -1
  147. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  148. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  149. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  150. package/dist/esm-es5/zonos-elements.js +1 -1
  151. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  152. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  153. package/dist/esm-es5/zonos-input.entry.js +1 -1
  154. package/dist/esm-es5/zonos-link.entry.js +1 -1
  155. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  156. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  157. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  158. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  159. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  160. package/dist/esm-es5/zonos-text.entry.js +1 -1
  161. package/dist/esm-es5/{zonosStore-33ff08ff.js → zonosStore-32e33a45.js} +1 -1
  162. package/dist/scripts/index.d.ts +3908 -0
  163. package/dist/scripts/index.js +1 -0
  164. package/dist/scripts/loadZonos.d.ts +3954 -0
  165. package/dist/scripts/loadZonos.js +1 -1
  166. package/dist/scripts/zonos.js +1 -1
  167. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +5 -7
  168. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +13 -3
  169. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +2 -2
  170. package/dist/types/components/common/zonos-button/zonos-button.d.ts +7 -1
  171. package/dist/types/components/common/zonos-confirm-dialog/zonos-confirm-dialog.d.ts +60 -0
  172. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +6 -1
  173. package/dist/types/components/main/zonos-controller.d.ts +1 -1
  174. package/dist/types/components/store/checkout/stripe.d.ts +1 -1
  175. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  176. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  177. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  178. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  179. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  180. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  181. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  182. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  183. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  184. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  185. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  186. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  187. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  188. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  189. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  190. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  191. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  192. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  193. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  194. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  195. package/dist/types/components/store/translationStore.d.ts +1 -1
  196. package/dist/types/components/store/zonosStore.d.ts +5 -1
  197. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -2
  198. package/dist/types/components/utils/styles.d.ts +1 -0
  199. package/dist/types/components.d.ts +164 -19
  200. package/dist/types/index.d.ts +1 -0
  201. package/dist/types/scripts/_extractZonosQaUrl.d.ts +11 -0
  202. package/dist/types/scripts/_getZonosQaUrl.d.ts +4 -0
  203. package/dist/types/scripts/{loadStripe.d.ts → _loadStripe.d.ts} +1 -1
  204. package/dist/types/scripts/{zonosBase.d.ts → _zonosBase.d.ts} +51 -3
  205. package/dist/types/scripts/index.d.ts +2 -0
  206. package/dist/types/types/checkout/CheckoutConfig.d.ts +12 -0
  207. package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +9 -0
  208. package/dist/types/types/generated/graphql.customer.types.d.ts +1 -0
  209. package/dist/types/types/generated/graphql.customer.types.ts +3 -0
  210. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -0
  211. package/dist/types/types/generated/graphql.frontend.types.ts +1 -0
  212. package/dist/types/types/global.d.ts +1 -1
  213. package/dist/zonos-elements/assets/ExclamationMarkDuotoneIcon.svg +4 -0
  214. package/dist/zonos-elements/assets/HelpDuotoneIcon.svg +4 -0
  215. package/dist/zonos-elements/assets/WarningDuotoneIcon.svg +4 -0
  216. package/dist/zonos-elements/index.esm.js +1 -0
  217. package/dist/zonos-elements/p-023c764c.system.entry.js +1 -0
  218. package/dist/zonos-elements/p-06b6ce37.system.entry.js +1 -0
  219. package/dist/zonos-elements/p-07c53d83.entry.js +1 -0
  220. package/dist/zonos-elements/{p-fe246229.system.entry.js → p-0d0f9694.system.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-fd49d864.entry.js → p-0d5b5bcc.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-771fbeb3.system.js → p-1b9442f6.system.js} +1 -1
  223. package/dist/zonos-elements/p-200b661c.entry.js +1 -0
  224. package/dist/zonos-elements/{p-835c8928.entry.js → p-281b8bdf.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-a889c1bc.entry.js → p-2af19b63.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-582d8b27.entry.js → p-2ced091f.entry.js} +1 -1
  227. package/dist/zonos-elements/{p-909a331c.js → p-2f759d82.js} +1 -1
  228. package/dist/zonos-elements/p-3b66df06.system.entry.js +1 -0
  229. package/dist/zonos-elements/{p-d7acc81c.entry.js → p-3ba8838a.entry.js} +1 -1
  230. package/dist/zonos-elements/p-428c034a.entry.js +1 -0
  231. package/dist/zonos-elements/p-43b2d28d.system.entry.js +1 -0
  232. package/dist/zonos-elements/p-47a42a30.js +1 -0
  233. package/dist/zonos-elements/{p-9ec93319.entry.js → p-498a0e18.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-f71489e5.system.entry.js → p-4f72bfee.system.entry.js} +1 -1
  235. package/dist/zonos-elements/p-4fc1459c.entry.js +1 -0
  236. package/dist/zonos-elements/p-4fca8fd5.system.entry.js +1 -0
  237. package/dist/zonos-elements/{p-79f3c4f5.system.js → p-58e730b6.system.js} +1 -1
  238. package/dist/zonos-elements/{p-83fecb2a.entry.js → p-58fc8ec1.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-e7b4b756.entry.js → p-597b75f3.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-87badea9.system.js → p-62ecfbcc.system.js} +1 -1
  241. package/dist/zonos-elements/p-63db40b9.system.js +1 -0
  242. package/dist/zonos-elements/p-693b9985.js +1 -0
  243. package/dist/zonos-elements/{p-ff403840.entry.js → p-6cb9812b.entry.js} +1 -1
  244. package/dist/zonos-elements/p-6df1fc3a.system.entry.js +1 -0
  245. package/dist/zonos-elements/{p-bf32179a.system.entry.js → p-6eda6199.system.entry.js} +1 -1
  246. package/dist/zonos-elements/p-6f6f160d.entry.js +1 -0
  247. package/dist/zonos-elements/p-7c78e340.entry.js +1 -0
  248. package/dist/zonos-elements/{p-305f27c7.entry.js → p-80442f16.entry.js} +1 -1
  249. package/dist/zonos-elements/p-808fa731.js +1 -0
  250. package/dist/zonos-elements/p-80f174b9.system.js +1 -0
  251. package/dist/zonos-elements/{p-679877b1.system.entry.js → p-8171d013.system.entry.js} +1 -1
  252. package/dist/zonos-elements/p-85f3d13f.system.js +1 -0
  253. package/dist/zonos-elements/p-8aeb0629.entry.js +1 -0
  254. package/dist/zonos-elements/{p-83cc2936.js → p-8c0b4a61.js} +1 -1
  255. package/dist/zonos-elements/{p-4dca5484.system.entry.js → p-8cd6633a.system.entry.js} +1 -1
  256. package/dist/zonos-elements/p-9288fd21.system.entry.js +1 -0
  257. package/dist/zonos-elements/p-98ad4ab3.system.entry.js +1 -0
  258. package/dist/zonos-elements/{p-ad088d46.system.entry.js → p-9e8d38f7.system.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-e108e5ed.system.entry.js → p-a47382ae.system.entry.js} +1 -1
  260. package/dist/zonos-elements/p-b1567fa3.system.entry.js +1 -0
  261. package/dist/zonos-elements/p-b81562f5.entry.js +1 -0
  262. package/dist/zonos-elements/{p-3638e2ed.entry.js → p-bd9b2165.entry.js} +1 -1
  263. package/dist/zonos-elements/p-bdfa3705.system.entry.js +1 -0
  264. package/dist/zonos-elements/{p-13ddaf31.js → p-ce347974.js} +1 -1
  265. package/dist/zonos-elements/p-cfae51c1.system.js +1 -0
  266. package/dist/zonos-elements/p-d6eb260c.entry.js +1 -0
  267. package/dist/zonos-elements/{p-17e265c3.system.entry.js → p-d7a939df.system.entry.js} +1 -1
  268. package/dist/zonos-elements/{p-163ff5b5.system.js → p-d99232c5.system.js} +1 -1
  269. package/dist/zonos-elements/p-dc40a60c.entry.js +1 -0
  270. package/dist/zonos-elements/{p-36a461a6.system.entry.js → p-dda78e8e.system.entry.js} +1 -1
  271. package/dist/zonos-elements/p-de405d7e.system.entry.js +1 -0
  272. package/dist/zonos-elements/p-e0bf9666.system.js +1 -0
  273. package/dist/zonos-elements/p-eaa335e1.js +1 -0
  274. package/dist/zonos-elements/{p-b98bdbcc.system.entry.js → p-ed3524ae.system.entry.js} +1 -1
  275. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  276. package/dist/zonos-elements/zonos-elements.js +1 -1
  277. package/package.json +5 -3
  278. package/dist/components/ILanguage.js +0 -24
  279. package/dist/components/classes.js +0 -12
  280. package/dist/components/containsNonLatinChars.js +0 -21
  281. package/dist/components/formatCurrency.js +0 -11
  282. package/dist/components/index.d.ts +0 -33
  283. package/dist/components/index.js +0 -1
  284. package/dist/components/isCheckoutMobile.js +0 -6
  285. package/dist/components/isColorVariable.js +0 -14
  286. package/dist/components/stripe.js +0 -1681
  287. package/dist/components/submitGtag.js +0 -19
  288. package/dist/components/trackConversionEvent.js +0 -37
  289. package/dist/components/translationStore.js +0 -5371
  290. package/dist/components/zonos-address-display.d.ts +0 -11
  291. package/dist/components/zonos-address-display.js +0 -6
  292. package/dist/components/zonos-address-display2.js +0 -64
  293. package/dist/components/zonos-address-form.d.ts +0 -11
  294. package/dist/components/zonos-address-form.js +0 -6
  295. package/dist/components/zonos-address-form2.js +0 -84
  296. package/dist/components/zonos-address-update-dialog.d.ts +0 -11
  297. package/dist/components/zonos-address-update-dialog.js +0 -6
  298. package/dist/components/zonos-address-update-dialog2.js +0 -264
  299. package/dist/components/zonos-address.d.ts +0 -11
  300. package/dist/components/zonos-address.js +0 -6
  301. package/dist/components/zonos-address2.js +0 -176
  302. package/dist/components/zonos-badge.d.ts +0 -11
  303. package/dist/components/zonos-badge.js +0 -6
  304. package/dist/components/zonos-badge2.js +0 -61
  305. package/dist/components/zonos-banner.d.ts +0 -11
  306. package/dist/components/zonos-banner.js +0 -6
  307. package/dist/components/zonos-banner2.js +0 -95
  308. package/dist/components/zonos-button.d.ts +0 -11
  309. package/dist/components/zonos-button.js +0 -6
  310. package/dist/components/zonos-button2.js +0 -174
  311. package/dist/components/zonos-card.d.ts +0 -11
  312. package/dist/components/zonos-card.js +0 -6
  313. package/dist/components/zonos-card2.js +0 -57
  314. package/dist/components/zonos-cart-items.d.ts +0 -11
  315. package/dist/components/zonos-cart-items.js +0 -6
  316. package/dist/components/zonos-cart-items2.js +0 -57
  317. package/dist/components/zonos-cart-restricted-items.d.ts +0 -11
  318. package/dist/components/zonos-cart-restricted-items.js +0 -6
  319. package/dist/components/zonos-cart-restricted-items2.js +0 -135
  320. package/dist/components/zonos-cart-subtotal.d.ts +0 -11
  321. package/dist/components/zonos-cart-subtotal.js +0 -6
  322. package/dist/components/zonos-cart-subtotal2.js +0 -91
  323. package/dist/components/zonos-checkbox.d.ts +0 -11
  324. package/dist/components/zonos-checkbox.js +0 -6
  325. package/dist/components/zonos-checkbox2.js +0 -96
  326. package/dist/components/zonos-checkout-finish.d.ts +0 -11
  327. package/dist/components/zonos-checkout-finish.js +0 -6
  328. package/dist/components/zonos-checkout-finish2.js +0 -246
  329. package/dist/components/zonos-checkout-footer.d.ts +0 -11
  330. package/dist/components/zonos-checkout-footer.js +0 -6
  331. package/dist/components/zonos-checkout-footer2.js +0 -125
  332. package/dist/components/zonos-checkout-payment.d.ts +0 -11
  333. package/dist/components/zonos-checkout-payment.js +0 -6
  334. package/dist/components/zonos-checkout-payment2.js +0 -104
  335. package/dist/components/zonos-checkout-progress-tabs.d.ts +0 -11
  336. package/dist/components/zonos-checkout-progress-tabs.js +0 -6
  337. package/dist/components/zonos-checkout-progress-tabs2.js +0 -138
  338. package/dist/components/zonos-checkout.d.ts +0 -11
  339. package/dist/components/zonos-checkout.js +0 -1018
  340. package/dist/components/zonos-collapse.d.ts +0 -11
  341. package/dist/components/zonos-collapse.js +0 -6
  342. package/dist/components/zonos-collapse2.js +0 -78
  343. package/dist/components/zonos-component.d.ts +0 -11
  344. package/dist/components/zonos-component.js +0 -48
  345. package/dist/components/zonos-controller.d.ts +0 -11
  346. package/dist/components/zonos-controller.js +0 -309
  347. package/dist/components/zonos-country-flag.d.ts +0 -11
  348. package/dist/components/zonos-country-flag.js +0 -6
  349. package/dist/components/zonos-country-flag2.js +0 -54
  350. package/dist/components/zonos-country-select.d.ts +0 -11
  351. package/dist/components/zonos-country-select.js +0 -6
  352. package/dist/components/zonos-country-select2.js +0 -1891
  353. package/dist/components/zonos-custom-message.d.ts +0 -11
  354. package/dist/components/zonos-custom-message.js +0 -6
  355. package/dist/components/zonos-custom-message2.js +0 -72
  356. package/dist/components/zonos-customer-info.d.ts +0 -11
  357. package/dist/components/zonos-customer-info.js +0 -6
  358. package/dist/components/zonos-customer-info2.js +0 -316
  359. package/dist/components/zonos-dialog.d.ts +0 -11
  360. package/dist/components/zonos-dialog.js +0 -6
  361. package/dist/components/zonos-dialog2.js +0 -124
  362. package/dist/components/zonos-hello-dialog-footer.d.ts +0 -11
  363. package/dist/components/zonos-hello-dialog-footer.js +0 -6
  364. package/dist/components/zonos-hello-dialog-footer2.js +0 -83
  365. package/dist/components/zonos-hello-dialog.d.ts +0 -11
  366. package/dist/components/zonos-hello-dialog.js +0 -6
  367. package/dist/components/zonos-hello-dialog2.js +0 -305
  368. package/dist/components/zonos-hello.d.ts +0 -11
  369. package/dist/components/zonos-hello.js +0 -879
  370. package/dist/components/zonos-icon.d.ts +0 -11
  371. package/dist/components/zonos-icon.js +0 -6
  372. package/dist/components/zonos-icon2.js +0 -55
  373. package/dist/components/zonos-input.d.ts +0 -11
  374. package/dist/components/zonos-input.js +0 -6
  375. package/dist/components/zonos-input2.js +0 -78
  376. package/dist/components/zonos-language-select.d.ts +0 -11
  377. package/dist/components/zonos-language-select.js +0 -6
  378. package/dist/components/zonos-language-select2.js +0 -88
  379. package/dist/components/zonos-link-authentication.d.ts +0 -11
  380. package/dist/components/zonos-link-authentication.js +0 -6
  381. package/dist/components/zonos-link-authentication2.js +0 -80
  382. package/dist/components/zonos-link.d.ts +0 -11
  383. package/dist/components/zonos-link.js +0 -43
  384. package/dist/components/zonos-logo.d.ts +0 -11
  385. package/dist/components/zonos-logo.js +0 -49
  386. package/dist/components/zonos-notification.d.ts +0 -11
  387. package/dist/components/zonos-notification.js +0 -6
  388. package/dist/components/zonos-notification2.js +0 -92
  389. package/dist/components/zonos-payment.d.ts +0 -11
  390. package/dist/components/zonos-payment.js +0 -6
  391. package/dist/components/zonos-payment2.js +0 -77
  392. package/dist/components/zonos-review.d.ts +0 -11
  393. package/dist/components/zonos-review.js +0 -6
  394. package/dist/components/zonos-review2.js +0 -89
  395. package/dist/components/zonos-select-dialog-header.d.ts +0 -11
  396. package/dist/components/zonos-select-dialog-header.js +0 -6
  397. package/dist/components/zonos-select-dialog-header2.js +0 -71
  398. package/dist/components/zonos-shipping-rich-radio.d.ts +0 -11
  399. package/dist/components/zonos-shipping-rich-radio.js +0 -6
  400. package/dist/components/zonos-shipping-rich-radio2.js +0 -88
  401. package/dist/components/zonos-shipping.d.ts +0 -11
  402. package/dist/components/zonos-shipping.js +0 -6
  403. package/dist/components/zonos-shipping2.js +0 -159
  404. package/dist/components/zonos-spinner.d.ts +0 -11
  405. package/dist/components/zonos-spinner.js +0 -6
  406. package/dist/components/zonos-spinner2.js +0 -43
  407. package/dist/components/zonos-text.d.ts +0 -11
  408. package/dist/components/zonos-text.js +0 -6
  409. package/dist/components/zonos-text2.js +0 -182
  410. package/dist/components/zonos-tooltip.d.ts +0 -11
  411. package/dist/components/zonos-tooltip.js +0 -6
  412. package/dist/components/zonos-tooltip2.js +0 -48
  413. package/dist/components/zonos-v-stack.d.ts +0 -11
  414. package/dist/components/zonos-v-stack.js +0 -6
  415. package/dist/components/zonos-v-stack2.js +0 -38
  416. package/dist/components/zonosStore.js +0 -2880
  417. package/dist/esm/getBorderRadius-567f1786.js +0 -18
  418. package/dist/esm/isDarkColor-7f62035a.js +0 -1199
  419. package/dist/esm-es5/cart-6448e883.js +0 -1
  420. package/dist/esm-es5/submitGtag-b7d369cd.js +0 -1
  421. package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
  422. package/dist/scripts/checkIfLoadVersionDomain.js +0 -1
  423. package/dist/scripts/extractZonosQaUrl.js +0 -1
  424. package/dist/scripts/getTempCartById.js +0 -1
  425. package/dist/scripts/loadStripe.js +0 -1
  426. package/dist/scripts/stripe.js +0 -1
  427. package/dist/scripts/zonosBase.js +0 -1
  428. package/dist/zonos-elements/p-0759a84d.system.entry.js +0 -1
  429. package/dist/zonos-elements/p-0ee61fba.system.entry.js +0 -1
  430. package/dist/zonos-elements/p-154aaf95.system.js +0 -1
  431. package/dist/zonos-elements/p-2fc561ac.system.entry.js +0 -1
  432. package/dist/zonos-elements/p-345503b7.entry.js +0 -1
  433. package/dist/zonos-elements/p-3be2e469.entry.js +0 -1
  434. package/dist/zonos-elements/p-47c75f81.system.entry.js +0 -1
  435. package/dist/zonos-elements/p-50ea2036.system.js +0 -1
  436. package/dist/zonos-elements/p-54004793.system.entry.js +0 -1
  437. package/dist/zonos-elements/p-58f8cee7.system.entry.js +0 -1
  438. package/dist/zonos-elements/p-61100d2e.system.entry.js +0 -1
  439. package/dist/zonos-elements/p-6ea746b9.entry.js +0 -1
  440. package/dist/zonos-elements/p-70c35519.system.entry.js +0 -1
  441. package/dist/zonos-elements/p-7b19cd96.entry.js +0 -1
  442. package/dist/zonos-elements/p-7cc730b0.js +0 -1
  443. package/dist/zonos-elements/p-7f48fafe.entry.js +0 -1
  444. package/dist/zonos-elements/p-9c575a18.system.entry.js +0 -1
  445. package/dist/zonos-elements/p-aaf1e517.system.js +0 -1
  446. package/dist/zonos-elements/p-aff5f4ca.js +0 -1
  447. package/dist/zonos-elements/p-beca252d.entry.js +0 -1
  448. package/dist/zonos-elements/p-c1f4bb4a.entry.js +0 -1
  449. package/dist/zonos-elements/p-c64eefdd.system.entry.js +0 -1
  450. package/dist/zonos-elements/p-ca621143.entry.js +0 -1
  451. package/dist/zonos-elements/p-dbee6587.entry.js +0 -1
  452. package/dist/zonos-elements/p-e0706108.system.entry.js +0 -1
  453. package/dist/zonos-elements/p-e3335228.entry.js +0 -1
  454. package/dist/zonos-elements/p-ef9cbb66.system.js +0 -1
  455. package/dist/zonos-elements/p-f1962041.js +0 -1
  456. /package/dist/collection/components/common/{component-template/zonos-link → zonos-link}/zonos-link.css +0 -0
  457. /package/dist/collection/scripts/{checkIfLoadVersionDomain.js → _checkIfLoadVersionDomain.js} +0 -0
  458. /package/dist/collection/scripts/{stripe.js → _stripe.js} +0 -0
  459. /package/dist/types/components/common/{component-template/zonos-link → zonos-link}/zonos-link.d.ts +0 -0
  460. /package/dist/types/scripts/{checkIfLoadVersionDomain.d.ts → _checkIfLoadVersionDomain.d.ts} +0 -0
  461. /package/dist/types/scripts/{stripe.d.ts → _stripe.d.ts} +0 -0
@@ -1,11 +0,0 @@
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;
@@ -1,6 +0,0 @@
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 };
@@ -1,64 +0,0 @@
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(--zonos-elements-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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-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 };
@@ -1,11 +0,0 @@
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;
@@ -1,6 +0,0 @@
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 };
@@ -1,84 +0,0 @@
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 };
@@ -1,11 +0,0 @@
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;
@@ -1,6 +0,0 @@
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 };
@@ -1,264 +0,0 @@
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(--zonos-elements-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(--zonos-elements-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(--zonos-elements-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(--zonos-elements-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(--zonos-elements-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,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface ZonosAddress extends Components.ZonosAddress, HTMLElement {}
4
- export const ZonosAddress: {
5
- prototype: ZonosAddress;
6
- new (): ZonosAddress;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,6 +0,0 @@
1
- import { Z as ZonosAddress$1, d as defineCustomElement$1 } from './zonos-address2.js';
2
-
3
- const ZonosAddress = ZonosAddress$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { ZonosAddress, defineCustomElement };