@zonos/elements 1.3.233 → 1.3.235

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 (420) 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} +75 -92
  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 +468 -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-invoice/assets/ChevronDownIcon.svg +1 -0
  48. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/assets/empty-item.jpeg +0 -0
  49. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.css +72 -0
  50. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +87 -0
  51. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/RemoveIcon.svg +1 -0
  52. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/SuccessIcon.svg +1 -0
  53. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.css +90 -0
  54. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +405 -0
  55. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/chevronDownIcon.svg +1 -0
  56. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/globe.svg +3 -0
  57. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconDark.svg +10 -0
  58. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconLight.svg +10 -0
  59. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosWordmark.svg +7 -0
  60. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +155 -0
  61. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +165 -0
  62. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronDownIcon.svg +1 -0
  63. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronUpIcon.svg +1 -0
  64. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.css +117 -0
  65. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +175 -0
  66. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/CheckmarkLineIcon.svg +1 -0
  67. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/RemoveLineIcon.svg +1 -0
  68. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.css +98 -0
  69. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +368 -0
  70. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.css +71 -0
  71. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +151 -0
  72. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.css +83 -0
  73. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +65 -0
  74. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.css +350 -0
  75. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +547 -0
  76. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  77. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  78. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  79. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  80. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  81. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  82. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  83. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  84. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  85. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  86. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  87. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  88. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  89. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  90. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  91. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  92. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  93. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  94. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  95. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +5 -5
  96. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  97. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  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 +45 -4
  106. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  107. package/dist/collection/components/store/checkout/invoice.js +148 -0
  108. package/dist/collection/components/store/checkout/stripe.js +8 -3
  109. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  110. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  111. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  112. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  113. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  114. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  115. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  116. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  117. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  118. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  119. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  120. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  121. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  122. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  123. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  124. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  125. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  126. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  127. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  128. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  129. package/dist/collection/components/stripe/zonos-address/zonos-address.js +8 -5
  130. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  131. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  132. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  133. package/dist/collection/components/utils/checkout/initInvoice.js +15 -0
  134. package/dist/collection/components/utils/checkout/isInvoiceMobileTablet.js +10 -0
  135. package/dist/collection/scripts/_zonosBase.js +4 -0
  136. package/dist/collection/types/generated/graphql.frontend.types.js +4 -0
  137. package/dist/collection/types/generated/graphql.internal.types.js +239 -5
  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} +15 -31
  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 +464 -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/api/getLocaleMessages.d.ts +1 -1
  263. package/dist/types/components/utils/checkout/initInvoice.d.ts +1 -0
  264. package/dist/types/components/utils/checkout/isInvoiceMobileTablet.d.ts +4 -0
  265. package/dist/types/components.d.ts +351 -0
  266. package/dist/types/scripts/_zonosBase.d.ts +5 -0
  267. package/dist/types/types/checkout/api/CheckoutSession.d.ts +4 -0
  268. package/dist/types/types/checkout/api/PartyInfo.d.ts +21 -0
  269. package/dist/types/types/generated/graphql.frontend.types.d.ts +5 -1
  270. package/dist/types/types/generated/graphql.frontend.types.ts +5 -1
  271. package/dist/types/types/generated/graphql.internal.types.d.ts +285 -8
  272. package/dist/types/types/generated/graphql.internal.types.ts +367 -10
  273. package/dist/zonos-elements/index.esm.js +1 -1
  274. package/dist/zonos-elements/p-00719e49.entry.js +1 -0
  275. package/dist/zonos-elements/p-01b0a2e2.js +1 -0
  276. package/dist/zonos-elements/p-01dada4e.js +1 -0
  277. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  278. package/dist/zonos-elements/p-0cd5bcb3.entry.js +1 -0
  279. package/dist/zonos-elements/p-0e82fcea.entry.js +1 -0
  280. package/dist/zonos-elements/p-10316d4d.system.entry.js +1 -0
  281. package/dist/zonos-elements/{p-0a90dd80.system.entry.js → p-121c60c1.system.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-bf9d889f.entry.js → p-14314ad3.entry.js} +1 -1
  283. package/dist/zonos-elements/p-170314a3.js +1 -0
  284. package/dist/zonos-elements/p-17a09191.entry.js +1 -0
  285. package/dist/zonos-elements/p-18bc6c7a.entry.js +1 -0
  286. package/dist/zonos-elements/{p-a25428eb.system.js → p-18d20206.system.js} +2 -2
  287. package/dist/zonos-elements/p-1a30fe18.system.entry.js +1 -0
  288. package/dist/zonos-elements/{p-c7b658cb.entry.js → p-1c4d12f0.entry.js} +1 -1
  289. package/dist/zonos-elements/p-1f3549c6.js +1 -0
  290. package/dist/zonos-elements/p-2250e585.entry.js +1 -0
  291. package/dist/zonos-elements/p-248dd596.system.entry.js +1 -0
  292. package/dist/zonos-elements/{p-5f398c28.entry.js → p-264690d7.entry.js} +1 -1
  293. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  294. package/dist/zonos-elements/p-27f6930b.js +1 -0
  295. package/dist/zonos-elements/{p-eea0eb57.system.entry.js → p-2f869f2c.system.entry.js} +1 -1
  296. package/dist/zonos-elements/p-30c661b3.system.entry.js +1 -0
  297. package/dist/zonos-elements/p-34bf7bbe.system.js +1 -0
  298. package/dist/zonos-elements/p-38913b2f.entry.js +1 -0
  299. package/dist/zonos-elements/p-3bec13dd.system.js +1 -0
  300. package/dist/zonos-elements/{p-00ec22b2.entry.js → p-43a22d85.entry.js} +1 -1
  301. package/dist/zonos-elements/p-44b50260.entry.js +1 -0
  302. package/dist/zonos-elements/p-48dc96f9.system.entry.js +1 -0
  303. package/dist/zonos-elements/p-4aa86184.system.entry.js +1 -0
  304. package/dist/zonos-elements/p-4d594c8e.system.js +1 -0
  305. package/dist/zonos-elements/p-4ffbb0d6.system.js +1 -0
  306. package/dist/zonos-elements/{p-452fb638.system.entry.js → p-5062dcf3.system.entry.js} +1 -1
  307. package/dist/zonos-elements/p-50f31c12.system.entry.js +1 -0
  308. package/dist/zonos-elements/{p-c5cb2364.system.entry.js → p-57cee1b5.system.entry.js} +1 -1
  309. package/dist/zonos-elements/p-59a76f73.entry.js +1 -0
  310. package/dist/zonos-elements/{p-d556c6d1.system.entry.js → p-5afb9260.system.entry.js} +1 -1
  311. package/dist/zonos-elements/{p-88ea9f82.entry.js → p-6626d240.entry.js} +1 -1
  312. package/dist/zonos-elements/p-6688473e.entry.js +1 -0
  313. package/dist/zonos-elements/p-6f23a26a.system.js +1 -0
  314. package/dist/zonos-elements/{p-82739127.js → p-73c737aa.js} +2 -2
  315. package/dist/zonos-elements/p-757d4c62.system.entry.js +1 -0
  316. package/dist/zonos-elements/p-7aa50ef2.entry.js +1 -0
  317. package/dist/zonos-elements/p-7e17667d.js +1 -0
  318. package/dist/zonos-elements/p-7e469c5c.entry.js +1 -0
  319. package/dist/zonos-elements/p-7f91617c.system.entry.js +1 -0
  320. package/dist/zonos-elements/p-81e3eb5b.js +1 -0
  321. package/dist/zonos-elements/p-82febf70.system.js +1 -0
  322. package/dist/zonos-elements/{p-770852bf.system.entry.js → p-836db369.system.entry.js} +1 -1
  323. package/dist/zonos-elements/p-83b3f824.system.entry.js +1 -0
  324. package/dist/zonos-elements/p-851011aa.system.entry.js +1 -0
  325. package/dist/zonos-elements/{p-936b54c1.entry.js → p-865536f0.entry.js} +1 -1
  326. package/dist/zonos-elements/{p-b1fd1ec2.system.entry.js → p-8792fef2.system.entry.js} +1 -1
  327. package/dist/zonos-elements/p-890bfc42.system.entry.js +1 -0
  328. package/dist/zonos-elements/{p-c288c6da.system.entry.js → p-89a5e936.system.entry.js} +1 -1
  329. package/dist/zonos-elements/p-8af188f8.system.js +1 -0
  330. package/dist/zonos-elements/p-8d3a62fb.entry.js +1 -0
  331. package/dist/zonos-elements/{p-00ac999f.system.entry.js → p-8dc025c7.system.entry.js} +1 -1
  332. package/dist/zonos-elements/p-944d00da.entry.js +1 -0
  333. package/dist/zonos-elements/p-9479f155.system.js +1 -0
  334. package/dist/zonos-elements/p-95dc475b.system.js +1 -0
  335. package/dist/zonos-elements/p-976afc17.system.js +1 -0
  336. package/dist/zonos-elements/p-9b9bfb6d.entry.js +1 -0
  337. package/dist/zonos-elements/{p-55e2e4ed.entry.js → p-9f1bd9b8.entry.js} +1 -1
  338. package/dist/zonos-elements/p-9fa32fdf.js +1 -0
  339. package/dist/zonos-elements/p-a2a0bf4e.js +1 -0
  340. package/dist/zonos-elements/p-a610c24e.system.entry.js +1 -0
  341. package/dist/zonos-elements/{p-9b8750f3.entry.js → p-aedd3911.entry.js} +1 -1
  342. package/dist/zonos-elements/{p-db628e49.system.entry.js → p-b5c31ca4.system.entry.js} +1 -1
  343. package/dist/zonos-elements/p-ba456282.system.entry.js +1 -0
  344. package/dist/zonos-elements/{p-31af91f0.entry.js → p-bd603c1a.entry.js} +1 -1
  345. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  346. package/dist/zonos-elements/p-c8cc20d9.system.js +1 -0
  347. package/dist/zonos-elements/p-dc5fb21c.js +1 -0
  348. package/dist/zonos-elements/p-dc94d7eb.js +1 -0
  349. package/dist/zonos-elements/{p-540cec7e.system.entry.js → p-e9e6bea7.system.entry.js} +1 -1
  350. package/dist/zonos-elements/p-eb9ee025.system.js +1 -0
  351. package/dist/zonos-elements/p-ed8ae947.system.entry.js +1 -0
  352. package/dist/zonos-elements/p-f1d4d6da.entry.js +1 -0
  353. package/dist/zonos-elements/p-f1d9dd4e.entry.js +1 -0
  354. package/dist/zonos-elements/p-f3962950.system.entry.js +1 -0
  355. package/dist/zonos-elements/p-f4e976ae.entry.js +1 -0
  356. package/dist/zonos-elements/p-f513b231.entry.js +1 -0
  357. package/dist/zonos-elements/p-f64207fa.system.entry.js +1 -0
  358. package/dist/zonos-elements/{p-31975752.entry.js → p-fa322dc1.entry.js} +1 -1
  359. package/dist/zonos-elements/p-fb9fb873.system.entry.js +1 -0
  360. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  361. package/package.json +1 -1
  362. package/dist/cjs/localization-39516612.js +0 -884
  363. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +0 -168
  364. package/dist/esm/localization-c5029ffc.js +0 -863
  365. package/dist/esm/zonos-confirm-dialog_2.entry.js +0 -163
  366. package/dist/esm-es5/cart-14f305b3.js +0 -1
  367. package/dist/esm-es5/localization-c5029ffc.js +0 -1
  368. package/dist/esm-es5/placeTestOrder-2250f719.js +0 -1
  369. package/dist/esm-es5/renderFallback-dbf1e3ae.js +0 -1
  370. package/dist/esm-es5/shouldRenderTaxIdInput-8bc112bb.js +0 -1
  371. package/dist/esm-es5/translationStore-690c4e04.js +0 -1
  372. package/dist/esm-es5/zonos-address_11.entry.js +0 -1
  373. package/dist/esm-es5/zonos-banner_2.entry.js +0 -1
  374. package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
  375. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +0 -1
  376. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +0 -1
  377. package/dist/zonos-elements/p-03ff7b01.system.entry.js +0 -1
  378. package/dist/zonos-elements/p-100f6a88.system.entry.js +0 -1
  379. package/dist/zonos-elements/p-143d706b.entry.js +0 -1
  380. package/dist/zonos-elements/p-14d7489d.js +0 -1
  381. package/dist/zonos-elements/p-1bfae137.entry.js +0 -1
  382. package/dist/zonos-elements/p-1d5aa016.system.js +0 -1
  383. package/dist/zonos-elements/p-1eae4987.entry.js +0 -1
  384. package/dist/zonos-elements/p-23b45714.system.entry.js +0 -1
  385. package/dist/zonos-elements/p-2557b96b.js +0 -1
  386. package/dist/zonos-elements/p-2ca8b037.entry.js +0 -1
  387. package/dist/zonos-elements/p-2dbcecf4.entry.js +0 -1
  388. package/dist/zonos-elements/p-316f9052.system.entry.js +0 -1
  389. package/dist/zonos-elements/p-3185968f.entry.js +0 -1
  390. package/dist/zonos-elements/p-4e41143a.system.entry.js +0 -1
  391. package/dist/zonos-elements/p-52b87408.system.entry.js +0 -1
  392. package/dist/zonos-elements/p-561be3a2.system.js +0 -1
  393. package/dist/zonos-elements/p-5c680f72.js +0 -1
  394. package/dist/zonos-elements/p-5f77d19e.js +0 -1
  395. package/dist/zonos-elements/p-74ca7739.entry.js +0 -1
  396. package/dist/zonos-elements/p-767a31a8.system.js +0 -1
  397. package/dist/zonos-elements/p-78a6e775.system.js +0 -1
  398. package/dist/zonos-elements/p-7c705c76.system.js +0 -1
  399. package/dist/zonos-elements/p-81ba2820.system.entry.js +0 -1
  400. package/dist/zonos-elements/p-84078c57.system.js +0 -1
  401. package/dist/zonos-elements/p-8a23bbf5.js +0 -1
  402. package/dist/zonos-elements/p-905d2490.entry.js +0 -1
  403. package/dist/zonos-elements/p-93f2e1ee.system.entry.js +0 -1
  404. package/dist/zonos-elements/p-a0a4e43d.system.entry.js +0 -1
  405. package/dist/zonos-elements/p-a2819807.system.entry.js +0 -1
  406. package/dist/zonos-elements/p-a6e74856.entry.js +0 -1
  407. package/dist/zonos-elements/p-ae940a99.js +0 -1
  408. package/dist/zonos-elements/p-b7ea5f4f.system.entry.js +0 -1
  409. package/dist/zonos-elements/p-c0c458f7.system.entry.js +0 -1
  410. package/dist/zonos-elements/p-c1ecab92.entry.js +0 -1
  411. package/dist/zonos-elements/p-c50cc926.entry.js +0 -1
  412. package/dist/zonos-elements/p-cf765af3.system.js +0 -1
  413. package/dist/zonos-elements/p-e03e1a62.entry.js +0 -1
  414. package/dist/zonos-elements/p-e7874318.system.entry.js +0 -1
  415. package/dist/zonos-elements/p-e8949e7e.entry.js +0 -1
  416. package/dist/zonos-elements/p-ea0b5d10.system.js +0 -1
  417. package/dist/zonos-elements/p-eae3462c.entry.js +0 -1
  418. package/dist/zonos-elements/p-eeb1081e.js +0 -1
  419. package/dist/zonos-elements/p-f892595d.system.entry.js +0 -1
  420. package/dist/zonos-elements/p-fd3b46ee.entry.js +0 -1
