@bigbinary/neeto-payments-frontend 6.3.7 → 6.4.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 (139) hide show
  1. package/dist/AccountsDashboard.js +5 -5
  2. package/dist/AdminCancelRecurringPaymentButton.js +2 -2
  3. package/dist/CashPaymentButton.js +2 -2
  4. package/dist/ConfirmCashPaymentButton.js +2 -2
  5. package/dist/CustomerCancelRecurringPaymentForm.js +2 -2
  6. package/dist/{ExportModal-k--5vSLt.js → ExportModal-Imx5pEqt.js} +3 -3
  7. package/dist/{ExportModal-k--5vSLt.js.map → ExportModal-Imx5pEqt.js.map} +1 -1
  8. package/dist/{ExportModal-Bun3pMGn.js → ExportModal-hqjn7q4w.js} +3 -3
  9. package/dist/{ExportModal-Bun3pMGn.js.map → ExportModal-hqjn7q4w.js.map} +1 -1
  10. package/dist/ManualUpiConnect.js +2 -2
  11. package/dist/ManualUpiPayment.js +2 -2
  12. package/dist/ManualUpiPaymentConfirmButton.js +2 -2
  13. package/dist/ManualUpiPaymentRejectButton.js +2 -2
  14. package/dist/PaymentsDashboard.js +5 -5
  15. package/dist/PayoutsDashboard.js +5 -5
  16. package/dist/PayoutsPage.js +4 -4
  17. package/dist/RazorpayConnect.js +2 -2
  18. package/dist/RazorpayLinkedAccountForm.js +2 -2
  19. package/dist/RazorpayPaymentButton.js +20 -11
  20. package/dist/RazorpayPaymentButton.js.map +1 -1
  21. package/dist/RecurringPaymentSettings.js +2 -2
  22. package/dist/RefundsDashboard.js +5 -5
  23. package/dist/SplitTransfersDashboard.js +4 -4
  24. package/dist/StripeCheckoutSetting.js +2 -2
  25. package/dist/StripeConnect.js +4 -4
  26. package/dist/StripeManage.js +2 -2
  27. package/dist/TaxesDashboard.js +2 -2
  28. package/dist/buildStripeTransactionLink.js +1 -1
  29. package/dist/cjs/RazorpayPaymentButton.js +19 -10
  30. package/dist/cjs/RazorpayPaymentButton.js.map +1 -1
  31. package/dist/cjs/index.js +9 -6
  32. package/dist/cjs/index.js.map +1 -1
  33. package/dist/cjs/razorpayCheckoutOutcome-DwerRK1B.js +96 -0
  34. package/dist/cjs/razorpayCheckoutOutcome-DwerRK1B.js.map +1 -0
  35. package/dist/cjs/useRazorpayPayment.js +20 -11
  36. package/dist/cjs/useRazorpayPayment.js.map +1 -1
  37. package/dist/cjs/v2/ManualUpiPayment.js +3 -3
  38. package/dist/cjs/v2/ManualUpiPayment.js.map +1 -1
  39. package/dist/cjs/v2/RazorpayPaymentButton.js +19 -10
  40. package/dist/cjs/v2/RazorpayPaymentButton.js.map +1 -1
  41. package/dist/cjs/v2/RazorpayWebsiteNotice.js +2 -2
  42. package/dist/cjs/v2/RazorpayWebsiteNotice.js.map +1 -1
  43. package/dist/cjs/v2/index.js +1 -1
  44. package/dist/constants.js +1 -1
  45. package/dist/{dashboard-Ba2uhKXD.js → dashboard-BP47wvu-.js} +2 -2
  46. package/dist/{dashboard-Ba2uhKXD.js.map → dashboard-BP47wvu-.js.map} +1 -1
  47. package/dist/getAddressElementOptions.js +1 -1
  48. package/dist/getAmountInLargestCurrencyUnit.js +1 -1
  49. package/dist/getAmountInSmallestCurrencyUnit.js +1 -1
  50. package/dist/getAmountWithAppliedTax.js +1 -1
  51. package/dist/getFormattedAmount.js +1 -1
  52. package/dist/getFormattedDiscountedAmount.js +1 -1
  53. package/dist/getFormattedDiscountedPercentage.js +1 -1
  54. package/dist/getFormattedTaxAmount.js +1 -1
  55. package/dist/getFormattedTipAmount.js +1 -1
  56. package/dist/getQrCodeValue.js +1 -1
  57. package/dist/getTaxAmount.js +1 -1
  58. package/dist/getTipAmount.js +1 -1
  59. package/dist/hasAmountToPay.js +1 -1
  60. package/dist/{index-CajHy3NQ.js → index-CpGnAY9G.js} +2 -2
  61. package/dist/{index-CajHy3NQ.js.map → index-CpGnAY9G.js.map} +1 -1
  62. package/dist/index.js +34 -28
  63. package/dist/index.js.map +1 -1
  64. package/dist/razorpayCheckoutOutcome-ChPKzUYJ.js +91 -0
  65. package/dist/razorpayCheckoutOutcome-ChPKzUYJ.js.map +1 -0
  66. package/dist/{renderFunctions-B9mVn_ag.js → renderFunctions-CcLI5Jq6.js} +2 -2
  67. package/dist/{renderFunctions-B9mVn_ag.js.map → renderFunctions-CcLI5Jq6.js.map} +1 -1
  68. package/dist/{useAccountsApi-CZyJ4R8Z.js → useAccountsApi-DF78k_sA.js} +2 -2
  69. package/dist/{useAccountsApi-CZyJ4R8Z.js.map → useAccountsApi-DF78k_sA.js.map} +1 -1
  70. package/dist/{useBusinessTypesApi-CS2aPq7Y.js → useBusinessTypesApi-DwddCKIb.js} +2 -2
  71. package/dist/{useBusinessTypesApi-CS2aPq7Y.js.map → useBusinessTypesApi-DwddCKIb.js.map} +1 -1
  72. package/dist/{useCheckoutSettingsApi-D1ZvMA4B.js → useCheckoutSettingsApi-B29sE02j.js} +2 -2
  73. package/dist/{useCheckoutSettingsApi-D1ZvMA4B.js.map → useCheckoutSettingsApi-B29sE02j.js.map} +1 -1
  74. package/dist/{useCountriesApi-ClXgwNgC.js → useCountriesApi-CSfkzWgq.js} +2 -2
  75. package/dist/{useCountriesApi-ClXgwNgC.js.map → useCountriesApi-CSfkzWgq.js.map} +1 -1
  76. package/dist/{useExportsApi-C1wjoVYy.js → useExportsApi-BCnxSe7P.js} +2 -2
  77. package/dist/{useExportsApi-C1wjoVYy.js.map → useExportsApi-BCnxSe7P.js.map} +1 -1
  78. package/dist/{useExportsApi-DA6ThV9b.js → useExportsApi-B_ABJiMX.js} +2 -2
  79. package/dist/{useExportsApi-DA6ThV9b.js.map → useExportsApi-B_ABJiMX.js.map} +1 -1
  80. package/dist/{useFetchData-8LLdmA74.js → useFetchData-Cleas8Tk.js} +2 -2
  81. package/dist/{useFetchData-8LLdmA74.js.map → useFetchData-Cleas8Tk.js.map} +1 -1
  82. package/dist/{useIntegrationsApi-BqU-lJql.js → useIntegrationsApi-BEZaeW9w.js} +2 -2
  83. package/dist/{useIntegrationsApi-BqU-lJql.js.map → useIntegrationsApi-BEZaeW9w.js.map} +1 -1
  84. package/dist/{usePaymentApi-gvPmTOWg.js → usePaymentApi-B0BXE-4o.js} +2 -2
  85. package/dist/{usePaymentApi-gvPmTOWg.js.map → usePaymentApi-B0BXE-4o.js.map} +1 -1
  86. package/dist/{usePaymentApi-CjtkL3IU.js → usePaymentApi-BfoBBuRN.js} +2 -2
  87. package/dist/{usePaymentApi-CjtkL3IU.js.map → usePaymentApi-BfoBBuRN.js.map} +1 -1
  88. package/dist/{usePaymentsApi-C2xbgHmw.js → usePaymentsApi-Ctl1XsA1.js} +2 -2
  89. package/dist/{usePaymentsApi-C2xbgHmw.js.map → usePaymentsApi-Ctl1XsA1.js.map} +1 -1
  90. package/dist/{usePlatformApi-Dug1pxaH.js → usePlatformApi-B29AJb-p.js} +2 -2
  91. package/dist/{usePlatformApi-Dug1pxaH.js.map → usePlatformApi-B29AJb-p.js.map} +1 -1
  92. package/dist/useRazorpayPayment.js +21 -12
  93. package/dist/useRazorpayPayment.js.map +1 -1
  94. package/dist/{useRecurringPaymentsApi-dbdBrh4V.js → useRecurringPaymentsApi-B6zvIYkm.js} +2 -2
  95. package/dist/{useRecurringPaymentsApi-dbdBrh4V.js.map → useRecurringPaymentsApi-B6zvIYkm.js.map} +1 -1
  96. package/dist/{useRecurringPaymentsApi-CkxjkZd2.js → useRecurringPaymentsApi-BTOeJ8Xu.js} +2 -2
  97. package/dist/{useRecurringPaymentsApi-CkxjkZd2.js.map → useRecurringPaymentsApi-BTOeJ8Xu.js.map} +1 -1
  98. package/dist/{useRecurringSettingsApi-B_kTDES9.js → useRecurringSettingsApi-Dkjo_BKx.js} +2 -2
  99. package/dist/{useRecurringSettingsApi-B_kTDES9.js.map → useRecurringSettingsApi-Dkjo_BKx.js.map} +1 -1
  100. package/dist/{useRefundsApi-DSMKTWIQ.js → useRefundsApi-Ce4HmQgn.js} +2 -2
  101. package/dist/{useRefundsApi-DSMKTWIQ.js.map → useRefundsApi-Ce4HmQgn.js.map} +1 -1
  102. package/dist/{useSplitTransfersApi-DlRs4wYh.js → useSplitTransfersApi-CDzhSH8q.js} +2 -2
  103. package/dist/{useSplitTransfersApi-DlRs4wYh.js.map → useSplitTransfersApi-CDzhSH8q.js.map} +1 -1
  104. package/dist/{useTaxesApi-BuPeVUxI.js → useTaxesApi-CNyTbsgK.js} +2 -2
  105. package/dist/{useTaxesApi-BuPeVUxI.js.map → useTaxesApi-CNyTbsgK.js.map} +1 -1
  106. package/dist/{useVpasApi-wicZ6o_z.js → useVpasApi-X1KhsMZl.js} +2 -2
  107. package/dist/{useVpasApi-wicZ6o_z.js.map → useVpasApi-X1KhsMZl.js.map} +1 -1
  108. package/dist/v2/AccountsDashboard.js +4 -4
  109. package/dist/v2/AdminCancelRecurringPaymentButton.js +2 -2
  110. package/dist/v2/CashPaymentButton.js +2 -2
  111. package/dist/v2/ConfirmCashPaymentButton.js +2 -2
  112. package/dist/v2/CustomerCancelRecurringPaymentForm.js +2 -2
  113. package/dist/v2/ManualUpiConnect.js +2 -2
  114. package/dist/v2/ManualUpiPayment.js +5 -5
  115. package/dist/v2/ManualUpiPayment.js.map +1 -1
  116. package/dist/v2/ManualUpiPaymentConfirmButton.js +2 -2
  117. package/dist/v2/ManualUpiPaymentRejectButton.js +2 -2
  118. package/dist/v2/PaymentsDashboard.js +5 -5
  119. package/dist/v2/PayoutsDashboard.js +4 -4
  120. package/dist/v2/PayoutsPage.js +3 -3
  121. package/dist/v2/RazorpayConnect.js +2 -2
  122. package/dist/v2/RazorpayLinkedAccountForm.js +2 -2
  123. package/dist/v2/RazorpayPaymentButton.js +20 -11
  124. package/dist/v2/RazorpayPaymentButton.js.map +1 -1
  125. package/dist/v2/RazorpayWebsiteNotice.js +2 -2
  126. package/dist/v2/RazorpayWebsiteNotice.js.map +1 -1
  127. package/dist/v2/RecurringPaymentSettings.js +2 -2
  128. package/dist/v2/RefundsDashboard.js +5 -5
  129. package/dist/v2/SplitTransfersDashboard.js +4 -4
  130. package/dist/v2/StripeCheckoutSetting.js +2 -2
  131. package/dist/v2/StripeConnect.js +4 -4
  132. package/dist/v2/StripeManage.js +2 -2
  133. package/dist/v2/TaxesDashboard.js +2 -2
  134. package/dist/v2/index.js +23 -23
  135. package/package.json +14 -14
  136. package/dist/cjs/usePaymentApi-B198Hd_a.js +0 -21
  137. package/dist/cjs/usePaymentApi-B198Hd_a.js.map +0 -1
  138. package/dist/usePaymentApi-BzB3rzNe.js +0 -19
  139. package/dist/usePaymentApi-BzB3rzNe.js.map +0 -1
