@justifi/webcomponents 4.16.0 → 4.18.0

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 (445) hide show
  1. package/dist/cjs/{Analytics-423b2bb5.js → Analytics-d4aa8c07.js} +1 -1
  2. package/dist/cjs/{SubAccount-4f4fac22.js → SubAccount-135ff8c8.js} +1 -1
  3. package/dist/cjs/additional-questions-details_5.cjs.entry.js +13 -13
  4. package/dist/cjs/{business-additional-questions-schema-606d1292.js → business-additional-questions-schema-cf545610.js} +2 -2
  5. package/dist/cjs/business-details-core.cjs.entry.js +6 -9
  6. package/dist/cjs/form-alert_5.cjs.entry.js +3 -3
  7. package/dist/cjs/form-control-checkbox_5.cjs.entry.js +10 -13
  8. package/dist/cjs/form-control-date.cjs.entry.js +43 -0
  9. package/dist/cjs/form-control-error-text_2.cjs.entry.js +36 -0
  10. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  11. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  12. package/dist/cjs/{form-control-date_3.cjs.entry.js → form-control-number-masked_2.cjs.entry.js} +3 -40
  13. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  14. package/dist/cjs/{form-control-error-text_4.cjs.entry.js → form-control-select_2.cjs.entry.js} +3 -33
  15. package/dist/cjs/get-payout-csv-e4e4771a.js +48 -0
  16. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -5
  17. package/dist/cjs/{index-b4498996.js → index-fb499e95.js} +15 -3
  18. package/dist/cjs/{insurance-state-3f044af7.js → insurance-state-80e24caf.js} +1 -1
  19. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +9 -12
  20. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -3
  21. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +16 -1680
  22. package/dist/cjs/justifi-business-details.cjs.entry.js +4 -4
  23. package/dist/cjs/justifi-business-form.cjs.entry.js +9 -8
  24. package/dist/cjs/justifi-business-list.cjs.entry.js +4 -7
  25. package/dist/cjs/justifi-card-form.cjs.entry.js +3 -3
  26. package/dist/cjs/justifi-checkout-core.cjs.entry.js +21 -9
  27. package/dist/cjs/justifi-checkout.cjs.entry.js +12 -4
  28. package/dist/cjs/justifi-details.cjs.entry.js +4 -7
  29. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
  30. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +73 -28
  31. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +4 -7
  32. package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -4
  33. package/dist/cjs/justifi-payment-form.cjs.entry.js +9 -8
  34. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1688 -0
  35. package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +3 -3
  36. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +7 -2
  37. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -8
  38. package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -4
  39. package/dist/cjs/justifi-payout-details.cjs.entry.js +15 -10
  40. package/dist/cjs/justifi-payouts-list.cjs.entry.js +15 -12
  41. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -7
  42. package/dist/cjs/justifi-refund-form.cjs.entry.js +4 -3
  43. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +14 -9
  44. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -3
  45. package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
  46. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +6 -9
  47. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +4 -4
  48. package/dist/cjs/justifi-table_2.cjs.entry.js +8 -12
  49. package/dist/cjs/loader.cjs.js +2 -2
  50. package/dist/cjs/{package-b40227dd.js → package-5fee1ffb.js} +1 -1
  51. package/dist/cjs/{payload-parsers-6e4cf5d7.js → payload-parsers-1cbc3b57.js} +3 -1
  52. package/dist/cjs/payment-details-core.cjs.entry.js +11 -14
  53. package/dist/cjs/payments-list-core.cjs.entry.js +7 -7
  54. package/dist/cjs/payout-details-core.cjs.entry.js +19 -8
  55. package/dist/cjs/payouts-list-core.cjs.entry.js +29 -8
  56. package/dist/cjs/{schema-validations-9668fd79.js → schema-validations-2733de42.js} +3 -4
  57. package/dist/cjs/styled-host-b8bed12a.js +14 -0
  58. package/dist/cjs/subaccount-account-details_4.cjs.entry.js +7 -23
  59. package/dist/cjs/subaccount-bank-details.cjs.entry.js +3 -7
  60. package/dist/cjs/subaccount-terms-details.cjs.entry.js +3 -7
  61. package/dist/cjs/{utils-17869710.js → utils-80191fbe.js} +6 -0
  62. package/dist/cjs/{utils-fd644316.js → utils-8c3bf659.js} +13 -4
  63. package/dist/cjs/{utils-0c3168ef.js → utils-c1d2e426.js} +1 -1
  64. package/dist/cjs/webcomponents.cjs.js +2 -2
  65. package/dist/collection/api/Checkout.js +0 -1
  66. package/dist/collection/api/services/payout.service.js +5 -0
  67. package/dist/collection/assets/download-icon.js +2 -0
  68. package/dist/collection/collection-manifest.json +1 -0
  69. package/dist/collection/components/billing-form/billing-form.css +2 -8162
  70. package/dist/collection/components/billing-form/billing-form.js +5 -4
  71. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +2 -3
  72. package/dist/collection/components/business-details/business-details-core.js +5 -14
  73. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +2 -3
  74. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +2 -3
  75. package/dist/collection/components/business-details/owner-details/owner-details.js +2 -3
  76. package/dist/collection/components/business-details/representative-details/representative-details.js +2 -3
  77. package/dist/collection/components/business-details/shared-business-details.css +3 -0
  78. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +1 -1
  79. package/dist/collection/components/business-forms/business-form/business-form.css +5 -8768
  80. package/dist/collection/components/business-forms/business-form/business-form.js +4 -3
  81. package/dist/collection/components/business-forms/owner-form/owner-form.js +2 -5
  82. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
  83. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +3 -2
  84. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -4
  85. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +14 -2
  86. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.css +4 -9155
  87. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -12
  88. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-text.css +5 -763
  89. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-text.js +2 -2
  90. package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
  91. package/dist/collection/components/business-forms/schemas/schema-helpers.js +0 -1
  92. package/dist/collection/components/business-forms/schemas/schema-validations.js +4 -4
  93. package/dist/collection/components/business-forms/utils/payload-parsers.js +2 -0
  94. package/dist/collection/components/business-list/business-list.js +3 -12
  95. package/dist/collection/components/checkout/checkout-core.css +3 -8147
  96. package/dist/collection/components/checkout/checkout-core.js +68 -8
  97. package/dist/collection/components/checkout/checkout.js +59 -1
  98. package/dist/collection/components/checkout/form-check-input.css +20 -0
  99. package/dist/collection/components/checkout/header.css +4 -0
  100. package/dist/collection/components/checkout/new-payment-method.js +95 -15
  101. package/dist/collection/components/checkout/payment-method-option-utils.js +2 -0
  102. package/dist/collection/components/checkout/payment-method-options.css +1 -7080
  103. package/dist/collection/components/checkout/payment-method-options.js +101 -17
  104. package/dist/collection/components/checkout/save-new-payment-method.js +38 -0
  105. package/dist/collection/components/checkout/saved-payment-method.js +12 -5
  106. package/dist/collection/components/checkout/sezzle-payment-method.js +12 -5
  107. package/dist/collection/components/details/details.js +3 -12
  108. package/dist/collection/components/form/form-control-checkbox.js +1 -1
  109. package/dist/collection/components/form/form-control-date.js +1 -1
  110. package/dist/collection/components/form/form-control-file.js +1 -1
  111. package/dist/collection/components/form/form-control-monetary.js +1 -1
  112. package/dist/collection/components/form/form-control-number-masked.js +1 -1
  113. package/dist/collection/components/form/form-control-number.js +1 -1
  114. package/dist/collection/components/form/form-control-select.js +1 -1
  115. package/dist/collection/components/form/form-control-text.js +1 -1
  116. package/dist/collection/components/form/utils.js +12 -3
  117. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +2 -2
  118. package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +1 -573
  119. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.css +6 -8183
  120. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.js +6 -7
  121. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +1 -2
  122. package/dist/collection/components/pagination-menu/pagination-menu.js +3 -14
  123. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +3 -13
  124. package/dist/collection/components/payment-details/payment-details-core.js +9 -18
  125. package/dist/collection/components/payment-form/payment-form.css +3 -2513
  126. package/dist/collection/components/payment-form/payment-form.js +6 -5
  127. package/dist/collection/components/payment-form/payment-method-selector.css +5 -1881
  128. package/dist/collection/components/payment-form/payment-method-selector.js +2 -3
  129. package/dist/collection/components/payments-list/payments-list-core.js +6 -12
  130. package/dist/collection/components/payments-list/payments-list.js +3 -0
  131. package/dist/collection/components/payout-details/get-payout-csv.js +19 -0
  132. package/dist/collection/components/payout-details/payout-details-core.js +37 -12
  133. package/dist/collection/components/payout-details/payout-details.js +11 -4
  134. package/dist/collection/components/payouts-list/payouts-list-core.js +45 -14
  135. package/dist/collection/components/payouts-list/payouts-list.js +14 -6
  136. package/dist/collection/components/proceeds-list/proceeds-list.js +3 -12
  137. package/dist/collection/components/refund-form/refund-form.css +1 -7737
  138. package/dist/collection/components/refund-form/refund-form.js +4 -3
  139. package/dist/collection/components/skeleton/skeleton.css +1 -573
  140. package/dist/collection/components/skeleton/skeleton.js +2 -2
  141. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +1 -12
  142. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +1 -12
  143. package/dist/collection/components/subaccount-details/subaccount-details.js +3 -12
  144. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +1 -12
  145. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +1 -12
  146. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +1 -12
  147. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +1 -12
  148. package/dist/collection/components/subaccounts-list/subaccounts-list.js +1 -1
  149. package/dist/collection/components/table/table.css +0 -8085
  150. package/dist/collection/components/table/table.js +3 -4
  151. package/dist/collection/utils/styled-host/styled-host.js +6 -0
  152. package/dist/collection/utils/utils.js +5 -0
  153. package/dist/docs.json +546 -64
  154. package/dist/esm/{Analytics-17c33e9e.js → Analytics-29fac206.js} +1 -1
  155. package/dist/esm/{SubAccount-8bf9cb0c.js → SubAccount-7fcb1450.js} +1 -1
  156. package/dist/esm/additional-questions-details_5.entry.js +13 -13
  157. package/dist/esm/{business-additional-questions-schema-b00a73ba.js → business-additional-questions-schema-956e3caf.js} +2 -2
  158. package/dist/esm/business-details-core.entry.js +6 -9
  159. package/dist/esm/form-alert_5.entry.js +3 -3
  160. package/dist/esm/form-control-checkbox_5.entry.js +10 -13
  161. package/dist/esm/form-control-date.entry.js +39 -0
  162. package/dist/esm/form-control-error-text_2.entry.js +31 -0
  163. package/dist/esm/form-control-file.entry.js +2 -2
  164. package/dist/esm/form-control-monetary.entry.js +2 -2
  165. package/dist/esm/{form-control-date_3.entry.js → form-control-number-masked_2.entry.js} +4 -40
  166. package/dist/esm/form-control-number.entry.js +2 -2
  167. package/dist/esm/{form-control-error-text_4.entry.js → form-control-select_2.entry.js} +4 -32
  168. package/dist/esm/get-payout-csv-9b4aaada.js +45 -0
  169. package/dist/esm/gross-payment-chart-core.entry.js +5 -5
  170. package/dist/esm/{index-4bd1eae9.js → index-57431c24.js} +15 -3
  171. package/dist/esm/{insurance-state-09754ab9.js → insurance-state-8ce01e59.js} +1 -1
  172. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +10 -13
  173. package/dist/esm/justifi-bank-account-form.entry.js +3 -3
  174. package/dist/esm/justifi-billing-form_2.entry.js +16 -1680
  175. package/dist/esm/justifi-business-details.entry.js +4 -4
  176. package/dist/esm/justifi-business-form.entry.js +9 -8
  177. package/dist/esm/justifi-business-list.entry.js +4 -7
  178. package/dist/esm/justifi-card-form.entry.js +3 -3
  179. package/dist/esm/justifi-checkout-core.entry.js +21 -9
  180. package/dist/esm/justifi-checkout.entry.js +12 -4
  181. package/dist/esm/justifi-details.entry.js +4 -7
  182. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
  183. package/dist/esm/justifi-new-payment-method_4.entry.js +73 -28
  184. package/dist/esm/justifi-payment-balance-transactions.entry.js +4 -7
  185. package/dist/esm/justifi-payment-details.entry.js +4 -4
  186. package/dist/esm/justifi-payment-form.entry.js +9 -8
  187. package/dist/esm/justifi-payment-method-form.entry.js +1684 -0
  188. package/dist/esm/justifi-payment-method-selector.entry.js +3 -3
  189. package/dist/esm/justifi-payment-provisioning-core.entry.js +7 -2
  190. package/dist/esm/justifi-payment-provisioning.entry.js +4 -8
  191. package/dist/esm/justifi-payments-list.entry.js +4 -4
  192. package/dist/esm/justifi-payout-details.entry.js +14 -9
  193. package/dist/esm/justifi-payouts-list.entry.js +14 -11
  194. package/dist/esm/justifi-proceeds-list.entry.js +4 -7
  195. package/dist/esm/justifi-refund-form.entry.js +4 -3
  196. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +14 -9
  197. package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -3
  198. package/dist/esm/justifi-skeleton.entry.js +3 -3
  199. package/dist/esm/justifi-subaccount-details.entry.js +6 -9
  200. package/dist/esm/justifi-subaccounts-list.entry.js +4 -4
  201. package/dist/esm/justifi-table_2.entry.js +8 -12
  202. package/dist/esm/loader.js +3 -3
  203. package/dist/esm/{package-02a6e473.js → package-1123f528.js} +1 -1
  204. package/dist/esm/{payload-parsers-a9e8f8cc.js → payload-parsers-acb719d1.js} +3 -1
  205. package/dist/esm/payment-details-core.entry.js +11 -14
  206. package/dist/esm/payments-list-core.entry.js +7 -7
  207. package/dist/esm/payout-details-core.entry.js +19 -8
  208. package/dist/esm/payouts-list-core.entry.js +29 -8
  209. package/dist/esm/{schema-validations-770bdf3e.js → schema-validations-a83ff220.js} +3 -4
  210. package/dist/esm/styled-host-57aae7fa.js +12 -0
  211. package/dist/esm/subaccount-account-details_4.entry.js +7 -23
  212. package/dist/esm/subaccount-bank-details.entry.js +3 -7
  213. package/dist/esm/subaccount-terms-details.entry.js +3 -7
  214. package/dist/esm/{utils-1e583166.js → utils-56719d07.js} +1 -1
  215. package/dist/esm/{utils-61a21dea.js → utils-5f4c4faa.js} +6 -1
  216. package/dist/esm/{utils-8de964da.js → utils-f4c4ba7d.js} +13 -4
  217. package/dist/esm/webcomponents.js +3 -3
  218. package/dist/module/SubAccount.js +1 -1
  219. package/dist/module/additional-questions-details2.js +3 -4
  220. package/dist/module/additional-questions.js +1 -1
  221. package/dist/module/billing-form.js +5 -4
  222. package/dist/module/business-additional-questions-form-step.js +1 -1
  223. package/dist/module/business-core-info-form-step.js +3 -2
  224. package/dist/module/business-core-info-schema.js +1 -1
  225. package/dist/module/business-details-core2.js +5 -8
  226. package/dist/module/business-representative-form-step.js +1 -4
  227. package/dist/module/business-terms-conditions-text.js +2 -2
  228. package/dist/module/checkout-core.js +44 -24
  229. package/dist/module/details.js +3 -6
  230. package/dist/module/form-control-checkbox2.js +1 -1
  231. package/dist/module/form-control-date2.js +1 -1
  232. package/dist/module/form-control-file2.js +1 -1
  233. package/dist/module/form-control-monetary2.js +1 -1
  234. package/dist/module/form-control-number-masked2.js +1 -1
  235. package/dist/module/form-control-number.js +1 -1
  236. package/dist/module/form-control-select2.js +1 -1
  237. package/dist/module/form-control-text2.js +1 -1
  238. package/dist/module/generic-info-details2.js +3 -4
  239. package/dist/module/get-payout-csv.js +45 -0
  240. package/dist/module/gross-payment-chart-core2.js +2 -2
  241. package/dist/module/justifi-business-form.js +4 -3
  242. package/dist/module/justifi-business-list.js +3 -6
  243. package/dist/module/justifi-checkout.js +35 -20
  244. package/dist/module/justifi-payment-balance-transactions.js +5 -9
  245. package/dist/module/justifi-payment-form.js +6 -5
  246. package/dist/module/justifi-payment-provisioning.js +2 -7
  247. package/dist/module/justifi-payments-list.js +19 -1
  248. package/dist/module/justifi-payout-details.js +11 -5
  249. package/dist/module/justifi-payouts-list.js +30 -8
  250. package/dist/module/justifi-proceeds-list.js +3 -6
  251. package/dist/module/justifi-refund-form.js +4 -3
  252. package/dist/module/justifi-save-new-payment-method.d.ts +11 -0
  253. package/dist/module/justifi-save-new-payment-method.js +6 -0
  254. package/dist/module/justifi-season-interruption-insurance.js +1 -2
  255. package/dist/module/justifi-subaccount-details.js +4 -7
  256. package/dist/module/justifi-subaccounts-list.js +2 -2
  257. package/dist/module/legal-address-details2.js +3 -4
  258. package/dist/module/new-payment-method.js +52 -24
  259. package/dist/module/owner-details2.js +3 -4
  260. package/dist/module/owner-form.js +2 -5
  261. package/dist/module/package.js +1 -1
  262. package/dist/module/pagination-menu2.js +4 -9
  263. package/dist/module/payload-parsers.js +2 -0
  264. package/dist/module/payment-details-core2.js +10 -13
  265. package/dist/module/payment-method-options.js +56 -28
  266. package/dist/module/payment-method-selector.js +3 -4
  267. package/dist/module/payment-provisioning-core.js +9 -3
  268. package/dist/module/payments-list-core2.js +26 -8
  269. package/dist/module/payout-details-core2.js +19 -7
  270. package/dist/module/payouts-list-core2.js +49 -9
  271. package/dist/module/representative-details2.js +3 -4
  272. package/dist/module/save-new-payment-method.js +36 -0
  273. package/dist/module/saved-payment-method.js +7 -2
  274. package/dist/module/schema-validations.js +3 -4
  275. package/dist/module/season-interruption-insurance-core.js +12 -7
  276. package/dist/module/sezzle-payment-method.js +5 -2
  277. package/dist/module/skeleton.js +2 -2
  278. package/dist/module/styled-host.js +12 -0
  279. package/dist/module/subaccount-account-details2.js +2 -7
  280. package/dist/module/subaccount-bank-details.js +2 -7
  281. package/dist/module/subaccount-merchant-details2.js +3 -8
  282. package/dist/module/subaccount-owners-details2.js +2 -7
  283. package/dist/module/subaccount-representative-details2.js +2 -7
  284. package/dist/module/subaccount-terms-details.js +2 -7
  285. package/dist/module/table.js +4 -5
  286. package/dist/module/utils2.js +6 -1
  287. package/dist/module/utils3.js +12 -3
  288. package/dist/types/api/Checkout.d.ts +6 -0
  289. package/dist/types/api/services/payout.service.d.ts +2 -0
  290. package/dist/types/assets/download-icon.d.ts +1 -0
  291. package/dist/types/components/business-forms/owner-form/owner-form.d.ts +0 -1
  292. package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +0 -1
  293. package/dist/types/components/business-forms/schemas/schema-helpers.d.ts +0 -1
  294. package/dist/types/components/checkout/checkout-core.d.ts +5 -1
  295. package/dist/types/components/checkout/checkout.d.ts +5 -0
  296. package/dist/types/components/checkout/new-payment-method.d.ts +8 -2
  297. package/dist/types/components/checkout/payment-method-option-utils.d.ts +1 -0
  298. package/dist/types/components/checkout/payment-method-options.d.ts +6 -2
  299. package/dist/types/components/checkout/payment-method-payload.d.ts +1 -0
  300. package/dist/types/components/checkout/save-new-payment-method.d.ts +7 -0
  301. package/dist/types/components/checkout/saved-payment-method.d.ts +1 -1
  302. package/dist/types/components/checkout/sezzle-payment-method.d.ts +1 -1
  303. package/dist/types/components/form/utils.d.ts +1 -1
  304. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +6 -4
  305. package/dist/types/components/payments-list/payments-list-core.d.ts +1 -0
  306. package/dist/types/components/payments-list/payments-list.d.ts +3 -0
  307. package/dist/types/components/payout-details/get-payout-csv.d.ts +7 -0
  308. package/dist/types/components/payout-details/payout-details-core.d.ts +2 -0
  309. package/dist/types/components/payout-details/payout-details.d.ts +2 -1
  310. package/dist/types/components/payouts-list/payouts-list-core.d.ts +3 -0
  311. package/dist/types/components/payouts-list/payouts-list.d.ts +5 -1
  312. package/dist/types/components.d.ts +83 -12
  313. package/dist/types/utils/styled-host/styled-host.d.ts +3 -0
  314. package/dist/types/utils/utils.d.ts +1 -0
  315. package/dist/webcomponents/{p-851e57f4.js → p-092e080c.js} +1 -1
  316. package/dist/webcomponents/p-09affce4.entry.js +1 -0
  317. package/dist/webcomponents/p-0a4a9ccd.entry.js +1 -0
  318. package/dist/webcomponents/{p-7c28a80d.entry.js → p-0dca0770.entry.js} +1 -1
  319. package/dist/webcomponents/p-0e4a54c8.entry.js +1 -0
  320. package/dist/webcomponents/p-0ed3c1d2.entry.js +1 -0
  321. package/dist/webcomponents/p-10b57ac6.entry.js +1 -0
  322. package/dist/webcomponents/p-1737f6bf.entry.js +1 -0
  323. package/dist/webcomponents/{p-ebce7b2f.entry.js → p-2244e679.entry.js} +1 -1
  324. package/dist/webcomponents/p-2306d44d.entry.js +1 -0
  325. package/dist/webcomponents/{p-f7b6dcc4.js → p-2338affa.js} +1 -1
  326. package/dist/webcomponents/p-2af3672b.entry.js +1 -0
  327. package/dist/webcomponents/p-3294856b.entry.js +1 -0
  328. package/dist/webcomponents/p-3514b616.entry.js +1 -0
  329. package/dist/webcomponents/p-390157c9.entry.js +1 -0
  330. package/dist/webcomponents/p-3fd13ca3.js +1 -0
  331. package/dist/webcomponents/p-412c7a22.entry.js +1 -0
  332. package/dist/webcomponents/p-464e4dfe.entry.js +1 -0
  333. package/dist/webcomponents/p-49b8e112.js +1 -0
  334. package/dist/webcomponents/{p-808c8988.entry.js → p-4b9587ec.entry.js} +1 -1
  335. package/dist/webcomponents/p-531d873a.entry.js +1 -0
  336. package/dist/webcomponents/p-54287db6.entry.js +1 -0
  337. package/dist/webcomponents/p-547a2cd0.entry.js +1 -0
  338. package/dist/webcomponents/p-571d7f1a.entry.js +1 -0
  339. package/dist/webcomponents/p-5963bcdc.entry.js +1 -0
  340. package/dist/webcomponents/p-5b1451e7.entry.js +1 -0
  341. package/dist/webcomponents/p-66758365.entry.js +1 -0
  342. package/dist/webcomponents/{p-3394ff6c.js → p-667a5aa8.js} +1 -1
  343. package/dist/webcomponents/p-67e497aa.entry.js +1 -0
  344. package/dist/webcomponents/p-68fd8283.js +1 -0
  345. package/dist/webcomponents/p-6bcf621a.entry.js +1 -0
  346. package/dist/webcomponents/p-6bd5d569.entry.js +1 -0
  347. package/dist/webcomponents/p-76180bb4.entry.js +1 -0
  348. package/dist/webcomponents/p-77dc159c.entry.js +1 -0
  349. package/dist/webcomponents/{p-3a7e0753.entry.js → p-7a346c0b.entry.js} +1 -1
  350. package/dist/webcomponents/p-7d6aba64.entry.js +1 -0
  351. package/dist/webcomponents/p-81d3eda6.entry.js +1 -0
  352. package/dist/webcomponents/p-85fc69e5.js +1 -0
  353. package/dist/webcomponents/p-87932e16.js +1 -0
  354. package/dist/webcomponents/p-88c7ef46.entry.js +1 -0
  355. package/dist/webcomponents/p-89887332.js +1 -0
  356. package/dist/webcomponents/p-8cc7a418.entry.js +1 -0
  357. package/dist/webcomponents/p-8dd22c8d.entry.js +1 -0
  358. package/dist/webcomponents/p-959b478a.entry.js +19 -0
  359. package/dist/webcomponents/{p-3f06ce2f.entry.js → p-9631b768.entry.js} +1 -1
  360. package/dist/webcomponents/p-9e7c3231.entry.js +1 -0
  361. package/dist/webcomponents/{p-9601cf9d.entry.js → p-bb32b91c.entry.js} +1 -1
  362. package/dist/webcomponents/p-bbc18b9f.entry.js +1 -0
  363. package/dist/webcomponents/{p-4b4fc43d.js → p-c4264aaf.js} +1 -1
  364. package/dist/webcomponents/p-cb9ee476.entry.js +1 -0
  365. package/dist/webcomponents/p-d083a342.entry.js +1 -0
  366. package/dist/webcomponents/{p-288c95b3.entry.js → p-d5612f35.entry.js} +1 -1
  367. package/dist/webcomponents/p-debeefbb.entry.js +1 -0
  368. package/dist/webcomponents/{p-e3a31451.entry.js → p-df38dd21.entry.js} +1 -1
  369. package/dist/webcomponents/p-e0bcfdb5.entry.js +1 -0
  370. package/dist/webcomponents/{p-cb68e8fa.js → p-e1651130.js} +1 -1
  371. package/dist/webcomponents/p-e46929a1.entry.js +1 -0
  372. package/dist/webcomponents/{p-fee616cf.entry.js → p-e85ef4af.entry.js} +1 -1
  373. package/dist/webcomponents/{p-fb53112b.js → p-e8c651b8.js} +1 -1
  374. package/dist/webcomponents/p-ea7c77a3.entry.js +1 -0
  375. package/dist/webcomponents/{p-2451611d.entry.js → p-f3555f0b.entry.js} +1 -1
  376. package/dist/webcomponents/p-fad19d75.js +2 -0
  377. package/dist/webcomponents/webcomponents.css +1 -1
  378. package/dist/webcomponents/webcomponents.esm.js +1 -1
  379. package/package.json +1 -1
  380. package/dist/cjs/payout.service-eec372aa.js +0 -22
  381. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +0 -7348
  382. package/dist/collection/components/business-details/business-details.css +0 -6446
  383. package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +0 -7348
  384. package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +0 -7348
  385. package/dist/collection/components/business-details/owner-details/owner-details.css +0 -7348
  386. package/dist/collection/components/business-details/representative-details/representative-details.css +0 -7348
  387. package/dist/collection/components/business-list/business-list.css +0 -579
  388. package/dist/collection/components/details/details.css +0 -7993
  389. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.css +0 -0
  390. package/dist/collection/components/payment-details/payment-details.css +0 -7993
  391. package/dist/collection/components/payments-list/payments-list.css +0 -579
  392. package/dist/collection/components/payout-details/payout-details.css +0 -7993
  393. package/dist/collection/components/payouts-list/payouts-list.css +0 -579
  394. package/dist/collection/components/proceeds-list/proceeds-list.css +0 -579
  395. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +0 -7352
  396. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +0 -7352
  397. package/dist/collection/components/subaccount-details/subaccount-details.css +0 -7993
  398. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +0 -7352
  399. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +0 -7352
  400. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +0 -7352
  401. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +0 -7352
  402. package/dist/esm/payout.service-28b9594f.js +0 -20
  403. package/dist/module/payout.service.js +0 -20
  404. package/dist/webcomponents/p-023fe908.entry.js +0 -1
  405. package/dist/webcomponents/p-038fb958.entry.js +0 -1
  406. package/dist/webcomponents/p-06baf263.entry.js +0 -1
  407. package/dist/webcomponents/p-0f10316f.entry.js +0 -1
  408. package/dist/webcomponents/p-144e4bda.js +0 -1
  409. package/dist/webcomponents/p-1e53021d.entry.js +0 -1
  410. package/dist/webcomponents/p-1feebf9c.entry.js +0 -1
  411. package/dist/webcomponents/p-26779944.entry.js +0 -1
  412. package/dist/webcomponents/p-306aea52.entry.js +0 -1
  413. package/dist/webcomponents/p-31031d15.entry.js +0 -1
  414. package/dist/webcomponents/p-4791c1f2.entry.js +0 -1
  415. package/dist/webcomponents/p-4b260a52.entry.js +0 -1
  416. package/dist/webcomponents/p-56275f64.entry.js +0 -1
  417. package/dist/webcomponents/p-64d1aeb8.entry.js +0 -1
  418. package/dist/webcomponents/p-65969627.entry.js +0 -19
  419. package/dist/webcomponents/p-68f3a7b0.entry.js +0 -1
  420. package/dist/webcomponents/p-6b05f357.entry.js +0 -1
  421. package/dist/webcomponents/p-6ce586e0.entry.js +0 -1
  422. package/dist/webcomponents/p-71800e4c.js +0 -1
  423. package/dist/webcomponents/p-7ae2d26f.entry.js +0 -1
  424. package/dist/webcomponents/p-88d68804.entry.js +0 -1
  425. package/dist/webcomponents/p-8a6049ed.js +0 -1
  426. package/dist/webcomponents/p-8e8f5033.entry.js +0 -1
  427. package/dist/webcomponents/p-9228912b.entry.js +0 -1
  428. package/dist/webcomponents/p-923c37a2.entry.js +0 -1
  429. package/dist/webcomponents/p-9b1e7f5e.entry.js +0 -1
  430. package/dist/webcomponents/p-9c00adf1.entry.js +0 -1
  431. package/dist/webcomponents/p-9e5d765c.js +0 -1
  432. package/dist/webcomponents/p-a33c3e1c.entry.js +0 -1
  433. package/dist/webcomponents/p-a63a6fb9.js +0 -2
  434. package/dist/webcomponents/p-b01c0120.entry.js +0 -1
  435. package/dist/webcomponents/p-b94bf537.entry.js +0 -1
  436. package/dist/webcomponents/p-bacd9d6e.entry.js +0 -1
  437. package/dist/webcomponents/p-c85fb952.entry.js +0 -1
  438. package/dist/webcomponents/p-ca39c89f.js +0 -1
  439. package/dist/webcomponents/p-d42e284d.entry.js +0 -1
  440. package/dist/webcomponents/p-e673e681.entry.js +0 -1
  441. package/dist/webcomponents/p-eefe2f29.entry.js +0 -1
  442. package/dist/webcomponents/p-f14db665.entry.js +0 -1
  443. package/dist/webcomponents/p-f18e63c3.entry.js +0 -1
  444. package/dist/webcomponents/p-f3ae3cb6.entry.js +0 -1
  445. package/dist/webcomponents/p-fa9773c0.entry.js +0 -1
