@tap-payments/auth-jsconnect 2.1.35-test → 2.1.37-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 (125) hide show
  1. package/build/@types/app.d.ts +1 -0
  2. package/build/@types/app.js +1 -0
  3. package/build/api/brand.d.ts +1 -0
  4. package/build/api/brand.js +9 -1
  5. package/build/api/index.d.ts +2 -0
  6. package/build/api/lead.d.ts +1 -0
  7. package/build/api/lead.js +7 -0
  8. package/build/app/rootReducer.d.ts +1 -0
  9. package/build/app/rootReducer.js +3 -1
  10. package/build/app/settings.d.ts +7 -5
  11. package/build/app/settings.js +15 -6
  12. package/build/app/store.d.ts +2 -0
  13. package/build/components/Button/Button.js +1 -5
  14. package/build/components/Radio/Radio.js +1 -1
  15. package/build/components/Tooltip/Tooltip.js +1 -1
  16. package/build/constants/app.d.ts +14 -0
  17. package/build/constants/app.js +45 -0
  18. package/build/features/app/auth/authStore.js +2 -10
  19. package/build/features/app/bank/bankStore.d.ts +1 -5
  20. package/build/features/app/bank/bankStore.js +3 -3
  21. package/build/features/app/brand/brandStore.js +3 -3
  22. package/build/features/app/business/businessStore.js +6 -16
  23. package/build/features/app/connect/connectStore.js +1 -8
  24. package/build/features/app/connectExpress/connectExpressStore.d.ts +39 -0
  25. package/build/features/app/connectExpress/connectExpressStore.js +171 -0
  26. package/build/features/app/entity/entityStore.js +3 -3
  27. package/build/features/app/individual/individualStore.d.ts +2 -10
  28. package/build/features/app/individual/individualStore.js +6 -8
  29. package/build/features/app/password/passwordStore.d.ts +2 -10
  30. package/build/features/app/password/passwordStore.js +5 -5
  31. package/build/features/app/tax/taxStore.js +3 -3
  32. package/build/features/auth/screens/NID/TAC.js +1 -3
  33. package/build/features/bank/screens/BankDetails/validation.js +6 -26
  34. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -3
  35. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +9 -15
  36. package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -2
  37. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +1 -2
  38. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +1 -3
  39. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -3
  40. package/build/features/brand/screens/BrandActivities/TAC.js +1 -3
  41. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -3
  42. package/build/features/brand/screens/BrandInfo/Segments.js +6 -15
  43. package/build/features/brand/screens/BrandInfo/TeamSize.js +6 -15
  44. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -3
  45. package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
  46. package/build/features/business/screens/BusinessType/LicenseType.js +1 -5
  47. package/build/features/business/screens/BusinessType/validation.js +2 -6
  48. package/build/features/business/screens/Customers/CustomerLocations.js +1 -2
  49. package/build/features/business/screens/Customers/ExpectedCustomers.js +1 -2
  50. package/build/features/business/screens/Customers/ExpectedSalesRange.js +1 -3
  51. package/build/features/business/screens/Customers/RefundPolicy.js +1 -3
  52. package/build/features/business/screens/Customers/TransactionPolicy.js +1 -3
  53. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -3
  54. package/build/features/connect/screens/Individual/validation.js +2 -8
  55. package/build/features/connect/screens/Merchant/TAC.js +1 -3
  56. package/build/features/connectExpress/ConnectExpress.d.ts +10 -0
  57. package/build/features/connectExpress/ConnectExpress.js +134 -0
  58. package/build/features/connectExpress/index.d.ts +1 -0
  59. package/build/features/connectExpress/index.js +1 -0
  60. package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +5 -0
  61. package/build/features/connectExpress/screens/CivilID/CivilID.js +102 -0
  62. package/build/features/connectExpress/screens/CivilID/IDNumber.d.ts +7 -0
  63. package/build/features/connectExpress/screens/CivilID/IDNumber.js +59 -0
  64. package/build/features/connectExpress/screens/CivilID/index.d.ts +3 -0
  65. package/build/features/connectExpress/screens/CivilID/index.js +2 -0
  66. package/build/features/connectExpress/screens/CivilID/validation.d.ts +8 -0
  67. package/build/features/connectExpress/screens/CivilID/validation.js +4 -0
  68. package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +5 -0
  69. package/build/features/connectExpress/screens/Mobile/Mobile.js +133 -0
  70. package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +12 -0
  71. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +154 -0
  72. package/build/features/connectExpress/screens/Mobile/Title.d.ts +8 -0
  73. package/build/features/connectExpress/screens/Mobile/Title.js +29 -0
  74. package/build/features/connectExpress/screens/Mobile/index.d.ts +3 -0
  75. package/build/features/connectExpress/screens/Mobile/index.js +2 -0
  76. package/build/features/connectExpress/screens/Mobile/validation.d.ts +8 -0
  77. package/build/features/connectExpress/screens/Mobile/validation.js +28 -0
  78. package/build/features/connectExpress/screens/NID/DOB.d.ts +6 -0
  79. package/build/features/connectExpress/screens/NID/DOB.js +47 -0
  80. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +6 -0
  81. package/build/features/connectExpress/screens/NID/IDNumber.js +60 -0
  82. package/build/features/connectExpress/screens/NID/NID.d.ts +5 -0
  83. package/build/features/connectExpress/screens/NID/NID.js +94 -0
  84. package/build/features/connectExpress/screens/NID/index.d.ts +3 -0
  85. package/build/features/connectExpress/screens/NID/index.js +2 -0
  86. package/build/features/connectExpress/screens/NID/validation.d.ts +11 -0
  87. package/build/features/connectExpress/screens/NID/validation.js +9 -0
  88. package/build/features/connectExpress/screens/OTP/OTP.d.ts +5 -0
  89. package/build/features/connectExpress/screens/OTP/OTP.js +94 -0
  90. package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +5 -0
  91. package/build/features/connectExpress/screens/OTP/OTPInput.js +54 -0
  92. package/build/features/connectExpress/screens/OTP/index.d.ts +3 -0
  93. package/build/features/connectExpress/screens/OTP/index.js +2 -0
  94. package/build/features/connectExpress/screens/OTP/validation.d.ts +8 -0
  95. package/build/features/connectExpress/screens/OTP/validation.js +4 -0
  96. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  97. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +95 -0
  98. package/build/features/connectExpress/screens/VerifyPACI/index.d.ts +3 -0
  99. package/build/features/connectExpress/screens/VerifyPACI/index.js +2 -0
  100. package/build/features/entity/screens/EntityCapital/ActivityList.js +1 -1
  101. package/build/features/entity/screens/EntityCapital/validation.js +2 -6
  102. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -3
  103. package/build/features/featuresScreens.d.ts +1 -0
  104. package/build/features/featuresScreens.js +27 -0
  105. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -4
  106. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +1 -2
  107. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -6
  108. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -3
  109. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -3
  110. package/build/features/shared/Background/Background.js +1 -5
  111. package/build/features/shared/Button/Button.js +1 -3
  112. package/build/features/shared/Footer/Footer.js +1 -1
  113. package/build/features/shared/UploadMultipleFile/index.d.ts +0 -0
  114. package/build/features/shared/UploadMultipleFile/index.js +1 -0
  115. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -3
  116. package/build/hooks/useAppConfig.d.ts +2 -1
  117. package/build/hooks/useAppConfig.js +2 -2
  118. package/build/hooks/useAppDispatch.d.ts +1 -0
  119. package/build/hooks/useSetFromDefaultValues.js +2 -2
  120. package/build/index.d.ts +3 -2
  121. package/build/index.js +4 -1
  122. package/build/utils/array.js +1 -3
  123. package/build/utils/common.d.ts +1 -1
  124. package/build/utils/common.js +1 -0
  125. package/package.json +1 -1
