@justifi/webcomponents 4.19.3-rc-2 → 4.20.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 (383) hide show
  1. package/dist/cjs/{Analytics-adc90fc6.js → Analytics-03981aad.js} +4 -3
  2. package/dist/cjs/{Api-3bc6e43f.js → Api-b98b256f.js} +3 -3
  3. package/dist/cjs/{Business-aacbe893.js → Business-aa799fec.js} +104 -9
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  5. package/dist/cjs/{business-additional-questions-schema-cf545610.js → business-additional-questions-schema-26b0eecb.js} +1 -1
  6. package/dist/cjs/business-details-core.cjs.entry.js +1 -1
  7. package/dist/cjs/{business-form-options-582467fe.js → business-form-options-5db0bd5e.js} +2 -2
  8. package/dist/cjs/{payload-parsers-1cbc3b57.js → business-identity-schema-503ecb77.js} +1 -47
  9. package/dist/cjs/{business.service-090a21e1.js → business.service-031c0084.js} +7 -6
  10. package/dist/cjs/check-pkg-version-89d6d146.js +24 -0
  11. package/dist/cjs/config-05767cba.js +15 -0
  12. package/dist/cjs/custom-popper.cjs.entry.js +1894 -0
  13. package/dist/cjs/form-alert_5.cjs.entry.js +2 -2
  14. package/dist/cjs/form-control-checkbox_9.cjs.entry.js +26 -26
  15. package/dist/cjs/form-control-date_3.cjs.entry.js +4 -4
  16. package/dist/cjs/form-control-error-text_4.cjs.entry.js +9 -9
  17. package/dist/cjs/{get-payout-csv-238e839a.js → get-payout-csv-3a3260ec.js} +5 -4
  18. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  19. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +15 -14
  20. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -5
  21. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +4 -4
  22. package/dist/cjs/justifi-business-details.cjs.entry.js +8 -5
  23. package/dist/cjs/justifi-business-form.cjs.entry.js +17 -14
  24. package/dist/cjs/justifi-card-form.cjs.entry.js +6 -5
  25. package/dist/cjs/justifi-checkout-core.cjs.entry.js +5 -5
  26. package/dist/cjs/justifi-checkout.cjs.entry.js +10 -7
  27. package/dist/cjs/justifi-details.cjs.entry.js +1 -1
  28. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +7 -4
  29. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +10 -12
  30. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +12 -11
  31. package/dist/cjs/justifi-payment-details.cjs.entry.js +7 -4
  32. package/dist/cjs/justifi-payment-form.cjs.entry.js +11 -8
  33. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +2 -2
  34. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
  35. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -6
  36. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -4
  37. package/dist/cjs/justifi-payout-details.cjs.entry.js +7 -4
  38. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -4
  39. package/dist/cjs/justifi-refund-form.cjs.entry.js +5 -4
  40. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +2 -2
  41. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +9 -6
  42. package/dist/cjs/loader.cjs.js +1 -1
  43. package/dist/cjs/{package-22d30c5d.js → package-7fdd14b9.js} +4 -2
  44. package/dist/cjs/payment-details-core.cjs.entry.js +2 -2
  45. package/dist/cjs/{payment.service-c92635c8.js → payment.service-4b1c0a20.js} +4 -3
  46. package/dist/cjs/payments-list-core.cjs.entry.js +18 -13
  47. package/dist/cjs/payments-list-filters_2.cjs.entry.js +17266 -0
  48. package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
  49. package/dist/cjs/payouts-list-core.cjs.entry.js +4 -4
  50. package/dist/cjs/{schema-validations-2733de42.js → schema-validations-0a7e46a3.js} +1 -1
  51. package/dist/cjs/styled-host-9e0b67b3.js +14 -0
  52. package/dist/cjs/{utils-89d86e29.js → utils-af1b60a9.js} +0 -16
  53. package/dist/cjs/utils-f8a6962c.js +25 -0
  54. package/dist/cjs/webcomponents.cjs.js +1 -1
  55. package/dist/collection/api/Api.js +3 -3
  56. package/dist/collection/api/Business.js +66 -7
  57. package/dist/collection/api/Identity.js +39 -3
  58. package/dist/collection/api/services/analytics.service.js +2 -1
  59. package/dist/collection/api/services/business.service.js +6 -5
  60. package/dist/collection/api/services/checkout.service.js +3 -2
  61. package/dist/collection/api/services/insurance.service.js +3 -2
  62. package/dist/collection/api/services/payment.service.js +3 -2
  63. package/dist/collection/api/services/payout.service.js +4 -3
  64. package/dist/collection/api/services/provision.service.js +2 -1
  65. package/dist/collection/api/services/reports.service.js +2 -1
  66. package/dist/collection/collection-manifest.json +4 -1
  67. package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
  68. package/dist/collection/components/business-details/business-details.js +2 -0
  69. package/dist/collection/components/business-forms/business-form/business-form.js +7 -5
  70. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +4 -5
  71. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +3 -3
  72. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +4 -3
  73. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +3 -5
  74. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +3 -3
  75. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +3 -4
  76. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +4 -3
  77. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +3 -4
  78. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +3 -1
  79. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +4 -3
  80. package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
  81. package/dist/collection/components/card-form/card-form.js +4 -3
  82. package/dist/collection/components/checkout/checkout-core.js +4 -4
  83. package/dist/collection/components/checkout/checkout.js +4 -2
  84. package/dist/collection/components/checkout/new-payment-method.js +4 -6
  85. package/dist/collection/components/checkout/payment-method-options.js +4 -3
  86. package/dist/collection/components/checkout/saved-payment-method.js +4 -3
  87. package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
  88. package/dist/collection/components/form/form-control-date.js +26 -28
  89. package/dist/collection/components/form/form-control-select.js +45 -45
  90. package/dist/collection/components/form/form-control-text.js +34 -34
  91. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +2 -0
  92. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +3 -1
  93. package/dist/collection/components/payment-details/payment-details.js +2 -0
  94. package/dist/collection/components/payment-form/payment-form.js +6 -3
  95. package/dist/collection/components/payments-list/payments-list-core.js +14 -9
  96. package/dist/collection/components/payments-list/payments-list-filters.js +84 -0
  97. package/dist/collection/components/payments-list/payments-list.js +2 -0
  98. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  99. package/dist/collection/components/payout-details/payout-details.js +2 -0
  100. package/dist/collection/components/payouts-list/payouts-list-core.js +2 -2
  101. package/dist/collection/components/payouts-list/payouts-list.js +2 -0
  102. package/dist/collection/components/refund-form/refund-form.js +3 -2
  103. package/dist/collection/ui-components/custom-popper/custom-popper.js +239 -0
  104. package/dist/collection/ui-components/filters/table-filters-menu.js +89 -0
  105. package/dist/collection/ui-components/filters/utils.js +20 -0
  106. package/dist/collection/utils/check-pkg-version.js +19 -0
  107. package/dist/config.js +11 -0
  108. package/dist/docs.json +531 -27
  109. package/dist/{webcomponents/p-15eafa87.js → esm/Analytics-3103f8e9.js} +4 -3
  110. package/dist/esm/{Api-b09a2f6a.js → Api-c8abc2e0.js} +3 -3
  111. package/dist/esm/{Business-e218b4f4.js → Business-b73d5055.js} +104 -9
  112. package/dist/esm/additional-questions-details_5.entry.js +1 -1
  113. package/dist/esm/{business-additional-questions-schema-956e3caf.js → business-additional-questions-schema-a5583cf8.js} +1 -1
  114. package/dist/esm/business-details-core.entry.js +1 -1
  115. package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-d790973e.js} +2 -2
  116. package/dist/esm/{payload-parsers-acb719d1.js → business-identity-schema-9e3269fb.js} +2 -44
  117. package/dist/esm/{business.service-37d0cc72.js → business.service-1f589b6e.js} +7 -6
  118. package/dist/esm/check-pkg-version-44e6ad15.js +22 -0
  119. package/dist/esm/config-27764a9d.js +13 -0
  120. package/dist/esm/custom-popper.entry.js +1890 -0
  121. package/dist/esm/form-alert_5.entry.js +2 -2
  122. package/dist/esm/form-control-checkbox_9.entry.js +21 -21
  123. package/dist/esm/form-control-date_3.entry.js +4 -4
  124. package/dist/esm/form-control-error-text_4.entry.js +9 -9
  125. package/dist/esm/{get-payout-csv-a702a0d9.js → get-payout-csv-93427146.js} +5 -4
  126. package/dist/esm/gross-payment-chart-core.entry.js +1 -1
  127. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +15 -14
  128. package/dist/esm/justifi-bank-account-form.entry.js +6 -5
  129. package/dist/esm/justifi-billing-form_2.entry.js +4 -4
  130. package/dist/esm/justifi-business-details.entry.js +8 -5
  131. package/dist/esm/justifi-business-form.entry.js +16 -13
  132. package/dist/esm/justifi-card-form.entry.js +6 -5
  133. package/dist/esm/justifi-checkout-core.entry.js +5 -5
  134. package/dist/esm/justifi-checkout.entry.js +10 -7
  135. package/dist/esm/justifi-details.entry.js +1 -1
  136. package/dist/esm/justifi-gross-payment-chart.entry.js +7 -4
  137. package/dist/esm/justifi-new-payment-method_4.entry.js +10 -12
  138. package/dist/esm/justifi-owner-form_3.entry.js +11 -10
  139. package/dist/esm/justifi-payment-details.entry.js +7 -4
  140. package/dist/esm/justifi-payment-form.entry.js +11 -8
  141. package/dist/esm/justifi-payment-method-form.entry.js +2 -2
  142. package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
  143. package/dist/esm/justifi-payment-provisioning.entry.js +9 -6
  144. package/dist/esm/justifi-payments-list.entry.js +7 -4
  145. package/dist/esm/justifi-payout-details.entry.js +7 -4
  146. package/dist/esm/justifi-payouts-list.entry.js +7 -4
  147. package/dist/esm/justifi-refund-form.entry.js +5 -4
  148. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +2 -2
  149. package/dist/esm/justifi-season-interruption-insurance.entry.js +9 -6
  150. package/dist/esm/loader.js +1 -1
  151. package/dist/{webcomponents/p-2e8f4937.js → esm/package-0e3cc41e.js} +4 -2
  152. package/dist/esm/payment-details-core.entry.js +2 -2
  153. package/dist/esm/{payment.service-9359fe15.js → payment.service-02c596b9.js} +4 -3
  154. package/dist/esm/payments-list-core.entry.js +16 -11
  155. package/dist/esm/payments-list-filters_2.entry.js +17261 -0
  156. package/dist/esm/payout-details-core.entry.js +3 -3
  157. package/dist/esm/payouts-list-core.entry.js +4 -4
  158. package/dist/esm/{schema-validations-a83ff220.js → schema-validations-e725d701.js} +2 -2
  159. package/dist/esm/styled-host-3171ae1f.js +12 -0
  160. package/dist/esm/utils-3a4d8f3a.js +22 -0
  161. package/dist/{webcomponents/p-83125497.js → esm/utils-e66d8bca.js} +1 -16
  162. package/dist/esm/webcomponents.js +1 -1
  163. package/dist/module/Analytics.js +2 -1
  164. package/dist/module/Api.js +3 -3
  165. package/dist/module/Business.js +104 -9
  166. package/dist/module/business-additional-questions-form-step-core.js +3 -3
  167. package/dist/module/business-bank-account-form-step.js +4 -3
  168. package/dist/module/business-core-info-form-step-core.js +3 -5
  169. package/dist/module/business-document-upload-form-step.js +4 -3
  170. package/dist/module/business-document-upload-input-group.js +1 -1
  171. package/dist/module/business-documents-on-file.js +1 -1
  172. package/dist/module/business-form-options.js +1 -1
  173. package/dist/module/business-owners-form-step-core.js +3 -3
  174. package/dist/module/business-representative-form-step-core.js +3 -4
  175. package/dist/module/business-terms-conditions-form-step.js +4 -3
  176. package/dist/module/business.service.js +6 -5
  177. package/dist/module/check-pkg-version.js +22 -0
  178. package/dist/module/checkout-core.js +3 -3
  179. package/dist/module/config.js +13 -0
  180. package/dist/module/custom-popper.d.ts +11 -0
  181. package/dist/module/custom-popper.js +6 -0
  182. package/dist/module/custom-popper2.js +1912 -0
  183. package/dist/module/form-control-date2.js +7 -7
  184. package/dist/module/form-control-select2.js +9 -9
  185. package/dist/module/form-control-text2.js +7 -7
  186. package/dist/module/get-payout-csv.js +4 -3
  187. package/dist/module/justifi-bank-account-form.js +3 -2
  188. package/dist/module/justifi-business-details.js +2 -0
  189. package/dist/module/justifi-business-form.js +7 -5
  190. package/dist/module/justifi-card-form.js +3 -2
  191. package/dist/module/justifi-checkout.js +7 -4
  192. package/dist/module/justifi-gross-payment-chart.js +4 -1
  193. package/dist/module/justifi-payment-details.js +2 -0
  194. package/dist/module/justifi-payment-form.js +6 -3
  195. package/dist/module/justifi-payment-provisioning.js +5 -2
  196. package/dist/module/justifi-payments-list.js +42 -10
  197. package/dist/module/justifi-payout-details.js +2 -0
  198. package/dist/module/justifi-payouts-list.js +2 -0
  199. package/dist/module/justifi-refund-form.js +3 -2
  200. package/dist/module/justifi-season-interruption-insurance.js +6 -3
  201. package/dist/module/legal-address-form-step-core.js +3 -4
  202. package/dist/module/new-payment-method.js +3 -5
  203. package/dist/module/owner-form-core2.js +4 -5
  204. package/dist/module/package.js +4 -2
  205. package/dist/module/payment-details-core2.js +1 -1
  206. package/dist/module/payment-method-options.js +3 -2
  207. package/dist/module/payment.service.js +3 -2
  208. package/dist/module/payments-list-core2.js +52 -18
  209. package/dist/module/payments-list-filters.d.ts +11 -0
  210. package/dist/module/payments-list-filters.js +6 -0
  211. package/dist/module/payments-list-filters2.js +17294 -0
  212. package/dist/module/payout-details-core2.js +2 -2
  213. package/dist/module/payouts-list-core2.js +3 -3
  214. package/dist/module/saved-payment-method.js +4 -3
  215. package/dist/module/sezzle-payment-method.js +3 -2
  216. package/dist/module/styled-host.js +1 -1
  217. package/dist/module/table-filters-menu.d.ts +11 -0
  218. package/dist/module/table-filters-menu.js +6 -0
  219. package/dist/module/table-filters-menu2.js +80 -0
  220. package/dist/module/utils2.js +1 -16
  221. package/dist/types/api/Business.d.ts +87 -1
  222. package/dist/types/api/Identity.d.ts +45 -1
  223. package/dist/types/api/Payment.d.ts +8 -0
  224. package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +44 -1
  225. package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.d.ts +11 -1
  226. package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.d.ts +11 -1
  227. package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.d.ts +24 -1
  228. package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.d.ts +11 -1
  229. package/dist/types/components/checkout/new-payment-method.d.ts +0 -1
  230. package/dist/types/components/form/form-control-date.d.ts +4 -4
  231. package/dist/types/components/form/form-control-select.d.ts +6 -6
  232. package/dist/types/components/form/form-control-text.d.ts +4 -4
  233. package/dist/types/components/payments-list/payments-list-core.d.ts +6 -5
  234. package/dist/types/components/payments-list/payments-list-filters.d.ts +13 -0
  235. package/dist/types/components.d.ts +89 -10
  236. package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
  237. package/dist/types/ui-components/custom-popper/custom-popper.d.ts +21 -0
  238. package/dist/types/ui-components/filters/table-filters-menu.d.ts +11 -0
  239. package/dist/types/ui-components/filters/utils.d.ts +2 -0
  240. package/dist/types/utils/check-pkg-version.d.ts +1 -0
  241. package/dist/webcomponents/index.esm.js +0 -1
  242. package/dist/webcomponents/p-056e75be.entry.js +1 -0
  243. package/dist/webcomponents/p-05718341.entry.js +1 -0
  244. package/dist/webcomponents/p-08b0fb31.js +1 -41
  245. package/dist/webcomponents/p-0de026dd.entry.js +1 -0
  246. package/dist/webcomponents/p-0e84986e.entry.js +10 -0
  247. package/dist/webcomponents/p-0f7b9555.entry.js +1 -0
  248. package/dist/webcomponents/p-14c91ffd.js +1 -20
  249. package/dist/webcomponents/p-1612894d.js +1 -0
  250. package/dist/webcomponents/p-1815a43b.js +1 -0
  251. package/dist/webcomponents/p-1ad5995e.js +1 -3599
  252. package/dist/webcomponents/p-1eee25f3.entry.js +19 -0
  253. package/dist/webcomponents/p-1ff8810b.js +1 -29
  254. package/dist/webcomponents/p-20dafb46.entry.js +1 -0
  255. package/dist/webcomponents/p-2338affa.js +1 -213
  256. package/dist/webcomponents/p-277aee05.js +1 -0
  257. package/dist/webcomponents/p-2b6c9c4f.js +1 -7
  258. package/dist/webcomponents/p-2c51d29f.js +1 -0
  259. package/dist/webcomponents/p-2eab3c90.js +1 -3052
  260. package/dist/webcomponents/p-3a1f19f3.entry.js +1 -0
  261. package/dist/webcomponents/p-3c7fac29.entry.js +1 -0
  262. package/dist/webcomponents/p-401d6607.js +1 -0
  263. package/dist/webcomponents/p-428e9b64.entry.js +1 -0
  264. package/dist/webcomponents/p-430f81c6.entry.js +1 -0
  265. package/dist/webcomponents/p-437f9114.js +1 -0
  266. package/dist/webcomponents/p-44055818.js +1 -0
  267. package/dist/webcomponents/p-4628cc9b.entry.js +1 -0
  268. package/dist/webcomponents/p-4cc9df76.entry.js +1 -0
  269. package/dist/webcomponents/p-5022f21c.js +1 -0
  270. package/dist/webcomponents/p-525db3e8.js +1 -22
  271. package/dist/webcomponents/p-55182a59.js +1 -0
  272. package/dist/webcomponents/p-5540a47c.entry.js +1 -0
  273. package/dist/webcomponents/p-56f6ce4c.js +1 -10
  274. package/dist/webcomponents/p-570a0f02.entry.js +1 -0
  275. package/dist/webcomponents/p-5968ff8a.js +1 -178
  276. package/dist/webcomponents/p-59cf5391.entry.js +1 -0
  277. package/dist/webcomponents/p-5a62fca2.js +1 -0
  278. package/dist/webcomponents/p-5e2c9ec8.js +1 -0
  279. package/dist/webcomponents/p-5e7c60d8.js +1 -0
  280. package/dist/webcomponents/p-6078a370.js +1 -244
  281. package/dist/webcomponents/p-6ac806ff.entry.js +1 -0
  282. package/dist/webcomponents/p-7bdffc78.entry.js +1 -0
  283. package/dist/webcomponents/p-7d3be485.js +1 -0
  284. package/dist/webcomponents/p-7d85af5c.js +1 -16
  285. package/dist/webcomponents/p-7ddfce86.entry.js +1 -0
  286. package/dist/webcomponents/p-7fe67d7f.entry.js +1 -0
  287. package/dist/webcomponents/p-7ff329b1.js +1 -0
  288. package/dist/webcomponents/p-804c0f1f.entry.js +1 -0
  289. package/dist/webcomponents/p-8115b2f4.js +1 -28
  290. package/dist/webcomponents/p-8281f09a.js +1 -0
  291. package/dist/webcomponents/p-8921a478.entry.js +1 -0
  292. package/dist/webcomponents/p-8a7112a0.entry.js +1 -0
  293. package/dist/webcomponents/p-8c83b73e.entry.js +1 -0
  294. package/dist/webcomponents/p-8d03a7bd.entry.js +1 -0
  295. package/dist/webcomponents/p-8df7bde8.js +1 -27
  296. package/dist/webcomponents/p-938bf2b4.entry.js +1 -0
  297. package/dist/webcomponents/p-9b154d98.entry.js +1 -0
  298. package/dist/webcomponents/p-9c9c7dac.js +1 -24
  299. package/dist/webcomponents/p-ad47f37c.entry.js +1 -0
  300. package/dist/webcomponents/p-aedb421f.entry.js +1 -0
  301. package/dist/webcomponents/p-b14da2fd.entry.js +1 -0
  302. package/dist/webcomponents/p-bbed6107.entry.js +1 -0
  303. package/dist/webcomponents/p-bdc91c61.entry.js +1 -0
  304. package/dist/webcomponents/p-c64ce69d.entry.js +1 -0
  305. package/dist/webcomponents/p-d76002d5.entry.js +1 -0
  306. package/dist/webcomponents/p-d8355f91.entry.js +1 -0
  307. package/dist/webcomponents/p-d89bad72.js +1 -39
  308. package/dist/webcomponents/p-da1d174d.entry.js +1 -0
  309. package/dist/webcomponents/p-dbc1d7b3.entry.js +1 -0
  310. package/dist/webcomponents/p-dce846bf.js +1 -27
  311. package/dist/webcomponents/p-df21aaad.js +1 -120
  312. package/dist/webcomponents/p-e1255160.js +1 -3
  313. package/dist/webcomponents/p-e2c88817.entry.js +1 -0
  314. package/dist/webcomponents/p-e31f0f3e.entry.js +1 -0
  315. package/dist/webcomponents/p-e333620e.js +1 -34
  316. package/dist/webcomponents/p-e3f4a2a6.js +1 -0
  317. package/dist/webcomponents/p-e3fab0e2.js +1 -43
  318. package/dist/webcomponents/p-eea79a55.entry.js +1 -0
  319. package/dist/webcomponents/p-f0866375.entry.js +1 -0
  320. package/dist/webcomponents/p-f6a2dc78.entry.js +1 -0
  321. package/dist/webcomponents/p-fad19d75.js +2 -1638
  322. package/dist/webcomponents/webcomponents.css +4 -362
  323. package/dist/webcomponents/webcomponents.esm.js +1 -20
  324. package/package.json +4 -2
  325. package/dist/cjs/styled-host-cc053016.js +0 -14
  326. package/dist/collection/components/business-forms/utils/payload-parsers.js +0 -41
  327. package/dist/esm/Analytics-a8eb7344.js +0 -77
  328. package/dist/esm/package-ccb774a9.js +0 -79
  329. package/dist/esm/styled-host-ab9da520.js +0 -12
  330. package/dist/esm/utils-3c1dd2fa.js +0 -4027
  331. package/dist/module/payload-parsers.js +0 -43
  332. package/dist/types/components/business-forms/utils/payload-parsers.d.ts +0 -4
  333. package/dist/webcomponents/p-01a404ca.entry.js +0 -44
  334. package/dist/webcomponents/p-03d35880.entry.js +0 -130
  335. package/dist/webcomponents/p-06ff0429.entry.js +0 -65
  336. package/dist/webcomponents/p-0e1bc91e.js +0 -28
  337. package/dist/webcomponents/p-10875f3d.entry.js +0 -97
  338. package/dist/webcomponents/p-157acba8.entry.js +0 -98
  339. package/dist/webcomponents/p-18fa0479.entry.js +0 -131
  340. package/dist/webcomponents/p-1a5120f4.entry.js +0 -145
  341. package/dist/webcomponents/p-24dc023a.entry.js +0 -791
  342. package/dist/webcomponents/p-25d8cd65.entry.js +0 -102
  343. package/dist/webcomponents/p-27d87fe2.entry.js +0 -133
  344. package/dist/webcomponents/p-29c0b182.js +0 -114
  345. package/dist/webcomponents/p-3395e896.entry.js +0 -74
  346. package/dist/webcomponents/p-3fd13ca3.js +0 -52
  347. package/dist/webcomponents/p-47d79529.js +0 -18
  348. package/dist/webcomponents/p-53ecc8b9.entry.js +0 -261
  349. package/dist/webcomponents/p-5482d030.entry.js +0 -21
  350. package/dist/webcomponents/p-576826b1.entry.js +0 -43
  351. package/dist/webcomponents/p-5f835b89.entry.js +0 -606
  352. package/dist/webcomponents/p-6124b1b3.entry.js +0 -80
  353. package/dist/webcomponents/p-70a2aa74.entry.js +0 -76
  354. package/dist/webcomponents/p-7582b554.entry.js +0 -18
  355. package/dist/webcomponents/p-75fd6367.entry.js +0 -149
  356. package/dist/webcomponents/p-79646550.entry.js +0 -61
  357. package/dist/webcomponents/p-800d31fe.entry.js +0 -162
  358. package/dist/webcomponents/p-85fc69e5.js +0 -90
  359. package/dist/webcomponents/p-89887332.js +0 -301
  360. package/dist/webcomponents/p-8eb774df.entry.js +0 -54
  361. package/dist/webcomponents/p-9e17630d.entry.js +0 -1684
  362. package/dist/webcomponents/p-9f94bbb6.entry.js +0 -118
  363. package/dist/webcomponents/p-a4e8573e.entry.js +0 -94
  364. package/dist/webcomponents/p-a5a225d9.entry.js +0 -125
  365. package/dist/webcomponents/p-a5fb51dc.entry.js +0 -131
  366. package/dist/webcomponents/p-ab4816e1.entry.js +0 -117
  367. package/dist/webcomponents/p-ac086069.entry.js +0 -58
  368. package/dist/webcomponents/p-af244664.js +0 -126
  369. package/dist/webcomponents/p-b4b8b531.js +0 -44
  370. package/dist/webcomponents/p-b82c146f.entry.js +0 -111
  371. package/dist/webcomponents/p-ba4bae6f.js +0 -12
  372. package/dist/webcomponents/p-ba5fae28.js +0 -90
  373. package/dist/webcomponents/p-bd66f9d2.entry.js +0 -101
  374. package/dist/webcomponents/p-cc39384f.entry.js +0 -99
  375. package/dist/webcomponents/p-d17aee2b.entry.js +0 -26
  376. package/dist/webcomponents/p-dad3e069.entry.js +0 -298
  377. package/dist/webcomponents/p-e1e7525b.entry.js +0 -73
  378. package/dist/webcomponents/p-e356f280.entry.js +0 -29
  379. package/dist/webcomponents/p-e9a5cb95.entry.js +0 -94
  380. package/dist/webcomponents/p-ec854a3e.entry.js +0 -11053
  381. package/dist/webcomponents/p-edc37d1f.entry.js +0 -75
  382. package/dist/webcomponents/p-f02b75dc.entry.js +0 -96
  383. package/dist/{globals.d.ts → types/global.d.ts} +1 -1
