@justifi/webcomponents 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/dist/cjs/{Api-7303478d.js → Api-d2df6e84.js} +16 -4
  2. package/dist/cjs/Api-d2df6e84.js.map +1 -0
  3. package/dist/cjs/Payout-4906a445.js +116 -0
  4. package/dist/cjs/Payout-4906a445.js.map +1 -0
  5. package/dist/cjs/{business-form-schema-63b311b2.js → business-form-schema-725ec6f5.js} +40 -22
  6. package/dist/cjs/business-form-schema-725ec6f5.js.map +1 -0
  7. package/dist/cjs/form-control-datepart_2.cjs.entry.js +107 -0
  8. package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -0
  9. package/dist/cjs/form-control-monetary.cjs.entry.js +65 -0
  10. package/dist/cjs/form-control-monetary.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{form-control-select_2.cjs.entry.js → form-control-number_3.cjs.entry.js} +99 -12
  12. package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -0
  13. package/dist/cjs/form-control-select.cjs.entry.js +47 -0
  14. package/dist/cjs/form-control-select.cjs.entry.js.map +1 -0
  15. package/dist/cjs/{index-83b2ec02.js → index-4ffc90c0.js} +10 -1
  16. package/dist/cjs/index-4ffc90c0.js.map +1 -0
  17. package/dist/cjs/index-5a880722.js +3233 -0
  18. package/dist/cjs/index-5a880722.js.map +1 -0
  19. package/dist/cjs/{index.esm-7e12ce07.js → index.esm-84a0a7a8.js} +1 -19
  20. package/dist/cjs/index.esm-84a0a7a8.js.map +1 -0
  21. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +396 -0
  22. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +1 -0
  23. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
  24. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
  25. package/dist/cjs/justifi-business-form.cjs.entry.js +98 -16
  26. package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
  27. package/dist/cjs/justifi-business-list.cjs.entry.js +189 -0
  28. package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -0
  29. package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
  30. package/dist/cjs/justifi-details.cjs.entry.js +30 -0
  31. package/dist/cjs/justifi-details.cjs.entry.js.map +1 -0
  32. package/dist/cjs/justifi-payment-details.cjs.entry.js +63 -0
  33. package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -0
  34. package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
  35. package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
  36. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +7 -5
  37. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
  38. package/dist/cjs/justifi-payments-list.cjs.entry.js +49 -47
  39. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
  40. package/dist/cjs/justifi-payout-details.cjs.entry.js +61 -0
  41. package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -0
  42. package/dist/cjs/justifi-payouts-list.cjs.entry.js +64 -54
  43. package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
  44. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +156 -0
  45. package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -0
  46. package/dist/cjs/justifi-table.cjs.entry.js +68 -0
  47. package/dist/cjs/justifi-table.cjs.entry.js.map +1 -0
  48. package/dist/cjs/loader.cjs.js +2 -2
  49. package/dist/cjs/select-input_2.cjs.entry.js +1 -1
  50. package/dist/cjs/table-utils-617126e5.js +13 -0
  51. package/dist/cjs/table-utils-617126e5.js.map +1 -0
  52. package/dist/cjs/{utils-4ee7e080.js → utils-0fd61dbd.js} +43 -104
  53. package/dist/cjs/utils-0fd61dbd.js.map +1 -0
  54. package/dist/cjs/utils-a5b5bfdf.js +35 -0
  55. package/dist/cjs/utils-a5b5bfdf.js.map +1 -0
  56. package/dist/cjs/webcomponents.cjs.js +3 -3
  57. package/dist/cjs/webcomponents.cjs.js.map +1 -1
  58. package/dist/collection/api/Api.js +15 -3
  59. package/dist/collection/api/Api.js.map +1 -1
  60. package/dist/collection/api/Business.js +50 -0
  61. package/dist/collection/api/Business.js.map +1 -0
  62. package/dist/collection/api/Payment.js.map +1 -1
  63. package/dist/collection/api/Payout.js +9 -0
  64. package/dist/collection/api/Payout.js.map +1 -1
  65. package/dist/collection/api/Proceed.js +42 -0
  66. package/dist/collection/api/Proceed.js.map +1 -0
  67. package/dist/collection/api/shared.js +2 -0
  68. package/dist/collection/api/shared.js.map +1 -0
  69. package/dist/collection/collection-manifest.json +13 -1
  70. package/dist/collection/components/business-form/additional-questions/additional-questions.js +59 -0
  71. package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -0
  72. package/dist/collection/components/business-form/business-address/business-address-form.js +1 -1
  73. package/dist/collection/components/business-form/business-address/business-address-form.js.map +1 -1
  74. package/dist/collection/components/business-form/business-address/test/business-address.spec.js +22 -18
  75. package/dist/collection/components/business-form/business-address/test/business-address.spec.js.map +1 -1
  76. package/dist/collection/components/business-form/business-form-schema.js +48 -37
  77. package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
  78. package/dist/collection/components/business-form/business-form.css +5283 -43
  79. package/dist/collection/components/business-form/business-form.js +83 -6
  80. package/dist/collection/components/business-form/business-form.js.map +1 -1
  81. package/dist/collection/components/business-form/{businessForm.stories.js → business-form.stories.js} +8 -8
  82. package/dist/collection/components/business-form/business-form.stories.js.map +1 -0
  83. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +10 -17
  84. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
  85. package/dist/collection/components/business-form/business-owners/business-owners.css +5283 -0
  86. package/dist/collection/components/business-form/business-owners/business-owners.js +48 -37
  87. package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
  88. package/dist/collection/components/business-form/business-representative/business-representative.js +12 -17
  89. package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
  90. package/dist/collection/components/business-form/test/business-form.spec.js +44 -0
  91. package/dist/collection/components/business-form/test/business-form.spec.js.map +1 -0
  92. package/dist/collection/components/business-list/business-list.css +576 -0
  93. package/dist/collection/components/business-list/business-list.js +209 -0
  94. package/dist/collection/components/business-list/business-list.js.map +1 -0
  95. package/dist/collection/components/business-list/business-list.stories.js +68 -0
  96. package/dist/collection/components/business-list/business-list.stories.js.map +1 -0
  97. package/dist/collection/components/business-list/example.js +12 -0
  98. package/dist/collection/components/details/details.css +7983 -0
  99. package/dist/collection/components/details/details.js +66 -0
  100. package/dist/collection/components/details/details.js.map +1 -0
  101. package/dist/collection/components/details/utils.js +10 -0
  102. package/dist/collection/components/details/utils.js.map +1 -0
  103. package/dist/collection/components/form/form-control-datepart.js +233 -0
  104. package/dist/collection/components/form/form-control-datepart.js.map +1 -0
  105. package/dist/collection/components/form/form-control-monetary.js +186 -0
  106. package/dist/collection/components/form/form-control-monetary.js.map +1 -0
  107. package/dist/collection/components/form/form-control-number-masked.js +217 -0
  108. package/dist/collection/components/form/form-control-number-masked.js.map +1 -0
  109. package/dist/collection/components/form/form-control-number.css +1818 -0
  110. package/dist/collection/components/form/form-control-number.js +194 -0
  111. package/dist/collection/components/form/form-control-number.js.map +1 -0
  112. package/dist/collection/components/form/form-control-select.css +6 -0
  113. package/dist/collection/components/form/form-control-select.js +36 -4
  114. package/dist/collection/components/form/form-control-select.js.map +1 -1
  115. package/dist/collection/components/form/form-control-text.css +7 -0
  116. package/dist/collection/components/form/form-control-text.js +45 -3
  117. package/dist/collection/components/form/form-control-text.js.map +1 -1
  118. package/dist/collection/components/form/form.js +16 -8
  119. package/dist/collection/components/form/form.js.map +1 -1
  120. package/dist/collection/components/legal-address-form/legal-address-form-schema.js +11 -0
  121. package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +1 -0
  122. package/dist/collection/components/legal-address-form/legal-address-form.css +2489 -0
  123. package/dist/collection/components/legal-address-form/legal-address-form.js +90 -0
  124. package/dist/collection/components/legal-address-form/legal-address-form.js.map +1 -0
  125. package/dist/collection/components/payment-details/example.js +12 -0
  126. package/dist/collection/components/payment-details/payment-details.css +7983 -0
  127. package/dist/collection/components/payment-details/payment-details.js +129 -0
  128. package/dist/collection/components/payment-details/payment-details.js.map +1 -0
  129. package/dist/collection/components/payment-details/payment-details.stories.js +47 -0
  130. package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -0
  131. package/dist/collection/components/payments-list/payments-list.css +0 -7380
  132. package/dist/collection/components/payments-list/payments-list.js +69 -43
  133. package/dist/collection/components/payments-list/payments-list.js.map +1 -1
  134. package/dist/collection/components/payments-list/payments-list.stories.js +10 -10
  135. package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
  136. package/dist/collection/components/payments-list/test/payments-list.spec.js +3 -54
  137. package/dist/collection/components/payments-list/test/payments-list.spec.js.map +1 -1
  138. package/dist/collection/components/payout-details/example.js +12 -0
  139. package/dist/collection/components/payout-details/payout-details.css +7983 -0
  140. package/dist/collection/components/payout-details/payout-details.js +126 -0
  141. package/dist/collection/components/payout-details/payout-details.js.map +1 -0
  142. package/dist/collection/components/payout-details/payout-details.stories.js +47 -0
  143. package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -0
  144. package/dist/collection/components/payouts-list/example.js +12 -0
  145. package/dist/collection/components/payouts-list/payouts-list.css +0 -7407
  146. package/dist/collection/components/payouts-list/payouts-list.js +82 -48
  147. package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
  148. package/dist/collection/components/payouts-list/payouts-list.stories.js +10 -10
  149. package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
  150. package/dist/collection/components/proceeds-list/example.js +12 -0
  151. package/dist/collection/components/proceeds-list/proceeds-list.css +576 -0
  152. package/dist/collection/components/proceeds-list/proceeds-list.js +207 -0
  153. package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -0
  154. package/dist/collection/components/proceeds-list/proceeds-list.stories.js +69 -0
  155. package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -0
  156. package/dist/collection/components/table/table-utils.js +8 -0
  157. package/dist/collection/components/table/table-utils.js.map +1 -0
  158. package/dist/collection/components/table/table.css +8077 -0
  159. package/dist/collection/components/table/table.js +215 -0
  160. package/dist/collection/components/table/table.js.map +1 -0
  161. package/dist/collection/components/table/test/table.spec.js +59 -0
  162. package/dist/collection/components/table/test/table.spec.js.map +1 -0
  163. package/dist/collection/utils/country-options.js +202 -0
  164. package/dist/collection/utils/country-options.js.map +1 -0
  165. package/dist/collection/utils/phone-masks.js +4 -0
  166. package/dist/collection/utils/phone-masks.js.map +1 -0
  167. package/dist/collection/utils/utils.js +40 -0
  168. package/dist/collection/utils/utils.js.map +1 -1
  169. package/dist/components/Api.js +15 -3
  170. package/dist/components/Api.js.map +1 -1
  171. package/dist/components/Payout.js +113 -0
  172. package/dist/components/Payout.js.map +1 -0
  173. package/dist/components/additional-questions.js +51 -0
  174. package/dist/components/additional-questions.js.map +1 -0
  175. package/dist/components/business-address-form.js +8 -2
  176. package/dist/components/business-address-form.js.map +1 -1
  177. package/dist/components/business-generic-info.js +61 -35
  178. package/dist/components/business-generic-info.js.map +1 -1
  179. package/dist/components/business-owners.js +52 -36
  180. package/dist/components/business-owners.js.map +1 -1
  181. package/dist/components/business-representative.js +31 -15
  182. package/dist/components/business-representative.js.map +1 -1
  183. package/dist/components/details.js +66 -0
  184. package/dist/components/details.js.map +1 -0
  185. package/dist/components/form-control-datepart.d.ts +11 -0
  186. package/dist/components/form-control-datepart.js +8 -0
  187. package/dist/components/form-control-datepart.js.map +1 -0
  188. package/dist/components/form-control-datepart2.js +97 -0
  189. package/dist/components/form-control-datepart2.js.map +1 -0
  190. package/dist/components/form-control-monetary.d.ts +11 -0
  191. package/dist/components/form-control-monetary.js +8 -0
  192. package/dist/components/form-control-monetary.js.map +1 -0
  193. package/dist/components/form-control-monetary2.js +82 -0
  194. package/dist/components/form-control-monetary2.js.map +1 -0
  195. package/dist/components/form-control-number-masked.d.ts +11 -0
  196. package/dist/components/form-control-number-masked.js +8 -0
  197. package/dist/components/form-control-number-masked.js.map +1 -0
  198. package/dist/components/form-control-number-masked2.js +81 -0
  199. package/dist/components/form-control-number-masked2.js.map +1 -0
  200. package/dist/components/form-control-number.d.ts +11 -0
  201. package/dist/components/form-control-number.js +8 -0
  202. package/dist/components/form-control-number.js.map +1 -0
  203. package/dist/components/form-control-number2.js +70 -0
  204. package/dist/components/form-control-number2.js.map +1 -0
  205. package/dist/components/form-control-select.js +2 -2
  206. package/dist/components/form-control-select2.js +20 -7
  207. package/dist/components/form-control-select2.js.map +1 -1
  208. package/dist/components/form-control-text2.js +23 -4
  209. package/dist/components/form-control-text2.js.map +1 -1
  210. package/dist/components/index.d.ts +6 -0
  211. package/dist/components/index.esm.js +1 -18
  212. package/dist/components/index.esm.js.map +1 -1
  213. package/dist/components/index.js +1 -1
  214. package/dist/components/index2.js +3231 -0
  215. package/dist/components/index2.js.map +1 -0
  216. package/dist/components/justifi-additional-questions.d.ts +11 -0
  217. package/dist/components/justifi-additional-questions.js +8 -0
  218. package/dist/components/justifi-additional-questions.js.map +1 -0
  219. package/dist/components/justifi-business-form.js +146 -28
  220. package/dist/components/justifi-business-form.js.map +1 -1
  221. package/dist/components/justifi-business-generic-info.js +1 -1
  222. package/dist/components/justifi-business-list.d.ts +11 -0
  223. package/dist/components/justifi-business-list.js +215 -0
  224. package/dist/components/justifi-business-list.js.map +1 -0
  225. package/dist/components/justifi-details.d.ts +11 -0
  226. package/dist/components/justifi-details.js +8 -0
  227. package/dist/components/justifi-details.js.map +1 -0
  228. package/dist/components/justifi-legal-address-form.d.ts +11 -0
  229. package/dist/components/justifi-legal-address-form.js +8 -0
  230. package/dist/components/justifi-legal-address-form.js.map +1 -0
  231. package/dist/components/justifi-payment-details.d.ts +11 -0
  232. package/dist/components/justifi-payment-details.js +88 -0
  233. package/dist/components/justifi-payment-details.js.map +1 -0
  234. package/dist/components/justifi-payment-form.js +2 -1
  235. package/dist/components/justifi-payment-form.js.map +1 -1
  236. package/dist/components/justifi-payments-list.js +52 -45
  237. package/dist/components/justifi-payments-list.js.map +1 -1
  238. package/dist/components/justifi-payout-details.d.ts +11 -0
  239. package/dist/components/justifi-payout-details.js +86 -0
  240. package/dist/components/justifi-payout-details.js.map +1 -0
  241. package/dist/components/justifi-payouts-list.js +65 -50
  242. package/dist/components/justifi-payouts-list.js.map +1 -1
  243. package/dist/components/justifi-proceeds-list.d.ts +11 -0
  244. package/dist/components/justifi-proceeds-list.js +182 -0
  245. package/dist/components/justifi-proceeds-list.js.map +1 -0
  246. package/dist/components/justifi-table.d.ts +11 -0
  247. package/dist/components/justifi-table.js +8 -0
  248. package/dist/components/justifi-table.js.map +1 -0
  249. package/dist/components/legal-address-form.js +271 -0
  250. package/dist/components/legal-address-form.js.map +1 -0
  251. package/dist/components/payment-method-form.js +6 -4
  252. package/dist/components/payment-method-form.js.map +1 -1
  253. package/dist/components/phone-masks.js +7 -0
  254. package/dist/components/phone-masks.js.map +1 -0
  255. package/dist/components/table.js +94 -0
  256. package/dist/components/table.js.map +1 -0
  257. package/dist/components/utils.js +41 -102
  258. package/dist/components/utils.js.map +1 -1
  259. package/dist/esm/{Api-436dfa09.js → Api-a95f17ac.js} +16 -4
  260. package/dist/esm/Api-a95f17ac.js.map +1 -0
  261. package/dist/esm/Payout-9a1f2859.js +113 -0
  262. package/dist/esm/Payout-9a1f2859.js.map +1 -0
  263. package/dist/esm/{business-form-schema-30c48693.js → business-form-schema-5885d3d6.js} +40 -22
  264. package/dist/esm/business-form-schema-5885d3d6.js.map +1 -0
  265. package/dist/esm/form-control-datepart_2.entry.js +102 -0
  266. package/dist/esm/form-control-datepart_2.entry.js.map +1 -0
  267. package/dist/esm/form-control-monetary.entry.js +61 -0
  268. package/dist/esm/form-control-monetary.entry.js.map +1 -0
  269. package/dist/esm/{form-control-select_2.entry.js → form-control-number_3.entry.js} +98 -12
  270. package/dist/esm/form-control-number_3.entry.js.map +1 -0
  271. package/dist/esm/form-control-select.entry.js +43 -0
  272. package/dist/esm/form-control-select.entry.js.map +1 -0
  273. package/dist/esm/index-5ed53c20.js +3231 -0
  274. package/dist/esm/index-5ed53c20.js.map +1 -0
  275. package/dist/esm/{index-c8f391de.js → index-609a2c67.js} +10 -2
  276. package/dist/esm/index-609a2c67.js.map +1 -0
  277. package/dist/esm/{index.esm-be2cd327.js → index.esm-89fe6af9.js} +2 -19
  278. package/dist/esm/index.esm-89fe6af9.js.map +1 -0
  279. package/dist/esm/justifi-additional-questions_5.entry.js +388 -0
  280. package/dist/esm/justifi-additional-questions_5.entry.js.map +1 -0
  281. package/dist/esm/justifi-bank-account-form.entry.js +1 -1
  282. package/dist/esm/justifi-billing-form_2.entry.js +2 -2
  283. package/dist/esm/justifi-business-form.entry.js +98 -16
  284. package/dist/esm/justifi-business-form.entry.js.map +1 -1
  285. package/dist/esm/justifi-business-list.entry.js +185 -0
  286. package/dist/esm/justifi-business-list.entry.js.map +1 -0
  287. package/dist/esm/justifi-card-form.entry.js +1 -1
  288. package/dist/esm/justifi-details.entry.js +26 -0
  289. package/dist/esm/justifi-details.entry.js.map +1 -0
  290. package/dist/esm/justifi-payment-details.entry.js +59 -0
  291. package/dist/esm/justifi-payment-details.entry.js.map +1 -0
  292. package/dist/esm/justifi-payment-form.entry.js +3 -2
  293. package/dist/esm/justifi-payment-form.entry.js.map +1 -1
  294. package/dist/esm/justifi-payment-method-form.entry.js +7 -5
  295. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
  296. package/dist/esm/justifi-payments-list.entry.js +47 -45
  297. package/dist/esm/justifi-payments-list.entry.js.map +1 -1
  298. package/dist/esm/justifi-payout-details.entry.js +57 -0
  299. package/dist/esm/justifi-payout-details.entry.js.map +1 -0
  300. package/dist/esm/justifi-payouts-list.entry.js +60 -50
  301. package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
  302. package/dist/esm/justifi-proceeds-list.entry.js +152 -0
  303. package/dist/esm/justifi-proceeds-list.entry.js.map +1 -0
  304. package/dist/esm/justifi-table.entry.js +64 -0
  305. package/dist/esm/justifi-table.entry.js.map +1 -0
  306. package/dist/esm/loader.js +3 -3
  307. package/dist/esm/select-input_2.entry.js +1 -1
  308. package/dist/esm/table-utils-6cdcaa8c.js +11 -0
  309. package/dist/esm/table-utils-6cdcaa8c.js.map +1 -0
  310. package/dist/esm/{utils-e7782126.js → utils-ad0bbe03.js} +42 -103
  311. package/dist/esm/utils-ad0bbe03.js.map +1 -0
  312. package/dist/esm/utils-cdf0b984.js +28 -0
  313. package/dist/esm/utils-cdf0b984.js.map +1 -0
  314. package/dist/esm/webcomponents.js +4 -4
  315. package/dist/esm/webcomponents.js.map +1 -1
  316. package/dist/types/api/Api.d.ts +1 -1
  317. package/dist/types/api/Business.d.ts +133 -0
  318. package/dist/types/api/Payment.d.ts +1 -0
  319. package/dist/types/api/Payout.d.ts +10 -12
  320. package/dist/types/api/Proceed.d.ts +60 -0
  321. package/dist/types/api/shared.d.ts +11 -0
  322. package/dist/types/components/business-form/additional-questions/additional-questions.d.ts +15 -0
  323. package/dist/types/components/business-form/business-form-schema.d.ts +47 -21
  324. package/dist/types/components/business-form/business-form.d.ts +7 -2
  325. package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +1 -2
  326. package/dist/types/components/business-form/business-owners/business-owners.d.ts +3 -2
  327. package/dist/types/components/business-form/business-representative/business-representative.d.ts +1 -2
  328. package/dist/types/components/business-list/business-list.d.ts +35 -0
  329. package/dist/types/components/business-list/business-list.stories.d.ts +9 -0
  330. package/dist/types/components/details/details.d.ts +7 -0
  331. package/dist/types/components/details/utils.d.ts +19 -0
  332. package/dist/types/components/form/form-control-datepart.d.ts +19 -0
  333. package/dist/types/components/form/form-control-monetary.d.ts +17 -0
  334. package/dist/types/components/form/form-control-number-masked.d.ts +19 -0
  335. package/dist/types/components/form/form-control-number.d.ts +18 -0
  336. package/dist/types/components/form/form-control-select.d.ts +6 -1
  337. package/dist/types/components/form/form-control-text.d.ts +6 -0
  338. package/dist/types/components/form/form.d.ts +5 -4
  339. package/dist/types/components/legal-address-form/legal-address-form-schema.d.ts +17 -0
  340. package/dist/types/components/legal-address-form/legal-address-form.d.ts +16 -0
  341. package/dist/types/components/payment-details/payment-details.d.ts +28 -0
  342. package/dist/types/components/payment-details/payment-details.stories.d.ts +8 -0
  343. package/dist/types/components/payments-list/payments-list.d.ts +6 -14
  344. package/dist/types/components/payments-list/payments-list.stories.d.ts +1 -8
  345. package/dist/types/components/payout-details/payout-details.d.ts +28 -0
  346. package/dist/types/components/payout-details/payout-details.stories.d.ts +8 -0
  347. package/dist/types/components/payouts-list/payouts-list.d.ts +7 -15
  348. package/dist/types/components/payouts-list/payouts-list.stories.d.ts +1 -8
  349. package/dist/types/components/proceeds-list/proceeds-list.d.ts +37 -0
  350. package/dist/types/components/proceeds-list/proceeds-list.stories.d.ts +9 -0
  351. package/dist/types/components/table/table-utils.d.ts +14 -0
  352. package/dist/types/components/table/table.d.ts +28 -0
  353. package/dist/types/components.d.ts +635 -12
  354. package/dist/types/stencil-public-runtime.d.ts +2 -0
  355. package/dist/types/utils/country-options.d.ts +5 -0
  356. package/dist/types/utils/phone-masks.d.ts +3 -0
  357. package/dist/types/utils/utils.d.ts +2 -0
  358. package/dist/webcomponents/{p-33d69eb5.entry.js → p-0237a6bc.entry.js} +2 -2
  359. package/dist/webcomponents/p-0237a6bc.entry.js.map +1 -0
  360. package/dist/webcomponents/{p-7041a637.entry.js → p-0d6e9f76.entry.js} +2 -2
  361. package/dist/webcomponents/p-126146d4.js +2 -0
  362. package/dist/webcomponents/p-126146d4.js.map +1 -0
  363. package/dist/webcomponents/p-239564c6.entry.js +2 -0
  364. package/dist/webcomponents/p-239564c6.entry.js.map +1 -0
  365. package/dist/webcomponents/p-27b15fe8.entry.js +2 -0
  366. package/dist/webcomponents/p-27b15fe8.entry.js.map +1 -0
  367. package/dist/webcomponents/p-2c2cde2d.js +2 -0
  368. package/dist/webcomponents/p-2c2cde2d.js.map +1 -0
  369. package/dist/webcomponents/p-308b6784.js +3 -0
  370. package/dist/webcomponents/p-308b6784.js.map +1 -0
  371. package/dist/webcomponents/p-391b8f1d.entry.js +2 -0
  372. package/dist/webcomponents/p-391b8f1d.entry.js.map +1 -0
  373. package/dist/webcomponents/p-439fc294.entry.js +2 -0
  374. package/dist/webcomponents/p-439fc294.entry.js.map +1 -0
  375. package/dist/webcomponents/p-66f010e5.entry.js +2 -0
  376. package/dist/webcomponents/{p-d5bc9f22.entry.js.map → p-66f010e5.entry.js.map} +1 -1
  377. package/dist/webcomponents/p-7abb092c.entry.js +2 -0
  378. package/dist/webcomponents/{p-309a886f.entry.js.map → p-7abb092c.entry.js.map} +1 -1
  379. package/dist/webcomponents/{p-d5cadc78.entry.js → p-7e3bbe32.entry.js} +2 -2
  380. package/dist/webcomponents/p-86464cab.entry.js +2 -0
  381. package/dist/webcomponents/p-86464cab.entry.js.map +1 -0
  382. package/dist/webcomponents/p-8f421dc6.js +2 -0
  383. package/dist/webcomponents/p-8f421dc6.js.map +1 -0
  384. package/dist/webcomponents/p-9346ae33.js +2 -0
  385. package/dist/webcomponents/p-9346ae33.js.map +1 -0
  386. package/dist/webcomponents/p-ab0756ff.js +2 -0
  387. package/dist/webcomponents/p-ab0756ff.js.map +1 -0
  388. package/dist/webcomponents/p-b042bf80.entry.js +2 -0
  389. package/dist/webcomponents/p-b042bf80.entry.js.map +1 -0
  390. package/dist/webcomponents/{p-1953797f.entry.js → p-b967262f.entry.js} +2 -2
  391. package/dist/webcomponents/p-bf9c2be2.entry.js +2 -0
  392. package/dist/webcomponents/p-bf9c2be2.entry.js.map +1 -0
  393. package/dist/webcomponents/p-c18d876e.entry.js +2 -0
  394. package/dist/webcomponents/p-c18d876e.entry.js.map +1 -0
  395. package/dist/webcomponents/p-c1e4288d.entry.js +2 -0
  396. package/dist/webcomponents/p-c1e4288d.entry.js.map +1 -0
  397. package/dist/webcomponents/{p-0fd4aae2.js → p-c46241ba.js} +2 -2
  398. package/dist/webcomponents/p-c46241ba.js.map +1 -0
  399. package/dist/webcomponents/p-ccb0e1c5.js +2 -0
  400. package/dist/webcomponents/p-ccb0e1c5.js.map +1 -0
  401. package/dist/webcomponents/p-d1bbf409.entry.js +2 -0
  402. package/dist/webcomponents/p-d1bbf409.entry.js.map +1 -0
  403. package/dist/webcomponents/p-e26d7eea.entry.js +2 -0
  404. package/dist/webcomponents/p-e26d7eea.entry.js.map +1 -0
  405. package/dist/webcomponents/{p-23e9c7d4.entry.js → p-e77d8c6e.entry.js} +2 -2
  406. package/dist/webcomponents/p-f0acb27e.entry.js +2 -0
  407. package/dist/webcomponents/p-f0acb27e.entry.js.map +1 -0
  408. package/dist/webcomponents/p-f8d49acb.entry.js +2 -0
  409. package/dist/webcomponents/p-f8d49acb.entry.js.map +1 -0
  410. package/dist/webcomponents/p-f9e127a5.js +2 -0
  411. package/dist/webcomponents/p-f9e127a5.js.map +1 -0
  412. package/dist/webcomponents/webcomponents.esm.js +1 -1
  413. package/dist/webcomponents/webcomponents.esm.js.map +1 -1
  414. package/package.json +7 -5
  415. package/dist/cjs/Api-7303478d.js.map +0 -1
  416. package/dist/cjs/business-form-schema-63b311b2.js.map +0 -1
  417. package/dist/cjs/form-control-select_2.cjs.entry.js.map +0 -1
  418. package/dist/cjs/index-83b2ec02.js.map +0 -1
  419. package/dist/cjs/index.esm-7e12ce07.js.map +0 -1
  420. package/dist/cjs/justifi-business-address-form.cjs.entry.js +0 -37
  421. package/dist/cjs/justifi-business-address-form.cjs.entry.js.map +0 -1
  422. package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js +0 -148
  423. package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js.map +0 -1
  424. package/dist/cjs/utils-4ee7e080.js.map +0 -1
  425. package/dist/collection/components/business-form/businessForm.stories.js.map +0 -1
  426. package/dist/esm/Api-436dfa09.js.map +0 -1
  427. package/dist/esm/business-form-schema-30c48693.js.map +0 -1
  428. package/dist/esm/form-control-select_2.entry.js.map +0 -1
  429. package/dist/esm/index-c8f391de.js.map +0 -1
  430. package/dist/esm/index.esm-be2cd327.js.map +0 -1
  431. package/dist/esm/justifi-business-address-form.entry.js +0 -33
  432. package/dist/esm/justifi-business-address-form.entry.js.map +0 -1
  433. package/dist/esm/justifi-business-generic-info_3.entry.js +0 -142
  434. package/dist/esm/justifi-business-generic-info_3.entry.js.map +0 -1
  435. package/dist/esm/utils-e7782126.js.map +0 -1
  436. package/dist/webcomponents/p-0fd4aae2.js.map +0 -1
  437. package/dist/webcomponents/p-1a1f2196.js +0 -2
  438. package/dist/webcomponents/p-1a1f2196.js.map +0 -1
  439. package/dist/webcomponents/p-309a886f.entry.js +0 -2
  440. package/dist/webcomponents/p-33d69eb5.entry.js.map +0 -1
  441. package/dist/webcomponents/p-3a80a2ec.entry.js +0 -2
  442. package/dist/webcomponents/p-3a80a2ec.entry.js.map +0 -1
  443. package/dist/webcomponents/p-45fea6a8.entry.js +0 -2
  444. package/dist/webcomponents/p-45fea6a8.entry.js.map +0 -1
  445. package/dist/webcomponents/p-79456add.js +0 -2
  446. package/dist/webcomponents/p-79456add.js.map +0 -1
  447. package/dist/webcomponents/p-af080b21.js +0 -2
  448. package/dist/webcomponents/p-af080b21.js.map +0 -1
  449. package/dist/webcomponents/p-bc969904.js +0 -3
  450. package/dist/webcomponents/p-bc969904.js.map +0 -1
  451. package/dist/webcomponents/p-cd097ce9.entry.js +0 -2
  452. package/dist/webcomponents/p-cd097ce9.entry.js.map +0 -1
  453. package/dist/webcomponents/p-d5bc9f22.entry.js +0 -2
  454. package/dist/webcomponents/p-dd1ebc0b.entry.js +0 -2
  455. package/dist/webcomponents/p-dd1ebc0b.entry.js.map +0 -1
  456. package/dist/webcomponents/p-e05e0c6b.entry.js +0 -2
  457. package/dist/webcomponents/p-e05e0c6b.entry.js.map +0 -1
  458. /package/dist/types/components/business-form/{businessForm.stories.d.ts → business-form.stories.d.ts} +0 -0
  459. /package/dist/webcomponents/{p-7041a637.entry.js.map → p-0d6e9f76.entry.js.map} +0 -0
  460. /package/dist/webcomponents/{p-d5cadc78.entry.js.map → p-7e3bbe32.entry.js.map} +0 -0
  461. /package/dist/webcomponents/{p-1953797f.entry.js.map → p-b967262f.entry.js.map} +0 -0
  462. /package/dist/webcomponents/{p-23e9c7d4.entry.js.map → p-e77d8c6e.entry.js.map} +0 -0
