@bigbinary/neeto-payments-frontend 4.0.17 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/AccountsDashboard.js +4 -4
  2. package/dist/AdminCancelRecurringPaymentButton.js +1 -1
  3. package/dist/CashPaymentButton.js +2 -2
  4. package/dist/ConfirmCashPaymentButton.js +2 -2
  5. package/dist/CustomerCancelRecurringPaymentForm.js +1 -1
  6. package/dist/{ExportModal-BpfgeWqd.js → ExportModal-DaLJ7KS6.js} +2 -2
  7. package/dist/{ExportModal-BpfgeWqd.js.map → ExportModal-DaLJ7KS6.js.map} +1 -1
  8. package/dist/ManualUpiConnect.js +1 -1
  9. package/dist/ManualUpiPayment.js +2 -2
  10. package/dist/ManualUpiPaymentConfirmButton.js +2 -2
  11. package/dist/ManualUpiPaymentRejectButton.js +2 -2
  12. package/dist/PaymentsDashboard.js +2 -2
  13. package/dist/PayoutsDashboard.js +4 -4
  14. package/dist/PayoutsPage.js +3 -3
  15. package/dist/RazorpayConnect.js +4 -3
  16. package/dist/RazorpayConnect.js.map +1 -1
  17. package/dist/RazorpayPaymentButton.js +3 -6
  18. package/dist/RazorpayPaymentButton.js.map +1 -1
  19. package/dist/RecurringPaymentSettings.js +1 -1
  20. package/dist/RefundsDashboard.js +2 -2
  21. package/dist/SplitTransfersDashboard.js +2 -2
  22. package/dist/StripeCheckoutSetting.js +1 -1
  23. package/dist/StripeConnect.js +3 -3
  24. package/dist/StripeManage.js +1 -1
  25. package/dist/TaxesDashboard.js +1 -1
  26. package/dist/buildStripeTransactionLink.js +1 -1
  27. package/dist/cjs/AccountsDashboard.js +4 -4
  28. package/dist/cjs/AdminCancelRecurringPaymentButton.js +1 -1
  29. package/dist/cjs/CashPaymentButton.js +2 -2
  30. package/dist/cjs/ConfirmCashPaymentButton.js +2 -2
  31. package/dist/cjs/CustomerCancelRecurringPaymentForm.js +1 -1
  32. package/dist/cjs/{ExportModal-Bp4g8_8E.js → ExportModal-DUdQLJXl.js} +2 -2
  33. package/dist/cjs/{ExportModal-Bp4g8_8E.js.map → ExportModal-DUdQLJXl.js.map} +1 -1
  34. package/dist/cjs/ManualUpiConnect.js +1 -1
  35. package/dist/cjs/ManualUpiPayment.js +2 -2
  36. package/dist/cjs/ManualUpiPaymentConfirmButton.js +2 -2
  37. package/dist/cjs/ManualUpiPaymentRejectButton.js +2 -2
  38. package/dist/cjs/PaymentsDashboard.js +2 -2
  39. package/dist/cjs/PayoutsDashboard.js +4 -4
  40. package/dist/cjs/PayoutsPage.js +3 -3
  41. package/dist/cjs/RazorpayConnect.js +4 -3
  42. package/dist/cjs/RazorpayConnect.js.map +1 -1
  43. package/dist/cjs/RazorpayPaymentButton.js +3 -6
  44. package/dist/cjs/RazorpayPaymentButton.js.map +1 -1
  45. package/dist/cjs/RecurringPaymentSettings.js +1 -1
  46. package/dist/cjs/RefundsDashboard.js +2 -2
  47. package/dist/cjs/SplitTransfersDashboard.js +2 -2
  48. package/dist/cjs/StripeCheckoutSetting.js +1 -1
  49. package/dist/cjs/StripeConnect.js +3 -3
  50. package/dist/cjs/StripeManage.js +1 -1
  51. package/dist/cjs/TaxesDashboard.js +1 -1
  52. package/dist/cjs/buildStripeTransactionLink.js +1 -1
  53. package/dist/cjs/constants.js +1 -1
  54. package/dist/cjs/{dashboard-BTXVWygp.js → dashboard-DLj_eVV0.js} +2 -2
  55. package/dist/cjs/{dashboard-BTXVWygp.js.map → dashboard-DLj_eVV0.js.map} +1 -1
  56. package/dist/cjs/getAddressElementOptions.js +1 -1
  57. package/dist/cjs/getAmountInSmallestCurrencyUnit.js +1 -1
  58. package/dist/cjs/getAmountWithAppliedTax.js +1 -1
  59. package/dist/cjs/getFormattedAmount.js +1 -1
  60. package/dist/cjs/getFormattedDiscountedAmount.js +14 -0
  61. package/dist/cjs/getFormattedDiscountedAmount.js.map +1 -0
  62. package/dist/cjs/getFormattedDiscountedPercentage.js +14 -0
  63. package/dist/cjs/getFormattedDiscountedPercentage.js.map +1 -0
  64. package/dist/cjs/getFormattedTaxAmount.js +1 -1
  65. package/dist/cjs/getFormattedTipAmount.js +1 -1
  66. package/dist/cjs/getQrCodeValue.js +1 -1
  67. package/dist/cjs/getTaxAmount.js +1 -1
  68. package/dist/cjs/getTipAmount.js +1 -1
  69. package/dist/cjs/hasAmountToPay.js +14 -0
  70. package/dist/cjs/hasAmountToPay.js.map +1 -0
  71. package/dist/cjs/{index-1L4yyXWD.js → index-KqkPP267.js} +157 -39
  72. package/dist/cjs/index-KqkPP267.js.map +1 -0
  73. package/dist/cjs/index.js +13 -10
  74. package/dist/cjs/index.js.map +1 -1
  75. package/dist/cjs/{renderFunctions-B2zEhpSO.js → renderFunctions-JphAGmIF.js} +2 -2
  76. package/dist/cjs/{renderFunctions-B2zEhpSO.js.map → renderFunctions-JphAGmIF.js.map} +1 -1
  77. package/dist/cjs/{useAccountsApi-BucNBXKk.js → useAccountsApi-CgULdRoC.js} +2 -2
  78. package/dist/cjs/{useAccountsApi-BucNBXKk.js.map → useAccountsApi-CgULdRoC.js.map} +1 -1
  79. package/dist/cjs/{useIntegrationsApi-BHszs-M2.js → useIntegrationsApi-DW9jhoBZ.js} +2 -2
  80. package/dist/cjs/{useIntegrationsApi-BHszs-M2.js.map → useIntegrationsApi-DW9jhoBZ.js.map} +1 -1
  81. package/dist/cjs/{usePaymentApi-kQnd_kt3.js → usePaymentApi-B_4I2IeI.js} +2 -2
  82. package/dist/cjs/{usePaymentApi-kQnd_kt3.js.map → usePaymentApi-B_4I2IeI.js.map} +1 -1
  83. package/dist/cjs/{usePaymentApi-BSULbCh8.js → usePaymentApi-C90HGytr.js} +2 -2
  84. package/dist/cjs/{usePaymentApi-BSULbCh8.js.map → usePaymentApi-C90HGytr.js.map} +1 -1
  85. package/dist/cjs/{usePaymentApi-CnBeDZo6.js → usePaymentApi-NqLDfima.js} +2 -2
  86. package/dist/cjs/{usePaymentApi-CnBeDZo6.js.map → usePaymentApi-NqLDfima.js.map} +1 -1
  87. package/dist/cjs/{usePlatformApi-BhaBAUO9.js → usePlatformApi-Bctdu9kJ.js} +2 -2
  88. package/dist/cjs/{usePlatformApi-BhaBAUO9.js.map → usePlatformApi-Bctdu9kJ.js.map} +1 -1
  89. package/dist/cjs/useRazorpayPayment.js +2 -2
  90. package/dist/constants.js +1 -1
  91. package/dist/{dashboard-CLd-BWPH.js → dashboard-lpUpsbOR.js} +2 -2
  92. package/dist/{dashboard-CLd-BWPH.js.map → dashboard-lpUpsbOR.js.map} +1 -1
  93. package/dist/getAddressElementOptions.js +1 -1
  94. package/dist/getAmountInSmallestCurrencyUnit.js +1 -1
  95. package/dist/getAmountWithAppliedTax.js +1 -1
  96. package/dist/getFormattedAmount.js +1 -1
  97. package/dist/getFormattedDiscountedAmount.js +12 -0
  98. package/dist/getFormattedDiscountedAmount.js.map +1 -0
  99. package/dist/getFormattedDiscountedPercentage.js +12 -0
  100. package/dist/getFormattedDiscountedPercentage.js.map +1 -0
  101. package/dist/getFormattedTaxAmount.js +1 -1
  102. package/dist/getFormattedTipAmount.js +1 -1
  103. package/dist/getQrCodeValue.js +1 -1
  104. package/dist/getTaxAmount.js +1 -1
  105. package/dist/getTipAmount.js +1 -1
  106. package/dist/hasAmountToPay.js +12 -0
  107. package/dist/hasAmountToPay.js.map +1 -0
  108. package/dist/{index-DP5UOpg-.js → index-DWY7rHan.js} +155 -40
  109. package/dist/index-DWY7rHan.js.map +1 -0
  110. package/dist/index.js +10 -10
  111. package/dist/{renderFunctions-BQohRlkO.js → renderFunctions-DeEeLQ1Y.js} +2 -2
  112. package/dist/{renderFunctions-BQohRlkO.js.map → renderFunctions-DeEeLQ1Y.js.map} +1 -1
  113. package/dist/{useAccountsApi-BtfqlOGM.js → useAccountsApi-CaI8RHWs.js} +2 -2
  114. package/dist/{useAccountsApi-BtfqlOGM.js.map → useAccountsApi-CaI8RHWs.js.map} +1 -1
  115. package/dist/{useIntegrationsApi-BFnLyjT4.js → useIntegrationsApi-BjpHElsW.js} +2 -2
  116. package/dist/{useIntegrationsApi-BFnLyjT4.js.map → useIntegrationsApi-BjpHElsW.js.map} +1 -1
  117. package/dist/{usePaymentApi-DPSc1ubf.js → usePaymentApi-Db-yN9mj.js} +2 -2
  118. package/dist/{usePaymentApi-DPSc1ubf.js.map → usePaymentApi-Db-yN9mj.js.map} +1 -1
  119. package/dist/{usePaymentApi-Cc_n0glW.js → usePaymentApi-DhLuImJj.js} +2 -2
  120. package/dist/{usePaymentApi-Cc_n0glW.js.map → usePaymentApi-DhLuImJj.js.map} +1 -1
  121. package/dist/{usePaymentApi-CIuiVkKG.js → usePaymentApi-ot3RS5wt.js} +2 -2
  122. package/dist/{usePaymentApi-CIuiVkKG.js.map → usePaymentApi-ot3RS5wt.js.map} +1 -1
  123. package/dist/{usePlatformApi--E27mv8k.js → usePlatformApi-DsH6LPXK.js} +2 -2
  124. package/dist/{usePlatformApi--E27mv8k.js.map → usePlatformApi-DsH6LPXK.js.map} +1 -1
  125. package/dist/useRazorpayPayment.js +2 -2
  126. package/package.json +12 -11
  127. package/dist/cjs/index-1L4yyXWD.js.map +0 -1
  128. package/dist/index-DP5UOpg-.js.map +0 -1
