@bigbinary/neeto-payments-frontend 3.3.31 → 3.3.33

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 (150) hide show
  1. package/app/javascript/src/translations/en.json +10 -1
  2. package/dist/AccountsDashboard.js +545 -0
  3. package/dist/AccountsDashboard.js.map +1 -0
  4. package/dist/AdminCancelRecurringPaymentButton.js +79 -0
  5. package/dist/AdminCancelRecurringPaymentButton.js.map +1 -0
  6. package/dist/CashPaymentButton.js +55 -0
  7. package/dist/CashPaymentButton.js.map +1 -0
  8. package/dist/ConfirmCashPaymentButton.js +104 -0
  9. package/dist/ConfirmCashPaymentButton.js.map +1 -0
  10. package/dist/ConfirmUpiPaymentButton.js +151 -0
  11. package/dist/ConfirmUpiPaymentButton.js.map +1 -0
  12. package/dist/CopyButtonWrapper-SoJkwX-d.js +27 -0
  13. package/dist/CopyButtonWrapper-SoJkwX-d.js.map +1 -0
  14. package/dist/CustomerCancelRecurringPaymentForm.js +111 -0
  15. package/dist/CustomerCancelRecurringPaymentForm.js.map +1 -0
  16. package/dist/ExportModal-BsFxUaYJ.js +131 -0
  17. package/dist/ExportModal-BsFxUaYJ.js.map +1 -0
  18. package/dist/ManualUpiPaymentConfirmButton.js +188 -0
  19. package/dist/ManualUpiPaymentConfirmButton.js.map +1 -0
  20. package/dist/PaymentKindRestrictionAlert.js +39 -0
  21. package/dist/PaymentKindRestrictionAlert.js.map +1 -0
  22. package/dist/PaymentsDashboard.js +586 -0
  23. package/dist/PaymentsDashboard.js.map +1 -0
  24. package/dist/PayoutsDashboard.js +559 -0
  25. package/dist/PayoutsDashboard.js.map +1 -0
  26. package/dist/PayoutsPage.js +162 -0
  27. package/dist/PayoutsPage.js.map +1 -0
  28. package/dist/RazorpayPaymentButton.js +145 -0
  29. package/dist/RazorpayPaymentButton.js.map +1 -0
  30. package/dist/RecurringPaymentSettings.js +132 -0
  31. package/dist/RecurringPaymentSettings.js.map +1 -0
  32. package/dist/RefundsDashboard.js +531 -0
  33. package/dist/RefundsDashboard.js.map +1 -0
  34. package/dist/SplitTransfersDashboard.js +1119 -0
  35. package/dist/SplitTransfersDashboard.js.map +1 -0
  36. package/dist/TaxesDashboard.js +411 -0
  37. package/dist/TaxesDashboard.js.map +1 -0
  38. package/dist/UpiConnect.js +171 -0
  39. package/dist/UpiConnect.js.map +1 -0
  40. package/dist/UpiPayment.js +120 -0
  41. package/dist/UpiPayment.js.map +1 -0
  42. package/dist/buildStripeTransactionLink.js +11 -0
  43. package/dist/buildStripeTransactionLink.js.map +1 -0
  44. package/dist/cjs/AccountsDashboard.js +547 -0
  45. package/dist/cjs/AccountsDashboard.js.map +1 -0
  46. package/dist/cjs/AdminCancelRecurringPaymentButton.js +81 -0
  47. package/dist/cjs/AdminCancelRecurringPaymentButton.js.map +1 -0
  48. package/dist/cjs/CashPaymentButton.js +57 -0
  49. package/dist/cjs/CashPaymentButton.js.map +1 -0
  50. package/dist/cjs/ConfirmCashPaymentButton.js +106 -0
  51. package/dist/cjs/ConfirmCashPaymentButton.js.map +1 -0
  52. package/dist/cjs/ConfirmUpiPaymentButton.js +172 -0
  53. package/dist/cjs/ConfirmUpiPaymentButton.js.map +1 -0
  54. package/dist/cjs/CopyButtonWrapper-Ds1k64E0.js +30 -0
  55. package/dist/cjs/CopyButtonWrapper-Ds1k64E0.js.map +1 -0
  56. package/dist/cjs/CustomerCancelRecurringPaymentForm.js +113 -0
  57. package/dist/cjs/CustomerCancelRecurringPaymentForm.js.map +1 -0
  58. package/dist/cjs/ExportModal-BJ2TrvE8.js +133 -0
  59. package/dist/cjs/ExportModal-BJ2TrvE8.js.map +1 -0
  60. package/dist/cjs/ManualUpiPaymentConfirmButton.js +209 -0
  61. package/dist/cjs/ManualUpiPaymentConfirmButton.js.map +1 -0
  62. package/dist/cjs/PaymentKindRestrictionAlert.js +41 -0
  63. package/dist/cjs/PaymentKindRestrictionAlert.js.map +1 -0
  64. package/dist/cjs/PaymentsDashboard.js +588 -0
  65. package/dist/cjs/PaymentsDashboard.js.map +1 -0
  66. package/dist/cjs/PayoutsDashboard.js +561 -0
  67. package/dist/cjs/PayoutsDashboard.js.map +1 -0
  68. package/dist/cjs/PayoutsPage.js +164 -0
  69. package/dist/cjs/PayoutsPage.js.map +1 -0
  70. package/dist/cjs/RazorpayPaymentButton.js +147 -0
  71. package/dist/cjs/RazorpayPaymentButton.js.map +1 -0
  72. package/dist/cjs/RecurringPaymentSettings.js +153 -0
  73. package/dist/cjs/RecurringPaymentSettings.js.map +1 -0
  74. package/dist/cjs/RefundsDashboard.js +533 -0
  75. package/dist/cjs/RefundsDashboard.js.map +1 -0
  76. package/dist/cjs/SplitTransfersDashboard.js +1140 -0
  77. package/dist/cjs/SplitTransfersDashboard.js.map +1 -0
  78. package/dist/cjs/TaxesDashboard.js +432 -0
  79. package/dist/cjs/TaxesDashboard.js.map +1 -0
  80. package/dist/cjs/UpiConnect.js +192 -0
  81. package/dist/cjs/UpiConnect.js.map +1 -0
  82. package/dist/cjs/UpiPayment.js +141 -0
  83. package/dist/cjs/UpiPayment.js.map +1 -0
  84. package/dist/cjs/buildStripeTransactionLink.js +13 -0
  85. package/dist/cjs/buildStripeTransactionLink.js.map +1 -0
  86. package/dist/cjs/constants.js +32 -0
  87. package/dist/cjs/constants.js.map +1 -0
  88. package/dist/cjs/dashboard-Bjhw-y9S.js +112 -0
  89. package/dist/cjs/dashboard-Bjhw-y9S.js.map +1 -0
  90. package/dist/cjs/exportChannel-BsZ3fusx.js +24 -0
  91. package/dist/cjs/exportChannel-BsZ3fusx.js.map +1 -0
  92. package/dist/cjs/getAmountInSmallestCurrencyUnit.js +13 -0
  93. package/dist/cjs/getAmountInSmallestCurrencyUnit.js.map +1 -0
  94. package/dist/cjs/index-CihS_E6s.js +638 -0
  95. package/dist/cjs/index-CihS_E6s.js.map +1 -0
  96. package/dist/cjs/index.js +119 -0
  97. package/dist/cjs/index.js.map +1 -0
  98. package/dist/cjs/queryConstants-DGg4cX3r.js +29 -0
  99. package/dist/cjs/queryConstants-DGg4cX3r.js.map +1 -0
  100. package/dist/cjs/renderFunctions-CbgNQLUZ.js +56 -0
  101. package/dist/cjs/renderFunctions-CbgNQLUZ.js.map +1 -0
  102. package/dist/cjs/stripe.esm-CrNYjPcC.js +132 -0
  103. package/dist/cjs/stripe.esm-CrNYjPcC.js.map +1 -0
  104. package/dist/cjs/usePaymentApi-BR4z3fpQ.js +41 -0
  105. package/dist/cjs/usePaymentApi-BR4z3fpQ.js.map +1 -0
  106. package/dist/cjs/usePaymentApi-ojnHNkQj.js +39 -0
  107. package/dist/cjs/usePaymentApi-ojnHNkQj.js.map +1 -0
  108. package/dist/cjs/usePaymentsApi-DY7TZaXP.js +41 -0
  109. package/dist/cjs/usePaymentsApi-DY7TZaXP.js.map +1 -0
  110. package/dist/cjs/usePlatformApi-B65EA1Nh.js +84 -0
  111. package/dist/cjs/usePlatformApi-B65EA1Nh.js.map +1 -0
  112. package/dist/cjs/useRazorpayPayment.js +112 -0
  113. package/dist/cjs/useRazorpayPayment.js.map +1 -0
  114. package/dist/cjs/useStripePromise.js +57 -0
  115. package/dist/cjs/useStripePromise.js.map +1 -0
  116. package/dist/constants.js +7 -0
  117. package/dist/constants.js.map +1 -0
  118. package/dist/dashboard-C5diLksA.js +106 -0
  119. package/dist/dashboard-C5diLksA.js.map +1 -0
  120. package/dist/exportChannel-CViICC6x.js +22 -0
  121. package/dist/exportChannel-CViICC6x.js.map +1 -0
  122. package/dist/getAmountInSmallestCurrencyUnit.js +11 -0
  123. package/dist/getAmountInSmallestCurrencyUnit.js.map +1 -0
  124. package/dist/index-ojfe66jf.js +604 -0
  125. package/dist/index-ojfe66jf.js.map +1 -0
  126. package/dist/index.js +93 -0
  127. package/dist/index.js.map +1 -0
  128. package/dist/queryConstants-mgjK5Hgk.js +27 -0
  129. package/dist/queryConstants-mgjK5Hgk.js.map +1 -0
  130. package/dist/renderFunctions-ObVxaGJ7.js +52 -0
  131. package/dist/renderFunctions-ObVxaGJ7.js.map +1 -0
  132. package/dist/stripe.esm-DuZ_gsAa.js +130 -0
  133. package/dist/stripe.esm-DuZ_gsAa.js.map +1 -0
  134. package/dist/usePaymentApi-B8ZEA19B.js +37 -0
  135. package/dist/usePaymentApi-B8ZEA19B.js.map +1 -0
  136. package/dist/usePaymentApi-C0JTbQH1.js +38 -0
  137. package/dist/usePaymentApi-C0JTbQH1.js.map +1 -0
  138. package/dist/usePaymentsApi-DQz8xzHV.js +38 -0
  139. package/dist/usePaymentsApi-DQz8xzHV.js.map +1 -0
  140. package/dist/usePlatformApi-CFaJ_LxH.js +79 -0
  141. package/dist/usePlatformApi-CFaJ_LxH.js.map +1 -0
  142. package/dist/useRazorpayPayment.js +110 -0
  143. package/dist/useRazorpayPayment.js.map +1 -0
  144. package/dist/useStripePromise.js +55 -0
  145. package/dist/useStripePromise.js.map +1 -0
  146. package/package.json +7 -7
  147. package/types/CashPaymentButton.d.ts +17 -0
  148. package/types/ConfirmCashPaymentButton.d.ts +11 -0
  149. package/types.d.ts +1 -1
  150. package/types/StripeConnect.d.ts +0 -13
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var reactQuery = require('@tanstack/react-query');
5
+ require('@bigbinary/neeto-cist');
6
+ require('@bigbinary/neeto-commons-frontend/react-utils');
7
+ var axios = require('axios');
8
+ var constants = require('./index-CihS_E6s.js');
9
+ require('qs');
10
+ var queryConstants = require('./queryConstants-DGg4cX3r.js');
11
+
12
+ var list$1 = function list(payload) {
13
+ return axios.get("".concat(constants.BASE_URL, "/api/v1/stripe/holdable/payouts"), {
14
+ params: payload
15
+ });
16
+ };
17
+ var show$1 = function show(id) {
18
+ return axios.get("".concat(constants.BASE_URL, "/api/v1/stripe/holdable/payouts/").concat(id));
19
+ };
20
+ var payoutsApi$1 = {
21
+ list: list$1,
22
+ show: show$1
23
+ };
24
+
25
+ function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
27
+ var useFetchStripePayouts = function useFetchStripePayouts(payload) {
28
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29
+ return reactQuery.useQuery(_objectSpread$1({
30
+ queryKey: [queryConstants.QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],
31
+ queryFn: function queryFn() {
32
+ return payoutsApi$1.list(payload);
33
+ }
34
+ }, options));
35
+ };
36
+ var useShowStripePayout = function useShowStripePayout(id) {
37
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
38
+ return reactQuery.useQuery(_objectSpread$1({
39
+ queryKey: [queryConstants.QUERY_KEYS.STRIPE_PAYOUT, id],
40
+ queryFn: function queryFn() {
41
+ return payoutsApi$1.show(id);
42
+ }
43
+ }, options));
44
+ };
45
+
46
+ var list = function list(payload) {
47
+ return axios.get("".concat(constants.BASE_URL, "/api/v1/stripe_platform/payouts"), {
48
+ params: payload
49
+ });
50
+ };
51
+ var show = function show(id) {
52
+ return axios.get("".concat(constants.BASE_URL, "/api/v1/stripe_platform/payouts/").concat(id));
53
+ };
54
+ var payoutsApi = {
55
+ list: list,
56
+ show: show
57
+ };
58
+
59
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
60
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
61
+ var useFetchStripePlatformPayouts = function useFetchStripePlatformPayouts(payload) {
62
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
63
+ return reactQuery.useQuery(_objectSpread({
64
+ queryKey: [queryConstants.QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],
65
+ queryFn: function queryFn() {
66
+ return payoutsApi.list(payload);
67
+ }
68
+ }, options));
69
+ };
70
+ var useShowStripePlatformPayout = function useShowStripePlatformPayout(id) {
71
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
72
+ return reactQuery.useQuery(_objectSpread({
73
+ queryKey: [queryConstants.QUERY_KEYS.STRIPE_PAYOUT, id],
74
+ queryFn: function queryFn() {
75
+ return payoutsApi.show(id);
76
+ }
77
+ }, options));
78
+ };
79
+
80
+ exports.useFetchStripePayouts = useFetchStripePayouts;
81
+ exports.useFetchStripePlatformPayouts = useFetchStripePlatformPayouts;
82
+ exports.useShowStripePayout = useShowStripePayout;
83
+ exports.useShowStripePlatformPayout = useShowStripePlatformPayout;
84
+ //# sourceMappingURL=usePlatformApi-B65EA1Nh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePlatformApi-B65EA1Nh.js","sources":["../../app/javascript/src/apis/stripe/holdables/payouts.js","../../app/javascript/src/hooks/reactQuery/stripe/useConnectApi.js","../../app/javascript/src/apis/stripePlatform/payouts.js","../../app/javascript/src/hooks/reactQuery/stripe/usePlatformApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { isPresent } from \"neetocist\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport accountsApi from \"apis/stripe/holdables/accounts\";\nimport payoutsApi from \"apis/stripe/holdables/payouts\";\nimport transactionsApi from \"apis/stripe/holdables/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchConnectedStripeAccount = (holdableId, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n queryFn: () => accountsApi.show(holdableId),\n ...options,\n });\n\nexport const useFetchStripeTransactions = (\n holdableId = \"\",\n payload = {},\n options = {}\n) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => {\n if (isPresent(holdableId)) {\n return transactionsApi.list(holdableId, payload);\n }\n\n return transactionsApi.defaultList(payload);\n },\n ...options,\n });\n\nexport const useFetchStripePayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n\nexport const usePollingStripeAccount = (holdableId, { refetchInterval }) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n queryFn: () => accountsApi.show(holdableId),\n refetchInterval,\n });\n\nexport const usePollingStripeAccountCreationStatus = (jobId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId],\n queryFn: () => accountsApi.creationStatus(jobId),\n ...options,\n });\n\nexport const useDestroyStripeAccount = ({ onSuccess, holdableId }) =>\n useMutationWithInvalidation(accountsApi.destroy, {\n keysToInvalidate: [\n [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n ],\n onSuccess,\n });\n\nexport const useCreateStripeAccount = ({ onSuccess }) =>\n useMutationWithInvalidation(accountsApi.create, {\n keysToInvalidate: [[QUERY_KEYS.STRIPE_ACCOUNT_DETAILS]],\n onSuccess,\n });\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport refundsApi from \"apis/stripe/holdables/refunds\";\nimport accountsApi from \"apis/stripePlatform/accounts\";\nimport payoutsApi from \"apis/stripePlatform/payouts\";\nimport splitsApi from \"apis/stripePlatform/splits\";\nimport transactionsApi from \"apis/stripePlatform/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchStripePlatformAccount = options =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_ACCOUNT_DETAILS],\n queryFn: accountsApi.show,\n ...options,\n });\n\nexport const useFetchStripePlatformSplits = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.SPLITS_LIST, payload],\n queryFn: () => splitsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransactions = (payload, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => transactionsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransaction = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_TRANSACTION, id],\n queryFn: () => transactionsApi.show(id),\n ...options,\n });\n\nexport const useFetchStripeRefunds = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_REFUNDS_LIST, payload],\n queryFn: () => refundsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformPayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePlatformPayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n"],"names":["list","payload","axios","get","concat","BASE_URL","params","show","id","payoutsApi","useFetchStripePayouts","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_PAYOUTS_LIST","queryFn","useShowStripePayout","STRIPE_PAYOUT","useFetchStripePlatformPayouts","useShowStripePlatformPayout"],"mappings":";;;;;;;;;;;AAIA,IAAMA,MAAI,GAAG,SAAPA,IAAIA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAClBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,kBAAQ,EAAmC,iCAAA,CAAA,EAAA;AAAEC,IAAAA,MAAM,EAAEL;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE9E,IAAMM,MAAI,GAAG,SAAPA,IAAIA,CAAGC,EAAE,EAAA;AAAA,EAAA,OACbN,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,kBAAQ,EAAA,kCAAA,CAAA,CAAAD,MAAA,CAAmCI,EAAE,CAAE,CAAC;AAAA,CAAA;AAE/D,IAAMC,YAAU,GAAG;AAAET,EAAAA,IAAI,EAAJA,MAAI;AAAEO,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICuBpBG,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIT,OAAO,EAAA;AAAA,EAAA,IAAEU,O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CI,EAAE,CAAE,CAAC;AAAA,CAAA;AAE/D,IAAMC,UAAU,GAAG;AAAET,EAAAA,IAAI,EAAJA,IAAI;AAAEO,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICkCpBgB,6BAA6B,GAAG,SAAhCA,6BAA6BA,CAAItB,OAAO,EAAA;AAAA,EAAA,IAAEU,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OACjEG,mBAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,yBAAU,CAACC,mBAAmB,EAAElB,OAAO,CAAC;IACnDmB,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,MAAA,OAAQX,UAAU,CAACT,IAAI,CAACC,OAAO,CAAC;AAAA;GACpCU,EAAAA,OAAO,CACX,CAAC;AAAA;IAESa,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAIhB,EAAE,EAAA;AAAA,EAAA,IAAEG,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OAC1DG,mBAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,yBAAU,CAACI,aAAa,EAAEd,EAAE,CAAC;IACxCY,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,MAAA,OAAQX,UAAU,CAACF,IAAI,CAACC,EAAE,CAAC;AAAA;GAC/BG,EAAAA,OAAO,CACX,CAAC;AAAA;;;;;;;"}
@@ -0,0 +1,112 @@
1
+ 'use strict';
2
+
3
+ var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
4
+ var _regeneratorRuntime = require('@babel/runtime/regenerator');
5
+ var neetoCist = require('@bigbinary/neeto-cist');
6
+ var ramda = require('ramda');
7
+ var reactI18next = require('react-i18next');
8
+ var usePaymentApi = require('./usePaymentApi-ojnHNkQj.js');
9
+ var constants = require('./index-CihS_E6s.js');
10
+ require('@babel/runtime/helpers/defineProperty');
11
+ require('@tanstack/react-query');
12
+ require('axios');
13
+ require('i18next');
14
+ require('@bigbinary/neeto-commons-frontend/constants');
15
+ require('@bigbinary/neeto-commons-frontend/utils');
16
+
17
+ var loadScript = function loadScript(src) {
18
+ return new Promise(function (resolve) {
19
+ var script = document.createElement("script");
20
+ script.src = src;
21
+ script.onload = function () {
22
+ resolve(true);
23
+ };
24
+ script.onerror = function () {
25
+ resolve(false);
26
+ };
27
+ document.body.appendChild(script);
28
+ });
29
+ };
30
+ var useRazorpayPayment = function useRazorpayPayment(_ref) {
31
+ var payableId = _ref.payableId,
32
+ _ref$customAmount = _ref.customAmount,
33
+ customAmount = _ref$customAmount === void 0 ? null : _ref$customAmount,
34
+ _ref$onBeforePayment = _ref.onBeforePayment,
35
+ onBeforePayment = _ref$onBeforePayment === void 0 ? neetoCist.noop : _ref$onBeforePayment,
36
+ _ref$onSuccessfulPaym = _ref.onSuccessfulPayment,
37
+ onSuccessfulPayment = _ref$onSuccessfulPaym === void 0 ? neetoCist.noop : _ref$onSuccessfulPaym,
38
+ _ref$onFailedPayment = _ref.onFailedPayment,
39
+ onFailedPayment = _ref$onFailedPayment === void 0 ? neetoCist.noop : _ref$onFailedPayment;
40
+ var _useTranslation = reactI18next.useTranslation(),
41
+ t = _useTranslation.t;
42
+ var openRazorpayCheckout = /*#__PURE__*/function () {
43
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
44
+ var script, checkout;
45
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
46
+ while (1) switch (_context.prev = _context.next) {
47
+ case 0:
48
+ _context.next = 2;
49
+ return loadScript("https://checkout.razorpay.com/v1/checkout.js");
50
+ case 2:
51
+ script = _context.sent;
52
+ if (script) {
53
+ _context.next = 6;
54
+ break;
55
+ }
56
+ logger.error(t("neetoPayments.razorpay.loadError"));
57
+ return _context.abrupt("return");
58
+ case 6:
59
+ checkout = new window.Razorpay(options);
60
+ checkout.open();
61
+ case 8:
62
+ case "end":
63
+ return _context.stop();
64
+ }
65
+ }, _callee);
66
+ }));
67
+ return function openRazorpayCheckout(_x) {
68
+ return _ref2.apply(this, arguments);
69
+ };
70
+ }();
71
+ var handlePayment = function handlePayment(response) {
72
+ if (neetoCist.isNotPresent(response === null || response === void 0 ? void 0 : response.razorpay_signature)) {
73
+ onFailedPayment();
74
+ return;
75
+ }
76
+ onSuccessfulPayment();
77
+ };
78
+ var handleSuccess = function handleSuccess(_ref3) {
79
+ var payment = _ref3.payment;
80
+ if ((payment === null || payment === void 0 ? void 0 : payment.status) === "successful") {
81
+ return onSuccessfulPayment();
82
+ }
83
+ var options = {
84
+ key: payment.publicKey,
85
+ order_id: payment.orderIdentifier,
86
+ customer_id: payment.customerIdentifier,
87
+ modal: {
88
+ confirm_close: true,
89
+ ondismiss: onFailedPayment
90
+ },
91
+ handler: handlePayment
92
+ };
93
+ return openRazorpayCheckout(ramda.mergeDeepLeft(constants.RAZORPAY_PAYMENT_BUTTON_OPTIONS, options));
94
+ };
95
+ var _useCreateRazorpayPay = usePaymentApi.useCreateRazorpayPayment({
96
+ onSuccess: handleSuccess
97
+ }),
98
+ createRazorpayOrder = _useCreateRazorpayPay.mutate;
99
+ var makePayment = function makePayment() {
100
+ onBeforePayment();
101
+ createRazorpayOrder({
102
+ payableId: payableId,
103
+ customAmount: customAmount
104
+ });
105
+ };
106
+ return {
107
+ makePayment: makePayment
108
+ };
109
+ };
110
+
111
+ module.exports = useRazorpayPayment;
112
+ //# sourceMappingURL=useRazorpayPayment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRazorpayPayment.js","sources":["../../app/javascript/src/hooks/useRazorpayPayment.js"],"sourcesContent":["import { isNotPresent, noop } from \"neetocist\";\nimport { mergeDeepLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateRazorpayPayment } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { RAZORPAY_PAYMENT_BUTTON_OPTIONS } from \"src/constants\";\n\nconst loadScript = src =>\n new Promise(resolve => {\n const script = document.createElement(\"script\");\n script.src = src;\n script.onload = () => {\n resolve(true);\n };\n\n script.onerror = () => {\n resolve(false);\n };\n document.body.appendChild(script);\n });\n\nconst useRazorpayPayment = ({\n payableId,\n customAmount = null,\n onBeforePayment = noop,\n onSuccessfulPayment = noop,\n onFailedPayment = noop,\n}) => {\n const { t } = useTranslation();\n\n const openRazorpayCheckout = async options => {\n const script = await loadScript(\n \"https://checkout.razorpay.com/v1/checkout.js\"\n );\n\n if (!script) {\n logger.error(t(\"neetoPayments.razorpay.loadError\"));\n\n return;\n }\n const checkout = new window.Razorpay(options);\n checkout.open();\n };\n\n const handlePayment = response => {\n if (isNotPresent(response?.razorpay_signature)) {\n onFailedPayment();\n\n return;\n }\n\n onSuccessfulPayment();\n };\n\n const handleSuccess = ({ payment }) => {\n if (payment?.status === \"successful\") {\n return onSuccessfulPayment();\n }\n\n const options = {\n key: payment.publicKey,\n order_id: payment.orderIdentifier,\n customer_id: payment.customerIdentifier,\n modal: { confirm_close: true, ondismiss: onFailedPayment },\n handler: handlePayment,\n };\n\n return openRazorpayCheckout(\n mergeDeepLeft(RAZORPAY_PAYMENT_BUTTON_OPTIONS, options)\n );\n };\n\n const { mutate: createRazorpayOrder } = useCreateRazorpayPayment({\n onSuccess: handleSuccess,\n });\n\n const makePayment = () => {\n onBeforePayment();\n createRazorpayOrder({ payableId, customAmount });\n };\n\n return { makePayment };\n};\n\nexport default useRazorpayPayment;\n"],"names":["loadScript","src","Promise","resolve","script","document","createElement","onload","onerror","body","appendChild","useRazorpayPayment","_ref","payableId","_ref$customAmount","customAmount","_ref$onBeforePayment","onBeforePayment","noop","_ref$onSuccessfulPaym","onSuccessfulPayment","_ref$onFailedPayment","onFailedPayment","_useTranslation","useTranslation","t","openRazorpayCheckout","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","options","checkout","wrap","_callee$","_context","prev","next","sent","logger","error","abrupt","window","Razorpay","open","stop","_x","apply","arguments","handlePayment","response","isNotPresent","razorpay_signature","handleSuccess","_ref3","payment","status","key","publicKey","order_id","orderIdentifier","customer_id","customerIdentifier","modal","confirm_close","ondismiss","handler","mergeDeepLeft","RAZORPAY_PAYMENT_BUTTON_OPTIONS","_useCreateRazorpayPay","useCreateRazorpayPayment","onSuccess","createRazorpayOrder","mutate","makePayment"],"mappings":";;;;;;;;;;;;;;;;AAOA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAGC,GAAG,EAAA;AAAA,EAAA,OACpB,IAAIC,OAAO,CAAC,UAAAC,OAAO,EAAI;AACrB,IAAA,IAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IAC/CF,MAAM,CAACH,GAAG,GAAGA,GAAG;IAChBG,MAAM,CAACG,MAAM,GAAG,YAAM;MACpBJ,OAAO,CAAC,IAAI,CAAC;KACd;IAEDC,MAAM,CAACI,OAAO,GAAG,YAAM;MACrBL,OAAO,CAAC,KAAK,CAAC;KACf;AACDE,IAAAA,QAAQ,CAACI,IAAI,CAACC,WAAW,CAACN,MAAM,CAAC;AACnC,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMO,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAMlB;AAAA,EAAA,IALJC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAAC,iBAAA,GAAAF,IAAA,CACTG,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,iBAAA;IAAAE,oBAAA,GAAAJ,IAAA,CACnBK,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAGE,KAAAA,CAAAA,GAAAA,cAAI,GAAAF,oBAAA;IAAAG,qBAAA,G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AAC;IAFcmB,mBAAmB,GAAAH,qBAAA,CAA3BI,MAAM;AAId,EAAA,IAAMC,WAAW,GAAG,SAAdA,WAAWA,GAAS;AACxB1D,IAAAA,eAAe,EAAE;AACjBwD,IAAAA,mBAAmB,CAAC;AAAE5D,MAAAA,SAAS,EAATA,SAAS;AAAEE,MAAAA,YAAY,EAAZA;AAAa,KAAC,CAAC;GACjD;EAED,OAAO;AAAE4D,IAAAA,WAAW,EAAXA;GAAa;AACxB;;;;"}
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
4
+ var _regeneratorRuntime = require('@babel/runtime/regenerator');
5
+ var react = require('react');
6
+ var neetoCist = require('@bigbinary/neeto-cist');
7
+ var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
8
+
9
+ var useStripePromise = function useStripePromise(_ref) {
10
+ var stripeAccountIdentifier = _ref.stripeAccountIdentifier,
11
+ _ref$kind = _ref.kind,
12
+ kind = _ref$kind === void 0 ? "stripe" : _ref$kind,
13
+ _ref$stripePlatformAc = _ref.stripePlatformAccount,
14
+ stripePlatformAccount = _ref$stripePlatformAc === void 0 ? {} : _ref$stripePlatformAc;
15
+ return react.useMemo(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
16
+ var stripeJs, _yield$stripeJs, loadStripe, payload;
17
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
18
+ while (1) switch (_context.prev = _context.next) {
19
+ case 0:
20
+ if (!(kind !== "stripe" || neetoCist.isNotPresent(stripePlatformAccount) && neetoCist.isNotPresent(stripeAccountIdentifier) || neetoCist.isNotPresent(initializers.globalProps.stripePayment.publishableKey) && neetoCist.isNotPresent(stripeAccountIdentifier))) {
21
+ _context.next = 2;
22
+ break;
23
+ }
24
+ return _context.abrupt("return", null);
25
+ case 2:
26
+ stripeJs = function stripeJs() {
27
+ return Promise.resolve().then(function () { return require('./stripe.esm-CrNYjPcC.js'); });
28
+ };
29
+ _context.prev = 3;
30
+ _context.next = 6;
31
+ return stripeJs();
32
+ case 6:
33
+ _yield$stripeJs = _context.sent;
34
+ loadStripe = _yield$stripeJs.loadStripe;
35
+ payload = neetoCist.isNotPresent(stripePlatformAccount) && {
36
+ stripeAccount: stripeAccountIdentifier
37
+ };
38
+ _context.next = 11;
39
+ return loadStripe(initializers.globalProps.stripePayment.publishableKey, payload || {});
40
+ case 11:
41
+ return _context.abrupt("return", _context.sent);
42
+ case 14:
43
+ _context.prev = 14;
44
+ _context.t0 = _context["catch"](3);
45
+ logger.error(_context.t0);
46
+ case 17:
47
+ return _context.abrupt("return", null);
48
+ case 18:
49
+ case "end":
50
+ return _context.stop();
51
+ }
52
+ }, _callee, null, [[3, 14]]);
53
+ })), [kind, stripeAccountIdentifier, stripePlatformAccount]);
54
+ };
55
+
56
+ module.exports = useStripePromise;
57
+ //# sourceMappingURL=useStripePromise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStripePromise.js","sources":["../../app/javascript/src/hooks/useStripePromise.js"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { isNotPresent } from \"neetocist\";\nimport { globalProps } from \"neetocommons/initializers\";\n\nconst useStripePromise = ({\n stripeAccountIdentifier,\n kind = \"stripe\",\n stripePlatformAccount = {},\n}) =>\n useMemo(async () => {\n if (\n kind !== \"stripe\" ||\n (isNotPresent(stripePlatformAccount) &&\n isNotPresent(stripeAccountIdentifier)) ||\n (isNotPresent(globalProps.stripePayment.publishableKey) &&\n isNotPresent(stripeAccountIdentifier))\n ) {\n return null;\n }\n\n const stripeJs = () => import(\"@stripe/stripe-js\");\n\n try {\n const { loadStripe } = await stripeJs();\n const payload = isNotPresent(stripePlatformAccount) && {\n stripeAccount: stripeAccountIdentifier,\n };\n\n return await loadStripe(\n globalProps.stripePayment.publishableKey,\n payload || {}\n );\n } catch (error) {\n logger.error(error);\n }\n\n return null;\n }, [kind, stripeAccountIdentifier, stripePlatformAccount]);\n\nexport default useStripePromise;\n"],"names":["useStripePromise","_ref","stripeAccountIdentifier","_ref$kind","kind","_ref$stripePlatformAc","stripePlatformAccount","useMemo","_asyncToGenerator","_regeneratorRuntime","mark","_callee","stripeJs","_yield$stripeJs","loadStripe","payload","wrap","_callee$","_context","prev","next","isNotPresent","globalProps","stripePayment","publishableKey","abrupt","sent","stripeAccount","t0","logger","error","stop"],"mappings":";;;;;;;;AAKA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACpBC,uBAAuB,GAAAD,IAAA,CAAvBC,uBAAuB;IAAAC,SAAA,GAAAF,IAAA,CACvBG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IAAAE,qBAAA,GAAAJ,IAAA,CACfK,qBAAqB;AAArBA,IAAAA,qBAAqB,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,qBAAA;EAAA,OAE1BE,aAAO,cAAAC,iBAAA,cAAAC,mBAAA,CAAAC,IAAA,CAAC,SAAAC,OAAA,GAAA;AAAA,IAAA,IAAAC,QAAA,EAAAC,eAAA,EAAAC,UAAA,EAAAC,OAAA;AAAA,IAAA,OAAAN,mBAAA,CAAAO,IAAA,CAAA,SAAAC,SAAAC,QAAA,EAAA;AAAA,MAAA,OAAA,CAAA,EAAA,QAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;AAAA,QAAA,KAAA,CAAA;UAAA,IAEJhB,EAAAA,IAAI,KAAK,QAAQ,IAChBiB,sBAAY,CAACf,qBAAqB,CAAC,IAClCe,sBAAY,CAACnB,uBAAuB,CAAE,IACvCmB,sBAAY,CAACC,wBAAW,CAACC,aAAa,CAACC,cAAc,CAAC,IACrDH,sBAAY,CAACnB,uBAAuB,CAAE,CAAA,EAAA;AAAAgB,YAAAA,QAAA,CAAAE,IAAA,GAAA,CAAA;AAAA,YAA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A,CAAA,CAAA,CAAA;GACZ,CAAA,CAAA,EAAE,CAACP,IAAI,EAAEF,uBAAuB,EAAEI,qBAAqB,CAAC,CAAC;AAAA;;;;"}
@@ -0,0 +1,7 @@
1
+ import 'i18next';
2
+ import '@bigbinary/neeto-commons-frontend/constants';
3
+ export { A as ASSOCIATED_TABLE_COLUMNS, B as BASE_URL, C as CURRENCY_OPTIONS, j as DASHBOARD_KIND, i as DEFAULT_PAGE_VALUES, D as DEFAULT_SORT_PROPERTIES, c as DEFAULT_TAG_STYLE, F as FILTER_COLUMNS, n as PAYMENT_KIND, P as PAYMENT_PROVIDERS, o as PAYMENT_STATUS_TYPE, v as RAZORPAY_CURRENCY_OPTIONS, R as RAZORPAY_PAYMENT_BUTTON_OPTIONS, q as REFUND_STATUS_TYPE, S as SORT_DIRECTIONS, t as STRIPE_CURRENCY_OPTIONS, r as STRIPE_DASHBOARD_LINK, T as TAG_STYLE, U as UN_HIDEABLE_COLUMNS, Z as ZERO_DECIMAL_CURRENCIES } from './index-ojfe66jf.js';
4
+ import '@bigbinary/neeto-cist';
5
+ import '@bigbinary/neeto-commons-frontend/utils';
6
+ import 'ramda';
7
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,106 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import { QueryClient, QueryCache, keepPreviousData, QueryClientProvider, useMutation } from '@tanstack/react-query';
3
+ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
4
+ import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+ import axios from 'axios';
7
+ import { B as BASE_URL, i as DEFAULT_PAGE_VALUES } from './index-ojfe66jf.js';
8
+ import { camelToSnakeCase } from '@bigbinary/neeto-cist';
9
+ import { isEmpty, assoc, modify, concat } from 'ramda';
10
+
11
+ /* eslint-disable @bigbinary/neeto/api-connector-name-should-match-filename */
12
+ /* eslint-disable @bigbinary/neeto/file-name-and-export-name-standards */
13
+ var queryClient = new QueryClient({
14
+ queryCache: new QueryCache(),
15
+ defaultOptions: {
16
+ queries: {
17
+ staleTime: DEFAULT_STALE_TIME,
18
+ placeholderData: keepPreviousData
19
+ }
20
+ }
21
+ });
22
+
23
+ function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25
+ var withReactQuery = function withReactQuery(Component) {
26
+ var QueryWrapper = function QueryWrapper(props) {
27
+ return /*#__PURE__*/jsxs(QueryClientProvider, {
28
+ client: queryClient,
29
+ children: [/*#__PURE__*/jsx(Component, _objectSpread$1({}, props)), /*#__PURE__*/jsx(ReactQueryDevtools, {
30
+ initialIsOpen: false,
31
+ position: "bottom"
32
+ })]
33
+ });
34
+ };
35
+ return QueryWrapper;
36
+ };
37
+
38
+ var exportData = function exportData(payload) {
39
+ return axios.post("".concat(BASE_URL, "/api/v1/stripe/exports"), payload, {
40
+ showToastr: false
41
+ });
42
+ };
43
+ var exportsApi = {
44
+ exportData: exportData
45
+ };
46
+
47
+ var useExportData = function useExportData() {
48
+ return useMutation({
49
+ mutationFn: exportsApi.exportData
50
+ });
51
+ };
52
+
53
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
54
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
55
+ var processSortProperties = function processSortProperties(sortProperties) {
56
+ if (sortProperties.sortBy === "payment_amount") {
57
+ return assoc("sortBy", "neeto_payments_engine_payments.amount", sortProperties);
58
+ }
59
+ if (sortProperties.sortBy === "email" || sortProperties.sortBy === "first_name") {
60
+ return modify("sortBy", concat("users."), sortProperties);
61
+ }
62
+ if (sortProperties.sortBy === "payable,ends_at") {
63
+ return assoc("sortBy", "bookings.ends_at", sortProperties);
64
+ }
65
+ return sortProperties;
66
+ };
67
+ var buildDefaultPageProperties = function buildDefaultPageProperties(tabs) {
68
+ return tabs.reduce(function (pageProperties, tab) {
69
+ return _objectSpread(_objectSpread({}, pageProperties), {}, _defineProperty({}, tab, DEFAULT_PAGE_VALUES));
70
+ }, {});
71
+ };
72
+ var buildPayload = function buildPayload(_ref) {
73
+ var _pageProperties$tab, _pageProperties$tab2;
74
+ var tab = _ref.tab,
75
+ filters = _ref.filters,
76
+ pageProperties = _ref.pageProperties,
77
+ _ref$sortProperties = _ref.sortProperties,
78
+ sortProperties = _ref$sortProperties === void 0 ? {} : _ref$sortProperties,
79
+ _ref$payoutId = _ref.payoutId,
80
+ payoutId = _ref$payoutId === void 0 ? null : _ref$payoutId;
81
+ return _objectSpread({
82
+ tab: camelToSnakeCase(tab),
83
+ payoutId: payoutId,
84
+ page: (_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.page,
85
+ pageSize: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.pageSize,
86
+ filters: filters
87
+ }, processSortProperties(sortProperties));
88
+ };
89
+ var buildRowData = function buildRowData(_ref2) {
90
+ var data = _ref2.data,
91
+ _ref2$pageProperties = _ref2.pageProperties,
92
+ pageProperties = _ref2$pageProperties === void 0 ? {} : _ref2$pageProperties,
93
+ _ref2$tab = _ref2.tab,
94
+ tab = _ref2$tab === void 0 ? "all" : _ref2$tab;
95
+ return data.map(function (element, index) {
96
+ var _pageProperties$tab3, _pageProperties$tab4;
97
+ return _objectSpread(_objectSpread({}, element), {}, {
98
+ payable: element.payable,
99
+ identifier: element,
100
+ id: isEmpty(pageProperties) ? index + 1 : ((_pageProperties$tab3 = pageProperties[tab]) === null || _pageProperties$tab3 === void 0 ? void 0 : _pageProperties$tab3.pageSize) * (((_pageProperties$tab4 = pageProperties[tab]) === null || _pageProperties$tab4 === void 0 ? void 0 : _pageProperties$tab4.page) - 1) + index + 1
101
+ });
102
+ });
103
+ };
104
+
105
+ export { buildPayload as a, buildDefaultPageProperties as b, buildRowData as c, useExportData as u, withReactQuery as w };
106
+ //# sourceMappingURL=dashboard-C5diLksA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-C5diLksA.js","sources":["../app/javascript/src/apis/queryClient.js","../app/javascript/src/components/Common/withReactQuery.jsx","../app/javascript/src/apis/stripe/holdables/exports.js","../app/javascript/src/hooks/reactQuery/stripe/useExportsApi.js","../app/javascript/src/utils/dashboard.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/api-connector-name-should-match-filename */\n/* eslint-disable @bigbinary/neeto/file-name-and-export-name-standards */\nimport {\n QueryCache,\n QueryClient,\n keepPreviousData,\n} from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\n\nconst queryClient = new QueryClient({\n queryCache: new QueryCache(),\n defaultOptions: {\n queries: {\n staleTime: DEFAULT_STALE_TIME,\n placeholderData: keepPreviousData,\n },\n },\n});\n\nexport default queryClient;\n","/* eslint-disable sonarjs/prefer-immediate-return */\n/* eslint-disable @bigbinary/neeto/file-name-and-export-name-standards */\nimport { QueryClientProvider } from \"@tanstack/react-query\";\nimport { ReactQueryDevtools } from \"@tanstack/react-query-devtools\";\n\nimport queryClient from \"apis/queryClient\";\n\nconst withReactQuery = Component => {\n const QueryWrapper = props => (\n <QueryClientProvider client={queryClient}>\n <Component {...props} />\n <ReactQueryDevtools initialIsOpen={false} position=\"bottom\" />\n </QueryClientProvider>\n );\n\n return QueryWrapper;\n};\n\nexport default withReactQuery;\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst exportData = payload =>\n axios.post(`${BASE_URL}/api/v1/stripe/exports`, payload, {\n showToastr: false,\n });\n\nconst exportsApi = { exportData };\n\nexport default exportsApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport exportsApi from \"apis/stripe/holdables/exports\";\n\nconst useExportData = () => useMutation({ mutationFn: exportsApi.exportData });\n\nexport { useExportData };\n","import { camelToSnakeCase } from \"neetocist\";\nimport { assoc, concat, isEmpty, modify } from \"ramda\";\n\nimport { DEFAULT_PAGE_VALUES } from \"src/constants\";\n\nconst processSortProperties = sortProperties => {\n if (sortProperties.sortBy === \"payment_amount\") {\n return assoc(\n \"sortBy\",\n \"neeto_payments_engine_payments.amount\",\n sortProperties\n );\n }\n\n if (\n sortProperties.sortBy === \"email\" ||\n sortProperties.sortBy === \"first_name\"\n ) {\n return modify(\"sortBy\", concat(\"users.\"), sortProperties);\n }\n\n if (sortProperties.sortBy === \"payable,ends_at\") {\n return assoc(\"sortBy\", \"bookings.ends_at\", sortProperties);\n }\n\n return sortProperties;\n};\n\nexport const buildDefaultPageProperties = tabs =>\n tabs.reduce(\n (pageProperties, tab) => ({\n ...pageProperties,\n [tab]: DEFAULT_PAGE_VALUES,\n }),\n {}\n );\n\nexport const buildPayload = ({\n tab,\n filters,\n pageProperties,\n sortProperties = {},\n payoutId = null,\n}) => ({\n tab: camelToSnakeCase(tab),\n payoutId,\n page: pageProperties[tab]?.page,\n pageSize: pageProperties[tab]?.pageSize,\n filters,\n ...processSortProperties(sortProperties),\n});\n\nexport const buildRowData = ({ data, pageProperties = {}, tab = \"all\" }) =>\n data.map((element, index) => ({\n ...element,\n payable: element.payable,\n identifier: element,\n id: isEmpty(pageProperties)\n ? index + 1\n : pageProperties[tab]?.pageSize * (pageProperties[tab]?.page - 1) +\n index +\n 1,\n }));\n"],"names":["queryClient","QueryClient","queryCache","QueryCache","defaultOptions","queries","staleTime","DEFAULT_STALE_TIME","placeholderData","keepPreviousData","withReactQuery","Component","QueryWrapper","props","_jsxs","QueryClientProvider","client","children","_jsx","_objectSpread","ReactQueryDevtools","initialIsOpen","position","exportData","payload","axios","post","concat","BASE_URL","showToastr","exportsApi","useExportData","useMutation","mutationFn","processSortProperties","sortProperties","sortBy","assoc","modify","buildDefaultPageProperties","tabs","reduce","pageProperties","tab","_defineProperty","DEFAULT_PAGE_VALUES","buildPayload","_ref","_pageProperties$tab","_pageProperties$tab2","filters","_ref$sortProperties","_ref$payoutId","payoutId","camelToSnakeCase","page","pageSize","buildRowData","_ref2","data","_ref2$pageProperties","_ref2$tab","map","element","index","_pageProperties$tab3","_pageProperties$tab4","payable","identifier","id","isEmpty"],"mappings":";;;;;;;;;;AAAA;AACA;AAQA,IAAMA,WAAW,GAAG,IAAIC,WAAW,CAAC;AAClCC,EAAAA,UAAU,EAAE,IAAIC,UAAU,EAAE;AAC5BC,EAAAA,cAAc,EAAE;AACdC,IAAAA,OAAO,EAAE;AACPC,MAAAA,SAAS,EAAEC,kBAAkB;AAC7BC,MAAAA,eAAe,EAAEC;AACnB;AACF;AACF,CAAC,CAAC;;;;ACVF,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,SAAS,EAAI;AAClC,EAAA,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAGC,KAAK,EAAA;IAAA,o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;AAAA,GACL,CAAC;AAAA;;;;"}
@@ -0,0 +1,22 @@
1
+ import { noop } from '@bigbinary/neeto-cist';
2
+ import { createSubscription } from '@bigbinary/neeto-commons-frontend/utils';
3
+
4
+ var exportChannel = function exportChannel(token, receivedCallback) {
5
+ return createSubscription({
6
+ channel: "NeetoPaymentsEngine::ExportsChannel",
7
+ pubsub_token: token
8
+ }, {
9
+ connected: noop,
10
+ disconnected: function disconnected() {
11
+ this.perform("unsubscribed");
12
+ this.unsubscribe();
13
+ },
14
+ received: function received(data) {
15
+ this.perform("unsubscribed");
16
+ receivedCallback(data);
17
+ }
18
+ });
19
+ };
20
+
21
+ export { exportChannel as e };
22
+ //# sourceMappingURL=exportChannel-CViICC6x.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exportChannel-CViICC6x.js","sources":["../app/javascript/src/channels/exportChannel.js"],"sourcesContent":["import { noop } from \"neetocist\";\nimport { createSubscription } from \"neetocommons/utils\";\n\nconst exportChannel = (token, receivedCallback) =>\n createSubscription(\n { channel: \"NeetoPaymentsEngine::ExportsChannel\", pubsub_token: token },\n {\n connected: noop,\n disconnected() {\n this.perform(\"unsubscribed\");\n this.unsubscribe();\n },\n received(data) {\n this.perform(\"unsubscribed\");\n\n receivedCallback(data);\n },\n }\n );\n\nexport default exportChannel;\n"],"names":["exportChannel","token","receivedCallback","createSubscription","channel","pubsub_token","connected","noop","disconnected","perform","unsubscribe","received","data"],"mappings":";;;AAGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAAK,EAAEC,gBAAgB,EAAA;AAAA,EAAA,OAC5CC,kBAAkB,CAChB;AAAEC,IAAAA,OAAO,EAAE,qCAAqC;AAAEC,IAAAA,YAAY,EAAEJ;AAAM,GAAC,EACvE;AACEK,IAAAA,SAAS,EAAEC,IAAI;IACfC,YAAY,EAAA,SAAZA,YAAYA,GAAG;AACb,MAAA,IAAI,CAACC,OAAO,CAAC,cAAc,CAAC;MAC5B,IAAI,CAACC,WAAW,EAAE;KACnB;AACDC,IAAAA,QAAQ,EAARA,SAAAA,QAAQA,CAACC,IAAI,EAAE;AACb,MAAA,IAAI,CAACH,OAAO,CAAC,cAAc,CAAC;MAE5BP,gBAAgB,CAACU,IAAI,CAAC;AACxB;AACF,GACF,CAAC;AAAA;;;;"}
@@ -0,0 +1,11 @@
1
+ import { g as getAmountInSmallestCurrencyUnit } from './index-ojfe66jf.js';
2
+ import 'i18next';
3
+ import '@bigbinary/neeto-commons-frontend/constants';
4
+ import '@bigbinary/neeto-cist';
5
+ import '@bigbinary/neeto-commons-frontend/utils';
6
+ import 'ramda';
7
+
8
+
9
+
10
+ export { getAmountInSmallestCurrencyUnit as default };
11
+ //# sourceMappingURL=getAmountInSmallestCurrencyUnit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAmountInSmallestCurrencyUnit.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}