@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
@@ -1 +1 @@
1
- {"version":3,"file":"payout-details.stories.js","sourceRoot":"","sources":["../../../../src/components/payout-details/payout-details.stories.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe;EACb,KAAK,EAAE,sCAAsC;EAC7C,SAAS,EAAE,wBAAwB;EACnC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,iBAAiB;EAIrB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC;IAC5D,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,0BAA0B,CAAC;EACxE,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAuB,EAAE,EAAE;EAC3C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;mBACnB,IAAI,CAAC,WAAW,CAAC;;GAEjC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;GAkBV;CACF,CAAA","sourcesContent":["import config from '../../../config';\n\nexport default {\n title: 'Pre-release Components/PayoutDetails',\n component: 'justifi-payout-details',\n parameters: {}\n};\n\nclass PayoutDetailsArgs {\n 'auth-token': string;\n 'payout-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || config.authToken;\n this['payment-id'] = args['payment-id'] || 'po_zBUZ6WvMEzoPzwS0qUmWE';\n }\n}\n\nconst Template = (args: PayoutDetailsArgs) => {\n return (`\n <justifi-payout-details\n data-testid=\"justifi-payout-details\"\n auth-token=\"${args['auth-token']}\"\n payout-id=\"${args['payout-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new PayoutDetailsArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new PayoutDetailsArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-payout-details::part(detail-head) {\n background-color: rgba(100, 200, 250, 0.2);\n border-left: 4px solid rgba(100, 200, 250, 1);\n }\n justifi-payout-details::part(detail-info-item-title),\n justifi-payout-details::part(detail-method-item-title) {\n border-radius: 3px;\n background-color: rgba(0, 0, 0, 0.8);\n text-align: center;\n padding: 0 10px;\n color: white !important;\n }\n justifi-payout-details::part(detail-metadata) {\n background-color: rgba(100,100,100,0.2)\n }\n </style>\n `\n]\n"]}
1
+ {"version":3,"file":"payout-details.stories.js","sourceRoot":"","sources":["../../../../src/components/payout-details/payout-details.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAe;EACb,KAAK,EAAE,0BAA0B;EACjC,SAAS,EAAE,wBAAwB;EACnC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,iBAAiB;EAIrB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC;EAClE,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAuB,EAAE,EAAE;EAC3C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;mBACnB,IAAI,CAAC,WAAW,CAAC;;GAEjC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;GAkBV;CACF,CAAA","sourcesContent":["import { config } from '../../../config';\n\nexport default {\n title: 'Components/PayoutDetails',\n component: 'justifi-payout-details',\n parameters: {}\n};\n\nclass PayoutDetailsArgs {\n 'auth-token': string;\n 'payout-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || config.proxyAuthToken;\n this['payout-id'] = args['payout-id'] || config.examplePayoutId;\n }\n}\n\nconst Template = (args: PayoutDetailsArgs) => {\n return (`\n <justifi-payout-details\n data-testid=\"justifi-payout-details\"\n auth-token=\"${args['auth-token']}\"\n payout-id=\"${args['payout-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new PayoutDetailsArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new PayoutDetailsArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-payout-details::part(detail-head) {\n background-color: rgba(100, 200, 250, 0.2);\n border-left: 4px solid rgba(100, 200, 250, 1);\n }\n justifi-payout-details::part(detail-info-item-title),\n justifi-payout-details::part(detail-method-item-title) {\n border-radius: 3px;\n background-color: rgba(0, 0, 0, 0.8);\n text-align: center;\n padding: 0 10px;\n color: white !important;\n }\n justifi-payout-details::part(detail-metadata) {\n background-color: rgba(100,100,100,0.2)\n }\n </style>\n `\n]\n"]}
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { Api, Payout, PayoutStatuses, PayoutStatusesSafeNames } from "../../api";
2
+ import { Api, Payout, PayoutStatuses, PayoutStatusesSafeNames, pagingDefaults } from "../../api";
3
3
  import { formatCurrency, formatDate, formatTime } from "../../utils/utils";
4
- import { pagingDefaults } from "../table/table-utils";
4
+ import { config } from "../../../config";
5
5
  /**
6
6
  * @exportedPart table-head: Table head
7
7
  * @exportedPart table-head-row: Head row
@@ -23,11 +23,6 @@ import { pagingDefaults } from "../table/table-utils";
23
23
  */
24
24
  export class PayoutsList {
25
25
  constructor() {
26
- this.onPageChange = (direction) => {
27
- return () => {
28
- this.fetchData(direction);
29
- };
30
- };
31
26
  this.mapStatusToBadge = (status) => {
32
27
  switch (status) {
33
28
  case PayoutStatuses.scheduled:
@@ -44,12 +39,23 @@ export class PayoutsList {
44
39
  return `<span class="badge bg-success" title='Successfully deposited into your bank account'>${PayoutStatusesSafeNames[status]}</span>`;
45
40
  }
46
41
  };
42
+ this.handleClickPrevious = (beforeCursor) => {
43
+ const newParams = Object.assign({}, this.params);
44
+ delete newParams.after_cursor;
45
+ this.params = (Object.assign(Object.assign({}, newParams), { before_cursor: beforeCursor }));
46
+ };
47
+ this.handleClickNext = (afterCursor) => {
48
+ const newParams = Object.assign({}, this.params);
49
+ delete newParams.before_cursor;
50
+ this.params = (Object.assign(Object.assign({}, newParams), { after_cursor: afterCursor }));
51
+ };
47
52
  this.accountId = undefined;
48
53
  this.authToken = undefined;
49
54
  this.payouts = [];
50
55
  this.loading = true;
51
56
  this.errorMessage = undefined;
52
57
  this.paging = pagingDefaults;
58
+ this.params = undefined;
53
59
  }
54
60
  updateOnPropChange() {
55
61
  this.fetchData();
@@ -57,7 +63,7 @@ export class PayoutsList {
57
63
  connectedCallback() {
58
64
  this.fetchData();
59
65
  }
60
- async fetchData(direction) {
66
+ async fetchData() {
61
67
  var _a;
62
68
  if (!this.accountId || !this.authToken) {
63
69
  this.errorMessage = "Can not fetch any data without an AccountID and an AuthToken";
@@ -65,11 +71,9 @@ export class PayoutsList {
65
71
  return;
66
72
  }
67
73
  this.loading = true;
74
+ const api = Api(this.authToken, config.proxyApiOrigin);
68
75
  const endpoint = `account/${this.accountId}/payouts`;
69
- const response = await Api(this.authToken).get(endpoint, {
70
- paging: this.paging,
71
- direction: direction
72
- });
76
+ const response = await api.get(endpoint, this.params);
73
77
  if (!response.error) {
74
78
  this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
75
79
  const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Payout(dataItem));
@@ -118,7 +122,7 @@ export class PayoutsList {
118
122
  type: 'inner',
119
123
  value: this.mapStatusToBadge(payout.status)
120
124
  }
121
- ])), loading: this.loading, "error-message": this.errorMessage, paging: Object.assign(Object.assign({}, this.paging), { onPrev: this.onPageChange('prev'), onNext: this.onPageChange('next') }) })));
125
+ ])), loading: this.loading, "error-message": this.errorMessage, params: this.params, paging: Object.assign(Object.assign({}, this.paging), { handleClickNext: this.handleClickNext, handleClickPrevious: this.handleClickPrevious }) })));
122
126
  }