@@ -0,0 +1,171 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ var _a;
49
+ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
+ import { FlowsTypes, AuthForType } from '../../../@types';
51
+ import API from '../../../api';
52
+ import { defaultCountry } from '../../../constants';
53
+ import { getEighteenYearsAgo } from '../../../utils';
54
+ export var getLeadByIdAsync = createAsyncThunk('expressConnect/getLeadByIdAsync', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
+ var data;
56
+ return __generator(this, function (_a) {
57
+ switch (_a.label) {
58
+ case 0: return [4, API.leadService.getLeadById(leadId)];
59
+ case 1:
60
+ data = _a.sent();
61
+ return [2, data];
62
+ }
63
+ });
64
+ }); });
65
+ export var getBrandListAsync = createAsyncThunk('expressConnect/getBrandListAsync', function (individualId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
+ var brands;
67
+ return __generator(this, function (_a) {
68
+ switch (_a.label) {
69
+ case 0: return [4, API.brandService.getBrandListByIndividualId(individualId)];
70
+ case 1:
71
+ brands = (_a.sent()).brands;
72
+ return [2, brands];
73
+ }
74
+ });
75
+ }); });
76
+ var initialState = {
77
+ error: null,
78
+ loading: false,
79
+ data: {
80
+ isLeadIdPassed: false,
81
+ postURL: '',
82
+ flowName: FlowsTypes.CONNECT_EXPRESS,
83
+ mobileData: {
84
+ countryCode: defaultCountry,
85
+ mobile: ''
86
+ },
87
+ nidData: {
88
+ nid: '',
89
+ dob: getEighteenYearsAgo(),
90
+ type: ''
91
+ },
92
+ civilIdData: {
93
+ civilId: ''
94
+ },
95
+ otpData: {
96
+ otp: '',
97
+ authFor: AuthForType.MOBILE
98
+ }
99
+ }
100
+ };
101
+ export var connectSlice = createSlice({
102
+ name: 'connectExpress/store',
103
+ initialState: initialState,
104
+ reducers: {
105
+ setIsLeadIdPassed: function (state, action) {
106
+ state.data.isLeadIdPassed = action.payload;
107
+ },
108
+ clearError: function (state) {
109
+ state.error = null;
110
+ },
111
+ setError: function (state, action) {
112
+ state.error = action.payload;
113
+ },
114
+ setResponseData: function (state, action) {
115
+ state.data.responseData = __assign(__assign({}, state.data.responseData), action.payload);
116
+ },
117
+ stopLoader: function (state) {
118
+ state.loading = false;
119
+ },
120
+ resetMobileScreen: function (state, action) {
121
+ state.data.mobileData = __assign(__assign(__assign({}, state.data.mobileData), initialState.data.mobileData), { countryCode: action.payload });
122
+ },
123
+ resetNIDScreen: function (state) {
124
+ state.data.nidData = __assign(__assign({}, state.data.nidData), initialState.data.nidData);
125
+ },
126
+ resetCivilScreen: function (state) {
127
+ state.data.civilIdData = __assign(__assign({}, state.data.civilIdData), initialState.data.civilIdData);
128
+ },
129
+ resetOTPScreen: function (state) {
130
+ state.data.otpData.otp = '';
131
+ },
132
+ setPostUrl: function (state, action) {
133
+ state.data.postURL = action.payload;
134
+ },
135
+ resetStore: function (state) {
136
+ var countryCode = state.data.mobileData.countryCode;
137
+ var postURL = state.data.postURL;
138
+ state.data = __assign(__assign({}, initialState.data), { mobileData: __assign(__assign({}, initialState.data.mobileData), { countryCode: countryCode }), postURL: postURL });
139
+ }
140
+ },
141
+ extraReducers: function (builder) {
142
+ builder
143
+ .addCase(getLeadByIdAsync.pending, function (state) {
144
+ state.error = null;
145
+ state.loading = true;
146
+ })
147
+ .addCase(getLeadByIdAsync.fulfilled, function (state, action) {
148
+ state.loading = false;
149
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { leadData: action.payload });
150
+ })
151
+ .addCase(getLeadByIdAsync.rejected, function (state, action) {
152
+ state.loading = false;
153
+ state.error = action.error.message;
154
+ })
155
+ .addCase(getBrandListAsync.pending, function (state) {
156
+ state.loading = true;
157
+ state.error = null;
158
+ })
159
+ .addCase(getBrandListAsync.fulfilled, function (state, action) {
160
+ state.loading = false;
161
+ state.data.responseData = __assign(__assign({}, state.data.responseData), { brandList: action.payload });
162
+ })
163
+ .addCase(getBrandListAsync.rejected, function (state, action) {
164
+ state.loading = false;
165
+ state.error = action.error.message;
166
+ });
167
+ }
168
+ });
169
+ export var clearError = (_a = connectSlice.actions, _a.clearError), stopLoader = _a.stopLoader, setIsLeadIdPassed = _a.setIsLeadIdPassed, resetMobileScreen = _a.resetMobileScreen, resetOTPScreen = _a.resetOTPScreen, resetNIDScreen = _a.resetNIDScreen, resetCivilScreen = _a.resetCivilScreen, resetStore = _a.resetStore, setError = _a.setError, setResponseData = _a.setResponseData, setPostUrl = _a.setPostUrl;
170
+ export default connectSlice.reducer;
171
+ export var connectExpressSelector = function (state) { return state.connectExpress; };
@@ -127,7 +127,7 @@ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function
127
127
  merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
