@tap-payments/auth-jsconnect 2.8.42-test → 2.8.45-sandbox

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 (70) hide show
  1. package/build/constants/app.d.ts +1 -0
  2. package/build/constants/app.js +76 -3
  3. package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
  4. package/build/features/app/connectExpress/connectExpressStore.js +98 -47
  5. package/build/features/auth/Auth.js +5 -1
  6. package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
  7. package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
  8. package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
  9. package/build/features/auth/screens/OperatorError/index.js +2 -0
  10. package/build/features/bank/Bank.js +3 -1
  11. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
  12. package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
  13. package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
  14. package/build/features/bank/screens/OperatorError/index.js +2 -0
  15. package/build/features/board/Board.js +8 -4
  16. package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
  17. package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
  18. package/build/features/board/screens/OperatorError/index.d.ts +3 -0
  19. package/build/features/board/screens/OperatorError/index.js +2 -0
  20. package/build/features/brand/Brand.js +3 -1
  21. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
  22. package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
  23. package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
  24. package/build/features/brand/screens/OperatorError/index.js +2 -0
  25. package/build/features/business/Business.js +9 -4
  26. package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
  27. package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
  28. package/build/features/business/screens/OperatorError/index.d.ts +3 -0
  29. package/build/features/business/screens/OperatorError/index.js +2 -0
  30. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  31. package/build/features/connectExpress/ConnectExpress.js +22 -20
  32. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
  33. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
  34. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
  35. package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
  36. package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
  37. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
  38. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
  39. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
  40. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
  41. package/build/features/entity/Entity.js +3 -1
  42. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
  43. package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
  44. package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
  45. package/build/features/entity/screens/OperatorError/index.js +2 -0
  46. package/build/features/featuresScreens.js +67 -7
  47. package/build/features/individual/Individual.js +3 -1
  48. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
  49. package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
  50. package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
  51. package/build/features/individual/screens/OperatorError/index.js +2 -0
  52. package/build/features/password/Password.js +3 -1
  53. package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
  54. package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
  55. package/build/features/password/screens/OperatorError/index.d.ts +3 -0
  56. package/build/features/password/screens/OperatorError/index.js +2 -0
  57. package/build/features/signIn/SignIn.js +12 -3
  58. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
  59. package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
  60. package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
  61. package/build/features/signIn/screens/OperatorError/index.js +2 -0
  62. package/build/features/tax/Tax.js +3 -1
  63. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
  64. package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
  65. package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
  66. package/build/features/tax/screens/OperatorError/index.js +2 -0
  67. package/build/hooks/useVerifyToken.d.ts +3 -1
  68. package/build/hooks/useVerifyToken.js +9 -4
  69. package/build/utils/common.js +3 -3
  70. package/package.json +2 -2
@@ -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));
@@ -1,5 +1,5 @@
1
1
  import { axiosInstance } from '../api';
2
- import { ENDPOINT_PATHS, CONNECT_DEV_URL, CONNECT_PROD_URL } from '../constants';
2
+ import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
3
3
  export var sleep = function (milliseconds) {
4
4
  if (milliseconds === void 0) { milliseconds = 1000; }
5
5
  return new Promise(function (resolve) { return setTimeout(resolve, milliseconds); });
@@ -16,7 +16,7 @@ export var setBaseUrl = function (publicKey) {
16
16
  axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
17
17
  return;
18
18
  }
19
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
19
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
20
20
  };
21
21
  export var updateLocationUrlWithCountry = function (countryIso2) {
22
22
  var country = countryIso2.toLowerCase();
@@ -35,7 +35,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
35
35
  window.history.replaceState({}, '', newUrl);
36
36
  };
37
37
  export var openConnect = function (pk, countryCode) {
38
- var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
38
+ var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
39
39
  if (countryCode) {
40
40
  newUrl.pathname = "/".concat(countryCode.toLowerCase());
41
41
  }
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-sandbox",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -21,7 +21,7 @@
21
21
  "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
22
  "tsc:alias": "tsc-alias -p tsconfig.json",
23
23
  "ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
- "push": "npm publish --access public --tag test"
24
+ "push": "npm publish --access public --tag sandbox"
25
25
  },
26
26
  "keywords": [],
27
27
  "author": {