@tap-payments/auth-jsconnect 1.0.91-test → 1.0.93-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -52
- package/build/@types/app.d.ts +9 -0
- package/build/@types/app.js +9 -0
- package/build/@types/form.d.ts +2 -0
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +1 -3
- package/build/app/store.d.ts +0 -2
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/constants/app.d.ts +0 -1
- package/build/constants/app.js +0 -8
- package/build/features/app/bank/bankStore.d.ts +5 -1
- package/build/features/app/bank/bankStore.js +38 -1
- package/build/features/app/business/businessStore.d.ts +5 -1
- package/build/features/app/business/businessStore.js +36 -1
- package/build/features/app/connect/connectStore.d.ts +2 -1
- package/build/features/app/connect/connectStore.js +14 -5
- package/build/features/app/individual/individualStore.d.ts +5 -1
- package/build/features/app/individual/individualStore.js +36 -0
- package/build/features/app/password/passwordStore.d.ts +5 -1
- package/build/features/app/password/passwordStore.js +37 -1
- package/build/features/app/tax/taxStore.d.ts +5 -1
- package/build/features/app/tax/taxStore.js +39 -2
- package/build/features/bank/Bank.js +4 -3
- package/build/features/bank/screens/BankDetails/BankDetails.js +2 -1
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +67 -0
- package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/validation.js +2 -1
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/bank/screens/Verify/OTPInput.js +6 -1
- package/build/features/bank/screens/Verify/Verify.js +3 -2
- package/build/features/business/Business.js +4 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/business/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/business/screens/Verify/OTPInput.js +6 -1
- package/build/features/business/screens/Verify/Verify.js +3 -2
- package/build/features/connect/Connect.js +5 -3
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +0 -7
- package/build/features/individual/Individual.js +4 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/individual/screens/Verify/OTPInput.js +6 -1
- package/build/features/individual/screens/Verify/Verify.js +3 -2
- package/build/features/password/Password.js +4 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/password/screens/Verify/OTPInput.js +6 -1
- package/build/features/password/screens/Verify/Verify.js +3 -2
- package/build/features/shared/Button/AbsherButton.js +3 -8
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +4 -1
- package/build/features/shared/Button/FlowsButtons.js +10 -5
- package/build/features/shared/Button/MobileButton.js +3 -8
- package/build/features/shared/OTP/OTP.d.ts +2 -1
- package/build/features/shared/OTP/OTP.js +10 -2
- package/build/features/tax/Tax.js +4 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +66 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +5 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +13 -2
- package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/validation.js +2 -1
- package/build/features/tax/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/tax/screens/Verify/OTPInput.js +6 -1
- package/build/features/tax/screens/Verify/Verify.js +3 -2
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/hooks/useErrorListener.d.ts +1 -1
- package/build/hooks/useErrorListener.js +4 -6
- package/build/hooks/useStepStartedListener.d.ts +1 -0
- package/build/hooks/useStepStartedListener.js +10 -0
- package/build/index.d.ts +2 -3
- package/build/index.js +2 -5
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +19 -0
- package/package.json +127 -127
- package/build/features/Landing/Landing.d.ts +0 -7
- package/build/features/Landing/Landing.js +0 -55
- package/build/features/Landing/index.d.ts +0 -1
- package/build/features/Landing/index.js +0 -1
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.d.ts +0 -5
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +0 -41
- package/build/features/Landing/screens/VerifyAndRedirect/index.d.ts +0 -2
- package/build/features/Landing/screens/VerifyAndRedirect/index.js +0 -2
- package/build/features/app/landing/landingStore.d.ts +0 -22
- package/build/features/app/landing/landingStore.js +0 -103
|
@@ -48,6 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
|
+
import { FlowsTypes } from '../../../@types';
|
|
51
52
|
import { hasKey, removeRequestHeaders } from '../../../utils';
|
|
52
53
|
import { handleNextScreenStep } from '../../../app/settings';
|
|
53
54
|
import { PASSWORD_STEP_NAMES } from '../../../constants';
|
|
@@ -85,6 +86,23 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
|
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
88
|
}); });
|
|
89
|
+
export var resendOTP = createAsyncThunk('resendOTPPassword', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
90
|
+
var password, payload, data;
|
|
91
|
+
return __generator(this, function (_a) {
|
|
92
|
+
switch (_a.label) {
|
|
93
|
+
case 0:
|
|
94
|
+
password = thunkApi.getState().password;
|
|
95
|
+
payload = {
|
|
96
|
+
service_name: 'tap_email',
|
|
97
|
+
verify_token: password.data.verify.token
|
|
98
|
+
};
|
|
99
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
100
|
+
case 1:
|
|
101
|
+
data = (_a.sent()).data;
|
|
102
|
+
return [2, { data: data }];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}); });
|
|
88
106
|
export var retrieveEntityInfo = createAsyncThunk('retrievePasswordEntityInfo', function (entityID) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
107
|
var data;
|
|
90
108
|
return __generator(this, function (_a) {
|
|
@@ -187,6 +205,7 @@ var initialState = {
|
|
|
187
205
|
error: null,
|
|
188
206
|
loading: false,
|
|
189
207
|
data: {
|
|
208
|
+
flowName: FlowsTypes.PASSWORD,
|
|
190
209
|
verify: {
|
|
191
210
|
token: ''
|
|
192
211
|
},
|
|
@@ -228,13 +247,30 @@ export var passwordSlice = createSlice({
|
|
|
228
247
|
state.data.verify.responseBody = __assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody);
|
|
229
248
|
state.data.verify.token = token;
|
|
230
249
|
})
|
|
231
|
-
.addCase(verifyLeadToken.pending, function (state
|
|
250
|
+
.addCase(verifyLeadToken.pending, function (state) {
|
|
232
251
|
state.customLoading = true;
|
|
233
252
|
state.error = null;
|
|
234
253
|
})
|
|
235
254
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
236
255
|
state.error = action.error.message;
|
|
237
256
|
state.customLoading = false;
|
|
257
|
+
})
|
|
258
|
+
.addCase(resendOTP.pending, function (state) {
|
|
259
|
+
state.error = null;
|
|
260
|
+
})
|
|
261
|
+
.addCase(resendOTP.fulfilled, function (state, action) {
|
|
262
|
+
var _a;
|
|
263
|
+
state.error = null;
|
|
264
|
+
var data = action.payload.data;
|
|
265
|
+
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
266
|
+
if (description) {
|
|
267
|
+
state.error = description;
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
271
|
+
})
|
|
272
|
+
.addCase(resendOTP.rejected, function (state, action) {
|
|
273
|
+
state.error = action.error.message;
|
|
238
274
|
})
|
|
239
275
|
.addCase(verifyPasswordLeadOTP.pending, function (state) {
|
|
240
276
|
state.loading = true;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
|
-
import { OTPFormValues, ResponseData, SharedState, TaxFormValues } from '../../../@types';
|
|
2
|
+
import { FlowsTypes, OTPFormValues, ResponseData, SharedState, TaxFormValues } from '../../../@types';
|
|
3
3
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
data: any;
|
|
5
5
|
leadData: any;
|
|
6
6
|
token: string;
|
|
7
7
|
}, string, {}>;
|
|
8
|
+
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
9
|
+
data: any;
|
|
10
|
+
}, void, {}>;
|
|
8
11
|
export declare const retrieveEntityInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
9
12
|
data: any;
|
|
10
13
|
}, string, {}>;
|
|
@@ -27,6 +30,7 @@ export interface TaxData {
|
|
|
27
30
|
verify: ResponseData & VerifyData;
|
|
28
31
|
otpData: OTPFormValues & ResponseData;
|
|
29
32
|
taxData: TaxFormValues & ResponseData;
|
|
33
|
+
flowName: FlowsTypes;
|
|
30
34
|
}
|
|
31
35
|
export interface TaxState extends SharedState<TaxData> {
|
|
32
36
|
}
|
|
@@ -48,6 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
|
+
import { FlowsTypes } from '../../../@types';
|
|
51
52
|
import { hasKey, removeRequestHeaders } from '../../../utils';
|
|
52
53
|
import { handleNextScreenStep } from '../../../app/settings';
|
|
53
54
|
import { TAX_STEP_NAMES } from '../../../constants';
|
|
@@ -85,6 +86,23 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
|
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
88
|
}); });
|
|
89
|
+
export var resendOTP = createAsyncThunk('resendOTPTax', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
90
|
+
var tax, payload, data;
|
|
91
|
+
return __generator(this, function (_a) {
|
|
92
|
+
switch (_a.label) {
|
|
93
|
+
case 0:
|
|
94
|
+
tax = thunkApi.getState().tax;
|
|
95
|
+
payload = {
|
|
96
|
+
service_name: 'tap_email',
|
|
97
|
+
verify_token: tax.data.verify.token
|
|
98
|
+
};
|
|
99
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
100
|
+
case 1:
|
|
101
|
+
data = (_a.sent()).data;
|
|
102
|
+
return [2, { data: data }];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}); });
|
|
88
106
|
export var retrieveEntityInfo = createAsyncThunk('retrieveTaxEntityInfo', function (entityID) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
107
|
var data;
|
|
90
108
|
return __generator(this, function (_a) {
|
|
@@ -186,6 +204,7 @@ var initialState = {
|
|
|
186
204
|
error: null,
|
|
187
205
|
loading: false,
|
|
188
206
|
data: {
|
|
207
|
+
flowName: FlowsTypes.TAX,
|
|
189
208
|
verify: {
|
|
190
209
|
token: ''
|
|
191
210
|
},
|
|
@@ -193,7 +212,8 @@ var initialState = {
|
|
|
193
212
|
otp: ''
|
|
194
213
|
},
|
|
195
214
|
taxData: {
|
|
196
|
-
vatId: ''
|
|
215
|
+
vatId: '',
|
|
216
|
+
confirmPolicy: false
|
|
197
217
|
}
|
|
198
218
|
}
|
|
199
219
|
};
|
|
@@ -226,13 +246,30 @@ export var taxSlice = createSlice({
|
|
|
226
246
|
state.data.verify.responseBody = __assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody);
|
|
227
247
|
state.data.verify.token = token;
|
|
228
248
|
})
|
|
229
|
-
.addCase(verifyLeadToken.pending, function (state
|
|
249
|
+
.addCase(verifyLeadToken.pending, function (state) {
|
|
230
250
|
state.error = null;
|
|
231
251
|
state.customLoading = true;
|
|
232
252
|
})
|
|
233
253
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
234
254
|
state.error = action.error.message;
|
|
235
255
|
state.customLoading = false;
|
|
256
|
+
})
|
|
257
|
+
.addCase(resendOTP.pending, function (state) {
|
|
258
|
+
state.error = null;
|
|
259
|
+
})
|
|
260
|
+
.addCase(resendOTP.fulfilled, function (state, action) {
|
|
261
|
+
var _a;
|
|
262
|
+
state.error = null;
|
|
263
|
+
var data = action.payload.data;
|
|
264
|
+
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
265
|
+
if (description) {
|
|
266
|
+
state.error = description;
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
270
|
+
})
|
|
271
|
+
.addCase(resendOTP.rejected, function (state, action) {
|
|
272
|
+
state.error = action.error.message;
|
|
236
273
|
})
|
|
237
274
|
.addCase(verifyTaxLeadOTP.pending, function (state) {
|
|
238
275
|
state.loading = true;
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
|
-
import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig } from '../../hooks';
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener } from '../../hooks';
|
|
15
15
|
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
16
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
17
17
|
import { store } from '../../app/store';
|
|
@@ -28,9 +28,10 @@ var Bank = memo(function (props) {
|
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
29
29
|
var dispatch = useAppDispatch();
|
|
30
30
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
31
|
-
var
|
|
31
|
+
var _b = useAppSelector(bankSelector), customLoading = _b.customLoading, bankError = _b.error;
|
|
32
32
|
var loading = useAppConfig(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props)).loading;
|
|
33
|
-
useErrorListener();
|
|
33
|
+
useErrorListener(bankError || error);
|
|
34
|
+
useStepStartedListener();
|
|
34
35
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
35
36
|
var verifyToken = function () {
|
|
36
37
|
var token = getParameterByName('token');
|
|
@@ -26,6 +26,7 @@ import { styled } from '@mui/material/styles';
|
|
|
26
26
|
import { bankSelector, createBankAccount } from '../../../app/bank/bankStore';
|
|
27
27
|
import Form from '../../../../components/Form';
|
|
28
28
|
import { handleCurrentActiveScreen } from '../../../../app/settings';
|
|
29
|
+
import ConfirmPolicy from './ConfirmPolicy';
|
|
29
30
|
var FormStyled = styled(Form)(function () { return ({
|
|
30
31
|
display: 'flex',
|
|
31
32
|
flexDirection: 'column',
|
|
@@ -55,6 +56,6 @@ var BankDetails = function () {
|
|
|
55
56
|
dispatch(handleCurrentActiveScreen('BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
56
57
|
};
|
|
57
58
|
var disabled = ibanChecking || !methods.formState.isValid;
|
|
58
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
59
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
59
60
|
};
|
|
60
61
|
export default BankDetails;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useTranslation } from 'react-i18next';
|
|
14
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
15
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
16
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
17
|
+
import Box from '@mui/material/Box';
|
|
18
|
+
import CheckBox from '../../../../components/CheckBox';
|
|
19
|
+
import Text from '../../../../components/Text';
|
|
20
|
+
import Warning from '../../../../components/Warning';
|
|
21
|
+
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
var ConfirmContainerStyled = styled(Box)(function (_a) {
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return ({
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexDirection: 'row',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
padding: theme.spacing(0, 2.5, 1.5, 2.5),
|
|
29
|
+
marginBlockStart: theme.spacing(3)
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
var TextStyled = styled(Text)(function (_a) {
|
|
33
|
+
var theme = _a.theme;
|
|
34
|
+
return (__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre-line', height: 'fit-content' }, theme.typography.body2));
|
|
35
|
+
});
|
|
36
|
+
var CheckboxStyled = styled(CheckBox)(function (_a) {
|
|
37
|
+
var theme = _a.theme;
|
|
38
|
+
return ({
|
|
39
|
+
margin: theme.spacing(0),
|
|
40
|
+
padding: theme.spacing(0),
|
|
41
|
+
marginInlineEnd: theme.spacing(1.5),
|
|
42
|
+
color: theme.palette.primary.main,
|
|
43
|
+
'& .MuiSvgIcon-root': {
|
|
44
|
+
fontSize: theme.spacing(3.75)
|
|
45
|
+
},
|
|
46
|
+
'&.Mui-checked': {
|
|
47
|
+
color: theme.palette.text.primary,
|
|
48
|
+
borderRadius: theme.spacing(2.5)
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
var CollapseStyled = styled(Collapse)(function () { return ({
|
|
53
|
+
width: '100%'
|
|
54
|
+
}); });
|
|
55
|
+
var ConfirmPolicy = function () {
|
|
56
|
+
var _a;
|
|
57
|
+
var t = useTranslation().t;
|
|
58
|
+
var control = useFormContext().control;
|
|
59
|
+
var confirmControl = useController({ control: control, name: 'confirmPolicy' });
|
|
60
|
+
var confirmChecked = confirmControl.field.value;
|
|
61
|
+
var warningMessage = (_a = confirmControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
62
|
+
var handleConfirmCheckedChange = function (event, checked) {
|
|
63
|
+
confirmControl.field.onChange(checked);
|
|
64
|
+
};
|
|
65
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(ConfirmContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: confirmChecked, onChange: handleConfirmCheckedChange }), _jsx(TextStyled, { children: t('bank_confirm_information') })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
|
|
66
|
+
};
|
|
67
|
+
export default ConfirmPolicy;
|
|
@@ -3,12 +3,15 @@ export declare const BankValidation: yup.ObjectSchema<import("yup/lib/object").A
|
|
|
3
3
|
iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
4
|
bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
5
5
|
beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
6
|
+
confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
6
7
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
7
8
|
iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
9
|
bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
9
10
|
beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
11
|
+
confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
10
12
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
11
13
|
iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
12
14
|
bankName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
13
15
|
beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
16
|
+
confirmPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
14
17
|
}>>>;
|
|
@@ -11,5 +11,6 @@ export var BankValidation = yup.object().shape({
|
|
|
11
11
|
beneficiaryName: yup
|
|
12
12
|
.string()
|
|
13
13
|
.matches(REGEX_BENEFICIARY_NAME, 'beneficiary_name_invalid')
|
|
14
|
-
.required('beneficiary_name_required')
|
|
14
|
+
.required('beneficiary_name_required'),
|
|
15
|
+
confirmPolicy: yup.boolean().required('alert_bank_confirm').isTrue('alert_bank_confirm')
|
|
15
16
|
});
|
|
@@ -60,7 +60,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
60
60
|
var reMapFlowData = function (flows) {
|
|
61
61
|
if (flows === void 0) { flows = []; }
|
|
62
62
|
var images = ICONS_NAMES;
|
|
63
|
-
var statuses = [];
|
|
64
63
|
var mappedFlows = flows.map(function (_a) {
|
|
65
64
|
var name = _a.name, url = _a.url, status = _a.status;
|
|
66
65
|
var type = status === 'initiated' ? 'pending' : 'completed';
|
|
@@ -79,6 +78,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
79
78
|
var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
|
|
80
79
|
var hoverSrc = "".concat(name, "_white_icon");
|
|
81
80
|
return {
|
|
81
|
+
name: name,
|
|
82
82
|
title: title,
|
|
83
83
|
href: url,
|
|
84
84
|
src: images[src],
|
|
@@ -96,6 +96,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
96
96
|
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
|
|
97
97
|
reMapFlowData(flows);
|
|
98
98
|
}, [flows, isAr]);
|
|
99
|
-
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
|
|
99
|
+
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons, flowName: data.flowName }) })] }));
|
|
100
100
|
};
|
|
101
101
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface OTPProps {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
setLoading: (flag: boolean) => void;
|
|
3
5
|
}
|
|
4
|
-
declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<({ loading, setLoading }: OTPProps) => JSX.Element>;
|
|
5
7
|
export default _default;
|
|
@@ -17,6 +17,8 @@ import OTPField from '../../../shared/OTP';
|
|
|
17
17
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
18
|
import { useTranslation } from 'react-i18next';
|
|
19
19
|
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
20
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
21
|
+
import { resendOTP } from '../../../app/bank/bankStore';
|
|
20
22
|
var BoxStyled = styled(Box)(function (_a) {
|
|
21
23
|
var theme = _a.theme;
|
|
22
24
|
return ({
|
|
@@ -26,17 +28,20 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
26
28
|
});
|
|
27
29
|
});
|
|
28
30
|
var OTPInput = function (_a) {
|
|
31
|
+
var loading = _a.loading, setLoading = _a.setLoading;
|
|
29
32
|
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
30
33
|
var t = useTranslation().t;
|
|
31
34
|
var otpControl = useController({ name: 'otp', control: control });
|
|
35
|
+
var dispatch = useAppDispatch();
|
|
32
36
|
var handleOnOTPChange = function (otp) {
|
|
33
37
|
otpControl.field.onChange(otp);
|
|
34
38
|
};
|
|
35
39
|
var handleOnResendOTP = function () {
|
|
36
40
|
if (otpControl.field.value)
|
|
37
41
|
setValue('otp', '', { shouldValidate: true });
|
|
42
|
+
dispatch(resendOTP());
|
|
38
43
|
};
|
|
39
44
|
var otpValue = otpControl.field.value;
|
|
40
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
45
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
41
46
|
};
|
|
42
47
|
export default React.memo(OTPInput);
|
|
@@ -57,6 +57,7 @@ var VerifyNumber = function (_a) {
|
|
|
57
57
|
});
|
|
58
58
|
var t = useTranslation().t;
|
|
59
59
|
var isAr = useLanguage().isAr;
|
|
60
|
+
var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
|
|
60
61
|
React.useEffect(function () {
|
|
61
62
|
if (error)
|
|
62
63
|
dispatch(clearError());
|
|
@@ -71,7 +72,7 @@ var VerifyNumber = function (_a) {
|
|
|
71
72
|
dispatch(handlePrevScreenStep());
|
|
72
73
|
};
|
|
73
74
|
var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
|
|
74
|
-
var disabled = !methods.formState.isValid || !!error || !phone;
|
|
75
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
75
|
+
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
76
77
|
};
|
|
77
78
|
export default React.memo(VerifyNumber);
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
|
-
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener } from '../../hooks';
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
15
15
|
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
16
|
import { FeatureContainer } from '../shared/Containers';
|
|
17
17
|
import { businessSelector, getCountries, verifyLeadToken } from '../app/business/businessStore';
|
|
@@ -28,9 +28,10 @@ var Business = memo(function (props) {
|
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
29
29
|
var dispatch = useAppDispatch();
|
|
30
30
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
31
|
-
var
|
|
31
|
+
var _b = useAppSelector(businessSelector), customLoading = _b.customLoading, businessError = _b.error;
|
|
32
32
|
var loading = useAppConfig(__assign({ navigation: BUSINESS_SCREENS_NAVIGATION }, props)).loading;
|
|
33
|
-
useErrorListener();
|
|
33
|
+
useErrorListener(businessError || error);
|
|
34
|
+
useStepStartedListener();
|
|
34
35
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
35
36
|
var verifyToken = function () {
|
|
36
37
|
var token = getParameterByName('token');
|
|
@@ -79,6 +79,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
79
79
|
var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
|
|
80
80
|
var hoverSrc = "".concat(name, "_white_icon");
|
|
81
81
|
return {
|
|
82
|
+
name: name,
|
|
82
83
|
title: title,
|
|
83
84
|
href: url,
|
|
84
85
|
src: images[src],
|
|
@@ -96,6 +97,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
96
97
|
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
|
|
97
98
|
reMapFlowData(flows);
|
|
98
99
|
}, [flows, isAr]);
|
|
99
|
-
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
|
|
100
|
+
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons, flowName: data.flowName }) })] }));
|
|
100
101
|
};
|
|
101
102
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface OTPProps {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
setLoading: (flag: boolean) => void;
|
|
3
5
|
}
|
|
4
|
-
declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<({ loading, setLoading }: OTPProps) => JSX.Element>;
|
|
5
7
|
export default _default;
|
|
@@ -11,12 +11,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
14
15
|
import Box from '@mui/material/Box/Box';
|
|
15
16
|
import { styled } from '@mui/material/styles';
|
|
16
17
|
import OTPField from '../../../shared/OTP';
|
|
17
18
|
import { useController, useFormContext } from 'react-hook-form';
|
|
18
19
|
import { useTranslation } from 'react-i18next';
|
|
19
20
|
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
21
|
+
import { resendOTP } from '../../../app/business/businessStore';
|
|
20
22
|
var BoxStyled = styled(Box)(function (_a) {
|
|
21
23
|
var theme = _a.theme;
|
|
22
24
|
return ({
|
|
@@ -26,17 +28,20 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
26
28
|
});
|
|
27
29
|
});
|
|
28
30
|
var OTPInput = function (_a) {
|
|
31
|
+
var loading = _a.loading, setLoading = _a.setLoading;
|
|
29
32
|
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
30
33
|
var t = useTranslation().t;
|
|
31
34
|
var otpControl = useController({ name: 'otp', control: control });
|
|
35
|
+
var dispatch = useAppDispatch();
|
|
32
36
|
var handleOnOTPChange = function (otp) {
|
|
33
37
|
otpControl.field.onChange(otp);
|
|
34
38
|
};
|
|
35
39
|
var handleOnResendOTP = function () {
|
|
36
40
|
if (otpControl.field.value)
|
|
37
41
|
setValue('otp', '', { shouldValidate: true });
|
|
42
|
+
dispatch(resendOTP());
|
|
38
43
|
};
|
|
39
44
|
var otpValue = otpControl.field.value;
|
|
40
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
45
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
41
46
|
};
|
|
42
47
|
export default React.memo(OTPInput);
|
|
@@ -57,6 +57,7 @@ var VerifyNumber = function (_a) {
|
|
|
57
57
|
});
|
|
58
58
|
var t = useTranslation().t;
|
|
59
59
|
var isAr = useLanguage().isAr;
|
|
60
|
+
var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
|
|
60
61
|
React.useEffect(function () {
|
|
61
62
|
if (error && methods.formState.isValid)
|
|
62
63
|
dispatch(clearError());
|
|
@@ -71,7 +72,7 @@ var VerifyNumber = function (_a) {
|
|
|
71
72
|
dispatch(handlePrevScreenStep());
|
|
72
73
|
};
|
|
73
74
|
var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
|
|
74
|
-
var disabled = !methods.formState.isValid || !!error || !phone;
|
|
75
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
75
|
+
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
76
77
|
};
|
|
77
78
|
export default React.memo(VerifyNumber);
|
|
@@ -12,11 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
14
|
import { FeatureContainer } from '../shared/Containers';
|
|
15
|
-
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener } from '../../hooks';
|
|
15
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
16
16
|
import { settingsSelector } from '../../app/settings';
|
|
17
17
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
18
18
|
import { store } from '../../app/store';
|
|
19
|
-
import { getCountries } from '../app/connect/connectStore';
|
|
19
|
+
import { connectSelector, getCountries } from '../app/connect/connectStore';
|
|
20
20
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
21
21
|
import Collapse from '../../components/Collapse';
|
|
22
22
|
import { reactElement } from '../../utils';
|
|
@@ -28,8 +28,10 @@ var Connect = memo(function (props) {
|
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
29
29
|
var dispatch = useAppDispatch();
|
|
30
30
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
31
|
+
var connectError = useAppSelector(connectSelector).error;
|
|
31
32
|
useAppConfig(__assign({ navigation: CONNECT_SCREENS_NAVIGATION }, props));
|
|
32
|
-
useErrorListener();
|
|
33
|
+
useErrorListener(connectError || error);
|
|
34
|
+
useStepStartedListener();
|
|
33
35
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
34
36
|
useEffect(function () {
|
|
35
37
|
dispatch(getCountries());
|
|
@@ -5,4 +5,3 @@ export declare const passwordFeatureScreens: Array<FeatureScreenStep>;
|
|
|
5
5
|
export declare const individualFeatureScreens: Array<FeatureScreenStep>;
|
|
6
6
|
export declare const bankFeatureScreens: Array<FeatureScreenStep>;
|
|
7
7
|
export declare const taxFeatureScreens: Array<FeatureScreenStep>;
|
|
8
|
-
export declare const landingFeatureScreens: Array<FeatureScreenStep>;
|
|
@@ -28,7 +28,6 @@ import TaxVerifyPage from './tax/screens/Verify';
|
|
|
28
28
|
import TaxDetailsPage from './tax/screens/TaxDetails';
|
|
29
29
|
import TaxSuccessPage from './tax/screens/Success';
|
|
30
30
|
import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
|
|
31
|
-
import VerifyAndRedirectPage from './Landing/screens/VerifyAndRedirect';
|
|
32
31
|
export var connectFeatureScreens = [
|
|
33
32
|
{
|
|
34
33
|
name: 'CONNECT_NID_STEP',
|
|
@@ -155,9 +154,3 @@ export var taxFeatureScreens = [
|
|
|
155
154
|
element: TaxSuccessWithFlowPage
|
|
156
155
|
}
|
|
157
156
|
];
|
|
158
|
-
export var landingFeatureScreens = [
|
|
159
|
-
{
|
|
160
|
-
name: 'LANDING_VERIFY_AND_REDIRECT_STEP',
|
|
161
|
-
element: VerifyAndRedirectPage
|
|
162
|
-
}
|
|
163
|
-
];
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
|
-
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener } from '../../hooks';
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
15
15
|
import { handleLanguage, settingsSelector } from '../../app/settings';
|
|
16
16
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
17
17
|
import { store } from '../../app/store';
|
|
@@ -28,9 +28,10 @@ var Individual = memo(function (props) {
|
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
29
29
|
var dispatch = useAppDispatch();
|
|
30
30
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
31
|
-
var
|
|
31
|
+
var _b = useAppSelector(individualSelector), customLoading = _b.customLoading, individualError = _b.error;
|
|
32
32
|
var loading = useAppConfig(__assign({ navigation: INDIVIDUAL_SCREENS_NAVIGATION }, props)).loading;
|
|
33
|
-
useErrorListener();
|
|
33
|
+
useErrorListener(individualError || error);
|
|
34
|
+
useStepStartedListener();
|
|
34
35
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
35
36
|
var verifyToken = function () {
|
|
36
37
|
var token = getParameterByName('token');
|
|
@@ -60,7 +60,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
60
60
|
var reMapFlowData = function (flows) {
|
|
61
61
|
if (flows === void 0) { flows = []; }
|
|
62
62
|
var images = ICONS_NAMES;
|
|
63
|
-
var statuses = [];
|
|
64
63
|
var mappedFlows = flows.map(function (_a) {
|
|
65
64
|
var name = _a.name, url = _a.url, status = _a.status;
|
|
66
65
|
var type = status === 'initiated' ? 'pending' : 'completed';
|
|
@@ -79,6 +78,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
79
78
|
var src = isCompleted ? "".concat(name, "_green_icon") : "".concat(name, "_filled_icon");
|
|
80
79
|
var hoverSrc = "".concat(name, "_white_icon");
|
|
81
80
|
return {
|
|
81
|
+
name: name,
|
|
82
82
|
title: title,
|
|
83
83
|
href: url,
|
|
84
84
|
src: images[src],
|
|
@@ -96,6 +96,6 @@ var SuccessWithFlowButtons = function () {
|
|
|
96
96
|
if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
|
|
97
97
|
reMapFlowData(flows);
|
|
98
98
|
}, [flows, isAr]);
|
|
99
|
-
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
|
|
99
|
+
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons, flowName: data.flowName }) })] }));
|
|
100
100
|
};
|
|
101
101
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface OTPProps {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
setLoading: (flag: boolean) => void;
|
|
3
5
|
}
|
|
4
|
-
declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
|
|
6
|
+
declare const _default: React.MemoExoticComponent<({ loading, setLoading }: OTPProps) => JSX.Element>;
|
|
5
7
|
export default _default;
|