@zonos/elements 1.3.245 → 1.3.247

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 (295) hide show
  1. package/dist/cjs/ShortAddressCode-bec338b0.js +7 -0
  2. package/dist/cjs/{cart-52cf3366.js → cart-97a2d20a.js} +35 -6
  3. package/dist/cjs/getContrastColor-30848800.js +37 -0
  4. package/dist/cjs/{hasInclusivePrice-dbb82df8.js → hasInclusivePrice-134b0250.js} +1 -1
  5. package/dist/cjs/index.cjs.js +9 -7
  6. package/dist/cjs/{invoice-972f1ab3.js → invoice-05a10ee1.js} +2 -2
  7. package/dist/cjs/{isCollectMobileTablet-fd11246c.js → isCollectMobileTablet-edd4804c.js} +2 -2
  8. package/dist/cjs/isContrastColor-09f5924a.js +12 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{localization-b1075a8c.js → localization-00e73920.js} +180 -0
  11. package/dist/cjs/{paypal-e339cc8c.js → paypal-0b4b352b.js} +4 -12
  12. package/dist/cjs/{placeTestOrder-3dfbe3d6.js → placeTestOrder-07b46688.js} +2 -2
  13. package/dist/cjs/{renderCheckoutCurrency-55056c97.js → renderCheckoutCurrency-dd3b0609.js} +2 -2
  14. package/dist/cjs/{shouldRenderTaxIdInput-eda13ef8.js → shouldRenderTaxIdInput-b8abf6de.js} +18 -0
  15. package/dist/cjs/zonos-address-display_9.cjs.entry.js +35 -5
  16. package/dist/cjs/zonos-address_4.cjs.entry.js +37 -7
  17. package/dist/cjs/zonos-card_5.cjs.entry.js +4 -3
  18. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +67 -38
  19. package/dist/cjs/zonos-checkout.cjs.entry.js +36 -13
  20. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  21. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +8 -7
  22. package/dist/cjs/zonos-collect.cjs.entry.js +5 -4
  23. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  24. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-elements.cjs.js +1 -1
  27. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  28. package/dist/cjs/zonos-hello.cjs.entry.js +5 -2
  29. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  30. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +8 -7
  31. package/dist/cjs/zonos-invoice.cjs.entry.js +5 -4
  32. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  33. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +18 -4
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +1 -1
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -1
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +16 -2
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +22 -3
  39. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +1 -1
  40. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.css +1 -1
  41. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
  42. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +18 -0
  43. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +3 -0
  44. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +1 -1
  45. package/dist/collection/components/store/checkout/stripe.js +32 -5
  46. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  47. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  48. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  49. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  50. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  51. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  52. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  53. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  54. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  55. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  56. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  57. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  58. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  59. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  60. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  61. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  62. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  63. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  64. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  65. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  66. package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
  67. package/dist/collection/components/stripe/zonos-address/zonos-address.js +53 -3
  68. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -2
  69. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  70. package/dist/collection/components/utils/checkout/shouldRenderShortAddressCodeInput.js +16 -0
  71. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +31 -8
  72. package/dist/collection/components/utils/getContrastColor.js +8 -0
  73. package/dist/collection/components/utils/shortAddressCodeValidationResult.js +37 -0
  74. package/dist/collection/types/checkout/ShortAddressCode.js +3 -0
  75. package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
  76. package/dist/collection/types/generated/graphql.internal.types.js +135 -0
  77. package/dist/collection/types/index.js +1 -0
  78. package/dist/esm/ShortAddressCode-7620e622.js +5 -0
  79. package/dist/esm/{cart-7f4704dc.js → cart-99ec4a3d.js} +35 -6
  80. package/dist/esm/getContrastColor-28c18704.js +35 -0
  81. package/dist/esm/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
  82. package/dist/esm/index.js +8 -7
  83. package/dist/esm/{invoice-d3d256fb.js → invoice-44e97c22.js} +2 -2
  84. package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +2 -2
  85. package/dist/esm/isContrastColor-69778cea.js +10 -0
  86. package/dist/esm/loader.js +1 -1
  87. package/dist/esm/{localization-401ec6d4.js → localization-853b48a9.js} +180 -0
  88. package/dist/esm/{paypal-61270b79.js → paypal-56534e48.js} +4 -11
  89. package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +2 -2
  90. package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +2 -2
  91. package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
  92. package/dist/esm/zonos-address-display_9.entry.js +35 -5
  93. package/dist/esm/zonos-address_4.entry.js +37 -7
  94. package/dist/esm/zonos-card_5.entry.js +4 -3
  95. package/dist/esm/zonos-cart-items_12.entry.js +67 -38
  96. package/dist/esm/zonos-checkout.entry.js +36 -13
  97. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  98. package/dist/esm/zonos-collect-finish_6.entry.js +8 -7
  99. package/dist/esm/zonos-collect.entry.js +5 -4
  100. package/dist/esm/zonos-controller.entry.js +2 -2
  101. package/dist/esm/zonos-country-flag.entry.js +1 -1
  102. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  103. package/dist/esm/zonos-elements.js +1 -1
  104. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  105. package/dist/esm/zonos-hello.entry.js +5 -2
  106. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  107. package/dist/esm/zonos-invoice-finish_5.entry.js +8 -7
  108. package/dist/esm/zonos-invoice.entry.js +5 -4
  109. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  110. package/dist/esm/zonos-shipping-rich-radio.entry.js +19 -5
  111. package/dist/esm-es5/ShortAddressCode-7620e622.js +1 -0
  112. package/dist/esm-es5/cart-99ec4a3d.js +1 -0
  113. package/dist/esm-es5/getContrastColor-28c18704.js +1 -0
  114. package/dist/esm-es5/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
  115. package/dist/esm-es5/index.js +1 -1
  116. package/dist/esm-es5/{invoice-d3d256fb.js → invoice-44e97c22.js} +1 -1
  117. package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +1 -1
  118. package/dist/esm-es5/isContrastColor-69778cea.js +1 -0
  119. package/dist/esm-es5/loader.js +1 -1
  120. package/dist/esm-es5/localization-853b48a9.js +1 -0
  121. package/dist/esm-es5/paypal-56534e48.js +17 -0
  122. package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +1 -1
  123. package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +1 -1
  124. package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
  125. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
  126. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  127. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  128. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  129. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  130. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  131. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  132. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  133. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  134. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  135. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  136. package/dist/esm-es5/zonos-elements.js +1 -1
  137. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  138. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  139. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  140. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  141. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  142. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  143. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  144. package/dist/scripts/index.d.ts +60 -5
  145. package/dist/scripts/index.js +1 -1
  146. package/dist/scripts/loadZonos.js +1 -1
  147. package/dist/scripts/zonos.js +1 -1
  148. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
  149. package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -0
  150. package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
  151. package/dist/types/components/store/checkout/stripe.d.ts +4 -0
  152. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  153. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  154. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  155. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  156. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  157. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  158. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  159. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  160. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  161. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  162. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  163. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  164. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  165. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  166. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  167. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  168. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  169. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  170. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  171. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  172. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +8 -0
  173. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +8 -0
  174. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  175. package/dist/types/components/utils/checkout/shouldRenderShortAddressCodeInput.d.ts +6 -0
  176. package/dist/types/components/utils/shortAddressCodeValidationResult.d.ts +12 -0
  177. package/dist/types/components.d.ts +32 -0
  178. package/dist/types/types/checkout/ShortAddressCode.d.ts +2 -0
  179. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
  180. package/dist/types/types/checkout/api/CreateParty.d.ts +1 -0
  181. package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
  182. package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
  183. package/dist/types/types/generated/graphql.internal.types.d.ts +157 -30
  184. package/dist/types/types/generated/graphql.internal.types.ts +194 -37
  185. package/dist/types/types/global.d.ts +5 -1
  186. package/dist/types/types/index.d.ts +1 -0
  187. package/dist/types/types/utils/ZonosSettings.d.ts +5 -0
  188. package/dist/zonos-elements/index.esm.js +1 -1
  189. package/dist/zonos-elements/p-08365fdb.system.js +1 -0
  190. package/dist/zonos-elements/p-09aabce0.js +1 -0
  191. package/dist/zonos-elements/p-0c201c39.system.entry.js +1 -0
  192. package/dist/zonos-elements/p-0cb5f151.system.entry.js +1 -0
  193. package/dist/zonos-elements/{p-367c13db.system.entry.js → p-10355cf6.system.entry.js} +1 -1
  194. package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
  195. package/dist/zonos-elements/{p-288aab46.js → p-1b86711b.js} +1 -1
  196. package/dist/zonos-elements/p-1d42cd20.js +1 -0
  197. package/dist/zonos-elements/p-1dbeeab2.entry.js +1 -0
  198. package/dist/zonos-elements/p-2c10b067.system.entry.js +1 -0
  199. package/dist/zonos-elements/p-2e8f842c.entry.js +1 -0
  200. package/dist/zonos-elements/p-2f55895c.system.entry.js +1 -0
  201. package/dist/zonos-elements/p-37bb5f2d.entry.js +1 -0
  202. package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-382601a9.system.entry.js} +1 -1
  203. package/dist/zonos-elements/{p-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
  204. package/dist/zonos-elements/p-3e2f175c.entry.js +1 -0
  205. package/dist/zonos-elements/p-403b9fca.entry.js +1 -0
  206. package/dist/zonos-elements/p-41299ffb.js +1 -0
  207. package/dist/zonos-elements/p-443e1f30.system.js +1 -0
  208. package/dist/zonos-elements/{p-a79f3685.js → p-46ece7ae.js} +1 -1
  209. package/dist/zonos-elements/p-48d55793.system.js +1 -0
  210. package/dist/zonos-elements/p-5295d36e.entry.js +1 -0
  211. package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-53a9da45.entry.js} +1 -1
  212. package/dist/zonos-elements/p-63a383f4.js +1 -0
  213. package/dist/zonos-elements/{p-a3411f20.entry.js → p-64870563.entry.js} +1 -1
  214. package/dist/zonos-elements/p-655ec440.system.js +1 -0
  215. package/dist/zonos-elements/{p-415c2a90.system.js → p-678331f0.system.js} +1 -1
  216. package/dist/zonos-elements/p-695e0803.system.entry.js +1 -0
  217. package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
  218. package/dist/zonos-elements/p-6e3cf6eb.entry.js +1 -0
  219. package/dist/zonos-elements/p-6f430d6f.system.entry.js +1 -0
  220. package/dist/zonos-elements/p-71185d24.system.js +1 -0
  221. package/dist/zonos-elements/p-786d1c24.js +1 -0
  222. package/dist/zonos-elements/p-794d29dc.entry.js +1 -0
  223. package/dist/zonos-elements/p-7b400b5f.system.entry.js +1 -0
  224. package/dist/zonos-elements/{p-6b9b7cfb.system.entry.js → p-8205ae87.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-0aada8ab.entry.js → p-83377e23.entry.js} +1 -1
  226. package/dist/zonos-elements/p-8defdf0d.system.js +17 -0
  227. package/dist/zonos-elements/p-8e98a7c8.js +1 -0
  228. package/dist/zonos-elements/{p-2889a485.system.entry.js → p-95348ebf.system.entry.js} +1 -1
  229. package/dist/zonos-elements/p-9a066833.system.entry.js +1 -0
  230. package/dist/zonos-elements/p-aa6c2348.system.entry.js +1 -0
  231. package/dist/zonos-elements/p-ada8841a.js +1 -0
  232. package/dist/zonos-elements/p-ae26aec5.system.js +1 -0
  233. package/dist/zonos-elements/p-af85846e.system.js +1 -0
  234. package/dist/zonos-elements/{p-78c8bb58.system.entry.js → p-b54a95ea.system.entry.js} +1 -1
  235. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  236. package/dist/zonos-elements/p-c75b7c47.entry.js +1 -0
  237. package/dist/zonos-elements/p-caff391d.system.entry.js +1 -0
  238. package/dist/zonos-elements/p-ce98e472.js +1 -0
  239. package/dist/zonos-elements/{p-3f46d83e.entry.js → p-d0411b2d.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
  241. package/dist/zonos-elements/p-dca14319.system.js +1 -0
  242. package/dist/zonos-elements/p-dd19d9d8.js +17 -0
  243. package/dist/zonos-elements/{p-e0809901.system.js → p-df6e62f8.system.js} +1 -1
  244. package/dist/zonos-elements/p-df90bccf.entry.js +1 -0
  245. package/dist/zonos-elements/p-e07aaf09.system.js +1 -0
  246. package/dist/zonos-elements/p-e458f737.entry.js +1 -0
  247. package/dist/zonos-elements/p-eea7ac64.js +1 -0
  248. package/dist/zonos-elements/p-f6f1d779.system.entry.js +1 -0
  249. package/dist/zonos-elements/p-f8eb618b.entry.js +1 -0
  250. package/dist/zonos-elements/p-fe96e239.system.js +1 -0
  251. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  252. package/package.json +1 -1
  253. package/dist/esm-es5/cart-7f4704dc.js +0 -1
  254. package/dist/esm-es5/localization-401ec6d4.js +0 -1
  255. package/dist/esm-es5/paypal-61270b79.js +0 -17
  256. package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +0 -1
  257. package/dist/zonos-elements/p-01b0a2e2.js +0 -1
  258. package/dist/zonos-elements/p-1216cfb3.entry.js +0 -1
  259. package/dist/zonos-elements/p-1d91e5d1.entry.js +0 -1
  260. package/dist/zonos-elements/p-21fb6b39.js +0 -1
  261. package/dist/zonos-elements/p-2601538e.entry.js +0 -1
  262. package/dist/zonos-elements/p-276faa43.js +0 -1
  263. package/dist/zonos-elements/p-27874c22.entry.js +0 -1
  264. package/dist/zonos-elements/p-291b85f7.entry.js +0 -1
  265. package/dist/zonos-elements/p-33fdde8a.system.js +0 -1
  266. package/dist/zonos-elements/p-38bdbdcc.system.entry.js +0 -1
  267. package/dist/zonos-elements/p-3b1898bc.system.entry.js +0 -1
  268. package/dist/zonos-elements/p-3f078bf5.system.entry.js +0 -1
  269. package/dist/zonos-elements/p-59ebb8c7.system.entry.js +0 -1
  270. package/dist/zonos-elements/p-5be33a13.system.entry.js +0 -1
  271. package/dist/zonos-elements/p-5f956a0d.entry.js +0 -1
  272. package/dist/zonos-elements/p-74e258ff.system.js +0 -1
  273. package/dist/zonos-elements/p-7521549c.entry.js +0 -1
  274. package/dist/zonos-elements/p-775c1122.system.js +0 -1
  275. package/dist/zonos-elements/p-85430ec1.js +0 -1
  276. package/dist/zonos-elements/p-8d2e24a4.system.entry.js +0 -1
  277. package/dist/zonos-elements/p-8dc7d82f.system.entry.js +0 -1
  278. package/dist/zonos-elements/p-95524f54.js +0 -1
  279. package/dist/zonos-elements/p-95703417.system.entry.js +0 -1
  280. package/dist/zonos-elements/p-993723c2.system.entry.js +0 -1
  281. package/dist/zonos-elements/p-a0a62b7e.js +0 -17
  282. package/dist/zonos-elements/p-a53d3d46.entry.js +0 -1
  283. package/dist/zonos-elements/p-a556ec07.system.js +0 -17
  284. package/dist/zonos-elements/p-a6489088.js +0 -1
  285. package/dist/zonos-elements/p-acc0eee3.system.js +0 -1
  286. package/dist/zonos-elements/p-ba228769.entry.js +0 -1
  287. package/dist/zonos-elements/p-c62b6741.system.entry.js +0 -1
  288. package/dist/zonos-elements/p-c708f7e9.entry.js +0 -1
  289. package/dist/zonos-elements/p-c88cd318.system.entry.js +0 -1
  290. package/dist/zonos-elements/p-d1effb76.system.js +0 -1
  291. package/dist/zonos-elements/p-e7543082.system.js +0 -1
  292. package/dist/zonos-elements/p-e90e9584.entry.js +0 -1
  293. package/dist/zonos-elements/p-eb9ee025.system.js +0 -1
  294. package/dist/zonos-elements/p-ebef34e3.entry.js +0 -1
  295. package/dist/zonos-elements/p-f6c6b6d3.system.entry.js +0 -1
@@ -284,6 +284,9 @@ export const stringsVietnamese = {
284
284
  'Invalid session': {
285
285
  value: 'Phiên không hợp lệ',
286
286
  },
287
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
288
+ value: 'Định dạng mã địa chỉ ngắn không hợp lệ. Phải là 4 chữ cái và 4 chữ số.',
289
+ },
287
290
  'Invoice:': {
288
291
  value: 'Hóa đơn:',
289
292
  },
@@ -527,6 +530,12 @@ export const stringsVietnamese = {
527
530
  'Shopping cart expired': {
528
531
  value: 'Giỏ hàng đã hết hạn',
529
532
  },
533
+ 'Short address code': {
534
+ value: 'Mã địa chỉ ngắn',
535
+ },
536
+ 'Short address code is required.': {
537
+ value: 'Cần có mã địa chỉ ngắn.',
538
+ },
530
539
  Show: {
531
540
  value: 'Hiển thị',
532
541
  },
@@ -35,7 +35,8 @@
35
35
  margin-bottom: 16px;
36
36
  }
37
37
  :host .zonos--company-name-input,
38
- :host .zonos--tax-id-input {
38
+ :host .zonos--tax-id-input,
39
+ :host .zonos--short-address-code-input {
39
40
  margin-bottom: 16px;
40
41
  }
41
42
  :host zonos-banner {
@@ -7,6 +7,7 @@ import { translate } from "../../store/translationStore";
7
7
  import { zonosStore } from "../../store/zonosStore";
8
8
  import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
9
9
  import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
10
+ import { shouldRenderShortAddressCodeInput } from "../../utils/checkout/shouldRenderShortAddressCodeInput";
10
11
  import { shouldRenderTaxIdInput } from "../../utils/checkout/shouldRenderTaxIdInput";
11
12
  import { classes } from "../../utils/classes";
12
13
  import { extractName } from "../../utils/extractName";
@@ -31,6 +32,10 @@ export class ZonosAddress {
31
32
  * Error message for tax id input
32
33
  */
33
34
  this.taxIdErrorMessage = '';
35
+ /**
36
+ * Error message for short address code input
37
+ */
38
+ this.shortAddressCodeErrorMessage = '';
34
39
  this.stripe = window.Zonos.stripe;
35
40
  /**
36
41
  * Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
@@ -260,7 +265,32 @@ export class ZonosAddress {
260
265
  return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
261
266
  stripeStore.taxId = event.detail;
262
267
  this.taxIdChanged.emit(event.detail);
263
- } }), this.taxIdErrorMessage && (h("zonos-text", { textColor: 'red-600', type: "caption" }, this.taxIdErrorMessage))));
268
+ } }), this.taxIdErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.taxIdErrorMessage))));
269
+ }
270
+ /**
271
+ * Render short address code input based on ship to country code
272
+ */
273
+ renderShortAddressCodeInput() {
274
+ var _a;
275
+ // No need to render short address code input for billing address
276
+ if (this.type === 'billing') {
277
+ return null;
278
+ }
279
+ const countryCode = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
280
+ // Don't render short address code input if the country is not provided
281
+ if (!countryCode) {
282
+ return null;
283
+ }
284
+ const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
285
+ countryCode,
286
+ });
287
+ // Don't render short address code input if the country doesn't require short address code
288
+ if (!shortAddressCodeInputRendered) {
289
+ return null;
290
+ }
291
+ return (h("div", { class: "zonos--short-address-code-input" }, h("zonos-stripe-input", { inputLabel: translate('Short address code'), inputPlaceholder: "RRRD2929", inputValue: stripeStore.shortAddressCode || '', isError: !!this.shortAddressCodeErrorMessage, onInputChange: (event) => {
292
+ stripeStore.shortAddressCode = event.detail;
293
+ } }), this.shortAddressCodeErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.shortAddressCodeErrorMessage))));
264
294
  }
