@zonos/elements 1.3.246 → 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 (281) 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 +65 -44
  19. package/dist/cjs/zonos-checkout.cjs.entry.js +6 -5
  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 +7 -6
  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 +2 -2
  28. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  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 +7 -6
  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.js +2 -2
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +16 -2
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +22 -3
  37. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
  38. package/dist/collection/components/store/checkout/stripe.js +32 -5
  39. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  40. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  41. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  42. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  43. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  44. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  45. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  46. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  47. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  48. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  49. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  50. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  51. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  52. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  53. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  54. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  55. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  56. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  57. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  58. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  59. package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
  60. package/dist/collection/components/stripe/zonos-address/zonos-address.js +53 -3
  61. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -2
  62. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  63. package/dist/collection/components/utils/checkout/shouldRenderShortAddressCodeInput.js +16 -0
  64. package/dist/collection/components/utils/shortAddressCodeValidationResult.js +37 -0
  65. package/dist/collection/types/checkout/ShortAddressCode.js +3 -0
  66. package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
  67. package/dist/collection/types/generated/graphql.internal.types.js +135 -0
  68. package/dist/collection/types/index.js +1 -0
  69. package/dist/esm/ShortAddressCode-7620e622.js +5 -0
  70. package/dist/esm/{cart-7f4704dc.js → cart-99ec4a3d.js} +35 -6
  71. package/dist/esm/getContrastColor-28c18704.js +35 -0
  72. package/dist/esm/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
  73. package/dist/esm/index.js +8 -7
  74. package/dist/esm/{invoice-d3d256fb.js → invoice-44e97c22.js} +2 -2
  75. package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +2 -2
  76. package/dist/esm/isContrastColor-69778cea.js +10 -0
  77. package/dist/esm/loader.js +1 -1
  78. package/dist/esm/{localization-401ec6d4.js → localization-853b48a9.js} +180 -0
  79. package/dist/esm/{paypal-61270b79.js → paypal-56534e48.js} +4 -11
  80. package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +2 -2
  81. package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +2 -2
  82. package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
  83. package/dist/esm/zonos-address-display_9.entry.js +35 -5
  84. package/dist/esm/zonos-address_4.entry.js +37 -7
  85. package/dist/esm/zonos-card_5.entry.js +4 -3
  86. package/dist/esm/zonos-cart-items_12.entry.js +65 -44
  87. package/dist/esm/zonos-checkout.entry.js +6 -5
  88. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  89. package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
  90. package/dist/esm/zonos-collect.entry.js +5 -4
  91. package/dist/esm/zonos-controller.entry.js +2 -2
  92. package/dist/esm/zonos-country-flag.entry.js +1 -1
  93. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  94. package/dist/esm/zonos-elements.js +1 -1
  95. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  96. package/dist/esm/zonos-hello.entry.js +1 -1
  97. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  98. package/dist/esm/zonos-invoice-finish_5.entry.js +7 -6
  99. package/dist/esm/zonos-invoice.entry.js +5 -4
  100. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  101. package/dist/esm/zonos-shipping-rich-radio.entry.js +19 -5
  102. package/dist/esm-es5/ShortAddressCode-7620e622.js +1 -0
  103. package/dist/esm-es5/cart-99ec4a3d.js +1 -0
  104. package/dist/esm-es5/getContrastColor-28c18704.js +1 -0
  105. package/dist/esm-es5/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
  106. package/dist/esm-es5/index.js +1 -1
  107. package/dist/esm-es5/{invoice-d3d256fb.js → invoice-44e97c22.js} +1 -1
  108. package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +1 -1
  109. package/dist/esm-es5/isContrastColor-69778cea.js +1 -0
  110. package/dist/esm-es5/loader.js +1 -1
  111. package/dist/esm-es5/localization-853b48a9.js +1 -0
  112. package/dist/esm-es5/paypal-56534e48.js +17 -0
  113. package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +1 -1
  114. package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +1 -1
  115. package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
  116. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
  117. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  118. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  119. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  120. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  121. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  122. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  123. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  124. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  125. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  126. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  127. package/dist/esm-es5/zonos-elements.js +1 -1
  128. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  129. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  130. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  131. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  132. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  133. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  134. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  135. package/dist/scripts/index.d.ts +50 -4
  136. package/dist/scripts/index.js +1 -1
  137. package/dist/scripts/loadZonos.js +1 -1
  138. package/dist/scripts/zonos.js +1 -1
  139. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
  140. package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -0
  141. package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
  142. package/dist/types/components/store/checkout/stripe.d.ts +4 -0
  143. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  144. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  145. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  146. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  147. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  148. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  149. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  150. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  151. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  152. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  153. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  154. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  155. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  156. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  157. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  158. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  159. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  160. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  161. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  162. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  163. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +8 -0
  164. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +8 -0
  165. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  166. package/dist/types/components/utils/checkout/shouldRenderShortAddressCodeInput.d.ts +6 -0
  167. package/dist/types/components/utils/shortAddressCodeValidationResult.d.ts +12 -0
  168. package/dist/types/components.d.ts +32 -0
  169. package/dist/types/types/checkout/ShortAddressCode.d.ts +2 -0
  170. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
  171. package/dist/types/types/checkout/api/CreateParty.d.ts +1 -0
  172. package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
  173. package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
  174. package/dist/types/types/generated/graphql.internal.types.d.ts +157 -30
  175. package/dist/types/types/generated/graphql.internal.types.ts +194 -37
  176. package/dist/types/types/index.d.ts +1 -0
  177. package/dist/zonos-elements/index.esm.js +1 -1
  178. package/dist/zonos-elements/p-08365fdb.system.js +1 -0
  179. package/dist/zonos-elements/p-09aabce0.js +1 -0
  180. package/dist/zonos-elements/p-0c201c39.system.entry.js +1 -0
  181. package/dist/zonos-elements/p-0cb5f151.system.entry.js +1 -0
  182. package/dist/zonos-elements/{p-367c13db.system.entry.js → p-10355cf6.system.entry.js} +1 -1
  183. package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
  184. package/dist/zonos-elements/{p-288aab46.js → p-1b86711b.js} +1 -1
  185. package/dist/zonos-elements/p-1d42cd20.js +1 -0
  186. package/dist/zonos-elements/p-1dbeeab2.entry.js +1 -0
  187. package/dist/zonos-elements/p-2c10b067.system.entry.js +1 -0
  188. package/dist/zonos-elements/p-2e8f842c.entry.js +1 -0
  189. package/dist/zonos-elements/{p-67820c21.system.entry.js → p-2f55895c.system.entry.js} +1 -1
  190. package/dist/zonos-elements/p-37bb5f2d.entry.js +1 -0
  191. package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-382601a9.system.entry.js} +1 -1
  192. package/dist/zonos-elements/{p-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
  193. package/dist/zonos-elements/p-3e2f175c.entry.js +1 -0
  194. package/dist/zonos-elements/{p-cee69784.entry.js → p-403b9fca.entry.js} +1 -1
  195. package/dist/zonos-elements/p-41299ffb.js +1 -0
  196. package/dist/zonos-elements/p-443e1f30.system.js +1 -0
  197. package/dist/zonos-elements/{p-a79f3685.js → p-46ece7ae.js} +1 -1
  198. package/dist/zonos-elements/p-48d55793.system.js +1 -0
  199. package/dist/zonos-elements/p-5295d36e.entry.js +1 -0
  200. package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-53a9da45.entry.js} +1 -1
  201. package/dist/zonos-elements/p-63a383f4.js +1 -0
  202. package/dist/zonos-elements/{p-a3411f20.entry.js → p-64870563.entry.js} +1 -1
  203. package/dist/zonos-elements/p-655ec440.system.js +1 -0
  204. package/dist/zonos-elements/{p-415c2a90.system.js → p-678331f0.system.js} +1 -1
  205. package/dist/zonos-elements/p-695e0803.system.entry.js +1 -0
  206. package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
  207. package/dist/zonos-elements/p-6e3cf6eb.entry.js +1 -0
  208. package/dist/zonos-elements/p-6f430d6f.system.entry.js +1 -0
  209. package/dist/zonos-elements/p-71185d24.system.js +1 -0
  210. package/dist/zonos-elements/p-786d1c24.js +1 -0
  211. package/dist/zonos-elements/p-794d29dc.entry.js +1 -0
  212. package/dist/zonos-elements/{p-87206522.system.entry.js → p-7b400b5f.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-6b9b7cfb.system.entry.js → p-8205ae87.system.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-3a88a130.entry.js → p-83377e23.entry.js} +1 -1
  215. package/dist/zonos-elements/p-8defdf0d.system.js +17 -0
  216. package/dist/zonos-elements/p-8e98a7c8.js +1 -0
  217. package/dist/zonos-elements/{p-2889a485.system.entry.js → p-95348ebf.system.entry.js} +1 -1
  218. package/dist/zonos-elements/p-9a066833.system.entry.js +1 -0
  219. package/dist/zonos-elements/p-aa6c2348.system.entry.js +1 -0
  220. package/dist/zonos-elements/p-ada8841a.js +1 -0
  221. package/dist/zonos-elements/p-ae26aec5.system.js +1 -0
  222. package/dist/zonos-elements/p-af85846e.system.js +1 -0
  223. package/dist/zonos-elements/{p-78c8bb58.system.entry.js → p-b54a95ea.system.entry.js} +1 -1
  224. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  225. package/dist/zonos-elements/p-c75b7c47.entry.js +1 -0
  226. package/dist/zonos-elements/p-caff391d.system.entry.js +1 -0
  227. package/dist/zonos-elements/p-ce98e472.js +1 -0
  228. package/dist/zonos-elements/{p-3f46d83e.entry.js → p-d0411b2d.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
  230. package/dist/zonos-elements/p-dca14319.system.js +1 -0
  231. package/dist/zonos-elements/p-dd19d9d8.js +17 -0
  232. package/dist/zonos-elements/{p-e0809901.system.js → p-df6e62f8.system.js} +1 -1
  233. package/dist/zonos-elements/p-df90bccf.entry.js +1 -0
  234. package/dist/zonos-elements/p-e07aaf09.system.js +1 -0
  235. package/dist/zonos-elements/p-e458f737.entry.js +1 -0
  236. package/dist/zonos-elements/p-eea7ac64.js +1 -0
  237. package/dist/zonos-elements/p-f6f1d779.system.entry.js +1 -0
  238. package/dist/zonos-elements/p-f8eb618b.entry.js +1 -0
  239. package/dist/zonos-elements/p-fe96e239.system.js +1 -0
  240. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  241. package/package.json +1 -1
  242. package/dist/esm-es5/cart-7f4704dc.js +0 -1
  243. package/dist/esm-es5/localization-401ec6d4.js +0 -1
  244. package/dist/esm-es5/paypal-61270b79.js +0 -17
  245. package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +0 -1
  246. package/dist/zonos-elements/p-01b0a2e2.js +0 -1
  247. package/dist/zonos-elements/p-095f43ec.entry.js +0 -1
  248. package/dist/zonos-elements/p-1d91e5d1.entry.js +0 -1
  249. package/dist/zonos-elements/p-21fb6b39.js +0 -1
  250. package/dist/zonos-elements/p-2601538e.entry.js +0 -1
  251. package/dist/zonos-elements/p-276faa43.js +0 -1
  252. package/dist/zonos-elements/p-27874c22.entry.js +0 -1
  253. package/dist/zonos-elements/p-291b85f7.entry.js +0 -1
  254. package/dist/zonos-elements/p-2d2c627a.system.js +0 -1
  255. package/dist/zonos-elements/p-3b1898bc.system.entry.js +0 -1
  256. package/dist/zonos-elements/p-3f078bf5.system.entry.js +0 -1
  257. package/dist/zonos-elements/p-518b501c.system.entry.js +0 -1
  258. package/dist/zonos-elements/p-59ebb8c7.system.entry.js +0 -1
  259. package/dist/zonos-elements/p-5f956a0d.entry.js +0 -1
  260. package/dist/zonos-elements/p-6c29de12.entry.js +0 -1
  261. package/dist/zonos-elements/p-74e258ff.system.js +0 -1
  262. package/dist/zonos-elements/p-775c1122.system.js +0 -1
  263. package/dist/zonos-elements/p-7a6ab319.system.entry.js +0 -1
  264. package/dist/zonos-elements/p-85430ec1.js +0 -1
  265. package/dist/zonos-elements/p-872f9c22.system.entry.js +0 -1
  266. package/dist/zonos-elements/p-95524f54.js +0 -1
  267. package/dist/zonos-elements/p-993723c2.system.entry.js +0 -1
  268. package/dist/zonos-elements/p-a0a62b7e.js +0 -17
  269. package/dist/zonos-elements/p-a556ec07.system.js +0 -17
  270. package/dist/zonos-elements/p-a6489088.js +0 -1
  271. package/dist/zonos-elements/p-acc0eee3.system.js +0 -1
  272. package/dist/zonos-elements/p-bd10e82a.system.entry.js +0 -1
  273. package/dist/zonos-elements/p-c62b6741.system.entry.js +0 -1
  274. package/dist/zonos-elements/p-c6aa780e.entry.js +0 -1
  275. package/dist/zonos-elements/p-d1effb76.system.js +0 -1
  276. package/dist/zonos-elements/p-e7543082.system.js +0 -1
  277. package/dist/zonos-elements/p-e7df8394.entry.js +0 -1
  278. package/dist/zonos-elements/p-e90e9584.entry.js +0 -1
  279. package/dist/zonos-elements/p-eb9ee025.system.js +0 -1
  280. package/dist/zonos-elements/p-ebef34e3.entry.js +0 -1
  281. package/dist/zonos-elements/p-f6c6b6d3.system.entry.js +0 -1
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-69fa8852.js');
6
- const localization = require('./localization-b1075a8c.js');
6
+ const localization = require('./localization-00e73920.js');
7
7
  const zonosStore = require('./zonosStore-37a4b4f4.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
10
- const hasInclusivePrice = require('./hasInclusivePrice-dbb82df8.js');
10
+ const hasInclusivePrice = require('./hasInclusivePrice-134b0250.js');
11
11
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
12
12
  const TaxId = require('./TaxId-12acedde.js');
13
13
  require('./handleFetch-954f30e1.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-69fa8852.js');
6
6
  const debounce = require('./debounce-815d1517.js');
7
- const localization = require('./localization-b1075a8c.js');
7
+ const localization = require('./localization-00e73920.js');
8
8
  const zonosStore = require('./zonosStore-37a4b4f4.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-69fa8852.js');
6
- const cart = require('./cart-52cf3366.js');
7
- const localization = require('./localization-b1075a8c.js');
8
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-55056c97.js');
6
+ const cart = require('./cart-97a2d20a.js');
7
+ const localization = require('./localization-00e73920.js');
8
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-dd3b0609.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
- const invoice = require('./invoice-972f1ab3.js');
10
+ const invoice = require('./invoice-05a10ee1.js');
11
11
  const renderFallback = require('./renderFallback-78b54537.js');
12
12
  require('./zonosStore-37a4b4f4.js');
13
13
  require('./VarianceTest-bec00ea8.js');
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-69fa8852.js');
6
- const cart = require('./cart-52cf3366.js');
7
- const paypal = require('./paypal-e339cc8c.js');
8
- const localization = require('./localization-b1075a8c.js');
6
+ const cart = require('./cart-97a2d20a.js');
7
+ const paypal = require('./paypal-0b4b352b.js');
8
+ const localization = require('./localization-00e73920.js');
9
9
  const zonosStore = require('./zonosStore-37a4b4f4.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
11
11
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
@@ -14,11 +14,12 @@ const VarianceTest = require('./VarianceTest-bec00ea8.js');
14
14
  const isInvoiceMobileTablet = require('./isInvoiceMobileTablet-dde41e4e.js');
15
15
  const classes = require('./classes-b7918f56.js');
16
16
  const ILanguage = require('./ILanguage-98b04442.js');
17
- const invoice = require('./invoice-972f1ab3.js');
18
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-55056c97.js');
19
- const placeTestOrder = require('./placeTestOrder-3dfbe3d6.js');
17
+ const invoice = require('./invoice-05a10ee1.js');
18
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-dd3b0609.js');
19
+ const placeTestOrder = require('./placeTestOrder-07b46688.js');
20
20
  const renderFallback = require('./renderFallback-78b54537.js');
21
21
  require('./isDarkColor-878e600e.js');
22
+ require('./isContrastColor-09f5924a.js');
22
23
 
23
24
  const RemoveIcon = `<svg color="var(--zonos-elements-red-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-red-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>`;
24
25
 
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-69fa8852.js');
6
- const cart = require('./cart-52cf3366.js');
7
- const invoice = require('./invoice-972f1ab3.js');
8
- const paypal = require('./paypal-e339cc8c.js');
9
- const localization = require('./localization-b1075a8c.js');
6
+ const cart = require('./cart-97a2d20a.js');
7
+ const invoice = require('./invoice-05a10ee1.js');
8
+ const paypal = require('./paypal-0b4b352b.js');
9
+ const localization = require('./localization-00e73920.js');
10
10
  const zonosStore = require('./zonosStore-37a4b4f4.js');
11
11
  const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
12
12
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -16,6 +16,7 @@ const VarianceTest = require('./VarianceTest-bec00ea8.js');
16
16
  const ILanguage = require('./ILanguage-98b04442.js');
17
17
  require('./isDarkColor-878e600e.js');
18
18
  require('./getBorderRadius-2ef1170d.js');
19
+ require('./isContrastColor-09f5924a.js');
19
20
 
20
21
  const ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
21
22
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-69fa8852.js');
6
- const localization = require('./localization-b1075a8c.js');
6
+ const localization = require('./localization-00e73920.js');
7
7
  const zonosStore = require('./zonosStore-37a4b4f4.js');
8
8
  const ILanguage = require('./ILanguage-98b04442.js');
9
9
  require('./handleFetch-954f30e1.js');
@@ -6,8 +6,11 @@ const index = require('./index-69fa8852.js');
6
6
  const zonosStore = require('./zonosStore-37a4b4f4.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  const getBorderRadius = require('./getBorderRadius-2ef1170d.js');
9
+ const getContrastColor = require('./getContrastColor-30848800.js');
9
10
  const isColorVariable = require('./isColorVariable-525dbfa7.js');
10
11
  require('./VarianceTest-bec00ea8.js');
12
+ require('./isDarkColor-878e600e.js');
13
+ require('./isContrastColor-09f5924a.js');
11
14
 
12
15
  const zonosShippingRichRadioCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
13
16
  const ZonosShippingRichRadioStyle0 = zonosShippingRichRadioCss;
@@ -27,20 +30,30 @@ const ZonosShippingRichRadio = class {
27
30
  };
28
31
  this.getRadioItemStyleVariables = () => {
29
32
  const usedColor = this.borderColor || zonosStore.zonosStore.appearance.colorSecondary;
30
- const secondaryColor = isColorVariable.isColorVariable(usedColor)
31
- ? `var(--zonos-elements-${usedColor})`
33
+ const backgroundColor = !this.isMobile
34
+ ? zonosStore.zonosStore.appearance.colorPrimary
35
+ : '--zonos-elements-gray-0';
36
+ const contrastLabelColor = backgroundColor && usedColor
37
+ ? getContrastColor.getContrastColor({
38
+ backgroundColor: isColorVariable.isColorVariable(backgroundColor)
39
+ ? window
40
+ .getComputedStyle(this.ele)
41
+ .getPropertyValue(`--zonos-elements-${backgroundColor.replace('--zonos-elements-', '')}`)
42
+ : backgroundColor,
43
+ color: usedColor,
44
+ })
32
45
  : usedColor;
33
46
  return {
34
47
  '--zonos--border-radius': getBorderRadius.getBorderRadius({
35
48
  overrideBorderStyle: this.borderStyle,
36
49
  }),
37
- '--zonos--selected-border-color': secondaryColor || 'unset',
50
+ '--zonos--selected-border-color': contrastLabelColor || 'unset',
38
51
  };
39
52
  };
40
53
  }
41
54
  render() {
42
55
  var _a;
43
- return (index.h(index.Host, { key: '34abb7026ed7d382870f912b5e5c5631e4f06f76', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--zonos--font-family': zonosStore.zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
56
+ return (index.h(index.Host, { key: '8d77a01ba101899adb41904a820ba5f4985bc52d', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--zonos--font-family': zonosStore.zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
44
57
  var _a;
45
58
  const selected = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value) === item.value;
46
59
  return (index.h("div", { "aria-hidden": "true", class: classes.classes([
@@ -49,6 +62,7 @@ const ZonosShippingRichRadio = class {
49
62
  ]), onClick: () => this.handleRichRadioSelect(item) }, index.h("input", { checked: selected, class: "zonos--shipping-rich-radio-input", name: "zonos--shipping-rich-radio", type: "radio", value: item.value }), index.h("div", { class: "zonos--shipping-info" }, index.h("div", { class: "zonos--shipping-detail" }, index.h("zonos-text", { class: "zonos--shipping-label", type: "label" }, item.label), (item.sublabel || item.caption) && (index.h("div", { class: "zonos--sub-detail" }, item.sublabel && (index.h("zonos-text", { textColor: "gray-800" }, item.sublabel)), item.caption && (index.h("zonos-text", { textColor: "gray-600" }, item.caption))))), index.h("zonos-text", { type: "semiBoldLabel" }, item.price))));
50
63
  })));
51
64
  }
65
+ get ele() { return index.getElement(this); }
52
66
  };
53
67
  ZonosShippingRichRadio.style = ZonosShippingRichRadioStyle0;
54
68
 
@@ -1482,7 +1482,7 @@ export class ZonosCheckout {
1482
1482
  '--zonos--primary-color': !this.isMobile
1483
1483
  ? colorPrimary
1484
1484
  : undefined,
1485
- }) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.getDefaultAddress(), isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
1485
+ }) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.getDefaultAddress(), isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
1486
1486
  await this.handleStripePaymentContinue();
1487
1487
  }, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