123
127
  static get is() { return "justifi-payouts-list"; }
124
128
  static get encapsulation() { return "shadow"; }
@@ -175,7 +179,8 @@ export class PayoutsList {
175
179
  "payouts": {},
176
180
  "loading": {},
177
181
  "errorMessage": {},
178
- "paging": {}
182
+ "paging": {},
183
+ "params": {}
179
184
  };
180
185
  }
181
186
  static get events() {
@@ -209,6 +214,9 @@ export class PayoutsList {
209
214
  }, {
210
215
  "propName": "authToken",
211
216
  "methodName": "updateOnPropChange"
217
+ }, {
218
+ "propName": "params",
219
+ "methodName": "updateOnPropChange"
212
220
  }];
213
221
  }
214
222
  }
@@ -1 +1 @@
1
- {"version":3,"file":"payouts-list.js","sourceRoot":"","sources":["../../../../src/components/payouts-list/payouts-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,GAAG,EAA0B,MAAM,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAc,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;;;;;;;;;;;;;;;;EAkBE;AAOF,MAAM,OAAO,WAAW;;IAsBtB,iBAAY,GAAG,CAAC,SAAiB,EAAE,EAAE;MACnC,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;MAC5B,CAAC,CAAA;IACH,CAAC,CAAA;IAED,qBAAgB,GAAG,CAAC,MAAsB,EAAE,EAAE;MAC5C,QAAQ,MAAM,EAAE;QACd,KAAK,cAAc,CAAC,SAAS;UAC3B,OAAO,kFAAkF,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QACpI,KAAK,cAAc,CAAC,UAAU;UAC5B,OAAO,2FAA2F,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QAC7I,KAAK,cAAc,CAAC,MAAM;UACxB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AE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EACjD,OAAO,EACL,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC3B;UACE;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE;2BACE,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC;2BAC7B,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC;mBACrC;WACF;UACD,MAAM,CAAC,WAAW;UAClB,MAAM,CAAC,UAAU;UACjB,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,oBAAoB,EAAE;UAC9E,cAAc,CAAC,MAAM,CAAC,cAAc,CAAC;UACrC,cAAc,CAAC,MAAM,CAAC,aAAa,CAAC;UACpC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC;UACjC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC;UAClC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC;UAC7B;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;WAC5C;SACF,CACF,CAAC,EAEJ,OAAO,EAAE,IAAI,CAAC,OAAO,mBACN,IAAI,CAAC,YAAY,EAChC,MAAM,kCACD,IAAI,CAAC,MAAM,KACd,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EACjC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAEnC,CACG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter } from '@stencil/core';\nimport { Api, IApiResponseCollection, Payout, PayoutStatuses, PayoutStatusesSafeNames } from '../../api';\nimport { formatCurrency, formatDate, formatTime } from '../../utils/utils';\nimport { PagingInfo, pagingDefaults } from '../table/table-utils';\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart button-disabled: Disabled state for paging buttons\n * @exportedPart previous-button-text: Text for Previous button\n * @exportedPart next-button-text: Text for Next button\n*/\n@Component({\n tag: 'justifi-payouts-list',\n styleUrl: 'payouts-list.scss',\n shadow: true,\n})\n\nexport class PayoutsList {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() payouts: Payout[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @Event({\n eventName: 'payout-row-clicked',\n bubbles: true,\n }) rowClicked: EventEmitter<Payout>;\n\n @Watch('accountId')\n @Watch('authToken')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n onPageChange = (direction: string) => {\n return () => {\n this.fetchData(direction);\n }\n }\n\n mapStatusToBadge = (status: PayoutStatuses) => {\n switch (status) {\n case PayoutStatuses.scheduled:\n return `<span class=\"badge bg-primary\" title='Batched and scheduled to be transferred'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.in_transit:\n return `<span class=\"badge bg-primary\" title='Transfer to your bank account has been initiated'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.failed:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.canceled:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.forwarded:\n return `<span class=\"badge bg-secondary\" title='This payout initially failed; the funds have been forwarded to your next successful payout'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.paid:\n return `<span class=\"badge bg-success\" title='Successfully deposited into your bank account'>${PayoutStatusesSafeNames[status]}</span>`;\n }\n }\n\n async fetchData(direction?: string): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `account/${this.accountId}/payouts`;\n\n const response: IApiResponseCollection<Payout[]> = await Api(this.authToken).get(endpoint, {\n paging: this.paging,\n direction: direction\n });\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info\n }\n\n const data = response?.data?.map(dataItem => new Payout(dataItem));\n this.payouts = data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n rowClickHandler={(e) => {\n const clickedPayoutID = e.target.closest('tr').dataset.rowEntityId;\n if (!clickedPayoutID) { return }\n this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));\n }}\n columnData={[\n ['Paid Out On', 'The date each transaction occurred'],\n ['Type', 'The type of each transaction'],\n ['Account', 'The ID of the account associated with each payout'],\n ['Paid Out To', 'The bank account to which each payout was transferred'],\n ['Payments', 'Sum of payments in each payout'],\n ['Refunds', 'Sum of refunds in each payout'],\n ['Fees', 'Sum of fees in each payout'],\n ['Other', 'Sum of less common transactions in each payout (disputes, ACH returns, fee refunds, and forwarded balances due to failed payouts)'],\n ['Payout Amount', 'The net sum of all transactions in each payout. This is the amount you\\'ll see reflected on your bank statement'],\n ['Status', 'The real-time status of each payout']\n ]}\n entityId={this.payouts.map((payout) => payout.id)}\n rowData={\n this.payouts.map((payout) => (\n [\n {\n type: 'head',\n value: `\n <div>${formatDate(payout.created_at)}</div>\n <div>${formatTime(payout.created_at)}</div>\n `,\n },\n payout.payout_type,\n payout.account_id,\n `${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,\n formatCurrency(payout.payments_total),\n formatCurrency(payout.refunds_total),\n formatCurrency(payout.fees_total),\n formatCurrency(payout.other_total),\n formatCurrency(payout.amount),\n {\n type: 'inner',\n value: this.mapStatusToBadge(payout.status)\n }\n ]\n ))\n }\n loading={this.loading}\n error-message={this.errorMessage}\n paging={{\n ...this.paging,\n onPrev: this.onPageChange('prev'),\n onNext: this.onPageChange('next')\n }}\n />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"payouts-list.js","sourceRoot":"","sources":["../../../../src/components/payouts-list/payouts-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC5F,OAAO,EACL,GAAG,EAGH,MAAM,EACN,cAAc,EACd,uBAAuB,EACvB,cAAc,EACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC;;;;;;;;;;;;;;;;;;EAkBE;AAOF,MAAM,OAAO,WAAW;;IAwBtB,qBAAgB,GAAG,CAAC,MAAsB,EAAE,EAAE;MAC5C,QAAQ,MAAM,EAAE;QACd,KAAK,cAAc,CAAC,SAAS;UAC3B,OAAO,kFAAkF,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QACpI,KAAK,cAAc,CAAC,UAAU;UAC5B,OAAO,2FAA2F,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QAC7I,KAAK,cAAc,CAAC,MAAM;UACxB,OAAO,8EAA8E,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAA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AM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,kCACD,IAAI,CAAC,MAAM,KACd,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,MAE/C,CACG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter } from '@stencil/core';\nimport {\n Api,\n IApiResponseCollection,\n PagingInfo,\n Payout,\n PayoutStatuses,\n PayoutStatusesSafeNames,\n pagingDefaults\n} from '../../api';\nimport { formatCurrency, formatDate, formatTime } from '../../utils/utils';\nimport { config } from '../../../config';\n\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart button-disabled: Disabled state for paging buttons\n * @exportedPart previous-button-text: Text for Previous button\n * @exportedPart next-button-text: Text for Next button\n*/\n@Component({\n tag: 'justifi-payouts-list',\n styleUrl: 'payouts-list.scss',\n shadow: true,\n})\n\nexport class PayoutsList {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() payouts: Payout[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @State() params: any\n @Event({\n eventName: 'payout-row-clicked',\n bubbles: true,\n }) rowClicked: EventEmitter<Payout>;\n\n @Watch('accountId')\n @Watch('authToken')\n @Watch('params')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n mapStatusToBadge = (status: PayoutStatuses) => {\n switch (status) {\n case PayoutStatuses.scheduled:\n return `<span class=\"badge bg-primary\" title='Batched and scheduled to be transferred'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.in_transit:\n return `<span class=\"badge bg-primary\" title='Transfer to your bank account has been initiated'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.failed:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.canceled:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.forwarded:\n return `<span class=\"badge bg-secondary\" title='This payout initially failed; the funds have been forwarded to your next successful payout'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.paid:\n return `<span class=\"badge bg-success\" title='Successfully deposited into your bank account'>${PayoutStatusesSafeNames[status]}</span>`;\n }\n }\n\n handleClickPrevious = (beforeCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.after_cursor;\n this.params = ({ ...newParams, before_cursor: beforeCursor });\n };\n\n handleClickNext = (afterCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.before_cursor;\n this.params = ({ ...newParams, after_cursor: afterCursor });\n };\n\n async fetchData(): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n\n const api = Api(this.authToken, config.proxyApiOrigin);\n const endpoint = `account/${this.accountId}/payouts`;\n\n const response: IApiResponseCollection<Payout[]> = await api.get(endpoint, this.params);\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info\n }\n\n const data = response?.data?.map(dataItem => new Payout(dataItem));\n this.payouts = data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n rowClickHandler={(e) => {\n const clickedPayoutID = e.target.closest('tr').dataset.rowEntityId;\n if (!clickedPayoutID) { return }\n this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));\n }}\n columnData={[\n ['Paid Out On', 'The date each transaction occurred'],\n ['Type', 'The type of each transaction'],\n ['Account', 'The ID of the account associated with each payout'],\n ['Paid Out To', 'The bank account to which each payout was transferred'],\n ['Payments', 'Sum of payments in each payout'],\n ['Refunds', 'Sum of refunds in each payout'],\n ['Fees', 'Sum of fees in each payout'],\n ['Other', 'Sum of less common transactions in each payout (disputes, ACH returns, fee refunds, and forwarded balances due to failed payouts)'],\n ['Payout Amount', 'The net sum of all transactions in each payout. This is the amount you\\'ll see reflected on your bank statement'],\n ['Status', 'The real-time status of each payout']\n ]}\n entityId={this.payouts.map((payout) => payout.id)}\n rowData={\n this.payouts.map((payout) => (\n [\n {\n type: 'head',\n value: `\n <div>${formatDate(payout.created_at)}</div>\n <div>${formatTime(payout.created_at)}</div>\n `,\n },\n payout.payout_type,\n payout.account_id,\n `${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,\n formatCurrency(payout.payments_total),\n formatCurrency(payout.refunds_total),\n formatCurrency(payout.fees_total),\n formatCurrency(payout.other_total),\n formatCurrency(payout.amount),\n {\n type: 'inner',\n value: this.mapStatusToBadge(payout.status)\n }\n ]\n ))\n }\n loading={this.loading}\n error-message={this.errorMessage}\n params={this.params}\n paging={{\n ...this.paging,\n handleClickNext: this.handleClickNext,\n handleClickPrevious: this.handleClickPrevious\n }}\n />\n </Host>\n );\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
- import config from "../../../config";
1
+ import { config } from "../../../config";
2
2
  export default {
3
- title: 'Pre-release Components/PayoutsList',
3
+ title: 'Components/PayoutsList',
4
4
  component: 'justifi-payouts-list',
5
5
  parameters: {},
6
6
  decorators: [
@@ -16,8 +16,8 @@ export default {
16
16
  };
17
17
  class PayoutsListArgs {
18
18
  constructor(args) {
19
- this['auth-token'] = args['auth-token'] || config.authToken;
20
- this['payment-id'] = args['payment-id'] || config.accountId;
19
+ this['auth-token'] = args['auth-token'] || config.proxyAuthToken;
20
+ this['account-id'] = args['account-id'] || config.examplePaymentsAccountId;
21
21
  }
22
22
  }
23
23
  const Template = (args) => {
@@ -1 +1 @@
1
- {"version":3,"file":"payouts-list.stories.js","sourceRoot":"","sources":["../../../../src/components/payouts-list/payouts-list.stories.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe;EACb,KAAK,EAAE,oCAAoC;EAC3C,SAAS,EAAE,sBAAsB;EACjC,UAAU,EAAE,EAAE;EACd,UAAU,EAAE;IACV,CAAC,KAAK,EAAE,EAAE,CAAC;QACP,KAAK,EAAE;;;;;;KAMV;GACF;CACF,CAAC;AAEF,MAAM,eAAe;EAInB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC;IAC5D,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC;EAC9D,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAqB,EAAE,EAAE;EACzC,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AACtC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA","sourcesContent":["import config from '../../../config';\n\nexport default {\n title: 'Pre-release Components/PayoutsList',\n component: 'justifi-payouts-list',\n parameters: {},\n decorators: [\n (Story) => `\n ${Story()}\n <script>\n window.addEventListener('payout-row-clicked', (e) => {\n console.log(e);\n })\n </script>\n `\n ]\n};\n\nclass PayoutsListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || config.authToken;\n this['payment-id'] = args['payment-id'] || config.accountId;\n }\n}\n\nconst Template = (args: PayoutsListArgs) => {\n return (`\n <justifi-payouts-list\n data-testid=\"justifi-payouts-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new PayoutsListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new PayoutsListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-payouts-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-payouts-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-payouts-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-payouts-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-payouts-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-payouts-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-payouts-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n"]}
1
+ {"version":3,"file":"payouts-list.stories.js","sourceRoot":"","sources":["../../../../src/components/payouts-list/payouts-list.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAe;EACb,KAAK,EAAE,wBAAwB;EAC/B,SAAS,EAAE,sBAAsB;EACjC,UAAU,EAAE,EAAE;EACd,UAAU,EAAE;IACV,CAAC,KAAK,EAAE,EAAE,CAAC;QACP,KAAK,EAAE;;;;;;KAMV;GACF;CACF,CAAC;AAEF,MAAM,eAAe;EAInB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,wBAAwB,CAAC;EAC7E,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAqB,EAAE,EAAE;EACzC,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AACtC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA","sourcesContent":["import { config } from '../../../config';\n\nexport default {\n title: 'Components/PayoutsList',\n component: 'justifi-payouts-list',\n parameters: {},\n decorators: [\n (Story) => `\n ${Story()}\n <script>\n window.addEventListener('payout-row-clicked', (e) => {\n console.log(e);\n })\n </script>\n `\n ]\n};\n\nclass PayoutsListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || config.proxyAuthToken;\n this['account-id'] = args['account-id'] || config.examplePaymentsAccountId;\n }\n}\n\nconst Template = (args: PayoutsListArgs) => {\n return (`\n <justifi-payouts-list\n data-testid=\"justifi-payouts-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new PayoutsListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new PayoutsListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-payouts-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-payouts-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-payouts-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-payouts-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-payouts-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-payouts-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-payouts-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n"]}
@@ -1,8 +1,8 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { Api } from "../../api";
2
+ import { Api, pagingDefaults } from "../../api";
3
3
  import { formatCurrency, formatDate } from "../../utils/utils";
4
- import { pagingDefaults } from "../table/table-utils";
5
4
  import { Proceed, ProceedStatuses, ProceedStatusesSafeNames } from "../../api/Proceed";
5
+ import { config } from "../../../config";
6
6
  /**
7
7
  * @exportedPart table-head: Table head
8
8
  * @exportedPart table-head-row: Head row
@@ -24,11 +24,6 @@ import { Proceed, ProceedStatuses, ProceedStatusesSafeNames } from "../../api/Pr
24
24
  */
25
25
  export class ProceedsList {
26
26
  constructor() {
27
- this.onPageChange = (direction) => {
28
- return () => {
29
- this.fetchData(direction);
30
- };
31
- };
32
27
  this.mapStatusToBadge = (status) => {
33
28
  switch (status) {
34
29
  case ProceedStatuses.scheduled:
@@ -45,12 +40,23 @@ export class ProceedsList {
45
40
  return `<span class="badge bg-success" title='Successfully deposited into your bank account'>${ProceedStatusesSafeNames[status]}</span>`;
46
41
  }
47
42
  };
43
+ this.handleClickPrevious = (beforeCursor) => {
44
+ const newParams = Object.assign({}, this.params);
45
+ delete newParams.after_cursor;
46
+ this.params = (Object.assign(Object.assign({}, newParams), { before_cursor: beforeCursor }));
47
+ };
48
+ this.handleClickNext = (afterCursor) => {
49
+ const newParams = Object.assign({}, this.params);
50
+ delete newParams.before_cursor;
51
+ this.params = (Object.assign(Object.assign({}, newParams), { after_cursor: afterCursor }));
52
+ };
48
53
  this.accountId = undefined;
49
54
  this.authToken = undefined;
50
55
  this.proceeds = [];
51
56
  this.loading = true;
52
57
  this.errorMessage = undefined;
53
58
  this.paging = pagingDefaults;
59
+ this.params = undefined;
54
60
  }
55
61
  updateOnPropChange() {
56
62
  this.fetchData();
@@ -58,7 +64,7 @@ export class ProceedsList {
58
64
  connectedCallback() {
59
65
  this.fetchData();
60
66
  }
61
- async fetchData(direction) {
67
+ async fetchData() {
62
68
  var _a;
63
69
  if (!this.accountId || !this.authToken) {
64
70
  this.errorMessage = "Can not fetch any data without an AccountID and an AuthToken";
@@ -67,10 +73,8 @@ export class ProceedsList {
67
73
  }
68
74
  this.loading = true;
69
75
  const endpoint = `account/${this.accountId}/proceeds`;
70
- const response = await Api(this.authToken).get(endpoint, {
71
- paging: this.paging,
72
- direction: direction
73
- });
76
+ const response = await Api(this.authToken, config.privateApiOrigin)
77
+ .get(endpoint, this.params);
74
78
  if (!response.error) {
75
79
  this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
76
80
  const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Proceed(dataItem));
@@ -110,7 +114,7 @@ export class ProceedsList {
110
114
  type: 'inner',
111
115
  value: this.mapStatusToBadge(proceed.status)
112
116
  }
113
- ])), loading: this.loading, "error-message": this.errorMessage, paging: Object.assign(Object.assign({}, this.paging), { onPrev: this.onPageChange('prev'), onNext: this.onPageChange('next') }) })));
117
+ ])), loading: this.loading, "error-message": this.errorMessage, params: this.params, paging: Object.assign(Object.assign({}, this.paging), { handleClickNext: this.handleClickNext, handleClickPrevious: this.handleClickPrevious }) })));
114
118
  }
115
119
  static get is() { return "justifi-proceeds-list"; }
116
120
  static get encapsulation() { return "shadow"; }
@@ -167,7 +171,8 @@ export class ProceedsList {
167
171
  "proceeds": {},
168
172
  "loading": {},
169
173
  "errorMessage": {},
170
- "paging": {}
174
+ "paging": {},
175
+ "params": {}
171
176
  };
172
177
  }
173
178
  static get events() {
@@ -201,6 +206,9 @@ export class ProceedsList {
201
206
  }, {
202
207
  "propName": "authToken",
203
208
  "methodName": "updateOnPropChange"
209
+ }, {
210
+ "propName": "params",
211
+ "methodName": "updateOnPropChange"
204
212
  }];
205
213
  }