@@ -1,9 +1,10 @@
1
- import { h, Host } from "@stencil/core";
1
+ import { h } from "@stencil/core";
2
2
  import { formatCurrency } from "../../utils/utils";
3
3
  import { config } from "../../../config";
4
4
  import { Checkout } from "../../api/Checkout";
5
5
  import { ComponentErrorSeverity } from "../../api/ComponentError";
6
6
  import { insuranceValues, insuranceValuesOn, validateInsuranceValues } from "../insurance/insurance-state";
7
+ import StyledHost from "../../utils/styled-host/styled-host";
7
8
  export class CheckoutCore {
8
9
  constructor() {
9
10
  this.completeCheckout = async (payment) => {
@@ -41,6 +42,10 @@ export class CheckoutCore {
41
42
  this.serverError = undefined;
42
43
  this.renderState = 'loading';
43
44
  this.creatingNewPaymentMethod = false;
45
+ this.insuranceToggled = false;
46
+ }
47
+ async fillBillingForm(fields) {
48
+ this.paymentMethodOptionsRef.fillBillingForm(fields);
44
49
  }
45
50
  componentWillLoad() {
46
51
  if (this.getCheckout) {
@@ -49,6 +54,7 @@ export class CheckoutCore {
49
54
  insuranceValuesOn('set', (key) => {
50
55
  const value = insuranceValues[key];
51
56
  if (value !== undefined) {
57
+ this.insuranceToggled = value;
52
58
  this.fetchData();
53
59
  }
54
60
  });
@@ -59,6 +65,8 @@ export class CheckoutCore {
59
65
  this.getCheckout({
60
66
  onSuccess: ({ checkout }) => {
61
67
  this.checkout = new Checkout(checkout);
68
+ const { status } = this.checkout;
69
+ this.loaded.emit({ checkout_status: status });
62
70
  this.renderState = 'success';
63
71
  },
64
72
  onError: ({ error, code, severity }) => {
@@ -78,8 +86,8 @@ export class CheckoutCore {
78
86
  event.preventDefault();
79
87
  this.renderState = 'loading';
80
88
  const insuranceValidation = validateInsuranceValues();
81
- const payload = await this.paymentMethodOptionsRef.resolvePaymentMethod();
82
- if (!insuranceValidation.isValid) {
89
+ const payload = await this.paymentMethodOptionsRef.resolvePaymentMethod(insuranceValidation);
90
+ if (payload.validationError) {
83
91
  this.renderState = 'error';
84
92
  }
85
93
  else if (payload.error) {
@@ -109,25 +117,25 @@ export class CheckoutCore {
109
117
  }
110
118
  get paymentType() {
111
119
  var _a, _b, _c, _d, _e;
112
- return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h("justifi-skeleton", { variant: "rounded", height: "300px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("justifi-payment-method-options", { ref: (el) => (this.paymentMethodOptionsRef = el), "show-card": !this.disableCreditCard, "show-ach": !this.disableBankAccount, "show-bnpl": !this.disableBnpl, "show-saved-payment-methods": !this.disablePaymentMethodGroup, bnpl: (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.bnpl, "client-id": (_b = this.checkout) === null || _b === void 0 ? void 0 : _b.payment_client_id, "account-id": (_c = this.checkout) === null || _c === void 0 ? void 0 : _c.account_id, savedPaymentMethods: ((_d = this.checkout) === null || _d === void 0 ? void 0 : _d.payment_methods) || [], paymentAmount: (_e = this.checkout) === null || _e === void 0 ? void 0 : _e.payment_amount }))));
120
+ return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h("justifi-skeleton", { variant: "rounded", height: "300px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("justifi-payment-method-options", { ref: (el) => (this.paymentMethodOptionsRef = el), "show-card": !this.disableCreditCard, "show-ach": !this.disableBankAccount, "show-bnpl": !this.disableBnpl, paymentMethodGroupId: (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_method_group_id, "show-saved-payment-methods": !this.disablePaymentMethodGroup, bnpl: (_b = this.checkout) === null || _b === void 0 ? void 0 : _b.bnpl, authToken: this.authToken, "account-id": (_c = this.checkout) === null || _c === void 0 ? void 0 : _c.account_id, savedPaymentMethods: ((_d = this.checkout) === null || _d === void 0 ? void 0 : _d.payment_methods) || [], paymentAmount: (_e = this.checkout) === null || _e === void 0 ? void 0 : _e.payment_amount, insuranceToggled: this.insuranceToggled }))));
113
121
  }
114
122
  get summary() {
115
123
  var _a, _b;
116
124
  return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h("justifi-skeleton", { height: "24px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("div", { class: "jfi-payment-description" }, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", { class: "jfi-payment-total" }, h("span", { class: "jfi-payment-total-label" }, "Total"), "\u00A0", h("span", { class: "jfi-payment-total-amount" }, formatCurrency(+((_b = this.checkout) === null || _b === void 0 ? void 0 : _b.total_amount)))))));
117
125
  }
118
126
  render() {
119
- return (h(Host, { key: 'b9ed9bb3b562a095100db2ef913be5e66c2667b7' }, h("div", { key: '3c31de9bcf652f407179d493f4d061c05eba85df', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '48390444c2118554692c4668400252c8fdc8b756', class: "col-12 mb-4" }, h("h2", { key: 'b04d9c5d1c6ce47a9c73ccfa5e95a0a7942aaf9f', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: 'c47d1ea97207dd0706b865467c912a4884c541d9', class: "col-12" }, h("h2", { key: 'b09fa554fe810f1c801ce6dae16938dea061937f', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: 'b4f423876effb2cc6a3304d66c800fb889cff0a1', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: 'c994dc3fdbc5c0f794f85f54bd2ff91cb1ecdfe7', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: '006372341dacb61702902ae3e8732d8e4268490f', class: "col-12" }, h("slot", { key: '09054f7045ca784c1a0e781e10afe29cb04c972d', name: "insurance" })), h("div", { key: 'd7aaa6e830cbaf80958ffab573d9005bde8ba728', class: "col-12" }, h("div", { key: 'eb87c92dfb4f0e85851c4e43c014743fcb7fdb09', class: "d-flex justify-content-end" }, h("button", { key: '93f1b3a6ee8469707ee18135e8cf8ffa57965ef5', type: "submit", onClick: event => this.submit(event), disabled: this.isLoading, part: "pay-button", class: `btn btn-primary jfi-submit-button ${this.isLoading ? 'jfi-submit-button-loading' : ''}` }, this.isLoading ? this.loadingSpinner : 'Pay'))))));
127
+ return (h(StyledHost, { key: '2b96ee13916f7da0c872ba6f72223368b2c666e3' }, h("div", { key: 'c9b10b32f8b3c69fef559b6ff9753efad3ed1fef', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '2bce2147ecb9b18d5d3b60843a0af77b2fc4bcb2', class: "col-12" }, h("h2", { key: '690fe9231ec98d3500497c27ae73ff0ed25549ef', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: '719ba6b07d282b18e85a8ef330c21f30a1caf921', class: "col-12" }, h("slot", { key: 'd75c873384397b080e17dfcb7571e29eacd4c298', name: "insurance" })), h("div", { key: '8a72d01adba931e56bc685aa4d8bc53b1db91bdc', class: "col-12 mt-4" }, h("h2", { key: 'b09d2c310b22c01287d8783ca82b4108b0e18868', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: '00b969e4d3ea8fbfa0325aae334862a485cd117b', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: 'a952ad0a2070926eb6d73fa86b9fd7c9b9f82748', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: 'aec96d897f66e146940c133bfe2be046dbe83a34', class: "col-12" }, h("div", { key: '5b5adba09d08b6381f3fe8b84a494433f58be556', class: "d-flex justify-content-end" }, h("button", { key: '4048bd514eebcabca392d2f33691491ed9be7037', type: "submit", onClick: event => this.submit(event), disabled: this.isLoading, part: "pay-button", class: `btn btn-primary jfi-submit-button ${this.isLoading ? 'jfi-submit-button-loading' : ''}` }, this.isLoading ? this.loadingSpinner : 'Pay'))))));
120
128
  }
121
129
  static get is() { return "justifi-checkout-core"; }
122
130
  static get encapsulation() { return "shadow"; }
123
131
  static get originalStyleUrls() {
124
132
  return {
125
- "$": ["checkout-core.scss"]
133
+ "$": ["checkout-core.css", "header.css"]
126
134
  };
127
135
  }
128
136
  static get styleUrls() {
129
137
  return {
130
- "$": ["checkout-core.css"]
138
+ "$": ["checkout-core.css", "header.css"]
131
139
  };
132
140
  }
133
141
  static get properties() {
@@ -300,7 +308,8 @@ export class CheckoutCore {
300
308
  "checkout": {},
301
309
  "serverError": {},
302
310
  "renderState": {},
303
- "creatingNewPaymentMethod": {}
311
+ "creatingNewPaymentMethod": {},
312
+ "insuranceToggled": {}
304
313
  };
305
314
  }
306
315
  static get events() {
@@ -346,6 +355,57 @@ export class CheckoutCore {
346
355
  }
347
356
  }
348
357
  }
358
+ }, {
359
+ "method": "loaded",
360
+ "name": "loaded",
361
+ "bubbles": true,
362
+ "cancelable": true,
363
+ "composed": true,
364
+ "docs": {
365
+ "tags": [],
366
+ "text": ""
367
+ },
368
+ "complexType": {
369
+ "original": "ILoadedEventResponse",
370
+ "resolved": "{ checkout_status: ICheckoutStatus; }",
371
+ "references": {
372
+ "ILoadedEventResponse": {
373
+ "location": "import",
374
+ "path": "../../api/Checkout",
375
+ "id": "src/api/Checkout.ts::ILoadedEventResponse"
376
+ }
377
+ }
378
+ }
349
379
  }];
350
380
  }
381
+ static get methods() {
382
+ return {
383
+ "fillBillingForm": {
384
+ "complexType": {
385
+ "signature": "(fields: BillingFormFields) => Promise<void>",
386
+ "parameters": [{
387
+ "name": "fields",
388
+ "type": "BillingFormFields",
389
+ "docs": ""
390
+ }],
391
+ "references": {
392
+ "Promise": {
393
+ "location": "global",
394
+ "id": "global::Promise"
395
+ },
396
+ "BillingFormFields": {
397
+ "location": "import",
398
+ "path": "../billing-form/billing-form-schema",
399
+ "id": "src/components/billing-form/billing-form-schema.ts::BillingFormFields"
400
+ }
401
+ },
402
+ "return": "Promise<void>"
403
+ },
404
+ "docs": {
405
+ "text": "",
406
+ "tags": []
407
+ }
408
+ }
409
+ };
410
+ }
351
411
  }
@@ -47,8 +47,15 @@ export class Checkout {
47
47
  propChanged() {
48
48
  this.initializeGetCheckout();
49
49
  }
50
+ async fillBillingForm(fields) {
51
+ this.checkoutCoreRef.fillBillingForm(fields);
52
+ }
50
53
  render() {
51
- return (h("justifi-checkout-core", { key: '1844bb35fc8d4f24e2983cb540a1fd10ec510cc1', getCheckout: this.getCheckout, complete: this.complete, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, disableBnpl: this.disableBnpl, disablePaymentMethodGroup: this.disablePaymentMethodGroup }, h("div", { key: '2e2676cfd661970ef1ff8adaa2e8e75db8581f11', slot: "insurance" }, h("slot", { key: '1d6448f4f7db270924160791ec08fb8f115fb2c1', name: "insurance" }))));
54
+ return (h("justifi-checkout-core", { key: '5dd0269c6fd04bff259204e80800803e618ffa83', getCheckout: this.getCheckout, authToken: this.authToken, complete: this.complete, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, disableBnpl: this.disableBnpl, disablePaymentMethodGroup: this.disablePaymentMethodGroup, ref: el => {
55
+ if (el) {
56
+ this.checkoutCoreRef = el;
57
+ }
58
+ } }, h("div", { key: 'a659fc258e90c32b4b16ea1d92492c0e16f830a3', slot: "insurance" }, h("slot", { key: 'c92ba9f86f72b372cafabbdd7aba92cee0af44f7', name: "insurance" }))));
52
59
  }
53
60
  static get is() { return "justifi-checkout"; }
54
61
  static get properties() {
@@ -203,8 +210,59 @@ export class Checkout {
203
210
  }
204
211
  }
205
212
  }
213
+ }, {
214
+ "method": "loadedEvent",
215
+ "name": "loaded",
216
+ "bubbles": true,
217
+ "cancelable": true,
218
+ "composed": true,
219
+ "docs": {
220
+ "tags": [],
221
+ "text": ""
222
+ },
223
+ "complexType": {
224
+ "original": "ILoadedEventResponse",
225
+ "resolved": "{ checkout_status: ICheckoutStatus; }",
226
+ "references": {
227
+ "ILoadedEventResponse": {
228
+ "location": "import",
229
+ "path": "../../api",
230
+ "id": "src/api/index.ts::ILoadedEventResponse"
231
+ }
232
+ }
233
+ }
206
234
  }];
207
235
  }
236
+ static get methods() {
237
+ return {
238
+ "fillBillingForm": {
239
+ "complexType": {
240
+ "signature": "(fields: BillingFormFields) => Promise<void>",
241
+ "parameters": [{
242
+ "name": "fields",
243
+ "type": "BillingFormFields",
244
+ "docs": ""
245
+ }],
246
+ "references": {
247
+ "Promise": {
248
+ "location": "global",
249
+ "id": "global::Promise"
250
+ },
251
+ "BillingFormFields": {
252
+ "location": "import",
253
+ "path": "../billing-form/billing-form-schema",
254
+ "id": "src/components/billing-form/billing-form-schema.ts::BillingFormFields"
255
+ }
256
+ },
257
+ "return": "Promise<void>"
258
+ },
259
+ "docs": {
260
+ "text": "",
261
+ "tags": []
262
+ }
263
+ }
264
+ };
265
+ }
208
266
  static get watchers() {
209
267
  return [{
210
268
  "propName": "authToken",
@@ -0,0 +1,20 @@
1
+ .form-check-input,
2
+ label {
3
+ cursor: pointer;
4
+ }
5
+
6
+ .form-check-input {
7
+ background-color: var(--jfi-radio-button-background-color);
8
+ border-color: var(--jfi-radio-button-border-color);
9
+ }
10
+
11
+ .form-check-input:checked,
12
+ .form-check-input:checked:focus {
13
+ background-color: var(--jfi-radio-button-background-color-selected);
14
+ border-color: var(--jfi-radio-button-border-color-selected);
15
+ }
16
+
17
+ .form-check-input:focus {
18
+ border-color: var(--jfi-radio-button-border-color-focus);
19
+ box-shadow: var(--jfi-radio-button-box-shadow-focus);
20
+ }
@@ -0,0 +1,4 @@
1
+ .jfi-header {
2
+ color: var(--jfi-header-color);
3
+ border-bottom: var(--jfi-header-border);
4
+ }
@@ -10,19 +10,27 @@ export class NewPaymentMethod {
10
10
  this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
11
11
  };
12
12
  this.iframeOrigin = config.iframeOrigin;
13
- this.clientId = undefined;
13
+ this.authToken = undefined;
14
14
  this.accountId = undefined;
15
15
  this.paymentMethodOption = undefined;
16
+ this.paymentMethodGroupId = undefined;
16
17
  this.isSelected = undefined;
18
+ this.saveNewPaymentMethodChecked = false;
17
19
  }
18
- async resolvePaymentMethod() {
20
+ handleCheckboxChanged(event) {
21
+ this.saveNewPaymentMethodChecked = event.detail;
22
+ }
23
+ async fillBillingForm(fields) {
24
+ this.billingFormRef.fill(fields);
25
+ }
26
+ async resolvePaymentMethod(insuranceValidation) {
19
27
  var _a, _b;
20
28
  if (!this.paymentMethodFormRef || !this.billingFormRef)
21
29
  return;
22
- const billingFormValidation = await this.billingFormRef.validate();
23
- const paymentMethodFormValidation = await this.paymentMethodFormRef.validate();
24
- if (!billingFormValidation.isValid || !paymentMethodFormValidation.isValid)
25
- return;
30
+ const isValid = await this.validate();
31
+ if (!isValid || !insuranceValidation.isValid) {
32
+ return { validationError: true };
33
+ }
26
34
  const tokenizeResponse = await this.tokenize();
27
35
  if (tokenizeResponse.error) {
28
36
  return { error: tokenizeResponse.error };
@@ -32,11 +40,22 @@ export class NewPaymentMethod {
32
40
  return { token: ((_a = tokenizeRessponseData.card) === null || _a === void 0 ? void 0 : _a.token) || ((_b = tokenizeRessponseData.bank_account) === null || _b === void 0 ? void 0 : _b.token) };
33
41
  }
34
42
  }
43
+ async validate() {
44
+ const billingFormValidation = await this.billingFormRef.validate();
45
+ const paymentMethodFormValidation = await this.paymentMethodFormRef.validate();
46
+ return billingFormValidation.isValid && paymentMethodFormValidation.isValid;
47
+ }
35
48
  async tokenize() {
36
49
  try {
37
50
  const billingFormFieldValues = await this.billingFormRef.getValues();
38
- const paymentMethodData = Object.assign({}, billingFormFieldValues);
39
- const clientId = this.clientId;
51
+ let paymentMethodData;
52
+ if (this.saveNewPaymentMethodChecked) {
53
+ paymentMethodData = Object.assign(Object.assign({}, billingFormFieldValues), { payment_method_group_id: this.paymentMethodGroupId });
54
+ }
55
+ else {
56
+ paymentMethodData = Object.assign({}, billingFormFieldValues);
57
+ }
58
+ const clientId = this.authToken;
40
59
  const tokenizeResponse = await this.paymentMethodFormRef.tokenize(clientId, paymentMethodData, this.accountId);
41
60
  return tokenizeResponse;
42
61
  }
@@ -46,11 +65,11 @@ export class NewPaymentMethod {
46
65
  }
47
66
  showNewPaymentMethodForm() {
48
67
  var _a;
49
- return (h("div", { class: "mt-2 pb-4 border-bottom" }, h("div", { class: "mb-3" }, h("justifi-payment-method-form", { ref: (el) => (this.paymentMethodFormRef = el), "payment-method-form-type": (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, "iframe-origin": this.iframeOrigin })), h("h3", { class: "fs-6 fw-bold lh-lg mb-4" }, "Billing address"), h("justifi-billing-form", { ref: (el) => (this.billingFormRef = el) })));
68
+ return (h("div", { class: "mt-2 pb-4 border-bottom" }, h("div", { class: "mb-3" }, h("justifi-payment-method-form", { ref: (el) => (this.paymentMethodFormRef = el), "payment-method-form-type": (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, "iframe-origin": this.iframeOrigin })), h("h3", { class: "fs-6 fw-bold lh-lg mb-4" }, "Billing address"), h("justifi-billing-form", { ref: (el) => (this.billingFormRef = el) }), h("justifi-save-new-payment-method", { hidden: !this.paymentMethodGroupId })));
50
69
  }
51
70
  render() {
52
71
  var _a, _b, _c, _d;
53
- return (h("div", { key: '8bddfe713987ded758c657639f2fde20c6a3e9a8', class: "payment-method" }, h("div", { key: '972cd6066acdc0414daae542d5dc4ef17414b85e', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: 'f15d6d8eeeda7c016885fc1c1d0a509fb774894f', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '1b5d421bb919f815932387b1047163d7686d17c6', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
72
+ return (h("div", { key: '450c5e6cb4d59d63733c78dff2aa2d59fe2ac579', class: "payment-method" }, h("div", { key: '6fc5d18cbf1d6287e5b29859ceb56e36088ad43a', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '508d561fb7bba38e7fc0b91c519b9e2aa7529e2d', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: 'bc34b7f590107caa9f99e7fff8741cbbbe6c93e5', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
54
73
  }
55
74
  static get is() { return "justifi-new-payment-method"; }
56
75
  static get properties() {
@@ -73,7 +92,7 @@ export class NewPaymentMethod {
73
92
  "reflect": false,
74
93
  "defaultValue": "config.iframeOrigin"
75
94
  },
76
- "clientId": {
95
+ "authToken": {
77
96
  "type": "string",
78
97
  "mutable": false,
79
98
  "complexType": {
@@ -87,7 +106,7 @@ export class NewPaymentMethod {
87
106
  "tags": [],
88
107
  "text": ""
89
108
  },
90
- "attribute": "client-id",
109
+ "attribute": "auth-token",
91
110
  "reflect": false
92
111
  },
93
112
  "accountId": {
@@ -117,7 +136,7 @@ export class NewPaymentMethod {
117
136
  "PaymentMethodOption": {
118
137
  "location": "import",
119
138
  "path": "./payment-method-option-utils",
120
- "id": "src/components/checkout/payment-method-option-utils.tsx::PaymentMethodOption"
139
+ "id": "src/components/checkout/payment-method-option-utils.ts::PaymentMethodOption"
121
140
  }
122
141
  }
123
142
  },
@@ -128,6 +147,23 @@ export class NewPaymentMethod {
128
147
  "text": ""
129
148
  }
130
149
  },
150
+ "paymentMethodGroupId": {
151
+ "type": "string",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "string",
155
+ "resolved": "string",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": ""
163
+ },
164
+ "attribute": "payment-method-group-id",
165
+ "reflect": false
166
+ },
131
167
  "isSelected": {
132
168
  "type": "boolean",
133
169
  "mutable": false,
@@ -147,6 +183,11 @@ export class NewPaymentMethod {
147
183
  }
148
184
  };
149
185
  }
186
+ static get states() {
187
+ return {
188
+ "saveNewPaymentMethodChecked": {}
189
+ };
190
+ }
150
191
  static get events() {
151
192
  return [{
152
193
  "method": "paymentMethodOptionSelected",
@@ -167,10 +208,40 @@ export class NewPaymentMethod {
167
208
  }
168
209
  static get methods() {
169
210
  return {
211
+ "fillBillingForm": {
212
+ "complexType": {
213
+ "signature": "(fields: BillingFormFields) => Promise<void>",
214
+ "parameters": [{
215
+ "name": "fields",
216
+ "type": "BillingFormFields",
217
+ "docs": ""
218
+ }],
219
+ "references": {
220
+ "Promise": {
221
+ "location": "global",
222
+ "id": "global::Promise"
223
+ },
224
+ "BillingFormFields": {
225
+ "location": "import",
226
+ "path": "../billing-form/billing-form-schema",
227
+ "id": "src/components/billing-form/billing-form-schema.ts::BillingFormFields"
228
+ }
229
+ },
230
+ "return": "Promise<void>"
231
+ },
232
+ "docs": {
233
+ "text": "",
234
+ "tags": []
235
+ }
236
+ },
170
237
  "resolvePaymentMethod": {
171
238
  "complexType": {
172
- "signature": "() => Promise<PaymentMethodPayload>",
173
- "parameters": [],
239
+ "signature": "(insuranceValidation: any) => Promise<PaymentMethodPayload>",
240
+ "parameters": [{
241
+ "name": "insuranceValidation",
242
+ "type": "any",
243
+ "docs": ""
244
+ }],
174
245
  "references": {
175
246
  "Promise": {
176
247
  "location": "global",
@@ -191,4 +262,13 @@ export class NewPaymentMethod {
191
262
  }
192
263
  };
193
264
  }
265
+ static get listeners() {
266
+ return [{
267
+ "name": "checkboxChanged",
268
+ "method": "handleCheckboxChanged",
269
+ "target": undefined,
270
+ "capture": false,
271
+ "passive": false
272
+ }];
273
+ }
194
274
  }
@@ -1,8 +1,10 @@
1
+ import { snakeToCamel } from "../../utils/utils";
1
2
  export class PaymentMethodOption {
2
3
  constructor(paymentMethod) {
3
4
  this.id = paymentMethod.id;
4
5
  this.brand = paymentMethod.brand;
5
6
  this.acct_last_four = paymentMethod.acct_last_four;
7
+ this.type = snakeToCamel(paymentMethod.type);
6
8
  }
7
9
  }
8
10
  ;