1488
1488
  // do nothing if it's not mobile
@@ -1510,7 +1510,7 @@ export class ZonosCheckout {
1510
1510
  this.isMobile && 'mobile',
1511
1511
  this.isIframed && 'iframed',
1512
1512
  this.hiddenMode && 'hidden-mode',
1513
- ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-dialog", { isLoading: true, loadingText: translate('You will be redirected to international checkout shortly.'), loadingTitle: translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
1513
+ ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, class: "zonos--checkout-dialog", "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-dialog", { isLoading: true, loadingText: translate('You will be redirected to international checkout shortly.'), loadingTitle: translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
1514
1514
  this.confirmDialogOpen = false;
1515
1515
  },
1516
1516
  // Mark user selected confirm to close the dialog
@@ -10,6 +10,7 @@ import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
10
10
  import { extractName } from "../../../utils/extractName";
11
11
  import { log } from "../../../utils/logging/log";
12
12
  import { sendErrorLog } from "../../../utils/logging/sendErrorLog";
13
+ import { shortAddressCodeValidationResult } from "../../../utils/shortAddressCodeValidationResult";
13
14
  import { taxIdValidationResult } from "../../../utils/taxIdValidationResult";
14
15
  /**
15
16
  * Max address field length
@@ -48,6 +49,10 @@ export class ZonosCustomerInfo {
48
49
  * Whether or not the tax id input is invalid
49
50
  */
50
51
  this.taxIdErrorMessage = '';
52
+ /**
53
+ * Whether or not the short address code input is invalid
54
+ */
55
+ this.shortAddressCodeErrorMessage = '';
51
56
  /**
52
57
  * Whether or not the shipping address contains invalid characters
53
58
  */
@@ -299,7 +304,14 @@ export class ZonosCustomerInfo {
299
304
  shippingCountry: this.shippingCountry,
300
305
  taxId: stripeStore.taxId,
301
306
  });