265
295
  renderCompanyNameInput() {
266
296
  // No need to render company name for billing address (only allow for Collect and Invoice)
@@ -322,11 +352,11 @@ export class ZonosAddress {
322
352
  this.isAddressFilled = true;
323
353
  }
324
354
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
325
- return (h(Host, { key: 'b02889c4677a27a8c54a411d66fb31e15af78e1a', class: classes([
355
+ return (h(Host, { key: '5dc571d7c5e706ae9cb90de70deee22847e5ba7e', class: classes([
326
356
  'zonos--address',
327
357
  'zonos--elements',
328
358
  `zonos--${this.type}-address`,
329
- ]) }, this.titleText && (h("zonos-text", { key: 'f52beb7ed6699ec1c73ee35a3436798a1fea38c7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: '7c9602892de932e8a3f90a37b53a936f39082916', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), h("div", { key: '8ea6698f5b9d3bb525942c146e2cf67fefad6ad8', class: "zonos--address-component" })));
359
+ ]) }, this.titleText && (h("zonos-text", { key: 'a7c9f730bc9b64aa2c6e8cc24701e638481eac19', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: '3078529c201c7947ffc833485d46184bc79ab1d1', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: 'b4a9850ac30ad9c483e05743ff41b7de9756d826', class: "zonos--address-component" })));
330
360
  }
331
361
  static get is() { return "zonos-address"; }
332
362
  static get encapsulation() { return "scoped"; }
@@ -423,6 +453,26 @@ export class ZonosAddress {
423
453
  "attribute": "tax-id-error-message",
424
454
  "reflect": false,
425
455
  "defaultValue": "''"
456
+ },
457
+ "shortAddressCodeErrorMessage": {
458
+ "type": "string",
459
+ "mutable": false,
460
+ "complexType": {
461
+ "original": "string",
462
+ "resolved": "string",
463
+ "references": {}
464
+ },
465
+ "required": false,
466
+ "optional": false,
467
+ "docs": {
468
+ "tags": [],
469
+ "text": "Error message for short address code input"
470
+ },
471
+ "getter": false,
472
+ "setter": false,
473
+ "attribute": "short-address-code-error-message",
474
+ "reflect": false,
475
+ "defaultValue": "''"
426
476
  }
427
477
  };
428
478
  }
@@ -20,6 +20,7 @@ import { zonosStore } from "../../store/zonosStore";
20
20
  import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
21
21
  import { isValidZip } from "../../utils/checkout/form/isValidZip";
22
22
  import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
23
+ import { shouldRenderShortAddressCodeInput } from "../../utils/checkout/shouldRenderShortAddressCodeInput";
23
24
  import { shouldRenderTaxIdInput } from "../../utils/checkout/shouldRenderTaxIdInput";
24
25
  import { classes } from "../../utils/classes";
25
26
  import { extractName } from "../../utils/extractName";
@@ -40,6 +41,10 @@ export class ZonosAddress {
40
41
  * Error message for tax id input
41
42
  */
42
43
  this.taxIdErrorMessage = '';
44
+ /**
45
+ * Error message for short address code input
46
+ */
47
+ this.shortAddressCodeErrorMessage = '';
43
48
  this.stripe = window.Zonos.stripe;
44
49
  /**
45
50
  * Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
@@ -370,6 +375,31 @@ export class ZonosAddress {
370
375
  stripeStore.taxId = event.detail;
371
376
  } })));
372
377
  }
378
+ /**
379
+ * Render short address code input based on ship to country code
380
+ */
381
+ renderShortAddressCodeInput() {
382
+ var _a;
383
+ // No need to render short address code input for billing address
384
+ if (this.type === 'billing') {
385
+ return null;
386
+ }
387
+ const countryCode = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
388
+ // Don't render short address code input if the country is not provided
389
+ if (!countryCode) {
390
+ return null;
391
+ }
392
+ const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
393
+ countryCode,
394
+ });
395
+ // Don't render short address code input if the country doesn't require short address code
396
+ if (!shortAddressCodeInputRendered) {
397
+ return null;
398
+ }
399
+ return (h("div", { class: "zonos--short-address-code-input" }, h("zonos-stripe-input", { inputLabel: translate('Short address code'), inputPlaceholder: "RRRD2929", inputValue: stripeStore.shortAddressCode || '', isError: !!this.shortAddressCodeErrorMessage, onInputChange: (event) => {
400
+ stripeStore.shortAddressCode = event.detail;
401
+ } }), this.shortAddressCodeErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.shortAddressCodeErrorMessage))));
402
+ }
373
403
  renderCompanyNameInput() {
374
404
  // No need to render company name for billing address
375
405
  if (this.type === 'billing') {
@@ -894,10 +924,10 @@ export class ZonosAddress {
894
924
  this.country = localizationStore.selectedCountryCode;
895
925
  }
896
926
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
897
- return (h(Host, { key: '7214ab1c348c1236dfa65f3bb20866fb3262c35d', class: classes([
927
+ return (h(Host, { key: '4a2a2bb06e16eb0470b827efd104c1a7a373e2b5', class: classes([
898
928
  'zonos--address zonos--elements',
899
929
  `zonos--${this.type}-address`,
900
- ]) }, h("zonos-text", { key: '3ce287d8ffd3f5fdb4745311d17992c0b9ee9678', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: '0e33486852d6512b054bb480d0295ce97d2667eb', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
930
+ ]) }, h("zonos-text", { key: '74fd51761c8672e23ada3c5f1bac121cdf559ca6', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: 'e21b18b079f013e1bdaf2ab526c1c7826f2376f0', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
901
931
  }
902
932
  static get is() { return "zonos-custom-address"; }
903
933
  static get encapsulation() { return "scoped"; }
@@ -994,6 +1024,26 @@ export class ZonosAddress {
994
1024
  "attribute": "tax-id-error-message",
995
1025
  "reflect": false,
996
1026
  "defaultValue": "''"
1027
+ },
1028
+ "shortAddressCodeErrorMessage": {
1029
+ "type": "string",
1030
+ "mutable": false,
1031
+ "complexType": {
1032
+ "original": "string",
1033
+ "resolved": "string",
1034
+ "references": {}
1035
+ },
1036
+ "required": false,
1037
+ "optional": false,
1038
+ "docs": {
1039
+ "tags": [],
1040
+ "text": "Error message for short address code input"
1041
+ },
1042
+ "getter": false,
1043
+ "setter": false,
1044
+ "attribute": "short-address-code-error-message",
1045
+ "reflect": false,
1046
+ "defaultValue": "''"
997
1047
  }
998
1048
  };
999
1049
  }
@@ -99,6 +99,7 @@ export const prepCartCalculateLandedCost = (cartId) => {
99
99
  },
100
100
  ]
101
101
  : [],
102
+ shipToShortAddressCode: stripeStore.shortAddressCode,
102
103
  shipToTaxId: stripeStore.taxId,
103
104
  shippingAddress: {
104
105
  addressLine1: translatedShippingAddress.line1,
@@ -185,6 +186,7 @@ export const prepCalculateLandedCost = () => {
185
186
  isTest: isE2ETest,
186
187
  items: cartStore.items,
187
188
  landedCostAdjustments: adjustments,
189
+ shipToShortAddressCode: stripeStore.shortAddressCode,
188
190
  shipToTaxId: stripeStore.taxId,
189
191
  shippingAddress: {
190
192
  addressLine1: translatedShippingAddress.line1,
@@ -0,0 +1,16 @@
1
+ import { countryRequireShortAddressCode, } from "../../../types/checkout/ShortAddressCode";
2
+ const isInShortAddressCodeCountry = (countryCode) => {
3
+ return countryRequireShortAddressCode.includes(countryCode);
4
+ };
5
+ /**
6
+ * Checks if the short address code input should be rendered based on the country code.
7
+ */
8
+ export const shouldRenderShortAddressCodeInput = ({ countryCode, }) => {
9
+ // If country require short address code, show the input
10
+ const isCountryRequireShortAddressCode = isInShortAddressCodeCountry(countryCode);
11
+ if (isCountryRequireShortAddressCode) {
12
+ return true;
13
+ }
14
+ // If country doesn't require short address code, no need to show the input
15
+ return false;
16
+ };
@@ -1,8 +1,9 @@
1
1
  import { stripeStoreGetDomesticShippingSession, stripeStoreSaveDomesticShippingSession, } from "../../store/checkout/stripe";
2
2
  import { localizationStoreUpdateSelectedCountryCode } from "../../store/hello/localization";
3
+ import { zonosStore } from "../../store/zonosStore";
3
4
  import { isShippableCountry } from "./isShippableCountry";
4
5
  import { log } from "../logging/log";
5
- const SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryCode"]';
6
+ const FALLBACK_SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryCode"]';
6
7
  /**
7
8
  * Watch for changes in domestic checkout step. Redirects user to home page to open international checkout when user selects a country in the international shipping zone.
8
9
  * @note Only works on default bigcommerce checkout page
@@ -14,12 +15,12 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
14
15
  /**
15
16
  * Keep checking
16
17
  */
17
- const handleInternationalCheckoutSelected = async () => {
18
- const shipToCountryElement = document.querySelector(SHIP_TO_COUNTRY_SELECTOR);
19
- if (!shipToCountryElement) {
20
- return false;
21
- }
22
- const shippingCountry = shipToCountryElement.value;
18
+ const handleInternationalCheckoutSelected = async (overrideShippingCountry) => {
19
+ var _a;
20
+ const shipToCountryElement = document.querySelector(((_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.bigcommerceDomesticCheckoutCountrySelector) ||
21
+ FALLBACK_SHIP_TO_COUNTRY_SELECTOR);
22
+ const shippingCountry = ((shipToCountryElement === null || shipToCountryElement === void 0 ? void 0 : shipToCountryElement.value) ||
23
+ overrideShippingCountry);
23
24
  if (!shippingCountry) {
24
25
  // do nothing if shipping country is not found
25
26
  return false;
@@ -66,6 +67,7 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
66
67
  let isProcessing = false;
67
68
  let intervalCreated = false;
68
69
  const observer = new MutationObserver(() => {
70
+ var _a;
69
71
  const domesticRedirectedButton = document.querySelector(domesticRedirectedBtnSelector);
70
72
  const shippingAddressSession = stripeStoreGetDomesticShippingSession();
71
73
  // append a hidden button to the body if the shipping address session is found
@@ -82,7 +84,8 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
82
84
  }
83
85
  const isBigcommerceDomesticCheckoutPage = window.location.pathname.includes('/checkout') &&
84
86
  window.Zonos.isBigCommerce;
85
- const shipToCountryElement = document.querySelector(SHIP_TO_COUNTRY_SELECTOR);
87
+ const shipToCountryElement = document.querySelector(((_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.bigcommerceDomesticCheckoutCountrySelector) ||
88
+ FALLBACK_SHIP_TO_COUNTRY_SELECTOR);
86
89
  // Should just disconnect the observer if it's not bigcommerce domestic checkout page
87
90
  if (!isBigcommerceDomesticCheckoutPage) {
88
91
  observer.disconnect();
@@ -121,6 +124,26 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
121
124
  isProcessing = false;
122
125
  }
123
126
  }, 1000);
127
+ // keep checking for stripe address element to be initialized
128
+ const stripeBcListenerInterval = setInterval(() => {
129
+ var _a;
130
+ if (!window.bcStripeElements) {
131
+ clearInterval(stripeBcListenerInterval);
132
+ return;
133
+ }
134
+ const addressElement = (_a = window.bcStripeElements) === null || _a === void 0 ? void 0 : _a.getElement('address');
135
+ if (!addressElement) {
136
+ return;
137
+ }
138
+ clearInterval(stripeBcListenerInterval);
139
+ addressElement.on('change', event => {
140
+ const shippingCountry = event.value.address.country;
141
+ if (shippingCountry) {
142
+ void handleInternationalCheckoutSelected(shippingCountry);
143
+ }
144
+ });
145
+ // we want to attacch event to addressElement as soon as it's loaded
146
+ }, 500);
124
147
  });
125
148
  observer.observe(document.body, {
126
149
  childList: true,
@@ -2,6 +2,14 @@ import tinycolor from "tinycolor2";
2
2
  import { isContrastColor } from "./isContrastColor";
3
3
  import { isDarkColor } from "./isDarkColor";
4
4
  export const getContrastColor = ({ backgroundColor, color, }) => {
5
+ if (backgroundColor === color) {
6
+ if (isDarkColor(color)) {
7
+ const ligherColor = tinycolor(color).lighten(40).toHexString();
8
+ return ligherColor;
9
+ }
10
+ const darkerColor = tinycolor(color).darken(40).toHexString();
11
+ return darkerColor;
12
+ }
5
13
  // get readibility of the color
6
14
  const isContrastEnough = isContrastColor({
7
15
  backgroundColor1: backgroundColor,
@@ -0,0 +1,37 @@
1
+ import { shouldRenderShortAddressCodeInput } from "./checkout/shouldRenderShortAddressCodeInput";
2
+ export const shortAddressCodeValidationResult = ({ shippingCountry, shortAddressCode, }) => {
3
+ // Check to see if we are required to collect short address code for the shipping country or not
4
+ const isShortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
5
+ countryCode: shippingCountry,
6
+ });
7
+ // If the short address code input is not even rendered, no need to validate anything and allow to proceed. Validate when short address code input is not even rendered would prevent the user from checking out
8
+ if (!isShortAddressCodeInputRendered) {
9
+ return {
10
+ error: null,
11
+ valid: true,
12
+ };
13
+ }
14
+ /**
15
+ * If the short address code input is rendered, the input should be filled
16
+ */
17
+ if (!shortAddressCode) {
18
+ return {
19
+ error: 'Short address code is required.',
20
+ valid: false,
21
+ };
22
+ }
23
+ if (shippingCountry === 'SA') {
24
+ const isValid = /^[A-Za-z]{4}\s*[0-9]{4}$/.test(shortAddressCode);
25
+ if (!isValid) {
26
+ return {
27
+ error: 'Invalid short address code format. Must be 4 letters and 4 numbers.',
28
+ valid: false,
29
+ };
30
+ }
31
+ }
32
+ // Other countries doesn't need to validate short address code in the right format
33
+ return {
34
+ error: null,
35
+ valid: true,
36
+ };
37
+ };
@@ -0,0 +1,3 @@
1
+ export const countryRequireShortAddressCode = [
2
+ 'SA',
3
+ ];
@@ -11,6 +11,7 @@ export const errorProjectNameEnum = {
11
11
  ZonosCom: 'zonos_com',
12
12
  };
13
13
  export const featureAspectKeyEnum = {
14
+ AdminRulesWrite: 'admin_rules_write',
14
15
  AirwallexBeta: 'airwallex_beta',
15
16
  Checkout_2_0: 'checkout_2_0',
16
17
  ClassifyBulk: 'classify_bulk',
@@ -43,6 +44,7 @@ export const featureAspectKeyEnum = {
43
44
  };
44
45
  export const featureAudienceNameEnum = {
45
46
  AccountsReceivable: 'accounts_receivable',
47
+ AdminRulesEditor: 'admin_rules_editor',
46
48
  AirwallexBetaMerchant: 'airwallex_beta_merchant',
47
49
  CheckoutSales: 'checkout_sales',
48
50
  ClassifyBulkMerchant: 'classify_bulk_merchant',