@bigbinary/neeto-payments-frontend 6.1.10 → 6.1.11
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.
- package/package.json +1 -1
- package/dist/AccountsDashboard.js +0 -498
- package/dist/AccountsDashboard.js.map +0 -1
- package/dist/AdminCancelRecurringPaymentButton.js +0 -76
- package/dist/AdminCancelRecurringPaymentButton.js.map +0 -1
- package/dist/CashPaymentButton.js +0 -60
- package/dist/CashPaymentButton.js.map +0 -1
- package/dist/ConfirmCashPaymentButton.js +0 -92
- package/dist/ConfirmCashPaymentButton.js.map +0 -1
- package/dist/CopyButtonWrapper-rv-OaINx.js +0 -24
- package/dist/CopyButtonWrapper-rv-OaINx.js.map +0 -1
- package/dist/CustomerCancelRecurringPaymentForm.js +0 -102
- package/dist/CustomerCancelRecurringPaymentForm.js.map +0 -1
- package/dist/ExportModal-xSog6P5o.js +0 -120
- package/dist/ExportModal-xSog6P5o.js.map +0 -1
- package/dist/ManualUpiConnect.js +0 -247
- package/dist/ManualUpiConnect.js.map +0 -1
- package/dist/ManualUpiPayment.js +0 -129
- package/dist/ManualUpiPayment.js.map +0 -1
- package/dist/ManualUpiPaymentConfirmButton.js +0 -151
- package/dist/ManualUpiPaymentConfirmButton.js.map +0 -1
- package/dist/ManualUpiPaymentRejectButton.js +0 -120
- package/dist/ManualUpiPaymentRejectButton.js.map +0 -1
- package/dist/PaymentKindRestrictionAlert.js +0 -36
- package/dist/PaymentKindRestrictionAlert.js.map +0 -1
- package/dist/PaymentsDashboard.js +0 -586
- package/dist/PaymentsDashboard.js.map +0 -1
- package/dist/PayoutsDashboard.js +0 -533
- package/dist/PayoutsDashboard.js.map +0 -1
- package/dist/PayoutsPage.js +0 -136
- package/dist/PayoutsPage.js.map +0 -1
- package/dist/RazorpayConnect.js +0 -106
- package/dist/RazorpayConnect.js.map +0 -1
- package/dist/RazorpayLinkedAccountForm.js +0 -212
- package/dist/RazorpayLinkedAccountForm.js.map +0 -1
- package/dist/RazorpayPaymentButton.js +0 -155
- package/dist/RazorpayPaymentButton.js.map +0 -1
- package/dist/RecurringPaymentSettings.js +0 -119
- package/dist/RecurringPaymentSettings.js.map +0 -1
- package/dist/RefundsDashboard.js +0 -507
- package/dist/RefundsDashboard.js.map +0 -1
- package/dist/SplitTransfersDashboard.js +0 -1003
- package/dist/SplitTransfersDashboard.js.map +0 -1
- package/dist/StripeCheckoutSetting.js +0 -94
- package/dist/StripeCheckoutSetting.js.map +0 -1
- package/dist/StripeConnect.js +0 -378
- package/dist/StripeConnect.js.map +0 -1
- package/dist/StripeManage.js +0 -43
- package/dist/StripeManage.js.map +0 -1
- package/dist/TaxesDashboard.js +0 -363
- package/dist/TaxesDashboard.js.map +0 -1
- package/dist/buildStripeTransactionLink.js +0 -12
- package/dist/buildStripeTransactionLink.js.map +0 -1
- package/dist/cjs/AccountsDashboard.js +0 -500
- package/dist/cjs/AccountsDashboard.js.map +0 -1
- package/dist/cjs/AdminCancelRecurringPaymentButton.js +0 -78
- package/dist/cjs/AdminCancelRecurringPaymentButton.js.map +0 -1
- package/dist/cjs/CashPaymentButton.js +0 -62
- package/dist/cjs/CashPaymentButton.js.map +0 -1
- package/dist/cjs/ConfirmCashPaymentButton.js +0 -94
- package/dist/cjs/ConfirmCashPaymentButton.js.map +0 -1
- package/dist/cjs/CopyButtonWrapper-BkpN0Wmd.js +0 -27
- package/dist/cjs/CopyButtonWrapper-BkpN0Wmd.js.map +0 -1
- package/dist/cjs/CustomerCancelRecurringPaymentForm.js +0 -104
- package/dist/cjs/CustomerCancelRecurringPaymentForm.js.map +0 -1
- package/dist/cjs/ExportModal-DxCzPCh0.js +0 -122
- package/dist/cjs/ExportModal-DxCzPCh0.js.map +0 -1
- package/dist/cjs/ManualUpiConnect.js +0 -268
- package/dist/cjs/ManualUpiConnect.js.map +0 -1
- package/dist/cjs/ManualUpiPayment.js +0 -150
- package/dist/cjs/ManualUpiPayment.js.map +0 -1
- package/dist/cjs/ManualUpiPaymentConfirmButton.js +0 -172
- package/dist/cjs/ManualUpiPaymentConfirmButton.js.map +0 -1
- package/dist/cjs/ManualUpiPaymentRejectButton.js +0 -122
- package/dist/cjs/ManualUpiPaymentRejectButton.js.map +0 -1
- package/dist/cjs/PaymentKindRestrictionAlert.js +0 -38
- package/dist/cjs/PaymentKindRestrictionAlert.js.map +0 -1
- package/dist/cjs/PaymentsDashboard.js +0 -588
- package/dist/cjs/PaymentsDashboard.js.map +0 -1
- package/dist/cjs/PayoutsDashboard.js +0 -535
- package/dist/cjs/PayoutsDashboard.js.map +0 -1
- package/dist/cjs/PayoutsPage.js +0 -138
- package/dist/cjs/PayoutsPage.js.map +0 -1
- package/dist/cjs/RazorpayConnect.js +0 -108
- package/dist/cjs/RazorpayConnect.js.map +0 -1
- package/dist/cjs/RazorpayLinkedAccountForm.js +0 -214
- package/dist/cjs/RazorpayLinkedAccountForm.js.map +0 -1
- package/dist/cjs/RazorpayPaymentButton.js +0 -157
- package/dist/cjs/RazorpayPaymentButton.js.map +0 -1
- package/dist/cjs/RecurringPaymentSettings.js +0 -140
- package/dist/cjs/RecurringPaymentSettings.js.map +0 -1
- package/dist/cjs/RefundsDashboard.js +0 -509
- package/dist/cjs/RefundsDashboard.js.map +0 -1
- package/dist/cjs/SplitTransfersDashboard.js +0 -1024
- package/dist/cjs/SplitTransfersDashboard.js.map +0 -1
- package/dist/cjs/StripeCheckoutSetting.js +0 -96
- package/dist/cjs/StripeCheckoutSetting.js.map +0 -1
- package/dist/cjs/StripeConnect.js +0 -399
- package/dist/cjs/StripeConnect.js.map +0 -1
- package/dist/cjs/StripeManage.js +0 -45
- package/dist/cjs/StripeManage.js.map +0 -1
- package/dist/cjs/TaxesDashboard.js +0 -384
- package/dist/cjs/TaxesDashboard.js.map +0 -1
- package/dist/cjs/buildStripeTransactionLink.js +0 -14
- package/dist/cjs/buildStripeTransactionLink.js.map +0 -1
- package/dist/cjs/constants.js +0 -38
- package/dist/cjs/constants.js.map +0 -1
- package/dist/cjs/dashboard-DKHencVn.js +0 -110
- package/dist/cjs/dashboard-DKHencVn.js.map +0 -1
- package/dist/cjs/exportChannel-D1Wls92m.js +0 -40
- package/dist/cjs/exportChannel-D1Wls92m.js.map +0 -1
- package/dist/cjs/getAddressElementOptions.js +0 -14
- package/dist/cjs/getAddressElementOptions.js.map +0 -1
- package/dist/cjs/getAmountInSmallestCurrencyUnit.js +0 -14
- package/dist/cjs/getAmountInSmallestCurrencyUnit.js.map +0 -1
- package/dist/cjs/getAmountWithAppliedTax.js +0 -14
- package/dist/cjs/getAmountWithAppliedTax.js.map +0 -1
- package/dist/cjs/getFormattedAmount.js +0 -14
- package/dist/cjs/getFormattedAmount.js.map +0 -1
- package/dist/cjs/getFormattedDiscountedAmount.js +0 -14
- package/dist/cjs/getFormattedDiscountedAmount.js.map +0 -1
- package/dist/cjs/getFormattedDiscountedPercentage.js +0 -14
- package/dist/cjs/getFormattedDiscountedPercentage.js.map +0 -1
- package/dist/cjs/getFormattedTaxAmount.js +0 -14
- package/dist/cjs/getFormattedTaxAmount.js.map +0 -1
- package/dist/cjs/getFormattedTipAmount.js +0 -14
- package/dist/cjs/getFormattedTipAmount.js.map +0 -1
- package/dist/cjs/getQrCodeValue.js +0 -14
- package/dist/cjs/getQrCodeValue.js.map +0 -1
- package/dist/cjs/getTaxAmount.js +0 -14
- package/dist/cjs/getTaxAmount.js.map +0 -1
- package/dist/cjs/getTipAmount.js +0 -14
- package/dist/cjs/getTipAmount.js.map +0 -1
- package/dist/cjs/hasAmountToPay.js +0 -14
- package/dist/cjs/hasAmountToPay.js.map +0 -1
- package/dist/cjs/index-CZ_VFGNj.js +0 -899
- package/dist/cjs/index-CZ_VFGNj.js.map +0 -1
- package/dist/cjs/index.js +0 -127
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/queryConstants-Cka1X6GX.js +0 -35
- package/dist/cjs/queryConstants-Cka1X6GX.js.map +0 -1
- package/dist/cjs/renderFunctions-CX_K4qf8.js +0 -51
- package/dist/cjs/renderFunctions-CX_K4qf8.js.map +0 -1
- package/dist/cjs/stripe.esm-CrNYjPcC.js +0 -132
- package/dist/cjs/stripe.esm-CrNYjPcC.js.map +0 -1
- package/dist/cjs/useAccountsApi-DC617yB4.js +0 -62
- package/dist/cjs/useAccountsApi-DC617yB4.js.map +0 -1
- package/dist/cjs/useIntegrationsApi-BO9PhVVO.js +0 -26
- package/dist/cjs/useIntegrationsApi-BO9PhVVO.js.map +0 -1
- package/dist/cjs/usePaymentApi-BE8xfY-U.js +0 -39
- package/dist/cjs/usePaymentApi-BE8xfY-U.js.map +0 -1
- package/dist/cjs/usePaymentApi-C9aQhuda.js +0 -56
- package/dist/cjs/usePaymentApi-C9aQhuda.js.map +0 -1
- package/dist/cjs/usePaymentApi-CrKom4eT.js +0 -41
- package/dist/cjs/usePaymentApi-CrKom4eT.js.map +0 -1
- package/dist/cjs/usePlatformApi-C7lXP6ev.js +0 -84
- package/dist/cjs/usePlatformApi-C7lXP6ev.js.map +0 -1
- package/dist/cjs/useRazorpayPayment.js +0 -113
- package/dist/cjs/useRazorpayPayment.js.map +0 -1
- package/dist/cjs/useStripePromise.js +0 -57
- package/dist/cjs/useStripePromise.js.map +0 -1
- package/dist/constants.js +0 -8
- package/dist/constants.js.map +0 -1
- package/dist/dashboard-BDaEfYC6.js +0 -104
- package/dist/dashboard-BDaEfYC6.js.map +0 -1
- package/dist/exportChannel-DAxJ44QB.js +0 -37
- package/dist/exportChannel-DAxJ44QB.js.map +0 -1
- package/dist/getAddressElementOptions.js +0 -12
- package/dist/getAddressElementOptions.js.map +0 -1
- package/dist/getAmountInSmallestCurrencyUnit.js +0 -12
- package/dist/getAmountInSmallestCurrencyUnit.js.map +0 -1
- package/dist/getAmountWithAppliedTax.js +0 -12
- package/dist/getAmountWithAppliedTax.js.map +0 -1
- package/dist/getFormattedAmount.js +0 -12
- package/dist/getFormattedAmount.js.map +0 -1
- package/dist/getFormattedDiscountedAmount.js +0 -12
- package/dist/getFormattedDiscountedAmount.js.map +0 -1
- package/dist/getFormattedDiscountedPercentage.js +0 -12
- package/dist/getFormattedDiscountedPercentage.js.map +0 -1
- package/dist/getFormattedTaxAmount.js +0 -12
- package/dist/getFormattedTaxAmount.js.map +0 -1
- package/dist/getFormattedTipAmount.js +0 -12
- package/dist/getFormattedTipAmount.js.map +0 -1
- package/dist/getQrCodeValue.js +0 -12
- package/dist/getQrCodeValue.js.map +0 -1
- package/dist/getTaxAmount.js +0 -12
- package/dist/getTaxAmount.js.map +0 -1
- package/dist/getTipAmount.js +0 -12
- package/dist/getTipAmount.js.map +0 -1
- package/dist/hasAmountToPay.js +0 -12
- package/dist/hasAmountToPay.js.map +0 -1
- package/dist/index-Bb6ocLKy.js +0 -848
- package/dist/index-Bb6ocLKy.js.map +0 -1
- package/dist/index.js +0 -84
- package/dist/index.js.map +0 -1
- package/dist/queryConstants-DFKKEEo0.js +0 -33
- package/dist/queryConstants-DFKKEEo0.js.map +0 -1
- package/dist/renderFunctions-B8oUIx0q.js +0 -47
- package/dist/renderFunctions-B8oUIx0q.js.map +0 -1
- package/dist/stripe.esm-DuZ_gsAa.js +0 -130
- package/dist/stripe.esm-DuZ_gsAa.js.map +0 -1
- package/dist/useAccountsApi-B_6TV0t1.js +0 -58
- package/dist/useAccountsApi-B_6TV0t1.js.map +0 -1
- package/dist/useIntegrationsApi-C_bLZLOS.js +0 -24
- package/dist/useIntegrationsApi-C_bLZLOS.js.map +0 -1
- package/dist/usePaymentApi-BIKTym0K.js +0 -53
- package/dist/usePaymentApi-BIKTym0K.js.map +0 -1
- package/dist/usePaymentApi-CqDykYv8.js +0 -37
- package/dist/usePaymentApi-CqDykYv8.js.map +0 -1
- package/dist/usePaymentApi-DPX5vrFy.js +0 -38
- package/dist/usePaymentApi-DPX5vrFy.js.map +0 -1
- package/dist/usePlatformApi-haL6t3zF.js +0 -79
- package/dist/usePlatformApi-haL6t3zF.js.map +0 -1
- package/dist/useRazorpayPayment.js +0 -111
- package/dist/useRazorpayPayment.js.map +0 -1
- package/dist/useStripePromise.js +0 -55
- package/dist/useStripePromise.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIntegrationsApi-BO9PhVVO.js","sources":["../../app/javascript/src/apis/integrations.js","../../app/javascript/src/hooks/reactQuery/useIntegrationsApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = () => axios.get(`${BASE_URL}/api/v1/integrations`);\n\nconst integrationsApi = { list };\n\nexport default integrationsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport integrationsApi from \"apis/integrations\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchPaymentIntegrations = options =>\n useQuery({\n queryKey: [QUERY_KEYS.PAYMENT_INTEGRATION_LIST],\n queryFn: integrationsApi.list,\n ...options,\n });\n"],"names":["list","axios","get","concat","BASE_URL","integrationsApi","useFetchPaymentIntegrations","options","useQuery","_objectSpread","queryKey","QUERY_KEYS","PAYMENT_INTEGRATION_LIST","queryFn"],"mappings":";;;;;;;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,GAAA;EAAA,OAASC,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,kBAAQ,yBAAsB,CAAC;AAAA,CAAA;AAE/D,IAAMC,eAAe,GAAG;AAAEL,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICDnBM,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAGC,OAAO,EAAA;EAAA,OAChDC,mBAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,yBAAU,CAACC,wBAAwB,CAAC;IAC/CC,OAAO,EAAER,eAAe,CAACL;GACtBO,EAAAA,OAAO,CACX,CAAC;AAAA;;;;"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
var reactQuery = require('@tanstack/react-query');
|
|
5
|
-
require('neetocist');
|
|
6
|
-
var axios = require('axios');
|
|
7
|
-
var constants = require('./index-CZ_VFGNj.js');
|
|
8
|
-
|
|
9
|
-
var create = function create(payload) {
|
|
10
|
-
return axios.post("".concat(constants.BASE_URL, "/api/v1/public/razorpay/payments"), {
|
|
11
|
-
payment: payload
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
var defaultList = function defaultList(payload) {
|
|
15
|
-
return axios.get("".concat(constants.BASE_URL, "/api/v1/razorpay/holdable/payments"), {
|
|
16
|
-
params: payload
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
var list = function list(holdableId, payload) {
|
|
20
|
-
return axios.get("".concat(constants.BASE_URL, "/api/v1/razorpay/holdables/").concat(holdableId, "/payments"), {
|
|
21
|
-
params: payload
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
var paymentsApi = {
|
|
25
|
-
defaultList: defaultList,
|
|
26
|
-
list: list,
|
|
27
|
-
create: create
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
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; }
|
|
32
|
-
var useCreateRazorpayPayment = function useCreateRazorpayPayment(options) {
|
|
33
|
-
return reactQuery.useMutation(_objectSpread({
|
|
34
|
-
mutationFn: paymentsApi.create
|
|
35
|
-
}, options));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
exports.useCreateRazorpayPayment = useCreateRazorpayPayment;
|
|
39
|
-
//# sourceMappingURL=usePaymentApi-BE8xfY-U.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentApi-BE8xfY-U.js","sources":["../../app/javascript/src/apis/razorpay/payments.js","../../app/javascript/src/hooks/reactQuery/razorpay/usePaymentApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/razorpay/payments`, {\n payment: payload,\n });\n\nconst defaultList = payload =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdable/payments`, {\n params: payload,\n });\n\nconst list = (holdableId, payload) =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdables/${holdableId}/payments`, {\n params: payload,\n });\n\nconst paymentsApi = { defaultList, list, create };\n\nexport default paymentsApi;\n","import { useQuery, useMutation } from \"@tanstack/react-query\";\nimport { isPresent } from \"neetocist\";\n\nimport paymentsApi from \"apis/razorpay/payments\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchRazorpayPayments = (\n holdableId = \"\",\n payload = {},\n options = {}\n) =>\n useQuery({\n queryKey: [QUERY_KEYS.RAZORPAY_ACCOUNT_DETAILS, payload],\n queryFn: () => {\n if (isPresent(holdableId)) return paymentsApi.list(holdableId, payload);\n\n return paymentsApi.defaultList(payload);\n },\n ...options,\n });\n\nexport const useCreateRazorpayPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","defaultList","get","params","list","holdableId","paymentsApi","useCreateRazorpayPayment","options","useMutation","_objectSpread","mutationFn"],"mappings":";;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,kBAAQ,EAAoC,kCAAA,CAAA,EAAA;AACxDC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,WAAW,GAAG,SAAdA,WAAWA,CAAGN,OAAO,EAAA;AAAA,EAAA,OACzBC,KAAK,CAACM,GAAG,IAAAJ,MAAA,CAAIC,kBAAQ,EAAsC,oCAAA,CAAA,EAAA;AACzDI,IAAAA,MAAM,EAAER;AACV,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMS,IAAI,GAAG,SAAPA,IAAIA,CAAIC,UAAU,EAAEV,OAAO,EAAA;EAAA,OAC/BC,KAAK,CAACM,GAAG,CAAAJ,EAAAA,CAAAA,MAAA,CAAIC,kBAAQ,EAAAD,6BAAAA,CAAAA,CAAAA,MAAA,CAA8BO,UAAU,EAAa,WAAA,CAAA,EAAA;AACxEF,IAAAA,MAAM,EAAER;AACV,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMW,WAAW,GAAG;AAAEL,EAAAA,WAAW,EAAXA,WAAW;AAAEG,EAAAA,IAAI,EAAJA,IAAI;AAAEV,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ICEpCa,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAGC,OAAO,EAAA;EAAA,OAC7CC,sBAAW,CAAAC,aAAA,CAAA;IAAGC,UAAU,EAAEL,WAAW,CAACZ;GAAWc,EAAAA,OAAO,CAAE,CAAC;AAAA;;;;"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
4
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
-
var reactQuery = require('@tanstack/react-query');
|
|
6
|
-
var reactUtils = require('neetocommons/react-utils');
|
|
7
|
-
var axios = require('axios');
|
|
8
|
-
var constants = require('./index-CZ_VFGNj.js');
|
|
9
|
-
var queryConstants = require('./queryConstants-Cka1X6GX.js');
|
|
10
|
-
|
|
11
|
-
var create = function create(payload) {
|
|
12
|
-
return axios.post("".concat(constants.BASE_URL, "/api/v1/public/manual_upi/payments"), {
|
|
13
|
-
payment: payload
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var update = function update(_ref) {
|
|
17
|
-
var id = _ref.id,
|
|
18
|
-
manualUpiId = _ref.manualUpiId,
|
|
19
|
-
payload = _ref.payload;
|
|
20
|
-
return axios.put("".concat(constants.BASE_URL, "/api/v1/manual_upi/").concat(manualUpiId, "/payments/").concat(id), {
|
|
21
|
-
payment: payload
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
var paymentsApi = {
|
|
25
|
-
update: update,
|
|
26
|
-
create: create
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
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; }
|
|
30
|
-
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; }
|
|
31
|
-
var useCreateUpiPayment = function useCreateUpiPayment(options) {
|
|
32
|
-
return reactQuery.useMutation(_objectSpread({
|
|
33
|
-
mutationFn: paymentsApi.create
|
|
34
|
-
}, options));
|
|
35
|
-
};
|
|
36
|
-
var useUpdateUpiPayment = function useUpdateUpiPayment(_ref) {
|
|
37
|
-
var id = _ref.id,
|
|
38
|
-
manualUpiId = _ref.manualUpiId,
|
|
39
|
-
_ref$options = _ref.options,
|
|
40
|
-
options = _ref$options === void 0 ? {} : _ref$options,
|
|
41
|
-
_ref$keysToInvalidate = _ref.keysToInvalidate,
|
|
42
|
-
keysToInvalidate = _ref$keysToInvalidate === void 0 ? [] : _ref$keysToInvalidate;
|
|
43
|
-
return reactUtils.useMutationWithInvalidation(function (payload) {
|
|
44
|
-
return paymentsApi.update({
|
|
45
|
-
id: id,
|
|
46
|
-
manualUpiId: manualUpiId,
|
|
47
|
-
payload: payload
|
|
48
|
-
});
|
|
49
|
-
}, _objectSpread({
|
|
50
|
-
keysToInvalidate: [].concat(_toConsumableArray(keysToInvalidate), [[queryConstants.QUERY_KEYS.PAYMENTS_LIST]])
|
|
51
|
-
}, options));
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
exports.useCreateUpiPayment = useCreateUpiPayment;
|
|
55
|
-
exports.useUpdateUpiPayment = useUpdateUpiPayment;
|
|
56
|
-
//# sourceMappingURL=usePaymentApi-C9aQhuda.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentApi-C9aQhuda.js","sources":["../../app/javascript/src/apis/manual_upi/payments.js","../../app/javascript/src/hooks/reactQuery/manualUpi/usePaymentApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/manual_upi/payments`, {\n payment: payload,\n });\n\nconst update = ({ id, manualUpiId, payload }) =>\n axios.put(`${BASE_URL}/api/v1/manual_upi/${manualUpiId}/payments/${id}`, {\n payment: payload,\n });\n\nconst paymentsApi = { update, create };\n\nexport default paymentsApi;\n","import { useMutation } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport paymentsApi from \"apis/manual_upi/payments\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useCreateUpiPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n\nexport const useUpdateUpiPayment = ({\n id,\n manualUpiId,\n options = {},\n keysToInvalidate = [],\n}) =>\n useMutationWithInvalidation(\n payload => paymentsApi.update({ id, manualUpiId, payload }),\n {\n keysToInvalidate: [...keysToInvalidate, [QUERY_KEYS.PAYMENTS_LIST]],\n ...options,\n }\n );\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","update","_ref","id","manualUpiId","put","paymentsApi","useCreateUpiPayment","options","useMutation","_objectSpread","mutationFn","useUpdateUpiPayment","_ref$options","_ref$keysToInvalidate","keysToInvalidate","useMutationWithInvalidation","_toConsumableArray","QUERY_KEYS","PAYMENTS_LIST"],"mappings":";;;;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,kBAAQ,EAAsC,oCAAA,CAAA,EAAA;AAC1DC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAET,OAAO,GAAAO,IAAA,CAAPP,OAAO;AAAA,EAAA,OACxCC,KAAK,CAACS,GAAG,CAAA,EAAA,CAAAP,MAAA,CAAIC,kBAAQ,EAAAD,qBAAAA,CAAAA,CAAAA,MAAA,CAAsBM,WAAW,EAAA,YAAA,CAAA,CAAAN,MAAA,CAAaK,EAAE,CAAI,EAAA;AACvEH,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMW,WAAW,GAAG;AAAEL,EAAAA,MAAM,EAANA,MAAM;AAAEP,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ICRzBa,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,OAAO,EAAA;EAAA,OACxCC,sBAAW,CAAAC,aAAA,CAAA;IAAGC,UAAU,EAAEL,WAAW,CAACZ;GAAWc,EAAAA,OAAO,CAAE,CAAC;AAAA;IAEhDI,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAV,IAAA,EAAA;AAAA,EAAA,IAC9BC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAAS,YAAA,GAAAX,IAAA,CACXM,OAAO;AAAPA,IAAAA,OAAO,GAAAK,YAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,YAAA;IAAAC,qBAAA,GAAAZ,IAAA,CACZa,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,qBAAA;EAAA,OAErBE,sCAA2B,CACzB,UAAArB,OAAO,EAAA;IAAA,OAAIW,WAAW,CAACL,MAAM,CAAC;AAAEE,MAAAA,EAAE,EAAFA,EAAE;AAAEC,MAAAA,WAAW,EAAXA,WAAW;AAAET,MAAAA,OAAO,EAAPA;AAAQ,KAAC,CAAC;AAAA,GAAA,EAAAe,aAAA,CAAA;IAEzDK,gBAAgB,EAAA,EAAA,CAAAjB,MAAA,CAAAmB,kBAAA,CAAMF,gBAAgB,CAAA,EAAA,CAAE,CAACG,yBAAU,CAACC,aAAa,CAAC,CAAA;GAC/DX,EAAAA,OAAO,CAEd,CAAC;AAAA;;;;;"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
var reactQuery = require('@tanstack/react-query');
|
|
5
|
-
var axios = require('axios');
|
|
6
|
-
var constants = require('./index-CZ_VFGNj.js');
|
|
7
|
-
|
|
8
|
-
var create = function create(payload) {
|
|
9
|
-
return axios.post("".concat(constants.BASE_URL, "/api/v1/public/cash/payments"), {
|
|
10
|
-
payment: payload
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var update = function update(id, payload) {
|
|
14
|
-
return axios.put("".concat(constants.BASE_URL, "/api/v1/cash/payments/").concat(id), {
|
|
15
|
-
payment: payload
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
var paymentsApi = {
|
|
19
|
-
create: create,
|
|
20
|
-
update: update
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
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; }
|
|
24
|
-
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; }
|
|
25
|
-
var useCreateCashPayment = function useCreateCashPayment(options) {
|
|
26
|
-
return reactQuery.useMutation(_objectSpread({
|
|
27
|
-
mutationFn: paymentsApi.create
|
|
28
|
-
}, options));
|
|
29
|
-
};
|
|
30
|
-
var useUpdateCashPayment = function useUpdateCashPayment(id) {
|
|
31
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
32
|
-
return reactQuery.useMutation(_objectSpread({
|
|
33
|
-
mutationFn: function mutationFn(payload) {
|
|
34
|
-
return paymentsApi.update(id, payload);
|
|
35
|
-
}
|
|
36
|
-
}, options));
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.useCreateCashPayment = useCreateCashPayment;
|
|
40
|
-
exports.useUpdateCashPayment = useUpdateCashPayment;
|
|
41
|
-
//# sourceMappingURL=usePaymentApi-CrKom4eT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentApi-CrKom4eT.js","sources":["../../app/javascript/src/apis/cash/payments.js","../../app/javascript/src/hooks/reactQuery/cash/usePaymentApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/cash/payments`, {\n payment: payload,\n });\n\nconst update = (id, payload) =>\n axios.put(`${BASE_URL}/api/v1/cash/payments/${id}`, {\n payment: payload,\n });\n\nconst paymentsApi = { create, update };\n\nexport default paymentsApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport paymentsApi from \"apis/cash/payments\";\n\nexport const useCreateCashPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n\nexport const useUpdateCashPayment = (id, options = {}) =>\n useMutation({\n mutationFn: payload => paymentsApi.update(id, payload),\n ...options,\n });\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","update","id","put","paymentsApi","useCreateCashPayment","options","useMutation","_objectSpread","mutationFn","useUpdateCashPayment","arguments","length","undefined"],"mappings":";;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,kBAAQ,EAAgC,8BAAA,CAAA,EAAA;AACpDC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,MAAM,GAAG,SAATA,MAAMA,CAAIC,EAAE,EAAEP,OAAO,EAAA;EAAA,OACzBC,KAAK,CAACO,GAAG,CAAAL,EAAAA,CAAAA,MAAA,CAAIC,kBAAQ,EAAAD,wBAAAA,CAAAA,CAAAA,MAAA,CAAyBI,EAAE,CAAI,EAAA;AAClDF,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMS,WAAW,GAAG;AAAEV,EAAAA,MAAM,EAANA,MAAM;AAAEO,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ICVzBI,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAGC,OAAO,EAAA;EAAA,OACzCC,sBAAW,CAAAC,aAAA,CAAA;IAAGC,UAAU,EAAEL,WAAW,CAACV;GAAWY,EAAAA,OAAO,CAAE,CAAC;AAAA;IAEhDI,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIR,EAAE,EAAA;AAAA,EAAA,IAAEI,OAAO,GAAAK,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OACnDJ,sBAAW,CAAAC,aAAA,CAAA;AACTC,IAAAA,UAAU,EAAE,SAAZA,UAAUA,CAAEd,OAAO,EAAA;AAAA,MAAA,OAAIS,WAAW,CAACH,MAAM,CAACC,EAAE,EAAEP,OAAO,CAAC;AAAA;GACnDW,EAAAA,OAAO,CACX,CAAC;AAAA;;;;;"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
var reactQuery = require('@tanstack/react-query');
|
|
5
|
-
require('neetocist');
|
|
6
|
-
require('neetocommons/react-utils');
|
|
7
|
-
var axios = require('axios');
|
|
8
|
-
var constants = require('./index-CZ_VFGNj.js');
|
|
9
|
-
require('qs');
|
|
10
|
-
var queryConstants = require('./queryConstants-Cka1X6GX.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-C7lXP6ev.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePlatformApi-C7lXP6ev.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,CA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AAAF,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;;;;;;;"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
4
|
-
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
5
|
-
var neetocist = require('neetocist');
|
|
6
|
-
var ramda = require('ramda');
|
|
7
|
-
var reactI18next = require('react-i18next');
|
|
8
|
-
var usePaymentApi = require('./usePaymentApi-BE8xfY-U.js');
|
|
9
|
-
var constants = require('./index-CZ_VFGNj.js');
|
|
10
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
11
|
-
require('@tanstack/react-query');
|
|
12
|
-
require('axios');
|
|
13
|
-
require('i18next');
|
|
14
|
-
require('neetocommons/constants');
|
|
15
|
-
require('decimal.js');
|
|
16
|
-
require('neetocommons/utils');
|
|
17
|
-
|
|
18
|
-
var loadScript = function loadScript(src) {
|
|
19
|
-
return new Promise(function (resolve) {
|
|
20
|
-
var script = document.createElement("script");
|
|
21
|
-
script.src = src;
|
|
22
|
-
script.onload = function () {
|
|
23
|
-
resolve(true);
|
|
24
|
-
};
|
|
25
|
-
script.onerror = function () {
|
|
26
|
-
resolve(false);
|
|
27
|
-
};
|
|
28
|
-
document.body.appendChild(script);
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
var useRazorpayPayment = function useRazorpayPayment(_ref) {
|
|
32
|
-
var payableId = _ref.payableId,
|
|
33
|
-
_ref$customAmount = _ref.customAmount,
|
|
34
|
-
customAmount = _ref$customAmount === void 0 ? null : _ref$customAmount,
|
|
35
|
-
_ref$onBeforePayment = _ref.onBeforePayment,
|
|
36
|
-
onBeforePayment = _ref$onBeforePayment === void 0 ? neetocist.noop : _ref$onBeforePayment,
|
|
37
|
-
_ref$onSuccessfulPaym = _ref.onSuccessfulPayment,
|
|
38
|
-
onSuccessfulPayment = _ref$onSuccessfulPaym === void 0 ? neetocist.noop : _ref$onSuccessfulPaym,
|
|
39
|
-
_ref$onFailedPayment = _ref.onFailedPayment,
|
|
40
|
-
onFailedPayment = _ref$onFailedPayment === void 0 ? neetocist.noop : _ref$onFailedPayment;
|
|
41
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
42
|
-
t = _useTranslation.t;
|
|
43
|
-
var openRazorpayCheckout = /*#__PURE__*/function () {
|
|
44
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
45
|
-
var script, checkout;
|
|
46
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
47
|
-
while (1) switch (_context.prev = _context.next) {
|
|
48
|
-
case 0:
|
|
49
|
-
_context.next = 2;
|
|
50
|
-
return loadScript("https://checkout.razorpay.com/v1/checkout.js");
|
|
51
|
-
case 2:
|
|
52
|
-
script = _context.sent;
|
|
53
|
-
if (script) {
|
|
54
|
-
_context.next = 6;
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
logger.error(t("neetoPayments.razorpay.loadError"));
|
|
58
|
-
return _context.abrupt("return");
|
|
59
|
-
case 6:
|
|
60
|
-
checkout = new window.Razorpay(options);
|
|
61
|
-
checkout.open();
|
|
62
|
-
case 8:
|
|
63
|
-
case "end":
|
|
64
|
-
return _context.stop();
|
|
65
|
-
}
|
|
66
|
-
}, _callee);
|
|
67
|
-
}));
|
|
68
|
-
return function openRazorpayCheckout(_x) {
|
|
69
|
-
return _ref2.apply(this, arguments);
|
|
70
|
-
};
|
|
71
|
-
}();
|
|
72
|
-
var handlePayment = function handlePayment(response) {
|
|
73
|
-
if (neetocist.isNotPresent(response === null || response === void 0 ? void 0 : response.razorpay_signature)) {
|
|
74
|
-
onFailedPayment();
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
onSuccessfulPayment();
|
|
78
|
-
};
|
|
79
|
-
var handleSuccess = function handleSuccess(_ref3) {
|
|
80
|
-
var payment = _ref3.payment;
|
|
81
|
-
if ((payment === null || payment === void 0 ? void 0 : payment.status) === "successful") {
|
|
82
|
-
return onSuccessfulPayment();
|
|
83
|
-
}
|
|
84
|
-
var options = {
|
|
85
|
-
key: payment.publicKey,
|
|
86
|
-
order_id: payment.orderIdentifier,
|
|
87
|
-
customer_id: payment.customerIdentifier,
|
|
88
|
-
modal: {
|
|
89
|
-
confirm_close: true,
|
|
90
|
-
ondismiss: onFailedPayment
|
|
91
|
-
},
|
|
92
|
-
handler: handlePayment
|
|
93
|
-
};
|
|
94
|
-
return openRazorpayCheckout(ramda.mergeDeepLeft(constants.RAZORPAY_PAYMENT_BUTTON_OPTIONS, options));
|
|
95
|
-
};
|
|
96
|
-
var _useCreateRazorpayPay = usePaymentApi.useCreateRazorpayPayment({
|
|
97
|
-
onSuccess: handleSuccess
|
|
98
|
-
}),
|
|
99
|
-
createRazorpayOrder = _useCreateRazorpayPay.mutate;
|
|
100
|
-
var makePayment = function makePayment() {
|
|
101
|
-
onBeforePayment();
|
|
102
|
-
createRazorpayOrder({
|
|
103
|
-
payableId: payableId,
|
|
104
|
-
customAmount: customAmount
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
return {
|
|
108
|
-
makePayment: makePayment
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
module.exports = useRazorpayPayment;
|
|
113
|
-
//# sourceMappingURL=useRazorpayPayment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,GAAA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C/DC,MAAAA,SAAS,EAAElB;AACb,KAAC,CAAC;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;;;;"}
|
|
@@ -1,57 +0,0 @@
|
|
|
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('neetocist');
|
|
7
|
-
var initializers = require('neetocommons/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
|
|
@@ -1 +0,0 @@
|
|
|
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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,UAAAA,QAAA,CAAAC,IAAA,GAAA,EAAA;UAAAD,QAAA,CAAAU,EAAA,GAAAV,QAAA,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA;AAEDW,UAAAA,MAAM,CAACC,KAAK,CAAAZ,QAAA,CAAAU,EAAM,CAAC;AAAC,QAAA,KAAA,EAAA;AAAA,UAAA,OAAAV,QAAA,CAAAO,MAAA,CAAA,QAAA,EAGf,IAAI,CAAA;AAAA,QAAA,KAAA,EAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAP,QAAA,CAAAa,IAAA,EAAA;AAAA;AAAA,KAAA,EAAApB,OAAA,EAAA,IAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA;GACZ,CAAA,CAAA,EAAE,CAACP,IAAI,EAAEF,uBAAuB,EAAEI,qBAAqB,CAAC,CAAC;AAAA;;;;"}
|
package/dist/constants.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import 'i18next';
|
|
2
|
-
import 'neetocommons/constants';
|
|
3
|
-
export { A as ASSOCIATED_TABLE_COLUMNS, B as BASE_URL, J as CURRENCY_OPTIONS, q as DASHBOARD_KIND, i as DEFAULT_PAGE_VALUES, D as DEFAULT_SORT_PROPERTIES, j as DEFAULT_TAG_STYLE, E as ERROR_TYPE, V as FILTER_COLUMNS, M as MAX_POLLING_TIME, x as PAYMENT_KIND, P as PAYMENT_PROVIDERS, K as PAYMENT_STATUS_TYPE, t as POLLING_INTERVAL, Q as RAZORPAY_CURRENCY_OPTIONS, R as RAZORPAY_PAYMENT_BUTTON_OPTIONS, L as REFUND_STATUS_TYPE, S as SORT_DIRECTIONS, y as STRIPE_CONNECT_ENDPOINT, O as STRIPE_CURRENCY_OPTIONS, N as STRIPE_DASHBOARD_LINK, T as TAG_STYLE, W as TIP_KIND, U as UN_HIDEABLE_COLUMNS, Z as ZERO_DECIMAL_CURRENCIES } from './index-Bb6ocLKy.js';
|
|
4
|
-
import 'decimal.js';
|
|
5
|
-
import 'neetocist';
|
|
6
|
-
import 'neetocommons/utils';
|
|
7
|
-
import 'ramda';
|
|
8
|
-
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { QueryClient, QueryCache, keepPreviousData, QueryClientProvider, useMutation } from '@tanstack/react-query';
|
|
2
|
-
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
|
3
|
-
import { DEFAULT_STALE_TIME } from 'neetocommons/constants';
|
|
4
|
-
import axios from 'axios';
|
|
5
|
-
import { B as BASE_URL, i as DEFAULT_PAGE_VALUES } from './index-Bb6ocLKy.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
7
|
-
import { camelToSnakeCase } from 'neetocist';
|
|
8
|
-
import { isEmpty, assoc, modify, concat } from 'ramda';
|
|
9
|
-
|
|
10
|
-
/* eslint-disable @bigbinary/neeto/api-connector-name-should-match-filename */
|
|
11
|
-
/* eslint-disable @bigbinary/neeto/file-name-and-export-name-standards */
|
|
12
|
-
var queryClient = new QueryClient({
|
|
13
|
-
queryCache: new QueryCache(),
|
|
14
|
-
defaultOptions: {
|
|
15
|
-
queries: {
|
|
16
|
-
staleTime: DEFAULT_STALE_TIME,
|
|
17
|
-
placeholderData: keepPreviousData
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
/* eslint-disable sonarjs/prefer-immediate-return */
|
|
23
|
-
/* eslint-disable @bigbinary/neeto/file-name-and-export-name-standards */
|
|
24
|
-
var withReactQuery = function withReactQuery(Component) {
|
|
25
|
-
var QueryWrapper = function QueryWrapper(props) {
|
|
26
|
-
return /*#__PURE__*/React.createElement(QueryClientProvider, {
|
|
27
|
-
client: queryClient
|
|
28
|
-
}, /*#__PURE__*/React.createElement(Component, props), /*#__PURE__*/React.createElement(ReactQueryDevtools, {
|
|
29
|
-
initialIsOpen: false,
|
|
30
|
-
position: "bottom"
|
|
31
|
-
}));
|
|
32
|
-
};
|
|
33
|
-
return QueryWrapper;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
var exportData = function exportData(payload) {
|
|
37
|
-
return axios.post("".concat(BASE_URL, "/api/v1/stripe/exports"), payload, {
|
|
38
|
-
showToastr: false
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
var exportsApi = {
|
|
42
|
-
exportData: exportData
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
var useExportData = function useExportData() {
|
|
46
|
-
return useMutation({
|
|
47
|
-
mutationFn: exportsApi.exportData
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
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; }
|
|
52
|
-
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; }
|
|
53
|
-
var processSortProperties = function processSortProperties(sortProperties) {
|
|
54
|
-
if (sortProperties.sortBy === "payment_amount") {
|
|
55
|
-
return assoc("sortBy", "neeto_payments_engine_payments.amount", sortProperties);
|
|
56
|
-
}
|
|
57
|
-
if (sortProperties.sortBy === "email" || sortProperties.sortBy === "first_name") {
|
|
58
|
-
return modify("sortBy", concat("users."), sortProperties);
|
|
59
|
-
}
|
|
60
|
-
if (sortProperties.sortBy === "payable,ends_at") {
|
|
61
|
-
return assoc("sortBy", "bookings.ends_at", sortProperties);
|
|
62
|
-
}
|
|
63
|
-
return sortProperties;
|
|
64
|
-
};
|
|
65
|
-
var buildDefaultPageProperties = function buildDefaultPageProperties(tabs) {
|
|
66
|
-
return tabs.reduce(function (pageProperties, tab) {
|
|
67
|
-
return _objectSpread(_objectSpread({}, pageProperties), {}, _defineProperty({}, tab, DEFAULT_PAGE_VALUES));
|
|
68
|
-
}, {});
|
|
69
|
-
};
|
|
70
|
-
var buildPayload = function buildPayload(_ref) {
|
|
71
|
-
var _pageProperties$tab, _pageProperties$tab2;
|
|
72
|
-
var tab = _ref.tab,
|
|
73
|
-
filters = _ref.filters,
|
|
74
|
-
pageProperties = _ref.pageProperties,
|
|
75
|
-
_ref$sortProperties = _ref.sortProperties,
|
|
76
|
-
sortProperties = _ref$sortProperties === void 0 ? {} : _ref$sortProperties,
|
|
77
|
-
_ref$payoutId = _ref.payoutId,
|
|
78
|
-
payoutId = _ref$payoutId === void 0 ? null : _ref$payoutId;
|
|
79
|
-
return _objectSpread({
|
|
80
|
-
tab: camelToSnakeCase(tab),
|
|
81
|
-
payoutId: payoutId,
|
|
82
|
-
page: (_pageProperties$tab = pageProperties[tab]) === null || _pageProperties$tab === void 0 ? void 0 : _pageProperties$tab.page,
|
|
83
|
-
pageSize: (_pageProperties$tab2 = pageProperties[tab]) === null || _pageProperties$tab2 === void 0 ? void 0 : _pageProperties$tab2.pageSize,
|
|
84
|
-
filters: filters
|
|
85
|
-
}, processSortProperties(sortProperties));
|
|
86
|
-
};
|
|
87
|
-
var buildRowData = function buildRowData(_ref2) {
|
|
88
|
-
var data = _ref2.data,
|
|
89
|
-
_ref2$pageProperties = _ref2.pageProperties,
|
|
90
|
-
pageProperties = _ref2$pageProperties === void 0 ? {} : _ref2$pageProperties,
|
|
91
|
-
_ref2$tab = _ref2.tab,
|
|
92
|
-
tab = _ref2$tab === void 0 ? "all" : _ref2$tab;
|
|
93
|
-
return data.map(function (element, index) {
|
|
94
|
-
var _pageProperties$tab3, _pageProperties$tab4;
|
|
95
|
-
return _objectSpread(_objectSpread({}, element), {}, {
|
|
96
|
-
payable: element.payable,
|
|
97
|
-
identifier: element,
|
|
98
|
-
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
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
export { buildPayload as a, buildDefaultPageProperties as b, buildRowData as c, useExportData as u, withReactQuery as w };
|
|
104
|
-
//# sourceMappingURL=dashboard-BDaEfYC6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-BDaEfYC6.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","React","createElement","QueryClientProvider","client","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","_objectSpread","_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;;ACjBF;AACA;AAMA,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,SAAS,EAAI;AAClC,EAAA,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAGC,KAAK,EAAA;AAAA,IAAA,oBACxBC,KAAA,CAAAC,aAAA,CAACC,mBAAmB,EAAA;AAACC,MAAAA,MAAM,EAAEjB;AAAY,KAAA,eACvCc,KAAA,CAAAC,aAAA,CAACJ,SAAS,EAAKE,KAAQ,CAAC,eACxBC,KAAA,CAAAC,aAAA,CAACG,kBAAkB,EAAA;AAACC,MAAAA,aAAa,EAAE,KAAM;AAACC,MAAAA,QA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