@tap-payments/auth-jsconnect 2.8.42-test → 2.8.44-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 (61) hide show
  1. package/build/constants/app.js +66 -0
  2. package/build/features/auth/Auth.js +5 -1
  3. package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
  4. package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
  5. package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
  6. package/build/features/auth/screens/OperatorError/index.js +2 -0
  7. package/build/features/bank/Bank.js +3 -1
  8. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
  9. package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
  10. package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
  11. package/build/features/bank/screens/OperatorError/index.js +2 -0
  12. package/build/features/board/Board.js +8 -4
  13. package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
  14. package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
  15. package/build/features/board/screens/OperatorError/index.d.ts +3 -0
  16. package/build/features/board/screens/OperatorError/index.js +2 -0
  17. package/build/features/brand/Brand.js +3 -1
  18. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
  19. package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
  20. package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
  21. package/build/features/brand/screens/OperatorError/index.js +2 -0
  22. package/build/features/business/Business.js +9 -4
  23. package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
  24. package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
  25. package/build/features/business/screens/OperatorError/index.d.ts +3 -0
  26. package/build/features/business/screens/OperatorError/index.js +2 -0
  27. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  28. package/build/features/connectExpress/ConnectExpress.js +22 -20
  29. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
  30. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
  31. package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
  32. package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
  33. package/build/features/entity/Entity.js +3 -1
  34. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
  35. package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
  36. package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
  37. package/build/features/entity/screens/OperatorError/index.js +2 -0
  38. package/build/features/featuresScreens.js +62 -7
  39. package/build/features/individual/Individual.js +3 -1
  40. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
  41. package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
  42. package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
  43. package/build/features/individual/screens/OperatorError/index.js +2 -0
  44. package/build/features/password/Password.js +3 -1
  45. package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
  46. package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
  47. package/build/features/password/screens/OperatorError/index.d.ts +3 -0
  48. package/build/features/password/screens/OperatorError/index.js +2 -0
  49. package/build/features/signIn/SignIn.js +12 -3
  50. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
  51. package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
  52. package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
  53. package/build/features/signIn/screens/OperatorError/index.js +2 -0
  54. package/build/features/tax/Tax.js +3 -1
  55. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
  56. package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
  57. package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
  58. package/build/features/tax/screens/OperatorError/index.js +2 -0
  59. package/build/hooks/useVerifyToken.d.ts +3 -1
  60. package/build/hooks/useVerifyToken.js +9 -4
  61. package/package.json +1 -1
@@ -112,6 +112,12 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
112
112
  prev: '',
113
113
  order: 1
114
114
  },
