@zonos/elements 1.3.232 → 1.3.234

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 (415) hide show
  1. package/dist/cjs/{cart-bc615014.js → cart-22ced7cc.js} +33 -29
  2. package/dist/cjs/{shouldRenderTaxIdInput-9b8a8de1.js → containsNonLatinChars-2be5129b.js} +0 -23
  3. package/dist/cjs/{hasInclusivePrice-84145546.js → hasInclusivePrice-ca85cabd.js} +1 -1
  4. package/dist/cjs/index.cjs.js +11 -7
  5. package/dist/cjs/invoice-8fd4242c.js +151 -0
  6. package/dist/cjs/{renderFallback-c2576fbe.js → isCollectMobileTablet-7962c57f.js} +2 -11
  7. package/dist/cjs/isInvoiceMobileTablet-dde41e4e.js +15 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{translationStore-08d3ff9c.js → localization-8ef6250a.js} +1059 -1
  10. package/dist/cjs/{paypal-1d6f1a71.js → paypal-4a086f84.js} +7 -8
  11. package/dist/cjs/placeTestOrder-f25d08ee.js +45 -0
  12. package/dist/cjs/{placeTestOrder-a5469e40.js → renderCheckoutCurrency-5494e45b.js} +2 -42
  13. package/dist/cjs/renderFallback-78b54537.js +12 -0
  14. package/dist/cjs/shouldRenderTaxIdInput-eda13ef8.js +25 -0
  15. package/dist/cjs/throttle-7dd64984.js +76 -0
  16. package/dist/cjs/{zonos-address_11.cjs.entry.js → zonos-address-display_9.cjs.entry.js} +62 -668
  17. package/dist/cjs/zonos-address_4.cjs.entry.js +715 -0
  18. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  19. package/dist/cjs/{zonos-banner_2.cjs.entry.js → zonos-banner.cjs.entry.js} +0 -40
  20. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  21. package/dist/cjs/{zonos-empty-state-payment_4.cjs.entry.js → zonos-card_5.cjs.entry.js} +44 -6
  22. package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +81 -94
  23. package/dist/cjs/zonos-checkout.cjs.entry.js +20 -21
  24. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -6
  26. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +66 -65
  27. package/dist/cjs/zonos-collect.cjs.entry.js +25 -25
  28. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-controller.cjs.entry.js +39 -10
  30. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -2
  31. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -11
  32. package/dist/cjs/zonos-elements.cjs.js +1 -1
  33. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +30 -31
  34. package/dist/cjs/zonos-hello.cjs.entry.js +7 -8
  35. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  36. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +94 -0
  37. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +686 -0
  38. package/dist/cjs/zonos-invoice.cjs.entry.js +466 -0
  39. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -6
  40. package/dist/cjs/zonos-link.cjs.entry.js +24 -0
  41. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  42. package/dist/cjs/zonos-stripe-input.cjs.entry.js +5 -5
  43. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  45. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  46. package/dist/collection/collection-manifest.json +8 -0
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -1
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -1
  49. package/dist/collection/components/checkout/zonos-invoice/assets/ChevronDownIcon.svg +1 -0
  50. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/assets/empty-item.jpeg +0 -0
  51. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.css +72 -0
  52. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +87 -0
  53. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/RemoveIcon.svg +1 -0
  54. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/SuccessIcon.svg +1 -0
  55. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.css +90 -0
  56. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +405 -0
  57. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/chevronDownIcon.svg +1 -0
  58. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/globe.svg +3 -0
  59. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconDark.svg +10 -0
  60. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconLight.svg +10 -0
  61. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosWordmark.svg +7 -0
  62. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +155 -0
  63. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +165 -0
  64. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronDownIcon.svg +1 -0
  65. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronUpIcon.svg +1 -0
  66. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.css +117 -0
  67. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +175 -0
  68. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/CheckmarkLineIcon.svg +1 -0
  69. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/RemoveLineIcon.svg +1 -0
  70. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.css +98 -0
  71. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +368 -0
  72. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.css +71 -0
  73. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +151 -0
  74. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.css +83 -0
  75. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +65 -0
  76. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.css +350 -0
  77. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +545 -0
  78. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  79. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  80. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  81. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  82. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  83. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  84. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  85. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  86. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  87. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  88. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  89. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  90. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  91. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  92. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  93. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  94. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  95. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  96. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  97. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +5 -5
  98. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  99. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  100. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  101. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  102. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  103. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  104. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  105. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  106. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  107. package/dist/collection/components/main/zonos-controller.js +45 -4
  108. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  109. package/dist/collection/components/store/checkout/invoice.js +148 -0
  110. package/dist/collection/components/store/checkout/stripe.js +8 -3
  111. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  112. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  113. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  114. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  115. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  116. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  117. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  118. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  119. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  120. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  121. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  122. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  123. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  124. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  125. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  126. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  127. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  128. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  129. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  130. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  131. package/dist/collection/components/stripe/zonos-address/zonos-address.js +8 -5
  132. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  133. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  134. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  135. package/dist/collection/components/utils/checkout/initInvoice.js +15 -0
  136. package/dist/collection/components/utils/checkout/isInvoiceMobileTablet.js +10 -0
  137. package/dist/collection/scripts/_zonosBase.js +4 -0
  138. package/dist/esm/{cart-14f305b3.js → cart-66aecbb3.js} +9 -5
  139. package/dist/esm/{shouldRenderTaxIdInput-8bc112bb.js → containsNonLatinChars-2d8810c3.js} +1 -23
  140. package/dist/esm/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
  141. package/dist/esm/index.js +11 -7
  142. package/dist/esm/invoice-c7452847.js +146 -0
  143. package/dist/esm/{renderFallback-dbf1e3ae.js → isCollectMobileTablet-921002b0.js} +3 -11
  144. package/dist/esm/isInvoiceMobileTablet-1f7b614e.js +12 -0
  145. package/dist/esm/loader.js +1 -1
  146. package/dist/esm/{translationStore-690c4e04.js → localization-04b05867.js} +1041 -2
  147. package/dist/esm/{paypal-fded8844.js → paypal-56564874.js} +2 -3
  148. package/dist/esm/placeTestOrder-6b9eda9e.js +43 -0
  149. package/dist/esm/{placeTestOrder-2250f719.js → renderCheckoutCurrency-cb808110.js} +3 -42
  150. package/dist/esm/renderFallback-3f010b48.js +10 -0
  151. package/dist/esm/shouldRenderTaxIdInput-d45ceeb4.js +23 -0
  152. package/dist/esm/throttle-ce2432ab.js +74 -0
  153. package/dist/esm/{zonos-address_11.entry.js → zonos-address-display_9.entry.js} +32 -636
  154. package/dist/esm/zonos-address_4.entry.js +708 -0
  155. package/dist/esm/zonos-badge.entry.js +3 -3
  156. package/dist/esm/{zonos-banner_2.entry.js → zonos-banner.entry.js} +1 -40
  157. package/dist/esm/zonos-button_3.entry.js +3 -3
  158. package/dist/esm/{zonos-empty-state-payment_4.entry.js → zonos-card_5.entry.js} +44 -7
  159. package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_12.entry.js} +21 -33
  160. package/dist/esm/zonos-checkout.entry.js +3 -4
  161. package/dist/esm/zonos-collapse.entry.js +2 -2
  162. package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -6
  163. package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
  164. package/dist/esm/zonos-collect.entry.js +5 -5
  165. package/dist/esm/zonos-component.entry.js +1 -1
  166. package/dist/esm/zonos-controller.entry.js +39 -10
  167. package/dist/esm/zonos-country-flag.entry.js +1 -2
  168. package/dist/esm/zonos-country-select_4.entry.js +10 -11
  169. package/dist/esm/zonos-elements.js +1 -1
  170. package/dist/esm/zonos-hello-dialog.entry.js +6 -7
  171. package/dist/esm/zonos-hello.entry.js +1 -2
  172. package/dist/esm/zonos-input.entry.js +4 -4
  173. package/dist/esm/zonos-invoice-cart-items_2.entry.js +89 -0
  174. package/dist/esm/zonos-invoice-finish_5.entry.js +678 -0
  175. package/dist/esm/zonos-invoice.entry.js +462 -0
  176. package/dist/esm/zonos-language-select_2.entry.js +5 -6
  177. package/dist/esm/zonos-link.entry.js +20 -0
  178. package/dist/esm/zonos-logo.entry.js +2 -2
  179. package/dist/esm/zonos-stripe-input.entry.js +5 -5
  180. package/dist/esm/zonos-toggle.entry.js +2 -2
  181. package/dist/esm/zonos-tooltip.entry.js +2 -2
  182. package/dist/esm/zonos-v-stack.entry.js +2 -2
  183. package/dist/esm-es5/cart-66aecbb3.js +1 -0
  184. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
  185. package/dist/esm-es5/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
  186. package/dist/esm-es5/index.js +1 -1
  187. package/dist/esm-es5/invoice-c7452847.js +1 -0
  188. package/dist/esm-es5/isCollectMobileTablet-921002b0.js +1 -0
  189. package/dist/esm-es5/isInvoiceMobileTablet-1f7b614e.js +1 -0
  190. package/dist/esm-es5/loader.js +1 -1
  191. package/dist/esm-es5/localization-04b05867.js +1 -0
  192. package/dist/esm-es5/{paypal-fded8844.js → paypal-56564874.js} +1 -1
  193. package/dist/esm-es5/placeTestOrder-6b9eda9e.js +1 -0
  194. package/dist/esm-es5/renderCheckoutCurrency-cb808110.js +1 -0
  195. package/dist/esm-es5/renderFallback-3f010b48.js +1 -0
  196. package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +1 -0
  197. package/dist/esm-es5/throttle-ce2432ab.js +1 -0
  198. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -0
  199. package/dist/esm-es5/zonos-address_4.entry.js +1 -0
  200. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  201. package/dist/esm-es5/zonos-banner.entry.js +1 -0
  202. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  203. package/dist/esm-es5/zonos-card_5.entry.js +1 -0
  204. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
  205. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  206. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  207. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  208. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  209. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  210. package/dist/esm-es5/zonos-component.entry.js +1 -1
  211. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  212. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  213. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  214. package/dist/esm-es5/zonos-elements.js +1 -1
  215. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  216. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  217. package/dist/esm-es5/zonos-input.entry.js +1 -1
  218. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -0
  219. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -0
  220. package/dist/esm-es5/zonos-invoice.entry.js +1 -0
  221. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  222. package/dist/esm-es5/zonos-link.entry.js +1 -0
  223. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  224. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  225. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  226. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  227. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  228. package/dist/scripts/index.d.ts +356 -0
  229. package/dist/scripts/index.js +1 -1
  230. package/dist/scripts/loadZonos.js +1 -1
  231. package/dist/scripts/zonos.js +1 -1
  232. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.d.ts +10 -0
  233. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.d.ts +50 -0
  234. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.d.ts +25 -0
  235. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.d.ts +28 -0
  236. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.d.ts +62 -0
  237. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.d.ts +22 -0
  238. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.d.ts +7 -0
  239. package/dist/types/components/checkout/zonos-invoice/zonos-invoice.d.ts +86 -0
  240. package/dist/types/components/main/zonos-controller.d.ts +4 -0
  241. package/dist/types/components/store/checkout/invoice.d.ts +19 -0
  242. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  243. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  244. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  245. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  246. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  247. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  248. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  249. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  250. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  251. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  252. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  253. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  254. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  255. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  256. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  257. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  258. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  259. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  260. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  261. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  262. package/dist/types/components/utils/checkout/initInvoice.d.ts +1 -0
  263. package/dist/types/components/utils/checkout/isInvoiceMobileTablet.d.ts +4 -0
  264. package/dist/types/components.d.ts +351 -0
  265. package/dist/types/scripts/_zonosBase.d.ts +5 -0
  266. package/dist/types/types/checkout/api/CheckoutSession.d.ts +4 -0
  267. package/dist/types/types/checkout/api/PartyInfo.d.ts +21 -0
  268. package/dist/zonos-elements/index.esm.js +1 -1
  269. package/dist/zonos-elements/p-00719e49.entry.js +1 -0
  270. package/dist/zonos-elements/p-01b0a2e2.js +1 -0
  271. package/dist/zonos-elements/p-01dada4e.js +1 -0
  272. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  273. package/dist/zonos-elements/p-0cd5bcb3.entry.js +1 -0
  274. package/dist/zonos-elements/p-0e82fcea.entry.js +1 -0
  275. package/dist/zonos-elements/p-10316d4d.system.entry.js +1 -0
  276. package/dist/zonos-elements/{p-0a90dd80.system.entry.js → p-121c60c1.system.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-bf9d889f.entry.js → p-14314ad3.entry.js} +1 -1
  278. package/dist/zonos-elements/p-170314a3.js +1 -0
  279. package/dist/zonos-elements/p-17a09191.entry.js +1 -0
  280. package/dist/zonos-elements/p-18bc6c7a.entry.js +1 -0
  281. package/dist/zonos-elements/{p-a25428eb.system.js → p-18d20206.system.js} +2 -2
  282. package/dist/zonos-elements/p-1a30fe18.system.entry.js +1 -0
  283. package/dist/zonos-elements/{p-c7b658cb.entry.js → p-1c4d12f0.entry.js} +1 -1
  284. package/dist/zonos-elements/p-1f3549c6.js +1 -0
  285. package/dist/zonos-elements/p-2250e585.entry.js +1 -0
  286. package/dist/zonos-elements/p-248dd596.system.entry.js +1 -0
  287. package/dist/zonos-elements/{p-5f398c28.entry.js → p-264690d7.entry.js} +1 -1
  288. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  289. package/dist/zonos-elements/p-27f6930b.js +1 -0
  290. package/dist/zonos-elements/{p-eea0eb57.system.entry.js → p-2f869f2c.system.entry.js} +1 -1
  291. package/dist/zonos-elements/p-30c661b3.system.entry.js +1 -0
  292. package/dist/zonos-elements/p-34bf7bbe.system.js +1 -0
  293. package/dist/zonos-elements/p-38913b2f.entry.js +1 -0
  294. package/dist/zonos-elements/p-3bec13dd.system.js +1 -0
  295. package/dist/zonos-elements/{p-00ec22b2.entry.js → p-43a22d85.entry.js} +1 -1
  296. package/dist/zonos-elements/p-44b50260.entry.js +1 -0
  297. package/dist/zonos-elements/p-48dc96f9.system.entry.js +1 -0
  298. package/dist/zonos-elements/p-4aa86184.system.entry.js +1 -0
  299. package/dist/zonos-elements/p-4d594c8e.system.js +1 -0
  300. package/dist/zonos-elements/p-4ffbb0d6.system.js +1 -0
  301. package/dist/zonos-elements/{p-452fb638.system.entry.js → p-5062dcf3.system.entry.js} +1 -1
  302. package/dist/zonos-elements/{p-c5cb2364.system.entry.js → p-57cee1b5.system.entry.js} +1 -1
  303. package/dist/zonos-elements/p-59a76f73.entry.js +1 -0
  304. package/dist/zonos-elements/{p-d556c6d1.system.entry.js → p-5afb9260.system.entry.js} +1 -1
  305. package/dist/zonos-elements/p-5e9b45f7.entry.js +1 -0
  306. package/dist/zonos-elements/{p-88ea9f82.entry.js → p-6626d240.entry.js} +1 -1
  307. package/dist/zonos-elements/p-6688473e.entry.js +1 -0
  308. package/dist/zonos-elements/p-6f23a26a.system.js +1 -0
  309. package/dist/zonos-elements/{p-82739127.js → p-73c737aa.js} +2 -2
  310. package/dist/zonos-elements/p-757d4c62.system.entry.js +1 -0
  311. package/dist/zonos-elements/p-7aa50ef2.entry.js +1 -0
  312. package/dist/zonos-elements/p-7e17667d.js +1 -0
  313. package/dist/zonos-elements/p-7e469c5c.entry.js +1 -0
  314. package/dist/zonos-elements/p-7f91617c.system.entry.js +1 -0
  315. package/dist/zonos-elements/p-81e3eb5b.js +1 -0
  316. package/dist/zonos-elements/p-82febf70.system.js +1 -0
  317. package/dist/zonos-elements/{p-770852bf.system.entry.js → p-836db369.system.entry.js} +1 -1
  318. package/dist/zonos-elements/p-83b3f824.system.entry.js +1 -0
  319. package/dist/zonos-elements/p-851011aa.system.entry.js +1 -0
  320. package/dist/zonos-elements/{p-936b54c1.entry.js → p-865536f0.entry.js} +1 -1
  321. package/dist/zonos-elements/{p-b1fd1ec2.system.entry.js → p-8792fef2.system.entry.js} +1 -1
  322. package/dist/zonos-elements/p-890bfc42.system.entry.js +1 -0
  323. package/dist/zonos-elements/{p-c288c6da.system.entry.js → p-89a5e936.system.entry.js} +1 -1
  324. package/dist/zonos-elements/p-8af188f8.system.js +1 -0
  325. package/dist/zonos-elements/p-8d3a62fb.entry.js +1 -0
  326. package/dist/zonos-elements/{p-00ac999f.system.entry.js → p-8dc025c7.system.entry.js} +1 -1
  327. package/dist/zonos-elements/p-944d00da.entry.js +1 -0
  328. package/dist/zonos-elements/p-9479f155.system.js +1 -0
  329. package/dist/zonos-elements/p-95dc475b.system.js +1 -0
  330. package/dist/zonos-elements/p-976afc17.system.js +1 -0
  331. package/dist/zonos-elements/p-97d56c21.system.entry.js +1 -0
  332. package/dist/zonos-elements/p-9b9bfb6d.entry.js +1 -0
  333. package/dist/zonos-elements/{p-55e2e4ed.entry.js → p-9f1bd9b8.entry.js} +1 -1
  334. package/dist/zonos-elements/p-9fa32fdf.js +1 -0
  335. package/dist/zonos-elements/p-a2a0bf4e.js +1 -0
  336. package/dist/zonos-elements/p-a610c24e.system.entry.js +1 -0
  337. package/dist/zonos-elements/{p-9b8750f3.entry.js → p-aedd3911.entry.js} +1 -1
  338. package/dist/zonos-elements/{p-db628e49.system.entry.js → p-b5c31ca4.system.entry.js} +1 -1
  339. package/dist/zonos-elements/p-ba456282.system.entry.js +1 -0
  340. package/dist/zonos-elements/{p-31af91f0.entry.js → p-bd603c1a.entry.js} +1 -1
  341. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  342. package/dist/zonos-elements/p-dc5fb21c.js +1 -0
  343. package/dist/zonos-elements/p-dc94d7eb.js +1 -0
  344. package/dist/zonos-elements/p-e5e64e16.system.js +1 -0
  345. package/dist/zonos-elements/{p-540cec7e.system.entry.js → p-e9e6bea7.system.entry.js} +1 -1
  346. package/dist/zonos-elements/p-eb9ee025.system.js +1 -0
  347. package/dist/zonos-elements/p-ed8ae947.system.entry.js +1 -0
  348. package/dist/zonos-elements/p-f1d9dd4e.entry.js +1 -0
  349. package/dist/zonos-elements/p-f3962950.system.entry.js +1 -0
  350. package/dist/zonos-elements/p-f4e976ae.entry.js +1 -0
  351. package/dist/zonos-elements/p-f513b231.entry.js +1 -0
  352. package/dist/zonos-elements/p-f64207fa.system.entry.js +1 -0
  353. package/dist/zonos-elements/{p-31975752.entry.js → p-fa322dc1.entry.js} +1 -1
  354. package/dist/zonos-elements/p-fb9fb873.system.entry.js +1 -0
  355. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  356. package/package.json +1 -1
  357. package/dist/cjs/localization-39516612.js +0 -884
  358. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +0 -168
  359. package/dist/esm/localization-c5029ffc.js +0 -863
  360. package/dist/esm/zonos-confirm-dialog_2.entry.js +0 -163
  361. package/dist/esm-es5/cart-14f305b3.js +0 -1
  362. package/dist/esm-es5/localization-c5029ffc.js +0 -1
  363. package/dist/esm-es5/placeTestOrder-2250f719.js +0 -1
  364. package/dist/esm-es5/renderFallback-dbf1e3ae.js +0 -1
  365. package/dist/esm-es5/shouldRenderTaxIdInput-8bc112bb.js +0 -1
  366. package/dist/esm-es5/translationStore-690c4e04.js +0 -1
  367. package/dist/esm-es5/zonos-address_11.entry.js +0 -1
  368. package/dist/esm-es5/zonos-banner_2.entry.js +0 -1
  369. package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
  370. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +0 -1
  371. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +0 -1
  372. package/dist/zonos-elements/p-03ff7b01.system.entry.js +0 -1
  373. package/dist/zonos-elements/p-100f6a88.system.entry.js +0 -1
  374. package/dist/zonos-elements/p-143d706b.entry.js +0 -1
  375. package/dist/zonos-elements/p-14d7489d.js +0 -1
  376. package/dist/zonos-elements/p-1d5aa016.system.js +0 -1
  377. package/dist/zonos-elements/p-1eae4987.entry.js +0 -1
  378. package/dist/zonos-elements/p-23b45714.system.entry.js +0 -1
  379. package/dist/zonos-elements/p-2557b96b.js +0 -1
  380. package/dist/zonos-elements/p-2ca8b037.entry.js +0 -1
  381. package/dist/zonos-elements/p-2dbcecf4.entry.js +0 -1
  382. package/dist/zonos-elements/p-30e835a8.entry.js +0 -1
  383. package/dist/zonos-elements/p-316f9052.system.entry.js +0 -1
  384. package/dist/zonos-elements/p-3185968f.entry.js +0 -1
  385. package/dist/zonos-elements/p-4e41143a.system.entry.js +0 -1
  386. package/dist/zonos-elements/p-52b87408.system.entry.js +0 -1
  387. package/dist/zonos-elements/p-561be3a2.system.js +0 -1
  388. package/dist/zonos-elements/p-5c680f72.js +0 -1
  389. package/dist/zonos-elements/p-5f77d19e.js +0 -1
  390. package/dist/zonos-elements/p-60469388.system.entry.js +0 -1
  391. package/dist/zonos-elements/p-652e80f0.system.js +0 -1
  392. package/dist/zonos-elements/p-74ca7739.entry.js +0 -1
  393. package/dist/zonos-elements/p-767a31a8.system.js +0 -1
  394. package/dist/zonos-elements/p-78a6e775.system.js +0 -1
  395. package/dist/zonos-elements/p-7c705c76.system.js +0 -1
  396. package/dist/zonos-elements/p-81ba2820.system.entry.js +0 -1
  397. package/dist/zonos-elements/p-8a23bbf5.js +0 -1
  398. package/dist/zonos-elements/p-905d2490.entry.js +0 -1
  399. package/dist/zonos-elements/p-93f2e1ee.system.entry.js +0 -1
  400. package/dist/zonos-elements/p-a0a4e43d.system.entry.js +0 -1
  401. package/dist/zonos-elements/p-a2819807.system.entry.js +0 -1
  402. package/dist/zonos-elements/p-a6e74856.entry.js +0 -1
  403. package/dist/zonos-elements/p-ae940a99.js +0 -1
  404. package/dist/zonos-elements/p-b7ea5f4f.system.entry.js +0 -1
  405. package/dist/zonos-elements/p-c1ecab92.entry.js +0 -1
  406. package/dist/zonos-elements/p-c50cc926.entry.js +0 -1
  407. package/dist/zonos-elements/p-cf765af3.system.js +0 -1
  408. package/dist/zonos-elements/p-e03e1a62.entry.js +0 -1
  409. package/dist/zonos-elements/p-e7874318.system.entry.js +0 -1
  410. package/dist/zonos-elements/p-e8949e7e.entry.js +0 -1
  411. package/dist/zonos-elements/p-ea0b5d10.system.js +0 -1
  412. package/dist/zonos-elements/p-eae3462c.entry.js +0 -1
  413. package/dist/zonos-elements/p-eeb1081e.js +0 -1
  414. package/dist/zonos-elements/p-f892595d.system.entry.js +0 -1
  415. package/dist/zonos-elements/p-fd3b46ee.entry.js +0 -1
