@bigbinary/neeto-payments-frontend 6.1.11 → 6.1.13

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 (221) hide show
  1. package/dist/AccountsDashboard.js +473 -0
  2. package/dist/AccountsDashboard.js.map +1 -0
  3. package/dist/AdminCancelRecurringPaymentButton.js +65 -0
  4. package/dist/AdminCancelRecurringPaymentButton.js.map +1 -0
  5. package/dist/CashPaymentButton.js +58 -0
  6. package/dist/CashPaymentButton.js.map +1 -0
  7. package/dist/ConfirmCashPaymentButton.js +98 -0
  8. package/dist/ConfirmCashPaymentButton.js.map +1 -0
  9. package/dist/CopyButtonWrapper-Bp5IVO76.js +26 -0
  10. package/dist/CopyButtonWrapper-Bp5IVO76.js.map +1 -0
  11. package/dist/CustomerCancelRecurringPaymentForm.js +103 -0
  12. package/dist/CustomerCancelRecurringPaymentForm.js.map +1 -0
  13. package/dist/ExportModal-DyRGg_4o.js +120 -0
  14. package/dist/ExportModal-DyRGg_4o.js.map +1 -0
  15. package/dist/ManualUpiConnect.js +228 -0
  16. package/dist/ManualUpiConnect.js.map +1 -0
  17. package/dist/ManualUpiPayment.js +125 -0
  18. package/dist/ManualUpiPayment.js.map +1 -0
  19. package/dist/ManualUpiPaymentConfirmButton.js +155 -0
  20. package/dist/ManualUpiPaymentConfirmButton.js.map +1 -0
  21. package/dist/ManualUpiPaymentRejectButton.js +126 -0
  22. package/dist/ManualUpiPaymentRejectButton.js.map +1 -0
  23. package/dist/PaymentKindRestrictionAlert.js +31 -0
  24. package/dist/PaymentKindRestrictionAlert.js.map +1 -0
  25. package/dist/PaymentsDashboard.js +555 -0
  26. package/dist/PaymentsDashboard.js.map +1 -0
  27. package/dist/PayoutsDashboard.js +510 -0
  28. package/dist/PayoutsDashboard.js.map +1 -0
  29. package/dist/PayoutsPage.js +158 -0
  30. package/dist/PayoutsPage.js.map +1 -0
  31. package/dist/RazorpayConnect.js +115 -0
  32. package/dist/RazorpayConnect.js.map +1 -0
  33. package/dist/RazorpayLinkedAccountForm.js +201 -0
  34. package/dist/RazorpayLinkedAccountForm.js.map +1 -0
  35. package/dist/RazorpayPaymentButton.js +127 -0
  36. package/dist/RazorpayPaymentButton.js.map +1 -0
  37. package/dist/RecurringPaymentSettings.js +119 -0
  38. package/dist/RecurringPaymentSettings.js.map +1 -0
  39. package/dist/RefundsDashboard.js +484 -0
  40. package/dist/RefundsDashboard.js.map +1 -0
  41. package/dist/SplitTransfersDashboard.js +1042 -0
  42. package/dist/SplitTransfersDashboard.js.map +1 -0
  43. package/dist/StripeCheckoutSetting.js +82 -0
  44. package/dist/StripeCheckoutSetting.js.map +1 -0
  45. package/dist/StripeConnect.js +376 -0
  46. package/dist/StripeConnect.js.map +1 -0
  47. package/dist/StripeManage.js +46 -0
  48. package/dist/StripeManage.js.map +1 -0
  49. package/dist/TaxesDashboard.js +355 -0
  50. package/dist/TaxesDashboard.js.map +1 -0
  51. package/dist/buildStripeTransactionLink.js +12 -0
  52. package/dist/buildStripeTransactionLink.js.map +1 -0
  53. package/dist/cjs/AccountsDashboard.js +475 -0
  54. package/dist/cjs/AccountsDashboard.js.map +1 -0
  55. package/dist/cjs/AdminCancelRecurringPaymentButton.js +67 -0
  56. package/dist/cjs/AdminCancelRecurringPaymentButton.js.map +1 -0
  57. package/dist/cjs/CashPaymentButton.js +60 -0
  58. package/dist/cjs/CashPaymentButton.js.map +1 -0
  59. package/dist/cjs/ConfirmCashPaymentButton.js +100 -0
  60. package/dist/cjs/ConfirmCashPaymentButton.js.map +1 -0
  61. package/dist/cjs/CopyButtonWrapper-I-kdKiiB.js +29 -0
  62. package/dist/cjs/CopyButtonWrapper-I-kdKiiB.js.map +1 -0
  63. package/dist/cjs/CustomerCancelRecurringPaymentForm.js +105 -0
  64. package/dist/cjs/CustomerCancelRecurringPaymentForm.js.map +1 -0
  65. package/dist/cjs/ExportModal-DE-VcN1X.js +122 -0
  66. package/dist/cjs/ExportModal-DE-VcN1X.js.map +1 -0
  67. package/dist/cjs/ManualUpiConnect.js +249 -0
  68. package/dist/cjs/ManualUpiConnect.js.map +1 -0
  69. package/dist/cjs/ManualUpiPayment.js +146 -0
  70. package/dist/cjs/ManualUpiPayment.js.map +1 -0
  71. package/dist/cjs/ManualUpiPaymentConfirmButton.js +176 -0
  72. package/dist/cjs/ManualUpiPaymentConfirmButton.js.map +1 -0
  73. package/dist/cjs/ManualUpiPaymentRejectButton.js +128 -0
  74. package/dist/cjs/ManualUpiPaymentRejectButton.js.map +1 -0
  75. package/dist/cjs/PaymentKindRestrictionAlert.js +33 -0
  76. package/dist/cjs/PaymentKindRestrictionAlert.js.map +1 -0
  77. package/dist/cjs/PaymentsDashboard.js +557 -0
  78. package/dist/cjs/PaymentsDashboard.js.map +1 -0
  79. package/dist/cjs/PayoutsDashboard.js +512 -0
  80. package/dist/cjs/PayoutsDashboard.js.map +1 -0
  81. package/dist/cjs/PayoutsPage.js +160 -0
  82. package/dist/cjs/PayoutsPage.js.map +1 -0
  83. package/dist/cjs/RazorpayConnect.js +117 -0
  84. package/dist/cjs/RazorpayConnect.js.map +1 -0
  85. package/dist/cjs/RazorpayLinkedAccountForm.js +203 -0
  86. package/dist/cjs/RazorpayLinkedAccountForm.js.map +1 -0
  87. package/dist/cjs/RazorpayPaymentButton.js +129 -0
  88. package/dist/cjs/RazorpayPaymentButton.js.map +1 -0
  89. package/dist/cjs/RecurringPaymentSettings.js +140 -0
  90. package/dist/cjs/RecurringPaymentSettings.js.map +1 -0
  91. package/dist/cjs/RefundsDashboard.js +486 -0
  92. package/dist/cjs/RefundsDashboard.js.map +1 -0
  93. package/dist/cjs/SplitTransfersDashboard.js +1063 -0
  94. package/dist/cjs/SplitTransfersDashboard.js.map +1 -0
  95. package/dist/cjs/StripeCheckoutSetting.js +84 -0
  96. package/dist/cjs/StripeCheckoutSetting.js.map +1 -0
  97. package/dist/cjs/StripeConnect.js +397 -0
  98. package/dist/cjs/StripeConnect.js.map +1 -0
  99. package/dist/cjs/StripeManage.js +48 -0
  100. package/dist/cjs/StripeManage.js.map +1 -0
  101. package/dist/cjs/TaxesDashboard.js +376 -0
  102. package/dist/cjs/TaxesDashboard.js.map +1 -0
  103. package/dist/cjs/buildStripeTransactionLink.js +14 -0
  104. package/dist/cjs/buildStripeTransactionLink.js.map +1 -0
  105. package/dist/cjs/constants.js +38 -0
  106. package/dist/cjs/constants.js.map +1 -0
  107. package/dist/cjs/dashboard-BiCB2A6S.js +96 -0
  108. package/dist/cjs/dashboard-BiCB2A6S.js.map +1 -0
  109. package/dist/cjs/exportChannel-BL2RGGhP.js +38 -0
  110. package/dist/cjs/exportChannel-BL2RGGhP.js.map +1 -0
  111. package/dist/cjs/getAddressElementOptions.js +14 -0
  112. package/dist/cjs/getAddressElementOptions.js.map +1 -0
  113. package/dist/cjs/getAmountInLargestCurrencyUnit.js +14 -0
  114. package/dist/cjs/getAmountInLargestCurrencyUnit.js.map +1 -0
  115. package/dist/cjs/getAmountInSmallestCurrencyUnit.js +14 -0
  116. package/dist/cjs/getAmountInSmallestCurrencyUnit.js.map +1 -0
  117. package/dist/cjs/getAmountWithAppliedTax.js +14 -0
  118. package/dist/cjs/getAmountWithAppliedTax.js.map +1 -0
  119. package/dist/cjs/getFormattedAmount.js +14 -0
  120. package/dist/cjs/getFormattedAmount.js.map +1 -0
  121. package/dist/cjs/getFormattedDiscountedAmount.js +14 -0
  122. package/dist/cjs/getFormattedDiscountedAmount.js.map +1 -0
  123. package/dist/cjs/getFormattedDiscountedPercentage.js +14 -0
  124. package/dist/cjs/getFormattedDiscountedPercentage.js.map +1 -0
  125. package/dist/cjs/getFormattedTaxAmount.js +14 -0
  126. package/dist/cjs/getFormattedTaxAmount.js.map +1 -0
  127. package/dist/cjs/getFormattedTipAmount.js +14 -0
  128. package/dist/cjs/getFormattedTipAmount.js.map +1 -0
  129. package/dist/cjs/getQrCodeValue.js +14 -0
  130. package/dist/cjs/getQrCodeValue.js.map +1 -0
  131. package/dist/cjs/getTaxAmount.js +14 -0
  132. package/dist/cjs/getTaxAmount.js.map +1 -0
  133. package/dist/cjs/getTipAmount.js +14 -0
  134. package/dist/cjs/getTipAmount.js.map +1 -0
  135. package/dist/cjs/hasAmountToPay.js +14 -0
  136. package/dist/cjs/hasAmountToPay.js.map +1 -0
  137. package/dist/cjs/index-D6V3Vofs.js +855 -0
  138. package/dist/cjs/index-D6V3Vofs.js.map +1 -0
  139. package/dist/cjs/index.js +121 -0
  140. package/dist/cjs/index.js.map +1 -0
  141. package/dist/cjs/queryConstants-Dc6wh21D.js +35 -0
  142. package/dist/cjs/queryConstants-Dc6wh21D.js.map +1 -0
  143. package/dist/cjs/renderFunctions-DhCwlBWw.js +48 -0
  144. package/dist/cjs/renderFunctions-DhCwlBWw.js.map +1 -0
  145. package/dist/cjs/stripe.esm-CrNYjPcC.js +132 -0
  146. package/dist/cjs/stripe.esm-CrNYjPcC.js.map +1 -0
  147. package/dist/cjs/useAccountsApi-B2MZWHMY.js +42 -0
  148. package/dist/cjs/useAccountsApi-B2MZWHMY.js.map +1 -0
  149. package/dist/cjs/useIntegrationsApi-CVlTmLKc.js +20 -0
  150. package/dist/cjs/useIntegrationsApi-CVlTmLKc.js.map +1 -0
  151. package/dist/cjs/usePaymentApi-BCE_Ql18.js +29 -0
  152. package/dist/cjs/usePaymentApi-BCE_Ql18.js.map +1 -0
  153. package/dist/cjs/usePaymentApi-Bl8jWvnG.js +44 -0
  154. package/dist/cjs/usePaymentApi-Bl8jWvnG.js.map +1 -0
  155. package/dist/cjs/usePaymentApi-CiwXBe90.js +29 -0
  156. package/dist/cjs/usePaymentApi-CiwXBe90.js.map +1 -0
  157. package/dist/cjs/usePlatformApi-CcGVG4Qi.js +55 -0
  158. package/dist/cjs/usePlatformApi-CcGVG4Qi.js.map +1 -0
  159. package/dist/cjs/useRazorpayPayment.js +88 -0
  160. package/dist/cjs/useRazorpayPayment.js.map +1 -0
  161. package/dist/cjs/useStripePromise.js +31 -0
  162. package/dist/cjs/useStripePromise.js.map +1 -0
  163. package/dist/constants.js +8 -0
  164. package/dist/constants.js.map +1 -0
  165. package/dist/dashboard-CwvqEeOl.js +90 -0
  166. package/dist/dashboard-CwvqEeOl.js.map +1 -0
  167. package/dist/exportChannel-Db0U5gc1.js +35 -0
  168. package/dist/exportChannel-Db0U5gc1.js.map +1 -0
  169. package/dist/getAddressElementOptions.js +12 -0
  170. package/dist/getAddressElementOptions.js.map +1 -0
  171. package/dist/getAmountInLargestCurrencyUnit.js +12 -0
  172. package/dist/getAmountInLargestCurrencyUnit.js.map +1 -0
  173. package/dist/getAmountInSmallestCurrencyUnit.js +12 -0
  174. package/dist/getAmountInSmallestCurrencyUnit.js.map +1 -0
  175. package/dist/getAmountWithAppliedTax.js +12 -0
  176. package/dist/getAmountWithAppliedTax.js.map +1 -0
  177. package/dist/getFormattedAmount.js +12 -0
  178. package/dist/getFormattedAmount.js.map +1 -0
  179. package/dist/getFormattedDiscountedAmount.js +12 -0
  180. package/dist/getFormattedDiscountedAmount.js.map +1 -0
  181. package/dist/getFormattedDiscountedPercentage.js +12 -0
  182. package/dist/getFormattedDiscountedPercentage.js.map +1 -0
  183. package/dist/getFormattedTaxAmount.js +12 -0
  184. package/dist/getFormattedTaxAmount.js.map +1 -0
  185. package/dist/getFormattedTipAmount.js +12 -0
  186. package/dist/getFormattedTipAmount.js.map +1 -0
  187. package/dist/getQrCodeValue.js +12 -0
  188. package/dist/getQrCodeValue.js.map +1 -0
  189. package/dist/getTaxAmount.js +12 -0
  190. package/dist/getTaxAmount.js.map +1 -0
  191. package/dist/getTipAmount.js +12 -0
  192. package/dist/getTipAmount.js.map +1 -0
  193. package/dist/hasAmountToPay.js +12 -0
  194. package/dist/hasAmountToPay.js.map +1 -0
  195. package/dist/index-CNouM9_z.js +804 -0
  196. package/dist/index-CNouM9_z.js.map +1 -0
  197. package/dist/index.js +78 -0
  198. package/dist/index.js.map +1 -0
  199. package/dist/queryConstants-C7AqdemO.js +33 -0
  200. package/dist/queryConstants-C7AqdemO.js.map +1 -0
  201. package/dist/renderFunctions-Bx5nzyE_.js +44 -0
  202. package/dist/renderFunctions-Bx5nzyE_.js.map +1 -0
  203. package/dist/stripe.esm-DuZ_gsAa.js +130 -0
  204. package/dist/stripe.esm-DuZ_gsAa.js.map +1 -0
  205. package/dist/useAccountsApi-C9_eNmEZ.js +38 -0
  206. package/dist/useAccountsApi-C9_eNmEZ.js.map +1 -0
  207. package/dist/useIntegrationsApi-D9eA_FrB.js +18 -0
  208. package/dist/useIntegrationsApi-D9eA_FrB.js.map +1 -0
  209. package/dist/usePaymentApi-B98qoM7U.js +26 -0
  210. package/dist/usePaymentApi-B98qoM7U.js.map +1 -0
  211. package/dist/usePaymentApi-DMHHdCK1.js +41 -0
  212. package/dist/usePaymentApi-DMHHdCK1.js.map +1 -0
  213. package/dist/usePaymentApi-DSlW_EBq.js +27 -0
  214. package/dist/usePaymentApi-DSlW_EBq.js.map +1 -0
  215. package/dist/usePlatformApi-sJUY6wju.js +50 -0
  216. package/dist/usePlatformApi-sJUY6wju.js.map +1 -0
  217. package/dist/useRazorpayPayment.js +86 -0
  218. package/dist/useRazorpayPayment.js.map +1 -0
  219. package/dist/useStripePromise.js +29 -0
  220. package/dist/useStripePromise.js.map +1 -0
  221. package/package.json +1 -1