@@ -65,9 +65,9 @@ function v4(options, buf, offset) {
65
65
  return unsafeStringify(rnds);
66
66
  }
67
67
 
68
- const Api = (authToken) => {
68
+ const Api = (authToken, customApiOrigin) => {
69
69
  const originFromEnv = process.env.API_ORIGIN;
70
- const apiOrigin = originFromEnv || 'https://justifi.ai';
70
+ const apiOrigin = customApiOrigin || originFromEnv || 'https://justifi.ai';
71
71
  async function getAuthorizationHeader() {
72
72
  return {
73
73
  'Authorization': `Bearer ${authToken}`,
@@ -77,7 +77,19 @@ const Api = (authToken) => {
77
77
  }
78
78
  async function makeRequest(endpoint, method, params, body, signal) {
79
79
  const url = `${apiOrigin}/v1/${endpoint}`;
80
- const requestUrl = params ? `${url}?${new URLSearchParams(params)}` : url;
80
+ let cursor;
81
+ if (params === null || params === void 0 ? void 0 : params.paging) {
82
+ cursor = (params === null || params === void 0 ? void 0 : params.paging) && (params === null || params === void 0 ? void 0 : params.direction) ? `${params.direction === 'prev'
83
+ ? '&before_cursor=' + params.paging.start_cursor
84
+ : params.direction === 'next'
85
+ ? '&after_cursor=' + params.paging.end_cursor
86
+ : ''}` : null;
87
+ delete params.paging;
88
+ }
89
+ if (params === null || params === void 0 ? void 0 : params.direction) {
90
+ delete params.direction;
91
+ }
92
+ const requestUrl = params ? `${url}?${new URLSearchParams(params)}${cursor ? '&' + cursor : ''}` : url;
81
93
  const response = await fetch(requestUrl, {
82
94
  method: method,
83
95
  headers: await getAuthorizationHeader(),
@@ -109,4 +121,4 @@ function handleError(requestUrl) {
109
121
 
110
122
  exports.Api = Api;
111
123
 
112
- //# sourceMappingURL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AI,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 { 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 = process.env.API_ORIGIN;\n const apiOrigin = customApiOrigin || originFromEnv || 'https://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 ? `${\n 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}
@@ -0,0 +1,116 @@
1
+ 'use strict';
2
+
3
+ var CaptureStrategy;
4
+ (function (CaptureStrategy) {
5
+ CaptureStrategy["automatic"] = "automatic";
6
+ CaptureStrategy["manual"] = "manual";
7
+ })(CaptureStrategy || (CaptureStrategy = {}));
8
+ exports.PaymentMethodTypes = void 0;
9
+ (function (PaymentMethodTypes) {
10
+ PaymentMethodTypes["card"] = "card";
11
+ PaymentMethodTypes["bankAccount"] = "bankAccount";
12
+ })(exports.PaymentMethodTypes || (exports.PaymentMethodTypes = {}));
13
+ var PaymentStatuses;
14
+ (function (PaymentStatuses) {
15
+ PaymentStatuses["pending"] = "pending";
16
+ PaymentStatuses["authorized"] = "authorized";
17
+ PaymentStatuses["succeeded"] = "succeeded";
18
+ PaymentStatuses["failed"] = "failed";
19
+ PaymentStatuses["disputed"] = "disputed";
20
+ PaymentStatuses["fully_refunded"] = "fully_refunded";
21
+ PaymentStatuses["partially_refunded"] = "partially_refunded";
22
+ })(PaymentStatuses || (PaymentStatuses = {}));
23
+ var PaymentDisputedStatuses;
24
+ (function (PaymentDisputedStatuses) {
25
+ // if a dispute is 'won', we don't show a dispute status, just general status
26
+ PaymentDisputedStatuses["lost"] = "lost";
27
+ PaymentDisputedStatuses["open"] = "open";
28
+ })(PaymentDisputedStatuses || (PaymentDisputedStatuses = {}));
29
+ class Payment {
30
+ constructor(payment) {
31
+ this.id = payment.id;
32
+ this.account_id = payment.account_id;
33
+ this.amount = payment.amount;
34
+ this.amount_disputed = payment.amount_disputed;
35
+ this.amount_refundable = payment.amount_refundable;
36
+ this.amount_refunded = payment.amount_refunded;
37
+ this.balance = payment.balance;
38
+ this.captured = payment.captured;
39
+ this.capture_strategy = payment.capture_strategy;
40
+ this.currency = payment.currency;
41
+ this.description = payment.description;
42
+ this.disputed = payment.disputed;
43
+ this.disputes = payment.disputes;
44
+ this.error_code = payment.error_code;
45
+ this.error_description = payment.error_description;
46
+ this.fee_amount = payment.fee_amount;
47
+ this.is_test = payment.is_test;
48
+ this.metadata = payment.metadata;
49
+ this.payment_method = payment.payment_method;
50
+ this.payment_intent_id = payment.payment_intent_id;
51
+ this.refunded = payment.refunded;
52
+ this.status = payment.status;
53
+ this.created_at = payment.created_at;
54
+ this.updated_at = payment.updated_at;
55
+ }
56
+ get disputedStatus() {
57
+ const lost = this.disputes.some(dispute => dispute.status === PaymentDisputedStatuses.lost);
58
+ // if a dispute is 'won', we don't show a dispute status, just general status
59
+ if (!this.disputed) {
60
+ return null;
61
+ }
62
+ else if (lost) {
63
+ return PaymentDisputedStatuses.lost;
64
+ }
65
+ else {
66
+ return PaymentDisputedStatuses.open;
67
+ }
68
+ }
69
+ }
70
+
71
+ exports.PayoutStatuses = void 0;
72
+ (function (PayoutStatuses) {
73
+ PayoutStatuses["paid"] = "paid";
74
+ PayoutStatuses["failed"] = "failed";
75
+ PayoutStatuses["forwarded"] = "forwarded";
76
+ PayoutStatuses["scheduled"] = "scheduled";
77
+ PayoutStatuses["in_transit"] = "in_transit";
78
+ PayoutStatuses["canceled"] = "canceled";
79
+ })(exports.PayoutStatuses || (exports.PayoutStatuses = {}));
80
+ exports.PayoutStatusesSafeNames = void 0;
81
+ (function (PayoutStatusesSafeNames) {
82
+ PayoutStatusesSafeNames["paid"] = "Paid";
83
+ PayoutStatusesSafeNames["failed"] = "Failed";
84
+ PayoutStatusesSafeNames["forwarded"] = "Forwarded";
85
+ PayoutStatusesSafeNames["scheduled"] = "Scheduled";
86
+ PayoutStatusesSafeNames["in_transit"] = "In Transit";
87
+ PayoutStatusesSafeNames["canceled"] = "Canceled";
88
+ })(exports.PayoutStatusesSafeNames || (exports.PayoutStatusesSafeNames = {}));
89
+ class Payout {
90
+ constructor(payout) {
91
+ this.id = payout.id;
92
+ this.account_id = payout.account_id;
93
+ this.amount = payout.amount;
94
+ this.bank_account = payout.bank_account;
95
+ this.currency = payout.currency;
96
+ this.delivery_method = payout.delivery_method || 'standard';
97
+ this.description = payout.description;
98
+ this.deposits_at = payout.deposits_at;
99
+ this.fees_total = payout.fees_total;
100
+ this.refunds_count = payout.refunds_count;
101
+ this.refunds_total = payout.refunds_total;
102
+ this.payments_count = payout.payments_count;
103
+ this.payments_total = payout.payments_total;
104
+ this.payout_type = payout.payout_type;
105
+ this.other_total = payout.other_total;
106
+ this.status = payout.status;
107
+ this.metadata = payout.metadata;
108
+ this.created_at = payout.created_at;
109
+ this.updated_at = payout.updated_at;
110
+ }
111
+ }
112
+
113
+ exports.Payment = Payment;
114
+ exports.Payout = Payout;
115
+
116
+ //# sourceMappingURL=Payout-4906a445.js.map
@@ -0,0 +1 @@
1
+ {"file":"Payout-4906a445.js","mappings":";;AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;EACzB,0CAAuB,CAAA;EACvB,oCAAiB,CAAA;AACnB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAEWA;AAAZ,WAAY,kBAAkB;EAC5B,mCAAa,CAAA;EACb,iDAA2B,CAAA;AAC7B,CAAC,EAHWA,0BAAkB,KAAlBA,0BAAkB,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;MAyDY,OAAO;EA2BlB,YAAY,OAAiB;IAC3B,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;IACrB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,C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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":["PaymentMethodTypes","PayoutStatuses","PayoutStatusesSafeNames"],"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}\n\nexport type CardBrand = 'american_express' | 'diners_club' | 'discover' | 'jcb' | 'mastercard' | 'china_unionpay' | 'visa' | 'unknown';\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,8 +1,16 @@
1
1
  'use strict';
2
2
 
3
- const index_esm = require('./index.esm-7e12ce07.js');
3
+ const index_esm = require('./index.esm-84a0a7a8.js');
4
+
5
+ const legalAddressSchema = index_esm.create$3({
6
+ line1: index_esm.create$6().required('Enter street address'),
7
+ line2: index_esm.create$6(),
8
+ city: index_esm.create$6().required('Enter city'),
9
+ state: index_esm.create$6().required('Select state'),
10
+ postal_code: index_esm.create$6().required('Enter postal code'),
11
+ country: index_esm.create$6().required('Select country'),
12
+ });
4
13
 
5
- const RegExZip = /^\d{5}/;
6
14
  const BusinessTypeOptions = [
7
15
  {
8
16
  label: 'Choose business type',
@@ -83,50 +91,60 @@ const BusinessStructureOptions = [
83
91
  value: 'tax_exempt_government_instrumentality',
84
92
  },
85
93
  ];
94
+ const businessGenericInfoSchema = index_esm.create$3({
95
+ legal_name: index_esm.create$6().required('Enter legal name'),
96
+ website_url: index_esm.create$6()
97
+ .url('Enter valid website url')
98
+ .required('Enter website url'),
99
+ email: index_esm.create$6().email('Enter valid email').required('Enter email'),
100
+ phone: index_esm.create$6().required('Enter phone number'),
101
+ doing_business_as: index_esm.create$6().required('Enter doing business as'),
102
+ business_type: index_esm.create$6().required('Select business type'),
103
+ business_structure: index_esm.create$6().required('Select business structure'),
104
+ industry: index_esm.create$6().required('Enter a business industry'),
105
+ });
86
106
  const addressSchema = index_esm.create$3({
87
107
  line1: index_esm.create$6().required('Enter street address'),
88
108
  city: index_esm.create$6().required('Enter city'),
89
109
  state: index_esm.create$6().required('Select state'),
90
- postal_code: index_esm.create$6().matches(RegExZip, 'Enter valid postal code').required('Enter postal code'),
110
+ postal_code: index_esm.create$6().required('Enter postal code'),
91
111
  });
92
112
  const representativeSchema = index_esm.create$3({
93
113
  name: index_esm.create$6().required('Enter representative name'),
94
- email: index_esm.create$6().email('Enter valid representative email').required('Enter representative email'),
114
+ email: index_esm.create$6()
115
+ .email('Enter valid representative email')
116
+ .required('Enter representative email'),
95
117
  phone: index_esm.create$6().required('Enter representative phone number'),
96
118
  dob_day: index_esm.create$6().required('Enter representative birth day'),
97
119
  dob_month: index_esm.create$6().required('Enter representative birth month'),
98
120
  dob_year: index_esm.create$6().required('Enter representative birth year'),
99
- identification_number: index_esm.create$6().required('Enter representative identification number'),
121
+ identification_number: index_esm.create$6(),
100
122
  address: addressSchema,
101
123
  });
102
- const OwnerSchema = index_esm.create$3({
124
+ const ownerSchema = index_esm.create$3({
103
125
  name: index_esm.create$6().required('Enter owner name'),
104
126
  title: index_esm.create$6().required('Enter owner title'),
105
- email: index_esm.create$6().email('Enter valid owner email').required('Enter owner email'),
127
+ email: index_esm.create$6()
128
+ .email('Enter valid owner email')
129
+ .required('Enter owner email'),
106
130
  phone: index_esm.create$6().required('Enter owner phone number'),
107
131
  dob_day: index_esm.create$6().required('Enter owner birth day'),
108
132
  dob_month: index_esm.create$6().required('Enter owner birth month'),
109
133
  dob_year: index_esm.create$6().required('Enter owner birth year'),
110
- identification_number: index_esm.create$6().required('Enter owner identification number'),
134
+ identification_number: index_esm.create$6(),
111
135
  is_owner: index_esm.create$7(),
112
- metadata: index_esm.create$8(),
113
136
  address: addressSchema,
114
137
  });
115
- const BusinessFormSchema = index_esm.create$3({
116
- legal_name: index_esm.create$6().required('Enter legal name'),
117
- website_url: index_esm.create$6().url('Enter valid website url').required('Enter website url'),
118
- email: index_esm.create$6().email('Enter valid email').required('Enter email'),
119
- phone: index_esm.create$6().required('Enter phone number'),
120
- doing_business_as: index_esm.create$6().required('Enter doing business as'),
121
- business_type: index_esm.create$6().required('Select business type'),
122
- business_structure: index_esm.create$6().required('Select business structure'),
123
- industry: index_esm.create$6().required('Enter a business industry'),
124
- representative: representativeSchema.required('Enter representative information'),
125
- owners: index_esm.create$2().of(OwnerSchema).min(1, 'Enter at least 1 owners'),
138
+ const additionQuestionsSchema = index_esm.create$3({
139
+ business_revenue: index_esm.create$6().required('Enter business revenue'),
140
+ business_payment_volume: index_esm.create$6().required('Enter business payment volume'),
141
+ business_dispute_volume: index_esm.create$6().required('Enter business dispute volume'),
142
+ business_receivable_volume: index_esm.create$6().required('Enter business receivable volume'),
126
143
  });
144
+ const businessFormSchema = index_esm.create$3(Object.assign(Object.assign({}, businessGenericInfoSchema.fields), { legal_address: legalAddressSchema.required('Enater legal address'), additional_questions: additionQuestionsSchema.required('Enter additional questions'), representative: representativeSchema.required('Enter representative information'), owners: index_esm.create$2().of(ownerSchema).min(1, 'Enter at least 1 owners') }));
127
145
 
128
- exports.BusinessFormSchema = BusinessFormSchema;
129
146
  exports.BusinessStructureOptions = BusinessStructureOptions;
130
147
  exports.BusinessTypeOptions = BusinessTypeOptions;
148
+ exports.businessFormSchema = businessFormSchema;
131
149
 
132
- //# sourceMappingURL=business-form-schema-63b311b2.js.map
150
+ //# sourceMappingURL=business-form-schema-725ec6f5.js.map
@@ -0,0 +1 @@
1
+ {"file":"business-form-schema-725ec6f5.js","mappings":";;;;AAEA,MAAM,kBAAkB,GAAGA,kBAAU,CAAC;EACpC,KAAK,EAAEC,kBAAU,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;EACpD,KAAK,EAAEA,kBAAU,EAAE;EACnB,IAAI,EAAEA,kBAAU,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;EACzC,KAAK,EAAEA,kBAAU,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;EAC5C,WAAW,EAAEA,kBAAU,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;EACvD,OAAO,EAAEA,kBAAU,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CACjD,CAAC;;MC4CW,mBAAmB,GAA6C;EAC3E;IACE,KAAK,EAAE,sBAAsB;IAC7B,KAAK,EA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GD,kBAAM,iCAC5B,yBAAyB,CAAC,MAAM,KACnC,aAAa,EAAE,kBAAkB,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAClE,oBAAoB,EAAE,uBAAuB,CAAC,QAAQ,CACpD,4BAA4B,CAC7B,EACD,cAAc,EAAE,oBAAoB,CAAC,QAAQ,CAC3C,kCAAkC,CACnC,EACD,MAAM,EAAEG,kBAAK,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,yBAAyB,CAAC;;;;;;","names":["Yup.object","Yup.string","object","string","boolean","array"],"sources":["src/components/legal-address-form/legal-address-form-schema.ts","src/components/business-form/business-form-schema.ts"],"sourcesContent":["import * as Yup from 'yup';\n\nconst legalAddressSchema = Yup.object({\n line1: Yup.string().required('Enter street address'),\n line2: Yup.string(),\n city: Yup.string().required('Enter city'),\n state: Yup.string().required('Select state'),\n postal_code: Yup.string().required('Enter postal code'),\n country: Yup.string().required('Select country'),\n});\n\nexport default legalAddressSchema;\n","import { array, boolean, object, string } from 'yup';\nimport legalAddressSchema from '../legal-address-form/legal-address-form-schema';\n\nexport const RegExZip = /^\\d{5}/;\n\ntype BusinessType =\n | 'for_profit'\n | 'non_profit'\n | 'government_entity'\n | 'individual'\n | '';\ntype BusinessStructure =\n | 'sole_proprietorship'\n | 'single_llc'\n | 'multi_llc'\n | 'private_partnership'\n | 'private_corporation'\n | 'unincorporated_association'\n | 'public_partnership'\n | 'public_corporation'\n | 'incorporated'\n | 'unincorporated'\n | 'government_unit'\n | 'government_instrumentality'\n | 'tax_exempt_government_instrumentality'\n | '';\n\nexport class Business {\n public legal_name = '';\n public website_url = '';\n public email: string = '';\n public phone: string = '';\n public doing_business_as: string = '';\n public business_type: string = '';\n public business_structure: string = '';\n public industry: string = '';\n public metadata: any = {};\n\n constructor(data?: any) {\n if (data) {\n this.legal_name = data.legal_name;\n this.website_url = data.website_url;\n this.email = data.email;\n this.phone = data.phone;\n this.doing_business_as = data.doing_business_as;\n this.business_type = data.business_type;\n this.business_structure = data.business_structure;\n this.industry = data.industry;\n this.metadata = data.metadata;\n }\n }\n}\n\nexport const BusinessTypeOptions: { label: string; value: BusinessType }[] = [\n {\n label: 'Choose business type',\n value: '',\n },\n {\n label: 'Individual',\n value: 'individual',\n },\n {\n label: 'For Profit',\n value: 'for_profit',\n },\n {\n label: 'Non Profit',\n value: 'non_profit',\n },\n {\n label: 'Government Entity',\n value: 'government_entity',\n },\n];\n\nexport const BusinessStructureOptions: {\n label: string;\n value: BusinessStructure;\n}[] = [\n {\n label: 'Choose business structure',\n value: '',\n },\n {\n label: 'Sole Proprietorship',\n value: 'sole_proprietorship',\n },\n {\n label: 'LLC (Single)',\n value: 'single_llc',\n },\n {\n label: 'LLC (Multiple)',\n value: 'multi_llc',\n },\n {\n label: 'Private Partnership',\n value: 'private_partnership',\n },\n {\n label: 'Private Corporation',\n value: 'private_corporation',\n },\n {\n label: 'Unincorporated Association',\n value: 'unincorporated_association',\n },\n {\n label: 'Public Partnership',\n value: 'public_partnership',\n },\n {\n label: 'Public Corporation',\n value: 'public_corporation',\n },\n {\n label: 'Incorporated',\n value: 'incorporated',\n },\n {\n label: 'Unincorporated',\n value: 'unincorporated',\n },\n {\n label: 'Government Unit',\n value: 'government_unit',\n },\n {\n label: 'Government Instrumentality',\n value: 'government_instrumentality',\n },\n {\n label: 'Tax Exempt Government Instrumentality',\n value: 'tax_exempt_government_instrumentality',\n },\n];\n\nconst businessGenericInfoSchema = object({\n legal_name: string().required('Enter legal name'),\n website_url: string()\n .url('Enter valid website url')\n .required('Enter website url'),\n email: string().email('Enter valid email').required('Enter email'),\n phone: string().required('Enter phone number'),\n doing_business_as: string().required('Enter doing business as'),\n business_type: string().required('Select business type'),\n business_structure: string().required('Select business structure'),\n industry: string().required('Enter a business industry'),\n});\n\nconst addressSchema = object({\n line1: string().required('Enter street address'),\n city: string().required('Enter city'),\n state: string().required('Select state'),\n postal_code: string().required('Enter postal code'),\n});\n\nconst representativeSchema = object({\n name: string().required('Enter representative name'),\n email: string()\n .email('Enter valid representative email')\n .required('Enter representative email'),\n phone: string().required('Enter representative phone number'),\n dob_day: string().required('Enter representative birth day'),\n dob_month: string().required('Enter representative birth month'),\n dob_year: string().required('Enter representative birth year'),\n identification_number: string(),\n address: addressSchema,\n});\n\nconst ownerSchema = object({\n name: string().required('Enter owner name'),\n title: string().required('Enter owner title'),\n email: string()\n .email('Enter valid owner email')\n .required('Enter owner email'),\n phone: string().required('Enter owner phone number'),\n dob_day: string().required('Enter owner birth day'),\n dob_month: string().required('Enter owner birth month'),\n dob_year: string().required('Enter owner birth year'),\n identification_number: string(),\n is_owner: boolean(),\n address: addressSchema,\n});\n\nconst additionQuestionsSchema = object({\n business_revenue: string().required('Enter business revenue'),\n business_payment_volume: string().required('Enter business payment volume'),\n business_dispute_volume: string().required('Enter business dispute volume'),\n business_receivable_volume: string().required(\n 'Enter business receivable volume',\n ),\n});\n\nconst businessFormSchema = object({\n ...businessGenericInfoSchema.fields,\n legal_address: legalAddressSchema.required('Enater legal address'),\n additional_questions: additionQuestionsSchema.required(\n 'Enter additional questions',\n ),\n representative: representativeSchema.required(\n 'Enter representative information',\n ),\n owners: array().of(ownerSchema).min(1, 'Enter at least 1 owners'),\n});\n\nexport default businessFormSchema;\n"],"version":3}