128
128
  name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names,
129
129
  contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact,
130
- flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info,
130
+ flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
131
131
  entityTypes: entityTypes
132
132
  },
133
133
  token: token
@@ -210,7 +210,7 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
210
210
  merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
211
211
  name: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.names,
212
212
  contact: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.contact,
213
- flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info,
213
+ flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
214
214
  entityTypes: entityTypes
215
215
  },
216
216
  formData: params
@@ -359,7 +359,7 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', fun
359
359
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
360
360
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
361
361
  thunkApi.dispatch(handleNextScreenStep());
362
- return [2, { response: __assign(__assign({}, data), { flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info }), formData: params }];
362
+ return [2, { response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] }), formData: params }];
363
363
  }
364
364
  });
365
365
  }); });
@@ -14,11 +14,7 @@ export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
14
14
  countries: CountryCode[];
15
15
  countryCode: any;
16
16
  notification: any;
17
- flows: {
18
- name: string;
19
- status: string;
20
- url: string;
21
- }[];
17
+ flows: any;
22
18
  };
23
19
  token: string;
24
20
  }, string, {}>;
@@ -47,11 +43,7 @@ export declare const verifyLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
47
43
  countries: CountryCode[];
48
44
  countryCode: any;
49
45
  notification: any;