@@ -1,791 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './p-fad19d75.js';
2
- import { a as ComponentErrorCodes, C as ComponentErrorSeverity } from './p-14c91ffd.js';
3
- import { m as makeGetBusiness, b as makePatchBusiness } from './p-5968ff8a.js';
4
- import { B as BusinessService } from './p-0e1bc91e.js';
5
- import { c as create$3, F as FormController, e as create$7 } from './p-2eab3c90.js';
6
- import { b as BusinessFormStep, a as BusinessFormClickActions } from './p-d89bad72.js';
7
- import { z as bankNameValidation, A as nicknameValidation, i as identityNameValidation, B as accountTypeValidation, C as accountNumberValidation, D as routingNumberValidation, E as voidedCheckValidation, F as governmentIdValidation, G as ss4Validation, H as otherDocumentValidation, I as balanceSheetValidation, J as bankStatementValidation, K as profitAndLossStatementValidation, L as EntityDocument, M as EntityDocumentStorage } from './p-89887332.js';
8
- import { c as bankAccountTypeOptions } from './p-ba5fae28.js';
9
- import { A as Api } from './p-29c0b182.js';
10
- import './p-56f6ce4c.js';
11
- import './p-df21aaad.js';
12
- import './p-e3fab0e2.js';
13
- import { n as numberOnlyHandler } from './p-8df7bde8.js';
14
- import { B as Business } from './p-af244664.js';
15
- import { S as Skeleton } from './p-08b0fb31.js';
16
- import { B as Button } from './p-9c9c7dac.js';
17
- import './p-8115b2f4.js';
18
- import './p-6078a370.js';
19
- import './p-1ff8810b.js';
20
-
21
- const AdditionalQuestionsFormStep = class {
22
- constructor(hostRef) {
23
- registerInstance(this, hostRef);
24
- this.errorEvent = createEvent(this, "error-event", 7);
25
- this.getBusiness = undefined;
26
- this.patchBusiness = undefined;
27
- this.authToken = undefined;
28
- this.businessId = undefined;
29
- this.allowOptionalFields = undefined;
30
- }
31
- propChanged() {
32
- this.initializeApi();
33
- }
34
- async validateAndSubmit({ onSuccess }) {
35
- this.coreComponent.validateAndSubmit({ onSuccess });
36
- }
37
- componentWillLoad() {
38
- this.initializeApi();
39
- }
40
- initializeApi() {
41
- if (this.authToken && this.businessId) {
42
- this.getBusiness = makeGetBusiness({
43
- authToken: this.authToken,
44
- businessId: this.businessId,
45
- service: new BusinessService()
46
- });
47
- this.patchBusiness = makePatchBusiness({
48
- authToken: this.authToken,
49
- businessId: this.businessId,
50
- service: new BusinessService()
51
- });
52
- }
53
- else {
54
- this.errorEvent.emit({
55
- message: 'Missing required props',
56
- errorCode: ComponentErrorCodes.MISSING_PROPS,
57
- severity: ComponentErrorSeverity.ERROR,
58
- });
59
- }
60
- }
61
- render() {
62
- return (h("justifi-additional-questions-form-step-core", { key: 'ede8f1336c69d47c651a5b4b95ee2746aae3aa52', getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
63
- }
64
- static get watchers() { return {
65
- "authToken": ["propChanged"],
66
- "businessId": ["propChanged"]
67
- }; }
68
- };
69
-
70
- const businessBankAccountSchema = (allowOptionalFields) => {
71
- const schema = create$3({
72
- bank_name: bankNameValidation.required('Enter bank name'),
73
- nickname: nicknameValidation.required('Enter nickname'),
74
- account_owner_name: identityNameValidation.required('Enter account owner name'),
75
- account_type: accountTypeValidation.required('Select account type'),
76
- account_number: accountNumberValidation.required('Enter account number'),
77
- routing_number: routingNumberValidation.required('Enter routing number')
78
- });
79
- const easySchema = create$3({
80
- bank_name: bankNameValidation.nullable(),
81
- nickname: nicknameValidation.nullable(),
82
- account_owner_name: identityNameValidation.nullable(),
83
- account_type: accountTypeValidation.nullable(),
84
- account_number: accountNumberValidation.nullable(),
85
- routing_number: routingNumberValidation.nullable()
86
- });
87
- return allowOptionalFields ? easySchema : schema;
88
- };
89
-
90
- class BankAccount {
91
- constructor(data) {
92
- this.id = data.id;
93
- this.account_owner_name = data.account_owner_name;
94
- this.full_name = data.full_name;
95
- this.account_type = data.account_type;
96
- this.acct_last_four = data.acct_last_four;
97
- this.account_number_last4 = data.account_number_last4;
98
- this.routing_number = data.routing_number;
99
- this.bank_name = data.bank_name;
100
- this.country = data.country;
101
- this.currency = data.currency;
102
- this.nickname = data.nickname;
103
- this.metadata = data.metadata;
104
- this.business_id = data.business_id;
105
- this.platform_account_id = data.platform_account_id;
106
- this.created_at = data.created_at;
107
- this.updated_at = data.updated_at;
108
- }
109
- }
110
-
111
- const BusinessBankAccountFormStep = class {
112
- constructor(hostRef) {
113
- registerInstance(this, hostRef);
114
- this.submitted = createEvent(this, "submitted", 7);
115
- this.formLoading = createEvent(this, "formLoading", 7);
116
- this.errorEvent = createEvent(this, "error-event", 7);
117
- this.fetchData = async () => {
118
- this.formLoading.emit(true);
119
- try {
120
- const response = await this.api.get(this.businessEndpoint);
121
- if (response.data.bank_accounts.length > 0) {
122
- this.bankAccount = Object.assign({}, new BankAccount(response.data.bank_accounts[0]));
123
- }
124
- else {
125
- this.bankAccount = Object.assign({}, new BankAccount({}));
126
- }
127
- this.formController.setInitialValues(Object.assign({}, this.bankAccount));
128
- }
129
- catch (error) {
130
- this.errorEvent.emit({
131
- errorCode: ComponentErrorCodes.FETCH_ERROR,
132
- message: error.message,
133
- severity: ComponentErrorSeverity.ERROR,
134
- data: error,
135
- });
136
- }
137
- finally {
138
- this.formLoading.emit(false);
139
- }
140
- };
141
- this.sendData = async (onSuccess) => {
142
- this.formLoading.emit(true);
143
- try {
144
- const formValues = this.formController.values.getValue();
145
- const payload = Object.assign(Object.assign({}, formValues), { business_id: this.businessId });
146
- const response = await this.api.post(this.bankAccountEndpoint, JSON.stringify(payload));
147
- this.handleResponse(response, onSuccess);
148
- }
149
- catch (error) {
150
- this.errorEvent.emit({
151
- errorCode: ComponentErrorCodes.POST_ERROR,
152
- message: error.message,
153
- severity: ComponentErrorSeverity.ERROR,
154
- data: error,
155
- });
156
- }
157
- finally {
158
- this.formLoading.emit(false);
159
- }
160
- };
161
- this.inputHandler = (name, value) => {
162
- this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
163
- };
164
- this.formController = undefined;
165
- this.errors = {};
166
- this.bankAccount = undefined;
167
- this.authToken = undefined;
168
- this.businessId = undefined;
169
- this.allowOptionalFields = undefined;
170
- }
171
- get businessEndpoint() {
172
- return `entities/business/${this.businessId}`;
173
- }
174
- get bankAccountEndpoint() {
175
- return `entities/bank_accounts`;
176
- }
177
- get formDisabled() {
178
- var _a;
179
- return !!((_a = this.bankAccount) === null || _a === void 0 ? void 0 : _a.id);
180
- }
181
- handleResponse(response, onSuccess) {
182
- if (response.error) {
183
- this.errorEvent.emit({
184
- errorCode: ComponentErrorCodes.POST_ERROR,
185
- message: response.error.message,
186
- severity: ComponentErrorSeverity.ERROR,
187
- data: response.error,
188
- });
189
- }
190
- else {
191
- onSuccess();
192
- }
193
- this.submitted.emit({ data: response, metadata: { completedStep: BusinessFormStep.bankAccount } });
194
- }
195
- async validateAndSubmit({ onSuccess }) {
196
- this.formDisabled ? onSuccess() :
197
- this.formController.validateAndSubmit(() => this.sendData(onSuccess));
198
- }
199
- ;
200
- componentWillLoad() {
201
- this.formController = new FormController(businessBankAccountSchema(this.allowOptionalFields));
202
- this.api = Api({ authToken: this.authToken, apiOrigin: "" });
203
- if (this.businessId && this.authToken) {
204
- this.fetchData();
205
- }
206
- }
207
- componentDidLoad() {
208
- this.formController.values.subscribe(values => this.bankAccount = Object.assign({}, values));
209
- this.formController.errors.subscribe(errors => {
210
- this.errors = Object.assign({}, errors);
211
- });
212
- }
213
- render() {
214
- const bankAccountDefaultValue = this.formController.getInitialValues();
215
- return (h("form", { key: 'bc16efe8af48103ce07d8f5c6ecb040bbb957868' }, h("fieldset", { key: 'aaada7411cd43e678be3fe14bd60462e39f54527' }, h("legend", { key: '165b78cff91b553a37e7f070a40c4941db2929df' }, "Bank Account Info"), h("hr", { key: '006315c63bd21554dfa30d763122b9c9f259aba9' }), h("div", { key: 'f080fa734567a23c43ee7123bf2718aad5f1efa1', class: "row gy-3" }, h("div", { key: '674fab37279d21761f6e588338ebdcdb9e5520aa', class: "col-12" }, h("form-control-text", { key: '68f1a9aa2200e204c4db2a36eb5f4f168ab18bab', name: "bank_name", label: "Bank Name", defaultValue: bankAccountDefaultValue.bank_name, errorText: this.errors.bank_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '085f33f93096bd9ecba304715ea1c3ec879396b4', class: "col-12" }, h("form-control-text", { key: 'c684ee2722f992ed61c51f87fd2c234c7278eb21', name: "nickname", label: "Nickname", defaultValue: bankAccountDefaultValue.nickname, errorText: this.errors.nickname, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'c0afbdb31f2faa8f73158e659b232230099e8b9f', class: "col-12" }, h("form-control-text", { key: '3d0e3ca9794beed0c542b6ca18a01eebec48366f', 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: '40fd8191645312efaadc633061451bd744f2a31a', class: "col-12" }, h("form-control-select", { key: '40e40cc75dcaf8ef9ba47bdf109eb14798f28436', 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: '2af9c012bca9d413a5eb5b3b27f685f88137888b', class: "col-12" }, h("form-control-text", { key: '6386c601520152cb758dfe30ea7c6a8cdb1b249a', 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 })), h("div", { key: '8dac645db4cb8f18f4cdd138a02bc2467d2fcdd4', class: "col-12" }, h("form-control-text", { key: 'b8abe9231edd0fd07c21c9b3874e8f4f792a1eda', 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 }))))));
216
- }
217
- };
218
-
219
- const BusinessCoreInfoFormStep = class {
220
- constructor(hostRef) {
221
- registerInstance(this, hostRef);
222
- this.errorEvent = createEvent(this, "error-event", 7);
223
- this.getBusiness = undefined;
224
- this.patchBusiness = undefined;
225
- this.authToken = undefined;
226
- this.businessId = undefined;
227
- this.allowOptionalFields = undefined;
228
- }
229
- propChanged() {
230
- this.initializeApi();
231
- }
232
- async validateAndSubmit({ onSuccess }) {
233
- this.coreComponent.validateAndSubmit({ onSuccess });
234
- }
235
- componentWillLoad() {
236
- this.initializeApi();
237
- }
238
- initializeApi() {
239
- if (this.authToken && this.businessId) {
240
- this.getBusiness = makeGetBusiness({
241
- authToken: this.authToken,
242
- businessId: this.businessId,
243
- service: new BusinessService()
244
- });
245
- this.patchBusiness = makePatchBusiness({
246
- authToken: this.authToken,
247
- businessId: this.businessId,
248
- service: new BusinessService()
249
- });
250
- }
251
- else {
252
- this.errorEvent.emit({
253
- message: 'Missing required props',
254
- errorCode: ComponentErrorCodes.MISSING_PROPS,
255
- severity: ComponentErrorSeverity.ERROR,
256
- });
257
- }
258
- }
259
- render() {
260
- return (h("justifi-business-core-info-form-step-core", { key: '4ee53046d16fd42df4e09b10c338a740c22184ef', businessId: this.businessId, getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
261
- }
262
- static get watchers() { return {
263
- "authToken": ["propChanged"],
264
- "businessId": ["propChanged"]
265
- }; }
266
- };
267
-
268
- const businessDocumentSchema = (volume, documents, allowOptionalFields) => {
269
- const schema = create$3({
270
- voided_check: voidedCheckValidation(documents, allowOptionalFields),
271
- government_id: governmentIdValidation.nullable(),
272
- ss4: ss4Validation.nullable(),
273
- other: otherDocumentValidation.nullable(),
274
- balance_sheet: balanceSheetValidation(volume, documents, allowOptionalFields),
275
- bank_statement: bankStatementValidation(volume, documents, allowOptionalFields),
276
- profit_and_loss_statement: profitAndLossStatementValidation(volume, documents, allowOptionalFields),
277
- });
278
- const easySchema = create$3({
279
- voided_check: voidedCheckValidation(documents, allowOptionalFields),
280
- government_id: governmentIdValidation.nullable(),
281
- ss4: ss4Validation.nullable(),
282
- other: otherDocumentValidation.nullable(),
283
- balance_sheet: balanceSheetValidation(volume, documents, allowOptionalFields),
284
- bank_statement: bankStatementValidation(volume, documents, allowOptionalFields),
285
- profit_and_loss_statement: profitAndLossStatementValidation(volume, documents, allowOptionalFields)
286
- });
287
- return allowOptionalFields ? easySchema : schema;
288
- };
289
-
290
- const BusinessDocumentFormStep = class {
291
- constructor(hostRef) {
292
- registerInstance(this, hostRef);
293
- this.submitted = createEvent(this, "submitted", 7);
294
- this.formLoading = createEvent(this, "formLoading", 7);
295
- this.errorEvent = createEvent(this, "error-event", 7);
296
- this.inputHandler = (name, value) => {
297
- this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
298
- };
299
- this.fetchData = async () => {
300
- this.renderState = 'loading';
301
- this.formLoading.emit(true);
302
- try {
303
- const response = await this.api.get(this.businessEndpoint);
304
- this.business = Object.assign({}, new Business(response.data));
305
- this.existingDocuments = response.data.documents;
306
- this.paymentVolume = response.data.additional_questions.business_payment_volume;
307
- }
308
- catch (error) {
309
- this.errorEvent.emit({
310
- errorCode: ComponentErrorCodes.FETCH_ERROR,
311
- message: error.message,
312
- severity: ComponentErrorSeverity.ERROR,
313
- data: error,
314
- });
315
- this.renderState = 'error';
316
- }
317
- finally {
318
- this.initializeFormController();
319
- this.formLoading.emit(false);
320
- this.renderState = 'success';
321
- }
322
- };
323
- this.initializeFormController = () => {
324
- this.formController = new FormController(businessDocumentSchema(this.paymentVolume, this.existingDocuments, this.allowOptionalFields));
325
- this.formController.errors.subscribe(errors => {
326
- this.errors = Object.assign({}, errors);
327
- });
328
- };
329
- this.createDocumentRecord = async (docData) => {
330
- this.formLoading.emit(true);
331
- const payload = docData.record_data;
332
- try {
333
- const response = await this.api.post(this.documentEndpoint, JSON.stringify(payload));
334
- return this.handleDocRecordResponse(docData, response);
335
- }
336
- catch (error) {
337
- this.errorEvent.emit({
338
- errorCode: ComponentErrorCodes.POST_ERROR,
339
- message: error.message,
340
- severity: ComponentErrorSeverity.ERROR,
341
- data: error,
342
- });
343
- return false;
344
- }
345
- };
346
- this.handleDocRecordResponse = (docData, response) => {
347
- if (response.error) {
348
- this.errorEvent.emit({
349
- errorCode: ComponentErrorCodes.POST_ERROR,
350
- message: response.error.message,
351
- severity: ComponentErrorSeverity.ERROR,
352
- data: response.error,
353
- });
354
- return false;
355
- }
356
- else {
357
- docData.setPresignedUrl(response.data.presigned_url);
358
- return true;
359
- }
360
- };
361
- this.uploadDocument = async (docData) => {
362
- if (!docData.presigned_url) {
363
- throw new Error('Presigned URL is not set');
364
- }
365
- const response = await fetch(docData.presigned_url, {
366
- method: 'PUT',
367
- body: docData.fileString,
368
- });
369
- return this.handleUploadResponse(response);
370
- };
371
- this.handleUploadResponse = (response) => {
372
- if (response.error) {
373
- this.errorEvent.emit({
374
- errorCode: ComponentErrorCodes.POST_ERROR,
375
- message: response.error.message,
376
- severity: ComponentErrorSeverity.ERROR,
377
- data: response.error,
378
- });
379
- return false;
380
- }
381
- else {
382
- this.submitted.emit({ data: response, metadata: { completedStep: BusinessFormStep.documentUpload } });
383
- return true;
384
- }
385
- };
386
- this.storeFiles = (e) => {
387
- const fileList = Array.from(e.detail.fileList);
388
- const docType = e.detail.document_type;
389
- const documentList = fileList.map(file => new EntityDocument({ file, document_type: docType }, this.businessId));
390
- this.documentData[docType] = documentList;
391
- };
392
- this.sendData = async (onSuccess) => {
393
- try {
394
- const docArray = Object.values(this.documentData).flat();
395
- if (!docArray.length) {
396
- return onSuccess();
397
- }
398
- const documentRecords = docArray.map(docData => this.createDocumentRecord(docData));
399
- const recordsCreated = await Promise.all(documentRecords);
400
- if (!recordsCreated) {
401
- return;
402
- }
403
- const uploads = docArray.map(docData => this.uploadDocument(docData));
404
- const uploadsCompleted = await Promise.all(uploads);
405
- if (!uploadsCompleted) {
406
- return;
407
- }
408
- await onSuccess();
409
- }
410
- finally {
411
- this.formLoading.emit(false);
412
- }
413
- };
414
- this.formController = undefined;
415
- this.errors = {};
416
- this.existingDocuments = [];
417
- this.paymentVolume = undefined;
418
- this.business = undefined;
419
- this.documentData = new EntityDocumentStorage();
420
- this.renderState = 'loading';
421
- this.authToken = undefined;
422
- this.businessId = undefined;
423
- this.allowOptionalFields = undefined;
424
- }
425
- get businessEndpoint() {
426
- return `entities/business/${this.businessId}`;
427
- }
428
- get documentEndpoint() {
429
- return 'entities/document';
430
- }
431
- componentWillLoad() {
432
- this.api = Api({ authToken: this.authToken, apiOrigin: "" });
433
- if (this.businessId && this.authToken) {
434
- this.fetchData();
435
- }
436
- }
437
- async validateAndSubmit({ onSuccess }) {
438
- this.formController.validateAndSubmit(() => this.sendData(onSuccess));
439
- }
440
- get isLoading() {
441
- return this.renderState === 'loading';
442
- }
443
- get isError() {
444
- return this.renderState === 'error';
445
- }
446
- get documentsOnFile() {
447
- if (this.isError) {
448
- return null;
449
- }
450
- if (this.isLoading) {
451
- return h(Skeleton, { variant: 'rounded', height: '50px' });
452
- }
453
- return h("justifi-business-documents-on-file", { documents: this.existingDocuments });
454
- }
455
- get formInputs() {
456
- if (this.isError) {
457
- return null;
458
- }
459
- if (this.isLoading) {
460
- return h(Skeleton, { variant: 'rounded', height: '350px' });
461
- }
462
- return (h("justifi-business-document-upload-input-group", { paymentVolume: this.paymentVolume, inputHandler: this.inputHandler, storeFiles: this.storeFiles, errors: this.errors }));
463
- }
464
- render() {
465
- return (h("form", { key: '4905c2dacbca9b1390fd7e316993be5d33117ee5' }, h("fieldset", { key: '22dc71452b1917be0d9dc237b1ac27739b922e65' }, h("legend", { key: '7c705b2b00a13f7fe690b2e5169dd1809934f892' }, "Document Uploads"), h("p", { key: 'e0ad37456d88496a589c1c79e8e3e9a0fc101577' }, "Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."), h("hr", { key: '4ac6afc1c6ce6c6e81d4fcf05ee1c5c58b66f520' }), this.documentsOnFile, h("div", { key: 'bf8aa49a47a2d53f5c0a1179474d8dd885a5a363', class: "d-flex flex-column" }, this.formInputs))));
466
- }
467
- };
468
-
469
- const BusinessOwnersFormStep = class {
470
- constructor(hostRef) {
471
- registerInstance(this, hostRef);
472
- this.errorEvent = createEvent(this, "error-event", 7);
473
- this.getBusiness = undefined;
474
- this.patchBusiness = undefined;
475
- this.authToken = undefined;
476
- this.businessId = undefined;
477
- this.allowOptionalFields = undefined;
478
- }
479
- propChanged() {
480
- this.initializeApi();
481
- }
482
- async validateAndSubmit({ onSuccess }) {
483
- this.coreComponent.validateAndSubmit({ onSuccess });
484
- }
485
- componentWillLoad() {
486
- this.initializeApi();
487
- }
488
- initializeApi() {
489
- if (this.authToken && this.businessId) {
490
- this.getBusiness = makeGetBusiness({
491
- authToken: this.authToken,
492
- businessId: this.businessId,
493
- service: new BusinessService()
494
- });
495
- this.patchBusiness = makePatchBusiness({
496
- authToken: this.authToken,
497
- businessId: this.businessId,
498
- service: new BusinessService()
499
- });
500
- }
501
- else {
502
- this.errorEvent.emit({
503
- message: 'Missing required props',
504
- errorCode: ComponentErrorCodes.MISSING_PROPS,
505
- severity: ComponentErrorSeverity.ERROR,
506
- });
507
- }
508
- }
509
- render() {
510
- return (h(Host, { key: '213a68fd3543eb912c6fed376128ba877ba75871' }, h("justifi-business-owners-form-step-core", { key: '5acee797bd35f5b60cadc5ddd50f560532dfe8b1', authToken: this.authToken, businessId: this.businessId, getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: (el) => this.coreComponent = el })));
511
- }
512
- static get watchers() { return {
513
- "authToken": ["propChanged"],
514
- "businessId": ["propChanged"]
515
- }; }
516
- };
517
-
518
- const BusinessRepresentativeFormStep = class {
519
- constructor(hostRef) {
520
- registerInstance(this, hostRef);
521
- this.errorEvent = createEvent(this, "error-event", 7);
522
- this.getBusiness = undefined;
523
- this.patchBusiness = undefined;
524
- this.authToken = undefined;
525
- this.businessId = undefined;
526
- this.allowOptionalFields = undefined;
527
- }
528
- propChanged() {
529
- this.initializeApi();
530
- }
531
- async validateAndSubmit({ onSuccess }) {
532
- this.coreComponent.validateAndSubmit({ onSuccess });
533
- }
534
- componentWillLoad() {
535
- this.initializeApi();
536
- }
537
- initializeApi() {
538
- if (this.authToken && this.businessId) {
539
- this.getBusiness = makeGetBusiness({
540
- authToken: this.authToken,
541
- businessId: this.businessId,
542
- service: new BusinessService()
543
- });
544
- this.patchBusiness = makePatchBusiness({
545
- authToken: this.authToken,
546
- businessId: this.businessId,
547
- service: new BusinessService()
548
- });
549
- }
550
- else {
551
- this.errorEvent.emit({
552
- message: 'Missing required props',
553
- errorCode: ComponentErrorCodes.MISSING_PROPS,
554
- severity: ComponentErrorSeverity.ERROR,
555
- });
556
- }
557
- }
558
- render() {
559
- return (h("justifi-business-representative-form-step-core", { key: '866d8cf33d53eff562dac1d36898b4c5695bf39b', getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
560
- }
561
- static get watchers() { return {
562
- "authToken": ["propChanged"],
563
- "businessId": ["propChanged"]
564
- }; }
565
- };
566
-
567
- const businessTermsConditionsSchema = (allowOptionalFields) => {
568
- const schema = create$3({
569
- accepted: create$7()
570
- .oneOf([true], 'You must agree to the terms and conditions to continue')
571
- .required('You must agree to the terms and conditions to continue')
572
- });
573
- const easySchema = create$3({
574
- accepted: create$7().nullable()
575
- });
576
- return allowOptionalFields ? easySchema : schema;
577
- };
578
-
579
- const BusinessTermsConditionsFormStep = class {
580
- constructor(hostRef) {
581
- registerInstance(this, hostRef);
582
- this.submitted = createEvent(this, "submitted", 7);
583
- this.formLoading = createEvent(this, "formLoading", 7);
584
- this.errorEvent = createEvent(this, "error-event", 7);
585
- this.fetchData = async () => {
586
- this.formLoading.emit(true);
587
- try {
588
- const response = await this.api.get(this.businessEndpoint);
589
- this.acceptedTermsBefore = response.data.terms_conditions_accepted;
590
- }
591
- catch (error) {
592
- this.errorEvent.emit({
593
- errorCode: ComponentErrorCodes.FETCH_ERROR,
594
- message: error.message,
595
- severity: ComponentErrorSeverity.ERROR,
596
- data: error,
597
- });
598
- }
599
- finally {
600
- this.formLoading.emit(false);
601
- }
602
- };
603
- this.sendData = async (onSuccess) => {
604
- this.formLoading.emit(true);
605
- try {
606
- const payload = JSON.stringify(this.termsPayload);
607
- const response = await this.api.post(this.termsConditionsEndpoint, payload);
608
- this.handleResponse(response, onSuccess);
609
- }
610
- catch (error) {
611
- this.errorEvent.emit({
612
- errorCode: ComponentErrorCodes.POST_ERROR,
613
- message: error.message,
614
- severity: ComponentErrorSeverity.ERROR,
615
- data: error,
616
- });
617
- }
618
- finally {
619
- this.formLoading.emit(false);
620
- }
621
- };
622
- this.inputHandler = (name, value) => {
623
- this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
624
- };
625
- this.formController = undefined;
626
- this.errors = {};
627
- this.acceptedTermsBefore = undefined;
628
- this.authToken = undefined;
629
- this.businessId = undefined;
630
- this.allowOptionalFields = undefined;
631
- }
632
- get businessEndpoint() {
633
- return `entities/business/${this.businessId}`;
634
- }
635
- get termsConditionsEndpoint() {
636
- return 'entities/terms_and_conditions';
637
- }
638
- get formHelperText() {
639
- return this.acceptedTermsBefore ? 'You have already accepted the terms and conditions.' : null;
640
- }
641
- get termsPayload() {
642
- return {
643
- business_id: this.businessId,
644
- accepted: this.formController.values.getValue().accepted,
645
- user_agent: window.navigator.userAgent
646
- };
647
- }
648
- async componentWillLoad() {
649
- this.api = Api({ authToken: this.authToken, apiOrigin: "" });
650
- this.formController = new FormController(businessTermsConditionsSchema(this.allowOptionalFields));
651
- if (this.businessId && this.authToken) {
652
- this.fetchData();
653
- }
654
- }
655
- handleResponse(response, onSuccess) {
656
- if (response.error) {
657
- this.errorEvent.emit({
658
- errorCode: ComponentErrorCodes.POST_ERROR,
659
- message: response.error.message,
660
- severity: ComponentErrorSeverity.ERROR,
661
- data: response.error,
662
- });
663
- }
664
- else {
665
- onSuccess();
666
- }
667
- this.submitted.emit({ data: response, metadata: { completedStep: BusinessFormStep.termsAndConditions } });
668
- }
669
- async validateAndSubmit({ onSuccess }) {
670
- if (this.acceptedTermsBefore) {
671
- this.submitted.emit({ metadata: { completedStep: BusinessFormStep.termsAndConditions } });
672
- onSuccess();
673
- }
674
- else {
675
- this.formController.validateAndSubmit(() => this.sendData(onSuccess));
676
- }
677
- }
678
- ;
679
- componentDidLoad() {
680
- this.formController.errors.subscribe(errors => {
681
- this.errors = Object.assign({}, errors);
682
- });
683
- }
684
- render() {
685
- return (h("form", { key: 'e7eb6730d5b975ae91057a5218ed062a23d3f0ef' }, h("fieldset", { key: '9dc69375e2c988dc11c4e76f757bde1fe18febea' }, h("legend", { key: '0202cf805071e011f0c087f244c0a43191632b7c' }, "Terms and Conditions"), h("hr", { key: 'a38e7b058d4269406c929abf4f57ddcdc16aa4fd' }), h("justifi-business-terms-conditions-text", { key: '8b87b016198c87c3c52c3e280353489573aff90c' }), h("br", { key: '6c7107e3975a40e44ba4375025ebea0e811630fe' }), h("div", { key: '3667f0455c95bc0d22472598eb2ca3cd7093b9d5', class: "row-gy-3" }, h("div", { key: '1169946dc47b48cd2f8f1a2adfa9ff9b149447f1', class: "col-12" }, h("form-control-checkbox", { key: '66942238443b1e27bb3902ddeba0f6fce973b319', name: "accepted", label: "I agree to the terms and conditions", inputHandler: this.inputHandler, errorText: this.errors.accepted, disabled: this.acceptedTermsBefore, helpText: this.formHelperText }))))));
686
- }
687
- };
688
-
689
- const LegalAddressFormStep = class {
690
- constructor(hostRef) {
691
- registerInstance(this, hostRef);
692
- this.errorEvent = createEvent(this, "error-event", 7);
693
- this.getBusiness = undefined;
694
- this.patchBusiness = undefined;
695
- this.authToken = undefined;
696
- this.businessId = undefined;
697
- this.allowOptionalFields = undefined;
698
- }
699
- propChanged() {
700
- this.initializeApi();
701
- }
702
- async validateAndSubmit({ onSuccess }) {
703
- this.coreComponent.validateAndSubmit({ onSuccess });
704
- }
705
- componentWillLoad() {
706
- this.initializeApi();
707
- }
708
- initializeApi() {
709
- if (this.authToken && this.businessId) {
710
- this.getBusiness = makeGetBusiness({
711
- authToken: this.authToken,
712
- businessId: this.businessId,
713
- service: new BusinessService()
714
- });
715
- this.patchBusiness = makePatchBusiness({
716
- authToken: this.authToken,
717
- businessId: this.businessId,
718
- service: new BusinessService()
719
- });
720
- }
721
- else {
722
- this.errorEvent.emit({
723
- message: 'Missing required props',
724
- errorCode: ComponentErrorCodes.MISSING_PROPS,
725
- severity: ComponentErrorSeverity.ERROR,
726
- });
727
- }
728
- }
729
- render() {
730
- return (h("justifi-legal-address-form-step-core", { key: '7455b4950e2ca1121004943ad81537c583438738', getBusiness: this.getBusiness, patchBusiness: this.patchBusiness, allowOptionalFields: this.allowOptionalFields, ref: el => this.coreComponent = el }));
731
- }
732
- static get watchers() { return {
733
- "authToken": ["propChanged"],
734
- "businessId": ["propChanged"]
735
- }; }
736
- };
737
-
738
- const PaymentProvisioningFormButtons = class {
739
- constructor(hostRef) {
740
- registerInstance(this, hostRef);
741
- this.currentStep = undefined;
742
- this.totalSteps = undefined;
743
- this.formLoading = undefined;
744
- this.formDisabled = undefined;
745
- this.previousStepButtonOnClick = undefined;
746
- this.nextStepButtonOnClick = undefined;
747
- }
748
- get showPreviousStepButton() {
749
- return this.currentStep > 0;
750
- }
751
- get showNextStepButton() {
752
- return this.currentStep < this.totalSteps;
753
- }
754
- get showSubmitButton() {
755
- return this.currentStep === this.totalSteps;
756
- }
757
- render() {
758
- return (h("div", { key: '3df3796f2bb35819373564c0002e35d14c85e360', class: 'd-flex gap-2' }, h(Button, { key: '3f8fd4e288b2eed6776c77b44dda816e8a0580cd', variant: "secondary", type: "button", onClick: () => this.previousStepButtonOnClick(), disabled: this.formDisabled, hidden: !this.showPreviousStepButton }, "Previous"), h(Button, { key: '83c7d2405d6e4f88f721a95250aa847a6999a211', variant: "primary", type: "button", onClick: (e) => this.nextStepButtonOnClick(e, BusinessFormClickActions.nextStep), disabled: this.formDisabled, isLoading: this.formLoading, hidden: !this.showNextStepButton }, "Next"), h(Button, { key: 'd87bcdc9bea52b11307e31bd1d99636be05d7156', variant: "primary", type: "submit", onClick: (e) => this.nextStepButtonOnClick(e, BusinessFormClickActions.submit), disabled: this.formDisabled, isLoading: this.formLoading, hidden: !this.showSubmitButton }, "Submit")));
759
- }
760
- };
761
-
762
- const PaymentProvisioningFormSteps = class {
763
- constructor(hostRef) {
764
- registerInstance(this, hostRef);
765
- this.formCompleted = createEvent(this, "formCompleted", 7);
766
- this.componentStepMapping = {
767
- 0: () => h("justifi-business-core-info-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[0] = el, allowOptionalFields: this.allowOptionalFields }),
768
- 1: () => h("justifi-legal-address-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[1] = el, allowOptionalFields: this.allowOptionalFields }),
769
- 2: () => h("justifi-additional-questions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[2] = el, allowOptionalFields: this.allowOptionalFields }),
770
- 3: () => h("justifi-business-representative-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[3] = el, allowOptionalFields: this.allowOptionalFields }),
771
- 4: () => h("justifi-business-owners-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[4] = el, allowOptionalFields: this.allowOptionalFields }),
772
- 5: () => h("justifi-business-bank-account-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[5] = el, onFormLoading: this.handleFormLoading, allowOptionalFields: this.allowOptionalFields }),
773
- 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 }),
774
- 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, onSubmitted: () => this.formCompleted.emit() }),
775
- };
776
- this.businessId = undefined;
777
- this.authToken = undefined;
778
- this.refs = undefined;
779
- this.currentStep = undefined;
780
- this.allowOptionalFields = false;
781
- this.handleFormLoading = undefined;
782
- }
783
- get currentStepComponent() {
784
- return this.componentStepMapping[this.currentStep]();
785
- }
786
- render() {
787
- return (h("div", { key: '8f02aa3223e38cda70319c127f60e5d2f3c5abe5', class: 'col-12 mb-4' }, this.currentStepComponent));
788
- }
789
- };
790
-
791
- export { AdditionalQuestionsFormStep as justifi_additional_questions_form_step, BusinessBankAccountFormStep as justifi_business_bank_account_form_step, BusinessCoreInfoFormStep as justifi_business_core_info_form_step, BusinessDocumentFormStep as justifi_business_document_upload_form_step, BusinessOwnersFormStep as justifi_business_owners_form_step, BusinessRepresentativeFormStep as justifi_business_representative_form_step, BusinessTermsConditionsFormStep as justifi_business_terms_conditions_form_step, LegalAddressFormStep as justifi_legal_address_form_step, PaymentProvisioningFormButtons as justifi_payment_provisioning_form_buttons, PaymentProvisioningFormSteps as justifi_payment_provisioning_form_steps };