@@ -6,6 +6,7 @@ import { zonosStore, zonosStoreFontFamily, zonosStoreInitSetting, } from "../sto
6
6
  import { getZonosSettings } from "../utils/api/getZonosSettings";
7
7
  import { initCheckout } from "../utils/checkout/initCheckout";
8
8
  import { initCollect } from "../utils/checkout/initCollect";
9
+ import { initInvoice } from "../utils/checkout/initInvoice";
9
10
  import { handleFetch } from "../utils/handleFetch";
10
11
  import { initHello } from "../utils/hello/initHello";
11
12
  import { CheckoutAddressService } from "../utils/iframe/CheckoutAddressService";
@@ -36,6 +37,18 @@ export class ZonosController {
36
37
  void initCollect();
37
38
  log('init Collect element');
38
39
  }
40
+ /**
41
+ * Method to initialize Collect element
42
+ */
43
+ async initInvoiceElement(stripe) {
44
+ if (!stripe) {
45
+ log('Stripe is not loaded yet - cannot init Invoice element', 'warn');
46
+ return;
47
+ }
48
+ stripeStore.stripe = stripe;
49
+ void initInvoice();
50
+ log('init Invoice element');
51
+ }
39
52
  /**
40
53
  * Init zonos notification
41
54
  */
@@ -108,7 +121,9 @@ export class ZonosController {
108
121
  return;
109
122
  }
