@tap-payments/auth-jsconnect 1.0.94-test → 1.0.97-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/@types/app.d.ts +7 -2
- package/build/@types/form.d.ts +2 -1
- package/build/api/auth.d.ts +22 -3
- package/build/api/axios.d.ts +2 -2
- package/build/api/axios.js +62 -0
- package/build/api/country.d.ts +1 -2
- package/build/api/country.js +7 -8
- package/build/api/data.d.ts +1 -0
- package/build/api/data.js +9 -2
- package/build/api/entity.d.ts +3 -1
- package/build/api/entity.js +11 -2
- package/build/api/firebase.d.ts +1 -1
- package/build/api/firebase.js +5 -2
- package/build/api/index.d.ts +10 -9
- package/build/api/ip.d.ts +1 -1
- package/build/api/ip.js +5 -2
- package/build/api/lead.d.ts +4 -1
- package/build/api/lead.js +14 -2
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +60 -4
- package/build/app/settings.d.ts +6 -15
- package/build/app/settings.js +82 -142
- package/build/components/AnimationFlow/AnimationFlow.d.ts +2 -1
- package/build/components/AnimationFlow/AnimationFlow.js +2 -2
- package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
- package/build/components/AnimationFlow/BottomSheet.js +16 -4
- package/build/constants/api.d.ts +2 -1
- package/build/constants/api.js +5 -3
- package/build/constants/app.d.ts +6 -0
- package/build/constants/app.js +16 -4
- package/build/features/app/bank/bankStore.js +6 -4
- package/build/features/app/business/businessStore.d.ts +2 -4
- package/build/features/app/business/businessStore.js +66 -22
- package/build/features/app/connect/connectStore.d.ts +5 -10
- package/build/features/app/connect/connectStore.js +121 -27
- package/build/features/app/individual/individualStore.d.ts +3 -2
- package/build/features/app/individual/individualStore.js +27 -22
- package/build/features/app/password/passwordStore.d.ts +29 -1
- package/build/features/app/password/passwordStore.js +184 -8
- package/build/features/app/tax/taxStore.js +7 -5
- package/build/features/bank/Bank.js +4 -4
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -4
- package/build/features/business/Business.js +4 -4
- package/build/features/business/screens/IDBOD/IDBOD.js +1 -1
- package/build/features/business/screens/OTP/OTPInput.js +3 -9
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +17 -6
- package/build/features/connect/Connect.js +1 -1
- package/build/features/connect/screens/Mobile/Mobile.js +1 -1
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connect/screens/OTP/OTPInput.js +3 -13
- package/build/features/featuresScreens.js +5 -0
- package/build/features/individual/Individual.js +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +7 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +10 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +89 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +3 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +1 -0
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -4
- package/build/features/password/Password.js +12 -6
- package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -2
- package/build/features/password/screens/OTP/OTP.d.ts +8 -0
- package/build/features/password/screens/OTP/OTP.js +78 -0
- package/build/features/password/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/password/screens/OTP/OTPInput.js +46 -0
- package/build/features/password/screens/OTP/index.d.ts +3 -0
- package/build/features/password/screens/OTP/index.js +2 -0
- package/build/features/password/screens/OTP/validation.d.ts +8 -0
- package/build/features/password/screens/OTP/validation.js +4 -0
- package/build/features/password/screens/Success/Success.js +8 -2
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +17 -5
- package/build/features/password/screens/Verify/OTPInput.d.ts +2 -2
- package/build/features/password/screens/Verify/OTPInput.js +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +8 -2
- package/build/features/shared/Button/FlowsButtons.js +94 -6
- package/build/features/shared/Button/SuccessButton.js +17 -13
- package/build/features/tax/Tax.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +16 -4
- package/build/hooks/useAppConfig.d.ts +1 -4
- package/build/hooks/useAppConfig.js +13 -113
- package/build/hooks/useAppTheme.js +3 -2
- package/build/index.css +4 -0
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +1 -2
- package/build/utils/array.d.ts +3 -0
- package/build/utils/array.js +10 -0
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +4 -0
- package/package.json +1 -1
package/build/app/settings.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
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
|
+
};
|
|
1
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -36,79 +47,78 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
47
|
};
|
|
37
48
|
var _a;
|
|
38
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
39
|
-
import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint } from '../utils';
|
|
50
|
+
import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString } from '../utils';
|
|
40
51
|
import { defaultCountry, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
|
|
41
52
|
import i18n from '../i18n';
|
|
42
53
|
import { updateLocale } from '../utils/locale';
|
|
43
|
-
import API from '../api';
|
|
44
|
-
export var
|
|
45
|
-
var settings,
|
|
46
|
-
return __generator(this, function (
|
|
47
|
-
switch (
|
|
54
|
+
import API, { setAxiosGlobalHeaders } from '../api';
|
|
55
|
+
export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
+
var settings, _a, appConfig, language, _b, client, device, os, _c, visitorId, _d, ip, latitude, longitude, locale, list, operatorData, deviceInfo, countries, businessCountry;
|
|
57
|
+
return __generator(this, function (_e) {
|
|
58
|
+
switch (_e.label) {
|
|
48
59
|
case 0:
|
|
49
60
|
settings = thunkApi.getState().settings;
|
|
50
|
-
|
|
61
|
+
_a = settings.data, appConfig = _a.appConfig, language = _a.language;
|
|
62
|
+
_b = getBrowserInfo(), client = _b.client, device = _b.device, os = _b.os;
|
|
63
|
+
return [4, Promise.all([
|
|
64
|
+
getFingerPrint(),
|
|
65
|
+
API.ipService.getIP(),
|
|
66
|
+
API.firebaseService.getLocale(),
|
|
67
|
+
API.countryService.getCountries()
|
|
68
|
+
])];
|
|
51
69
|
case 1:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
export var getLocale = createAsyncThunk('getLocale', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
99
|
-
var data;
|
|
100
|
-
return __generator(this, function (_a) {
|
|
101
|
-
switch (_a.label) {
|
|
102
|
-
case 0: return [4, API.firebaseService.getLocale()];
|
|
103
|
-
case 1:
|
|
104
|
-
data = (_a.sent()).data;
|
|
105
|
-
return [2, data];
|
|
70
|
+
_c = _e.sent(), visitorId = _c[0].visitorId, _d = _c[1], ip = _d.ip, latitude = _d.latitude, longitude = _d.longitude, locale = _c[2], list = _c[3].list;
|
|
71
|
+
operatorData = {
|
|
72
|
+
type: 'website',
|
|
73
|
+
app_client_version: 'js-auth-connect',
|
|
74
|
+
requirer_browser: "".concat(client === null || client === void 0 ? void 0 : client.name, " , ").concat(client === null || client === void 0 ? void 0 : client.version),
|
|
75
|
+
os: "".concat(os === null || os === void 0 ? void 0 : os.name, " , ").concat(os === null || os === void 0 ? void 0 : os.version),
|
|
76
|
+
locale: language
|
|
77
|
+
};
|
|
78
|
+
deviceInfo = {
|
|
79
|
+
app: {
|
|
80
|
+
language: appConfig.language || 'en',
|
|
81
|
+
name: appConfig.appInfo.name,
|
|
82
|
+
identifier: appConfig.appInfo.identifier || 'auth-connect',
|
|
83
|
+
version: appConfig.appInfo.version || '2.0.0'
|
|
84
|
+
},
|
|
85
|
+
browser: {
|
|
86
|
+
browser_id: visitorId,
|
|
87
|
+
name: (client === null || client === void 0 ? void 0 : client.name) || '',
|
|
88
|
+
user_agent: window.navigator.userAgent,
|
|
89
|
+
version: (client === null || client === void 0 ? void 0 : client.version) || ''
|
|
90
|
+
},
|
|
91
|
+
device: {
|
|
92
|
+
name: '',
|
|
93
|
+
brand: (device === null || device === void 0 ? void 0 : device.brand) || '',
|
|
94
|
+
model: (device === null || device === void 0 ? void 0 : device.model) || '',
|
|
95
|
+
type: (device === null || device === void 0 ? void 0 : device.type) || '',
|
|
96
|
+
os: {
|
|
97
|
+
name: (os === null || os === void 0 ? void 0 : os.name) || '',
|
|
98
|
+
version: (os === null || os === void 0 ? void 0 : os.version) || ''
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
connection: {
|
|
102
|
+
ip: ip,
|
|
103
|
+
latitude: latitude,
|
|
104
|
+
longitude: longitude,
|
|
105
|
+
mac: ''
|
|
106
|
+
},
|
|
107
|
+
source: 'browser'
|
|
108
|
+
};
|
|
109
|
+
setAxiosGlobalHeaders(__assign(__assign({}, getRequestHeaders(deviceInfo)), { authorization: encryptString(appConfig.publicKey), mdn: encryptString(window.location.origin) }));
|
|
110
|
+
return [4, API.operatorService.validateOperator(operatorData)];
|
|
111
|
+
case 2:
|
|
112
|
+
_e.sent();
|
|
113
|
+
countries = sortCountries(list);
|
|
114
|
+
businessCountry = findCountryByIso2(countries, appConfig.businessCountryCode) || defaultCountry;
|
|
115
|
+
return [2, { countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo }];
|
|
106
116
|
}
|
|
107
117
|
});
|
|
108
118
|
}); });
|
|
109
119
|
var initialState = {
|
|
110
120
|
error: null,
|
|
111
|
-
loading:
|
|
121
|
+
loading: true,
|
|
112
122
|
data: {
|
|
113
123
|
open: true,
|
|
114
124
|
isTapOrigin: true,
|
|
@@ -207,89 +217,19 @@ export var settingsSlice = createSlice({
|
|
|
207
217
|
}
|
|
208
218
|
},
|
|
209
219
|
extraReducers: function (builder) {
|
|
210
|
-
builder
|
|
211
|
-
.addCase(getCountries.fulfilled, function (state, action) {
|
|
212
|
-
state.error = null;
|
|
213
|
-
state.loading = false;
|
|
214
|
-
var _a = action.payload, countries = _a.countries, businessCountry = _a.businessCountry;
|
|
215
|
-
state.data.countries = countries;
|
|
216
|
-
state.data.businessCountry = businessCountry || defaultCountry;
|
|
217
|
-
})
|
|
218
|
-
.addCase(getCountries.pending, function (state) {
|
|
219
|
-
state.error = null;
|
|
220
|
+
builder.addCase(fetchAppSettingsSync.pending, function (state) {
|
|
220
221
|
state.loading = true;
|
|
221
|
-
})
|
|
222
|
-
.addCase(getCountries.rejected, function (state, action) {
|
|
223
|
-
state.error = action.error.message;
|
|
224
|
-
state.loading = false;
|
|
225
|
-
})
|
|
226
|
-
.addCase(getClientIp.pending, function (state) {
|
|
227
222
|
state.error = null;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
.
|
|
231
|
-
state.
|
|
232
|
-
state.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
state.data.deviceInfo.connection.latitude = latitude;
|
|
236
|
-
state.data.deviceInfo.connection.longitude = longitude;
|
|
237
|
-
})
|
|
238
|
-
.addCase(getClientIp.rejected, function (state, action) {
|
|
239
|
-
state.error = action.error.message;
|
|
240
|
-
state.loading = false;
|
|
241
|
-
})
|
|
242
|
-
.addCase(getBrowserFingerPrint.pending, function (state) {
|
|
243
|
-
state.loading = true;
|
|
244
|
-
state.error = null;
|
|
245
|
-
})
|
|
246
|
-
.addCase(getBrowserFingerPrint.fulfilled, function (state, action) {
|
|
247
|
-
state.loading = false;
|
|
248
|
-
state.error = null;
|
|
249
|
-
var _a = action.payload, appInfo = _a.appInfo, client = _a.client, device = _a.device, fingerPrint = _a.fingerPrint, os = _a.os;
|
|
250
|
-
state.data.deviceInfo.app.language = state.data.appConfig.language || 'en';
|
|
251
|
-
state.data.deviceInfo.app.name = appInfo.name;
|
|
252
|
-
state.data.deviceInfo.app.version = appInfo.version || '2.0.0';
|
|
253
|
-
state.data.deviceInfo.app.identifier = appInfo.identifier || 'auth-connect-demo';
|
|
254
|
-
state.data.deviceInfo.browser.browser_id = fingerPrint === null || fingerPrint === void 0 ? void 0 : fingerPrint.visitorId;
|
|
255
|
-
state.data.deviceInfo.browser.name = (client === null || client === void 0 ? void 0 : client.name) || '';
|
|
256
|
-
state.data.deviceInfo.browser.user_agent = window.navigator.userAgent;
|
|
257
|
-
state.data.deviceInfo.browser.version = (client === null || client === void 0 ? void 0 : client.version) || '';
|
|
258
|
-
state.data.deviceInfo.device.brand = (device === null || device === void 0 ? void 0 : device.brand) || '';
|
|
259
|
-
state.data.deviceInfo.device.model = (device === null || device === void 0 ? void 0 : device.model) || '';
|
|
260
|
-
state.data.deviceInfo.device.os.name = (os === null || os === void 0 ? void 0 : os.name) || '';
|
|
261
|
-
state.data.deviceInfo.device.os.version = (os === null || os === void 0 ? void 0 : os.version) || '';
|
|
262
|
-
state.data.deviceInfo.device.type = (device === null || device === void 0 ? void 0 : device.type) || '';
|
|
263
|
-
})
|
|
264
|
-
.addCase(getBrowserFingerPrint.rejected, function (state, action) {
|
|
265
|
-
state.loading = false;
|
|
266
|
-
state.loading = false;
|
|
267
|
-
state.error = action.error.message;
|
|
268
|
-
})
|
|
269
|
-
.addCase(getOperator.pending, function (state) {
|
|
270
|
-
state.error = null;
|
|
271
|
-
state.loading = true;
|
|
272
|
-
})
|
|
273
|
-
.addCase(getOperator.fulfilled, function (state, action) {
|
|
274
|
-
state.loading = false;
|
|
275
|
-
if (action.payload === 'valid') {
|
|
276
|
-
state.error = null;
|
|
277
|
-
}
|
|
278
|
-
})
|
|
279
|
-
.addCase(getOperator.rejected, function (state, action) {
|
|
280
|
-
state.error = action.error.message;
|
|
281
|
-
state.loading = false;
|
|
282
|
-
})
|
|
283
|
-
.addCase(getLocale.pending, function (state) {
|
|
284
|
-
state.error = null;
|
|
285
|
-
state.loading = true;
|
|
286
|
-
})
|
|
287
|
-
.addCase(getLocale.fulfilled, function (state, action) {
|
|
223
|
+
});
|
|
224
|
+
builder.addCase(fetchAppSettingsSync.fulfilled, function (state, action) {
|
|
225
|
+
var _a = action.payload, businessCountry = _a.businessCountry, countries = _a.countries, locale = _a.locale, deviceInfo = _a.deviceInfo;
|
|
226
|
+
state.data.countries = countries;
|
|
227
|
+
state.data.businessCountry = businessCountry;
|
|
228
|
+
state.data.deviceInfo = deviceInfo;
|
|
229
|
+
updateLocale(locale, businessCountry.iso2);
|
|
288
230
|
state.loading = false;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
})
|
|
292
|
-
.addCase(getLocale.rejected, function (state, action) {
|
|
231
|
+
});
|
|
232
|
+
builder.addCase(fetchAppSettingsSync.rejected, function (state, action) {
|
|
293
233
|
state.loading = false;
|
|
294
234
|
state.error = action.error.message;
|
|
295
235
|
});
|
|
@@ -8,5 +8,6 @@ export interface AnimationFlowProps {
|
|
|
8
8
|
breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
error?: string | null;
|
|
11
|
+
screenId?: string;
|
|
11
12
|
}
|
|
12
|
-
export default function AnimationFlow({ open, children, breakpoint, type, footer, loading, error, isTapOrigin }: AnimationFlowProps): JSX.Element;
|
|
13
|
+
export default function AnimationFlow({ open, children, breakpoint, type, footer, loading, error, isTapOrigin, screenId }: AnimationFlowProps): JSX.Element;
|
|
@@ -17,7 +17,7 @@ import BottomSheet from './BottomSheet';
|
|
|
17
17
|
import Loader from './Loader';
|
|
18
18
|
import Error from './Error';
|
|
19
19
|
export default function AnimationFlow(_a) {
|
|
20
|
-
var open = _a.open, children = _a.children, breakpoint = _a.breakpoint, type = _a.type, footer = _a.footer, loading = _a.loading, error = _a.error, isTapOrigin = _a.isTapOrigin;
|
|
20
|
+
var open = _a.open, children = _a.children, breakpoint = _a.breakpoint, type = _a.type, footer = _a.footer, loading = _a.loading, error = _a.error, isTapOrigin = _a.isTapOrigin, screenId = _a.screenId;
|
|
21
21
|
var theme = useTheme();
|
|
22
22
|
var matches = useMediaQuery(theme.breakpoints.down(breakpoint || 'sm'));
|
|
23
23
|
if (loading) {
|
|
@@ -32,5 +32,5 @@ export default function AnimationFlow(_a) {
|
|
|
32
32
|
if (type === 'BOTTOMSHEET') {
|
|
33
33
|
return _jsx(BottomSheet, __assign({ open: open }, { children: children }));
|
|
34
34
|
}
|
|
35
|
-
return matches ? (_jsx(BottomSheet, __assign({ open: open }, { children: children }))) : (_jsx(Dialog, __assign({ open: open, footer: footer, isTapOrigin: isTapOrigin }, { children: children })));
|
|
35
|
+
return matches ? (_jsx(BottomSheet, __assign({ open: open, screenId: screenId }, { children: children }))) : (_jsx(Dialog, __assign({ open: open, footer: footer, isTapOrigin: isTapOrigin }, { children: children })));
|
|
36
36
|
}
|
|
@@ -4,6 +4,7 @@ import 'react-spring-bottom-sheet/dist/style.css';
|
|
|
4
4
|
export interface BottomSheetProps extends MainBottomSheetProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
open: boolean;
|
|
7
|
+
screenId?: string;
|
|
7
8
|
}
|
|
8
|
-
declare const _default: React.MemoExoticComponent<({ open, children, ...rest }: BottomSheetProps) => JSX.Element>;
|
|
9
|
+
declare const _default: React.MemoExoticComponent<({ open, children, screenId, ...rest }: BottomSheetProps) => JSX.Element>;
|
|
9
10
|
export default _default;
|
|
@@ -59,13 +59,25 @@ var BottomSheetStyled = styled(BottomSheet)(function (_a) {
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
var BottomSheetComponent = function (_a) {
|
|
62
|
-
var open = _a.open, children = _a.children, rest = __rest(_a, ["open", "children"]);
|
|
62
|
+
var open = _a.open, children = _a.children, screenId = _a.screenId, rest = __rest(_a, ["open", "children", "screenId"]);
|
|
63
|
+
var sheetRef = React.useRef(null);
|
|
63
64
|
var getMinHeight = function (maxHeight) {
|
|
64
|
-
var
|
|
65
|
-
var height =
|
|
65
|
+
var el = document.getElementById('main-feature-container');
|
|
66
|
+
var height = el ? el.clientHeight : 0;
|
|
66
67
|
return height || maxHeight * 0.7;
|
|
67
68
|
};
|
|
68
|
-
|
|
69
|
+
React.useEffect(function () {
|
|
70
|
+
if (sheetRef.current && screenId) {
|
|
71
|
+
setTimeout(function () {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
(_b = (_a = sheetRef === null || sheetRef === void 0 ? void 0 : sheetRef.current) === null || _a === void 0 ? void 0 : _a.snapTo) === null || _b === void 0 ? void 0 : _b.call(_a, function (_a) {
|
|
74
|
+
var maxHeight = _a.maxHeight;
|
|
75
|
+
return getMinHeight(maxHeight);
|
|
76
|
+
});
|
|
77
|
+
}, 500);
|
|
78
|
+
}
|
|
79
|
+
}, [screenId]);
|
|
80
|
+
return (_jsx(BottomSheetStyled, __assign({ ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
69
81
|
var maxHeight = _a.maxHeight;
|
|
70
82
|
return [getMinHeight(maxHeight), maxHeight * 0.95];
|
|
71
83
|
} }, rest, { children: children })));
|
package/build/constants/api.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export declare const ENDPOINT_PATHS: {
|
|
|
8
8
|
OPERATOR: string;
|
|
9
9
|
AUTH: string;
|
|
10
10
|
LEAD: string;
|
|
11
|
-
LEAD_IDENTITY: string;
|
|
12
11
|
LEAD_IDENTITY_VERIFY: string;
|
|
13
12
|
RETRIEVE_ENTITY_LIST: string;
|
|
14
13
|
ENTITY: string;
|
|
@@ -26,4 +25,6 @@ export declare const ENDPOINT_PATHS: {
|
|
|
26
25
|
BANK: string;
|
|
27
26
|
IBAN_BANK: string;
|
|
28
27
|
BRAND_LIST: string;
|
|
28
|
+
OCCUPATION: string;
|
|
29
|
+
INDIVIDUAL: string;
|
|
29
30
|
};
|
package/build/constants/api.js
CHANGED
|
@@ -7,10 +7,10 @@ var IP_PATH = '/ip';
|
|
|
7
7
|
var OPERATOR_PATH = '/operator';
|
|
8
8
|
var AUTH_PATH = '/auth';
|
|
9
9
|
var LEAD_PATH = '/lead';
|
|
10
|
-
var LEAD_IDENTITY_PATH = '/lead/identity';
|
|
11
10
|
var LEAD_IDENTITY_VERIFY_PATH = 'lead/identity/verify';
|
|
12
11
|
var RETRIEVE_ENTITY_LIST_PATH = '/lead/entity/list';
|
|
13
12
|
var ENTITY_PATH = '/entity';
|
|
13
|
+
var INDIVIDUAL_PATH = '/individual';
|
|
14
14
|
var BANK_PATH = '/entity/bankaccount';
|
|
15
15
|
var IBAN_PATH = '/iban';
|
|
16
16
|
var CHECK_EMAIL = '/lead/identity/emailcheck';
|
|
@@ -23,6 +23,7 @@ var EXPECTED_CUSTOMERS_PATH = '/v2/expectedCustomers';
|
|
|
23
23
|
var SIGNUP_PATH = '/signup';
|
|
24
24
|
var SOURCE_INCOME_PATH = '/v2/sourceOfIncome';
|
|
25
25
|
var MONTHLY_INCOME_PATH = '/v2/monthlyIncome';
|
|
26
|
+
var OCCUPATION_PATH = '/v2/occupation';
|
|
26
27
|
var BRAND_LIST_PATH = '/brand/list';
|
|
27
28
|
var FIREBASE_URL = 'https://goconnect-195cd-default-rtdb.asia-southeast1.firebasedatabase.app/locale.json';
|
|
28
29
|
export var ENDPOINT_PATHS = {
|
|
@@ -35,7 +36,6 @@ export var ENDPOINT_PATHS = {
|
|
|
35
36
|
OPERATOR: OPERATOR_PATH,
|
|
36
37
|
AUTH: AUTH_PATH,
|
|
37
38
|
LEAD: LEAD_PATH,
|
|
38
|
-
LEAD_IDENTITY: LEAD_IDENTITY_PATH,
|
|
39
39
|
LEAD_IDENTITY_VERIFY: LEAD_IDENTITY_VERIFY_PATH,
|
|
40
40
|
RETRIEVE_ENTITY_LIST: RETRIEVE_ENTITY_LIST_PATH,
|
|
41
41
|
ENTITY: ENTITY_PATH,
|
|
@@ -52,5 +52,7 @@ export var ENDPOINT_PATHS = {
|
|
|
52
52
|
MONTHLY_INCOME: MONTHLY_INCOME_PATH,
|
|
53
53
|
BANK: BANK_PATH,
|
|
54
54
|
IBAN_BANK: IBAN_PATH,
|
|
55
|
-
BRAND_LIST: BRAND_LIST_PATH
|
|
55
|
+
BRAND_LIST: BRAND_LIST_PATH,
|
|
56
|
+
OCCUPATION: OCCUPATION_PATH,
|
|
57
|
+
INDIVIDUAL: INDIVIDUAL_PATH
|
|
56
58
|
};
|
package/build/constants/app.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export declare const CONNECT_STEP_NAMES: {
|
|
|
80
80
|
CONNECT_SUCCESS: string;
|
|
81
81
|
};
|
|
82
82
|
export declare const BUSINESS_STEP_NAMES: {
|
|
83
|
+
BUSINESS_INFO: string;
|
|
83
84
|
PHONE_AUTH: string;
|
|
84
85
|
IDENTITY_AUTH: string;
|
|
85
86
|
IDENTITY_VERIFY_AUTH: string;
|
|
@@ -109,6 +110,7 @@ export declare const PASSWORD_STEP_NAMES: {
|
|
|
109
110
|
PHONE_AUTH: string;
|
|
110
111
|
PASSWORD_CREATE: string;
|
|
111
112
|
PASSWORD_SUCCESS: string;
|
|
113
|
+
RESET_PASSWORD: string;
|
|
112
114
|
};
|
|
113
115
|
export declare const RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
|
|
114
116
|
export declare const ENCRYPTION_FLAG = "encryption_contract";
|
|
@@ -135,3 +137,7 @@ export declare const OTHER_CR_LICENSE: {
|
|
|
135
137
|
};
|
|
136
138
|
type: BusinessType;
|
|
137
139
|
};
|
|
140
|
+
export declare const PASSWORD_OPERATION_TYPE: {
|
|
141
|
+
SET_PASSWORD: string;
|
|
142
|
+
RESET_PASSWORD: string;
|
|
143
|
+
};
|
package/build/constants/app.js
CHANGED
|
@@ -141,21 +141,27 @@ export var PASSWORD_SCREENS_NAVIGATION = [
|
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
name: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
144
|
-
next: 'PASSWORD_SUCCESS_STEP',
|
|
144
|
+
next: ['PASSWORD_SUCCESS_STEP', 'PASSWORD_RESET_PASSWORD_OTP_STEP'],
|
|
145
145
|
prev: '',
|
|
146
146
|
order: 2
|
|
147
147
|
},
|
|
148
|
+
{
|
|
149
|
+
name: 'PASSWORD_RESET_PASSWORD_OTP_STEP',
|
|
150
|
+
next: 'PASSWORD_SUCCESS_STEP',
|
|
151
|
+
prev: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
152
|
+
order: 3
|
|
153
|
+
},
|
|
148
154
|
{
|
|
149
155
|
name: 'PASSWORD_SUCCESS_STEP',
|
|
150
156
|
next: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
151
157
|
prev: 'PASSWORD_CREATE_PASSWORD_STEP',
|
|
152
|
-
order:
|
|
158
|
+
order: 4
|
|
153
159
|
},
|
|
154
160
|
{
|
|
155
161
|
name: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
156
162
|
next: '',
|
|
157
163
|
prev: '',
|
|
158
|
-
order:
|
|
164
|
+
order: 5
|
|
159
165
|
}
|
|
160
166
|
];
|
|
161
167
|
export var BANK_SCREENS_NAVIGATION = [
|
|
@@ -272,6 +278,7 @@ export var CONNECT_STEP_NAMES = {
|
|
|
272
278
|
CONNECT_SUCCESS: 'connect_completed'
|
|
273
279
|
};
|
|
274
280
|
export var BUSINESS_STEP_NAMES = {
|
|
281
|
+
BUSINESS_INFO: 'business_info',
|
|
275
282
|
PHONE_AUTH: 'business_phone_auth',
|
|
276
283
|
IDENTITY_AUTH: 'business_identity_auth',
|
|
277
284
|
IDENTITY_VERIFY_AUTH: 'business_identity_auth_verify',
|
|
@@ -300,7 +307,8 @@ export var PASSWORD_STEP_NAMES = {
|
|
|
300
307
|
PASSWORD_INFO: 'password_info',
|
|
301
308
|
PHONE_AUTH: 'password_phone_auth',
|
|
302
309
|
PASSWORD_CREATE: 'password_create',
|
|
303
|
-
PASSWORD_SUCCESS: 'password_completed'
|
|
310
|
+
PASSWORD_SUCCESS: 'password_completed',
|
|
311
|
+
RESET_PASSWORD: 'reset_password'
|
|
304
312
|
};
|
|
305
313
|
export var RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
|
|
306
314
|
export var ENCRYPTION_FLAG = 'encryption_contract';
|
|
@@ -327,3 +335,7 @@ export var OTHER_CR_LICENSE = {
|
|
|
327
335
|
},
|
|
328
336
|
type: BusinessType.CR
|
|
329
337
|
};
|
|
338
|
+
export var PASSWORD_OPERATION_TYPE = {
|
|
339
|
+
SET_PASSWORD: 'set_password',
|
|
340
|
+
RESET_PASSWORD: 'reset_password'
|
|
341
|
+
};
|
|
@@ -49,10 +49,10 @@ var _a;
|
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { FlowsTypes } from '../../../@types';
|
|
52
|
-
import { hasKey
|
|
52
|
+
import { hasKey } from '../../../utils';
|
|
53
53
|
import { handleNextScreenStep } from '../../../app/settings';
|
|
54
54
|
import { BANK_STEP_NAMES } from '../../../constants';
|
|
55
|
-
export var verifyLeadToken = createAsyncThunk('
|
|
55
|
+
export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
56
|
var payload, data, leadResponse, _a, steps, entity, hasCompleted;
|
|
57
57
|
return __generator(this, function (_b) {
|
|
58
58
|
switch (_b.label) {
|
|
@@ -211,6 +211,7 @@ export var updateLeadSuccess = createAsyncThunk('updateLeadBankSuccess', functio
|
|
|
211
211
|
if (!id)
|
|
212
212
|
return [2];
|
|
213
213
|
payload = {
|
|
214
|
+
lang: settings.data.language,
|
|
214
215
|
step_name: BANK_STEP_NAMES.BANK_SUCCESS,
|
|
215
216
|
id: id,
|
|
216
217
|
encryption_contract: []
|
|
@@ -218,13 +219,15 @@ export var updateLeadSuccess = createAsyncThunk('updateLeadBankSuccess', functio
|
|
|
218
219
|
return [4, API.leadService.updateLead(payload)];
|
|
219
220
|
case 1:
|
|
220
221
|
data = (_g.sent()).data;
|
|
222
|
+
if (!!data.errors) return [3, 3];
|
|
221
223
|
return [4, thunkApi.dispatch(retrieveEntityInfo((_b = data.entity) === null || _b === void 0 ? void 0 : _b.id))];
|
|
222
224
|
case 2:
|
|
223
225
|
_g.sent();
|
|
224
226
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
|
|
225
227
|
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
226
228
|
thunkApi.dispatch(handleNextScreenStep());
|
|
227
|
-
|
|
229
|
+
_g.label = 3;
|
|
230
|
+
case 3: return [2, { response: data, formData: params }];
|
|
228
231
|
}
|
|
229
232
|
});
|
|
230
233
|
}); });
|
|
@@ -355,7 +358,6 @@ export var bankSlice = createSlice({
|
|
|
355
358
|
}
|
|
356
359
|
var flows = response.flows, steps = response.steps;
|
|
357
360
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps });
|
|
358
|
-
removeRequestHeaders();
|
|
359
361
|
})
|
|
360
362
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
361
363
|
state.loading = true;
|
|
@@ -21,11 +21,9 @@ export declare const updateLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
21
21
|
type: string;
|
|
22
22
|
nid: string;
|
|
23
23
|
dob: string;
|
|
24
|
-
isResend: boolean;
|
|
25
24
|
};
|
|
26
|
-
}, NIDFormValues
|
|
27
|
-
|
|
28
|
-
}, {}>;
|
|
25
|
+
}, NIDFormValues, {}>;
|
|
26
|
+
export declare const resendOTPLeadIdentity: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
29
27
|
export declare const retrieveEntityList: import("@reduxjs/toolkit").AsyncThunk<any, {
|
|
30
28
|
leadId: string;
|
|
31
29
|
}, {}>;
|