@tap-payments/auth-jsconnect 2.6.41-test → 2.6.46-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 (28) hide show
  1. package/build/api/availabilityServices.d.ts +1 -0
  2. package/build/app/settings.js +18 -12
  3. package/build/assets/locales/ar.json +2 -1
  4. package/build/assets/locales/en.json +2 -1
  5. package/build/constants/app.js +6 -0
  6. package/build/features/app/board/boardStore.d.ts +4 -1
  7. package/build/features/app/board/boardStore.js +30 -16
  8. package/build/features/app/connect/connectStore.js +10 -7
  9. package/build/features/app/connectExpress/connectExpressStore.js +8 -5
  10. package/build/features/app/individual/individualStore.js +8 -5
  11. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  12. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -2
  13. package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
  14. package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
  15. package/build/features/connect/Connect.js +4 -0
  16. package/build/features/connect/screens/OperatorError/OperatorError.d.ts +5 -0
  17. package/build/features/connect/screens/OperatorError/OperatorError.js +9 -0
  18. package/build/features/connect/screens/OperatorError/index.d.ts +3 -0
  19. package/build/features/connect/screens/OperatorError/index.js +2 -0
  20. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
  21. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
  22. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +2 -2
  23. package/build/features/featuresScreens.js +5 -0
  24. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
  25. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
  26. package/build/features/shared/Address/CountryList.d.ts +1 -1
  27. package/build/features/shared/Address/InputSelect.d.ts +1 -1
  28. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  export type CheckEmailBody = {
3
3
  email: string | null;
4
+ country: string;
4
5
  encryption_contract: Array<string>;
5
6
  };
6
7
  export type CheckBrandBody = {
@@ -146,7 +146,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
146
146
  });
147
147
  }); });