307
+ const { error: shortAddressCodeError, valid: validShortAddressCode } = shortAddressCodeValidationResult({
308
+ shippingCountry: this.shippingCountry,
309
+ shortAddressCode: stripeStore.shortAddressCode,
310
+ });
302
311
  this.taxIdErrorMessage = !validTaxId ? translate(error) : '';
312
+ this.shortAddressCodeErrorMessage = !validShortAddressCode
313
+ ? translate(shortAddressCodeError)
314
+ : '';
303
315
  const addressLengthErrorList = this.validateAddressLength({
304
316
  address: stripeStore.stripeAddressEventData,
305
317
  type: 'shipping',
@@ -316,6 +328,7 @@ export class ZonosCustomerInfo {
316
328
  !isValidShipping ||
317
329
  !isValidLink ||
318
330
  !validTaxId ||
331
+ !validShortAddressCode ||
319
332
  this.exceededCharacterLimitErrorFieldList.length > 0) {
320
333
  return false;
321
334
  }
@@ -396,10 +409,10 @@ export class ZonosCustomerInfo {
396
409
  }
397
410
  // Render custom address component if the custom address form is enabled
398
411
  if (this.addressFormRenderType === 'zonos') {
399
- return (h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
412
+ return (h("zonos-custom-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
400
413
  }
401
414
  // Render Stripe address component by default
402
- return (h("zonos-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
415
+ return (h("zonos-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
403
416
  };
404
417
  }
405
418
  watchShowErrorBanner() {
@@ -659,6 +672,7 @@ export class ZonosCustomerInfo {
659
672
  "isCheckingForRestrictedItems": {},
660
673
  "isValidatingAddress": {},
661
674
  "taxIdErrorMessage": {},
675
+ "shortAddressCodeErrorMessage": {},
662
676
  "invalidShippingCharacterList": {},
663
677
  "invalidBillingCharacterList": {},
664
678
  "openAddressValidationDialog": {},
@@ -221,15 +221,15 @@ export class ZonosShipping {
221
221
  var _a;
222
222
  // Render all service levels for US since domestic shipping doesn't have DDP/DAP
223
223
  if (((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) === 'US') {
224
- return (h("zonos-shipping-rich-radio", { items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
224
+ return (h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
225
225
  }
226
- return (h(Fragment, null, h("zonos-shipping-rich-radio", { items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
226
+ return (h(Fragment, null, h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
227
227
  !!this.serviceLevelsDAP.length && (h("button", { class: classes([
228
228
  'zonos--shipping-options-collapse-trigger',
229
229
  this.collapsedDAPOptions && 'collapsed',
230
230
  ]), onClick: () => {
231
231
  this.collapsedDAPOptions = !this.collapsedDAPOptions;
232
- } }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
232
+ } }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
233
233
  };
234
234
  return (h(Host, { class: "zonos--shipping zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!this.serviceLevelsAll.length && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !this.serviceLevelsAll.length ? (h("zonos-banner", { bannerTitle: cartStore.customQuotingError
235
235
  ? cartStore.customQuotingError
@@ -313,6 +313,25 @@ export class ZonosShipping {
313
313
  "setter": false,
314
314
  "attribute": "submit-btn-type",
315
315
  "reflect": false
316
+ },
317
+ "isMobile": {
318
+ "type": "boolean",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "boolean",
322
+ "resolved": "boolean",
323
+ "references": {}
324
+ },
325
+ "required": true,
326
+ "optional": false,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "Whether or not the checkout is in mobile mode"
330
+ },
331
+ "getter": false,
332
+ "setter": false,
333
+ "attribute": "is-mobile",
334
+ "reflect": false
316
335
  }
317
336
  };
318
337
  }
@@ -2,6 +2,7 @@ import { h, Host, } from "@stencil/core";
2
2
  import { zonosStore, zonosStoreFontFamily, } from "../../store/zonosStore";
3
3
  import { classes } from "../../utils/classes";
4
4
  import { getBorderRadius } from "../../utils/getBorderRadius";
5
+ import { getContrastColor } from "../../utils/getContrastColor";
5
6
  import { isColorVariable } from "../../utils/isColorVariable";
6
7
  export class ZonosShippingRichRadio {
7
8
  constructor() {
@@ -16,20 +17,30 @@ export class ZonosShippingRichRadio {
16
17
  };
17
18
  this.getRadioItemStyleVariables = () => {
18
19
  const usedColor = this.borderColor || zonosStore.appearance.colorSecondary;
19
- const secondaryColor = isColorVariable(usedColor)
20
- ? `var(--zonos-elements-${usedColor})`
20
+ const backgroundColor = !this.isMobile
21
+ ? zonosStore.appearance.colorPrimary
22
+ : '--zonos-elements-gray-0';
23
+ const contrastLabelColor = backgroundColor && usedColor
24
+ ? getContrastColor({
25
+ backgroundColor: isColorVariable(backgroundColor)
26
+ ? window
27
+ .getComputedStyle(this.ele)
28
+ .getPropertyValue(`--zonos-elements-${backgroundColor.replace('--zonos-elements-', '')}`)
29
+ : backgroundColor,
30
+ color: usedColor,
31
+ })
21
32
  : usedColor;
22
33
  return {
23
34
  '--zonos--border-radius': getBorderRadius({
24
35
  overrideBorderStyle: this.borderStyle,
25
36
  }),
26
- '--zonos--selected-border-color': secondaryColor || 'unset',
37
+ '--zonos--selected-border-color': contrastLabelColor || 'unset',
27
38
  };
28
39
  };
29
40
  }
30
41
  render() {
31
42
  var _a;
32
- return (h(Host, { key: '34abb7026ed7d382870f912b5e5c5631e4f06f76', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--zonos--font-family': zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
43
+ return (h(Host, { key: '8d77a01ba101899adb41904a820ba5f4985bc52d', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--zonos--font-family': zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
33
44
  var _a;
34
45
  const selected = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value) === item.value;
35
46
  return (h("div", { "aria-hidden": "true", class: classes([
@@ -150,6 +161,25 @@ export class ZonosShippingRichRadio {
150
161
  "attribute": "theme",
151
162
  "reflect": false
152
163
  },
164
+ "isMobile": {
165
+ "type": "boolean",
166
+ "mutable": false,
167
+ "complexType": {
168
+ "original": "boolean",
169
+ "resolved": "boolean",
170
+ "references": {}
171
+ },
172
+ "required": true,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": "Whether or not the radio item is in mobile mode"
177
+ },
178
+ "getter": false,
179
+ "setter": false,
180
+ "attribute": "is-mobile",
181
+ "reflect": false
182
+ },
153
183
  "selectedItem": {
154
184
  "type": "unknown",
155
185
  "mutable": false,
@@ -203,4 +233,5 @@ export class ZonosShippingRichRadio {
203
233
  }
204
234
  }];
205
235
  }
236
+ static get elementRef() { return "ele"; }
206
237
  }
@@ -52,6 +52,7 @@ const { onChange: stripeStoreOnChange, reset, state: stripeStore, } = createStor
52
52
  isFetchingSession: false,
53
53
  partyBillingId: null,
54
54
  partyShippingId: null,
55
+ shortAddressCode: '',
55
56
  shouldInventoryRefund: false,
56
57
  shouldRenderPayInUsdButton: false,
57
58
  /**
@@ -193,12 +194,27 @@ const checkIsAddressOutdatedForValidation = () => {
193
194
  return isAddressDataDirty || isBillingAddressDataDirty;
194
195
  };
195
196
  const checkIsAddressOutdatedForAsyncAddressUpdate = () => {
196
- var _a, _b, _c, _d, _e, _f;
197
- const isLinkDataDirty = JSON.stringify((_a = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _a === void 0 ? void 0 : _a.value) !==
198
- JSON.stringify((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.value);
199
- const isAddressDataDirty = JSON.stringify((_c = stripeStore.stripeAddressUsedWhenAsyncAddressUpdate) === null || _c === void 0 ? void 0 : _c.value) !== JSON.stringify((_d = stripeStore.stripeAddressEventData) === null || _d === void 0 ? void 0 : _d.value);
197
+ var _a, _b, _c, _d, _e, _f, _g, _h;
198
+ /**
199
+ * If user updates the address after prefetching the landed cost, should always create and attach
200
+ * @caveat this will cause the scenario goes wrong after prefetching landed cost, with the current logic, it won't create party because nothing change after the prefetch happened
201
+ */
202
+ const landedCostShipToPartyId = (_a = cartStore.partiesData.find(party => party.type === 'DESTINATION')) === null || _a === void 0 ? void 0 : _a.id;
203
+ const landedCostBillToPartyId = (_b = cartStore.partiesData.find(party => party.type === 'PAYOR')) === null || _b === void 0 ? void 0 : _b.id;
204
+ // If haven't prefetched landed cost, there is no need to update address async
205
+ if (!landedCostShipToPartyId || !landedCostBillToPartyId) {
206
+ return false;
207
+ }
208
+ // If we don't have landed cost parties data, should way
209
+ if (stripeStore.partyShippingId !== landedCostShipToPartyId ||
210
+ stripeStore.partyBillingId !== landedCostBillToPartyId) {
211
+ return true;
212
+ }
213
+ const isLinkDataDirty = JSON.stringify((_c = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _c === void 0 ? void 0 : _c.value) !==
214
+ JSON.stringify((_d = stripeStore.stripeLinkEventData) === null || _d === void 0 ? void 0 : _d.value);
215
+ const isAddressDataDirty = JSON.stringify((_e = stripeStore.stripeAddressUsedWhenAsyncAddressUpdate) === null || _e === void 0 ? void 0 : _e.value) !== JSON.stringify((_f = stripeStore.stripeAddressEventData) === null || _f === void 0 ? void 0 : _f.value);
200
216
  const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
201
- JSON.stringify((_e = stripeStore.stripeBillingAddressUsedWhenAsyncAddressUpdate) === null || _e === void 0 ? void 0 : _e.value) !== JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value);
217
+ JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenAsyncAddressUpdate) === null || _g === void 0 ? void 0 : _g.value) !== JSON.stringify((_h = stripeStore.stripeBillingAddressEventData) === null || _h === void 0 ? void 0 : _h.value);
202
218
  const isTaxIdDirty = stripeStore.taxIdUsedWhenAsyncAddressUpdate !== stripeStore.taxId;
203
219
  const isCompanyNameDirty = stripeStore.companyNameUsedWhenAsyncAddressUpdate !==
204
220
  stripeStore.companyName;
@@ -315,6 +331,7 @@ const stripeStoreAsyncAddressUpdate = async () => {
315
331
  email: ((_d = stripeStore.stripeLinkEventData) === null || _d === void 0 ? void 0 : _d.value.email) || '',
316
332
  isTest: isE2ETest,
317
333
  rootId: firstLandedCostRootId,
334
+ shortAddressCode: stripeStore.shortAddressCode,
318
335
  taxId: stripeStore.taxId,
319
336
  },
320
337
  method: 'POST',
@@ -344,6 +361,16 @@ const stripeStoreAsyncAddressUpdate = async () => {
344
361
  stripeStore.taxIdUsedWhenAsyncAddressUpdate = stripeStore.taxId;
345
362
  stripeStore.partyBillingId = json.billToPartyId;
346
363
  stripeStore.partyShippingId = json.shipToPartyId;
364
+ // Update parties data with the new parties id
365
+ cartStore.partiesData = cartStore.partiesData.map(party => {
366
+ if (party.type === 'DESTINATION' && party.id !== json.shipToPartyId) {
367
+ return Object.assign(Object.assign({}, party), { id: json.shipToPartyId });
368
+ }
369
+ if (party.type === 'PAYOR' && party.id !== json.billToPartyId) {
370
+ return Object.assign(Object.assign({}, party), { id: json.billToPartyId });
371
+ }
372
+ return party;
373
+ });
347
374
  return {
348
375
  partiesCreated: true,
349
376
  };
@@ -284,6 +284,9 @@ export const stringsArabic = {
284
284
  'Invalid session': {
285
285
  value: 'جلسة غير صالحة',
286
286
  },
287
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
288
+ value: 'تنسيق رمز العنوان القصير غير صالح. يجب أن يكون 4 أحرف و4 أرقام.',
289
+ },
287
290
  'Invoice:': {
288
291
  value: 'فاتورة:',
289
292
  },
@@ -527,6 +530,12 @@ export const stringsArabic = {
527
530
  'Shopping cart expired': {
528
531
  value: 'انتهت صلاحية عربة التسوق',
529
532
  },
533
+ 'Short address code': {
534
+ value: 'رمز العنوان القصير',
535
+ },
536
+ 'Short address code is required.': {
537
+ value: 'مطلوب رمز عنوان قصير.',
538
+ },
530
539
  Show: {
531
540
  value: 'عرض',
532
541
  },
@@ -285,6 +285,9 @@ export const stringsBase = {
285
285
  'Invalid session': {
286
286
  value: 'Invalid session',
287
287
  },
288
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
289
+ value: 'Invalid short address code format. Must be 4 letters and 4 numbers.',
290
+ },
288
291
  'Invoice:': {
289
292
  value: 'Invoice:',
290
293
  },
@@ -528,6 +531,12 @@ export const stringsBase = {
528
531
  'Shopping cart expired': {
529
532
  value: 'Shopping cart expired',
530
533
  },
534
+ 'Short address code': {
535
+ value: 'Short address code',
536
+ },
537
+ 'Short address code is required.': {
538
+ value: 'Short address code is required.',
539
+ },
531
540
  Show: {
532
541
  value: 'Show',
533
542
  },
@@ -284,6 +284,9 @@ export const stringsChinese = {
284
284
  'Invalid session': {
285
285
  value: '无效的会话',
286
286
  },
287
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
288
+ value: '无效的短地址代码格式。必须是4个字母和4个数字。',
289
+ },
287
290
  'Invoice:': {
288
291
  value: '发票:',
289
292
  },
@@ -527,6 +530,12 @@ export const stringsChinese = {
527
530
  'Shopping cart expired': {
528
531
  value: '购物车已过期',
529
532
  },
533
+ 'Short address code': {
534
+ value: '简短地址代码',
535
+ },
536
+ 'Short address code is required.': {
537
+ value: '需要简短的地址代码。',
538
+ },
530
539
  Show: {
531
540
  value: '显示',
532
541
  },
@@ -284,6 +284,9 @@ export const stringsDanish = {
284
284
  'Invalid session': {
285
285
  value: 'Ugyldig session',
286
286
  },
287
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
288
+ value: 'Ugyldigt format for kort adressekode. Skal være 4 bogstaver og 4 tal.',
289
+ },
287
290
  'Invoice:': {
288
291
  value: 'Faktura:',
289
292
  },
@@ -527,6 +530,12 @@ export const stringsDanish = {
527
530
  'Shopping cart expired': {
528
531
  value: 'Indkøbskurv udløbet',
529
532
  },
533
+ 'Short address code': {
534
+ value: 'Kort adressekode',
535
+ },
536
+ 'Short address code is required.': {
537
+ value: 'Kort adressekode er påkrævet.',
538
+ },
530
539
  Show: {
531
540
  value: 'Vis',
532
541
  },
@@ -284,6 +284,9 @@ export const stringsDutch = {
284
284
  'Invalid session': {
285
285
  value: 'Ongeldige sessie',
286
286
  },
287
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
288
+ value: 'Ongeldig formaat van korte adrescode. Moet 4 letters en 4 cijfers bevatten.',
289
+ },
287
290
  'Invoice:': {
288
291
  value: 'Factuur:',
289
292
  },
@@ -527,6 +530,12 @@ export const stringsDutch = {
527
530
  'Shopping cart expired': {
528
531
  value: 'Winkelwagen verlopen',
529
532
  },
533
+ 'Short address code': {
534
+ value: 'Korte adrescode',
535
+ },
536
+ 'Short address code is required.': {
537
+ value: 'Korte adrescode is vereist.',
538
+ },
530
539
  Show: {
531
540
  value: 'Tonen',
532
541
  },
@@ -284,6 +284,9 @@ export const stringsFrench = {
284
284
  'Invalid session': {
285
285
  value: 'Session invalide',
286
286
  },
287
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
288
+ value: "Format de code d'adresse courte invalide. Doit être de 4 lettres et 4 chiffres.",
289
+ },
287
290
  'Invoice:': {
288
291
  value: 'Facture:',
289
292
  },
@@ -527,6 +530,12 @@ export const stringsFrench = {
527
530
  'Shopping cart expired': {
528
531
  value: 'Panier expiré',
529
532
  },
533
+ 'Short address code': {
534
+ value: "Code d'adresse court",
535
+ },
536
+ 'Short address code is required.': {
537
+ value: "Un code d'adresse court est requis.",
538
+ },
530
539
  Show: {
531
540
  value: 'Montrer',
532
541
  },
@@ -284,6 +284,9 @@ export const stringsGerman = {
284
284
  'Invalid session': {
285
285
  value: 'Ungültige Sitzung',
286
286
  },
287
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
288
+ value: 'Ungültiges Format des Kurzadresscodes. Muss aus 4 Buchstaben und 4 Zahlen bestehen.',
289
+ },
287
290
  'Invoice:': {
288
291
  value: 'Rechnung:',
289
292
  },
@@ -527,6 +530,12 @@ export const stringsGerman = {
527
530
  'Shopping cart expired': {
528
531
  value: 'Einkaufswagen abgelaufen',
529
532
  },
533
+ 'Short address code': {
534
+ value: 'Kurzer Adresscode',
535
+ },
536
+ 'Short address code is required.': {
537
+ value: 'Ein kurzer Adresscode ist erforderlich.',
538
+ },
530
539
  Show: {
531
540
  value: 'Zeigen',
532
541
  },
@@ -284,6 +284,9 @@ export const stringsHebrew = {
284
284
  'Invalid session': {
285
285
  value: 'סשן לא חוקי',
286
286
  },
287
+ 'Invalid short address code format. Must be 4 letters and 4 numbers.': {
288
+ value: 'פורמט קוד כתובת קצר לא חוקי. חייב להיות 4 אותיות ו-4 מספרים.',
289
+ },
287
290
  'Invoice:': {
288
291
  value: 'חשבונית:',
289
292
  },
@@ -527,6 +530,12 @@ export const stringsHebrew = {
527
530
  'Shopping cart expired': {
528
531
  value: 'תוקף עגלת הקניות פג',
529
532
  },
533
+ 'Short address code': {
534
+ value: 'קוד כתובת קצר',
535
+ },
536
+ 'Short address code is required.': {
537
+ value: 'נדרש קוד כתובת קצר.',
538
+ },
530
539
  Show: {
531
540
  value: 'הצג',
532
541
  },