@tap-payments/auth-jsconnect 2.0.22 → 2.0.23

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/@types/app.d.ts +5 -0
  2. package/build/@types/app.js +6 -0
  3. package/build/api/auth.d.ts +1 -0
  4. package/build/api/index.d.ts +4 -2
  5. package/build/api/individual.d.ts +21 -0
  6. package/build/api/individual.js +28 -1
  7. package/build/app/rootReducer.d.ts +0 -1
  8. package/build/app/rootReducer.js +0 -2
  9. package/build/app/store.d.ts +0 -2
  10. package/build/assets/locales/ar.json +10 -1
  11. package/build/assets/locales/en.json +10 -1
  12. package/build/constants/app.d.ts +0 -5
  13. package/build/constants/app.js +0 -12
  14. package/build/constants/validation.d.ts +4 -0
  15. package/build/constants/validation.js +4 -0
  16. package/build/features/app/auth/authStore.d.ts +1 -0
  17. package/build/features/app/auth/authStore.js +5 -3
  18. package/build/features/app/bank/bankStore.d.ts +8 -0
  19. package/build/features/app/bank/bankStore.js +32 -15
  20. package/build/features/app/business/businessStore.js +1 -1
  21. package/build/features/app/connect/connectStore.d.ts +4 -2
  22. package/build/features/app/connect/connectStore.js +98 -97
  23. package/build/features/app/individual/individualStore.d.ts +17 -0
  24. package/build/features/app/individual/individualStore.js +141 -66
  25. package/build/features/app/tax/taxStore.js +1 -0
  26. package/build/features/auth/Auth.d.ts +1 -1
  27. package/build/features/auth/Auth.js +4 -3
  28. package/build/features/bank/Bank.js +2 -2
  29. package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -5
  30. package/build/features/business/Business.js +2 -2
  31. package/build/features/business/screens/BusinessType/BusinessType.js +13 -6
  32. package/build/features/business/screens/BusinessType/EntityName.js +4 -4
  33. package/build/features/business/screens/Customers/CustomerLocations.js +1 -1
  34. package/build/features/business/screens/Customers/ExpectedCustomers.js +1 -1
  35. package/build/features/connect/Connect.js +2 -2
  36. package/build/features/connect/screens/Individual/Individual.js +19 -16
  37. package/build/features/connect/screens/Merchant/Merchant.js +3 -2
  38. package/build/features/connect/screens/Merchant/SocialMedia.js +4 -2
  39. package/build/features/connect/screens/Merchant/validation.js +71 -59
  40. package/build/features/connect/screens/OTP/OTP.js +5 -4
  41. package/build/features/connect/screens/OTP/OTPInput.js +3 -2
  42. package/build/features/entity/Entity.js +5 -5
  43. package/build/features/featuresScreens.d.ts +0 -1
  44. package/build/features/featuresScreens.js +0 -7
  45. package/build/features/individual/Individual.js +2 -2
  46. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  47. package/build/features/individual/screens/Verify/Verify.js +4 -4
  48. package/build/features/password/Password.js +2 -2
  49. package/build/features/signIn/SignIn.js +3 -3
  50. package/build/features/tax/Tax.js +5 -5
  51. package/build/hooks/useAppDispatch.d.ts +0 -1
  52. package/build/index.d.ts +2 -3
  53. package/build/index.js +1 -4
  54. package/build/utils/object.d.ts +1 -0
  55. package/build/utils/object.js +12 -0
  56. package/package.json +1 -1
  57. package/build/features/app/otp/otpStore.d.ts +0 -28
  58. package/build/features/app/otp/otpStore.js +0 -153
  59. package/build/features/otp/OTP.d.ts +0 -7
  60. package/build/features/otp/OTP.js +0 -58
  61. package/build/features/otp/index.d.ts +0 -0
  62. package/build/features/otp/index.js +0 -1
  63. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  64. package/build/features/otp/screens/OTPVerify/OTPInput.js +0 -47
  65. package/build/features/otp/screens/OTPVerify/Verify.d.ts +0 -5
  66. package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
  67. package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
  68. package/build/features/otp/screens/OTPVerify/index.js +0 -2
  69. package/build/features/otp/screens/OTPVerify/validation.d.ts +0 -8
  70. package/build/features/otp/screens/OTPVerify/validation.js +0 -4