148
148
  export var onCloseComplete = createAsyncThunk('settings/onCloseComplete', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
149
- var settings, _a, appConfig, authId, postURL, redirectUrl, bi, merchantId, brandId, entityId, body, data, urlQueryStart;
149
+ var settings, _a, appConfig, authId, postURL, redirectUrl, bi, merchantId, brandId, entityId, body, data, urlQueryStart, newUrl;
150
150
  var _b, _c;
151
151
  return __generator(this, function (_d) {
152
152
  switch (_d.label) {
@@ -156,9 +156,10 @@ export var onCloseComplete = createAsyncThunk('settings/onCloseComplete', functi
156
156
  postURL = appConfig.postURL, redirectUrl = appConfig.redirectUrl;
157
157
  bi = settings.data.deviceInfo.browser.browser_id;
158
158
  merchantId = params.merchantId, brandId = params.brandId, entityId = params.entityId;
159
+ if (!authId) return [3, 2];
159
160
  body = {
160
161
  post_url: postURL || '',
161
- authentication_id: authId || '',
162
+ authentication_id: authId,
162
163
  bi: bi,
163
164
  brand_id: brandId || '',
164
165
  merchant_id: merchantId || '',
@@ -168,17 +169,22 @@ export var onCloseComplete = createAsyncThunk('settings/onCloseComplete', functi
168
169
  case 1:
169
170
  data = _d.sent();
170
171
  (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, data);
171
- if (authId) {
172
- if (settings.data.appConfig.mode === 'popup') {
173
- settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
174
- thunkApi.dispatch(handleOpen(false));
175
- return [2];
176
- }
177
- if (redirectUrl) {
178
- urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
179
- window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
180
- }
172
+ if (settings.data.appConfig.mode === 'popup') {
173
+ settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
174
+ thunkApi.dispatch(handleOpen(false));
175
+ return [2];
181
176
  }
177
+ if (redirectUrl) {
178
+ urlQueryStart = redirectUrl.includes('?') ? '&' : '?';
179
+ window.open("".concat(redirectUrl).concat(urlQueryStart, "authentication_id=").concat(authId, "&bi=").concat(bi), '_self');
180
+ }
181
+ _d.label = 2;
182
+ case 2:
183
+ if (!redirectUrl)
184
+ return [2];
185
+ newUrl = new URL(redirectUrl);
186
+ newUrl.searchParams.append('action', 'close');
187
+ window.open("".concat(newUrl), '_self', '_blank');
182
188
  return [2];
183
189
  }
184
190
  });
@@ -430,5 +430,6 @@
430
430
  "select_terminal_placeholder": "الرجاء تحديد محطة طرفية",
431
431
  "close_and_complete_later": "اغلق الان و اكمل لاحقا",
432
432
  "country_list_title": "الرجاء تحديد بلدك",
433
- "Choose_any_country": "بحث عن البلد ..."
433
+ "Choose_any_country": "بحث عن البلد ...",
434
+ "operator_is_invalid": "المشغل غير مصرح له"
434
435
  }
@@ -460,5 +460,6 @@
460
460
  "select_terminal_placeholder": "Please select a terminal",
461
461
  "close_and_complete_later": "Close and Complete Later",
462
462
  "country_list_title": "Please select your country",
463
- "choose_any_country": "Search Country..."
463
+ "choose_any_country": "Search Country...",
464
+ "operator_is_invalid": "Operator is invalid"
464
465
  }
@@ -42,6 +42,12 @@ export var CONNECT_SCREENS_NAVIGATION = [
42
42
  prev: '',
43
43
  order: 1
44
44
  },
45
+ {
46
+ name: 'CONNECT_OPERATOR_ERROR_STEP',
47
+ next: '',
48
+ prev: '',
49
+ order: 1
50
+ },
45
51
  {
46
52
  name: 'CONNECT_VERIFY_PACI_STEP',
47
53
  next: 'CONNECT_INDIVIDUAL_STEP',
@@ -37,7 +37,10 @@ export declare const verifyBoardLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
37
37
  }>;
38
38
  export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
39
39
  data: any;
40
- }, string, {
40
+ }, {
41
+ boardId: string;
42
+ boardInfoId: string;
43
+ }, {
41
44
  state?: unknown;
42
45
  dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
43
46
  extra?: unknown;
@@ -51,7 +51,7 @@ import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
53
53
  import { BOARD_STEP_STEPS } from '../../../constants';
54
- import { sleep } from '../../../utils';
54
+ import { retrieveIndividualData, sleep } from '../../../utils';
55
55
  export var createVerifyTokenBy = createAsyncThunk('board/createVerifyTokenByBoardId', function (boardId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
56
56
  var settings, data, step_name;
57
57
  var _a, _b;
@@ -67,7 +67,7 @@ export var createVerifyTokenBy = createAsyncThunk('board/createVerifyTokenByBoar
67
67
  sleep(0).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen('BOARD_VERIFY_STEP')); });
68
68
  return [2, __assign({}, data)];
69
69
  }
70
- return [4, thunkApi.dispatch(retrieveBoardDetails(data.id))];
70
+ return [4, thunkApi.dispatch(retrieveBoardDetails({ boardId: data.id, boardInfoId: data.board_info_id }))];
71
71
  case 2:
72
72
  _c.sent();
73
73
  (_b = (_a = settings.data.appConfig).onFlowCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, { boardId: data.id, boardInfoId: data.board_info_id });
@@ -111,7 +111,7 @@ export var verifyBoardLeadOTP = createAsyncThunk('board/verifyBoardLeadOTP', fun
111
111
  data = (_g.sent()).data;
112
112
  if (data.errors)
113
113
  throw new Error(data.errors[0].description);
114
- return [4, thunkApi.dispatch(retrieveBoardDetails(data.id))];
114
+ return [4, thunkApi.dispatch(retrieveBoardDetails({ boardId: data.id, boardInfoId: data.board_info_id }))];
115
115
  case 2:
116
116
  _g.sent();
117
117
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
@@ -121,20 +121,34 @@ export var verifyBoardLeadOTP = createAsyncThunk('board/verifyBoardLeadOTP', fun
121
121
  }
122
122
  });
123
123
  }); });
