@tap-payments/auth-jsconnect 2.8.42-test → 2.8.45-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 +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 +1 -1
|
@@ -8,9 +8,11 @@ interface IVerifyToken {
|
|
|
8
8
|
internalToken?: string;
|
|
9
9
|
open: boolean;
|
|
10
10
|
settingLoading: boolean;
|
|
11
|
+
isValidOperator: boolean;
|
|
11
12
|
navigation: ScreenStepNavigation[];
|
|
12
13
|
loadingScreenName: string;
|
|
14
|
+
operatorErrorScreenName: string;
|
|
13
15
|
mode?: 'popup' | 'page' | 'content';
|
|
14
16
|
}
|
|
15
|
-
export declare const useVerifyToken: ({ verify, internalToken, navigation, open, settingLoading, loadingScreenName, mode }: IVerifyToken) => void;
|
|
17
|
+
export declare const useVerifyToken: ({ verify, internalToken, navigation, open, settingLoading, loadingScreenName, mode, isValidOperator, operatorErrorScreenName }: IVerifyToken) => void;
|
|
16
18
|
export {};
|
|
@@ -3,7 +3,7 @@ import { getParameterByName } from '../utils';
|
|
|
3
3
|
import { useAppDispatch } from './useAppDispatch';
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
export var useVerifyToken = function (_a) {
|
|
6
|
-
var verify = _a.verify, internalToken = _a.internalToken, navigation = _a.navigation, open = _a.open, settingLoading = _a.settingLoading, loadingScreenName = _a.loadingScreenName, mode = _a.mode;
|
|
6
|
+
var verify = _a.verify, internalToken = _a.internalToken, navigation = _a.navigation, open = _a.open, settingLoading = _a.settingLoading, loadingScreenName = _a.loadingScreenName, mode = _a.mode, isValidOperator = _a.isValidOperator, operatorErrorScreenName = _a.operatorErrorScreenName;
|
|
7
7
|
var dispatch = useAppDispatch();
|
|
8
8
|
var verifyTokenFun = function () {
|
|
9
9
|
var token = internalToken ? internalToken : getParameterByName('token');
|
|
@@ -15,9 +15,14 @@ export var useVerifyToken = function (_a) {
|
|
|
15
15
|
dispatch(verify({ token: token, isInternally: !!internalToken }));
|
|
16
16
|
};
|
|
17
17
|
useEffect(function () {
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
if (settingLoading || !open)
|
|
19
|
+
return;
|
|
20
|
+
if (!isValidOperator) {
|
|
21
|
+
dispatch(handleCurrentActiveScreen(operatorErrorScreenName));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
verifyTokenFun();
|
|
25
|
+
}, [settingLoading, open, isValidOperator]);
|
|
21
26
|
useEffect(function () {
|
|
22
27
|
if (internalToken && open && mode !== 'content')
|
|
23
28
|
dispatch(handleCurrentActiveScreen(loadingScreenName));
|