50
- flows: {
51
- name: string;
52
- status: string;
53
- url: string;
54
- }[];
46
+ flows: any;
55
47
  };
56
48
  formData: {
57
49
  otp: string;
@@ -50,7 +50,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
50
  import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
53
- import { BUSINESS_FLOW_SUCCESS, INDIVIDUAl_STEP_NAMES } from '../../../constants';
53
+ import { 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
55
  var payload, settings, data, boardData, individualData, countryCode, boardInfoData, boardInfoStatus, countries, board_id, board_info_id, notification, _a, id, type, info, hasIndividualCompleted;
56
56
  var _b, _c, _d, _e;
@@ -129,7 +129,7 @@ export var verifyLeadToken = createAsyncThunk('individualVerifyLeadToken', funct
129
129
  countries: countries,
130
130
  countryCode: countryCode,
131
131
  notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
132
- flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || [])
132
+ flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
133
133
  },
134
134
  token: token
135
135
  }];
@@ -267,7 +267,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyIndividualLeadOTP', function
267
267
  countries: countries,
268
268
  countryCode: countryCode,
269
269
  notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification,
270
- flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || [])
270
+ flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []
271
271
  },
272
272
  formData: __assign({}, params)
273
273
  }];
@@ -398,7 +398,7 @@ export var updateBoardSuccess = createAsyncThunk('individualUpdateBoardSuccess',
398
398
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
399
399
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
400
400
  thunkApi.dispatch(handleNextScreenStep());
401
- return [2, { response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || []) }), formData: params }];
401
+ return [2, { response: __assign(__assign({}, data), { flows: (boardInfoStatus === null || boardInfoStatus === void 0 ? void 0 : boardInfoStatus.info) || [] }), formData: params }];
402
402
  }
403
403
  });
404
404
  }); });
@@ -463,8 +463,7 @@ export var individualSlice = createSlice({
463
463
  var _c = boardResponse || {}, countries = _c.countries, user = _c.user, countryCode = _c.countryCode;
464
464
  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;
465
465
  var _e = state.data.individualData.responseBody || {}, sourceIncomeList = _e.sourceIncomeList, monthlyIncomeList = _e.monthlyIncomeList, occupationList = _e.occupationList;
466
- 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); })) ||
467
- (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
466
+ 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); })) || (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
468
467
  if (!!selectedSourceIncome)
469
468
  state.data.individualData.sourceIncome = selectedSourceIncome;
470
469
  var code = (user === null || user === void 0 ? void 0 : user.employer_country) || countryCode;
@@ -524,8 +523,7 @@ export var individualSlice = createSlice({
524
523
  var _c = boardResponse || {}, countries = _c.countries, user = _c.user, countryCode = _c.countryCode;
525
524
  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;
526
525
  var _e = state.data.individualData.responseBody || {}, sourceIncomeList = _e.sourceIncomeList, monthlyIncomeList = _e.monthlyIncomeList, occupationList = _e.occupationList;
527
- 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); })) ||
528
- (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
526
+ 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); })) || (sourceIncomeList === null || sourceIncomeList === void 0 ? void 0 : sourceIncomeList[0]);
529
527
  if (!!selectedSourceIncome)
530
528
  state.data.individualData.sourceIncome = selectedSourceIncome;
531
529
  var code = (user === null || user === void 0 ? void 0 : user.employer_country) || countryCode;
@@ -29,11 +29,7 @@ export declare const verifyOperationToken: import("@reduxjs/toolkit").AsyncThunk
29
29
  data: any;
30
30
  token: string;
31
31
  boardId: string;
