@zonos/elements 1.3.218 → 1.3.219

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 (397) hide show
  1. package/dist/cjs/buildCartItemsByTempCart-309fcebf.js +28 -0
  2. package/dist/cjs/{cart-c54d05ce.js → cart-9a2b32e4.js} +90 -47
  3. package/dist/cjs/cleanHtmlMarkdown-577d0a77.js +999 -0
  4. package/dist/cjs/index.cjs.js +19 -9
  5. package/dist/cjs/isCollectMobileTablet-7e57fd90.js +172 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/localization-b12edb2a.js +738 -0
  8. package/dist/cjs/{paypal-d36b5dd1.js → paypal-e80871d0.js} +12 -8
  9. package/dist/cjs/placeTestOrder-8222fe95.js +93 -0
  10. package/dist/cjs/{localization-ab7e1902.js → translationStore-20a6d8bf.js} +963 -734
  11. package/dist/cjs/zonos-address_11.cjs.entry.js +102 -72
  12. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  13. package/dist/cjs/{zonos-banner.cjs.entry.js → zonos-banner_2.cjs.entry.js} +40 -0
  14. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  15. package/dist/cjs/{zonos-cart-items_14.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +73 -1292
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +25 -48
  17. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +92 -0
  19. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +810 -0
  20. package/dist/cjs/zonos-collect.cjs.entry.js +468 -0
  21. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +168 -0
  23. package/dist/cjs/zonos-controller.cjs.entry.js +84 -28
  24. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -1
  25. package/dist/cjs/zonos-country-select_4.cjs.entry.js +11 -10
  26. package/dist/cjs/zonos-elements.cjs.js +1 -1
  27. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +15 -5
  28. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +34 -33
  29. package/dist/cjs/zonos-hello.cjs.entry.js +8 -7
  30. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  31. package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -5
  32. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  33. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-stripe-input.cjs.entry.js +8 -5
  35. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  36. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  37. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  38. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  39. package/dist/collection/collection-manifest.json +10 -0
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +3 -0
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -1
  43. package/dist/collection/components/checkout/zonos-collect/assets/ChevronDownIcon.svg +1 -0
  44. package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/assets/empty-item.jpeg +0 -0
  45. package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.css +60 -0
  46. package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +39 -0
  47. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/assets/RemoveIcon.svg +1 -0
  48. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/assets/SuccessIcon.svg +1 -0
  49. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.css +84 -0
  50. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +403 -0
  51. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/chevronDownIcon.svg +1 -0
  52. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/globe.svg +3 -0
  53. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosIconDark.svg +10 -0
  54. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosIconLight.svg +10 -0
  55. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosWordmark.svg +7 -0
  56. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.css +152 -0
  57. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +164 -0
  58. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/assets/ChevronDownIcon.svg +1 -0
  59. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/assets/ChevronUpIcon.svg +1 -0
  60. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.css +109 -0
  61. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +194 -0
  62. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/assets/CheckmarkLineIcon.svg +1 -0
  63. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/assets/RemoveLineIcon.svg +1 -0
  64. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +98 -0
  65. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +369 -0
  66. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.css +68 -0
  67. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +151 -0
  68. package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.css +78 -0
  69. package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +115 -0
  70. package/dist/collection/components/checkout/zonos-collect/zonos-collect.css +349 -0
  71. package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +547 -0
  72. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  73. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  74. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  75. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  76. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  77. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  78. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  79. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  80. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  81. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  82. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.css +38 -0
  83. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +63 -0
  84. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  85. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  86. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  87. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  88. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  89. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  90. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  91. package/dist/collection/components/common/zonos-skeleton/assets/RemoveLineIcon.svg +3 -0
  92. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.css +40 -0
  93. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +102 -0
  94. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +8 -5
  95. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  96. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  97. package/dist/collection/components/common/zonos-text/zonos-text.css +1 -0
  98. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  99. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  100. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  101. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  102. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  103. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  104. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  105. package/dist/collection/components/main/zonos-controller.js +91 -25
  106. package/dist/collection/components/paypal/zonos-paypal-payment.js +13 -2
  107. package/dist/collection/components/store/checkout/cart.js +36 -15
  108. package/dist/collection/components/store/checkout/collect.js +157 -0
  109. package/dist/collection/components/store/checkout/paypal.js +4 -2
  110. package/dist/collection/components/store/checkout/stripe.js +31 -12
  111. package/dist/collection/components/store/translationStore/strings.arabic.js +48 -0
  112. package/dist/collection/components/store/translationStore/strings.base.js +48 -0
  113. package/dist/collection/components/store/translationStore/strings.chinese.js +48 -0
  114. package/dist/collection/components/store/translationStore/strings.danish.js +48 -0
  115. package/dist/collection/components/store/translationStore/strings.dutch.js +48 -0
  116. package/dist/collection/components/store/translationStore/strings.french.js +48 -0
  117. package/dist/collection/components/store/translationStore/strings.german.js +48 -0
  118. package/dist/collection/components/store/translationStore/strings.hebrew.js +48 -0
  119. package/dist/collection/components/store/translationStore/strings.indonesian.js +48 -0
  120. package/dist/collection/components/store/translationStore/strings.italian.js +48 -0
  121. package/dist/collection/components/store/translationStore/strings.japanese.js +48 -0
  122. package/dist/collection/components/store/translationStore/strings.korean.js +48 -0
  123. package/dist/collection/components/store/translationStore/strings.norwegian.js +48 -0
  124. package/dist/collection/components/store/translationStore/strings.polish.js +48 -0
  125. package/dist/collection/components/store/translationStore/strings.portuguese.js +48 -0
  126. package/dist/collection/components/store/translationStore/strings.russian.js +48 -0
  127. package/dist/collection/components/store/translationStore/strings.spanish.js +48 -0
  128. package/dist/collection/components/store/translationStore/strings.swedish.js +48 -0
  129. package/dist/collection/components/store/translationStore/strings.turkish.js +48 -0
  130. package/dist/collection/components/store/translationStore/strings.vietnamese.js +48 -0
  131. package/dist/collection/components/store/translationStore.js +2 -1
  132. package/dist/collection/components/stripe/zonos-address/zonos-address.js +35 -18
  133. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  134. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  135. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +15 -2
  136. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  137. package/dist/collection/components/utils/checkout/initCollect.js +15 -0
  138. package/dist/collection/components/utils/checkout/isCollectMobileTablet.js +10 -0
  139. package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -1
  140. package/dist/collection/components/utils/renderFallback.js +7 -0
  141. package/dist/collection/scripts/_getZonosQaUrl.js +5 -1
  142. package/dist/collection/scripts/_zonosBase.js +7 -1
  143. package/dist/collection/types/checkout/api/PartyInfo.js +1 -0
  144. package/dist/collection/types/generated/graphql.internal.types.js +103 -0
  145. package/dist/collection/types/index.js +1 -0
  146. package/dist/esm/buildCartItemsByTempCart-c4488f73.js +26 -0
  147. package/dist/esm/{cart-bb0ee971.js → cart-acf4ebf5.js} +68 -27
  148. package/dist/esm/cleanHtmlMarkdown-b5b18743.js +997 -0
  149. package/dist/esm/index.js +19 -9
  150. package/dist/esm/isCollectMobileTablet-b72b81c5.js +165 -0
  151. package/dist/esm/loader.js +1 -1
  152. package/dist/esm/localization-8646f526.js +719 -0
  153. package/dist/esm/{paypal-bd4520eb.js → paypal-2fa930eb.js} +7 -4
  154. package/dist/esm/placeTestOrder-d1ad9cf6.js +90 -0
  155. package/dist/esm/{localization-d8326254.js → translationStore-c9743292.js} +963 -718
  156. package/dist/esm/zonos-address_11.entry.js +71 -41
  157. package/dist/esm/zonos-badge.entry.js +3 -3
  158. package/dist/esm/{zonos-banner.entry.js → zonos-banner_2.entry.js} +40 -1
  159. package/dist/esm/zonos-button_3.entry.js +3 -3
  160. package/dist/esm/{zonos-cart-items_14.entry.js → zonos-cart-items_12.entry.js} +23 -1240
  161. package/dist/esm/zonos-checkout.entry.js +6 -29
  162. package/dist/esm/zonos-collapse.entry.js +2 -2
  163. package/dist/esm/zonos-collect-cart-items_3.entry.js +86 -0
  164. package/dist/esm/zonos-collect-finish_6.entry.js +801 -0
  165. package/dist/esm/zonos-collect.entry.js +464 -0
  166. package/dist/esm/zonos-component.entry.js +1 -1
  167. package/dist/esm/zonos-confirm-dialog_2.entry.js +163 -0
  168. package/dist/esm/zonos-controller.entry.js +84 -28
  169. package/dist/esm/zonos-country-flag.entry.js +2 -1
  170. package/dist/esm/zonos-country-select_4.entry.js +11 -10
  171. package/dist/esm/zonos-elements.js +1 -1
  172. package/dist/esm/zonos-empty-state-payment_4.entry.js +15 -5
  173. package/dist/esm/zonos-hello-dialog.entry.js +6 -5
  174. package/dist/esm/zonos-hello.entry.js +2 -1
  175. package/dist/esm/zonos-input.entry.js +4 -4
  176. package/dist/esm/zonos-language-select_2.entry.js +6 -5
  177. package/dist/esm/zonos-link.entry.js +1 -1
  178. package/dist/esm/zonos-logo.entry.js +2 -2
  179. package/dist/esm/zonos-stripe-input.entry.js +9 -6
  180. package/dist/esm/zonos-text.entry.js +1 -1
  181. package/dist/esm/zonos-toggle.entry.js +2 -2
  182. package/dist/esm/zonos-tooltip.entry.js +2 -2
  183. package/dist/esm/zonos-v-stack.entry.js +2 -2
  184. package/dist/esm-es5/buildCartItemsByTempCart-c4488f73.js +1 -0
  185. package/dist/esm-es5/cart-acf4ebf5.js +1 -0
  186. package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +1 -0
  187. package/dist/esm-es5/index.js +1 -1
  188. package/dist/esm-es5/isCollectMobileTablet-b72b81c5.js +1 -0
  189. package/dist/esm-es5/loader.js +1 -1
  190. package/dist/esm-es5/localization-8646f526.js +1 -0
  191. package/dist/esm-es5/paypal-2fa930eb.js +17 -0
  192. package/dist/esm-es5/placeTestOrder-d1ad9cf6.js +1 -0
  193. package/dist/esm-es5/translationStore-c9743292.js +1 -0
  194. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  195. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  196. package/dist/esm-es5/zonos-banner_2.entry.js +1 -0
  197. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  198. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
  199. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  200. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  201. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -0
  202. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -0
  203. package/dist/esm-es5/zonos-collect.entry.js +1 -0
  204. package/dist/esm-es5/zonos-component.entry.js +1 -1
  205. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -0
  206. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  207. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  208. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  209. package/dist/esm-es5/zonos-elements.js +1 -1
  210. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  211. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  212. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  213. package/dist/esm-es5/zonos-input.entry.js +1 -1
  214. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  215. package/dist/esm-es5/zonos-link.entry.js +1 -1
  216. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  217. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  218. package/dist/esm-es5/zonos-text.entry.js +1 -1
  219. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  220. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  221. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  222. package/dist/scripts/index.d.ts +470 -3
  223. package/dist/scripts/index.js +1 -1
  224. package/dist/scripts/loadZonos.js +1 -1
  225. package/dist/scripts/zonos.js +1 -1
  226. package/dist/types/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.d.ts +4 -0
  227. package/dist/types/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.d.ts +49 -0
  228. package/dist/types/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.d.ts +25 -0
  229. package/dist/types/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.d.ts +29 -0
  230. package/dist/types/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.d.ts +62 -0
  231. package/dist/types/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.d.ts +22 -0
  232. package/dist/types/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.d.ts +10 -0
  233. package/dist/types/components/checkout/zonos-collect/zonos-collect.d.ts +86 -0
  234. package/dist/types/components/common/zonos-h-stack/zonos-h-stack.d.ts +9 -0
  235. package/dist/types/components/common/zonos-skeleton/zonos-skeleton.d.ts +17 -0
  236. package/dist/types/components/main/zonos-controller.d.ts +5 -0
  237. package/dist/types/components/paypal/zonos-paypal-payment.d.ts +3 -0
  238. package/dist/types/components/store/checkout/cart.d.ts +23 -3
  239. package/dist/types/components/store/checkout/collect.d.ts +21 -0
  240. package/dist/types/components/store/checkout/paypal.d.ts +4 -3
  241. package/dist/types/components/store/checkout/stripe.d.ts +6 -2
  242. package/dist/types/components/store/translationStore/strings.arabic.d.ts +48 -0
  243. package/dist/types/components/store/translationStore/strings.base.d.ts +48 -0
  244. package/dist/types/components/store/translationStore/strings.chinese.d.ts +48 -0
  245. package/dist/types/components/store/translationStore/strings.danish.d.ts +48 -0
  246. package/dist/types/components/store/translationStore/strings.dutch.d.ts +48 -0
  247. package/dist/types/components/store/translationStore/strings.french.d.ts +48 -0
  248. package/dist/types/components/store/translationStore/strings.german.d.ts +48 -0
  249. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +48 -0
  250. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +48 -0
  251. package/dist/types/components/store/translationStore/strings.italian.d.ts +48 -0
  252. package/dist/types/components/store/translationStore/strings.japanese.d.ts +48 -0
  253. package/dist/types/components/store/translationStore/strings.korean.d.ts +48 -0
  254. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +48 -0
  255. package/dist/types/components/store/translationStore/strings.polish.d.ts +48 -0
  256. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +48 -0
  257. package/dist/types/components/store/translationStore/strings.russian.d.ts +48 -0
  258. package/dist/types/components/store/translationStore/strings.spanish.d.ts +48 -0
  259. package/dist/types/components/store/translationStore/strings.swedish.d.ts +48 -0
  260. package/dist/types/components/store/translationStore/strings.turkish.d.ts +48 -0
  261. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +48 -0
  262. package/dist/types/components/store/translationStore.d.ts +2 -1
  263. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +1 -2
  264. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +2 -0
  265. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  266. package/dist/types/components/utils/checkout/initCollect.d.ts +1 -0
  267. package/dist/types/components/utils/checkout/isCollectMobileTablet.d.ts +4 -0
  268. package/dist/types/components/utils/renderFallback.d.ts +6 -0
  269. package/dist/types/components.d.ts +401 -2
  270. package/dist/types/scripts/_zonosBase.d.ts +5 -0
  271. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
  272. package/dist/types/types/checkout/api/CheckoutSession.d.ts +9 -1
  273. package/dist/types/types/checkout/api/CreateParty.d.ts +24 -0
  274. package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +6 -1
  275. package/dist/types/types/checkout/api/PartyInfo.d.ts +24 -0
  276. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  277. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  278. package/dist/types/types/generated/graphql.internal.types.d.ts +431 -9
  279. package/dist/types/types/generated/graphql.internal.types.ts +428 -10
  280. package/dist/types/types/index.d.ts +1 -0
  281. package/dist/zonos-elements/index.esm.js +1 -1
  282. package/dist/zonos-elements/{p-288761b1.system.entry.js → p-009c3ac5.system.entry.js} +1 -1
  283. package/dist/zonos-elements/{p-c7d5d45d.entry.js → p-03980f76.entry.js} +1 -1
  284. package/dist/zonos-elements/p-07bea979.system.js +1 -0
  285. package/dist/zonos-elements/p-0cec2dd2.system.entry.js +1 -0
  286. package/dist/zonos-elements/p-0d6c6a38.entry.js +1 -0
  287. package/dist/zonos-elements/p-0ef2a242.js +1 -0
  288. package/dist/zonos-elements/p-106ae0f1.entry.js +1 -0
  289. package/dist/zonos-elements/p-10797d2b.system.entry.js +1 -0
  290. package/dist/zonos-elements/p-195b33b6.system.entry.js +1 -0
  291. package/dist/zonos-elements/p-1fe5d4da.system.entry.js +1 -0
  292. package/dist/zonos-elements/{p-da4c01da.system.entry.js → p-2323ff0f.system.entry.js} +1 -1
  293. package/dist/zonos-elements/p-23293a0b.entry.js +1 -0
  294. package/dist/zonos-elements/{p-62813488.entry.js → p-23735db6.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-ebaaaee9.entry.js → p-26573347.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-e640e8b8.entry.js → p-29499a5f.entry.js} +1 -1
  297. package/dist/zonos-elements/p-29c80a34.js +1 -0
  298. package/dist/zonos-elements/{p-edc77ea1.entry.js → p-2a9681b4.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-3f31901f.entry.js → p-2c9381be.entry.js} +1 -1
  300. package/dist/zonos-elements/p-2cc031b3.js +17 -0
  301. package/dist/zonos-elements/{p-7ab62a26.system.entry.js → p-34a37ce7.system.entry.js} +1 -1
  302. package/dist/zonos-elements/p-3c9714a8.system.entry.js +1 -0
  303. package/dist/zonos-elements/p-485416ec.js +1 -0
  304. package/dist/zonos-elements/p-56ee6d4b.system.entry.js +1 -0
  305. package/dist/zonos-elements/p-58afbe2b.entry.js +1 -0
  306. package/dist/zonos-elements/p-5e372fb9.entry.js +1 -0
  307. package/dist/zonos-elements/p-5ff4f9df.system.js +1 -0
  308. package/dist/zonos-elements/{p-92cc26b7.system.entry.js → p-60c61982.system.entry.js} +1 -1
  309. package/dist/zonos-elements/p-61c2c336.entry.js +1 -0
  310. package/dist/zonos-elements/p-6696617a.system.entry.js +1 -0
  311. package/dist/zonos-elements/p-6761091e.entry.js +1 -0
  312. package/dist/zonos-elements/p-6761286d.js +1 -0
  313. package/dist/zonos-elements/p-69451a50.system.js +1 -0
  314. package/dist/zonos-elements/p-69fd1b88.js +1 -0
  315. package/dist/zonos-elements/p-6dd63754.system.js +1 -0
  316. package/dist/zonos-elements/p-6e8aae27.system.entry.js +1 -0
  317. package/dist/zonos-elements/{p-1c45cd15.entry.js → p-70b81bbc.entry.js} +1 -1
  318. package/dist/zonos-elements/{p-eeb01de6.system.entry.js → p-750b7f32.system.entry.js} +1 -1
  319. package/dist/zonos-elements/p-772ac0b7.js +1 -0
  320. package/dist/zonos-elements/p-81b357f7.system.js +1 -1
  321. package/dist/zonos-elements/p-81e23f30.system.js +1 -0
  322. package/dist/zonos-elements/p-873b698a.entry.js +1 -0
  323. package/dist/zonos-elements/p-87e2a777.entry.js +1 -0
  324. package/dist/zonos-elements/p-8ca25e6c.entry.js +1 -0
  325. package/dist/zonos-elements/p-909d36bf.entry.js +1 -0
  326. package/dist/zonos-elements/p-95461a1b.system.entry.js +1 -0
  327. package/dist/zonos-elements/p-986ebccc.js +1 -0
  328. package/dist/zonos-elements/p-9c0b78bf.system.entry.js +1 -0
  329. package/dist/zonos-elements/p-a61a9b65.system.entry.js +1 -0
  330. package/dist/zonos-elements/p-a7204d41.entry.js +1 -0
  331. package/dist/zonos-elements/p-aca272ea.entry.js +1 -0
  332. package/dist/zonos-elements/p-b12ec9f2.system.entry.js +1 -0
  333. package/dist/zonos-elements/p-b1bd9fe7.system.entry.js +1 -0
  334. package/dist/zonos-elements/p-b2ae8eb7.system.js +1 -0
  335. package/dist/zonos-elements/{p-77666360.entry.js → p-b5406d26.entry.js} +1 -1
  336. package/dist/zonos-elements/p-bfbc081f.entry.js +1 -0
  337. package/dist/zonos-elements/p-c0a54cf6.system.js +1 -0
  338. package/dist/zonos-elements/p-c3c9b089.entry.js +1 -0
  339. package/dist/zonos-elements/p-c8784a01.system.entry.js +1 -0
  340. package/dist/zonos-elements/{p-7b5de646.entry.js → p-d045e2e5.entry.js} +1 -1
  341. package/dist/zonos-elements/p-d26cffba.entry.js +1 -0
  342. package/dist/zonos-elements/{p-544c173a.system.entry.js → p-d351ece6.system.entry.js} +1 -1
  343. package/dist/zonos-elements/p-d63696ac.system.js +17 -0
  344. package/dist/zonos-elements/p-ddb29c2a.system.entry.js +1 -0
  345. package/dist/zonos-elements/{p-d6fa2dc2.entry.js → p-dfb92907.entry.js} +1 -1
  346. package/dist/zonos-elements/{p-714c28b1.system.entry.js → p-e2a45188.system.entry.js} +1 -1
  347. package/dist/zonos-elements/{p-1ac8bfbb.system.entry.js → p-e455f060.system.entry.js} +1 -1
  348. package/dist/zonos-elements/p-eb54ece4.system.entry.js +1 -0
  349. package/dist/zonos-elements/{p-a98b1e8d.entry.js → p-efa6203f.entry.js} +1 -1
  350. package/dist/zonos-elements/{p-59eaebe3.system.entry.js → p-f0be0ca9.system.entry.js} +1 -1
  351. package/dist/zonos-elements/p-f129a83b.system.entry.js +1 -0
  352. package/dist/zonos-elements/p-f17fde5f.system.js +1 -0
  353. package/dist/zonos-elements/{p-47ffacd8.system.entry.js → p-f74a6b78.system.entry.js} +1 -1
  354. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  355. package/package.json +1 -1
  356. package/dist/cjs/zonos-card.cjs.entry.js +0 -49
  357. package/dist/esm/zonos-card.entry.js +0 -45
  358. package/dist/esm-es5/cart-bb0ee971.js +0 -1
  359. package/dist/esm-es5/localization-d8326254.js +0 -1
  360. package/dist/esm-es5/paypal-bd4520eb.js +0 -17
  361. package/dist/esm-es5/zonos-banner.entry.js +0 -1
  362. package/dist/esm-es5/zonos-card.entry.js +0 -1
  363. package/dist/esm-es5/zonos-cart-items_14.entry.js +0 -1
  364. package/dist/zonos-elements/p-043f57e8.system.entry.js +0 -1
  365. package/dist/zonos-elements/p-0631d2b9.js +0 -1
  366. package/dist/zonos-elements/p-0a6ac265.system.js +0 -1
  367. package/dist/zonos-elements/p-0f041dc5.system.entry.js +0 -1
  368. package/dist/zonos-elements/p-1432a217.system.entry.js +0 -1
  369. package/dist/zonos-elements/p-1b51b738.system.entry.js +0 -1
  370. package/dist/zonos-elements/p-3a1513ae.system.entry.js +0 -1
  371. package/dist/zonos-elements/p-3b8d11dd.entry.js +0 -1
  372. package/dist/zonos-elements/p-4333afcb.entry.js +0 -1
  373. package/dist/zonos-elements/p-4d0d89da.system.entry.js +0 -1
  374. package/dist/zonos-elements/p-5dd9cb44.system.entry.js +0 -1
  375. package/dist/zonos-elements/p-605a21ac.entry.js +0 -1
  376. package/dist/zonos-elements/p-674981ad.system.js +0 -1
  377. package/dist/zonos-elements/p-6d090b53.entry.js +0 -1
  378. package/dist/zonos-elements/p-73c8c551.system.entry.js +0 -1
  379. package/dist/zonos-elements/p-795d223d.entry.js +0 -1
  380. package/dist/zonos-elements/p-8218ff62.system.entry.js +0 -1
  381. package/dist/zonos-elements/p-82f80c8a.entry.js +0 -1
  382. package/dist/zonos-elements/p-88f7256d.js +0 -1
  383. package/dist/zonos-elements/p-8b083884.entry.js +0 -1
  384. package/dist/zonos-elements/p-a449940d.entry.js +0 -1
  385. package/dist/zonos-elements/p-a5a4ad2f.entry.js +0 -1
  386. package/dist/zonos-elements/p-a5d45585.system.entry.js +0 -1
  387. package/dist/zonos-elements/p-a751e819.system.entry.js +0 -1
  388. package/dist/zonos-elements/p-ad556be6.entry.js +0 -1
  389. package/dist/zonos-elements/p-b4792af0.entry.js +0 -1
  390. package/dist/zonos-elements/p-b9ff6458.entry.js +0 -1
  391. package/dist/zonos-elements/p-d3dbae8c.system.js +0 -1
  392. package/dist/zonos-elements/p-d55aec11.system.entry.js +0 -1
  393. package/dist/zonos-elements/p-ebb9b902.system.js +0 -17
  394. package/dist/zonos-elements/p-ef1ce617.system.entry.js +0 -1
  395. package/dist/zonos-elements/p-ef75da6f.js +0 -17
  396. package/dist/zonos-elements/p-f3dbe934.entry.js +0 -1
  397. package/dist/zonos-elements/p-f741407e.system.entry.js +0 -1
@@ -105,14 +105,14 @@ export class ZonosStripeSelect {
105
105
  const fontSize = zonosStore.appearance.fontSizeInputValue || 16;
106
106
  const hasContent = this.internalValue || this.selectPlaceholder;
107
107
  const showClearButton = this.isClearable && this.internalValue && !this.isDisabled;
108
- return (h(Host, { key: '18d7ba03b9136af8614874b13b9ac3ce85f7c0d0', class: classes([
108
+ return (h(Host, { key: 'bbc6df8df4a9cce0ad94cc48a99cba74ac116873', class: classes([
109
109
  'zonos--select zonos--elements',
110
110
  isDark && 'dark',
111
111
  this.isError && 'has-error',
112
- ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: '88b8d885c11bc0776bd0c25b5f0a08f91cfb7c72', class: classes([
112
+ ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: '757ff4b0b9be9206d03a917a07cc2af6f43152f5', class: classes([
113
113
  'zonos--label-wrapper',
114
114
  this.isDisabled && 'disabled',
115
- ]) }, h("select", Object.assign({ key: 'd972a6a7b91bb51f2d5ed291a686d521c1bf82a3' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
115
+ ]) }, h("select", Object.assign({ key: '1a6cc4dcb3bc97879fb6a78c8323c9d32c0bac6d' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
116
116
  'zonos--floated-select',
117
117
  !!this.selectLabel && 'has-label',
118
118
  hasContent && 'has-content',
@@ -122,9 +122,9 @@ export class ZonosStripeSelect {
122
122
  this.selectChange.emit(select.value);
123
123
  this.selectedValue = select.value;
124
124
  this.el.dispatchEvent(new Event('change'));
125
- }, required: this.required }), h("option", { key: 'b67730b2c3e77ba60221320519f55e67d7d2b127', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || translate('Select')), this.internalOptions.map(option => (h("option", { key: option.value, selected: this.internalValue === option.value ||
125
+ }, required: this.required }), h("option", { key: '1f19c659824019af0a922c8f2ccde33364e0d566', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || translate('Select')), this.internalOptions.map(option => (h("option", { key: option.value, selected: this.internalValue === option.value ||
126
126
  // Sometimes google returns the label not the code for some countries
127
- this.internalValue === option.label, value: option.value }, option.label)))), h("div", { key: '088c104006e983b5ec1680067af32c0479dde13b', class: "zonos--floated-label" }, h("label", { key: 'faf3bf337253d205265b181d65d8f8024ffd6124', htmlFor: this.selectId }, this.selectLabel)), h("div", { key: '7ce8d36b84b08df139877cd2e12a26b8157ce83b', class: "zonos--actions-wrapper" }, showClearButton && (h("button", { key: 'b0a1af08afd9792ba4e7989361219c5cf7d5d8bc', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, h("zonos-icon", { key: '50ae86d5e9d9722b5546997f9fd52a997cac3add', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), h("zonos-icon", { key: '30034030f97f7ed6b3027cbc5220c73cde4bbbc2', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (h("zonos-text", { key: 'cd02da8b1a1cb81581ac7285af84193000692eaa', textColor: "red-600" }, this.error))));
127
+ this.internalValue === option.label, value: option.value }, option.label)))), h("div", { key: '88d5729ef8d458d4a925eecb691fafaeaca51dff', class: "zonos--floated-label" }, h("label", { key: '9c8a9f0777649765a725a275c24385742017ea9d', htmlFor: this.selectId }, this.selectLabel)), h("div", { key: 'cfbf4de8d163b8151a3715847c0de73cb44a3104', class: "zonos--actions-wrapper" }, showClearButton && (h("button", { key: 'b39e96fc0667d2526efbe3af89473801c0c33b89', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, h("zonos-icon", { key: '6f8e626dbcbb17ac103ed9bd9998b3cc6e063d8d', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), h("zonos-icon", { key: '13f3cb171d1e4cc0678204a7fdeabcb801b9ef70', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (h("zonos-text", { key: '45c44644373adf202f88629171fdf9d32e6c2871', textColor: "red-600" }, this.error))));
128
128
  }
129
129
  static get is() { return "zonos-stripe-select"; }
130
130
  static get encapsulation() { return "shadow"; }
@@ -41,6 +41,7 @@
41
41
 
42
42
  :host(.zonos--text-size-2xl) > *, :host(.zonos--text-size-2xl) {
43
43
  font-size: var(--zonos--font-size-2xl, var(--zonos-elements-font-size-2xl));
44
+ line-height: 32px;
44
45
  }
45
46
 
46
47
  :host(.zonos--text-size-xl) > *, :host(.zonos--text-size-xl) {
@@ -9,9 +9,9 @@ export class ZonosToggle {
9
9
  this.options = [];
10
10
  }
11
11
  render() {
12
- return (h(Host, { key: '9a526e8fee8e4c5af558442c82f7acbc634706c3', class: classes(['zonos--elements zonos--toggle']), style: {
12
+ return (h(Host, { key: '1490dbdc9cc90d4d51ccc9e665fb5ee00455bf0e', class: classes(['zonos--elements zonos--toggle']), style: {
13
13
  '--zonos--font-family': zonosStoreFontFamily(),
14
- } }, h("div", { key: '97ca281e8e782c3b08231c6ba705325bbf16d402', class: "wrapper" }, this.options.map(option => {
14
+ } }, h("div", { key: 'af24e513fc988893be3dba1a08044d69c9493522', class: "wrapper" }, this.options.map(option => {
15
15
  const selected = option.value === this.value;
16
16
  return (h("button", { class: classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
17
17
  this.toggleChanged.emit(option.value);
@@ -13,10 +13,10 @@ export class ZonosTooltip {
13
13
  this.showTooltip = false;
14
14
  }
15
15
  render() {
16
- return (h(Host, { key: 'd984faacc8d79f2001c84fb69c30f3665dca44aa', class: "zonos--elements" }, h("div", { key: '327f9d077f2400f05ff3c4337b566c461a2d05cf', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '24315359176ca625f18a856d781624850d05de17' }), h("div", { key: '296041bbebddd0250c6d5d9649e6502571a08533', class: classes([
16
+ return (h(Host, { key: '10a391b40266e3f80d94f0870754fc1a5aaa1822', class: "zonos--elements" }, h("div", { key: '31236e53e67d2199204894d02590bfa5e54eaf8e', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '37a6de3ef4e6fdd64ecb3f3bdcc21f0dd091e4da' }), h("div", { key: 'ecd0222cd1a712790b8864d265919278493e8252', class: classes([
17
17
  this.showTooltip && 'zonos--show-tooltip',
18
18
  'zonos--tooltip-content',
19
- ]) }, h("zonos-text", { key: '5a2828baf420acb666eb1f0029c8d0b9eadd55ce', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '1bd8bf5085edfdc3d42db03e460062bf744c174b', size: "xs", textColor: "gray-0" }, this.subtitle)))));
19
+ ]) }, h("zonos-text", { key: 'afb6494edf8cbe4e3257a27cdc815b91995704e7', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '8d7c0ce999a9ee7fe49dd506497343734c99f76e', size: "xs", textColor: "gray-0" }, this.subtitle)))));
20
20
  }
21
21
  static get is() { return "zonos-tooltip"; }
22
22
  static get encapsulation() { return "shadow"; }
@@ -11,9 +11,9 @@ export class VStack {
11
11
  this.spacing = 24;
12
12
  }
13
13
  render() {
14
- return (h(Host, { key: '558218f6135d5fcc9f3649b76c568a9f514aa8e8', style: {
14
+ return (h(Host, { key: 'dc01f22fed27bc4804c12c0a0236bddf2ad95c51', style: {
15
15
  '--zonos--font-family': zonosStoreFontFamily(),
16
- } }, h("div", { key: '86af63aa01214db20cc094ddcbfd05b3ee28f1ed', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '4786fb44cbf865a548c900b752f9b13709f1f935' }))));
16
+ } }, h("div", { key: '460e86adabb0c867eab109806968fa1a72c2e58f', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '5ea93490a795258d57d15f45cda39da6b244314a' }))));
17
17
  }
18
18
  static get is() { return "zonos-v-stack"; }
19
19
  static get encapsulation() { return "shadow"; }
@@ -106,10 +106,10 @@ export class ZonosVirtualScroll {
106
106
  render() {
107
107
  const { width: containerWidth } = this.containerDimensions;
108
108
  const visibleItems = this.getVisibleItems();
109
- return (h(Host, { key: 'ef009c7cd2e654ea2dd3d67675f221229f924ec0', class: classes(['zonos--virtual-scroll']) }, h("div", { key: 'a2831fb8251cb27b3d814e8c493e8303ac04ff1c', class: classes(['scroller']), style: {
109
+ return (h(Host, { key: '6e464de75f6a11c2f27c2c82de83c65c646e5410', class: classes(['zonos--virtual-scroll']) }, h("div", { key: 'fcc5248ef103f4465a5e07c57b171afe4eba34b1', class: classes(['scroller']), style: {
110
110
  height: `${this.totalHeight}px`,
111
111
  width: `${containerWidth}px`,
112
- } }), h("div", { key: 'e36052e45224c89860b469b939898aa9861181a8', class: classes(['item-container']), style: {
112
+ } }), h("div", { key: 'd9b0a63008592bc3337bfa713edac71b8d12d82e', class: classes(['item-container']), style: {
113
113
  height: `${this.totalHeight}px`,
114
114
  } }, visibleItems.map(({ element }) => element))));
115
115
  }
@@ -19,7 +19,7 @@ export class ZonosComponent {
19
19
  return format(this.first, this.middle, this.last);
20
20
  }
21
21
  render() {
22
- return h("div", { key: '725c727348687e663e6225837a2a135d177b6d4a' }, "Hello, World! I'm ", this.getText());
22
+ return h("div", { key: '757e42d63a24b18216b900937089c2566dd44a93' }, "Hello, World! I'm ", this.getText());
23
23
  }
24
24
  static get is() { return "zonos-component"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -27,9 +27,9 @@ export class ZonosHelloDialogFooter {
27
27
  const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
28
28
  // Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
29
29
  const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
30
- return (h(Host, { key: 'd202f2295a5a3182727f2166847ac56f5958b654', class: "zonos--elements" }, h("div", { key: 'b42f6b1339449c5c4cebc999f25c0fc02a6b6e85', class: "zonos--hello-dialog-footer", style: {
30
+ return (h(Host, { key: '21a5da873ec477a41368ba151889ad04e9997028', class: "zonos--elements" }, h("div", { key: '15a7d7745bee574246493d7f9a4703c7ca730bdb', class: "zonos--hello-dialog-footer", style: {
31
31
  '--zonos--primary-color': primaryColor,
32
- } }, h("a", { key: 'c6465111d747a9c4a5b067039df51a9dc8df1976', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'fedd91718e253a8332334bea848178f091ae1cea', "aria-label": "Zonos Logo", autoHeight: true, content: mainColor === 'black' ? ZonosIconLight : ZonosIconDark, iconColor: mainColor, size: 108 })), h("div", { key: '9211d83b19f866ba87e171eeeb29690890ca9dcb', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'c88ca108b05511ebcaa9f1761d01413e61af91a5', 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: 'ff2386a7e4bfced9a9c8a2d62c21257c1052053e', 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)))));
32
+ } }, h("a", { key: 'fd16129719c2c2a06dad220f0101c9d39ac31e7a', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '7ecf7916f58b2c388f416b51ed2817a63ab3c818', "aria-label": "Zonos Logo", autoHeight: true, content: mainColor === 'black' ? ZonosIconLight : ZonosIconDark, iconColor: mainColor, size: 108 })), h("div", { key: 'be2e62811ce920460f761664a994dc51c316b004', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'b2baf4e43efcc7b6debc55b2143b4458c6e8c4f9', 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: '35b952303ace56938ffb1e7e6c488e5f9d0cb535', 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)))));
33
33
  }
34
34
  static get is() { return "zonos-hello-dialog-footer"; }
35
35
  static get encapsulation() { return "shadow"; }
@@ -308,18 +308,18 @@ export class ZonosHelloDialog {
308
308
  const defaultMessage = formatStringWithLinks(defaultMessageStr);
309
309
  const currentPage = this.getCurrentPageEnum();
310
310
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
311
- return (h(Host, { key: '048945538b24e429425ba47f0964a2c16a8c2d3d', class: "zonos--elements" }, h("div", { key: '539cb35da5f85ec64a166757eb09389262232d3e', class: classes([
311
+ return (h(Host, { key: 'cb93edb34ae6e427ca22018f78bd9f83bed8fb6c', class: "zonos--elements" }, h("div", { key: '36f0560ccc1b49c412077203eca49c8d8fbde0c1', class: classes([
312
312
  'zonos--hello-dialog',
313
313
  animateLeft && 'zonos--hello-dialog-animate-from-left',
314
314
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
315
315
  !!this.mobileLocationOverride &&
316
316
  'zonos--hello-dialog-mobile-override',
317
317
  this.isOpen && 'zonos--hello-dialog-open',
318
- ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'ef1ad9355d3244d96971217311f1c674adeb6ee3' }, h("div", { key: '463e7752c0a1c11c6c86bf0dd8031b81511c0c14', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '89c1ae9d62c5b6c21472597c1afc5733a1cb8512', 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: '2657decc4b955f00eeb360018791e18a7a4ac70a', spacing: 24 }, h("zonos-country-flag", { key: '57e9c4bdfc7a14e0268097a5c0c79ef508011347', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'cda79b1e8487d72ed6ca33e2298731953ad9620e', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '17d98d8f62d953c2b41ee46678ae4bea26b09ca5', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '856cebfb2d0d34a52d23f3eb8ccc7a64ef16e822', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '905f5e46a8eba8d9ff69af0ee5f51dadd168878e', spacing: 8 }, this.restrictedItems.map(item => {
318
+ ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'f5561b5699dc9ab8871e5c55002907f31551f06d' }, h("div", { key: '4f9d3e67db0d77c9cf945a02b3e7e5f7f4e8a2ef', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '47cc0055cd7077e5d8482446785e75addd50cc55', 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: '757fe60f5af6721f9b0e23e8182c5283c5e891b0', spacing: 24 }, h("zonos-country-flag", { key: '26dbfbceb8e3d16cc07debcb92d8759c8beb47da', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'fc41d363ac000d991a55cb5643d3db5bf65e86a7', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: 'ed02015e70e28bab9584f0cffae0401189537379', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '7c12a8d379e4c8bf2235b06d1d020bdad7f63a6c', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '120bd4591063877c10663559e2186875adeed017', spacing: 8 }, this.restrictedItems.map(item => {
319
319
  var _a;
320
320
  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)))));
321
- }), h("zonos-card", { key: '600e71f5ccd6f2f86d5fe00833f480b5059fa145', spacing: "12px" }, h("zonos-v-stack", { key: '75cc0236d7f59ef08e7700ef326c079b2eb273a2', 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, dutyDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage))))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
322
- additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '70c60065a548ab2e178df64062991b8160d62f55', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '14da13080459253ab355f60f67216f99741b69a2' }, h("zonos-country-select", { key: 'e18e90eb0e68450ceb833aa999f24108fd154eb8', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '56255cb5629ee7600378d13ee700adf1d3c73f51' }, h("zonos-language-select", { key: '3d74f4c28c067ea9f94da2d3274abf4d750bcab7', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
321
+ }), h("zonos-card", { key: '2d47773d1db35acf323f1a92808535c909e245ca', spacing: "12px" }, h("zonos-v-stack", { key: '9bd445564c4d13d03772a5289a758fc19c9853a5', 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, dutyDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage))))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
322
+ additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '6ea82d255084e05957e6d82e6305b945388998ad', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '1b007ad4dadcb7b6f25e96a14e00dc8dcf4b9d5a' }, h("zonos-country-select", { key: 'f442a030a5abbb707fdddbc51a1126cd1fb3ef99', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: 'aba190f3fafb298bc063f2ba05dfe74af7cc97ae' }, h("zonos-language-select", { key: '105c6c35f630d2c7b551518665f433a90d13c488', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
323
323
  }
324
324
  static get is() { return "zonos-hello-dialog"; }
325
325
  static get encapsulation() { return "shadow"; }
@@ -5,6 +5,7 @@ import { storageStore } from "../store/storageStore";
5
5
  import { zonosStore, zonosStoreFontFamily, zonosStoreInitSetting, } from "../store/zonosStore";
6
6
  import { getZonosSettings } from "../utils/api/getZonosSettings";
7
7
  import { initCheckout } from "../utils/checkout/initCheckout";
8
+ import { initCollect } from "../utils/checkout/initCollect";
8
9
  import { handleFetch } from "../utils/handleFetch";
9
10
  import { initHello } from "../utils/hello/initHello";
10
11
  import { CheckoutAddressService } from "../utils/iframe/CheckoutAddressService";
@@ -23,6 +24,18 @@ export class ZonosController {
23
24
  void initCheckout(zonosStore.checkoutSettings);
24
25
  log('init checkout element');
25
26
  }
27
+ /**
28
+ * Method to initialize Collect element
29
+ */
30
+ async initCollectElement(stripe) {
31
+ if (!stripe) {
32
+ log('Stripe is not loaded yet - cannot init Collect element', 'warn');
33
+ return;
34
+ }
35
+ stripeStore.stripe = stripe;
36
+ void initCollect();
37
+ log('init Collect element');
38
+ }
26
39
  /**
27
40
  * Init zonos notification
28
41
  */
@@ -94,8 +107,8 @@ export class ZonosController {
94
107
  if (!htmlString) {
95
108
  return;
96
109
  }
97
- // Skip injecting custom HTML for legacy checkout
98
- if (!window.Zonos.isLegacyCheckout) {
110
+ // Skip injecting custom HTML for legacy checkout and collect
111
+ if (!window.Zonos.isLegacyCheckout || window.Zonos.isCollect) {
99
112
  log('=== Skip injecting custom HTML for hosted checkout', 'info');
100
113
  return;
101
114
  }
@@ -134,12 +147,48 @@ export class ZonosController {
134
147
  src: `${process.env.NEXT_PUBLIC_ZONOS_CLOUDFLARE_URL}/iframe/google-maps?signedToken=${signedPayload}`,
135
148
  });
136
149
  }
150
+ buildBaseConfig(json) {
151
+ var _a, _b;
152
+ const baseCheckoutConfig = Object.assign(Object.assign({}, this.config.checkoutSettings), {
153
+ // Don't allow to override settlement currencies setting. This setting is only configured by Zonos
154
+ allowedSettlementCurrencies: undefined,
155
+ // Don't allow to override capture delay setting. This setting is only configured by Zonos
156
+ captureDelay: undefined,
157
+ // Don't allow to override subscription status
158
+ subscriptionStatus: undefined
159
+ });
160
+ if (window.Zonos.isCollect) {
161
+ return Object.assign(Object.assign({}, this.config), { checkoutSettings: baseCheckoutConfig, helloSettings: Object.assign(Object.assign({}, this.config.helloSettings), {
162
+ // No need to show hello for collect
163
+ visibilityStatus: 'DISABLED'
164
+ }) });
165
+ }
166
+ if (!this.config.checkoutSettings) {
167
+ return Object.assign(Object.assign({}, this.config), {
168
+ // If there is no override checkout settings from Zonos.init, just use the default checkout settings from our settings
169
+ checkoutSettings: undefined
170
+ });
171
+ }
172
+ // Should override success behavior for legacy checkout if
173
+ const shouldOverrideSuccessBehavior = window.Zonos.isLegacyCheckout &&
174
+ !!window.Zonos.cartData &&
175
+ ((_a = this.config.checkoutSettings) === null || _a === void 0 ? void 0 : _a.successBehavior) === 'CLOSE_MODAL';
176
+ return Object.assign(Object.assign({}, this.config), { checkoutSettings: Object.assign(Object.assign({}, baseCheckoutConfig), {
177
+ // Set success redirect url to store url if it's legacy checkout.
178
+ // when success behavior is CLOSE_MODAL, use the default success behavior and update the keep shopping button link to their store, because just redirect user without confirmation page would confuse them
179
+ successBehavior: shouldOverrideSuccessBehavior
180
+ ? 'ZONOS_SUCCESS_PAGE'
181
+ : this.config.checkoutSettings.successBehavior, successRedirectUrl: shouldOverrideSuccessBehavior
182
+ ? ((_b = window.Zonos.cartData) === null || _b === void 0 ? void 0 : _b.storeBaseUrl) || (json === null || json === void 0 ? void 0 : json.onlineStoreSettings.url)
183
+ : this.config.checkoutSettings.successRedirectUrl
184
+ }) });
185
+ }
137
186
  async componentWillLoad() {
138
187
  this.initHistoryListener();
139
188
  zonosStore.zonosApiKey = this.zonosApiKey;
140
189
  // running with scope async function to avoid blocking the main thread
141
190
  (async () => {
142
- var _a, _b, _c, _d, _e, _f;
191
+ var _a, _b, _c, _d;
143
192
  const { errors, json, zonosMode } = await getZonosSettings();
144
193
  if (((_b = (_a = errors[0]) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toString()) === '403') {
145
194
  log('Failed to load zonos settings. This domain may not have access', 'warn');
@@ -158,27 +207,9 @@ export class ZonosController {
158
207
  // Otherwise respect override
159
208
  return (_c = this.config.appearance) === null || _c === void 0 ? void 0 : _c.logoUrl;
160
209
  };
161
- const shouldOverrideSuccessBehavior = window.Zonos.isLegacyCheckout &&
162
- !!window.Zonos.cartData &&
163
- ((_d = this.config.checkoutSettings) === null || _d === void 0 ? void 0 : _d.successBehavior) === 'CLOSE_MODAL';
210
+ const baseConfig = this.buildBaseConfig(json);
164
211
  // override subscription status
165
- const config = Object.assign(Object.assign({}, this.config), { appearance: Object.assign(Object.assign({}, this.config.appearance), { logoUrl: getLogoUrl() }), checkoutSettings: this.config.checkoutSettings
166
- ? Object.assign(Object.assign({}, this.config.checkoutSettings), {
167
- // Don't allow to override settlement currencies setting. This setting is only configured by Zonos
168
- allowedSettlementCurrencies: undefined,
169
- // Don't allow to override capture delay setting. This setting is only configured by Zonos
170
- captureDelay: undefined,
171
- // Don't allow to override subscription status
172
- subscriptionStatus: undefined,
173
- // Set success redirect url to store url if it's legacy checkout.
174
- // when success behavior is CLOSE_MODAL, use the default success behavior and update the keep shopping button link to their store, because just redirect user without confirmation page would confuse them
175
- successBehavior: shouldOverrideSuccessBehavior
176
- ? 'ZONOS_SUCCESS_PAGE'
177
- : this.config.checkoutSettings.successBehavior, successRedirectUrl: shouldOverrideSuccessBehavior
178
- ? ((_e = window.Zonos.cartData) === null || _e === void 0 ? void 0 : _e.storeBaseUrl) ||
179
- (json === null || json === void 0 ? void 0 : json.onlineStoreSettings.url)
180
- : this.config.checkoutSettings.successRedirectUrl
181
- }) : undefined });
212
+ const config = Object.assign(Object.assign(Object.assign({}, this.config), { appearance: Object.assign(Object.assign({}, this.config.appearance), { logoUrl: getLogoUrl() }) }), baseConfig);
182
213
  // load default setting if failed to load user settings
183
214
  zonosStoreInitSetting({
184
215
  overrideSettings: config,
@@ -199,11 +230,20 @@ export class ZonosController {
199
230
  // init localization store
200
231
  await initLocalizationStore();
201
232
  // checkout init
202
- const publishableKey = ((_f = json === null || json === void 0 ? void 0 : json.checkoutSettings) === null || _f === void 0 ? void 0 : _f.externalServiceTokens.find(item => item.type === 'STRIPE_PUBLISHABLE_TOKEN')) || null;
233
+ const publishableKey = ((_d = json === null || json === void 0 ? void 0 : json.checkoutSettings) === null || _d === void 0 ? void 0 : _d.externalServiceTokens.find(item => item.type === 'STRIPE_PUBLISHABLE_TOKEN')) || null;
203
234
  if (!publishableKey || !this.stripeInitEvent) {
204
235
  log('Checkout failed to load -- missing publishable key', 'warn');
205
236
  return;
206
237
  }
238
+ if (window.Zonos.isCollect) {
239
+ // send publishable key out to load stripe
240
+ this.stripeInitEvent.emit({
241
+ publishableKey: publishableKey.token,
242
+ });
243
+ // init google places service
244
+ void this.initGooglePlacesService(json);
245
+ return;
246
+ }
207
247
  if (zonosStore.checkoutSettings.subscriptionStatus === 'INACTIVE') {
208
248
  log('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===', 'warn');
209
249
  log('zonos controller loaded');
@@ -270,7 +310,7 @@ export class ZonosController {
270
310
  zonosStore.organizationName = organizationName;
271
311
  }
272
312
  render() {
273
- return h(Host, { key: '62c0b3079d64f05800da24daa19e0e1e3a890bca', class: "zonos--elements" });
313
+ return h(Host, { key: 'bfc37564859305654a77081919eaaed52387ab40', class: "zonos--elements" });
274
314
  }
275
315
  static get is() { return "zonos-controller"; }
276
316
  static get encapsulation() { return "shadow"; }
@@ -391,6 +431,32 @@ export class ZonosController {
391
431
  "tags": []
392
432
  }
393
433
  },
434
+ "initCollectElement": {
435
+ "complexType": {
436
+ "signature": "(stripe: Stripe) => Promise<void>",
437
+ "parameters": [{
438
+ "name": "stripe",
439
+ "type": "Stripe",
440
+ "docs": ""
441
+ }],
442
+ "references": {
443
+ "Promise": {
444
+ "location": "global",
445
+ "id": "global::Promise"
446
+ },
447
+ "Stripe": {
448
+ "location": "import",
449
+ "path": "@stripe/stripe-js",
450
+ "id": "node_modules::Stripe"
451
+ }
452
+ },
453
+ "return": "Promise<void>"
454
+ },
455
+ "docs": {
456
+ "text": "Method to initialize Collect element",
457
+ "tags": []
458
+ }
459
+ },
394
460
  "setupGoogleFont": {
395
461
  "complexType": {
396
462
  "signature": "(overrideFont?: string) => Promise<void>",
@@ -1,11 +1,14 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import { h, Host, } from "@stencil/core";
3
- import { paypalStoreInitButtons } from "../store/checkout/paypal";
3
+ import { paypalStoreInitButtons, paypalStoreOnChange, } from "../store/checkout/paypal";
4
4
  import { log } from "../utils/logging/log";
5
5
  /**
6
6
  * This component is a wrapper for the paypal authentication element that would render default style object
7
7
  */
8
8
  export class ZonosPaypalPayment {
9
+ constructor() {
10
+ this.storeUnsubscribeList = [];
11
+ }
9
12
  async loadPaypal() {
10
13
  if (!window.Zonos.paypal) {
11
14
  log('Paypal is not available');
@@ -36,12 +39,20 @@ export class ZonosPaypalPayment {
36
39
  await paypalButton.render(container);
37
40
  });
38
41
  }
42
+ componentWillLoad() {
43
+ this.storeUnsubscribeList = [
44
+ paypalStoreOnChange('paypal', this.loadPaypal.bind(this)),
45
+ ];
46
+ }
39
47
  componentDidLoad() {
40
48
  // @Watch doesn't get trigger on initial load
41
49
  void this.loadPaypal();
42
50
  }
51
+ disconnectedCallback() {
52
+ this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
53
+ }
43
54
  render() {
44
- return (h(Host, { key: 'e8c839cc9d0286f5ae4643243b14fa66f9584833', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: 'cac06948de1ccca97ba65eca10b3e5d9f3a9a362', class: "zonos--payment-paypal-container" })));
55
+ return (h(Host, { key: 'af7d707c64d3f1b637d5d296d46e59023fff0744', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: '5a387dc0c7ae0ef6492b5f68b548989dd9832380', class: "zonos--payment-paypal-container" })));
45
56
  }
46
57
  static get is() { return "zonos-paypal-payment"; }
47
58
  static get encapsulation() { return "scoped"; }
@@ -283,8 +283,12 @@ const cartStoreGetMethod = (landedCost) => {
283
283
  }
284
284
  return landedCost.method;
285
285
  };
286
- const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, landedCostId) => {
286
+ const cartStoreUpdateSelectedShippingOption = async ({ applySubtotalsOnly, landedCostId, selectedShippingOption, }) => {
287
287
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
288
+ log('Updating selected shipping option', 'info', {
289
+ landedCostId,
290
+ selectedShippingOption,
291
+ });
288
292
  cartStore.selectedShippingOption = selectedShippingOption;
289
293
  // update shipping transit info
290
294
  const transitData = cartStoreGetShippingTransitInfo(cartStore.selectedShippingOption);
@@ -319,16 +323,33 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
319
323
  const isAboveDeminimis = !!((_e = (_d = selectedLandedCost === null || selectedLandedCost === void 0 ? void 0 : selectedLandedCost.landedCost) === null || _d === void 0 ? void 0 : _d.deMinimis) === null || _e === void 0 ? void 0 : _e.find(item => ['DUTY', 'TAX'].includes(item.type) && item.threshold === 'ABOVE'));
320
324
  cartStore.isSelectedShippingAboveDeminimis = isAboveDeminimis;
321
325
  cartStore.isSelectedShippingGuarantee = isGuarantee;
322
- // update session with selected landed cost
323
- const updateCalculateStatus = await cartStoreReCalculateTotal({
324
- adjustmentsAmount: cartStore.adjustmentTotal,
325
- billToPartyId: stripeStore.partyBillingId,
326
- cartId: window.Zonos.cartId,
327
- dutiesTaxesFeesEstimate: dutiesTaxesFeesEstimate,
328
- landedCostId: (_f = selectedLandedCost.landedCost) === null || _f === void 0 ? void 0 : _f.id,
329
- shipToPartyId: stripeStore.partyShippingId,
330
- varianceTestInput: storageStore.enabledVariantTestKeys || [],
331
- });
326
+ let updateCalculateStatus = false;
327
+ /**
328
+ * For collect, we are trying to mimic the behavior that checkout is currently doing, where there is already a checkout session, we already updated with the landed cost.
329
+ * But we need to call this function so that we can use all of the information that already in place in cartStore, so to avoid latency issue, we only apply subtotals here.
330
+ */
331
+ if (applySubtotalsOnly) {
332
+ const subtotals = selectedLandedCost.subtotals;
333
+ cartStoreApplySubtotals({
334
+ dutiesTaxesFeesEstimate,
335
+ method: cartStore.landedCostMethod,
336
+ subtotals,
337
+ });
338
+ log('Exchange rate updated for cart items (landed cost subtotal)', 'info', cartStore.exchangeRate);
339
+ updateCalculateStatus = true;
340
+ }
341
+ else {
342
+ // update session with selected landed cost
343
+ updateCalculateStatus = await cartStoreReCalculateTotal({
344
+ adjustmentsAmount: cartStore.adjustmentTotal,
345
+ billToPartyId: stripeStore.partyBillingId,
346
+ cartId: window.Zonos.cartId,
347
+ dutiesTaxesFeesEstimate: dutiesTaxesFeesEstimate,
348
+ landedCostId: (_f = selectedLandedCost.landedCost) === null || _f === void 0 ? void 0 : _f.id,
349
+ shipToPartyId: stripeStore.partyShippingId,
350
+ varianceTestInput: storageStore.enabledVariantTestKeys || [],
351
+ });
352
+ }
332
353
  // update conditionally render pay in USD button
333
354
  const firstItem = (_g = cartStore.items.find(Boolean)) === null || _g === void 0 ? void 0 : _g.currencyCode;
334
355
  // Stripe address event data should be available at this point
@@ -370,7 +391,7 @@ const cartStoreResetCartItems = () => {
370
391
  cartStore.items = cartStore.items.map(item => (Object.assign(Object.assign({}, item), { isRestricted: false })));
371
392
  cartStore.restrictedItems = [];
372
393
  };
373
- const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
394
+ const cartStoreUpdateItems = async ({ adjustments, cartItems, landedCostId, shouldInitSessionOnFailure = true, }) => {
374
395
  var _a;
375
396
  // Update adjustments and items
376
397
  cartStore.adjustments = adjustments;
@@ -394,9 +415,9 @@ const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
394
415
  currency: currency,
395
416
  dutiesTaxesFeesEstimate: 0,
396
417
  itemsAmount: total,
418
+ landedCostId,
397
419
  shipToPartyId: stripeStore.partyShippingId,
398
- // attempt to init session on failure to update checkout session
399
- shouldInitSessionOnFailure: true,
420
+ shouldInitSessionOnFailure,
400
421
  varianceTestInput: storageStore.enabledVariantTestKeys || [],
401
422
  });
402
423
  stripeStore.isFetchingSession = false;
@@ -449,4 +470,4 @@ const cartStoreResetTabItems = () => {
449
470
  cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
450
471
  cartStoreResetSelectedShippingOption();
451
472
  };
452
- export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStoreOnChange, cartStorePreviousStep, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
473
+ export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStoreOnChange, cartStorePreviousStep, cartStoreReCalculateTotal, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };