@bigbinary/neeto-payments-frontend 3.3.42 → 3.3.44
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/README.md +16 -0
- package/app/javascript/src/translations/en.json +2 -1
- package/dist/AccountsDashboard.js +3 -3
- package/dist/AdminCancelRecurringPaymentButton.js +1 -1
- package/dist/CashPaymentButton.js +2 -2
- package/dist/ConfirmCashPaymentButton.js +2 -2
- package/dist/ConfirmUpiPaymentButton.js +2 -2
- package/dist/CustomerCancelRecurringPaymentForm.js +1 -1
- package/dist/{ExportModal-DT0vcTac.js → ExportModal-2djdthM7.js} +2 -2
- package/dist/{ExportModal-DT0vcTac.js.map → ExportModal-2djdthM7.js.map} +1 -1
- package/dist/ManualUpiPaymentConfirmButton.js +1 -1
- package/dist/PaymentsDashboard.js +2 -2
- package/dist/PayoutsDashboard.js +4 -4
- package/dist/PayoutsPage.js +3 -3
- package/dist/RazorpayPaymentButton.js +2 -2
- package/dist/RecurringPaymentSettings.js +1 -1
- package/dist/RefundsDashboard.js +2 -2
- package/dist/SplitTransfersDashboard.js +2 -2
- package/dist/TaxesDashboard.js +1 -1
- package/dist/UpiPayment.js +13 -5
- package/dist/UpiPayment.js.map +1 -1
- package/dist/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/AccountsDashboard.js +3 -3
- package/dist/cjs/AdminCancelRecurringPaymentButton.js +1 -1
- package/dist/cjs/CashPaymentButton.js +2 -2
- package/dist/cjs/ConfirmCashPaymentButton.js +2 -2
- package/dist/cjs/ConfirmUpiPaymentButton.js +2 -2
- package/dist/cjs/CustomerCancelRecurringPaymentForm.js +1 -1
- package/dist/cjs/{ExportModal-DHYiDlh7.js → ExportModal-z366OQyN.js} +2 -2
- package/dist/cjs/{ExportModal-DHYiDlh7.js.map → ExportModal-z366OQyN.js.map} +1 -1
- package/dist/cjs/ManualUpiPaymentConfirmButton.js +1 -1
- package/dist/cjs/PaymentsDashboard.js +2 -2
- package/dist/cjs/PayoutsDashboard.js +4 -4
- package/dist/cjs/PayoutsPage.js +3 -3
- package/dist/cjs/RazorpayPaymentButton.js +2 -2
- package/dist/cjs/RecurringPaymentSettings.js +1 -1
- package/dist/cjs/RefundsDashboard.js +2 -2
- package/dist/cjs/SplitTransfersDashboard.js +2 -2
- package/dist/cjs/TaxesDashboard.js +1 -1
- package/dist/cjs/UpiPayment.js +13 -5
- package/dist/cjs/UpiPayment.js.map +1 -1
- package/dist/cjs/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/constants.js +1 -1
- package/dist/cjs/{dashboard-Xb5zQInQ.js → dashboard-CQCrzFcH.js} +2 -2
- package/dist/cjs/{dashboard-Xb5zQInQ.js.map → dashboard-CQCrzFcH.js.map} +1 -1
- package/dist/cjs/getAmountInSmallestCurrencyUnit.js +1 -1
- package/dist/cjs/{index-BXQqCPIU.js → index-CoBBp8NP.js} +14 -4
- package/dist/cjs/index-CoBBp8NP.js.map +1 -0
- package/dist/cjs/index.js +9 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{renderFunctions-ChnAUwcP.js → renderFunctions-BaqyaETJ.js} +2 -2
- package/dist/cjs/{renderFunctions-ChnAUwcP.js.map → renderFunctions-BaqyaETJ.js.map} +1 -1
- package/dist/cjs/{usePaymentApi-IBjhCSrY.js → usePaymentApi-BTPgjDgT.js} +2 -2
- package/dist/cjs/{usePaymentApi-IBjhCSrY.js.map → usePaymentApi-BTPgjDgT.js.map} +1 -1
- package/dist/cjs/{usePaymentApi-DTeHYEjG.js → usePaymentApi-CigXqjGO.js} +2 -2
- package/dist/cjs/{usePaymentApi-DTeHYEjG.js.map → usePaymentApi-CigXqjGO.js.map} +1 -1
- package/dist/cjs/{usePaymentsApi-CW2I4NuQ.js → usePaymentsApi-BxDCCkJG.js} +2 -2
- package/dist/cjs/{usePaymentsApi-CW2I4NuQ.js.map → usePaymentsApi-BxDCCkJG.js.map} +1 -1
- package/dist/cjs/{usePlatformApi-CNcOdGla.js → usePlatformApi-D2xaAzAB.js} +2 -2
- package/dist/cjs/{usePlatformApi-CNcOdGla.js.map → usePlatformApi-D2xaAzAB.js.map} +1 -1
- package/dist/cjs/useRazorpayPayment.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/{dashboard-H1FaB24l.js → dashboard-DproHHm8.js} +2 -2
- package/dist/{dashboard-H1FaB24l.js.map → dashboard-DproHHm8.js.map} +1 -1
- package/dist/getAmountInSmallestCurrencyUnit.js +1 -1
- package/dist/{index-DxhI_gau.js → index-B8sMgAJf.js} +14 -5
- package/dist/index-B8sMgAJf.js.map +1 -0
- package/dist/index.js +8 -8
- package/dist/{renderFunctions-DtoDuKzR.js → renderFunctions-ItUfH5JI.js} +2 -2
- package/dist/{renderFunctions-DtoDuKzR.js.map → renderFunctions-ItUfH5JI.js.map} +1 -1
- package/dist/{usePaymentApi-D7fqImzK.js → usePaymentApi-DZyR7nXa.js} +2 -2
- package/dist/{usePaymentApi-D7fqImzK.js.map → usePaymentApi-DZyR7nXa.js.map} +1 -1
- package/dist/{usePaymentApi-Dy3Swac-.js → usePaymentApi-Dx7TqD66.js} +2 -2
- package/dist/{usePaymentApi-Dy3Swac-.js.map → usePaymentApi-Dx7TqD66.js.map} +1 -1
- package/dist/{usePaymentsApi-BwF1E4GX.js → usePaymentsApi-K_RR3pey.js} +2 -2
- package/dist/{usePaymentsApi-BwF1E4GX.js.map → usePaymentsApi-K_RR3pey.js.map} +1 -1
- package/dist/{usePlatformApi-IdRP9TJl.js → usePlatformApi-CUchLb4Z.js} +2 -2
- package/dist/{usePlatformApi-IdRP9TJl.js.map → usePlatformApi-CUchLb4Z.js.map} +1 -1
- package/dist/useRazorpayPayment.js +2 -2
- package/package.json +1 -1
- package/dist/cjs/index-BXQqCPIU.js.map +0 -1
- package/dist/index-DxhI_gau.js.map +0 -1
package/README.md
CHANGED
|
@@ -611,6 +611,22 @@ Import components into your React application as needed.
|
|
|
611
611
|
getFormattedAmount([{ kind: "percentage", value: 23 }], "39.59", true); // → "48.69"
|
|
612
612
|
```
|
|
613
613
|
|
|
614
|
+
1. `getFormattedTaxAmount({ amount, taxes=[]})`
|
|
615
|
+
|
|
616
|
+
Returns the total tax amount as a **string**, truncated to **2 decimal places**
|
|
617
|
+
|
|
618
|
+
#### Parameter keys
|
|
619
|
+
- `amount`: The base amount on which tax will be calculated
|
|
620
|
+
- `taxes`: List of tax objects with `value` and `kind` (`"percentage"` or `"fixed"`). Defaults is `[]`
|
|
621
|
+
|
|
622
|
+
#### Returns:
|
|
623
|
+
- `string`: Total tax amount with up to 2 decimal places (truncated, not rounded).
|
|
624
|
+
|
|
625
|
+
#### Example:
|
|
626
|
+
```js
|
|
627
|
+
getFormattedTaxAmount([{ kind: "percentage", value: 23 }], "100"); // → "23.00"
|
|
628
|
+
```
|
|
629
|
+
|
|
614
630
|
|
|
615
631
|
### 6. Others
|
|
616
632
|
```
|
|
@@ -393,7 +393,8 @@
|
|
|
393
393
|
"nameRequired": "Name is required",
|
|
394
394
|
"kindRequired": "Kind is required",
|
|
395
395
|
"valueRequired": "Value is required",
|
|
396
|
-
"invalidField": "{{entity, anyCase}} is invalid"
|
|
396
|
+
"invalidField": "{{entity, anyCase}} is invalid",
|
|
397
|
+
"length": "Must be {{length}} digits"
|
|
397
398
|
},
|
|
398
399
|
"razorpay": {
|
|
399
400
|
"loadError": "Failed to load Razorpay!!"
|
|
@@ -9,20 +9,20 @@ import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
|
|
|
9
9
|
import Tab from '@bigbinary/neetoui/Tab';
|
|
10
10
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
|
-
import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-
|
|
12
|
+
import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-DproHHm8.js';
|
|
13
13
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
14
14
|
import Download from '@bigbinary/neeto-icons/Download';
|
|
15
15
|
import Button from '@bigbinary/neetoui/Button';
|
|
16
16
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
17
17
|
import { e as exportChannel } from './exportChannel-CViICC6x.js';
|
|
18
|
-
import { u as uuidV4,
|
|
18
|
+
import { u as uuidV4, f as buildStripeAccountLink, D as DEFAULT_SORT_PROPERTIES, B as BASE_URL, S as SORT_DIRECTIONS } from './index-B8sMgAJf.js';
|
|
19
19
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
20
20
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
21
21
|
import { getQueryParams, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
22
22
|
import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
23
23
|
import { pipe, split, map, join, mergeLeft, assoc } from 'ramda';
|
|
24
24
|
import { useHistory } from 'react-router-dom';
|
|
25
|
-
import { r as renderStatus, a as renderFullName, b as renderDate } from './renderFunctions-
|
|
25
|
+
import { r as renderStatus, a as renderFullName, b as renderDate } from './renderFunctions-ItUfH5JI.js';
|
|
26
26
|
import { C as CopyButtonWrapper } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
27
27
|
import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from '@bigbinary/neeto-commons-frontend/constants';
|
|
28
28
|
import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
|
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
7
7
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
8
8
|
import axios from 'axios';
|
|
9
|
-
import { B as BASE_URL } from './index-
|
|
9
|
+
import { B as BASE_URL } from './index-B8sMgAJf.js';
|
|
10
10
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
11
|
import 'i18next';
|
|
12
12
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { noop } from '@bigbinary/neeto-cist';
|
|
2
2
|
import Button from '@bigbinary/neetoui/Button';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { u as useCreateCashPayment } from './usePaymentApi-
|
|
4
|
+
import { u as useCreateCashPayment } from './usePaymentApi-DZyR7nXa.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import '@babel/runtime/helpers/defineProperty';
|
|
7
7
|
import '@tanstack/react-query';
|
|
8
8
|
import 'axios';
|
|
9
|
-
import './index-
|
|
9
|
+
import './index-B8sMgAJf.js';
|
|
10
10
|
import 'i18next';
|
|
11
11
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
12
12
|
import 'decimal.js';
|
|
@@ -8,12 +8,12 @@ import Form from '@bigbinary/neetoui/formik/Form';
|
|
|
8
8
|
import Textarea from '@bigbinary/neetoui/formik/Textarea';
|
|
9
9
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import { a as useUpdateCashPayment } from './usePaymentApi-
|
|
11
|
+
import { a as useUpdateCashPayment } from './usePaymentApi-DZyR7nXa.js';
|
|
12
12
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
13
13
|
import '@babel/runtime/helpers/defineProperty';
|
|
14
14
|
import '@tanstack/react-query';
|
|
15
15
|
import 'axios';
|
|
16
|
-
import './index-
|
|
16
|
+
import './index-B8sMgAJf.js';
|
|
17
17
|
import 'i18next';
|
|
18
18
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
19
19
|
import 'decimal.js';
|
|
@@ -10,14 +10,14 @@ import Select from '@bigbinary/neetoui/formik/Select';
|
|
|
10
10
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
11
11
|
import { mergeLeft } from 'ramda';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
|
-
import { u as useUpdateUpiPayment } from './usePaymentsApi-
|
|
13
|
+
import { u as useUpdateUpiPayment } from './usePaymentsApi-K_RR3pey.js';
|
|
14
14
|
import { t } from 'i18next';
|
|
15
15
|
import * as yup from 'yup';
|
|
16
16
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
17
17
|
import '@babel/runtime/helpers/defineProperty';
|
|
18
18
|
import '@tanstack/react-query';
|
|
19
19
|
import 'axios';
|
|
20
|
-
import './index-
|
|
20
|
+
import './index-B8sMgAJf.js';
|
|
21
21
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
22
22
|
import 'decimal.js';
|
|
23
23
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
@@ -6,7 +6,7 @@ import Button from '@bigbinary/neetoui/formik/Button';
|
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
8
8
|
import axios from 'axios';
|
|
9
|
-
import { B as BASE_URL } from './index-
|
|
9
|
+
import { B as BASE_URL } from './index-B8sMgAJf.js';
|
|
10
10
|
import { useQuery } from '@tanstack/react-query';
|
|
11
11
|
import { isNotNil } from 'ramda';
|
|
12
12
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
@@ -10,7 +10,7 @@ import { mergeLeft } from 'ramda';
|
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
11
|
import { useMutation } from '@tanstack/react-query';
|
|
12
12
|
import axios from 'axios';
|
|
13
|
-
import { B as BASE_URL, u as uuidV4 } from './index-
|
|
13
|
+
import { B as BASE_URL, u as uuidV4 } from './index-B8sMgAJf.js';
|
|
14
14
|
import { e as exportChannel } from './exportChannel-CViICC6x.js';
|
|
15
15
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
16
16
|
|
|
@@ -128,4 +128,4 @@ var ExportModal = function ExportModal(_ref) {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
export { ExportModal as E };
|
|
131
|
-
//# sourceMappingURL=ExportModal-
|
|
131
|
+
//# sourceMappingURL=ExportModal-2djdthM7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportModal-
|
|
1
|
+
{"version":3,"file":"ExportModal-2djdthM7.js","sources":["../app/javascript/src/apis/exports.js","../app/javascript/src/hooks/reactQuery/useExportsApi.js","../app/javascript/src/components/Common/ExportModal.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(\n `${BASE_URL}/api/v1/exports`,\n { export: payload },\n { showToastr: false }\n );\n\nconst exportsApi = { create };\n\nexport default exportsApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport exportsApi from \"apis/exports\";\n\nexport const useExportsData = () =>\n useMutation({ mutationFn: exportsApi.create });\n","import { useEffect, useMemo, useState } from \"react\";\n\nimport { isPresent, camelToSnakeCase } from \"neetocist\";\nimport { getQueryParams } from \"neetocommons/utils\";\nimport { Download } from \"neetoicons\";\nimport { Button, Modal, Typography } from \"neetoui\";\nimport { mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useExportsData } from \"hooks/reactQuery/useExportsApi\";\nimport exportChannel from \"src/channels/exportChannel\";\nimport { uuidV4 } from \"utils\";\n\nconst ExportModal = ({\n filters,\n dashboardKind,\n holdableIds,\n sortProperties,\n isExportModalOpen,\n setIsExportModalOpen,\n}) => {\n const { t } = useTranslation();\n const [downloadUrl, setDownloadUrl] = useState(\"\");\n const [isGenerating, setIsGenerating] = useState(false);\n\n const { tab = \"all\" } = getQueryParams();\n\n const { mutate: exportsData } = useExportsData();\n\n const token = useMemo(\n () => `${dashboardKind}-report-${uuidV4()}`,\n [dashboardKind]\n );\n\n const receivedCallback = data => {\n if (!data.download_url) return;\n setDownloadUrl(data.download_url);\n setIsGenerating(false);\n };\n\n useEffect(() => {\n if (isExportModalOpen) {\n const channel = exportChannel(token, receivedCallback);\n setDownloadUrl(\"\");\n setIsGenerating(false);\n\n return () => {\n channel.disconnected();\n };\n }\n\n return undefined;\n }, [isExportModalOpen, token]);\n\n const onClose = () => setIsExportModalOpen(false);\n\n const handleExport = () => {\n setDownloadUrl(\"\");\n setIsGenerating(true);\n const payload = mergeLeft(sortProperties, {\n token,\n filters,\n tab,\n holdableIds,\n dashboard: camelToSnakeCase(dashboardKind),\n });\n\n exportsData(payload);\n };\n\n return (\n <Modal {...{ onClose }} isOpen={isExportModalOpen}>\n <Modal.Header>\n <Typography style=\"h2\">\n {t(`neetoPayments.export.title.${dashboardKind}`)}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n {isGenerating ? (\n <Typography style=\"body2\">\n {t(\"neetoPayments.export.pleaseWait\")}\n </Typography>\n ) : (\n <Typography style=\"body2\">\n {isPresent(downloadUrl)\n ? t(\"neetoPayments.export.fileReady\")\n : t(`neetoPayments.export.download.${dashboardKind}`)}\n </Typography>\n )}\n </Modal.Body>\n <Modal.Footer className=\"space-x-2\">\n {isPresent(downloadUrl) ? (\n <Button\n href={downloadUrl}\n icon={Download}\n label={t(\"neetoPayments.common.download\")}\n onClick={onClose}\n />\n ) : (\n <>\n <Button\n disabled={isGenerating}\n label={t(\"neetoPayments.common.cancel\")}\n style=\"tertiary\"\n onClick={onClose}\n />\n <Button\n disabled={isGenerating}\n label={t(\"neetoPayments.common.export\")}\n loading={isGenerating}\n onClick={handleExport}\n />\n </>\n )}\n </Modal.Footer>\n </Modal>\n );\n};\n\nexport default ExportModal;\n"],"names":["create","payload","axios","post","concat","BASE_URL","showToastr","exportsApi","useExportsData","useMutation","mutationFn","ExportModal","_ref","filters","dashboardKind","holdableIds","sortProperties","isExportModalOpen","setIsExportModalOpen","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","downloadUrl","setDownloadUrl","_useState3","_useState4","isGenerating","setIsGenerating","_getQueryParams","getQueryParams","_getQueryParams$tab","tab","_useExportsData","exportsData","mutate","token","useMemo","uuidV4","receivedCallback","data","download_url","useEffect","channel","exportChannel","disconnected","undefined","onClose","handleExport","mergeLeft","dashboard","camelToSnakeCase","_jsxs","Modal","isOpen","children","_jsx","Header","Typography","style","Body","isPresent","Footer","className","Button","href","icon","Download","label","onClick","_Fragment","disabled","loading"],"mappings":";;;;;;;;;;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CACLC,QAAQ,EACX,iBAAA,CAAA,EAAA;IAAE,QAAQJ,EAAAA;AAAQ,GAAC,EACnB;AAAEK,IAAAA,UAAU,EAAE;AAAM,GACtB,CAAC;AAAA,CAAA;AAEH,IAAMC,UAAU,GAAG;AAAEP,EAAAA,MAAM,EAANA;AAAO,CAAC;;ACPtB,IAAMQ,cAAc,GAAG,SAAjBA,cAAcA,GAAA;AAAA,EAAA,OACzBC,WAAW,CAAC;IAAEC,UAAU,EAAEH,UAAU,CAACP;AAAO,GAAC,CAAC;AAAA,CAAA;;ACQhD,IAAMW,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAOX;AAAA,EAAA,IANJC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,aAAa,GAAAF,IAAA,CAAbE,aAAa;IACbC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,iBAAiB,GAAAL,IAAA,CAAjBK,iBAAiB;IACjBC,oBAAoB,GAAAN,IAAA,CAApBM,oBAAoB;AAEpB,EAAA,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;AACT,EAAA,IAAAC,SAAA,GAAsCC,QAAQ,CAAC,EAAE,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAA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AACC,QAAAA,KAAK,EAAC,OAAO;AAAAJ,QAAAA,QAAA,EACtBM,SAAS,CAACtC,WAAW,CAAC,GACnBL,CAAC,CAAC,gCAAgC,CAAC,GACnCA,CAAC,CAAA,gCAAA,CAAAjB,MAAA,CAAkCU,aAAa,CAAE;OAC5C;AACb,KACS,CAAC,eACb6C,GAAA,CAACH,KAAK,CAACS,MAAM,EAAA;AAACC,MAAAA,SAAS,EAAC,WAAW;MAAAR,QAAA,EAChCM,SAAS,CAACtC,WAAW,CAAC,gBACrBiC,GAAA,CAACQ,MAAM,EAAA;AACLC,QAAAA,IAAI,EAAE1C,WAAY;AAClB2C,QAAAA,IAAI,EAAEC,QAAS;AACfC,QAAAA,KAAK,EAAElD,CAAC,CAAC,+BAA+B,CAAE;AAC1CmD,QAAAA,OAAO,EAAEtB;AAAQ,OAClB,CAAC,gBAEFK,IAAA,CAAAkB,QAAA,EAAA;QAAAf,QAAA,EAAA,cACEC,GAAA,CAACQ,MAAM,EAAA;AACLO,UAAAA,QAAQ,EAAE5C,YAAa;AACvByC,UAAAA,KAAK,EAAElD,CAAC,CAAC,6BAA6B,CAAE;AACxCyC,UAAAA,KAAK,EAAC,UAAU;AAChBU,UAAAA,OAAO,EAAEtB;AAAQ,SAClB,CAAC,eACFS,GAAA,CAACQ,MAAM,EAAA;AACLO,UAAAA,QAAQ,EAAE5C,YAAa;AACvByC,UAAAA,KAAK,EAAElD,CAAC,CAAC,6BAA6B,CAAE;AACxCsD,UAAAA,OAAO,EAAE7C,YAAa;AACtB0C,UAAAA,OAAO,EAAErB;AAAa,SACvB,CAAC;OACF;AACH,KACW,CAAC;AAAA,GACV,CAAC;AAEZ;;;;"}
|
|
@@ -14,7 +14,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
14
14
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
15
15
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
16
16
|
import axios from 'axios';
|
|
17
|
-
import { B as BASE_URL } from './index-
|
|
17
|
+
import { B as BASE_URL } from './index-B8sMgAJf.js';
|
|
18
18
|
import { t } from 'i18next';
|
|
19
19
|
import * as yup from 'yup';
|
|
20
20
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -8,10 +8,10 @@ import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
|
8
8
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
9
9
|
import { map, curry, concat, mergeDeepWith, mergeLeft, reject, isNil, prop, isEmpty, modify } from 'ramda';
|
|
10
10
|
import { useHistory } from 'react-router-dom';
|
|
11
|
-
import { E as ExportModal } from './ExportModal-
|
|
11
|
+
import { E as ExportModal } from './ExportModal-2djdthM7.js';
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import axios from 'axios';
|
|
14
|
-
import { B as BASE_URL, P as PAYMENT_PROVIDERS,
|
|
14
|
+
import { B as BASE_URL, P as PAYMENT_PROVIDERS, h as DEFAULT_TAG_STYLE, i as formatAmount, j as formatCurrency, k as getUniquePaymentProviders, l as buildDefaultTableColumns, S as SORT_DIRECTIONS, p as processDataIndex, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, m as DEFAULT_PAGE_VALUES, n as DASHBOARD_KIND } from './index-B8sMgAJf.js';
|
|
15
15
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
16
16
|
import { t } from 'i18next';
|
|
17
17
|
import { toLabelAndValue, isNotPresent, snakeToCamelCase, humanize, isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
|
package/dist/PayoutsDashboard.js
CHANGED
|
@@ -8,13 +8,13 @@ import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
|
|
|
8
8
|
import Tab from '@bigbinary/neetoui/Tab';
|
|
9
9
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-
|
|
11
|
+
import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-DproHHm8.js';
|
|
12
12
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
13
13
|
import Download from '@bigbinary/neeto-icons/Download';
|
|
14
14
|
import Button from '@bigbinary/neetoui/Button';
|
|
15
15
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
16
16
|
import { e as exportChannel } from './exportChannel-CViICC6x.js';
|
|
17
|
-
import { u as uuidV4, D as DEFAULT_SORT_PROPERTIES$1, S as SORT_DIRECTIONS } from './index-
|
|
17
|
+
import { u as uuidV4, D as DEFAULT_SORT_PROPERTIES$1, S as SORT_DIRECTIONS } from './index-B8sMgAJf.js';
|
|
18
18
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
19
19
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
20
20
|
import { camelToSnakeCase, removeBy, snakeToCamelCase, isPresent } from '@bigbinary/neeto-cist';
|
|
@@ -22,7 +22,7 @@ import { buildUrl, getQueryParams } from '@bigbinary/neeto-commons-frontend/util
|
|
|
22
22
|
import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
23
23
|
import { curry, assoc, insert, mergeLeft } from 'ramda';
|
|
24
24
|
import { useHistory } from 'react-router-dom';
|
|
25
|
-
import { r as renderStatus, b as renderDate } from './renderFunctions-
|
|
25
|
+
import { r as renderStatus, b as renderDate } from './renderFunctions-ItUfH5JI.js';
|
|
26
26
|
import { C as CopyButtonWrapper } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
27
27
|
import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from '@bigbinary/neeto-commons-frontend/constants';
|
|
28
28
|
import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
|
@@ -30,7 +30,7 @@ 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, a as useFetchStripePlatformPayouts } from './usePlatformApi-
|
|
33
|
+
import { u as useFetchStripePayouts, a as useFetchStripePlatformPayouts } from './usePlatformApi-CUchLb4Z.js';
|
|
34
34
|
import '@tanstack/react-query';
|
|
35
35
|
import '@tanstack/react-query-devtools';
|
|
36
36
|
import 'axios';
|
package/dist/PayoutsPage.js
CHANGED
|
@@ -4,11 +4,11 @@ import Spinner from '@bigbinary/neetoui/Spinner';
|
|
|
4
4
|
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
|
-
import { r as renderStatus, b as renderDate } from './renderFunctions-
|
|
8
|
-
import { b as useShowStripePayout, c as useShowStripePlatformPayout } from './usePlatformApi-
|
|
7
|
+
import { r as renderStatus, b as renderDate } from './renderFunctions-ItUfH5JI.js';
|
|
8
|
+
import { b as useShowStripePayout, c as useShowStripePlatformPayout } from './usePlatformApi-CUchLb4Z.js';
|
|
9
9
|
import Button from '@bigbinary/neetoui/Button';
|
|
10
10
|
import { C as CopyButtonWrapper } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
11
|
-
import {
|
|
11
|
+
import { o as buildStripePayoutLink } from './index-B8sMgAJf.js';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
import 'i18next';
|
|
14
14
|
import '@bigbinary/neeto-molecules/DateFormat';
|
|
@@ -4,8 +4,8 @@ import { noop, findBy, isNotPresent } from '@bigbinary/neeto-cist';
|
|
|
4
4
|
import Button from '@bigbinary/neetoui/Button';
|
|
5
5
|
import { mergeDeepLeft } from 'ramda';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { u as useCreateRazorpayPayment } from './usePaymentApi-
|
|
8
|
-
import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-
|
|
7
|
+
import { u as useCreateRazorpayPayment } from './usePaymentApi-Dx7TqD66.js';
|
|
8
|
+
import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-B8sMgAJf.js';
|
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
|
10
10
|
import '@babel/runtime/helpers/defineProperty';
|
|
11
11
|
import '@tanstack/react-query';
|
|
@@ -14,7 +14,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
14
14
|
import { useQuery } from '@tanstack/react-query';
|
|
15
15
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
16
16
|
import axios from 'axios';
|
|
17
|
-
import { B as BASE_URL } from './index-
|
|
17
|
+
import { B as BASE_URL } from './index-B8sMgAJf.js';
|
|
18
18
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
19
19
|
import { t } from 'i18next';
|
|
20
20
|
import * as yup from 'yup';
|
package/dist/RefundsDashboard.js
CHANGED
|
@@ -8,10 +8,10 @@ import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
|
8
8
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
9
9
|
import { map, curry, mergeDeepWith, concat, mergeLeft, reject, isNil, prop, isEmpty, modify } from 'ramda';
|
|
10
10
|
import { useHistory } from 'react-router-dom';
|
|
11
|
-
import { E as ExportModal } from './ExportModal-
|
|
11
|
+
import { E as ExportModal } from './ExportModal-2djdthM7.js';
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import axios from 'axios';
|
|
14
|
-
import { B as BASE_URL, P as PAYMENT_PROVIDERS,
|
|
14
|
+
import { B as BASE_URL, P as PAYMENT_PROVIDERS, h as DEFAULT_TAG_STYLE, i as formatAmount, j as formatCurrency, l 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, m as DEFAULT_PAGE_VALUES, n as DASHBOARD_KIND } from './index-B8sMgAJf.js';
|
|
15
15
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
16
16
|
import { t } from 'i18next';
|
|
17
17
|
import { toLabelAndValue, snakeToCamelCase, humanize, isPresent, isNotPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
|
|
@@ -8,11 +8,11 @@ import { buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend/utils';
|
|
|
8
8
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
9
9
|
import { mergeLeft, curry, mergeDeepWith, concat, reject, isNil, map, prop, sortBy, isEmpty, modify, pluck } from 'ramda';
|
|
10
10
|
import { useHistory } from 'react-router-dom';
|
|
11
|
-
import { E as ExportModal } from './ExportModal-
|
|
11
|
+
import { E as ExportModal } from './ExportModal-2djdthM7.js';
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
14
14
|
import axios from 'axios';
|
|
15
|
-
import { B as BASE_URL,
|
|
15
|
+
import { B as BASE_URL, q as preProcessStatus, r as getTagStyle, i as formatAmount, j as formatCurrency, t as PAYMENT_KIND, p as processDataIndex, S as SORT_DIRECTIONS, D as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, m as DEFAULT_PAGE_VALUES, n as DASHBOARD_KIND } from './index-B8sMgAJf.js';
|
|
16
16
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
17
17
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
18
18
|
import Typography from '@bigbinary/neetoui/Typography';
|
package/dist/TaxesDashboard.js
CHANGED
|
@@ -15,7 +15,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
15
15
|
import { useQuery } from '@tanstack/react-query';
|
|
16
16
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
17
17
|
import axios from 'axios';
|
|
18
|
-
import { B as BASE_URL } from './index-
|
|
18
|
+
import { B as BASE_URL } from './index-B8sMgAJf.js';
|
|
19
19
|
import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
|
|
20
20
|
import Label from '@bigbinary/neetoui/Label';
|
|
21
21
|
import Typography from '@bigbinary/neetoui/Typography';
|
package/dist/UpiPayment.js
CHANGED
|
@@ -7,23 +7,29 @@ import Input from '@bigbinary/neetoui/formik/Input';
|
|
|
7
7
|
import QRCodeImage from 'qrcode.react';
|
|
8
8
|
import { pluck } from 'ramda';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
|
-
import { a as useCreateUpiPayment } from './usePaymentsApi-
|
|
10
|
+
import { a as useCreateUpiPayment } from './usePaymentsApi-K_RR3pey.js';
|
|
11
11
|
import { t } from 'i18next';
|
|
12
12
|
import * as yup from 'yup';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
import '@tanstack/react-query';
|
|
15
15
|
import 'axios';
|
|
16
|
-
import './index-
|
|
16
|
+
import './index-B8sMgAJf.js';
|
|
17
17
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
18
18
|
import 'decimal.js';
|
|
19
19
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
20
20
|
|
|
21
21
|
var VALIDATION_SCHEMA = yup.object({
|
|
22
|
-
identifier: yup.
|
|
22
|
+
identifier: yup.number().typeError(t("neetoPayments.validations.invalidField", {
|
|
23
|
+
entity: t("neetoPayments.common.transactionId")
|
|
24
|
+
})).required(t("neetoPayments.upi.payment.transaction.required")).test("is-integer", t("neetoPayments.validations.invalidField", {
|
|
23
25
|
entity: t("neetoPayments.common.transactionId")
|
|
24
26
|
}), function (value) {
|
|
25
27
|
return Number.isInteger(value);
|
|
26
|
-
}).
|
|
28
|
+
}).test("len", t("neetoPayments.validations.length", {
|
|
29
|
+
length: 6
|
|
30
|
+
}), function (value) {
|
|
31
|
+
return (value === null || value === void 0 ? void 0 : value.toString().length) === 6;
|
|
32
|
+
})
|
|
27
33
|
});
|
|
28
34
|
|
|
29
35
|
var vpaIdToQrCodeValue = function vpaIdToQrCodeValue(vpaId) {
|
|
@@ -72,6 +78,7 @@ var UpiPayment = function UpiPayment(_ref) {
|
|
|
72
78
|
initialValues: {
|
|
73
79
|
identifier: ""
|
|
74
80
|
},
|
|
81
|
+
enableReinitialize: true,
|
|
75
82
|
validationSchema: VALIDATION_SCHEMA
|
|
76
83
|
},
|
|
77
84
|
children: function children(_ref2) {
|
|
@@ -105,7 +112,8 @@ var UpiPayment = function UpiPayment(_ref) {
|
|
|
105
112
|
required: true,
|
|
106
113
|
label: t("neetoPayments.upi.payment.transaction.label"),
|
|
107
114
|
name: "identifier",
|
|
108
|
-
placeholder: t("neetoPayments.upi.payment.transaction.placeholder")
|
|
115
|
+
placeholder: t("neetoPayments.upi.payment.transaction.placeholder"),
|
|
116
|
+
type: "number"
|
|
109
117
|
}), /*#__PURE__*/jsx(ActionBlock, {
|
|
110
118
|
cancelButtonProps: {
|
|
111
119
|
label: t("neetoPayments.upi.payment.buttons.back"),
|
package/dist/UpiPayment.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpiPayment.js","sources":["../app/javascript/src/components/UpiPayment/constants.js","../app/javascript/src/components/UpiPayment/utils.js","../app/javascript/src/components/UpiPayment/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const VALIDATION_SCHEMA = yup.object({\n identifier: yup\n .
|
|
1
|
+
{"version":3,"file":"UpiPayment.js","sources":["../app/javascript/src/components/UpiPayment/constants.js","../app/javascript/src/components/UpiPayment/utils.js","../app/javascript/src/components/UpiPayment/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const VALIDATION_SCHEMA = yup.object({\n identifier: yup\n .number()\n .typeError(\n t(\"neetoPayments.validations.invalidField\", {\n entity: t(\"neetoPayments.common.transactionId\"),\n })\n )\n .required(t(\"neetoPayments.upi.payment.transaction.required\"))\n .test(\n \"is-integer\",\n t(\"neetoPayments.validations.invalidField\", {\n entity: t(\"neetoPayments.common.transactionId\"),\n }),\n value => Number.isInteger(value)\n )\n .test(\n \"len\",\n t(\"neetoPayments.validations.length\", { length: 6 }),\n value => value?.toString().length === 6\n ),\n});\n","export const vpaIdToQrCodeValue = vpaId => `upi://pay?pa=${vpaId}`;\n","import { noop, isPresent } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport { ActionBlock, Form, Input } from \"neetoui/formik\";\nimport QRCodeImage from \"qrcode.react\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateUpiPayment } from \"hooks/reactQuery/upi/usePaymentsApi\";\n\nimport { VALIDATION_SCHEMA } from \"./constants\";\nimport { vpaIdToQrCodeValue } from \"./utils\";\n\nconst UpiPayment = ({\n fee,\n payableId,\n discountCode,\n customAmount,\n handleCancel,\n payableType = null,\n onBeforePayment = noop,\n onFailedPayment = noop,\n onSuccessfulPayment = noop,\n}) => {\n const { t } = useTranslation();\n\n const vpaIds = pluck(\"address\", fee?.vpas);\n\n const { isPending, mutate: createPayment } = useCreateUpiPayment({\n onSuccess: onSuccessfulPayment,\n onError: onFailedPayment,\n });\n\n const handleSubmit = values => {\n onBeforePayment();\n const payload = {\n ...values,\n payableId,\n customAmount,\n payableType,\n discountCode,\n };\n createPayment(payload);\n };\n\n return (\n <Form\n className=\"space-y-4\"\n formikProps={{\n onSubmit: handleSubmit,\n initialValues: { identifier: \"\" },\n enableReinitialize: true,\n validationSchema: VALIDATION_SCHEMA,\n }}\n >\n {({ dirty }) => (\n <>\n <Typography style=\"body1\">\n {t(\"neetoPayments.upi.payment.vpaText\", { count: vpaIds.length })}\n </Typography>\n {isPresent(vpaIds) && (\n <div className=\"grid grid-cols-1 gap-8 gap-y-4 sm:grid-cols-2\">\n {vpaIds.map(vpaId => (\n <div\n className=\"flex flex-col items-center justify-center\"\n key={vpaId}\n >\n <QRCodeImage\n size={256}\n style={{ width: 80, height: 80 }}\n value={vpaIdToQrCodeValue(vpaId)}\n />\n <Typography\n className=\"w-full mt-2 text-center break-words\"\n style=\"body2\"\n >\n {vpaId}\n </Typography>\n </div>\n ))}\n </div>\n )}\n <Input\n required\n label={t(\"neetoPayments.upi.payment.transaction.label\")}\n name=\"identifier\"\n placeholder={t(\"neetoPayments.upi.payment.transaction.placeholder\")}\n type=\"number\"\n />\n <ActionBlock\n cancelButtonProps={{\n label: t(\"neetoPayments.upi.payment.buttons.back\"),\n onClick: handleCancel,\n disabled: isPending,\n }}\n submitButtonProps={{\n label: t(\"neetoPayments.upi.payment.buttons.submit\"),\n disabled: !dirty || isPending,\n loading: isPending,\n }}\n />\n </>\n )}\n </Form>\n );\n};\n\nexport default UpiPayment;\n"],"names":["VALIDATION_SCHEMA","yup","object","identifier","number","typeError","t","entity","required","test","value","Number","isInteger","length","toString","vpaIdToQrCodeValue","vpaId","concat","UpiPayment","_ref","fee","payableId","discountCode","customAmount","handleCancel","_ref$payableType","payableType","_ref$onBeforePayment","onBeforePayment","noop","_ref$onFailedPayment","onFailedPayment","_ref$onSuccessfulPaym","onSuccessfulPayment","_useTranslation","useTranslation","vpaIds","pluck","vpas","_useCreateUpiPayment","useCreateUpiPayment","onSuccess","onError","isPending","createPayment","mutate","handleSubmit","values","payload","_objectSpread","_jsx","Form","className","formikProps","onSubmit","initialValues","enableReinitialize","validationSchema","children","_ref2","dirty","_jsxs","_Fragment","Typography","style","count","isPresent","map","QRCodeImage","size","width","height","Input","label","name","placeholder","type","ActionBlock","cancelButtonProps","onClick","disabled","submitButtonProps","loading"],"mappings":";;;;;;;;;;;;;;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gBAAAA,QAAA,EAEZ1C;AAAK,eACI,CAAC;AAAA,aAAA,EAZRA,KAaF,CAAC;WACP;AAAC,SACC,CACN,eACDkC,GAAA,CAACsB,KAAK,EAAA;UACJhE,QAAQ,EAAA,IAAA;AACRiE,UAAAA,KAAK,EAAEnE,CAAC,CAAC,6CAA6C,CAAE;AACxDoE,UAAAA,IAAI,EAAC,YAAY;AACjBC,UAAAA,WAAW,EAAErE,CAAC,CAAC,mDAAmD,CAAE;AACpEsE,UAAAA,IAAI,EAAC;AAAQ,SACd,CAAC,eACF1B,GAAA,CAAC2B,WAAW,EAAA;AACVC,UAAAA,iBAAiB,EAAE;AACjBL,YAAAA,KAAK,EAAEnE,CAAC,CAAC,wCAAwC,CAAC;AAClDyE,YAAAA,OAAO,EAAEvD,YAAY;AACrBwD,YAAAA,QAAQ,EAAErC;WACV;AACFsC,UAAAA,iBAAiB,EAAE;AACjBR,YAAAA,KAAK,EAAEnE,CAAC,CAAC,0CAA0C,CAAC;AACpD0E,YAAAA,QAAQ,EAAE,CAACpB,KAAK,IAAIjB,SAAS;AAC7BuC,YAAAA,OAAO,EAAEvC;AACX;AAAE,SACH,CAAC;AAAA,OACF,CAAC;AAAA;AACJ,GACG,CAAC;AAEX;;;;"}
|
|
@@ -11,20 +11,20 @@ var SubHeader = require('@bigbinary/neeto-molecules/SubHeader');
|
|
|
11
11
|
var Tab = require('@bigbinary/neetoui/Tab');
|
|
12
12
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
13
13
|
var reactI18next = require('react-i18next');
|
|
14
|
-
var dashboard = require('./dashboard-
|
|
14
|
+
var dashboard = require('./dashboard-CQCrzFcH.js');
|
|
15
15
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
16
16
|
var Download = require('@bigbinary/neeto-icons/Download');
|
|
17
17
|
var Button = require('@bigbinary/neetoui/Button');
|
|
18
18
|
var Modal = require('@bigbinary/neetoui/Modal');
|
|
19
19
|
var exportChannel = require('./exportChannel-BsZ3fusx.js');
|
|
20
|
-
var constants = require('./index-
|
|
20
|
+
var constants = require('./index-CoBBp8NP.js');
|
|
21
21
|
var jsxRuntime = require('react/jsx-runtime');
|
|
22
22
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
23
23
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
24
24
|
var utils$1 = require('@bigbinary/neeto-filters-frontend/utils');
|
|
25
25
|
var ramda = require('ramda');
|
|
26
26
|
var reactRouterDom = require('react-router-dom');
|
|
27
|
-
var renderFunctions = require('./renderFunctions-
|
|
27
|
+
var renderFunctions = require('./renderFunctions-BaqyaETJ.js');
|
|
28
28
|
var CopyButtonWrapper = require('./CopyButtonWrapper-Ds1k64E0.js');
|
|
29
29
|
var constants$1 = require('@bigbinary/neeto-commons-frontend/constants');
|
|
30
30
|
var Columns = require('@bigbinary/neeto-molecules/Columns');
|
|
@@ -8,7 +8,7 @@ var reactI18next = require('react-i18next');
|
|
|
8
8
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
9
9
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
10
10
|
var axios = require('axios');
|
|
11
|
-
var constants = require('./index-
|
|
11
|
+
var constants = require('./index-CoBBp8NP.js');
|
|
12
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
13
|
require('i18next');
|
|
14
14
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
4
|
var Button = require('@bigbinary/neetoui/Button');
|
|
5
5
|
var reactI18next = require('react-i18next');
|
|
6
|
-
var usePaymentApi = require('./usePaymentApi-
|
|
6
|
+
var usePaymentApi = require('./usePaymentApi-CigXqjGO.js');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
require('@babel/runtime/helpers/defineProperty');
|
|
9
9
|
require('@tanstack/react-query');
|
|
10
10
|
require('axios');
|
|
11
|
-
require('./index-
|
|
11
|
+
require('./index-CoBBp8NP.js');
|
|
12
12
|
require('i18next');
|
|
13
13
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
14
14
|
require('decimal.js');
|
|
@@ -10,12 +10,12 @@ var Form = require('@bigbinary/neetoui/formik/Form');
|
|
|
10
10
|
var Textarea = require('@bigbinary/neetoui/formik/Textarea');
|
|
11
11
|
var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
|
|
12
12
|
var reactI18next = require('react-i18next');
|
|
13
|
-
var usePaymentApi = require('./usePaymentApi-
|
|
13
|
+
var usePaymentApi = require('./usePaymentApi-CigXqjGO.js');
|
|
14
14
|
var jsxRuntime = require('react/jsx-runtime');
|
|
15
15
|
require('@babel/runtime/helpers/defineProperty');
|
|
16
16
|
require('@tanstack/react-query');
|
|
17
17
|
require('axios');
|
|
18
|
-
require('./index-
|
|
18
|
+
require('./index-CoBBp8NP.js');
|
|
19
19
|
require('i18next');
|
|
20
20
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
21
21
|
require('decimal.js');
|
|
@@ -12,14 +12,14 @@ var Select = require('@bigbinary/neetoui/formik/Select');
|
|
|
12
12
|
var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
|
|
13
13
|
var ramda = require('ramda');
|
|
14
14
|
var reactI18next = require('react-i18next');
|
|
15
|
-
var usePaymentsApi = require('./usePaymentsApi-
|
|
15
|
+
var usePaymentsApi = require('./usePaymentsApi-BxDCCkJG.js');
|
|
16
16
|
var i18next = require('i18next');
|
|
17
17
|
var yup = require('yup');
|
|
18
18
|
var jsxRuntime = require('react/jsx-runtime');
|
|
19
19
|
require('@babel/runtime/helpers/defineProperty');
|
|
20
20
|
require('@tanstack/react-query');
|
|
21
21
|
require('axios');
|
|
22
|
-
require('./index-
|
|
22
|
+
require('./index-CoBBp8NP.js');
|
|
23
23
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
24
24
|
require('decimal.js');
|
|
25
25
|
require('@bigbinary/neeto-commons-frontend/utils');
|
|
@@ -8,7 +8,7 @@ var Button = require('@bigbinary/neetoui/formik/Button');
|
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
9
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
10
10
|
var axios = require('axios');
|
|
11
|
-
var constants = require('./index-
|
|
11
|
+
var constants = require('./index-CoBBp8NP.js');
|
|
12
12
|
var reactQuery = require('@tanstack/react-query');
|
|
13
13
|
var ramda = require('ramda');
|
|
14
14
|
var queryConstants = require('./queryConstants-DGg4cX3r.js');
|
|
@@ -12,7 +12,7 @@ var ramda = require('ramda');
|
|
|
12
12
|
var reactI18next = require('react-i18next');
|
|
13
13
|
var reactQuery = require('@tanstack/react-query');
|
|
14
14
|
var axios = require('axios');
|
|
15
|
-
var constants = require('./index-
|
|
15
|
+
var constants = require('./index-CoBBp8NP.js');
|
|
16
16
|
var exportChannel = require('./exportChannel-BsZ3fusx.js');
|
|
17
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
18
18
|
|
|
@@ -130,4 +130,4 @@ var ExportModal = function ExportModal(_ref) {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
exports.ExportModal = ExportModal;
|
|
133
|
-
//# sourceMappingURL=ExportModal-
|
|
133
|
+
//# sourceMappingURL=ExportModal-z366OQyN.js.map
|