@@ -7,21 +7,21 @@ import Header from '@bigbinary/neeto-molecules/Header';
7
7
  import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
8
8
  import { Modal, Typography, Button, Spinner, NoData, Table, Tab } from '@bigbinary/neetoui';
9
9
  import { useTranslation } from 'react-i18next';
10
- import { u as useExportData, w as withReactQuery } from './useExportsApi-DA6ThV9b.js';
10
+ import { u as useExportData, w as withReactQuery } from './useExportsApi-B_ABJiMX.js';
11
11
  import { e as exportChannel, T as TABLE_KEYS } from './exportChannel-Db0U5gc1.js';
12
12
  import { Download } from '@bigbinary/neeto-icons';
13
- import { u as uuidV4, G as buildStripeAccountLink, z as DEFAULT_SORT_PROPERTIES, S as SORT_DIRECTIONS } from './index-CajHy3NQ.js';
13
+ import { u as uuidV4, G as buildStripeAccountLink, z as DEFAULT_SORT_PROPERTIES, S as SORT_DIRECTIONS } from './index-CpGnAY9G.js';
14
14
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
15
15
  import { getQueryParams, buildUrl } from 'neetocommons/utils';
16
16
  import { pipe, split, map, join, mergeLeft, assoc } from 'ramda';
17
17
  import { useHistory } from 'react-router-dom';
18
- import { b as buildDefaultPageProperties, a as buildPayload, c as buildRowData } from './dashboard-Ba2uhKXD.js';
19
- import { b as renderFullName, a as renderDate, r as renderStatus } from './renderFunctions-B9mVn_ag.js';
18
+ import { b as buildDefaultPageProperties, a as buildPayload, c as buildRowData } from './dashboard-BP47wvu-.js';
19
+ import { b as renderFullName, a as renderDate, r as renderStatus } from './renderFunctions-CcLI5Jq6.js';
20
20
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-CbzDq6Cq.js';
21
21
  import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from 'neetocommons/constants';
22
22
  import { useTableConfigurations } from '@bigbinary/neeto-molecules/Columns';
23
23
  import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
24
- import { b as useFetchConnectedAccounts } from './useAccountsApi-CZyJ4R8Z.js';
24
+ import { b as useFetchConnectedAccounts } from './useAccountsApi-DF78k_sA.js';
25
25
  import '@tanstack/react-query';
26
26
  import '@tanstack/react-query-devtools';
27
27
  import 'axios';
@@ -1,11 +1,11 @@
1
1
  import { useState } from 'react';
2
2
  import { Button, Alert } from '@bigbinary/neetoui';
3
3
  import { useTranslation } from 'react-i18next';
4
- import { u as useUpdateRecurringPayments } from './useRecurringPaymentsApi-dbdBrh4V.js';
4
+ import { u as useUpdateRecurringPayments } from './useRecurringPaymentsApi-B6zvIYkm.js';
5
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
6
  import 'neetocommons/react-utils';
7
7
  import 'axios';
8
- import './index-CajHy3NQ.js';
8
+ import './index-CpGnAY9G.js';
9
9
  import 'i18next';
10
10
  import 'neetocommons/constants';
11
11
  import 'decimal.js';
@@ -1,11 +1,11 @@
1
1
  import { noop } from 'neetocist';
2
2
  import { useTranslation } from 'react-i18next';
3
- import { u as useCreateCashPayment } from './usePaymentApi-gvPmTOWg.js';
3
+ import { u as useCreateCashPayment } from './usePaymentApi-B0BXE-4o.js';
4
4
  import { Button } from '@bigbinary/neetoui';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
  import '@tanstack/react-query';
7
7
  import 'axios';
8
- import './index-CajHy3NQ.js';
8
+ import './index-CpGnAY9G.js';
9
9
  import 'i18next';