@@ -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-CLd-BWPH.js';
12
+ import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-lpUpsbOR.js';
13
13
  import { e as exportChannel, T as TABLE_KEYS } from './exportChannel-h2JJKPT1.js';
14
14
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
15
15
  import Download from '@bigbinary/neeto-icons/Download';
16
16
  import Button from '@bigbinary/neetoui/Button';
17
17
  import Modal from '@bigbinary/neetoui/Modal';
18
- import { u as uuidV4, m as buildStripeAccountLink, n as DEFAULT_SORT_PROPERTIES, S as SORT_DIRECTIONS } from './index-DP5UOpg-.js';
18
+ import { u as uuidV4, p as buildStripeAccountLink, q as DEFAULT_SORT_PROPERTIES, S as SORT_DIRECTIONS } from './index-DWY7rHan.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, b as renderFullName, a as renderDate } from './renderFunctions-BQohRlkO.js';
25
+ import { r as renderStatus, b as renderFullName, a as renderDate } from './renderFunctions-DeEeLQ1Y.js';
26
26
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-B79WRogM.js';
27
27
  import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from '@bigbinary/neeto-commons-frontend/constants';
28
28
  import { useTableConfigurations } 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 useFetchConnectedAccounts } from './useAccountsApi-BtfqlOGM.js';
33
+ import { u as useFetchConnectedAccounts } from './useAccountsApi-CaI8RHWs.js';
34
34
  import '@tanstack/react-query';
35
35
  import '@tanstack/react-query-devtools';
36
36
  import 'axios';
@@ -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-DP5UOpg-.js';
9
+ import { B as BASE_URL } from './index-DWY7rHan.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-Cc_n0glW.js';
4
+ import { u as useCreateCashPayment } from './usePaymentApi-DhLuImJj.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-DP5UOpg-.js';
9
+ import './index-DWY7rHan.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-Cc_n0glW.js';
11
+ import { a as useUpdateCashPayment } from './usePaymentApi-DhLuImJj.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-DP5UOpg-.js';
16
+ import './index-DWY7rHan.js';
17
17
  import 'i18next';
18
18
  import '@bigbinary/neeto-commons-frontend/constants';
19
19
  import 'decimal.js';
@@ -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-DP5UOpg-.js';
9
+ import { B as BASE_URL } from './index-DWY7rHan.js';
10
10
  import { useQuery } from '@tanstack/react-query';
