@justifi/webcomponents 4.6.4 → 4.7.0-rc.1

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 (688) hide show
  1. package/dist/cjs/{Api-f76b337f.js → Api-548eaa62.js} +3 -17
  2. package/dist/cjs/Api-548eaa62.js.map +1 -0
  3. package/dist/cjs/Pagination-cae1dcbd.js +15 -0
  4. package/dist/cjs/Pagination-cae1dcbd.js.map +1 -0
  5. package/dist/cjs/{Payout-4906a445.js → Payout-68a99ee3.js} +22 -1
  6. package/dist/cjs/Payout-68a99ee3.js.map +1 -0
  7. package/dist/cjs/SubAccount-f47c8522.js +109 -0
  8. package/dist/cjs/SubAccount-f47c8522.js.map +1 -0
  9. package/dist/cjs/additional-questions-details_5.cjs.entry.js +84 -0
  10. package/dist/cjs/additional-questions-details_5.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{business-form-schema-725ec6f5.js → business-form-schema-fe831c30.js} +2 -2
  12. package/dist/cjs/business-form-schema-fe831c30.js.map +1 -0
  13. package/dist/cjs/config-70f62990.js +19 -0
  14. package/dist/cjs/config-70f62990.js.map +1 -0
  15. package/dist/cjs/form-1e732a9d.js +731 -0
  16. package/dist/cjs/form-1e732a9d.js.map +1 -0
  17. package/dist/cjs/form-control-datepart_2.cjs.entry.js +44 -20
  18. package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -1
  19. package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
  20. package/dist/cjs/form-control-number_3.cjs.entry.js +17 -32
  21. package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -1
  22. package/dist/cjs/helpers-c505d861.js +28 -0
  23. package/dist/cjs/helpers-c505d861.js.map +1 -0
  24. package/dist/cjs/{index-3533152c.js → index-c5ace247.js} +8 -1
  25. package/dist/cjs/index-c5ace247.js.map +1 -0
  26. package/dist/cjs/{index.esm-84a0a7a8.js → index.esm-91ec051e.js} +123 -1
  27. package/dist/cjs/index.esm-91ec051e.js.map +1 -0
  28. package/dist/cjs/{justifi-additional-questions_5.cjs.entry.js → justifi-additional-questions_6.cjs.entry.js} +41 -16
  29. package/dist/cjs/justifi-additional-questions_6.cjs.entry.js.map +1 -0
  30. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
  31. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
  32. package/dist/cjs/justifi-business-details.cjs.entry.js +77 -0
  33. package/dist/cjs/justifi-business-details.cjs.entry.js.map +1 -0
  34. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +131 -0
  35. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js.map +1 -0
  36. package/dist/cjs/justifi-business-form.cjs.entry.js +13 -756
  37. package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
  38. package/dist/cjs/justifi-business-list.cjs.entry.js +38 -67
  39. package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -1
  40. package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
  41. package/dist/cjs/justifi-details.cjs.entry.js +4 -8
  42. package/dist/cjs/justifi-details.cjs.entry.js.map +1 -1
  43. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11029 -0
  44. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js.map +1 -0
  45. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +88 -0
  46. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js.map +1 -0
  47. package/dist/cjs/justifi-payment-details.cjs.entry.js +9 -9
  48. package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -1
  49. package/dist/cjs/justifi-payment-form.cjs.entry.js +4 -3
  50. package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
  51. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +12 -10
  52. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
  53. package/dist/cjs/justifi-payments-list.cjs.entry.js +23 -17
  54. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
  55. package/dist/cjs/justifi-payout-details.cjs.entry.js +9 -7
  56. package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -1
  57. package/dist/cjs/justifi-payouts-list.cjs.entry.js +24 -18
  58. package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
  59. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +24 -18
  60. package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -1
  61. package/dist/cjs/justifi-refund-form.cjs.entry.js +105 -0
  62. package/dist/cjs/justifi-refund-form.cjs.entry.js.map +1 -0
  63. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +82 -0
  64. package/dist/cjs/justifi-subaccount-details.cjs.entry.js.map +1 -0
  65. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +105 -0
  66. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js.map +1 -0
  67. package/dist/cjs/justifi-table_2.cjs.entry.js +80 -0
  68. package/dist/cjs/justifi-table_2.cjs.entry.js.map +1 -0
  69. package/dist/cjs/loader.cjs.js +2 -2
  70. package/dist/cjs/select-input_2.cjs.entry.js +1 -1
  71. package/dist/cjs/subaccount-account-details_4.cjs.entry.js +72 -0
  72. package/dist/cjs/subaccount-account-details_4.cjs.entry.js.map +1 -0
  73. package/dist/cjs/subaccount-bank-details.cjs.entry.js +24 -0
  74. package/dist/cjs/subaccount-bank-details.cjs.entry.js.map +1 -0
  75. package/dist/cjs/subaccount-terms-details.cjs.entry.js +24 -0
  76. package/dist/cjs/subaccount-terms-details.cjs.entry.js.map +1 -0
  77. package/dist/cjs/{utils-0fd61dbd.js → utils-13d069be.js} +96 -18
  78. package/dist/cjs/utils-13d069be.js.map +1 -0
  79. package/dist/cjs/utils-4622829d.js +37 -0
  80. package/dist/cjs/utils-4622829d.js.map +1 -0
  81. package/dist/cjs/webcomponents.cjs.js +2 -2
  82. package/dist/collection/api/Api.js +2 -16
  83. package/dist/collection/api/Api.js.map +1 -1
  84. package/dist/collection/api/Business.js +0 -2
  85. package/dist/collection/api/Business.js.map +1 -1
  86. package/dist/collection/api/GrossVolume.js +2 -0
  87. package/dist/collection/api/GrossVolume.js.map +1 -0
  88. package/dist/collection/api/Pagination.js +8 -8
  89. package/dist/collection/api/Pagination.js.map +1 -1
  90. package/dist/collection/api/Payment.js +20 -0
  91. package/dist/collection/api/Payment.js.map +1 -1
  92. package/dist/collection/api/SubAccount.js +104 -0
  93. package/dist/collection/api/SubAccount.js.map +1 -0
  94. package/dist/collection/api/mockData/MockOnboardingData.js +118 -0
  95. package/dist/collection/api/mockData/MockOnboardingData.js.map +1 -0
  96. package/dist/collection/api/mockData/MockSubAccount.js +103 -0
  97. package/dist/collection/api/mockData/MockSubAccount.js.map +1 -0
  98. package/dist/collection/api/mockData/mockGrossVolumeReport.js +126 -0
  99. package/dist/collection/api/mockData/mockGrossVolumeReport.js.map +1 -0
  100. package/dist/collection/assets/info-icon.svg +5 -0
  101. package/dist/collection/collection-manifest.json +20 -1
  102. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +2 -9
  103. package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
  104. package/dist/collection/components/billing-form/billing-form.stories.js +1 -1
  105. package/dist/collection/components/billing-form/billing-form.stories.js.map +1 -1
  106. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +7341 -0
  107. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +57 -0
  108. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js.map +1 -0
  109. package/dist/collection/components/business-details/business-details.css +6439 -0
  110. package/dist/collection/components/business-details/business-details.js +128 -0
  111. package/dist/collection/components/business-details/business-details.js.map +1 -0
  112. package/dist/collection/components/business-details/business-details.stories.js +24 -0
  113. package/dist/collection/components/business-details/business-details.stories.js.map +1 -0
  114. package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +7341 -0
  115. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +50 -0
  116. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js.map +1 -0
  117. package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +7341 -0
  118. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +49 -0
  119. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js.map +1 -0
  120. package/dist/collection/components/business-details/owner-details/owner-details.css +7341 -0
  121. package/dist/collection/components/business-details/owner-details/owner-details.js +57 -0
  122. package/dist/collection/components/business-details/owner-details/owner-details.js.map +1 -0
  123. package/dist/collection/components/business-details/representative-details/representative-details.css +7341 -0
  124. package/dist/collection/components/business-details/representative-details/representative-details.js +58 -0
  125. package/dist/collection/components/business-details/representative-details/representative-details.js.map +1 -0
  126. package/dist/collection/components/business-form/additional-questions/additional-questions.js +1 -1
  127. package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -1
  128. package/dist/collection/components/business-form/business-form-schema.js +1 -1
  129. package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
  130. package/dist/collection/components/business-form/business-form-stepped.css +7929 -0
  131. package/dist/collection/components/business-form/business-form-stepped.js +195 -0
  132. package/dist/collection/components/business-form/business-form-stepped.js.map +1 -0
  133. package/dist/collection/components/business-form/business-form-stepped.stories.js +132 -0
  134. package/dist/collection/components/business-form/business-form-stepped.stories.js.map +1 -0
  135. package/dist/collection/components/business-form/business-form.js +5 -24
  136. package/dist/collection/components/business-form/business-form.js.map +1 -1
  137. package/dist/collection/components/business-form/business-form.stories.js +21 -8
  138. package/dist/collection/components/business-form/business-form.stories.js.map +1 -1
  139. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +7 -5
  140. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
  141. package/dist/collection/components/business-form/business-owners/business-owners.js +4 -5
  142. package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
  143. package/dist/collection/components/business-form/business-representative/business-representative-schema.js.map +1 -1
  144. package/dist/collection/components/business-form/business-representative/business-representative.js +1 -1
  145. package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
  146. package/dist/collection/components/business-form/helpers.js +23 -0
  147. package/dist/collection/components/business-form/helpers.js.map +1 -0
  148. package/dist/collection/components/business-form/legal-address-form/legal-address-form-schema.js.map +1 -0
  149. package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.js +3 -21
  150. package/dist/collection/components/business-form/legal-address-form/legal-address-form.js.map +1 -0
  151. package/dist/collection/components/business-list/business-list.js +72 -84
  152. package/dist/collection/components/business-list/business-list.js.map +1 -1
  153. package/dist/collection/components/business-list/business-list.stories.js +3 -2
  154. package/dist/collection/components/business-list/business-list.stories.js.map +1 -1
  155. package/dist/collection/components/card-form/card-form.stories.js +2 -9
  156. package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
  157. package/dist/collection/components/details/details.js +2 -21
  158. package/dist/collection/components/details/details.js.map +1 -1
  159. package/dist/collection/components/details/utils.js +7 -8
  160. package/dist/collection/components/details/utils.js.map +1 -1
  161. package/dist/collection/components/form/form-control-number-masked.js +1 -1
  162. package/dist/collection/components/form/form-control-number-masked.js.map +1 -1
  163. package/dist/collection/components/form/form.js +4 -4
  164. package/dist/collection/components/form/form.js.map +1 -1
  165. package/dist/collection/components/gross-payment-chart/chart-utils.js +59 -0
  166. package/dist/collection/components/gross-payment-chart/chart-utils.js.map +1 -0
  167. package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +572 -0
  168. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +127 -0
  169. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js.map +1 -0
  170. package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js +22 -0
  171. package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js.map +1 -0
  172. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +15 -0
  173. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js.map +1 -0
  174. package/dist/collection/components/pagination-menu/pagination-menu.js +78 -0
  175. package/dist/collection/components/pagination-menu/pagination-menu.js.map +1 -0
  176. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.css +0 -0
  177. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +153 -0
  178. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js.map +1 -0
  179. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js +32 -0
  180. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js.map +1 -0
  181. package/dist/collection/components/payment-details/payment-details.js +12 -6
  182. package/dist/collection/components/payment-details/payment-details.js.map +1 -1
  183. package/dist/collection/components/payment-details/payment-details.stories.js +4 -4
  184. package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -1
  185. package/dist/collection/components/payment-form/payment-form.stories.js +3 -11
  186. package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
  187. package/dist/collection/components/payment-method-form/payment-method-form.js +7 -6
  188. package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
  189. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +15 -14
  190. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
  191. package/dist/collection/components/payments-list/payments-list.js +21 -13
  192. package/dist/collection/components/payments-list/payments-list.js.map +1 -1
  193. package/dist/collection/components/payments-list/payments-list.stories.js +4 -4
  194. package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
  195. package/dist/collection/components/payout-details/payout-details.js +12 -3
  196. package/dist/collection/components/payout-details/payout-details.js.map +1 -1
  197. package/dist/collection/components/payout-details/payout-details.stories.js +4 -4
  198. package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -1
  199. package/dist/collection/components/payouts-list/payouts-list.js +22 -14
  200. package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
  201. package/dist/collection/components/payouts-list/payouts-list.stories.js +4 -4
  202. package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
  203. package/dist/collection/components/proceeds-list/proceeds-list.js +22 -14
  204. package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -1
  205. package/dist/collection/components/proceeds-list/proceeds-list.stories.js +3 -2
  206. package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -1
  207. package/dist/collection/components/refund-form/refund-form-schema.js +14 -0
  208. package/dist/collection/components/refund-form/refund-form-schema.js.map +1 -0
  209. package/dist/collection/components/refund-form/refund-form.css +7785 -0
  210. package/dist/collection/components/refund-form/refund-form.js +229 -0
  211. package/dist/collection/components/refund-form/refund-form.js.map +1 -0
  212. package/dist/collection/components/refund-form/refund-form.stories.js +169 -0
  213. package/dist/collection/components/refund-form/refund-form.stories.js.map +1 -0
  214. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +7345 -0
  215. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +71 -0
  216. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js.map +1 -0
  217. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +7345 -0
  218. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +49 -0
  219. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js.map +1 -0
  220. package/dist/collection/components/subaccount-details/subaccount-details.css +7983 -0
  221. package/dist/collection/components/subaccount-details/subaccount-details.js +148 -0
  222. package/dist/collection/components/subaccount-details/subaccount-details.js.map +1 -0
  223. package/dist/collection/components/subaccount-details/subaccount-details.stories.js +26 -0
  224. package/dist/collection/components/subaccount-details/subaccount-details.stories.js.map +1 -0
  225. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +7345 -0
  226. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +51 -0
  227. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js.map +1 -0
  228. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +7345 -0
  229. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +49 -0
  230. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js.map +1 -0
  231. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +7345 -0
  232. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +50 -0
  233. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js.map +1 -0
  234. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +7345 -0
  235. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +49 -0
  236. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js.map +1 -0
  237. package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js +22 -0
  238. package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js.map +1 -0
  239. package/dist/collection/components/subaccounts-list/subaccounts-list.css +3 -0
  240. package/dist/collection/components/subaccounts-list/subaccounts-list.js +180 -0
  241. package/dist/collection/components/subaccounts-list/subaccounts-list.js.map +1 -0
  242. package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +70 -0
  243. package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js.map +1 -0
  244. package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js +10 -0
  245. package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js.map +1 -0
  246. package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js +34 -0
  247. package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js.map +1 -0
  248. package/dist/collection/components/table/table.js +27 -12
  249. package/dist/collection/components/table/table.js.map +1 -1
  250. package/dist/collection/components/table/test/table.spec.js +2 -2
  251. package/dist/collection/components/table/test/table.spec.js.map +1 -1
  252. package/dist/collection/utils/utils.js +95 -17
  253. package/dist/collection/utils/utils.js.map +1 -1
  254. package/dist/components/Api.js +2 -16
  255. package/dist/components/Api.js.map +1 -1
  256. package/dist/components/Pagination.js +12 -0
  257. package/dist/components/Pagination.js.map +1 -0
  258. package/dist/components/Payout.js +21 -1
  259. package/dist/components/Payout.js.map +1 -1
  260. package/dist/components/SubAccount.js +107 -0
  261. package/dist/components/SubAccount.js.map +1 -0
  262. package/dist/components/additional-questions-details.d.ts +11 -0
  263. package/dist/components/additional-questions-details.js +8 -0
  264. package/dist/components/additional-questions-details.js.map +1 -0
  265. package/dist/{cjs/justifi-table.cjs.entry.js → components/additional-questions-details2.js} +30 -61
  266. package/dist/components/additional-questions-details2.js.map +1 -0
  267. package/dist/components/additional-questions.js +1 -1
  268. package/dist/components/additional-questions.js.map +1 -1
  269. package/dist/components/business-generic-info.js +2 -5
  270. package/dist/components/business-generic-info.js.map +1 -1
  271. package/dist/components/business-owners.js +4 -5
  272. package/dist/components/business-owners.js.map +1 -1
  273. package/dist/components/business-representative.js +1 -1
  274. package/dist/components/business-representative.js.map +1 -1
  275. package/dist/components/config.js +17 -0
  276. package/dist/components/config.js.map +1 -0
  277. package/dist/components/details.js +6 -33
  278. package/dist/components/details.js.map +1 -1
  279. package/dist/components/form-control-number-masked2.js +1 -1
  280. package/dist/components/form-control-number-masked2.js.map +1 -1
  281. package/dist/components/form.js +729 -0
  282. package/dist/components/form.js.map +1 -0
  283. package/dist/components/generic-info-details.d.ts +11 -0
  284. package/dist/components/generic-info-details.js +8 -0
  285. package/dist/components/generic-info-details.js.map +1 -0
  286. package/dist/components/generic-info-details2.js +38 -0
  287. package/dist/components/generic-info-details2.js.map +1 -0
  288. package/dist/components/helpers.js +26 -0
  289. package/dist/components/helpers.js.map +1 -0
  290. package/dist/components/index.esm.js +122 -1
  291. package/dist/components/index.esm.js.map +1 -1
  292. package/dist/components/justifi-business-details.d.ts +11 -0
  293. package/dist/components/justifi-business-details.js +127 -0
  294. package/dist/components/justifi-business-details.js.map +1 -0
  295. package/dist/components/justifi-business-form-stepped.d.ts +11 -0
  296. package/dist/components/justifi-business-form-stepped.js +222 -0
  297. package/dist/components/justifi-business-form-stepped.js.map +1 -0
  298. package/dist/components/justifi-business-form.js +7 -750
  299. package/dist/components/justifi-business-form.js.map +1 -1
  300. package/dist/components/justifi-business-list.js +44 -65
  301. package/dist/components/justifi-business-list.js.map +1 -1
  302. package/dist/components/justifi-gross-payment-chart.d.ts +11 -0
  303. package/dist/components/justifi-gross-payment-chart.js +11052 -0
  304. package/dist/components/justifi-gross-payment-chart.js.map +1 -0
  305. package/dist/components/justifi-payment-balance-transactions.d.ts +11 -0
  306. package/dist/components/justifi-payment-balance-transactions.js +123 -0
  307. package/dist/components/justifi-payment-balance-transactions.js.map +1 -0
  308. package/dist/components/justifi-payment-details.js +7 -6
  309. package/dist/components/justifi-payment-details.js.map +1 -1
  310. package/dist/components/justifi-payment-form.js +3 -2
  311. package/dist/components/justifi-payment-form.js.map +1 -1
  312. package/dist/components/justifi-payments-list.js +30 -16
  313. package/dist/components/justifi-payments-list.js.map +1 -1
  314. package/dist/components/justifi-payout-details.js +7 -4
  315. package/dist/components/justifi-payout-details.js.map +1 -1
  316. package/dist/components/justifi-payouts-list.js +31 -17
  317. package/dist/components/justifi-payouts-list.js.map +1 -1
  318. package/dist/components/justifi-proceeds-list.js +30 -16
  319. package/dist/components/justifi-proceeds-list.js.map +1 -1
  320. package/dist/components/justifi-refund-form.d.ts +11 -0
  321. package/dist/components/justifi-refund-form.js +140 -0
  322. package/dist/components/justifi-refund-form.js.map +1 -0
  323. package/dist/components/justifi-subaccount-details.d.ts +11 -0
  324. package/dist/components/justifi-subaccount-details.js +134 -0
  325. package/dist/components/justifi-subaccount-details.js.map +1 -0
  326. package/dist/components/justifi-subaccounts-list.d.ts +11 -0
  327. package/dist/components/justifi-subaccounts-list.js +139 -0
  328. package/dist/components/justifi-subaccounts-list.js.map +1 -0
  329. package/dist/components/legal-address-details.d.ts +11 -0
  330. package/dist/components/legal-address-details.js +8 -0
  331. package/dist/components/legal-address-details.js.map +1 -0
  332. package/dist/components/legal-address-details2.js +37 -0
  333. package/dist/components/legal-address-details2.js.map +1 -0
  334. package/dist/components/legal-address-form.js +1 -3
  335. package/dist/components/legal-address-form.js.map +1 -1
  336. package/dist/components/owner-details.d.ts +11 -0
  337. package/dist/components/owner-details.js +8 -0
  338. package/dist/components/owner-details.js.map +1 -0
  339. package/dist/components/owner-details2.js +37 -0
  340. package/dist/components/owner-details2.js.map +1 -0
  341. package/dist/components/pagination-menu.d.ts +11 -0
  342. package/dist/components/pagination-menu.js +8 -0
  343. package/dist/components/pagination-menu.js.map +1 -0
  344. package/dist/{esm/justifi-table.entry.js → components/pagination-menu2.js} +35 -55
  345. package/dist/components/pagination-menu2.js.map +1 -0
  346. package/dist/components/payment-method-form.js +11 -9
  347. package/dist/components/payment-method-form.js.map +1 -1
  348. package/dist/components/representative-details.d.ts +11 -0
  349. package/dist/components/representative-details.js +8 -0
  350. package/dist/components/representative-details.js.map +1 -0
  351. package/dist/components/representative-details2.js +38 -0
  352. package/dist/components/representative-details2.js.map +1 -0
  353. package/dist/components/subaccount-account-details.d.ts +11 -0
  354. package/dist/components/subaccount-account-details.js +8 -0
  355. package/dist/components/subaccount-account-details.js.map +1 -0
  356. package/dist/components/subaccount-account-details2.js +39 -0
  357. package/dist/components/subaccount-account-details2.js.map +1 -0
  358. package/dist/components/subaccount-bank-details.d.ts +11 -0
  359. package/dist/components/subaccount-bank-details.js +40 -0
  360. package/dist/components/subaccount-bank-details.js.map +1 -0
  361. package/dist/components/subaccount-merchant-details.d.ts +11 -0
  362. package/dist/components/subaccount-merchant-details.js +8 -0
  363. package/dist/components/subaccount-merchant-details.js.map +1 -0
  364. package/dist/components/subaccount-merchant-details2.js +38 -0
  365. package/dist/components/subaccount-merchant-details2.js.map +1 -0
  366. package/dist/components/subaccount-owners-details.d.ts +11 -0
  367. package/dist/components/subaccount-owners-details.js +8 -0
  368. package/dist/components/subaccount-owners-details.js.map +1 -0
  369. package/dist/components/subaccount-owners-details2.js +38 -0
  370. package/dist/components/subaccount-owners-details2.js.map +1 -0
  371. package/dist/components/subaccount-representative-details.d.ts +11 -0
  372. package/dist/components/subaccount-representative-details.js +8 -0
  373. package/dist/components/subaccount-representative-details.js.map +1 -0
  374. package/dist/components/subaccount-representative-details2.js +38 -0
  375. package/dist/components/subaccount-representative-details2.js.map +1 -0
  376. package/dist/components/subaccount-terms-details.d.ts +11 -0
  377. package/dist/components/subaccount-terms-details.js +40 -0
  378. package/dist/components/subaccount-terms-details.js.map +1 -0
  379. package/dist/components/table.js +12 -21
  380. package/dist/components/table.js.map +1 -1
  381. package/dist/components/utils.js +27 -3909
  382. package/dist/components/utils.js.map +1 -1
  383. package/dist/components/utils2.js +3983 -0
  384. package/dist/components/utils2.js.map +1 -0
  385. package/dist/config.js +12 -4
  386. package/dist/config.js.map +1 -1
  387. package/dist/esm/{Api-cca120a8.js → Api-c65d3ed8.js} +3 -17
  388. package/dist/esm/Api-c65d3ed8.js.map +1 -0
  389. package/dist/esm/Pagination-31f770d6.js +12 -0
  390. package/dist/esm/Pagination-31f770d6.js.map +1 -0
  391. package/dist/esm/{Payout-9a1f2859.js → Payout-fcf16887.js} +22 -2
  392. package/dist/esm/Payout-fcf16887.js.map +1 -0
  393. package/dist/esm/SubAccount-128190e9.js +107 -0
  394. package/dist/esm/SubAccount-128190e9.js.map +1 -0
  395. package/dist/esm/additional-questions-details_5.entry.js +76 -0
  396. package/dist/esm/additional-questions-details_5.entry.js.map +1 -0
  397. package/dist/esm/{business-form-schema-5885d3d6.js → business-form-schema-30a3eadd.js} +2 -2
  398. package/dist/esm/business-form-schema-30a3eadd.js.map +1 -0
  399. package/dist/esm/config-b1976dbd.js +17 -0
  400. package/dist/esm/config-b1976dbd.js.map +1 -0
  401. package/dist/esm/form-32cf3d1e.js +729 -0
  402. package/dist/esm/form-32cf3d1e.js.map +1 -0
  403. package/dist/esm/form-control-datepart_2.entry.js +44 -20
  404. package/dist/esm/form-control-datepart_2.entry.js.map +1 -1
  405. package/dist/esm/form-control-monetary.entry.js +1 -1
  406. package/dist/esm/form-control-number_3.entry.js +17 -32
  407. package/dist/esm/form-control-number_3.entry.js.map +1 -1
  408. package/dist/esm/helpers-1d5ecdc8.js +26 -0
  409. package/dist/esm/helpers-1d5ecdc8.js.map +1 -0
  410. package/dist/esm/{index-fe877d03.js → index-7471ed60.js} +8 -1
  411. package/dist/esm/index-7471ed60.js.map +1 -0
  412. package/dist/esm/{index.esm-89fe6af9.js → index.esm-9397ffa0.js} +123 -2
  413. package/dist/esm/index.esm-9397ffa0.js.map +1 -0
  414. package/dist/esm/{justifi-additional-questions_5.entry.js → justifi-additional-questions_6.entry.js} +41 -17
  415. package/dist/esm/justifi-additional-questions_6.entry.js.map +1 -0
  416. package/dist/esm/justifi-bank-account-form.entry.js +1 -1
  417. package/dist/esm/justifi-billing-form_2.entry.js +2 -2
  418. package/dist/esm/justifi-business-details.entry.js +73 -0
  419. package/dist/esm/justifi-business-details.entry.js.map +1 -0
  420. package/dist/esm/justifi-business-form-stepped.entry.js +127 -0
  421. package/dist/esm/justifi-business-form-stepped.entry.js.map +1 -0
  422. package/dist/esm/justifi-business-form.entry.js +12 -755
  423. package/dist/esm/justifi-business-form.entry.js.map +1 -1
  424. package/dist/esm/justifi-business-list.entry.js +37 -66
  425. package/dist/esm/justifi-business-list.entry.js.map +1 -1
  426. package/dist/esm/justifi-card-form.entry.js +1 -1
  427. package/dist/esm/justifi-details.entry.js +4 -8
  428. package/dist/esm/justifi-details.entry.js.map +1 -1
  429. package/dist/esm/justifi-gross-payment-chart.entry.js +11025 -0
  430. package/dist/esm/justifi-gross-payment-chart.entry.js.map +1 -0
  431. package/dist/esm/justifi-payment-balance-transactions.entry.js +84 -0
  432. package/dist/esm/justifi-payment-balance-transactions.entry.js.map +1 -0
  433. package/dist/esm/justifi-payment-details.entry.js +9 -9
  434. package/dist/esm/justifi-payment-details.entry.js.map +1 -1
  435. package/dist/esm/justifi-payment-form.entry.js +4 -3
  436. package/dist/esm/justifi-payment-form.entry.js.map +1 -1
  437. package/dist/esm/justifi-payment-method-form.entry.js +12 -10
  438. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
  439. package/dist/esm/justifi-payments-list.entry.js +22 -16
  440. package/dist/esm/justifi-payments-list.entry.js.map +1 -1
  441. package/dist/esm/justifi-payout-details.entry.js +9 -7
  442. package/dist/esm/justifi-payout-details.entry.js.map +1 -1
  443. package/dist/esm/justifi-payouts-list.entry.js +23 -17
  444. package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
  445. package/dist/esm/justifi-proceeds-list.entry.js +23 -17
  446. package/dist/esm/justifi-proceeds-list.entry.js.map +1 -1
  447. package/dist/esm/justifi-refund-form.entry.js +101 -0
  448. package/dist/esm/justifi-refund-form.entry.js.map +1 -0
  449. package/dist/esm/justifi-subaccount-details.entry.js +78 -0
  450. package/dist/esm/justifi-subaccount-details.entry.js.map +1 -0
  451. package/dist/esm/justifi-subaccounts-list.entry.js +101 -0
  452. package/dist/esm/justifi-subaccounts-list.entry.js.map +1 -0
  453. package/dist/esm/justifi-table_2.entry.js +75 -0
  454. package/dist/esm/justifi-table_2.entry.js.map +1 -0
  455. package/dist/esm/loader.js +3 -3
  456. package/dist/esm/select-input_2.entry.js +1 -1
  457. package/dist/esm/subaccount-account-details_4.entry.js +65 -0
  458. package/dist/esm/subaccount-account-details_4.entry.js.map +1 -0
  459. package/dist/esm/subaccount-bank-details.entry.js +20 -0
  460. package/dist/esm/subaccount-bank-details.entry.js.map +1 -0
  461. package/dist/esm/subaccount-terms-details.entry.js +20 -0
  462. package/dist/esm/subaccount-terms-details.entry.js.map +1 -0
  463. package/dist/esm/{utils-ad0bbe03.js → utils-40b7002c.js} +91 -19
  464. package/dist/esm/utils-40b7002c.js.map +1 -0
  465. package/dist/esm/utils-6352c002.js +29 -0
  466. package/dist/esm/utils-6352c002.js.map +1 -0
  467. package/dist/esm/webcomponents.js +3 -3
  468. package/dist/types/api/Api.d.ts +4 -4
  469. package/dist/types/api/Business.d.ts +12 -4
  470. package/dist/types/api/GrossVolume.d.ts +8 -0
  471. package/dist/types/api/Pagination.d.ts +12 -6
  472. package/dist/types/api/Payment.d.ts +28 -0
  473. package/dist/types/api/SubAccount.d.ts +165 -0
  474. package/dist/types/api/mockData/MockOnboardingData.d.ts +8 -0
  475. package/dist/types/api/mockData/MockSubAccount.d.ts +3 -0
  476. package/dist/types/api/mockData/mockGrossVolumeReport.d.ts +7 -0
  477. package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +0 -7
  478. package/dist/types/components/business-details/additional-questions-details/additional-questions-details.d.ts +13 -0
  479. package/dist/types/components/business-details/business-details.d.ts +28 -0
  480. package/dist/types/components/business-details/business-details.stories.d.ts +7 -0
  481. package/dist/types/components/business-details/generic-info-details/generic-info-details.d.ts +5 -0
  482. package/dist/types/components/business-details/legal-address-details/legal-address-details.d.ts +5 -0
  483. package/dist/types/components/business-details/owner-details/owner-details.d.ts +13 -0
  484. package/dist/types/components/business-details/representative-details/representative-details.d.ts +13 -0
  485. package/dist/types/components/business-form/business-form-stepped.d.ts +29 -0
  486. package/dist/types/components/business-form/business-form-stepped.stories.d.ts +27 -0
  487. package/dist/types/components/business-form/business-form.d.ts +0 -1
  488. package/dist/types/components/business-form/business-form.stories.d.ts +6 -0
  489. package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +5 -1
  490. package/dist/types/components/business-form/business-representative/business-representative-schema.d.ts +2 -0
  491. package/dist/types/components/business-form/helpers.d.ts +1 -0
  492. package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.d.ts +1 -2
  493. package/dist/types/components/business-list/business-list.d.ts +34 -21
  494. package/dist/types/components/card-form/card-form.stories.d.ts +0 -7
  495. package/dist/types/components/details/details.d.ts +0 -3
  496. package/dist/types/components/details/utils.d.ts +5 -2
  497. package/dist/types/components/form/form.d.ts +1 -1
  498. package/dist/types/components/gross-payment-chart/chart-utils.d.ts +45 -0
  499. package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +20 -0
  500. package/dist/types/components/gross-payment-chart/gross-payment-chart.stories.d.ts +7 -0
  501. package/dist/types/components/pagination-menu/pagination-menu.d.ts +10 -0
  502. package/dist/types/components/payment-balance-transactions/payment-balance-transactions.d.ts +17 -0
  503. package/dist/types/components/payment-balance-transactions/payment-balance-transactions.stories.d.ts +8 -0
  504. package/dist/types/components/payment-details/payment-details.d.ts +8 -0
  505. package/dist/types/components/payment-form/payment-form.stories.d.ts +1 -9
  506. package/dist/types/components/payments-list/payments-list.d.ts +5 -4
  507. package/dist/types/components/payout-details/payout-details.d.ts +8 -0
  508. package/dist/types/components/payouts-list/payouts-list.d.ts +5 -4
  509. package/dist/types/components/proceeds-list/proceeds-list.d.ts +5 -3
  510. package/dist/types/components/refund-form/refund-form-schema.d.ts +11 -0
  511. package/dist/types/components/refund-form/refund-form.d.ts +58 -0
  512. package/dist/types/components/refund-form/refund-form.stories.d.ts +27 -0
  513. package/dist/types/components/subaccount-details/subaccount-account-details/subaccount-account-details.d.ts +6 -0
  514. package/dist/types/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.d.ts +5 -0
  515. package/dist/types/components/subaccount-details/subaccount-details.d.ts +16 -0
  516. package/dist/types/components/subaccount-details/subaccount-details.stories.d.ts +7 -0
  517. package/dist/types/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.d.ts +5 -0
  518. package/dist/types/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.d.ts +5 -0
  519. package/dist/types/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.d.ts +5 -0
  520. package/dist/types/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.d.ts +5 -0
  521. package/dist/types/components/subaccounts-list/subaccounts-list.d.ts +19 -0
  522. package/dist/types/components/subaccounts-list/subaccounts-list.stories.d.ts +9 -0
  523. package/dist/types/components/table/table.d.ts +3 -7
  524. package/dist/types/components.d.ts +619 -7
  525. package/dist/types/home/runner/work/web-component-library/web-component-library/stencil-library/.stencil/config.d.ts +12 -4
  526. package/dist/types/utils/utils.d.ts +19 -0
  527. package/dist/webcomponents/p-0d5d02d7.js +2 -0
  528. package/dist/webcomponents/p-0d5d02d7.js.map +1 -0
  529. package/dist/webcomponents/p-0e9a7fa7.entry.js +2 -0
  530. package/dist/webcomponents/p-0e9a7fa7.entry.js.map +1 -0
  531. package/dist/webcomponents/p-1920e118.entry.js +2 -0
  532. package/dist/webcomponents/p-1920e118.entry.js.map +1 -0
  533. package/dist/webcomponents/p-215b4c87.entry.js +2 -0
  534. package/dist/webcomponents/{p-f6cc37a6.entry.js.map → p-215b4c87.entry.js.map} +1 -1
  535. package/dist/webcomponents/p-222d357c.entry.js +20 -0
  536. package/dist/webcomponents/p-222d357c.entry.js.map +1 -0
  537. package/dist/webcomponents/{p-d92116e6.entry.js → p-2cd29187.entry.js} +2 -2
  538. package/dist/webcomponents/p-301a23aa.js +2 -0
  539. package/dist/webcomponents/p-301a23aa.js.map +1 -0
  540. package/dist/webcomponents/p-355eabff.entry.js +2 -0
  541. package/dist/webcomponents/p-355eabff.entry.js.map +1 -0
  542. package/dist/webcomponents/{p-640bfa9f.entry.js → p-356cf20d.entry.js} +2 -2
  543. package/dist/webcomponents/p-397e0d5a.entry.js +2 -0
  544. package/dist/webcomponents/p-397e0d5a.entry.js.map +1 -0
  545. package/dist/webcomponents/p-491d5c69.entry.js +2 -0
  546. package/dist/webcomponents/p-491d5c69.entry.js.map +1 -0
  547. package/dist/webcomponents/p-526cb161.js +2 -0
  548. package/dist/webcomponents/p-526cb161.js.map +1 -0
  549. package/dist/webcomponents/{p-f9e127a5.js → p-59860ac8.js} +2 -2
  550. package/dist/webcomponents/p-59860ac8.js.map +1 -0
  551. package/dist/webcomponents/p-62872b87.entry.js +2 -0
  552. package/dist/webcomponents/p-62872b87.entry.js.map +1 -0
  553. package/dist/webcomponents/p-635a3b3e.entry.js +2 -0
  554. package/dist/webcomponents/p-635a3b3e.entry.js.map +1 -0
  555. package/dist/webcomponents/p-64184a0c.entry.js +2 -0
  556. package/dist/webcomponents/p-64184a0c.entry.js.map +1 -0
  557. package/dist/webcomponents/p-6c3236e8.entry.js +2 -0
  558. package/dist/webcomponents/p-6c3236e8.entry.js.map +1 -0
  559. package/dist/webcomponents/p-76983a7e.js +2 -0
  560. package/dist/webcomponents/p-76983a7e.js.map +1 -0
  561. package/dist/webcomponents/p-76dffeec.js +2 -0
  562. package/dist/webcomponents/p-76dffeec.js.map +1 -0
  563. package/dist/webcomponents/{p-2b6f5e35.entry.js → p-77e732b2.entry.js} +2 -2
  564. package/dist/webcomponents/p-77e732b2.entry.js.map +1 -0
  565. package/dist/webcomponents/p-798483dd.entry.js +2 -0
  566. package/dist/webcomponents/p-798483dd.entry.js.map +1 -0
  567. package/dist/webcomponents/p-7a24ab66.entry.js +2 -0
  568. package/dist/webcomponents/p-7a24ab66.entry.js.map +1 -0
  569. package/dist/webcomponents/p-7cde64a2.entry.js +2 -0
  570. package/dist/webcomponents/{p-9d1c7e6a.entry.js.map → p-7cde64a2.entry.js.map} +1 -1
  571. package/dist/webcomponents/p-7d58db66.js +2 -0
  572. package/dist/webcomponents/p-7d58db66.js.map +1 -0
  573. package/dist/webcomponents/p-8367b46c.entry.js +2 -0
  574. package/dist/webcomponents/p-8367b46c.entry.js.map +1 -0
  575. package/dist/webcomponents/{p-1beaaba3.entry.js → p-88fa33c1.entry.js} +2 -2
  576. package/dist/webcomponents/{p-c46241ba.js → p-8f37e3ee.js} +2 -2
  577. package/dist/webcomponents/p-8f37e3ee.js.map +1 -0
  578. package/dist/webcomponents/p-931989e6.entry.js +2 -0
  579. package/dist/webcomponents/p-931989e6.entry.js.map +1 -0
  580. package/dist/webcomponents/{p-cd0eca25.entry.js → p-96eecdff.entry.js} +2 -2
  581. package/dist/webcomponents/p-988191bf.js +2 -0
  582. package/dist/webcomponents/p-988191bf.js.map +1 -0
  583. package/dist/webcomponents/p-a4c78757.entry.js +2 -0
  584. package/dist/webcomponents/p-a4c78757.entry.js.map +1 -0
  585. package/dist/webcomponents/p-b08a9520.entry.js +2 -0
  586. package/dist/webcomponents/p-b08a9520.entry.js.map +1 -0
  587. package/dist/webcomponents/p-b157f6ae.js +2 -0
  588. package/dist/webcomponents/p-b157f6ae.js.map +1 -0
  589. package/dist/webcomponents/p-b45453ea.entry.js +2 -0
  590. package/dist/webcomponents/p-b45453ea.entry.js.map +1 -0
  591. package/dist/webcomponents/p-c2845c5d.entry.js +2 -0
  592. package/dist/webcomponents/p-c2845c5d.entry.js.map +1 -0
  593. package/dist/webcomponents/p-c4289027.entry.js +2 -0
  594. package/dist/webcomponents/p-c4289027.entry.js.map +1 -0
  595. package/dist/webcomponents/p-c43e9572.entry.js +2 -0
  596. package/dist/webcomponents/p-c43e9572.entry.js.map +1 -0
  597. package/dist/webcomponents/p-cbb60191.js +3 -0
  598. package/dist/webcomponents/p-cbb60191.js.map +1 -0
  599. package/dist/webcomponents/{p-26392ae3.entry.js → p-d40718da.entry.js} +2 -2
  600. package/dist/webcomponents/p-d40718da.entry.js.map +1 -0
  601. package/dist/webcomponents/{p-9346ae33.js → p-d6b5793d.js} +2 -2
  602. package/dist/webcomponents/p-d6b5793d.js.map +1 -0
  603. package/dist/webcomponents/{p-a922b908.entry.js → p-ec1890fc.entry.js} +2 -2
  604. package/dist/webcomponents/p-ffcbf779.entry.js +2 -0
  605. package/dist/webcomponents/p-ffcbf779.entry.js.map +1 -0
  606. package/dist/webcomponents/webcomponents.esm.js +1 -1
  607. package/dist/webcomponents/webcomponents.esm.js.map +1 -1
  608. package/package.json +8 -7
  609. package/dist/cjs/Api-f76b337f.js.map +0 -1
  610. package/dist/cjs/Payout-4906a445.js.map +0 -1
  611. package/dist/cjs/business-form-schema-725ec6f5.js.map +0 -1
  612. package/dist/cjs/form-control-select.cjs.entry.js +0 -47
  613. package/dist/cjs/form-control-select.cjs.entry.js.map +0 -1
  614. package/dist/cjs/index-3533152c.js.map +0 -1
  615. package/dist/cjs/index.esm-84a0a7a8.js.map +0 -1
  616. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +0 -1
  617. package/dist/cjs/justifi-table.cjs.entry.js.map +0 -1
  618. package/dist/cjs/table-utils-617126e5.js +0 -13
  619. package/dist/cjs/table-utils-617126e5.js.map +0 -1
  620. package/dist/cjs/utils-0fd61dbd.js.map +0 -1
  621. package/dist/cjs/utils-d95b09c2.js +0 -35
  622. package/dist/cjs/utils-d95b09c2.js.map +0 -1
  623. package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +0 -1
  624. package/dist/collection/components/legal-address-form/legal-address-form.js.map +0 -1
  625. package/dist/collection/components/table/table-utils.js +0 -8
  626. package/dist/collection/components/table/table-utils.js.map +0 -1
  627. package/dist/esm/Api-cca120a8.js.map +0 -1
  628. package/dist/esm/Payout-9a1f2859.js.map +0 -1
  629. package/dist/esm/business-form-schema-5885d3d6.js.map +0 -1
  630. package/dist/esm/form-control-select.entry.js +0 -43
  631. package/dist/esm/form-control-select.entry.js.map +0 -1
  632. package/dist/esm/index-fe877d03.js.map +0 -1
  633. package/dist/esm/index.esm-89fe6af9.js.map +0 -1
  634. package/dist/esm/justifi-additional-questions_5.entry.js.map +0 -1
  635. package/dist/esm/justifi-table.entry.js.map +0 -1
  636. package/dist/esm/table-utils-6cdcaa8c.js +0 -11
  637. package/dist/esm/table-utils-6cdcaa8c.js.map +0 -1
  638. package/dist/esm/utils-1e7d6279.js +0 -28
  639. package/dist/esm/utils-1e7d6279.js.map +0 -1
  640. package/dist/esm/utils-ad0bbe03.js.map +0 -1
  641. package/dist/types/components/table/table-utils.d.ts +0 -14
  642. package/dist/webcomponents/p-26392ae3.entry.js.map +0 -1
  643. package/dist/webcomponents/p-2b6f5e35.entry.js.map +0 -1
  644. package/dist/webcomponents/p-2e66512d.entry.js +0 -2
  645. package/dist/webcomponents/p-2e66512d.entry.js.map +0 -1
  646. package/dist/webcomponents/p-523cbe04.js +0 -2
  647. package/dist/webcomponents/p-523cbe04.js.map +0 -1
  648. package/dist/webcomponents/p-641883b2.entry.js +0 -2
  649. package/dist/webcomponents/p-641883b2.entry.js.map +0 -1
  650. package/dist/webcomponents/p-69a1bec2.entry.js +0 -2
  651. package/dist/webcomponents/p-69a1bec2.entry.js.map +0 -1
  652. package/dist/webcomponents/p-6a0c8dec.entry.js +0 -2
  653. package/dist/webcomponents/p-6a0c8dec.entry.js.map +0 -1
  654. package/dist/webcomponents/p-87410719.entry.js +0 -2
  655. package/dist/webcomponents/p-87410719.entry.js.map +0 -1
  656. package/dist/webcomponents/p-881edb4d.entry.js +0 -2
  657. package/dist/webcomponents/p-881edb4d.entry.js.map +0 -1
  658. package/dist/webcomponents/p-9346ae33.js.map +0 -1
  659. package/dist/webcomponents/p-9d1c7e6a.entry.js +0 -2
  660. package/dist/webcomponents/p-ab0756ff.js +0 -2
  661. package/dist/webcomponents/p-ab0756ff.js.map +0 -1
  662. package/dist/webcomponents/p-c46241ba.js.map +0 -1
  663. package/dist/webcomponents/p-ccb0e1c5.js +0 -2
  664. package/dist/webcomponents/p-ccb0e1c5.js.map +0 -1
  665. package/dist/webcomponents/p-dabeb3df.entry.js +0 -2
  666. package/dist/webcomponents/p-dabeb3df.entry.js.map +0 -1
  667. package/dist/webcomponents/p-db9945b1.entry.js +0 -2
  668. package/dist/webcomponents/p-db9945b1.entry.js.map +0 -1
  669. package/dist/webcomponents/p-e1f6c8ec.entry.js +0 -2
  670. package/dist/webcomponents/p-e1f6c8ec.entry.js.map +0 -1
  671. package/dist/webcomponents/p-e41fb562.entry.js +0 -2
  672. package/dist/webcomponents/p-e41fb562.entry.js.map +0 -1
  673. package/dist/webcomponents/p-e6695628.js +0 -2
  674. package/dist/webcomponents/p-e6695628.js.map +0 -1
  675. package/dist/webcomponents/p-e70b2a21.js +0 -3
  676. package/dist/webcomponents/p-e70b2a21.js.map +0 -1
  677. package/dist/webcomponents/p-f6cc37a6.entry.js +0 -2
  678. package/dist/webcomponents/p-f8067330.entry.js +0 -2
  679. package/dist/webcomponents/p-f8067330.entry.js.map +0 -1
  680. package/dist/webcomponents/p-f9e127a5.js.map +0 -1
  681. /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.js +0 -0
  682. /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.css +0 -0
  683. /package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.d.ts +0 -0
  684. /package/dist/webcomponents/{p-d92116e6.entry.js.map → p-2cd29187.entry.js.map} +0 -0
  685. /package/dist/webcomponents/{p-640bfa9f.entry.js.map → p-356cf20d.entry.js.map} +0 -0
  686. /package/dist/webcomponents/{p-1beaaba3.entry.js.map → p-88fa33c1.entry.js.map} +0 -0
  687. /package/dist/webcomponents/{p-cd0eca25.entry.js.map → p-96eecdff.entry.js.map} +0 -0
  688. /package/dist/webcomponents/{p-a922b908.entry.js.map → p-ec1890fc.entry.js.map} +0 -0