32
- flows: {
33
- name: string;
34
- status: string;
35
- url: string;
36
- }[];
32
+ flows: any;
37
33
  }, {
38
34
  token: string;
39
35
  boardId: string;
@@ -56,11 +52,7 @@ export declare const resetPassword: import("@reduxjs/toolkit").AsyncThunk<{
56
52
  export declare const retrieveBoardResetPasswordSuccess: import("@reduxjs/toolkit").AsyncThunk<{
57
53
  id: any;
58
54
  response: {
59
- flows: {
60
- name: string;
61
- status: string;
62
- url: string;
63
- }[];
55
+ flows: any;
64
56
  };
65
57
  }, void, {}>;
66
58
  declare type VerifyData = {
@@ -50,7 +50,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
50
  import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
53
- import { BUSINESS_FLOW_SUCCESS, PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '../../../constants';
53
+ import { PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '../../../constants';
54
54
  export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
55
55
  var payload, data, boardInfoData, boardData, board_id, countryIso2, info, hasPasswordCompleted;
56
56
  var _a, _b, _c, _d;
@@ -93,7 +93,7 @@ export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', functio
93
93
  _e.label = 5;
94
94
  case 5: return [2, {
95
95
  data: data,
96
- boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []), user: boardData === null || boardData === void 0 ? void 0 : boardData.user, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names, contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
96
+ boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names, contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
97
97
  token: token
98
98
  }];
99
99
  }
@@ -212,7 +212,7 @@ export var updateBoardSuccess = createAsyncThunk('passwordUpdateBoardSuccess', f
212
212
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
213
213
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
214
214
  thunkApi.dispatch(handleNextScreenStep());
215
- return [2, { response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []) }), formData: params }];
215
+ return [2, { response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] }), formData: params }];
216
216
  }
217
217
  });
218
218
  }); });
@@ -237,7 +237,7 @@ export var verifyOperationToken = createAsyncThunk('verifyOperationToken', funct
237
237
  _a.label = 3;
238
238
  case 3:
239
239
  thunkApi.dispatch(handleNextScreenStep('PASSWORD_CREATE_PASSWORD_STEP'));
240
- return [2, { data: data, token: token, boardId: boardId, flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []) }];
240
+ return [2, { data: data, token: token, boardId: boardId, flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] }];
241
241
  }
242
242
  });
243
243
  }); });
@@ -305,7 +305,7 @@ export var retrieveBoardResetPasswordSuccess = createAsyncThunk('retrieveBoardRe
305
305
  thunkApi.dispatch(handleNextScreenStep());
306
306
  (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, { id: id });
307
307
  (_e = (_d = settings.data.appConfig).onFlowCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, id);
308
- return [2, { id: id, response: { flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []) } }];
308
+ return [2, { id: id, response: { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] } }];
309
309
  }
310
310
  });
311
311
  }); });
@@ -51,7 +51,7 @@ import API from '../../../api';
51
51
  import { FlowsTypes } from '../../../@types';
52
52
  import { hasKey } from '../../../utils';
53
53
  import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2 } from '../../../app/settings';
54
- import { BUSINESS_FLOW_SUCCESS, TAX_STEP_NAMES } from '../../../constants';
54
+ import { TAX_STEP_NAMES } from '../../../constants';
55
55
  export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
56
56
  var payload, data, boardData, boardInfoData, info, countryIso2, hasTaxCompleted;
57
57
  var _a, _b, _c;
@@ -93,7 +93,7 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (to
93
93
  _d.label = 5;
94
94
  case 5: return [2, {
95
95
  data: data,
96
- boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []), entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
96
+ boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
97
97
  token: token
98
98
  }];
99
99
  }
@@ -213,7 +213,7 @@ export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function
213
213
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
214
214
  thunkApi.dispatch(handleNextScreenStep());
215
215
  return [2, {
216
- response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat((boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || []), user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
216
+ response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
217
217
  formData: params
218
218
  }];
219
219
  }
