@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.
Files changed (68) hide show
  1. package/build/constants/app.js +75 -3
  2. package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
  3. package/build/features/app/connectExpress/connectExpressStore.js +98 -47
  4. package/build/features/auth/Auth.js +5 -1
  5. package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
  6. package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
  7. package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
  8. package/build/features/auth/screens/OperatorError/index.js +2 -0
  9. package/build/features/bank/Bank.js +3 -1
  10. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
  11. package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
  12. package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
  13. package/build/features/bank/screens/OperatorError/index.js +2 -0
  14. package/build/features/board/Board.js +8 -4
  15. package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
  16. package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
  17. package/build/features/board/screens/OperatorError/index.d.ts +3 -0
  18. package/build/features/board/screens/OperatorError/index.js +2 -0
  19. package/build/features/brand/Brand.js +3 -1
  20. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
  21. package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
  22. package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
  23. package/build/features/brand/screens/OperatorError/index.js +2 -0
  24. package/build/features/business/Business.js +9 -4
  25. package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
  26. package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
  27. package/build/features/business/screens/OperatorError/index.d.ts +3 -0
  28. package/build/features/business/screens/OperatorError/index.js +2 -0
  29. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  30. package/build/features/connectExpress/ConnectExpress.js +22 -20
  31. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
  32. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
  33. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
  34. package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
  35. package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
  36. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
  37. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
  38. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
  39. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
  40. package/build/features/entity/Entity.js +3 -1
  41. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
  42. package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
  43. package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
  44. package/build/features/entity/screens/OperatorError/index.js +2 -0
  45. package/build/features/featuresScreens.js +67 -7
  46. package/build/features/individual/Individual.js +3 -1
  47. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
  48. package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
  49. package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
  50. package/build/features/individual/screens/OperatorError/index.js +2 -0
  51. package/build/features/password/Password.js +3 -1
  52. package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
  53. package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
  54. package/build/features/password/screens/OperatorError/index.d.ts +3 -0
  55. package/build/features/password/screens/OperatorError/index.js +2 -0
  56. package/build/features/signIn/SignIn.js +12 -3
  57. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
  58. package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
  59. package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
  60. package/build/features/signIn/screens/OperatorError/index.js +2 -0
  61. package/build/features/tax/Tax.js +3 -1
  62. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
  63. package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
  64. package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
  65. package/build/features/tax/screens/OperatorError/index.js +2 -0
  66. package/build/hooks/useVerifyToken.d.ts +3 -1
  67. package/build/hooks/useVerifyToken.js +9 -4
  68. 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 (!settingLoading && open)
19
- verifyTokenFun();
20
- }, [settingLoading, open]);
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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.8.42-test",
3
+ "version": "2.8.45-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",