10
10
  import 'neetocommons/constants';
11
11
  import 'decimal.js';
@@ -1,13 +1,13 @@
1
1
  import { useState } from 'react';
2
2
  import { noop } from 'neetocist';
3
3
  import { useTranslation } from 'react-i18next';
4
- import { a as useUpdateCashPayment } from './usePaymentApi-gvPmTOWg.js';
4
+ import { a as useUpdateCashPayment } from './usePaymentApi-B0BXE-4o.js';
5
5
  import { Button, Modal, Typography } from '@bigbinary/neetoui';
6
6
  import { Form, Textarea, ActionBlock } from '@bigbinary/neetoui/formik';
7
7
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
8
8
  import '@tanstack/react-query';
9
9
  import 'axios';
10
- import './index-CajHy3NQ.js';
10
+ import './index-CpGnAY9G.js';
11
11
  import 'i18next';
12
12
  import 'neetocommons/constants';
13
13
  import 'decimal.js';
@@ -1,11 +1,11 @@
1
1
  import { useTranslation } from 'react-i18next';
2
- import { u as useFetchRecurringPayment, a as useUpdateRecurringPayments } from './useRecurringPaymentsApi-CkxjkZd2.js';
2
+ import { u as useFetchRecurringPayment, a as useUpdateRecurringPayments } from './useRecurringPaymentsApi-BTOeJ8Xu.js';
3
3
  import { Spinner, Typography } from '@bigbinary/neetoui';
4
4
  import { Form, Textarea, Button } from '@bigbinary/neetoui/formik';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
  import 'neetocommons/react-utils';
7
7
  import 'axios';
8
- import './index-CajHy3NQ.js';
8
+ import './index-CpGnAY9G.js';
9
9
  import 'i18next';
10
10
  import 'neetocommons/constants';
11
11
  import 'decimal.js';
@@ -5,9 +5,9 @@ import { isPresent, camelToSnakeCase } from 'neetocist';
5
5
  import { getQueryParams } from 'neetocommons/utils';
6
6
  import { mergeLeft } from 'ramda';
7
7
  import { useTranslation } from 'react-i18next';
8
- import { u as useExportsData } from './useExportsApi-C1wjoVYy.js';
8
+ import { u as useExportsData } from './useExportsApi-BCnxSe7P.js';
9
9
  import { e as exportChannel } from './exportChannel-Db0U5gc1.js';
10
- import { u as uuidV4 } from './index-CajHy3NQ.js';
10
+ import { u as uuidV4 } from './index-CpGnAY9G.js';
11
11
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
12
12
 
