@bigbinary/neeto-payments-frontend 6.2.0 → 6.2.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 (339) hide show
  1. package/dist/AccountsDashboard.js +7 -6
  2. package/dist/AccountsDashboard.js.map +1 -1
  3. package/dist/AdminCancelRecurringPaymentButton.js +4 -17
  4. package/dist/AdminCancelRecurringPaymentButton.js.map +1 -1
  5. package/dist/CashPaymentButton.js +2 -2
  6. package/dist/ConfirmCashPaymentButton.js +2 -2
  7. package/dist/CopyButtonWrapper-B53v2TyQ.js +22 -0
  8. package/dist/CopyButtonWrapper-B53v2TyQ.js.map +1 -0
  9. package/dist/CopyButtonWrapper-CbzDq6Cq.js +22 -0
  10. package/dist/CopyButtonWrapper-CbzDq6Cq.js.map +1 -0
  11. package/dist/CustomerCancelRecurringPaymentForm.js +7 -27
  12. package/dist/CustomerCancelRecurringPaymentForm.js.map +1 -1
  13. package/dist/{ExportModal-DGOx1b6l.js → ExportModal-Bun3pMGn.js} +3 -17
  14. package/dist/ExportModal-Bun3pMGn.js.map +1 -0
  15. package/dist/ExportModal-X-AJPdkc.js +105 -0
  16. package/dist/ExportModal-X-AJPdkc.js.map +1 -0
  17. package/dist/ManualUpiConnect.js +6 -37
  18. package/dist/ManualUpiConnect.js.map +1 -1
  19. package/dist/ManualUpiPayment.js +2 -2
  20. package/dist/ManualUpiPaymentConfirmButton.js +2 -2
  21. package/dist/ManualUpiPaymentRejectButton.js +2 -2
  22. package/dist/PaymentsDashboard.js +10 -20
  23. package/dist/PaymentsDashboard.js.map +1 -1
  24. package/dist/PayoutsDashboard.js +7 -6
  25. package/dist/PayoutsDashboard.js.map +1 -1
  26. package/dist/PayoutsPage.js +6 -22
  27. package/dist/PayoutsPage.js.map +1 -1
  28. package/dist/RazorpayConnect.js +2 -2
  29. package/dist/RazorpayLinkedAccountForm.js +5 -24
  30. package/dist/RazorpayLinkedAccountForm.js.map +1 -1
  31. package/dist/RazorpayPaymentButton.js +6 -4
  32. package/dist/RazorpayPaymentButton.js.map +1 -1
  33. package/dist/RecurringPaymentSettings.js +7 -25
  34. package/dist/RecurringPaymentSettings.js.map +1 -1
  35. package/dist/RefundsDashboard.js +10 -20
  36. package/dist/RefundsDashboard.js.map +1 -1
  37. package/dist/SplitTransfersDashboard.js +10 -35
  38. package/dist/SplitTransfersDashboard.js.map +1 -1
  39. package/dist/StripeCheckoutSetting.js +7 -25
  40. package/dist/StripeCheckoutSetting.js.map +1 -1
  41. package/dist/StripeConnect.js +7 -16
  42. package/dist/StripeConnect.js.map +1 -1
  43. package/dist/StripeManage.js +2 -1
  44. package/dist/StripeManage.js.map +1 -1
  45. package/dist/TaxesDashboard.js +7 -57
  46. package/dist/TaxesDashboard.js.map +1 -1
  47. package/dist/buildStripeTransactionLink.js +1 -1
  48. package/dist/cjs/AccountsDashboard.js +7 -6
  49. package/dist/cjs/AccountsDashboard.js.map +1 -1
  50. package/dist/cjs/AdminCancelRecurringPaymentButton.js +5 -18
  51. package/dist/cjs/AdminCancelRecurringPaymentButton.js.map +1 -1
  52. package/dist/cjs/CashPaymentButton.js +2 -2
  53. package/dist/cjs/ConfirmCashPaymentButton.js +2 -2
  54. package/dist/cjs/CopyButtonWrapper-CXzqqYIp.js +24 -0
  55. package/dist/cjs/CopyButtonWrapper-CXzqqYIp.js.map +1 -0
  56. package/dist/cjs/CopyButtonWrapper-CbcAHUmk.js +24 -0
  57. package/dist/cjs/CopyButtonWrapper-CbcAHUmk.js.map +1 -0
  58. package/dist/cjs/CustomerCancelRecurringPaymentForm.js +9 -29
  59. package/dist/cjs/CustomerCancelRecurringPaymentForm.js.map +1 -1
  60. package/dist/cjs/ExportModal-C7_QKb9q.js +107 -0
  61. package/dist/cjs/ExportModal-C7_QKb9q.js.map +1 -0
  62. package/dist/cjs/{ExportModal-CJlEDIWM.js → ExportModal-DwLOAhIs.js} +4 -18
  63. package/dist/cjs/ExportModal-DwLOAhIs.js.map +1 -0
  64. package/dist/cjs/ManualUpiConnect.js +9 -40
  65. package/dist/cjs/ManualUpiConnect.js.map +1 -1
  66. package/dist/cjs/ManualUpiPayment.js +2 -2
  67. package/dist/cjs/ManualUpiPaymentConfirmButton.js +2 -2
  68. package/dist/cjs/ManualUpiPaymentRejectButton.js +2 -2
  69. package/dist/cjs/PaymentsDashboard.js +11 -21
  70. package/dist/cjs/PaymentsDashboard.js.map +1 -1
  71. package/dist/cjs/PayoutsDashboard.js +7 -6
  72. package/dist/cjs/PayoutsDashboard.js.map +1 -1
  73. package/dist/cjs/PayoutsPage.js +7 -23
  74. package/dist/cjs/PayoutsPage.js.map +1 -1
  75. package/dist/cjs/RazorpayConnect.js +2 -2
  76. package/dist/cjs/RazorpayLinkedAccountForm.js +7 -26
  77. package/dist/cjs/RazorpayLinkedAccountForm.js.map +1 -1
  78. package/dist/cjs/RazorpayPaymentButton.js +6 -4
  79. package/dist/cjs/RazorpayPaymentButton.js.map +1 -1
  80. package/dist/cjs/RecurringPaymentSettings.js +8 -26
  81. package/dist/cjs/RecurringPaymentSettings.js.map +1 -1
  82. package/dist/cjs/RefundsDashboard.js +11 -21
  83. package/dist/cjs/RefundsDashboard.js.map +1 -1
  84. package/dist/cjs/SplitTransfersDashboard.js +13 -38
  85. package/dist/cjs/SplitTransfersDashboard.js.map +1 -1
  86. package/dist/cjs/StripeCheckoutSetting.js +9 -27
  87. package/dist/cjs/StripeCheckoutSetting.js.map +1 -1
  88. package/dist/cjs/StripeConnect.js +7 -16
  89. package/dist/cjs/StripeConnect.js.map +1 -1
  90. package/dist/cjs/StripeManage.js +2 -1
  91. package/dist/cjs/StripeManage.js.map +1 -1
  92. package/dist/cjs/TaxesDashboard.js +10 -60
  93. package/dist/cjs/TaxesDashboard.js.map +1 -1
  94. package/dist/cjs/buildStripeTransactionLink.js +1 -1
  95. package/dist/cjs/constants.js +1 -1
  96. package/dist/{CopyButtonWrapper-DkI2F6Ty.js → cjs/copy-button-DdBSM5yi.js} +3 -20
  97. package/dist/cjs/copy-button-DdBSM5yi.js.map +1 -0
  98. package/dist/cjs/{dashboard-0e4qOr6Q.js → dashboard-BGW0_f30.js} +2 -2
  99. package/dist/cjs/{dashboard-0e4qOr6Q.js.map → dashboard-BGW0_f30.js.map} +1 -1
  100. package/dist/cjs/getAddressElementOptions.js +1 -1
  101. package/dist/cjs/getAmountInLargestCurrencyUnit.js +1 -1
  102. package/dist/cjs/getAmountInSmallestCurrencyUnit.js +1 -1
  103. package/dist/cjs/getAmountWithAppliedTax.js +1 -1
  104. package/dist/cjs/getFormattedAmount.js +1 -1
  105. package/dist/cjs/getFormattedDiscountedAmount.js +1 -1
  106. package/dist/cjs/getFormattedDiscountedPercentage.js +1 -1
  107. package/dist/cjs/getFormattedTaxAmount.js +1 -1
  108. package/dist/cjs/getFormattedTipAmount.js +1 -1
  109. package/dist/cjs/getQrCodeValue.js +1 -1
  110. package/dist/cjs/getTaxAmount.js +1 -1
  111. package/dist/cjs/getTipAmount.js +1 -1
  112. package/dist/cjs/hasAmountToPay.js +1 -1
  113. package/dist/cjs/{index-d81RoerD.js → index-CpEnC-Gq.js} +8 -8
  114. package/dist/cjs/index-CpEnC-Gq.js.map +1 -0
  115. package/dist/cjs/index-CsYH-ECo.js +21 -0
  116. package/dist/cjs/index-CsYH-ECo.js.map +1 -0
  117. package/dist/cjs/index.js +29 -15
  118. package/dist/cjs/index.js.map +1 -1
  119. package/dist/cjs/main-BnTRneCH.js +7 -0
  120. package/dist/cjs/main-BnTRneCH.js.map +1 -0
  121. package/dist/cjs/renderFunctions-DJ3I4O4j.js +73 -0
  122. package/dist/cjs/renderFunctions-DJ3I4O4j.js.map +1 -0
  123. package/dist/cjs/{renderFunctions-Bti0TEIP.js → renderFunctions-DW33daSm.js} +3 -3
  124. package/dist/cjs/{renderFunctions-Bti0TEIP.js.map → renderFunctions-DW33daSm.js.map} +1 -1
  125. package/dist/cjs/{useAccountsApi-DsrOzkcV.js → useAccountsApi-DaOq20gj.js} +2 -2
  126. package/dist/cjs/{useAccountsApi-DsrOzkcV.js.map → useAccountsApi-DaOq20gj.js.map} +1 -1
  127. package/dist/cjs/useBusinessTypesApi-D_td8mux.js +30 -0
  128. package/dist/cjs/useBusinessTypesApi-D_td8mux.js.map +1 -0
  129. package/dist/cjs/useCheckoutSettingsApi-fGVkfRBQ.js +31 -0
  130. package/dist/cjs/useCheckoutSettingsApi-fGVkfRBQ.js.map +1 -0
  131. package/dist/cjs/useCountriesApi-CWsN_NIT.js +19 -0
  132. package/dist/cjs/useCountriesApi-CWsN_NIT.js.map +1 -0
  133. package/dist/cjs/{useExportsApi-damWskqN.js → useExportsApi-CupgYUpS.js} +2 -2
  134. package/dist/cjs/{useExportsApi-damWskqN.js.map → useExportsApi-CupgYUpS.js.map} +1 -1
  135. package/dist/cjs/useExportsApi-rYuPpXWl.js +21 -0
  136. package/dist/cjs/useExportsApi-rYuPpXWl.js.map +1 -0
  137. package/dist/cjs/useFetchData-C85lubOx.js +24 -0
  138. package/dist/cjs/useFetchData-C85lubOx.js.map +1 -0
  139. package/dist/cjs/{useIntegrationsApi-Cdm9Q9F_.js → useIntegrationsApi-CNrrE2OH.js} +2 -2
  140. package/dist/cjs/{useIntegrationsApi-Cdm9Q9F_.js.map → useIntegrationsApi-CNrrE2OH.js.map} +1 -1
  141. package/dist/cjs/{usePaymentApi-DmaCm5ok.js → usePaymentApi-B198Hd_a.js} +2 -2
  142. package/dist/cjs/{usePaymentApi-DmaCm5ok.js.map → usePaymentApi-B198Hd_a.js.map} +1 -1
  143. package/dist/cjs/{usePaymentApi-tvigxwUS.js → usePaymentApi-CuL13mny.js} +2 -2
  144. package/dist/cjs/{usePaymentApi-tvigxwUS.js.map → usePaymentApi-CuL13mny.js.map} +1 -1
  145. package/dist/cjs/{usePaymentApi-CGzEYmcs.js → usePaymentApi-DZYqqfhc.js} +2 -2
  146. package/dist/cjs/{usePaymentApi-CGzEYmcs.js.map → usePaymentApi-DZYqqfhc.js.map} +1 -1
  147. package/dist/cjs/usePaymentsApi-ZomyqUIJ.js +22 -0
  148. package/dist/cjs/usePaymentsApi-ZomyqUIJ.js.map +1 -0
  149. package/dist/cjs/{usePlatformApi-D6ns278e.js → usePlatformApi-ByvYg8Y-.js} +2 -2
  150. package/dist/cjs/{usePlatformApi-D6ns278e.js.map → usePlatformApi-ByvYg8Y-.js.map} +1 -1
  151. package/dist/cjs/useRazorpayPayment.js +2 -2
  152. package/dist/cjs/useRecurringPaymentsApi-DQpypVjt.js +33 -0
  153. package/dist/cjs/useRecurringPaymentsApi-DQpypVjt.js.map +1 -0
  154. package/dist/cjs/useRecurringPaymentsApi-Dow6RjiT.js +22 -0
  155. package/dist/cjs/useRecurringPaymentsApi-Dow6RjiT.js.map +1 -0
  156. package/dist/cjs/useRecurringSettingsApi-CDA5wZnB.js +31 -0
  157. package/dist/cjs/useRecurringSettingsApi-CDA5wZnB.js.map +1 -0
  158. package/dist/cjs/useRefundsApi-enBsXWAk.js +22 -0
  159. package/dist/cjs/useRefundsApi-enBsXWAk.js.map +1 -0
  160. package/dist/cjs/useSplitTransfersApi-BcCKsPCE.js +40 -0
  161. package/dist/cjs/useSplitTransfersApi-BcCKsPCE.js.map +1 -0
  162. package/dist/cjs/useTaxesApi-BBinhUYT.js +65 -0
  163. package/dist/cjs/useTaxesApi-BBinhUYT.js.map +1 -0
  164. package/dist/cjs/useVpasApi-Ts1ivO7S.js +44 -0
  165. package/dist/cjs/useVpasApi-Ts1ivO7S.js.map +1 -0
  166. package/dist/cjs/v2/AccountsDashboard.js +477 -0
  167. package/dist/cjs/v2/AccountsDashboard.js.map +1 -0
  168. package/dist/cjs/v2/AdminCancelRecurringPaymentButton.js +54 -0
  169. package/dist/cjs/v2/AdminCancelRecurringPaymentButton.js.map +1 -0
  170. package/dist/cjs/v2/CashPaymentButton.js +60 -0
  171. package/dist/cjs/v2/CashPaymentButton.js.map +1 -0
  172. package/dist/cjs/v2/ConfirmCashPaymentButton.js +100 -0
  173. package/dist/cjs/v2/ConfirmCashPaymentButton.js.map +1 -0
  174. package/dist/cjs/v2/CustomerCancelRecurringPaymentForm.js +85 -0
  175. package/dist/cjs/v2/CustomerCancelRecurringPaymentForm.js.map +1 -0
  176. package/dist/cjs/v2/ManualUpiConnect.js +227 -0
  177. package/dist/cjs/v2/ManualUpiConnect.js.map +1 -0
  178. package/dist/cjs/v2/ManualUpiPayment.js +253 -0
  179. package/dist/cjs/v2/ManualUpiPayment.js.map +1 -0
  180. package/dist/cjs/v2/ManualUpiPaymentConfirmButton.js +172 -0
  181. package/dist/cjs/v2/ManualUpiPaymentConfirmButton.js.map +1 -0
  182. package/dist/cjs/v2/ManualUpiPaymentRejectButton.js +127 -0
  183. package/dist/cjs/v2/ManualUpiPaymentRejectButton.js.map +1 -0
  184. package/dist/cjs/v2/PaymentKindRestrictionAlert.js +33 -0
  185. package/dist/cjs/v2/PaymentKindRestrictionAlert.js.map +1 -0
  186. package/dist/cjs/v2/PaymentsDashboard.js +581 -0
  187. package/dist/cjs/v2/PaymentsDashboard.js.map +1 -0
  188. package/dist/cjs/v2/PayoutsDashboard.js +516 -0
  189. package/dist/cjs/v2/PayoutsDashboard.js.map +1 -0
  190. package/dist/cjs/v2/PayoutsPage.js +144 -0
  191. package/dist/cjs/v2/PayoutsPage.js.map +1 -0
  192. package/dist/cjs/v2/RazorpayConnect.js +117 -0
  193. package/dist/cjs/v2/RazorpayConnect.js.map +1 -0
  194. package/dist/cjs/v2/RazorpayLinkedAccountForm.js +174 -0
  195. package/dist/cjs/v2/RazorpayLinkedAccountForm.js.map +1 -0
  196. package/dist/cjs/v2/RazorpayPaymentButton.js +145 -0
  197. package/dist/cjs/v2/RazorpayPaymentButton.js.map +1 -0
  198. package/dist/cjs/v2/RecurringPaymentSettings.js +121 -0
  199. package/dist/cjs/v2/RecurringPaymentSettings.js.map +1 -0
  200. package/dist/cjs/v2/RefundsDashboard.js +492 -0
  201. package/dist/cjs/v2/RefundsDashboard.js.map +1 -0
  202. package/dist/cjs/v2/SplitTransfersDashboard.js +943 -0
  203. package/dist/cjs/v2/SplitTransfersDashboard.js.map +1 -0
  204. package/dist/cjs/v2/StripeCheckoutSetting.js +66 -0
  205. package/dist/cjs/v2/StripeCheckoutSetting.js.map +1 -0
  206. package/dist/cjs/v2/StripeConnect.js +384 -0
  207. package/dist/cjs/v2/StripeConnect.js.map +1 -0
  208. package/dist/cjs/v2/StripeManage.js +50 -0
  209. package/dist/cjs/v2/StripeManage.js.map +1 -0
  210. package/dist/cjs/v2/TaxesDashboard.js +338 -0
  211. package/dist/cjs/v2/TaxesDashboard.js.map +1 -0
  212. package/dist/cjs/v2/index.js +125 -0
  213. package/dist/cjs/v2/index.js.map +1 -0
  214. package/dist/constants.js +1 -1
  215. package/dist/{cjs/CopyButtonWrapper-DZ9rE5UR.js → copy-button-EhEBcNP9.js} +2 -24
  216. package/dist/copy-button-EhEBcNP9.js.map +1 -0
  217. package/dist/{dashboard-Bu-kKlqX.js → dashboard-Ba2uhKXD.js} +2 -2
  218. package/dist/{dashboard-Bu-kKlqX.js.map → dashboard-Ba2uhKXD.js.map} +1 -1
  219. package/dist/getAddressElementOptions.js +1 -1
  220. package/dist/getAmountInLargestCurrencyUnit.js +1 -1
  221. package/dist/getAmountInSmallestCurrencyUnit.js +1 -1
  222. package/dist/getAmountWithAppliedTax.js +1 -1
  223. package/dist/getFormattedAmount.js +1 -1
  224. package/dist/getFormattedDiscountedAmount.js +1 -1
  225. package/dist/getFormattedDiscountedPercentage.js +1 -1
  226. package/dist/getFormattedTaxAmount.js +1 -1
  227. package/dist/getFormattedTipAmount.js +1 -1
  228. package/dist/getQrCodeValue.js +1 -1
  229. package/dist/getTaxAmount.js +1 -1
  230. package/dist/getTipAmount.js +1 -1
  231. package/dist/hasAmountToPay.js +1 -1
  232. package/dist/index-CKJlawqs.js +19 -0
  233. package/dist/index-CKJlawqs.js.map +1 -0
  234. package/dist/{index-BFPr9LL_.js → index-CajHy3NQ.js} +9 -9
  235. package/dist/index-CajHy3NQ.js.map +1 -0
  236. package/dist/index.js +28 -16
  237. package/dist/index.js.map +1 -1
  238. package/dist/main-Bqi97Os6.js +5 -0
  239. package/dist/main-Bqi97Os6.js.map +1 -0
  240. package/dist/{renderFunctions-Cj94YzPn.js → renderFunctions-B9mVn_ag.js} +4 -4
  241. package/dist/{renderFunctions-Cj94YzPn.js.map → renderFunctions-B9mVn_ag.js.map} +1 -1
  242. package/dist/renderFunctions-SFUBbGqd.js +67 -0
  243. package/dist/renderFunctions-SFUBbGqd.js.map +1 -0
  244. package/dist/{useAccountsApi-BYO3jcvn.js → useAccountsApi-CZyJ4R8Z.js} +3 -3
  245. package/dist/{useAccountsApi-BYO3jcvn.js.map → useAccountsApi-CZyJ4R8Z.js.map} +1 -1
  246. package/dist/useBusinessTypesApi-CS2aPq7Y.js +27 -0
  247. package/dist/useBusinessTypesApi-CS2aPq7Y.js.map +1 -0
  248. package/dist/useCheckoutSettingsApi-D1ZvMA4B.js +28 -0
  249. package/dist/useCheckoutSettingsApi-D1ZvMA4B.js.map +1 -0
  250. package/dist/useCountriesApi-ClXgwNgC.js +17 -0
  251. package/dist/useCountriesApi-ClXgwNgC.js.map +1 -0
  252. package/dist/useExportsApi-C1wjoVYy.js +19 -0
  253. package/dist/useExportsApi-C1wjoVYy.js.map +1 -0
  254. package/dist/{useExportsApi-Kh-sIsaX.js → useExportsApi-DA6ThV9b.js} +2 -2
  255. package/dist/{useExportsApi-Kh-sIsaX.js.map → useExportsApi-DA6ThV9b.js.map} +1 -1
  256. package/dist/useFetchData-8LLdmA74.js +22 -0
  257. package/dist/useFetchData-8LLdmA74.js.map +1 -0
  258. package/dist/{useIntegrationsApi-4-kw1M93.js → useIntegrationsApi-BqU-lJql.js} +2 -2
  259. package/dist/{useIntegrationsApi-4-kw1M93.js.map → useIntegrationsApi-BqU-lJql.js.map} +1 -1
  260. package/dist/{usePaymentApi-DsXrGrJF.js → usePaymentApi-BzB3rzNe.js} +2 -2
  261. package/dist/{usePaymentApi-DsXrGrJF.js.map → usePaymentApi-BzB3rzNe.js.map} +1 -1
  262. package/dist/{usePaymentApi-D6FQUiYT.js → usePaymentApi-C8fRdHmK.js} +2 -2
  263. package/dist/{usePaymentApi-D6FQUiYT.js.map → usePaymentApi-C8fRdHmK.js.map} +1 -1
  264. package/dist/{usePaymentApi-BQyWVrBI.js → usePaymentApi-gvPmTOWg.js} +2 -2
  265. package/dist/{usePaymentApi-BQyWVrBI.js.map → usePaymentApi-gvPmTOWg.js.map} +1 -1
  266. package/dist/usePaymentsApi-C2xbgHmw.js +20 -0
  267. package/dist/usePaymentsApi-C2xbgHmw.js.map +1 -0
  268. package/dist/{usePlatformApi-CQY4MOWy.js → usePlatformApi-Dug1pxaH.js} +3 -3
  269. package/dist/{usePlatformApi-CQY4MOWy.js.map → usePlatformApi-Dug1pxaH.js.map} +1 -1
  270. package/dist/useRazorpayPayment.js +2 -2
  271. package/dist/useRecurringPaymentsApi-CkxjkZd2.js +30 -0
  272. package/dist/useRecurringPaymentsApi-CkxjkZd2.js.map +1 -0
  273. package/dist/useRecurringPaymentsApi-dbdBrh4V.js +20 -0
  274. package/dist/useRecurringPaymentsApi-dbdBrh4V.js.map +1 -0
  275. package/dist/useRecurringSettingsApi-B_kTDES9.js +28 -0
  276. package/dist/useRecurringSettingsApi-B_kTDES9.js.map +1 -0
  277. package/dist/useRefundsApi-DSMKTWIQ.js +20 -0
  278. package/dist/useRefundsApi-DSMKTWIQ.js.map +1 -0
  279. package/dist/useSplitTransfersApi-DlRs4wYh.js +36 -0
  280. package/dist/useSplitTransfersApi-DlRs4wYh.js.map +1 -0
  281. package/dist/useTaxesApi-BuPeVUxI.js +60 -0
  282. package/dist/useTaxesApi-BuPeVUxI.js.map +1 -0
  283. package/dist/useVpasApi-wicZ6o_z.js +40 -0
  284. package/dist/useVpasApi-wicZ6o_z.js.map +1 -0
  285. package/dist/v2/AccountsDashboard.js +475 -0
  286. package/dist/v2/AccountsDashboard.js.map +1 -0
  287. package/dist/v2/AdminCancelRecurringPaymentButton.js +52 -0
  288. package/dist/v2/AdminCancelRecurringPaymentButton.js.map +1 -0
  289. package/dist/v2/CashPaymentButton.js +58 -0
  290. package/dist/v2/CashPaymentButton.js.map +1 -0
  291. package/dist/v2/ConfirmCashPaymentButton.js +98 -0
  292. package/dist/v2/ConfirmCashPaymentButton.js.map +1 -0
  293. package/dist/v2/CustomerCancelRecurringPaymentForm.js +83 -0
  294. package/dist/v2/CustomerCancelRecurringPaymentForm.js.map +1 -0
  295. package/dist/v2/ManualUpiConnect.js +206 -0
  296. package/dist/v2/ManualUpiConnect.js.map +1 -0
  297. package/dist/v2/ManualUpiPayment.js +232 -0
  298. package/dist/v2/ManualUpiPayment.js.map +1 -0
  299. package/dist/v2/ManualUpiPaymentConfirmButton.js +151 -0
  300. package/dist/v2/ManualUpiPaymentConfirmButton.js.map +1 -0
  301. package/dist/v2/ManualUpiPaymentRejectButton.js +125 -0
  302. package/dist/v2/ManualUpiPaymentRejectButton.js.map +1 -0
  303. package/dist/v2/PaymentKindRestrictionAlert.js +31 -0
  304. package/dist/v2/PaymentKindRestrictionAlert.js.map +1 -0
  305. package/dist/v2/PaymentsDashboard.js +579 -0
  306. package/dist/v2/PaymentsDashboard.js.map +1 -0
  307. package/dist/v2/PayoutsDashboard.js +514 -0
  308. package/dist/v2/PayoutsDashboard.js.map +1 -0
  309. package/dist/v2/PayoutsPage.js +142 -0
  310. package/dist/v2/PayoutsPage.js.map +1 -0
  311. package/dist/v2/RazorpayConnect.js +115 -0
  312. package/dist/v2/RazorpayConnect.js.map +1 -0
  313. package/dist/v2/RazorpayLinkedAccountForm.js +172 -0
  314. package/dist/v2/RazorpayLinkedAccountForm.js.map +1 -0
  315. package/dist/v2/RazorpayPaymentButton.js +143 -0
  316. package/dist/v2/RazorpayPaymentButton.js.map +1 -0
  317. package/dist/v2/RecurringPaymentSettings.js +100 -0
  318. package/dist/v2/RecurringPaymentSettings.js.map +1 -0
  319. package/dist/v2/RefundsDashboard.js +490 -0
  320. package/dist/v2/RefundsDashboard.js.map +1 -0
  321. package/dist/v2/SplitTransfersDashboard.js +922 -0
  322. package/dist/v2/SplitTransfersDashboard.js.map +1 -0
  323. package/dist/v2/StripeCheckoutSetting.js +64 -0
  324. package/dist/v2/StripeCheckoutSetting.js.map +1 -0
  325. package/dist/v2/StripeConnect.js +363 -0
  326. package/dist/v2/StripeConnect.js.map +1 -0
  327. package/dist/v2/StripeManage.js +48 -0
  328. package/dist/v2/StripeManage.js.map +1 -0
  329. package/dist/v2/TaxesDashboard.js +317 -0
  330. package/dist/v2/TaxesDashboard.js.map +1 -0
  331. package/dist/v2/index.js +94 -0
  332. package/dist/v2/index.js.map +1 -0
  333. package/package.json +32 -18
  334. package/dist/CopyButtonWrapper-DkI2F6Ty.js.map +0 -1
  335. package/dist/ExportModal-DGOx1b6l.js.map +0 -1
  336. package/dist/cjs/CopyButtonWrapper-DZ9rE5UR.js.map +0 -1
  337. package/dist/cjs/ExportModal-CJlEDIWM.js.map +0 -1
  338. package/dist/cjs/index-d81RoerD.js.map +0 -1
  339. package/dist/index-BFPr9LL_.js.map +0 -1
