@tap-payments/auth-jsconnect 2.8.1-test → 2.8.2-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 +7 -1
- package/build/features/app/auth/authStore.js +5 -2
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
- package/build/features/featuresScreens.js +5 -0
- package/package.json +1 -1
package/build/constants/app.js
CHANGED
|
@@ -240,7 +240,7 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
242
|
name: 'AUTH_EMAIL_STEP',
|
|
243
|
-
next: 'AUTH_PASSWORD_STEP',
|
|
243
|
+
next: ['AUTH_PASSWORD_STEP', 'AUTH_RESET_PASSWORD_MESSAGE_STEP'],
|
|
244
244
|
prev: 'AUTH_SWITCH_STEP',
|
|
245
245
|
order: 1
|
|
246
246
|
},
|
|
@@ -262,6 +262,12 @@ export var AUTH_SCREENS_NAVIGATION = [
|
|
|
262
262
|
prev: 'AUTH_EMAIL_STEP',
|
|
263
263
|
order: 2
|
|
264
264
|
},
|
|
265
|
+
{
|
|
266
|
+
name: 'AUTH_RESET_PASSWORD_MESSAGE_STEP',
|
|
267
|
+
next: '',
|
|
268
|
+
prev: 'AUTH_EMAIL_STEP',
|
|
269
|
+
order: 2
|
|
270
|
+
},
|
|
265
271
|
{
|
|
266
272
|
name: 'AUTH_VERIFY_PACI_STEP',
|
|
267
273
|
next: 'AUTH_PREPARING_DATA_STEP',
|
|
@@ -209,7 +209,7 @@ export var verifyMobileOtp = createAsyncThunk('auth/verifyMobileOtp', function (
|
|
|
209
209
|
});
|
|
210
210
|
}); });
|
|
211
211
|
export var createEmailAuth = createAsyncThunk('auth/createEmailAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
212
|
-
var _a, settings, auth, requestBody, data;
|
|
212
|
+
var _a, settings, auth, requestBody, data, screen;
|
|
213
213
|
var _b, _c;
|
|
214
214
|
return __generator(this, function (_d) {
|
|
215
215
|
switch (_d.label) {
|
|
@@ -231,7 +231,10 @@ export var createEmailAuth = createAsyncThunk('auth/createEmailAuth', function (
|
|
|
231
231
|
return [4, API.authService.createAuth(requestBody)];
|
|
232
232
|
case 1:
|
|
233
233
|
data = _d.sent();
|
|
234
|
-
|
|
234
|
+
screen = 'AUTH_PASSWORD_STEP';
|
|
235
|
+
if ((data === null || data === void 0 ? void 0 : data.auth_type) === 7)
|
|
236
|
+
screen = 'AUTH_RESET_PASSWORD_MESSAGE_STEP';
|
|
237
|
+
thunkApi.dispatch(handleNextScreenStep(screen));
|
|
235
238
|
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
236
239
|
return [2, { response: data, formData: params }];
|
|
237
240
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
4
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
5
|
+
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
6
|
+
import { handleOpen, settingsSelector } from '../../../../app/settings';
|
|
7
|
+
import { authSelector } from '../../../app/auth/authStore';
|
|
8
|
+
var ResetPasswordMessage = function (_a) {
|
|
9
|
+
var t = useTranslation().t;
|
|
10
|
+
var dispatch = useAppDispatch();
|
|
11
|
+
var data = useAppSelector(authSelector).data;
|
|
12
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
13
|
+
var email = data.emailData.email;
|
|
14
|
+
var onSuccess = function () {
|
|
15
|
+
var _a, _b, _c;
|
|
16
|
+
dispatch(handleOpen(false));
|
|
17
|
+
(_b = (_a = settingsData.appConfig).onFlowCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, (_c = data.responseData) === null || _c === void 0 ? void 0 : _c.authResponse);
|
|
18
|
+
};
|
|
19
|
+
return (_jsx(SuccessScreen, { title: t('reset_password_success_title'), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: email } }), onSuccess: onSuccess, successTitle: t('express_account_already_created_close_button') }));
|
|
20
|
+
};
|
|
21
|
+
export default React.memo(ResetPasswordMessage);
|
|
@@ -36,6 +36,7 @@ import AuthCivilIDScreen from './auth/screens/CivilID';
|
|
|
36
36
|
import AuthVerifyPACIScreen from './auth/screens/VerifyPACI';
|
|
37
37
|
import AuthOTPScreen from './auth/screens/OTP';
|
|
38
38
|
import AuthPasswordScreen from './auth/screens/Password';
|
|
39
|
+
import AuthResetPasswordMessageScreen from './auth/screens/ResetPasswordMessage';
|
|
39
40
|
import PreparingDataScreen from './auth/screens/PreparingData';
|
|
40
41
|
import AccountNotFoundScreen from './auth/screens/AccountNotFound';
|
|
41
42
|
import AuthAuthenticationListScreen from './auth/screens/AuthenticationList';
|
|
@@ -255,6 +256,10 @@ export var authFeatureScreens = [
|
|
|
255
256
|
name: 'AUTH_PASSWORD_STEP',
|
|
256
257
|
element: AuthPasswordScreen
|
|
257
258
|
},
|
|
259
|
+
{
|
|
260
|
+
name: 'AUTH_RESET_PASSWORD_MESSAGE_STEP',
|
|
261
|
+
element: AuthResetPasswordMessageScreen
|
|
262
|
+
},
|
|
258
263
|
{
|
|
259
264
|
name: 'AUTH_VERIFY_PACI_STEP',
|
|
260
265
|
element: AuthVerifyPACIScreen
|