@@ -49,13 +49,13 @@ var _a;
49
49
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
50
  import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
- import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../app/settings';
52
+ import { handleNextScreenStep } from '../../../app/settings';
53
53
  import { BUSINESS_FLOW_SUCCESS, INDIVIDUAl_STEP_NAMES } from '../../../constants';
54
54
  export var verifyLeadToken = createAsyncThunk('individualVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
- var payload, settings, data, boardData, countryCode, boardInfoData, countries, board_id, board_info_id, entity, info, hasIndividualCompleted;
56
- var _a, _b, _c;
57
- return __generator(this, function (_d) {
58
- switch (_d.label) {
55
+ var payload, settings, data, boardData, individualData, countryCode, boardInfoData, countries, board_id, board_info_id, notification, _a, id, type, info, hasIndividualCompleted;
56
+ var _b, _c, _d, _e;
57
+ return __generator(this, function (_f) {
58
+ switch (_f.label) {
59
59
  case 0:
60
60
  payload = {
61
61
  service_name: 'tap_email',
@@ -64,49 +64,59 @@ export var verifyLeadToken = createAsyncThunk('individualVerifyLeadToken', funct
64
64
  settings = thunkApi.getState().settings;
65
65
  return [4, API.leadService.verifyLeadToken(payload)];
66
66
  case 1:
67
- data = (_d.sent()).data;
67
+ data = (_f.sent()).data;
68
68
  boardInfoData = undefined;
69
69
  countries = settings.data.countries;
70
- if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 6];
70
+ if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 10];
71
+ if (!(data.step_name !== INDIVIDUAl_STEP_NAMES.PHONE_AUTH)) return [3, 10];
71
72
  board_id = data === null || data === void 0 ? void 0 : data.id;
72
73
  board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
73
- if (!(!!board_id && !!board_info_id)) return [3, 3];
74
+ if (!(board_id && board_info_id)) return [3, 4];
74
75
  return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
75
76
  case 2:
76
- boardInfoData = _d.sent();
77
- _d.label = 3;
78
- case 3: return [4, API.boardService.retrieveBoardDetails(board_id)];
77
+ boardInfoData = _f.sent();
78
+ notification = (boardInfoData || {}).notification;
79
+ _a = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _a.id, type = _a.type;
80
+ if (!(id && type)) return [3, 4];
81
+ return [4, API.individualService.retrieveIndividual(id, type)];
82
+ case 3:
83
+ individualData = _f.sent();
84
+ _f.label = 4;
79
85
  case 4:
80
- boardData = _d.sent();
81
- entity = ((boardData === null || boardData === void 0 ? void 0 : boardData.business) || {}).entity;
82
- countryCode = entity === null || entity === void 0 ? void 0 : entity.country;
86
+ countryCode = (_b = individualData === null || individualData === void 0 ? void 0 : individualData.user) === null || _b === void 0 ? void 0 : _b.nationality;
83
87
  info = boardInfoData.info;
84
- hasIndividualCompleted = ((_a = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'individual'; })) === null || _a === void 0 ? void 0 : _a.status) === 'completed';
85
- return [4, thunkApi.dispatch(retrieveDataList(entity === null || entity === void 0 ? void 0 : entity.country))];
88
+ hasIndividualCompleted = ((_c = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'individual'; })) === null || _c === void 0 ? void 0 : _c.status) === 'completed';
89
+ if (!hasIndividualCompleted) return [3, 7];
90
+ if (!board_id) return [3, 6];
91
+ return [4, API.boardService.retrieveBoardDetails(board_id)];
86
92
  case 5:
87
- _d.sent();
88
- if (data.step_name === INDIVIDUAl_STEP_NAMES.PHONE_AUTH) {
89
- thunkApi.dispatch(handleCurrentActiveScreen('INDIVIDUAL_VERIFY_STEP'));
90
- }
91
- else if (hasIndividualCompleted) {
92
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
93
- }
94
- else if (data.step_name === INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO) {
95
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP'));
96
- }
97
- _d.label = 6;
98
- case 6: return [2, {
93
+ boardData = _f.sent();
94
+ _f.label = 6;
95
+ case 6:
96
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
97
+ return [3, 10];
98
+ case 7:
99
+ if (!countryCode) return [3, 9];
100
+ return [4, thunkApi.dispatch(retrieveDataList(countryCode))];
101
+ case 8:
102
+ _f.sent();
103
+ _f.label = 9;
104
+ case 9:
105
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP'));
106
+ _f.label = 10;
107
+ case 10: return [2, {
99
108
  data: data,
100
109
  boardResponse: {
101
- user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
110
+ user: individualData === null || individualData === void 0 ? void 0 : individualData.user,
102
111
  brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
103
112
  bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
104
113
  entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
105
114
  merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
106
- name: (_b = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _b === void 0 ? void 0 : _b.name,
107
- contact: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.contact,
115
+ name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.name,
116
+ contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact,
108
117
  countries: countries,
109
118
  countryCode: countryCode,
119
+ notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
110
120
  flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info)
111
121
  },
112
122
  token: token
@@ -173,63 +183,107 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveIndividualBoardDetai
173
183
  });
174
184
  }); });
175
185
  export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
176
- var _a, individual, settings, responseBody, payload, data, flows, hasIndividualCompleted;
177
- var _b, _c, _d, _e;
178
- return __generator(this, function (_f) {
179
- switch (_f.label) {
186
+ var _a, individual, settings, responseBody, _b, board_id, board_info_id, countries, payload, data, boardInfoData, individualData, boardData, countryCode, notification, _c, id, type, info, hasIndividualCompleted;
187
+ var _d, _e, _f, _g, _h, _j, _k;
188
+ return __generator(this, function (_l) {
189
+ switch (_l.label) {
180
190
  case 0:
181
191
  _a = thunkApi.getState(), individual = _a.individual, settings = _a.settings;
182
192
  responseBody = individual.data.verify.responseBody;
193
+ _b = responseBody || {}, board_id = _b.board_id, board_info_id = _b.board_info_id;
194
+ countries = settings.data.countries;
183
195
  payload = {
184
196
  data: params.otp,
185
- service_name: (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _b === void 0 ? void 0 : _b.service_name,
197
+ service_name: (_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _d === void 0 ? void 0 : _d.service_name,
186
198
  verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
187
199
  step_name: INDIVIDUAl_STEP_NAMES.PHONE_AUTH,
188
200
  encryption_contract: ['data']
189
201
  };
190
202
  return [4, API.leadService.verifyLeadOTP(payload)];
191
203
  case 1:
192
- data = (_f.sent()).data;
193
- if (!(data === null || data === void 0 ? void 0 : data.errors)) {
194
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
195
- flows = (responseBody || {}).flows;
196
- hasIndividualCompleted = ((_e = flows === null || flows === void 0 ? void 0 : flows.find(function (flow) { return flow.name === 'individual'; })) === null || _e === void 0 ? void 0 : _e.status) === 'completed';
197
- if (hasIndividualCompleted) {
198
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
199
- }
200
- else {
201
- thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP'));
202
- }
203
- }
204
- return [2, { data: data, formData: __assign({}, params) }];
204
+ data = (_l.sent()).data;
205
+ countryCode = undefined;
206
+ if (!!(data === null || data === void 0 ? void 0 : data.errors)) return [3, 10];
207
+ if (!(board_id && board_info_id)) return [3, 4];
208
+ return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
209
+ case 2:
210
+ boardInfoData = _l.sent();
211
+ notification = (boardInfoData || {}).notification;
212
+ _c = (notification === null || notification === void 0 ? void 0 : notification.recipient) || {}, id = _c.id, type = _c.type;
213
+ if (!(id && type)) return [3, 4];
214
+ return [4, API.individualService.retrieveIndividual(id, type)];
215
+ case 3:
216
+ individualData = _l.sent();
217
+ _l.label = 4;
218
+ case 4:
219
+ countryCode = (_e = individualData === null || individualData === void 0 ? void 0 : individualData.user) === null || _e === void 0 ? void 0 : _e.nationality;
220
+ info = boardInfoData.info;
221
+ hasIndividualCompleted = ((_f = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'individual'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
222
+ (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, { otp: params.otp });
223
+ if (!hasIndividualCompleted) return [3, 7];
224
+ if (!board_id) return [3, 6];
225
+ return [4, API.boardService.retrieveBoardDetails(board_id)];
226
+ case 5:
227
+ boardData = _l.sent();
228
+ _l.label = 6;
229
+ case 6:
230
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
231
+ return [3, 10];
232
+ case 7:
233
+ if (!countryCode) return [3, 9];
234
+ return [4, thunkApi.dispatch(retrieveDataList(countryCode))];
235
+ case 8:
236
+ _l.sent();
237
+ _l.label = 9;
238
+ case 9:
239
+ thunkApi.dispatch(handleNextScreenStep('INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP'));
240
+ _l.label = 10;
241
+ case 10: return [2, {
242
+ data: data,
243
+ boardResponse: {
244
+ user: individualData === null || individualData === void 0 ? void 0 : individualData.user,
245
+ brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
246
+ bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
247
+ entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity,
248
+ merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
249
+ name: (_j = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _j === void 0 ? void 0 : _j.name,
250
+ contact: (_k = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _k === void 0 ? void 0 : _k.contact,
251
+ countries: countries,
252
+ notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
253
+ flows: BUSINESS_FLOW_SUCCESS.concat(boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info)
254
+ },
255
+ formData: __assign({}, params)
256
+ }];
205
257
  }
206
258
  });
207
259
  }); });
208
260
  export var updateIndividualInfo = createAsyncThunk('updateIndividualInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
209
- var _a, settings, individual, requestBody, data;
210
- var _b, _c, _d, _e, _f, _g, _h, _j;
211
- return __generator(this, function (_k) {
212
- switch (_k.label) {
261
+ var _a, settings, individual, _b, id, type, requestBody, data;
262
+ var _c, _d, _e, _f, _g, _h, _j, _k;
263
+ return __generator(this, function (_l) {
264
+ switch (_l.label) {
213
265
  case 0:
214
266
  _a = thunkApi.getState(), settings = _a.settings, individual = _a.individual;
267
+ _b = ((_d = (_c = individual.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.notification) === null || _d === void 0 ? void 0 : _d.recipient) || {}, id = _b.id, type = _b.type;
215
268
  requestBody = {
216
- id: (_c = (_b = individual.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.user) === null || _c === void 0 ? void 0 : _c.id,
217
- occupation: { id: (_d = params.occupation) === null || _d === void 0 ? void 0 : _d.id },
269
+ id: id,
270
+ type: type,
271
+ occupation: { id: (_e = params.occupation) === null || _e === void 0 ? void 0 : _e.id },
218
272
  employer_name: params.employerName,
219
- employer_country: (_e = params.employerLocation) === null || _e === void 0 ? void 0 : _e.iso2,
220
- source_income: [{ id: (_f = params.sourceIncome) === null || _f === void 0 ? void 0 : _f.id }],
221
- monthly_income: { id: (_g = params.monthlyIncome) === null || _g === void 0 ? void 0 : _g.id },
273
+ employer_country: (_f = params.employerLocation) === null || _f === void 0 ? void 0 : _f.iso2,
274
+ source_income: [{ id: (_g = params.sourceIncome) === null || _g === void 0 ? void 0 : _g.id }],
275
+ monthly_income: { id: (_h = params.monthlyIncome) === null || _h === void 0 ? void 0 : _h.id },
222
276
  is_relative_PEP: params.isPEP,
223
277
  is_influencer: params.isInfluencer,
224
278
  encryption_contract: ['employer_name', 'employer_country'],
225
279
  step_name: INDIVIDUAl_STEP_NAMES.INDIVIDUAl_INFO
226
280
  };
227
- return [4, API.entityService.updateIndividualInfo(requestBody)];
281
+ return [4, API.individualService.updateIndividual(requestBody)];
228
282
  case 1:
229
- data = (_k.sent()).data;
283
+ data = (_l.sent()).data;
230
284
  if (!(data === null || data === void 0 ? void 0 : data.errors)) {
231
285
  thunkApi.dispatch(handleNextScreenStep());
232
- (_j = (_h = settings.data.appConfig).onStepCompleted) === null || _j === void 0 ? void 0 : _j.call(_h, settings.data.activeScreen.name, requestBody);
286
+ (_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, requestBody);
233
287
  }
234
288
  return [2, { data: data, formData: params }];
235
289
  }
@@ -315,9 +369,9 @@ export var individualSlice = createSlice({
315
369
  state.error = description;
316
370
  return;
317
371
  }
318
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id });
372
+ state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
319
373
  state.data.verify.token = token;
320
- var _c = boardResponse || {}, countries = _c.countries, countryCode = _c.countryCode, user = _c.user;
374
+ var _c = boardResponse || {}, countries = _c.countries, user = _c.user;
321
375
  var _d = user || {}, source_income = _d.source_income, monthly_income = _d.monthly_income, occupation = _d.occupation, is_relative_PEP = _d.is_relative_PEP, is_influencer = _d.is_influencer;
322
376
  var _e = state.data.individualData.responseBody || {}, sourceIncomeList = _e.sourceIncomeList, monthlyIncomeList = _e.monthlyIncomeList, occupationList = _e.occupationList;
323
377
  var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); })) ||
@@ -328,7 +382,7 @@ export var individualSlice = createSlice({
328
382
  (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList[2]);
329
383
  if (!!selectedMonthlyIncome)
330
384
  state.data.individualData.monthlyIncome = selectedMonthlyIncome;
331
- var code = (data === null || data === void 0 ? void 0 : data.employer_country) || countryCode;
385
+ var code = user === null || user === void 0 ? void 0 : user.employer_country;
332
386
  if (!!code) {
333
387
  var employerLocation = (countries || []).find(function (country) { return country.iso2 === code; });
334
388
  state.data.individualData.employerLocation = employerLocation;
@@ -368,7 +422,7 @@ export var individualSlice = createSlice({
368
422
  var _a;
369
423
  state.loading = false;
370
424
  state.error = null;
371
- var _b = action.payload, data = _b.data, formData = _b.formData;
425
+ var _b = action.payload, data = _b.data, formData = _b.formData, boardResponse = _b.boardResponse;
372
426
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
373
427
  if (description) {
374
428
  state.error = description;
@@ -376,7 +430,28 @@ export var individualSlice = createSlice({
376
430
  }
377
431
  state.data.otpData = formData;
378
432
  state.data.otpData.responseBody = data;
379
- state.data.individualData = __assign({}, state.data.individualData);
433
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
434
+ var _c = boardResponse || {}, countries = _c.countries, user = _c.user;
435
+ var _d = user || {}, source_income = _d.source_income, monthly_income = _d.monthly_income, occupation = _d.occupation, is_relative_PEP = _d.is_relative_PEP, is_influencer = _d.is_influencer;
436
+ var _e = state.data.individualData.responseBody || {}, sourceIncomeList = _e.sourceIncomeList, monthlyIncomeList = _e.monthlyIncomeList, occupationList = _e.occupationList;
437
+ var selectedSourceIncome = (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList.find(function (source) { var _a; return (source === null || source === void 0 ? void 0 : source.id) === ((_a = source_income === null || source_income === void 0 ? void 0 : source_income[0]) === null || _a === void 0 ? void 0 : _a.id); })) ||
438
+ (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
439
+ if (!!selectedSourceIncome)
440
+ state.data.individualData.sourceIncome = selectedSourceIncome;
441
+ var selectedMonthlyIncome = (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.find(function (income) { return (income === null || income === void 0 ? void 0 : income.id) === (monthly_income === null || monthly_income === void 0 ? void 0 : monthly_income.id); })) ||
442
+ (monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList[2]);
443
+ if (!!selectedMonthlyIncome)
444
+ state.data.individualData.monthlyIncome = selectedMonthlyIncome;
445
+ var code = user === null || user === void 0 ? void 0 : user.employer_country;
446
+ if (!!code) {
447
+ var employerLocation = (countries || []).find(function (country) { return country.iso2 === code; });
448
+ state.data.individualData.employerLocation = employerLocation;
449
+ }
450
+ var selectedOccupation = (occupationList === null || occupationList === void 0 ? void 0 : occupationList.find(function (o) { return (o === null || o === void 0 ? void 0 : o.id) === (occupation === null || occupation === void 0 ? void 0 : occupation.id); })) || (occupationList === null || occupationList === void 0 ? void 0 : occupationList[0]);
451
+ if (!!selectedOccupation)
452
+ state.data.individualData.occupation = selectedOccupation;
453
+ state.data.individualData.isPEP = is_relative_PEP;
454
+ state.data.individualData.isInfluencer = is_influencer;
380
455
  })
381
456
  .addCase(verifyLeadOTP.rejected, function (state, action) {
382
457
  state.loading = false;
@@ -259,6 +259,7 @@ export var taxSlice = createSlice({
259
259
  }
260
260
  state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, name: user.name, bank_account: bank_account, vatID: vatID, merchant: merchant });
261
261
  state.data.verify.token = token;
262
+ state.data.taxData.vatId = vatID;
262
263
  })
263
264
  .addCase(verifyLeadToken.pending, function (state) {
264
265
  state.error = null;
@@ -2,7 +2,7 @@
2
2
  import { LibConfig } from '../../@types';
3
3
  export interface AuthLibProps extends LibConfig {
4
4
  postURL: string;
5
- leadId?: string;
5
+ leadId: string;
6
6
  onClose?: () => void;
7
7
  }
8
8
  export declare function AuthLib(props: AuthLibProps): JSX.Element;
@@ -45,6 +45,8 @@ var Auth = memo(function (_a) {
45
45
  useStepStartedListener();
46
46
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
47
47
  useEffect(function () {
48
+ if (!props.leadId)
49
+ throw new Error('leadId is required');
48
50
  var _a = props || {}, leadId = _a.leadId, postURL = _a.postURL;
49
51
  var data = {
50
52
  postUrl: postURL
@@ -52,11 +54,10 @@ var Auth = memo(function (_a) {
52
54
  if (!props.open)
53
55
  return;
54
56
  dispatch(storePostUrl(data));
55
- if (leadId)
56
- dispatch(storeLeadId({ leadId: leadId }));
57
+ dispatch(storeLeadId({ leadId: leadId }));
57
58
  }, []);
58
59
  useEffect(function () {
59
- if (data.isValidOperator && props.leadId && props.open)
60
+ if (data.isValidOperator && props.open)
60
61
  dispatch(retrieveLead(props.leadId));
61
62
  }, [data.isValidOperator]);
62
63
  var handleDialogClose = function () {
@@ -28,7 +28,7 @@ var Bank = memo(function (props) {
28
28
  var theme = useAppTheme().theme;
29
29
  var dispatch = useAppDispatch();
30
30
  var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
31
- var _b = useAppSelector(bankSelector), customLoading = _b.customLoading, bankError = _b.error;
31
+ var _b = useAppSelector(bankSelector), customLoading = _b.customLoading, loading = _b.loading, bankError = _b.error;
32
32
  useAppConfig(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props));
33
33
  useErrorListener(bankError || error);
34
34
  useStepStartedListener();
@@ -46,7 +46,7 @@ var Bank = memo(function (props) {
46
46
  if (!settingLoading && open)
47
47
  verifyToken();
48
48
  }, [settingLoading]);
49
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: bankFeatureScreens.map(function (_a, index) {
49
+ 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', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: bankFeatureScreens.map(function (_a, index) {
50
50
  var Element = _a.element, name = _a.name;
51
51
  var isActive = activeScreen.name === name;
52
52
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -25,18 +25,23 @@ var InputStyled = styled(Input)(function (_a) {
25
25
  });
26
26
  });
27
27
  var Beneficiary = function () {
28
- var _a, _b, _c, _d;
28
+ var _a, _b;
29
29
  var t = useTranslation().t;
30
- var _e = useFormContext(), setValue = _e.setValue, control = _e.control;
30
+ var _c = useFormContext(), setValue = _c.setValue, control = _c.control;
31
31
  var isAr = useLanguage().isAr;
32
32
  var data = useAppSelector(bankSelector).data;
33
33
  var beneficiaryControl = useController({ name: 'beneficiaryName', control: control });
34
34
  var beneficiaryValue = beneficiaryControl.field.value;
35
35
  var hasError = (_a = beneficiaryControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
36
36
  var error = (_b = beneficiaryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
37
- var legalName = (_d = (_c = data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) === null || _d === void 0 ? void 0 : _d.legal_name;
37
+ var _d = data.verify.responseBody || {}, bank_account = _d.bank_account, entity = _d.entity;
38
+ var legalName = (entity === null || entity === void 0 ? void 0 : entity.legal_name) || {};
38
39
  React.useEffect(function () {
39
- setValue('beneficiaryName', isAr ? legalName === null || legalName === void 0 ? void 0 : legalName.ar : legalName === null || legalName === void 0 ? void 0 : legalName.en);
40
+ var beneficiary_name = (bank_account || {}).beneficiary_name;
41
+ if (beneficiary_name)
42
+ setValue('beneficiaryName', beneficiary_name);
43
+ else
44
+ setValue('beneficiaryName', isAr ? legalName === null || legalName === void 0 ? void 0 : legalName.ar : legalName === null || legalName === void 0 ? void 0 : legalName.en);
40
45
  }, []);
41
46
  var handleBeneficiaryChange = function (_a) {
42
47
  var target = _a.target;
@@ -46,6 +51,6 @@ var Beneficiary = function () {
46
51
  var clearValue = function () {
47
52
  beneficiaryControl.field.onChange('');
48
53
  };
49
- return (_jsx(FeatureStyled, { children: _jsx(InputStyled, { label: t('beneficiary_name'), onChange: handleBeneficiaryChange, disabled: !!legalName, value: beneficiaryValue, placeholder: t('beneficiary_name'), warningType: 'alert', warningMessage: error && t(error), required: true, endAdornment: !hasError && beneficiaryValue ? _jsx(CheckIcon, {}) : beneficiaryValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
54
+ return (_jsx(FeatureStyled, { children: _jsx(InputStyled, { label: t('beneficiary_name'), onChange: handleBeneficiaryChange, value: beneficiaryValue, placeholder: t('beneficiary_name'), warningType: 'alert', warningMessage: error && t(error), required: true, endAdornment: !hasError && beneficiaryValue ? _jsx(CheckIcon, {}) : beneficiaryValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
50
55
  };
51
56
  export default Beneficiary;
@@ -28,7 +28,7 @@ var Business = memo(function (props) {
28
28
  var theme = useAppTheme().theme;
29
29
  var dispatch = useAppDispatch();
30
30
  var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
31
- var _b = useAppSelector(businessSelector), customLoading = _b.customLoading, businessError = _b.error;
31
+ var _b = useAppSelector(businessSelector), customLoading = _b.customLoading, businessError = _b.error, loading = _b.loading;
32
32
  useAppConfig(__assign({ navigation: BUSINESS_SCREENS_NAVIGATION }, props));
33
33
  useErrorListener(businessError || error);
34
34
  useStepStartedListener();
@@ -46,7 +46,7 @@ var Business = memo(function (props) {
46
46
  if (!settingLoading && open)
47
47
  verifyToken();
48
48
  }, [settingLoading]);
49
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: businessFeatureScreens.map(function (_a, index) {
49
+ 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', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: businessFeatureScreens.map(function (_a, index) {
50
50
  var Element = _a.element, name = _a.name;
51
51
  var isActive = activeScreen.name === name;
52
52
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -15,7 +15,7 @@ import { useForm, FormProvider } from 'react-hook-form';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
- import { handlePrevScreenStep } from '../../../../app/settings';
18
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
19
19
  import Form from '../../../../components/Form';
20
20
  import Collapse from '../../../../components/Collapse';
21
21
  import { useLanguage } from '../../../../hooks';
@@ -26,16 +26,23 @@ import { isSA } from '../../../../utils';
26
26
  import { KWLicenseValidationSchema, LicenseValidationSchema } from './validation';
27
27
  import LicenseList from './LicenseList';
28
28
  var BusinessType = function (_a) {
29
- var _b;
30
- var _c = useAppSelector(businessSelector), data = _c.data, loading = _c.loading, error = _c.error, uploading = _c.uploading;
29
+ var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error, uploading = _b.uploading;
30
+ var settingsData = useAppSelector(settingsSelector).data;
31
+ var businessTypeData = data.businessTypeData;
31
32
  var t = useTranslation().t;
32
33
  var isAr = useLanguage().isAr;
33
34
  var dispatch = useAppDispatch();
34
- var _d = React.useState(false), listActive = _d[0], setListActive = _d[1];
35
- var isSACountry = React.useMemo(function () { var _a; return isSA((_a = data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.country_code); }, [(_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.country_code]);
35
+ var _c = React.useState(false), listActive = _c[0], setListActive = _c[1];
36
+ var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
36
37
  var methods = useForm({
37
38
  resolver: yupResolver(!isSACountry ? KWLicenseValidationSchema : LicenseValidationSchema),
38
- defaultValues: data.businessTypeData,
39
+ defaultValues: {
40
+ selectedLicense: businessTypeData.selectedLicense,
41
+ licenseNumber: businessTypeData.licenseNumber,
42
+ entityLegalName: businessTypeData.entityLegalName,
43
+ certificateId: businessTypeData.certificateId,
44
+ certificateFile: businessTypeData.certificateFile
45
+ },
39
46
  mode: 'onChange'
40
47
  });
41
48
  React.useEffect(function () {
@@ -21,7 +21,7 @@ import { isSA, removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils'
21
21
  import { styled } from '@mui/material/styles';
22
22
  import Box from '@mui/material/Box';
23
23
  import { useAppSelector } from '../../../../hooks';
24
- import { businessSelector } from '../../../app/business/businessStore';
24
+ import { settingsSelector } from '../../../../app/settings';
25
25
  var BoxStyled = styled(Box)(function (_a) {
26
26
  var theme = _a.theme;
27
27
  return ({
@@ -34,15 +34,15 @@ var BoxStyled = styled(Box)(function (_a) {
34
34
  });
35
35
  });
36
36
  var EntityName = function (_a) {
37
- var _b, _c;
37
+ var _b;
38
38
  var show = _a.show;
39
39
  var t = useTranslation().t;
40
40
  var control = useFormContext().control;
41
41
  var entityNameControl = useController({ control: control, name: 'entityLegalName' });
42
42
  var entityNameValue = entityNameControl.field.value;
43
43
  var error = (_b = entityNameControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
44
- var data = useAppSelector(businessSelector).data;
45
- var isSACountry = React.useMemo(function () { var _a; return isSA((_a = data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.country_code); }, [(_c = data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.country_code]);
44
+ var settingsData = useAppSelector(settingsSelector).data;
45
+ var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
46
46
  var handleChange = function (_a) {
47
47
  var target = _a.target;
48
48
  var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
@@ -130,7 +130,7 @@ var customerLocations = function (_a) {
130
130
  };
131
131
  var customerLocationsValue = customerLocationsControl.field.value;
132
132
  var customerLocationSelected = customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue[0];
133
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('select_customer_base') }), _jsx(InputStyled, { readOnly: true, value: isAr ? customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.ar : customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.en, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name.en', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
133
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('select_customer_base') }), _jsx(InputStyled, { readOnly: true, placeholder: t('choose_expected_sales'), value: isAr ? customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.ar : customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.en, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name.en', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
134
134
  return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.name.ar : item.name.en })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIconStyled, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(RemainingCheck, {})] }));
135
135
  } })] }))] }) })));
136
136
  };
@@ -91,7 +91,7 @@ var ExpectedCustomers = function (_a) {
91
91
  };
92
92
  var expectedCustomersValue = expectedCustomerControl.field.value;
93
93
  var expectedCustomersSelected = expectedCustomersValue;
94
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name.ar : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name.en, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
94
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, placeholder: t('choose_expected_sales'), value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name.ar : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name.en, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
95
95
  return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.name.ar : item.name.en })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
96
96
  } })] }))] }) })));
97
97
  };
@@ -40,7 +40,7 @@ var Connect = memo(function (_a) {
40
40
  var theme = useAppTheme().theme;
41
41
  var dispatch = useAppDispatch();
42
42
  var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
43
- var connectError = useAppSelector(connectSelector).error;
43
+ var _c = useAppSelector(connectSelector), connectError = _c.error, loading = _c.loading;
44
44
  useAppConfig(__assign({ navigation: CONNECT_SCREENS_NAVIGATION }, props));
45
45
  useErrorListener(connectError || error);
46
46
  useStepStartedListener();
@@ -60,7 +60,7 @@ var Connect = memo(function (_a) {
60
60
  var handleDialogClose = function () {
61
61
  dispatch(handleOpen(false));
62
62
  };
63
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ onClose: onClose, onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading, error: error, open: open, footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
63
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onClose: onClose, onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading, error: error, open: open, footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
64
64
  var Element = _a.element, name = _a.name;
65
65
  var isActive = activeScreen.name === name;
66
66
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));