@@ -80,8 +80,6 @@ var TAC = function () {
80
80
  var handleTACCheckedChange = function (event, checked) {
81
81
  tacControl.field.onChange(checked);
82
82
  };
83
- return (_jsxs(ScreenContainer, __assign({ sx: { mt: 3, mb: 1.625 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr
84
- ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR
85
- : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })));
83
+ return (_jsxs(ScreenContainer, __assign({ sx: { mt: 3, mb: 1.625 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })));
86
84
  };
87
85
  export default React.memo(TAC);
@@ -1,26 +1,16 @@
1
1
  import { MAX_FILE_SIZE, VALID_FILE_FORMATS, REGEX_ALPHANUMERIC, REGEX_IBAN } from '../../../../constants';
2
2
  import * as yup from 'yup';
3
3
  export var BankValidation = yup.object().shape({
4
- iban: yup
5
- .string()
6
- .matches(REGEX_IBAN, 'invalid_iban_format')
7
- .min(15, 'invalid_iban_format')
8
- .max(34, 'invalid_iban_format')
9
- .required('alert_iban'),
4
+ iban: yup.string().matches(REGEX_IBAN, 'invalid_iban_format').min(15, 'invalid_iban_format').max(34, 'invalid_iban_format').required('alert_iban'),
10
5
  bankName: yup.string().optional(),
11
- beneficiaryName: yup
12
- .string()
13
- .matches(REGEX_ALPHANUMERIC, 'beneficiary_name_invalid')
14
- .required('beneficiary_name_required'),
6
+ beneficiaryName: yup.string().matches(REGEX_ALPHANUMERIC, 'beneficiary_name_invalid').required('beneficiary_name_required'),
15
7
  bankStatementId: yup.string().optional(),
16
8
  bankStatementFile: yup
17
9
  .mixed()
18
10
  .test({
19
11
  test: function (value) {
20
12
  if (!!value)
21
- return VALID_FILE_FORMATS.includes(value === null || value === void 0 ? void 0 : value.type) && (value === null || value === void 0 ? void 0 : value.size) < MAX_FILE_SIZE
22
- ? true
23
- : this.createError({ message: 'alert_file_upload' });
13
+ return VALID_FILE_FORMATS.includes(value === null || value === void 0 ? void 0 : value.type) && (value === null || value === void 0 ? void 0 : value.size) < MAX_FILE_SIZE ? true : this.createError({ message: 'alert_file_upload' });
24
14
  return true;
25
15
  }
26
16
  })
@@ -28,26 +18,16 @@ export var BankValidation = yup.object().shape({
28
18
  confirmPolicy: yup.boolean().required('alert_bank_confirm').isTrue('alert_bank_confirm')
29
19
  });
30
20
  export var BankKWFLValidation = yup.object().shape({
31
- iban: yup
32
- .string()
33
- .matches(REGEX_IBAN, 'invalid_iban_format')
34
- .min(15, 'invalid_iban_format')
35
- .max(34, 'invalid_iban_format')
36
- .required('alert_iban'),
21
+ iban: yup.string().matches(REGEX_IBAN, 'invalid_iban_format').min(15, 'invalid_iban_format').max(34, 'invalid_iban_format').required('alert_iban'),
37
22
  bankName: yup.string().optional(),
38
- beneficiaryName: yup
39
- .string()
40
- .matches(REGEX_ALPHANUMERIC, 'beneficiary_name_invalid')
41
- .required('beneficiary_name_required'),
23
+ beneficiaryName: yup.string().matches(REGEX_ALPHANUMERIC, 'beneficiary_name_invalid').required('beneficiary_name_required'),
42
24
  bankStatementId: yup.string().optional(),
43
25
  bankStatementFile: yup
44
26
  .mixed()
45
27
  .test({
46
28
  test: function (value) {
47
29
  if (!!value)
48
- return VALID_FILE_FORMATS.includes(value === null || value === void 0 ? void 0 : value.type) && (value === null || value === void 0 ? void 0 : value.size) < MAX_FILE_SIZE
49
- ? true
50
- : this.createError({ message: 'alert_file_upload' });
30
+ return VALID_FILE_FORMATS.includes(value === null || value === void 0 ? void 0 : value.type) && (value === null || value === void 0 ? void 0 : value.size) < MAX_FILE_SIZE ? true : this.createError({ message: 'alert_file_upload' });
51
31
  return true;
52
32
  }
53
33
  })
@@ -51,9 +51,7 @@ var SuccessWithFlowButtons = function () {
51
51
  var _g = data.verify.responseBody || {}, flows = _g.flows, nameObj = _g.name, entity = _g.entity, brand = _g.brand, bank = _g.bank_account, merchant = _g.merchant, user = _g.user, business = _g.business;
52
52
  var _h = useState([]), buttons = _h[0], setButtons = _h[1];
53
53
  var _j = nameObj || {}, en = _j.en, ar = _j.ar;
54
- var username = isAr
55
- ? concatenateObjectValues(ar || en, ['first', 'last'])
56
- : concatenateObjectValues(en, ['first', 'last']);
54
+ var username = isAr ? concatenateObjectValues(ar || en, ['first', 'last']) : concatenateObjectValues(en, ['first', 'last']);
57
55
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
58
56
  var bankName = shortenString(bank === null || bank === void 0 ? void 0 : bank.name, 20) || t('bank');
59
57
  var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
@@ -82,6 +80,7 @@ var SuccessWithFlowButtons = function () {
82
80
  business_type: entityLegalName,
83
81
  license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
84
82
  bank_name: bankName,
83
+ brand: brandName,
85
84
  iban: iban ? t('masking_symbols') + iban : '',
86
85
  tax_id: taxID ? t('masking_symbols') + showLastFour(taxID) : ''
87
86
  });
@@ -44,11 +44,11 @@ import { useLanguage, useAppSelector } from '../../../../hooks';
44
44
  import Collapse from '../../../../components/Collapse';
45
45
  import SimpleList from '../../../../components/SimpleList';
46
46
  import ExpandIcon from '../../../../components/ExpandIcon';
47
+ import { sortActivitiesByName } from '../../../../utils';
47
48
  import { ScreenContainer } from '../../../shared/Containers';
48
49
  import { brandSelector } from '../../../app/brand/brandStore';
49
50
  import CheckIcon from '@mui/icons-material/Check';
50
51
  import { MandatoryStyled } from './OperationStartDate';
51
- import Search from '../../../../features/shared/Search';
52
52
  export var InputLabelStyled = styled(Text)(function (_a) {
53
53
  var theme = _a.theme;
54
54
  return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
@@ -113,12 +113,14 @@ var ActivitiesList = function (_a) {
113
113
  var activitiesControl = useController({ name: 'activities', control: control });
114
114
  var controlValue = activitiesControl.field.value;
115
115
  var _g = React.useState(false), isHovered = _g[0], setIsHovered = _g[1];
116
- var verify = data.verify, brandActivities = data.brandActivities;
116
+ var verify = data.verify;
117
117
  var activities = (verify.responseBody || {}).activities;
118
118
  var isCR = ((_d = (_c = (_b = verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) === null || _c === void 0 ? void 0 : _c.license) === null || _d === void 0 ? void 0 : _d.type) === 'commercial_registration';
119
119
  React.useEffect(function () {
120
120
  if ((activities === null || activities === void 0 ? void 0 : activities.length) > 0) {
121
- setActivitiesMenuList(activities);
121
+ var list = __spreadArray([], activities, true);
122
+ var sortedList = sortActivitiesByName(list, isAr ? 'name.ar' : 'name.en');
123
+ setActivitiesMenuList(sortedList);
122
124
  }
123
125
  }, [activities]);
124
126
  var onOpenList = function (event) {
@@ -152,17 +154,9 @@ var ActivitiesList = function (_a) {
152
154
  var getSelectedActivityFlag = function (item) {
153
155
  return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === item.id; });
154
156
  };
155
- var handleSearch = function (value) {
156
- var filteredList = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
157
- var _a, _b, _c, _d;
158
- return ((_b = (_a = activity === null || activity === void 0 ? void 0 : activity.name) === null || _a === void 0 ? void 0 : _a.en) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(value.toLowerCase())) ||
159
- ((_d = (_c = activity === null || activity === void 0 ? void 0 : activity.name) === null || _c === void 0 ? void 0 : _c.ar) === null || _d === void 0 ? void 0 : _d.toLowerCase().includes(value.toLowerCase()));
160
- });
161
- setActivitiesMenuList(filteredList);
162
- };
163
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsxs(InputLabelStyled, { children: [t(isCR ? 'activities' : 'category'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsx(Tooltip, __assign({ title: t('activities_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), 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: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
164
- var _a, _b, _c;
165
- return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: item.id === ((_a = getSelectedActivityFlag(item)) === null || _a === void 0 ? void 0 : _a.id) }, { children: isAr ? (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = item === null || item === void 0 ? void 0 : item.name) === null || _c === void 0 ? void 0 : _c.en })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
166
- } })] }))] })] }) })));
157
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsxs(InputLabelStyled, { children: [t(isCR ? 'activities' : 'category'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsx(Tooltip, __assign({ title: t('activities_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name.en', searchValuePath: isAr ? 'name.ar' : 'name.en', list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
158
+ var _a, _b, _c;
159
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: item.id === ((_a = getSelectedActivityFlag(item)) === null || _a === void 0 ? void 0 : _a.id) }, { children: isAr ? (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = item === null || item === void 0 ? void 0 : item.name) === null || _c === void 0 ? void 0 : _c.en })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
160
+ } }) }))] })] }) })));
167
161
  };