13
13
  const ExportModal = ({
@@ -102,4 +102,4 @@ const ExportModal = ({
102
102
  };
103
103
 
104
104
  export { ExportModal as E };
105
- //# sourceMappingURL=ExportModal-k--5vSLt.js.map
105
+ //# sourceMappingURL=ExportModal-Imx5pEqt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExportModal-k--5vSLt.js","sources":["../app/javascript/src/v2/components/Common/ExportModal.jsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\n\nimport { Button, Dialog, Typography } from \"@bigbinary/neeto-atoms\";\nimport { Download } from \"lucide-react\";\nimport { isPresent, camelToSnakeCase } from \"neetocist\";\nimport { getQueryParams } from \"neetocommons/utils\";\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 <Dialog {...{ onClose }} isOpen={isExportModalOpen}>\n <Dialog.Header>\n <Dialog.Title>\n {t(`neetoPayments.export.title.${dashboardKind}`)}\n </Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n {isGenerating ? (\n <Typography variant=\"body2\">\n {t(\"neetoPayments.export.pleaseWait\")}\n </Typography>\n ) : (\n <Typography variant=\"body2\">\n {isPresent(downloadUrl)\n ? t(\"neetoPayments.export.fileReady\")\n : t(`neetoPayments.export.download.${dashboardKind}`)}\n </Typography>\n )}\n </Dialog.Body>\n <Dialog.Footer className=\"space-x-2\">\n {isPresent(downloadUrl) ? (\n <Button\n data-testid=\"neeto-payments-download-button\"\n href={downloadUrl}\n icon={Download}\n label={t(\"neetoPayments.common.download\")}\n onClick={onClose}\n />\n ) : (\n <>\n <Button\n data-testid=\"cancel-button\"\n disabled={isGenerating}\n label={t(\"neetoPayments.common.cancel\")}\n variant=\"outline\"\n onClick={onClose}\n />\n <Button\n data-testid=\"neeto-payments-export-button\"\n disabled={isGenerating}\n label={t(\"neetoPayments.common.export\")}\n loading={isGenerating}\n onClick={handleExport}\n />\n </>\n )}\n </Dialog.Footer>\n </Dialog>\n );\n};\n\nexport default ExportModal;\n"],"names":["ExportModal","filters","dashboardKind","holdableIds","sortProperties","isExportModalOpen","setIsExportModalOpen","t","useTranslation","downloadUrl","setDownloadUrl","useState","isGenerating","setIsGenerating","tab","getQueryParams","mutate","exportsData","useExportsData","token","useMemo","uuidV4","receivedCallback","data","download_url","useEffect","channel","exportChannel","disconnected","undefined","onClose","handleExport","payload","mergeLeft","dashboard","camelToSnakeCase","_jsxs","Dialog","isOpen","children","_jsx","Header","Title","Body","Typography","variant","isPresent","Footer","className","Button","href","icon","Download","label","onClick","_Fragment","disabled","loading"],"mappings":";;;;;;;;;;;;AAaA,MAAMA,WAAW,GAAGA,CAAC;EACnBC,OAAO;EACPC,aAAa;EACbC,WAAW;EAC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AAAA,IAAI,EAAEC,QAAS;AACfC,QAAAA,KAAK,EAAE9C,CAAC,CAAC,+BAA+B,CAAE;AAC1C+C,QAAAA,OAAO,EAAExB;AAAQ,OAClB,CAAC,gBAEFM,IAAA,CAAAmB,QAAA,EAAA;QAAAhB,QAAA,EAAA,cACEC,GAAA,CAACS,MAAM,EAAA;AACL,UAAA,aAAA,EAAY,eAAe;AAC3BO,UAAAA,QAAQ,EAAE5C,YAAa;AACvByC,UAAAA,KAAK,EAAE9C,CAAC,CAAC,6BAA6B,CAAE;AACxCsC,UAAAA,OAAO,EAAC,SAAS;AACjBS,UAAAA,OAAO,EAAExB;AAAQ,SAClB,CAAC,eACFU,GAAA,CAACS,MAAM,EAAA;AACL,UAAA,aAAA,EAAY,8BAA8B;AAC1CO,UAAAA,QAAQ,EAAE5C,YAAa;AACvByC,UAAAA,KAAK,EAAE9C,CAAC,CAAC,6BAA6B,CAAE;AACxCkD,UAAAA,OAAO,EAAE7C,YAAa;AACtB0C,UAAAA,OAAO,EAAEvB;AAAa,SACvB,CAAC;OACF;AACH,KACY,CAAC;AAAA,GACV,CAAC;AAEb;;;;"}
1
+ {"version":3,"file":"ExportModal-Imx5pEqt.js","sources":["../app/javascript/src/v2/components/Common/ExportModal.jsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\n\nimport { Button, Dialog, Typography } from \"@bigbinary/neeto-atoms\";\nimport { Download } from \"lucide-react\";\nimport { isPresent, camelToSnakeCase } from \"neetocist\";\nimport { getQueryParams } from \"neetocommons/utils\";\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 <Dialog {...{ onClose }} isOpen={isExportModalOpen}>\n <Dialog.Header>\n <Dialog.Title>\n {t(`neetoPayments.export.title.${dashboardKind}`)}\n </Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n {isGenerating ? (\n <Typography variant=\"body2\">\n {t(\"neetoPayments.export.pleaseWait\")}\n </Typography>\n ) : (\n <Typography variant=\"body2\">\n {isPresent(downloadUrl)\n ? t(\"neetoPayments.export.fileReady\")\n : t(`neetoPayments.export.download.${dashboardKind}`)}\n </Typography>\n )}\n </Dialog.Body>\n <Dialog.Footer className=\"space-x-2\">\n {isPresent(downloadUrl) ? (\n <Button\n data-testid=\"neeto-payments-download-button\"\n href={downloadUrl}\n icon={Download}\n label={t(\"neetoPayments.common.download\")}\n onClick={onClose}\n />\n ) : (\n <>\n <Button\n data-testid=\"cancel-button\"\n disabled={isGenerating}\n label={t(\"neetoPayments.common.cancel\")}\n variant=\"outline\"\n onClick={onClose}\n />\n <Button\n data-testid=\"neeto-payments-export-button\"\n disabled={isGenerating}\n label={t(\"neetoPayments.common.export\")}\n loading={isGenerating}\n onClick={handleExport}\n />\n </>\n )}\n </Dialog.Footer>\n </Dialog>\n );\n};\n\nexport default ExportModal;\n"],"names":["ExportModal","filters","dashboardKind","holdableIds","sortProperties","isExportModalOpen","setIsExportModalOpen","t","useTranslation","downloadUrl","setDownloadUrl","useState","isGenerating","setIsGenerating","tab","getQueryParams","mutate","exportsData","useExportsData","token","useMemo","uuidV4","receivedCallback","data","download_url","useEffect","channel","exportChannel","disconnected","undefined","onClose","handleExport","payload","mergeLeft","dashboard","camelToSnakeCase","_jsxs","Dialog","isOpen","children","_jsx","Header","Title","Body","Typography","variant","isPresent","Footer","className","Button","href","icon","Download","label","onClick","_Fragment","disabled","loading"],"mappings":";;;;;;;;;;;;AAaA,MAAMA,WAAW,GAAGA,CAAC;EACnBC,OAAO;EACPC,aAAa;EACbC,WAAW;EACXC,cAAc;EACdC,iBAAiB;AACjBC,EAAAA;AACF,CAAC,KAAK;EACJ,MAAM;AAAEC,IAAAA;GAAG,GAAGC,cAAc,EAAE;EAC9B,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGC,QAAQ,CAAC,EAAE,CAAC;EAClD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGF,QAAQ,CAAC,KAAK,CAAC;EAEvD,MAAM;AAAEG,IAAAA,GAAG,GAAG;GAAO,GAAGC,cAAc,EAAE;EAExC,MAAM;AAAEC,IAAAA,MAAM,EAAEC;GAAa,GAAGC,cAAc,EAAE;AAEhD,EAAA,MAAMC,KAAK,GAAGC,OAAO,CACnB,MAAM,GAAGlB,aAAa,CAAA,QAAA,EAAWmB,MAAM,EAAE,CAAA,CAAE,EAC3C,CAACnB,aAAa,CAChB,CAAC;EAED,MAAMoB,gBAAgB,GAAGC,IAAI,IAAI;AAC/B,IAAA,IAAI,CAACA,IAAI,CAACC,YAAY,EAAE;AACxBd,IAAAA,cAAc,CAACa,IAAI,CAACC,YAAY,CAAC;IACjCX,eAAe,CAAC,KAAK,CAAC;EACxB,CAAC;AAEDY,EAAAA,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, camelToSnakeCase } from 'neetocist';
3
3
  import { Download } from '@bigbinary/neeto-icons';
4
4
  import { mergeLeft } from 'ramda';
5
5
  import { useTranslation } from 'react-i18next';
6
- import { u as useExportsData } from './useExportsApi-C1wjoVYy.js';
6
+ import { u as useExportsData } from './useExportsApi-BCnxSe7P.js';
7
7
  import { getQueryParams } from 'neetocommons/utils';
8
8
  import { Modal, Typography, Button } from '@bigbinary/neetoui';
9
9
  import { e as exportChannel } from './exportChannel-Db0U5gc1.js';
10
- import { u as uuidV4 } from './index-CajHy3NQ.js';
10
+ import { u as uuidV4 } from './index-CpGnAY9G.js';
11
11
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
12
12
 
13
13
  const ExportModal = ({
@@ -103,4 +103,4 @@ const ExportModal = ({
103
103
  };
104
104
 
105
105
  export { ExportModal as E };
106
- //# sourceMappingURL=ExportModal-Bun3pMGn.js.map
106
+ //# sourceMappingURL=ExportModal-hqjn7q4w.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExportModal-Bun3pMGn.js","sources":["../app/javascript/src/components/Common/ExportModal.jsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\n\nimport { isPresent, camelToSnakeCase } from \"neetocist\";\nimport { Download } from \"neetoicons\";\nimport { mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useExportsData } from \"hooks/reactQuery/useExportsApi\";\nimport { getQueryParams } from \"neetocommons/utils\";\nimport { Button, Modal, Typography } from \"neetoui\";\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 data-testid=\"neeto-payments-download-button\"\n href={downloadUrl}\n icon={Download}\n label={t(\"neetoPayments.common.download\")}\n onClick={onClose}\n />\n ) : (\n <>\n <Button\n data-testid=\"cancel-button\"\n disabled={isGenerating}\n label={t(\"neetoPayments.common.cancel\")}\n style=\"tertiary\"\n onClick={onClose}\n />\n <Button\n data-testid=\"neeto-payments-export-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":["ExportModal","filters","dashboardKind","holdableIds","sortProperties","isExportModalOpen","setIsExportModalOpen","t","useTranslation","downloadUrl","setDownloadUrl","useState","isGenerating","setIsGenerating","tab","getQueryParams","mutate","exportsData","useExportsData","token","useMemo","uuidV4","receivedCallback","data","download_url","useEffect","channel","exportChannel","disconnected","undefined","onClose","handleExport","payload","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":";;;;;;;;;;;;AAaA,MAAMA,WAAW,GAAGA,CAAC;EACnBC,OAAO;EACPC,aAAa;EACbC,WAAW;EACXC,cAAc;EACdC,iBAAiB;AACjBC,EAAAA;AACF,CAAC,KAAK;EACJ,MAAM;AAAEC,IAAAA;GAAG,GAAGC,cAAc,EAAE;EAC9B,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGC,QAAQ,CAAC,EAAE,CAAC;EAClD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGF,QAAQ,CAAC,KAAK,CAAC;EAEvD,MAAM;AAAEG,IAAAA,GAAG,GAAG;GAAO,GAAGC,cAAc,EAAE;EAExC,MAAM;AAAEC,IAAAA,MAAM,EAAEC;GAAa,GAAGC,cAAc,EAAE;AAEhD,EAAA,MAAMC,KAAK,GAAGC,OAAO,CACnB,MAAM,GAAGlB,aAAa,CAAA,QAAA,EAAWmB,MAAM,EAAE,CAAA,CAAE,EAC3C,CAACnB,aAAa,CAChB,CAAC;EAED,MAAMoB,gBAAgB,GAAGC,IAAI,IAAI;AAC/B,IAAA,IAAI,CAACA,IAAI,CAACC,YAAY,EAAE;AACxBd,IAAAA,cAAc,CAACa,IAAI,CAACC,YAAY,CAAC;IACjCX,eAAe,CAAC,KAAK,CAAC;EACxB,CAAC;AAEDY,EAAAA,SAAS,CAAC,MAAM;AACd,IAAA,IAAIpB,iBAAiB,EAAE;AACrB,MAAA,MAAMqB,OAAO,GAAGC,aAAa,CAACR,KAAK,EAAEG,gBAAgB,CAAC;MACtDZ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AAA,EACtBM,SAAS,CAACpC,WAAW,CAAC,GACnBF,CAAC,CAAC,gCAAgC,CAAC,GACnCA,CAAC,CAAC,CAAA,8BAAA,EAAiCL,aAAa,CAAA,CAAE;OAC5C;AACb,KACS,CAAC,eACbsC,GAAA,CAACH,KAAK,CAACS,MAAM,EAAA;AAACC,MAAAA,SAAS,EAAC,WAAW;MAAAR,QAAA,EAChCM,SAAS,CAACpC,WAAW,CAAC,gBACrB+B,GAAA,CAACQ,MAAM,EAAA;AACL,QAAA,aAAA,EAAY,gCAAgC;AAC5CC,QAAAA,IAAI,EAAExC,WAAY;AAClByC,QAAAA,IAAI,EAAEC,QAAS;AACfC,QAAAA,KAAK,EAAE7C,CAAC,CAAC,+BAA+B,CAAE;AAC1C8C,QAAAA,OAAO,EAAEvB;AAAQ,OAClB,CAAC,gBAEFM,IAAA,CAAAkB,QAAA,EAAA;QAAAf,QAAA,EAAA,cACEC,GAAA,CAACQ,MAAM,EAAA;AACL,UAAA,aAAA,EAAY,eAAe;AAC3BO,UAAAA,QAAQ,EAAE3C,YAAa;AACvBwC,UAAAA,KAAK,EAAE7C,CAAC,CAAC,6BAA6B,CAAE;AACxCoC,UAAAA,KAAK,EAAC,UAAU;AAChBU,UAAAA,OAAO,EAAEvB;AAAQ,SAClB,CAAC,eACFU,GAAA,CAACQ,MAAM,EAAA;AACL,UAAA,aAAA,EAAY,8BAA8B;AAC1CO,UAAAA,QAAQ,EAAE3C,YAAa;AACvBwC,UAAAA,KAAK,EAAE7C,CAAC,CAAC,6BAA6B,CAAE;AACxCiD,UAAAA,OAAO,EAAE5C,YAAa;AACtByC,UAAAA,OAAO,EAAEtB;AAAa,SACvB,CAAC;OACF;AACH,KACW,CAAC;AAAA,GACV,CAAC;AAEZ;;;;"}
1
+ {"version":3,"file":"ExportModal-hqjn7q4w.js","sources":["../app/javascript/src/components/Common/ExportModal.jsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\n\nimport { isPresent, camelToSnakeCase } from \"neetocist\";\nimport { Download } from \"neetoicons\";\nimport { mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useExportsData } from \"hooks/reactQuery/useExportsApi\";\nimport { getQueryParams } from \"neetocommons/utils\";\nimport { Button, Modal, Typography } from \"neetoui\";\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 data-testid=\"neeto-payments-download-button\"\n href={downloadUrl}\n icon={Download}\n label={t(\"neetoPayments.common.download\")}\n onClick={onClose}\n />\n ) : (\n <>\n <Button\n data-testid=\"cancel-button\"\n disabled={isGenerating}\n label={t(\"neetoPayments.common.cancel\")}\n style=\"tertiary\"\n onClick={onClose}\n />\n <Button\n data-testid=\"neeto-payments-export-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":["ExportModal","filters","dashboardKind","holdableIds","sortProperties","isExportModalOpen","setIsExportModalOpen","t","useTranslation","downloadUrl","setDownloadUrl","useState","isGenerating","setIsGenerating","tab","getQueryParams","mutate","exportsData","useExportsData","token","useMemo","uuidV4","receivedCallback","data","download_url","useEffect","channel","exportChannel","disconnected","undefined","onClose","handleExport","payload","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":";;;;;;;;;;;;AAaA,MAAMA,WAAW,GAAGA,CAAC;EACnBC,OAAO;EACPC,aAAa;EACbC,WAAW;EACXC,cAAc;EACdC,iBAAiB;AACjBC,EAAAA;AACF,CAAC,KAAK;EACJ,MAAM;AAAEC,IAAAA;GAAG,GAAGC,cAAc,EAAE;EAC9B,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGC,QAAQ,CAAC,EAAE,CAAC;EAClD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGF,QAAQ,CAAC,KAAK,CAAC;EAEvD,MAAM;AAAEG,IAAAA,GAAG,GAAG;GAAO,GAAGC,cAAc,EAAE;EAExC,MAAM;AAAEC,IAAAA,MAAM,EAAEC;GAAa,GAAGC,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,UAAU;AAChBU,UAAAA,OAAO,EAAEvB;AAAQ,SAClB,CAAC,eACFU,GAAA,CAACQ,MAAM,EAAA;AACL,UAAA,aAAA,EAAY,8BAA8B;AAC1CO,UAAAA,QAAQ,EAAE3C,YAAa;AACvBwC,UAAAA,KAAK,EAAE7C,CAAC,CAAC,6BAA6B,CAAE;AACxCiD,UAAAA,OAAO,EAAE5C,YAAa;AACtByC,UAAAA,OAAO,EAAEtB;AAAa,SACvB,CAAC;OACF;AACH,KACW,CAAC;AAAA,GACV,CAAC;AAEZ;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { Typography, Table, Alert, Spinner } from '@bigbinary/neetoui';
2
- import { u as useCreateVpa, a as useDestroyVpa, b as useFetchVpas } from './useVpasApi-wicZ6o_z.js';
2
+ import { u as useCreateVpa, a as useDestroyVpa, b as useFetchVpas } from './useVpasApi-X1KhsMZl.js';
3
3
  import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
4
4
  import { Form, Input, ActionBlock } from '@bigbinary/neetoui/formik';
5
5
  import { useTranslation, Trans } from 'react-i18next';
@@ -14,7 +14,7 @@ import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
14
14
  import '@tanstack/react-query';
15
15
  import 'neetocommons/react-utils';
16
16
  import 'axios';
17
- import './index-CajHy3NQ.js';
17
+ import './index-CpGnAY9G.js';
18
18
  import 'neetocommons/constants';
19
19
  import 'decimal.js';
20
20
  import 'neetocist';
@@ -5,10 +5,10 @@ import { Close } from '@bigbinary/neeto-icons';
5
5
  import QRCodeImage from 'qrcode.react';
6
6
  import { pluck } from 'ramda';
7
7
  import { useTranslation } from 'react-i18next';
8
- import { a as useCreateUpiPayment } from './usePaymentApi-CjtkL3IU.js';
8
+ import { a as useCreateUpiPayment } from './usePaymentApi-BfoBBuRN.js';
9
9
  import { Typography, Button, Toastr } from '@bigbinary/neetoui';
10
10
  import { Form, ActionBlock } from '@bigbinary/neetoui/formik';
11
- import { k as getQrCodeValue } from './index-CajHy3NQ.js';
11
+ import { o as getQrCodeValue } from './index-CpGnAY9G.js';
12
12
  import { t } from 'i18next';
13
13
  import * as yup from 'yup';
14
14
  import { useField } from 'formik';
@@ -2,7 +2,7 @@ import { useState } from 'react';
2
2
  import { noop, findBy } from 'neetocist';
3
3
  import { mergeLeft } from 'ramda';
4
4
  import { useTranslation } from 'react-i18next';
5
- import { u as useUpdateUpiPayment } from './usePaymentApi-CjtkL3IU.js';
5
+ import { u as useUpdateUpiPayment } from './usePaymentApi-BfoBBuRN.js';
6
6
  import { Button, Modal, Typography } from '@bigbinary/neetoui';
7
7
  import { Form, Select, Textarea, ActionBlock } from '@bigbinary/neetoui/formik';
8
8
  import { t } from 'i18next';
@@ -11,7 +11,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
11
11
  import '@tanstack/react-query';
12
12
  import 'neetocommons/react-utils';
13
13
  import 'axios';
14
- import './index-CajHy3NQ.js';
14
+ import './index-CpGnAY9G.js';
15
15
  import 'neetocommons/constants';
16
16
  import 'decimal.js';
17
17
  import 'neetocommons/utils';
@@ -1,14 +1,14 @@
1
1
  import { useState } from 'react';
2
2
  import { noop } from 'neetocist';
3
3
  import { useTranslation } from 'react-i18next';
4
- import { u as useUpdateUpiPayment } from './usePaymentApi-CjtkL3IU.js';
4
+ import { u as useUpdateUpiPayment } from './usePaymentApi-BfoBBuRN.js';
5
5
  import { Button, Modal, Typography } from '@bigbinary/neetoui';
6
6
  import { Form, Textarea, ActionBlock } from '@bigbinary/neetoui/formik';
7
7
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
8
8
  import '@tanstack/react-query';
9
9
  import 'neetocommons/react-utils';
10
10
  import 'axios';
11
- import './index-CajHy3NQ.js';
11
+ import './index-CpGnAY9G.js';
12
12
  import 'i18next';
13
13
  import 'neetocommons/constants';
14
14
  import 'decimal.js';
@@ -4,11 +4,11 @@ import { getQueryParams, buildUrl } from 'neetocommons/utils';
4
4
  import { Bar, buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend';
5
5
  import { map, curry, concat, reject, isNil, prop, mergeDeepWith, mergeLeft, isEmpty, modify } from 'ramda';
6
6
  import { useHistory } from 'react-router-dom';
7
- import { E as ExportModal } from './ExportModal-Bun3pMGn.js';
8
- import { u as useFetchPayments } from './usePaymentsApi-C2xbgHmw.js';
7
+ import { E as ExportModal } from './ExportModal-hqjn7q4w.js';
8
+ import { u as useFetchPayments } from './usePaymentsApi-Ctl1XsA1.js';
9
9
  import { Typography, Tooltip, Tag, Button, NoData, Table, Tab, Spinner } from '@bigbinary/neetoui';
10
- import { q as PAYMENT_PROVIDERS, o as DEFAULT_TAG_STYLE, r as formatAmount, s as formatCurrency, t as getUniquePaymentProviders, v as buildDefaultTableColumns, w as processDataIndex, S as SORT_DIRECTIONS, x as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, D as DEFAULT_PAGE_VALUES, y as DASHBOARD_KIND } from './index-CajHy3NQ.js';
11
- import { m as mergeEnforcedFilters } from './dashboard-Ba2uhKXD.js';
10
+ import { q as PAYMENT_PROVIDERS, h as DEFAULT_TAG_STYLE, r as formatAmount, s as formatCurrency, t as getUniquePaymentProviders, v as buildDefaultTableColumns, w as processDataIndex, S as SORT_DIRECTIONS, x as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, D as DEFAULT_PAGE_VALUES, y as DASHBOARD_KIND } from './index-CpGnAY9G.js';
11
+ import { m as mergeEnforcedFilters } from './dashboard-BP47wvu-.js';
12
12
  import { t } from 'i18next';
13
13
  import { toLabelAndValue, isNotPresent, humanize, snakeToCamelCase, isPresent, camelToSnakeCase } from 'neetocist';
14
14
  import { useTableConfigurations } from '@bigbinary/neeto-molecules/Columns';
@@ -21,7 +21,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
21
  import Header from '@bigbinary/neeto-molecules/Header';
22
22
  import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
23
23
  import '@bigbinary/neeto-icons';
24
- import './useExportsApi-C1wjoVYy.js';
24
+ import './useExportsApi-BCnxSe7P.js';
25
25
  import '@tanstack/react-query';
26
26
  import 'axios';
27
27
  import './queryConstants-8c7Nd8ML.js';
@@ -6,22 +6,22 @@ import Header from '@bigbinary/neeto-molecules/Header';
6
6
  import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
7
7
  import { Modal, Typography, Button, Spinner, NoData, Table, Tab } from '@bigbinary/neetoui';
8
8
  import { useTranslation } from 'react-i18next';
9
- import { u as useExportData, w as withReactQuery } from './useExportsApi-DA6ThV9b.js';
9
+ import { u as useExportData, w as withReactQuery } from './useExportsApi-B_ABJiMX.js';
10
10
  import { e as exportChannel, T as TABLE_KEYS } from './exportChannel-Db0U5gc1.js';
11
11
  import { Download } from '@bigbinary/neeto-icons';
12
- import { u as uuidV4, z as DEFAULT_SORT_PROPERTIES$1, S as SORT_DIRECTIONS } from './index-CajHy3NQ.js';
12
+ import { u as uuidV4, z as DEFAULT_SORT_PROPERTIES$1, S as SORT_DIRECTIONS } from './index-CpGnAY9G.js';
13
13
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
14
14
  import { camelToSnakeCase, removeBy, snakeToCamelCase, isPresent } from 'neetocist';
15
15
  import { buildUrl, getQueryParams } from 'neetocommons/utils';
16
16
  import { curry, assoc, insert, mergeLeft } from 'ramda';
17
17
  import { useHistory } from 'react-router-dom';
18
- import { b as buildDefaultPageProperties, a as buildPayload, c as buildRowData } from './dashboard-Ba2uhKXD.js';
19
- import { a as renderDate, r as renderStatus } from './renderFunctions-B9mVn_ag.js';
18
+ import { b as buildDefaultPageProperties, a as buildPayload, c as buildRowData } from './dashboard-BP47wvu-.js';
19
+ import { a as renderDate, r as renderStatus } from './renderFunctions-CcLI5Jq6.js';
20
20
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-CbzDq6Cq.js';
21
21
  import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from 'neetocommons/constants';
22
22
  import { useTableConfigurations } from '@bigbinary/neeto-molecules/Columns';
23
23
  import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
24
- import { b as useFetchStripePayouts, c as useFetchStripePlatformPayouts } from './usePlatformApi-Dug1pxaH.js';
24
+ import { b as useFetchStripePayouts, c as useFetchStripePlatformPayouts } from './usePlatformApi-B29AJb-p.js';
25
25
  import '@tanstack/react-query';
26
26
  import '@tanstack/react-query-devtools';
27
27
  import 'axios';
@@ -3,17 +3,17 @@ import Header from '@bigbinary/neeto-molecules/Header';
3
3
  import { Button, Spinner, Typography } from '@bigbinary/neetoui';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { useParams } from 'react-router-dom/cjs/react-router-dom';
6
- import { r as renderStatus, a as renderDate } from './renderFunctions-B9mVn_ag.js';
7
- import { u as useFetchData } from './useFetchData-8LLdmA74.js';
6
+ import { r as renderStatus, a as renderDate } from './renderFunctions-CcLI5Jq6.js';
7
+ import { u as useFetchData } from './useFetchData-Cleas8Tk.js';
8
8
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-CbzDq6Cq.js';
9
- import { p as buildStripePayoutLink } from './index-CajHy3NQ.js';
9
+ import { p as buildStripePayoutLink } from './index-CpGnAY9G.js';
10
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
11
  import 'i18next';
12
12
  import '@bigbinary/neeto-molecules/DateFormat';
13
13
  import 'ramda';
14
14
  import '@bigbinary/neeto-molecules/CopyToClipboardButton';
15
15
  import './copy-button-EhEBcNP9.js';
16
- import './usePlatformApi-Dug1pxaH.js';
16
+ import './usePlatformApi-B29AJb-p.js';
17
17
  import '@tanstack/react-query';
18
18
  import 'neetocommons/react-utils';
19
19
  import 'axios';
@@ -9,9 +9,9 @@ import Header from '@bigbinary/neeto-molecules/Header';
9
9
  import { Callout, Spinner, Typography, Button } from '@bigbinary/neetoui';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import { useHistory } from 'react-router-dom';
12
- import { u as useFetchPaymentIntegrations } from './useIntegrationsApi-BqU-lJql.js';
12
+ import { u as useFetchPaymentIntegrations } from './useIntegrationsApi-BEZaeW9w.js';
13
13
  import { Q as QUERY_KEYS } from './queryConstants-8c7Nd8ML.js';
14
- import { E as ERROR_TYPE, M as MAX_POLLING_TIME, P as POLLING_INTERVAL } from './index-CajHy3NQ.js';
14
+ import { E as ERROR_TYPE, M as MAX_POLLING_TIME, P as POLLING_INTERVAL } from './index-CpGnAY9G.js';
15
15
  import { jsxs, jsx } from 'react/jsx-runtime';
16
16
  import 'axios';
17
17
  import 'i18next';
@@ -4,12 +4,12 @@ import { Spinner, Label } from '@bigbinary/neetoui';
4
4
  import { Form, Input, Select, ActionBlock } from '@bigbinary/neetoui/formik';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { useHistory } from 'react-router-dom';
7
- import { u as useFetchBusinessTypes, a as useFetchBusinessCategories } from './useBusinessTypesApi-CS2aPq7Y.js';
7
+ import { u as useFetchBusinessTypes, a as useFetchBusinessCategories } from './useBusinessTypesApi-DwddCKIb.js';
8
8
  import { humanize } from 'neetocist';
9
9
  import { jsx, jsxs } from 'react/jsx-runtime';
10
10
  import '@tanstack/react-query';
11
11
  import 'axios';
12
- import './index-CajHy3NQ.js';
12
+ import './index-CpGnAY9G.js';
13
13
  import 'i18next';
14
14
  import 'neetocommons/constants';
15
15
  import 'decimal.js';
@@ -1,9 +1,10 @@
1
- import { noop, findBy, isNotPresent } from 'neetocist';
1
+ import { useRef } from 'react';
2
+ import { noop, findBy } from 'neetocist';
2
3
  import { mergeDeepLeft } from 'ramda';
3
4
  import { useTranslation } from 'react-i18next';
4
- import { u as useCreateRazorpayPayment } from './usePaymentApi-BzB3rzNe.js';
5
+ import { u as useCreateRazorpayPayment, v as verifyCheckoutPayment, r as resolveDismissedCheckout } from './razorpayCheckoutOutcome-ChPKzUYJ.js';
5
6
  import { Button } from '@bigbinary/neetoui';
6
- import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-CajHy3NQ.js';
7
+ import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-CpGnAY9G.js';
7
8
  import { jsx } from 'react/jsx-runtime';
8
9
  import '@tanstack/react-query';
9
10
  import 'axios';
@@ -41,11 +42,13 @@ const RazorpayPaymentButton = ({
41
42
  onBeforePayment = noop,
42
43
  onSuccessfulPayment = noop,
43
44
  onFailedPayment = noop,
45
+ onPaymentCreated = noop,
44
46
  onError = noop
45
47
  }) => {
46
48
  const {
47
49
  t
48
50
  } = useTranslation();
51
+ const paymentRef = useRef(null);
49
52
  const openRazorpayCheckout = async options => {
50
53
  const script = await loadScript("https://checkout.razorpay.com/v1/checkout.js");
51
54
  if (!script) {
@@ -69,16 +72,22 @@ const RazorpayPaymentButton = ({
69
72
  });
70
73
  checkout.open();
71
74
  };
72
- const handlePayment = response => {
73
- if (isNotPresent(response?.razorpay_signature)) {
74
- onFailedPayment();
75
- return;
76
- }
77
- onSuccessfulPayment();
78
- };
75
+ const handlePayment = response => verifyCheckoutPayment({
76
+ payment: paymentRef.current,
77
+ response,
78
+ onSuccessfulPayment,
79
+ onFailedPayment
80
+ });
81
+ const handleDismiss = () => resolveDismissedCheckout({
82
+ payment: paymentRef.current,
83
+ onSuccessfulPayment,
84
+ onFailedPayment
85
+ });
79
86
  const handleSuccess = ({
80
87
  payment
81
88
  }) => {
89
+ paymentRef.current = payment;
90
+ onPaymentCreated(payment);
82
91
  if (payment?.status === "successful") {
83
92
  return onSuccessfulPayment();
84
93
  }
@@ -96,7 +105,7 @@ const RazorpayPaymentButton = ({
96
105
  },
97
106
  modal: {
98
107
  confirm_close: true,
99
- ondismiss: onFailedPayment
108
+ ondismiss: handleDismiss
100
109
  },
101
110
  handler: handlePayment,
102
111
  theme: {
@@ -1 +1 @@
1
- {"version":3,"file":"RazorpayPaymentButton.js","sources":["../app/javascript/src/components/RazorpayPaymentButton.jsx"],"sourcesContent":["import { isNotPresent, noop, findBy } from \"neetocist\";\nimport { mergeDeepLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateRazorpayPayment } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { Button } from \"neetoui\";\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 contact,\n customAmount,\n isDisabled,\n isLoading,\n name,\n tip,\n theme = {},\n isPreserveDetailsChecked = false,\n numberOfInstallments = 1,\n payableType = null,\n onBeforePayment = noop,\n onSuccessfulPayment = noop,\n onFailedPayment = noop,\n onError = 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\n // Listen for payment failure events to capture error details\n checkout.on(\"payment.failed\", response => {\n const errorDescription = response?.error?.description;\n const errorReason = response?.error?.reason;\n logger.error(\"Razorpay payment failed:\", {\n description: errorDescription,\n reason: errorReason,\n });\n onFailedPayment({ errorDescription, errorReason });\n });\n\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 if (isPreserveDetailsChecked) {\n options[\"recurring\"] = \"1\";\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 onError,\n });\n\n const handleClick = () => {\n onBeforePayment();\n const payload = {\n payableId,\n payableType,\n discountCode,\n customAmount,\n tipAttributes: tip,\n numberOfInstallments,\n customerAttributes: { email, name, contact },\n isCardPreservingEnabled: isPreserveDetailsChecked,\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","label","payableId","discountCode","email","contact","customAmount","isDisabled","isLoading","name","tip","theme","isPreserveDetailsChecked","numberOfInstallments","payableType","onBeforePayment","noop","onSuccessfulPayment","onFailedPayment","onError","t","useTranslation","openRazorpayCheckout","options","logger","error","checkout","window","Razorpay","on","response","errorDescription","description","errorReason","reason","open","handlePayment","isNotPresent","razorpay_signature","handleSuccess","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","isPending","mutate","createRazorpayOrder","useCreateRazorpayPayment","onSuccess","handleClick","payload","tipAttributes","customerAttributes","isCardPreservingEnabled","_jsx","Button","disabled","loading","onClick"],"mappings":";;;;;;;;;;;;;;AAQA,MAAMA,UAAU,GAAGC,GAAG,IACpB,IAAIC,OAAO,CAACC,OAAO,IAAI;AACrB,EAAA,MAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;EAC/CF,MAAM,CAACH,GAAG,GAAGA,GAAG;EAChBG,MAAM,CA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AED,IAAA,IAAI9B,wBAAwB,EAAE;AAC5BW,MAAAA,OAAO,CAAC,WAAW,CAAC,GAAG,GAAG;AAC5B,IAAA;IAEA,OAAOD,oBAAoB,CACzBqC,aAAa,CAACC,+BAA+B,EAAErC,OAAO,CACxD,CAAC;EACH,CAAC;EAED,MAAM;IAAEsC,SAAS;AAAEC,IAAAA,MAAM,EAAEC;GAAqB,GAAGC,wBAAwB,CAAC;AAC1EC,IAAAA,SAAS,EAAE1B,aAAa;AACxBpB,IAAAA;AACF,GAAC,CAAC;EAEF,MAAM+C,WAAW,GAAGA,MAAM;AACxBnD,IAAAA,eAAe,EAAE;AACjB,IAAA,MAAMoD,OAAO,GAAG;MACdjE,SAAS;MACTY,WAAW;MACXX,YAAY;MACZG,YAAY;AACZ8D,MAAAA,aAAa,EAAE1D,GAAG;MAClBG,oBAAoB;AACpBwD,MAAAA,kBAAkB,EAAE;QAAEjE,KAAK;QAAEK,IAAI;AAAEJ,QAAAA;OAAS;AAC5CiE,MAAAA,uBAAuB,EAAE1D;KAC1B;IACDmD,mBAAmB,CAACI,OAAO,CAAC;EAC9B,CAAC;EAED,oBACEI,GAAA,CAACC,MAAM,EAAA;IACLC,QAAQ,EAAEZ,SAAS,IAAItD,UAAW;AAClCN,IAAAA,KAAK,EAAEA,KAAK,IAAImB,CAAC,CAAC,0BAA0B,CAAE;IAC9CsD,OAAO,EAAEb,SAAS,IAAIrD,SAAU;AAChCmE,IAAAA,OAAO,EAAET;AAAY,GACtB,CAAC;AAEN;;;;"}
1
+ {"version":3,"file":"RazorpayPaymentButton.js","sources":["../app/javascript/src/components/RazorpayPaymentButton.jsx"],"sourcesContent":["import { useRef } from \"react\";\n\nimport { noop, findBy } from \"neetocist\";\nimport { mergeDeepLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useCreateRazorpayPayment } from \"hooks/reactQuery/razorpay/usePaymentApi\";\nimport { Button } from \"neetoui\";\nimport { RAZORPAY_PAYMENT_BUTTON_OPTIONS } from \"src/constants\";\nimport {\n verifyCheckoutPayment,\n resolveDismissedCheckout,\n} from \"utils/razorpayCheckoutOutcome\";\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 contact,\n customAmount,\n isDisabled,\n isLoading,\n name,\n tip,\n theme = {},\n isPreserveDetailsChecked = false,\n numberOfInstallments = 1,\n payableType = null,\n onBeforePayment = noop,\n onSuccessfulPayment = noop,\n onFailedPayment = noop,\n onPaymentCreated = noop,\n onError = noop,\n}) => {\n const { t } = useTranslation();\n const paymentRef = useRef(null);\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\n // Listen for payment failure events to capture error details\n checkout.on(\"payment.failed\", response => {\n const errorDescription = response?.error?.description;\n const errorReason = response?.error?.reason;\n logger.error(\"Razorpay payment failed:\", {\n description: errorDescription,\n reason: errorReason,\n });\n onFailedPayment({ errorDescription, errorReason });\n });\n\n checkout.open();\n };\n\n const handlePayment = response =>\n verifyCheckoutPayment({\n payment: paymentRef.current,\n response,\n onSuccessfulPayment,\n onFailedPayment,\n });\n\n const handleDismiss = () =>\n resolveDismissedCheckout({\n payment: paymentRef.current,\n onSuccessfulPayment,\n onFailedPayment,\n });\n\n const handleSuccess = ({ payment }) => {\n paymentRef.current = payment;\n onPaymentCreated(payment);\n\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: handleDismiss },\n handler: handlePayment,\n theme: { color: themePrimaryColor ?? \"#0da84c\" },\n };\n\n if (isPreserveDetailsChecked) {\n options[\"recurring\"] = \"1\";\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 onError,\n });\n\n const handleClick = () => {\n onBeforePayment();\n const payload = {\n payableId,\n payableType,\n discountCode,\n customAmount,\n tipAttributes: tip,\n numberOfInstallments,\n customerAttributes: { email, name, contact },\n isCardPreservingEnabled: isPreserveDetailsChecked,\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","label","payableId","discountCode","email","contact","customAmount","isDisabled","isLoading","name","tip","theme","isPreserveDetailsChecked","numberOfInstallments","payableType","onBeforePayment","noop","onSuccessfulPayment","onFailedPayment","onPaymentCreated","onError","t","useTranslation","paymentRef","useRef","openRazorpayCheckout","options","logger","error","checkout","window","Razorpay","on","response","errorDescription","description","errorReason","reason","open","handlePayment","verifyCheckoutPayment","payment","current","handleDismiss","resolveDismissedCheckout","handleSuccess","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","isPending","mutate","createRazorpayOrder","useCreateRazorpayPayment","onSuccess","handleClick","payload","tipAttributes","customerAttributes","isCardPreservingEnabled","_jsx","Button","disabled","loading","onClick"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAMA,UAAU,G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UAAW;AAClCN,IAAAA,KAAK,EAAEA,KAAK,IAAIoB,CAAC,CAAC,0BAA0B,CAAE;IAC9C0D,OAAO,EAAEb,SAAS,IAAI1D,SAAU;AAChCwE,IAAAA,OAAO,EAAET;AAAY,GACtB,CAAC;AAEN;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { isNotPresent } from 'neetocist';
2
2
  import { mergeLeft } from 'ramda';
3
3
  import { useTranslation, Trans } from 'react-i18next';
4
- import { u as useFetchRecurringSettings, a as useUpdateRecurringSettings } from './useRecurringSettingsApi-B_kTDES9.js';
4
+ import { u as useFetchRecurringSettings, a as useUpdateRecurringSettings } from './useRecurringSettingsApi-Dkjo_BKx.js';
5
5
  import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
6
6
  import Container from '@bigbinary/neeto-molecules/Container';
7
7
  import Header from '@bigbinary/neeto-molecules/Header';
@@ -13,7 +13,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
13
13
  import '@tanstack/react-query';
14
14
  import 'neetocommons/react-utils';
15
15
  import 'axios';
16
- import './index-CajHy3NQ.js';
16
+ import './index-CpGnAY9G.js';
17
17
  import 'neetocommons/constants';
18
18
  import 'decimal.js';
19
19
  import 'neetocommons/utils';
@@ -5,10 +5,10 @@ import { Bar, buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend';
5
5
  import { Tooltip, Tag, Typography, Button, NoData, Table, Tab, Spinner } from '@bigbinary/neetoui';
6
6
  import { map, curry, reject, isNil, concat, prop, mergeDeepWith, mergeLeft, isEmpty, modify } from 'ramda';
7
7
  import { useHistory } from 'react-router-dom';
8
- import { E as ExportModal } from './ExportModal-Bun3pMGn.js';
9
- import { u as useFetchRefunds } from './useRefundsApi-DSMKTWIQ.js';
10
- import { q as PAYMENT_PROVIDERS, o as DEFAULT_TAG_STYLE, r as formatAmount, s as formatCurrency, v as buildDefaultTableColumns, S as SORT_DIRECTIONS, w as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, z as DEFAULT_SORT_PROPERTIES, x as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, D as DEFAULT_PAGE_VALUES, y as DASHBOARD_KIND } from './index-CajHy3NQ.js';
11
- import { m as mergeEnforcedFilters } from './dashboard-Ba2uhKXD.js';
8
+ import { E as ExportModal } from './ExportModal-hqjn7q4w.js';
9
+ import { u as useFetchRefunds } from './useRefundsApi-Ce4HmQgn.js';
10
+ import { q as PAYMENT_PROVIDERS, h as DEFAULT_TAG_STYLE, r as formatAmount, s as formatCurrency, v as buildDefaultTableColumns, S as SORT_DIRECTIONS, w as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, z as DEFAULT_SORT_PROPERTIES, x as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, D as DEFAULT_PAGE_VALUES, y as DASHBOARD_KIND } from './index-CpGnAY9G.js';
11
+ import { m as mergeEnforcedFilters } from './dashboard-BP47wvu-.js';
12
12
  import { t } from 'i18next';
13
13
  import { toLabelAndValue, humanize, snakeToCamelCase, isPresent, isNotPresent, camelToSnakeCase } from 'neetocist';
14
14
  import { useTableConfigurations } from '@bigbinary/neeto-molecules/Columns';
@@ -21,7 +21,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
21
  import Header from '@bigbinary/neeto-molecules/Header';
22
22
  import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
23
23
  import '@bigbinary/neeto-icons';
24
- import './useExportsApi-C1wjoVYy.js';
24
+ import './useExportsApi-BCnxSe7P.js';
25
25
  import '@tanstack/react-query';
26
26
  import 'axios';
27
27
  import './queryConstants-8c7Nd8ML.js';
@@ -5,9 +5,9 @@ import { Bar, buildFiltersFromURL } from '@bigbinary/neeto-filters-frontend';
5
5
  import { Modal, Typography, Tooltip, Tag, Pane, Spinner, Button, NoData, Table, Dropdown, Tab } from '@bigbinary/neetoui';
6
6
  import { mergeLeft, curry, reject, isNil, concat, map, prop, mergeDeepWith, sortBy, isEmpty, modify, pluck } from 'ramda';
7
7
  import { useHistory } from 'react-router-dom';
8
- import { E as ExportModal } from './ExportModal-Bun3pMGn.js';
9
- import { u as useShowSplitTransfers, a as useFetchSplitTransfers, b as useBulkUpdateSplitTransfers } from './useSplitTransfersApi-DlRs4wYh.js';
10
- import { H as preProcessStatus, I as getTagStyle, r as formatAmount, s as formatCurrency, J as PAYMENT_KIND, S as SORT_DIRECTIONS, z as DEFAULT_SORT_PROPERTIES, w as processDataIndex, x as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, D as DEFAULT_PAGE_VALUES, y as DASHBOARD_KIND } from './index-CajHy3NQ.js';
8
+ import { E as ExportModal } from './ExportModal-hqjn7q4w.js';
9
+ import { u as useShowSplitTransfers, a as useFetchSplitTransfers, b as useBulkUpdateSplitTransfers } from './useSplitTransfersApi-CDzhSH8q.js';
10
+ import { H as preProcessStatus, I as getTagStyle, r as formatAmount, s as formatCurrency, J as PAYMENT_KIND, S as SORT_DIRECTIONS, z as DEFAULT_SORT_PROPERTIES, w as processDataIndex, x as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, D as DEFAULT_PAGE_VALUES, y as DASHBOARD_KIND } from './index-CpGnAY9G.js';
11
11
  import { Form, Textarea, ActionBlock } from '@bigbinary/neetoui/formik';
12
12
  import { useTranslation, Trans } from 'react-i18next';
13
13
  import { t } from 'i18next';
@@ -23,7 +23,7 @@ import { C as CopyButtonWrapper } from './CopyButtonWrapper-CbzDq6Cq.js';
23
23
  import Header from '@bigbinary/neeto-molecules/Header';
24
24
  import SubHeader from '@bigbinary/neeto-molecules/SubHeader';
25
25
  import '@bigbinary/neeto-icons';
26
- import './useExportsApi-C1wjoVYy.js';
26
+ import './useExportsApi-BCnxSe7P.js';
27
27
  import '@tanstack/react-query';
28
28
  import 'axios';
29
29
  import 'neetocommons/react-utils';
@@ -1,12 +1,12 @@
1
1
  import { Tooltip, Switch } from '@bigbinary/neetoui';
2
2
  import { useTranslation } from 'react-i18next';
3
- import { u as useFetchCheckoutSetting, a as useUpdateCheckoutSetting } from './useCheckoutSettingsApi-D1ZvMA4B.js';
3
+ import { u as useFetchCheckoutSetting, a as useUpdateCheckoutSetting } from './useCheckoutSettingsApi-B29sE02j.js';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
5
5
  import '@tanstack/react-query';
6
6
  import 'neetocommons/react-utils';
7
7
  import 'ramda';
8
8
  import 'axios';
9
- import './index-CajHy3NQ.js';
9
+ import './index-CpGnAY9G.js';
10
10
  import 'i18next';
11
11
  import 'neetocommons/constants';
12
12
  import 'decimal.js';