124
- export var retrieveBoardDetails = createAsyncThunk('board/retrieveBoardDetails', function (boardId) { return __awaiter(void 0, void 0, void 0, function () {
125
- var _a, boardInfoData, data;
126
- var _b, _c;
127
- return __generator(this, function (_d) {
128
- switch (_d.label) {
129
- case 0: return [4, Promise.all([API.boardService.retrieveBoardInfoStatus(boardId), API.boardService.retrieveBoardDetails(boardId)])];
130
- case 1:
131
- _a = _d.sent(), boardInfoData = _a[0], data = _a[1];
132
- return [2, {
133
- data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.names, business: data === null || data === void 0 ? void 0 : data.business, individuals: data === null || data === void 0 ? void 0 : data.individuals, contact: (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.contact, flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] })
134
- }];
135
- }
124
+ export var retrieveBoardDetails = createAsyncThunk('board/retrieveBoardDetails', function (_a) {
125
+ var boardId = _a.boardId, boardInfoId = _a.boardInfoId;
126
+ return __awaiter(void 0, void 0, void 0, function () {
127
+ var boardInfoData, _b, boardInfoStatusData, boardData, _c, id, type, serviceCallBack, _d, boardRes, individualRes;
128
+ var _e;
129
+ return __generator(this, function (_f) {
130
+ switch (_f.label) {
131
+ case 0: return [4, API.boardService.retrieveBoardInfo({ id: boardId, infoId: boardInfoId })];
132
+ case 1:
133
+ boardInfoData = _f.sent();
134
+ return [4, Promise.all([
135
+ API.boardService.retrieveBoardInfoStatus(boardId),
136
+ API.boardService.retrieveBoardDetails(boardId)
137
+ ])];
138
+ case 2:
139
+ _b = _f.sent(), boardInfoStatusData = _b[0], boardData = _b[1];
140
+ _c = ((_e = boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification) === null || _e === void 0 ? void 0 : _e.recipient) || {}, id = _c.id, type = _c.type;
141
+ serviceCallBack = function () { return API.individualService.retrieveIndividual(id, type); };
142
+ return [4, retrieveIndividualData(type, boardData, serviceCallBack)];
143
+ case 3:
144
+ _d = _f.sent(), boardRes = _d.boardRes, individualRes = _d.individualRes;
145
+ return [2, {
146
+ data: __assign(__assign({}, boardRes), { user: individualRes, brand: boardRes === null || boardRes === void 0 ? void 0 : boardRes.brand, bank_account: boardRes === null || boardRes === void 0 ? void 0 : boardRes.bank_account, entity: boardRes === null || boardRes === void 0 ? void 0 : boardRes.entity, merchant: boardRes === null || boardRes === void 0 ? void 0 : boardRes.merchant, name: individualRes === null || individualRes === void 0 ? void 0 : individualRes.names, business: boardRes === null || boardRes === void 0 ? void 0 : boardRes.business, individuals: boardRes === null || boardRes === void 0 ? void 0 : boardRes.individuals, contact: individualRes === null || individualRes === void 0 ? void 0 : individualRes.contact, flows: (boardInfoStatusData === null || boardInfoStatusData === void 0 ? void 0 : boardInfoStatusData.info) || [] })
147
+ }];
148
+ }
149
+ });
136
150
  });
137
- }); });
151
+ });
138
152
  var initialState = {
139
153
  error: null,
140
154
  loading: false,
@@ -604,20 +604,23 @@ export var updateLeadBrandSegment = createAsyncThunk('updateLeadBrandSegment', f
604
604
  }
605
605
  });
606
606
  }); });