110
123
  // Skip injecting custom HTML for legacy checkout and collect
111
- if (!window.Zonos.isLegacyCheckout || window.Zonos.isCollect) {
124
+ if (!window.Zonos.isLegacyCheckout ||
125
+ window.Zonos.isCollect ||
126
+ window.Zonos.isInvoice) {
112
127
  log('=== Skip injecting custom HTML for hosted checkout', 'info');
113
128
  return;
114
129
  }
@@ -157,7 +172,7 @@ export class ZonosController {
157
172
  // Don't allow to override subscription status
158
173
  subscriptionStatus: undefined
159
174
  });
160
- if (window.Zonos.isCollect) {
175
+ if (window.Zonos.isCollect || window.Zonos.isInvoice) {
161
176
  return Object.assign(Object.assign({}, this.config), { checkoutSettings: baseCheckoutConfig, helloSettings: Object.assign(Object.assign({}, this.config.helloSettings), {
162
177
  // No need to show hello for collect
163
178
  visibilityStatus: 'DISABLED'
@@ -235,7 +250,7 @@ export class ZonosController {
235
250
  log('Checkout failed to load -- missing publishable key', 'warn');
236
251
  return;
237
252
  }
238
- if (window.Zonos.isCollect) {
253
+ if (window.Zonos.isCollect || window.Zonos.isInvoice) {
239
254
  // send publishable key out to load stripe
240
255
  this.stripeInitEvent.emit({
241
256
  publishableKey: publishableKey.token,
@@ -313,7 +328,7 @@ export class ZonosController {
313
328
  zonosStore.organizationName = organizationName;
314
329
  }
315
330
  render() {
316
- return h(Host, { key: 'c3c33e5e4422b4b05f68fc876a23eb30c9b0f11d', class: "zonos--elements" });
331
+ return h(Host, { key: '8ac43cd7dc03d654f554022653f3e852876b954b', class: "zonos--elements" });
317
332
  }
318
333
  static get is() { return "zonos-controller"; }
319
334
  static get encapsulation() { return "shadow"; }
@@ -460,6 +475,32 @@ export class ZonosController {
460
475
  "tags": []
461
476
  }
462
477
  },
478
+ "initInvoiceElement": {
479
+ "complexType": {
480
+ "signature": "(stripe: Stripe) => Promise<void>",
481
+ "parameters": [{
482
+ "name": "stripe",
483
+ "type": "Stripe",
484
+ "docs": ""
485
+ }],
486
+ "references": {
487
+ "Promise": {
488
+ "location": "global",
489
+ "id": "global::Promise"
490
+ },
491
+ "Stripe": {
492
+ "location": "import",
493
+ "path": "@stripe/stripe-js",
494
+ "id": "node_modules::Stripe"
495
+ }
496
+ },
497
+ "return": "Promise<void>"
498
+ },
499
+ "docs": {
500
+ "text": "Method to initialize Collect element",
501
+ "tags": []
502
+ }
503
+ },
463
504
  "setupGoogleFont": {
464
505
  "complexType": {
465
506
  "signature": "(overrideFont?: string) => Promise<void>",
@@ -52,7 +52,7 @@ export class ZonosPaypalPayment {
52
52
  this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
53
53
  }
54
54
  render() {
55
- return (h(Host, { key: 'bcf11ef0ceab1d847c237ec26ec604440983c16f', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: 'ce5033f39b2e9644e30fc1e0e35f64e5d9b9730d', class: "zonos--payment-paypal-container" })));
55
+ return (h(Host, { key: '503c2a2f4d6dd0d6c10468f4bbe915610cf7008e', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: 'c1d2c15bf6f096c3666f9d4e8085c5fbe2c637a7', class: "zonos--payment-paypal-container" })));
56
56
  }
57
57
  static get is() { return "zonos-paypal-payment"; }
58
58
  static get encapsulation() { return "scoped"; }
@@ -0,0 +1,148 @@
1
+ import { createStore } from "@stencil/store";
2
+ import { cartStore, cartStoreUpdateSelectedShippingOption, } from "./cart";
3
+ import { stripeStore, stripeStoreBuildAddressForPartyCreate, } from "./stripe";
4
+ import { storageStore } from "../storageStore";
5
+ import { zonosStore } from "../zonosStore";
6
+ import { handleFetch } from "../../utils/handleFetch";
7
+ import { allLogs } from "../../utils/logging/log";
8
+ import { logError } from "../../utils/logging/logError";
9
+ import { sendErrorLog } from "../../utils/logging/sendErrorLog";
10
+ const { reset: invoiceStoreReset, state: invoiceStore } = createStore(() => ({
11
+ amountTotalDue: null,
12
+ isFetchingPayorInfo: true,
13
+ landedCostShortId: null,
14
+ partyBillingId: null,
15
+ payorAddress: null,
16
+ }));
17
+ const invoiceStoreInitShippingInfo = async ({ landedCostId, retries = 5, }) => {
18
+ var _a, _b, _c;
19
+ invoiceStore.isFetchingPayorInfo = true;
20
+ const response = await handleFetch('/api/zonos-elements/invoice/get-payor-info-by-lc-id', {
21
+ body: {
22
+ landedCostId,
23
+ },
24
+ method: 'POST',
25
+ });
26
+ if (response.errors.length) {
27
+ if (retries > 0) {
28
+ // Wait for 1 second before retrying
29
+ await new Promise(resolve => setTimeout(resolve, 1000));
30
+ // Keep retrying until we get the shipping address or we run out of retries
31
+ return invoiceStoreInitShippingInfo({
32
+ landedCostId,
33
+ retries: retries - 1,
34
+ });
35
+ }
36
+ return null;
37
+ }
38
+ invoiceStore.landedCostShortId = ((_a = response.json) === null || _a === void 0 ? void 0 : _a.landedCostShortId) || null;
39
+ invoiceStore.isFetchingPayorInfo = false;
40
+ invoiceStore.payorAddress = ((_b = response.json) === null || _b === void 0 ? void 0 : _b.payor) || null;
41
+ const checkoutSessionSubtotals = (_c = cartStore.checkoutSession) === null || _c === void 0 ? void 0 : _c.subtotals;
42
+ invoiceStore.amountTotalDue = (checkoutSessionSubtotals === null || checkoutSessionSubtotals === void 0 ? void 0 : checkoutSessionSubtotals.items) || 0;
43
+ if (invoiceStore.amountTotalDue === 0) {
44
+ void sendErrorLog({
45
+ endpoint: 'INVOICE_NO_TOTAL_DUE',
46
+ errors: [],
47
+ metadata: {
48
+ landedCostId,
49
+ organizationId: zonosStore.organizationId,
50
+ },
51
+ });
52
+ }
53
+ };
54
+ const invoiceStoreAsyncAddressUpdate = async () => {
55
+ var _a, _b, _c, _d;
56
+ if (!((_a = stripeStore.stripeBillingAddressEventData) === null || _a === void 0 ? void 0 : _a.complete)) {
57
+ return {
58
+ partiesCreated: false,
59
+ };
60
+ }
61
+ const landedCostRootId = (_c = (_b = cartStore.checkoutSession) === null || _b === void 0 ? void 0 : _b.landedCost) === null || _c === void 0 ? void 0 : _c.rootId;
62
+ if (!landedCostRootId) {
63
+ // do nothing if we don't have selected landed cost
64
+ void sendErrorLog({
65
+ endpoint: 'PF_NO_SELECTED_LANDED_COST',
66
+ errors: ['No selected landed cost'],
67
+ metadata: {
68
+ allLogs,
69
+ cartId: window.Zonos.cartId,
70
+ checkoutSessionId: storageStore.checkoutSessionId,
71
+ },
72
+ });
73
+ return {
74
+ partiesCreated: false,
75
+ };
76
+ }
77
+ if (!storageStore.checkoutSessionId) {
78
+ void sendErrorLog({
79
+ endpoint: 'INVOICE_NO_CHECKOUT_SESSION_ID',
80
+ errors: ['No checkout session id'],
81
+ metadata: {
82
+ allLogs,
83
+ cartId: window.Zonos.cartId,
84
+ landedCostRootId,
85
+ },
86
+ });
87
+ return {
88
+ partiesCreated: false,
89
+ };
90
+ }
91
+ const billingAddress = stripeStoreBuildAddressForPartyCreate({
92
+ address: stripeStore.stripeBillingAddressEventData.value.address,
93
+ firstName: stripeStore.stripeBillingAddressEventData.value.firstName,
94
+ lastName: stripeStore.stripeBillingAddressEventData.value.lastName,
95
+ name: stripeStore.stripeBillingAddressEventData.value.name,
96
+ phone: stripeStore.stripeBillingAddressEventData.value.phone,
97
+ });
98
+ const isE2ETest = new URLSearchParams(window.location.search).get('zonosE2ETest') === '1';
99
+ const { errors, json } = await handleFetch('/api/zonos-elements/create-billing-party', {
100
+ body: {
101
+ billingAddress,
102
+ checkoutSessionId: storageStore.checkoutSessionId,
103
+ companyName: stripeStore.companyName,
104
+ email: ((_d = stripeStore.stripeLinkEventData) === null || _d === void 0 ? void 0 : _d.value.email) || '',
105
+ isTest: isE2ETest,
106
+ rootId: landedCostRootId,
107
+ },
108
+ method: 'POST',
109
+ });
110
+ if (errors.length || !json) {
111
+ logError('Error occurs when creating billing party', JSON.stringify(errors, null, 2));
112
+ void sendErrorLog({
113
+ endpoint: 'INVOICE_BILLING_PARTY_CREATE_FAILED',
114
+ errors: ['[INVOICE] Failed to create billing party'],
115
+ metadata: {
116
+ allLogs,
117
+ cartId: window.Zonos.cartId,
118
+ checkoutSessionId: storageStore.checkoutSessionId,
119
+ errors,
120
+ json,
121
+ },
122
+ });
123
+ return {
124
+ partiesCreated: false,
125
+ };
126
+ }
127
+ invoiceStore.partyBillingId = json.billToPartyId;
128
+ return {
129
+ partiesCreated: true,
130
+ };
131
+ };
132
+ const invoiceStoreUpdateSelectedShippingOption = async (checkoutSession) => {
133
+ const landedCost = checkoutSession.landedCost;
134
+ if (!landedCost) {
135
+ return false;
136
+ }
137
+ // Convert the landed cost to the format that cartStore expects
138
+ cartStore.landedCostData = [
139
+ Object.assign(Object.assign({}, checkoutSession), { landedCost: Object.assign({}, landedCost), landedCostId: landedCost.id }),
140
+ ];
141
+ return cartStoreUpdateSelectedShippingOption({
142
+ // No need to update checkout session again, we already called it when starting collect, only need to apply subtotals here to utilize the cart store
143
+ applySubtotalsOnly: true,
144
+ landedCostId: landedCost.id,
145
+ selectedShippingOption: landedCost.shipmentRating,
146
+ });
147
+ };
148
+ export { invoiceStore, invoiceStoreAsyncAddressUpdate, invoiceStoreInitShippingInfo, invoiceStoreReset, invoiceStoreUpdateSelectedShippingOption, };
@@ -94,7 +94,10 @@ const { onChange: stripeStoreOnChange, reset, state: stripeStore, } = createStor
94
94
  const getStripeOptions = ({ clientSecret, overrideBorderRadius, overridePrimaryColor, overrideSecondaryColor, overrideTheme, paypalEnabled, }) => {
95
95
  const primaryColor = overridePrimaryColor || zonosStore.appearance.colorPrimary;
96
96
  const secondaryColor = overrideSecondaryColor || zonosStore.appearance.colorSecondary;
97
- const themeBasedColor = primaryColor && isDarkColor(primaryColor) ? 'night' : 'flat';
97
+ const isDark = window.Zonos.isCollect || window.Zonos.isInvoice
98
+ ? zonosStore.appearance.theme === 'DARK'
99
+ : primaryColor && isDarkColor(primaryColor);
100
+ const themeBasedColor = isDark ? 'night' : 'flat';
98
101
  // if overrideTheme is provided, use it. Otherwise, use theme based on primary color
99
102
  const theme = overrideTheme === 'DARK' ? 'night' : 'flat';
100
103
  const paypalPaymentType = paypalEnabled ? ['external_paypal'] : [];
@@ -630,6 +633,7 @@ const stripeStoreMessageBasedOnStatus = (status) => {
630
633
  let messages = [];
631
634
  let isError = true;
632
635
  const isCollect = window.Zonos.isCollect;
636
+ const isInvoice = window.Zonos.isInvoice;
633
637
  // Inspect the PaymentIntent `status` to indicate the status of the payment
634
638
  // to your customer.
635
639
  //
@@ -644,7 +648,7 @@ const stripeStoreMessageBasedOnStatus = (status) => {
644
648
  '',
645
649
  translate("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time."),
646
650
  ];
647
- if (isCollect) {
651
+ if (isCollect || isInvoice) {
648
652
  messages = [
649
653
  translate('Thank you for submitting your payment. We appreciate your prompt attention.'),
650
654
  '',
@@ -852,7 +856,8 @@ export const getCheckoutSessionBody = () => {
852
856
  cartId: window.Zonos.cartId,
853
857
  currency: ((_a = cartStore.items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode) || '',
854
858
  customerAuthenticationToken: cartStore.customerAuthenticationToken || undefined,
855
- isCollect: window.Zonos.isCollect,
859
+ isCollect: !!window.Zonos.isCollect,
860
+ isInvoice: !!window.Zonos.isInvoice,
856
861
  itemsAmount: total,
857
862
  metadata: [
858
863
  {
@@ -278,6 +278,9 @@ export const stringsArabic = {
278
278
  'Invalid session': {
279
279
  value: 'جلسة غير صالحة',
280
280
  },
281
+ 'Invoice:': {
282
+ value: 'فاتورة:',
283
+ },
281
284
  Island: {
282
285
  value: 'جزيرة',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsArabic = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: 'جارٍ معالجة الدفع. سنحدثك عند استلام الدفعة.',
394
397
  },
398
+ 'Payment total': {
399
+ value: 'إجمالي الدفع',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: 'رمز تخليص العملاء الشخصيين',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsArabic = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: 'دفع الرسوم والضرائب مقدمًا عند الدفع',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'سياسة الخصوصية',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: 'المتابعة مع الطلب',
439
448
  },
@@ -279,6 +279,9 @@ export const stringsBase = {
279
279
  'Invalid session': {
280
280
  value: 'Invalid session',
281
281
  },
282
+ 'Invoice:': {
283
+ value: 'Invoice:',
284
+ },
282
285
  Island: {
283
286
  value: 'Island',
284
287
  },
@@ -393,6 +396,9 @@ export const stringsBase = {
393
396
  "Payment processing. We'll update you when payment is received.": {
394
397
  value: "Payment processing. We'll update you when payment is received.",
395
398
  },
399
+ 'Payment total': {
400
+ value: 'Payment total',
401
+ },
396
402
  'Personal Customers Clearance Code': {
397
403
  value: 'Personal Customers Clearance Code',
398
404
  },
@@ -435,6 +441,9 @@ export const stringsBase = {
435
441
  'Prepay duties and taxes at checkout': {
436
442
  value: 'Prepay duties and taxes at checkout',
437
443
  },
444
+ 'Privacy policy': {
445
+ value: 'Privacy policy',
446
+ },
438
447
  'Proceed with order': {
439
448
  value: 'Proceed with order',
440
449
  },
@@ -278,6 +278,9 @@ export const stringsChinese = {
278
278
  'Invalid session': {
279
279
  value: '无效的会话',
280
280
  },
281
+ 'Invoice:': {
282
+ value: '发票:',
283
+ },
281
284
  Island: {
282
285
  value: '岛',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsChinese = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: '付款处理中。付款收到后,我们将通知您。',
394
397
  },
398
+ 'Payment total': {
399
+ value: '付款总额',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: '个人客户清关代码',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsChinese = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: '在结账时预付关税和税款',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: '隐私政策',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: '继续订单',
439
448
  },
@@ -278,6 +278,9 @@ export const stringsDanish = {
278
278
  'Invalid session': {
279
279
  value: 'Ugyldig session',
280
280
  },
281
+ 'Invoice:': {
282
+ value: 'Faktura:',
283
+ },
281
284
  Island: {
282
285
  value: 'Ø',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsDanish = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: 'Behandler betaling. Vi opdaterer dig, når betalingen er modtaget.',
394
397
  },
398
+ 'Payment total': {
399
+ value: 'Betaling i alt',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: 'Personlige Kunders Toldkode',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsDanish = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: 'Betal told og skatter på forhånd ved kassen',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'Privatlivspolitik',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: 'Fortsæt med ordren',
439
448
  },
@@ -278,6 +278,9 @@ export const stringsDutch = {
278
278
  'Invalid session': {
279
279
  value: 'Ongeldige sessie',
280
280
  },
281
+ 'Invoice:': {
282
+ value: 'Factuur:',
283
+ },
281
284
  Island: {
282
285
  value: 'Eiland',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsDutch = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: 'Betaling verwerken. We brengen je op de hoogte wanneer de betaling is ontvangen.',
394
397
  },
398
+ 'Payment total': {
399
+ value: 'Betalingstotaal',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: 'Persoonlijke Klanten Invoercode',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsDutch = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: 'Heffingen en belastingen vooraf betalen bij het afrekenen',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'Privacybeleid',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: 'Doorgaan met de bestelling',
439
448
  },
@@ -278,6 +278,9 @@ export const stringsFrench = {
278
278
  'Invalid session': {
279
279
  value: 'Session invalide',
280
280
  },
281
+ 'Invoice:': {
282
+ value: 'Facture:',
283
+ },
281
284
  Island: {
282
285
  value: 'Île',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsFrench = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: 'Traitement du paiement en cours. Nous vous tiendrons informé dès réception du paiement.',
394
397
  },
398
+ 'Payment total': {
399
+ value: 'Total du paiement',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: 'Code de Dédouanement des Clients Personnels',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsFrench = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: "Payez les droits et taxes à l'avance lors du checkout",
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'Politique de confidentialité',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: 'Procéder à la commande',
439
448
  },
@@ -278,6 +278,9 @@ export const stringsGerman = {
278
278
  'Invalid session': {
279
279
  value: 'Ungültige Sitzung',
280
280
  },
281
+ 'Invoice:': {
282
+ value: 'Rechnung:',
283
+ },
281
284
  Island: {
282
285
  value: 'Insel',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsGerman = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: 'Zahlung wird verarbeitet. Wir informieren Sie, sobald die Zahlung eingegangen ist.',
394
397
  },
398
+ 'Payment total': {
399
+ value: 'Zahlungssumme',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: 'Zollabfertigungscode für Privatkunden',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsGerman = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: 'Zölle und Steuern im Voraus bezahlen',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'Datenschutzrichtlinie',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: 'Mit der Bestellung fortfahren',
439
448
  },
@@ -278,6 +278,9 @@ export const stringsHebrew = {
278
278
  'Invalid session': {
279
279
  value: 'סשן לא חוקי',
280
280
  },
281
+ 'Invoice:': {
282
+ value: 'חשבונית:',
283
+ },
281
284
  Island: {
282
285
  value: 'אי',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsHebrew = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: 'התשלום מעובד. נעדכן אותך כשהתשלום יתקבל.',
394
397
  },
398
+ 'Payment total': {
399
+ value: 'סך התשלום',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: 'קוד שחרור מכס ללקוחות פרטיים',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsHebrew = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: 'שלם מכסים ומסים מראש בעת התשלום',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'מדיניות פרטיות',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: 'המשך עם ההזמנה',
439
448
  },
@@ -278,6 +278,9 @@ export const stringsIndonesian = {
278
278
  'Invalid session': {
279
279
  value: 'Sesi tidak valid',
280
280
  },
281
+ 'Invoice:': {
282
+ value: 'Faktur:',
283
+ },
281
284
  Island: {
282
285
  value: 'Pulau',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsIndonesian = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: 'Pemrosesan pembayaran. Kami akan memberi Anda pembaruan ketika pembayaran diterima.',
394
397
  },
398
+ 'Payment total': {
399
+ value: 'Total pembayaran',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: 'Kode Pembebasan Pelanggan Pribadi',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsIndonesian = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: 'Pembayaran bea masuk dan pajak di kasir',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'Kebijakan privasi',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: 'Lanjutkan dengan pesanan',
439
448
  },
@@ -278,6 +278,9 @@ export const stringsItalian = {
278
278
  'Invalid session': {
279
279
  value: 'Sessione non valida',
280
280
  },
281
+ 'Invoice:': {
282
+ value: 'Fattura:',
283
+ },
281
284
  Island: {
282
285
  value: 'Isola',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsItalian = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: 'Elaborazione pagamento in corso. Ti aggiorneremo quando il pagamento sarà ricevuto.',
394
397
  },
398
+ 'Payment total': {
399
+ value: 'Totale del pagamento',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: 'Codice di Sdoganamento per Clienti Personali',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsItalian = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: 'Paga dazi e tasse anticipatamente',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'Informativa sulla privacy',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: "Procedi con l'ordine",
439
448
  },
@@ -278,6 +278,9 @@ export const stringsJapanese = {
278
278
  'Invalid session': {
279
279
  value: '無効なセッション',
280
280
  },
281
+ 'Invoice:': {
282
+ value: '請求書:',
283
+ },
281
284
  Island: {
282
285
  value: '島',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsJapanese = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: '支払処理中です。入金が確認された際に更新いたします。',
394
397
  },
398
+ 'Payment total': {
399
+ value: '支払い合計',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: '個人顧客通関コード',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsJapanese = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: ' checkout時に関税と税金を前払い',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: 'プライバシーポリシー',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: '注文を進める',
439
448
  },
@@ -278,6 +278,9 @@ export const stringsKorean = {
278
278
  'Invalid session': {
279
279
  value: '유효하지 않은 세션',
280
280
  },
281
+ 'Invoice:': {
282
+ value: '송장:',
283
+ },
281
284
  Island: {
282
285
  value: '섬',
283
286
  },
@@ -392,6 +395,9 @@ export const stringsKorean = {
392
395
  "Payment processing. We'll update you when payment is received.": {
393
396
  value: '결제 처리 중. 결제가 접수되면 알려드리겠습니다.',
394
397
  },
398
+ 'Payment total': {
399
+ value: '결제 총액',
400
+ },
395
401
  'Personal Customers Clearance Code': {
396
402
  value: '개인 고객 통관 코드',
397
403
  },
@@ -434,6 +440,9 @@ export const stringsKorean = {
434
440
  'Prepay duties and taxes at checkout': {
435
441
  value: '체크아웃 시 관세와 세금 선불',
436
442
  },
443
+ 'Privacy policy': {
444
+ value: '개인정보 처리방침',
445
+ },
437
446
  'Proceed with order': {
438
447
  value: '주문 진행',
439
448
  },