168
162
  export default ActivitiesList;
@@ -130,8 +130,7 @@ var CustomerBase = function (_a) {
130
130
  var handleSearch = function (value) {
131
131
  var _a;
132
132
  var filteredList = (_a = response === null || response === void 0 ? void 0 : response.customerBases) === null || _a === void 0 ? void 0 : _a.filter(function (location) {
133
- return location.name.en.toLowerCase().startsWith(value.toLowerCase()) ||
134
- location.name.ar.toLowerCase().startsWith(value.toLowerCase());
133
+ return location.name.en.toLowerCase().startsWith(value.toLowerCase()) || location.name.ar.toLowerCase().startsWith(value.toLowerCase());
135
134
  });
136
135
  setCustomerLocationsList(filteredList);
137
136
  };
@@ -84,8 +84,7 @@ var ExpectedCustomers = function (_a) {
84
84
  var handleSearch = function (value) {
85
85
  var _a;
86
86
  var filteredList = (_a = response === null || response === void 0 ? void 0 : response.expectedCustomerSales) === null || _a === void 0 ? void 0 : _a.filter(function (customer) {
87
- return customer.name.en.toLowerCase().startsWith(value.toLowerCase()) ||
88
- customer.name.ar.toLowerCase().startsWith(value.toLowerCase());
87
+ return customer.name.en.toLowerCase().startsWith(value.toLowerCase()) || customer.name.ar.toLowerCase().startsWith(value.toLowerCase());
89
88
  });
90
89
  setExpectedCustomersList(filteredList);
91
90
  };
@@ -100,9 +100,7 @@ var ExpectedSalesRange = function (_a) {
100
100
  salesRange.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase()) ||
101
101
  salesRange.name.ar.toLowerCase().includes(value.toLowerCase()) ||
102
102
  ((_a = salesRange.sub) === null || _a === void 0 ? void 0 : _a.find(function (obj) { return obj.name.en.toLowerCase().includes(value.toLowerCase()); })) ||
103
- ((_b = salesRange.sub) === null || _b === void 0 ? void 0 : _b.find(function (obj) {
104
- return obj.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase());
105
- })) ||
103
+ ((_b = salesRange.sub) === null || _b === void 0 ? void 0 : _b.find(function (obj) { return obj.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase()); })) ||
106
104
  ((_c = salesRange.sub) === null || _c === void 0 ? void 0 : _c.find(function (obj) { return obj.name.ar.toLowerCase().includes(value.toLowerCase()); }));
