@tap-payments/auth-jsconnect 2.1.53-test → 2.1.54-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/build/constants/app.js +6 -0
- package/build/features/app/connectExpress/connectExpressStore.d.ts +8 -2
- package/build/features/app/connectExpress/connectExpressStore.js +68 -13
- package/build/features/connectExpress/ConnectExpress.js +16 -61
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +5 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +15 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/index.js +2 -0
- package/build/features/featuresScreens.js +5 -0
- package/package.json +1 -1
package/build/constants/app.js
CHANGED
|
@@ -143,6 +143,12 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
|
|
|
143
143
|
prev: '',
|
|
144
144
|
order: 7
|
|
145
145
|
},
|
|
146
|
+
{
|
|
147
|
+
name: 'CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP',
|
|
148
|
+
next: '',
|
|
149
|
+
prev: '',
|
|
150
|
+
order: 8
|
|
151
|
+
},
|
|
146
152
|
{
|
|
147
153
|
name: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
148
154
|
next: '',
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
2
|
import { MobileFormValues, NIDFormValues, CivilFormValues, OTPFormValues, IndividualFormValues, SharedState, FlowsTypes, ActionState, CountryCode, AuthForType, BusinessDataFormValues } from '../../../@types';
|
|
3
3
|
import { CancelToken } from 'axios';
|
|
4
|
+
export declare const retrieveLeadIdentityByIdAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
|
+
data: any;
|
|
6
|
+
countryCode: CountryCode;
|
|
7
|
+
boardInfo: any;
|
|
8
|
+
boardData: any;
|
|
9
|
+
}, string, {}>;
|
|
4
10
|
export declare const getLeadByIdAsync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
11
|
data: any;
|
|
6
12
|
countryCode: CountryCode;
|
|
@@ -85,13 +91,13 @@ export interface ConnectExpressData {
|
|
|
85
91
|
businessData: BusinessDataFormValues;
|
|
86
92
|
}
|
|
87
93
|
export interface ConnectExpressState extends SharedState<ConnectExpressData & ResponseData> {
|
|
94
|
+
customLoading?: boolean;
|
|
88
95
|
}
|
|
89
96
|
export declare const connectSlice: import("@reduxjs/toolkit").Slice<ConnectExpressState, {
|
|
90
97
|
setLeadId(state: ConnectExpressState, action: ActionState<string>): void;
|
|
91
98
|
setIsLeadIdPassed: (state: ConnectExpressState, action: ActionState<boolean>) => void;
|
|
92
99
|
clearError: (state: ConnectExpressState) => void;
|
|
93
100
|
setError(state: ConnectExpressState, action: ActionState<string>): void;
|
|
94
|
-
setResponseData: (state: ConnectExpressState, action: ActionState<ResponseData['responseData']>) => void;
|
|
95
101
|
stopLoader: (state: ConnectExpressState) => void;
|
|
96
102
|
resetMobileScreen: (state: ConnectExpressState, action: ActionState<CountryCode>) => void;
|
|
97
103
|
resetNIDScreen: (state: ConnectExpressState) => void;
|
|
@@ -101,7 +107,7 @@ export declare const connectSlice: import("@reduxjs/toolkit").Slice<ConnectExpre
|
|
|
101
107
|
resetStore: (state: ConnectExpressState) => void;
|
|
102
108
|
resetIndividualScreen: (state: ConnectExpressState) => void;
|
|
103
109
|
}, "connectExpress/store">;
|
|
104
|
-
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setIsLeadIdPassed: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, resetMobileScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<CountryCode, string>, resetOTPValue: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetNIDScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetCivilScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetStore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setError: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>,
|
|
110
|
+
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setIsLeadIdPassed: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, resetMobileScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<CountryCode, string>, resetOTPValue: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetNIDScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetCivilScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetStore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setError: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, setPostUrl: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, setLeadId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, resetIndividualScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
105
111
|
declare const _default: import("redux").Reducer<ConnectExpressState, import("redux").AnyAction>;
|
|
106
112
|
export default _default;
|
|
107
113
|
export declare const connectExpressSelector: (state: RootState) => ConnectExpressState;
|
|
@@ -62,6 +62,48 @@ import API from '../../../api';
|
|
|
62
62
|
import { CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
|
|
63
63
|
import { defaultCountry } from '../../../constants';
|
|
64
64
|
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, getEighteenYearsAgo, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA } from '../../../utils';
|
|
65
|
+
export var retrieveLeadIdentityByIdAsync = createAsyncThunk('expressConnect/retrieveLeadIdentityByIdAsync', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
+
var settings, countryCode, boardInfo, boardData, leadData, data, phone, _a, boardInfoRes, boardDataRes, leadDataRes;
|
|
67
|
+
var _b;
|
|
68
|
+
return __generator(this, function (_c) {
|
|
69
|
+
switch (_c.label) {
|
|
70
|
+
case 0:
|
|
71
|
+
settings = thunkApi.getState().settings;
|
|
72
|
+
countryCode = settings.data.businessCountry;
|
|
73
|
+
leadData = undefined;
|
|
74
|
+
return [4, API.leadService.retrieveLeadIdentity(leadId)];
|
|
75
|
+
case 1:
|
|
76
|
+
data = _c.sent();
|
|
77
|
+
phone = (data.contact || {}).phone;
|
|
78
|
+
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
79
|
+
countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
|
|
80
|
+
if (!(((_b = data === null || data === void 0 ? void 0 : data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'registered')) return [3, 5];
|
|
81
|
+
if (!(data.board_id && data.board_info_id)) return [3, 3];
|
|
82
|
+
return [4, Promise.all([
|
|
83
|
+
API.boardService.retrieveBoardInfo({ id: data.board_id, infoId: data.board_info_id }),
|
|
84
|
+
API.boardService.retrieveBoardDetails(data.board_id),
|
|
85
|
+
thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()
|
|
86
|
+
])];
|
|
87
|
+
case 2:
|
|
88
|
+
_a = _c.sent(), boardInfoRes = _a[0], boardDataRes = _a[1], leadDataRes = _a[2];
|
|
89
|
+
boardInfo = boardInfoRes;
|
|
90
|
+
boardData = boardDataRes;
|
|
91
|
+
leadData = leadDataRes === null || leadDataRes === void 0 ? void 0 : leadDataRes.data;
|
|
92
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP'));
|
|
93
|
+
return [3, 4];
|
|
94
|
+
case 3:
|
|
95
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP'));
|
|
96
|
+
_c.label = 4;
|
|
97
|
+
case 4: return [3, 6];
|
|
98
|
+
case 5:
|
|
99
|
+
if (!(data === null || data === void 0 ? void 0 : data.identification) && (data === null || data === void 0 ? void 0 : data.phone)) {
|
|
100
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
|
|
101
|
+
}
|
|
102
|
+
_c.label = 6;
|
|
103
|
+
case 6: return [2, { data: __assign(__assign({}, data), leadData), countryCode: countryCode, boardInfo: boardInfo, boardData: boardData }];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}); });
|
|
65
107
|
export var getLeadByIdAsync = createAsyncThunk('expressConnect/getLeadByIdAsync', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
108
|
var settings, countryCode, data, phone;
|
|
67
109
|
return __generator(this, function (_a) {
|
|
@@ -193,7 +235,7 @@ export var createCivilIdAuthAsync = createAsyncThunk('connectExpress/createCivil
|
|
|
193
235
|
});
|
|
194
236
|
}); });
|
|
195
237
|
export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileOtpAsync', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
196
|
-
var _a, settings, connectExpress, _b, responseData, leadId, isLeadIdPassed, otpData, _c, auth_token, device_token, service_name, payload, data, isSaudi,
|
|
238
|
+
var _a, settings, connectExpress, _b, responseData, leadId, isLeadIdPassed, otpData, _c, auth_token, device_token, service_name, payload, data, isSaudi, next;
|
|
197
239
|
var _d, _e;
|
|
198
240
|
return __generator(this, function (_f) {
|
|
199
241
|
switch (_f.label) {
|
|
@@ -223,10 +265,8 @@ export var verifyMobileOtpAsync = createAsyncThunk('connectExpress/verifyMobileO
|
|
|
223
265
|
_f.sent();
|
|
224
266
|
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
|
|
225
267
|
isSaudi = isSA(settings.data.businessCountry.iso2);
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep(next_1)); });
|
|
229
|
-
}
|
|
268
|
+
next = isSaudi ? 'CONNECT_EXPRESS_NID_MISSED_STEP' : 'CONNECT_EXPRESS_CIVIL_ID_MISSED_STEP';
|
|
269
|
+
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep(next)); });
|
|
230
270
|
return [2, data];
|
|
231
271
|
}
|
|
232
272
|
});
|
|
@@ -569,6 +609,7 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
|
|
|
569
609
|
var initialState = {
|
|
570
610
|
error: null,
|
|
571
611
|
loading: false,
|
|
612
|
+
customLoading: false,
|
|
572
613
|
data: {
|
|
573
614
|
isLeadIdPassed: false,
|
|
574
615
|
postURL: '',
|
|
@@ -616,13 +657,6 @@ export var connectSlice = createSlice({
|
|
|
616
657
|
setError: function (state, action) {
|
|
617
658
|
state.error = action.payload;
|
|
618
659
|
},
|
|
619
|
-
setResponseData: function (state, action) {
|
|
620
|
-
var _a;
|
|
621
|
-
var leadData = (action.payload || {}).leadData;
|
|
622
|
-
state.data.nidData.nid = (_a = leadData === null || leadData === void 0 ? void 0 : leadData.identification) === null || _a === void 0 ? void 0 : _a.id;
|
|
623
|
-
state.data.nidData.dob = leadData === null || leadData === void 0 ? void 0 : leadData.date_of_birth;
|
|
624
|
-
state.data.responseData = __assign(__assign({}, state.data.responseData), action.payload);
|
|
625
|
-
},
|
|
626
660
|
stopLoader: function (state) {
|
|
627
661
|
state.loading = false;
|
|
628
662
|
},
|
|
@@ -650,6 +684,27 @@ export var connectSlice = createSlice({
|
|
|
650
684
|
},
|
|
651
685
|
extraReducers: function (builder) {
|
|
652
686
|
builder
|
|
687
|
+
.addCase(retrieveLeadIdentityByIdAsync.pending, function (state) {
|
|
688
|
+
state.error = null;
|
|
689
|
+
state.customLoading = true;
|
|
690
|
+
})
|
|
691
|
+
.addCase(retrieveLeadIdentityByIdAsync.fulfilled, function (state, action) {
|
|
692
|
+
state.customLoading = false;
|
|
693
|
+
var _a = action.payload, data = _a.data, countryCode = _a.countryCode, boardInfo = _a.boardInfo, boardData = _a.boardData;
|
|
694
|
+
state.data.responseData = __assign(__assign({}, state.data.responseData), { leadData: data, boardInfo: boardInfo, boardData: boardData });
|
|
695
|
+
var _b = data || {}, identification = _b.identification, date_of_birth = _b.date_of_birth, contact = _b.contact;
|
|
696
|
+
state.data.nidData.nid = identification === null || identification === void 0 ? void 0 : identification.id;
|
|
697
|
+
state.data.nidData.dob = date_of_birth;
|
|
698
|
+
var phone = (contact || {}).phone;
|
|
699
|
+
if (phone) {
|
|
700
|
+
state.data.mobileData.mobile = phone === null || phone === void 0 ? void 0 : phone.number;
|
|
701
|
+
state.data.mobileData.countryCode = countryCode;
|
|
702
|
+
}
|
|
703
|
+
})
|
|
704
|
+
.addCase(retrieveLeadIdentityByIdAsync.rejected, function (state, action) {
|
|
705
|
+
state.customLoading = false;
|
|
706
|
+
state.error = action.error.message;
|
|
707
|
+
})
|
|
653
708
|
.addCase(getLeadByIdAsync.pending, function (state) {
|
|
654
709
|
state.error = null;
|
|
655
710
|
state.loading = true;
|
|
@@ -905,6 +960,6 @@ export var connectSlice = createSlice({
|
|
|
905
960
|
});
|
|
906
961
|
}
|
|
907
962
|
});
|
|
908
|
-
export var clearError = (_a = connectSlice.actions, _a.clearError), stopLoader = _a.stopLoader, setIsLeadIdPassed = _a.setIsLeadIdPassed, resetMobileScreen = _a.resetMobileScreen, resetOTPValue = _a.resetOTPValue, resetNIDScreen = _a.resetNIDScreen, resetCivilScreen = _a.resetCivilScreen, resetStore = _a.resetStore, setError = _a.setError,
|
|
963
|
+
export var clearError = (_a = connectSlice.actions, _a.clearError), stopLoader = _a.stopLoader, setIsLeadIdPassed = _a.setIsLeadIdPassed, resetMobileScreen = _a.resetMobileScreen, resetOTPValue = _a.resetOTPValue, resetNIDScreen = _a.resetNIDScreen, resetCivilScreen = _a.resetCivilScreen, resetStore = _a.resetStore, setError = _a.setError, setPostUrl = _a.setPostUrl, setLeadId = _a.setLeadId, resetIndividualScreen = _a.resetIndividualScreen;
|
|
909
964
|
export default connectSlice.reducer;
|
|
910
965
|
export var connectExpressSelector = function (state) { return state.connectExpress; };
|
|
@@ -9,42 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
-
function step(op) {
|
|
26
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
28
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
-
switch (op[0]) {
|
|
31
|
-
case 0: case 1: t = op; break;
|
|
32
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
-
default:
|
|
36
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
-
if (t[2]) _.ops.pop();
|
|
41
|
-
_.trys.pop(); continue;
|
|
42
|
-
}
|
|
43
|
-
op = body.call(thisArg, _);
|
|
44
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
12
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
49
13
|
var t = {};
|
|
50
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -63,8 +27,7 @@ import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepSta
|
|
|
63
27
|
import { handleCurrentActiveScreen, settingsSelector, handleOpen } from '../../app/settings';
|
|
64
28
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
65
29
|
import { store } from '../../app/store';
|
|
66
|
-
import { connectExpressSelector, setIsLeadIdPassed,
|
|
67
|
-
import API from '../../api';
|
|
30
|
+
import { connectExpressSelector, setIsLeadIdPassed, setPostUrl, setLeadId, retrieveLeadIdentityByIdAsync } from '../app/connectExpress/connectExpressStore';
|
|
68
31
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
69
32
|
import Collapse from '../../components/Collapse';
|
|
70
33
|
import { reactElement, isKW } from '../../utils';
|
|
@@ -77,31 +40,23 @@ var ConnectExpress = memo(function (_a) {
|
|
|
77
40
|
var theme = useAppTheme().theme;
|
|
78
41
|
var dispatch = useAppDispatch();
|
|
79
42
|
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
80
|
-
var _c = useAppSelector(connectExpressSelector), connectExpressError = _c.error, loading = _c.loading;
|
|
81
|
-
|
|
82
|
-
var leadData;
|
|
83
|
-
return __generator(this, function (_a) {
|
|
84
|
-
switch (_a.label) {
|
|
85
|
-
case 0:
|
|
86
|
-
if (!postURL)
|
|
87
|
-
throw new Error('postURL is required and you ave to pass it in the lib configuration!');
|
|
88
|
-
dispatch(setPostUrl(postURL));
|
|
89
|
-
if (!leadId)
|
|
90
|
-
return [2];
|
|
91
|
-
dispatch(setIsLeadIdPassed(true));
|
|
92
|
-
dispatch(setLeadId(leadId));
|
|
93
|
-
return [4, API.leadService.retrieveLeadIdentity(leadId)];
|
|
94
|
-
case 1:
|
|
95
|
-
leadData = _a.sent();
|
|
96
|
-
dispatch(setResponseData({ leadData: leadData }));
|
|
97
|
-
return [2];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}); };
|
|
101
|
-
useAppConfig(__assign(__assign({ navigation: CONNECT_EXPRESS_SCREENS_NAVIGATION }, props), { prepare: prepare }));
|
|
43
|
+
var _c = useAppSelector(connectExpressSelector), connectExpressError = _c.error, loading = _c.loading, customLoading = _c.customLoading;
|
|
44
|
+
useAppConfig(__assign({ navigation: CONNECT_EXPRESS_SCREENS_NAVIGATION }, props));
|
|
102
45
|
useErrorListener(connectExpressError || error);
|
|
103
46
|
useStepStartedListener();
|
|
104
47
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
48
|
+
React.useEffect(function () {
|
|
49
|
+
if (!postURL)
|
|
50
|
+
throw new Error('postURL is required and you ave to pass it in the lib configuration!');
|
|
51
|
+
dispatch(setPostUrl(postURL));
|
|
52
|
+
}, []);
|
|
53
|
+
React.useEffect(function () {
|
|
54
|
+
if (data.isValidOperator && props.open && !settingLoading && leadId) {
|
|
55
|
+
dispatch(setIsLeadIdPassed(true));
|
|
56
|
+
dispatch(setLeadId(leadId));
|
|
57
|
+
dispatch(retrieveLeadIdentityByIdAsync(leadId));
|
|
58
|
+
}
|
|
59
|
+
}, [data.isValidOperator, settingLoading]);
|
|
105
60
|
React.useEffect(function () {
|
|
106
61
|
var _a;
|
|
107
62
|
if (!settingLoading && isKW((_a = data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2)) {
|
|
@@ -111,7 +66,7 @@ var ConnectExpress = memo(function (_a) {
|
|
|
111
66
|
var handleDialogClose = function () {
|
|
112
67
|
dispatch(handleOpen(false));
|
|
113
68
|
};
|
|
114
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onClose: onClose, onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading, error: error, open: open, footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: connectExpressFeatureScreens.map(function (_a, index) {
|
|
69
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onClose: onClose, onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: connectExpressFeatureScreens.map(function (_a, index) {
|
|
115
70
|
var Element = _a.element, name = _a.name;
|
|
116
71
|
var isActive = activeScreen.name === name;
|
|
117
72
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { useAppDispatch } from '../../../../hooks';
|
|
5
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
6
|
+
import { handleOpen } from '../../../../app/settings';
|
|
7
|
+
var AccountAlreadyCreated = function (_a) {
|
|
8
|
+
var t = useTranslation().t;
|
|
9
|
+
var dispatch = useAppDispatch();
|
|
10
|
+
var onSuccess = function () {
|
|
11
|
+
dispatch(handleOpen(false));
|
|
12
|
+
};
|
|
13
|
+
return (_jsx(SuccessScreen, { title: t('express_account_already_created_title'), description: t('express_account_already_created_description'), onSuccess: onSuccess, successTitle: t('express_account_already_created_close_button') }));
|
|
14
|
+
};
|
|
15
|
+
export default React.memo(AccountAlreadyCreated);
|
|
@@ -19,6 +19,7 @@ import ConnectExpressCollectIndividualScreen from './connectExpress/screens/Coll
|
|
|
19
19
|
import ConnectExpressCollectBusinessScreen from './connectExpress/screens/CollectBusinessInfo';
|
|
20
20
|
import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/CreateAccountLoader';
|
|
21
21
|
import ConnectExpressSuccessFlowButtonsScreen from '../features/connectExpress/screens/SuccessWithFlowButtons';
|
|
22
|
+
import ConnectExpressAccountAlreadyCreatedScreen from '../features/connectExpress/screens/AccountAlreadyCreated';
|
|
22
23
|
import CustomersPage from './business/screens/Customers';
|
|
23
24
|
import IDBODPage from './business/screens/IDBOD';
|
|
24
25
|
import BusinessVerifyPage from './business/screens/Verify';
|
|
@@ -152,6 +153,10 @@ export var connectExpressFeatureScreens = [
|
|
|
152
153
|
name: 'CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP',
|
|
153
154
|
element: ConnectExpressCollectBusinessScreen
|
|
154
155
|
},
|
|
156
|
+
{
|
|
157
|
+
name: 'CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP',
|
|
158
|
+
element: ConnectExpressAccountAlreadyCreatedScreen
|
|
159
|
+
},
|
|
155
160
|
{
|
|
156
161
|
name: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
|
|
157
162
|
element: ConnectExpressSuccessFlowButtonsScreen
|