@@ -9,12 +9,48 @@ export function formatCurrency(amount, withSymbol = true) {
9
9
  }
10
10
  return amount < 0 ? `(${format(-amount)})` : format(amount);
11
11
  }
12
+ export function formatPercentage(amount) {
13
+ if (!amount)
14
+ amount = 0;
15
+ function format(amount) {
16
+ const number = amount / 100;
17
+ return number.toFixed(2).toString() + '%';
18
+ }
19
+ return format(amount);
20
+ }
21
+ ;
12
22
  export function formatDate(dateString) {
13
23
  if (!dateString)
14
24
  return '';
15
25
  const date = new Date(dateString);
16
26
  return format(date, 'MMM d, yyyy');
17
27
  }
28
+ // eg. Oct 9, 2023
29
+ export function formatMediumDate(input) {
30
+ // Check if input is a string and convert to Date object
31
+ if (typeof input === 'string') {
32
+ input = new Date(input);
33
+ }
34
+ // Check if input is a valid date
35
+ if (Object.prototype.toString.call(input) === '[object Date]') {
36
+ if (isNaN(input.getTime())) {
37
+ return 'Invalid date';
38
+ }
39
+ }
40
+ else {
41
+ return 'Invalid input';
42
+ }
43
+ const options = {
44
+ year: 'numeric',
45
+ month: 'short',
46
+ day: 'numeric',
47
+ };
48
+ return input.toLocaleDateString('en-US', options);
49
+ }
50
+ export function formatDisplayDate(value, endDate) {
51
+ const isEndingDate = value === endDate;
52
+ return (isEndingDate) ? 'Today' : format(new Date(value.replace(/-/g, '/')), 'MMM d');
53
+ }
18
54
  export function formatTime(dateString) {
19
55
  if (!dateString)
20
56
  return '';
@@ -27,49 +63,91 @@ export function formatTimeSeconds(dateString) {
27
63
  const date = new Date(dateString);
28
64
  return format(date, 'h:mm:ssaaa');
29
65
  }
66
+ // Receives an Address as input and return a formatted string
67
+ // eg. 123 Main St, Scranton, PA 11111
68
+ export function formatAddress(address) {
69
+ return `${address.line1}, ${address.city}, ${address.state} ${address.postal_code}`;
70
+ }
71
+ export function formatLegalAddress(address) {
72
+ return `${address.address_line1}, ${address.address_city}, ${address.address_state}, ${address.address_postal_code}`;
73
+ }
30
74
  export function extractComputedFontsToLoad() {
31
75
  var _a;
32
76
  const computedStyles = getComputedStyle(document.body);
33
- return ((_a = computedStyles === null || computedStyles === void 0 ? void 0 : computedStyles.getPropertyValue('--jfi-load-google-font')) === null || _a === void 0 ? void 0 : _a.trim().replace(/'|"/g, '').replace(' ', '+')) || null;
77
+ return (((_a = computedStyles === null || computedStyles === void 0 ? void 0 : computedStyles.getPropertyValue('--jfi-load-google-font')) === null || _a === void 0 ? void 0 : _a.trim().replace(/'|"/g, '').replace(' ', '+')) || null);
34
78
  }
35
79
  export const MapPaymentStatusToBadge = (status) => {
36
80
  switch (status) {
37
- case "authorized":
81
+ case 'authorized':
38
82
  return "<span class='badge bg-primary' title='This card payment was authorized, but not captured. It could still succeed or fail.'>Authorized</span>";
39
- case "disputed":
83
+ case 'disputed':
40
84
  return "<span class='badge bg-primary' title='The account holder disputed this payment. The amount has been returned and a fee assessed.'>Disputed</span>";
41
- case "achFailed":
85
+ case 'achFailed':
42
86
  return "<span class='badge bg-danger' title='The funds couldn't be collected for this ACH payment (in addition to the original payment, an ACH return and fee will appear in a payout)'>Failed</span>";
43
- case "failed":
87
+ case 'failed':
44
88
  return "<span class='badge bg-danger' title='This card payment didn't go through (it won't appear in a payout)'>Failed</span>";
45
- case "fully_refunded":
89
+ case 'fully_refunded':
46
90
  return "<span class='badge bg-primary' title='The full amount of this payment has been refunded'>Fully Refunded</span>";
47
- case "partially_refunded":
91
+ case 'partially_refunded':
48
92
  return "<span class='badge bg-primary' title='A portion of this payment has been refunded'>Partially Refunded</span>";
49
- case "pending":
93
+ case 'pending':
50
94
  return "<span class='badge bg-secondary' title='This ACH payment was processed, but the funds haven't settled. It could still succeed or fail.'>Pending</span>";
51
- case "succeeded":
95
+ case 'succeeded':
52
96
  return "<span class='badge bg-success' title='This payment was successfully captured'>Successful</span>";
53
97
  }
54
98
  };
55
99
  export const MapPayoutStatusToBadge = (status) => {
56
100
  switch (status) {
57
- case "canceled":
101
+ case 'canceled':
58
102
  return "<span class='badge bg-danger' title='Transfer to your bank account failed'>Canceled</span>";
59
- case "failed":
103
+ case 'failed':
60
104
  return "<span class='badge bg-danger' title='Transfer to your bank account failed'>Failed</span>";
61
- case "forwarded":
105
+ case 'forwarded':
62
106
  return "<span class='badge bg-secondary' title='This payout initially failed; the funds have been forwarded to your next successful payout'>Forwarded</span>";
63
- case "in_transit":
107
+ case 'in_transit':
64
108
  return "<span class='badge bg-primary' title='Transfer to your bank account has been initiated'>In Transit</span>";
65
- case "paid":
109
+ case 'paid':
66
110
  return "<span class='badge bg-success' title='Successfully deposited into your bank account'>Paid</span>";
67
- case "pending":
111
+ case 'pending':
68
112
  return "<span class='badge bg-primary' title='Batched and scheduled to be transferred'>Pending</span>";
69
- case "scheduled":
113
+ case 'scheduled':
70
114
  return "<span class='badge bg-primary' title='Batched and scheduled to be transferred'>Scheduled</span>";
71
- case "withdrawn":
115
+ case 'withdrawn':
72
116
  return "<span class='badge bg-success' title='Negative payout balance successfully withdrawn from your bank account'>Withdrawn</span>";
73
117
  }
74
118
  };
119
+ export const MapSubAccountStatusToBadge = (status) => {
120
+ switch (status) {
121
+ case 'created':
122
+ return "<span class='badge bg-primary' title='This sub account has been created, but we haven't received their onboarding yet'>Canceled</span>";
123
+ case 'submitted':
124
+ return "<span class='badge bg-info' title='We've received this sub account's onboarding and we're reviewing their information'>Submitted</span>";
125
+ case 'information_needed':
126
+ return "<span class='badge bg-warning' title='We've reviewed this sub account's onboarding information and found an issue'>Information Needed</span>";
127
+ case 'enabled':
128
+ return "<span class='badge bg-success' title='This sub account is approved to process payments'>Enabled</span>";
129
+ case 'disabled':
130
+ return "<span class='badge bg-danger' title='This sub account was previously approved, but has since become ineligible to process payments'>Disabled</span>";
131
+ case 'rejected':
132
+ return "<span class='badge bg-danger' title='This sub account didn't pass approval, so they won't be able to process payments'>Rejected</span>";
133
+ case 'archived':
134
+ return "<span class='badge bg-primary' title='This sub account has been archived. They won't be able to process payments unless they are restored'>Archived</span>";
135
+ }
136
+ };
137
+ /**
138
+ * Converts a snake_case string to a human-readable format by replacing underscores with spaces and capitalizing the first letter of each word.
139
+ *
140
+ * @param snakeCaseStr - The string in snake_case format.
141
+ * @returns The string transformed into a human-readable format.
142
+ *
143
+ * @example
144
+ * const readable = toReadableString('sole_proprietorship');
145
+ * console.log(readable); // Outputs: "Sole Proprietorship"
146
+ */
147
+ export function snakeCaseToHumanReadable(snakeCaseStr) {
148
+ return snakeCaseStr
149
+ .split('_')
150
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1))
151
+ .join(' ');
152
+ }
75
153
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,UAAU,GAAG,IAAI;EAC9D,IAAI,CAAC,MAAM;IAAE,MAAM,GAAG,CAAC,CAAC;EAExB,SAAS,MAAM,CAAC,MAAc;IAC5B,MAAM,eAAe,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC1D,OAAO,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,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D,QAAQ,MAAM,EAAE;IACd,KAAK,YAAY;MACf,OAAO,8IAA8I,CAAC;IACxJ,KAAK,UAAU;MACb,OAAO,mJAAmJ,CAAC;IAC7J,KAAK,WAAW;MACd,OAAO,+LAA+L,CAAC;IACzM,KAAK,QAAQ;MACX,OAAO,uHAAuH,CAAC;IACjI,KAAK,gBAAgB;MACnB,OAAO,gHAAgH,CAAC;IAC1H,KAAK,oBAAoB;MACvB,OAAO,8GAA8G,CAAC;IACxH,KAAK,SAAS;MACZ,OAAO,wJAAwJ,CAAC;IAClK,KAAK,WAAW;MACd,OAAO,iGAAiG,CAAC;GAC5G;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAE,EAAE;EACvD,QAAQ,MAAM,EAAE;IACd,KAAK,UAAU;MACb,OAAO,4FAA4F,CAAC;IACtG,KAAK,QAAQ;MACX,OAAO,0FAA0F,CAAC;IACpG,KAAK,WAAW;MACd,OAAO,sJAAsJ,CAAC;IAChK,KAAK,YAAY;MACf,OAAO,2GAA2G,CAAC;IACrH,KAAK,MAAM;MACT,OAAO,kGAAkG,CAAC;IAC5G,KAAK,SAAS;MACZ,OAAO,+FAA+F,CAAC;IACzG,KAAK,WAAW;MACd,OAAO,iGAAiG,CAAC;IAC3G,KAAK,WAAW;MACd,OAAO,+HAA+H,CAAC;GAC1I;AACH,CAAC,CAAC","sourcesContent":["import { format } from 'date-fns';\nimport Dinero from 'dinero.js';\n\nexport function formatCurrency(amount: number, withSymbol = true): string {\n if (!amount) amount = 0;\n\n function format(amount: number): string {\n const formattedString = withSymbol ? '$0,0.00' : '0,0.00';\n return Dinero({ amount: amount, currency: 'USD' }).toFormat(formattedString);\n }\n\n return amount < 0 ? `(${format(-amount)})` : format(amount);\n}\n\nexport function formatDate(dateString: string | Date): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'MMM d, yyyy');\n}\n\nexport function formatTime(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mmaaa');\n}\n\nexport function formatTimeSeconds(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mm:ssaaa');\n}\n\nexport function extractComputedFontsToLoad() {\n const computedStyles = getComputedStyle(document.body);\n return computedStyles?.getPropertyValue('--jfi-load-google-font')?.trim().replace(/'|\"/g, '').replace(' ', '+') || null;\n}\n\nexport const MapPaymentStatusToBadge = (status: string) => {\n switch (status) {\n case \"authorized\":\n return \"<span class='badge bg-primary' title='This card payment was authorized, but not captured. It could still succeed or fail.'>Authorized</span>\";\n case \"disputed\":\n return \"<span class='badge bg-primary' title='The account holder disputed this payment. The amount has been returned and a fee assessed.'>Disputed</span>\";\n case \"achFailed\":\n return \"<span class='badge bg-danger' title='The funds couldn't be collected for this ACH payment (in addition to the original payment, an ACH return and fee will appear in a payout)'>Failed</span>\";\n case \"failed\":\n return \"<span class='badge bg-danger' title='This card payment didn't go through (it won't appear in a payout)'>Failed</span>\";\n case \"fully_refunded\":\n return \"<span class='badge bg-primary' title='The full amount of this payment has been refunded'>Fully Refunded</span>\";\n case \"partially_refunded\":\n return \"<span class='badge bg-primary' title='A portion of this payment has been refunded'>Partially Refunded</span>\";\n case \"pending\":\n return \"<span class='badge bg-secondary' title='This ACH payment was processed, but the funds haven't settled. It could still succeed or fail.'>Pending</span>\";\n case \"succeeded\":\n return \"<span class='badge bg-success' title='This payment was successfully captured'>Successful</span>\";\n }\n};\n\nexport const MapPayoutStatusToBadge = (status: string) => {\n switch (status) {\n case \"canceled\":\n return \"<span class='badge bg-danger' title='Transfer to your bank account failed'>Canceled</span>\";\n case \"failed\":\n return \"<span class='badge bg-danger' title='Transfer to your bank account failed'>Failed</span>\";\n case \"forwarded\":\n return \"<span class='badge bg-secondary' title='This payout initially failed; the funds have been forwarded to your next successful payout'>Forwarded</span>\";\n case \"in_transit\":\n return \"<span class='badge bg-primary' title='Transfer to your bank account has been initiated'>In Transit</span>\";\n case \"paid\":\n return \"<span class='badge bg-success' title='Successfully deposited into your bank account'>Paid</span>\";\n case \"pending\":\n return \"<span class='badge bg-primary' title='Batched and scheduled to be transferred'>Pending</span>\";\n case \"scheduled\":\n return \"<span class='badge bg-primary' title='Batched and scheduled to be transferred'>Scheduled</span>\";\n case \"withdrawn\":\n return \"<span class='badge bg-success' title='Negative payout balance successfully withdrawn from your bank account'>Withdrawn</span>\";\n }\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,MAAM,MAAM,WAAW,CAAC;AAI/B,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,UAAU,GAAG,IAAI;EAC9D,IAAI,CAAC,MAAM;IAAE,MAAM,GAAG,CAAC,CAAC;EAExB,SAAS,MAAM,CAAC,MAAc;IAC5B,MAAM,eAAe,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC1D,OAAO,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,CACzD,eAAe,CAChB,CAAC;EACJ,CAAC;EAED,OAAO,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAc;EAC7C,IAAI,CAAC,MAAM;IAAE,MAAM,GAAG,CAAC,CAAC;EAExB,SAAS,MAAM,CAAC,MAAc;IAC5B,MAAM,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAC5B,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC;EAC5C,CAAC;EAED,OAAO,MAAM,CAAC,M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AY;KAChB,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACzD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC","sourcesContent":["import { format } from 'date-fns';\nimport Dinero from 'dinero.js';\nimport { Address } from '../api/Business';\nimport { Legal } from '../api/SubAccount';\n\nexport function formatCurrency(amount: number, withSymbol = true): string {\n if (!amount) amount = 0;\n\n function format(amount: number): string {\n const formattedString = withSymbol ? '$0,0.00' : '0,0.00';\n return Dinero({ amount: amount, currency: 'USD' }).toFormat(\n formattedString,\n );\n }\n\n return amount < 0 ? `(${format(-amount)})` : format(amount);\n}\n\nexport function formatPercentage(amount: number): string {\n if (!amount) amount = 0;\n\n function format(amount: number) {\n const number = amount / 100;\n return number.toFixed(2).toString() + '%';\n }\n\n return format(amount);\n};\n\nexport function formatDate(dateString: string | Date): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'MMM d, yyyy');\n}\n\n// eg. Oct 9, 2023\nexport function formatMediumDate(input: string | Date): string {\n // Check if input is a string and convert to Date object\n if (typeof input === 'string') {\n input = new Date(input);\n }\n\n // Check if input is a valid date\n if (Object.prototype.toString.call(input) === '[object Date]') {\n if (isNaN(input.getTime())) {\n return 'Invalid date';\n }\n } else {\n return 'Invalid input';\n }\n\n const options: Intl.DateTimeFormatOptions = {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n };\n\n return input.toLocaleDateString('en-US', options);\n}\n\nexport function formatDisplayDate(value: any, endDate: string) {\n const isEndingDate = value === endDate;\n return (isEndingDate) ? 'Today' : format(new Date(value.replace(/-/g, '/')), 'MMM d');\n}\n\nexport function formatTime(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mmaaa');\n}\n\nexport function formatTimeSeconds(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mm:ssaaa');\n}\n\n// Receives an Address as input and return a formatted string\n// eg. 123 Main St, Scranton, PA 11111\nexport function formatAddress(address: Address): string {\n return `${address.line1}, ${address.city}, ${address.state} ${address.postal_code}`;\n}\n\nexport function formatLegalAddress(address: Legal): string {\n return `${address.address_line1}, ${address.address_city}, ${address.address_state}, ${address.address_postal_code}`;\n}\n\nexport function extractComputedFontsToLoad() {\n const computedStyles = getComputedStyle(document.body);\n return (\n computedStyles\n ?.getPropertyValue('--jfi-load-google-font')\n ?.trim()\n .replace(/'|\"/g, '')\n .replace(' ', '+') || null\n );\n}\n\nexport const MapPaymentStatusToBadge = (status: string) => {\n switch (status) {\n case 'authorized':\n return \"<span class='badge bg-primary' title='This card payment was authorized, but not captured. It could still succeed or fail.'>Authorized</span>\";\n case 'disputed':\n return \"<span class='badge bg-primary' title='The account holder disputed this payment. The amount has been returned and a fee assessed.'>Disputed</span>\";\n case 'achFailed':\n return \"<span class='badge bg-danger' title='The funds couldn't be collected for this ACH payment (in addition to the original payment, an ACH return and fee will appear in a payout)'>Failed</span>\";\n case 'failed':\n return \"<span class='badge bg-danger' title='This card payment didn't go through (it won't appear in a payout)'>Failed</span>\";\n case 'fully_refunded':\n return \"<span class='badge bg-primary' title='The full amount of this payment has been refunded'>Fully Refunded</span>\";\n case 'partially_refunded':\n return \"<span class='badge bg-primary' title='A portion of this payment has been refunded'>Partially Refunded</span>\";\n case 'pending':\n return \"<span class='badge bg-secondary' title='This ACH payment was processed, but the funds haven't settled. It could still succeed or fail.'>Pending</span>\";\n case 'succeeded':\n return \"<span class='badge bg-success' title='This payment was successfully captured'>Successful</span>\";\n }\n};\n\nexport const MapPayoutStatusToBadge = (status: string) => {\n switch (status) {\n case 'canceled':\n return \"<span class='badge bg-danger' title='Transfer to your bank account failed'>Canceled</span>\";\n case 'failed':\n return \"<span class='badge bg-danger' title='Transfer to your bank account failed'>Failed</span>\";\n case 'forwarded':\n return \"<span class='badge bg-secondary' title='This payout initially failed; the funds have been forwarded to your next successful payout'>Forwarded</span>\";\n case 'in_transit':\n return \"<span class='badge bg-primary' title='Transfer to your bank account has been initiated'>In Transit</span>\";\n case 'paid':\n return \"<span class='badge bg-success' title='Successfully deposited into your bank account'>Paid</span>\";\n case 'pending':\n return \"<span class='badge bg-primary' title='Batched and scheduled to be transferred'>Pending</span>\";\n case 'scheduled':\n return \"<span class='badge bg-primary' title='Batched and scheduled to be transferred'>Scheduled</span>\";\n case 'withdrawn':\n return \"<span class='badge bg-success' title='Negative payout balance successfully withdrawn from your bank account'>Withdrawn</span>\";\n }\n};\n\nexport const MapSubAccountStatusToBadge = (status: string) => {\n switch (status) {\n case 'created':\n return \"<span class='badge bg-primary' title='This sub account has been created, but we haven't received their onboarding yet'>Canceled</span>\";\n case 'submitted':\n return \"<span class='badge bg-info' title='We've received this sub account's onboarding and we're reviewing their information'>Submitted</span>\";\n case 'information_needed':\n return \"<span class='badge bg-warning' title='We've reviewed this sub account's onboarding information and found an issue'>Information Needed</span>\";\n case 'enabled':\n return \"<span class='badge bg-success' title='This sub account is approved to process payments'>Enabled</span>\";\n case 'disabled':\n return \"<span class='badge bg-danger' title='This sub account was previously approved, but has since become ineligible to process payments'>Disabled</span>\";\n case 'rejected':\n return \"<span class='badge bg-danger' title='This sub account didn't pass approval, so they won't be able to process payments'>Rejected</span>\";\n case 'archived':\n return \"<span class='badge bg-primary' title='This sub account has been archived. They won't be able to process payments unless they are restored'>Archived</span>\";\n }\n};\n\n/**\n * Converts a snake_case string to a human-readable format by replacing underscores with spaces and capitalizing the first letter of each word.\n *\n * @param snakeCaseStr - The string in snake_case format.\n * @returns The string transformed into a human-readable format.\n *\n * @example\n * const readable = toReadableString('sole_proprietorship');\n * console.log(readable); // Outputs: \"Sole Proprietorship\"\n */\nexport function snakeCaseToHumanReadable(snakeCaseStr: string): string {\n return snakeCaseStr\n .split('_')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n}\n"]}
@@ -63,9 +63,7 @@ function v4(options, buf, offset) {
63
63
  return unsafeStringify(rnds);
64
64
  }
65
65
 
66
- const Api = (authToken, customApiOrigin) => {
67
- const originFromEnv = typeof process !== 'undefined' && (process === null || process === void 0 ? void 0 : process.env.API_ORIGIN);
68
- const apiOrigin = customApiOrigin || originFromEnv || 'https://wc-proxy.justifi.ai';
66
+ const Api = (authToken, apiOrigin) => {
69
67
  async function getAuthorizationHeader() {
70
68
  return {
71
69
  'Authorization': `Bearer ${authToken}`,
@@ -75,19 +73,7 @@ const Api = (authToken, customApiOrigin) => {
75
73
  }
76
74
  async function makeRequest(endpoint, method, params, body, signal) {
77
75
  const url = `${apiOrigin}/v1/${endpoint}`;
78
- let cursor;
79
- if (params === null || params === void 0 ? void 0 : params.paging) {
80
- cursor = (params === null || params === void 0 ? void 0 : params.paging) && (params === null || params === void 0 ? void 0 : params.direction) ? `${params.direction === 'prev'
81
- ? '&before_cursor=' + params.paging.start_cursor
82
- : params.direction === 'next'
83
- ? '&after_cursor=' + params.paging.end_cursor
84
- : ''}` : null;
85
- delete params.paging;
86
- }
87
- if (params === null || params === void 0 ? void 0 : params.direction) {
88
- delete params.direction;
89
- }
90
- const requestUrl = params ? `${url}?${new URLSearchParams(params)}${cursor ? '&' + cursor : ''}` : url;
76
+ const requestUrl = params ? `${url}?${new URLSearchParams(params)}` : url;
91
77
  const response = await fetch(requestUrl, {
92
78
  method: method,
93
79
  headers: await getAuthorizationHeader(),
@@ -1 +1 @@
1
- {"file":"Api.js","mappings":"AAAA;AACA;AACA;AACA,IAAI,eAAe,CAAC;AACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAClB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI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AAE,IAAI,EAAE,MAAM,CAAC,CAAC;GAC9D;EAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AACvC,EAAE;AAEF,SAAS,WAAW,CAAC,UAAkB;EACrC,OAAO,CAAC,KAAK,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;AACrD;;;;","names":["uuidv4"],"sources":["../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/v4.js","src/api/Api.ts"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import { v4 as uuidv4 } from 'uuid';\nimport { IPagination } from './Pagination';\n\nexport interface IApiResponse<T> {\n data: T;\n error?: IErrorObject | IServerError;\n page_info?: IPagination;\n errors?: string[];\n id: number;\n type: string;\n}\n\nexport type IServerError = string;\n\nexport interface IErrorObject {\n message: string;\n code: string;\n param?: string;\n}\n\nexport interface IApiResponseCollection<T> extends IApiResponse<T> {\n page_info: IPagination;\n}\n\nconst Api = (authToken: string, customApiOrigin?: string) => {\n const originFromEnv = typeof process !== 'undefined' && process?.env.API_ORIGIN;\n const apiOrigin = customApiOrigin || originFromEnv || 'https://wc-proxy.justifi.ai';\n\n async function getAuthorizationHeader() {\n return {\n 'Authorization': `Bearer ${authToken}`,\n 'Idempotency-Key': uuidv4(),\n 'Content-Type': 'application/json',\n };\n }\n\n async function makeRequest(endpoint: string, method: string, params?: any, body?: any, signal?: AbortSignal) {\n const url = `${apiOrigin}/v1/${endpoint}`;\n let cursor;\n if (params?.paging) {\n cursor = params?.paging && params?.direction ? `${params.direction === 'prev'\n ? '&before_cursor=' + params.paging.start_cursor\n : params.direction === 'next'\n ? '&after_cursor=' + params.paging.end_cursor\n : ''\n }` : null;\n delete params.paging;\n }\n if (params?.direction) {\n delete params.direction;\n }\n const requestUrl = params ? `${url}?${new URLSearchParams(params)}${cursor ? '&' + cursor : ''}` : url;\n const response = await fetch(requestUrl, {\n method: method,\n headers: await getAuthorizationHeader(),\n body: body,\n signal: signal,\n });\n\n if (response) {\n return response.status === 204 ? {} : response.json();\n }\n handleError(requestUrl);\n }\n\n async function get(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'GET', params, null, signal);\n }\n\n async function post(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'POST', params, body, signal);\n }\n\n async function patch(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'PATCH', params, body, signal);\n }\n\n async function destroy(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'DELETE', params, null, signal);\n }\n\n return { get, post, patch, destroy };\n};\n\nfunction handleError(requestUrl: string): void {\n console.error(`Error fetching from ${requestUrl}`);\n}\n\nexport default Api;\n"],"version":3}
1
+ {"file":"Api.js","mappings":"AAAA;AACA;AACA;AACA,IAAI,eAAe,CAAC;AACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAClB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,E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AoB;IACrE,OAAO,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;GAC3D;EAED,eAAe,IAAI,CAAC,QAAgB,EAAE,IAAU,EAAE,MAAY,EAAE,MAAoB;IAClF,OAAO,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;GAC5D;EAED,eAAe,KAAK,CAAC,QAAgB,EAAE,IAAU,EAAE,MAAY,EAAE,MAAoB;IACnF,OAAO,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;GAC7D;EAED,eAAe,OAAO,CAAC,QAAgB,EAAE,MAAY,EAAE,MAAoB;IACzE,OAAO,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;GAC9D;EAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AACvC,EAAE;AAEF,SAAS,WAAW,CAAC,UAAkB;EACrC,OAAO,CAAC,KAAK,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;AACrD;;;;","names":["uuidv4"],"sources":["../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/v4.js","src/api/Api.ts"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import { v4 as uuidv4 } from 'uuid';\nimport { PagingInfo } from './Pagination';\n\nexport interface IApiResponse<T> {\n data: T;\n error?: IErrorObject | IServerError;\n page_info?: PagingInfo;\n errors?: string[];\n id: number;\n type: string;\n}\n\nexport type IServerError = string;\n\nexport interface IErrorObject {\n message: string;\n code: string;\n param?: string;\n}\n\nexport interface IApiResponseCollection<T> extends IApiResponse<T> {\n page_info: PagingInfo;\n}\n\nconst Api = (authToken: string, apiOrigin?: string) => {\n async function getAuthorizationHeader() {\n return {\n 'Authorization': `Bearer ${authToken}`,\n 'Idempotency-Key': uuidv4(),\n 'Content-Type': 'application/json',\n };\n }\n\n async function makeRequest(endpoint: string, method: string, params?: any, body?: any, signal?: AbortSignal) {\n const url = `${apiOrigin}/v1/${endpoint}`;\n const requestUrl = params ? `${url}?${new URLSearchParams(params)}` : url;\n const response = await fetch(requestUrl, {\n method: method,\n headers: await getAuthorizationHeader(),\n body: body,\n signal: signal,\n });\n\n if (response) {\n return response.status === 204 ? {} : response.json();\n }\n handleError(requestUrl);\n }\n\n async function get(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'GET', params, null, signal);\n }\n\n async function post(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'POST', params, body, signal);\n }\n\n async function patch(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'PATCH', params, body, signal);\n }\n\n async function destroy(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'DELETE', params, null, signal);\n }\n\n return { get, post, patch, destroy };\n};\n\nfunction handleError(requestUrl: string): void {\n console.error(`Error fetching from ${requestUrl}`);\n}\n\nexport default Api;\n"],"version":3}
@@ -0,0 +1,12 @@
1
+ const pagingDefaults = {
2
+ amount: 25,
3
+ start_cursor: '',
4
+ end_cursor: '',
5
+ has_previous: false,
6
+ has_next: false,
7
+ };
8
+ const ExtendedPagingDefaults = Object.assign(Object.assign({}, pagingDefaults), { handleClickNext: () => { }, handleClickPrevious: () => { } });
9
+
10
+ export { ExtendedPagingDefaults as E, pagingDefaults as p };
11
+
12
+ //# sourceMappingURL=Pagination.js.map
@@ -0,0 +1 @@
1
+ {"file":"Pagination.js","mappings":"MAQa,cAAc,GAAG;EAC5B,MAAM,EAAE,EAAE;EACV,YAAY,EAAE,EAAE;EAChB,UAAU,EAAE,EAAE;EACd,YAAY,EAAE,KAAK;EACnB,QAAQ,EAAE,KAAK;EAChB;MAOY,sBAAsB,mCAC9B,cAAc,KACjB,eAAe,EAAE,SAAS,EAC1B,mBAAmB,EAAE,SAAS;;;;","names":[],"sources":["src/api/Pagination.ts"],"sourcesContent":["export interface PagingInfo {\n amount: number,\n start_cursor: string,\n end_cursor: string,\n has_previous: boolean,\n has_next: boolean,\n}\n\nexport const pagingDefaults = {\n amount: 25,\n start_cursor: '',\n end_cursor: '',\n has_previous: false,\n has_next: false,\n}\n\nexport interface ExtendedPagingInfo extends PagingInfo {\n handleClickNext: (after_cursor: string) => void;\n handleClickPrevious: (before_cursor: string) => void;\n}\n\nexport const ExtendedPagingDefaults: ExtendedPagingInfo = {\n ...pagingDefaults,\n handleClickNext: () => { },\n handleClickPrevious: () => { }\n}\n"],"version":3}
@@ -65,6 +65,26 @@ class Payment {
65
65
  }
66
66
  }
67
67
  }
68
+ class PaymentBalanceTransaction {
69
+ constructor(balanceTransaction) {
70
+ this.id = balanceTransaction.id;
71
+ this.amount = balanceTransaction.amount;
72
+ this.balance = balanceTransaction.balance;
73
+ this.currency = balanceTransaction.currency;
74
+ this.financial_transaction_id = balanceTransaction.financial_transaction_id;
75
+ this.payment_id = balanceTransaction.payment_id;
76
+ this.payment_balance_txn_type = balanceTransaction.payment_balance_txn_type;
77
+ this.source_id = balanceTransaction.source_id;
78
+ this.source_type = balanceTransaction.source_type;
79
+ this.created_at = balanceTransaction.created_at;
80
+ this.updated_at = balanceTransaction.updated_at;
81
+ }
82
+ get displayTransactionId() {
83
+ return this.payment_balance_txn_type === 'payment_fee'
84
+ ? '--'
85
+ : this.source_id;
86
+ }
87
+ }
68
88
 
69
89
  var PayoutStatuses;
70
90
  (function (PayoutStatuses) {
@@ -108,6 +128,6 @@ class Payout {
108
128
  }
109
129
  }
110
130
 
111
- export { PaymentMethodTypes as P, Payment as a, PayoutStatuses as b, PayoutStatusesSafeNames as c, Payout as d };
131
+ export { PaymentBalanceTransaction as P, PaymentMethodTypes as a, Payment as b, PayoutStatuses as c, PayoutStatusesSafeNames as d, Payout as e };
112
132
 
113
133
  //# sourceMappingURL=Payout.js.map
@@ -1 +1 @@
1
- {"file":"Payout.js","mappings":"AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;EACzB,0CAAuB,CAAA;EACvB,oCAAiB,CAAA;AACnB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;IAEW;AAAZ,WAAY,kBAAkB;EAC5B,mCAAa,CAAA;EACb,iDAA2B,CAAA;AAC7B,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,IAAY,eAQX;AARD,WAAY,eAAe;EACzB,sCAAmB,CAAA;EACnB,4CAAyB,CAAA;EACzB,0CAAuB,CAAA;EACvB,oCAAiB,CAAA;EACjB,wCAAqB,CAAA;EACrB,oDAAiC,CAAA;EACjC,4DAAyC,CAAA;AAC3C,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B;AAED,IAAY,uBAIX;AAJD,WAAY,uBAAuB;;EAEjC,wCAAa,CAAA;EACb,wCAAa,CAAA;AACf,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;MAoEY,OAAO;EA2BlB,YAAY,OAA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D,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACpC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IAC1C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IAC1C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC5C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC5C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAChC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACpC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;GACrC;;;;;","names":[],"sources":["src/api/Payment.ts","src/api/Payout.ts"],"sourcesContent":["export enum CaptureStrategy {\n automatic = 'automatic',\n manual = 'manual',\n}\n\nexport enum PaymentMethodTypes {\n card = 'card',\n bankAccount = 'bankAccount',\n}\n\nexport enum PaymentStatuses {\n pending = 'pending',\n authorized = 'authorized',\n succeeded = 'succeeded',\n failed = 'failed',\n disputed = 'disputed',\n fully_refunded = 'fully_refunded',\n partially_refunded = 'partially_refunded',\n}\n\nexport enum PaymentDisputedStatuses {\n // if a dispute is 'won', we don't show a dispute status, just general status\n lost = 'lost',\n open = 'open',\n}\n\nexport interface IPaymentMethod {\n card?: ICard;\n bank_account?: IBankAccount;\n}\n\nexport type CardBrand = 'american_express' | 'diners_club' | 'discover' | 'jcb' | 'mastercard' | 'china_unionpay' | 'visa' | 'unknown';\n\nexport interface IBankAccount {\n id: string;\n acct_last_four: string;\n name: string;\n brand: string;\n token: string\n created_at: string;\n updated_at: string;\n}\n\nexport interface ICard {\n id: string;\n acct_last_four: string;\n name: string;\n brand: CardBrand;\n token: string;\n created_at: string;\n updated_at: string;\n}\n\nexport interface IDispute {\n amount_cents: number;\n created_at: string;\n currency: string;\n gateway_ref_id: string;\n id: string;\n payment_id: string;\n reason: null;\n status: string;\n updated_at: string;\n}\n\nexport interface IPayment {\n id: string;\n account_id: string;\n amount: number;\n amount_disputed: number;\n amount_refundable: number;\n amount_refunded: number;\n balance: number;\n captured: boolean;\n capture_strategy: CaptureStrategy;\n currency: 'usd';\n description: string;\n disputed: boolean;\n disputes: IDispute[];\n error_code: string | null;\n error_description: string | null;\n fee_amount: number;\n is_test: boolean;\n metadata: Object | null;\n payment_method: IPaymentMethod;\n payment_intent_id: string | null;\n refunded: boolean;\n status: PaymentStatuses;\n created_at: string;\n updated_at: string;\n}\n\nexport class Payment implements IPayment {\n public id: string;\n public account_id: string;\n public amount: number;\n public amount_disputed: number;\n public amount_refundable: number;\n public amount_refunded: number;\n public balance: number;\n public captured: boolean;\n public capture_strategy: CaptureStrategy;\n public currency: 'usd';\n public description: string;\n public disputed: boolean;\n public disputes: IDispute[];\n public error_code: string | null;\n public error_description: string | null;\n public fee_amount: number;\n public is_test: boolean;\n public metadata: Object | null;\n public payment_method: IPaymentMethod;\n public payment_intent_id: string | null;\n public refunded: boolean;\n public status: PaymentStatuses;\n public created_at: string;\n public updated_at: string;\n public statement_descriptor?: string;\n\n constructor(payment: IPayment) {\n this.id = payment.id;\n this.account_id = payment.account_id;\n this.amount = payment.amount;\n this.amount_disputed = payment.amount_disputed;\n this.amount_refundable = payment.amount_refundable;\n this.amount_refunded = payment.amount_refunded;\n this.balance = payment.balance;\n this.captured = payment.captured;\n this.capture_strategy = payment.capture_strategy;\n this.currency = payment.currency;\n this.description = payment.description;\n this.disputed = payment.disputed;\n this.disputes = payment.disputes;\n this.error_code = payment.error_code;\n this.error_description = payment.error_description;\n this.fee_amount = payment.fee_amount;\n this.is_test = payment.is_test;\n this.metadata = payment.metadata;\n this.payment_method = payment.payment_method;\n this.payment_intent_id = payment.payment_intent_id;\n this.refunded = payment.refunded;\n this.status = payment.status;\n this.created_at = payment.created_at;\n this.updated_at = payment.updated_at;\n }\n\n get disputedStatus(): PaymentDisputedStatuses | null {\n const lost = this.disputes.some(dispute => dispute.status === PaymentDisputedStatuses.lost);\n // if a dispute is 'won', we don't show a dispute status, just general status\n if (!this.disputed) {\n return null;\n } else if (lost) {\n return PaymentDisputedStatuses.lost;\n } else {\n return PaymentDisputedStatuses.open;\n }\n }\n}\n","import { BankAccount } from \"./shared\";\n\nexport enum PayoutStatuses {\n paid = 'paid',\n failed = 'failed',\n forwarded = 'forwarded',\n scheduled = 'scheduled',\n in_transit = 'in_transit',\n canceled = 'canceled',\n}\n\nexport enum PayoutStatusesSafeNames {\n paid = 'Paid',\n failed = 'Failed',\n forwarded = 'Forwarded',\n scheduled = 'Scheduled',\n in_transit = 'In Transit',\n canceled = 'Canceled',\n}\n\nexport interface IPayout {\n id: string;\n account_id: string;\n amount: number;\n bank_account: BankAccount;\n currency: 'usd';\n delivery_method: string;\n description: string;\n deposits_at: string;\n fees_total: number;\n refunds_count: number;\n refunds_total: number;\n payments_count: number;\n payments_total: number;\n payout_type: 'ach' | 'cc';\n other_total: number;\n status: PayoutStatuses;\n metadata: any;\n created_at: string;\n updated_at: string;\n}\n\nexport class Payout implements IPayout {\n public id: string;\n public account_id: string;\n public amount: number;\n public bank_account: BankAccount;\n public currency: 'usd';\n public delivery_method: string;\n public description: string;\n public deposits_at: string;\n public fees_total: number;\n public refunds_count: number;\n public refunds_total: number;\n public payments_count: number;\n public payments_total: number;\n public payout_type: 'ach' | 'cc';\n public other_total: number;\n public status: PayoutStatuses;\n public metadata: any;\n public created_at: string;\n public updated_at: string;\n\n constructor(payout: IPayout) {\n this.id = payout.id;\n this.account_id = payout.account_id;\n this.amount = payout.amount;\n this.bank_account = payout.bank_account;\n this.currency = payout.currency;\n this.delivery_method = payout.delivery_method || 'standard';\n this.description = payout.description;\n this.deposits_at = payout.deposits_at;\n this.fees_total = payout.fees_total;\n this.refunds_count = payout.refunds_count;\n this.refunds_total = payout.refunds_total;\n this.payments_count = payout.payments_count;\n this.payments_total = payout.payments_total;\n this.payout_type = payout.payout_type;\n this.other_total = payout.other_total;\n this.status = payout.status;\n this.metadata = payout.metadata;\n this.created_at = payout.created_at;\n this.updated_at = payout.updated_at;\n }\n}\n"],"version":3}
1
+ {"file":"Payout.js","mappings":"AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;EACzB,0CAAuB,CAAA;EACvB,oCAAiB,CAAA;AACnB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;IAEW;AAAZ,WAAY,kBAAkB;EAC5B,mCAAa,CAAA;EACb,iDAA2B,CAAA;AAC7B,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,IAAY,eAQX;AARD,WAAY,eAAe;EACzB,sCAAmB,CAAA;EACnB,4CAAyB,CAAA;EACzB,0CAAuB,CAAA;EACvB,oCAAiB,CAAA;EACjB,wCAAqB,CAAA;EACrB,oDAAiC,CAAA;EACjC,4DAAyC,CAAA;AAC3C,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B;AAED,IAAY,uBAIX;AAJD,WAAY,uBAAuB;;EAEjC,wCAAa,CAAA;EACb,wCAAa,CAAA;AACf,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;MA4EY,OAAO;EA2BlB,YAAY,OAAiB;IAC3B,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;IACrB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACrC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC7B,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAC/C,IAAI,CAAC,iBAAiB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AG,MAAM,CAAC,UAAU,CAAC;GACrC;;;;;","names":[],"sources":["src/api/Payment.ts","src/api/Payout.ts"],"sourcesContent":["export enum CaptureStrategy {\n automatic = 'automatic',\n manual = 'manual',\n}\n\nexport enum PaymentMethodTypes {\n card = 'card',\n bankAccount = 'bankAccount',\n}\n\nexport enum PaymentStatuses {\n pending = 'pending',\n authorized = 'authorized',\n succeeded = 'succeeded',\n failed = 'failed',\n disputed = 'disputed',\n fully_refunded = 'fully_refunded',\n partially_refunded = 'partially_refunded',\n}\n\nexport enum PaymentDisputedStatuses {\n // if a dispute is 'won', we don't show a dispute status, just general status\n lost = 'lost',\n open = 'open',\n}\n\nexport interface IPaymentMethod {\n card?: ICard;\n bank_account?: IBankAccount;\n}\n\nexport type CardBrand =\n | 'american_express'\n | 'diners_club'\n | 'discover'\n | 'jcb'\n | 'mastercard'\n | 'china_unionpay'\n | 'visa'\n | 'unknown';\n\nexport interface IBankAccount {\n id: string;\n acct_last_four: string;\n name: string;\n brand: string;\n token: string\n created_at: string;\n updated_at: string;\n}\n\nexport interface ICard {\n id: string;\n acct_last_four: string;\n name: string;\n brand: CardBrand;\n token: string;\n created_at: string;\n updated_at: string;\n}\n\nexport interface IDispute {\n amount_cents: number;\n created_at: string;\n currency: string;\n gateway_ref_id: string;\n id: string;\n payment_id: string;\n reason: null;\n status: string;\n updated_at: string;\n}\n\nexport interface IPayment {\n id: string;\n account_id: string;\n amount: number;\n amount_disputed: number;\n amount_refundable: number;\n amount_refunded: number;\n balance: number;\n captured: boolean;\n capture_strategy: CaptureStrategy;\n currency: 'usd';\n description: string;\n disputed: boolean;\n disputes: IDispute[];\n error_code: string | null;\n error_description: string | null;\n fee_amount: number;\n is_test: boolean;\n metadata: Object | null;\n payment_method: IPaymentMethod;\n payment_intent_id: string | null;\n refunded: boolean;\n status: PaymentStatuses;\n created_at: string;\n updated_at: string;\n}\n\nexport class Payment implements IPayment {\n public id: string;\n public account_id: string;\n public amount: number;\n public amount_disputed: number;\n public amount_refundable: number;\n public amount_refunded: number;\n public balance: number;\n public captured: boolean;\n public capture_strategy: CaptureStrategy;\n public currency: 'usd';\n public description: string;\n public disputed: boolean;\n public disputes: IDispute[];\n public error_code: string | null;\n public error_description: string | null;\n public fee_amount: number;\n public is_test: boolean;\n public metadata: Object | null;\n public payment_method: IPaymentMethod;\n public payment_intent_id: string | null;\n public refunded: boolean;\n public status: PaymentStatuses;\n public created_at: string;\n public updated_at: string;\n public statement_descriptor?: string;\n\n constructor(payment: IPayment) {\n this.id = payment.id;\n this.account_id = payment.account_id;\n this.amount = payment.amount;\n this.amount_disputed = payment.amount_disputed;\n this.amount_refundable = payment.amount_refundable;\n this.amount_refunded = payment.amount_refunded;\n this.balance = payment.balance;\n this.captured = payment.captured;\n this.capture_strategy = payment.capture_strategy;\n this.currency = payment.currency;\n this.description = payment.description;\n this.disputed = payment.disputed;\n this.disputes = payment.disputes;\n this.error_code = payment.error_code;\n this.error_description = payment.error_description;\n this.fee_amount = payment.fee_amount;\n this.is_test = payment.is_test;\n this.metadata = payment.metadata;\n this.payment_method = payment.payment_method;\n this.payment_intent_id = payment.payment_intent_id;\n this.refunded = payment.refunded;\n this.status = payment.status;\n this.created_at = payment.created_at;\n this.updated_at = payment.updated_at;\n }\n\n get disputedStatus(): PaymentDisputedStatuses | null {\n const lost = this.disputes.some(\n dispute => dispute.status === PaymentDisputedStatuses.lost,\n );\n // if a dispute is 'won', we don't show a dispute status, just general status\n if (!this.disputed) {\n return null;\n } else if (lost) {\n return PaymentDisputedStatuses.lost;\n } else {\n return PaymentDisputedStatuses.open;\n }\n }\n}\n\nexport interface IPaymentBalanceTransaction {\n id: string;\n amount: number;\n balance: number;\n currency: 'usd';\n financial_transaction_id: string;\n payment_id: string;\n payment_balance_txn_type: string;\n source_id: string;\n source_type: string;\n created_at: string;\n updated_at: string;\n}\n\nexport class PaymentBalanceTransaction implements IPaymentBalanceTransaction {\n public id: string;\n public amount: number;\n public balance: number;\n public currency: 'usd';\n public financial_transaction_id: string;\n public payment_id: string;\n public payment_balance_txn_type: string;\n public source_id: string;\n public source_type: string;\n public created_at: string;\n public updated_at: string;\n\n constructor(balanceTransaction: IPaymentBalanceTransaction) {\n this.id = balanceTransaction.id;\n this.amount = balanceTransaction.amount;\n this.balance = balanceTransaction.balance;\n this.currency = balanceTransaction.currency;\n this.financial_transaction_id = balanceTransaction.financial_transaction_id;\n this.payment_id = balanceTransaction.payment_id;\n this.payment_balance_txn_type = balanceTransaction.payment_balance_txn_type;\n this.source_id = balanceTransaction.source_id;\n this.source_type = balanceTransaction.source_type;\n this.created_at = balanceTransaction.created_at;\n this.updated_at = balanceTransaction.updated_at;\n }\n\n get displayTransactionId(): string {\n return this.payment_balance_txn_type === 'payment_fee'\n ? '--'\n : this.source_id;\n }\n}\n","import { BankAccount } from \"./shared\";\n\nexport enum PayoutStatuses {\n paid = 'paid',\n failed = 'failed',\n forwarded = 'forwarded',\n scheduled = 'scheduled',\n in_transit = 'in_transit',\n canceled = 'canceled',\n}\n\nexport enum PayoutStatusesSafeNames {\n paid = 'Paid',\n failed = 'Failed',\n forwarded = 'Forwarded',\n scheduled = 'Scheduled',\n in_transit = 'In Transit',\n canceled = 'Canceled',\n}\n\nexport interface IPayout {\n id: string;\n account_id: string;\n amount: number;\n bank_account: BankAccount;\n currency: 'usd';\n delivery_method: string;\n description: string;\n deposits_at: string;\n fees_total: number;\n refunds_count: number;\n refunds_total: number;\n payments_count: number;\n payments_total: number;\n payout_type: 'ach' | 'cc';\n other_total: number;\n status: PayoutStatuses;\n metadata: any;\n created_at: string;\n updated_at: string;\n}\n\nexport class Payout implements IPayout {\n public id: string;\n public account_id: string;\n public amount: number;\n public bank_account: BankAccount;\n public currency: 'usd';\n public delivery_method: string;\n public description: string;\n public deposits_at: string;\n public fees_total: number;\n public refunds_count: number;\n public refunds_total: number;\n public payments_count: number;\n public payments_total: number;\n public payout_type: 'ach' | 'cc';\n public other_total: number;\n public status: PayoutStatuses;\n public metadata: any;\n public created_at: string;\n public updated_at: string;\n\n constructor(payout: IPayout) {\n this.id = payout.id;\n this.account_id = payout.account_id;\n this.amount = payout.amount;\n this.bank_account = payout.bank_account;\n this.currency = payout.currency;\n this.delivery_method = payout.delivery_method || 'standard';\n this.description = payout.description;\n this.deposits_at = payout.deposits_at;\n this.fees_total = payout.fees_total;\n this.refunds_count = payout.refunds_count;\n this.refunds_total = payout.refunds_total;\n this.payments_count = payout.payments_count;\n this.payments_total = payout.payments_total;\n this.payout_type = payout.payout_type;\n this.other_total = payout.other_total;\n this.status = payout.status;\n this.metadata = payout.metadata;\n this.created_at = payout.created_at;\n this.updated_at = payout.updated_at;\n }\n}\n"],"version":3}
@@ -0,0 +1,107 @@
1
+ import { i as formatPercentage, b as formatCurrency, a as formatDate, d as formatTime } from './utils2.js';
2
+
3
+ var TagTypes;
4
+ (function (TagTypes) {
5
+ TagTypes["neutral"] = "neutral";
6
+ TagTypes["info"] = "info";
7
+ TagTypes["success"] = "success";
8
+ TagTypes["warning"] = "warning";
9
+ TagTypes["error"] = "error";
10
+ })(TagTypes || (TagTypes = {}));
11
+ var SubAccountStatusType;
12
+ (function (SubAccountStatusType) {
13
+ SubAccountStatusType["created"] = "created";
14
+ SubAccountStatusType["submitted"] = "submitted";
15
+ SubAccountStatusType["information_needed"] = "information_needed";
16
+ SubAccountStatusType["enabled"] = "enabled";
17
+ SubAccountStatusType["disabled"] = "disabled";
18
+ SubAccountStatusType["rejected"] = "rejected";
19
+ SubAccountStatusType["archived"] = "archived";
20
+ })(SubAccountStatusType || (SubAccountStatusType = {}));
21
+ var AccountType;
22
+ (function (AccountType) {
23
+ AccountType["live"] = "live";
24
+ AccountType["test"] = "test";
25
+ })(AccountType || (AccountType = {}));
26
+ var BusinessType;
27
+ (function (BusinessType) {
28
+ BusinessType["forProfit"] = "for_profit";
29
+ BusinessType["nonProfit"] = "non_profit";
30
+ BusinessType["government"] = "government_entity";
31
+ BusinessType["individual"] = "individual";
32
+ })(BusinessType || (BusinessType = {}));
33
+ var ForProfitStructure;
34
+ (function (ForProfitStructure) {
35
+ ForProfitStructure["none"] = "";
36
+ ForProfitStructure["soleProprietorship"] = "sole_proprietorship";
37
+ ForProfitStructure["singleMember"] = "single_llc";
38
+ ForProfitStructure["multiMember"] = "multi_llc";
39
+ ForProfitStructure["privatePartnership"] = "private_partnership";
40
+ ForProfitStructure["privateCorp"] = "private_corporation";
41
+ ForProfitStructure["unincorporatedAssociation"] = "unincorporated_association";
42
+ ForProfitStructure["publicPartnership"] = "public_partnership";
43
+ ForProfitStructure["publicCorp"] = "public_corporation";
44
+ })(ForProfitStructure || (ForProfitStructure = {}));
45
+ var NonProfitStructure;
46
+ (function (NonProfitStructure) {
47
+ NonProfitStructure["incorporated"] = "incorporated";
48
+ NonProfitStructure["unincorporated"] = "unincorporated";
49
+ })(NonProfitStructure || (NonProfitStructure = {}));
50
+ var GovernmentEntityStructure;
51
+ (function (GovernmentEntityStructure) {
52
+ GovernmentEntityStructure["unit"] = "government_unit";
53
+ GovernmentEntityStructure["instrumentality"] = "government_instrumentality";
54
+ GovernmentEntityStructure["taxExempt"] = "tax_exempt_government_instrumentality";
55
+ })(GovernmentEntityStructure || (GovernmentEntityStructure = {}));
56
+ class SubAccount {
57
+ constructor(subAccount) {
58
+ this.findActiveRate = (subAccount, type) => {
59
+ return subAccount.application_fee_rates.find(rate => rate.rate_type === type);
60
+ };
61
+ this.getBasisPercentage = (rate) => {
62
+ return formatPercentage(rate === null || rate === void 0 ? void 0 : rate.basis_point_rate);
63
+ };
64
+ this.getTransactionFee = (rate) => {
65
+ return formatCurrency(rate === null || rate === void 0 ? void 0 : rate.transaction_fee);
66
+ };
67
+ this.getFormattedRate = (rate) => {
68
+ return rate ?
69
+ `${this.getBasisPercentage(rate)} + ${this.getTransactionFee(rate)}`
70
+ : 'Not set';
71
+ };
72
+ this.account_type = subAccount.account_type;
73
+ this.application_fee_rates = subAccount.application_fee_rates || [];
74
+ this.created_at = subAccount.created_at;
75
+ this.dateString = formatDate(subAccount.created_at);
76
+ this.timeString = formatTime(subAccount.created_at);
77
+ this.currency = subAccount.currency;
78
+ this.id = subAccount.id;
79
+ this.name = subAccount.name;
80
+ this.payout_ready = subAccount.payout_ready;
81
+ this.platform_account_id = subAccount.platform_account_id;
82
+ this.processing_ready = subAccount.processing_ready;
83
+ this.status = subAccount.status;
84
+ this.updated_at = subAccount.updated_at;
85
+ this.related_accounts = subAccount.related_accounts || {};
86
+ const activeCardRate = this.findActiveRate(subAccount, 'cc');
87
+ const activeAchRate = this.findActiveRate(subAccount, 'ach');
88
+ this.cardRate = this.getFormattedRate(activeCardRate);
89
+ this.achRate = this.getFormattedRate(activeAchRate);
90
+ }
91
+ get statusTagType() {
92
+ const typeMap = {
93
+ [SubAccountStatusType.enabled]: TagTypes.success,
94
+ [SubAccountStatusType.disabled]: TagTypes.error,
95
+ [SubAccountStatusType.rejected]: TagTypes.error,
96
+ [SubAccountStatusType.information_needed]: TagTypes.warning,
97
+ [SubAccountStatusType.submitted]: TagTypes.info,
98
+ [SubAccountStatusType.created]: TagTypes.neutral,
99
+ [SubAccountStatusType.archived]: TagTypes.neutral,
100
+ };
101
+ return typeMap[this.status];
102
+ }
103
+ }
104
+
105
+ export { SubAccount as S };
106
+
107
+ //# sourceMappingURL=SubAccount.js.map
@@ -0,0 +1 @@
1
+ {"file":"SubAccount.js","mappings":";;AAGA,IAAY,QAMX;AAND,WAAY,QAAQ;EAClB,+BAAmB,CAAA;EACnB,yBAAa,CAAA;EACb,+BAAmB,CAAA;EACnB,+BAAmB,CAAA;EACnB,2BAAe,CAAA;AACjB,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAED,IAAY,oBAQX;AARD,WAAY,oBAAoB;EAC9B,2CAAmB,CAAA;EACnB,+CAAuB,CAAA;EACvB,iEAAyC,CAAA;EACzC,2CAAmB,CAAA;EACnB,6CAAqB,CAAA;EACrB,6CAAqB,CAAA;EACrB,6CAAqB,CAAA;AACvB,CAAC,EARW,oBAAoB,KAApB,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AU,EAAE,KAAK,CAAC,CAAC;IAC7D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IACtD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;GACrD;EAoBD,IAAI,aAAa;IACf,MAAM,OAAO,GAAG;MACd,CAAC,oBAAoB,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO;MAChD,CAAC,oBAAoB,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK;MAC/C,CAAC,oBAAoB,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK;MAC/C,CAAC,oBAAoB,CAAC,kBAAkB,GAAG,QAAQ,CAAC,OAAO;MAC3D,CAAC,oBAAoB,CAAC,SAAS,GAAG,QAAQ,CAAC,IAAI;MAC/C,CAAC,oBAAoB,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO;MAChD,CAAC,oBAAoB,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO;KAClD,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;GAC7B;;;;;","names":[],"sources":["src/api/SubAccount.ts"],"sourcesContent":["import { formatCurrency, formatDate, formatPercentage, formatTime } from '../utils/utils';\nimport { BusinessStructure } from './Business';\n\nexport enum TagTypes {\n neutral = 'neutral',\n info = 'info',\n success = 'success',\n warning = 'warning',\n error = 'error'\n}\n\nexport enum SubAccountStatusType {\n created = 'created',\n submitted = 'submitted',\n information_needed = 'information_needed',\n enabled = 'enabled',\n disabled = 'disabled',\n rejected = 'rejected',\n archived = 'archived'\n}\n\nexport enum AccountType {\n live = 'live',\n test = 'test'\n}\n\nexport enum BusinessType {\n forProfit = 'for_profit',\n nonProfit = 'non_profit',\n government = 'government_entity',\n individual = 'individual'\n}\n\nexport enum ForProfitStructure {\n none = '',\n soleProprietorship = 'sole_proprietorship',\n singleMember = 'single_llc',\n multiMember = 'multi_llc',\n privatePartnership = 'private_partnership',\n privateCorp = 'private_corporation',\n unincorporatedAssociation = 'unincorporated_association',\n publicPartnership = 'public_partnership',\n publicCorp = 'public_corporation'\n}\n\nexport enum NonProfitStructure {\n incorporated = 'incorporated',\n unincorporated = 'unincorporated'\n}\n\nexport enum GovernmentEntityStructure {\n unit = 'government_unit',\n instrumentality = 'government_instrumentality',\n taxExempt = 'tax_exempt_government_instrumentality'\n}\n\nexport interface ApplicationFeeRate {\n basis_point_rate: number,\n created_at: string,\n currency: string,\n id: string,\n rate_type: string,\n transaction_fee: number,\n updated_at: string\n}\n\nexport interface Legal {\n name?: string,\n address_line1?: string,\n address_line2?: string,\n address_city?: string,\n address_state?: string,\n address_postal_code?: string,\n address_country?: string\n}\n\nexport interface ISubAccount {\n account_type: AccountType,\n application_fee_rates: ApplicationFeeRate[] | [],\n created_at: string,\n currency: string,\n id: string,\n name: string,\n payout_ready: boolean,\n platform_account_id: string,\n processing_ready: boolean,\n status: SubAccountStatusType,\n updated_at: string\n related_accounts?: object,\n readonly statusTagType?: TagTypes\n};\n\nexport class SubAccount implements ISubAccount {\n public account_type: AccountType;\n public application_fee_rates: ApplicationFeeRate[] | [];\n public created_at: string;\n public dateString: string;\n public timeString: string;\n public currency: string;\n public id: string;\n public name: string;\n public payout_ready: boolean;\n public platform_account_id: string;\n public processing_ready: boolean;\n public status: SubAccountStatusType;\n public updated_at: string;\n public related_accounts: object;\n public cardRate: string | undefined;\n public achRate: string | undefined;\n\n constructor(subAccount: ISubAccount) {\n this.account_type = subAccount.account_type;\n this.application_fee_rates = subAccount.application_fee_rates || [];\n this.created_at = subAccount.created_at;\n this.dateString = formatDate(subAccount.created_at);\n this.timeString = formatTime(subAccount.created_at);\n this.currency = subAccount.currency;\n this.id = subAccount.id;\n this.name = subAccount.name;\n this.payout_ready = subAccount.payout_ready;\n this.platform_account_id = subAccount.platform_account_id;\n this.processing_ready = subAccount.processing_ready;\n this.status = subAccount.status;\n this.updated_at = subAccount.updated_at;\n this.related_accounts = subAccount.related_accounts || {};\n const activeCardRate = this.findActiveRate(subAccount, 'cc');\n const activeAchRate = this.findActiveRate(subAccount, 'ach');\n this.cardRate = this.getFormattedRate(activeCardRate);\n this.achRate = this.getFormattedRate(activeAchRate);\n }\n\n findActiveRate = (subAccount: ISubAccount, type: string): ApplicationFeeRate | undefined => {\n return subAccount.application_fee_rates.find(rate => rate.rate_type === type);\n };\n\n getBasisPercentage = (rate: ApplicationFeeRate | undefined): string | undefined => {\n return formatPercentage(rate?.basis_point_rate);\n };\n\n getTransactionFee = (rate: ApplicationFeeRate | undefined): string | undefined => {\n return formatCurrency(rate?.transaction_fee);\n };\n\n getFormattedRate = (rate: ApplicationFeeRate | undefined): string | undefined => {\n return rate ?\n `${this.getBasisPercentage(rate)} + ${this.getTransactionFee(rate)}`\n : 'Not set';\n };\n\n get statusTagType(): TagTypes {\n const typeMap = {\n [SubAccountStatusType.enabled]: TagTypes.success,\n [SubAccountStatusType.disabled]: TagTypes.error,\n [SubAccountStatusType.rejected]: TagTypes.error,\n [SubAccountStatusType.information_needed]: TagTypes.warning,\n [SubAccountStatusType.submitted]: TagTypes.info,\n [SubAccountStatusType.created]: TagTypes.neutral,\n [SubAccountStatusType.archived]: TagTypes.neutral,\n };\n return typeMap[this.status];\n }\n}\n\nexport interface SubAccountBusinessDetails {\n url?: string,\n type?: BusinessType,\n structure?: BusinessStructure,\n industry?: string,\n tax_id?: string,\n phone?: string,\n email?: string,\n date_of_incorporation?: string,\n approximate_annual_volume?: string,\n legal?: Legal,\n doing_business_as?: {name: string}\n}\n\nexport interface SubAccountIdentity {\n name?: string,\n title?: string,\n email?: string,\n identification_number?: string,\n dob_month?: string,\n dob_day?: string,\n dob_year?: string,\n address_line1?: string,\n address_line2?: string,\n address_city?: string,\n address_state?: string,\n address_postal_code?: string,\n address_country?: string,\n phone?: string,\n is_owner?: boolean,\n ssn_last4?: string\n}\n\nexport interface SubaccountBankAccount {\n bank_name?: string,\n account_nickname?: string,\n routing_number?: string,\n account_number?: string,\n account_type?: string,\n account_owner_name?: string\n}\n\nexport interface Terms {\n accepted?: boolean,\n ip?: string,\n user_agent?: string\n}\n\nexport interface IOnboardingPayload {\n onboarding_version: string,\n bank_account?: SubaccountBankAccount,\n business_details?: SubAccountBusinessDetails,\n representative?: SubAccountIdentity,\n terms_and_conditions?: Terms\n owners?: SubAccountIdentity[]\n}\n\nexport interface IOnboardingData {\n account_type?: AccountType,\n payload?: IOnboardingPayload,\n platform_account_id?: string,\n seller_account_id?: string,\n sub_account_id?: string\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface AdditionalQuestionsDetails extends Components.AdditionalQuestionsDetails, HTMLElement {}
4
+ export const AdditionalQuestionsDetails: {
5
+ prototype: AdditionalQuestionsDetails;
6
+ new (): AdditionalQuestionsDetails;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,8 @@
1
+ import { A as AdditionalQuestionsDetails$1, d as defineCustomElement$1 } from './additional-questions-details2.js';
2
+
3
+ const AdditionalQuestionsDetails = AdditionalQuestionsDetails$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { AdditionalQuestionsDetails, defineCustomElement };
7
+
8
+ //# sourceMappingURL=additional-questions-details.js.map
@@ -0,0 +1 @@
1
+ {"file":"additional-questions-details.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}