107
105
  });
108
106
  setExpectedSalesRangeList(filteredList);
@@ -77,8 +77,6 @@ var RefundPolicy = function () {
77
77
  var handleRefundCheckedChange = function (event, checked) {
78
78
  refundControl.field.onChange(checked);
79
79
  };
80
- return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: refundChecked, onChange: handleRefundCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_refund_policy'), _jsx(LinkStyled, __assign({ href: isAr
81
- ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.REFUND_AR
82
- : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.REFUND_EN, target: '_blank', underline: 'always' }, { children: t('refund_policy_compliance') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
80
+ return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: refundChecked, onChange: handleRefundCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_refund_policy'), _jsx(LinkStyled, __assign({ href: isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.REFUND_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.REFUND_EN, target: '_blank', underline: 'always' }, { children: t('refund_policy_compliance') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
83
81
  };
84
82
  export default RefundPolicy;
@@ -79,8 +79,6 @@ var TAC = function (_a) {
79
79
  var handleTACCheckedChange = function (event, checked) {
80
80
  tacControl.field.onChange(checked);
81
81
  };
82
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.75 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr
83
- ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR
84
- : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })) })));
82
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.75 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })) })));
85
83
  };
86
84
  export default React.memo(TAC);
@@ -37,8 +37,6 @@ var TransactionPolicy = function () {
37
37
  var handleTransactionCheckedChange = function (event, checked) {
38
38
  transactionControl.field.onChange(checked);
39
39
  };
40
- return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: transactionChecked, onChange: handleTransactionCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_chargeback_policy'), _jsx(LinkStyled, __assign({ href: isAr
41
- ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TRANSACTION_AR
42
- : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TRANSACTION_EN, target: '_blank', underline: 'always' }, { children: t('chargeback_policy') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
40
+ return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: transactionChecked, onChange: handleTransactionCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_chargeback_policy'), _jsx(LinkStyled, __assign({ href: isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TRANSACTION_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TRANSACTION_EN, target: '_blank', underline: 'always' }, { children: t('chargeback_policy') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
43
41
  };
44
42
  export default TransactionPolicy;