@bigbinary/neeto-payments-frontend 6.0.6 → 6.0.7-beta
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/ar.json +2 -1
- package/app/javascript/src/translations/bg.json +2 -1
- package/app/javascript/src/translations/ca.json +2 -1
- package/app/javascript/src/translations/cs.json +2 -1
- package/app/javascript/src/translations/da.json +2 -1
- package/app/javascript/src/translations/de.json +2 -1
- package/app/javascript/src/translations/es-MX.json +2 -1
- package/app/javascript/src/translations/es.json +2 -1
- package/app/javascript/src/translations/et.json +2 -1
- package/app/javascript/src/translations/fi.json +2 -1
- package/app/javascript/src/translations/fil.json +2 -1
- package/app/javascript/src/translations/fr.json +2 -1
- package/app/javascript/src/translations/hi.json +2 -1
- package/app/javascript/src/translations/hr.json +2 -1
- package/app/javascript/src/translations/id.json +2 -1
- package/app/javascript/src/translations/it.json +2 -1
- package/app/javascript/src/translations/ja.json +2 -1
- package/app/javascript/src/translations/ko.json +2 -1
- package/app/javascript/src/translations/nl.json +2 -1
- package/app/javascript/src/translations/pl.json +2 -1
- package/app/javascript/src/translations/pt-BR.json +2 -1
- package/app/javascript/src/translations/pt.json +2 -1
- package/app/javascript/src/translations/ro.json +2 -1
- package/app/javascript/src/translations/ru.json +2 -1
- package/app/javascript/src/translations/sk.json +2 -1
- package/app/javascript/src/translations/sl.json +2 -1
- package/app/javascript/src/translations/sv.json +2 -1
- package/app/javascript/src/translations/th.json +2 -1
- package/app/javascript/src/translations/tr.json +2 -1
- package/app/javascript/src/translations/uk.json +2 -1
- package/app/javascript/src/translations/vi.json +2 -1
- package/app/javascript/src/translations/zh-CN.json +2 -1
- package/app/javascript/src/translations/zh-TW.json +2 -1
- package/dist/AccountsDashboard.js +8 -5
- package/dist/AccountsDashboard.js.map +1 -1
- package/dist/AdminCancelRecurringPaymentButton.js +1 -1
- package/dist/CashPaymentButton.js +2 -2
- package/dist/ConfirmCashPaymentButton.js +2 -2
- package/dist/{CopyButtonWrapper-B79WRogM.js → CopyButtonWrapper-SoJkwX-d.js} +2 -2
- package/dist/CopyButtonWrapper-SoJkwX-d.js.map +1 -0
- package/dist/CustomerCancelRecurringPaymentForm.js +1 -1
- package/dist/{ExportModal-DaLJ7KS6.js → ExportModal-BnP3xriD.js} +5 -2
- package/dist/ExportModal-BnP3xriD.js.map +1 -0
- package/dist/ManualUpiConnect.js +1 -1
- package/dist/ManualUpiPayment.js +3 -3
- package/dist/ManualUpiPayment.js.map +1 -1
- package/dist/ManualUpiPaymentConfirmButton.js +2 -2
- package/dist/ManualUpiPaymentRejectButton.js +2 -2
- package/dist/PaymentsDashboard.js +3 -3
- package/dist/PayoutsDashboard.js +8 -5
- package/dist/PayoutsDashboard.js.map +1 -1
- package/dist/PayoutsPage.js +4 -4
- package/dist/RazorpayConnect.js +2 -2
- package/dist/RazorpayLinkedAccountForm.js +1 -1
- package/dist/RazorpayPaymentButton.js +2 -2
- package/dist/RecurringPaymentSettings.js +1 -1
- package/dist/RefundsDashboard.js +3 -3
- package/dist/SplitTransfersDashboard.js +3 -3
- package/dist/StripeCheckoutSetting.js +1 -1
- package/dist/StripeConnect.js +4 -4
- package/dist/StripeConnect.js.map +1 -1
- package/dist/StripeManage.js +1 -1
- package/dist/TaxesDashboard.js +3 -3
- package/dist/TaxesDashboard.js.map +1 -1
- package/dist/buildStripeTransactionLink.js +1 -1
- package/dist/cjs/AccountsDashboard.js +5 -2
- package/dist/cjs/AccountsDashboard.js.map +1 -1
- package/dist/cjs/{CopyButtonWrapper-CzQmYDby.js → CopyButtonWrapper-Ds1k64E0.js} +2 -1
- package/dist/cjs/CopyButtonWrapper-Ds1k64E0.js.map +1 -0
- package/dist/cjs/{ExportModal-DUdQLJXl.js → ExportModal-BmHgt24q.js} +4 -1
- package/dist/cjs/ExportModal-BmHgt24q.js.map +1 -0
- package/dist/cjs/ManualUpiPayment.js +1 -1
- package/dist/cjs/ManualUpiPayment.js.map +1 -1
- package/dist/cjs/PaymentsDashboard.js +2 -2
- package/dist/cjs/PayoutsDashboard.js +5 -2
- package/dist/cjs/PayoutsDashboard.js.map +1 -1
- package/dist/cjs/PayoutsPage.js +2 -2
- package/dist/cjs/RefundsDashboard.js +2 -2
- package/dist/cjs/SplitTransfersDashboard.js +2 -2
- package/dist/cjs/StripeConnect.js +1 -1
- package/dist/cjs/StripeConnect.js.map +1 -1
- package/dist/cjs/TaxesDashboard.js +2 -2
- package/dist/cjs/TaxesDashboard.js.map +1 -1
- package/dist/cjs/index.js +6 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{renderFunctions-JphAGmIF.js → renderFunctions-ydTbw8WO.js} +2 -2
- package/dist/cjs/{renderFunctions-JphAGmIF.js.map → renderFunctions-ydTbw8WO.js.map} +1 -1
- package/dist/constants.js +1 -1
- package/dist/{dashboard-lpUpsbOR.js → dashboard-Dn2TZTXF.js} +2 -2
- package/dist/{dashboard-lpUpsbOR.js.map → dashboard-Dn2TZTXF.js.map} +1 -1
- package/dist/getAddressElementOptions.js +1 -1
- package/dist/getAmountInSmallestCurrencyUnit.js +1 -1
- package/dist/getAmountWithAppliedTax.js +1 -1
- package/dist/getFormattedAmount.js +1 -1
- package/dist/getFormattedDiscountedAmount.js +1 -1
- package/dist/getFormattedDiscountedPercentage.js +1 -1
- package/dist/getFormattedTaxAmount.js +1 -1
- package/dist/getFormattedTipAmount.js +1 -1
- package/dist/getQrCodeValue.js +1 -1
- package/dist/getTaxAmount.js +1 -1
- package/dist/getTipAmount.js +1 -1
- package/dist/hasAmountToPay.js +1 -1
- package/dist/{index-DWY7rHan.js → index-Xdf4XpRc.js} +2 -2
- package/dist/{index-DWY7rHan.js.map → index-Xdf4XpRc.js.map} +1 -1
- package/dist/index.js +15 -12
- package/dist/index.js.map +1 -1
- package/dist/{renderFunctions-DeEeLQ1Y.js → renderFunctions-BCW1POD1.js} +4 -4
- package/dist/{renderFunctions-DeEeLQ1Y.js.map → renderFunctions-BCW1POD1.js.map} +1 -1
- package/dist/{useAccountsApi-PGoHDLyL.js → useAccountsApi-qzNkKYfX.js} +2 -2
- package/dist/{useAccountsApi-PGoHDLyL.js.map → useAccountsApi-qzNkKYfX.js.map} +1 -1
- package/dist/{useIntegrationsApi-C_P6r2ww.js → useIntegrationsApi-DkA7eXBT.js} +2 -2
- package/dist/{useIntegrationsApi-C_P6r2ww.js.map → useIntegrationsApi-DkA7eXBT.js.map} +1 -1
- package/dist/{usePaymentApi-CsmrKZsE.js → usePaymentApi-B1qMca2A.js} +2 -2
- package/dist/{usePaymentApi-CsmrKZsE.js.map → usePaymentApi-B1qMca2A.js.map} +1 -1
- package/dist/{usePaymentApi-Db-yN9mj.js → usePaymentApi-D8FEXicG.js} +2 -2
- package/dist/{usePaymentApi-Db-yN9mj.js.map → usePaymentApi-D8FEXicG.js.map} +1 -1
- package/dist/{usePaymentApi-DhLuImJj.js → usePaymentApi-jZmkutky.js} +2 -2
- package/dist/{usePaymentApi-DhLuImJj.js.map → usePaymentApi-jZmkutky.js.map} +1 -1
- package/dist/{usePlatformApi-DBENGjOP.js → usePlatformApi-0sGcYfsx.js} +3 -3
- package/dist/{usePlatformApi-DBENGjOP.js.map → usePlatformApi-0sGcYfsx.js.map} +1 -1
- package/dist/useRazorpayPayment.js +2 -2
- package/package.json +12 -11
- package/dist/CopyButtonWrapper-B79WRogM.js.map +0 -1
- package/dist/ExportModal-DaLJ7KS6.js.map +0 -1
- package/dist/cjs/CopyButtonWrapper-CzQmYDby.js.map +0 -1
- package/dist/cjs/ExportModal-DUdQLJXl.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -23,7 +23,8 @@ export { default as StripeManage } from './StripeManage.js';
|
|
|
23
23
|
export { default as TaxesDashboard } from './TaxesDashboard.js';
|
|
24
24
|
export { default as useRazorpayPayment } from './useRazorpayPayment.js';
|
|
25
25
|
export { default as useStripePromise } from './useStripePromise.js';
|
|
26
|
-
export {
|
|
26
|
+
export { I as CURRENCY_OPTIONS, b as buildStripeTransactionLink, H as getAddressElementOptions, g as getAmountInSmallestCurrencyUnit, z as getAmountWithAppliedTax, a as getFormattedAmount, C as getFormattedDiscountedAmount, F as getFormattedDiscountedPercentage, c as getFormattedTaxAmount, e as getFormattedTipAmount, k as getQrCodeValue, f as getTaxAmount, d as getTipAmount, G as hasAmountToPay } from './index-Xdf4XpRc.js';
|
|
27
|
+
import { n } from './CopyButtonWrapper-SoJkwX-d.js';
|
|
27
28
|
import '@babel/runtime/helpers/slicedToArray';
|
|
28
29
|
import 'react';
|
|
29
30
|
import 'i18next';
|
|
@@ -35,7 +36,7 @@ import '@bigbinary/neeto-molecules/SubHeader';
|
|
|
35
36
|
import '@bigbinary/neetoui/Tab';
|
|
36
37
|
import '@bigbinary/neetoui/Typography';
|
|
37
38
|
import 'react-i18next';
|
|
38
|
-
import './dashboard-
|
|
39
|
+
import './dashboard-Dn2TZTXF.js';
|
|
39
40
|
import '@babel/runtime/helpers/defineProperty';
|
|
40
41
|
import '@tanstack/react-query';
|
|
41
42
|
import '@tanstack/react-query-devtools';
|
|
@@ -51,21 +52,21 @@ import '@bigbinary/neetoui/Modal';
|
|
|
51
52
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
52
53
|
import '@bigbinary/neeto-filters-frontend/utils';
|
|
53
54
|
import 'react-router-dom';
|
|
54
|
-
import './renderFunctions-
|
|
55
|
+
import './renderFunctions-BCW1POD1.js';
|
|
55
56
|
import '@bigbinary/neeto-molecules/DateFormat';
|
|
56
57
|
import '@bigbinary/neetoui/Tag';
|
|
57
58
|
import '@bigbinary/neetoui/Tooltip';
|
|
58
59
|
import '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
59
|
-
import './CopyButtonWrapper-B79WRogM.js';
|
|
60
60
|
import '@bigbinary/neeto-molecules/Columns';
|
|
61
61
|
import '@bigbinary/neeto-molecules/TableWrapper';
|
|
62
62
|
import '@bigbinary/neetoui/Table';
|
|
63
63
|
import '@bigbinary/neetoui/NoData';
|
|
64
64
|
import '@bigbinary/neetoui/Spinner';
|
|
65
|
-
import './useAccountsApi-
|
|
65
|
+
import './useAccountsApi-qzNkKYfX.js';
|
|
66
66
|
import './queryConstants-DFKKEEo0.js';
|
|
67
|
+
import 'decimal.js';
|
|
67
68
|
import '@bigbinary/neetoui/Alert';
|
|
68
|
-
import './usePaymentApi-
|
|
69
|
+
import './usePaymentApi-jZmkutky.js';
|
|
69
70
|
import '@bigbinary/neetoui/formik/Form';
|
|
70
71
|
import '@bigbinary/neetoui/formik/Textarea';
|
|
71
72
|
import '@bigbinary/neetoui/formik/ActionBlock';
|
|
@@ -75,22 +76,22 @@ import '@bigbinary/neetoui/formik/Input';
|
|
|
75
76
|
import 'yup';
|
|
76
77
|
import '@bigbinary/neeto-molecules/MoreDropdown';
|
|
77
78
|
import 'qrcode.react';
|
|
78
|
-
import './usePaymentApi-
|
|
79
|
+
import './usePaymentApi-B1qMca2A.js';
|
|
79
80
|
import '@bigbinary/neetoui/formik/Select';
|
|
80
81
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
81
|
-
import './ExportModal-
|
|
82
|
-
import './usePlatformApi-
|
|
82
|
+
import './ExportModal-BnP3xriD.js';
|
|
83
|
+
import './usePlatformApi-0sGcYfsx.js';
|
|
83
84
|
import 'qs';
|
|
84
85
|
import 'react-router-dom/cjs/react-router-dom';
|
|
85
86
|
import '@bigbinary/neeto-icons/misc/Razorpay';
|
|
86
87
|
import '@bigbinary/neeto-molecules/Container';
|
|
87
88
|
import '@bigbinary/neetoui/Callout';
|
|
88
|
-
import './useIntegrationsApi-
|
|
89
|
+
import './useIntegrationsApi-DkA7eXBT.js';
|
|
89
90
|
import '@bigbinary/neeto-molecules/PhoneNumber';
|
|
90
91
|
import '@bigbinary/neetoui/Label';
|
|
91
92
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
92
93
|
import '@babel/runtime/regenerator';
|
|
93
|
-
import './usePaymentApi-
|
|
94
|
+
import './usePaymentApi-D8FEXicG.js';
|
|
94
95
|
import '@bigbinary/neeto-molecules/HelpPopover';
|
|
95
96
|
import '@bigbinary/neetoui/Pane';
|
|
96
97
|
import '@bigbinary/neetoui/Dropdown';
|
|
@@ -101,5 +102,7 @@ import '@bigbinary/neetoui/Radio';
|
|
|
101
102
|
import '@bigbinary/neeto-icons/ExternalLink';
|
|
102
103
|
import '@bigbinary/neetoui/formik/Radio';
|
|
103
104
|
import '@bigbinary/neeto-commons-frontend/initializers';
|
|
104
|
-
|
|
105
|
+
|
|
106
|
+
var css = ".ant-table-cell-row-hover .identifier-copy-button{visibility:visible!important}";
|
|
107
|
+
n(css,{});
|
|
105
108
|
//# sourceMappingURL=index.js.map
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,9 +6,9 @@ import Tag from '@bigbinary/neetoui/Tag';
|
|
|
6
6
|
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
7
7
|
import { curry } from 'ramda';
|
|
8
8
|
import '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
9
|
-
import './CopyButtonWrapper-
|
|
9
|
+
import './CopyButtonWrapper-SoJkwX-d.js';
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
11
|
-
import { T as TAG_STYLE,
|
|
11
|
+
import { T as TAG_STYLE, j as DEFAULT_TAG_STYLE } from './index-Xdf4XpRc.js';
|
|
12
12
|
|
|
13
13
|
var getTagStyle = function getTagStyle(status) {
|
|
14
14
|
return TAG_STYLE[status] || DEFAULT_TAG_STYLE;
|
|
@@ -48,5 +48,5 @@ var renderDate = function renderDate(date) {
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
export {
|
|
52
|
-
//# sourceMappingURL=renderFunctions-
|
|
51
|
+
export { renderFullName as a, renderDate as b, renderStatus as r };
|
|
52
|
+
//# sourceMappingURL=renderFunctions-BCW1POD1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderFunctions-
|
|
1
|
+
{"version":3,"file":"renderFunctions-BCW1POD1.js","sources":["../app/javascript/src/utils/renderFunctions.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport { snakeToCamelCase } from \"neetocist\";\nimport DateFormat from \"neetomolecules/DateFormat\";\nimport { Button, Tag, Tooltip } from \"neetoui\";\nimport { curry } from \"ramda\";\n\nimport CopyButtonWrapper from \"components/Common/CopyButtonWrapper\";\nimport { DEFAULT_TAG_STYLE, TAG_STYLE } from \"src/constants\";\n\nconst getTagStyle = status => TAG_STYLE[status] || DEFAULT_TAG_STYLE;\n\nconst preProcessStatus = (type, status, record = {}) => {\n if (type === \"transaction\" || type === \"payment\") {\n return record.isRefunded ? \"refunded\" : status;\n }\n\n if (status === \"voided\") {\n return \"incomplete\";\n }\n\n return snakeToCamelCase(status);\n};\n\nexport const renderStatus = curry((type, status, record) => {\n const processedStatus = preProcessStatus(type, status, record);\n\n return (\n <Tooltip\n content={t(`neetoPayments.tooltipContent.${type}.${processedStatus}`)}\n position=\"top\"\n >\n <div className=\"w-fit\">\n <Tag\n label={t(`neetoPayments.tagLabels.${type}.${processedStatus}`)}\n style={getTagStyle(processedStatus)}\n />\n </div>\n </Tooltip>\n );\n});\n\nexport const renderFullName = (_, { firstName, lastName }) =>\n `${firstName} ${lastName}`;\n\nexport const renderEmail = email => (\n <CopyButtonWrapper content={email}>\n <Button href={`mailto:${email}`} label={email} style=\"link\" />\n </CopyButtonWrapper>\n);\n\nexport const renderDate = date => <DateFormat.DateTime {...{ date }} />;\n"],"names":["getTagStyle","status","TAG_STYLE","DEFAULT_TAG_STYLE","preProcessStatus","type","record","arguments","length","undefined","isRefunded","snakeToCamelCase","renderStatus","curry","processedStatus","_jsx","Tooltip","content","t","concat","position","children","className","Tag","label","style","renderFullName","_","_ref","firstName","lastName","renderDate","date","DateFormat","DateTime"],"mappings":";;;;;;;;;;;;AASA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAGC,MAAM,EAAA;AAAA,EAAA,OAAIC,SAAS,CAACD,MAAM,CAAC,IAAIE,iBAAiB;AAAA,CAAA;AAEpE,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAI,EAAEJ,MAAM,EAAkB;AAAA,EAAA,IAAhBK,MAAM,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AACjD,EAAA,IAAIF,IAAI,KAAK,aAAa,IAAIA,IAAI,KAAK,SAAS,EAAE;AAChD,IAAA,OAAOC,MAAM,CAACI,UAAU,GAAG,UAAU,GAAGT,MAAM;AAChD;EAEA,IAAIA,MAAM,KAAK,QAAQ,EAAE;AACvB,IAAA,OAAO,YAAY;AACrB;EAEA,OAAOU,gBAAgB,CAACV,MAAM,CAAC;AACjC,CAAC;AAEM,IAAMW,YAAY,GAAGC,KAAK,CAAC,UAACR,IAAI,EAAEJ,MAAM,EAAEK,MAAM,EAAK;EAC1D,IAAMQ,eAAe,GAAGV,gBAAgB,CAACC,IAAI,EAAEJ,MAAM,EAAEK,MAAM,CAAC;EAE9D,oBACES,GAAA,CAACC,OAAO,EAAA;IACNC,OAAO,EAAEC,CAAC,CAAA,+BAAA,CAAAC,MAAA,CAAiCd,IAAI,EAAA,GAAA,CAAA,CAAAc,MAAA,CAAIL,eAAe,CAAE,CAAE;AACtEM,IAAAA,QAAQ,EAAC,KAAK;AAAAC,IAAAA,QAAA,eAEdN,GAAA,CAAA,KAAA,EAAA;AAAKO,MAAAA,SAAS,EAAC,OAAO;MAAAD,QAAA,eACpBN,GAAA,CAACQ,GAAG,EAAA;QACFC,KAAK,EAAEN,CAAC,CAAA,0BAAA,CAAAC,MAAA,CAA4Bd,IAAI,EAAA,GAAA,CAAA,CAAAc,MAAA,CAAIL,eAAe,CAAE,CAAE;QAC/DW,KAAK,EAAEzB,WAAW,CAACc,eAAe;OACnC;KACE;AAAC,GACC,CAAC;AAEd,CAAC;AAEM,IAAMY,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,CAAC,EAAAC,IAAA,EAAA;AAAA,EAAA,IAAIC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAA,EAAA,OAAA,EAAA,CAAAX,MAAA,CAClDU,SAAS,EAAAV,GAAAA,CAAAA,CAAAA,MAAA,CAAIW,QAAQ,CAAA;AAAA;IAQbC,UAAU,GAAG,SAAbA,UAAUA,CAAGC,IAAI,EAAA;AAAA,EAAA,oBAAIjB,GAAA,CAACkB,UAAU,CAACC,QAAQ,EAAA;AAAOF,IAAAA,IAAI,EAAJA;AAAI,GAAK,CAAC;AAAA;;;;"}
|
|
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import { useQuery } from '@tanstack/react-query';
|
|
3
3
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
4
4
|
import axios from 'axios';
|
|
5
|
-
import { B as BASE_URL } from './index-
|
|
5
|
+
import { B as BASE_URL } from './index-Xdf4XpRc.js';
|
|
6
6
|
import { Q as QUERY_KEYS } from './queryConstants-DFKKEEo0.js';
|
|
7
7
|
|
|
8
8
|
var list = function list(payload) {
|
|
@@ -55,4 +55,4 @@ var useCreateStripeAccount = function useCreateStripeAccount(_ref2) {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
export { useCreateStripeAccount as a, usePollingStripeAccountCreationStatus as b, useFetchConnectedAccounts as u };
|
|
58
|
-
//# sourceMappingURL=useAccountsApi-
|
|
58
|
+
//# sourceMappingURL=useAccountsApi-qzNkKYfX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountsApi-
|
|
1
|
+
{"version":3,"file":"useAccountsApi-qzNkKYfX.js","sources":["../app/javascript/src/apis/stripe/accounts.js","../app/javascript/src/hooks/reactQuery/stripe/useAccountsApi.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/accounts`, {\n params: payload,\n });\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 = { list, create, creationStatus, destroy };\n\nexport default accountsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport accountsApi from \"apis/stripe/accounts\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchConnectedAccounts = (payload = {}, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNTS_LIST, payload],\n queryFn: () => accountsApi.list(payload),\n ...options,\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 }) =>\n useMutationWithInvalidation(accountsApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.PAYMENT_INTEGRATION_LIST]],\n onSuccess,\n });\n\nexport const useCreateStripeAccount = ({ onSuccess }) =>\n useMutationWithInvalidation(accountsApi.create, {\n keysToInvalidate: [[QUERY_KEYS.PAYMENT_INTEGRATION_LIST]],\n onSuccess,\n });\n"],"names":["list","payload","axios","get","concat","BASE_URL","params","create","post","creationStatus","jobId","destroy","accountId","accountsApi","useFetchConnectedAccounts","arguments","length","undefined","options","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_ACCOUNTS_LIST","queryFn","usePollingStripeAccountCreationStatus","STRIPE_ACCOUNT_DETAILS","useCreateStripeAccount","_ref2","onSuccess","useMutationWithInvalidation","keysToInvalidate","PAYMENT_INTEGRATION_LIST"],"mappings":";;;;;;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAClBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,QAAQ,EAA2B,yBAAA,CAAA,EAAA;AAC9CC,IAAAA,MAAM,EAAEL;AACV,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,MAAM,GAAG,SAATA,MAAMA,CAAGN,OAAO,EAAA;EAAA,OACpBC,KAAK,CAACM,IAAI,CAAA,EAAA,CAAAJ,MAAA,CAAIC,QAAQ,EAA2BJ,yBAAAA,CAAAA,EAAAA,OAAO,CAAC;AAAA,CAAA;AAE3D,IAAMQ,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,IAAI;AAAEO,EAAAA,MAAM,EAANA,MAAM;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,UAAU,CAACU,wBAAwB,CAAC,CAAC;AACzDH,IAAAA,SAAS,EAATA;AACF,GAAC,CAAC;AAAA;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import { useQuery } from '@tanstack/react-query';
|
|
3
3
|
import axios from 'axios';
|
|
4
|
-
import { B as BASE_URL } from './index-
|
|
4
|
+
import { B as BASE_URL } from './index-Xdf4XpRc.js';
|
|
5
5
|
import { Q as QUERY_KEYS } from './queryConstants-DFKKEEo0.js';
|
|
6
6
|
|
|
7
7
|
var list = function list() {
|
|
@@ -21,4 +21,4 @@ var useFetchPaymentIntegrations = function useFetchPaymentIntegrations(options)
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export { useFetchPaymentIntegrations as u };
|
|
24
|
-
//# sourceMappingURL=useIntegrationsApi-
|
|
24
|
+
//# sourceMappingURL=useIntegrationsApi-DkA7eXBT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntegrationsApi-
|
|
1
|
+
{"version":3,"file":"useIntegrationsApi-DkA7eXBT.js","sources":["../app/javascript/src/apis/integrations.js","../app/javascript/src/hooks/reactQuery/useIntegrationsApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = () => axios.get(`${BASE_URL}/api/v1/integrations`);\n\nconst integrationsApi = { list };\n\nexport default integrationsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport integrationsApi from \"apis/integrations\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchPaymentIntegrations = options =>\n useQuery({\n queryKey: [QUERY_KEYS.PAYMENT_INTEGRATION_LIST],\n queryFn: integrationsApi.list,\n ...options,\n });\n"],"names":["list","axios","get","concat","BASE_URL","integrationsApi","useFetchPaymentIntegrations","options","useQuery","_objectSpread","queryKey","QUERY_KEYS","PAYMENT_INTEGRATION_LIST","queryFn"],"mappings":";;;;;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,GAAA;EAAA,OAASC,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,QAAQ,yBAAsB,CAAC;AAAA,CAAA;AAE/D,IAAMC,eAAe,GAAG;AAAEL,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICDnBM,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAGC,OAAO,EAAA;EAAA,OAChDC,QAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,UAAU,CAACC,wBAAwB,CAAC;IAC/CC,OAAO,EAAER,eAAe,CAACL;GACtBO,EAAAA,OAAO,CACX,CAAC;AAAA;;;;"}
|
|
@@ -3,7 +3,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
3
3
|
import { useMutation } from '@tanstack/react-query';
|
|
4
4
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
5
|
import axios from 'axios';
|
|
6
|
-
import { B as BASE_URL } from './index-
|
|
6
|
+
import { B as BASE_URL } from './index-Xdf4XpRc.js';
|
|
7
7
|
import { Q as QUERY_KEYS } from './queryConstants-DFKKEEo0.js';
|
|
8
8
|
|
|
9
9
|
var create = function create(payload) {
|
|
@@ -50,4 +50,4 @@ var useUpdateUpiPayment = function useUpdateUpiPayment(_ref) {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export { useUpdateUpiPayment as a, useCreateUpiPayment as u };
|
|
53
|
-
//# sourceMappingURL=usePaymentApi-
|
|
53
|
+
//# sourceMappingURL=usePaymentApi-B1qMca2A.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentApi-
|
|
1
|
+
{"version":3,"file":"usePaymentApi-B1qMca2A.js","sources":["../app/javascript/src/apis/manual_upi/payments.js","../app/javascript/src/hooks/reactQuery/manualUpi/usePaymentApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/manual_upi/payments`, {\n payment: payload,\n });\n\nconst update = ({ id, manualUpiId, payload }) =>\n axios.put(`${BASE_URL}/api/v1/manual_upi/${manualUpiId}/payments/${id}`, {\n payment: payload,\n });\n\nconst paymentsApi = { update, create };\n\nexport default paymentsApi;\n","import { useMutation } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport paymentsApi from \"apis/manual_upi/payments\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useCreateUpiPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n\nexport const useUpdateUpiPayment = ({\n id,\n manualUpiId,\n options = {},\n keysToInvalidate = [],\n}) =>\n useMutationWithInvalidation(\n payload => paymentsApi.update({ id, manualUpiId, payload }),\n {\n keysToInvalidate: [...keysToInvalidate, [QUERY_KEYS.PAYMENTS_LIST]],\n ...options,\n }\n );\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","update","_ref","id","manualUpiId","put","paymentsApi","useCreateUpiPayment","options","useMutation","_objectSpread","mutationFn","useUpdateUpiPayment","_ref$options","_ref$keysToInvalidate","keysToInvalidate","useMutationWithInvalidation","_toConsumableArray","QUERY_KEYS","PAYMENTS_LIST"],"mappings":";;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,QAAQ,EAAsC,oCAAA,CAAA,EAAA;AAC1DC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAET,OAAO,GAAAO,IAAA,C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,CAAE,CAACG,UAAU,CAACC,aAAa,CAAC,CAAA;GAC/DX,EAAAA,OAAO,CAEd,CAAC;AAAA;;;;"}
|
|
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import { useMutation } from '@tanstack/react-query';
|
|
3
3
|
import '@bigbinary/neeto-cist';
|
|
4
4
|
import axios from 'axios';
|
|
5
|
-
import { B as BASE_URL } from './index-
|
|
5
|
+
import { B as BASE_URL } from './index-Xdf4XpRc.js';
|
|
6
6
|
|
|
7
7
|
var create = function create(payload) {
|
|
8
8
|
return axios.post("".concat(BASE_URL, "/api/v1/public/razorpay/payments"), {
|
|
@@ -34,4 +34,4 @@ var useCreateRazorpayPayment = function useCreateRazorpayPayment(options) {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
export { useCreateRazorpayPayment as u };
|
|
37
|
-
//# sourceMappingURL=usePaymentApi-
|
|
37
|
+
//# sourceMappingURL=usePaymentApi-D8FEXicG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentApi-
|
|
1
|
+
{"version":3,"file":"usePaymentApi-D8FEXicG.js","sources":["../app/javascript/src/apis/razorpay/payments.js","../app/javascript/src/hooks/reactQuery/razorpay/usePaymentApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/razorpay/payments`, {\n payment: payload,\n });\n\nconst defaultList = payload =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdable/payments`, {\n params: payload,\n });\n\nconst list = (holdableId, payload) =>\n axios.get(`${BASE_URL}/api/v1/razorpay/holdables/${holdableId}/payments`, {\n params: payload,\n });\n\nconst paymentsApi = { defaultList, list, create };\n\nexport default paymentsApi;\n","import { useQuery, useMutation } from \"@tanstack/react-query\";\nimport { isPresent } from \"neetocist\";\n\nimport paymentsApi from \"apis/razorpay/payments\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchRazorpayPayments = (\n holdableId = \"\",\n payload = {},\n options = {}\n) =>\n useQuery({\n queryKey: [QUERY_KEYS.RAZORPAY_ACCOUNT_DETAILS, payload],\n queryFn: () => {\n if (isPresent(holdableId)) return paymentsApi.list(holdableId, payload);\n\n return paymentsApi.defaultList(payload);\n },\n ...options,\n });\n\nexport const useCreateRazorpayPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","defaultList","get","params","list","holdableId","paymentsApi","useCreateRazorpayPayment","options","useMutation","_objectSpread","mutationFn"],"mappings":";;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,QAAQ,EAAoC,kCAAA,CAAA,EAAA;AACxDC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,WAAW,GAAG,SAAdA,WAAWA,CAAGN,OAAO,EAAA;AAAA,EAAA,OACzBC,KAAK,CAACM,GAAG,IAAAJ,MAAA,CAAIC,QAAQ,EAAsC,oCAAA,CAAA,EAAA;AACzDI,IAAAA,MAAM,EAAER;AACV,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMS,IAAI,GAAG,SAAPA,IAAIA,CAAIC,UAAU,EAAEV,OAAO,EAAA;EAAA,OAC/BC,KAAK,CAACM,GAAG,CAAAJ,EAAAA,CAAAA,MAAA,CAAIC,QAAQ,EAAAD,6BAAAA,CAAAA,CAAAA,MAAA,CAA8BO,UAAU,EAAa,WAAA,CAAA,EAAA;AACxEF,IAAAA,MAAM,EAAER;AACV,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMW,WAAW,GAAG;AAAEL,EAAAA,WAAW,EAAXA,WAAW;AAAEG,EAAAA,IAAI,EAAJA,IAAI;AAAEV,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ICEpCa,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAGC,OAAO,EAAA;EAAA,OAC7CC,WAAW,CAAAC,aAAA,CAAA;IAAGC,UAAU,EAAEL,WAAW,CAACZ;GAAWc,EAAAA,OAAO,CAAE,CAAC;AAAA;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import { useMutation } from '@tanstack/react-query';
|
|
3
3
|
import axios from 'axios';
|
|
4
|
-
import { B as BASE_URL } from './index-
|
|
4
|
+
import { B as BASE_URL } from './index-Xdf4XpRc.js';
|
|
5
5
|
|
|
6
6
|
var create = function create(payload) {
|
|
7
7
|
return axios.post("".concat(BASE_URL, "/api/v1/public/cash/payments"), {
|
|
@@ -35,4 +35,4 @@ var useUpdateCashPayment = function useUpdateCashPayment(id) {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export { useUpdateCashPayment as a, useCreateCashPayment as u };
|
|
38
|
-
//# sourceMappingURL=usePaymentApi-
|
|
38
|
+
//# sourceMappingURL=usePaymentApi-jZmkutky.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePaymentApi-
|
|
1
|
+
{"version":3,"file":"usePaymentApi-jZmkutky.js","sources":["../app/javascript/src/apis/cash/payments.js","../app/javascript/src/hooks/reactQuery/cash/usePaymentApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/cash/payments`, {\n payment: payload,\n });\n\nconst update = (id, payload) =>\n axios.put(`${BASE_URL}/api/v1/cash/payments/${id}`, {\n payment: payload,\n });\n\nconst paymentsApi = { create, update };\n\nexport default paymentsApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport paymentsApi from \"apis/cash/payments\";\n\nexport const useCreateCashPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n\nexport const useUpdateCashPayment = (id, options = {}) =>\n useMutation({\n mutationFn: payload => paymentsApi.update(id, payload),\n ...options,\n });\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","update","id","put","paymentsApi","useCreateCashPayment","options","useMutation","_objectSpread","mutationFn","useUpdateCashPayment","arguments","length","undefined"],"mappings":";;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,QAAQ,EAAgC,8BAAA,CAAA,EAAA;AACpDC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,MAAM,GAAG,SAATA,MAAMA,CAAIC,EAAE,EAAEP,OAAO,EAAA;EAAA,OACzBC,KAAK,CAACO,GAAG,CAAAL,EAAAA,CAAAA,MAAA,CAAIC,QAAQ,EAAAD,wBAAAA,CAAAA,CAAAA,MAAA,CAAyBI,EAAE,CAAI,EAAA;AAClDF,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMS,WAAW,GAAG;AAAEV,EAAAA,MAAM,EAANA,MAAM;AAAEO,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ICVzBI,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAGC,OAAO,EAAA;EAAA,OACzCC,WAAW,CAAAC,aAAA,CAAA;IAAGC,UAAU,EAAEL,WAAW,CAACV;GAAWY,EAAAA,OAAO,CAAE,CAAC;AAAA;IAEhDI,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIR,EAAE,EAAA;AAAA,EAAA,IAAEI,OAAO,GAAAK,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OACnDJ,WAAW,CAAAC,aAAA,CAAA;AACTC,IAAAA,UAAU,EAAE,SAAZA,UAAUA,CAAEd,OAAO,EAAA;AAAA,MAAA,OAAIS,WAAW,CAACH,MAAM,CAACC,EAAE,EAAEP,OAAO,CAAC;AAAA;GACnDW,EAAAA,OAAO,CACX,CAAC;AAAA;;;;"}
|
|
@@ -3,7 +3,7 @@ import { useQuery } from '@tanstack/react-query';
|
|
|
3
3
|
import '@bigbinary/neeto-cist';
|
|
4
4
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
5
|
import axios from 'axios';
|
|
6
|
-
import { B as BASE_URL } from './index-
|
|
6
|
+
import { B as BASE_URL } from './index-Xdf4XpRc.js';
|
|
7
7
|
import 'qs';
|
|
8
8
|
import { Q as QUERY_KEYS } from './queryConstants-DFKKEEo0.js';
|
|
9
9
|
|
|
@@ -75,5 +75,5 @@ var useShowStripePlatformPayout = function useShowStripePlatformPayout(id) {
|
|
|
75
75
|
}, options));
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
export {
|
|
79
|
-
//# sourceMappingURL=usePlatformApi-
|
|
78
|
+
export { useFetchStripePlatformPayouts as a, useShowStripePayout as b, useShowStripePlatformPayout as c, useFetchStripePayouts as u };
|
|
79
|
+
//# sourceMappingURL=usePlatformApi-0sGcYfsx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePlatformApi-
|
|
1
|
+
{"version":3,"file":"usePlatformApi-0sGcYfsx.js","sources":["../app/javascript/src/apis/stripe/holdables/payouts.js","../app/javascript/src/hooks/reactQuery/stripe/useConnectApi.js","../app/javascript/src/apis/stripePlatform/payouts.js","../app/javascript/src/hooks/reactQuery/stripe/usePlatformApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { isPresent } from \"neetocist\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport accountsApi from \"apis/stripe/holdables/accounts\";\nimport payoutsApi from \"apis/stripe/holdables/payouts\";\nimport transactionsApi from \"apis/stripe/holdables/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchConnectedStripeAccount = (holdableId, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n queryFn: () => accountsApi.show(holdableId),\n ...options,\n });\n\nexport const useFetchStripeTransactions = (\n holdableId = \"\",\n payload = {},\n options = {}\n) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => {\n if (isPresent(holdableId)) {\n return transactionsApi.list(holdableId, payload);\n }\n\n return transactionsApi.defaultList(payload);\n },\n ...options,\n });\n\nexport const useFetchStripePayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n\nexport const usePollingStripeAccount = (holdableId, { refetchInterval }) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n queryFn: () => accountsApi.show(holdableId),\n refetchInterval,\n });\n\nexport const usePollingStripeAccountCreationStatus = (jobId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId],\n queryFn: () => accountsApi.creationStatus(jobId),\n ...options,\n });\n\nexport const useDestroyStripeAccount = ({ onSuccess, holdableId }) =>\n useMutationWithInvalidation(accountsApi.destroy, {\n keysToInvalidate: [\n [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n ],\n onSuccess,\n });\n\nexport const useCreateStripeAccount = ({ onSuccess }) =>\n useMutationWithInvalidation(accountsApi.create, {\n keysToInvalidate: [[QUERY_KEYS.STRIPE_ACCOUNT_DETAILS]],\n onSuccess,\n });\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport refundsApi from \"apis/stripe/holdables/refunds\";\nimport accountsApi from \"apis/stripePlatform/accounts\";\nimport payoutsApi from \"apis/stripePlatform/payouts\";\nimport splitsApi from \"apis/stripePlatform/splits\";\nimport transactionsApi from \"apis/stripePlatform/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchStripePlatformAccount = options =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_ACCOUNT_DETAILS],\n queryFn: accountsApi.show,\n ...options,\n });\n\nexport const useFetchStripePlatformSplits = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.SPLITS_LIST, payload],\n queryFn: () => splitsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransactions = (payload, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => transactionsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransaction = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_TRANSACTION, id],\n queryFn: () => transactionsApi.show(id),\n ...options,\n });\n\nexport const useFetchStripeRefunds = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_REFUNDS_LIST, payload],\n queryFn: () => refundsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformPayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePlatformPayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n"],"names":["list","payload","axios","get","concat","BASE_URL","params","show","id","payoutsApi","useFetchStripePayouts","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_PAYOUTS_LIST","queryFn","useShowStripePayout","STRIPE_PAYOUT","useFetchStripePlatformPayouts","useShowStripePlatformPayout"],"mappings":";;;;;;;;;AAIA,IAAMA,MAAI,GAAG,SAAPA,IAAIA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAClBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,QAAQ,EAAmC,iCAAA,CAAA,EAAA;AAAEC,IAAAA,MAAM,EAAEL;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE9E,IAAMM,MAAI,GAAG,SAAPA,IAAIA,CAAGC,EAAE,EAAA;AAAA,EAAA,OACbN,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,QAAQ,EAAA,kCAAA,CAAA,CAAAD,MAAA,CAAmCI,EAAE,CAAE,CAAC;AAAA,CAAA;AAE/D,IAAMC,YAAU,GAAG;AAAET,EAAAA,IAAI,EAAJA,MAAI;AAAEO,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICuBpBG,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIT,OAAO,EAAA;AAAA,EAAA,IAAEU,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OACzDG,QAAQ,CAAAC,eAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,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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;IAESa,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAIhB,EAAE,EAAA;AAAA,EAAA,IAAEG,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OAC1DG,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;;;;"}
|
|
@@ -3,8 +3,8 @@ import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
|
3
3
|
import { noop, isNotPresent } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { mergeDeepLeft } from 'ramda';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { u as useCreateRazorpayPayment } from './usePaymentApi-
|
|
7
|
-
import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-
|
|
6
|
+
import { u as useCreateRazorpayPayment } from './usePaymentApi-D8FEXicG.js';
|
|
7
|
+
import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-Xdf4XpRc.js';
|
|
8
8
|
import '@babel/runtime/helpers/defineProperty';
|
|
9
9
|
import '@tanstack/react-query';
|
|
10
10
|
import 'axios';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-payments-frontend",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.7-beta",
|
|
4
4
|
"description": "To manage payments across the neeto products.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-payments-nano",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"@bigbinary/babel-preset-neeto": "^1.0.3",
|
|
61
61
|
"@bigbinary/eslint-plugin-neeto": "1.8.0",
|
|
62
62
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
63
|
-
"@bigbinary/neeto-commons-frontend": "4.13.
|
|
64
|
-
"@bigbinary/neeto-editor": "1.47.
|
|
63
|
+
"@bigbinary/neeto-commons-frontend": "4.13.83",
|
|
64
|
+
"@bigbinary/neeto-editor": "1.47.68",
|
|
65
65
|
"@bigbinary/neeto-filters-frontend": "4.3.24",
|
|
66
66
|
"@bigbinary/neeto-icons": "1.20.63",
|
|
67
|
-
"@bigbinary/neeto-molecules": "4.0.
|
|
68
|
-
"@bigbinary/neetoui": "8.3.
|
|
67
|
+
"@bigbinary/neeto-molecules": "4.0.91",
|
|
68
|
+
"@bigbinary/neetoui": "8.3.43",
|
|
69
69
|
"@dnd-kit/core": "6.3.1",
|
|
70
70
|
"@dnd-kit/sortable": "10.0.0",
|
|
71
71
|
"@emotion/is-prop-valid": "1.2.0",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"@stripe/stripe-js": "^1.38.1",
|
|
82
82
|
"@svgr/rollup": "8.1.0",
|
|
83
83
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
84
|
+
"@tailwindcss/postcss": "^4.1.16",
|
|
84
85
|
"@tanstack/react-query": "5.59.20",
|
|
85
86
|
"@tanstack/react-query-devtools": "5.59.20",
|
|
86
87
|
"antd": "5.22.0",
|
|
@@ -135,7 +136,7 @@
|
|
|
135
136
|
"postcss-loader": "^7.0.1",
|
|
136
137
|
"postcss-preset-env": "7.8.2",
|
|
137
138
|
"prettier": "3",
|
|
138
|
-
"prettier-plugin-tailwindcss": "0.
|
|
139
|
+
"prettier-plugin-tailwindcss": "^0.7.1",
|
|
139
140
|
"process": "0.11.10",
|
|
140
141
|
"qs": "^6.11.2",
|
|
141
142
|
"ramda": "0.29.0",
|
|
@@ -159,7 +160,7 @@
|
|
|
159
160
|
"stream-browserify": "^3.0.0",
|
|
160
161
|
"stream-http": "3.2.0",
|
|
161
162
|
"style-loader": "^3.3.1",
|
|
162
|
-
"tailwindcss": "
|
|
163
|
+
"tailwindcss": "^4.1.16",
|
|
163
164
|
"tty-browserify": "0.0.1",
|
|
164
165
|
"url": "^0.11.0",
|
|
165
166
|
"util": "^0.12.5",
|
|
@@ -174,12 +175,12 @@
|
|
|
174
175
|
"peerDependencies": {
|
|
175
176
|
"@babel/runtime": "7.26.10",
|
|
176
177
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
177
|
-
"@bigbinary/neeto-commons-frontend": "4.13.
|
|
178
|
-
"@bigbinary/neeto-editor": "1.47.
|
|
178
|
+
"@bigbinary/neeto-commons-frontend": "4.13.83",
|
|
179
|
+
"@bigbinary/neeto-editor": "1.47.68",
|
|
179
180
|
"@bigbinary/neeto-filters-frontend": "4.3.24",
|
|
180
181
|
"@bigbinary/neeto-icons": "1.20.63",
|
|
181
|
-
"@bigbinary/neeto-molecules": "4.0.
|
|
182
|
-
"@bigbinary/neetoui": "8.3.
|
|
182
|
+
"@bigbinary/neeto-molecules": "4.0.91",
|
|
183
|
+
"@bigbinary/neetoui": "8.3.43",
|
|
183
184
|
"@dnd-kit/core": "6.3.1",
|
|
184
185
|
"@dnd-kit/sortable": "10.0.0",
|
|
185
186
|
"@honeybadger-io/js": "6.10.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CopyButtonWrapper-B79WRogM.js","sources":["../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../app/javascript/src/components/Common/CopyButtonWrapper.jsx"],"sourcesContent":["var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import { isPresent } from \"neetocist\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\n\n// eslint-disable-next-line import/extensions\nimport \"stylesheets/components/_copy-button.scss\";\n\nconst CopyButtonWrapper = ({ content, children }) => (\n <div className=\"flex items-center space-x-2\">\n {children}\n {isPresent(content) && (\n <div className=\"identifier-copy-button invisible\">\n <CopyToClipboardButton size=\"small\" style=\"text\" value={content} />\n </div>\n )}\n </div>\n);\n\nexport default CopyButtonWrapper;\n"],"names":["CopyButtonWrapper","_ref","content","children","_jsxs","className","isPresent","_jsx","CopyToClipboardButton","size","style","value"],"mappings":";;;;AAAA,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,OAAO,QAAQ,CAAC,CAA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,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;ACMruB,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAA,EAAA,oBAC5CC,IAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,6BAA6B;IAAAF,QAAA,EAAA,CACzCA,QAAQ,EACRG,SAAS,CAACJ,OAAO,CAAC,iBACjBK,GAAA,CAAA,KAAA,EAAA;AAAKF,MAAAA,SAAS,EAAC,kCAAkC;MAAAF,QAAA,eAC/CI,GAAA,CAACC,qBAAqB,EAAA;AAACC,QAAAA,IAAI,EAAC,OAAO;AAACC,QAAAA,KAAK,EAAC,MAAM;AAACC,QAAAA,KAAK,EAAET;OAAU;AAAC,KAChE,CACN;AAAA,GACE,CAAC;AAAA;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExportModal-DaLJ7KS6.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,QAA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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;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CopyButtonWrapper-CzQmYDby.js","sources":["../../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../../app/javascript/src/components/Common/CopyButtonWrapper.jsx"],"sourcesContent":["var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import { isPresent } from \"neetocist\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\n\n// eslint-disable-next-line import/extensions\nimport \"stylesheets/components/_copy-button.scss\";\n\nconst CopyButtonWrapper = ({ content, children }) => (\n <div className=\"flex items-center space-x-2\">\n {children}\n {isPresent(content) && (\n <div className=\"identifier-copy-button invisible\">\n <CopyToClipboardButton size=\"small\" style=\"text\" value={content} />\n </div>\n )}\n </div>\n);\n\nexport default CopyButtonWrapper;\n"],"names":["CopyButtonWrapper","_ref","content","children","_jsxs","className","isPresent","_jsx","CopyToClipboardButton","size","style","value"],"mappings":";;;;;;AAAA,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,OAAO,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CA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;AAAKC,IAAAA,SAAS,EAAC,6BAA6B;IAAAF,QAAA,EAAA,CACzCA,QAAQ,EACRG,mBAAS,CAACJ,OAAO,CAAC,iBACjBK,cAAA,CAAA,KAAA,EAAA;AAAKF,MAAAA,SAAS,EAAC,kCAAkC;MAAAF,QAAA,eAC/CI,cAAA,CAACC,qBAAqB,EAAA;AAACC,QAAAA,IAAI,EAAC,OAAO;AAACC,QAAAA,KAAK,EAAC,MAAM;AAACC,QAAAA,KAAK,EAAET;OAAU;AAAC,KAChE,CACN;AAAA,GACE,CAAC;AAAA;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExportModal-DUdQLJXl.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,kBAAQ,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,sBAAW,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,oBAAo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