@tap-payments/auth-jsconnect 2.8.42-test → 2.8.45-development
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 +75 -3
- package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
- package/build/features/app/connectExpress/connectExpressStore.js +98 -47
- package/build/features/auth/Auth.js +5 -1
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/bank/Bank.js +3 -1
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/board/Board.js +8 -4
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/brand/Brand.js +3 -1
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/business/Business.js +9 -4
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
- package/build/features/connectExpress/ConnectExpress.js +22 -20
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/entity/Entity.js +3 -1
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/featuresScreens.js +67 -7
- package/build/features/individual/Individual.js +3 -1
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/password/Password.js +3 -1
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/signIn/SignIn.js +12 -3
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.js +3 -1
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/hooks/useVerifyToken.d.ts +3 -1
- package/build/hooks/useVerifyToken.js +9 -4
- package/package.json +2 -2
|
@@ -105,28 +105,30 @@ var ConnectExpress = memo(function (_a) {
|
|
|
105
105
|
}, [data.businessCountry]);
|
|
106
106
|
React.useEffect(function () {
|
|
107
107
|
var _a, _b;
|
|
108
|
-
if (settingLoading)
|
|
108
|
+
if (settingLoading || !props.open)
|
|
109
109
|
return;
|
|
110
|
-
if (data.isValidOperator
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
dispatch(
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
if (!((_a = data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2)) {
|
|
124
|
-
dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_BUSINESS_COUNTRY_STEP'));
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
if (((_b = data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2) && (isKW(data.businessCountry.iso2) || isOtherThanKWOrSA(data.businessCountry.iso2))) {
|
|
128
|
-
dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
|
|
110
|
+
if (!data.isValidOperator) {
|
|
111
|
+
dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_OPERATOR_ERROR_STEP'));
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (configToken && connectData.leadId) {
|
|
115
|
+
dispatch(retrieveLeadIdentityByIdAsync(connectData.leadId));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (leadId) {
|
|
119
|
+
if (props.scope !== 'auth') {
|
|
120
|
+
dispatch(setIsLeadIdPassed(true));
|
|
129
121
|
}
|
|
122
|
+
dispatch(setLeadId(leadId));
|
|
123
|
+
dispatch(retrieveLeadIdentityByIdAsync(leadId));
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (!((_a = data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2)) {
|
|
127
|
+
dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_BUSINESS_COUNTRY_STEP'));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (((_b = data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2) && (isKW(data.businessCountry.iso2) || isOtherThanKWOrSA(data.businessCountry.iso2))) {
|
|
131
|
+
dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
|
|
130
132
|
}
|
|
131
133
|
}, [data.isValidOperator, settingLoading]);
|
|
132
134
|
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', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: !isTapOrigin, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: true }, { children: connectExpressFeatureScreens.map(function (_a, index) {
|
|
@@ -1,34 +1,24 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import * as React from 'react';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
3
|
+
import { isNetworkError, sleep } from '../../../../utils';
|
|
4
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
5
|
import { connectExpressSelector, createAccountAsync } from '../../../app/connectExpress/connectExpressStore';
|
|
18
6
|
import CreateAccountLoading from '../../../shared/CreateAccountLoading';
|
|
19
|
-
import Button from '../../../shared/Button';
|
|
20
7
|
var CreateAccountLoader = function (_a) {
|
|
21
8
|
var dispatch = useAppDispatch();
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
9
|
+
var error = useAppSelector(connectExpressSelector).error;
|
|
10
|
+
var _b = React.useState(0), isRetryCount = _b[0], setIsRetryCount = _b[1];
|
|
11
|
+
var isNE = React.useMemo(function () { return isNetworkError(error); }, [error]);
|
|
25
12
|
React.useEffect(function () {
|
|
26
|
-
dispatch(createAccountAsync());
|
|
13
|
+
dispatch(createAccountAsync({ isRetry: false }));
|
|
27
14
|
}, []);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
React.useEffect(function () {
|
|
16
|
+
if (isNE && isRetryCount <= 3) {
|
|
17
|
+
sleep(2000);
|
|
18
|
+
setIsRetryCount(isRetryCount + 1);
|
|
19
|
+
dispatch(createAccountAsync({ isRetry: true }));
|
|
20
|
+
}
|
|
21
|
+
}, [isNE]);
|
|
22
|
+
return _jsx(CreateAccountLoading, { error: isNE && isRetryCount <= 3 ? '' : error });
|
|
33
23
|
};
|
|
34
24
|
export default React.memo(CreateAccountLoader);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -0,0 +1,34 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { isNetworkError } from '../../../../utils';
|
|
16
|
+
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
|
+
import DataLoading from '../../../shared/DataLoading';
|
|
18
|
+
import Button from '../../../shared/Button';
|
|
19
|
+
import { connectExpressSelector, retrieveDetailsAfterCreateAccountAsync } from '../../../app/connectExpress/connectExpressStore';
|
|
20
|
+
var PrepareDataLoading = function (_a) {
|
|
21
|
+
var dispatch = useAppDispatch();
|
|
22
|
+
var isAr = useLanguage().isAr;
|
|
23
|
+
var t = useTranslation().t;
|
|
24
|
+
var _b = useAppSelector(connectExpressSelector), error = _b.error, loading = _b.loading;
|
|
25
|
+
React.useEffect(function () {
|
|
26
|
+
dispatch(retrieveDetailsAfterCreateAccountAsync());
|
|
27
|
+
}, []);
|
|
28
|
+
var onReTry = function () {
|
|
29
|
+
dispatch(retrieveDetailsAfterCreateAccountAsync());
|
|
30
|
+
};
|
|
31
|
+
var isNE = React.useMemo(function () { return isNetworkError(error); }, [error]);
|
|
32
|
+
return (_jsx(DataLoading, __assign({ error: error }, { children: isNE && (_jsx(Button, __assign({ onClick: onReTry, disableBack: true, isAr: isAr, loading: loading }, { children: t('try_again') }))) })));
|
|
33
|
+
};
|
|
34
|
+
export default React.memo(PrepareDataLoading);
|
|
@@ -51,7 +51,9 @@ var Entity = memo(function (_a) {
|
|
|
51
51
|
open: open,
|
|
52
52
|
mode: props.mode,
|
|
53
53
|
internalToken: verifyToken,
|
|
54
|
-
settingLoading: settingLoading
|
|
54
|
+
settingLoading: settingLoading,
|
|
55
|
+
operatorErrorScreenName: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
56
|
+
isValidOperator: data.isValidOperator
|
|
55
57
|
});
|
|
56
58
|
React.useEffect(function () {
|
|
57
59
|
sendPageView({
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -22,11 +22,13 @@ import ConnectExpressIdentityVerifyOTPScreen from './connectExpress/screens/Iden
|
|
|
22
22
|
import ConnectExpressCollectIndividualScreen from './connectExpress/screens/CollectIndividualInfo';
|
|
23
23
|
import ConnectExpressCollectBusinessScreen from './connectExpress/screens/CollectBusinessInfo';
|
|
24
24
|
import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/CreateAccountLoader';
|
|
25
|
+
import ConnectExpressPreparingDataLoaderScreen from './connectExpress/screens/PrepareDataLoading';
|
|
25
26
|
import ConnectExpressSuccessFlowButtonsScreen from './connectExpress/screens/SuccessWithFlowButtons';
|
|
26
27
|
import ConnectExpressAccountAlreadyCreatedScreen from './connectExpress/screens/AccountAlreadyCreated';
|
|
27
28
|
import ConnectExpressAuthenticationListScreen from './connectExpress/screens/AuthenticationList';
|
|
28
29
|
import ConnectExpressAuthMerchantScreen from './connectExpress/screens/AuthMerchant';
|
|
29
30
|
import ConnectExpressAuthAccountCreatedLoaderScreen from './connectExpress/screens/AccountCreatedLoader';
|
|
31
|
+
import ConnectExpressOperatorError from './connectExpress/screens/OperatorError';
|
|
30
32
|
import AuthBusinessCountry from './auth/screens/BusinessCountry/BusinessCountry';
|
|
31
33
|
import AuthSwitchScreen from './auth/screens/AuthSwitch';
|
|
32
34
|
import AuthMobileScreen from './auth/screens/Mobile';
|
|
@@ -44,6 +46,7 @@ import AuthMerchantScreen from './auth/screens/AuthMerchant';
|
|
|
44
46
|
import AuthAccountCreatedLoaderScreen from './auth/screens/AccountCreatedLoader';
|
|
45
47
|
import AuthEmailSentScreen from './auth/screens/EmailSent';
|
|
46
48
|
import AuthMigratingDataScreen from './auth/screens/MigratingData';
|
|
49
|
+
import AuthOperatorError from './auth/screens/OperatorError';
|
|
47
50
|
import CustomersPage from './business/screens/Customers';
|
|
48
51
|
import IDBODPage from './business/screens/IDBOD';
|
|
49
52
|
import BusinessVerifyPage from './business/screens/Verify';
|
|
@@ -56,6 +59,7 @@ import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
|
|
|
56
59
|
import BusCivilIDscreen from './business/screens/CivilID';
|
|
57
60
|
import BusVerifyPACIScreen from './business/screens/VerifyPACI';
|
|
58
61
|
import BrandVerifyScreen from './business/screens/BrandDetails';
|
|
62
|
+
import BusinessOperatorError from './business/screens/OperatorError';
|
|
59
63
|
import PasswordVerifyPage from './password/screens/Verify';
|
|
60
64
|
import CreatePasswordPage from './password/screens/CreatePassword';
|
|
61
65
|
import PasswordDataLoadingPage from './password/screens/PrepareDataLoading';
|
|
@@ -63,6 +67,7 @@ import PasswordOTPPage from './password/screens/OTP';
|
|
|
63
67
|
import SuccessPasswordPage from './password/screens/Success';
|
|
64
68
|
import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
|
|
65
69
|
import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
|
|
70
|
+
import PasswordOperatorError from './password/screens/OperatorError';
|
|
66
71
|
import IndividualVerifyPage from './individual/screens/Verify';
|
|
67
72
|
import IndividualPhoneInfoPage from './individual/screens/IndividualPhoneInfo';
|
|
68
73
|
import IndividualListPage from './individual/screens/IndividualList';
|
|
@@ -72,22 +77,26 @@ import SuccessOwnerPage from './individual/screens/Success';
|
|
|
72
77
|
import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
|
|
73
78
|
import IndividualResetPasswordSuccessPage from './individual/screens/ResetPasswordSuccess';
|
|
74
79
|
import IndividualDataLoadingPage from './individual/screens/PrepareDataLoading';
|
|
80
|
+
import IndividualOperatorError from './individual/screens/OperatorError';
|
|
75
81
|
import BankVerifyPage from './bank/screens/Verify';
|
|
76
82
|
import BankDetailsPage from './bank/screens/BankDetails';
|
|
77
83
|
import BankSuccessPage from './bank/screens/Success';
|
|
78
84
|
import BankSuccessWithFlowPage from './bank/screens/SuccessWithFlowButtons';
|
|
79
85
|
import BankResetPasswordSuccessPage from './bank/screens/ResetPasswordSuccess';
|
|
80
86
|
import BankDataLoadingPage from './bank/screens/PrepareDataLoading';
|
|
87
|
+
import BankOperatorError from './bank/screens/OperatorError';
|
|
81
88
|
import TaxVerifyPage from './tax/screens/Verify';
|
|
82
89
|
import TaxDetailsPage from './tax/screens/TaxDetails';
|
|
83
90
|
import TaxSuccessPage from './tax/screens/Success';
|
|
84
91
|
import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
|
|
85
92
|
import TaxResetPasswordSuccessPage from './tax/screens/ResetPasswordSuccess';
|
|
86
93
|
import TaxDataLoadingPage from './tax/screens/PrepareDataLoading';
|
|
94
|
+
import TaxOperatorError from './tax/screens/OperatorError';
|
|
87
95
|
import SignInMobilePage from './signIn/screens/Mobile';
|
|
88
96
|
import SignInEmailPage from './signIn/screens/Email';
|
|
89
97
|
import SignInOTPPage from './signIn/screens/OTP';
|
|
90
98
|
import SignInPasswordPage from './signIn/screens/Password';
|
|
99
|
+
import SignInOperatorError from './signIn/screens/OperatorError';
|
|
91
100
|
import EntityVerifyPage from './entity/screens/Verify';
|
|
92
101
|
import EntityNamePage from './entity/screens/EntityName';
|
|
93
102
|
import EntityCapitalPage from './entity/screens/EntityCapital';
|
|
@@ -95,6 +104,7 @@ import EntitySuccessPage from './entity/screens/Success';
|
|
|
95
104
|
import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
|
|
96
105
|
import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
|
|
97
106
|
import EntityDataLoadingPage from './entity/screens/PrepareDataLoading';
|
|
107
|
+
import EntityOperatorError from './entity/screens/OperatorError';
|
|
98
108
|
import BrandVerifyPage from './brand/screens/Verify';
|
|
99
109
|
import BrandInfoPage from './brand/screens/BrandInfo';
|
|
100
110
|
import BrandSegmentPage from './brand/screens/BrandSegmentInfo';
|
|
@@ -103,9 +113,11 @@ import BrandSuccessPage from './brand/screens/Success';
|
|
|
103
113
|
import BrandSuccessWithFlowPage from './brand/screens/SuccessWithFlowButtons';
|
|
104
114
|
import BrandResetPasswordSuccessPage from './brand/screens/ResetPasswordSuccess';
|
|
105
115
|
import BrandDataLoadingPage from './brand/screens/PrepareDataLoading';
|
|
116
|
+
import BrandOperatorError from './brand/screens/OperatorError';
|
|
106
117
|
import BoardVerifyPage from './board/screens/Verify';
|
|
107
118
|
import BoardSuccessWithFlowPage from './board/screens/SuccessWithFlowButtons';
|
|
108
119
|
import BoardResetPasswordSuccessPage from './board/screens/ResetPasswordSuccess';
|
|
120
|
+
import BoardOperatorError from './board/screens/OperatorError';
|
|
109
121
|
export var connectFeatureScreens = [
|
|
110
122
|
{
|
|
111
123
|
name: 'CONNECT_BUSINESS_COUNTRY_STEP',
|
|
@@ -197,6 +209,10 @@ export var connectExpressFeatureScreens = [
|
|
|
197
209
|
name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
|
|
198
210
|
element: ConnectExpressCreateAccountLoaderScreen
|
|
199
211
|
},
|
|
212
|
+
{
|
|
213
|
+
name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
|
|
214
|
+
element: ConnectExpressPreparingDataLoaderScreen
|
|
215
|
+
},
|
|
200
216
|
{
|
|
201
217
|
name: 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
|
|
202
218
|
element: ConnectExpressCollectIndividualScreen
|
|
@@ -224,6 +240,10 @@ export var connectExpressFeatureScreens = [
|
|
|
224
240
|
{
|
|
225
241
|
name: 'CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP',
|
|
226
242
|
element: ConnectExpressAuthAccountCreatedLoaderScreen
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'CONNECT_EXPRESS_OPERATOR_ERROR_STEP',
|
|
246
|
+
element: ConnectExpressOperatorError
|
|
227
247
|
}
|
|
228
248
|
];
|
|
229
249
|
export var authFeatureScreens = [
|
|
@@ -294,6 +314,10 @@ export var authFeatureScreens = [
|
|
|
294
314
|
{
|
|
295
315
|
name: 'AUTH_MIGRATING_DATA_STEP',
|
|
296
316
|
element: AuthMigratingDataScreen
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
name: 'AUTH_OPERATOR_ERROR_STEP',
|
|
320
|
+
element: AuthOperatorError
|
|
297
321
|
}
|
|
298
322
|
];
|
|
299
323
|
export var businessFeatureScreens = [
|
|
@@ -332,7 +356,11 @@ export var businessFeatureScreens = [
|
|
|
332
356
|
{ name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
|
|
333
357
|
{ name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
|
|
334
358
|
{ name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage },
|
|
335
|
-
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
|
|
359
|
+
{ name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen },
|
|
360
|
+
{
|
|
361
|
+
name: 'BUSINESS_OPERATOR_ERROR_STEP',
|
|
362
|
+
element: BusinessOperatorError
|
|
363
|
+
}
|
|
336
364
|
];
|
|
337
365
|
export var passwordFeatureScreens = [
|
|
338
366
|
{
|
|
@@ -359,7 +387,11 @@ export var passwordFeatureScreens = [
|
|
|
359
387
|
name: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
360
388
|
element: PasswordSuccessWithFlowPage
|
|
361
389
|
},
|
|
362
|
-
{ name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage }
|
|
390
|
+
{ name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage },
|
|
391
|
+
{
|
|
392
|
+
name: 'PASSWORD_OPERATOR_ERROR_STEP',
|
|
393
|
+
element: PasswordOperatorError
|
|
394
|
+
}
|
|
363
395
|
];
|
|
364
396
|
export var individualFeatureScreens = [
|
|
365
397
|
{
|
|
@@ -394,7 +426,11 @@ export var individualFeatureScreens = [
|
|
|
394
426
|
name: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
395
427
|
element: IndividualSuccessWithFlowPage
|
|
396
428
|
},
|
|
397
|
-
{ name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage }
|
|
429
|
+
{ name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage },
|
|
430
|
+
{
|
|
431
|
+
name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
432
|
+
element: IndividualOperatorError
|
|
433
|
+
}
|
|
398
434
|
];
|
|
399
435
|
export var bankFeatureScreens = [
|
|
400
436
|
{
|
|
@@ -417,7 +453,11 @@ export var bankFeatureScreens = [
|
|
|
417
453
|
name: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
418
454
|
element: BankSuccessWithFlowPage
|
|
419
455
|
},
|
|
420
|
-
{ name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage }
|
|
456
|
+
{ name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage },
|
|
457
|
+
{
|
|
458
|
+
name: 'BANK_OPERATOR_ERROR_STEP',
|
|
459
|
+
element: BankOperatorError
|
|
460
|
+
}
|
|
421
461
|
];
|
|
422
462
|
export var taxFeatureScreens = [
|
|
423
463
|
{
|
|
@@ -440,7 +480,11 @@ export var taxFeatureScreens = [
|
|
|
440
480
|
name: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
441
481
|
element: TaxSuccessWithFlowPage
|
|
442
482
|
},
|
|
443
|
-
{ name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage }
|
|
483
|
+
{ name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage },
|
|
484
|
+
{
|
|
485
|
+
name: 'TAX_OPERATOR_ERROR_STEP',
|
|
486
|
+
element: TaxOperatorError
|
|
487
|
+
}
|
|
444
488
|
];
|
|
445
489
|
export var signInFeatureScreens = [
|
|
446
490
|
{
|
|
@@ -458,6 +502,10 @@ export var signInFeatureScreens = [
|
|
|
458
502
|
{
|
|
459
503
|
name: 'SIGIN_PASSWORD_STEP',
|
|
460
504
|
element: SignInPasswordPage
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
name: 'SIGIN_OPERATOR_ERROR_STEP',
|
|
508
|
+
element: SignInOperatorError
|
|
461
509
|
}
|
|
462
510
|
];
|
|
463
511
|
export var entityFeatureScreens = [
|
|
@@ -485,7 +533,11 @@ export var entityFeatureScreens = [
|
|
|
485
533
|
name: 'ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
486
534
|
element: EntitySuccessWithFlowPage
|
|
487
535
|
},
|
|
488
|
-
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
|
|
536
|
+
{ name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage },
|
|
537
|
+
{
|
|
538
|
+
name: 'ENTITY_OPERATOR_ERROR_STEP',
|
|
539
|
+
element: EntityOperatorError
|
|
540
|
+
}
|
|
489
541
|
];
|
|
490
542
|
export var brandFeatureScreens = [
|
|
491
543
|
{
|
|
@@ -516,7 +568,11 @@ export var brandFeatureScreens = [
|
|
|
516
568
|
name: 'BRAND_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
|
|
517
569
|
element: BrandSuccessWithFlowPage
|
|
518
570
|
},
|
|
519
|
-
{ name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage }
|
|
571
|
+
{ name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage },
|
|
572
|
+
{
|
|
573
|
+
name: 'BRAND_OPERATOR_ERROR_STEP',
|
|
574
|
+
element: BrandOperatorError
|
|
575
|
+
}
|
|
520
576
|
];
|
|
521
577
|
export var boardFeatureScreens = [
|
|
522
578
|
{
|
|
@@ -530,5 +586,9 @@ export var boardFeatureScreens = [
|
|
|
530
586
|
{
|
|
531
587
|
name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
|
|
532
588
|
element: BoardSuccessWithFlowPage
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: 'BOARD_OPERATOR_ERROR_STEP',
|
|
592
|
+
element: BoardOperatorError
|
|
533
593
|
}
|
|
534
594
|
];
|
|
@@ -51,7 +51,9 @@ var Individual = memo(function (_a) {
|
|
|
51
51
|
open: open,
|
|
52
52
|
mode: props.mode,
|
|
53
53
|
internalToken: verifyToken,
|
|
54
|
-
settingLoading: settingLoading
|
|
54
|
+
settingLoading: settingLoading,
|
|
55
|
+
operatorErrorScreenName: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
|
|
56
|
+
isValidOperator: data.isValidOperator
|
|
55
57
|
});
|
|
56
58
|
React.useEffect(function () {
|
|
57
59
|
sendPageView({
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -110,7 +110,9 @@ var Password = memo(function (_a) {
|
|
|
110
110
|
open: open,
|
|
111
111
|
mode: props.mode,
|
|
112
112
|
internalToken: verifyToken,
|
|
113
|
-
settingLoading: settingLoading
|
|
113
|
+
settingLoading: settingLoading,
|
|
114
|
+
isValidOperator: data.isValidOperator,
|
|
115
|
+
operatorErrorScreenName: 'PASSWORD_OPERATOR_ERROR_STEP'
|
|
114
116
|
});
|
|
115
117
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
116
118
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', loaderColor: loaderColor, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -10,10 +10,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { memo } from 'react';
|
|
13
|
+
import React, { memo } from 'react';
|
|
14
14
|
import { createRoot } from 'react-dom/client';
|
|
15
|
-
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
|
|
16
|
-
import { settingsSelector } from '../../app/settings';
|
|
15
|
+
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useAppDispatch } from '../../hooks';
|
|
16
|
+
import { handleCurrentActiveScreen, settingsSelector } from '../../app/settings';
|
|
17
17
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
18
18
|
import { store } from '../../app/store';
|
|
19
19
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
@@ -26,12 +26,21 @@ import { signInSelector } from '../app/signIn/signInStore';
|
|
|
26
26
|
import Background from '../shared/Background';
|
|
27
27
|
var SignIn = memo(function (props) {
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
29
|
+
var dispatch = useAppDispatch();
|
|
29
30
|
var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
|
|
30
31
|
var _b = useAppSelector(signInSelector), signInError = _b.error, loading = _b.loading;
|
|
31
32
|
useAppConfig(__assign({ navigation: SigIn_SCREENS_NAVIGATION }, props));
|
|
32
33
|
useErrorListener(signInError || error);
|
|
33
34
|
useStepStartedListener();
|
|
34
35
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
36
|
+
React.useEffect(function () {
|
|
37
|
+
if (settingLoading || !props.open)
|
|
38
|
+
return;
|
|
39
|
+
if (!data.isValidOperator) {
|
|
40
|
+
dispatch(handleCurrentActiveScreen('SIGIN_OPERATOR_ERROR_STEP'));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}, [data.isValidOperator, settingLoading]);
|
|
35
44
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: settingLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: signInFeatureScreens.map(function (_a, index) {
|
|
36
45
|
var Element = _a.element, name = _a.name;
|
|
37
46
|
var isActive = activeScreen.name === name;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|
|
@@ -56,7 +56,9 @@ var Tax = memo(function (_a) {
|
|
|
56
56
|
open: open,
|
|
57
57
|
mode: props.mode,
|
|
58
58
|
internalToken: verifyToken,
|
|
59
|
-
settingLoading: settingLoading
|
|
59
|
+
settingLoading: settingLoading,
|
|
60
|
+
operatorErrorScreenName: 'TAX_OPERATOR_ERROR_STEP',
|
|
61
|
+
isValidOperator: data.isValidOperator
|
|
60
62
|
});
|
|
61
63
|
var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
|
|
62
64
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import GenericError from '../../../shared/GenericError';
|
|
5
|
+
var OperatorError = function (_a) {
|
|
6
|
+
var t = useTranslation().t;
|
|
7
|
+
return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
|
|
8
|
+
};
|
|
9
|
+
export default React.memo(OperatorError);
|