@@ -0,0 +1,547 @@
1
+ import { Fragment, h, Host, } from "@stencil/core";
2
+ import { cartStore, cartStoreReset, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
3
+ import { invoiceStore, invoiceStoreAsyncAddressUpdate, invoiceStoreInitShippingInfo, invoiceStoreUpdateSelectedShippingOption, } from "../../store/checkout/invoice";
4
+ import { paypalStore, paypalStoreHasPaypalEnabled, } from "../../store/checkout/paypal";
5
+ import { initStripeElements, stripeStore, stripeStoreConfirmPayment, stripeStoreGetPaymentIntent, stripeStoreInitCheckoutSession, stripeStoreOnChange, stripeStoreReset, stripeStoreRetrievePayment, stripeStoreUpdateCheckoutSessionBaseCurrency, } from "../../store/checkout/stripe";
6
+ import { localizationStore, localizationStoreOnChange, } from "../../store/hello/localization";
7
+ import { storageStore } from "../../store/storageStore";
8
+ import { translate } from "../../store/translationStore";
9
+ import { zonosStore } from "../../store/zonosStore";
10
+ import { buildCartItemsByTempCart } from "../../utils/api/buildCartItemsByTempCart";
11
+ import { getIsTestMode } from "../../utils/checkout/getIsTestMode";
12
+ import { isInvoiceMobile, isInvoiceTablet, } from "../../utils/checkout/isInvoiceMobileTablet";
13
+ import { classes } from "../../utils/classes";
14
+ import { handleFetch } from "../../utils/handleFetch";
15
+ import { currencyFormat } from "../../utils/hello/currencyConversion/currencyFormat";
16
+ import { log } from "../../utils/logging/log";
17
+ import { logError } from "../../utils/logging/logError";
18
+ import { sendErrorLog } from "../../utils/logging/sendErrorLog";
19
+ import { languages } from "../../../types/ILanguage";
20
+ /** These assets need to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested */
21
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
22
+ import ChevronDownIcon from "./assets/ChevronDownIcon.svg";
23
+ export class ZonosInvoice {
24
+ constructor() {
25
+ this.storeUnsubscribeList = [];
26
+ /**
27
+ * Listener for locale change in localization store
28
+ */
29
+ this.onChangeLocaleListener = () => { };
30
+ /**
31
+ * Flag to determine if the checkout is on mobile
32
+ */
33
+ this.mobile = false;
34
+ /**
35
+ * Whether or not the component is being rendered with tablet styles
36
+ */
37
+ this.tablet = false;
38
+ /**
39
+ * The stripe instance
40
+ */
41
+ this.stripe = window.Zonos.stripe;
42
+ /**
43
+ * Whether or not the language dialog is open
44
+ */
45
+ this.showLanguageDialogMobile = false;
46
+ /**
47
+ * Whether or not the submit button is loading in `step` component
48
+ */
49
+ this.submitLoading = false;
50
+ // default to collapse the review
51
+ this.collapseReviewMobile = true;
52
+ this.isMobile = false;
53
+ this.isTablet = false;
54
+ // @State() isCollect = window.Zonos.isCollect;
55
+ this.isOverlayLoading = true;
56
+ /**
57
+ * Confirm dialog open state
58
+ */
59
+ this.isCartCollected = false;
60
+ /**
61
+ * Cart expired state to show the cart expired dialog
62
+ */
63
+ this.isCartExpired = false;
64
+ /**
65
+ * Pay in USD confirm dialog open state
66
+ */
67
+ this.payInUsdConfirmDialogOpen = false;
68
+ /**
69
+ * Error message from onInventoryCheck callback
70
+ */
71
+ this.inventoryCheckErrorMessage = null;
72
+ /**
73
+ * Confirmation id for invoice finish component
74
+ */
75
+ this.confirmationId = null;
76
+ /**
77
+ * Client secret value
78
+ */
79
+ this.clientSecret = stripeStore.clientSecret;
80
+ /**
81
+ * Client secret value of customer session (use to load saved payment method and render saved consent)
82
+ */
83
+ this.stripeCustomerSessionClientSecret = stripeStore.stripeCustomerSessionClientSecret;
84
+ this.getBaseCurrencySettlementInfo = () => {
85
+ const selectedLandedCost = cartStore.selectedLandedCost;
86
+ if (!selectedLandedCost) {
87
+ return null;
88
+ }
89
+ const { landedCost: { amountSubtotals }, } = selectedLandedCost;
90
+ if (!amountSubtotals) {
91
+ return null;
92
+ }
93
+ const total = (amountSubtotals.discounts || 0) +
94
+ amountSubtotals.items +
95
+ amountSubtotals.landedCostTotal +
96
+ amountSubtotals.shipping;
97
+ return {
98
+ settlementAmount: total,
99
+ };
100
+ };
101
+ this.applyStripeTheme = async () => {
102
+ const theme = zonosStore.appearance.theme;
103
+ await initStripeElements({
104
+ // only override theme or theme from appearance if it's mobile
105
+ overrideTheme: this.isMobile ? theme : undefined,
106
+ paypalEnabled: paypalStoreHasPaypalEnabled(),
107
+ });
108
+ };
109
+ this.fetchCheckoutSession = async (checkoutSessionId) => {
110
+ const { json } = await handleFetch(`/api/zonos-elements/collect/get-checkout-session`, {
111
+ body: {
112
+ checkoutSessionId,
113
+ },
114
+ method: 'POST',
115
+ });
116
+ return json;
117
+ };
118
+ /**
119
+ * Check if stripe payment intent is succeeded or in a good state to move forward
120
+ */
121
+ this.checkStripePaymentIntentStatus = async () => {
122
+ var _a;
123
+ const isCartDataAvailable = !!window.Zonos.cartData;
124
+ const searchParams = new URL(window.location.href).searchParams;
125
+ const stripeClientSecret = searchParams.get('payment_intent_client_secret');
126
+ const zonosCheckoutSessionId = searchParams.get('zonosCheckoutSessionId');
127
+ log('Payment intent exist, checking stripe payment intent status');
128
+ // Allow to proceed to order if there's no stripe client secret and cart data is available
129
+ if (!stripeClientSecret) {
130
+ log('No stripe client secret found in the URL, proceed to order if cart data is available');
131
+ return { shouldAllowOrder: isCartDataAvailable };
132
+ }
133
+ const { error, status } = await stripeStoreRetrievePayment({
134
+ clientSecret: stripeClientSecret,
135
+ });
136
+ // check if this is redirect after order
137
+ const isJustRedirected = new URLSearchParams(window.location.search).get('redirect_status');
138
+ // If just redirected from Payment provider, show the success screen or error screen based on the status
139
+ if (isJustRedirected && zonosCheckoutSessionId) {
140
+ if (!error) {
141
+ log('Payment intent is succeeded or in a good state to move forward, show success screen');
142
+ }
143
+ else {
144
+ log('Payment intent failed, show status from error');
145
+ }
146
+ // Attempt to retrieve the checkout session
147
+ const json = await this.fetchCheckoutSession(zonosCheckoutSessionId);
148
+ this.confirmationId = ((_a = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _a === void 0 ? void 0 : _a.shortId) || null;
149
+ storageStore.checkoutSessionId = zonosCheckoutSessionId;
150
+ stripeStore.clientSecret = stripeClientSecret;
151
+ void this.setToFinishStep(status);
152
+ return { shouldAllowOrder: false };
153
+ }
154
+ if (!isCartDataAvailable) {
155
+ log('Cart data is not available, only check payment intent status, skip order.');
156
+ return { shouldAllowOrder: false };
157
+ }
158
+ log('Payment intent is not succeeded, proceed to order');
159
+ return { shouldAllowOrder: true };
160
+ };
161
+ }
162
+ /**
163
+ * Listen to resize event to update the isMobile state
164
+ */
165
+ resizeListener() {
166
+ this.isMobile = isInvoiceMobile(this.mobile);
167
+ this.isTablet = isInvoiceTablet(this.tablet);
168
+ }
169
+ /**
170
+ * For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
171
+ */
172
+ async setToFinishStep(forcePaymentStatus) {
173
+ stripeStore.stripe = window.Zonos.stripe;
174
+ cartStore.step = 'finish';
175
+ this.storybookPaymentStatusOverride = forcePaymentStatus;
176
+ this.isOverlayLoading = false;
177
+ }
178
+ async initInvoiceCart() {
179
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
180
+ // Should not happen since we will throw error way earlier if cartData is not available
181
+ if (!window.Zonos.cartData) {
182
+ return;
183
+ }
184
+ // change currency to the currency of the cart
185
+ const cartCurrency = (_b = (_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.items[0]) === null || _b === void 0 ? void 0 : _b.currencyCode;
186
+ if (cartCurrency) {
187
+ cartStore.currency = cartCurrency;
188
+ }
189
+ const cartCheckoutSessionId = (_d = (_c = window.Zonos.cartData) === null || _c === void 0 ? void 0 : _c.references) === null || _d === void 0 ? void 0 : _d.checkoutSessionId;
190
+ const cartLandedCostId = (_f = (_e = window.Zonos.cartData) === null || _e === void 0 ? void 0 : _e.references) === null || _f === void 0 ? void 0 : _f.landedCostId;
191
+ if (!cartLandedCostId) {
192
+ cartStoreUpdateToErrorState({
193
+ messages: [
194
+ translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
195
+ organizationName: zonosStore.organizationName,
196
+ }),
197
+ ],
198
+ title: translate('Invalid session'),
199
+ });
200
+ return;
201
+ }
202
+ // Override checkout session id for invoice if we found one in the cart reference
203
+ if (cartCheckoutSessionId) {
204
+ log('Setting checkout session id from cart reference', 'info', cartCheckoutSessionId);
205
+ storageStore.checkoutSessionId = cartCheckoutSessionId;
206
+ }
207
+ else {
208
+ log('Clear checkout session id from storage so we start from a fresh session for the invoice cart');
209
+ storageStore.checkoutSessionId = null;
210
+ }
211
+ const { shouldAllowOrder } = await this.checkStripePaymentIntentStatus();
212
+ if (!shouldAllowOrder) {
213
+ return;
214
+ }
215
+ try {
216
+ const { adjustments, cartItems } = buildCartItemsByTempCart(window.Zonos.cartData);
217
+ await cartStoreUpdateItems({
218
+ adjustments,
219
+ cartItems,
220
+ landedCostId: cartLandedCostId,
221
+ // No need to init session on failure since we will always create a new one if there is no checkout session id in the cart references
222
+ shouldInitSessionOnFailure: false,
223
+ });
224
+ // if checkoutSessionId is not available, request a new one, only if no checkout session id is found in cart references
225
+ if (!storageStore.checkoutSessionId && !cartCheckoutSessionId) {
226
+ const success = await stripeStoreInitCheckoutSession();
227
+ log(`stripeStoreInitCheckoutSession: ${success}`);
228
+ if (!success) {
229
+ throw new Error('Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential');
230
+ }
231
+ }
232
+ // If there is checkout session in collect cart references and we failed to retrieve it from `update-checkout-session`, it most likely means the cart is already completed / invalid landed cost
233
+ if ((!cartStore.checkoutSession ||
234
+ ((_g = cartStore.checkoutSession) === null || _g === void 0 ? void 0 : _g.completedAt)) &&
235
+ cartCheckoutSessionId) {
236
+ // Attempt to retrieve the checkout session
237
+ const json = await this.fetchCheckoutSession(cartCheckoutSessionId);
238
+ // Some merchants use landed cost id as the confirmation id
239
+ this.confirmationId = ((_h = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _h === void 0 ? void 0 : _h.shortId) || null;
240
+ // If checkout session is already completed, set to finish step
241
+ if (!!(json === null || json === void 0 ? void 0 : json.checkoutSession.completedAt) &&
242
+ // For invoice that's set to expired, we set completedAt but no order attached. In that case should not set to finish step
243
+ !!json.checkoutSession.order) {
244
+ void this.setToFinishStep('succeeded');
245
+ return;
246
+ }
247
+ if (json === null || json === void 0 ? void 0 : json.checkoutSession.clientSecret) {
248
+ const { status } = await stripeStoreRetrievePayment({
249
+ clientSecret: json.checkoutSession.clientSecret,
250
+ });
251
+ // If payment intent is still processing or succeeded, set to finish step
252
+ if (status === 'processing' || status === 'succeeded') {
253
+ void this.setToFinishStep(status);
254
+ return;
255
+ }
256
+ }
257
+ void sendErrorLog({
258
+ endpoint: 'INVALID_INVOICE_CHECKOUT_SESSION',
259
+ errors: [
260
+ 'Invalid checkout session, can not retrieve the checkout session after failing to update it',
261
+ ],
262
+ metadata: {
263
+ cartCheckoutSessionId,
264
+ cartId: (_j = window.Zonos.cartData) === null || _j === void 0 ? void 0 : _j.id,
265
+ cartLandedCostId,
266
+ },
267
+ });
268
+ throw new Error('Invalid checkout session, can not retrieve the checkout session after failing to update it');
269
+ }
270
+ if (!cartStore.checkoutSession) {
271
+ void sendErrorLog({
272
+ endpoint: 'FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION',
273
+ errors: [
274
+ 'Could not update/create checkout session for this invoice cart',
275
+ ],
276
+ metadata: {
277
+ cartCheckoutSessionId: cartCheckoutSessionId || 'N/A',
278
+ cartId: (_k = window.Zonos.cartData) === null || _k === void 0 ? void 0 : _k.id,
279
+ cartLandedCostId: cartLandedCostId || 'N/A',
280
+ },
281
+ });
282
+ throw new Error('Could not update/create checkout session for this invoice cart');
283
+ }
284
+ // const checkoutSessionId = storageStore.checkoutSessionId;
285
+ void stripeStoreGetPaymentIntent();
286
+ const landedCost = (_l = cartStore.checkoutSession) === null || _l === void 0 ? void 0 : _l.landedCost;
287
+ if (!landedCost) {
288
+ throw new Error('Landed cost could not be found in checkout session after creating/updating them');
289
+ }
290
+ await invoiceStoreUpdateSelectedShippingOption(Object.assign(Object.assign({}, cartStore.checkoutSession), { id: storageStore.checkoutSessionId || '' }));
291
+ void invoiceStoreInitShippingInfo({
292
+ landedCostId: landedCost.id,
293
+ });
294
+ void this.applyStripeTheme();
295
+ }
296
+ catch (err) {
297
+ logError(err);
298
+ cartStoreUpdateToErrorState({
299
+ messages: [
300
+ translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
301
+ organizationName: zonosStore.organizationName,
302
+ }),
303
+ ],
304
+ title: translate('Invalid session'),
305
+ });
306
+ }
307
+ this.isOverlayLoading = false;
308
+ }
309
+ toggleLanguageDialog() {
310
+ this.showLanguageDialogMobile = !this.showLanguageDialogMobile;
311
+ }
312
+ async handleStripePaymentContinue() {
313
+ var _a, _b, _c, _d;
314
+ // Attempt to get the value of the billing address element to validate the form
315
+ void ((_a = stripeStore.stripeBillingAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
316
+ // If the email is not complete, scroll to the link authentication section
317
+ if (!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete)) {
318
+ // Scroll to the billing section
319
+ const linkAuthentication = document.querySelector('zonos-link-authentication');
320
+ linkAuthentication === null || linkAuthentication === void 0 ? void 0 : linkAuthentication.scrollIntoView({ behavior: 'smooth' });
321
+ return;
322
+ }
323
+ if (!((_c = stripeStore.stripeBillingAddressEventData) === null || _c === void 0 ? void 0 : _c.complete)) {
324
+ // Scroll to the billing section
325
+ const billingSection = document.querySelector('.zonos--billing-address');
326
+ billingSection === null || billingSection === void 0 ? void 0 : billingSection.scrollIntoView({ behavior: 'smooth' });
327
+ return;
328
+ }
329
+ const shouldConfirmPayInUsd = stripeStore.checkoutSettlementCurrency === 'USD';
330
+ // open the confirm dialog if the settlement currency is in USD, and if call this method again, proceed and confirm with Stripe.
331
+ if (shouldConfirmPayInUsd &&
332
+ stripeStore.shouldRenderPayInUsdButton &&
333
+ !this.payInUsdConfirmDialogOpen) {
334
+ this.payInUsdConfirmDialogOpen = true;
335
+ return;
336
+ }
337
+ // Close the dialog after the user confirms to proceed with the payment in USD
338
+ this.payInUsdConfirmDialogOpen = false;
339
+ // reset paypal error message
340
+ paypalStore.paypalErrorMessage = null;
341
+ // reset error state
342
+ stripeStore.hasPaymentError = false;
343
+ this.submitLoading = true;
344
+ // reset inventory check message
345
+ cartStore.inventoryCheckErrorMessage = null;
346
+ // Attempt to change settlement currency to USD
347
+ const baseCurrencyUpdateSuccess = await stripeStoreUpdateCheckoutSessionBaseCurrency();
348
+ // Should not proceed to confirm payment if base currency update failed
349
+ if (!baseCurrencyUpdateSuccess) {
350
+ stripeStore.hasPaymentError = true;
351
+ stripeStore.customErrorMessage = translate('Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.', {
352
+ currency: stripeStore.checkoutSettlementCurrency,
353
+ });
354
+ this.submitLoading = false;
355
+ return;
356
+ }
357
+ // Update the billing party id to the checkout session
358
+ await invoiceStoreAsyncAddressUpdate();
359
+ try {
360
+ await stripeStoreConfirmPayment({
361
+ noLandedCostCheck: true,
362
+ });
363
+ cartStore.step = 'finish';
364
+ // Some merchants use landed cost id as the confirmation id
365
+ this.confirmationId =
366
+ invoiceStore.landedCostShortId ||
367
+ ((_d = cartStore.selectedLandedCost) === null || _d === void 0 ? void 0 : _d.landedCostId) ||
368
+ null;
369
+ return;
370
+ }
371
+ catch (err) {
372
+ logError(err);
373
+ stripeStore.hasPaymentError = true;
374
+ }
375
+ this.submitLoading = false;
376
+ }
377
+ componentWillLoad() {
378
+ stripeStore.stripe = window.Zonos.stripe;
379
+ // Set the step to payment
380
+ cartStore.step = 'payment';
381
+ void this.initInvoiceCart();
382
+ this.resizeListener();
383
+ this.storeUnsubscribeList = [
384
+ stripeStoreOnChange('clientSecret', () => {
385
+ void this.applyStripeTheme();
386
+ }),
387
+ localizationStoreOnChange('selectedLocale', () => {
388
+ void this.applyStripeTheme();
389
+ }),
390
+ ];
391
+ log(`mobile: ${this.isMobile}`);
392
+ }
393
+ // do clean up when component is unmounted
394
+ disconnectedCallback() {
395
+ // reset stripe store
396
+ stripeStoreReset();
397
+ // reset cart store
398
+ cartStoreReset();
399
+ // cleanup onChange listener
400
+ this.onChangeLocaleListener();
401
+ this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
402
+ }
403
+ render() {
404
+ // Set client secret so that we can add this to @Watch listener
405
+ this.clientSecret = stripeStore.clientSecret;
406
+ // Only set and update stripeCustomerSession state if it's available, since it would only be available at the time checkout session is created, afterward access checkout session the value would be `null`.
407
+ if (stripeStore.stripeCustomerSessionClientSecret) {
408
+ // Set stripe customer session client secret so that we can add this to @Watch listener
409
+ this.stripeCustomerSessionClientSecret =
410
+ stripeStore.stripeCustomerSessionClientSecret;
411
+ }
412
+ const baseCurrencySettlementInfo = this.getBaseCurrencySettlementInfo();
413
+ const { logoUrl, theme } = zonosStore.appearance;
414
+ const renderLogo = () => {
415
+ // add timestamp to logo url so browser won't cache it on the dashboard setting
416
+ const logo = `${logoUrl}?timestamp=${Date.now()}`;
417
+ return (h("div", { class: "zonos--logo" }, logo && (h("img", { alt: `${zonosStore.organizationName} logo`, src: logo }))));
418
+ };
419
+ const isTestMode = getIsTestMode();
420
+ const renderTopHeader = () => {
421
+ var _a;
422
+ const urlParams = new URLSearchParams(window.location.search);
423
+ const zonosQaUrl = urlParams.get('zonosQaUrl');
424
+ const zonosDebug = urlParams.get('zonosDebug');
425
+ const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
426
+ return (h(Fragment, null, h("zonos-h-stack", { class: "zonos--header-wrapper", spacing: 16 }, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl))), h("div", { class: "zonos--header-right" }, h("zonos-button", { backgroundColor: 'gray-0', class: "zonos--header-right-button", onClick: () => this.toggleLanguageDialog(), variant: "outline" }, languageLabel, h("zonos-icon", { "aria-label": "Language select", content: ChevronDownIcon, iconColor: "gray-1200" })), h("div", { class: classes([
427
+ 'zonos--invoice-language-dialog',
428
+ this.showLanguageDialogMobile &&
429
+ 'zonos--invoice-language-dialog-open',
430
+ ]) }, h("zonos-language-select", { handleOnClose: () => this.toggleLanguageDialog() }))))));
431
+ };
432
+ const renderContent = () => {
433
+ if (this.isOverlayLoading || stripeStore.isFetchingSession) {
434
+ return null;
435
+ }
436
+ return (h("div", { class: 'zonos--content' }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, (this.isMobile || this.isTablet) && renderTopHeader(), h("div", { class: "zonos--left", "data-theme": theme }, !this.isMobile && !this.isTablet && renderTopHeader(), h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Billing info')), h("zonos-v-stack", { spacing: 16 }, h("zonos-link-authentication", { titleText: "" }), h("zonos-address", { titleText: "", type: "billing" })), h("zonos-invoice-payment", { class: classes(['zonos--invoice-container']), continueLoading: this.submitLoading, onContinueClicked: async () => {
437
+ await this.handleStripePaymentContinue();
438
+ } })), h("div", { class: "zonos--right", "data-theme": theme }, !this.isMobile && (h("zonos-invoice-review", { mobile: this.isMobile, tablet: this.isTablet })), h("div", { class: "zonos--order-details-container" }, !this.isMobile && (h("zonos-invoice-cart-items", null)), this.isMobile && (h("zonos-invoice-order-details", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onCollapseClicked: () => {
439
+ this.collapseReviewMobile = !this.collapseReviewMobile;
440
+ } }))), h("div", { class: "flex--wrapper" }, !this.isMobile && (h("zonos-v-stack", { spacing: 16 }, h("zonos-invoice-subtotal", null))), !this.isMobile && !this.isTablet && (h("zonos-invoice-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet })))))), (cartStore.step === 'finish' || cartStore.step === 'error') && (h("div", { class: "zonos--done", "data-theme": theme }, h("div", { class: "zonos--header" }, renderLogo()), h("zonos-invoice-finish", { confirmationId: this.confirmationId, overrideNotification: cartStore.step === 'error' && !!cartStore.error
441
+ ? Object.assign(Object.assign({}, cartStore.error), { type: 'error' }) : undefined, storybookForceStatus: this.storybookPaymentStatusOverride }))), (this.isMobile ||
442
+ this.isTablet ||
443
+ cartStore.step === 'finish' ||
444
+ cartStore.step === 'error') && (h("zonos-invoice-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet }))));
445
+ };
446
+ return (h(Host, { class: classes([
447
+ 'zonos--invoice zonos--elements',
448
+ this.isMobile && 'mobile',
449
+ this.isTablet && 'tablet',
450
+ ]), "data-theme": theme }, renderContent(), baseCurrencySettlementInfo && (h("zonos-confirm-dialog", { class: "zonos--pay-in-usd-dialog", dialogCancelBtnText: translate('Cancel'), dialogConfirmBtnText: translate('Pay [orderTotal]', {
451
+ orderTotal: currencyFormat({
452
+ amount: baseCurrencySettlementInfo.settlementAmount,
453
+ currency: 'USD',
454
+ }),
455
+ }), dialogIntent: "warn", dialogOpen: this.payInUsdConfirmDialogOpen, dialogSubtitle: translate('By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level.'), dialogTitle: translate('Pay in USD (United States Dollar)?'), dialogType: "confirm", dialogWidth: 480, onCancelClicked: () => {
456
+ this.payInUsdConfirmDialogOpen = false;
457
+ },
458
+ // Mark user selected confirm to continue with payment
459
+ onConfirmClicked: () => this.handleStripePaymentContinue() })), h("zonos-loading-overlay", { open: this.isOverlayLoading })));
460
+ }
461
+ static get is() { return "zonos-invoice"; }
462
+ static get encapsulation() { return "scoped"; }
463
+ static get originalStyleUrls() {
464
+ return {
465
+ "$": ["zonos-invoice.scss"]
466
+ };
467
+ }
468
+ static get styleUrls() {
469
+ return {
470
+ "$": ["zonos-invoice.css"]
471
+ };
472
+ }
473
+ static get assetsDirs() { return ["assets"]; }
474
+ static get properties() {
475
+ return {
476
+ "mobile": {
477
+ "type": "boolean",
478
+ "mutable": false,
479
+ "complexType": {
480
+ "original": "boolean",
481
+ "resolved": "boolean",
482
+ "references": {}
483
+ },
484
+ "required": false,
485
+ "optional": false,
486
+ "docs": {
487
+ "tags": [],
488
+ "text": "Flag to determine if the checkout is on mobile"
489
+ },
490
+ "getter": false,
491
+ "setter": false,
492
+ "attribute": "mobile",
493
+ "reflect": false,
494
+ "defaultValue": "false"
495
+ },
496
+ "tablet": {
497
+ "type": "boolean",
498
+ "mutable": false,
499
+ "complexType": {
500
+ "original": "boolean",
501
+ "resolved": "boolean",
502
+ "references": {}
503
+ },
504
+ "required": false,
505
+ "optional": false,
506
+ "docs": {
507
+ "tags": [],
508
+ "text": "Whether or not the component is being rendered with tablet styles"
509
+ },
510
+ "getter": false,
511
+ "setter": false,
512
+ "attribute": "tablet",
513
+ "reflect": false,
514
+ "defaultValue": "false"
515
+ }
516
+ };
517
+ }
518
+ static get states() {
519
+ return {
520
+ "stripe": {},
521
+ "showLanguageDialogMobile": {},
522
+ "submitLoading": {},
523
+ "collapseReviewMobile": {},
524
+ "isMobile": {},
525
+ "isTablet": {},
526
+ "zonosReviewRef": {},
527
+ "storybookPaymentStatusOverride": {},
528
+ "isOverlayLoading": {},
529
+ "isCartCollected": {},
530
+ "isCartExpired": {},
531
+ "payInUsdConfirmDialogOpen": {},
532
+ "inventoryCheckErrorMessage": {},
533
+ "confirmationId": {},
534
+ "clientSecret": {},
535
+ "stripeCustomerSessionClientSecret": {}
536
+ };
537
+ }
538
+ static get listeners() {
539
+ return [{
540
+ "name": "resize",
541
+ "method": "resizeListener",
542
+ "target": "window",
543
+ "capture": false,
544
+ "passive": true
545
+ }];
546
+ }
547
+ }
@@ -37,16 +37,16 @@ export class ZonosBadge {
37
37
  this.loading = false;
38
38
  }
