@justifi/webcomponents 5.2.0 → 5.3.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 (574) hide show
  1. package/dist/cjs/{Checkout-2ff4f9c8.js → Checkout-0f1c8abe.js} +1 -1
  2. package/dist/cjs/Document-0b828345.js +58 -0
  3. package/dist/cjs/{Payment-84817e2d.js → Payment-c47ed1e1.js} +1 -1
  4. package/dist/cjs/{SubAccount-f236913b.js → SubAccount-509ebf93.js} +1 -1
  5. package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
  6. package/dist/cjs/{badge-fbf58cb9.js → badge-ccfe03bf.js} +1 -1
  7. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +130 -0
  8. package/dist/cjs/bank-account-form_9.cjs.entry.js +12 -12
  9. package/dist/cjs/billing-form_3.cjs.entry.js +8 -7
  10. package/dist/cjs/{business-additional-questions-schema-caa23e95.js → business-additional-questions-schema-2f66f025.js} +1 -1
  11. package/dist/cjs/business-details-core.cjs.entry.js +3 -3
  12. package/dist/cjs/{business-identity-schema-0c537067.js → business-identity-schema-be495474.js} +1 -1
  13. package/dist/cjs/{business.service-ffb6f478.js → business.service-d575b515.js} +7 -0
  14. package/dist/cjs/{button-e7796b07.js → button-8b634147.js} +1 -1
  15. package/dist/cjs/{check-pkg-version-dee8dbb7.js → check-pkg-version-1658df6f.js} +1 -1
  16. package/dist/cjs/{checkout.service-e9c05c15.js → checkout.service-057b5a7a.js} +5 -3
  17. package/dist/cjs/checkouts-list-core.cjs.entry.js +12 -10
  18. package/dist/cjs/{checkouts-table-0f19c1e6.js → checkouts-table-efa1cbab.js} +3 -3
  19. package/dist/cjs/{custom-popper.cjs.entry.js → custom-popper_4.cjs.entry.js} +141 -2
  20. package/dist/cjs/{dispute.service-9272a2a6.js → dispute.service-df9e1830.js} +5 -3
  21. package/dist/cjs/{event-types-aa1a9be1.js → event-types-34b103b4.js} +2 -2
  22. package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
  23. package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
  24. package/dist/cjs/form-control-date.cjs.entry.js +4 -4
  25. package/dist/cjs/{form-control-error-text-c1f49f35.js → form-control-error-text-46a7f2dd.js} +1 -1
  26. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +4 -4
  27. package/dist/cjs/{form-control-help-text-e6cc71a7.js → form-control-help-text-98c882e3.js} +1 -1
  28. package/dist/cjs/form-control-monetary.cjs.entry.js +5 -5
  29. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +4 -4
  30. package/dist/cjs/form-control-number.cjs.entry.js +5 -5
  31. package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
  32. package/dist/cjs/{get-payout-csv-778db023.js → get-payout-csv-527a238c.js} +5 -4
  33. package/dist/cjs/{get-subaccounts-b087fa39.js → get-subaccounts-6068c1aa.js} +5 -4
  34. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -5
  35. package/dist/cjs/{header-1-96b97cab.js → header-1-4c21f7ca.js} +1 -1
  36. package/dist/cjs/{header-3-ce77b96b.js → header-3-130206cc.js} +1 -1
  37. package/dist/cjs/{insurance-state-8959c7c7.js → insurance-state-21fde44f.js} +1 -1
  38. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +833 -0
  39. package/dist/cjs/{justifi-additional-questions-form-step_10.cjs.entry.js → justifi-additional-questions-form-step_9.cjs.entry.js} +29 -226
  40. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +9 -9
  41. package/dist/cjs/justifi-business-details.cjs.entry.js +5 -5
  42. package/dist/cjs/justifi-business-form.cjs.entry.js +15 -13
  43. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
  44. package/dist/cjs/justifi-checkout-core.cjs.entry.js +8 -8
  45. package/dist/cjs/justifi-checkout.cjs.entry.js +10 -9
  46. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
  47. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +14 -13
  48. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  49. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  50. package/dist/cjs/justifi-dispute-management.cjs.entry.js +9 -8
  51. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +14 -13
  52. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
  53. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +7 -6
  54. package/dist/cjs/justifi-payment-details.cjs.entry.js +11 -10
  55. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +2 -2
  56. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -4
  57. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +25 -4
  58. package/dist/cjs/justifi-payments-list.cjs.entry.js +18 -14
  59. package/dist/cjs/justifi-payout-details.cjs.entry.js +11 -10
  60. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
  61. package/dist/cjs/justifi-payouts-list.cjs.entry.js +14 -13
  62. package/dist/cjs/justifi-refund-form.cjs.entry.js +7 -5
  63. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +4 -4
  64. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +9 -8
  65. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
  66. package/dist/cjs/justifi-terminals-list.cjs.entry.js +12 -11
  67. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +5 -5
  68. package/dist/cjs/loader.cjs.js +1 -1
  69. package/dist/cjs/{package-8b9059cc.js → package-06419e54.js} +1 -1
  70. package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
  71. package/dist/cjs/{parts-addf2176.js → parts-b2ff8b68.js} +14 -0
  72. package/dist/cjs/payment-details-core.cjs.entry.js +13 -13
  73. package/dist/cjs/{payment-provisioning-actions-fbd30d1b.js → payment-provisioning-actions-382ab48c.js} +33 -2
  74. package/dist/cjs/{payment.service-042c7c99.js → payment.service-3eebfe3e.js} +5 -3
  75. package/dist/cjs/payments-list-core.cjs.entry.js +22 -19
  76. package/dist/cjs/payments-list-params-state-442d9944.js +22 -0
  77. package/dist/cjs/{payments-status-411c325c.js → payments-status-ec12ee6a.js} +1 -1
  78. package/dist/cjs/{payments-table-16f3f95e.js → payments-table-f3aa174d.js} +3 -3
  79. package/dist/cjs/payout-details-core.cjs.entry.js +8 -8
  80. package/dist/cjs/payouts-list-core.cjs.entry.js +13 -12
  81. package/dist/cjs/{payouts-status-0951e39d.js → payouts-status-9f2e9a3a.js} +1 -1
  82. package/dist/cjs/{payouts-table-bc15179c.js → payouts-table-4efa53fa.js} +3 -3
  83. package/dist/cjs/{schema-validations-0be8068a.js → schema-validations-cc4e6071.js} +5 -92
  84. package/dist/cjs/{skeleton-c4903a53.js → skeleton-0353466d.js} +1 -1
  85. package/dist/cjs/{spinner-aac395e3.js → spinner-4fc60a51.js} +1 -1
  86. package/dist/cjs/table-filters-menu.cjs.entry.js +3 -3
  87. package/dist/cjs/terminals-list-core.cjs.entry.js +12 -10
  88. package/dist/cjs/{terminals-table-3c19847b.js → terminals-table-5e4bce93.js} +2 -2
  89. package/dist/cjs/{utils-a05a8bf6.js → utils-134dda01.js} +1 -1
  90. package/dist/cjs/{utils-5fb95d31.js → utils-337befa9.js} +0 -4
  91. package/dist/cjs/webcomponents.cjs.js +1 -1
  92. package/dist/collection/api/index.js +5 -0
  93. package/dist/collection/api/services/business.service.js +6 -0
  94. package/dist/collection/collection-manifest.json +3 -4
  95. package/dist/collection/components/business-forms/payment-provisioning/{document-uploads/business-document-upload-input-group.js → bank-account/bank-account-document-inputs.js} +19 -58
  96. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +85 -0
  97. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step-core.js +207 -47
  98. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +15 -7
  99. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-documents-on-file.js +63 -0
  100. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  101. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -1
  102. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +1 -1
  103. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
  104. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
  105. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-actions.js +32 -2
  106. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +2 -3
  107. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +4 -1
  108. package/dist/collection/components/business-forms/schemas/business-bank-account-schema.js +8 -4
  109. package/dist/collection/components/business-forms/schemas/schema-validations.js +2 -4
  110. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +1 -1
  111. package/dist/collection/components/checkout/card-form/card-form.js +1 -1
  112. package/dist/collection/components/checkout/checkout-core.js +1 -1
  113. package/dist/collection/components/checkout/checkout.js +2 -2
  114. package/dist/collection/components/checkout/new-payment-method.js +1 -1
  115. package/dist/collection/components/checkout/payment-method-options.js +1 -1
  116. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  117. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  118. package/dist/collection/components/checkout/sezzle-payment-method.js +1 -1
  119. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  120. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  121. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  122. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  123. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  124. package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
  125. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  126. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  127. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  128. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  129. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  130. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  131. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  132. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  133. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  134. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  135. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  136. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +1 -1
  137. package/dist/collection/components/payment-details/payment-details-core.js +7 -7
  138. package/dist/collection/components/payments-list/get-payments.js +4 -1
  139. package/dist/collection/components/payments-list/payments-list-core.js +10 -11
  140. package/dist/collection/components/payments-list/payments-list-filters.js +113 -3
  141. package/dist/collection/components/payments-list/payments-list-params-state.js +11 -5
  142. package/dist/collection/components/payments-list/payments-list.js +1 -1
  143. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  144. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  145. package/dist/collection/components/payouts-list/payouts-list-filters.js +1 -1
  146. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  147. package/dist/collection/components/refund-form/refund-form.js +1 -1
  148. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  149. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  150. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  151. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
  152. package/dist/collection/styles/parts.js +9 -0
  153. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  154. package/dist/collection/ui-components/filters/table-filters-menu.js +1 -1
  155. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  156. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  157. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  158. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  159. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  160. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  161. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  162. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  163. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  164. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  165. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  166. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  167. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  168. package/dist/docs.json +579 -519
  169. package/dist/esm/{Checkout-d476bb83.js → Checkout-8325c97a.js} +1 -1
  170. package/dist/esm/Document-1907c0d4.js +55 -0
  171. package/dist/esm/{Payment-47630113.js → Payment-82d2f453.js} +1 -1
  172. package/dist/esm/{SubAccount-f31349a9.js → SubAccount-a73bf971.js} +1 -1
  173. package/dist/esm/additional-questions-details_5.entry.js +3 -3
  174. package/dist/esm/{badge-b034e71b.js → badge-938ba4b1.js} +1 -1
  175. package/dist/esm/bank-account-document-form-inputs_4.entry.js +123 -0
  176. package/dist/esm/bank-account-form_9.entry.js +12 -12
  177. package/dist/esm/billing-form_3.entry.js +8 -7
  178. package/dist/esm/{business-additional-questions-schema-aba9747e.js → business-additional-questions-schema-212a96ed.js} +1 -1
  179. package/dist/esm/business-details-core.entry.js +3 -3
  180. package/dist/esm/{business-identity-schema-8b0f1619.js → business-identity-schema-05bd2a5f.js} +1 -1
  181. package/dist/esm/{business.service-ab2663a3.js → business.service-6a208f8f.js} +7 -1
  182. package/dist/esm/{button-8a02823c.js → button-4b3f3934.js} +1 -1
  183. package/dist/esm/{check-pkg-version-51d2616b.js → check-pkg-version-bac7eb5e.js} +1 -1
  184. package/dist/esm/{checkout.service-c275270e.js → checkout.service-ac067baa.js} +5 -3
  185. package/dist/esm/checkouts-list-core.entry.js +12 -10
  186. package/dist/esm/{checkouts-table-115bacc4.js → checkouts-table-1634366d.js} +3 -3
  187. package/dist/esm/{custom-popper.entry.js → custom-popper_4.entry.js} +140 -4
  188. package/dist/esm/{dispute.service-882e35ed.js → dispute.service-26a788a8.js} +5 -3
  189. package/dist/esm/{event-types-948c3b14.js → event-types-fd7a05d9.js} +2 -2
  190. package/dist/esm/form-alert_5.entry.js +1 -1
  191. package/dist/esm/form-control-checkbox.entry.js +5 -5
  192. package/dist/esm/form-control-date.entry.js +4 -4
  193. package/dist/esm/{form-control-error-text-066cdad4.js → form-control-error-text-b3d14e92.js} +1 -1
  194. package/dist/esm/form-control-file-v2_2.entry.js +4 -4
  195. package/dist/esm/{form-control-help-text-3b6f5980.js → form-control-help-text-7b07fc37.js} +1 -1
  196. package/dist/esm/form-control-monetary.entry.js +5 -5
  197. package/dist/esm/form-control-number-masked_2.entry.js +4 -4
  198. package/dist/esm/form-control-number.entry.js +5 -5
  199. package/dist/esm/form-control-radio.entry.js +3 -3
  200. package/dist/esm/{get-payout-csv-50aea928.js → get-payout-csv-684fece6.js} +5 -4
  201. package/dist/esm/{get-subaccounts-ab3dd32c.js → get-subaccounts-b1bed757.js} +5 -4
  202. package/dist/esm/gross-payment-chart-core.entry.js +5 -5
  203. package/dist/esm/{header-1-75c284dd.js → header-1-4db0c986.js} +1 -1
  204. package/dist/esm/{header-3-4a327395.js → header-3-fd150ccf.js} +1 -1
  205. package/dist/esm/{insurance-state-b495be64.js → insurance-state-529e2d0d.js} +1 -1
  206. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +824 -0
  207. package/dist/esm/{justifi-additional-questions-form-step_10.entry.js → justifi-additional-questions-form-step_9.entry.js} +31 -227
  208. package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
  209. package/dist/esm/justifi-business-details.entry.js +5 -5
  210. package/dist/esm/justifi-business-form.entry.js +15 -13
  211. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  212. package/dist/esm/justifi-checkout-core.entry.js +8 -8
  213. package/dist/esm/justifi-checkout.entry.js +10 -9
  214. package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
  215. package/dist/esm/justifi-checkouts-list.entry.js +14 -13
  216. package/dist/esm/justifi-details.entry.js +2 -2
  217. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  218. package/dist/esm/justifi-dispute-management.entry.js +9 -8
  219. package/dist/esm/justifi-dispute-notification_3.entry.js +14 -13
  220. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
  221. package/dist/esm/justifi-owner-form_3.entry.js +7 -6
  222. package/dist/esm/justifi-payment-details.entry.js +11 -10
  223. package/dist/esm/justifi-payment-provisioning-core.entry.js +2 -2
  224. package/dist/esm/justifi-payment-provisioning.entry.js +4 -4
  225. package/dist/esm/justifi-payments-list-filters.entry.js +25 -4
  226. package/dist/esm/justifi-payments-list.entry.js +18 -14
  227. package/dist/esm/justifi-payout-details.entry.js +11 -10
  228. package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
  229. package/dist/esm/justifi-payouts-list.entry.js +14 -13
  230. package/dist/esm/justifi-refund-form.entry.js +7 -5
  231. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +4 -4
  232. package/dist/esm/justifi-season-interruption-insurance.entry.js +9 -8
  233. package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
  234. package/dist/esm/justifi-terminals-list.entry.js +12 -11
  235. package/dist/esm/justifi-tokenize-payment-method.entry.js +5 -5
  236. package/dist/esm/loader.js +1 -1
  237. package/dist/esm/{package-5eedfd72.js → package-90ebd343.js} +1 -1
  238. package/dist/esm/pagination-menu.entry.js +1 -1
  239. package/dist/esm/{parts-93f379ab.js → parts-ab2bb4b5.js} +9 -1
  240. package/dist/esm/payment-details-core.entry.js +13 -13
  241. package/dist/esm/{payment-provisioning-actions-a262ee82.js → payment-provisioning-actions-726795a0.js} +33 -3
  242. package/dist/esm/{payment.service-92b90855.js → payment.service-2e418da1.js} +5 -3
  243. package/dist/esm/payments-list-core.entry.js +22 -19
  244. package/dist/esm/payments-list-params-state-d05b24aa.js +16 -0
  245. package/dist/esm/{payments-status-82466054.js → payments-status-abf1724b.js} +1 -1
  246. package/dist/esm/{payments-table-c0bb25b6.js → payments-table-88fbab49.js} +3 -3
  247. package/dist/esm/payout-details-core.entry.js +8 -8
  248. package/dist/esm/payouts-list-core.entry.js +13 -12
  249. package/dist/esm/{payouts-status-b98c8297.js → payouts-status-d9987a8a.js} +1 -1
  250. package/dist/esm/{payouts-table-4382a264.js → payouts-table-055d3633.js} +3 -3
  251. package/dist/esm/{schema-validations-5b0ac96b.js → schema-validations-ccea6a06.js} +4 -84
  252. package/dist/esm/{skeleton-3bcb2b5d.js → skeleton-ee7c3b32.js} +1 -1
  253. package/dist/esm/{spinner-b83f3a87.js → spinner-8ec6669a.js} +1 -1
  254. package/dist/esm/table-filters-menu.entry.js +3 -3
  255. package/dist/esm/terminals-list-core.entry.js +12 -10
  256. package/dist/esm/{terminals-table-8f1c2146.js → terminals-table-2963e65b.js} +2 -2
  257. package/dist/esm/{utils-7fb6331d.js → utils-c2dc83b2.js} +1 -1
  258. package/dist/esm/{utils-b76d791e.js → utils-c37124fc.js} +1 -4
  259. package/dist/esm/webcomponents.js +1 -1
  260. package/dist/module/Checkout.js +1 -1
  261. package/dist/module/Payment.js +1 -1
  262. package/dist/module/SubAccount.js +1 -1
  263. package/dist/module/additional-questions.js +1 -1
  264. package/dist/module/additional-statement.js +2 -2
  265. package/dist/module/badge.js +1 -1
  266. package/dist/module/bank-account-document-form-inputs.d.ts +11 -0
  267. package/dist/module/bank-account-document-form-inputs.js +6 -0
  268. package/dist/module/bank-account-document-inputs.js +58 -0
  269. package/dist/module/bank-account-form-inputs.d.ts +11 -0
  270. package/dist/module/bank-account-form-inputs.js +6 -0
  271. package/dist/module/bank-account-form-inputs2.js +63 -0
  272. package/dist/module/bank-account-form2.js +1 -1
  273. package/dist/module/billing-form-wrapper.js +1 -1
  274. package/dist/module/business-additional-questions-form-step-core.js +2 -2
  275. package/dist/module/business-bank-account-form-step-core.js +239 -64
  276. package/dist/module/business-bank-account-form-step.js +42 -5
  277. package/dist/module/business-core-info-form-step-core.js +2 -2
  278. package/dist/module/business-core-info-form-step.js +1 -1
  279. package/dist/module/business-core-info-schema.js +1 -1
  280. package/dist/module/business-core-info.js +1 -1
  281. package/dist/module/business-documents-on-file.d.ts +11 -0
  282. package/dist/module/business-documents-on-file.js +4 -36
  283. package/dist/module/business-documents-on-file2.js +45 -0
  284. package/dist/module/business-form-options.js +1 -1
  285. package/dist/module/business-identity-schema.js +1 -1
  286. package/dist/module/business-owners-form-step-core.js +1 -1
  287. package/dist/module/business-owners-form-step.js +1 -1
  288. package/dist/module/business-representative-form-inputs.js +1 -1
  289. package/dist/module/business-representative-form-step-core.js +1 -1
  290. package/dist/module/business-representative-form-step.js +1 -1
  291. package/dist/module/business-terms-conditions-form-step.js +9 -11
  292. package/dist/module/business.service.js +7 -1
  293. package/dist/module/cancellation-policy.js +2 -2
  294. package/dist/module/card-form2.js +1 -1
  295. package/dist/module/checkout-core.js +2 -2
  296. package/dist/module/checkout.service.js +2 -0
  297. package/dist/module/checkouts-list-core2.js +6 -4
  298. package/dist/module/custom-popper2.js +2 -2
  299. package/dist/module/customer-details.js +2 -2
  300. package/dist/module/dispute-management-core.js +1 -1
  301. package/dist/module/dispute-notification.js +2 -2
  302. package/dist/module/dispute-response-actions.js +2 -1
  303. package/dist/module/dispute-response-core.js +1 -1
  304. package/dist/module/dispute-response.js +1 -1
  305. package/dist/module/duplicate-charge.js +2 -2
  306. package/dist/module/electronic-evidence.js +2 -2
  307. package/dist/module/event-types.js +22 -61
  308. package/dist/module/event-types2.js +61 -22
  309. package/dist/module/form-alert2.js +1 -1
  310. package/dist/module/form-control-checkbox2.js +3 -3
  311. package/dist/module/form-control-date2.js +3 -3
  312. package/dist/module/form-control-error-text.js +1 -1
  313. package/dist/module/form-control-file-v22.js +1 -1
  314. package/dist/module/form-control-file2.js +3 -3
  315. package/dist/module/form-control-monetary2.js +3 -3
  316. package/dist/module/form-control-number-masked2.js +3 -3
  317. package/dist/module/form-control-number.js +3 -3
  318. package/dist/module/form-control-radio2.js +3 -3
  319. package/dist/module/form-control-select2.js +3 -3
  320. package/dist/module/form-control-text2.js +3 -3
  321. package/dist/module/form-control-textarea2.js +3 -3
  322. package/dist/module/form-control-tooltip2.js +1 -1
  323. package/dist/module/get-payout-csv.js +2 -1
  324. package/dist/module/get-subaccounts.js +2 -1
  325. package/dist/module/gross-payment-chart-core2.js +2 -2
  326. package/dist/module/hidden-input2.js +2 -2
  327. package/dist/module/iframe-input2.js +4 -4
  328. package/dist/module/justifi-business-form.js +3 -1
  329. package/dist/module/justifi-checkout.js +2 -2
  330. package/dist/module/justifi-checkouts-list-filters.js +1 -1
  331. package/dist/module/justifi-checkouts-list.js +3 -2
  332. package/dist/module/justifi-dispute-management.js +1 -1
  333. package/dist/module/justifi-payment-details.js +2 -1
  334. package/dist/module/justifi-payment-provisioning.js +50 -56
  335. package/dist/module/justifi-payments-list-filters.js +32 -5
  336. package/dist/module/justifi-payments-list.js +7 -3
  337. package/dist/module/justifi-payout-details.js +2 -1
  338. package/dist/module/justifi-payouts-list-filters.js +2 -2
  339. package/dist/module/justifi-payouts-list.js +2 -1
  340. package/dist/module/justifi-refund-form.js +3 -1
  341. package/dist/module/justifi-season-interruption-insurance.js +3 -2
  342. package/dist/module/justifi-terminals-list-filters.js +1 -1
  343. package/dist/module/justifi-terminals-list.js +2 -1
  344. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  345. package/dist/module/legal-address-form-step-core.js +1 -1
  346. package/dist/module/legal-address-form-step.js +1 -1
  347. package/dist/module/new-payment-method.js +1 -1
  348. package/dist/module/owner-details2.js +1 -1
  349. package/dist/module/owner-form-core2.js +2 -2
  350. package/dist/module/owner-form.js +1 -1
  351. package/dist/module/package.js +1 -1
  352. package/dist/module/pagination-menu2.js +1 -1
  353. package/dist/module/parts.js +9 -1
  354. package/dist/module/payment-details-core2.js +8 -8
  355. package/dist/module/payment-method-options.js +1 -1
  356. package/dist/module/payment-provisioning-actions.js +33 -3
  357. package/dist/module/payment-provisioning-core.js +50 -56
  358. package/dist/module/payment-provisioning-form-buttons.js +1 -1
  359. package/dist/module/payment-provisioning-form-steps.js +51 -58
  360. package/dist/module/payment.service.js +2 -0
  361. package/dist/module/payments-list-core2.js +15 -13
  362. package/dist/module/payments-list-params-state.js +11 -5
  363. package/dist/module/payout-details-core2.js +2 -2
  364. package/dist/module/payouts-list-core2.js +6 -5
  365. package/dist/module/product-or-service.js +2 -2
  366. package/dist/module/refund-policy.js +2 -2
  367. package/dist/module/representative-details2.js +1 -1
  368. package/dist/module/save-new-payment-method.js +1 -1
  369. package/dist/module/saved-payment-method.js +2 -2
  370. package/dist/module/schema-validations.js +4 -31
  371. package/dist/module/season-interruption-insurance-core.js +2 -2
  372. package/dist/module/sezzle-payment-method.js +2 -2
  373. package/dist/module/shipping-details.js +2 -2
  374. package/dist/module/spinner.js +1 -1
  375. package/dist/module/table-filters-menu2.js +1 -1
  376. package/dist/module/terminals-list-core2.js +5 -3
  377. package/dist/module/utils2.js +1 -4
  378. package/dist/types/api/index.d.ts +4 -0
  379. package/dist/types/api/services/business.service.d.ts +7 -0
  380. package/dist/types/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.d.ts +7 -0
  381. package/dist/types/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.d.ts +7 -0
  382. package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step-core.d.ts +18 -6
  383. package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +3 -1
  384. package/dist/types/components/business-forms/payment-provisioning/{document-uploads → bank-account}/business-documents-on-file.d.ts +1 -0
  385. package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-actions.d.ts +9 -0
  386. package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-form-steps.d.ts +0 -1
  387. package/dist/types/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.d.ts +1 -0
  388. package/dist/types/components/business-forms/schemas/business-bank-account-schema.d.ts +5 -1
  389. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +2 -2
  390. package/dist/types/components/business-forms/schemas/schema-validations.d.ts +1 -1
  391. package/dist/types/components/payments-list/get-payments.d.ts +2 -1
  392. package/dist/types/components/payments-list/payments-list-core.d.ts +1 -1
  393. package/dist/types/components/payments-list/payments-list-filters.d.ts +5 -0
  394. package/dist/types/components/payments-list/payments-list-params-state.d.ts +4 -3
  395. package/dist/types/components.d.ts +81 -101
  396. package/dist/types/styles/parts.d.ts +8 -0
  397. package/dist/webcomponents/{p-2ce40098.js → p-01d4e35a.js} +1 -1
  398. package/dist/webcomponents/{p-d1f78cb5.js → p-0277c1b2.js} +1 -1
  399. package/dist/webcomponents/p-045d4ebf.entry.js +1 -0
  400. package/dist/webcomponents/p-08d87a52.entry.js +1 -0
  401. package/dist/webcomponents/p-0e68b7d6.entry.js +1 -0
  402. package/dist/webcomponents/p-0ef9eae6.entry.js +1 -0
  403. package/dist/webcomponents/{p-7b1fcab5.entry.js → p-0f6ae5ea.entry.js} +1 -1
  404. package/dist/webcomponents/p-131db5d1.entry.js +1 -0
  405. package/dist/webcomponents/p-1603fe4d.js +1 -0
  406. package/dist/webcomponents/p-18a7a9e6.entry.js +1 -0
  407. package/dist/webcomponents/p-1e8a1e01.entry.js +1 -0
  408. package/dist/webcomponents/{p-4c4f9e3b.js → p-21431a04.js} +1 -1
  409. package/dist/webcomponents/p-21cf557e.entry.js +1 -0
  410. package/dist/webcomponents/{p-09fd4ee2.entry.js → p-2916bb62.entry.js} +1 -1
  411. package/dist/webcomponents/p-298e290e.js +1 -0
  412. package/dist/webcomponents/{p-9069fab5.js → p-2a136295.js} +1 -1
  413. package/dist/webcomponents/{p-74736657.js → p-2ca5b5e4.js} +1 -1
  414. package/dist/webcomponents/p-2f94d478.entry.js +1 -0
  415. package/dist/webcomponents/p-31e2d12c.entry.js +1 -0
  416. package/dist/webcomponents/p-3c0b56cd.entry.js +1 -0
  417. package/dist/webcomponents/p-3d5c8a98.entry.js +1 -0
  418. package/dist/webcomponents/p-3e0f3d87.entry.js +1 -0
  419. package/dist/webcomponents/{p-f65abd18.js → p-3e716e03.js} +1 -1
  420. package/dist/webcomponents/p-40e23b13.js +1 -0
  421. package/dist/webcomponents/p-42047b14.entry.js +1 -0
  422. package/dist/webcomponents/p-44d2c762.entry.js +1 -0
  423. package/dist/webcomponents/{p-bb842885.entry.js → p-56addd0a.entry.js} +1 -1
  424. package/dist/webcomponents/p-58f5e37b.entry.js +1 -0
  425. package/dist/webcomponents/{p-d86c1f11.entry.js → p-5afefc50.entry.js} +2 -2
  426. package/dist/webcomponents/{p-92d78790.js → p-5b72bab7.js} +1 -1
  427. package/dist/webcomponents/{p-7db2a4d5.entry.js → p-5baec916.entry.js} +1 -1
  428. package/dist/webcomponents/{p-f76a7f9c.entry.js → p-5bf4535a.entry.js} +1 -1
  429. package/dist/webcomponents/p-61f0a2ce.js +1 -0
  430. package/dist/webcomponents/{p-e0f21a47.entry.js → p-62696f63.entry.js} +1 -1
  431. package/dist/webcomponents/p-631d54a2.entry.js +1 -0
  432. package/dist/webcomponents/p-63caad6e.entry.js +1 -0
  433. package/dist/webcomponents/p-66b6c56b.js +1 -0
  434. package/dist/webcomponents/p-6b0bec46.entry.js +1 -0
  435. package/dist/webcomponents/p-6d2c8be2.entry.js +1 -0
  436. package/dist/webcomponents/p-7b04f492.entry.js +1 -0
  437. package/dist/webcomponents/p-7bcec768.entry.js +1 -0
  438. package/dist/webcomponents/{p-5d0763a5.js → p-7c31ec70.js} +1 -1
  439. package/dist/webcomponents/{p-2bd8650b.js → p-865733bc.js} +1 -1
  440. package/dist/webcomponents/{p-44604a45.js → p-8f25f016.js} +1 -1
  441. package/dist/webcomponents/p-9235b94e.entry.js +1 -0
  442. package/dist/webcomponents/{p-411382f3.js → p-938993c7.js} +1 -1
  443. package/dist/webcomponents/{p-d6e51c2f.js → p-94eba309.js} +1 -1
  444. package/dist/webcomponents/p-9540d2f2.js +1 -0
  445. package/dist/webcomponents/{p-83aa33f0.js → p-9894484a.js} +1 -1
  446. package/dist/webcomponents/p-98dad117.entry.js +1 -0
  447. package/dist/webcomponents/p-9ad6e792.entry.js +1 -0
  448. package/dist/webcomponents/p-a263a3db.entry.js +1 -0
  449. package/dist/webcomponents/p-aa02cf71.js +1 -0
  450. package/dist/webcomponents/p-ab1504b6.entry.js +1 -0
  451. package/dist/webcomponents/p-abb46c6b.entry.js +1 -0
  452. package/dist/webcomponents/p-b6e90400.entry.js +1 -0
  453. package/dist/webcomponents/{p-2b081961.entry.js → p-bada4783.entry.js} +1 -1
  454. package/dist/webcomponents/p-c470a150.js +1 -0
  455. package/dist/webcomponents/{p-eb644cb7.js → p-c5c03d88.js} +1 -1
  456. package/dist/webcomponents/p-c5ce98b0.entry.js +1 -0
  457. package/dist/webcomponents/{p-c2efe406.js → p-c845cb7a.js} +1 -1
  458. package/dist/webcomponents/p-cc4adf97.js +1 -0
  459. package/dist/webcomponents/{p-72a90154.entry.js → p-cdb7fa19.entry.js} +1 -1
  460. package/dist/webcomponents/p-d07c45e6.entry.js +1 -0
  461. package/dist/webcomponents/p-d0bde1cb.js +1 -0
  462. package/dist/webcomponents/p-d8c04275.js +1 -0
  463. package/dist/webcomponents/{p-541b7c36.entry.js → p-db37b175.entry.js} +1 -1
  464. package/dist/webcomponents/p-ddcd2ff7.entry.js +1 -0
  465. package/dist/webcomponents/p-de13f23c.js +1 -0
  466. package/dist/webcomponents/p-dec18cc4.js +1 -0
  467. package/dist/webcomponents/{p-c6051278.entry.js → p-e0db920c.entry.js} +1 -1
  468. package/dist/webcomponents/{p-39177d5a.js → p-e63fdbca.js} +1 -1
  469. package/dist/webcomponents/{p-730e8425.js → p-e8c3c23f.js} +1 -1
  470. package/dist/webcomponents/p-ea105de3.js +1 -0
  471. package/dist/webcomponents/{p-d5dace8b.entry.js → p-ea5cf135.entry.js} +1 -1
  472. package/dist/webcomponents/p-ed17e472.entry.js +1 -0
  473. package/dist/webcomponents/p-f0c0cbc8.entry.js +1 -0
  474. package/dist/webcomponents/{p-24a9c773.js → p-f19f9f61.js} +1 -1
  475. package/dist/webcomponents/p-f1e01bab.entry.js +1 -0
  476. package/dist/webcomponents/p-f2f2e20e.js +1 -0
  477. package/dist/webcomponents/p-f5925b1e.entry.js +1 -0
  478. package/dist/webcomponents/p-f694e1c8.js +1 -0
  479. package/dist/webcomponents/p-f706d70e.js +1 -0
  480. package/dist/webcomponents/p-f9728478.entry.js +1 -0
  481. package/dist/webcomponents/p-f9ac523e.entry.js +1 -0
  482. package/dist/webcomponents/p-f9d63d9d.js +1 -0
  483. package/dist/webcomponents/p-fa2b405c.entry.js +1 -0
  484. package/dist/webcomponents/{p-bf07d5d0.entry.js → p-facada09.entry.js} +1 -1
  485. package/dist/webcomponents/p-fe0d245f.entry.js +1 -0
  486. package/dist/webcomponents/webcomponents.esm.js +1 -1
  487. package/package.json +1 -1
  488. package/dist/cjs/form-control-file.cjs.entry.js +0 -67
  489. package/dist/cjs/form-control-select_3.cjs.entry.js +0 -145
  490. package/dist/cjs/justifi-additional-questions-form-step-core_9.cjs.entry.js +0 -800
  491. package/dist/cjs/payments-list-params-state-0ff968a7.js +0 -14
  492. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +0 -338
  493. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-documents-on-file.js +0 -40
  494. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/input-configurations.js +0 -52
  495. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-text.js +0 -8
  496. package/dist/collection/components/business-forms/schemas/business-document-upload-schema.js +0 -23
  497. package/dist/esm/form-control-file.entry.js +0 -63
  498. package/dist/esm/form-control-select_3.entry.js +0 -139
  499. package/dist/esm/justifi-additional-questions-form-step-core_9.entry.js +0 -788
  500. package/dist/esm/payments-list-params-state-b3dab8bc.js +0 -10
  501. package/dist/module/business-document-upload-form-step.js +0 -272
  502. package/dist/module/business-document-upload-input-group.js +0 -128
  503. package/dist/module/business-terms-conditions-text.js +0 -28
  504. package/dist/module/justifi-business-document-upload-form-step.d.ts +0 -11
  505. package/dist/module/justifi-business-document-upload-form-step.js +0 -6
  506. package/dist/module/justifi-business-document-upload-input-group.d.ts +0 -11
  507. package/dist/module/justifi-business-document-upload-input-group.js +0 -6
  508. package/dist/module/justifi-business-documents-on-file.d.ts +0 -11
  509. package/dist/module/justifi-business-documents-on-file.js +0 -6
  510. package/dist/module/justifi-business-terms-conditions-text.d.ts +0 -11
  511. package/dist/module/justifi-business-terms-conditions-text.js +0 -6
  512. package/dist/types/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.d.ts +0 -42
  513. package/dist/types/components/business-forms/payment-provisioning/document-uploads/business-document-upload-input-group.d.ts +0 -21
  514. package/dist/types/components/business-forms/payment-provisioning/document-uploads/input-configurations.d.ts +0 -45
  515. package/dist/types/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-text.d.ts +0 -3
  516. package/dist/types/components/business-forms/schemas/business-document-upload-schema.d.ts +0 -17
  517. package/dist/webcomponents/p-04ce1f82.js +0 -1
  518. package/dist/webcomponents/p-0544f4a4.entry.js +0 -1
  519. package/dist/webcomponents/p-060ff1a1.js +0 -1
  520. package/dist/webcomponents/p-0658b707.entry.js +0 -1
  521. package/dist/webcomponents/p-0d7e7957.js +0 -1
  522. package/dist/webcomponents/p-10cface4.entry.js +0 -1
  523. package/dist/webcomponents/p-10f9ff7b.entry.js +0 -1
  524. package/dist/webcomponents/p-12233a57.entry.js +0 -1
  525. package/dist/webcomponents/p-135e24c0.js +0 -1
  526. package/dist/webcomponents/p-1a27f22e.js +0 -1
  527. package/dist/webcomponents/p-1e2526c8.entry.js +0 -1
  528. package/dist/webcomponents/p-270033ba.entry.js +0 -1
  529. package/dist/webcomponents/p-2a17a29c.entry.js +0 -1
  530. package/dist/webcomponents/p-2c7441ea.entry.js +0 -1
  531. package/dist/webcomponents/p-2d27d054.entry.js +0 -1
  532. package/dist/webcomponents/p-332bd5ab.entry.js +0 -1
  533. package/dist/webcomponents/p-351c7fa3.entry.js +0 -1
  534. package/dist/webcomponents/p-3f209fcc.entry.js +0 -1
  535. package/dist/webcomponents/p-427881b1.entry.js +0 -1
  536. package/dist/webcomponents/p-46769ec3.entry.js +0 -1
  537. package/dist/webcomponents/p-47cd431c.js +0 -1
  538. package/dist/webcomponents/p-4acfed0d.entry.js +0 -1
  539. package/dist/webcomponents/p-4bcfdb99.entry.js +0 -1
  540. package/dist/webcomponents/p-4e122ace.js +0 -1
  541. package/dist/webcomponents/p-5d177a30.js +0 -1
  542. package/dist/webcomponents/p-64a1ae2c.entry.js +0 -1
  543. package/dist/webcomponents/p-67aef066.entry.js +0 -1
  544. package/dist/webcomponents/p-6ad11a9f.entry.js +0 -1
  545. package/dist/webcomponents/p-6bc01617.js +0 -1
  546. package/dist/webcomponents/p-6e8be579.entry.js +0 -1
  547. package/dist/webcomponents/p-73323a41.entry.js +0 -1
  548. package/dist/webcomponents/p-73619f0a.js +0 -1
  549. package/dist/webcomponents/p-74d6e182.entry.js +0 -1
  550. package/dist/webcomponents/p-7aff48a1.entry.js +0 -1
  551. package/dist/webcomponents/p-7bddbee4.js +0 -1
  552. package/dist/webcomponents/p-87ce7b69.js +0 -1
  553. package/dist/webcomponents/p-8d61499c.entry.js +0 -1
  554. package/dist/webcomponents/p-948b7710.entry.js +0 -1
  555. package/dist/webcomponents/p-96bc127e.entry.js +0 -1
  556. package/dist/webcomponents/p-98b027b7.entry.js +0 -1
  557. package/dist/webcomponents/p-a3df6c3e.entry.js +0 -1
  558. package/dist/webcomponents/p-a5008b32.entry.js +0 -1
  559. package/dist/webcomponents/p-a59636ed.js +0 -1
  560. package/dist/webcomponents/p-a7b04e24.js +0 -1
  561. package/dist/webcomponents/p-ac2588af.entry.js +0 -1
  562. package/dist/webcomponents/p-b78da082.entry.js +0 -1
  563. package/dist/webcomponents/p-b86e804e.entry.js +0 -1
  564. package/dist/webcomponents/p-ba202e33.js +0 -1
  565. package/dist/webcomponents/p-c358b253.entry.js +0 -1
  566. package/dist/webcomponents/p-ca6214ca.entry.js +0 -1
  567. package/dist/webcomponents/p-cb8f7bf4.js +0 -1
  568. package/dist/webcomponents/p-ce2de434.entry.js +0 -1
  569. package/dist/webcomponents/p-dc6e1e5f.entry.js +0 -1
  570. package/dist/webcomponents/p-f2158e48.entry.js +0 -1
  571. package/dist/webcomponents/p-f3867b82.entry.js +0 -1
  572. package/dist/webcomponents/p-f5a7a7d1.entry.js +0 -1
  573. package/dist/webcomponents/p-fc3daedd.js +0 -1
  574. package/dist/webcomponents/p-fd6619d0.entry.js +0 -1