607
- export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a) {
607
+ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
608
608
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
609
609
  return __awaiter(void 0, void 0, void 0, function () {
610
- var requestBody, data;
611
- return __generator(this, function (_b) {
612
- switch (_b.label) {
610
+ var connect, requestBody, data;
611
+ var _b, _c;
612
+ return __generator(this, function (_d) {
613
+ switch (_d.label) {
613
614
  case 0:
615
+ connect = thunkApi.getState().connect;
614
616
  requestBody = {
615
617
  email: email,
618
+ country: (_c = (_b = connect.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.leadData) === null || _c === void 0 ? void 0 : _c.country_code,
616
619
  encryption_contract: ['email']
617
620
  };
618
621
  return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
619
622
  case 1:
620
- data = (_b.sent()).data;
623
+ data = (_d.sent()).data;
621
624
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
622
625
  if (!data.errors)
623
626
  return [2, { response: data, formData: email }];
@@ -847,7 +850,7 @@ export var connectSlice = createSlice({
847
850
  channel_list: channel_list,
848
851
  brandData: brand
849
852
  };
850
- state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact });
853
+ state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact, leadData: leadResponse });
851
854
  })
852
855
  .addCase(verifyPACI.rejected, function (state, action) {
853
856
  state.loading = false;
@@ -890,7 +893,7 @@ export var connectSlice = createSlice({
890
893
  channel_list: channel_list,
891
894
  brandData: brand
892
895
  };
893
- state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact });
896
+ state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact, leadData: leadResponse });
894
897
  })
895
898
  .addCase(verifyAuth.pending, function (state) {
896
899
  state.loading = true;
@@ -782,20 +782,23 @@ export var verifyPaciOtpLeadIdentityAsync = createAsyncThunk('connectExpress/ver
782
782
  }
783
783
  });
784
784
  }); });