39
39
  render() {
40
- return (h(Host, { key: '5213d69a38c0e00d02d4c85d499ee5b5ca5a929c', class: classes(['zonos--elements zonos--badge']), style: {
40
+ return (h(Host, { key: '2c6d37db80b369e4d287e2d7a6cb4db9b69fe6f6', class: classes(['zonos--elements zonos--badge']), style: {
41
41
  '--zonos--font-family': zonosStoreFontFamily(),
42
- } }, h("div", { key: '178886813185320c971444c181a4fe0e8b57d7e3', class: classes([
42
+ } }, h("div", { key: 'f5f2f2530c11d8c46349024f044a7b042a12a10f', class: classes([
43
43
  'zonos--badge-content',
44
44
  this.badgeColor,
45
45
  this.rounded && 'rounded',
46
46
  this.iconRight && 'icon-right',
47
47
  this.size,
48
48
  this.bold && 'bold',
49
- ]) }, this.icon, h("zonos-text", { key: '6e75ee5fbbbe62b2d2c875a4866f33060dd9618b', textColor: `${this.badgeColor}-800` }, h("slot", { key: 'b6c1dcd8b29f1c99dc2cbd37d944ad8af3267713' })), this.dismissHandler && (h("zonos-icon", { key: '232d8056ee38962614267def07647c3f52246f0d', "aria-label": "Remove action", class: "zonos--badge-dismiss", content: RemoveLineIcon, onClick: () => { var _a; return (_a = this.dismissHandler) === null || _a === void 0 ? void 0 : _a.call(this); } })))));
49
+ ]) }, this.icon, h("zonos-text", { key: 'e031a216dc586d138b0d3c03781b8b362bcc25d2', textColor: `${this.badgeColor}-800` }, h("slot", { key: '9757275ea8350ae8578e255bb99940697021258e' })), this.dismissHandler && (h("zonos-icon", { key: '42a08f166b237af5c7c508c257dda46ee5c3d58a', "aria-label": "Remove action", class: "zonos--badge-dismiss", content: RemoveLineIcon, onClick: () => { var _a; return (_a = this.dismissHandler) === null || _a === void 0 ? void 0 : _a.call(this); } })))));
50
50
  }