11
11
  import { isNotNil } from 'ramda';
12
12
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.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-DP5UOpg-.js';
13
+ import { B as BASE_URL, u as uuidV4 } from './index-DWY7rHan.js';
14
14
  import { e as exportChannel } from './exportChannel-h2JJKPT1.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-BpfgeWqd.js.map
131
+ //# sourceMappingURL=ExportModal-DaLJ7KS6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExportModal-BpfgeWqd.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,OAA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AACQ,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
+ {"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,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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bsC,GAAA,CAACE,UAAU,EAAA;AAACC,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;;;;"}
@@ -4,7 +4,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
6
6
  import axios from 'axios';
7
- import { B as BASE_URL } from './index-DP5UOpg-.js';
7
+ import { B as BASE_URL } from './index-DWY7rHan.js';
8
8
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.js';
9
9
  import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
10
10
  import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
@@ -7,8 +7,8 @@ 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 { u as useCreateUpiPayment } from './usePaymentApi-CIuiVkKG.js';
11
- import { i as getQrCodeValue } from './index-DP5UOpg-.js';
10
+ import { u as useCreateUpiPayment } from './usePaymentApi-ot3RS5wt.js';
11
+ import { l as getQrCodeValue } from './index-DWY7rHan.js';
12
12
  import { t } from 'i18next';
13
13
  import * as yup from 'yup';
14
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -10,7 +10,7 @@ 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 { a as useUpdateUpiPayment } from './usePaymentApi-CIuiVkKG.js';
13
+ import { a as useUpdateUpiPayment } from './usePaymentApi-ot3RS5wt.js';
14
14
  import { t } from 'i18next';
15
15
  import * as yup from 'yup';
16
16
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -19,7 +19,7 @@ import '@babel/runtime/helpers/defineProperty';
19
19
  import '@tanstack/react-query';
20
20
  import '@bigbinary/neeto-commons-frontend/react-utils';
21
21
  import 'axios';
22
- import './index-DP5UOpg-.js';
22
+ import './index-DWY7rHan.js';
23
23
  import '@bigbinary/neeto-commons-frontend/constants';
24
24
  import 'decimal.js';
25
25
  import '@bigbinary/neeto-commons-frontend/utils';
@@ -8,14 +8,14 @@ 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 useUpdateUpiPayment } from './usePaymentApi-CIuiVkKG.js';
11
+ import { a as useUpdateUpiPayment } from './usePaymentApi-ot3RS5wt.js';
12
12
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
13
13
  import '@babel/runtime/helpers/toConsumableArray';
14
14
  import '@babel/runtime/helpers/defineProperty';
15
15
  import '@tanstack/react-query';
16
16
  import '@bigbinary/neeto-commons-frontend/react-utils';
17
17
  import 'axios';
18
- import './index-DP5UOpg-.js';
18
+ import './index-DWY7rHan.js';
19
19
  import 'i18next';
20
20
  import '@bigbinary/neeto-commons-frontend/constants';
21
21
  import 'decimal.js';
@@ -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-BpfgeWqd.js';
11
+ import { E as ExportModal } from './ExportModal-DaLJ7KS6.js';
12
12
  import { useQuery } from '@tanstack/react-query';
13
13
  import axios from 'axios';
14
- import { B as BASE_URL, o as PAYMENT_PROVIDERS, D as DEFAULT_TAG_STYLE, p as formatAmount, q as formatCurrency, r as getUniquePaymentProviders, s as buildDefaultTableColumns, S as SORT_DIRECTIONS, t as processDataIndex, v as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, l as DEFAULT_PAGE_VALUES, w as DASHBOARD_KIND } from './index-DP5UOpg-.js';
14
+ import { B as BASE_URL, r as PAYMENT_PROVIDERS, D as DEFAULT_TAG_STYLE, s as formatAmount, t as formatCurrency, v as getUniquePaymentProviders, w as buildDefaultTableColumns, S as SORT_DIRECTIONS, x as processDataIndex, y as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, o as DEFAULT_PAGE_VALUES, z as DASHBOARD_KIND } from './index-DWY7rHan.js';
15
15
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.js';
16
16
  import { t } from 'i18next';
17
17
  import { toLabelAndValue, isNotPresent, snakeToCamelCase, humanize, isPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
@@ -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-CLd-BWPH.js';
11
+ import { u as useExportData, b as buildDefaultPageProperties, a as buildPayload, c as buildRowData, w as withReactQuery } from './dashboard-lpUpsbOR.js';
12
12
  import { e as exportChannel, T as TABLE_KEYS } from './exportChannel-h2JJKPT1.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
- import { u as uuidV4, n as DEFAULT_SORT_PROPERTIES$1, S as SORT_DIRECTIONS } from './index-DP5UOpg-.js';
17
+ import { u as uuidV4, q as DEFAULT_SORT_PROPERTIES$1, S as SORT_DIRECTIONS } from './index-DWY7rHan.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, a as renderDate } from './renderFunctions-BQohRlkO.js';
25
+ import { r as renderStatus, a as renderDate } from './renderFunctions-DeEeLQ1Y.js';
26
26
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-B79WRogM.js';
27
27
  import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from '@bigbinary/neeto-commons-frontend/constants';
28
28
  import { useTableConfigurations } 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 { b as useFetchStripePayouts, c as useFetchStripePlatformPayouts } from './usePlatformApi--E27mv8k.js';
33
+ import { b as useFetchStripePayouts, c as useFetchStripePlatformPayouts } from './usePlatformApi-DsH6LPXK.js';
34
34
  import '@tanstack/react-query';
35
35
  import '@tanstack/react-query-devtools';
36
36
  import 'axios';
@@ -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, a as renderDate } from './renderFunctions-BQohRlkO.js';
8
- import { u as useShowStripePayout, a as useShowStripePlatformPayout } from './usePlatformApi--E27mv8k.js';
7
+ import { r as renderStatus, a as renderDate } from './renderFunctions-DeEeLQ1Y.js';
8
+ import { u as useShowStripePayout, a as useShowStripePlatformPayout } from './usePlatformApi-DsH6LPXK.js';
9
9
  import Button from '@bigbinary/neetoui/Button';
10
10
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-B79WRogM.js';
11
- import { k as buildStripePayoutLink } from './index-DP5UOpg-.js';
11
+ import { n as buildStripePayoutLink } from './index-DWY7rHan.js';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
13
  import 'i18next';
14
14
  import '@bigbinary/neeto-molecules/DateFormat';
@@ -13,9 +13,9 @@ import Spinner from '@bigbinary/neetoui/Spinner';
13
13
  import Button from '@bigbinary/neetoui/Button';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useHistory } from 'react-router-dom';