785
- export var checkEmailAvailabilityAsync = createAsyncThunk('connectExpress/CheckEmailAvailabilityAsync', function (_a) {
785
+ export var checkEmailAvailabilityAsync = createAsyncThunk('connectExpress/CheckEmailAvailabilityAsync', function (_a, thunkApi) {
786
786
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
787
787
  return __awaiter(void 0, void 0, void 0, function () {
788
- var requestBody, data;
789
- return __generator(this, function (_b) {
790
- switch (_b.label) {
788
+ var connectExpress, requestBody, data;
789
+ var _b, _c;
790
+ return __generator(this, function (_d) {
791
+ switch (_d.label) {
791
792
  case 0:
793
+ connectExpress = thunkApi.getState().connectExpress;
792
794
  requestBody = {
793
795
  email: email,
796
+ country: (_c = (_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) === null || _c === void 0 ? void 0 : _c.country_code,
794
797
  encryption_contract: ['email']
795
798
  };
796
799
  return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
797
800
  case 1:
798
- data = (_b.sent()).data;
801
+ data = (_d.sent()).data;
799
802
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
800
803
  if (!data.errors)
801
804
  return [2, { response: data, formData: email }];
@@ -763,20 +763,23 @@ export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', funct
763
763
  });
764
764
  });
765
765
  });
766
- export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a) {
766
+ export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
767
767
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
768
768
  return __awaiter(void 0, void 0, void 0, function () {
769
- var requestBody, data;
770
- return __generator(this, function (_b) {
771
- switch (_b.label) {
769
+ var settings, requestBody, data;
770
+ var _b;
771
+ return __generator(this, function (_c) {
772
+ switch (_c.label) {
772
773
  case 0:
774
+ settings = thunkApi.getState().settings;
773
775
  requestBody = {
774
776
  email: email,
777
+ country: (_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2,
775
778
  encryption_contract: ['email']
776
779
  };
777
780
  return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
778
781
  case 1:
779
- data = (_b.sent()).data;
782
+ data = (_c.sent()).data;
780
783
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
781
784
  if (!data.errors)
782
785
  return [2, { response: data, formData: email }];
@@ -30,6 +30,6 @@ var SuccessWithFlowButtons = function () {
30
30
  newUrl.searchParams.append('action', 'close');
31
31
  window.open("".concat(newUrl), '_self', '_blank');
32
32
  };
33
- return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: onClose }));
33
+ return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: isScopeAuthentication ? onClose : undefined }));
34
34
  };
35
35
  export default memo(SuccessWithFlowButtons);
@@ -8,7 +8,7 @@ export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<
8
8
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
9
9
  children?: React.ReactNode;
10
10
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
11
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
11
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
12
12
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
13
13
  htmlColor?: string | undefined;
14
14
  inheritViewBox?: boolean | undefined;
@@ -22,7 +22,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
22
22
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
23
23
  children?: React.ReactNode;
24
24
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
25
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
25
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
26
26
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
27
27
  htmlColor?: string | undefined;
28
28
  inheritViewBox?: boolean | undefined;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
3
3
  children?: React.ReactNode;
4
4
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
5
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
6
6
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
7
  htmlColor?: string | undefined;
8
8
  inheritViewBox?: boolean | undefined;
@@ -16,7 +16,7 @@ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
16
16
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
17
17
  children?: React.ReactNode;
18
18
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
19
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
20
20
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
21
  htmlColor?: string | undefined;
22
22
  inheritViewBox?: boolean | undefined;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
3
3
  children?: React.ReactNode;
4
4
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
5
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
6
6
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
7
  htmlColor?: string | undefined;
8
8
  inheritViewBox?: boolean | undefined;
@@ -16,7 +16,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
16
16
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
17
17
  children?: React.ReactNode;
18
18
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
19
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
20
20
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
21
  htmlColor?: string | undefined;
22
22
  inheritViewBox?: boolean | undefined;
@@ -95,6 +95,10 @@ var Connect = memo(function (props) {
95
95
  var _a;
96
96
  if (settingLoading)
97
97
  return;
98
+ if (!data.isValidOperator) {
99
+ dispatch(handleCurrentActiveScreen('CONNECT_OPERATOR_ERROR_STEP'));
100
+ return;
101
+ }
98
102
  if (leadId) {
99
103
  dispatch(retrieveLead({ leadId: leadId, isRedirect: true }));
100
104
  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 '../../../../features/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;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
3
3
  children?: React.ReactNode;
4
4
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
5
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
6
6
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
7
  htmlColor?: string | undefined;
8
8
  inheritViewBox?: boolean | undefined;
@@ -16,7 +16,7 @@ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
16
16
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
17
17
  children?: React.ReactNode;
18
18
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
19
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
20
20
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
21
  htmlColor?: string | undefined;
22
22
  inheritViewBox?: boolean | undefined;
@@ -91,6 +91,6 @@ var LicenseType = function (_a) {
91
91
  };
92
92
  var selectedLicenseValue = selectedLicenseControl.field.value;
93
93
  var isFL = (selectedLicenseValue === null || selectedLicenseValue === void 0 ? void 0 : selectedLicenseValue.type) === BusinessType.FL;
94
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: isFL ? 9.5 : 1.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('signup_business_type_label'), _jsx(Mandatory, {})] }), _jsxs(RadioGroupStyled, __assign({ readOnly: readOnly, value: selectedLicenseValue != null ? ((selectedLicenseValue === null || selectedLicenseValue === void 0 ? void 0 : selectedLicenseValue.type) === BusinessType.FL ? BusinessType.FL : BusinessType.CR) : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: BusinessType.FL, label: _jsxs(LabelStyled, { children: [t('homemaker_reg'), _jsx(Tooltip, __assign({ title: t('homemaker_reg_hint'), onMouseOver: function () { return setIsFLHovered(true); }, onMouseLeave: function () { return setIsFLHovered(false); }, onTouchStartCapture: function () { return setIsFLHovered(true); } }, { children: isFLHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) }), _jsx(RadioLabel, { value: BusinessType.CR, sx: { marginInlineEnd: '0px' }, label: _jsxs(LabelStyled, { children: [t('commercial_reg'), _jsx(Tooltip, __assign({ title: t('commercial_reg_hint'), onMouseOver: function () { return setIsCRHovered(true); }, onMouseLeave: function () { return setIsCRHovered(false); }, onTouchStartCapture: function () { return setIsCRHovered(true); } }, { children: isCRHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) })] }))] })) })));
94
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 1.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(LabelTextStyled, { children: [t('signup_business_type_label'), _jsx(Mandatory, {})] }), _jsxs(RadioGroupStyled, __assign({ readOnly: readOnly, value: selectedLicenseValue != null ? ((selectedLicenseValue === null || selectedLicenseValue === void 0 ? void 0 : selectedLicenseValue.type) === BusinessType.FL ? BusinessType.FL : BusinessType.CR) : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: BusinessType.FL, label: _jsxs(LabelStyled, { children: [t('homemaker_reg'), _jsx(Tooltip, __assign({ title: t('homemaker_reg_hint'), onMouseOver: function () { return setIsFLHovered(true); }, onMouseLeave: function () { return setIsFLHovered(false); }, onTouchStartCapture: function () { return setIsFLHovered(true); } }, { children: isFLHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) }), _jsx(RadioLabel, { value: BusinessType.CR, sx: { marginInlineEnd: '0px' }, label: _jsxs(LabelStyled, { children: [t('commercial_reg'), _jsx(Tooltip, __assign({ title: t('commercial_reg_hint'), onMouseOver: function () { return setIsCRHovered(true); }, onMouseLeave: function () { return setIsCRHovered(false); }, onTouchStartCapture: function () { return setIsCRHovered(true); } }, { children: isCRHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) })] }))] })) })));
95
95
  };
96
96
  export default LicenseType;
@@ -7,7 +7,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
7
7
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
8
8
  children?: React.ReactNode;
9
9
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
10
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
10
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
11
11
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
12
12
  htmlColor?: string | undefined;
13
13
  inheritViewBox?: boolean | undefined;
@@ -21,7 +21,7 @@ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledCom
21
21
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
22
22
  children?: React.ReactNode;
23
23
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
24
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
24
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
25
25
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
26
26
  htmlColor?: string | undefined;
27
27
  inheritViewBox?: boolean | undefined;
@@ -8,6 +8,7 @@ import MerchantInfoScreen from './connect/screens/Merchant';
8
8
  import BrandSegmentInfoScreen from './connect/screens/BrandSegment';
9
9
  import ConnectOTPScreen from './connect/screens/OTP';
10
10
  import ThankYouScreen from './connect/screens/ThankYou';
11
+ import OperatorError from './connect/screens/OperatorError';
11
12
  import ConnectExpressBusinessCountry from './connectExpress/screens/BusinessCountry/BusinessCountry';
12
13
  import ConnectExpressMobileScreen from './connectExpress/screens/Mobile';
13
14
  import ConnectExpressNIDScreen from './connectExpress/screens/NID';
@@ -125,6 +126,10 @@ export var connectFeatureScreens = [
125
126
  {
126
127
  name: 'CONNECT_THANK_YOU_STEP',
127
128
  element: ThankYouScreen
129
+ },
130
+ {
131
+ name: 'CONNECT_OPERATOR_ERROR_STEP',
132
+ element: OperatorError
128
133
  }
129
134
  ];
130
135
  export var connectExpressFeatureScreens = [
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
3
3
  children?: React.ReactNode;
4
4
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
5
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
6
6
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
7
  htmlColor?: string | undefined;
8
8
  inheritViewBox?: boolean | undefined;
@@ -16,7 +16,7 @@ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
16
16
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
17
17
  children?: React.ReactNode;
18
18
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
19
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
20
20
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
21
  htmlColor?: string | undefined;
22
22
  inheritViewBox?: boolean | undefined;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
3
3
  children?: React.ReactNode;
4
4
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
5
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
6
6
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
7
  htmlColor?: string | undefined;
8
8
  inheritViewBox?: boolean | undefined;
@@ -16,7 +16,7 @@ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
16
16
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
17
17
  children?: React.ReactNode;
18
18
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
19
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
20
20
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
21
  htmlColor?: string | undefined;
22
22
  inheritViewBox?: boolean | undefined;
@@ -22,7 +22,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
22
22
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
23
23
  children?: React.ReactNode;
24
24
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
25
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
25
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
26
26
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
27
27
  htmlColor?: string | undefined;
28
28
  inheritViewBox?: boolean | undefined;
@@ -21,7 +21,7 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
21
21
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
22
22
  children?: React.ReactNode;
23
23
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
24
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
24
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
25
25
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
26
26
  htmlColor?: string | undefined;
27
27
  inheritViewBox?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.6.41-test",
3
+ "version": "2.6.46-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",