@@ -1,14 +1,30 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { businessBankAccountSchema } from "../../schemas/business-bank-account-schema";
3
3
  import { FormController } from "../../../../ui-components/form/form";
4
- import { BankAccount } from "../../../../api/BankAccount";
5
- import { BusinessFormStep, bankAccountTypeOptions } from "../../utils";
6
- import { numberOnlyHandler } from "../../../../ui-components/form/utils";
4
+ import { BusinessFormStep } from "../../utils";
7
5
  import { heading2 } from "../../../../styles/parts";
6
+ import { PaymentProvisioningLoading } from "../payment-provisioning-loading";
7
+ import { BankAccount, EntityDocument, EntityDocumentStorage, ComponentErrorCodes, ComponentErrorSeverity, } from "../../../../api";
8
8
  export class BusinessBankAccountFormStepCore {
9
9
  constructor() {
10
+ this.initializeFormController = () => {
11
+ this.formController = new FormController(businessBankAccountSchema(this.existingDocuments, this.allowOptionalFields));
12
+ this.formController.setInitialValues(Object.assign({}, this.bankAccount));
13
+ this.formController.errors.subscribe(errors => {
14
+ this.errors = Object.assign({}, errors);
15
+ });
16
+ };
17
+ this.inputHandler = (name, value) => {
18
+ this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
19
+ };
20
+ this.storeFiles = (e) => {
21
+ const fileList = Array.from(e.detail.fileList);
22
+ const docType = e.detail.document_type;
23
+ const documentList = fileList.map(file => new EntityDocument({ file, document_type: docType }, this.businessId));
24
+ this.documentData[docType] = documentList;
25
+ };
10
26
  this.getData = () => {
11
- this.formLoading.emit(true);
27
+ this.isLoading = true;
12
28
  this.getBusiness({
13
29
  onSuccess: (response) => {
14
30
  if (response.data.bank_accounts.length > 0) {
@@ -18,7 +34,7 @@ export class BusinessBankAccountFormStepCore {
18
34
  this.bankAccount = new BankAccount({});
19
35
  this.bankAccount.business_id = this.businessId;
20
36
  }
21
- this.formController.setInitialValues(Object.assign({}, this.bankAccount));
37
+ this.existingDocuments = response.data.documents;
22
38
  },
23
39
  onError: ({ error, code, severity }) => {
24
40
  this.errorEvent.emit({
@@ -27,74 +43,189 @@ export class BusinessBankAccountFormStepCore {
27
43
  severity: severity
28
44
  });
29
45
  },
30
- final: () => this.formLoading.emit(false)
31
- });
32
- };
33
- this.sendData = (onSuccess) => {
34
- let submittedData;
35
- this.formLoading.emit(true);
36
- this.postBankAccount({
37
- payload: this.postPayload,
38
- onSuccess: (response) => {
39
- submittedData = response;
40
- onSuccess();
41
- },
42
- onError: ({ error, code, severity }) => {
43
- submittedData = error;
44
- this.errorEvent.emit({
45
- message: error,
46
- errorCode: code,
47
- severity: severity
48
- });
49
- },
50
46
  final: () => {
51
- this.stepCompleteEvent.emit({ response: submittedData, formStep: BusinessFormStep.bankAccount });
52
- this.formLoading.emit(false);
47
+ this.initializeFormController();
48
+ this.isLoading = false;
53
49
  }
54
50
  });
55
51
  };
56
- this.inputHandler = (name, value) => {
57
- this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
52
+ this.postDocumentRecordData = async (docData) => {
53
+ this.isLoading = true;
54
+ const payload = docData.record_data;
55
+ return new Promise((resolve) => {
56
+ this.postDocumentRecord({
57
+ payload,
58
+ onSuccess: (response) => {
59
+ resolve(this.handleDocRecordResponse(docData, response));
60
+ },
61
+ onError: ({ error, code, severity }) => {
62
+ this.errorEvent.emit({
63
+ message: error,
64
+ errorCode: code,
65
+ severity: severity
66
+ });
67
+ resolve(false);
68
+ },
69
+ });
70
+ });
71
+ };
72
+ this.handleDocRecordResponse = (docData, response) => {
73
+ if (response.error) {
74
+ this.errorEvent.emit({
75
+ errorCode: ComponentErrorCodes.POST_ERROR,
76
+ message: response.error.message,
77
+ severity: ComponentErrorSeverity.ERROR,
78
+ data: response.error,
79
+ });
80
+ return false;
81
+ }
82
+ else {
83
+ docData.setPresignedUrl(response.data.presigned_url);
84
+ return true;
85
+ }
86
+ };
87
+ this.uploadDocument = async (docData) => {
88
+ if (!docData.presigned_url) {
89
+ throw new Error('Presigned URL is not set');
90
+ }
91
+ const response = await fetch(docData.presigned_url, {
92
+ method: 'PUT',
93
+ body: docData.fileString,
94
+ });
95
+ return this.handleUploadResponse(response);
96
+ };
97
+ this.handleUploadResponse = (response) => {
98
+ if (response.error) {
99
+ this.errorEvent.emit({
100
+ errorCode: ComponentErrorCodes.POST_ERROR,
101
+ message: response.error.message,
102
+ severity: ComponentErrorSeverity.ERROR,
103
+ data: response.error,
104
+ });
105
+ return false;
106
+ }
107
+ else {
108
+ return true;
109
+ }
58
110
  };
59
111
  this.formController = undefined;
60
112
  this.errors = {};
61
113
  this.bankAccount = {};
114
+ this.existingDocuments = [];
115
+ this.documentData = new EntityDocumentStorage();
116
+ this.isLoading = false;
62
117
  this.businessId = undefined;
63
118
  this.getBusiness = undefined;
64
119
  this.postBankAccount = undefined;
120
+ this.postDocumentRecord = undefined;
65
121
  this.allowOptionalFields = undefined;
66
122
  }
123
+ watchHandler(newValue) {
124
+ this.formLoading.emit(newValue);
125
+ }
67
126
  async validateAndSubmit({ onSuccess }) {
68
- if (this.formDisabled) {
69
- this.stepCompleteEvent.emit({ response: null, formStep: BusinessFormStep.bankAccount, metadata: 'no data submitted' });
70
- onSuccess();
127
+ if (this.existingBankAccount) {
128
+ // If a bank account already exists, skip bank account posting; proceed directly to document upload
129
+ this.sendData(onSuccess);
71
130
  }
72
131
  else {
132
+ // If bank account is new, validate form inputs (bank account fields), then proceed
73
133
  this.formController.validateAndSubmit(() => this.sendData(onSuccess));
74
134
  }
75
- ;
76
135
  }
77
- ;
136
+ componentWillLoad() {
137
+ this.getBusiness && this.getData();
138
+ this.formController = new FormController(businessBankAccountSchema(this.existingDocuments, this.allowOptionalFields));
139
+ }
140
+ componentDidLoad() {
141
+ this.formController.errors.subscribe(errors => {
142
+ this.errors = Object.assign({}, errors);
143
+ });
144
+ }
78
145
  get postPayload() {
79
146
  let formValues = new BankAccount(this.formController.values.getValue()).payload;
80
147
  return formValues;
81
148
  }
82
- get formDisabled() {
149
+ get existingBankAccount() {
83
150
  var _a;
84
151
  return !!((_a = this.bankAccount) === null || _a === void 0 ? void 0 : _a.id);
85
152
  }
86
- componentWillLoad() {
87
- this.getBusiness && this.getData();
88
- this.formController = new FormController(businessBankAccountSchema(this.allowOptionalFields));
153
+ async sendData(onSuccess) {
154
+ try {
155
+ // Post bank account data if the form is not disabled
156
+ const bankAccountPosted = !this.existingBankAccount ? await this.postBankAccountData() : true;
157
+ if (!bankAccountPosted) {
158
+ return;
159
+ }
160
+ // Post documents only after bank account was successfully created
161
+ const documentsUploaded = await this.postBusinessDocuments();
162
+ if (!documentsUploaded) {
163
+ return;
164
+ }
165
+ onSuccess();
166
+ }
167
+ catch (error) {
168
+ this.errorEvent.emit({
169
+ message: error,
170
+ errorCode: ComponentErrorCodes.POST_ERROR,
171
+ severity: ComponentErrorSeverity.ERROR
172
+ });
173
+ }
89
174
  }
90
- componentDidLoad() {
91
- this.formController.errors.subscribe(errors => {
92
- this.errors = Object.assign({}, errors);
175
+ async postBankAccountData() {
176
+ let submittedData;
177
+ this.isLoading = true;
178
+ return new Promise((resolve) => {
179
+ let success = false;
180
+ this.postBankAccount({
181
+ payload: this.postPayload,
182
+ onSuccess: (response) => {
183
+ submittedData = response;
184
+ success = true;
185
+ },
186
+ onError: ({ error, code, severity }) => {
187
+ success = false;
188
+ this.errorEvent.emit({
189
+ message: error,
190
+ errorCode: code,
191
+ severity: severity
192
+ });
193
+ },
194
+ final: () => {
195
+ this.stepCompleteEvent.emit({ response: submittedData, formStep: BusinessFormStep.bankAccount });
196
+ this.isLoading = false;
197
+ resolve(success);
198
+ }
199
+ });
93
200
  });
94
201
  }
202
+ async postBusinessDocuments() {
203
+ this.isLoading = true;
204
+ try {
205
+ const docArray = Object.values(this.documentData).flat();
206
+ if (!docArray.length) {
207
+ return true;
208
+ }
209
+ const recordsCreated = await Promise.all(docArray.map((docData) => this.postDocumentRecordData(docData))); // Create document records
210
+ if (recordsCreated.includes(false)) {
211
+ return false;
212
+ } // Exit if document record creation fails
213
+ const uploadsCompleted = await Promise.all(docArray.map((docData) => this.uploadDocument(docData))); // Upload documents to AWS presigned URLs
214
+ if (uploadsCompleted.includes(false)) {
215
+ return false;
216
+ } // Exit if any upload fails
217
+ return true;
218
+ }
219
+ finally {
220
+ this.isLoading = false;
221
+ }
222
+ }
95
223
  render() {
96
224
  const bankAccountDefaultValue = this.formController.getInitialValues();
97
- return (h("form", { key: '84a444f4bc791c0238ddd500427a53dab94e51d1' }, h("fieldset", { key: '61236bd7bd190808f14292d5e83592b94110b556' }, h("div", { key: 'fc6a64fcec2a8e31e5b4e95d84ef8cda9080dc03', class: "d-flex align-items-center gap-2" }, h("legend", { key: 'baaf43c5bd37c5a52162dc8bfc6a476e2ac0f2e0', class: "mb-0", part: heading2 }, "Bank Account Info"), h("form-control-tooltip", { key: 'c9ceaee51d98c816f49008f64a00fa91f3660252', helpText: "The Direct Deposit Account is the business bank account where your funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship." })), h("hr", { key: 'ef877615f7e47ac868d2d5548b0e1b290ccaba10', class: "mt-2" }), h("div", { key: 'a3a85ce7d292d4b0de58317a35b95b2a2ecdfdfc', class: "row gy-3" }, h("div", { key: '436c9447287ebe80d96ae73afeef0e03335440b9', class: "col-12" }, h("form-control-text", { key: 'a208de7ff6c9e5314577c55617d5974c6aac141b', name: "bank_name", label: "Bank Name", defaultValue: bankAccountDefaultValue.bank_name, errorText: this.errors.bank_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '38d945adb0861a4ac8ff30256c69d6f9f8c22461', class: "col-12" }, h("form-control-text", { key: 'a604836cf36f6da139c99165c4a4fafbe6d03bd4', name: "nickname", label: "Nickname", defaultValue: bankAccountDefaultValue.nickname, errorText: this.errors.nickname, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '0a4a89a55a47c25b7607695e216a58a8a30432ba', class: "col-12" }, h("form-control-text", { key: '9623bac603a6086f07507b0cdb3d6081653b75a6', name: "account_owner_name", label: "Account Owner Name", defaultValue: bankAccountDefaultValue.account_owner_name, errorText: this.errors.account_owner_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '9e91ad400d741ca574552bbd6c00868a3ca47064', class: "col-12" }, h("form-control-select", { key: '40a15cc46d9cf990f84253515c640fb163b78acc', name: "account_type", label: "Account Type", options: bankAccountTypeOptions, defaultValue: bankAccountDefaultValue.account_type, errorText: this.errors.account_type, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '066c707b74990627e6f02521c9b1f1fc3f2cad87', class: "col-12" }, h("form-control-text", { key: '2011e01ea7c8900ab9bab23c8e5aa3a3aea746fd', name: "account_number", label: "Account Number", defaultValue: bankAccountDefaultValue.account_number, maxLength: 17, errorText: this.errors.account_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled, helpText: "Please copy the account number as shown on your statement/check. Do not include spaces or dashes." })), h("div", { key: 'a539cbaf626cb72c898348857a9c618454ca989e', class: "col-12" }, h("form-control-text", { key: '974c87eac9091f5ce08f342d9ce1259d86d05cc8', name: "routing_number", label: "Routing Number", defaultValue: bankAccountDefaultValue.routing_number, maxLength: 9, errorText: this.errors.routing_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled, helpText: "A valid routing number is nine digits. Please include any leading or trailing zeroes." }))))));
225
+ if (this.isLoading) {
226
+ return h(PaymentProvisioningLoading, null);
227
+ }
228
+ return (h("form", null, h("fieldset", { class: "mb-4" }, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Bank Account Info"), h("form-control-tooltip", { helpText: "This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship." })), h("hr", { class: "mt-2" }), h("bank-account-form-inputs", { defaultValue: bankAccountDefaultValue, errors: this.errors, inputHandler: this.inputHandler, formDisabled: this.existingBankAccount })), h("fieldset", { class: "mt-4" }, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Document Uploads"), h("form-control-tooltip", { helpText: "These documents are required for underwriting purposes. Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category." })), h("hr", { class: "mt-2" }), h("business-documents-on-file", { documents: this.existingDocuments, isLoading: this.isLoading }), h("bank-account-document-form-inputs", { inputHandler: this.inputHandler, errors: this.errors, storeFiles: this.storeFiles }))));
98
229
  }
99
230
  static get is() { return "justifi-business-bank-account-form-step-core"; }
100
231
  static get properties() {
@@ -156,6 +287,26 @@ export class BusinessBankAccountFormStepCore {
156
287
  "text": ""
157
288
  }
158
289
  },
290
+ "postDocumentRecord": {
291
+ "type": "unknown",
292
+ "mutable": false,
293
+ "complexType": {
294
+ "original": "Function",
295
+ "resolved": "Function",
296
+ "references": {
297
+ "Function": {
298
+ "location": "global",
299
+ "id": "global::Function"
300
+ }
301
+ }
302
+ },
303
+ "required": false,
304
+ "optional": false,
305
+ "docs": {
306
+ "tags": [],
307
+ "text": ""
308
+ }
309
+ },
159
310
  "allowOptionalFields": {
160
311
  "type": "boolean",
161
312
  "mutable": false,
@@ -179,7 +330,10 @@ export class BusinessBankAccountFormStepCore {
179
330
  return {
180
331
  "formController": {},
181
332
  "errors": {},
182
- "bankAccount": {}
333
+ "bankAccount": {},
334
+ "existingDocuments": {},
335
+ "documentData": {},
336
+ "isLoading": {}
183
337
  };
184
338
  }
185
339
  static get events() {
@@ -199,8 +353,8 @@ export class BusinessBankAccountFormStepCore {
199
353
  "references": {
200
354
  "ComponentFormStepCompleteEvent": {
201
355
  "location": "import",
202
- "path": "../../../../api/ComponentEvents",
203
- "id": "src/api/ComponentEvents.ts::ComponentFormStepCompleteEvent"
356
+ "path": "../../../../api",
357
+ "id": "src/api/index.ts::ComponentFormStepCompleteEvent"
204
358
  }
205
359
  }
206
360
  }
@@ -220,8 +374,8 @@ export class BusinessBankAccountFormStepCore {
220
374
  "references": {
221
375
  "ComponentErrorEvent": {
222
376
  "location": "import",
223
- "path": "../../../../api/ComponentEvents",
224
- "id": "src/api/ComponentEvents.ts::ComponentErrorEvent"
377
+ "path": "../../../../api",
378
+ "id": "src/api/index.ts::ComponentErrorEvent"
225
379
  }
226
380
  }
227
381
  }
@@ -267,4 +421,10 @@ export class BusinessBankAccountFormStepCore {
267
421
  }
268
422
  };
269
423
  }
424
+ static get watchers() {
425
+ return [{
426
+ "propName": "isLoading",
427
+ "methodName": "watchHandler"
428
+ }];
429
+ }
270
430
  }
@@ -1,11 +1,13 @@
1
1
  import { h } from "@stencil/core";
2
- import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../../api/ComponentError";
3
- import { makeGetBusiness, makePostBankAccount } from "../payment-provisioning-actions";
4
- import { BusinessBankAccountService, BusinessService } from "../../../../api/services/business.service";
2
+ import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../../api";
3
+ import { makeGetBusiness, makePostBankAccount, makePostDocumentRecord } from "../payment-provisioning-actions";
4
+ import { BusinessService, BusinessBankAccountService, DocumentRecordService } from "../../../../api/services/business.service";
5
5
  export class BusinessBankAccountFormStep {
6
6
  constructor() {
7
7
  this.getBusiness = undefined;
8
8
  this.postBankAccount = undefined;
9
+ this.postDocumentRecord = undefined;
10
+ this.postDocument = undefined;
9
11
  this.authToken = undefined;
10
12
  this.businessId = undefined;
11
13
  this.allowOptionalFields = undefined;
@@ -30,6 +32,10 @@ export class BusinessBankAccountFormStep {
30
32
  authToken: this.authToken,
31
33
  service: new BusinessBankAccountService()
32
34
  });
35
+ this.postDocumentRecord = makePostDocumentRecord({
36
+ authToken: this.authToken,
37
+ service: new DocumentRecordService()
38
+ });
33
39
  }
34
40
  else {
35
41
  this.errorEvent.emit({
@@ -40,7 +46,7 @@ export class BusinessBankAccountFormStep {
40
46
  }
41
47
  }
42
48
  render() {
43
- return (h("justifi-business-bank-account-form-step-core", { key: '229a91f0c9d52f26cf602d950a4960adf2f090bb', businessId: this.businessId, getBusiness: this.getBusiness, postBankAccount: this.postBankAccount, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
49
+ return (h("justifi-business-bank-account-form-step-core", { key: 'e60dff98e072aeb0eb351cd746c9c05e0adf903c', businessId: this.businessId, getBusiness: this.getBusiness, postBankAccount: this.postBankAccount, postDocumentRecord: this.postDocumentRecord, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
44
50
  }
45
51
  static get is() { return "justifi-business-bank-account-form-step"; }
46
52
  static get properties() {
@@ -101,7 +107,9 @@ export class BusinessBankAccountFormStep {
101
107
  static get states() {
102
108
  return {
103
109
  "getBusiness": {},
104
- "postBankAccount": {}
110
+ "postBankAccount": {},
111
+ "postDocumentRecord": {},
112
+ "postDocument": {}
105
113
  };
106
114
  }
107
115
  static get events() {
@@ -121,8 +129,8 @@ export class BusinessBankAccountFormStep {
121
129
  "references": {
122
130
  "ComponentErrorEvent": {
123
131
  "location": "import",
124
- "path": "../../../../api/ComponentEvents",
125
- "id": "src/api/ComponentEvents.ts::ComponentErrorEvent"
132
+ "path": "../../../../api",
133
+ "id": "src/api/index.ts::ComponentErrorEvent"
126
134
  }
127
135
  }
128
136
  }
@@ -0,0 +1,63 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { formatDate, formatTimeSeconds, snakeCaseToHumanReadable } from "../../../../utils/utils";
3
+ import { card, heading2, table, tableCell, tableHeadCell } from "../../../../styles/parts";
4
+ import { Skeleton } from "../../../../ui-components";
5
+ export class BusinessDocumentsOnFile {
6
+ constructor() {
7
+ this.documents = [];
8
+ this.isLoading = false;
9
+ }
10
+ render() {
11
+ if (this.isLoading) {
12
+ return h(Skeleton, { height: "50px" });
13
+ }
14
+ if (!this.documents.length) {
15
+ return null;
16
+ }
17
+ return (h(Host, null, h("div", { class: "card", part: card }, h("div", { class: "card-body" }, h("h5", { class: "card-title", part: heading2 }, "Documents Already on File"), h("div", { class: "table-responsive" }, h("table", { class: "table table-sm table-borderless", part: table }, h("thead", null, h("tr", null, h("th", { style: { width: "25%" }, part: tableHeadCell, scope: "col" }, "File Name"), h("th", { style: { width: "25%" }, part: tableHeadCell, scope: "col" }, "File Type"), h("th", { style: { width: "25%" }, part: tableHeadCell, scope: "col" }, "Document Type"), h("th", { style: { width: "25%" }, part: tableHeadCell, scope: "col" }, "Date Uploaded"))), h("tbody", null, this.documents.sort((a, b) => a.document_type.localeCompare(b.document_type))
18
+ .map((document, index) => {
19
+ return (h("tr", { class: index === 0 ? "border-bottom border-top" : "border-bottom" }, h("td", { part: tableCell }, document.file_name), h("td", { part: tableCell }, document.file_type), h("td", { part: tableCell }, snakeCaseToHumanReadable(document.document_type)), h("td", { part: tableCell }, `${formatDate(document.created_at)} - ${formatTimeSeconds(document.created_at)}`)));
20
+ })))))), h("hr", null)));
21
+ }
22
+ static get is() { return "business-documents-on-file"; }
23
+ static get properties() {
24
+ return {
25
+ "documents": {
26
+ "type": "any",
27
+ "mutable": false,
28
+ "complexType": {
29
+ "original": "any",
30
+ "resolved": "any",
31
+ "references": {}
32
+ },
33
+ "required": false,
34
+ "optional": false,
35
+ "docs": {
36
+ "tags": [],
37
+ "text": ""
38
+ },
39
+ "attribute": "documents",
40
+ "reflect": false,
41
+ "defaultValue": "[]"
42
+ },
43
+ "isLoading": {
44
+ "type": "boolean",
45
+ "mutable": false,
46
+ "complexType": {
47
+ "original": "boolean",
48
+ "resolved": "boolean",
49
+ "references": {}
50
+ },
51
+ "required": false,
52
+ "optional": false,
53
+ "docs": {
54
+ "tags": [],
55
+ "text": ""
56
+ },
57
+ "attribute": "is-loading",
58
+ "reflect": false,
59
+ "defaultValue": "false"
60
+ }
61
+ };
62
+ }
63
+ }
@@ -41,7 +41,7 @@ export class BusinessCoreInfoFormStep {
41
41
  }
42
42
  }
43
43
  render() {
44
- return (h("justifi-business-core-info-form-step-core", { key: '2262521f98ad949fa2558572a991b00b44a2c8c0', businessId: this.businessId, getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
44
+ return (h("justifi-business-core-info-form-step-core", { key: 'c9f93be3e48527f5ae799cf736fc9ca86ece736c', businessId: this.businessId, getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
45
45
  }
46
46
  static get is() { return "justifi-business-core-info-form-step"; }
47
47
  static get properties() {
@@ -41,7 +41,7 @@ export class BusinessOwnersFormStep {
41
41
  }
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: 'a4289542dcf53a2be9c2faea5873a36894a2e250' }, h("justifi-business-owners-form-step-core", { key: 'cd40a3cb35d657223516c91217ca3241701dcc8f', authToken: this.authToken, businessId: this.businessId, getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: (el) => this.coreComponent = el })));
44
+ return (h(Host, { key: 'd3010f8f811d93d7ee0983e92aa3c87a1fab0466' }, h("justifi-business-owners-form-step-core", { key: '7eed1a3ebda94badba81f22011efbb23cee7bf12', authToken: this.authToken, businessId: this.businessId, getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: (el) => this.coreComponent = el })));
45
45
  }
46
46
  static get is() { return "justifi-business-owners-form-step"; }
47
47
  static get properties() {
@@ -16,7 +16,7 @@ export class RepresentativeFormInputs {
16
16
  }
17
17
  render() {
18
18
  var _a, _b, _c, _d, _e, _f, _g;
19
- return (h("form", { key: '90775954aebfc23b163d3b1626de290b70a4b32c' }, h("fieldset", { key: 'ea79bf2618b504fd7a5b86f334aace2d9fb20681' }, h("div", { key: '3b0ec861e82a1fb35dee68a81655506c198686d4', class: "d-flex align-items-center gap-2" }, h("legend", { key: '613e036d03c20ffc6e51a6a89f38eda7b2440e67', class: "mb-0", part: heading2 }, "Representative"), h("form-control-tooltip", { key: 'ba37c309f9f25b697f297c9641767d800e284f9f', helpText: "The representative for your business needs to be someone who has significant control over managing your business\u2019s finance. You will have an opportunity to add owners later in the form." })), h("hr", { key: '8c3b56e7481e7c67a9e4f56fb2406506d6a3f927', class: "mt-2" }), h("div", { key: '477b3938ea0011e67bba2c43406b9dbb14019caf', class: "row gy-3" }, h("div", { key: 'dd2eca835cb422bd0f38fd504da1d651d5914d89', class: "col-12 col-md-8" }, h("form-control-text", { key: '477719029d827ddff5d2e357d641eb2d8b697657', name: "name", label: "Full Name", defaultValue: (_a = this.representativeDefaultValue) === null || _a === void 0 ? void 0 : _a.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: '36d22fa160f31c538e5afb80fa7fd6533caae3d3', class: "col-12 col-md-4" }, h("form-control-text", { key: '9d87128ec44af7cb861be3b3bf9705172267a2db', name: "title", label: "Title", defaultValue: (_b = this.representativeDefaultValue) === null || _b === void 0 ? void 0 : _b.title, errorText: this.errors.title, inputHandler: this.inputHandler, helpText: "Role at your business, e.g. President, CEO, Treasurer." })), h("div", { key: '88b158cae25138f1e930f16d72972767679f9f27', class: "col-12 col-md-6" }, h("form-control-text", { key: 'dbd4ee0f36136c17aa96c36ca1fd0d8ed66758b4', name: "email", label: "Email Address", defaultValue: (_c = this.representativeDefaultValue) === null || _c === void 0 ? void 0 : _c.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '11f873b4275b150459c482264ed364e8970f70ca', class: "col-12 col-md-6" }, h("form-control-number-masked", { key: '39763eb1b0c981f525b81c5d0fc0fb2fb44cce5c', name: "phone", label: "Phone Number", defaultValue: (_d = this.representativeDefaultValue) === null || _d === void 0 ? void 0 : _d.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: '6f7e70e31c03564c989355f9ed40b839451b3ae2', class: "col-12 col-md-4" }, h("form-control-date", { key: 'e5ee8b0752707fdafa4b6b7a8973f5b66f21bce6', name: "dob_full", label: "Birth Date", defaultValue: (_e = this.representativeDefaultValue) === null || _e === void 0 ? void 0 : _e.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: (e) => updateDateOfBirthFormValues(e, this.formController), helpText: "Must be 18 or older." })), h("div", { key: '73d54b1618e625fd67da896645edf74000596192', class: "col-12 col-md-8" }, h("form-control-number-masked", { key: 'ce5235878fc1554e573e86070502a7ebaf4f2544', name: "identification_number", label: "SSN", defaultValue: (_f = this.representativeDefaultValue) === null || _f === void 0 ? void 0 : _f.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK, helpText: "Enter your full Social Security Number. It is required for Federal OFAC check." })), h("div", { key: '521ebc9a53fb0b2591937e75d6ca6789c134d54f', class: "col-12" }, h("justifi-identity-address-form", { key: '69d66df1033b67ce2e2fe7ae44ab7adfb38cc3d8', errors: this.errors.address, defaultValues: (_g = this.representativeDefaultValue) === null || _g === void 0 ? void 0 : _g.address, handleFormUpdate: this.onAddressFormUpdate }))))));
19
+ return (h("form", { key: '96a926aefa6b30a3a1332198ffb2fcbb6316580c' }, h("fieldset", { key: '59a27475ed22d31dfdccf32ecf05e364bfc8deba' }, h("div", { key: '6dfde8190505808fc5101cf0832ec89785e3a73f', class: "d-flex align-items-center gap-2" }, h("legend", { key: '6342e6f1fb59e8e1e18bfff0dca55e0661f889a2', class: "mb-0", part: heading2 }, "Representative"), h("form-control-tooltip", { key: 'bf2f9a2ce23edb0363c074297600ee330a0143fb', helpText: "The representative for your business needs to be someone who has significant control over managing your business\u2019s finance. You will have an opportunity to add owners later in the form." })), h("hr", { key: '5ab4405fdd5338b9f4f4e3b2672a3769ec7b97d9', class: "mt-2" }), h("div", { key: '2a3e3b458077f26b99c53be76970b735764ba12a', class: "row gy-3" }, h("div", { key: '03679420425d09f380589efbf7640b73c8ddaacb', class: "col-12 col-md-8" }, h("form-control-text", { key: '2ecbbc99442fa73dae73cd1cf398dbf425bf0e84', name: "name", label: "Full Name", defaultValue: (_a = this.representativeDefaultValue) === null || _a === void 0 ? void 0 : _a.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: 'ff989b9f132092c028b096420314b0b67e1e94d7', class: "col-12 col-md-4" }, h("form-control-text", { key: 'f0df98d4ca3ed07e1e884df782ddf125321c0ca1', name: "title", label: "Title", defaultValue: (_b = this.representativeDefaultValue) === null || _b === void 0 ? void 0 : _b.title, errorText: this.errors.title, inputHandler: this.inputHandler, helpText: "Role at your business, e.g. President, CEO, Treasurer." })), h("div", { key: 'a9f9b6b5039a70ac8539605622cdbc574c01734f', class: "col-12 col-md-6" }, h("form-control-text", { key: '6e2736b9d35f9f15d6d4368a89b096bddd1e1b99', name: "email", label: "Email Address", defaultValue: (_c = this.representativeDefaultValue) === null || _c === void 0 ? void 0 : _c.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '75e2f09476bfb82d695e41103337c2bfc64c85a3', class: "col-12 col-md-6" }, h("form-control-number-masked", { key: '8fdd1d70b62f92df2347df53494e194c22de9004', name: "phone", label: "Phone Number", defaultValue: (_d = this.representativeDefaultValue) === null || _d === void 0 ? void 0 : _d.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: 'b670407555423c18879172d12761020b7d5cecbe', class: "col-12 col-md-4" }, h("form-control-date", { key: 'a5bca4384bbc736576147d811878ec02e1c27e10', name: "dob_full", label: "Birth Date", defaultValue: (_e = this.representativeDefaultValue) === null || _e === void 0 ? void 0 : _e.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: (e) => updateDateOfBirthFormValues(e, this.formController), helpText: "Must be 18 or older." })), h("div", { key: '414c906c37268aa87ae1cfe870d2d23fc4d6602e', class: "col-12 col-md-8" }, h("form-control-number-masked", { key: 'ab0c71faa0f0982666164b63ec0612d1a82c3b7a', name: "identification_number", label: "SSN", defaultValue: (_f = this.representativeDefaultValue) === null || _f === void 0 ? void 0 : _f.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK, helpText: "Enter your full Social Security Number. It is required for Federal OFAC check." })), h("div", { key: 'ea19a62d5ceddfdd297d042b0b49f711d164f06f', class: "col-12" }, h("justifi-identity-address-form", { key: '276a217bd4a538357971f3a2c5771ba45bef5b53', errors: this.errors.address, defaultValues: (_g = this.representativeDefaultValue) === null || _g === void 0 ? void 0 : _g.address, handleFormUpdate: this.onAddressFormUpdate }))))));
20
20
  }
21
21
  static get is() { return "justifi-business-representative-form-inputs"; }
22
22
  static get properties() {
@@ -41,7 +41,7 @@ export class BusinessRepresentativeFormStep {
41
41
  }
42
42
  }
43
43
  render() {
44
- return (h("justifi-business-representative-form-step-core", { key: 'ef66ed41f635a4676073073db924050f548c9781', getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
44
+ return (h("justifi-business-representative-form-step-core", { key: '1a7dc9bc4901d5a2bb3da7a06c63952ee45b7843', getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
45
45
  }
46
46
  static get is() { return "justifi-business-representative-form-step"; }
47
47
  static get properties() {
@@ -41,7 +41,7 @@ export class LegalAddressFormStep {
41
41
  }
42
42
  }
43
43
  render() {
44
- return (h("justifi-legal-address-form-step-core", { key: '598e4684d6344d783f7a9de8effbac5bda79834f', getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
44
+ return (h("justifi-legal-address-form-step-core", { key: '70241ec94d2519d675e3831dfb13840e0f9ea6ca', getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
45
45
  }
46
46
  static get is() { return "justifi-legal-address-form-step"; }
47
47
  static get properties() {
@@ -1,6 +1,6 @@
1
1
  import { ComponentErrorSeverity } from "../../../api/ComponentError";
2
2
  import { getErrorCode, getErrorMessage } from "../../../api/services/utils";
3
- // Entity API Actions
3
+ // Business / Entity API Actions
4
4
  export const makeGetBusiness = ({ authToken, businessId, service }) => async ({ onSuccess, onError, final = () => { } }) => {
5
5
  var _a;
6
6
  try {
@@ -85,7 +85,7 @@ export const makePostProvisioning = ({ authToken, businessId, product, service }
85
85
  });
86
86
  }
87
87
  };
88
- // Identity API Actions
88
+ // Business Identity API Actions
89
89
  export const makeGetIdentity = ({ authToken, identityId, service }) => async ({ onSuccess, onError, final = () => { } }) => {
90
90
  var _a;
91
91
  try {
@@ -203,3 +203,33 @@ export const makePostBankAccount = ({ authToken, service }) => async ({ payload,
203
203
  return final();
204
204
  }
205
205
  };
206
+ // Business Document API Actions
207
+ export const makePostDocumentRecord = ({ authToken, service }) => async ({ payload, onSuccess, onError, final = () => { } }) => {
208
+ var _a;
209
+ try {
210
+ const response = await service.postDocumentRecord(authToken, payload);
211
+ if (!response.error) {
212
+ onSuccess(response);
213
+ }
214
+ else {
215
+ const responseError = getErrorMessage(response.error);
216
+ const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
217
+ return onError({
218
+ error: responseError,
219
+ code,
220
+ severity: ComponentErrorSeverity.ERROR,
221
+ });
222
+ }
223
+ }
224
+ catch (error) {
225
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
226
+ return onError({
227
+ error: error.message || error,
228
+ code,
229
+ severity: ComponentErrorSeverity.ERROR,
230
+ });
231
+ }
232
+ finally {
233
+ return final();
234
+ }
235
+ };
@@ -8,8 +8,7 @@ export class PaymentProvisioningFormSteps {
8
8
  3: () => h("justifi-business-representative-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[3] = el, allowOptionalFields: this.allowOptionalFields }),
9
9
  4: () => h("justifi-business-owners-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[4] = el, allowOptionalFields: this.allowOptionalFields }),
10
10
  5: () => h("justifi-business-bank-account-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[5] = el, allowOptionalFields: this.allowOptionalFields }),
11
- 6: () => h("justifi-business-document-upload-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[6] = el, onFormLoading: this.handleFormLoading, allowOptionalFields: this.allowOptionalFields }),
12
- 7: () => h("justifi-business-terms-conditions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[7] = el, onFormLoading: this.handleFormLoading, allowOptionalFields: this.allowOptionalFields }),
11
+ 6: () => h("justifi-business-terms-conditions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[6] = el, onFormLoading: this.handleFormLoading, allowOptionalFields: this.allowOptionalFields }),
13
12
  };
14
13
  this.businessId = undefined;
15
14
  this.authToken = undefined;
@@ -22,7 +21,7 @@ export class PaymentProvisioningFormSteps {
22
21
  return this.componentStepMapping[this.currentStep]();
23
22
  }
24
23
  render() {
25
- return (h("div", { key: '7c2dc774f9c84172ffe0dbe18d24d9c582711159', class: 'col-12 mb-4' }, this.currentStepComponent));
24
+ return (h("div", { key: 'a83b5ef4442783fe771eef6d6418c97aa0a9026d', class: 'col-12 mb-4' }, this.currentStepComponent));
26
25
  }
27
26
  static get is() { return "justifi-payment-provisioning-form-steps"; }
28
27
  static get properties() {
@@ -111,8 +111,11 @@ export class BusinessTermsConditionsFormStep {
111
111
  this.errors = Object.assign({}, errors);
112
112
  });
113
113
  }
114
+ get merchantAgreementLink() {
115
+ return (h("a", { href: "https://justifi.tech/merchant-agreement/", target: "_blank", rel: "noopener noreferrer" }, "merchant agreement"));
116
+ }
114
117
  render() {
115
- return (h("form", { key: '171f28c9ceb30482708899890880c8ab11dbc941' }, h("fieldset", { key: '51306d0bd3e3dea325fb770f5c2561dd8cc2e207' }, h("legend", { key: '500f63285df715926ee3c32ea2d0ef8dc8f10523', part: heading2 }, "Terms and Conditions"), h("hr", { key: '320c04095f36752c5661afbf10a2ec021234bac6' }), h("justifi-business-terms-conditions-text", { key: 'b6cb2162427df3225fa0443080905aea15140715' }), h("br", { key: 'f65ea0d2c5e820fe75b0c11ac127cdb9621c389a' }), h("div", { key: '4b2a6dc295a039b20b9b9a516dc2c791509722d6', class: "row-gy-3" }, h("div", { key: '27265499a6d1cfcdd1a9d1a890f266bb670b4e57', class: "col-12" }, h("form-control-checkbox", { key: '80459807c7ebb3bd9ea43ae0c27235c9d3d00976', name: "accepted", label: "I agree to the terms and conditions", inputHandler: this.inputHandler, errorText: this.errors.accepted, disabled: this.acceptedTermsBefore, helpText: this.formHelperText, checked: this.acceptedTerms }))))));
118
+ return (h("form", { key: '643d1122e14cb32e62e4406c7a375d196ce310e9' }, h("fieldset", { key: 'a002f8bfa7d35b840cf01f5381e1895af3744810' }, h("legend", { key: '2ec353fe730c33c0dc2a103ef08666790343eba7', part: heading2 }, "Terms and Conditions"), h("hr", { key: 'ae538e42c49040ca41a83e9ff8664db89ae5bb03' }), h("div", { key: '2887706d30dad94180792be4c252e20cbf03cef6' }, h("p", { key: 'b1c3a9322ce96ac5265a50da6997228fe1666e9b' }, "Please read and accept the ", this.merchantAgreementLink, " to submit your provisioning request.")), h("br", { key: 'e78c021fa44eeddb5a963cfde3e5f2fa8d5066c5' }), h("div", { key: '888a15369bea1244f338fb6062090889f6de5aa1', class: "row-gy-3" }, h("div", { key: '510074fb20d80909cbe93fc44ad6918e214e8334', class: "col-12" }, h("form-control-checkbox", { key: 'dcaf2efb889a72335b1204b075a84ec9ff367bf5', name: "accepted", label: "I agree to the terms and conditions", inputHandler: this.inputHandler, errorText: this.errors.accepted, disabled: this.acceptedTermsBefore, helpText: this.formHelperText, checked: this.acceptedTerms }))))));
116
119
  }
117
120
  static get is() { return "justifi-business-terms-conditions-form-step"; }
118
121
  static get properties() {