@zonos/elements 1.3.142 → 1.3.144

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 (348) hide show
  1. package/dist/cjs/{CheckoutConfig-eaaf62a1.js → CheckoutConfig-d25d548d.js} +13 -3
  2. package/dist/cjs/TaxId-4632639d.js +29 -0
  3. package/dist/cjs/{cart-199b0751.js → cart-2398abd4.js} +547 -42
  4. package/dist/cjs/{createCustomEvent-3e982e57.js → createCustomEvent-7b6fad95.js} +0 -3
  5. package/dist/cjs/{getBorderRadius-f97c99ad.js → getBorderRadius-7d0772bf.js} +1 -1
  6. package/dist/cjs/{handleFetch-864d3c53.js → handleFetch-3673a0c2.js} +30 -1
  7. package/dist/cjs/{index-b678ce0c.js → index-2f90486e.js} +209 -157
  8. package/dist/cjs/index.cjs.js +15 -11
  9. package/dist/cjs/{isDarkColor-434d71dd.js → isDarkColor-2acf30d1.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{paypal-4f1ee604.js → paypal-7ed9dfb7.js} +4 -4
  12. package/dist/cjs/{zonos-address_7.cjs.entry.js → zonos-address_8.cjs.entry.js} +143 -10
  13. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  16. package/dist/cjs/zonos-card.cjs.entry.js +3 -3
  17. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +151 -32
  18. package/dist/cjs/zonos-checkout.cjs.entry.js +36 -16
  19. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  21. package/dist/cjs/zonos-controller.cjs.entry.js +8 -8
  22. package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
  23. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
  24. package/dist/cjs/zonos-elements.cjs.js +3 -3
  25. package/dist/cjs/{zonos-notification_3.cjs.entry.js → zonos-empty-state-payment_4.cjs.entry.js} +87 -9
  26. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +10 -10
  27. package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
  28. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  29. package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
  30. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  31. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  33. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
  35. package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
  36. package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
  37. package/dist/cjs/{zonosStore-8971eb65.js → zonosStore-46809186.js} +1 -1
  38. package/dist/collection/collection-manifest.json +3 -1
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +5 -1
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -2
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +24 -4
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +2 -0
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -0
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +34 -6
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -0
  46. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +109 -18
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateDarkIcon.svg +22 -0
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateLightIcon.svg +22 -0
  49. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.css +51 -0
  50. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +90 -0
  51. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +62 -7
  52. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
  53. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +32 -1
  54. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +4 -0
  55. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +6 -0
  56. package/dist/collection/components/common/zonos-badge/zonos-badge.js +18 -2
  57. package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -0
  58. package/dist/collection/components/common/zonos-button/zonos-button.js +30 -0
  59. package/dist/collection/components/common/zonos-card/zonos-card.js +20 -4
  60. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +14 -0
  61. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +4 -0
  62. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +4 -0
  63. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +22 -0
  64. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +4 -0
  65. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -0
  66. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -0
  67. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +26 -0
  68. package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -0
  69. package/dist/collection/components/common/zonos-input/zonos-input.js +12 -0
  70. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -0
  71. package/dist/collection/components/common/zonos-link/zonos-link.js +8 -0
  72. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -0
  73. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +6 -0
  74. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +4 -0
  75. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +11 -1
  76. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -0
  77. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +162 -0
  78. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +264 -0
  79. package/dist/collection/components/common/zonos-text/zonos-text.js +8 -0
  80. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +6 -2
  81. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +6 -2
  82. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +4 -2
  83. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +12 -4
  84. package/dist/collection/components/component-template/zonos-component/zonos-component.js +7 -1
  85. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +7 -1
  86. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +9 -3
  87. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +17 -5
  88. package/dist/collection/components/main/zonos-controller.js +7 -3
  89. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  90. package/dist/collection/components/store/checkout/cart.js +3 -0
  91. package/dist/collection/components/store/checkout/stripe.js +121 -40
  92. package/dist/collection/components/store/translationStore/strings.arabic.js +21 -0
  93. package/dist/collection/components/store/translationStore/strings.base.js +21 -0
  94. package/dist/collection/components/store/translationStore/strings.chinese.js +21 -0
  95. package/dist/collection/components/store/translationStore/strings.danish.js +21 -0
  96. package/dist/collection/components/store/translationStore/strings.dutch.js +21 -0
  97. package/dist/collection/components/store/translationStore/strings.french.js +21 -0
  98. package/dist/collection/components/store/translationStore/strings.german.js +21 -0
  99. package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -0
  100. package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -0
  101. package/dist/collection/components/store/translationStore/strings.italian.js +21 -0
  102. package/dist/collection/components/store/translationStore/strings.japanese.js +21 -0
  103. package/dist/collection/components/store/translationStore/strings.korean.js +21 -0
  104. package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -0
  105. package/dist/collection/components/store/translationStore/strings.polish.js +21 -0
  106. package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -0
  107. package/dist/collection/components/store/translationStore/strings.russian.js +21 -0
  108. package/dist/collection/components/store/translationStore/strings.spanish.js +21 -0
  109. package/dist/collection/components/store/translationStore/strings.swedish.js +21 -0
  110. package/dist/collection/components/store/translationStore/strings.turkish.js +21 -0
  111. package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -0
  112. package/dist/collection/components/stripe/zonos-address/zonos-address.js +7 -1
  113. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +84 -3
  114. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -1
  115. package/dist/collection/components/utils/api/getCheckoutSession.js +1 -1
  116. package/dist/collection/components/utils/api/placeTestOrder.js +40 -0
  117. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  118. package/dist/collection/components/utils/checkout/getIsStagingMode.js +1 -0
  119. package/dist/collection/components/utils/checkout/getIsTestMode.js +5 -1
  120. package/dist/collection/components/utils/handleFetch.js +22 -1
  121. package/dist/collection/components/utils/validateEmailValue.js +4 -0
  122. package/dist/collection/scripts/_getTempCartById.js +2 -2
  123. package/dist/collection/scripts/_getWithTestPublicCredential.js +5 -2
  124. package/dist/collection/scripts/cart/_getIsValidCartId.js +11 -0
  125. package/dist/collection/types/checkout/TaxId.js +24 -0
  126. package/dist/collection/types/checkout/api/PlaceTestOrder.js +1 -0
  127. package/dist/collection/types/generated/graphql.internal.types.js +64 -0
  128. package/dist/collection/types/index.js +2 -0
  129. package/dist/esm/{CheckoutConfig-262008fe.js → CheckoutConfig-573bd959.js} +13 -3
  130. package/dist/esm/TaxId-915ef042.js +26 -0
  131. package/dist/esm/{cart-cf87ec6f.js → cart-3427ee25.js} +547 -42
  132. package/dist/esm/{createCustomEvent-31a792d3.js → createCustomEvent-58159025.js} +1 -3
  133. package/dist/esm/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
  134. package/dist/esm/{handleFetch-badf4543.js → handleFetch-b4633675.js} +29 -2
  135. package/dist/esm/{index-986b5ff2.js → index-d82f06f2.js} +209 -157
  136. package/dist/esm/index.js +14 -12
  137. package/dist/esm/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
  138. package/dist/esm/loader.js +3 -3
  139. package/dist/esm/{paypal-b7124cc4.js → paypal-4e2f9753.js} +4 -4
  140. package/dist/esm/{zonos-address_7.entry.js → zonos-address_8.entry.js} +143 -11
  141. package/dist/esm/zonos-badge.entry.js +2 -2
  142. package/dist/esm/zonos-banner.entry.js +2 -2
  143. package/dist/esm/zonos-button_3.entry.js +4 -4
  144. package/dist/esm/zonos-card.entry.js +3 -3
  145. package/dist/esm/zonos-cart-items_13.entry.js +149 -30
  146. package/dist/esm/zonos-checkout.entry.js +34 -14
  147. package/dist/esm/zonos-collapse.entry.js +2 -2
  148. package/dist/esm/zonos-component.entry.js +2 -2
  149. package/dist/esm/zonos-controller.entry.js +8 -8
  150. package/dist/esm/zonos-country-flag.entry.js +6 -6
  151. package/dist/esm/zonos-country-select_4.entry.js +10 -10
  152. package/dist/esm/zonos-elements.js +4 -4
  153. package/dist/esm/{zonos-notification_3.entry.js → zonos-empty-state-payment_4.entry.js} +87 -10
  154. package/dist/esm/zonos-hello-dialog.entry.js +10 -10
  155. package/dist/esm/zonos-hello.entry.js +6 -6
  156. package/dist/esm/zonos-input.entry.js +3 -3
  157. package/dist/esm/zonos-language-select_2.entry.js +6 -6
  158. package/dist/esm/zonos-link.entry.js +1 -1
  159. package/dist/esm/zonos-logo.entry.js +2 -2
  160. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  161. package/dist/esm/zonos-text.entry.js +2 -2
  162. package/dist/esm/zonos-toggle.entry.js +4 -4
  163. package/dist/esm/zonos-tooltip.entry.js +3 -3
  164. package/dist/esm/zonos-v-stack.entry.js +4 -4
  165. package/dist/esm/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
  166. package/dist/esm-es5/CheckoutConfig-573bd959.js +1 -0
  167. package/dist/esm-es5/TaxId-915ef042.js +1 -0
  168. package/dist/esm-es5/cart-3427ee25.js +1 -0
  169. package/dist/esm-es5/createCustomEvent-58159025.js +1 -0
  170. package/dist/esm-es5/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
  171. package/dist/esm-es5/handleFetch-b4633675.js +1 -0
  172. package/dist/esm-es5/index-d82f06f2.js +2 -0
  173. package/dist/esm-es5/index.js +1 -1
  174. package/dist/esm-es5/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
  175. package/dist/esm-es5/loader.js +1 -1
  176. package/dist/esm-es5/{paypal-b7124cc4.js → paypal-4e2f9753.js} +1 -1
  177. package/dist/esm-es5/zonos-address_8.entry.js +1 -0
  178. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  179. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  180. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  181. package/dist/esm-es5/zonos-card.entry.js +1 -1
  182. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  183. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  184. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  185. package/dist/esm-es5/zonos-component.entry.js +1 -1
  186. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  187. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  188. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  189. package/dist/esm-es5/zonos-elements.js +1 -1
  190. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -0
  191. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  192. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  193. package/dist/esm-es5/zonos-input.entry.js +1 -1
  194. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  195. package/dist/esm-es5/zonos-link.entry.js +1 -1
  196. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  197. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  198. package/dist/esm-es5/zonos-text.entry.js +1 -1
  199. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  200. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  201. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  202. package/dist/esm-es5/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
  203. package/dist/scripts/index.d.ts +170 -0
  204. package/dist/scripts/index.js +1 -1
  205. package/dist/scripts/loadZonos.js +1 -1
  206. package/dist/scripts/zonos.js +1 -1
  207. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
  208. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +18 -0
  209. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.d.ts +13 -0
  210. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
  211. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +5 -0
  212. package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +46 -0
  213. package/dist/types/components/store/checkout/cart.d.ts +5 -0
  214. package/dist/types/components/store/checkout/stripe.d.ts +16 -2
  215. package/dist/types/components/store/translationStore/strings.arabic.d.ts +21 -0
  216. package/dist/types/components/store/translationStore/strings.base.d.ts +21 -0
  217. package/dist/types/components/store/translationStore/strings.chinese.d.ts +21 -0
  218. package/dist/types/components/store/translationStore/strings.danish.d.ts +21 -0
  219. package/dist/types/components/store/translationStore/strings.dutch.d.ts +21 -0
  220. package/dist/types/components/store/translationStore/strings.french.d.ts +21 -0
  221. package/dist/types/components/store/translationStore/strings.german.d.ts +21 -0
  222. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +21 -0
  223. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +21 -0
  224. package/dist/types/components/store/translationStore/strings.italian.d.ts +21 -0
  225. package/dist/types/components/store/translationStore/strings.japanese.d.ts +21 -0
  226. package/dist/types/components/store/translationStore/strings.korean.d.ts +21 -0
  227. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +21 -0
  228. package/dist/types/components/store/translationStore/strings.polish.d.ts +21 -0
  229. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +21 -0
  230. package/dist/types/components/store/translationStore/strings.russian.d.ts +21 -0
  231. package/dist/types/components/store/translationStore/strings.spanish.d.ts +21 -0
  232. package/dist/types/components/store/translationStore/strings.swedish.d.ts +21 -0
  233. package/dist/types/components/store/translationStore/strings.turkish.d.ts +21 -0
  234. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +21 -0
  235. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +6 -0
  236. package/dist/types/components/utils/api/placeTestOrder.d.ts +7 -0
  237. package/dist/types/components/utils/checkout/getIsStagingMode.d.ts +1 -0
  238. package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -1
  239. package/dist/types/components/utils/validateEmailValue.d.ts +1 -0
  240. package/dist/types/components.d.ts +161 -0
  241. package/dist/types/types/checkout/TaxId.d.ts +20 -0
  242. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
  243. package/dist/types/types/checkout/api/CheckoutSession.d.ts +8 -2
  244. package/dist/types/types/checkout/api/PlaceTestOrder.d.ts +7 -0
  245. package/dist/types/types/generated/graphql.internal.types.d.ts +144 -109
  246. package/dist/types/types/generated/graphql.internal.types.ts +180 -99
  247. package/dist/types/types/index.d.ts +2 -0
  248. package/dist/zonos-elements/index.esm.js +1 -1
  249. package/dist/zonos-elements/{p-68d79b58.entry.js → p-00136c20.entry.js} +1 -1
  250. package/dist/zonos-elements/{p-d381288e.entry.js → p-0028d158.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-72256333.entry.js → p-05013308.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-c1b098de.system.js → p-0e6a3cd2.system.js} +1 -1
  253. package/dist/zonos-elements/{p-c0164a3c.system.js → p-12546668.system.js} +1 -1
  254. package/dist/zonos-elements/p-12a6b7bd.system.js +1 -0
  255. package/dist/zonos-elements/p-1423ebbe.js +1 -0
  256. package/dist/zonos-elements/p-18e5b741.system.js +1 -0
  257. package/dist/zonos-elements/p-2deae669.entry.js +1 -0
  258. package/dist/zonos-elements/{p-36dfc7ac.system.js → p-32912caf.system.js} +1 -1
  259. package/dist/zonos-elements/{p-fc4658a6.entry.js → p-36f97fd9.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-983f23a1.system.entry.js → p-3a213429.system.entry.js} +1 -1
  261. package/dist/zonos-elements/{p-e6554a6f.system.entry.js → p-3aa4841a.system.entry.js} +1 -1
  262. package/dist/zonos-elements/{p-a13d5957.system.entry.js → p-3d221556.system.entry.js} +1 -1
  263. package/dist/zonos-elements/{p-381874b0.system.entry.js → p-41e26cc4.system.entry.js} +1 -1
  264. package/dist/zonos-elements/{p-2d514c1d.system.entry.js → p-463e44b6.system.entry.js} +1 -1
  265. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -0
  266. package/dist/zonos-elements/{p-6271e108.js → p-485d89a4.js} +1 -1
  267. package/dist/zonos-elements/p-48bca3d4.system.entry.js +1 -0
  268. package/dist/zonos-elements/p-4caffd96.system.js +2 -0
  269. package/dist/zonos-elements/{p-0920500d.entry.js → p-50896f89.entry.js} +1 -1
  270. package/dist/zonos-elements/{p-2e152517.system.entry.js → p-515e3606.system.entry.js} +1 -1
  271. package/dist/zonos-elements/p-5834c218.system.js +1 -0
  272. package/dist/zonos-elements/p-595f5dd2.js +1 -0
  273. package/dist/zonos-elements/p-5bd927f2.js +1 -0
  274. package/dist/zonos-elements/{p-2761ad55.system.entry.js → p-619c07c6.system.entry.js} +1 -1
  275. package/dist/zonos-elements/{p-2b8cddb7.entry.js → p-69f84611.entry.js} +1 -1
  276. package/dist/zonos-elements/{p-766dd01f.js → p-6c578d26.js} +1 -1
  277. package/dist/zonos-elements/{p-28295342.entry.js → p-709c7e9e.entry.js} +1 -1
  278. package/dist/zonos-elements/{p-0197a9bf.system.entry.js → p-7140439f.system.entry.js} +1 -1
  279. package/dist/zonos-elements/p-7302a081.system.entry.js +1 -0
  280. package/dist/zonos-elements/p-7e47f6cf.entry.js +1 -0
  281. package/dist/zonos-elements/{p-44dd4269.entry.js → p-7f288336.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-0e54432c.system.entry.js → p-81084be5.system.entry.js} +1 -1
  283. package/dist/zonos-elements/p-81a5dd5c.js +1 -0
  284. package/dist/zonos-elements/p-84e5fc0b.entry.js +1 -0
  285. package/dist/zonos-elements/{p-33e1d25e.system.entry.js → p-86e825f0.system.entry.js} +1 -1
  286. package/dist/zonos-elements/{p-0b5f4ca7.system.entry.js → p-91fc6c24.system.entry.js} +1 -1
  287. package/dist/zonos-elements/p-9951462e.entry.js +1 -0
  288. package/dist/zonos-elements/{p-a2bce31d.system.entry.js → p-9cf018c8.system.entry.js} +1 -1
  289. package/dist/zonos-elements/{p-232963d3.system.entry.js → p-9e05e259.system.entry.js} +1 -1
  290. package/dist/zonos-elements/{p-6b490b0a.system.entry.js → p-a8cf3542.system.entry.js} +1 -1
  291. package/dist/zonos-elements/p-ab68ad11.js +2 -0
  292. package/dist/zonos-elements/{p-4b685549.js → p-b0616716.js} +1 -1
  293. package/dist/zonos-elements/{p-1e3ea4ae.entry.js → p-b12fbc07.entry.js} +1 -1
  294. package/dist/zonos-elements/{p-d198421b.system.entry.js → p-b2292b70.system.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-58a09715.entry.js → p-b262b93e.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-545c05ce.entry.js → p-b288c2ed.entry.js} +1 -1
  297. package/dist/zonos-elements/p-b3882a73.system.js +1 -0
  298. package/dist/zonos-elements/{p-9306a835.entry.js → p-b5c360af.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-2cfc00b8.system.entry.js → p-b6bbdb59.system.entry.js} +1 -1
  300. package/dist/zonos-elements/{p-f295030e.system.entry.js → p-bb92882d.system.entry.js} +1 -1
  301. package/dist/zonos-elements/p-bf37ccc7.system.js +1 -0
  302. package/dist/zonos-elements/{p-21b538ea.system.js → p-c015be06.system.js} +1 -1
  303. package/dist/zonos-elements/p-c8b0bc02.system.entry.js +1 -0
  304. package/dist/zonos-elements/{p-39cac2c1.entry.js → p-cbd5d932.entry.js} +1 -1
  305. package/dist/zonos-elements/{p-7c5c0a85.entry.js → p-cdfca133.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-675f60b4.entry.js → p-d2f2c685.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-2c19f5e2.entry.js → p-d6061c79.entry.js} +1 -1
  308. package/dist/zonos-elements/p-da6a29e4.system.entry.js +1 -0
  309. package/dist/zonos-elements/{p-65069140.entry.js → p-db3f381d.entry.js} +1 -1
  310. package/dist/zonos-elements/{p-9dec2b74.entry.js → p-de221545.entry.js} +1 -1
  311. package/dist/zonos-elements/{p-2949faf3.entry.js → p-e01ccb27.entry.js} +1 -1
  312. package/dist/zonos-elements/{p-b0174a8f.js → p-e02fd9ae.js} +1 -1
  313. package/dist/zonos-elements/{p-3cf30d83.entry.js → p-e2f1fa53.entry.js} +1 -1
  314. package/dist/zonos-elements/{p-ebdd9b64.system.entry.js → p-e8c70c7d.system.entry.js} +1 -1
  315. package/dist/zonos-elements/{p-a8bd492d.system.entry.js → p-ea35b237.system.entry.js} +1 -1
  316. package/dist/zonos-elements/p-f0c8150e.js +1 -0
  317. package/dist/zonos-elements/p-f3b0a097.system.js +1 -0
  318. package/dist/zonos-elements/{p-d5a3851d.system.entry.js → p-fc4ebe6b.system.entry.js} +1 -1
  319. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  320. package/dist/zonos-elements/zonos-elements.js +1 -1
  321. package/package.json +9 -8
  322. package/dist/esm-es5/CheckoutConfig-262008fe.js +0 -1
  323. package/dist/esm-es5/cart-cf87ec6f.js +0 -1
  324. package/dist/esm-es5/createCustomEvent-31a792d3.js +0 -1
  325. package/dist/esm-es5/handleFetch-badf4543.js +0 -1
  326. package/dist/esm-es5/index-986b5ff2.js +0 -2
  327. package/dist/esm-es5/zonos-address_7.entry.js +0 -1
  328. package/dist/esm-es5/zonos-notification_3.entry.js +0 -1
  329. package/dist/zonos-elements/p-076388d3.entry.js +0 -1
  330. package/dist/zonos-elements/p-0cda2818.system.js +0 -1
  331. package/dist/zonos-elements/p-0d2cf216.entry.js +0 -1
  332. package/dist/zonos-elements/p-1460f917.js +0 -1
  333. package/dist/zonos-elements/p-272052bd.system.entry.js +0 -1
  334. package/dist/zonos-elements/p-3cb4468f.system.entry.js +0 -1
  335. package/dist/zonos-elements/p-3d82e70e.js +0 -1
  336. package/dist/zonos-elements/p-64372f93.system.js +0 -1
  337. package/dist/zonos-elements/p-673b4402.system.entry.js +0 -1
  338. package/dist/zonos-elements/p-680d3694.js +0 -2
  339. package/dist/zonos-elements/p-7b999a40.js +0 -1
  340. package/dist/zonos-elements/p-7c643376.system.js +0 -1
  341. package/dist/zonos-elements/p-866bb93e.system.js +0 -1
  342. package/dist/zonos-elements/p-8c487480.entry.js +0 -1
  343. package/dist/zonos-elements/p-9b720cf4.entry.js +0 -1
  344. package/dist/zonos-elements/p-a5b294d7.js +0 -1
  345. package/dist/zonos-elements/p-b50667b6.system.js +0 -2
  346. package/dist/zonos-elements/p-bfcfd29b.system.js +0 -1
  347. package/dist/zonos-elements/p-ded984d9.system.entry.js +0 -1
  348. package/dist/zonos-elements/p-e9964a5a.system.js +0 -1
@@ -18,9 +18,9 @@ export class ZonosHelloDialogFooter {
18
18
  const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
19
19
  // Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
20
20
  const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
21
- return (h(Host, { key: '458b65efb2fc1e6cf5f7c5588601add4af010de6', class: "zonos--elements" }, h("div", { key: 'ee8eb8cf4a3e0a5583f5fb15842a86adb443e421', class: "zonos--hello-dialog-footer", style: {
21
+ return (h(Host, { key: 'f84d021e99271bd6a00da32edd35fdc5e0520c5a', class: "zonos--elements" }, h("div", { key: 'db35a5022b1ef1a70e3cace021fcc14d6e8ea987', class: "zonos--hello-dialog-footer", style: {
22
22
  '--zonos--primary-color': primaryColor,
23
- } }, h("a", { key: 'fa6ab85dae56620a30275dd25c10011bf129545e', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '413b1d69091e5bf4ba639ea66e4930acc0636074', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: 'be2881c022690d5a6bcb9c38a50287a427f4fc32', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '79480397f8c59a435b1f9a4604441500991741a3', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'c23ae8fa589d754ca93680006d6a45af2b440db6', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
23
+ } }, h("a", { key: 'bbbc50bf395e2658239e2a1a0342122b04e43a5f', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '3c80a7ba8dd9509d45bde7de20e7689f632aedc8', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: 'add64f376e48cc71f6b5672aafe7b1ef62ab2354', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'a0a5059ad4a48b2cc3ea05696aa79ffce33b4bf2', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '2608dba553f846c5016e8395dbce079beda0aa5a', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
24
24
  }
25
25
  static get is() { return "zonos-hello-dialog-footer"; }
26
26
  static get encapsulation() { return "shadow"; }
@@ -59,7 +59,9 @@ export class ZonosHelloDialogFooter {
59
59
  "docs": {
60
60
  "tags": [],
61
61
  "text": "Appearance settings"
62
- }
62
+ },
63
+ "getter": false,
64
+ "setter": false
63
65
  },
64
66
  "setShowCountrySelect": {
65
67
  "type": "unknown",
@@ -78,6 +80,8 @@ export class ZonosHelloDialogFooter {
78
80
  }],
79
81
  "text": "Whether or not the country select dialog is open"
80
82
  },
83
+ "getter": false,
84
+ "setter": false,
81
85
  "defaultValue": "() => {}"
82
86
  },
83
87
  "setShowLanguageSelect": {
@@ -97,6 +101,8 @@ export class ZonosHelloDialogFooter {
97
101
  }],
98
102
  "text": "Whether or not the language select dialog is open"
99
103
  },
104
+ "getter": false,
105
+ "setter": false,
100
106
  "defaultValue": "() => {}"
101
107
  }
102
108
  };
@@ -232,18 +232,18 @@ export class ZonosHelloDialog {
232
232
  const defaultMessage = formatStringWithLinks(defaultMessageStr);
233
233
  const currentPage = this.getCurrentPageEnum();
234
234
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
235
- return (h(Host, { key: '25f0055cadd0b38a8374cdb0c981124d569ae9df', class: "zonos--elements" }, h("div", { key: '7c04c71c7926d0bc64499f9c124464087d19570d', class: classes([
235
+ return (h(Host, { key: '1fce2b616b062a02f97f711f674836d75ad25035', class: "zonos--elements" }, h("div", { key: 'caa338a462d1c0cde1727e5147268c782d6063f0', class: classes([
236
236
  'zonos--hello-dialog',
237
237
  animateLeft && 'zonos--hello-dialog-animate-from-left',
238
238
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
239
239
  !!this.mobileLocationOverride &&
240
240
  'zonos--hello-dialog-mobile-override',
241
241
  this.isOpen && 'zonos--hello-dialog-open',
242
- ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'b4ad9c5eb5893ecd553b1bed056810bd8d69c3ca' }, h("div", { key: 'bd442c14e751180b3dded8d415662eb456b5b5fd', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '2d0f6d48e91c1897ca6ab442e8bff7efefd76920', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: 'eb19103741ccbced87f11d800a8c9439f692fcfd', spacing: 24 }, h("zonos-country-flag", { key: '50f7375b30576d69bb751de6b6ba6565f34e83aa', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '4e5eb35029bbafa1343d4b7b911dadfa77074be0', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: 'fc62525f1442ddb2ad98b8b4f5a4e874586ffa55', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: 'b85a16aacba64bdc477102d87e76071312395128', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '9cff07928aeadaccdb5d9c906125f603281d3bb1', spacing: 8 }, this.restrictedItems.map(item => {
242
+ ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '49968ece06cddb09bf870c7fac18999d9d43ad75' }, h("div", { key: '0557a439e3676dcda4668324e0ed4701a50cb365', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'ccf16ff294f2168d1c3b3735a1b364cc71e5d392', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '7aa4d6322cf48204a4eb4aa62b2ebdaab637e96b', spacing: 24 }, h("zonos-country-flag", { key: '1152da449f95ebd8f2cc3364c2ba742ed0696b0c', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'c449283c10a1e71f1e55d7da04ae51234bb58ccf', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '2adb9745513f6f9041509d07a9584cf421a22ee9', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: 'ece4b349db2f121b2245090a04327927775162f0', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '30849c1c301eed69fe3d1db06755164d852ef547', spacing: 8 }, this.restrictedItems.map(item => {
243
243
  var _a;
244
244
  return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
245
- }), h("zonos-card", { key: 'e3a98411ec2be35dfbe3e9a2a5945851697da7ad', spacing: "12px" }, h("zonos-v-stack", { key: '09cd2bbbb94e819a272f3ef415bb9ace37111f04', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
246
- additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '87b8ee464cc4aee3c811fa302f34126b29125565', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'b1841bad3ab471b0d6f148389e08d79907ca19e6' }, h("zonos-country-select", { key: '8571131dd95b34476e2bf165ad7a369c5b45bd0c', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '0a30a4dff4b45cdd87413688381d66624f8de3aa' }, h("zonos-language-select", { key: '4ddeb41556e241dcc234d91d402014218f91281a', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
245
+ }), h("zonos-card", { key: 'fbd14cc231da833e4930a52483f40c32b1e24e2d', spacing: "12px" }, h("zonos-v-stack", { key: '75da2be8ba28555258e8ff50e78c5b1ffa2403ac', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
246
+ additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '6c15ad7d36590e1b93007e3786c0e0db191b4b8d', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'fae16c45b01ed1345d439c77267d1c80ce908598' }, h("zonos-country-select", { key: 'a6abe0661ee91ad227877ebbb5ee21253b110ea0', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '7550bec8646301a4bd5afb94b79b18b62698891b' }, h("zonos-language-select", { key: 'da2e8007ebf7e33723baaf3bdd2818334090c81c', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
247
247
  }
248
248
  static get is() { return "zonos-hello-dialog"; }
249
249
  static get encapsulation() { return "shadow"; }
@@ -274,6 +274,8 @@ export class ZonosHelloDialog {
274
274
  "tags": [],
275
275
  "text": "Whether or not the dialog is open"
276
276
  },
277
+ "getter": false,
278
+ "setter": false,
277
279
  "attribute": "is-open",
278
280
  "reflect": false,
279
281
  "defaultValue": "false"
@@ -295,6 +297,8 @@ export class ZonosHelloDialog {
295
297
  }],
296
298
  "text": "The function to set the open state"
297
299
  },
300
+ "getter": false,
301
+ "setter": false,
298
302
  "defaultValue": "() => {}"
299
303
  },
300
304
  "mobileLocationOverride": {
@@ -320,6 +324,8 @@ export class ZonosHelloDialog {
320
324
  }],
321
325
  "text": "Force mobile styling instead of media query and use the passed location value"
322
326
  },
327
+ "getter": false,
328
+ "setter": false,
323
329
  "attribute": "mobile-location-override",
324
330
  "reflect": false
325
331
  },
@@ -340,6 +346,8 @@ export class ZonosHelloDialog {
340
346
  }],
341
347
  "text": "Force left animation instead of detecting which side has more space"
342
348
  },
349
+ "getter": false,
350
+ "setter": false,
343
351
  "attribute": "animate-from-left-override",
344
352
  "reflect": false
345
353
  },
@@ -366,7 +374,9 @@ export class ZonosHelloDialog {
366
374
  "docs": {
367
375
  "tags": [],
368
376
  "text": "Override the appearance settings"
369
- }
377
+ },
378
+ "getter": false,
379
+ "setter": false
370
380
  },
371
381
  "restrictedItems": {
372
382
  "type": "unknown",
@@ -391,6 +401,8 @@ export class ZonosHelloDialog {
391
401
  }],
392
402
  "text": "Item restrictions array if any"
393
403
  },
404
+ "getter": false,
405
+ "setter": false,
394
406
  "defaultValue": "[]"
395
407
  }
396
408
  };
@@ -174,7 +174,7 @@ export class ZonosController {
174
174
  */
175
175
  async reset() {
176
176
  cartStore.checkoutSessionId = null;
177
- stripeStore.clientSecret = null;
177
+ stripeStore.clientSecret = '';
178
178
  }
179
179
  /**
180
180
  * Override the setting
@@ -206,7 +206,7 @@ export class ZonosController {
206
206
  zonosStore.organizationName = organizationName;
207
207
  }
208
208
  render() {
209
- return h(Host, { key: '7cdde4733b47d96c6539a6bd9c78f150de8a6eb4', class: "zonos--elements" });
209
+ return h(Host, { key: 'ab190aefdb7b90e03ec8f4f2da73a05c3416c776', class: "zonos--elements" });
210
210
  }
211
211
  static get is() { return "zonos-controller"; }
212
212
  static get encapsulation() { return "shadow"; }
@@ -241,7 +241,9 @@ export class ZonosController {
241
241
  "docs": {
242
242
  "tags": [],
243
243
  "text": "The zonos config object"
244
- }
244
+ },
245
+ "getter": false,
246
+ "setter": false
245
247
  },
246
248
  "zonosApiKey": {
247
249
  "type": "string",
@@ -257,6 +259,8 @@ export class ZonosController {
257
259
  "tags": [],
258
260
  "text": "The zonos api key"
259
261
  },
262
+ "getter": false,
263
+ "setter": false,
260
264
  "attribute": "zonos-api-key",
261
265
  "reflect": false
262
266
  }
@@ -41,7 +41,7 @@ export class ZonosPaypalPayment {
41
41
  void this.loadPaypal();
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: '00f9e39b2a69f5da6799301b76571fe31ad2b3db', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: '4977e93ec49ab8deca29c69072ea5fa0fc1c145b', class: "zonos--payment-paypal-container" })));
44
+ return (h(Host, { key: '7be3c38f702c8fb105c54e652774f69fbbcfd34c', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: '6845b53c2a5d1f2637f3ae9d867d2c6de48ab1b5', class: "zonos--payment-paypal-container" })));
45
45
  }
46
46
  static get is() { return "zonos-paypal-payment"; }
47
47
  static get encapsulation() { return "scoped"; }
@@ -2,6 +2,7 @@ import { createStore } from "@stencil/store";
2
2
  import { stripeStore, stripeStoreInitCheckoutSession, stripeStoreReset, stripeStoreUpdateCheckoutSession, } from "./stripe";
3
3
  import { localizationStore } from "../hello/localization";
4
4
  import { translate } from "../translationStore";
5
+ import { getIsStagingMode } from "../../utils/checkout/getIsStagingMode";
5
6
  import { log } from "../../utils/logging/log";
6
7
  import { logError } from "../../utils/logging/logError";
7
8
  const { onChange, reset, state: cartStore, } = createStore(() => ({
@@ -22,9 +23,11 @@ const { onChange, reset, state: cartStore, } = createStore(() => ({
22
23
  inventoryCheckErrorMessage: null,
23
24
  isSelectedShippingAboveDeminimis: false,
24
25
  isSelectedShippingGuarantee: false,
26
+ isStagingMode: getIsStagingMode(),
25
27
  items: [],
26
28
  landedCostData: null,
27
29
  landedCostMethod: 'DDP',
30
+ partiesData: [],
28
31
  promoCode: sessionStorage.getItem('promoCode') || '',
29
32
  // When user clicked applied button, save promocode into session storage for later use. So if session has promocode, applied button is clicked
30
33
  promoCodeApplied: !!sessionStorage.getItem('promoCode'),
@@ -1,5 +1,5 @@
1
1
  import { createStore } from "@stencil/store";
2
- import { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStorePreviousStep, cartStoreResetCartItems, cartStoreSetCheckoutSession, cartStoreUpdateSelectedShippingOption, } from "./cart";
2
+ import { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStorePreviousStep, cartStoreResetCartItems, cartStoreSetCheckoutSession, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, } from "./cart";
3
3
  import { localizationStore } from "../hello/localization";
4
4
  import { translate } from "../translationStore";
5
5
  import { zonosStore } from "../zonosStore";
@@ -10,20 +10,27 @@ import { sortServiceLevelOptionsByAmount } from "../../utils/checkout/sortServic
10
10
  import { handleFetch } from "../../utils/handleFetch";
11
11
  import { isDarkColor } from "../../utils/isDarkColor";
12
12
  import { jsonParse } from "../../utils/jsonParse";
13
- import { log } from "../../utils/logging/log";
13
+ import { allLogs, log } from "../../utils/logging/log";
14
14
  import { logError } from "../../utils/logging/logError";
15
15
  import { sendErrorLog } from "../../utils/logging/sendErrorLog";
16
16
  import { validateCheckoutSession } from "../../utils/validateCheckoutSession";
17
17
  import { addressRuleStyle } from "../../../styles/stripe/addressRuleStyle";
18
18
  import { defaultVariable } from "../../../styles/stripe/defaultVariable";
19
19
  const { onChange, reset, state: stripeStore, } = createStore(() => ({
20
- clientSecret: sessionStorage.getItem('zonos--client-secret') || null,
20
+ clientSecret: sessionStorage.getItem('zonos--client-secret') || '',
21
21
  customErrorMessage: null,
22
22
  fetchingLandedCostAbortController: null,
23
23
  hasPaymentError: false,
24
24
  isFetchingLandedCost: false,
25
25
  isFetchingSession: false,
26
26
  shouldInventoryRefund: false,
27
+ /**
28
+ * Default to skip payment intent, only create payment intent when "skipPaymentIntent" in url's query params is set "0"
29
+ * @default true
30
+ */
31
+ skipPaymentIntent: new URLSearchParams(window.location.search).get('skipPaymentIntent') === '0'
32
+ ? false
33
+ : true,
27
34
  stripe: null,
28
35
  stripeAddressElement: null,
29
36
  stripeAddressEventData: null,
@@ -42,6 +49,8 @@ const { onChange, reset, state: stripeStore, } = createStore(() => ({
42
49
  stripePaymentElement: null,
43
50
  stripePaymentEventData: null,
44
51
  stripeShippingSameAsBilling: true,
52
+ taxId: '',
53
+ taxIdUsedWhenFetchingLC: '',
45
54
  translatedAddress: {
46
55
  address: {},
47
56
  billingAddress: {},
@@ -71,7 +80,8 @@ const getStripeOptions = ({ clientSecret, overrideBorderRadius, overridePrimaryC
71
80
  colorPrimary: secondaryColor
72
81
  }),
73
82
  },
74
- clientSecret,
83
+ // Client secret can be undefined since we will load other elements that doesn't require client secret first, then load client secret and render one that requires it later
84
+ clientSecret: clientSecret || undefined,
75
85
  externalPaymentMethodTypes: [...paypalPaymentType],
76
86
  locale: localizationStore.selectedLocale,
77
87
  };
@@ -94,41 +104,39 @@ const initStripeElements = async (props) => {
94
104
  log('Skip. Stripe is not initialized');
95
105
  return;
96
106
  }
97
- if (clientSecret) {
98
- const stripeOptions = getStripeOptions({
99
- clientSecret,
100
- overrideBorderRadius: props === null || props === void 0 ? void 0 : props.overrideBorderRadius,
101
- overridePrimaryColor: props === null || props === void 0 ? void 0 : props.overridePrimaryColor,
102
- overrideSecondaryColor: props === null || props === void 0 ? void 0 : props.overrideSecondaryColor,
103
- overrideTheme: props === null || props === void 0 ? void 0 : props.overrideTheme,
104
- paypalEnabled: props === null || props === void 0 ? void 0 : props.paypalEnabled,
105
- });
106
- // compare with the previous options to see if we need to update
107
- const isSameOptions = JSON.stringify(stripeOptions) ===
108
- JSON.stringify(stripeStore.stripeElementsOptions);
109
- if (!stripeStore.stripeElements ||
110
- !stripeStore.stripeElementsForBillingAddress) {
111
- // init stripe elements if it doesn't exist
112
- stripeStore.stripeElements = (_a = stripeStore.stripe) === null || _a === void 0 ? void 0 : _a.elements(stripeOptions);
113
- // save stripe elements options for later comparison
114
- stripeStore.stripeElementsOptions = stripeOptions;
115
- log('Stripe elements initialized');
116
- // init stripe elements for billing address
117
- stripeStore.stripeElementsForBillingAddress =
118
- (_b = stripeStore.stripe) === null || _b === void 0 ? void 0 : _b.elements(stripeOptions);
119
- log('Stripe elements for billing address initialized');
120
- return;
121
- }
122
- if (!isSameOptions) {
123
- // update elements with new option if it already exists
124
- stripeStore.stripeElements.update(stripeOptions);
125
- // update elements for stripe billing address
126
- stripeStore.stripeElementsForBillingAddress.update(stripeOptions);
127
- // save stripe elements options for later comparison
128
- stripeStore.stripeElementsOptions = stripeOptions;
129
- }
107
+ const stripeOptions = getStripeOptions({
108
+ clientSecret,
109
+ overrideBorderRadius: props === null || props === void 0 ? void 0 : props.overrideBorderRadius,
110
+ overridePrimaryColor: props === null || props === void 0 ? void 0 : props.overridePrimaryColor,
111
+ overrideSecondaryColor: props === null || props === void 0 ? void 0 : props.overrideSecondaryColor,
112
+ overrideTheme: props === null || props === void 0 ? void 0 : props.overrideTheme,
113
+ paypalEnabled: props === null || props === void 0 ? void 0 : props.paypalEnabled,
114
+ });
115
+ // compare with the previous options to see if we need to update
116
+ const isSameOptions = JSON.stringify(stripeOptions) ===
117
+ JSON.stringify(stripeStore.stripeElementsOptions);
118
+ if (!stripeStore.stripeElements ||
119
+ !stripeStore.stripeElementsForBillingAddress) {
120
+ // init stripe elements if it doesn't exist
121
+ stripeStore.stripeElements = (_a = stripeStore.stripe) === null || _a === void 0 ? void 0 : _a.elements(stripeOptions);
122
+ // save stripe elements options for later comparison
123
+ stripeStore.stripeElementsOptions = stripeOptions;
130
124
  log('Stripe elements initialized');
125
+ // init stripe elements for billing address
126
+ stripeStore.stripeElementsForBillingAddress =
127
+ (_b = stripeStore.stripe) === null || _b === void 0 ? void 0 : _b.elements(stripeOptions);
128
+ log('Stripe elements for billing address initialized');
129
+ return;
130
+ }
131
+ if (!isSameOptions) {
132
+ // update elements with new option if it already exists
133
+ stripeStore.stripeElements.update(stripeOptions);
134
+ // update elements for stripe billing address
135
+ stripeStore.stripeElementsForBillingAddress.update(stripeOptions);
136
+ // save stripe elements options for later comparison
137
+ stripeStore.stripeElementsOptions = stripeOptions;
131
138
  }
139
+ log('Stripe elements initialized');
132
140
  };
133
141
  const stripeStoreReset = () => {
134
142
  // clean clientSecret so that we can start the new one.
@@ -168,9 +176,14 @@ const isPrefetchInfoOutdated = () => {
168
176
  ((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
169
177
  cartStore.subtotal;
170
178
  const isAddressOutdated = checkIsAddressOutdatedForLCPrefetch();
179
+ // Auto prefetch landed cost if tax id is updated
180
+ const isTaxIdDirty = stripeStore.taxIdUsedWhenFetchingLC !== stripeStore.taxId;
171
181
  return (
172
182
  // if landed cost data is not available, we need to fetch it
173
- !cartStore.landedCostData || isAddressOutdated || isTotalAmountChanged);
183
+ !cartStore.landedCostData ||
184
+ isAddressOutdated ||
185
+ isTotalAmountChanged ||
186
+ isTaxIdDirty);
174
187
  };
175
188
  const stripeCalculateLandedCost = async () => {
176
189
  var _a;
@@ -178,7 +191,7 @@ const stripeCalculateLandedCost = async () => {
178
191
  stripeStore.fetchingLandedCostAbortController = abortController;
179
192
  // Reset cart items to non-restricted state and restricted item list
180
193
  cartStoreResetCartItems();
181
- const { checkoutSessionWorkflow, errors, itemCreateWorkflow, landedCostCalculateWorkflow, shipmentRatingCalculateWorkflow, } = await calculateLandedCostNormalized(abortController);
194
+ const { checkoutSessionWorkflow, errors, itemCreateWorkflow, landedCostCalculateWorkflow, partyCreateWorkflow, shipmentRatingCalculateWorkflow, } = await calculateLandedCostNormalized(abortController);
182
195
  // update the error message with customized error message that rule is applying to and disabled shippment rating if there is any
183
196
  cartStore.customQuotingError =
184
197
  ((_a = errors === null || errors === void 0 ? void 0 : errors.find(error => { var _a; return ((_a = error.extensions) === null || _a === void 0 ? void 0 : _a.ruleMessageType) === 'CUSTOM'; })) === null || _a === void 0 ? void 0 : _a.message) || null;
@@ -187,6 +200,7 @@ const stripeCalculateLandedCost = async () => {
187
200
  cartStoreCheckItemRestrictions(itemCreateWorkflow);
188
201
  // reset abort controller after we are done
189
202
  stripeStore.fetchingLandedCostAbortController = null;
203
+ cartStore.partiesData = (partyCreateWorkflow === null || partyCreateWorkflow === void 0 ? void 0 : partyCreateWorkflow.filter(Boolean)) || [];
190
204
  // update cart store with landed cost info
191
205
  cartStore.landedCostData =
192
206
  (checkoutSessionWorkflow === null || checkoutSessionWorkflow === void 0 ? void 0 : checkoutSessionWorkflow.map(checkoutSession => {
@@ -250,6 +264,7 @@ const stripeStorePrefetchLandedCost = async (params) => {
250
264
  if (stripeStore.stripeLinkEventData) {
251
265
  stripeStore.stripeLinkUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeLinkEventData);
252
266
  }
267
+ stripeStore.taxIdUsedWhenFetchingLC = stripeStore.taxId;
253
268
  try {
254
269
  // Reset cart items to non-restricted state and restricted item list
255
270
  cartStoreResetCartItems();
@@ -541,9 +556,66 @@ export const getCheckoutSessionBody = () => {
541
556
  },
542
557
  ],
543
558
  presentmentCountryCode: localizationStore.selectedCountryCode,
559
+ skipPaymentIntent: stripeStore.skipPaymentIntent,
544
560
  };
545
561
  return body;
546
562
  };
563
+ const stripeStoreGetPaymentIntent = async () => {
564
+ var _a;
565
+ if (stripeStore.clientSecret) {
566
+ log('Payment intent already exists, skipping fetching payment intent');
567
+ return;
568
+ }
569
+ if (!cartStore.checkoutSessionId) {
570
+ // We want to log the error anytime we fail to create a checkout session
571
+ void sendErrorLog({
572
+ endpoint: 'Error creating payment intent',
573
+ errors: ['No checkout session id found when retrieving payment intent'],
574
+ metadata: {
575
+ allLogs,
576
+ cartId: window.Zonos.cartId,
577
+ },
578
+ });
579
+ cartStoreUpdateToErrorState({
580
+ messages: [
581
+ translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists"),
582
+ ],
583
+ title: translate('Error creating Checkout'),
584
+ });
585
+ return;
586
+ }
587
+ const { errors, json } = await handleFetch('/api/zonos-elements/create-payment-intent', {
588
+ body: {
589
+ checkoutSessionId: cartStore.checkoutSessionId,
590
+ },
591
+ method: 'POST',
592
+ });
593
+ const clientSecret = (_a = json === null || json === void 0 ? void 0 : json.checkoutSessionPaymentIntentCreate) === null || _a === void 0 ? void 0 : _a.clientSecret;
594
+ if (errors.length || !clientSecret) {
595
+ logError('Error occurs when getting payment intent', JSON.stringify(errors, null, 2));
596
+ // We want to log the error anytime we fail to create a payment intent
597
+ void sendErrorLog({
598
+ endpoint: 'Error creating payment intent',
599
+ errors: errors.map(error => error.message),
600
+ metadata: {
601
+ allLogs,
602
+ cartId: window.Zonos.cartId,
603
+ checkoutSessionId: cartStore.checkoutSessionId,
604
+ clientSecret,
605
+ },
606
+ });
607
+ cartStoreUpdateToErrorState({
608
+ messages: [
609
+ translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists"),
610
+ ],
611
+ title: translate('Error creating Checkout'),
612
+ });
613
+ return;
614
+ }
615
+ // update stripe store with updated information
616
+ stripeStore.clientSecret =
617
+ json.checkoutSessionPaymentIntentCreate.clientSecret;
618
+ };
547
619
  /**
548
620
  * Init checkout session
549
621
  * @returns {boolean} whether or not the checkout session is successfully created
@@ -576,6 +648,10 @@ const stripeStoreInitCheckoutSession = async () => {
576
648
  });
577
649
  log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
578
650
  log('done-init-checkout-session');
651
+ // get and set payment intent async except for staging mode
652
+ if (!cartStore.isStagingMode) {
653
+ void stripeStoreGetPaymentIntent();
654
+ }
579
655
  return true;
580
656
  };
581
657
  /**
@@ -611,6 +687,7 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
611
687
  },
612
688
  ],
613
689
  presentmentCountryCode,
690
+ skipPaymentIntent: stripeStore.skipPaymentIntent,
614
691
  },
615
692
  method: 'POST',
616
693
  });
@@ -618,6 +695,10 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
618
695
  logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
619
696
  return { errors, json };
620
697
  }
698
+ // get and set payment intent async except for staging mode
699
+ if (!cartStore.isStagingMode) {
700
+ void stripeStoreGetPaymentIntent();
701
+ }
621
702
  return { errors: [], json };
622
703
  };
623
704
  /**
@@ -748,4 +829,4 @@ onChange('clientSecret', clientSecret => {
748
829
  sessionStorage.removeItem('zonos--client-secret');
749
830
  }
750
831
  });
751
- export { initStripeElements, stripeCalculateLandedCost, stripeStore, stripeStoreApplyPromoCode, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStoreMessageBasedOnStatus, stripeStorePrefetchLandedCost, stripeStoreRemovePromoCode, stripeStoreReset, stripeStoreResetPromoCode, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreTranslateAddressToLatin, stripeStoreUpdateCheckoutSession, };
832
+ export { initStripeElements, stripeCalculateLandedCost, stripeStore, stripeStoreApplyPromoCode, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreGetPaymentIntent, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStoreMessageBasedOnStatus, stripeStorePrefetchLandedCost, stripeStoreRemovePromoCode, stripeStoreReset, stripeStoreResetPromoCode, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreTranslateAddressToLatin, stripeStoreUpdateCheckoutSession, };
@@ -38,6 +38,9 @@ export const stringsArabic = {
38
38
  'Billing address': {
39
39
  value: 'عنوان الفوترة',
40
40
  },
41
+ 'CPF/CNPJ number': {
42
+ value: 'رقم CPF/CNPJ',
43
+ },
41
44
  Cancel: {
42
45
  value: 'إلغاء',
43
46
  },
@@ -170,6 +173,9 @@ export const stringsArabic = {
170
173
  'No countries found': {
171
174
  value: 'لم يتم العثور على دول',
172
175
  },
176
+ 'No payment method needed for staging': {
177
+ value: 'لا حاجة لطريقة دفع للتجهيز',
178
+ },
173
179
  'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
174
180
  value: 'لم يتم اختيار تقييم الشحنة. يرجى العودة إلى خطوة "الشحن" واختيار تقييم الشحنة للمتابعة.',
175
181
  },
@@ -221,9 +227,15 @@ export const stringsArabic = {
221
227
  "Payment processing. We'll update you when payment is received.": {
222
228
  value: 'جارٍ معالجة الدفع. سنحدثك عند استلام الدفعة.',
223
229
  },
230
+ 'Personal Customers Clearance Code': {
231
+ value: 'رمز تخليص العملاء الشخصيين',
232
+ },
224
233
  'Phone number': {
225
234
  value: 'رقم الهاتف',
226
235
  },
236
+ 'Place test order': {
237
+ value: 'إجراء طلب اختبار',
238
+ },
227
239
  'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
228
240
  value: 'يرجى التأكد من أن نصك يستخدم الأبجدية اللاتينية فقط (A-Z, a-z).',
229
241
  },
@@ -266,6 +278,9 @@ export const stringsArabic = {
266
278
  Quantity: {
267
279
  value: 'الكمية',
268
280
  },
281
+ 'RFC number': {
282
+ value: 'رقم RFC',
283
+ },
269
284
  Reload: {
270
285
  value: 'إعادة تحميل',
271
286
  },
@@ -323,6 +338,9 @@ export const stringsArabic = {
323
338
  'Spend [threshold] tax free.': {
324
339
  value: 'أنفق [threshold] بدون ضرائب.',
325
340
  },
341
+ 'Staging mode': {
342
+ value: 'وضع التدريج',
343
+ },
326
344
  State: {
327
345
  value: 'ولاية',
328
346
  },
@@ -371,6 +389,9 @@ export const stringsArabic = {
371
389
  'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
372
390
  value: 'غير قادر على استرداد جلسة الدفع في الوقت الحالي. يرجى المحاولة مرة أخرى أو الاتصال بفريق الدعم لدينا.',
373
391
  },
392
+ 'Unique Labor Identification Code': {
393
+ value: 'رمز التعريف الفريد للعمل',
394
+ },
374
395
  'Update address': {
375
396
  value: 'تحديث العنوان',
376
397
  },
@@ -38,6 +38,9 @@ export const stringsBase = {
38
38
  'Billing address': {
39
39
  value: 'Billing address',
40
40
  },
41
+ 'CPF/CNPJ number': {
42
+ value: 'CPF/CNPJ number',
43
+ },
41
44
  Cancel: {
42
45
  value: 'Cancel',
43
46
  },
@@ -170,6 +173,9 @@ export const stringsBase = {
170
173
  'No countries found': {
171
174
  value: 'No countries found',
172
175
  },
176
+ 'No payment method needed for staging': {
177
+ value: 'No payment method needed for staging',
178
+ },
173
179
  'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
174
180
  value: 'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.',
175
181
  },
@@ -221,9 +227,15 @@ export const stringsBase = {
221
227
  "Payment processing. We'll update you when payment is received.": {
222
228
  value: "Payment processing. We'll update you when payment is received.",
223
229
  },
230
+ 'Personal Customers Clearance Code': {
231
+ value: 'Personal Customers Clearance Code',
232
+ },
224
233
  'Phone number': {
225
234
  value: 'Phone number',
226
235
  },
236
+ 'Place test order': {
237
+ value: 'Place test order',
238
+ },
227
239
  'Please ensure your text uses the Latin alphabet only (A-Z, a-z).': {
228
240
  value: 'Please ensure your text uses the Latin alphabet only (A-Z, a-z).',
229
241
  },
@@ -266,6 +278,9 @@ export const stringsBase = {
266
278
  Quantity: {
267
279
  value: 'Quantity',
268
280
  },
281
+ 'RFC number': {
282
+ value: 'RFC number',
283
+ },
269
284
  Reload: {
270
285
  value: 'Reload',
271
286
  },
@@ -323,6 +338,9 @@ export const stringsBase = {
323
338
  'Spend [threshold] tax free.': {
324
339
  value: 'Spend [threshold] tax free.',
325
340
  },
341
+ 'Staging mode': {
342
+ value: 'Staging mode',
343
+ },
326
344
  State: {
327
345
  value: 'State',
328
346
  },
@@ -371,6 +389,9 @@ export const stringsBase = {
371
389
  'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
372
390
  value: 'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.',
373
391
  },
392
+ 'Unique Labor Identification Code': {
393
+ value: 'Unique Labor Identification Code',
394
+ },
374
395
  'Update address': {
375
396
  value: 'Update address',
376
397
  },