@@ -0,0 +1,376 @@
1
+ import { humanize, isPresent, isNotPresent, noop } from 'neetocist';
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 { useState, useEffect } from 'react';
7
+ import DOMPurify from 'dompurify';
8
+ import { buildUrl } from 'neetocommons/utils';
9
+ import { Stripe } from '@bigbinary/neeto-icons/misc';
10
+ import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
11
+ import { Button, Radio, Spinner, Callout, Typography } from '@bigbinary/neetoui';
12
+ import { u as useFetchPaymentIntegrations } from './useIntegrationsApi-D9eA_FrB.js';
13
+ import { y as STRIPE_CONNECT_ENDPOINT, B as BASE_URL, t as POLLING_INTERVAL, E as ERROR_TYPE, M as MAX_POLLING_TIME } from './index-CNouM9_z.js';
14
+ import { t } from 'i18next';
15
+ import * as yup from 'yup';
16
+ import { jsx, jsxs } from 'react/jsx-runtime';
17
+ import { Form, ActionBlock, Select } from '@bigbinary/neetoui/formik';
18
+ import { a as useCreateStripeAccount, b as usePollingStripeAccountCreationStatus } from './useAccountsApi-C9_eNmEZ.js';
19
+ import { useQuery, useQueryClient } from '@tanstack/react-query';
20
+ import axios from 'axios';
21
+ import { Q as QUERY_KEYS } from './queryConstants-C7AqdemO.js';
22
+ import { useQueryParams } from 'neetocommons/react-utils';
23
+ import 'neetocommons/constants';
24
+ import 'decimal.js';
25
+ import 'ramda';
26
+
27
+ const INTEGRATION_METHOD = {
28
+ useExistingAccount: "use_existing_account",
29
+ createNewAccount: "create_new_account"
30
+ };
31
+ const INITIAL_VALUES = {
32
+ country: "",
33
+ return_url: ""
34
+ };
35
+ const VALIDATION_SCHEMA = yup.object().shape({
36
+ country: yup.object().required(t("neetoPayments.validations.countryRequired"))
37
+ });
38
+
39
+ const sanitize = DOMPurify.sanitize;
40
+ const Account = ({
41
+ processingPageRoute,
42
+ countryPageRoute,
43
+ holdableId,
44
+ productNameLabel,
45
+ getStripeAccount,
46
+ manageRoute
47
+ }) => {
48
+ const {
49
+ t
50
+ } = useTranslation();
51
+ const [selectedOption, setSelectedOption] = useState(INTEGRATION_METHOD.createNewAccount);
52
+ const history = useHistory();
53
+ const {
54
+ data: {
55
+ stripeStandardAccounts,
56
+ stripeStandardAccount
57
+ } = {}
58
+ } = useFetchPaymentIntegrations();
59
+ const stripeAccount = getStripeAccount(stripeStandardAccounts) || stripeStandardAccount;
60
+ const handleSubmit = () => {
61
+ if (selectedOption !== INTEGRATION_METHOD.useExistingAccount) {
62
+ return history.push(countryPageRoute);
63
+ }
64
+ const params = {
65
+ return_url: `${window.location.origin}${processingPageRoute}`
66
+ };
67
+ if (holdableId) {
68
+ params.holdable_id = holdableId;
69
+ }
70
+ const stripeConnectUrl = buildUrl(STRIPE_CONNECT_ENDPOINT, params);
71
+ return window.location.href = sanitize(stripeConnectUrl);
72
+ };
73
+ useEffect(() => {
74
+ if (stripeAccount?.isConnected) {
75
+ history.push(manageRoute);
76
+ }
77
+ }, [stripeAccount?.isConnected]);
78
+ return /*#__PURE__*/jsx(CardLayout, {
79
+ icon: /*#__PURE__*/jsx(Stripe, {
80
+ size: 48
81
+ }),
82
+ title: t("neetoPayments.stripeConnect.title"),
83
+ actionBlock: /*#__PURE__*/jsx(Button, {
84
+ label: t("neetoPayments.common.continue"),
85
+ onClick: handleSubmit
86
+ }),
87
+ description: t("neetoPayments.stripeConnect.unlinkedDescription", {
88
+ productNameLabel
89
+ }),
90
+ children: /*#__PURE__*/jsxs(Radio, {
91
+ value: selectedOption,
92
+ onChange: ({
93
+ target: {
94
+ value
95
+ }
96
+ }) => setSelectedOption(value),
97
+ children: [/*#__PURE__*/jsx(Radio.Item, {
98
+ label: t("neetoPayments.stripeConnect.createNewAccount"),
99
+ name: "accountMethod",
100
+ value: INTEGRATION_METHOD.createNewAccount
101
+ }), /*#__PURE__*/jsx(Radio.Item, {
102
+ label: t("neetoPayments.stripeConnect.useExistingAccount"),
103
+ name: "accountMethod",
104
+ value: INTEGRATION_METHOD.useExistingAccount
105
+ })]
106
+ })
107
+ });
108
+ };
109
+
110
+ const fetchCountries = () => axios.get(`${BASE_URL}/api/v1/stripe/countries`);
111
+ const countriesApi = {
112
+ fetchCountries
113
+ };
114
+
115
+ const useFetchStripeCountries = () => useQuery({
116
+ queryKey: [QUERY_KEYS.STRIPE_COUNTRIES],
117
+ queryFn: countriesApi.fetchCountries
118
+ });
119
+
120
+ const buildRefreshUrl = (accountId, returnUrl) => `${window.location.origin}/payments/api/v1/stripe/callbacks/${accountId}/refresh?return_url=${returnUrl}`;
121
+ const buildCountryOptions = countries => Object.entries(countries)?.map(country => ({
122
+ label: humanize(country[0]),
123
+ value: country[1]
124
+ }));
125
+
126
+ const Country = ({
127
+ processingPageRoute,
128
+ productNameLabel,
129
+ getStripeAccount,
130
+ holdableId = ""
131
+ }) => {
132
+ const [isPolling, setIsPolling] = useState(false);
133
+ const {
134
+ t
135
+ } = useTranslation();
136
+ const history = useHistory();
137
+ const refetchInterval = query => {
138
+ const {
139
+ jobStatus,
140
+ onboarding
141
+ } = query.state.data || {};
142
+ if (jobStatus === "complete") {
143
+ window.open(onboarding?.url, "_self");
144
+ return false;
145
+ }
146
+ return POLLING_INTERVAL;
147
+ };
148
+ const {
149
+ isPending: isCreating,
150
+ data: {
151
+ jobId
152
+ } = {},
153
+ mutate: createStripeAccount
154
+ } = useCreateStripeAccount({
155
+ onSuccess: () => setIsPolling(true)
156
+ });
157
+ const {
158
+ data: {
159
+ stripeStandardAccounts,
160
+ stripeStandardAccount
161
+ } = {}
162
+ } = useFetchPaymentIntegrations();
163
+ const stripeAccount = getStripeAccount(stripeStandardAccounts) || stripeStandardAccount;
164
+ const {
165
+ isLoading,
166
+ data: {
167
+ countries = {}
168
+ } = {}
169
+ } = useFetchStripeCountries();
170
+ usePollingStripeAccountCreationStatus(jobId, {
171
+ refetchInterval,
172
+ enabled: isPresent(jobId)
173
+ });
174
+ const handleSubmit = values => {
175
+ if (isPresent(stripeAccount)) {
176
+ return window.location.href = buildRefreshUrl(stripeAccount?.id, `${window.location.origin}${processingPageRoute}`);
177
+ }
178
+ const payload = {
179
+ returnUrl: `${window.location.origin}${processingPageRoute}`,
180
+ country: values.country.value
181
+ };
182
+ if (holdableId) {
183
+ payload.holdableId = holdableId;
184
+ }
185
+ return createStripeAccount(payload);
186
+ };
187
+ if (isLoading) {
188
+ return /*#__PURE__*/jsx("div", {
189
+ className: "flex items-center justify-center grow w-full",
190
+ children: /*#__PURE__*/jsx(Spinner, {})
191
+ });
192
+ }
193
+ return /*#__PURE__*/jsx(Form, {
194
+ className: "w-full",
195
+ formikProps: {
196
+ enableReinitialize: true,
197
+ initialValues: INITIAL_VALUES,
198
+ validationSchema: VALIDATION_SCHEMA,
199
+ onSubmit: handleSubmit
200
+ },
201
+ children: /*#__PURE__*/jsx(CardLayout, {
202
+ icon: /*#__PURE__*/jsx(Stripe, {
203
+ size: 48
204
+ }),
205
+ title: t("neetoPayments.stripeConnect.title"),
206
+ actionBlock: /*#__PURE__*/jsx(ActionBlock, {
207
+ cancelButtonProps: {
208
+ onClick: () => history.goBack()
209
+ },
210
+ isSubmitting: isCreating || isPolling,
211
+ submitButtonProps: {
212
+ label: t("neetoPayments.common.connect")
213
+ }
214
+ }),
215
+ description: t("neetoPayments.stripeConnect.unlinkedDescription", {
216
+ productNameLabel
217
+ }),
218
+ children: /*#__PURE__*/jsx(Select, {
219
+ required: true,
220
+ helpText: t("neetoPayments.stripeConnect.countryHelpText"),
221
+ label: t("neetoPayments.common.country"),
222
+ name: "country",
223
+ options: buildCountryOptions(countries),
224
+ placeholder: t("neetoPayments.stripeConnect.countryPlaceholder")
225
+ })
226
+ })
227
+ });
228
+ };
229
+
230
+ const Processing = ({
231
+ baseRoute,
232
+ getStripeAccount,
233
+ productNameLabel,
234
+ manageRoute
235
+ }) => {
236
+ const queryClient = useQueryClient();
237
+ const [isPolling, setIsPolling] = useState(false);
238
+ const {
239
+ t
240
+ } = useTranslation();
241
+ const history = useHistory();
242
+ const {
243
+ error,
244
+ errorDescription = ""
245
+ } = useQueryParams();
246
+ const refetchInterval = query => {
247
+ const {
248
+ stripeStandardAccounts,
249
+ stripeStandardAccount
250
+ } = query.state.data || {};
251
+ const stripeAccount = getStripeAccount(stripeStandardAccounts) || stripeStandardAccount;
252
+ if (!stripeAccount?.isConnected && isPolling) {
253
+ return POLLING_INTERVAL;
254
+ }
255
+ if (stripeAccount?.isConnected) {
256
+ setIsPolling(false);
257
+ history.push(manageRoute);
258
+ }
259
+ return false;
260
+ };
261
+ const {
262
+ data: {
263
+ stripeStandardAccounts,
264
+ stripeStandardAccount
265
+ } = {}
266
+ } = useFetchPaymentIntegrations({
267
+ refetchInterval,
268
+ enabled: isNotPresent(error)
269
+ });
270
+ const errorMessage = error === ERROR_TYPE.processing_error ? errorDescription : humanize(errorDescription);
271
+ const stripeAccount = getStripeAccount(stripeStandardAccounts) || stripeStandardAccount;
272
+ const isAccountProcessingFailed = isPresent(error) && isPresent(errorDescription) || !isPolling && !stripeAccount?.isConnected;
273
+ const handleRetry = () => {
274
+ queryClient.invalidateQueries({
275
+ queryKey: [QUERY_KEYS.PAYMENT_INTEGRATION_LIST]
276
+ });
277
+ history.push(baseRoute);
278
+ };
279
+ useEffect(() => {
280
+ if (stripeAccount?.isConnected) {
281
+ history.push(manageRoute);
282
+ }
283
+ if (isNotPresent(error)) {
284
+ setIsPolling(true);
285
+ }
286
+ const pollingTimeoutId = setTimeout(() => {
287
+ setIsPolling(false);
288
+ }, MAX_POLLING_TIME);
289
+ return () => {
290
+ clearTimeout(pollingTimeoutId);
291
+ };
292
+ }, []);
293
+ return /*#__PURE__*/jsxs(CardLayout, {
294
+ icon: /*#__PURE__*/jsx(Stripe, {
295
+ size: 48
296
+ }),
297
+ title: t("neetoPayments.stripeConnect.title"),
298
+ actionBlock: isAccountProcessingFailed && /*#__PURE__*/jsx(Button, {
299
+ label: t("neetoPayments.common.tryAgain"),
300
+ onClick: handleRetry
301
+ }),
302
+ description: isAccountProcessingFailed ? t("neetoPayments.common.processingFailed") : t("neetoPayments.stripeConnect.linkedDescription", {
303
+ productNameLabel
304
+ }),
305
+ children: [isPolling && /*#__PURE__*/jsx(Callout, {
306
+ children: /*#__PURE__*/jsxs("div", {
307
+ className: "flex space-x-4",
308
+ children: [/*#__PURE__*/jsx(Spinner, {}), /*#__PURE__*/jsx(Typography, {
309
+ style: "body1",
310
+ children: t("neetoPayments.stripeConnect.verifyingMessage")
311
+ })]
312
+ })
313
+ }), isAccountProcessingFailed && /*#__PURE__*/jsx(Callout, {
314
+ style: "danger",
315
+ children: /*#__PURE__*/jsx(Typography, {
316
+ style: "body1",
317
+ children: isPresent(errorDescription) ? errorMessage : t("neetoPayments.stripeConnect.failedProcessing")
318
+ })
319
+ })]
320
+ });
321
+ };
322
+
323
+ const StripeConnect = ({
324
+ baseRoute,
325
+ manageRoute,
326
+ breadcrumbs,
327
+ holdableId,
328
+ productNameLabel,
329
+ getStripeAccount = noop
330
+ }) => {
331
+ const {
332
+ t
333
+ } = useTranslation();
334
+ const countryPageRoute = `${baseRoute}/countries`;
335
+ const processingPageRoute = `${baseRoute}/processing`;
336
+ return /*#__PURE__*/jsxs(Container, {
337
+ children: [/*#__PURE__*/jsx(Header, {
338
+ breadcrumbs,
339
+ title: t("neetoPayments.common.connect")
340
+ }), /*#__PURE__*/jsxs(Switch, {
341
+ children: [/*#__PURE__*/jsx(Route, {
342
+ exact: true,
343
+ path: baseRoute,
344
+ render: () => /*#__PURE__*/jsx(Account, {
345
+ countryPageRoute,
346
+ getStripeAccount,
347
+ holdableId,
348
+ manageRoute,
349
+ processingPageRoute,
350
+ productNameLabel
351
+ })
352
+ }), /*#__PURE__*/jsx(Route, {
353
+ exact: true,
354
+ path: countryPageRoute,
355
+ component: () => /*#__PURE__*/jsx(Country, {
356
+ getStripeAccount,
357
+ holdableId,
358
+ processingPageRoute,
359
+ productNameLabel
360
+ })
361
+ }), /*#__PURE__*/jsx(Route, {
362
+ exact: true,
363
+ path: processingPageRoute,
364
+ component: () => /*#__PURE__*/jsx(Processing, {
365
+ baseRoute,
366
+ getStripeAccount,
367
+ manageRoute,
368
+ productNameLabel
369
+ })
370
+ })]
371
+ })]
372
+ });
373
+ };
374
+
375
+ export { StripeConnect as default };
376
+ //# sourceMappingURL=StripeConnect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripeConnect.js","sources":["../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 { 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};\n\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 holdableId,\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, stripeStandardAccount } = {} } =\n useFetchPaymentIntegrations();\n\n const stripeAccount =\n getStripeAccount(stripeStandardAccounts) || stripeStandardAccount;\n\n const handleSubmit = () => {\n if (selectedOption !== INTEGRATION_METHOD.useExistingAccount) {\n return history.push(countryPageRoute);\n }\n\n const params = {\n return_url: `${window.location.origin}${processingPageRoute}`,\n };\n\n if (holdableId) {\n params.holdable_id = holdableId;\n }\n\n const stripeConnectUrl = buildUrl(STRIPE_CONNECT_ENDPOINT, params);\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 `${window.location.origin}/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\";\nimport { useFetchPaymentIntegrations } from \"hooks/reactQuery/useIntegrationsApi\";\nimport { POLLING_INTERVAL } from \"src/constants\";\n\nimport { INITIAL_VALUES, VALIDATION_SCHEMA } from \"./constants\";\nimport { buildCountryOptions, buildRefreshUrl } from \"./utils\";\n\nconst Country = ({\n processingPageRoute,\n productNameLabel,\n getStripeAccount,\n holdableId = \"\",\n}) => {\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 { data: { stripeStandardAccounts, stripeStandardAccount } = {} } =\n useFetchPaymentIntegrations();\n\n const stripeAccount =\n getStripeAccount(stripeStandardAccounts) || stripeStandardAccount;\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 if (isPresent(stripeAccount)) {\n return (window.location.href = buildRefreshUrl(\n stripeAccount?.id,\n `${window.location.origin}${processingPageRoute}`\n ));\n }\n\n const payload = {\n returnUrl: `${window.location.origin}${processingPageRoute}`,\n country: values.country.value,\n };\n\n if (holdableId) {\n payload.holdableId = holdableId;\n }\n\n return createStripeAccount(payload);\n };\n\n if (isLoading) {\n return (\n <div className=\"flex items-center justify-center 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 { useQueryClient } from \"@tanstack/react-query\";\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\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\nimport { POLLING_INTERVAL, ERROR_TYPE, MAX_POLLING_TIME } from \"src/constants\";\n\nconst Processing = ({\n baseRoute,\n getStripeAccount,\n productNameLabel,\n manageRoute,\n}) => {\n const queryClient = useQueryClient();\n const [isPolling, setIsPolling] = useState(false);\n const { t } = useTranslation();\n const history = useHistory();\n const { error, errorDescription = \"\" } = useQueryParams();\n\n const refetchInterval = query => {\n const { stripeStandardAccounts, stripeStandardAccount } =\n query.state.data || {};\n\n const stripeAccount =\n getStripeAccount(stripeStandardAccounts) || stripeStandardAccount;\n\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, stripeStandardAccount } = {} } =\n useFetchPaymentIntegrations({\n refetchInterval,\n enabled: isNotPresent(error),\n });\n\n const errorMessage =\n error === ERROR_TYPE.processing_error\n ? errorDescription\n : humanize(errorDescription);\n\n const stripeAccount =\n getStripeAccount(stripeStandardAccounts) || stripeStandardAccount;\n\n const isAccountProcessingFailed =\n (isPresent(error) && isPresent(errorDescription)) ||\n (!isPolling && !stripeAccount?.isConnected);\n\n const handleRetry = () => {\n queryClient.invalidateQueries({\n queryKey: [QUERY_KEYS.PAYMENT_INTEGRATION_LIST],\n });\n history.push(baseRoute);\n };\n\n useEffect(() => {\n if (stripeAccount?.isConnected) {\n history.push(manageRoute);\n }\n\n if (isNotPresent(error)) {\n setIsPolling(true);\n }\n\n const pollingTimeoutId = setTimeout(() => {\n setIsPolling(false);\n }, MAX_POLLING_TIME);\n\n return () => {\n clearTimeout(pollingTimeoutId);\n };\n }, []);\n\n return (\n <CardLayout\n icon={<Stripe size={48} />}\n title={t(\"neetoPayments.stripeConnect.title\")}\n actionBlock={\n isAccountProcessingFailed && (\n <Button\n label={t(\"neetoPayments.common.tryAgain\")}\n onClick={handleRetry}\n />\n )\n }\n description={\n isAccountProcessingFailed\n ? t(\"neetoPayments.common.processingFailed\")\n : t(\"neetoPayments.stripeConnect.linkedDescription\", {\n productNameLabel,\n })\n }\n >\n {isPolling && (\n <Callout>\n <div className=\"flex space-x-4\">\n <Spinner />\n <Typography style=\"body1\">\n {t(\"neetoPayments.stripeConnect.verifyingMessage\")}\n </Typography>\n </div>\n </Callout>\n )}\n {isAccountProcessingFailed && (\n <Callout style=\"danger\">\n <Typography style=\"body1\">\n {isPresent(errorDescription)\n ? errorMessage\n : t(\"neetoPayments.stripeConnect.failedProcessing\")}\n </Typography>\n </Callout>\n )}\n </CardLayout>\n );\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 holdableId,\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 holdableId,\n manageRoute,\n processingPageRoute,\n productNameLabel,\n }}\n />\n )}\n />\n <Route\n exact\n path={countryPageRoute}\n component={() => (\n <Country\n {...{\n getStripeAccount,\n holdableId,\n processingPageRoute,\n productNameLabel,\n }}\n />\n )}\n />\n <Route\n exact\n path={processingPageRoute}\n component={() => (\n <Processing\n {...{\n baseRoute,\n getStripeAccount,\n manageRoute,\n productNameLabel,\n }}\n />\n )}\n />\n </Switch>\n </Container>\n );\n};\n\nexport default StripeConnect;\n"],"names":["INTEGRATION_METHOD","useExistingAccount","createNewAccount","INITIAL_VALUES","country","return_url","VALIDATION_SCHEMA","yup","object","shape","required","t","sanitize","DOMPurify","Account","processingPageRoute","countryPageRoute","holdableId","productNameLabel","getStripeAccount","manageRoute","useTranslation","selectedOption","setSelectedOption","useState","history","useHistory","data","stripeStandardAccounts","stripeStandardAccount","useFetchPaymentIntegrations","stripeAccount","handleSubmit","push","params","window","location","origin","holdable_id","stripeConnectUrl","buildUrl","STRIPE_CONNECT_ENDPOINT","href","useEffect","isConnected","_jsx","CardLayout","icon","Stripe","size","title","actionBlock","Button","label","onClick","description","children","_jsxs","Radio","value","onChange","target","Item","name","fetchCountries","axios","get","BASE_URL","countriesApi","useFetchStripeCountries","useQuery","queryKey","QUERY_KEYS","STRIPE_COUNTRIES","queryFn","buildRefreshUrl","accountId","returnUrl","buildCountryOptions","countries","Object","entries","map","humanize","Country","isPolling","setIsPolling","refetchInterval","query","jobStatus","onboarding","state","open","url","POLLING_INTERVAL","isPending","isCreating","jobId","mutate","createStripeAccount","useCreateStripeAccount","onSuccess","isLoading","usePollingStripeAccountCreationStatus","enabled","isPresent","values","id","payload","className","Spinner","Form","formikProps","enableReinitialize","initialValues","validationSchema","onSubmit","ActionBlock","cancelButtonProps","goBack","isSubmitting","submitButtonProps","Select","helpText","options","placeholder","Processing","baseRoute","queryClient","useQueryClient","error","errorDescription","useQueryParams","isNotPresent","errorMessage","ERROR_TYPE","processing_error","isAccountProcessingFailed","handleRetry","invalidateQueries","PAYMENT_INTEGRATION_LIST","pollingTimeoutId","setTimeout","MAX_POLLING_TIME","clearTimeout","Callout","Typography","style","StripeConnect","breadcrumbs","noop","Container","Header","Switch","Route","exact","path","render","component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,MAAMA,kBAAkB,GAAG;AAChCC,EAAAA,kBAAkB,EAAE,sBAAsB;AAC1CC,EAAAA,gBAAgB,EAAE;AACpB,CAAC;AAEM,MAAMC,cAAc,GAAG;AAAEC,EAAAA,OAAO,EAAE,EAAE;AAAEC,EAAAA,UAAU,EAAE;AAAG,CAAC;AAEtD,MAAMC,iBAAiB,GAAGC,GAAG,CAACC,MAAM,EAAE,CAACC,KAAK,CAAC;AAClDL,EAAAA,OAAO,EAAEG,GAAG,CACTC,MAAM,EAAE,CACRE,QAAQ,CAACC,CAAC,CAAC,2CAA2C,CAAC;AAC5D,CAAC,CAAC;;ACJF,MAAMC,QAAQ,GAAGC,SAAS,CAACD,QAAQ;AAEnC,MAAME,OAAO,GAAGA,CAAC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IAAA,CAAC8F,SAAS,EAAA;IAAA/F,QAAA,EAAA,cACRX,GAAA,CAAC2G,MAAM,EAAA;MAAOH,WAAW;MAAInG,KAAK,EAAEvC,CAAC,CAAC,8BAA8B;AAAE,KAAE,CAAC,eACzE8C,IAAA,CAACgG,MAAM,EAAA;MAAAjG,QAAA,EAAA,cACLX,GAAA,CAAC6G,KAAK,EAAA;QACJC,KAAK,EAAA,IAAA;AACLC,QAAAA,IAAI,EAAE7B,SAAU;AAChB8B,QAAAA,MAAM,EAAEA,mBACNhH,GAAA,CAAC/B,OAAO,EAAA;UAEJE,gBAAgB;UAChBG,gBAAgB;UAChBF,UAAU;UACVG,WAAW;UACXL,mBAAmB;AACnBG,UAAAA;SAEH;AACD,OACH,CAAC,eACF2B,GAAA,CAAC6G,KAAK,EAAA;QACJC,KAAK,EAAA,IAAA;AACLC,QAAAA,IAAI,EAAE5I,gBAAiB;AACvB8I,QAAAA,SAAS,EAAEA,mBACTjH,GAAA,CAACuC,OAAO,EAAA;UAEJjE,gBAAgB;UAChBF,UAAU;UACVF,mBAAmB;AACnBG,UAAAA;SAEH;AACD,OACH,CAAC,eACF2B,GAAA,CAAC6G,KAAK,EAAA;QACJC,KAAK,EAAA,IAAA;AACLC,QAAAA,IAAI,EAAE7I,mBAAoB;AAC1B+I,QAAAA,SAAS,EAAEA,mBACTjH,GAAA,CAACiF,UAAU,EAAA;UAEPC,SAAS;UACT5G,gBAAgB;UAChBC,WAAW;AACXF,UAAAA;SAEH;AACD,OACH,CAAC;AAAA,KACI,CAAC;AAAA,GACA,CAAC;AAEhB;;;;"}
@@ -0,0 +1,46 @@
1
+ import { ExternalLink } from '@bigbinary/neeto-icons';
2
+ import { withT } from 'neetocommons/react-utils';
3
+ import CardLayout from '@bigbinary/neeto-molecules/CardLayout';
4
+ import { Button, Typography } from '@bigbinary/neetoui';
5
+ import StripeCheckoutSetting from './StripeCheckoutSetting.js';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+ import 'react-i18next';
8
+ import '@tanstack/react-query';
9
+ import 'ramda';
10
+ import 'axios';
11
+ import './index-CNouM9_z.js';
12
+ import 'i18next';
13
+ import 'neetocommons/constants';
14
+ import 'decimal.js';
15
+ import 'neetocist';
16
+ import 'neetocommons/utils';
17
+ import './queryConstants-C7AqdemO.js';
18
+
19
+ const StripeManage = withT(({
20
+ t,
21
+ stripeAccount
22
+ }) => /*#__PURE__*/jsx(CardLayout, {
23
+ actionBlock: /*#__PURE__*/jsx(Button, {
24
+ "data-testid": "stripe-manage-view-stripe-dashboard",
25
+ href: "https://dashboard.stripe.com",
26
+ icon: ExternalLink,
27
+ label: t("neetoPayments.stripeManage.viewStripeDashboard"),
28
+ style: "secondary",
29
+ target: "_blank"
30
+ }),
31
+ children: /*#__PURE__*/jsxs("div", {
32
+ className: "space-y-6",
33
+ children: [/*#__PURE__*/jsx("div", {
34
+ className: "flex justify-between w-full",
35
+ children: /*#__PURE__*/jsx(Typography, {
36
+ style: "h3",
37
+ children: t("neetoPayments.stripeManage.checkoutSettings.title")
38
+ })
39
+ }), /*#__PURE__*/jsx(StripeCheckoutSetting, {
40
+ stripeAccount
41
+ })]
42
+ })
43
+ }));
44
+
45
+ export { StripeManage as default };
46
+ //# sourceMappingURL=StripeManage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripeManage.js","sources":["../app/javascript/src/components/StripeManage.jsx"],"sourcesContent":["import { ExternalLink } from \"neetoicons\";\n\nimport { withT } from \"neetocommons/react-utils\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Typography, Button } from \"neetoui\";\n\nimport StripeCheckoutSetting from \"./StripeCheckoutSetting\";\n\nconst StripeManage = withT(({ t, stripeAccount }) => (\n <CardLayout\n actionBlock={\n <Button\n data-testid=\"stripe-manage-view-stripe-dashboard\"\n href=\"https://dashboard.stripe.com\"\n icon={ExternalLink}\n label={t(\"neetoPayments.stripeManage.viewStripeDashboard\")}\n style=\"secondary\"\n target=\"_blank\"\n />\n }\n >\n <div className=\"space-y-6\">\n <div className=\"flex justify-between w-full\">\n <Typography style=\"h3\">\n {t(\"neetoPayments.stripeManage.checkoutSettings.title\")}\n </Typography>\n </div>\n <StripeCheckoutSetting {...{ stripeAccount }} />\n </div>\n </CardLayout>\n));\n\nexport default StripeManage;\n"],"names":["StripeManage","withT","t","stripeAccount","_jsx","CardLayout","actionBlock","Button","href","icon","ExternalLink","label","style","target","children","_jsxs","className","Typography","StripeCheckoutSetting"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,MAAMA,YAAY,GAAGC,KAAK,CAAC,CAAC;EAAEC,CAAC;AAAEC,EAAAA;AAAc,CAAC,kBAC9CC,GAAA,CAACC,UAAU,EAAA;EACTC,WAAW,eACTF,GAAA,CAACG,MAAM,EAAA;AACL,IAAA,aAAA,EAAY,qCAAqC;AACjDC,IAAAA,IAAI,EAAC,8BAA8B;AACnCC,IAAAA,IAAI,EAAEC,YAAa;AACnBC,IAAAA,KAAK,EAAET,CAAC,CAAC,gDAAgD,CAAE;AAC3DU,IAAAA,KAAK,EAAC,WAAW;AACjBC,IAAAA,MAAM,EAAC;AAAQ,GAChB,CACF;AAAAC,EAAAA,QAAA,eAEDC,IAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,WAAW;AAAAF,IAAAA,QAAA,gBACxBV,GAAA,CAAA,KAAA,EAAA;AAAKY,MAAAA,SAAS,EAAC,6BAA6B;MAAAF,QAAA,eAC1CV,GAAA,CAACa,UAAU,EAAA;AAACL,QAAAA,KAAK,EAAC,IAAI;QAAAE,QAAA,EACnBZ,CAAC,CAAC,mDAAmD;OAC5C;AAAC,KACV,CAAC,eACNE,GAAA,CAACc,qBAAqB,EAAA;AAAOf,MAAAA;AAAa,KAAK,CAAC;GAC7C;AAAC,CACI,CACb;;;;"}