206
214
  }
@@ -1 +1 @@
1
- {"version":3,"file":"proceeds-list.js","sourceRoot":"","sources":["../../../../src/components/proceeds-list/proceeds-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,GAAG,EAA0B,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAc,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,M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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter } from '@stencil/core';\nimport { Api, IApiResponseCollection } from '../../api';\nimport { formatCurrency, formatDate } from '../../utils/utils';\nimport { PagingInfo, pagingDefaults } from '../table/table-utils';\nimport { Proceed, ProceedStatuses, ProceedStatusesSafeNames } from '../../api/Proceed';\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart button-disabled: Disabled state for paging buttons\n * @exportedPart previous-button-text: Text for Previous button\n * @exportedPart next-button-text: Text for Next button\n*/\n@Component({\n tag: 'justifi-proceeds-list',\n styleUrl: 'proceeds-list.scss',\n shadow: true,\n})\n\nexport class ProceedsList {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() proceeds: Proceed[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @Event({\n eventName: 'proceed-row-clicked',\n bubbles: true,\n }) rowClicked: EventEmitter<Proceed>;\n\n @Watch('accountId')\n @Watch('authToken')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n onPageChange = (direction: string) => {\n return () => {\n this.fetchData(direction);\n }\n }\n\n mapStatusToBadge = (status: ProceedStatuses) => {\n switch (status) {\n case ProceedStatuses.scheduled:\n return `<span class=\"badge bg-primary\" title='Batched and scheduled to be transferred'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.in_transit:\n return `<span class=\"badge bg-primary\" title='Transfer to your bank account has been initiated'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.failed:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.canceled:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.forwarded:\n return `<span class=\"badge bg-secondary\" title='This payout initially failed; the funds have been forwarded to your next successful batch of proceeds'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.paid:\n return `<span class=\"badge bg-success\" title='Successfully deposited into your bank account'>${ProceedStatusesSafeNames[status]}</span>`;\n }\n }\n\n async fetchData(direction?: string): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `account/${this.accountId}/proceeds`;\n\n const response: IApiResponseCollection<Proceed[]> = await Api(this.authToken).get(endpoint, {\n paging: this.paging,\n direction: direction\n });\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info\n }\n\n const data = response?.data?.map(dataItem => new Proceed(dataItem));\n this.proceeds = data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n rowClickHandler={(e) => {\n const clickedProceedID = e.target.closest('tr').dataset.rowEntityId;\n if (!clickedProceedID) { return }\n this.rowClicked.emit(this.proceeds.find((proceed) => proceed.id === clickedProceedID));\n }}\n entityId={this.proceeds.map((proceed) => proceed.id)}\n columnData={[\n ['Paid Out On', 'The date each batch of proceeds is transferred to your bank account'],\n ['Paid Out To', 'The bank account to which each payout is sent'],\n ['From Payments', 'The amount added related to payments in each payout'],\n ['From Refunds', 'The amount deducted related to refunds in each payout'],\n ['Other', 'The amount related to less common transactions in each payout (disputes, ACH returns, fee refunds, and forwarded balances due to failed payouts)'],\n ['Proceeds Amount', 'The net sum of all transactions in each payout. This is the amount you\\'ll see reflected on your bank statement.'],\n ['Status', 'The real-time status of each payout'],\n ]}\n rowData={\n this.proceeds.map((proceed) => (\n [\n {\n type: 'head',\n value: formatDate(proceed.deposits_at),\n },\n proceed.bank_account.full_name,\n formatCurrency(proceed.payments_total),\n formatCurrency(proceed.refunds_total),\n formatCurrency(proceed.other_total),\n formatCurrency(proceed.amount),\n {\n type: 'inner',\n value: this.mapStatusToBadge(proceed.status)\n }\n ]\n ))\n }\n loading={this.loading}\n error-message={this.errorMessage}\n paging={{\n ...this.paging,\n onPrev: this.onPageChange('prev'),\n onNext: this.onPageChange('next')\n }}\n />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"proceeds-list.js","sourceRoot":"","sources":["../../../../src/components/proceeds-list/proceeds-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,GAAG,EAAsC,cAAc,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC;;;;;;;;;;;;;;;;;;EAkBE;AAOF,MAAM,OAAO,YAAY;;IAwBvB,qBAAgB,GAAG,CAAC,MAAuB,EAAE,EAAE;MAC7C,QAAQ,MAAM,EAAE;QACd,KAAK,eAAe,CAAC,SAAS;UAC5B,OAAO,kFAAkF,wBAAwB,CAAC,MAAM,CAAC,SAAS,CAAC;QACrI,KAAK,eAAe,CAAC,UAAU;U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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter } from '@stencil/core';\nimport { Api, IApiResponseCollection, PagingInfo, pagingDefaults } from '../../api';\nimport { formatCurrency, formatDate } from '../../utils/utils';\nimport { Proceed, ProceedStatuses, ProceedStatusesSafeNames } from '../../api/Proceed';\nimport { config } from '../../../config';\n\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart button-disabled: Disabled state for paging buttons\n * @exportedPart previous-button-text: Text for Previous button\n * @exportedPart next-button-text: Text for Next button\n*/\n@Component({\n tag: 'justifi-proceeds-list',\n styleUrl: 'proceeds-list.scss',\n shadow: true,\n})\n\nexport class ProceedsList {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() proceeds: Proceed[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @State() params: any\n @Event({\n eventName: 'proceed-row-clicked',\n bubbles: true,\n }) rowClicked: EventEmitter<Proceed>;\n\n @Watch('accountId')\n @Watch('authToken')\n @Watch('params')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n mapStatusToBadge = (status: ProceedStatuses) => {\n switch (status) {\n case ProceedStatuses.scheduled:\n return `<span class=\"badge bg-primary\" title='Batched and scheduled to be transferred'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.in_transit:\n return `<span class=\"badge bg-primary\" title='Transfer to your bank account has been initiated'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.failed:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.canceled:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.forwarded:\n return `<span class=\"badge bg-secondary\" title='This payout initially failed; the funds have been forwarded to your next successful batch of proceeds'>${ProceedStatusesSafeNames[status]}</span>`;\n case ProceedStatuses.paid:\n return `<span class=\"badge bg-success\" title='Successfully deposited into your bank account'>${ProceedStatusesSafeNames[status]}</span>`;\n }\n }\n\n handleClickPrevious = (beforeCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.after_cursor;\n this.params = ({ ...newParams, before_cursor: beforeCursor });\n };\n\n handleClickNext = (afterCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.before_cursor;\n this.params = ({ ...newParams, after_cursor: afterCursor });\n };\n\n async fetchData(): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `account/${this.accountId}/proceeds`;\n\n const response: IApiResponseCollection<Proceed[]> = await Api(this.authToken, config.privateApiOrigin)\n .get(endpoint, this.params);\n\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info\n }\n\n const data = response?.data?.map(dataItem => new Proceed(dataItem));\n this.proceeds = data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n rowClickHandler={(e) => {\n const clickedProceedID = e.target.closest('tr').dataset.rowEntityId;\n if (!clickedProceedID) { return }\n this.rowClicked.emit(this.proceeds.find((proceed) => proceed.id === clickedProceedID));\n }}\n entityId={this.proceeds.map((proceed) => proceed.id)}\n columnData={[\n ['Paid Out On', 'The date each batch of proceeds is transferred to your bank account'],\n ['Paid Out To', 'The bank account to which each payout is sent'],\n ['From Payments', 'The amount added related to payments in each payout'],\n ['From Refunds', 'The amount deducted related to refunds in each payout'],\n ['Other', 'The amount related to less common transactions in each payout (disputes, ACH returns, fee refunds, and forwarded balances due to failed payouts)'],\n ['Proceeds Amount', 'The net sum of all transactions in each payout. This is the amount you\\'ll see reflected on your bank statement.'],\n ['Status', 'The real-time status of each payout'],\n ]}\n rowData={\n this.proceeds.map((proceed) => (\n [\n {\n type: 'head',\n value: formatDate(proceed.deposits_at),\n },\n proceed.bank_account.full_name,\n formatCurrency(proceed.payments_total),\n formatCurrency(proceed.refunds_total),\n formatCurrency(proceed.other_total),\n formatCurrency(proceed.amount),\n {\n type: 'inner',\n value: this.mapStatusToBadge(proceed.status)\n }\n ]\n ))\n }\n loading={this.loading}\n error-message={this.errorMessage}\n params={this.params}\n paging={{\n ...this.paging,\n handleClickNext: this.handleClickNext,\n handleClickPrevious: this.handleClickPrevious\n }}\n />\n </Host>\n );\n }\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import { config } from "../../../config";
1
2
  export default {
2
3
  title: 'dev/Components/ProceedsList',
3
4
  component: 'justifi-proceeds-list',
@@ -15,8 +16,8 @@ export default {
15
16
  };
16
17
  class ProceedsListArgs {
17
18
  constructor(args) {
18
- this['auth-token'] = args['auth-token'] || '';
19
- this['account-id'] = args['account-id'] || '';
19
+ this['auth-token'] = args['auth-token'] || config.privateAuthToken;
20
+ this['account-id'] = args['account-id'] || config.examplePlatformAccountId;
20
21
  }
21
22
  }
22
23
  const Template = (args) => {
@@ -1 +1 @@
1
- {"version":3,"file":"proceeds-list.stories.js","sourceRoot":"","sources":["../../../../src/components/proceeds-list/proceeds-list.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,6BAA6B;EACpC,SAAS,EAAE,uBAAuB;EAClC,UAAU,EAAE,EAAE;EACd,UAAU,EAAE;IACV,CAAC,KAAK,EAAE,EAAE,CAAC;QACP,KAAK,EAAE;;;;;;KAMV;GACF;CACF,CAAC;AAEF,MAAM,gBAAgB;EAIpB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;EAChD,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAsB,EAAE,EAAE;EAC1C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA","sourcesContent":["export default {\n title: 'dev/Components/ProceedsList',\n component: 'justifi-proceeds-list',\n parameters: {},\n decorators: [\n (Story) => `\n ${Story()}\n <script>\n window.addEventListener('proceed-row-clicked', (e) => {\n console.log(e);\n })\n </script>\n `\n ]\n};\n\nclass ProceedsListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || '';\n this['account-id'] = args['account-id'] || '';\n }\n}\n\nconst Template = (args: ProceedsListArgs) => {\n return (`\n <justifi-proceeds-list\n data-testid=\"justifi-proceeds-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new ProceedsListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new ProceedsListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-proceeds-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-proceeds-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-proceeds-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-proceeds-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-proceeds-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-proceeds-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-proceeds-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n"]}
1
+ {"version":3,"file":"proceeds-list.stories.js","sourceRoot":"","sources":["../../../../src/components/proceeds-list/proceeds-list.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAe;EACb,KAAK,EAAE,6BAA6B;EACpC,SAAS,EAAE,uBAAuB;EAClC,UAAU,EAAE,EAAE;EACd,UAAU,EAAE;IACV,CAAC,KAAK,EAAE,EAAE,CAAC;QACP,KAAK,EAAE;;;;;;KAMV;GACF;CACF,CAAC;AAEF,MAAM,gBAAgB;EAIpB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC;IACnE,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,wBAAwB,CAAC;EAC7E,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAsB,EAAE,EAAE;EAC1C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA","sourcesContent":["import { config } from '../../../config';\n\nexport default {\n title: 'dev/Components/ProceedsList',\n component: 'justifi-proceeds-list',\n parameters: {},\n decorators: [\n (Story) => `\n ${Story()}\n <script>\n window.addEventListener('proceed-row-clicked', (e) => {\n console.log(e);\n })\n </script>\n `\n ]\n};\n\nclass ProceedsListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || config.privateAuthToken;\n this['account-id'] = args['account-id'] || config.examplePlatformAccountId;\n }\n}\n\nconst Template = (args: ProceedsListArgs) => {\n return (`\n <justifi-proceeds-list\n data-testid=\"justifi-proceeds-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new ProceedsListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new ProceedsListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-proceeds-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-proceeds-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-proceeds-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-proceeds-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-proceeds-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-proceeds-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-proceeds-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n"]}
@@ -0,0 +1,14 @@
1
+ import * as yup from "yup";
2
+ const RefundFormSchema = yup.object().shape({
3
+ amount: yup
4
+ .number()
5
+ .required('Amount is required')
6
+ .typeError('Amount must be a number')
7
+ .positive('Amount must be positive')
8
+ .test('amount', 'Refund amount cannot be more than the original payment amount', function (value) {
9
+ return value <= this.options.context.amount;
10
+ })
11
+ .nullable(),
12
+ });
13
+ export default RefundFormSchema;
14
+ //# sourceMappingURL=refund-form-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refund-form-schema.js","sourceRoot":"","sources":["../../../../src/components/refund-form/refund-form-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAO3B,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;EAC1C,MAAM,EAAE,GAAG;KACR,MAAM,EAAE;KACR,QAAQ,CAAC,oBAAoB,CAAC;KAC9B,SAAS,CAAC,yBAAyB,CAAC;KACpC,QAAQ,CAAC,yBAAyB,CAAC;KACnC,IAAI,CACH,QAAQ,EACR,+DAA+D,EAC/D,UAAU,KAAK;IACb,OAAO,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;EAC9C,CAAC,CACF;KACA,QAAQ,EAAE;CACd,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC","sourcesContent":["import * as yup from 'yup';\n\nexport interface RefundFormFields {\n amount: number | null; // Allowing null for initial state or cleared inputs\n message: string;\n}\n\nconst RefundFormSchema = yup.object().shape({\n amount: yup\n .number()\n .required('Amount is required')\n .typeError('Amount must be a number')\n .positive('Amount must be positive')\n .test(\n 'amount',\n 'Refund amount cannot be more than the original payment amount',\n function (value) {\n return value <= this.options.context.amount;\n },\n )\n .nullable(),\n});\n\nexport default RefundFormSchema;\n"]}