51
51
  static get is() { return "zonos-badge"; }
52
52
  static get encapsulation() { return "shadow"; }
@@ -184,13 +184,13 @@ export class ZonosButton {
184
184
  const borderStyle = getBorderRadius({
185
185
  overrideBorderStyle: this.borderStyle,
186
186
  });
187
- return (h(Host, { key: 'd44e5db9b123906c2435285d23d0d05b6c15d8b3', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
187
+ return (h(Host, { key: '301c0140cae22157209423d34385103d9ea1cf29', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
188
188
  '--zonos--background-color': backgroundColor,
189
189
  '--zonos--border-radius': borderStyle,
190
190
  '--zonos--color': color,
191
191
  '--zonos--font-family': zonosStoreFontFamily(),
192
192
  '--zonos--font-weight': this.bold ? 'bold' : 'normal',
193
- }) }, h("button", Object.assign({ key: 'a937efb3d014fd8f5501fcde7c3c2f0cb33439aa' }, this.inheritedAttributes, { class: classes([
193
+ }) }, h("button", Object.assign({ key: '2e3e75b8d0fd7c22c668972ad4a2f8bda363e159' }, this.inheritedAttributes, { class: classes([
194
194
  this.hasIcon && 'has-icon',
195
195
  this.hasContent && 'has-content',
196
196
  this.noBackground && 'no-background',
@@ -205,7 +205,7 @@ export class ZonosButton {
205
205
  backgroundColor && variant === 'standard' && 'override-background',
206
206
  ]), disabled: disabled, style: {
207
207
  justifyContent: this.justifyContent,
208
- } }), this.loading && (h("div", { key: '09292867f621fd3e04313494809e59254a353403', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: '250912ac9cc2ba4d9d5db8fdc67fa6009d5ea7ac', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '0695250725aff37526e6ea4f94456a368b873c59', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
208
+ } }), this.loading && (h("div", { key: 'f1965c769d9d1a2a7f636b09be1384cf7cd6227a', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: '5bbeb95041065e247ebc2f725f751e2fb5cd93c5', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'b32f5bd10dc79b258545efd92ed594a2906b3292', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
209
209
  }
210
210
  static get is() { return "zonos-button"; }
211
211
  static get encapsulation() { return "shadow"; }
@@ -23,16 +23,16 @@ export class ZonosCard {
23
23
  customRoundRadius: `${this.borderRadius}px`,
24
24
  overrideBorderStyle: 'ROUNDED',
25
25
  });
26
- return (h(Host, { key: '9423d1472ed313f50c5f4ecc61251025ac6083ed', style: {
26
+ return (h(Host, { key: '8832966776c626c783e771fb7f9a773d2539e07f', style: {
27
27
  '--zonos--font-family': zonosStoreFontFamily(),
28
- } }, h("div", { key: '7d2506d2fa9297dce93676bd09dd854a84f27db3', class: classes(['styled-card']), style: {
28
+ } }, h("div", { key: '89c9af9275ca5b01f658081fefb7756bfcbf6d58', class: classes(['styled-card']), style: {
29
29
  '--zonos--background-color': backgroundColor,
30
30
  '--zonos--border-radius': borderRadius,
31
31
  padding: this.spacing,
32
- } }, this.label && (h("header", { key: '81e381540ecbd5c398e5cabf6626d701569e16e5', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: '7929725b31dec41dbab855daa3bd7ae97fb00eb3', type: "subheader" }, this.label), h("h-stack", { key: 'c69fe767e575b3aaf824eb355d7bb35e395ba77a', spacing: 8 }, this.actions))), h("slot", { key: 'ada30bc1760b957a817e0982e46f3def97974297' }), (this.footerActions || this.footerContent) && (h("footer", { key: '854c3d583cb293f5c064af87e839641a5201c900', class: "card-footer", style: {
32
+ } }, this.label && (h("header", { key: '3da688655c5a9af66397525d02224dbc431d00d0', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: '8e9524d26e5a0a7e3149b4008efd02b5a7b9ebc6', type: "subheader" }, this.label), h("h-stack", { key: 'f7298bbb158686b03b2a09f5d6c089c0f4d144c4', spacing: 8 }, this.actions))), h("slot", { key: '24888347ff25ffd21b416da4f5aae493f8044638' }), (this.footerActions || this.footerContent) && (h("footer", { key: 'b6792e7345b87e9407585ed4558c7327ea3eab36', class: "card-footer", style: {
33
33
  height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
34
34
  padding: this.spacing,
35
- } }, h("div", { key: '0a799500938f8d04a8551134b21fe18a05f93de0' }, this.footerContent), h("h-stack", { key: '927b51384452ab01b28da02c9a83256ab7dc6991', spacing: 8 }, this.footerActions))))));
35
+ } }, h("div", { key: '70ccde8e9b1988db1ba477efea5b44e812a7514d' }, this.footerContent), h("h-stack", { key: '4e48425e9db7031d779da7061f0b2d92b27869a0', spacing: 8 }, this.footerActions))))));
36
36
  }
37
37
  static get is() { return "zonos-card"; }
38
38
  static get encapsulation() { return "shadow"; }
@@ -51,14 +51,14 @@ export class ZonosCheckbox {
51
51
  customRoundRadius: '4px',
52
52
  overrideBorderStyle: this.borderStyle,
53
53
  });
54
- return (h(Host, { key: 'bef392ce775e35da3f0640dcbb8271437995daa7', class: classes(['zonos--elements zonos--checkbox']), style: {
54
+ return (h(Host, { key: 'c2a9023becafd6d19ad769d449383924c85c641f', class: classes(['zonos--elements zonos--checkbox']), style: {
55
55
  '--zonos--background-color': backgroundColor,
56
56
  '--zonos--border-radius': borderStyle,
57
57
  '--zonos--font-family': zonosStoreFontFamily(),
58
58
  '--zonos--size': `${this.size}px`,
59
- } }, h("label", { key: '059e2eabc4825738a6607cd307694b252ba55905', class: classes([this.isDisabled && 'disabled']), htmlFor: this.inputId }, h("input", { key: 'a35c086ae478d5ac932608859e6b3250738c870f', checked: this.isChecked, disabled: this.isDisabled, hidden: true, id: this.inputId, onChange: e => {
59
+ } }, h("label", { key: '352e8bda93f1ac9a7a55ba7038e922626c3a9594', class: classes([this.isDisabled && 'disabled']), htmlFor: this.inputId }, h("input", { key: '71d664f9d83345ad4c143f71209bdb0a2cb16745', checked: this.isChecked, disabled: this.isDisabled, hidden: true, id: this.inputId, onChange: e => {
60
60
  this.checkboxSelected.emit(e.target.checked);
61
- }, type: "checkbox" }), h("span", { key: '2482799b470a2ef5050709b6de36469ec8321b04', class: "checkmark-container" }, h("svg", { key: '1034db2d054e98fe06688b602346097b3e7c7d9d', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'b926b486910470ea3180a904e8ec5ca2cf8e452f', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { key: '5a31f075fb462c7419597f0d15b5e4a2f4e40148', size: this.fontSize }, this.label)))));
61
+ }, type: "checkbox" }), h("span", { key: 'c772c4e8dbbbef8035874616a0254fb4114a97c8', class: "checkmark-container" }, h("svg", { key: 'd497191975edeca268cc014431535f4befdd7b2c', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '15b26fdf72a058e81d4472d0c757a725c04e3f47', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { key: '2d6015d16eda08dc39eff677f4858d2aed620891', size: this.fontSize }, this.label)))));
62
62
  }
63
63
  static get is() { return "zonos-checkbox"; }
64
64
  static get encapsulation() { return "shadow"; }