16
- import { u as useFetchPaymentIntegrations } from './useIntegrationsApi-BFnLyjT4.js';
16
+ import { u as useFetchPaymentIntegrations } from './useIntegrationsApi-BjpHElsW.js';
17
17
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.js';
18
- import { E as ERROR_TYPE, M as MAX_POLLING_TIME, P as POLLING_INTERVAL } from './index-DP5UOpg-.js';
18
+ import { E as ERROR_TYPE, M as MAX_POLLING_TIME, P as POLLING_INTERVAL } from './index-DWY7rHan.js';
19
19
  import { jsxs, jsx } from 'react/jsx-runtime';
20
20
  import '@babel/runtime/helpers/defineProperty';
21
21
  import 'axios';
@@ -39,7 +39,8 @@ var RazorpayConnect = function RazorpayConnect(_ref) {
39
39
  var history = useHistory();
40
40
  var _useQueryParams = useQueryParams(),
41
41
  error = _useQueryParams.error,
42
- errorDescription = _useQueryParams.errorDescription;
42
+ _useQueryParams$error = _useQueryParams.errorDescription,
43
+ errorDescription = _useQueryParams$error === void 0 ? "" : _useQueryParams$error;
43
44
  var refetchInterval = function refetchInterval(query) {
44
45
  var _ref2 = query.state.data || {},
45
46
  razorpayAccount = _ref2.razorpayAccount;
@@ -1 +1 @@
1
- {"version":3,"file":"RazorpayConnect.js","sources":["../app/javascript/src/components/RazorpayConnect.jsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { isPresent, humanize, isNotPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { Razorpay as RazorpayIcon } from \"neetoicons/misc\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { Typography, Callout, Spinner, Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchPaymentIntegrations } from \"hooks/reactQuery/useIntegrationsApi\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\nimport { ERROR_TYPE, POLLING_INTERVAL, MAX_POLLING_TIME } from \"src/constants\";\n\nconst RazorpayConnect = ({ baseRoute, manageRoute, breadcrumbs }) => {\n const queryClient = useQueryClient();\n const [isPolling, setIsPolling] = useState(false);\n const { t } = useTranslation();\n const history = useHistory();\n const { error, errorDescription } = useQueryParams();\n\n const refetchInterval = query => {\n const { razorpayAccount } = query.state.data || {};\n\n if (!razorpayAccount?.isConnected && isPolling) {\n return POLLING_INTERVAL;\n }\n\n if (razorpayAccount?.isConnected) {\n setIsPolling(false);\n history.push(manageRoute);\n }\n\n return false;\n };\n\n const { data: { razorpayAccount } = {} } = useFetchPaymentIntegrations({\n refetchInterval,\n enabled: isNotPresent(error),\n });\n\n const errorMessage =\n error === ERROR_TYPE.processing_error\n ? errorDescription\n : humanize(errorDescription);\n\n const isAccountProcessingFailed =\n (isPresent(error) && isPresent(errorDescription)) ||\n (!isPolling && !razorpayAccount?.isConnected);\n\n const handleRetry = () => {\n queryClient.invalidateQueries({\n queryKey: [QUERY_KEYS.PAYMENT_INTEGRATION_LIST],\n });\n history.push(baseRoute);\n };\n\n useEffect(() => {\n if (razorpayAccount?.isConnected) {\n history.push(manageRoute);\n }\n\n if (isNotPresent(error)) {\n setIsPolling(true);\n }\n\n const pollingTimeoutId = setTimeout(() => {\n setIsPolling(false);\n }, MAX_POLLING_TIME);\n\n return () => {\n clearTimeout(pollingTimeoutId);\n };\n }, []);\n\n return (\n <Container>\n <Header {...{ breadcrumbs }} title={t(\"neetoPayments.common.connect\")} />\n <CardLayout\n icon={<RazorpayIcon size={48} />}\n title={t(\"neetoPayments.razorpayConnect.title\")}\n actionBlock={\n isAccountProcessingFailed && (\n <Button\n label={t(\"neetoPayments.common.tryAgain\")}\n onClick={handleRetry}\n />\n )\n }\n description={\n isAccountProcessingFailed &&\n t(\"neetoPayments.common.processingFailed\")\n }\n >\n {isPolling && (\n <Callout>\n <div className=\"flex space-x-4\">\n <Spinner />\n <Typography style=\"body1\">\n {t(\"neetoPayments.stripeConnect.verifyingMessage\")}\n </Typography>\n </div>\n </Callout>\n )}\n {isAccountProcessingFailed && (\n <Callout style=\"danger\">\n <Typography style=\"body1\">\n {isPresent(errorDescription)\n ? errorMessage\n : t(\"neetoPayments.stripeConnect.failedProcessing\")}\n </Typography>\n </Callout>\n )}\n </CardLayout>\n </Container>\n );\n};\n\nexport default RazorpayConnect;\n"],"names":["RazorpayConnect","_ref","baseRoute","manageRoute","breadcrumbs","queryClient","useQueryClient","_useState","useState","_useState2","_slicedToArray","isPolling","setIsPolling","_useTranslation","useTranslation","t","history","useHistory","_useQueryParams","useQueryParams","error","errorDescription","refetchInterval","query","_ref2","state","data","razorpayAccount","isConnected","POLLING_INTERVAL","push","_useFetchPaymentInteg","useFetchPaymentIntegrations","enabled","isNotPresent","_useFetchPaymentInteg2","_useFetchPaymentInteg3","errorMessage","ERROR_TYPE","processing_error","humanize","isAccountProcessingFailed","isPresent","handleRetry","invalidateQueries","queryKey","QUERY_KEYS","PAYMENT_INTEGRATION_LIST","useEffect","pollingTimeoutId","setTimeout","MAX_POLLING_TIME","clearTimeout","_jsxs","Container","children","_jsx","Header","title","CardLayout","icon","RazorpayIcon","size","actionBlock","Button","label","onClick","description","Callout","className","Spinner","Typography","style"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAgD;AAAA,EAAA,IAA1CC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAEC,WAAW,GAAAH,IAAA,CAAXG,WAAW;AAC5D,EAAA,IAAMC,WAAW,GAAGC,cAAc,EAAE;AACpC,EAAA,IAAAC,SAAA,GAAkC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,CAAC,CAAC,8BAA8B;AAAE,KAAE,CAAC,eACzEsC,IAAA,CAACM,UAAU,EAAA;MACTC,IAAI,eAAEJ,GAAA,CAACK,YAAY,EAAA;AAACC,QAAAA,IAAI,EAAE;AAAG,OAAE,CAAE;AACjCJ,MAAAA,KAAK,EAAE3C,CAAC,CAAC,qCAAqC,CAAE;AAChDgD,MAAAA,WAAW,EACTtB,yBAAyB,iBACvBe,GAAA,CAACQ,MAAM,EAAA;AACLC,QAAAA,KAAK,EAAElD,CAAC,CAAC,+BAA+B,CAAE;AAC1CmD,QAAAA,OAAO,EAAEvB;AAAY,OACtB,CAEJ;AACDwB,MAAAA,WAAW,EACT1B,yBAAyB,IACzB1B,CAAC,CAAC,uCAAuC,CAC1C;AAAAwC,MAAAA,QAAA,EAEA5C,CAAAA,SAAS,iBACR6C,GAAA,CAACY,OAAO,EAAA;AAAAb,QAAAA,QAAA,eACNF,IAAA,CAAA,KAAA,EAAA;AAAKgB,UAAAA,SAAS,EAAC,gBAAgB;UAAAd,QAAA,EAAA,cAC7BC,GAAA,CAACc,OAAO,IAAE,CAAC,eACXd,GAAA,CAACe,UAAU,EAAA;AAACC,YAAAA,KAAK,EAAC,OAAO;YAAAjB,QAAA,EACtBxC,CAAC,CAAC,8CAA8C;AAAC,WACxC,CAAC;SACV;AAAC,OACC,CACV,EACA0B,yBAAyB,iBACxBe,GAAA,CAACY,OAAO,EAAA;AAACI,QAAAA,KAAK,EAAC,QAAQ;QAAAjB,QAAA,eACrBC,GAAA,CAACe,UAAU,EAAA;AAACC,UAAAA,KAAK,EAAC,OAAO;UAAAjB,QAAA,EACtBb,SAAS,CAACrB,gBAAgB,CAAC,GACxBgB,YAAY,GACZtB,CAAC,CAAC,8CAA8C;SAC1C;AAAC,OACN,CACV;AAAA,KACS,CAAC;AAAA,GACJ,CAAC;AAEhB;;;;"}
1
+ {"version":3,"file":"RazorpayConnect.js","sources":["../app/javascript/src/components/RazorpayConnect.jsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { isPresent, humanize, isNotPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { Razorpay as RazorpayIcon } from \"neetoicons/misc\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { Typography, Callout, Spinner, Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchPaymentIntegrations } from \"hooks/reactQuery/useIntegrationsApi\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\nimport { ERROR_TYPE, POLLING_INTERVAL, MAX_POLLING_TIME } from \"src/constants\";\n\nconst RazorpayConnect = ({ baseRoute, manageRoute, breadcrumbs }) => {\n const queryClient = useQueryClient();\n const [isPolling, setIsPolling] = useState(false);\n const { t } = useTranslation();\n const history = useHistory();\n const { error, errorDescription = \"\" } = useQueryParams();\n\n const refetchInterval = query => {\n const { razorpayAccount } = query.state.data || {};\n\n if (!razorpayAccount?.isConnected && isPolling) {\n return POLLING_INTERVAL;\n }\n\n if (razorpayAccount?.isConnected) {\n setIsPolling(false);\n history.push(manageRoute);\n }\n\n return false;\n };\n\n const { data: { razorpayAccount } = {} } = useFetchPaymentIntegrations({\n refetchInterval,\n enabled: isNotPresent(error),\n });\n\n const errorMessage =\n error === ERROR_TYPE.processing_error\n ? errorDescription\n : humanize(errorDescription);\n\n const isAccountProcessingFailed =\n (isPresent(error) && isPresent(errorDescription)) ||\n (!isPolling && !razorpayAccount?.isConnected);\n\n const handleRetry = () => {\n queryClient.invalidateQueries({\n queryKey: [QUERY_KEYS.PAYMENT_INTEGRATION_LIST],\n });\n history.push(baseRoute);\n };\n\n useEffect(() => {\n if (razorpayAccount?.isConnected) {\n history.push(manageRoute);\n }\n\n if (isNotPresent(error)) {\n setIsPolling(true);\n }\n\n const pollingTimeoutId = setTimeout(() => {\n setIsPolling(false);\n }, MAX_POLLING_TIME);\n\n return () => {\n clearTimeout(pollingTimeoutId);\n };\n }, []);\n\n return (\n <Container>\n <Header {...{ breadcrumbs }} title={t(\"neetoPayments.common.connect\")} />\n <CardLayout\n icon={<RazorpayIcon size={48} />}\n title={t(\"neetoPayments.razorpayConnect.title\")}\n actionBlock={\n isAccountProcessingFailed && (\n <Button\n label={t(\"neetoPayments.common.tryAgain\")}\n onClick={handleRetry}\n />\n )\n }\n description={\n isAccountProcessingFailed &&\n t(\"neetoPayments.common.processingFailed\")\n }\n >\n {isPolling && (\n <Callout>\n <div className=\"flex space-x-4\">\n <Spinner />\n <Typography style=\"body1\">\n {t(\"neetoPayments.stripeConnect.verifyingMessage\")}\n </Typography>\n </div>\n </Callout>\n )}\n {isAccountProcessingFailed && (\n <Callout style=\"danger\">\n <Typography style=\"body1\">\n {isPresent(errorDescription)\n ? errorMessage\n : t(\"neetoPayments.stripeConnect.failedProcessing\")}\n </Typography>\n </Callout>\n )}\n </CardLayout>\n </Container>\n );\n};\n\nexport default RazorpayConnect;\n"],"names":["RazorpayConnect","_ref","baseRoute","manageRoute","breadcrumbs","queryClient","useQueryClient","_useState","useState","_useState2","_slicedToArray","isPolling","setIsPolling","_useTranslation","useTranslation","t","history","useHistory","_useQueryParams","useQueryParams","error","_useQueryParams$error","errorDescription","refetchInterval","query","_ref2","state","data","razorpayAccount","isConnected","POLLING_INTERVAL","push","_useFetchPaymentInteg","useFetchPaymentIntegrations","enabled","isNotPresent","_useFetchPaymentInteg2","_useFetchPaymentInteg3","errorMessage","ERROR_TYPE","processing_error","humanize","isAccountProcessingFailed","isPresent","handleRetry","invalidateQueries","queryKey","QUERY_KEYS","PAYMENT_INTEGRATION_LIST","useEffect","pollingTimeoutId","setTimeout","MAX_POLLING_TIME","clearTimeout","_jsxs","Container","children","_jsx","Header","title","CardLayout","icon","RazorpayIcon","size","actionBlock","Button","label","onClick","description","Callout","className","Spinner","Typography","style"],"mappings":";;;;;;;;;;;;;;;;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O,EAAA;AAACI,QAAAA,KAAK,EAAC,QAAQ;QAAAjB,QAAA,eACrBC,GAAA,CAACe,UAAU,EAAA;AAACC,UAAAA,KAAK,EAAC,OAAO;UAAAjB,QAAA,EACtBb,SAAS,CAACrB,gBAAgB,CAAC,GACxBgB,YAAY,GACZvB,CAAC,CAAC,8CAA8C;SAC1C;AAAC,OACN,CACV;AAAA,KACS,CAAC;AAAA,GACJ,CAAC;AAEhB;;;;"}
@@ -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-DPSc1ubf.js';
8
- import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-DP5UOpg-.js';
7
+ import { u as useCreateRazorpayPayment } from './usePaymentApi-Db-yN9mj.js';
8
+ import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-DWY7rHan.js';
9
9
  import { jsx } from 'react/jsx-runtime';
10
10
  import '@babel/runtime/helpers/defineProperty';
11
11
  import '@tanstack/react-query';
@@ -38,8 +38,6 @@ var RazorpayPaymentButton = function RazorpayPaymentButton(_ref) {
38
38
  isLoading = _ref.isLoading,
39
39
  name = _ref.name,
40
40
  tip = _ref.tip,
41
- _ref$isCardPreservabl = _ref.isCardPreservable,
42
- isCardPreservable = _ref$isCardPreservabl === void 0 ? false : _ref$isCardPreservabl,
43
41
  _ref$theme = _ref.theme,
44
42
  theme = _ref$theme === void 0 ? {} : _ref$theme,
45
43
  _ref$payableType = _ref.payableType,
@@ -94,14 +92,13 @@ var RazorpayPaymentButton = function RazorpayPaymentButton(_ref) {
94
92
  if ((payment === null || payment === void 0 ? void 0 : payment.status) === "successful") {
95
93
  return onSuccessfulPayment();
96
94
  }
97
- var save = isCardPreservable ? 1 : 0;
98
95
  var themePrimaryColor = (_findBy = findBy({
99
96
  key: "primary_color"
100
97
  }, theme === null || theme === void 0 ? void 0 : theme.properties)) === null || _findBy === void 0 ? void 0 : _findBy.value;
101
98
  var options = {
102
- save: save,
103
99
  key: payment.publicKey,
104
100
  order_id: payment.orderIdentifier,
101
+ remember_customer: true,
105
102
  customer_id: payment.customerIdentifier,
106
103
  prefill: {
107
104
  name: name,
@@ -1 +1 @@
1
- {"version":3,"file":"RazorpayPaymentButton.js","sources":["../app/javascript/src/components/RazorpayPaymentButton.jsx"],"sourcesContent":["import { isNotPresent, noop, findBy } from \"neetocist\";\nimport { Button } from \"neetoui\";\nimport { mergeDeepLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateRazorpayPayment } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { RAZORPAY_PAYMENT_BUTTON_OPTIONS } from \"src/constants\";\n\nconst loadScript = src =>\n new Promise(resolve => {\n const script = document.createElement(\"script\");\n script.src = src;\n script.onload = () => {\n resolve(true);\n };\n\n script.onerror = () => {\n resolve(false);\n };\n document.body.appendChild(script);\n });\n\nconst RazorpayPaymentButton = ({\n label,\n payableId,\n discountCode,\n email,\n customAmount,\n isDisabled,\n isLoading,\n name,\n tip,\n isCardPreservable = false,\n theme = {},\n payableType = null,\n onBeforePayment = noop,\n onSuccessfulPayment = noop,\n onFailedPayment = noop,\n}) => {\n const { t } = useTranslation();\n\n const openRazorpayCheckout = async options => {\n const script = await loadScript(\n \"https://checkout.razorpay.com/v1/checkout.js\"\n );\n\n if (!script) {\n logger.error(t(\"neetoPayments.razorpay.loadError\"));\n\n return;\n }\n const checkout = new window.Razorpay(options);\n checkout.open();\n };\n\n const handlePayment = response => {\n if (isNotPresent(response?.razorpay_signature)) {\n onFailedPayment();\n\n return;\n }\n\n onSuccessfulPayment();\n };\n\n const handleSuccess = ({ payment }) => {\n if (payment?.status === \"successful\") {\n return onSuccessfulPayment();\n }\n\n const save = isCardPreservable ? 1 : 0;\n const themePrimaryColor = findBy(\n { key: \"primary_color\" },\n theme?.properties\n )?.value;\n\n const options = {\n save,\n key: payment.publicKey,\n order_id: payment.orderIdentifier,\n customer_id: payment.customerIdentifier,\n prefill: { name, email },\n modal: { confirm_close: true, ondismiss: onFailedPayment },\n handler: handlePayment,\n theme: { color: themePrimaryColor ?? \"#0da84c\" },\n };\n\n return openRazorpayCheckout(\n mergeDeepLeft(RAZORPAY_PAYMENT_BUTTON_OPTIONS, options)\n );\n };\n\n const { isPending, mutate: createRazorpayOrder } = useCreateRazorpayPayment({\n onSuccess: handleSuccess,\n });\n\n const handleClick = () => {\n onBeforePayment();\n const payload = {\n payableId,\n payableType,\n discountCode,\n customAmount,\n customerAttributes: { email, name },\n tipAttributes: tip,\n };\n createRazorpayOrder(payload);\n };\n\n return (\n <Button\n disabled={isPending || isDisabled}\n label={label || t(\"neetoPayments.common.pay\")}\n loading={isPending || isLoading}\n onClick={handleClick}\n />\n );\n};\n\nexport default RazorpayPaymentButton;\n"],"names":["loadScript","src","Promise","resolve","script","document","createElement","onload","onerror","body","appendChild","RazorpayPaymentButton","_ref","label","payableId","discountCode","email","customAmount","isDisabled","isLoading","name","tip","_ref$isCardPreservabl","isCardPreservable","_ref$theme","theme","_ref$payableType","payableType","_ref$onBeforePayment","onBeforePayment","noop","_ref$onSuccessfulPaym","onSuccessfulPayment","_ref$onFailedPayment","onFailedPayment","_useTranslation","useTranslation","t","openRazorpayCheckout","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","options","checkout","wrap","_callee$","_context","prev","next","sent","logger","error","abrupt","window","Razorpay","open","stop","_x","apply","arguments","handlePayment","response","isNotPresent","razorpay_signature","handleSuccess","_ref3","_findBy","payment","status","save","themePrimaryColor","findBy","key","properties","value","publicKey","order_id","orderIdentifier","customer_id","customerIdentifier","prefill","modal","confirm_close","ondismiss","handler","color","mergeDeepLeft","RAZORPAY_PAYMENT_BUTTON_OPTIONS","_useCreateRazorpayPay","useCreateRazorpayPayment","onSuccess","isPending","createRazorpayOrder","mutate","handle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F,MAAAA,kBAAkB,EAAE;AAAElF,QAAAA,KAAK,EAALA,KAAK;AAAEI,QAAAA,IAAI,EAAJA;OAAM;AACnC+E,MAAAA,aAAa,EAAE9E;KAChB;IACDyE,mBAAmB,CAACG,OAAO,CAAC;GAC7B;EAED,oBACEG,GAAA,CAACC,MAAM,EAAA;IACLC,QAAQ,EAAET,SAAS,IAAI3E,UAAW;AAClCL,IAAAA,KAAK,EAAEA,KAAK,IAAIwB,CAAC,CAAC,0BAA0B,CAAE;IAC9CkE,OAAO,EAAEV,SAAS,IAAI1E,SAAU;AAChCqF,IAAAA,OAAO,EAAER;AAAY,GACtB,CAAC;AAEN;;;;"}
1
+ {"version":3,"file":"RazorpayPaymentButton.js","sources":["../app/javascript/src/components/RazorpayPaymentButton.jsx"],"sourcesContent":["import { isNotPresent, noop, findBy } from \"neetocist\";\nimport { Button } from \"neetoui\";\nimport { mergeDeepLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateRazorpayPayment } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { RAZORPAY_PAYMENT_BUTTON_OPTIONS } from \"src/constants\";\n\nconst loadScript = src =>\n new Promise(resolve => {\n const script = document.createElement(\"script\");\n script.src = src;\n script.onload = () => {\n resolve(true);\n };\n\n script.onerror = () => {\n resolve(false);\n };\n document.body.appendChild(script);\n });\n\nconst RazorpayPaymentButton = ({\n label,\n payableId,\n discountCode,\n email,\n customAmount,\n isDisabled,\n isLoading,\n name,\n tip,\n theme = {},\n payableType = null,\n onBeforePayment = noop,\n onSuccessfulPayment = noop,\n onFailedPayment = noop,\n}) => {\n const { t } = useTranslation();\n\n const openRazorpayCheckout = async options => {\n const script = await loadScript(\n \"https://checkout.razorpay.com/v1/checkout.js\"\n );\n\n if (!script) {\n logger.error(t(\"neetoPayments.razorpay.loadError\"));\n\n return;\n }\n const checkout = new window.Razorpay(options);\n checkout.open();\n };\n\n const handlePayment = response => {\n if (isNotPresent(response?.razorpay_signature)) {\n onFailedPayment();\n\n return;\n }\n\n onSuccessfulPayment();\n };\n\n const handleSuccess = ({ payment }) => {\n if (payment?.status === \"successful\") {\n return onSuccessfulPayment();\n }\n\n const themePrimaryColor = findBy(\n { key: \"primary_color\" },\n theme?.properties\n )?.value;\n\n const options = {\n key: payment.publicKey,\n order_id: payment.orderIdentifier,\n remember_customer: true,\n customer_id: payment.customerIdentifier,\n prefill: { name, email },\n modal: { confirm_close: true, ondismiss: onFailedPayment },\n handler: handlePayment,\n theme: { color: themePrimaryColor ?? \"#0da84c\" },\n };\n\n return openRazorpayCheckout(\n mergeDeepLeft(RAZORPAY_PAYMENT_BUTTON_OPTIONS, options)\n );\n };\n\n const { isPending, mutate: createRazorpayOrder } = useCreateRazorpayPayment({\n onSuccess: handleSuccess,\n });\n\n const handleClick = () => {\n onBeforePayment();\n const payload = {\n payableId,\n payableType,\n discountCode,\n customAmount,\n customerAttributes: { email, name },\n tipAttributes: tip,\n };\n createRazorpayOrder(payload);\n };\n\n return (\n <Button\n disabled={isPending || isDisabled}\n label={label || t(\"neetoPayments.common.pay\")}\n loading={isPending || isLoading}\n onClick={handleClick}\n />\n );\n};\n\nexport default RazorpayPaymentButton;\n"],"names":["loadScript","src","Promise","resolve","script","document","createElement","onload","onerror","body","appendChild","RazorpayPaymentButton","_ref","label","payableId","discountCode","email","customAmount","isDisabled","isLoading","name","tip","_ref$theme","theme","_ref$payableType","payableType","_ref$onBeforePayment","onBeforePayment","noop","_ref$onSuccessfulPaym","onSuccessfulPayment","_ref$onFailedPayment","onFailedPayment","_useTranslation","useTranslation","t","openRazorpayCheckout","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","options","checkout","wrap","_callee$","_context","prev","next","sent","logger","error","abrupt","window","Razorpay","open","stop","_x","apply","arguments","handlePayment","response","isNotPresent","razorpay_signature","handleSuccess","_ref3","_findBy","payment","status","themePrimaryColor","findBy","key","properties","value","publicKey","order_id","orderIdentifier","remember_customer","customer_id","customerIdentifier","prefill","modal","confirm_close","ondismiss","handler","color","mergeDeepLeft","RAZORPAY_PAYMENT_BUTTON_OPTIONS","_useCreateRazorpayPay","useCreateRazorpayPayment","onSuccess","isPending","createRazorpayOrder","mutate","handleClick","payload","customerAttributes","tipAttributes","_jsx","Button","disabled","loading","onClick"],"mappings":";;;;;;;;;;;;;;;;;AAQA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAGC,GAAG,EAAA;AAAA,EAAA,OACpB,IAAIC,OAAO,CAAC,UAAAC,OAAO,EAAI;AACrB,IAAA,IAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IAC/CF,MAAM,CAACH,GAAG,GAAGA,GAAG;IAChBG,MAAM,CAACG,MAAM,GAAG,YAAM;MACpBJ,OAAO,CAAC,IAAI,CAAC;KACd;IAEDC,MAAM,CAACI,OAAO,GAAG,YAAM;MACrBL,OAAO,CAAC,KAAK,CAAC;KACf;AACDE,IAAAA,QAAQ,CAACI,IAAI,CAACC,WAAW,CAACN,MAAM,CAAC;AACnC,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMO,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAerB;AAAA,EAAA,IAdJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IACZC,UAAU,GAAAN,IAAA,CAAVM,UAAU;IACVC,SAAS,GAAAP,IAAA,CAATO,SAAS;IACTC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IACJC,GAAG,GAAAT,IAAA,CAAHS,GAAG;IAAAC,UAAA,GAAAV,IAAA,CACHW,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,UAAA;IAAAE,gBAAA,GAAAZ,I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AAA,IAAI,EAAJA;OAAM;AACnC6E,MAAAA,aAAa,EAAE5E;KAChB;IACDuE,mBAAmB,CAACG,OAAO,CAAC;GAC7B;EAED,oBACEG,GAAA,CAACC,MAAM,EAAA;IACLC,QAAQ,EAAET,SAAS,IAAIzE,UAAW;AAClCL,IAAAA,KAAK,EAAEA,KAAK,IAAIsB,CAAC,CAAC,0BAA0B,CAAE;IAC9CkE,OAAO,EAAEV,SAAS,IAAIxE,SAAU;AAChCmF,IAAAA,OAAO,EAAER;AAAY,GACtB,CAAC;AAEN;;;;"}
@@ -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-DP5UOpg-.js';
17
+ import { B as BASE_URL } from './index-DWY7rHan.js';
18
18
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.js';
19
19
  import { t } from 'i18next';
20
20
  import * as yup from 'yup';
@@ -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-BpfgeWqd.js';
11
+ import { E as ExportModal } from './ExportModal-DaLJ7KS6.js';
12
12
  import { useQuery } from '@tanstack/react-query';
13
13
  import axios from 'axios';
14
- import { B as BASE_URL, o as PAYMENT_PROVIDERS, D as DEFAULT_TAG_STYLE, p as formatAmount, q as formatCurrency, s as buildDefaultTableColumns, S as SORT_DIRECTIONS, t as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, n as DEFAULT_SORT_PROPERTIES, v as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, l as DEFAULT_PAGE_VALUES, w as DASHBOARD_KIND } from './index-DP5UOpg-.js';
14
+ import { B as BASE_URL, r as PAYMENT_PROVIDERS, D as DEFAULT_TAG_STYLE, s as formatAmount, t as formatCurrency, w as buildDefaultTableColumns, S as SORT_DIRECTIONS, x as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, q as DEFAULT_SORT_PROPERTIES, y as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, o as DEFAULT_PAGE_VALUES, z as DASHBOARD_KIND } from './index-DWY7rHan.js';
15
15
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.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-BpfgeWqd.js';
11
+ import { E as ExportModal } from './ExportModal-DaLJ7KS6.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, y as preProcessStatus, z as getTagStyle, p as formatAmount, q as formatCurrency, F as PAYMENT_KIND, S as SORT_DIRECTIONS, t as processDataIndex, n as DEFAULT_SORT_PROPERTIES, v as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, l as DEFAULT_PAGE_VALUES, w as DASHBOARD_KIND } from './index-DP5UOpg-.js';
15
+ import { B as BASE_URL, G as preProcessStatus, H as getTagStyle, s as formatAmount, t as formatCurrency, I as PAYMENT_KIND, S as SORT_DIRECTIONS, x as processDataIndex, q as DEFAULT_SORT_PROPERTIES, y as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, o as DEFAULT_PAGE_VALUES, z as DASHBOARD_KIND } from './index-DWY7rHan.js';
16
16
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.js';
17
17
  import Modal from '@bigbinary/neetoui/Modal';
18
18
  import Typography from '@bigbinary/neetoui/Typography';
@@ -6,7 +6,7 @@ import { useQuery } from '@tanstack/react-query';
6
6
  import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
7
7
  import { isNotNil } from 'ramda';
8
8
  import axios from 'axios';
9
- import { B as BASE_URL } from './index-DP5UOpg-.js';
9
+ import { B as BASE_URL } from './index-DWY7rHan.js';
10
10
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.js';
11
11
  import { jsxs, jsx } from 'react/jsx-runtime';
12
12
  import 'i18next';
@@ -11,8 +11,8 @@ import Stripe from '@bigbinary/neeto-icons/misc/Stripe';
11
11
  import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
12
12
  import Radio from '@bigbinary/neetoui/Radio';
13
13
  import Button from '@bigbinary/neetoui/Button';
14
- import { u as useFetchPaymentIntegrations } from './useIntegrationsApi-BFnLyjT4.js';
15
- import { x as STRIPE_CONNECT_ENDPOINT, B as BASE_URL, P as POLLING_INTERVAL, E as ERROR_TYPE, M as MAX_POLLING_TIME } from './index-DP5UOpg-.js';
14
+ import { u as useFetchPaymentIntegrations } from './useIntegrationsApi-BjpHElsW.js';
15
+ import { F as STRIPE_CONNECT_ENDPOINT, B as BASE_URL, P as POLLING_INTERVAL, E as ERROR_TYPE, M as MAX_POLLING_TIME } from './index-DWY7rHan.js';
16
16
  import { t } from 'i18next';
17
17
  import * as yup from 'yup';
18
18
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -20,7 +20,7 @@ import Spinner from '@bigbinary/neetoui/Spinner';
20
20
  import Select from '@bigbinary/neetoui/formik/Select';
21
21
  import Form from '@bigbinary/neetoui/formik/Form';
22
22
  import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
23
- import { a as useCreateStripeAccount, b as usePollingStripeAccountCreationStatus } from './useAccountsApi-BtfqlOGM.js';
23
+ import { a as useCreateStripeAccount, b as usePollingStripeAccountCreationStatus } from './useAccountsApi-CaI8RHWs.js';
24
24
  import { useQuery, useQueryClient } from '@tanstack/react-query';
25
25
  import axios from 'axios';
26
26
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.js';
@@ -12,7 +12,7 @@ import '@babel/runtime/helpers/defineProperty';
12
12
  import '@tanstack/react-query';
13
13
  import 'ramda';
14
14
  import 'axios';
15
- import './index-DP5UOpg-.js';
15
+ import './index-DWY7rHan.js';
16
16
  import 'i18next';
17
17
  import '@bigbinary/neeto-commons-frontend/constants';
18
18
  import 'decimal.js';
@@ -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-DP5UOpg-.js';
18
+ import { B as BASE_URL } from './index-DWY7rHan.js';
19
19
  import { Q as QUERY_KEYS } from './queryConstants-aYVM1oL2.js';
20
20
  import Label from '@bigbinary/neetoui/Label';
21
21
  import Typography from '@bigbinary/neetoui/Typography';
@@ -1,4 +1,4 @@
1
- import { b as buildStripeTransactionLink } from './index-DP5UOpg-.js';
1
+ import { b as buildStripeTransactionLink } from './index-DWY7rHan.js';
2
2
  import 'i18next';
3
3
  import '@bigbinary/neeto-commons-frontend/constants';
4
4
  import 'decimal.js';
@@ -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-BTXVWygp.js');
14
+ var dashboard = require('./dashboard-DLj_eVV0.js');
15
15
  var exportChannel = require('./exportChannel-BB1psKzT.js');
16
16
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
17
17
  var Download = require('@bigbinary/neeto-icons/Download');
18
18
  var Button = require('@bigbinary/neetoui/Button');
19
19
  var Modal = require('@bigbinary/neetoui/Modal');
20
- var constants = require('./index-1L4yyXWD.js');
20
+ var constants = require('./index-KqkPP267.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-B2zEhpSO.js');
27
+ var renderFunctions = require('./renderFunctions-JphAGmIF.js');
28
28
  var CopyButtonWrapper = require('./CopyButtonWrapper-CzQmYDby.js');
29
29
  var constants$1 = require('@bigbinary/neeto-commons-frontend/constants');
30
30
  var Columns = require('@bigbinary/neeto-molecules/Columns');
@@ -32,7 +32,7 @@ var TableWrapper = require('@bigbinary/neeto-molecules/TableWrapper');
32
32
  var Table = require('@bigbinary/neetoui/Table');
33
33
  var NoData = require('@bigbinary/neetoui/NoData');
34
34
  var Spinner = require('@bigbinary/neetoui/Spinner');
35
- var useAccountsApi = require('./useAccountsApi-BucNBXKk.js');
35
+ var useAccountsApi = require('./useAccountsApi-CgULdRoC.js');
36
36
  require('@tanstack/react-query');
37
37
  require('@tanstack/react-query-devtools');
38
38
  require('axios');
@@ -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-1L4yyXWD.js');
11
+ var constants = require('./index-KqkPP267.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-kQnd_kt3.js');
6
+ var usePaymentApi = require('./usePaymentApi-B_4I2IeI.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-1L4yyXWD.js');
11
+ require('./index-KqkPP267.js');
12
12
  require('i18next');
13
13
  require('@bigbinary/neeto-commons-frontend/constants');
14
14
  require('decimal.js');