@@ -0,0 +1,922 @@
1
+ import { useState, startTransition, useEffect } from 'react';
2
+ import { Dialog, Typography, Tooltip, Badge, Sheet, Spinner, Button, Empty, DataTable, Tabs } from '@bigbinary/neeto-atoms';
3
+ import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from 'neetocommons/constants';
4
+ import { currencyFormat, getQueryParams, buildUrl } from 'neetocommons/utils';
5
+ import { Bar, buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend';
6
+ import { mergeLeft, curry, reject, isNil, concat, map, prop, mergeDeepWith, sortBy, isEmpty, pluck } from 'ramda';
7
+ import { useHistory } from 'react-router-dom';
8
+ import { E as ExportModal } from '../ExportModal-X-AJPdkc.js';
9
+ import { u as useShowSplitTransfers, a as useFetchSplitTransfers, b as useBulkUpdateSplitTransfers } from '../useSplitTransfersApi-DlRs4wYh.js';
10
+ import { r as formatAmount, s as formatCurrency, J as PAYMENT_KIND, z as DEFAULT_SORT_PROPERTIES, x as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, D as DEFAULT_PAGE_VALUES, y as DASHBOARD_KIND } from '../index-CajHy3NQ.js';
11
+ import { Form, Textarea, ActionBlock } from '@bigbinary/neeto-atoms/formik';
12
+ import { useTranslation } from 'react-i18next';
13
+ import { t } from 'i18next';
14
+ import * as yup from 'yup';
15
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
16
+ import { isNotPresent, humanize, isPresent, removeBy, camelToSnakeCase } from 'neetocist';
17
+ import { useTableConfigurations } from '@bigbinary/neeto-molecules/v2/Columns';
18
+ import TableWrapper from '@bigbinary/neeto-molecules/v2/TableWrapper';
19
+ import { T as TABLE_KEYS } from '../exportChannel-Db0U5gc1.js';
20
+ import HelpPopover from '@bigbinary/neeto-molecules/v2/HelpPopover';
21
+ import { p as preProcessStatus, g as getV2TagStyle } from '../renderFunctions-SFUBbGqd.js';
22
+ import DateFormat from '@bigbinary/neeto-molecules/v2/DateFormat';
23
+ import { C as CopyButtonWrapper } from '../CopyButtonWrapper-B53v2TyQ.js';
24
+ import Header from '@bigbinary/neeto-molecules/v2/Header';
25
+ import SubHeader from '@bigbinary/neeto-molecules/v2/SubHeader';
26
+ import '@bigbinary/neeto-icons';
27
+ import '../useExportsApi-C1wjoVYy.js';
28
+ import '@tanstack/react-query';
29
+ import 'axios';
30
+ import 'neetocommons/react-utils';
31
+ import '../queryConstants-8c7Nd8ML.js';
32
+ import 'decimal.js';
33
+ import '@bigbinary/neeto-molecules/v2/CopyToClipboardButton';
34
+ import '../copy-button-EhEBcNP9.js';
35
+
36
+ const SPLIT_TRANSFERS_DASHBOARD_TAB = {
37
+ all: "all",
38
+ successful: "successful",
39
+ cancelled: "cancelled",
40
+ pending: "pending"
41
+ };
42
+ const SEARCH_PROPS = {
43
+ node: "identifier,",
44
+ key: "search_term",
45
+ model: "NeetoPaymentsEngine::Payments::Split,"
46
+ };
47
+ const FILTER_COLUMNS = [{
48
+ key: "amount",
49
+ label: t("neetoPayments.common.amount"),
50
+ node: "amount",
51
+ type: "decimal"
52
+ }, {
53
+ key: "payment_at",
54
+ label: t("neetoPayments.common.transferTime"),
55
+ node: "payment_at",
56
+ type: "date"
57
+ }];
58
+ const INITIAL_TRANSFER_DETAILS = {
59
+ id: null,
60
+ isPaneOpen: false
61
+ };
62
+ const VALIDATION_SCHEMA = yup.object().shape({
63
+ reason: yup.string().required(t("neetoPayments.cancelSplitTransfers.reasonRequired"))
64
+ });
65
+
66
+ const CancelModal = ({
67
+ isOpen,
68
+ onClose,
69
+ handleSplitTransfersUpdate
70
+ }) => {
71
+ const {
72
+ t
73
+ } = useTranslation();
74
+ const handleSubmit = ({
75
+ reason
76
+ }) => {
77
+ handleSplitTransfersUpdate("cancelled", reason);
78
+ };
79
+ return /*#__PURE__*/jsxs(Dialog, {
80
+ isOpen,
81
+ onClose,
82
+ size: "large",
83
+ children: [/*#__PURE__*/jsx(Dialog.Header, {
84
+ children: /*#__PURE__*/jsx(Dialog.Title, {
85
+ children: t("neetoPayments.cancelSplitTransfers.modal.title")
86
+ })
87
+ }), /*#__PURE__*/jsx(Form, {
88
+ formikProps: {
89
+ initialValues: {
90
+ reason: ""
91
+ },
92
+ validationSchema: VALIDATION_SCHEMA,
93
+ onSubmit: handleSubmit
94
+ },
95
+ children: ({
96
+ isSubmitting
97
+ }) => /*#__PURE__*/jsxs(Fragment, {
98
+ children: [/*#__PURE__*/jsx(Dialog.Body, {
99
+ children: /*#__PURE__*/jsx("div", {
100
+ className: "flex flex-col space-y-4",
101
+ children: /*#__PURE__*/jsx(Textarea, {
102
+ required: true,
103
+ label: t("neetoPayments.cancelSplitTransfers.modal.reason"),
104
+ name: "reason"
105
+ })
106
+ })
107
+ }), /*#__PURE__*/jsx(Dialog.Footer, {
108
+ className: "space-x-2",
109
+ children: /*#__PURE__*/jsx(ActionBlock, {
110
+ isSubmitting,
111
+ position: "right",
112
+ cancelButtonProps: {
113
+ onClick: onClose,
114
+ variant: "ghost"
115
+ },
116
+ submitButtonProps: {
117
+ disabled: isSubmitting,
118
+ label: t("neetoPayments.common.submit")
119
+ }
120
+ })
121
+ })]
122
+ })
123
+ })]
124
+ });
125
+ };
126
+
127
+ const Status = ({
128
+ type,
129
+ status = ""
130
+ }) => {
131
+ const {
132
+ t
133
+ } = useTranslation();
134
+ const processedStatus = preProcessStatus(type, status);
135
+ if (isNotPresent(status)) {
136
+ return /*#__PURE__*/jsx(Typography, {
137
+ variant: "body2",
138
+ children: t("neetoPayments.common.notAvailable")
139
+ });
140
+ }
141
+ return /*#__PURE__*/jsx(Tooltip, {
142
+ content: t(`neetoPayments.tooltipContent.${type}.${processedStatus}`),
143
+ position: "top",
144
+ children: /*#__PURE__*/jsx("div", {
145
+ className: "w-fit",
146
+ children: /*#__PURE__*/jsx(Badge, {
147
+ variant: getV2TagStyle(processedStatus),
148
+ children: humanize(t(`neetoPayments.tagLabels.${type}.${processedStatus}`))
149
+ })
150
+ })
151
+ });
152
+ };
153
+
154
+ const Date = ({
155
+ date,
156
+ isTimeVisible = false
157
+ }) => {
158
+ const {
159
+ t
160
+ } = useTranslation();
161
+ if (isNotPresent(date)) {
162
+ return /*#__PURE__*/jsx(Typography, {
163
+ variant: "body2",
164
+ children: t("neetoPayments.common.notAvailable")
165
+ });
166
+ }
167
+ if (isTimeVisible) {
168
+ return /*#__PURE__*/jsx("div", {
169
+ className: "flex items-center",
170
+ children: /*#__PURE__*/jsx(DateFormat.DateTime, {
171
+ date
172
+ })
173
+ });
174
+ }
175
+ return /*#__PURE__*/jsx("div", {
176
+ className: "flex items-center",
177
+ children: /*#__PURE__*/jsx(DateFormat.Date, {
178
+ date
179
+ })
180
+ });
181
+ };
182
+
183
+ const DiscountCode = ({
184
+ discountCode,
185
+ currency
186
+ }) => {
187
+ const {
188
+ t
189
+ } = useTranslation();
190
+ const {
191
+ code,
192
+ value,
193
+ kind
194
+ } = discountCode;
195
+ const uppercaseCurrency = currency?.toUpperCase();
196
+ if (isNotPresent(uppercaseCurrency)) return null;
197
+ return /*#__PURE__*/jsx(Typography, {
198
+ variant: "body2",
199
+ children: kind === "percentage" ? t("neetoPayments.splitTransferDetails.discountCodeOfPercentageApplied", {
200
+ code,
201
+ percentage: value.toFixed(1)
202
+ }) : t("neetoPayments.splitTransferDetails.discountCodeOfAmountApplied", {
203
+ code,
204
+ amount: currencyFormat.withSymbol(value, uppercaseCurrency, {
205
+ maximumFractionDigits: 2,
206
+ minimumFractionDigits: 2
207
+ })
208
+ })
209
+ });
210
+ };
211
+
212
+ const Details = ({
213
+ selectedTransfer,
214
+ setSelectedTransfer
215
+ }) => {
216
+ const {
217
+ t
218
+ } = useTranslation();
219
+ const {
220
+ isPending,
221
+ data: {
222
+ splitTransfer
223
+ } = {}
224
+ } = useShowSplitTransfers(selectedTransfer["id"], {
225
+ enabled: isPresent(selectedTransfer["id"])
226
+ });
227
+ return /*#__PURE__*/jsxs(Sheet, {
228
+ isOpen: selectedTransfer["isPaneOpen"],
229
+ size: "lg",
230
+ onClose: () => setSelectedTransfer(mergeLeft({
231
+ isPaneOpen: false
232
+ }, selectedTransfer)),
233
+ children: [/*#__PURE__*/jsx(Sheet.Header, {
234
+ children: /*#__PURE__*/jsx(Sheet.Title, {
235
+ children: t("neetoPayments.splitTransferDetails.title")
236
+ })
237
+ }), /*#__PURE__*/jsx(Sheet.Body, {
238
+ children: isPending ? /*#__PURE__*/jsx("div", {
239
+ className: "flex h-full w-full items-center justify-center",
240
+ children: /*#__PURE__*/jsx(Spinner, {})
241
+ }) : /*#__PURE__*/jsxs("div", {
242
+ className: "space-y-4 p-3",
243
+ children: [/*#__PURE__*/jsxs("div", {
244
+ className: "flex grid-cols-2 flex-col gap-3 lg:grid",
245
+ children: [/*#__PURE__*/jsx(Typography, {
246
+ variant: "body1",
247
+ weight: "medium",
248
+ children: t("neetoPayments.common.identifier")
249
+ }), /*#__PURE__*/jsx(Button, {
250
+ href: splitTransfer.transferUrl,
251
+ label: splitTransfer.identifier,
252
+ size: "sm",
253
+ target: "_blank",
254
+ variant: "link"
255
+ }), /*#__PURE__*/jsx(Typography, {
256
+ variant: "body1",
257
+ weight: "medium",
258
+ children: t("neetoPayments.common.status")
259
+ }), /*#__PURE__*/jsx(Status, {
260
+ status: splitTransfer.status,
261
+ type: "splitTransfers"
262
+ }), /*#__PURE__*/jsx(Typography, {
263
+ variant: "body1",
264
+ weight: "medium",
265
+ children: t("neetoPayments.common.transferTime")
266
+ }), /*#__PURE__*/jsx(Date, {
267
+ isTimeVisible: true,
268
+ date: splitTransfer.paymentAt
269
+ }), /*#__PURE__*/jsx(Typography, {
270
+ variant: "body1",
271
+ weight: "medium",
272
+ children: t("neetoPayments.common.paymentAmount")
273
+ }), /*#__PURE__*/jsx(Typography, {
274
+ variant: "body2",
275
+ children: currencyFormat.withCode(splitTransfer.sourcePayment?.amount, splitTransfer.currency?.toUpperCase())
276
+ }), isPresent(splitTransfer.discountCode) && /*#__PURE__*/jsxs(Fragment, {
277
+ children: [/*#__PURE__*/jsx(Typography, {
278
+ variant: "body1",
279
+ weight: "medium",
280
+ children: t("neetoPayments.common.discountCode")
281
+ }), /*#__PURE__*/jsx(DiscountCode, {
282
+ currency: splitTransfer.currency,
283
+ discountCode: splitTransfer.discountCode
284
+ })]
285
+ }), /*#__PURE__*/jsxs("div", {
286
+ className: "flex items-center space-x-1",
287
+ children: [/*#__PURE__*/jsx(Typography, {
288
+ variant: "body1",
289
+ weight: "medium",
290
+ children: t("neetoPayments.common.netAmount")
291
+ }), /*#__PURE__*/jsx(HelpPopover, {
292
+ popoverProps: {
293
+ position: "right"
294
+ },
295
+ description: t("neetoPayments.splitTransferDetails.netAmountDescription"),
296
+ title: t("neetoPayments.splitTransferDetails.netAmountHelpTitle")
297
+ })]
298
+ }), /*#__PURE__*/jsx(Typography, {
299
+ variant: "body2",
300
+ children: currencyFormat.withCode(splitTransfer.sourcePayment?.netAmount, splitTransfer.currency?.toUpperCase())
301
+ }), /*#__PURE__*/jsxs("div", {
302
+ className: "flex space-x-1",
303
+ children: [/*#__PURE__*/jsx(Typography, {
304
+ variant: "body1",
305
+ weight: "medium",
306
+ children: t("neetoPayments.common.platformShare")
307
+ }), /*#__PURE__*/jsx(HelpPopover, {
308
+ popoverProps: {
309
+ position: "right"
310
+ },
311
+ description: t("neetoPayments.splitTransferDetails.platformShareDescription"),
312
+ title: t("neetoPayments.splitTransferDetails.platformShareHelpTitle")
313
+ })]
314
+ }), /*#__PURE__*/jsx(Typography, {
315
+ variant: "body2",
316
+ children: currencyFormat.withCode(splitTransfer.platformShare, splitTransfer.currency?.toUpperCase())
317
+ }), /*#__PURE__*/jsx(Typography, {
318
+ variant: "body1",
319
+ weight: "medium",
320
+ children: t("neetoPayments.common.transferredAmount")
321
+ }), /*#__PURE__*/jsx(Typography, {
322
+ variant: "body2",
323
+ children: currencyFormat.withCode(splitTransfer.amount, splitTransfer.currency?.toUpperCase())
324
+ })]
325
+ }), /*#__PURE__*/jsx(Typography, {
326
+ variant: "h3",
327
+ children: t("neetoPayments.splitTransferDetails.destinationDetails")
328
+ }), /*#__PURE__*/jsxs("div", {
329
+ className: "flex grid-cols-2 flex-col gap-3 lg:grid",
330
+ children: [/*#__PURE__*/jsx(Typography, {
331
+ variant: "body1",
332
+ weight: "medium",
333
+ children: t("neetoPayments.common.destinationAccountIdentifier")
334
+ }), /*#__PURE__*/jsx(Button, {
335
+ href: splitTransfer.destinationAccount.dashboardUrl,
336
+ label: splitTransfer.destinationAccount.identifier,
337
+ size: "sm",
338
+ target: "_blank",
339
+ variant: "link"
340
+ }), /*#__PURE__*/jsx(Typography, {
341
+ variant: "body1",
342
+ weight: "medium",
343
+ children: t("neetoPayments.common.destinationAccountName")
344
+ }), /*#__PURE__*/jsx(Typography, {
345
+ variant: "body2",
346
+ children: splitTransfer.destinationAccount.userName
347
+ }), /*#__PURE__*/jsx(Typography, {
348
+ variant: "body1",
349
+ weight: "medium",
350
+ children: t("neetoPayments.common.destinationAccountEmail")
351
+ }), /*#__PURE__*/jsx(Typography, {
352
+ variant: "body2",
353
+ children: splitTransfer.destinationAccount.userEmail
354
+ }), /*#__PURE__*/jsx(Typography, {
355
+ variant: "body1",
356
+ weight: "medium",
357
+ children: t("neetoPayments.common.payoutStatus")
358
+ }), /*#__PURE__*/jsx(Status, {
359
+ status: splitTransfer.destinationPayout?.status,
360
+ type: "payout"
361
+ }), /*#__PURE__*/jsx(Typography, {
362
+ variant: "body1",
363
+ weight: "medium",
364
+ children: t("neetoPayments.splitTransferDetails.payoutInitiatedDate")
365
+ }), /*#__PURE__*/jsx(Date, {
366
+ date: splitTransfer.destinationPayout?.createdAt
367
+ }), /*#__PURE__*/jsx(Typography, {
368
+ variant: "body1",
369
+ weight: "medium",
370
+ children: t("neetoPayments.splitTransferDetails.payoutArrivalDate")
371
+ }), /*#__PURE__*/jsx(Date, {
372
+ date: splitTransfer.destinationPayout?.arrivalDate
373
+ }), /*#__PURE__*/jsx("div", {})]
374
+ })]
375
+ })
376
+ })]
377
+ });
378
+ };
379
+
380
+ const renderIdentifier = curry((setSelectedTransfer, identifier, {
381
+ id
382
+ }) => {
383
+ if (isNotPresent(identifier)) {
384
+ return /*#__PURE__*/jsx(Tooltip, {
385
+ content: t("neetoPayments.tooltipContent.identifierUnavailable"),
386
+ position: "top",
387
+ children: /*#__PURE__*/jsx("div", {
388
+ className: "text-center",
389
+ children: /*#__PURE__*/jsx(Typography, {
390
+ variant: "body2",
391
+ children: t("neetoPayments.common.notAvailable")
392
+ })
393
+ })
394
+ });
395
+ }
396
+ return /*#__PURE__*/jsx(CopyButtonWrapper, {
397
+ content: identifier,
398
+ children: /*#__PURE__*/jsx(Button, {
399
+ label: identifier,
400
+ size: "sm",
401
+ variant: "link",
402
+ onClick: () => setSelectedTransfer({
403
+ id,
404
+ isPaneOpen: true
405
+ })
406
+ })
407
+ });
408
+ });
409
+ const renderPlatformPaymentIdentifier = ({
410
+ identifier,
411
+ receiptUrl,
412
+ kind
413
+ }) => {
414
+ if (kind === PAYMENT_KIND.temporary) {
415
+ return /*#__PURE__*/jsx(CopyButtonWrapper, {
416
+ content: identifier,
417
+ children: identifier
418
+ });
419
+ }
420
+ return /*#__PURE__*/jsx(CopyButtonWrapper, {
421
+ content: identifier,
422
+ children: /*#__PURE__*/jsx(Button, {
423
+ href: receiptUrl,
424
+ label: identifier,
425
+ size: "sm",
426
+ target: "_blank",
427
+ variant: "link"
428
+ })
429
+ });
430
+ };
431
+ const renderDestinationAccountIdentifier = ({
432
+ identifier,
433
+ dashboardUrl
434
+ }) => /*#__PURE__*/jsx(CopyButtonWrapper, {
435
+ content: identifier,
436
+ children: /*#__PURE__*/jsx(Button, {
437
+ href: dashboardUrl,
438
+ label: identifier,
439
+ size: "sm",
440
+ target: "_blank",
441
+ variant: "link"
442
+ })
443
+ });
444
+ const renderStatus = curry((type, status) => /*#__PURE__*/jsx(Status, {
445
+ status,
446
+ type
447
+ }));
448
+ const renderDate = date => {
449
+ if (isNotPresent(date)) {
450
+ return /*#__PURE__*/jsx(Tooltip, {
451
+ content: t("neetoPayments.tooltipContent.dateUnavailable"),
452
+ position: "top",
453
+ children: /*#__PURE__*/jsx("div", {
454
+ className: "text-center",
455
+ children: /*#__PURE__*/jsx(Typography, {
456
+ variant: "body2",
457
+ children: t("neetoPayments.common.notAvailable")
458
+ })
459
+ })
460
+ });
461
+ }
462
+ return /*#__PURE__*/jsx(DateFormat.DateTime, {
463
+ date
464
+ });
465
+ };
466
+ const renderPlatformShare = amount => {
467
+ if (isNotPresent(amount)) {
468
+ return /*#__PURE__*/jsx(Tooltip, {
469
+ content: t("neetoPayments.tooltipContent.platformShareUnavailable"),
470
+ position: "top",
471
+ children: /*#__PURE__*/jsx(Typography, {
472
+ variant: "body2",
473
+ children: t("neetoPayments.common.notCalculated")
474
+ })
475
+ });
476
+ }
477
+ return formatAmount(amount);
478
+ };
479
+ const getDefaultColumns = setSelectedTransfer => [{
480
+ header: t("neetoPayments.common.id"),
481
+ id: "rowId",
482
+ accessorKey: "rowId",
483
+ size: 85,
484
+ position: 0,
485
+ enableHiding: false
486
+ }, {
487
+ header: t("neetoPayments.common.identifier"),
488
+ id: "identifier",
489
+ accessorKey: "identifier",
490
+ size: 300,
491
+ cell: ({
492
+ row
493
+ }) => renderIdentifier(setSelectedTransfer)(row.getValue("identifier"), row.original),
494
+ position: 1,
495
+ enableHiding: false
496
+ }, {
497
+ header: t("neetoPayments.common.status"),
498
+ id: "status",
499
+ accessorKey: "status",
500
+ size: 150,
501
+ cell: ({
502
+ row
503
+ }) => renderStatus("splitTransfers")(row.getValue("status")),
504
+ enableSorting: true,
505
+ position: 2,
506
+ enableHiding: false
507
+ }, {
508
+ header: t("neetoPayments.common.amount"),
509
+ id: "amount",
510
+ accessorKey: "amount",
511
+ size: 150,
512
+ cell: ({
513
+ row
514
+ }) => formatAmount(row.getValue("amount")),
515
+ enableSorting: true,
516
+ position: 3
517
+ }, {
518
+ header: t("neetoPayments.common.currency"),
519
+ id: "currency",
520
+ accessorKey: "currency",
521
+ size: 160,
522
+ cell: ({
523
+ row
524
+ }) => formatCurrency(row.getValue("currency")),
525
+ enableSorting: true,
526
+ position: 3
527
+ }, {
528
+ header: t("neetoPayments.common.platformShare"),
529
+ id: "platformShare",
530
+ accessorKey: "platformShare",
531
+ size: 205,
532
+ cell: ({
533
+ row
534
+ }) => renderPlatformShare(row.getValue("platformShare")),
535
+ enableSorting: true,
536
+ position: 3
537
+ }, {
538
+ header: t("neetoPayments.common.transferTime"),
539
+ id: "paymentAt",
540
+ accessorKey: "paymentAt",
541
+ size: 190,
542
+ cell: ({
543
+ row
544
+ }) => renderDate(row.getValue("paymentAt")),
545
+ enableSorting: true,
546
+ position: 10
547
+ }, {
548
+ header: t("neetoPayments.common.platformPayment"),
549
+ id: "sourcePayment",
550
+ accessorKey: "sourcePayment",
551
+ size: 300,
552
+ cell: ({
553
+ row
554
+ }) => renderPlatformPaymentIdentifier(row.getValue("sourcePayment") ?? {}),
555
+ position: 19
556
+ }, {
557
+ header: t("neetoPayments.common.accountIdentifier"),
558
+ id: "destinationAccount",
559
+ accessorKey: "destinationAccount",
560
+ size: 320,
561
+ cell: ({
562
+ row
563
+ }) => renderDestinationAccountIdentifier(row.getValue("destinationAccount") ?? {}),
564
+ position: 20
565
+ }];
566
+
567
+ const buildSearchProps = (searchProps, searchTerm) => mergeDeepWith(concat, SEARCH_PROPS, mergeLeft({
568
+ value: searchTerm.trim()
569
+ }, searchProps));
570
+ const buildFilterColumns = (payableEntityColumns = []) => reject(isNil, concat(FILTER_COLUMNS, map(prop("filterProps"), payableEntityColumns)));
571
+ const buildTableColumns = ({
572
+ tab,
573
+ payableEntityColumns = [],
574
+ setSelectedTransfer
575
+ }) => {
576
+ const filteredColumns = sortBy(prop("position"), concat(getDefaultColumns(setSelectedTransfer), payableEntityColumns));
577
+ if (tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all) return filteredColumns;
578
+ return removeBy({
579
+ id: "status"
580
+ }, filteredColumns);
581
+ };
582
+ const buildRowData = ({
583
+ splitTransfers,
584
+ pageProperties = {}
585
+ }) => splitTransfers?.map((element, index) => ({
586
+ ...element,
587
+ rowId: isEmpty(pageProperties) ? index + 1 : pageProperties.pageSize * (pageProperties.page - 1) + index + 1
588
+ }));
589
+
590
+ const List = ({
591
+ isFetching,
592
+ splitTransfers,
593
+ views,
594
+ payableEntityColumns,
595
+ pageProperties,
596
+ setSortProperties,
597
+ handleTablePagination
598
+ }) => {
599
+ const [selectedTransfer, setSelectedTransfer] = useState(INITIAL_TRANSFER_DETAILS);
600
+ const {
601
+ t
602
+ } = useTranslation();
603
+ const {
604
+ tab = SPLIT_TRANSFERS_DASHBOARD_TAB.all
605
+ } = getQueryParams();
606
+ const splitTransfersCount = views[tab];
607
+ const allColumns = buildTableColumns({
608
+ tab,
609
+ payableEntityColumns,
610
+ setSelectedTransfer
611
+ });
612
+ const {
613
+ isTableConfigurationLoading,
614
+ customizedColumns,
615
+ hideColumn
616
+ } = useTableConfigurations(`${TABLE_KEYS.SPLIT_TRANSFERS_TABLE}-${tab}`, allColumns);
617
+ if (isNotPresent(splitTransfers)) {
618
+ return /*#__PURE__*/jsx("div", {
619
+ className: "flex h-full w-full items-center justify-center",
620
+ children: /*#__PURE__*/jsx(Empty, {
621
+ title: tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all ? t("neetoPayments.emptyState.splitTransfers") : t("neetoPayments.emptyState.splitTransfersWithStatus", {
622
+ status: tab
623
+ })
624
+ })
625
+ });
626
+ }
627
+ return /*#__PURE__*/jsxs(Fragment, {
628
+ children: [/*#__PURE__*/jsx(TableWrapper, {
629
+ hasPagination: splitTransfersCount > pageProperties?.pageSize,
630
+ children: /*#__PURE__*/jsx(DataTable, {
631
+ allowRowClick: false,
632
+ columns: customizedColumns,
633
+ currentPage: pageProperties?.page,
634
+ data: buildRowData({
635
+ splitTransfers,
636
+ pageProperties}),
637
+ enableURLPagination: false,
638
+ enableURLSort: false,
639
+ loading: isFetching || isTableConfigurationLoading,
640
+ totalCount: splitTransfersCount,
641
+ onColumnHide: id => hideColumn(id),
642
+ onPageChange: page => handleTablePagination(page, pageProperties?.pageSize),
643
+ onSort: sort => sort ? setSortProperties({
644
+ sortBy: camelToSnakeCase(sort.field),
645
+ orderBy: sort.order === "ascend" ? "ASC" : "DESC"
646
+ }) : setSortProperties(DEFAULT_SORT_PROPERTIES)
647
+ })
648
+ }), /*#__PURE__*/jsx(Details, {
649
+ selectedTransfer,
650
+ setSelectedTransfer
651
+ })]
652
+ });
653
+ };
654
+
655
+ const ResumeModal = ({
656
+ isOpen,
657
+ onClose,
658
+ handleSplitTransfersUpdate
659
+ }) => {
660
+ const {
661
+ t
662
+ } = useTranslation();
663
+ const handleSubmit = ({
664
+ reason
665
+ }) => {
666
+ handleSplitTransfersUpdate("pending", reason);
667
+ };
668
+ return /*#__PURE__*/jsxs(Dialog, {
669
+ isOpen,
670
+ onClose,
671
+ size: "large",
672
+ children: [/*#__PURE__*/jsx(Dialog.Header, {
673
+ children: /*#__PURE__*/jsx(Dialog.Title, {
674
+ children: t("neetoPayments.resumeSplitTransfers.modal.title")
675
+ })
676
+ }), /*#__PURE__*/jsx(Form, {
677
+ formikProps: {
678
+ initialValues: {
679
+ reason: ""
680
+ },
681
+ validationSchema: VALIDATION_SCHEMA,
682
+ onSubmit: handleSubmit
683
+ },
684
+ children: ({
685
+ isSubmitting
686
+ }) => /*#__PURE__*/jsxs(Fragment, {
687
+ children: [/*#__PURE__*/jsx(Dialog.Body, {
688
+ children: /*#__PURE__*/jsx("div", {
689
+ className: "flex flex-col space-y-4",
690
+ children: /*#__PURE__*/jsx(Textarea, {
691
+ required: true,
692
+ label: t("neetoPayments.resumeSplitTransfers.modal.reason"),
693
+ name: "reason"
694
+ })
695
+ })
696
+ }), /*#__PURE__*/jsx(Dialog.Footer, {
697
+ className: "space-x-2",
698
+ children: /*#__PURE__*/jsx(ActionBlock, {
699
+ isSubmitting,
700
+ position: "right",
701
+ cancelButtonProps: {
702
+ onClick: onClose,
703
+ variant: "ghost"
704
+ },
705
+ submitButtonProps: {
706
+ disabled: isSubmitting,
707
+ label: t("neetoPayments.common.submit")
708
+ }
709
+ })
710
+ })]
711
+ })
712
+ })]
713
+ });
714
+ };
715
+
716
+ const TopSection = ({
717
+ views,
718
+ filters,
719
+ filterableColumns,
720
+ searchKeywordProps,
721
+ payableEntityColumns,
722
+ setIsExportModalOpen,
723
+ setFilters
724
+ }) => {
725
+ const [isFilterPaneOpen, setIsFilterPaneOpen] = useState(false);
726
+ const {
727
+ t
728
+ } = useTranslation();
729
+ const history = useHistory();
730
+ const {
731
+ tab = SPLIT_TRANSFERS_DASHBOARD_TAB.all
732
+ } = getQueryParams();
733
+ const splitTransfersCount = views?.[tab];
734
+ const splitTransfersCountVisible = splitTransfersCount > 0 || splitTransfersCount === 0 && isPresent(filters);
735
+ const isFilterButtonVisible = splitTransfersCount || isPresent(filters);
736
+ const handleFiltersChange = filters => {
737
+ startTransition(() => {
738
+ setFilters(filters);
739
+ });
740
+ };
741
+ const handleTabChange = tab => {
742
+ const queryParams = getQueryParams({
743
+ toCamelCase: false
744
+ });
745
+ const newParams = {
746
+ tab,
747
+ page: DEFAULT_PAGE_INDEX,
748
+ page_size: DEFAULT_PAGE_SIZE
749
+ };
750
+ history.push(buildUrl(window.location.pathname, mergeLeft(newParams, queryParams)));
751
+ };
752
+ return /*#__PURE__*/jsxs(Fragment, {
753
+ children: [/*#__PURE__*/jsx(Header, {
754
+ title: t("neetoPayments.title.splitTransfers"),
755
+ searchProps: isFilterButtonVisible && {
756
+ placeholder: searchKeywordProps.placeholder,
757
+ className: "w-96"
758
+ }
759
+ }), shouldTabsVisible(views) && /*#__PURE__*/jsx(Tabs, {
760
+ value: tab,
761
+ onValueChange: handleTabChange,
762
+ children: /*#__PURE__*/jsx(Tabs.List, {
763
+ children: Object.keys(SPLIT_TRANSFERS_DASHBOARD_TAB).map(item => /*#__PURE__*/jsx(Tabs.Item, {
764
+ value: item,
765
+ children: t(`neetoPayments.common.${item}`)
766
+ }, item))
767
+ })
768
+ }), /*#__PURE__*/jsx(SubHeader, {
769
+ className: "my-4",
770
+ leftActionBlock: splitTransfersCountVisible && /*#__PURE__*/jsx(Typography, {
771
+ className: "me-2 font-semibold",
772
+ variant: "body1",
773
+ children: tab === SPLIT_TRANSFERS_DASHBOARD_TAB.all ? t("neetoPayments.countOf.splitTransfer", {
774
+ count: splitTransfersCount
775
+ }) : t("neetoPayments.countOf.splitTransferWithStatus", {
776
+ count: splitTransfersCount,
777
+ status: tab
778
+ })
779
+ }),
780
+ rightActionBlock: isFilterButtonVisible && /*#__PURE__*/jsx(SubHeader.RightBlock, {
781
+ columnsButtonProps: {
782
+ columnData: buildTableColumns({
783
+ tab,
784
+ payableEntityColumns,
785
+ setSelectedTransfer: () => {}
786
+ }),
787
+ fixedColumns: UN_HIDEABLE_COLUMNS,
788
+ tableKey: `${TABLE_KEYS.SPLIT_TRANSFERS_TABLE}-${tab}`
789
+ },
790
+ downloadButtonProps: {
791
+ onClick: () => setIsExportModalOpen(true)
792
+ },
793
+ filterProps: {
794
+ columns: filterableColumns,
795
+ isOpen: isFilterPaneOpen,
796
+ keyword: searchKeywordProps,
797
+ setIsOpen: setIsFilterPaneOpen,
798
+ onChange: handleFiltersChange
799
+ }
800
+ })
801
+ }), /*#__PURE__*/jsx(Bar, {
802
+ columns: filterableColumns,
803
+ keyword: searchKeywordProps,
804
+ setIsPaneOpen: setIsFilterPaneOpen,
805
+ onChange: handleFiltersChange
806
+ })]
807
+ });
808
+ };
809
+
810
+ const SplitTransfersDashboard = ({
811
+ searchProps,
812
+ payableEntityColumns
813
+ }) => {
814
+ const {
815
+ searchTerm = ""
816
+ } = getQueryParams();
817
+ const filterableColumns = buildFilterColumns(payableEntityColumns);
818
+ const searchKeywordProps = buildSearchProps(searchProps, searchTerm);
819
+ const [selectedRowData, setSelectedRowData] = useState([]);
820
+ const [isExportModalOpen, setIsExportModalOpen] = useState(false);
821
+ const [isCancelModalOpen, setIsCancelModalOpen] = useState(false);
822
+ const [isResumeModalOpen, setIsResumeModalOpen] = useState(false);
823
+ const [sortProperties, setSortProperties] = useState(DEFAULT_SORT_PROPERTIES);
824
+ const [pageProperties, setPageProperties] = useState(DEFAULT_PAGE_VALUES);
825
+ const [filters, setFilters] = useState(buildFiltersFromURL([...filterableColumns, searchKeywordProps]));
826
+ const history = useHistory();
827
+ const {
828
+ tab = SPLIT_TRANSFERS_DASHBOARD_TAB.all
829
+ } = getQueryParams();
830
+ const payload = {
831
+ tab,
832
+ filters,
833
+ ...pageProperties,
834
+ ...sortProperties
835
+ };
836
+ const {
837
+ data: {
838
+ splitTransfers,
839
+ views
840
+ } = {},
841
+ isFetching,
842
+ isPending: isSplitTransfersLoading
843
+ } = useFetchSplitTransfers(payload);
844
+ const {
845
+ mutate: updateSplitTransfers,
846
+ isPending: isCancelling
847
+ } = useBulkUpdateSplitTransfers({
848
+ onSuccess: () => {
849
+ setSelectedRowData([]);
850
+ }
851
+ });
852
+ const handleSplitTransfersUpdate = (status, reason) => {
853
+ const ids = pluck("id", selectedRowData);
854
+ updateSplitTransfers({
855
+ ids,
856
+ status,
857
+ reason
858
+ });
859
+ setIsCancelModalOpen(false);
860
+ setIsResumeModalOpen(false);
861
+ };
862
+ const handleTablePagination = (page, pageSize) => {
863
+ const queryParams = getQueryParams({
864
+ toCamelCase: false
865
+ });
866
+ history.push(buildUrl(window.location.pathname, mergeLeft({
867
+ page,
868
+ page_size: pageSize
869
+ }, queryParams)));
870
+ setPageProperties({
871
+ page,
872
+ pageSize
873
+ });
874
+ };
875
+ useEffect(() => {
876
+ handleTablePagination(DEFAULT_PAGE_INDEX, DEFAULT_PAGE_SIZE);
877
+ setSortProperties(DEFAULT_SORT_PROPERTIES);
878
+ setSelectedRowData([]);
879
+ }, [filters, tab]);
880
+ if (isSplitTransfersLoading || isCancelling) {
881
+ return /*#__PURE__*/jsx("div", {
882
+ className: "flex h-full w-full items-center justify-center",
883
+ children: /*#__PURE__*/jsx(Spinner, {})
884
+ });
885
+ }
886
+ return /*#__PURE__*/jsxs(Fragment, {
887
+ children: [/*#__PURE__*/jsx(TopSection, {
888
+ filterableColumns,
889
+ filters,
890
+ payableEntityColumns,
891
+ searchKeywordProps,
892
+ setFilters,
893
+ setIsExportModalOpen,
894
+ views
895
+ }), /*#__PURE__*/jsx(List, {
896
+ handleTablePagination,
897
+ isFetching,
898
+ pageProperties,
899
+ payableEntityColumns,
900
+ setSortProperties,
901
+ splitTransfers,
902
+ views
903
+ }), /*#__PURE__*/jsx(ExportModal, {
904
+ filters,
905
+ isExportModalOpen,
906
+ setIsExportModalOpen,
907
+ sortProperties,
908
+ dashboardKind: DASHBOARD_KIND.splitTransfers
909
+ }), /*#__PURE__*/jsx(CancelModal, {
910
+ handleSplitTransfersUpdate,
911
+ isOpen: isCancelModalOpen,
912
+ onClose: () => setIsCancelModalOpen(false)
913
+ }), /*#__PURE__*/jsx(ResumeModal, {
914
+ handleSplitTransfersUpdate,
915
+ isOpen: isResumeModalOpen,
916
+ onClose: () => setIsResumeModalOpen(false)
917
+ })]
918
+ });
919
+ };
920
+
921
+ export { SplitTransfersDashboard as default };
922
+ //# sourceMappingURL=SplitTransfersDashboard.js.map