@bigbinary/neeto-payments-frontend 3.3.2 → 3.3.3
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/app/javascript/src/translations/en.json +11 -0
- package/dist/AccountsDashboard.js +1 -1
- package/dist/PaymentsDashboard.js +1 -1
- package/dist/PayoutsDashboard.js +3 -3
- package/dist/PayoutsPage.js +3 -3
- package/dist/RecurringPaymentSettings.js +132 -0
- package/dist/RecurringPaymentSettings.js.map +1 -0
- package/dist/RefundsDashboard.js +1 -1
- package/dist/SplitTransfersDashboard.js +1 -1
- package/dist/StripeConnect.js +2 -2
- package/dist/TaxesDashboard.js +1 -1
- package/dist/cjs/AccountsDashboard.js +1 -1
- package/dist/cjs/PaymentsDashboard.js +1 -1
- package/dist/cjs/PayoutsDashboard.js +3 -3
- package/dist/cjs/PayoutsPage.js +3 -3
- package/dist/cjs/RecurringPaymentSettings.js +153 -0
- package/dist/cjs/RecurringPaymentSettings.js.map +1 -0
- package/dist/cjs/RefundsDashboard.js +1 -1
- package/dist/cjs/SplitTransfersDashboard.js +1 -1
- package/dist/cjs/StripeConnect.js +2 -2
- package/dist/cjs/TaxesDashboard.js +1 -1
- package/dist/cjs/index.js +5 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{queryConstants-Chzd1Qaa.js → queryConstants-DNzfbVD-.js} +3 -2
- package/dist/cjs/queryConstants-DNzfbVD-.js.map +1 -0
- package/dist/cjs/{useConnectApi-CK4lVwTE.js → useConnectApi-AKCRTnvM.js} +2 -2
- package/dist/cjs/{useConnectApi-CK4lVwTE.js.map → useConnectApi-AKCRTnvM.js.map} +1 -1
- package/dist/cjs/{usePlatformApi-D6f5z6vZ.js → usePlatformApi-BaR9BNZs.js} +2 -2
- package/dist/cjs/{usePlatformApi-D6f5z6vZ.js.map → usePlatformApi-BaR9BNZs.js.map} +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/{queryConstants-BNBPsZPA.js → queryConstants-CqEabttJ.js} +3 -2
- package/dist/queryConstants-CqEabttJ.js.map +1 -0
- package/dist/{useConnectApi-kHwZWA6H.js → useConnectApi-0JizTABG.js} +2 -2
- package/dist/{useConnectApi-kHwZWA6H.js.map → useConnectApi-0JizTABG.js.map} +1 -1
- package/dist/{usePlatformApi-BHlR7CMG.js → usePlatformApi-BUUkJvaH.js} +2 -2
- package/dist/{usePlatformApi-BHlR7CMG.js.map → usePlatformApi-BUUkJvaH.js.map} +1 -1
- package/package.json +1 -1
- package/dist/cjs/queryConstants-Chzd1Qaa.js.map +0 -1
- package/dist/queryConstants-BNBPsZPA.js.map +0 -1
|
@@ -457,6 +457,17 @@
|
|
|
457
457
|
"reason": "Reason for resumption"
|
|
458
458
|
}
|
|
459
459
|
},
|
|
460
|
+
"recurringPaymentSettings": {
|
|
461
|
+
"title": "Recurring Payment",
|
|
462
|
+
"monthlyRecurringPayment": "Monthly recurring payment",
|
|
463
|
+
"enableRecurringPayment": "<button>Enable recurring</button> payment in your form to configure recurring payment settings",
|
|
464
|
+
"attemptOffsetDays": {
|
|
465
|
+
"label": "How many days before the submission date the next recurring payment should be attempted?",
|
|
466
|
+
"isRequired": "Attmpt offset days is required",
|
|
467
|
+
"min": "Must be greater than 1",
|
|
468
|
+
"max": "Must be less than 15"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
460
471
|
"taxesDashboard": {
|
|
461
472
|
"title": "Taxes",
|
|
462
473
|
"noData": "There are no taxes to show",
|
|
@@ -32,7 +32,7 @@ import NoData from '@bigbinary/neetoui/NoData';
|
|
|
32
32
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
33
33
|
import { useQuery } from '@tanstack/react-query';
|
|
34
34
|
import axios from 'axios';
|
|
35
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
35
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
36
36
|
import '@tanstack/react-query-devtools';
|
|
37
37
|
import '@bigbinary/neeto-molecules/DateFormat';
|
|
38
38
|
import '@bigbinary/neetoui/Tag';
|
|
@@ -12,7 +12,7 @@ import { E as ExportModal } from './ExportModal-BkWscSJE.js';
|
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import axios from 'axios';
|
|
14
14
|
import { B as BASE_URL, P as PAYMENT_PROVIDERS, c as DEFAULT_TAG_STYLE, f as formatAmount, d as formatCurrency, g as getUniquePaymentProviders, e as buildDefaultTableColumns, S as SORT_DIRECTIONS, p as processDataIndex, D as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, h as DEFAULT_PAGE_VALUES, i as DASHBOARD_KIND } from './index-Cl511Juk.js';
|
|
15
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
15
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
16
16
|
import { t } from 'i18next';
|
|
17
17
|
import { toLabelAndValue, snakeToCamelCase, humanize, isNotPresent, isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
|
|
18
18
|
import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
package/dist/PayoutsDashboard.js
CHANGED
|
@@ -30,8 +30,8 @@ import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
|
30
30
|
import Table from '@bigbinary/neetoui/Table';
|
|
31
31
|
import NoData from '@bigbinary/neetoui/NoData';
|
|
32
32
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
33
|
-
import { u as useFetchStripePayouts } from './useConnectApi-
|
|
34
|
-
import { u as useFetchStripePlatformPayouts } from './usePlatformApi-
|
|
33
|
+
import { u as useFetchStripePayouts } from './useConnectApi-0JizTABG.js';
|
|
34
|
+
import { u as useFetchStripePlatformPayouts } from './usePlatformApi-BUUkJvaH.js';
|
|
35
35
|
import '@tanstack/react-query';
|
|
36
36
|
import '@tanstack/react-query-devtools';
|
|
37
37
|
import 'axios';
|
|
@@ -40,7 +40,7 @@ import '@bigbinary/neetoui/Tag';
|
|
|
40
40
|
import '@bigbinary/neetoui/Tooltip';
|
|
41
41
|
import '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
42
42
|
import 'qs';
|
|
43
|
-
import './queryConstants-
|
|
43
|
+
import './queryConstants-CqEabttJ.js';
|
|
44
44
|
|
|
45
45
|
var TAB = {
|
|
46
46
|
all: "all",
|
package/dist/PayoutsPage.js
CHANGED
|
@@ -5,8 +5,8 @@ import Typography from '@bigbinary/neetoui/Typography';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { useParams } from 'react-router-dom/cjs/react-router-dom';
|
|
7
7
|
import { r as renderStatus, c as renderDate } from './renderFunctions-DlSa2Jxe.js';
|
|
8
|
-
import { a as useShowStripePayout } from './useConnectApi-
|
|
9
|
-
import { a as useShowStripePlatformPayout } from './usePlatformApi-
|
|
8
|
+
import { a as useShowStripePayout } from './useConnectApi-0JizTABG.js';
|
|
9
|
+
import { a as useShowStripePlatformPayout } from './usePlatformApi-BUUkJvaH.js';
|
|
10
10
|
import Button from '@bigbinary/neetoui/Button';
|
|
11
11
|
import { C as CopyButtonWrapper } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
12
12
|
import { j as buildStripePayoutLink } from './index-Cl511Juk.js';
|
|
@@ -21,7 +21,7 @@ import '@tanstack/react-query';
|
|
|
21
21
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
22
22
|
import 'axios';
|
|
23
23
|
import 'qs';
|
|
24
|
-
import './queryConstants-
|
|
24
|
+
import './queryConstants-CqEabttJ.js';
|
|
25
25
|
import '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
26
26
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
27
27
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { isNotPresent } from '@bigbinary/neeto-cist';
|
|
2
|
+
import Container from '@bigbinary/neeto-molecules/Container';
|
|
3
|
+
import Header from '@bigbinary/neeto-molecules/Header';
|
|
4
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
5
|
+
import Button from '@bigbinary/neetoui/Button';
|
|
6
|
+
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
7
|
+
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
8
|
+
import Input from '@bigbinary/neetoui/formik/Input';
|
|
9
|
+
import Form from '@bigbinary/neetoui/formik/Form';
|
|
10
|
+
import { isNotNil, mergeLeft } from 'ramda';
|
|
11
|
+
import { useTranslation, Trans } from 'react-i18next';
|
|
12
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
13
|
+
import { useQuery } from '@tanstack/react-query';
|
|
14
|
+
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
15
|
+
import axios from 'axios';
|
|
16
|
+
import { B as BASE_URL } from './index-Cl511Juk.js';
|
|
17
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
18
|
+
import { t } from 'i18next';
|
|
19
|
+
import * as yup from 'yup';
|
|
20
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
21
|
+
import '@bigbinary/neeto-commons-frontend/constants';
|
|
22
|
+
import '@bigbinary/neeto-commons-frontend/utils';
|
|
23
|
+
|
|
24
|
+
var show = function show(feeId) {
|
|
25
|
+
return axios.get("".concat(BASE_URL, "/api/v1/fees/").concat(feeId, "/recurring_setting"));
|
|
26
|
+
};
|
|
27
|
+
var update = function update(feeId, payload) {
|
|
28
|
+
return axios.put("".concat(BASE_URL, "/api/v1/fees/").concat(feeId, "/recurring_setting"), {
|
|
29
|
+
recurringSetting: payload
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
var recurringSettingsApi = {
|
|
33
|
+
show: show,
|
|
34
|
+
update: update
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
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; }
|
|
38
|
+
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; }
|
|
39
|
+
var useFetchRecurringSettings = function useFetchRecurringSettings(feeId) {
|
|
40
|
+
return useQuery({
|
|
41
|
+
queryKey: [QUERY_KEYS.RECURRING_SETTINGS, feeId],
|
|
42
|
+
queryFn: function queryFn() {
|
|
43
|
+
return recurringSettingsApi.show(feeId);
|
|
44
|
+
},
|
|
45
|
+
enabled: isNotNil(feeId)
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var useUpdateRecurringSettings = function useUpdateRecurringSettings(feeId, options) {
|
|
49
|
+
return useMutationWithInvalidation(function (payload) {
|
|
50
|
+
return recurringSettingsApi.update(feeId, payload);
|
|
51
|
+
}, _objectSpread({
|
|
52
|
+
keysToInvalidate: [QUERY_KEYS.RECURRING_SETTINGS, feeId]
|
|
53
|
+
}, options));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var INITIAL_VALUE = {
|
|
57
|
+
attemptOffsetDays: 1
|
|
58
|
+
};
|
|
59
|
+
var VALIDATION_SCHEMA = yup.object({
|
|
60
|
+
attemptOffsetDays: yup.number().max(15, t("neetoPayments.recurringPaymentSettings.attemptOffsetDays.max")).min(1, t("neetoPayments.recurringPaymentSettings.attemptOffsetDays.min")).required(t("neetoPayments.recurringPaymentSettings.attemptOffsetDays.isRequired"))
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
var RecurringPaymentSettings = function RecurringPaymentSettings(_ref) {
|
|
64
|
+
var fee = _ref.fee,
|
|
65
|
+
breadcrumbs = _ref.breadcrumbs,
|
|
66
|
+
enableRecurringPaymentUrl = _ref.enableRecurringPaymentUrl;
|
|
67
|
+
var _useTranslation = useTranslation(),
|
|
68
|
+
t = _useTranslation.t;
|
|
69
|
+
var _useFetchRecurringSet = useFetchRecurringSettings(fee === null || fee === void 0 ? void 0 : fee.id),
|
|
70
|
+
isLoading = _useFetchRecurringSet.isLoading,
|
|
71
|
+
_useFetchRecurringSet2 = _useFetchRecurringSet.data,
|
|
72
|
+
_useFetchRecurringSet3 = _useFetchRecurringSet2 === void 0 ? {} : _useFetchRecurringSet2,
|
|
73
|
+
recurringSetting = _useFetchRecurringSet3.recurringSetting;
|
|
74
|
+
var _useUpdateRecurringSe = useUpdateRecurringSettings(fee === null || fee === void 0 ? void 0 : fee.id),
|
|
75
|
+
updateRecurringSetting = _useUpdateRecurringSe.mutate,
|
|
76
|
+
isPending = _useUpdateRecurringSe.isPending;
|
|
77
|
+
var handleSubmit = function handleSubmit(values) {
|
|
78
|
+
updateRecurringSetting(values);
|
|
79
|
+
};
|
|
80
|
+
if (isLoading || isNotPresent(fee)) {
|
|
81
|
+
return /*#__PURE__*/jsx("div", {
|
|
82
|
+
className: "flex h-full w-full items-center justify-center",
|
|
83
|
+
children: /*#__PURE__*/jsx(Spinner, {})
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return /*#__PURE__*/jsxs(Container, {
|
|
87
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
88
|
+
breadcrumbs: breadcrumbs,
|
|
89
|
+
title: t("neetoPayments.recurringPaymentSettings.title")
|
|
90
|
+
}), /*#__PURE__*/jsx("div", {
|
|
91
|
+
className: "mx-auto w-full max-w-3xl lg:px-6",
|
|
92
|
+
children: /*#__PURE__*/jsx("div", {
|
|
93
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded space-y-6 border p-4 md:p-6",
|
|
94
|
+
children: fee !== null && fee !== void 0 && fee.isRecurringPaymentEnabled ? /*#__PURE__*/jsx(Form, {
|
|
95
|
+
formikProps: {
|
|
96
|
+
enableReinitialize: true,
|
|
97
|
+
onSubmit: handleSubmit,
|
|
98
|
+
initialValues: mergeLeft(recurringSetting, INITIAL_VALUE),
|
|
99
|
+
validationSchema: VALIDATION_SCHEMA
|
|
100
|
+
},
|
|
101
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
102
|
+
className: "flex flex-col space-y-4",
|
|
103
|
+
children: [/*#__PURE__*/jsx(Input, {
|
|
104
|
+
required: true,
|
|
105
|
+
name: "attemptOffsetDays",
|
|
106
|
+
label: t("neetoPayments.recurringPaymentSettings.attemptOffsetDays.label")
|
|
107
|
+
}), /*#__PURE__*/jsx(ActionBlock, {
|
|
108
|
+
isSubmitting: isPending
|
|
109
|
+
})]
|
|
110
|
+
})
|
|
111
|
+
}) : /*#__PURE__*/jsx(Typography, {
|
|
112
|
+
lineHeight: "normal",
|
|
113
|
+
style: "body1",
|
|
114
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
115
|
+
i18nKey: "neetoPayments.recurringPaymentSettings.enableRecurringPayment",
|
|
116
|
+
components: {
|
|
117
|
+
button: /*#__PURE__*/jsx(Button, {
|
|
118
|
+
"data-cy": "split-payment-connect-button",
|
|
119
|
+
size: "large",
|
|
120
|
+
style: "link",
|
|
121
|
+
to: enableRecurringPaymentUrl
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export { RecurringPaymentSettings as default };
|
|
132
|
+
//# sourceMappingURL=RecurringPaymentSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecurringPaymentSettings.js","sources":["../app/javascript/src/apis/recurring_settings.js","../app/javascript/src/hooks/reactQuery/useRecurringSettingsApi.js","../app/javascript/src/components/RecurringPaymentSettings/constants.js","../app/javascript/src/components/RecurringPaymentSettings/index.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst show = feeId =>\n axios.get(`${BASE_URL}/api/v1/fees/${feeId}/recurring_setting`);\n\nconst update = (feeId, payload) =>\n axios.put(`${BASE_URL}/api/v1/fees/${feeId}/recurring_setting`, {\n recurringSetting: payload,\n });\n\nconst recurringSettingsApi = { show, update };\n\nexport default recurringSettingsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\nimport { isNotNil } from \"ramda\";\n\nimport recurringSettingsApi from \"apis/recurring_settings\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchRecurringSettings = feeId =>\n useQuery({\n queryKey: [QUERY_KEYS.RECURRING_SETTINGS, feeId],\n queryFn: () => recurringSettingsApi.show(feeId),\n enabled: isNotNil(feeId),\n });\n\nexport const useUpdateRecurringSettings = (feeId, options) =>\n useMutationWithInvalidation(\n payload => recurringSettingsApi.update(feeId, payload),\n {\n keysToInvalidate: [QUERY_KEYS.RECURRING_SETTINGS, feeId],\n ...options,\n }\n );\n","import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const INITIAL_VALUE = { attemptOffsetDays: 1 };\nexport const VALIDATION_SCHEMA = yup.object({\n attemptOffsetDays: yup\n .number()\n .max(15, t(\"neetoPayments.recurringPaymentSettings.attemptOffsetDays.max\"))\n .min(1, t(\"neetoPayments.recurringPaymentSettings.attemptOffsetDays.min\"))\n .required(\n t(\"neetoPayments.recurringPaymentSettings.attemptOffsetDays.isRequired\")\n ),\n});\n","import { isNotPresent } from \"neetocist\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { Typography, Button, Spinner } from \"neetoui\";\nimport { ActionBlock, Input, Form } from \"neetoui/formik\";\nimport { mergeLeft } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport {\n useFetchRecurringSettings,\n useUpdateRecurringSettings,\n} from \"hooks/reactQuery/useRecurringSettingsApi\";\n\nimport { INITIAL_VALUE, VALIDATION_SCHEMA } from \"./constants\";\n\nconst RecurringPaymentSettings = ({\n fee,\n breadcrumbs,\n enableRecurringPaymentUrl,\n}) => {\n const { t } = useTranslation();\n\n const { isLoading, data: { recurringSetting } = {} } =\n useFetchRecurringSettings(fee?.id);\n\n const { mutate: updateRecurringSetting, isPending } =\n useUpdateRecurringSettings(fee?.id);\n\n const handleSubmit = values => {\n updateRecurringSetting(values);\n };\n\n if (isLoading || isNotPresent(fee)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <Container>\n <Header\n {...{ breadcrumbs }}\n title={t(\"neetoPayments.recurringPaymentSettings.title\")}\n />\n <div className=\"mx-auto w-full max-w-3xl lg:px-6\">\n <div className=\"neeto-ui-border-gray-300 neeto-ui-rounded space-y-6 border p-4 md:p-6\">\n {fee?.isRecurringPaymentEnabled ? (\n <Form\n formikProps={{\n enableReinitialize: true,\n onSubmit: handleSubmit,\n initialValues: mergeLeft(recurringSetting, INITIAL_VALUE),\n validationSchema: VALIDATION_SCHEMA,\n }}\n >\n <div className=\"flex flex-col space-y-4\">\n <Input\n required\n name=\"attemptOffsetDays\"\n label={t(\n \"neetoPayments.recurringPaymentSettings.attemptOffsetDays.label\"\n )}\n />\n <ActionBlock isSubmitting={isPending} />\n </div>\n </Form>\n ) : (\n <Typography lineHeight=\"normal\" style=\"body1\">\n <Trans\n i18nKey=\"neetoPayments.recurringPaymentSettings.enableRecurringPayment\"\n components={{\n button: (\n <Button\n data-cy=\"split-payment-connect-button\"\n size=\"large\"\n style=\"link\"\n to={enableRecurringPaymentUrl}\n />\n ),\n }}\n />\n </Typography>\n )}\n </div>\n </div>\n </Container>\n );\n};\n\nexport default RecurringPaymentSettings;\n"],"names":["show","feeId","axios","get","concat","BASE_URL","update","payload","put","recurringSetting","recurringSettingsApi","useFetchRecurringSettings","useQuery","queryKey","QUERY_KEYS","RECURRING_SETTINGS","queryFn","enabled","isNotNil","useUpdateRecurringSettings","options","useMutationWithInvalidation","_objectSpread","keysToInvalidate","INITIAL_VALUE","attemptOffsetDays","VALIDATION_SCHEMA","yup","object","number","max","t","min","required","RecurringPaymentSettings","_ref","fee","breadcrumbs","enableRecurringPaymentUrl","_useTranslation","useTranslation","_useFetchRecurringSet","id","isLoading","_useFetchRecurringSet2","data","_useFetchRecurringSet3","_useUpdateRecurringSe","updateRecurringSetting","mutate","isPending","handleSubmit","values","isNotPresent","_jsx","className","children","Spinner","_jsxs","Container","Header","title","isRecurringPaymentEnabled","Form","formikProps","enableReinitialize","onSubmit","initialValues","mergeLeft","validationSchema","Input","name","label","ActionBlock","isSubmitting","Typography","lineHeight","style","Trans","i18nKey","components","button","Button","size","to"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAGC,KAAK,EAAA;AAAA,EAAA,OAChBC,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,QAAQ,EAAA,eAAA,CAAA,CAAAD,MAAA,CAAgBH,KAAK,EAAA,oBAAA,CAAoB,CAAC;AAAA,CAAA;AAEjE,IAAMK,MAAM,GAAG,SAATA,MAAMA,CAAIL,KAAK,EAAEM,OAAO,EAAA;EAAA,OAC5BL,KAAK,CAACM,GAAG,CAAAJ,EAAAA,CAAAA,MAAA,CAAIC,QAAQ,EAAAD,eAAAA,CAAAA,CAAAA,MAAA,CAAgBH,KAAK,EAAsB,oBAAA,CAAA,EAAA;AAC9DQ,IAAAA,gBAAgB,EAAEF;AACpB,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMG,oBAAoB,GAAG;AAAEV,EAAAA,IAAI,EAAJA,IAAI;AAAEM,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ACLtC,IAAMK,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAGV,KAAK,EAAA;AAAA,EAAA,OAC5CW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
|
package/dist/RefundsDashboard.js
CHANGED
|
@@ -12,7 +12,7 @@ import { E as ExportModal } from './ExportModal-BkWscSJE.js';
|
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import axios from 'axios';
|
|
14
14
|
import { B as BASE_URL, P as PAYMENT_PROVIDERS, c as DEFAULT_TAG_STYLE, f as formatAmount, d as formatCurrency, e as buildDefaultTableColumns, S as SORT_DIRECTIONS, p as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, D as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, h as DEFAULT_PAGE_VALUES, i as DASHBOARD_KIND } from './index-Cl511Juk.js';
|
|
15
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
15
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
16
16
|
import { t } from 'i18next';
|
|
17
17
|
import { toLabelAndValue, snakeToCamelCase, humanize, isNotPresent, camelToSnakeCase, isPresent } from '@bigbinary/neeto-cist';
|
|
18
18
|
import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
|
@@ -13,7 +13,7 @@ import { useQuery } from '@tanstack/react-query';
|
|
|
13
13
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
14
14
|
import axios from 'axios';
|
|
15
15
|
import { B as BASE_URL, k as preProcessStatus, l as getTagStyle, f as formatAmount, d as formatCurrency, m as PAYMENT_KIND, p as processDataIndex, S as SORT_DIRECTIONS, D as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, h as DEFAULT_PAGE_VALUES, i as DASHBOARD_KIND } from './index-Cl511Juk.js';
|
|
16
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
16
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
17
17
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
18
18
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
19
19
|
import Form from '@bigbinary/neetoui/formik/Form';
|
package/dist/StripeConnect.js
CHANGED
|
@@ -6,7 +6,7 @@ import { humanize, isPresent } from '@bigbinary/neeto-cist';
|
|
|
6
6
|
import { useQueryParams, withT, useStateWithDependency } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
7
7
|
import Demo from 'neetointegrations/Demo';
|
|
8
8
|
import IntegrationModal from 'neetointegrations/Modal';
|
|
9
|
-
import { b as useCreateStripeAccount, c as usePollingStripeAccountCreationStatus, d as useFetchConnectedStripeAccount, e as useDestroyStripeAccount, f as usePollingStripeAccount } from './useConnectApi-
|
|
9
|
+
import { b as useCreateStripeAccount, c as usePollingStripeAccountCreationStatus, d as useFetchConnectedStripeAccount, e as useDestroyStripeAccount, f as usePollingStripeAccount } from './useConnectApi-0JizTABG.js';
|
|
10
10
|
import Label from '@bigbinary/neetoui/Label';
|
|
11
11
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
12
12
|
import { useTranslation, Trans } from 'react-i18next';
|
|
@@ -18,7 +18,7 @@ import { useHistory } from 'react-router-dom';
|
|
|
18
18
|
import { useQuery } from '@tanstack/react-query';
|
|
19
19
|
import axios from 'axios';
|
|
20
20
|
import { B as BASE_URL } from './index-Cl511Juk.js';
|
|
21
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
21
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
22
22
|
import { t } from 'i18next';
|
|
23
23
|
import * as yup from 'yup';
|
|
24
24
|
import 'ramda';
|
package/dist/TaxesDashboard.js
CHANGED
|
@@ -16,7 +16,7 @@ import { useQuery } from '@tanstack/react-query';
|
|
|
16
16
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
17
17
|
import axios from 'axios';
|
|
18
18
|
import { B as BASE_URL } from './index-Cl511Juk.js';
|
|
19
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
19
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
20
20
|
import Label from '@bigbinary/neetoui/Label';
|
|
21
21
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
22
22
|
import Pane from '@bigbinary/neetoui/Pane';
|
|
@@ -34,7 +34,7 @@ var NoData = require('@bigbinary/neetoui/NoData');
|
|
|
34
34
|
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
35
35
|
var reactQuery = require('@tanstack/react-query');
|
|
36
36
|
var axios = require('axios');
|
|
37
|
-
var queryConstants = require('./queryConstants-
|
|
37
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
38
38
|
require('@tanstack/react-query-devtools');
|
|
39
39
|
require('@bigbinary/neeto-molecules/DateFormat');
|
|
40
40
|
require('@bigbinary/neetoui/Tag');
|
|
@@ -14,7 +14,7 @@ var ExportModal = require('./ExportModal-BU5MzzaS.js');
|
|
|
14
14
|
var reactQuery = require('@tanstack/react-query');
|
|
15
15
|
var axios = require('axios');
|
|
16
16
|
var constants = require('./index-DFhiGrTx.js');
|
|
17
|
-
var queryConstants = require('./queryConstants-
|
|
17
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
18
18
|
var i18next = require('i18next');
|
|
19
19
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
20
20
|
var Columns = require('@bigbinary/neeto-molecules/Columns');
|
|
@@ -32,8 +32,8 @@ var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
|
|
|
32
32
|
var Table = require('@bigbinary/neetoui/Table');
|
|
33
33
|
var NoData = require('@bigbinary/neetoui/NoData');
|
|
34
34
|
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
35
|
-
var useConnectApi = require('./useConnectApi-
|
|
36
|
-
var usePlatformApi = require('./usePlatformApi-
|
|
35
|
+
var useConnectApi = require('./useConnectApi-AKCRTnvM.js');
|
|
36
|
+
var usePlatformApi = require('./usePlatformApi-BaR9BNZs.js');
|
|
37
37
|
require('@tanstack/react-query');
|
|
38
38
|
require('@tanstack/react-query-devtools');
|
|
39
39
|
require('axios');
|
|
@@ -42,7 +42,7 @@ require('@bigbinary/neetoui/Tag');
|
|
|
42
42
|
require('@bigbinary/neetoui/Tooltip');
|
|
43
43
|
require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
44
44
|
require('qs');
|
|
45
|
-
require('./queryConstants-
|
|
45
|
+
require('./queryConstants-DNzfbVD-.js');
|
|
46
46
|
|
|
47
47
|
var TAB = {
|
|
48
48
|
all: "all",
|
package/dist/cjs/PayoutsPage.js
CHANGED
|
@@ -7,8 +7,8 @@ var Typography = require('@bigbinary/neetoui/Typography');
|
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
8
|
var reactRouterDom = require('react-router-dom/cjs/react-router-dom');
|
|
9
9
|
var renderFunctions = require('./renderFunctions-C0wN6yD6.js');
|
|
10
|
-
var useConnectApi = require('./useConnectApi-
|
|
11
|
-
var usePlatformApi = require('./usePlatformApi-
|
|
10
|
+
var useConnectApi = require('./useConnectApi-AKCRTnvM.js');
|
|
11
|
+
var usePlatformApi = require('./usePlatformApi-BaR9BNZs.js');
|
|
12
12
|
var Button = require('@bigbinary/neetoui/Button');
|
|
13
13
|
var CopyButtonWrapper = require('./CopyButtonWrapper-Ds1k64E0.js');
|
|
14
14
|
var constants = require('./index-DFhiGrTx.js');
|
|
@@ -23,7 +23,7 @@ require('@tanstack/react-query');
|
|
|
23
23
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
24
24
|
require('axios');
|
|
25
25
|
require('qs');
|
|
26
|
-
require('./queryConstants-
|
|
26
|
+
require('./queryConstants-DNzfbVD-.js');
|
|
27
27
|
require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
28
28
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
29
29
|
require('@bigbinary/neeto-commons-frontend/utils');
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
|
+
var Container = require('@bigbinary/neeto-molecules/Container');
|
|
5
|
+
var Header = require('@bigbinary/neeto-molecules/Header');
|
|
6
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
7
|
+
var Button = require('@bigbinary/neetoui/Button');
|
|
8
|
+
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
9
|
+
var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
|
|
10
|
+
var Input = require('@bigbinary/neetoui/formik/Input');
|
|
11
|
+
var Form = require('@bigbinary/neetoui/formik/Form');
|
|
12
|
+
var ramda = require('ramda');
|
|
13
|
+
var reactI18next = require('react-i18next');
|
|
14
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
15
|
+
var reactQuery = require('@tanstack/react-query');
|
|
16
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
17
|
+
var axios = require('axios');
|
|
18
|
+
var constants = require('./index-DFhiGrTx.js');
|
|
19
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
20
|
+
var i18next = require('i18next');
|
|
21
|
+
var yup = require('yup');
|
|
22
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
23
|
+
require('@bigbinary/neeto-commons-frontend/constants');
|
|
24
|
+
require('@bigbinary/neeto-commons-frontend/utils');
|
|
25
|
+
|
|
26
|
+
function _interopNamespaceDefault(e) {
|
|
27
|
+
var n = Object.create(null);
|
|
28
|
+
if (e) {
|
|
29
|
+
Object.keys(e).forEach(function (k) {
|
|
30
|
+
if (k !== 'default') {
|
|
31
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
32
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return e[k]; }
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
n.default = e;
|
|
40
|
+
return Object.freeze(n);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
|
|
44
|
+
|
|
45
|
+
var show = function show(feeId) {
|
|
46
|
+
return axios.get("".concat(constants.BASE_URL, "/api/v1/fees/").concat(feeId, "/recurring_setting"));
|
|
47
|
+
};
|
|
48
|
+
var update = function update(feeId, payload) {
|
|
49
|
+
return axios.put("".concat(constants.BASE_URL, "/api/v1/fees/").concat(feeId, "/recurring_setting"), {
|
|
50
|
+
recurringSetting: payload
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
var recurringSettingsApi = {
|
|
54
|
+
show: show,
|
|
55
|
+
update: update
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
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; }
|
|
59
|
+
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; }
|
|
60
|
+
var useFetchRecurringSettings = function useFetchRecurringSettings(feeId) {
|
|
61
|
+
return reactQuery.useQuery({
|
|
62
|
+
queryKey: [queryConstants.QUERY_KEYS.RECURRING_SETTINGS, feeId],
|
|
63
|
+
queryFn: function queryFn() {
|
|
64
|
+
return recurringSettingsApi.show(feeId);
|
|
65
|
+
},
|
|
66
|
+
enabled: ramda.isNotNil(feeId)
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
var useUpdateRecurringSettings = function useUpdateRecurringSettings(feeId, options) {
|
|
70
|
+
return reactUtils.useMutationWithInvalidation(function (payload) {
|
|
71
|
+
return recurringSettingsApi.update(feeId, payload);
|
|
72
|
+
}, _objectSpread({
|
|
73
|
+
keysToInvalidate: [queryConstants.QUERY_KEYS.RECURRING_SETTINGS, feeId]
|
|
74
|
+
}, options));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var INITIAL_VALUE = {
|
|
78
|
+
attemptOffsetDays: 1
|
|
79
|
+
};
|
|
80
|
+
var VALIDATION_SCHEMA = yup__namespace.object({
|
|
81
|
+
attemptOffsetDays: yup__namespace.number().max(15, i18next.t("neetoPayments.recurringPaymentSettings.attemptOffsetDays.max")).min(1, i18next.t("neetoPayments.recurringPaymentSettings.attemptOffsetDays.min")).required(i18next.t("neetoPayments.recurringPaymentSettings.attemptOffsetDays.isRequired"))
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
var RecurringPaymentSettings = function RecurringPaymentSettings(_ref) {
|
|
85
|
+
var fee = _ref.fee,
|
|
86
|
+
breadcrumbs = _ref.breadcrumbs,
|
|
87
|
+
enableRecurringPaymentUrl = _ref.enableRecurringPaymentUrl;
|
|
88
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
89
|
+
t = _useTranslation.t;
|
|
90
|
+
var _useFetchRecurringSet = useFetchRecurringSettings(fee === null || fee === void 0 ? void 0 : fee.id),
|
|
91
|
+
isLoading = _useFetchRecurringSet.isLoading,
|
|
92
|
+
_useFetchRecurringSet2 = _useFetchRecurringSet.data,
|
|
93
|
+
_useFetchRecurringSet3 = _useFetchRecurringSet2 === void 0 ? {} : _useFetchRecurringSet2,
|
|
94
|
+
recurringSetting = _useFetchRecurringSet3.recurringSetting;
|
|
95
|
+
var _useUpdateRecurringSe = useUpdateRecurringSettings(fee === null || fee === void 0 ? void 0 : fee.id),
|
|
96
|
+
updateRecurringSetting = _useUpdateRecurringSe.mutate,
|
|
97
|
+
isPending = _useUpdateRecurringSe.isPending;
|
|
98
|
+
var handleSubmit = function handleSubmit(values) {
|
|
99
|
+
updateRecurringSetting(values);
|
|
100
|
+
};
|
|
101
|
+
if (isLoading || neetoCist.isNotPresent(fee)) {
|
|
102
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
103
|
+
className: "flex h-full w-full items-center justify-center",
|
|
104
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
108
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
109
|
+
breadcrumbs: breadcrumbs,
|
|
110
|
+
title: t("neetoPayments.recurringPaymentSettings.title")
|
|
111
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
112
|
+
className: "mx-auto w-full max-w-3xl lg:px-6",
|
|
113
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
114
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded space-y-6 border p-4 md:p-6",
|
|
115
|
+
children: fee !== null && fee !== void 0 && fee.isRecurringPaymentEnabled ? /*#__PURE__*/jsxRuntime.jsx(Form, {
|
|
116
|
+
formikProps: {
|
|
117
|
+
enableReinitialize: true,
|
|
118
|
+
onSubmit: handleSubmit,
|
|
119
|
+
initialValues: ramda.mergeLeft(recurringSetting, INITIAL_VALUE),
|
|
120
|
+
validationSchema: VALIDATION_SCHEMA
|
|
121
|
+
},
|
|
122
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
123
|
+
className: "flex flex-col space-y-4",
|
|
124
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
125
|
+
required: true,
|
|
126
|
+
name: "attemptOffsetDays",
|
|
127
|
+
label: t("neetoPayments.recurringPaymentSettings.attemptOffsetDays.label")
|
|
128
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ActionBlock, {
|
|
129
|
+
isSubmitting: isPending
|
|
130
|
+
})]
|
|
131
|
+
})
|
|
132
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
133
|
+
lineHeight: "normal",
|
|
134
|
+
style: "body1",
|
|
135
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
136
|
+
i18nKey: "neetoPayments.recurringPaymentSettings.enableRecurringPayment",
|
|
137
|
+
components: {
|
|
138
|
+
button: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
139
|
+
"data-cy": "split-payment-connect-button",
|
|
140
|
+
size: "large",
|
|
141
|
+
style: "link",
|
|
142
|
+
to: enableRecurringPaymentUrl
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
})]
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
module.exports = RecurringPaymentSettings;
|
|
153
|
+
//# sourceMappingURL=RecurringPaymentSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecurringPaymentSettings.js","sources":["../../app/javascript/src/apis/recurring_settings.js","../../app/javascript/src/hooks/reactQuery/useRecurringSettingsApi.js","../../app/javascript/src/components/RecurringPaymentSettings/constants.js","../../app/javascript/src/components/RecurringPaymentSettings/index.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst show = feeId =>\n axios.get(`${BASE_URL}/api/v1/fees/${feeId}/recurring_setting`);\n\nconst update = (feeId, payload) =>\n axios.put(`${BASE_URL}/api/v1/fees/${feeId}/recurring_setting`, {\n recurringSetting: payload,\n });\n\nconst recurringSettingsApi = { show, update };\n\nexport default recurringSettingsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\nimport { isNotNil } from \"ramda\";\n\nimport recurringSettingsApi from \"apis/recurring_settings\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchRecurringSettings = feeId =>\n useQuery({\n queryKey: [QUERY_KEYS.RECURRING_SETTINGS, feeId],\n queryFn: () => recurringSettingsApi.show(feeId),\n enabled: isNotNil(feeId),\n });\n\nexport const useUpdateRecurringSettings = (feeId, options) =>\n useMutationWithInvalidation(\n payload => recurringSettingsApi.update(feeId, payload),\n {\n keysToInvalidate: [QUERY_KEYS.RECURRING_SETTINGS, feeId],\n ...options,\n }\n );\n","import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const INITIAL_VALUE = { attemptOffsetDays: 1 };\nexport const VALIDATION_SCHEMA = yup.object({\n attemptOffsetDays: yup\n .number()\n .max(15, t(\"neetoPayments.recurringPaymentSettings.attemptOffsetDays.max\"))\n .min(1, t(\"neetoPayments.recurringPaymentSettings.attemptOffsetDays.min\"))\n .required(\n t(\"neetoPayments.recurringPaymentSettings.attemptOffsetDays.isRequired\")\n ),\n});\n","import { isNotPresent } from \"neetocist\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { Typography, Button, Spinner } from \"neetoui\";\nimport { ActionBlock, Input, Form } from \"neetoui/formik\";\nimport { mergeLeft } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport {\n useFetchRecurringSettings,\n useUpdateRecurringSettings,\n} from \"hooks/reactQuery/useRecurringSettingsApi\";\n\nimport { INITIAL_VALUE, VALIDATION_SCHEMA } from \"./constants\";\n\nconst RecurringPaymentSettings = ({\n fee,\n breadcrumbs,\n enableRecurringPaymentUrl,\n}) => {\n const { t } = useTranslation();\n\n const { isLoading, data: { recurringSetting } = {} } =\n useFetchRecurringSettings(fee?.id);\n\n const { mutate: updateRecurringSetting, isPending } =\n useUpdateRecurringSettings(fee?.id);\n\n const handleSubmit = values => {\n updateRecurringSetting(values);\n };\n\n if (isLoading || isNotPresent(fee)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <Container>\n <Header\n {...{ breadcrumbs }}\n title={t(\"neetoPayments.recurringPaymentSettings.title\")}\n />\n <div className=\"mx-auto w-full max-w-3xl lg:px-6\">\n <div className=\"neeto-ui-border-gray-300 neeto-ui-rounded space-y-6 border p-4 md:p-6\">\n {fee?.isRecurringPaymentEnabled ? (\n <Form\n formikProps={{\n enableReinitialize: true,\n onSubmit: handleSubmit,\n initialValues: mergeLeft(recurringSetting, INITIAL_VALUE),\n validationSchema: VALIDATION_SCHEMA,\n }}\n >\n <div className=\"flex flex-col space-y-4\">\n <Input\n required\n name=\"attemptOffsetDays\"\n label={t(\n \"neetoPayments.recurringPaymentSettings.attemptOffsetDays.label\"\n )}\n />\n <ActionBlock isSubmitting={isPending} />\n </div>\n </Form>\n ) : (\n <Typography lineHeight=\"normal\" style=\"body1\">\n <Trans\n i18nKey=\"neetoPayments.recurringPaymentSettings.enableRecurringPayment\"\n components={{\n button: (\n <Button\n data-cy=\"split-payment-connect-button\"\n size=\"large\"\n style=\"link\"\n to={enableRecurringPaymentUrl}\n />\n ),\n }}\n />\n </Typography>\n )}\n </div>\n </div>\n </Container>\n );\n};\n\nexport default RecurringPaymentSettings;\n"],"names":["show","feeId","axios","get","concat","BASE_URL","update","payload","put","recurringSetting","recurringSettingsApi","useFetchRecurringSettings","useQuery","queryKey","QUERY_KEYS","RECURRING_SETTINGS","queryFn","enabled","isNotNil","useUpdateRecurringSettings","options","useMutationWithInvalidation","_objectSpread","keysToInvalidate","INITIAL_VALUE","attemptOffsetDays","VALIDATION_SCHEMA","yup","object","number","max","t","min","required","RecurringPaymentSettings","_ref","fee","breadcrumbs","enableRecurringPaymentUrl","_useTranslation","useTranslation","_useFetchRecurringSet","id","isLoading","_useFetchRecurringSet2","data","_useFetchRecurringSet3","_useUpdateRecurringSe","updateRecurringSetting","mutate","isPending","handleSubmit","values","isNotPresent","_jsx","className","children","Spinner","_jsxs","Container","Header","title","isRecurringPaymentEnabled","Form","formikProps","enableReinitialize","onSubmit","initialValues","mergeLeft","validationSchema","Input","name","label","ActionBlock","isSubmitting","Typography","lineHeight","style","Trans","i18nKey","components","button","Button","size","to"],"mappings":";;;;;;;;;;;;;;;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AS,EAAC,yBAAyB;YAAAC,QAAA,EAAA,cACtCF,cAAA,CAACgB,KAAK,EAAA;cACJrC,QAAQ,EAAA,IAAA;AACRsC,cAAAA,IAAI,EAAC,mBAAmB;cACxBC,KAAK,EAAEzC,CAAC,CACN,gEACF;AAAE,aACH,CAAC,eACFuB,cAAA,CAACmB,WAAW,EAAA;AAACC,cAAAA,YAAY,EAAExB;AAAU,aAAE,CAAC;WACrC;AAAC,SACF,CAAC,gBAEPI,cAAA,CAACqB,UAAU,EAAA;AAACC,UAAAA,UAAU,EAAC,QAAQ;AAACC,UAAAA,KAAK,EAAC,OAAO;UAAArB,QAAA,eAC3CF,cAAA,CAACwB,kBAAK,EAAA;AACJC,YAAAA,OAAO,EAAC,+DAA+D;AACvEC,YAAAA,UAAU,EAAE;cACVC,MAAM,eACJ3B,cAAA,CAAC4B,MAAM,EAAA;AACL,gBAAA,SAAA,EAAQ,8BAA8B;AACtCC,gBAAAA,IAAI,EAAC,OAAO;AACZN,gBAAAA,KAAK,EAAC,MAAM;AACZO,gBAAAA,EAAE,EAAE9C;eACL;AAEL;WACD;SACS;OAEX;AAAC,KACH,CAAC;AAAA,GACG,CAAC;AAEhB;;;;"}
|
|
@@ -14,7 +14,7 @@ var ExportModal = require('./ExportModal-BU5MzzaS.js');
|
|
|
14
14
|
var reactQuery = require('@tanstack/react-query');
|
|
15
15
|
var axios = require('axios');
|
|
16
16
|
var constants = require('./index-DFhiGrTx.js');
|
|
17
|
-
var queryConstants = require('./queryConstants-
|
|
17
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
18
18
|
var i18next = require('i18next');
|
|
19
19
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
20
20
|
var Columns = require('@bigbinary/neeto-molecules/Columns');
|
|
@@ -15,7 +15,7 @@ var reactQuery = require('@tanstack/react-query');
|
|
|
15
15
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
16
16
|
var axios = require('axios');
|
|
17
17
|
var constants = require('./index-DFhiGrTx.js');
|
|
18
|
-
var queryConstants = require('./queryConstants-
|
|
18
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
19
19
|
var Modal = require('@bigbinary/neetoui/Modal');
|
|
20
20
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
21
21
|
var Form = require('@bigbinary/neetoui/formik/Form');
|
|
@@ -7,7 +7,7 @@ var neetoCist = require('@bigbinary/neeto-cist');
|
|
|
7
7
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
8
8
|
var Demo = require('neetointegrations/Demo');
|
|
9
9
|
var IntegrationModal = require('neetointegrations/Modal');
|
|
10
|
-
var useConnectApi = require('./useConnectApi-
|
|
10
|
+
var useConnectApi = require('./useConnectApi-AKCRTnvM.js');
|
|
11
11
|
var Label = require('@bigbinary/neetoui/Label');
|
|
12
12
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
13
13
|
var reactI18next = require('react-i18next');
|
|
@@ -19,7 +19,7 @@ var reactRouterDom = require('react-router-dom');
|
|
|
19
19
|
var reactQuery = require('@tanstack/react-query');
|
|
20
20
|
var axios = require('axios');
|
|
21
21
|
var constants = require('./index-DFhiGrTx.js');
|
|
22
|
-
var queryConstants = require('./queryConstants-
|
|
22
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
23
23
|
var i18next = require('i18next');
|
|
24
24
|
var yup = require('yup');
|
|
25
25
|
require('ramda');
|
|
@@ -18,7 +18,7 @@ var reactQuery = require('@tanstack/react-query');
|
|
|
18
18
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
19
19
|
var axios = require('axios');
|
|
20
20
|
var constants = require('./index-DFhiGrTx.js');
|
|
21
|
-
var queryConstants = require('./queryConstants-
|
|
21
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
22
22
|
var Label = require('@bigbinary/neetoui/Label');
|
|
23
23
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
24
24
|
var Pane = require('@bigbinary/neetoui/Pane');
|
package/dist/cjs/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var UpiConnect = require('./UpiConnect.js');
|
|
|
15
15
|
var UpiPayment = require('./UpiPayment.js');
|
|
16
16
|
var useRazorpayPayment = require('./useRazorpayPayment.js');
|
|
17
17
|
var useStripePromise = require('./useStripePromise.js');
|
|
18
|
+
var RecurringPaymentSettings = require('./RecurringPaymentSettings.js');
|
|
18
19
|
var constants = require('./index-DFhiGrTx.js');
|
|
19
20
|
var CopyButtonWrapper = require('./CopyButtonWrapper-Ds1k64E0.js');
|
|
20
21
|
require('@babel/runtime/helpers/slicedToArray');
|
|
@@ -53,13 +54,13 @@ require('@bigbinary/neeto-molecules/TableWrapper');
|
|
|
53
54
|
require('@bigbinary/neetoui/Table');
|
|
54
55
|
require('@bigbinary/neetoui/NoData');
|
|
55
56
|
require('@bigbinary/neetoui/Spinner');
|
|
56
|
-
require('./queryConstants-
|
|
57
|
+
require('./queryConstants-DNzfbVD-.js');
|
|
57
58
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
58
59
|
require('@bigbinary/neetoui/Alert');
|
|
59
60
|
require('./ExportModal-BU5MzzaS.js');
|
|
60
|
-
require('./useConnectApi-
|
|
61
|
+
require('./useConnectApi-AKCRTnvM.js');
|
|
61
62
|
require('qs');
|
|
62
|
-
require('./usePlatformApi-
|
|
63
|
+
require('./usePlatformApi-BaR9BNZs.js');
|
|
63
64
|
require('react-router-dom/cjs/react-router-dom');
|
|
64
65
|
require('@babel/runtime/helpers/asyncToGenerator');
|
|
65
66
|
require('@babel/runtime/regenerator');
|
|
@@ -106,6 +107,7 @@ exports.UpiConnect = UpiConnect;
|
|
|
106
107
|
exports.UpiPayment = UpiPayment;
|
|
107
108
|
exports.useRazorpayPayment = useRazorpayPayment;
|
|
108
109
|
exports.useStripePromise = useStripePromise;
|
|
110
|
+
exports.RecurringPaymentSettings = RecurringPaymentSettings;
|
|
109
111
|
exports.CURRENCY_OPTIONS = constants.CURRENCY_OPTIONS;
|
|
110
112
|
exports.buildStripeTransactionLink = constants.buildStripeTransactionLink;
|
|
111
113
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -20,8 +20,9 @@ var QUERY_KEYS = {
|
|
|
20
20
|
PAYMENTS_LIST: "payments-list",
|
|
21
21
|
SPLIT_TRANSFERS_LIST: "split-transfers-list",
|
|
22
22
|
SPLIT_TRANSFERS_DETAILS: "split-transfers-details",
|
|
23
|
-
TAXES: "taxes"
|
|
23
|
+
TAXES: "taxes",
|
|
24
|
+
RECURRING_SETTINGS: "recurring-settings"
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
exports.QUERY_KEYS = QUERY_KEYS;
|
|
27
|
-
//# sourceMappingURL=queryConstants-
|
|
28
|
+
//# sourceMappingURL=queryConstants-DNzfbVD-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryConstants-DNzfbVD-.js","sources":["../../app/javascript/src/common/queryConstants.js"],"sourcesContent":["export const QUERY_KEYS = {\n STRIPE_ACCOUNT_DETAILS: \"stripe-account-details\",\n STRIPE_PLATFORM_ACCOUNT_DETAILS: \"stripe-platform-account-details\",\n TRANSACTIONS_LIST: \"transactions-list\",\n PLATFORM_TRANSACTIONS_LIST: \"platform-transactions-list\",\n PAYMENTS_FILTER_OPTIONS: \"payments-filter-options\",\n REFUNDS_LIST: \"refunds-list\",\n SPLITS_LIST: \"platform-splits-list\",\n CONNECTED_ACCOUNT: \"connected-account\",\n STRIPE_ACCOUNTS_LIST: \"stripe-accounts-list\",\n STRIPE_PLATFORM_TRANSACTION: \"stripe-platform-transaction\",\n STRIPE_REFUNDS_LIST: \"stripe-refunds-list\",\n STRIPE_PAYOUTS_LIST: \"stripe-payouts-list\",\n STRIPE_PAYOUT: \"stripe-payout\",\n RAZORPAY_PAYMENTS_LIST: \"razorpay-payment-list\",\n RAZORPAY_ACCOUNT_DETAILS: \"razorpay-account-details\",\n V2_PAYMENTS: \"v2-payments\",\n PAYMENTS_LIST: \"payments-list\",\n SPLIT_TRANSFERS_LIST: \"split-transfers-list\",\n SPLIT_TRANSFERS_DETAILS: \"split-transfers-details\",\n TAXES: \"taxes\",\n RECURRING_SETTINGS: \"recurring-settings\",\n};\n"],"names":["QUERY_KEYS","STRIPE_ACCOUNT_DETAILS","STRIPE_PLATFORM_ACCOUNT_DETAILS","TRANSACTIONS_LIST","PLATFORM_TRANSACTIONS_LIST","PAYMENTS_FILTER_OPTIONS","REFUNDS_LIST","SPLITS_LIST","CONNECTED_ACCOUNT","STRIPE_ACCOUNTS_LIST","STRIPE_PLATFORM_TRANSACTION","STRIPE_REFUNDS_LIST","STRIPE_PAYOUTS_LIST","STRIPE_PAYOUT","RAZORPAY_PAYMENTS_LIST","RAZORPAY_ACCOUNT_DETAILS","V2_PAYMENTS","PAYMENTS_LIST","SPLIT_TRANSFERS_LIST","SPLIT_TRANSFERS_DETAILS","TAXES","RECURRING_SETTINGS"],"mappings":";;AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,sBAAsB,EAAE,wBAAwB;AAChDC,EAAAA,+BAA+B,EAAE,iCAAiC;AAClEC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,WAAW,EAAE,sBAAsB;AACnCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,2BAA2B,EAAE,6BAA6B;AAC1DC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,sBAAsB,EAAE,uBAAuB;AAC/CC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,kBAAkB,EAAE;AACtB;;;;"}
|
|
@@ -7,7 +7,7 @@ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
|
7
7
|
var axios = require('axios');
|
|
8
8
|
var constants = require('./index-DFhiGrTx.js');
|
|
9
9
|
require('qs');
|
|
10
|
-
var queryConstants = require('./queryConstants-
|
|
10
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
11
11
|
|
|
12
12
|
var show$1 = function show(holdableId) {
|
|
13
13
|
return axios.get("".concat(constants.BASE_URL, "/api/v1/stripe/holdable/").concat(holdableId, "/account"));
|
|
@@ -111,4 +111,4 @@ exports.useFetchStripePayouts = useFetchStripePayouts;
|
|
|
111
111
|
exports.usePollingStripeAccount = usePollingStripeAccount;
|
|
112
112
|
exports.usePollingStripeAccountCreationStatus = usePollingStripeAccountCreationStatus;
|
|
113
113
|
exports.useShowStripePayout = useShowStripePayout;
|
|
114
|
-
//# sourceMappingURL=useConnectApi-
|
|
114
|
+
//# sourceMappingURL=useConnectApi-AKCRTnvM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConnectApi-
|
|
1
|
+
{"version":3,"file":"useConnectApi-AKCRTnvM.js","sources":["../../app/javascript/src/apis/stripe/holdables/accounts.js","../../app/javascript/src/apis/stripe/holdables/payouts.js","../../app/javascript/src/hooks/reactQuery/stripe/useConnectApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst show = holdableId =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/${holdableId}/account`);\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/stripe/accounts`, payload);\n\nconst creationStatus = jobId =>\n axios.get(`${BASE_URL}/api/v1/stripe/accounts/${jobId}/creation_status`);\n\nconst destroy = accountId =>\n axios.delete(`${BASE_URL}/api/v1/stripe/accounts/${accountId}`);\n\nconst accountsApi = { show, create, creationStatus, destroy };\n\nexport default accountsApi;\n","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"],"names":["show","holdableId","axios","get","concat","BASE_URL","create","payload","post","creationStatus","jobId","destroy","accountId","accountsApi","list","params","id","payoutsApi","useFetchConnectedStripeAccount","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","CONNECTED_ACCOUNT","queryFn","useFetchStripePayouts","STRIPE_PAYOUTS_LIST","useShowStripePayout","STRIPE_PAYOUT","usePollingStripeAccount","_ref","refetchInterval","STRIPE_ACCOUNT_DETAILS","usePollingStripeAccountCreationStatus","useDestroyStripeAccount","_ref2","onSuccess","useMutationWithInvalidation","keysToInvalidate","useCreateStripeAccount","_ref3"],"mappings":";;;;;;;;;;;AAIA,IAAMA,MAAI,GA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AA,EAAA,IAAMC,SAAS,GAAAD,KAAA,CAATC,SAAS;IAAEvC,UAAU,GAAAsC,KAAA,CAAVtC,UAAU;AAAA,EAAA,OAC7DwC,sCAA2B,CAAC5B,WAAW,CAACF,OAAO,EAAE;AAC/C+B,IAAAA,gBAAgB,EAAE,CAChB,CAAChB,yBAAU,CAACU,sBAAsB,CAAC,EACnC,CAACV,yBAAU,CAACC,iBAAiB,EAAE1B,UAAU,CAAC,CAC3C;AACDuC,IAAAA,SAAS,EAATA;AACF,GAAC,CAAC;AAAA;IAESG,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,KAAA,EAAA;AAAA,EAAA,IAAMJ,SAAS,GAAAI,KAAA,CAATJ,SAAS;AAAA,EAAA,OAChDC,sCAA2B,CAAC5B,WAAW,CAACP,MAAM,EAAE;AAC9CoC,IAAAA,gBAAgB,EAAE,CAAC,CAAChB,yBAAU,CAACU,sBAAsB,CAAC,CAAC;AACvDI,IAAAA,SAAS,EAATA;AACF,GAAC,CAAC;AAAA;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ var reactQuery = require('@tanstack/react-query');
|
|
|
5
5
|
var axios = require('axios');
|
|
6
6
|
require('qs');
|
|
7
7
|
var constants = require('./index-DFhiGrTx.js');
|
|
8
|
-
var queryConstants = require('./queryConstants-
|
|
8
|
+
var queryConstants = require('./queryConstants-DNzfbVD-.js');
|
|
9
9
|
|
|
10
10
|
var list = function list(payload) {
|
|
11
11
|
return axios.get("".concat(constants.BASE_URL, "/api/v1/stripe_platform/payouts"), {
|
|
@@ -43,4 +43,4 @@ var useShowStripePlatformPayout = function useShowStripePlatformPayout(id) {
|
|
|
43
43
|
|
|
44
44
|
exports.useFetchStripePlatformPayouts = useFetchStripePlatformPayouts;
|
|
45
45
|
exports.useShowStripePlatformPayout = useShowStripePlatformPayout;
|
|
46
|
-
//# sourceMappingURL=usePlatformApi-
|
|
46
|
+
//# sourceMappingURL=usePlatformApi-BaR9BNZs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePlatformApi-
|
|
1
|
+
{"version":3,"file":"usePlatformApi-BaR9BNZs.js","sources":["../../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_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","useFetchStripePlatformPayouts","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_PAYOUTS_LIST","queryFn","useShowStripePlatformPayout","STRIPE_PAYOUT"],"mappings":";;;;;;;;;AAIA,IAAMA,IAAI,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,IAAI,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,UAAU,GAAG;AAAET,EAAAA,IAAI,EAAJA,IAAI;AAAEO,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICkCpBG,6BAA6B,GAAG,SAAhCA,6BAA6BA,CAAIT,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;IAESU,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAIb,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;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export { default as UpiConnect } from './UpiConnect.js';
|
|
|
13
13
|
export { default as UpiPayment } from './UpiPayment.js';
|
|
14
14
|
export { default as useRazorpayPayment } from './useRazorpayPayment.js';
|
|
15
15
|
export { default as useStripePromise } from './useStripePromise.js';
|
|
16
|
+
export { default as RecurringPaymentSettings } from './RecurringPaymentSettings.js';
|
|
16
17
|
export { C as CURRENCY_OPTIONS, b as buildStripeTransactionLink } from './index-Cl511Juk.js';
|
|
17
18
|
import { n } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
18
19
|
import '@babel/runtime/helpers/slicedToArray';
|
|
@@ -51,13 +52,13 @@ import '@bigbinary/neeto-molecules/TableWrapper';
|
|
|
51
52
|
import '@bigbinary/neetoui/Table';
|
|
52
53
|
import '@bigbinary/neetoui/NoData';
|
|
53
54
|
import '@bigbinary/neetoui/Spinner';
|
|
54
|
-
import './queryConstants-
|
|
55
|
+
import './queryConstants-CqEabttJ.js';
|
|
55
56
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
56
57
|
import '@bigbinary/neetoui/Alert';
|
|
57
58
|
import './ExportModal-BkWscSJE.js';
|
|
58
|
-
import './useConnectApi-
|
|
59
|
+
import './useConnectApi-0JizTABG.js';
|
|
59
60
|
import 'qs';
|
|
60
|
-
import './usePlatformApi-
|
|
61
|
+
import './usePlatformApi-BUUkJvaH.js';
|
|
61
62
|
import 'react-router-dom/cjs/react-router-dom';
|
|
62
63
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
63
64
|
import '@babel/runtime/regenerator';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18,8 +18,9 @@ var QUERY_KEYS = {
|
|
|
18
18
|
PAYMENTS_LIST: "payments-list",
|
|
19
19
|
SPLIT_TRANSFERS_LIST: "split-transfers-list",
|
|
20
20
|
SPLIT_TRANSFERS_DETAILS: "split-transfers-details",
|
|
21
|
-
TAXES: "taxes"
|
|
21
|
+
TAXES: "taxes",
|
|
22
|
+
RECURRING_SETTINGS: "recurring-settings"
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export { QUERY_KEYS as Q };
|
|
25
|
-
//# sourceMappingURL=queryConstants-
|
|
26
|
+
//# sourceMappingURL=queryConstants-CqEabttJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryConstants-CqEabttJ.js","sources":["../app/javascript/src/common/queryConstants.js"],"sourcesContent":["export const QUERY_KEYS = {\n STRIPE_ACCOUNT_DETAILS: \"stripe-account-details\",\n STRIPE_PLATFORM_ACCOUNT_DETAILS: \"stripe-platform-account-details\",\n TRANSACTIONS_LIST: \"transactions-list\",\n PLATFORM_TRANSACTIONS_LIST: \"platform-transactions-list\",\n PAYMENTS_FILTER_OPTIONS: \"payments-filter-options\",\n REFUNDS_LIST: \"refunds-list\",\n SPLITS_LIST: \"platform-splits-list\",\n CONNECTED_ACCOUNT: \"connected-account\",\n STRIPE_ACCOUNTS_LIST: \"stripe-accounts-list\",\n STRIPE_PLATFORM_TRANSACTION: \"stripe-platform-transaction\",\n STRIPE_REFUNDS_LIST: \"stripe-refunds-list\",\n STRIPE_PAYOUTS_LIST: \"stripe-payouts-list\",\n STRIPE_PAYOUT: \"stripe-payout\",\n RAZORPAY_PAYMENTS_LIST: \"razorpay-payment-list\",\n RAZORPAY_ACCOUNT_DETAILS: \"razorpay-account-details\",\n V2_PAYMENTS: \"v2-payments\",\n PAYMENTS_LIST: \"payments-list\",\n SPLIT_TRANSFERS_LIST: \"split-transfers-list\",\n SPLIT_TRANSFERS_DETAILS: \"split-transfers-details\",\n TAXES: \"taxes\",\n RECURRING_SETTINGS: \"recurring-settings\",\n};\n"],"names":["QUERY_KEYS","STRIPE_ACCOUNT_DETAILS","STRIPE_PLATFORM_ACCOUNT_DETAILS","TRANSACTIONS_LIST","PLATFORM_TRANSACTIONS_LIST","PAYMENTS_FILTER_OPTIONS","REFUNDS_LIST","SPLITS_LIST","CONNECTED_ACCOUNT","STRIPE_ACCOUNTS_LIST","STRIPE_PLATFORM_TRANSACTION","STRIPE_REFUNDS_LIST","STRIPE_PAYOUTS_LIST","STRIPE_PAYOUT","RAZORPAY_PAYMENTS_LIST","RAZORPAY_ACCOUNT_DETAILS","V2_PAYMENTS","PAYMENTS_LIST","SPLIT_TRANSFERS_LIST","SPLIT_TRANSFERS_DETAILS","TAXES","RECURRING_SETTINGS"],"mappings":"AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,sBAAsB,EAAE,wBAAwB;AAChDC,EAAAA,+BAA+B,EAAE,iCAAiC;AAClEC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,WAAW,EAAE,sBAAsB;AACnCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,2BAA2B,EAAE,6BAA6B;AAC1DC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,sBAAsB,EAAE,uBAAuB;AAC/CC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,kBAAkB,EAAE;AACtB;;;;"}
|
|
@@ -5,7 +5,7 @@ import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/r
|
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import { B as BASE_URL } from './index-Cl511Juk.js';
|
|
7
7
|
import 'qs';
|
|
8
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
8
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
9
9
|
|
|
10
10
|
var show$1 = function show(holdableId) {
|
|
11
11
|
return axios.get("".concat(BASE_URL, "/api/v1/stripe/holdable/").concat(holdableId, "/account"));
|
|
@@ -103,4 +103,4 @@ var useCreateStripeAccount = function useCreateStripeAccount(_ref3) {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
export { useShowStripePayout as a, useCreateStripeAccount as b, usePollingStripeAccountCreationStatus as c, useFetchConnectedStripeAccount as d, useDestroyStripeAccount as e, usePollingStripeAccount as f, useFetchStripePayouts as u };
|
|
106
|
-
//# sourceMappingURL=useConnectApi-
|
|
106
|
+
//# sourceMappingURL=useConnectApi-0JizTABG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConnectApi-
|
|
1
|
+
{"version":3,"file":"useConnectApi-0JizTABG.js","sources":["../app/javascript/src/apis/stripe/holdables/accounts.js","../app/javascript/src/apis/stripe/holdables/payouts.js","../app/javascript/src/hooks/reactQuery/stripe/useConnectApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst show = holdableId =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/${holdableId}/account`);\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/stripe/accounts`, payload);\n\nconst creationStatus = jobId =>\n axios.get(`${BASE_URL}/api/v1/stripe/accounts/${jobId}/creation_status`);\n\nconst destroy = accountId =>\n axios.delete(`${BASE_URL}/api/v1/stripe/accounts/${accountId}`);\n\nconst accountsApi = { show, create, creationStatus, destroy };\n\nexport default accountsApi;\n","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"],"names":["show","holdableId","axios","get","concat","BASE_URL","create","payload","post","creationStatus","jobId","destroy","accountId","accountsApi","list","params","id","payoutsApi","useFetchConnectedStripeAccount","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","CONNECTED_ACCOUNT","queryFn","useFetchStripePayouts","STRIPE_PAYOUTS_LIST","useShowStripePayout","STRIPE_PAYOUT","usePollingStripeAccount","_ref","refetchInterval","STRIPE_ACCOUNT_DETAILS","usePollingStripeAccountCreationStatus","useDestroyStripeAccount","_ref2","onSuccess","useMutationWithInvalidation","keysToInvalidate","useCreateStripeAccount","_ref3"],"mappings":";;;;;;;;;AAIA,IAAMA,MAAI,GAAG,SAAPA,IAAIA,CAAGC,UAAU,EAAA;AAAA,EAAA,OACrBC,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,QAAQ,EAAA,0BAAA,CAAA,CAAAD,MAAA,CAA2BH,UAAU,EAAA,UAAA,CAAU,CAAC;AAAA,CAAA;AAEvE,IAAMK,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;EAAA,OACpBL,KAAK,CAACM,IAAI,CAAA,EAAA,CAAAJ,MAAA,CAAIC,QAAQ,EAA2BE,yBAAAA,CAAAA,EAAAA,OAAO,CAAC;AAAA,CAAA;AAE3D,IAAME,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,KAAK,EAAA;AAAA,EAAA,OAC1BR,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,QAAQ,EAAA,0BAAA,CAAA,CAAAD,MAAA,CAA2BM,KAAK,EAAA,kBAAA,CAAkB,CAAC;AAAA,CAAA;AAE1E,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAGC,SAAS,EAAA;EAAA,OACvBV,KAAK,CAAO,QAAA,CAAA,CAAA,EAAA,CAAAE,MAAA,CAAIC,QAAQ,EAAA,0BAAA,CAAA,CAAAD,MAAA,CAA2BQ,SAAS,CAAE,CAAC;AAAA,CAAA;AAEjE,IAAMC,WAAW,GAAG;AAAEb,EAAAA,IAAI,EAAJA,MAAI;AAAEM,EAAAA,MAAM,EAANA,MAAM;AAAEG,EA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AAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,UAAU,CAACU,sBAAsB,EAAE1B,KAAK,CAAC;IACpDkB,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,MAAA,OAAQf,WAAW,CAACJ,cAAc,CAACC,KAAK,CAAC;AAAA;GAC7CS,EAAAA,OAAO,CACX,CAAC;AAAA;IAESmB,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAAC,KAAA,EAAA;AAAA,EAAA,IAAMC,SAAS,GAAAD,KAAA,CAATC,SAAS;IAAEvC,UAAU,GAAAsC,KAAA,CAAVtC,UAAU;AAAA,EAAA,OAC7DwC,2BAA2B,CAAC5B,WAAW,CAACF,OAAO,EAAE;AAC/C+B,IAAAA,gBAAgB,EAAE,CAChB,CAAChB,UAAU,CAACU,sBAAsB,CAAC,EACnC,CAACV,UAAU,CAACC,iBAAiB,EAAE1B,UAAU,CAAC,CAC3C;AACDuC,IAAAA,SAAS,EAATA;AACF,GAAC,CAAC;AAAA;IAESG,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,KAAA,EAAA;AAAA,EAAA,IAAMJ,SAAS,GAAAI,KAAA,CAATJ,SAAS;AAAA,EAAA,OAChDC,2BAA2B,CAAC5B,WAAW,CAACP,MAAM,EAAE;AAC9CoC,IAAAA,gBAAgB,EAAE,CAAC,CAAChB,UAAU,CAACU,sBAAsB,CAAC,CAAC;AACvDI,IAAAA,SAAS,EAATA;AACF,GAAC,CAAC;AAAA;;;;"}
|
|
@@ -3,7 +3,7 @@ import { useQuery } from '@tanstack/react-query';
|
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import 'qs';
|
|
5
5
|
import { B as BASE_URL } from './index-Cl511Juk.js';
|
|
6
|
-
import { Q as QUERY_KEYS } from './queryConstants-
|
|
6
|
+
import { Q as QUERY_KEYS } from './queryConstants-CqEabttJ.js';
|
|
7
7
|
|
|
8
8
|
var list = function list(payload) {
|
|
9
9
|
return axios.get("".concat(BASE_URL, "/api/v1/stripe_platform/payouts"), {
|
|
@@ -40,4 +40,4 @@ var useShowStripePlatformPayout = function useShowStripePlatformPayout(id) {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export { useShowStripePlatformPayout as a, useFetchStripePlatformPayouts as u };
|
|
43
|
-
//# sourceMappingURL=usePlatformApi-
|
|
43
|
+
//# sourceMappingURL=usePlatformApi-BUUkJvaH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePlatformApi-
|
|
1
|
+
{"version":3,"file":"usePlatformApi-BUUkJvaH.js","sources":["../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_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","useFetchStripePlatformPayouts","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_PAYOUTS_LIST","queryFn","useShowStripePlatformPayout","STRIPE_PAYOUT"],"mappings":";;;;;;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAClBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,QAAQ,EAAmC,iCAAA,CAAA,EAAA;AAAEC,IAAAA,MAAM,EAAEL;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE9E,IAAMM,IAAI,GAAG,SAAPA,IAAIA,CAAGC,EAAE,EAAA;AAAA,EAAA,OACbN,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,QAAQ,EAAA,kCAAA,CAAA,CAAAD,MAAA,CAAmCI,EAAE,CAAE,CAAC;AAAA,CAAA;AAE/D,IAAMC,UAAU,GAAG;AAAET,EAAAA,IAAI,EAAJA,IAAI;AAAEO,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICkCpBG,6BAA6B,GAAG,SAAhCA,6BAA6BA,CAAIT,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,QAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,UAAU,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;IAESU,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAIb,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,QAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,UAAU,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;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queryConstants-Chzd1Qaa.js","sources":["../../app/javascript/src/common/queryConstants.js"],"sourcesContent":["export const QUERY_KEYS = {\n STRIPE_ACCOUNT_DETAILS: \"stripe-account-details\",\n STRIPE_PLATFORM_ACCOUNT_DETAILS: \"stripe-platform-account-details\",\n TRANSACTIONS_LIST: \"transactions-list\",\n PLATFORM_TRANSACTIONS_LIST: \"platform-transactions-list\",\n PAYMENTS_FILTER_OPTIONS: \"payments-filter-options\",\n REFUNDS_LIST: \"refunds-list\",\n SPLITS_LIST: \"platform-splits-list\",\n CONNECTED_ACCOUNT: \"connected-account\",\n STRIPE_ACCOUNTS_LIST: \"stripe-accounts-list\",\n STRIPE_PLATFORM_TRANSACTION: \"stripe-platform-transaction\",\n STRIPE_REFUNDS_LIST: \"stripe-refunds-list\",\n STRIPE_PAYOUTS_LIST: \"stripe-payouts-list\",\n STRIPE_PAYOUT: \"stripe-payout\",\n RAZORPAY_PAYMENTS_LIST: \"razorpay-payment-list\",\n RAZORPAY_ACCOUNT_DETAILS: \"razorpay-account-details\",\n V2_PAYMENTS: \"v2-payments\",\n PAYMENTS_LIST: \"payments-list\",\n SPLIT_TRANSFERS_LIST: \"split-transfers-list\",\n SPLIT_TRANSFERS_DETAILS: \"split-transfers-details\",\n TAXES: \"taxes\",\n};\n"],"names":["QUERY_KEYS","STRIPE_ACCOUNT_DETAILS","STRIPE_PLATFORM_ACCOUNT_DETAILS","TRANSACTIONS_LIST","PLATFORM_TRANSACTIONS_LIST","PAYMENTS_FILTER_OPTIONS","REFUNDS_LIST","SPLITS_LIST","CONNECTED_ACCOUNT","STRIPE_ACCOUNTS_LIST","STRIPE_PLATFORM_TRANSACTION","STRIPE_REFUNDS_LIST","STRIPE_PAYOUTS_LIST","STRIPE_PAYOUT","RAZORPAY_PAYMENTS_LIST","RAZORPAY_ACCOUNT_DETAILS","V2_PAYMENTS","PAYMENTS_LIST","SPLIT_TRANSFERS_LIST","SPLIT_TRANSFERS_DETAILS","TAXES"],"mappings":";;AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,sBAAsB,EAAE,wBAAwB;AAChDC,EAAAA,+BAA+B,EAAE,iCAAiC;AAClEC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,WAAW,EAAE,sBAAsB;AACnCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,2BAA2B,EAAE,6BAA6B;AAC1DC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,sBAAsB,EAAE,uBAAuB;AAC/CC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,KAAK,EAAE;AACT;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queryConstants-BNBPsZPA.js","sources":["../app/javascript/src/common/queryConstants.js"],"sourcesContent":["export const QUERY_KEYS = {\n STRIPE_ACCOUNT_DETAILS: \"stripe-account-details\",\n STRIPE_PLATFORM_ACCOUNT_DETAILS: \"stripe-platform-account-details\",\n TRANSACTIONS_LIST: \"transactions-list\",\n PLATFORM_TRANSACTIONS_LIST: \"platform-transactions-list\",\n PAYMENTS_FILTER_OPTIONS: \"payments-filter-options\",\n REFUNDS_LIST: \"refunds-list\",\n SPLITS_LIST: \"platform-splits-list\",\n CONNECTED_ACCOUNT: \"connected-account\",\n STRIPE_ACCOUNTS_LIST: \"stripe-accounts-list\",\n STRIPE_PLATFORM_TRANSACTION: \"stripe-platform-transaction\",\n STRIPE_REFUNDS_LIST: \"stripe-refunds-list\",\n STRIPE_PAYOUTS_LIST: \"stripe-payouts-list\",\n STRIPE_PAYOUT: \"stripe-payout\",\n RAZORPAY_PAYMENTS_LIST: \"razorpay-payment-list\",\n RAZORPAY_ACCOUNT_DETAILS: \"razorpay-account-details\",\n V2_PAYMENTS: \"v2-payments\",\n PAYMENTS_LIST: \"payments-list\",\n SPLIT_TRANSFERS_LIST: \"split-transfers-list\",\n SPLIT_TRANSFERS_DETAILS: \"split-transfers-details\",\n TAXES: \"taxes\",\n};\n"],"names":["QUERY_KEYS","STRIPE_ACCOUNT_DETAILS","STRIPE_PLATFORM_ACCOUNT_DETAILS","TRANSACTIONS_LIST","PLATFORM_TRANSACTIONS_LIST","PAYMENTS_FILTER_OPTIONS","REFUNDS_LIST","SPLITS_LIST","CONNECTED_ACCOUNT","STRIPE_ACCOUNTS_LIST","STRIPE_PLATFORM_TRANSACTION","STRIPE_REFUNDS_LIST","STRIPE_PAYOUTS_LIST","STRIPE_PAYOUT","RAZORPAY_PAYMENTS_LIST","RAZORPAY_ACCOUNT_DETAILS","V2_PAYMENTS","PAYMENTS_LIST","SPLIT_TRANSFERS_LIST","SPLIT_TRANSFERS_DETAILS","TAXES"],"mappings":"AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,sBAAsB,EAAE,wBAAwB;AAChDC,EAAAA,+BAA+B,EAAE,iCAAiC;AAClEC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,WAAW,EAAE,sBAAsB;AACnCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,2BAA2B,EAAE,6BAA6B;AAC1DC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,sBAAsB,EAAE,uBAAuB;AAC/CC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,KAAK,EAAE;AACT;;;;"}
|