@bigbinary/neeto-payments-frontend 4.0.8 → 4.0.9

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 (111) hide show
  1. package/app/javascript/src/translations/en.json +15 -1
  2. package/dist/AccountsDashboard.js +13 -34
  3. package/dist/AccountsDashboard.js.map +1 -1
  4. package/dist/AdminCancelRecurringPaymentButton.js +1 -1
  5. package/dist/CashPaymentButton.js +2 -2
  6. package/dist/ConfirmCashPaymentButton.js +2 -2
  7. package/dist/CustomerCancelRecurringPaymentForm.js +2 -2
  8. package/dist/{ExportModal-B4zqaXJ1.js → ExportModal-UegCpavy.js} +2 -2
  9. package/dist/{ExportModal-B4zqaXJ1.js.map → ExportModal-UegCpavy.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 +3 -3
  15. package/dist/PayoutsDashboard.js +5 -5
  16. package/dist/PayoutsPage.js +4 -4
  17. package/dist/RazorpayPaymentButton.js +2 -2
  18. package/dist/RecurringPaymentSettings.js +2 -2
  19. package/dist/RefundsDashboard.js +3 -3
  20. package/dist/SplitTransfersDashboard.js +3 -3
  21. package/dist/StripeConnect.js +377 -0
  22. package/dist/StripeConnect.js.map +1 -0
  23. package/dist/TaxesDashboard.js +2 -2
  24. package/dist/buildStripeTransactionLink.js +1 -1
  25. package/dist/cjs/AccountsDashboard.js +14 -35
  26. package/dist/cjs/AccountsDashboard.js.map +1 -1
  27. package/dist/cjs/AdminCancelRecurringPaymentButton.js +1 -1
  28. package/dist/cjs/CashPaymentButton.js +2 -2
  29. package/dist/cjs/ConfirmCashPaymentButton.js +2 -2
  30. package/dist/cjs/CustomerCancelRecurringPaymentForm.js +2 -2
  31. package/dist/cjs/{ExportModal-GI2FElh3.js → ExportModal-DxApGBel.js} +2 -2
  32. package/dist/cjs/{ExportModal-GI2FElh3.js.map → ExportModal-DxApGBel.js.map} +1 -1
  33. package/dist/cjs/ManualUpiConnect.js +2 -2
  34. package/dist/cjs/ManualUpiPayment.js +2 -2
  35. package/dist/cjs/ManualUpiPaymentConfirmButton.js +2 -2
  36. package/dist/cjs/ManualUpiPaymentRejectButton.js +2 -2
  37. package/dist/cjs/PaymentsDashboard.js +3 -3
  38. package/dist/cjs/PayoutsDashboard.js +5 -5
  39. package/dist/cjs/PayoutsPage.js +4 -4
  40. package/dist/cjs/RazorpayPaymentButton.js +2 -2
  41. package/dist/cjs/RecurringPaymentSettings.js +2 -2
  42. package/dist/cjs/RefundsDashboard.js +3 -3
  43. package/dist/cjs/SplitTransfersDashboard.js +3 -3
  44. package/dist/cjs/StripeConnect.js +398 -0
  45. package/dist/cjs/StripeConnect.js.map +1 -0
  46. package/dist/cjs/TaxesDashboard.js +2 -2
  47. package/dist/cjs/buildStripeTransactionLink.js +1 -1
  48. package/dist/cjs/constants.js +2 -1
  49. package/dist/cjs/constants.js.map +1 -1
  50. package/dist/cjs/{dashboard-DDW7FD1Q.js → dashboard-BS8RsSUN.js} +2 -2
  51. package/dist/cjs/{dashboard-DDW7FD1Q.js.map → dashboard-BS8RsSUN.js.map} +1 -1
  52. package/dist/cjs/getAmountInSmallestCurrencyUnit.js +1 -1
  53. package/dist/cjs/getAmountWithAppliedTax.js +1 -1
  54. package/dist/cjs/getFormattedAmount.js +1 -1
  55. package/dist/cjs/getFormattedTaxAmount.js +1 -1
  56. package/dist/cjs/getFormattedTipAmount.js +1 -1
  57. package/dist/cjs/getQrCodeValue.js +1 -1
  58. package/dist/cjs/getTaxAmount.js +1 -1
  59. package/dist/cjs/getTipAmount.js +1 -1
  60. package/dist/cjs/{index-RKMq21yy.js → index-D0lrwfeJ.js} +3 -1
  61. package/dist/cjs/{index-RKMq21yy.js.map → index-D0lrwfeJ.js.map} +1 -1
  62. package/dist/cjs/index.js +16 -9
  63. package/dist/cjs/index.js.map +1 -1
  64. package/dist/cjs/{queryConstants-D2ARfy8-.js → queryConstants-Bnud13rz.js} +4 -2
  65. package/dist/cjs/queryConstants-Bnud13rz.js.map +1 -0
  66. package/dist/cjs/{renderFunctions-9xNgMpUY.js → renderFunctions-pCev76XN.js} +2 -2
  67. package/dist/cjs/{renderFunctions-9xNgMpUY.js.map → renderFunctions-pCev76XN.js.map} +1 -1
  68. package/dist/cjs/useAccountsApi-JFImy9Nr.js +62 -0
  69. package/dist/cjs/useAccountsApi-JFImy9Nr.js.map +1 -0
  70. package/dist/cjs/{usePaymentApi-CMOLq2VR.js → usePaymentApi-CHAcirnx.js} +2 -2
  71. package/dist/cjs/{usePaymentApi-CMOLq2VR.js.map → usePaymentApi-CHAcirnx.js.map} +1 -1
  72. package/dist/cjs/{usePaymentApi-D9rbv9km.js → usePaymentApi-DoMBeLfx.js} +2 -2
  73. package/dist/cjs/{usePaymentApi-D9rbv9km.js.map → usePaymentApi-DoMBeLfx.js.map} +1 -1
  74. package/dist/cjs/{usePaymentApi-DU3yYSX5.js → usePaymentApi-qdh5LN7u.js} +2 -2
  75. package/dist/cjs/{usePaymentApi-DU3yYSX5.js.map → usePaymentApi-qdh5LN7u.js.map} +1 -1
  76. package/dist/cjs/{usePlatformApi-CmetBzFR.js → usePlatformApi-CAYOstUm.js} +3 -3
  77. package/dist/cjs/{usePlatformApi-CmetBzFR.js.map → usePlatformApi-CAYOstUm.js.map} +1 -1
  78. package/dist/cjs/useRazorpayPayment.js +2 -2
  79. package/dist/constants.js +1 -1
  80. package/dist/{dashboard-W7nZb7Nt.js → dashboard-BmgAk7ZF.js} +2 -2
  81. package/dist/{dashboard-W7nZb7Nt.js.map → dashboard-BmgAk7ZF.js.map} +1 -1
  82. package/dist/getAmountInSmallestCurrencyUnit.js +1 -1
  83. package/dist/getAmountWithAppliedTax.js +1 -1
  84. package/dist/getFormattedAmount.js +1 -1
  85. package/dist/getFormattedTaxAmount.js +1 -1
  86. package/dist/getFormattedTipAmount.js +1 -1
  87. package/dist/getQrCodeValue.js +1 -1
  88. package/dist/getTaxAmount.js +1 -1
  89. package/dist/getTipAmount.js +1 -1
  90. package/dist/{index-DrwJCsVB.js → index-P40XHLrP.js} +3 -2
  91. package/dist/{index-DrwJCsVB.js.map → index-P40XHLrP.js.map} +1 -1
  92. package/dist/index.js +15 -9
  93. package/dist/index.js.map +1 -1
  94. package/dist/{queryConstants-jobxv6K1.js → queryConstants-BkIldboJ.js} +4 -2
  95. package/dist/queryConstants-BkIldboJ.js.map +1 -0
  96. package/dist/{renderFunctions-CwG8PO6s.js → renderFunctions-ByiZ0trU.js} +2 -2
  97. package/dist/{renderFunctions-CwG8PO6s.js.map → renderFunctions-ByiZ0trU.js.map} +1 -1
  98. package/dist/useAccountsApi-UO-GFSyi.js +58 -0
  99. package/dist/useAccountsApi-UO-GFSyi.js.map +1 -0
  100. package/dist/{usePaymentApi--FTQFayz.js → usePaymentApi-BEsw6xFl.js} +2 -2
  101. package/dist/{usePaymentApi--FTQFayz.js.map → usePaymentApi-BEsw6xFl.js.map} +1 -1
  102. package/dist/{usePaymentApi-D57hcC0x.js → usePaymentApi-CnjUFTLo.js} +2 -2
  103. package/dist/{usePaymentApi-D57hcC0x.js.map → usePaymentApi-CnjUFTLo.js.map} +1 -1
  104. package/dist/{usePaymentApi-CnXIy7y7.js → usePaymentApi-DTQ8wxiL.js} +2 -2
  105. package/dist/{usePaymentApi-CnXIy7y7.js.map → usePaymentApi-DTQ8wxiL.js.map} +1 -1
  106. package/dist/{usePlatformApi-CG6LhSj3.js → usePlatformApi-CqsxCyY-.js} +3 -3
  107. package/dist/{usePlatformApi-CG6LhSj3.js.map → usePlatformApi-CqsxCyY-.js.map} +1 -1
  108. package/dist/useRazorpayPayment.js +2 -2
  109. package/package.json +3 -3
  110. package/dist/cjs/queryConstants-D2ARfy8-.js.map +0 -1
  111. package/dist/queryConstants-jobxv6K1.js.map +0 -1
@@ -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-CwG8PO6s.js';
8
- import { u as useShowStripePayout, a as useShowStripePlatformPayout } from './usePlatformApi-CG6LhSj3.js';
7
+ import { r as renderStatus, a as renderDate } from './renderFunctions-ByiZ0trU.js';
8
+ import { u as useShowStripePayout, a as useShowStripePlatformPayout } from './usePlatformApi-CqsxCyY-.js';
9
9
  import Button from '@bigbinary/neetoui/Button';
10
10
  import { C as CopyButtonWrapper } from './CopyButtonWrapper-B79WRogM.js';
11
- import { j as buildStripePayoutLink } from './index-DrwJCsVB.js';
11
+ import { j as buildStripePayoutLink } from './index-P40XHLrP.js';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
13
  import 'i18next';
14
14
  import '@bigbinary/neeto-molecules/DateFormat';
@@ -21,7 +21,7 @@ import '@tanstack/react-query';
21
21
  import '@bigbinary/neeto-commons-frontend/react-utils';
22
22
  import 'axios';
23
23
  import 'qs';
24
- import './queryConstants-jobxv6K1.js';
24
+ import './queryConstants-BkIldboJ.js';
25
25
  import '@bigbinary/neeto-commons-frontend/constants';
26
26
  import 'decimal.js';
27
27
  import '@bigbinary/neeto-commons-frontend/utils';
@@ -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-CnXIy7y7.js';
8
- import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-DrwJCsVB.js';
7
+ import { u as useCreateRazorpayPayment } from './usePaymentApi-DTQ8wxiL.js';
8
+ import { R as RAZORPAY_PAYMENT_BUTTON_OPTIONS } from './index-P40XHLrP.js';
9
9
  import { jsx } from 'react/jsx-runtime';
10
10
  import '@babel/runtime/helpers/defineProperty';
11
11
  import '@tanstack/react-query';
@@ -14,8 +14,8 @@ 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-DrwJCsVB.js';
18
- import { Q as QUERY_KEYS } from './queryConstants-jobxv6K1.js';
17
+ import { B as BASE_URL } from './index-P40XHLrP.js';
18
+ import { Q as QUERY_KEYS } from './queryConstants-BkIldboJ.js';
19
19
  import { t } from 'i18next';
20
20
  import * as yup from 'yup';
21
21
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -8,11 +8,11 @@ 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-B4zqaXJ1.js';
11
+ import { E as ExportModal } from './ExportModal-UegCpavy.js';
12
12
  import { useQuery } from '@tanstack/react-query';
13
13
  import axios from 'axios';
14
- import { B as BASE_URL, P as PAYMENT_PROVIDERS, D as DEFAULT_TAG_STYLE, l as formatAmount, m as formatCurrency, o as buildDefaultTableColumns, S as SORT_DIRECTIONS, p as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, r as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, k as DEFAULT_PAGE_VALUES, q as DASHBOARD_KIND } from './index-DrwJCsVB.js';
15
- import { Q as QUERY_KEYS } from './queryConstants-jobxv6K1.js';
14
+ import { B as BASE_URL, P as PAYMENT_PROVIDERS, D as DEFAULT_TAG_STYLE, n as formatAmount, o as formatCurrency, q as buildDefaultTableColumns, S as SORT_DIRECTIONS, r as processDataIndex, A as ASSOCIATED_TABLE_COLUMNS, m as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, k as DEFAULT_PAGE_VALUES, t as DASHBOARD_KIND } from './index-P40XHLrP.js';
15
+ import { Q as QUERY_KEYS } from './queryConstants-BkIldboJ.js';
16
16
  import { t } from 'i18next';
17
17
  import { toLabelAndValue, snakeToCamelCase, humanize, isPresent, isNotPresent, camelToSnakeCase } from '@bigbinary/neeto-cist';
18
18
  import { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
@@ -8,12 +8,12 @@ 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-B4zqaXJ1.js';
11
+ import { E as ExportModal } from './ExportModal-UegCpavy.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, v as preProcessStatus, w as getTagStyle, l as formatAmount, m as formatCurrency, x as PAYMENT_KIND, p as processDataIndex, S as SORT_DIRECTIONS, r as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, k as DEFAULT_PAGE_VALUES, q as DASHBOARD_KIND } from './index-DrwJCsVB.js';
16
- import { Q as QUERY_KEYS } from './queryConstants-jobxv6K1.js';
15
+ import { B as BASE_URL, w as preProcessStatus, x as getTagStyle, n as formatAmount, o as formatCurrency, y as PAYMENT_KIND, r as processDataIndex, S as SORT_DIRECTIONS, m as DEFAULT_SORT_PROPERTIES, s as shouldTabsVisible, U as UN_HIDEABLE_COLUMNS, k as DEFAULT_PAGE_VALUES, t as DASHBOARD_KIND } from './index-P40XHLrP.js';
16
+ import { Q as QUERY_KEYS } from './queryConstants-BkIldboJ.js';
17
17
  import Modal from '@bigbinary/neetoui/Modal';
18
18
  import Typography from '@bigbinary/neetoui/Typography';
19
19
  import Form from '@bigbinary/neetoui/formik/Form';
@@ -0,0 +1,377 @@
1
+ import { humanize, isPresent, isNotPresent, _humanize, noop } from '@bigbinary/neeto-cist';
2
+ import Container from '@bigbinary/neeto-molecules/Container';
3
+ import Header from '@bigbinary/neeto-molecules/Header';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { useHistory, Switch, Route } from 'react-router-dom';
6
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
7
+ import { useState, useEffect } from 'react';
8
+ import DOMPurify from 'dompurify';
9
+ import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
10
+ import Stripe from '@bigbinary/neeto-icons/misc/Stripe';
11
+ import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
12
+ import Radio from '@bigbinary/neetoui/Radio';
13
+ import Button from '@bigbinary/neetoui/Button';
14
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
15
+ import { useQuery } from '@tanstack/react-query';
16
+ import axios from 'axios';
17
+ import { B as BASE_URL, v as STRIPE_CONNECT_ENDPOINT } from './index-P40XHLrP.js';
18
+ import { Q as QUERY_KEYS } from './queryConstants-BkIldboJ.js';
19
+ import { t } from 'i18next';
20
+ import * as yup from 'yup';
21
+ import { jsx, jsxs } from 'react/jsx-runtime';
22
+ import Spinner from '@bigbinary/neetoui/Spinner';
23
+ import Select from '@bigbinary/neetoui/formik/Select';
24
+ import Form from '@bigbinary/neetoui/formik/Form';
25
+ import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
26
+ import { a as useCreateStripeAccount, b as usePollingStripeAccountCreationStatus } from './useAccountsApi-UO-GFSyi.js';
27
+ import { useQueryParams } from '@bigbinary/neeto-commons-frontend/react-utils';
28
+ import Typography from '@bigbinary/neetoui/Typography';
29
+ import Callout from '@bigbinary/neetoui/Callout';
30
+ import '@bigbinary/neeto-commons-frontend/constants';
31
+ import 'decimal.js';
32
+ import 'ramda';
33
+
34
+ var list = function list() {
35
+ return axios.get("".concat(BASE_URL, "/api/v1/integrations"));
36
+ };
37
+ var integrationsApi = {
38
+ list: list
39
+ };
40
+
41
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
42
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
43
+ var useFetchPaymentIntegrations = function useFetchPaymentIntegrations(options) {
44
+ return useQuery(_objectSpread({
45
+ queryKey: [QUERY_KEYS.PAYMENT_INTEGRATION_LIST],
46
+ queryFn: integrationsApi.list
47
+ }, options));
48
+ };
49
+
50
+ var INTEGRATION_METHOD = {
51
+ useExistingAccount: "use_existing_account",
52
+ createNewAccount: "create_new_account"
53
+ };
54
+ var POLLING_INTERVAL = 5000;
55
+ var MAX_POLLING_TIME = 30000;
56
+ var INITIAL_VALUES = {
57
+ country: "",
58
+ return_url: ""
59
+ };
60
+ var VALIDATION_SCHEMA = yup.object().shape({
61
+ country: yup.object().required(t("neetoPayments.validations.countryRequired"))
62
+ });
63
+
64
+ var sanitize = DOMPurify.sanitize;
65
+ var Account = function Account(_ref) {
66
+ var processingPageRoute = _ref.processingPageRoute,
67
+ countryPageRoute = _ref.countryPageRoute,
68
+ productNameLabel = _ref.productNameLabel,
69
+ getStripeAccount = _ref.getStripeAccount,
70
+ manageRoute = _ref.manageRoute;
71
+ var _useTranslation = useTranslation(),
72
+ t = _useTranslation.t;
73
+ var _useState = useState(INTEGRATION_METHOD.createNewAccount),
74
+ _useState2 = _slicedToArray(_useState, 2),
75
+ selectedOption = _useState2[0],
76
+ setSelectedOption = _useState2[1];
77
+ var history = useHistory();
78
+ var _useFetchPaymentInteg = useFetchPaymentIntegrations(),
79
+ _useFetchPaymentInteg2 = _useFetchPaymentInteg.data,
80
+ _useFetchPaymentInteg3 = _useFetchPaymentInteg2 === void 0 ? {} : _useFetchPaymentInteg2,
81
+ stripeStandardAccounts = _useFetchPaymentInteg3.stripeStandardAccounts;
82
+ var stripeAccount = getStripeAccount(stripeStandardAccounts);
83
+ var stripeConnectUrl = buildUrl(STRIPE_CONNECT_ENDPOINT, {
84
+ return_url: "".concat(window.location.origin).concat(processingPageRoute)
85
+ });
86
+ var handleSubmit = function handleSubmit() {
87
+ if (selectedOption !== INTEGRATION_METHOD.useExistingAccount) {
88
+ return history.push(countryPageRoute);
89
+ }
90
+ return window.location.href = sanitize(stripeConnectUrl);
91
+ };
92
+ useEffect(function () {
93
+ if (stripeAccount !== null && stripeAccount !== void 0 && stripeAccount.isConnected) {
94
+ history.push(manageRoute);
95
+ }
96
+ }, [stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.isConnected]);
97
+ return /*#__PURE__*/jsx(CardLayout, {
98
+ icon: /*#__PURE__*/jsx(Stripe, {
99
+ size: 48
100
+ }),
101
+ title: t("neetoPayments.stripeConnect.title"),
102
+ actionBlock: /*#__PURE__*/jsx(Button, {
103
+ label: t("neetoPayments.common.continue"),
104
+ onClick: handleSubmit
105
+ }),
106
+ description: t("neetoPayments.stripeConnect.unlinkedDescription", {
107
+ productNameLabel: productNameLabel
108
+ }),
109
+ children: /*#__PURE__*/jsxs(Radio, {
110
+ value: selectedOption,
111
+ onChange: function onChange(_ref2) {
112
+ var value = _ref2.target.value;
113
+ return setSelectedOption(value);
114
+ },
115
+ children: [/*#__PURE__*/jsx(Radio.Item, {
116
+ label: t("neetoPayments.stripeConnect.createNewAccount"),
117
+ name: "accountMethod",
118
+ value: INTEGRATION_METHOD.createNewAccount
119
+ }), /*#__PURE__*/jsx(Radio.Item, {
120
+ label: t("neetoPayments.stripeConnect.useExistingAccount"),
121
+ name: "accountMethod",
122
+ value: INTEGRATION_METHOD.useExistingAccount
123
+ })]
124
+ })
125
+ });
126
+ };
127
+
128
+ var fetchCountries = function fetchCountries() {
129
+ return axios.get("".concat(BASE_URL, "/api/v1/stripe/countries"));
130
+ };
131
+ var countriesApi = {
132
+ fetchCountries: fetchCountries
133
+ };
134
+
135
+ var useFetchStripeCountries = function useFetchStripeCountries() {
136
+ return useQuery({
137
+ queryKey: [QUERY_KEYS.STRIPE_COUNTRIES],
138
+ queryFn: countriesApi.fetchCountries
139
+ });
140
+ };
141
+
142
+ var buildRefreshUrl = function buildRefreshUrl(accountId, returnUrl) {
143
+ return "/payments/api/v1/stripe/callbacks/".concat(accountId, "/refresh?return_url=").concat(returnUrl);
144
+ };
145
+ var buildCountryOptions = function buildCountryOptions(countries) {
146
+ var _Object$entries;
147
+ return (_Object$entries = Object.entries(countries)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(function (country) {
148
+ return {
149
+ label: humanize(country[0]),
150
+ value: country[1]
151
+ };
152
+ });
153
+ };
154
+
155
+ var Country = function Country(_ref) {
156
+ var processingPageRoute = _ref.processingPageRoute,
157
+ productNameLabel = _ref.productNameLabel;
158
+ var _useState = useState(false),
159
+ _useState2 = _slicedToArray(_useState, 2),
160
+ isPolling = _useState2[0],
161
+ setIsPolling = _useState2[1];
162
+ var _useTranslation = useTranslation(),
163
+ t = _useTranslation.t;
164
+ var history = useHistory();
165
+ var refetchInterval = function refetchInterval(query) {
166
+ var _ref2 = query.state.data || {},
167
+ jobStatus = _ref2.jobStatus,
168
+ onboarding = _ref2.onboarding;
169
+ if (jobStatus === "complete") {
170
+ window.open(onboarding === null || onboarding === void 0 ? void 0 : onboarding.url, "_self");
171
+ return false;
172
+ }
173
+ return POLLING_INTERVAL;
174
+ };
175
+ var _useCreateStripeAccou = useCreateStripeAccount({
176
+ onSuccess: function onSuccess() {
177
+ return setIsPolling(true);
178
+ }
179
+ }),
180
+ isCreating = _useCreateStripeAccou.isPending,
181
+ _useCreateStripeAccou2 = _useCreateStripeAccou.data,
182
+ _useCreateStripeAccou3 = _useCreateStripeAccou2 === void 0 ? {} : _useCreateStripeAccou2,
183
+ jobId = _useCreateStripeAccou3.jobId,
184
+ createStripeAccount = _useCreateStripeAccou.mutate;
185
+ var _useFetchStripeCountr = useFetchStripeCountries(),
186
+ isLoading = _useFetchStripeCountr.isLoading,
187
+ _useFetchStripeCountr2 = _useFetchStripeCountr.data,
188
+ _useFetchStripeCountr3 = _useFetchStripeCountr2 === void 0 ? {} : _useFetchStripeCountr2,
189
+ _useFetchStripeCountr4 = _useFetchStripeCountr3.countries,
190
+ countries = _useFetchStripeCountr4 === void 0 ? {} : _useFetchStripeCountr4;
191
+ usePollingStripeAccountCreationStatus(jobId, {
192
+ refetchInterval: refetchInterval,
193
+ enabled: isPresent(jobId)
194
+ });
195
+ var handleSubmit = function handleSubmit(values) {
196
+ var payload = {
197
+ returnUrl: "".concat(window.location.origin).concat(processingPageRoute),
198
+ country: values.country.value
199
+ };
200
+ createStripeAccount(payload);
201
+ };
202
+ if (isLoading) {
203
+ return /*#__PURE__*/jsx("div", {
204
+ className: "flex items-center justify-center flex-grow w-full",
205
+ children: /*#__PURE__*/jsx(Spinner, {})
206
+ });
207
+ }
208
+ return /*#__PURE__*/jsx(Form, {
209
+ className: "w-full",
210
+ formikProps: {
211
+ enableReinitialize: true,
212
+ initialValues: INITIAL_VALUES,
213
+ validationSchema: VALIDATION_SCHEMA,
214
+ onSubmit: handleSubmit
215
+ },
216
+ children: /*#__PURE__*/jsx(CardLayout, {
217
+ icon: /*#__PURE__*/jsx(Stripe, {
218
+ size: 48
219
+ }),
220
+ title: t("neetoPayments.stripeConnect.title"),
221
+ actionBlock: /*#__PURE__*/jsx(ActionBlock, {
222
+ cancelButtonProps: {
223
+ onClick: function onClick() {
224
+ return history.goBack();
225
+ }
226
+ },
227
+ isSubmitting: isCreating || isPolling,
228
+ submitButtonProps: {
229
+ label: t("neetoPayments.common.connect")
230
+ }
231
+ }),
232
+ description: t("neetoPayments.stripeConnect.unlinkedDescription", {
233
+ productNameLabel: productNameLabel
234
+ }),
235
+ children: /*#__PURE__*/jsx(Select, {
236
+ required: true,
237
+ helpText: t("neetoPayments.stripeConnect.countryHelpText"),
238
+ label: t("neetoPayments.common.country"),
239
+ name: "country",
240
+ options: buildCountryOptions(countries),
241
+ placeholder: t("neetoPayments.stripeConnect.countryPlaceholder")
242
+ })
243
+ })
244
+ });
245
+ };
246
+
247
+ var Processing = function Processing(_ref) {
248
+ var getStripeAccount = _ref.getStripeAccount,
249
+ productNameLabel = _ref.productNameLabel,
250
+ manageRoute = _ref.manageRoute;
251
+ var _useState = useState(false),
252
+ _useState2 = _slicedToArray(_useState, 2),
253
+ isPolling = _useState2[0],
254
+ setIsPolling = _useState2[1];
255
+ var _useTranslation = useTranslation(),
256
+ t = _useTranslation.t;
257
+ var history = useHistory();
258
+ var _useQueryParams = useQueryParams(),
259
+ error = _useQueryParams.error,
260
+ errorDescription = _useQueryParams.errorDescription;
261
+ var refetchInterval = function refetchInterval(query) {
262
+ var _ref2 = query.state.data || {},
263
+ stripeStandardAccounts = _ref2.stripeStandardAccounts;
264
+ var stripeAccount = getStripeAccount(stripeStandardAccounts);
265
+ if (!(stripeAccount !== null && stripeAccount !== void 0 && stripeAccount.isConnected) && isPolling) {
266
+ return POLLING_INTERVAL;
267
+ }
268
+ if (stripeAccount !== null && stripeAccount !== void 0 && stripeAccount.isConnected) {
269
+ setIsPolling(false);
270
+ history.push(manageRoute);
271
+ }
272
+ return false;
273
+ };
274
+ var _useFetchPaymentInteg = useFetchPaymentIntegrations({
275
+ refetchInterval: refetchInterval,
276
+ enabled: isNotPresent(error)
277
+ }),
278
+ _useFetchPaymentInteg2 = _useFetchPaymentInteg.data,
279
+ _useFetchPaymentInteg3 = _useFetchPaymentInteg2 === void 0 ? {} : _useFetchPaymentInteg2,
280
+ stripeStandardAccounts = _useFetchPaymentInteg3.stripeStandardAccounts;
281
+ var stripeAccount = getStripeAccount(stripeStandardAccounts);
282
+ var isAccountProcessingFailed = isPresent(error) && isPresent(errorDescription) || !isPolling && !(stripeAccount !== null && stripeAccount !== void 0 && stripeAccount.isConnected);
283
+ useEffect(function () {
284
+ if (stripeAccount !== null && stripeAccount !== void 0 && stripeAccount.isConnected) {
285
+ history.push(manageRoute);
286
+ }
287
+ if (isNotPresent(error)) {
288
+ setIsPolling(true);
289
+ }
290
+ setInterval(function () {
291
+ setIsPolling(false);
292
+ }, MAX_POLLING_TIME);
293
+ }, []);
294
+ return /*#__PURE__*/jsxs(CardLayout, {
295
+ icon: /*#__PURE__*/jsx(Stripe, {
296
+ size: 48
297
+ }),
298
+ title: t("neetoPayments.stripeConnect.title"),
299
+ actionBlock: isAccountProcessingFailed && /*#__PURE__*/jsx(Button, {
300
+ href: buildRefreshUrl(stripeAccount === null || stripeAccount === void 0 ? void 0 : stripeAccount.id),
301
+ label: t("neetoPayments.common.tryAgain")
302
+ }),
303
+ description: t("neetoPayments.stripeConnect.linkedDescription", {
304
+ productNameLabel: productNameLabel
305
+ }),
306
+ children: [isPolling && /*#__PURE__*/jsx(Callout, {
307
+ children: /*#__PURE__*/jsxs("div", {
308
+ className: "flex space-x-4",
309
+ children: [/*#__PURE__*/jsx(Spinner, {}), /*#__PURE__*/jsx(Typography, {
310
+ style: "body1",
311
+ children: t("neetoPayments.stripeConnect.verifyingMessage")
312
+ })]
313
+ })
314
+ }), isAccountProcessingFailed && /*#__PURE__*/jsx(Callout, {
315
+ style: "danger",
316
+ children: /*#__PURE__*/jsx(Typography, {
317
+ style: "body1",
318
+ children: isPresent(errorDescription) ? _humanize(errorDescription) : t("neetoPayments.stripeConnect.failedProcessing")
319
+ })
320
+ })]
321
+ });
322
+ };
323
+
324
+ var StripeConnect = function StripeConnect(_ref) {
325
+ var baseRoute = _ref.baseRoute,
326
+ manageRoute = _ref.manageRoute,
327
+ breadcrumbs = _ref.breadcrumbs,
328
+ productNameLabel = _ref.productNameLabel,
329
+ _ref$getStripeAccount = _ref.getStripeAccount,
330
+ getStripeAccount = _ref$getStripeAccount === void 0 ? noop : _ref$getStripeAccount;
331
+ var _useTranslation = useTranslation(),
332
+ t = _useTranslation.t;
333
+ var countryPageRoute = "".concat(baseRoute, "/countries");
334
+ var processingPageRoute = "".concat(baseRoute, "/processing");
335
+ return /*#__PURE__*/jsxs(Container, {
336
+ children: [/*#__PURE__*/jsx(Header, {
337
+ breadcrumbs: breadcrumbs,
338
+ title: t("neetoPayments.common.connect")
339
+ }), /*#__PURE__*/jsxs(Switch, {
340
+ children: [/*#__PURE__*/jsx(Route, {
341
+ exact: true,
342
+ path: baseRoute,
343
+ render: function render() {
344
+ return /*#__PURE__*/jsx(Account, {
345
+ countryPageRoute: countryPageRoute,
346
+ getStripeAccount: getStripeAccount,
347
+ manageRoute: manageRoute,
348
+ processingPageRoute: processingPageRoute,
349
+ productNameLabel: productNameLabel
350
+ });
351
+ }
352
+ }), /*#__PURE__*/jsx(Route, {
353
+ exact: true,
354
+ path: countryPageRoute,
355
+ component: function component() {
356
+ return /*#__PURE__*/jsx(Country, {
357
+ processingPageRoute: processingPageRoute,
358
+ productNameLabel: productNameLabel
359
+ });
360
+ }
361
+ }), /*#__PURE__*/jsx(Route, {
362
+ exact: true,
363
+ path: processingPageRoute,
364
+ component: function component() {
365
+ return /*#__PURE__*/jsx(Processing, {
366
+ getStripeAccount: getStripeAccount,
367
+ manageRoute: manageRoute,
368
+ productNameLabel: productNameLabel
369
+ });
370
+ }
371
+ })]
372
+ })]
373
+ });
374
+ };
375
+
376
+ export { StripeConnect as default };
377
+ //# sourceMappingURL=StripeConnect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripeConnect.js","sources":["../app/javascript/src/apis/integrations.js","../app/javascript/src/hooks/reactQuery/useIntegrationsApi.js","../app/javascript/src/components/StripeConnect/constants.js","../app/javascript/src/components/StripeConnect/Account.jsx","../app/javascript/src/apis/countries.js","../app/javascript/src/hooks/reactQuery/useCountriesApi.js","../app/javascript/src/components/StripeConnect/utils.js","../app/javascript/src/components/StripeConnect/Country.jsx","../app/javascript/src/components/StripeConnect/Processing.jsx","../app/javascript/src/components/StripeConnect/index.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = () => axios.get(`${BASE_URL}/api/v1/integrations`);\n\nconst integrationsApi = { list };\n\nexport default integrationsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport integrationsApi from \"apis/integrations\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchPaymentIntegrations = options =>\n useQuery({\n queryKey: [QUERY_KEYS.PAYMENT_INTEGRATION_LIST],\n queryFn: integrationsApi.list,\n ...options,\n });\n","import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const VALID_ERROR_CODES = [\n \"account_already_exists\",\n \"account_not_activated\",\n];\n\nexport const INTEGRATION_METHOD = {\n useExistingAccount: \"use_existing_account\",\n createNewAccount: \"create_new_account\",\n};\nexport const POLLING_INTERVAL = 5000;\nexport const MAX_POLLING_TIME = 30000;\nexport const INITIAL_VALUES = { country: \"\", return_url: \"\" };\n\nexport const VALIDATION_SCHEMA = yup.object().shape({\n country: yup\n .object()\n .required(t(\"neetoPayments.validations.countryRequired\")),\n});\n","import { useEffect, useState } from \"react\";\n\nimport DOMPurify from \"dompurify\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Stripe } from \"neetoicons/misc\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Radio, Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useFetchPaymentIntegrations } from \"hooks/reactQuery/useIntegrationsApi\";\nimport { STRIPE_CONNECT_ENDPOINT } from \"src/constants\";\n\nimport { INTEGRATION_METHOD } from \"./constants\";\n\nconst sanitize = DOMPurify.sanitize;\n\nconst Account = ({\n processingPageRoute,\n countryPageRoute,\n productNameLabel,\n getStripeAccount,\n manageRoute,\n}) => {\n const { t } = useTranslation();\n const [selectedOption, setSelectedOption] = useState(\n INTEGRATION_METHOD.createNewAccount\n );\n\n const history = useHistory();\n\n const { data: { stripeStandardAccounts } = {} } =\n useFetchPaymentIntegrations();\n const stripeAccount = getStripeAccount(stripeStandardAccounts);\n\n const stripeConnectUrl = buildUrl(STRIPE_CONNECT_ENDPOINT, {\n return_url: `${window.location.origin}${processingPageRoute}`,\n });\n\n const handleSubmit = () => {\n if (selectedOption !== INTEGRATION_METHOD.useExistingAccount) {\n return history.push(countryPageRoute);\n }\n\n return (window.location.href = sanitize(stripeConnectUrl));\n };\n\n useEffect(() => {\n if (stripeAccount?.isConnected) {\n history.push(manageRoute);\n }\n }, [stripeAccount?.isConnected]);\n\n return (\n <CardLayout\n icon={<Stripe size={48} />}\n title={t(\"neetoPayments.stripeConnect.title\")}\n actionBlock={\n <Button\n label={t(\"neetoPayments.common.continue\")}\n onClick={handleSubmit}\n />\n }\n description={t(\"neetoPayments.stripeConnect.unlinkedDescription\", {\n productNameLabel,\n })}\n >\n <Radio\n value={selectedOption}\n onChange={({ target: { value } }) => setSelectedOption(value)}\n >\n <Radio.Item\n label={t(\"neetoPayments.stripeConnect.createNewAccount\")}\n name=\"accountMethod\"\n value={INTEGRATION_METHOD.createNewAccount}\n />\n <Radio.Item\n label={t(\"neetoPayments.stripeConnect.useExistingAccount\")}\n name=\"accountMethod\"\n value={INTEGRATION_METHOD.useExistingAccount}\n />\n </Radio>\n </CardLayout>\n );\n};\n\nexport default Account;\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst fetchCountries = () => axios.get(`${BASE_URL}/api/v1/stripe/countries`);\n\nconst countriesApi = { fetchCountries };\n\nexport default countriesApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport countriesApi from \"apis/countries\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchStripeCountries = () =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_COUNTRIES],\n queryFn: countriesApi.fetchCountries,\n });\n","import { humanize } from \"neetocist\";\n\nexport const buildRefreshUrl = (accountId, returnUrl) =>\n `/payments/api/v1/stripe/callbacks/${accountId}/refresh?return_url=${returnUrl}`;\n\nexport const buildCountryOptions = countries =>\n Object.entries(countries)?.map(country => ({\n label: humanize(country[0]),\n value: country[1],\n }));\n","import { useState } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { Stripe } from \"neetoicons/misc\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Spinner } from \"neetoui\";\nimport { Select, Form, ActionBlock } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport {\n usePollingStripeAccountCreationStatus,\n useCreateStripeAccount,\n} from \"hooks/reactQuery/stripe/useAccountsApi\";\nimport { useFetchStripeCountries } from \"hooks/reactQuery/useCountriesApi\";\n\nimport {\n INITIAL_VALUES,\n POLLING_INTERVAL,\n VALIDATION_SCHEMA,\n} from \"./constants\";\nimport { buildCountryOptions } from \"./utils\";\n\nconst Country = ({ processingPageRoute, productNameLabel }) => {\n const [isPolling, setIsPolling] = useState(false);\n\n const { t } = useTranslation();\n const history = useHistory();\n\n const refetchInterval = query => {\n const { jobStatus, onboarding } = query.state.data || {};\n if (jobStatus === \"complete\") {\n window.open(onboarding?.url, \"_self\");\n\n return false;\n }\n\n return POLLING_INTERVAL;\n };\n\n const {\n isPending: isCreating,\n data: { jobId } = {},\n mutate: createStripeAccount,\n } = useCreateStripeAccount({ onSuccess: () => setIsPolling(true) });\n\n const { isLoading, data: { countries = {} } = {} } =\n useFetchStripeCountries();\n\n usePollingStripeAccountCreationStatus(jobId, {\n refetchInterval,\n enabled: isPresent(jobId),\n });\n\n const handleSubmit = values => {\n const payload = {\n returnUrl: `${window.location.origin}${processingPageRoute}`,\n country: values.country.value,\n };\n createStripeAccount(payload);\n };\n\n if (isLoading) {\n return (\n <div className=\"flex items-center justify-center flex-grow w-full\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <Form\n className=\"w-full\"\n formikProps={{\n enableReinitialize: true,\n initialValues: INITIAL_VALUES,\n validationSchema: VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n <CardLayout\n icon={<Stripe size={48} />}\n title={t(\"neetoPayments.stripeConnect.title\")}\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: () => history.goBack() }}\n isSubmitting={isCreating || isPolling}\n submitButtonProps={{ label: t(\"neetoPayments.common.connect\") }}\n />\n }\n description={t(\"neetoPayments.stripeConnect.unlinkedDescription\", {\n productNameLabel,\n })}\n >\n <Select\n required\n helpText={t(\"neetoPayments.stripeConnect.countryHelpText\")}\n label={t(\"neetoPayments.common.country\")}\n name=\"country\"\n options={buildCountryOptions(countries)}\n placeholder={t(\"neetoPayments.stripeConnect.countryPlaceholder\")}\n />\n </CardLayout>\n </Form>\n );\n};\n\nexport default Country;\n","import { useEffect, useState } from \"react\";\n\nimport { isPresent, _humanize, isNotPresent } from \"neetocist\";\nimport { useQueryParams } from \"neetocommons/react-utils\";\nimport { Stripe } from \"neetoicons/misc\";\nimport CardLayout from \"neetomolecules/CardLayout\";\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\";\n\nimport { MAX_POLLING_TIME, POLLING_INTERVAL } from \"./constants\";\nimport { buildRefreshUrl } from \"./utils\";\n\nconst Processing = ({ getStripeAccount, productNameLabel, manageRoute }) => {\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 { stripeStandardAccounts } = query.state.data || {};\n const stripeAccount = getStripeAccount(stripeStandardAccounts);\n if (!stripeAccount?.isConnected && isPolling) {\n return POLLING_INTERVAL;\n }\n\n if (stripeAccount?.isConnected) {\n setIsPolling(false);\n history.push(manageRoute);\n }\n\n return false;\n };\n\n const { data: { stripeStandardAccounts } = {} } = useFetchPaymentIntegrations(\n { refetchInterval, enabled: isNotPresent(error) }\n );\n\n const stripeAccount = getStripeAccount(stripeStandardAccounts);\n const isAccountProcessingFailed =\n (isPresent(error) && isPresent(errorDescription)) ||\n (!isPolling && !stripeAccount?.isConnected);\n\n useEffect(() => {\n if (stripeAccount?.isConnected) {\n history.push(manageRoute);\n }\n\n if (isNotPresent(error)) {\n setIsPolling(true);\n }\n\n setInterval(() => {\n setIsPolling(false);\n }, MAX_POLLING_TIME);\n }, []);\n\n return (\n <CardLayout\n icon={<Stripe size={48} />}\n title={t(\"neetoPayments.stripeConnect.title\")}\n actionBlock={\n isAccountProcessingFailed && (\n <Button\n href={buildRefreshUrl(stripeAccount?.id)}\n label={t(\"neetoPayments.common.tryAgain\")}\n />\n )\n }\n description={t(\"neetoPayments.stripeConnect.linkedDescription\", {\n productNameLabel,\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 ? _humanize(errorDescription)\n : t(\"neetoPayments.stripeConnect.failedProcessing\")}\n </Typography>\n </Callout>\n )}\n </CardLayout>\n );\n};\n\nexport default Processing;\n","import { noop } from \"neetocist\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { useTranslation } from \"react-i18next\";\nimport { Route, Switch } from \"react-router-dom\";\n\nimport Account from \"./Account\";\nimport Country from \"./Country\";\nimport Processing from \"./Processing\";\n\nconst StripeConnect = ({\n baseRoute,\n manageRoute,\n breadcrumbs,\n productNameLabel,\n getStripeAccount = noop,\n}) => {\n const { t } = useTranslation();\n const countryPageRoute = `${baseRoute}/countries`;\n const processingPageRoute = `${baseRoute}/processing`;\n\n return (\n <Container>\n <Header {...{ breadcrumbs }} title={t(\"neetoPayments.common.connect\")} />\n <Switch>\n <Route\n exact\n path={baseRoute}\n render={() => (\n <Account\n {...{\n countryPageRoute,\n getStripeAccount,\n manageRoute,\n processingPageRoute,\n productNameLabel,\n }}\n />\n )}\n />\n <Route\n exact\n path={countryPageRoute}\n component={() => (\n <Country {...{ processingPageRoute, productNameLabel }} />\n )}\n />\n <Route\n exact\n path={processingPageRoute}\n component={() => (\n <Processing\n {...{ getStripeAccount, manageRoute, productNameLabel }}\n />\n )}\n />\n </Switch>\n </Container>\n );\n};\n\nexport default StripeConnect;\n"],"names":["list","axios","get","concat","BASE_URL","integrationsApi","useFetchPaymentIntegrations","options","useQuery","_objectSpread","queryKey","QUERY_KEYS","PAYMENT_INTEGRATION_LIST","queryFn","INTEGRATION_METHOD","useExistingAccount","createNewAccount","POLLING_INTERVAL","MAX_POLLING_TIME","INITIAL_VALUES","country","return_url","VALIDATION_SCHEMA","yup","object","shape","required","t","sanitize","DOMPurify","Account","_ref","processingPageRoute","countryPageRoute","productNameLabel","getStripeAccount","manageRoute","_useTranslation","useTranslation","_useState","useState","_useState2","_slicedToArray","selectedOption","setSelectedOption","history","useHistory","_useFetchPaymentInteg","_useFetchPaymentInteg2","data","_useFetchPaymentInteg3","stripeStandardAccounts","stripeAccount","stripeConnectUrl","buildUrl","STRIPE_CONNECT_ENDPOINT","window","location","origin","handleSubmit","push","href","useEffect","isConnected","_jsx","CardLayout","icon","Stripe","size","title","actionBlock","Button","label","onClick","description","children","_jsxs","Radio","value","onChange","_ref2","target","Item","name","fetchCountries","countriesApi","useFetchStripeCountries","STRIPE_COUNTRIES","buildRefreshUrl","accountId","returnUrl","buildCountryOptions","countries","_Object$entries","Object","entries","map","humanize","Country","isPolling","setIsPolling","refetchInterval","query","state","jobStatus","onboarding","open","url","_useCreateStripeAccou","useCreateStripeAccount","onSuccess","isCreating","isPending","_useCreateStripeAccou2","_useCreateStripeAccou3","jobId","createStripeAccount","mutate","_useFetchStripeCountr","isLoading","_useFetchStripeCountr2","_useFetchStripeCountr3","_useFetchStripeCountr4","usePollingStripeAccountCreationStatus","enabled","isPresent","values","payload","className","Spinner","Form","formikProps","enableReinitialize","initialValues","validationSchema","onSubmit","ActionBlock","cancelButtonProps","goBack","isSubmitting","submitButtonProps","Select","helpText","placeholder","Processing","_useQueryParams","useQueryParams","error","errorDescription","isNotPresent","isAccountProcessingFailed","setInterval","id","Callout","Typography","style","_humanize","StripeConnect","baseRoute","breadcrumbs","_ref$getStripeAccount","noop","Container","Header","Switch","Route","exact","path","render","component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,GAAA;EAAA,OAASC,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,QAAQ,yBAAsB,CAAC;AAAA,CAAA;AAE/D,IAAMC,eAAe,GAAG;AAAEL,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ACDzB,IAAMM,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAGC,OAAO,EAAA;EAAA,OAChDC,QAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,UAAU,CAACC,wBAAwB,CAAC;IAC/CC,OAAO,EAAER,eAAe,CAACL;GACtBO,EAAAA,OAAO,CACX,CAAC;AAAA,CAAA;;ACFG,IAAMO,kBAAkB,GAAG;AAChCC,EAAAA,kBAAkB,EAAE,sBAAsB;AAC1CC,EAAAA,gBAAgB,EAAE;AACpB,CAAC;AACM,IAAMC,gBAAgB,GAAG,IAAI;AAC7B,IAAMC,gBAAgB,GAAG,KAAK;AAC9B,IAAMC,cAAc,GAAG;AAAEC,EAAA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AChBU,MAAM,EAAE,SAARA,MAAMA,GAAA;UAAA,oBACJxG,GAAA,CAAClC,OAAO,EAAA;AAEJG,YAAAA,gBAAgB,EAAhBA,gBAAgB;AAChBE,YAAAA,gBAAgB,EAAhBA,gBAAgB;AAChBC,YAAAA,WAAW,EAAXA,WAAW;AACXJ,YAAAA,mBAAmB,EAAnBA,mBAAmB;AACnBE,YAAAA,gBAAgB,EAAhBA;AAAgB,WAEnB,CAAC;AAAA;AACF,OACH,CAAC,eACF8B,GAAA,CAACqG,KAAK,EAAA;QACJC,KAAK,EAAA,IAAA;AACLC,QAAAA,IAAI,EAAEtI,gBAAiB;QACvBwI,SAAS,EAAE,SAAXA,SAASA,GAAA;UAAA,oBACPzG,GAAA,CAACkC,OAAO,EAAA;AAAOlE,YAAAA,mBAAmB,EAAnBA,mBAAmB;AAAEE,YAAAA,gBAAgB,EAAhBA;AAAgB,WAAK,CAAC;AAAA;AAC1D,OACH,CAAC,eACF8B,GAAA,CAACqG,KAAK,EAAA;QACJC,KAAK,EAAA,IAAA;AACLC,QAAAA,IAAI,EAAEvI,mBAAoB;QAC1ByI,SAAS,EAAE,SAAXA,SAASA,GAAA;UAAA,oBACPzG,GAAA,CAACgF,UAAU,EAAA;AACH7G,YAAAA,gBAAgB,EAAhBA,gBAAgB;AAAEC,YAAAA,WAAW,EAAXA,WAAW;AAAEF,YAAAA,gBAAgB,EAAhBA;AAAgB,WACtD,CAAC;AAAA;AACF,OACH,CAAC;AAAA,KACI,CAAC;AAAA,GACA,CAAC;AAEhB;;;;"}
@@ -15,8 +15,8 @@ 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-DrwJCsVB.js';
19
- import { Q as QUERY_KEYS } from './queryConstants-jobxv6K1.js';
18
+ import { B as BASE_URL } from './index-P40XHLrP.js';
19
+ import { Q as QUERY_KEYS } from './queryConstants-BkIldboJ.js';
20
20
  import Label from '@bigbinary/neetoui/Label';
21
21
  import Typography from '@bigbinary/neetoui/Typography';
22
22
  import Pane from '@bigbinary/neetoui/Pane';
@@ -1,4 +1,4 @@
1
- import { b as buildStripeTransactionLink } from './index-DrwJCsVB.js';
1
+ import { b as buildStripeTransactionLink } from './index-P40XHLrP.js';
2
2
  import 'i18next';
3
3
  import '@bigbinary/neeto-commons-frontend/constants';
4
4
  import 'decimal.js';