115
+ {
116
+ name: 'CONNECT_EXPRESS_OPERATOR_ERROR_STEP',
117
+ next: '',
118
+ prev: '',
119
+ order: 1
120
+ },
115
121
  {
116
122
  name: 'CONNECT_EXPRESS_VERIFY_PACI_STEP',
117
123
  next: [
@@ -250,6 +256,12 @@ export var AUTH_SCREENS_NAVIGATION = [
250
256
  prev: '',
251
257
  order: 1
252
258
  },
259
+ {
260
+ name: 'AUTH_OPERATOR_ERROR_STEP',
261
+ next: '',
262
+ prev: '',
263
+ order: 1
264
+ },
253
265
  {
254
266
  name: 'AUTH_OTP_STEP',
255
267
  next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_EMAIL_SENT_STEP', 'AUTH_MIGRATING_DATA_STEP'],
@@ -333,6 +345,12 @@ export var BUSINESS_SCREENS_NAVIGATION = [
333
345
  prev: '',
334
346
  order: 1
335
347
  },
348
+ {
349
+ name: 'BUSINESS_OPERATOR_ERROR_STEP',
350
+ next: '',
351
+ prev: '',
352
+ order: 1
353
+ },
336
354
  {
337
355
  name: 'BUSINESS_CIVIL_ID_STEP',
338
356
  next: 'BUSINESS_VERIFY_PACI_STEP',
@@ -431,6 +449,12 @@ export var INDIVIDUAL_SCREENS_NAVIGATION = [
431
449
  prev: '',
432
450
  order: 1
433
451
  },
452
+ {
453
+ name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
454
+ next: '',
455
+ prev: '',
456
+ order: 1
457
+ },
434
458
  {
435
459
  name: 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP',
436
460
  next: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
@@ -475,6 +499,12 @@ export var PASSWORD_SCREENS_NAVIGATION = [
475
499
  prev: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
476
500
  order: 1
477
501
  },
502
+ {
503
+ name: 'PASSWORD_OPERATOR_ERROR_STEP',
504
+ next: '',
505
+ prev: '',
506
+ order: 1
507
+ },
478
508
  {
479
509
  name: 'PASSWORD_CREATE_PASSWORD_STEP',
480
510
  next: ['PASSWORD_SUCCESS_STEP', 'PASSWORD_RESET_PASSWORD_OTP_STEP'],
@@ -519,6 +549,12 @@ export var BANK_SCREENS_NAVIGATION = [
519
549
  prev: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
520
550
  order: 1
521
551
  },
552
+ {
553
+ name: 'BANK_OPERATOR_ERROR_STEP',
554
+ next: '',
555
+ prev: '',
556
+ order: 1
557
+ },
522
558
  {
523
559
  name: 'BANK_BANK_DETAILS_STEP',
524
560
  next: 'BANK_DETAILS_SUCCESS_STEP',
@@ -551,6 +587,12 @@ export var BOARD_SCREENS_NAVIGATION = [
551
587
  prev: '',
552
588
  order: 1
553
589
  },
590
+ {
591
+ name: 'BOARD_OPERATOR_ERROR_STEP',
592
+ next: '',
593
+ prev: '',
594
+ order: 1
595
+ },
554
596
  {
555
597
  name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
556
598
  next: 'BOARD_RESET_PASSWORD_SUCCESS',
@@ -577,6 +619,12 @@ export var TAX_SCREENS_NAVIGATION = [
577
619
  prev: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
578
620
  order: 1
579
621
  },
622
+ {
623
+ name: 'TAX_OPERATOR_ERROR_STEP',
624
+ next: '',
625
+ prev: '',
626
+ order: 1
627
+ },
580
628
  {
581
629
  name: 'TAX_TAX_DETAILS_STEP',
582
630
  next: 'TAX_DETAILS_SUCCESS_STEP',
@@ -615,6 +663,12 @@ export var SigIn_SCREENS_NAVIGATION = [
615
663
  prev: 'SIGIN_MOBILE_STEP',
616
664
  order: 1
617
665
  },
666
+ {
667
+ name: 'SIGIN_OPERATOR_ERROR_STEP',
668
+ next: '',
669
+ prev: '',
670
+ order: 1
671
+ },
618
672
  {
619
673
  name: 'SIGIN_PASSWORD_STEP',
620
674
  next: 'SIGIN_OTP_STEP',
@@ -641,6 +695,12 @@ export var ENTITY_SCREENS_NAVIGATION = [
641
695
  prev: '',
642
696
  order: 1
643
697
  },
698
+ {
699
+ name: 'ENTITY_OPERATOR_ERROR_STEP',
700
+ next: '',
701
+ prev: '',
702
+ order: 1
703
+ },
644
704
  {
645
705
  name: 'ENTITY_NAME_STEP',
646
706
  next: 'ENTITY_CAPITAL_STEP',
@@ -685,6 +745,12 @@ export var BRAND_SCREENS_NAVIGATION = [
685
745
  prev: 'BRAND_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
686
746
  order: 1
687
747
  },
748
+ {
749
+ name: 'BRAND_OPERATOR_ERROR_STEP',
750
+ next: '',
751
+ prev: '',
752
+ order: 1
753
+ },
688
754
  {
689
755
  name: 'BRAND_INFO_STEP',
690
756
  next: 'BRAND_SEGMENT_INFO_STEP',
@@ -100,8 +100,12 @@ var Auth = memo(function (_a) {
100
100
  var isOtherThanKWOrSACountry = React.useMemo(function () { var _a; return isOtherThanKWOrSA((_a = settingData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2); }, [settingData.businessCountry]);
101
101
  React.useEffect(function () {
102
102
  var _a, _b;
103
- if (settingLoading || !props.open || !settingData.isValidOperator)
103
+ if (settingLoading || !props.open)
104
104
  return;
105
+ if (!settingData.isValidOperator) {
106
+ dispatch(handleCurrentActiveScreen('AUTH_OPERATOR_ERROR_STEP'));
107
+ return;
108
+ }
105
109
  if (leadId) {
106
110
  dispatch(retrieveLeadIdentityByIdAsync(leadId));
107
111
  return;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -56,7 +56,9 @@ var Bank = memo(function (_a) {
56
56
  open: open,
57
57
  mode: props.mode,
58
58
  internalToken: verifyToken,
59
- settingLoading: settingLoading
59
+ settingLoading: settingLoading,
60
+ operatorErrorScreenName: 'BANK_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, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, loaderColor: loaderColor, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: bankFeatureScreens.map(function (_a, index) {
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -51,11 +51,15 @@ var Board = memo(function (_a) {
51
51
  });
52
52
  }, []);
53
53
  React.useEffect(function () {
54
- if (data.isValidOperator && props.open && !settingLoading) {
55
- dispatch(createVerifyTokenBy(boardId));
56
- if (props.mode === 'content')
57
- dispatch(handleCurrentActiveScreen('BOARD_SUCCESS_FLOWS_BUTTONS_STEP'));
54
+ if (settingLoading || !props.open)
55
+ return;
56
+ if (!data.isValidOperator) {
57
+ dispatch(handleCurrentActiveScreen('BOARD_OPERATOR_ERROR_STEP'));
58
+ return;
58
59
  }
60
+ dispatch(createVerifyTokenBy(boardId));
61
+ if (props.mode === 'content')
62
+ dispatch(handleCurrentActiveScreen('BOARD_SUCCESS_FLOWS_BUTTONS_STEP'));
59
63
  }, [data.isValidOperator, settingLoading]);
60
64
  var initialLoading = settingLoading || customLoading;
61
65
  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', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: !isTapDomain(props.merchantDomain), loaderColor: loaderColor, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: !isTapDomain(props.merchantDomain) }, { children: boardFeatureScreens.map(function (_a, index) {
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -56,7 +56,9 @@ var Brand = memo(function (_a) {
56
56
  open: open,
57
57
  mode: props.mode,
58
58
  internalToken: verifyToken,
59
- settingLoading: settingLoading
59
+ settingLoading: settingLoading,
60
+ operatorErrorScreenName: 'BRAND_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, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, loaderColor: loaderColor, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: brandFeatureScreens.map(function (_a, index) {
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { memo, useEffect } from 'react';
14
14
  import { createRoot } from 'react-dom/client';
15
15
  import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
16
- import { handleLanguage, settingsSelector } from '../../app/settings';
16
+ import { handleCurrentActiveScreen, handleLanguage, settingsSelector } from '../../app/settings';
17
17
  import { FeatureContainer } from '../shared/Containers';
18
18
  import { businessSelector, verifyLeadToken } from '../app/business/businessStore';
19
19
  import AnimationFlow from '../../components/AnimationFlow';
@@ -46,9 +46,14 @@ var Business = memo(function (props) {
46
46
  });
47
47
  };
48
48
  useEffect(function () {
49
- if (!settingLoading && open)
50
- verifyToken();
51
- }, [settingLoading]);
49
+ if (settingLoading || !open)
50
+ return;
51
+ if (!data.isValidOperator) {
52
+ dispatch(handleCurrentActiveScreen('BUSINESS_OPERATOR_ERROR_STEP'));
53
+ return;
54
+ }
55
+ verifyToken();
56
+ }, [data.isValidOperator, settingLoading]);
52
57
  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, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, dialogEdgeFormat: data.appConfig.dialogEdgeFormat }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: businessFeatureScreens.map(function (_a, index) {
53
58
  var Element = _a.element, name = _a.name;
54
59
  var isActive = activeScreen.name === name;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
- import GenericError from '../../../../features/shared/GenericError';
4
+ import GenericError from '../../../shared/GenericError';
5
5
  var OperatorError = function (_a) {
6
6
  var t = useTranslation().t;
7
7
  return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
@@ -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 && props.open) {
111
- if (configToken && connectData.leadId) {
112
- dispatch(retrieveLeadIdentityByIdAsync(connectData.leadId));
113
- return;
114
- }
115
- if (leadId) {
116
- if (props.scope !== 'auth') {
117
- dispatch(setIsLeadIdPassed(true));
118
- }
119
- dispatch(setLeadId(leadId));
120
- dispatch(retrieveLeadIdentityByIdAsync(leadId));
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) {
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -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,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -27,6 +27,7 @@ import ConnectExpressAccountAlreadyCreatedScreen from './connectExpress/screens/
27
27
  import ConnectExpressAuthenticationListScreen from './connectExpress/screens/AuthenticationList';
28
28
  import ConnectExpressAuthMerchantScreen from './connectExpress/screens/AuthMerchant';
29
29
  import ConnectExpressAuthAccountCreatedLoaderScreen from './connectExpress/screens/AccountCreatedLoader';
30
+ import ConnectExpressOperatorError from './connectExpress/screens/OperatorError';
30
31
  import AuthBusinessCountry from './auth/screens/BusinessCountry/BusinessCountry';
31
32
  import AuthSwitchScreen from './auth/screens/AuthSwitch';
32
33
  import AuthMobileScreen from './auth/screens/Mobile';
@@ -44,6 +45,7 @@ import AuthMerchantScreen from './auth/screens/AuthMerchant';
44
45
  import AuthAccountCreatedLoaderScreen from './auth/screens/AccountCreatedLoader';
45
46
  import AuthEmailSentScreen from './auth/screens/EmailSent';
46
47
  import AuthMigratingDataScreen from './auth/screens/MigratingData';
48
+ import AuthOperatorError from './auth/screens/OperatorError';
47
49
  import CustomersPage from './business/screens/Customers';
48
50
  import IDBODPage from './business/screens/IDBOD';
49
51
  import BusinessVerifyPage from './business/screens/Verify';
@@ -56,6 +58,7 @@ import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
56
58
  import BusCivilIDscreen from './business/screens/CivilID';
57
59
  import BusVerifyPACIScreen from './business/screens/VerifyPACI';
58
60
  import BrandVerifyScreen from './business/screens/BrandDetails';
61
+ import BusinessOperatorError from './business/screens/OperatorError';
59
62
  import PasswordVerifyPage from './password/screens/Verify';
60
63
  import CreatePasswordPage from './password/screens/CreatePassword';
61
64
  import PasswordDataLoadingPage from './password/screens/PrepareDataLoading';
@@ -63,6 +66,7 @@ import PasswordOTPPage from './password/screens/OTP';
63
66
  import SuccessPasswordPage from './password/screens/Success';
64
67
  import PasswordSuccessWithFlowPage from './password/screens/SuccessWithFlowButtons';
65
68
  import PasswordResetPasswordSuccessPage from './password/screens/ResetPasswordSuccess';
69
+ import PasswordOperatorError from './password/screens/OperatorError';
66
70
  import IndividualVerifyPage from './individual/screens/Verify';
67
71
  import IndividualPhoneInfoPage from './individual/screens/IndividualPhoneInfo';
68
72
  import IndividualListPage from './individual/screens/IndividualList';
@@ -72,22 +76,26 @@ import SuccessOwnerPage from './individual/screens/Success';
72
76
  import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
73
77
  import IndividualResetPasswordSuccessPage from './individual/screens/ResetPasswordSuccess';
74
78
  import IndividualDataLoadingPage from './individual/screens/PrepareDataLoading';
79
+ import IndividualOperatorError from './individual/screens/OperatorError';
75
80
  import BankVerifyPage from './bank/screens/Verify';
76
81
  import BankDetailsPage from './bank/screens/BankDetails';
77
82
  import BankSuccessPage from './bank/screens/Success';
78
83
  import BankSuccessWithFlowPage from './bank/screens/SuccessWithFlowButtons';
79
84
  import BankResetPasswordSuccessPage from './bank/screens/ResetPasswordSuccess';
80
85
  import BankDataLoadingPage from './bank/screens/PrepareDataLoading';
86
+ import BankOperatorError from './bank/screens/OperatorError';
81
87
  import TaxVerifyPage from './tax/screens/Verify';
82
88
  import TaxDetailsPage from './tax/screens/TaxDetails';
83
89
  import TaxSuccessPage from './tax/screens/Success';
84
90
  import TaxSuccessWithFlowPage from './tax/screens/SuccessWithFlowButtons';
85
91
  import TaxResetPasswordSuccessPage from './tax/screens/ResetPasswordSuccess';
86
92
  import TaxDataLoadingPage from './tax/screens/PrepareDataLoading';
93
+ import TaxOperatorError from './tax/screens/OperatorError';
87
94
  import SignInMobilePage from './signIn/screens/Mobile';
88
95
  import SignInEmailPage from './signIn/screens/Email';
89
96
  import SignInOTPPage from './signIn/screens/OTP';
90
97
  import SignInPasswordPage from './signIn/screens/Password';
98
+ import SignInOperatorError from './signIn/screens/OperatorError';
91
99
  import EntityVerifyPage from './entity/screens/Verify';
92
100
  import EntityNamePage from './entity/screens/EntityName';
93
101
  import EntityCapitalPage from './entity/screens/EntityCapital';
@@ -95,6 +103,7 @@ import EntitySuccessPage from './entity/screens/Success';
95
103
  import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
96
104
  import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
97
105
  import EntityDataLoadingPage from './entity/screens/PrepareDataLoading';
106
+ import EntityOperatorError from './entity/screens/OperatorError';
98
107
  import BrandVerifyPage from './brand/screens/Verify';
99
108
  import BrandInfoPage from './brand/screens/BrandInfo';
100
109
  import BrandSegmentPage from './brand/screens/BrandSegmentInfo';
@@ -103,9 +112,11 @@ import BrandSuccessPage from './brand/screens/Success';
103
112
  import BrandSuccessWithFlowPage from './brand/screens/SuccessWithFlowButtons';
104
113
  import BrandResetPasswordSuccessPage from './brand/screens/ResetPasswordSuccess';
105
114
  import BrandDataLoadingPage from './brand/screens/PrepareDataLoading';
115
+ import BrandOperatorError from './brand/screens/OperatorError';
106
116
  import BoardVerifyPage from './board/screens/Verify';
107
117
  import BoardSuccessWithFlowPage from './board/screens/SuccessWithFlowButtons';
108
118
  import BoardResetPasswordSuccessPage from './board/screens/ResetPasswordSuccess';
119
+ import BoardOperatorError from './board/screens/OperatorError';
109
120
  export var connectFeatureScreens = [
110
121
  {
111
122
  name: 'CONNECT_BUSINESS_COUNTRY_STEP',
@@ -224,6 +235,10 @@ export var connectExpressFeatureScreens = [
224
235
  {
225
236
  name: 'CONNECT_EXPRESS_AUTH_ACCOUNT_CREATED_STEP',
226
237
  element: ConnectExpressAuthAccountCreatedLoaderScreen
238
+ },
239
+ {
240
+ name: 'CONNECT_EXPRESS_OPERATOR_ERROR_STEP',
241
+ element: ConnectExpressOperatorError
227
242
  }
228
243
  ];
229
244
  export var authFeatureScreens = [
@@ -294,6 +309,10 @@ export var authFeatureScreens = [
294
309
  {
295
310
  name: 'AUTH_MIGRATING_DATA_STEP',
296
311
  element: AuthMigratingDataScreen
312
+ },
313
+ {
314
+ name: 'AUTH_OPERATOR_ERROR_STEP',
315
+ element: AuthOperatorError
297
316
  }
298
317
  ];
299
318
  export var businessFeatureScreens = [
@@ -332,7 +351,11 @@ export var businessFeatureScreens = [
332
351
  { name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
333
352
  { name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
334
353
  { name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage },
335
- { name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen }
354
+ { name: 'BUSINESS_VERIFY_BRAND_INFO', element: BrandVerifyScreen },
355
+ {
356
+ name: 'BUSINESS_OPERATOR_ERROR_STEP',
357
+ element: BusinessOperatorError
358
+ }
336
359
  ];
337
360
  export var passwordFeatureScreens = [
338
361
  {
@@ -359,7 +382,11 @@ export var passwordFeatureScreens = [
359
382
  name: 'PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
360
383
  element: PasswordSuccessWithFlowPage
361
384
  },
362
- { name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage }
385
+ { name: 'PASSWORD_RESET_PASSWORD_SUCCESS', element: PasswordResetPasswordSuccessPage },
386
+ {
387
+ name: 'PASSWORD_OPERATOR_ERROR_STEP',
388
+ element: PasswordOperatorError
389
+ }
363
390
  ];
364
391
  export var individualFeatureScreens = [
365
392
  {
@@ -394,7 +421,11 @@ export var individualFeatureScreens = [
394
421
  name: 'INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
395
422
  element: IndividualSuccessWithFlowPage
396
423
  },
397
- { name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage }
424
+ { name: 'INDIVIDUAL_RESET_PASSWORD_SUCCESS', element: IndividualResetPasswordSuccessPage },
425
+ {
426
+ name: 'INDIVIDUAL_OPERATOR_ERROR_STEP',
427
+ element: IndividualOperatorError
428
+ }
398
429
  ];
399
430
  export var bankFeatureScreens = [
400
431
  {
@@ -417,7 +448,11 @@ export var bankFeatureScreens = [
417
448
  name: 'BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
418
449
  element: BankSuccessWithFlowPage
419
450
  },
420
- { name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage }
451
+ { name: 'BANK_RESET_PASSWORD_SUCCESS', element: BankResetPasswordSuccessPage },
452
+ {
453
+ name: 'BANK_OPERATOR_ERROR_STEP',
454
+ element: BankOperatorError
455
+ }
421
456
  ];
422
457
  export var taxFeatureScreens = [
423
458
  {
@@ -440,7 +475,11 @@ export var taxFeatureScreens = [
440
475
  name: 'TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
441
476
  element: TaxSuccessWithFlowPage
442
477
  },
443
- { name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage }
478
+ { name: 'TAX_RESET_PASSWORD_SUCCESS', element: TaxResetPasswordSuccessPage },
479
+ {
480
+ name: 'TAX_OPERATOR_ERROR_STEP',
481
+ element: TaxOperatorError
482
+ }
444
483
  ];
445
484
  export var signInFeatureScreens = [
446
485
  {
@@ -458,6 +497,10 @@ export var signInFeatureScreens = [
458
497
  {
459
498
  name: 'SIGIN_PASSWORD_STEP',
460
499
  element: SignInPasswordPage
500
+ },
501
+ {
502
+ name: 'SIGIN_OPERATOR_ERROR_STEP',
503
+ element: SignInOperatorError
461
504
  }
462
505
  ];
463
506
  export var entityFeatureScreens = [
@@ -485,7 +528,11 @@ export var entityFeatureScreens = [
485
528
  name: 'ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
486
529
  element: EntitySuccessWithFlowPage
487
530
  },
488
- { name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
531
+ { name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage },
532
+ {
533
+ name: 'ENTITY_OPERATOR_ERROR_STEP',
534
+ element: EntityOperatorError
535
+ }
489
536
  ];
490
537
  export var brandFeatureScreens = [
491
538
  {
@@ -516,7 +563,11 @@ export var brandFeatureScreens = [
516
563
  name: 'BRAND_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
517
564
  element: BrandSuccessWithFlowPage
518
565
  },
519
- { name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage }
566
+ { name: 'BRAND_RESET_PASSWORD_SUCCESS', element: BrandResetPasswordSuccessPage },
567
+ {
568
+ name: 'BRAND_OPERATOR_ERROR_STEP',
569
+ element: BrandOperatorError
570
+ }
520
571
  ];
521
572
  export var boardFeatureScreens = [
522
573
  {
@@ -530,5 +581,9 @@ export var boardFeatureScreens = [
530
581
  {
531
582
  name: 'BOARD_SUCCESS_FLOWS_BUTTONS_STEP',
532
583
  element: BoardSuccessWithFlowPage
584
+ },
585
+ {
586
+ name: 'BOARD_OPERATOR_ERROR_STEP',
587
+ element: BoardOperatorError
533
588
  }
534
589
  ];
@@ -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,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default 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,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default 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,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default 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,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -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.44-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",