@tap-payments/auth-jsconnect 1.0.63 → 1.0.65

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.
@@ -232,5 +232,7 @@
232
232
  "individual_flow_pending": "Individual",
233
233
  "bank_flow_pending": "Bank",
234
234
  "password_flow_pending": "Password",
235
+ "business_flow_pending": "Business",
236
+ "business_flow_completed": "Business",
235
237
  "continue": "Continue"
236
238
  }
@@ -239,12 +239,14 @@
239
239
  "cr_number": "CR Number",
240
240
  "fl_number": "FL Number",
241
241
  "tax_flow_completed": "Tax",
242
- "individual_flow_completed": "Individual",
242
+ "individual_flow_completed": "Individual {{individual_name}}",
243
243
  "bank_flow_completed": "Bank",
244
244
  "password_flow_completed": "Password",
245
245
  "tax_flow_pending": "Tax",
246
- "individual_flow_pending": "Individual",
246
+ "individual_flow_pending": "Individual {{individual_name}}",
247
247
  "bank_flow_pending": "Bank",
248
248
  "password_flow_pending": "Password",
249
+ "business_flow_pending": "Business",
250
+ "business_flow_completed": "Business",
249
251
  "continue": "Continue"
250
252
  }
@@ -41,14 +41,16 @@ export declare const ICONS_NAMES: {
41
41
  outlook_White_ICON: string;
42
42
  Apple_Filled_ICON: string;
43
43
  apple_white_icon: string;
44
- Tax_filled_icon: string;
45
- Tax_white_icon: string;
46
- Bank_filled_icon: string;
47
- Bank_white_icon: string;
48
- User_filled_icon: string;
49
- User_white_icon: string;
50
- Password_filled_icon: string;
51
- Password_white_icon: string;
44
+ tax_filled_icon: string;
45
+ tax_white_icon: string;
46
+ bank_filled_icon: string;
47
+ bank_white_icon: string;
48
+ individual_filled_icon: string;
49
+ individual_white_icon: string;
50
+ password_filled_icon: string;
51
+ password_white_icon: string;
52
+ business_filled_icon: string;
53
+ business_white_icon: string;
52
54
  Arrow_filled_right_icon: string;
53
55
  Arrow_white_right_icon: string;
54
56
  };
@@ -41,14 +41,16 @@ export var ICONS_NAMES = {
41
41
  outlook_White_ICON: 'https://dash.b-cdn.net/icons/menu/Outlook-white.svg',
42
42
  Apple_Filled_ICON: 'https://dash.b-cdn.net/icons/menu/Apple-filled.svg',
43
43
  apple_white_icon: 'https://dash.b-cdn.net/icons/menu/Apple-white.svg',
44
- Tax_filled_icon: 'https://dash.b-cdn.net/icons/menu/tax-filled.svg',
45
- Tax_white_icon: 'https://dash.b-cdn.net/icons/menu/tax-white.svg',
46
- Bank_filled_icon: 'https://dash.b-cdn.net/icons/menu/bank-filled.svg',
47
- Bank_white_icon: 'https://dash.b-cdn.net/icons/menu/bank-white.svg',
48
- User_filled_icon: 'https://dash.b-cdn.net/icons/menu/user-filled.svg',
49
- User_white_icon: 'https://dash.b-cdn.net/icons/menu/user-white.svg',
50
- Password_filled_icon: 'https://dash.b-cdn.net/icons/menu/password-filled.svg',
51
- Password_white_icon: 'https://dash.b-cdn.net/icons/menu/password-white.svg',
44
+ tax_filled_icon: 'https://dash.b-cdn.net/icons/menu/tax-filled.svg',
45
+ tax_white_icon: 'https://dash.b-cdn.net/icons/menu/tax-white.svg',
46
+ bank_filled_icon: 'https://dash.b-cdn.net/icons/menu/bank-filled.svg',
47
+ bank_white_icon: 'https://dash.b-cdn.net/icons/menu/bank-white.svg',
48
+ individual_filled_icon: 'https://dash.b-cdn.net/icons/menu/user-filled.svg',
49
+ individual_white_icon: 'https://dash.b-cdn.net/icons/menu/user-white.svg',
50
+ password_filled_icon: 'https://dash.b-cdn.net/icons/menu/password-filled.svg',
51
+ password_white_icon: 'https://dash.b-cdn.net/icons/menu/password-white.svg',
52
+ business_filled_icon: 'https://dash.b-cdn.net/icons/menu/business-filled.svg',
53
+ business_white_icon: 'https://dash.b-cdn.net/icons/menu/business-white.svg',
52
54
  Arrow_filled_right_icon: 'https://dash.b-cdn.net/icons/menu/right-arrow-filled.svg',
53
55
  Arrow_white_right_icon: 'https://dash.b-cdn.net/icons/menu/right-arrow-white.svg'
54
56
  };
@@ -63,6 +63,9 @@ export declare const updateLeadSuccess: import("@reduxjs/toolkit").AsyncThunk<{
63
63
  response: any;
64
64
  formData: void;
65
65
  } | undefined, void, {}>;
66
+ export declare const updateStepName: import("@reduxjs/toolkit").AsyncThunk<{
67
+ response: any;
68
+ }, string, {}>;
66
69
  declare type VerifyData = {
67
70
  token: string;
68
71
  };
@@ -79,10 +79,10 @@ export var getCountries = createAsyncThunk('getCountries', function (_, thunkApi
79
79
  });
80
80
  }); });
81
81
  export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
82
- var payload, data, leadResponse;
83
- var _a, _b, _c;
84
- return __generator(this, function (_d) {
85
- switch (_d.label) {
82
+ var payload, data, leadResponse, number;
83
+ var _a;
84
+ return __generator(this, function (_b) {
85
+ switch (_b.label) {
86
86
  case 0:
87
87
  payload = {
88
88
  service_name: 'tap_email',
@@ -90,28 +90,29 @@ export var verifyLeadToken = createAsyncThunk('verifyLeadToken', function (token
90
90
  };
91
91
  return [4, API.leadService.verifyLeadToken(payload)];
92
92
  case 1:
93
- data = (_d.sent()).data;
93
+ data = (_b.sent()).data;
94
94
  leadResponse = undefined;
95
95
  if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 4];
96
96
  return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
97
97
  case 2:
98
- leadResponse = _d.sent();
99
- return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id, licenseNumber: (_c = (_b = (_a = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _a === void 0 ? void 0 : _a.entity) === null || _b === void 0 ? void 0 : _b.license) === null || _c === void 0 ? void 0 : _c.number }))];
98
+ leadResponse = _b.sent();
99
+ number = (((_a = leadResponse.data.entity) === null || _a === void 0 ? void 0 : _a.license) || {}).number;
100
+ return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id, licenseNumber: number }))];
100
101
  case 3:
101
- _d.sent();
102
+ _b.sent();
102
103
  if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH) {
103
104
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
104
105
  }
105
106
  if (data.step_name === 'business_info') {
106
107
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
107
108
  }
108
- _d.label = 4;
109
+ _b.label = 4;
109
110
  case 4: return [2, { data: data, leadData: leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data, token: token }];
110
111
  }
111
112
  });
112
113
  }); });
113
114
  export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
114
- var _a, business, settings, isNID, responseBody, payload, data, steps, hasBusinessCompleted;
115
+ var _a, business, settings, isNID, responseBody, stepName, payload, data, steps, hasBusinessCompleted;
115
116
  var _b, _c, _d;
116
117
  return __generator(this, function (_e) {
117
118
  switch (_e.label) {
@@ -119,17 +120,19 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
119
120
  _a = thunkApi.getState(), business = _a.business, settings = _a.settings;
120
121
  isNID = business.data.otpData.isNID;
121
122
  responseBody = (isNID ? business.data.nidData : business.data.verify).responseBody;
123
+ stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
122
124
  payload = {
123
125
  data: params.otp,
124
126
  service_name: (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _b === void 0 ? void 0 : _b.service_name,
125
127
  verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
126
- step_name: isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH,
128
+ step_name: stepName,
127
129
  encryption_contract: ['data']
128
130
  };
129
131
  return [4, API.leadService.verifyLeadOTP(payload)];
130
132
  case 1:
131
133
  data = (_e.sent()).data;
132
134
  if (!data.errors) {
135
+ thunkApi.dispatch(updateStepName(stepName));
133
136
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
134
137
  steps = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps) || [];
135
138
  hasBusinessCompleted = Object.keys(steps).find(function (key) { return key === BUSINESS_STEP_NAMES.BUSINESS_SUCCESS; });
@@ -153,13 +156,14 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
153
156
  });
154
157
  }); });
155
158
  export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
156
- var _a, settings, business, identification_id_type, headers, requestBody, data;
159
+ var _a, settings, business, identification_id_type, stepName, headers, requestBody, data;
157
160
  var _b, _c, _d, _e, _f;
158
161
  return __generator(this, function (_g) {
159
162
  switch (_g.label) {
160
163
  case 0:
161
164
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
162
165
  identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
166
+ stepName = BUSINESS_STEP_NAMES.IDENTITY_AUTH;
163
167
  headers = {
164
168
  lead_id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.id) || '',
165
169
  device_identifier: (_d = (_c = settings.data.deviceInfo) === null || _c === void 0 ? void 0 : _c.browser) === null || _d === void 0 ? void 0 : _d.browser_id
@@ -169,13 +173,14 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
169
173
  identification_id_type: identification_id_type,
170
174
  date_of_birth: params.dob,
171
175
  country_code: business.data.businessCountry.iso2,
172
- step_name: BUSINESS_STEP_NAMES.IDENTITY_AUTH,
176
+ step_name: stepName,
173
177
  encryption_contract: ['country_code', 'identification_id', 'identification_id_type', 'date_of_birth']
174
178
  };
175
179
  return [4, API.leadService.updateLeadIdentity(requestBody, { headers: headers })];
176
180
  case 1:
177
181
  data = (_g.sent()).data;
178
182
  if (!data.errors && !params.isResend) {
183
+ thunkApi.dispatch(updateStepName(stepName));
179
184
  thunkApi.dispatch(handleNextScreenStep());
180
185
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
181
186
  }
@@ -255,7 +260,7 @@ export var createAccount = createAsyncThunk('createAccount', function (params, t
255
260
  });
256
261
  }); });
257
262
  export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
258
- var _a, settings, business, channel, activities, requestBody, headers, data;
263
+ var _a, settings, business, channel, activities, stepName, id, requestBody, headers, data;
259
264
  var _b, _c, _d, _e;
260
265
  return __generator(this, function (_f) {
261
266
  switch (_f.label) {
@@ -269,17 +274,20 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
269
274
  var en = _a.en;
270
275
  return en;
271
276
  });
277
+ stepName = BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES;
278
+ id = (_c = business.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.entity_id;
272
279
  requestBody = {
273
280
  activities: activities,
274
281
  channel_services: channel,
275
282
  business_operation_start_at: params.operationStartDate,
276
- step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES
283
+ step_name: stepName
277
284
  };
278
- headers = { entity_id: (_c = business.data.businessTypeData.responseBody) === null || _c === void 0 ? void 0 : _c.entity_id };
285
+ headers = { entity_id: id };
279
286
  return [4, API.entityService.createEntityInfo(requestBody, { headers: headers })];
280
287
  case 1:
281
288
  data = (_f.sent()).data;
282
289
  if (!!data.errors) return [3, 3];
290
+ thunkApi.dispatch(updateStepName(stepName));
283
291
  return [4, thunkApi.dispatch(retrieveDataList())];
284
292
  case 2:
285
293
  _f.sent();
@@ -310,7 +318,7 @@ export var retrieveDataList = createAsyncThunk('retrieveDataList', function () {
310
318
  });
311
319
  }); });
312
320
  export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
313
- var _a, settings, business, customerBase, requestBody, data;
321
+ var _a, settings, business, customerBase, stepName, requestBody, data;
314
322
  var _b, _c, _d, _e, _f;
315
323
  return __generator(this, function (_g) {
316
324
  switch (_g.label) {
@@ -320,6 +328,7 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
320
328
  var title = _a.title;
321
329
  return title;
322
330
  });
331
+ stepName = BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS;
323
332
  requestBody = {
324
333
  customers_base: customerBase,
325
334
  id: (_b = business.data.businessTypeData.responseBody) === null || _b === void 0 ? void 0 : _b.entity_id,
@@ -327,12 +336,13 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
327
336
  yearly_sales_range: ((_d = params.expectedSalesRange) === null || _d === void 0 ? void 0 : _d.title) || '',
328
337
  agree_refund: params.refundPolicy,
329
338
  agree_chargeback: params.transactionPolicy,
330
- step_name: BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS
339
+ step_name: stepName
331
340
  };
332
341
  return [4, API.entityService.updateEntityInfo(requestBody)];
333
342
  case 1:
334
343
  data = (_g.sent()).data;
335
344
  if (!data.errors) {
345
+ thunkApi.dispatch(updateStepName(stepName));
336
346
  thunkApi.dispatch(handleNextScreenStep());
337
347
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, requestBody);
338
348
  }
@@ -341,14 +351,15 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
341
351
  });
342
352
  }); });
343
353
  export var updateLeadSuccess = createAsyncThunk('updateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
344
- var _a, settings, business, id, payload, data;
345
- var _b, _c, _d, _e;
346
- return __generator(this, function (_f) {
347
- switch (_f.label) {
354
+ var _a, settings, business, _b, steps, id, flowCompleted, payload, data;
355
+ var _c, _d, _e, _f;
356
+ return __generator(this, function (_g) {
357
+ switch (_g.label) {
348
358
  case 0:
349
359
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
350
- id = (business.data.otpData.responseBody || {}).id;
351
- if (!id)
360
+ _b = business.data.verify.responseBody || {}, steps = _b.steps, id = _b.id;
361
+ flowCompleted = Object.keys(steps).find(function (key) { return key === BUSINESS_STEP_NAMES.BUSINESS_SUCCESS; });
362
+ if (flowCompleted)
352
363
  return [2];
353
364
  payload = {
354
365
  step_name: BUSINESS_STEP_NAMES.BUSINESS_SUCCESS,
@@ -375,13 +386,32 @@ export var updateLeadSuccess = createAsyncThunk('updateLeadSuccess', function (p
375
386
  };
376
387
  return [4, API.leadService.updateLead(payload)];
377
388
  case 1:
378
- data = (_f.sent()).data;
379
- (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
380
- (_e = (_d = settings.data.appConfig).onFlowCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, { data: data });
389
+ data = (_g.sent()).data;
390
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
391
+ (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
381
392
  return [2, { response: data, formData: params }];
382
393
  }
383
394
  });
384
395
  }); });
396
+ export var updateStepName = createAsyncThunk('updateStepName', function (stepName, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
397
+ var business, payload, data;
398
+ var _a;
399
+ return __generator(this, function (_b) {
400
+ switch (_b.label) {
401
+ case 0:
402
+ business = thunkApi.getState().business;
403
+ payload = {
404
+ step_name: stepName,
405
+ id: ((_a = business.data.verify.responseBody) === null || _a === void 0 ? void 0 : _a.id) || '',
406
+ encryption_contract: []
407
+ };
408
+ return [4, API.leadService.updateLead(payload)];
409
+ case 1:
410
+ data = (_b.sent()).data;
411
+ return [2, { response: data }];
412
+ }
413
+ });
414
+ }); });
385
415
  var initialState = {
386
416
  error: null,
387
417
  loading: false,
@@ -526,10 +556,10 @@ export var businessSlice = createSlice({
526
556
  state.customLoading = true;
527
557
  })
528
558
  .addCase(retrieveEntityList.fulfilled, function (state, action) {
529
- var _a, _b, _c;
559
+ var _a, _b, _c, _d, _e;
530
560
  state.error = null;
531
561
  state.customLoading = false;
532
- var _d = action.payload, data = _d.data, licenseNumber = _d.licenseNumber;
562
+ var _f = action.payload, data = _f.data, licenseNumber = _f.licenseNumber;
533
563
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
534
564
  var licenseList = [];
535
565
  if (!description) {
@@ -550,7 +580,9 @@ export var businessSlice = createSlice({
550
580
  state.data.businessTypeData.responseBody = { licenseList: licenseList };
551
581
  var selectedLicense = ((_b = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _b === void 0 ? void 0 : _b.call(licenseList, function (item) { var _a; return ((_a = item.license) === null || _a === void 0 ? void 0 : _a.number) === licenseNumber; })) || (licenseList === null || licenseList === void 0 ? void 0 : licenseList[0]);
552
582
  state.data.businessTypeData.selectedLicense = selectedLicense;
553
- state.data.businessTypeData.licenseNumber = (_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number;
583
+ var isOtherLicense = ((_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number) === 'other_fl' || ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) === 'other_cr';
584
+ if (!isOtherLicense)
585
+ state.data.businessTypeData.licenseNumber = (_e = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _e === void 0 ? void 0 : _e.number;
554
586
  })
555
587
  .addCase(retrieveEntityList.rejected, function (state, action) {
556
588
  state.error = action.error.message;
@@ -603,9 +635,9 @@ export var businessSlice = createSlice({
603
635
  state.error = 'signup_user_exists_error';
604
636
  return;
605
637
  }
606
- var licenseList = (state.data.businessTypeData.responseBody || { licenseList: [] }).licenseList;
607
- state.data.businessTypeData.responseBody = __assign(__assign({ licenseList: licenseList }, data), { channelList: channelsData || [] });
608
- var selectedChannel = channelsData === null || channelsData === void 0 ? void 0 : channelsData[0];
638
+ var channels = channelsData || [];
639
+ state.data.businessTypeData.responseBody = __assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { channelList: channels });
640
+ var selectedChannel = channels === null || channels === void 0 ? void 0 : channels[0];
609
641
  if (!!selectedChannel)
610
642
  state.data.activitiesData.salesChannels = [selectedChannel];
611
643
  })
@@ -689,6 +721,7 @@ export var businessSlice = createSlice({
689
721
  state.error = description;
690
722
  return;
691
723
  }
724
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: response.flows });
692
725
  removeRequestHeaders();
693
726
  })
694
727
  .addCase(updateLeadSuccess.pending, function (state) {
@@ -284,7 +284,7 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
284
284
  id: (isExistingUser ? (_h = brandData.responseBody) === null || _h === void 0 ? void 0 : _h.lead_id : (_j = otpData.responseBody) === null || _j === void 0 ? void 0 : _j.lead_id) || '',
285
285
  terms_conditions_accepted: params.termAndConditionChecked,
286
286
  step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_MERCHANT,
287
- encryption_contract: ['brand.name.en', 'brand.name.ar', 'brand.name.zh', 'social[0]', 'social[1]']
287
+ encryption_contract: ['brand.name.en', 'brand.name.ar', 'brand.name.zh']
288
288
  };
289
289
  return [4, API.leadService.updateLead(payload)];
290
290
  case 1:
@@ -122,7 +122,7 @@ var LicenseList = function (_a) {
122
122
  var licenseReadonly = !isOtherLicense(selected);
123
123
  var isCR = (selected === null || selected === void 0 ? void 0 : selected.type) === BusinessType.CR;
124
124
  var flValue = isOtherLicense(selected) ? t(getLicenseName(selected)) : getLicenseNumber(selected);
125
- return (_jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_any_license'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_license_cr'), value: isCR ? getLicenseName(selected) : flValue }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'legal_name?.en', list: licenseList || [], onSelectItem: onSelectItem, renderItem: function (item) {
125
+ return (_jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_any_license'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_license_cr'), value: isCR ? t(getLicenseName(selected)) : flValue }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'legal_name?.en', list: licenseList || [], onSelectItem: onSelectItem, renderItem: function (item) {
126
126
  return (_jsxs(_Fragment, { children: [_jsx(LicenseContainer, { children: _jsx(LicenseNameText, __assign({ isSelected: getLicenseNumber(item) === getLicenseNumber(selected) }, { children: isOtherLicense(item) ? t(getLicenseName(item)) : getLicenseFullName(item) })) }), getLicenseNumber(item) === getLicenseNumber(selected) && _jsx(CheckIcon, {})] }));
127
127
  } }) })), _jsx(LicenseNumber, { show: showLicenseNumber, readOnly: licenseReadonly })] }));
128
128
  };
@@ -41,6 +41,6 @@ var LicenseNumber = function (_a) {
41
41
  var error = (_b = licenseNumberControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
42
42
  var length = isCR ? CR_NUMBER_LENGTH : FL_NUMBER_LENGTH;
43
43
  var label = isCR ? 'cr_number' : 'fl_number';
44
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { readOnly: readOnly, label: t(label), onChange: handleFLNumberChange, inputProps: { maxLength: length }, value: licenseNumberValue, endAdornment: (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) === length ? (_jsx(CheckIcon, {})) : (licenseNumberValue && _jsx(ClearIcon, { onClick: clearLicenseNumber })), placeholder: isCR ? '01f3c5x78n' : '1a3c5b78', warningType: 'alert', warningMessage: error && t(error, { length: length }) }) }) })));
44
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { readOnly: readOnly, label: t(label), onChange: handleFLNumberChange, inputProps: { maxLength: length }, value: licenseNumberValue, endAdornment: (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) === length ? (_jsx(CheckIcon, {})) : (licenseNumberValue && _jsx(ClearIcon, { onClick: clearLicenseNumber })), placeholder: isCR ? t('cr_number_hint') : t('fl_number_hint'), warningType: 'alert', warningMessage: error && t(error, { length: length }) }) }) })));
45
45
  };
46
46
  export default React.memo(LicenseNumber);
@@ -1,11 +1,11 @@
1
1
  import * as yup from 'yup';
2
2
  export declare const LicenseValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
3
  selectedLicense: any;
4
- licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
4
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
5
5
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
6
6
  selectedLicense: any;
7
- licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
7
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
8
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
9
9
  selectedLicense: any;
10
- licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
10
+ licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
11
11
  }>>>;
@@ -13,13 +13,20 @@ var objectElements = {
13
13
  };
14
14
  export var LicenseValidationSchema = yup.object().shape({
15
15
  selectedLicense: yup.object().shape(objectElements).required(''),
16
- licenseNumber: yup.string().when('selectedLicense', function (selectedLicenseValue) {
17
- var _a, _b;
18
- if (((_b = (_a = selectedLicenseValue === null || selectedLicenseValue === void 0 ? void 0 : selectedLicenseValue.license) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === BusinessType.CR) {
19
- return yup.string().min(CR_NUMBER_LENGTH, "cr_max_length").required('cr_required');
20
- }
21
- else {
22
- return yup.string().min(FL_NUMBER_LENGTH, "fl_max_length").required('fl_required');
16
+ licenseNumber: yup
17
+ .string()
18
+ .test({
19
+ test: function (value) {
20
+ var selectedLicense = this.parent.selectedLicense;
21
+ var isCR = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.CR;
22
+ var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
23
+ if (length === 0)
24
+ return true;
25
+ if (isCR) {
26
+ return length === CR_NUMBER_LENGTH ? true : this.createError({ message: 'cr_max_length' });
27
+ }
28
+ return length === FL_NUMBER_LENGTH ? true : this.createError({ message: 'fl_max_length' });
23
29
  }
24
30
  })
31
+ .required('')
25
32
  });
@@ -67,11 +67,6 @@ var ExpectedSalesRange = function (_a) {
67
67
  setExpectedSalesRangeList(response === null || response === void 0 ? void 0 : response.expectedSales);
68
68
  }
69
69
  }, [response === null || response === void 0 ? void 0 : response.expectedSales]);
70
- var checkRemainingCondition = function (item) {
71
- return !!expectedSalesRangeValue.find(function (expectedSale) {
72
- return expectedSale.id === item.id;
73
- });
74
- };
75
70
  var onSelectItem = function (expectedSalesRange) {
76
71
  onCloseList();
77
72
  expectedSalesRangeControl.field.onChange(expectedSalesRange);
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
- import { memo } from 'react';
13
+ import { memo, useEffect, useState } from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { styled } from '@mui/material/styles';
16
16
  import Box from '@mui/material/Box';
@@ -18,6 +18,8 @@ import Text from '../../../../components/Text';
18
18
  import Container from '../../../shared/Containers/ScreenContainer';
19
19
  import { FlowsButtons } from '../../../shared/Button';
20
20
  import { ICONS_NAMES } from '../../../../constants';
21
+ import { useAppSelector } from '../../../../hooks';
22
+ import { businessSelector } from '../../../app/business/businessStore';
21
23
  var TextContainerStyled = styled(Box)(function (_a) {
22
24
  var theme = _a.theme;
23
25
  return ({
@@ -49,31 +51,33 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
49
51
  });
50
52
  var SuccessWithFlowButtons = function () {
51
53
  var t = useTranslation().t;
52
- return (_jsxs(ContainerStyled, { children: [_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [t('ide_successfully_verified_message'), " "] }) }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: [
53
- {
54
- title: t('tax_flow_pending'),
55
- href: '#',
56
- src: ICONS_NAMES.Tax_filled_icon,
57
- hoverSrc: ICONS_NAMES.Tax_white_icon
58
- },
59
- {
60
- title: t('individual_flow_pending'),
61
- href: '#',
62
- src: ICONS_NAMES.User_filled_icon,
63
- hoverSrc: ICONS_NAMES.User_white_icon
64
- },
65
- {
66
- title: t('bank_flow_pending'),
67
- href: '#',
68
- src: ICONS_NAMES.Bank_filled_icon,
69
- hoverSrc: ICONS_NAMES.Bank_white_icon
70
- },
71
- {
72
- title: t('password_flow_pending'),
73
- href: '#',
74
- src: ICONS_NAMES.Password_filled_icon,
75
- hoverSrc: ICONS_NAMES.Password_white_icon
76
- }
77
- ] }) })] }));
54
+ var data = useAppSelector(businessSelector).data;
55
+ var _a = data.verify.responseBody || {}, flows = _a.flows, nameObj = _a.name;
56
+ var _b = useState([]), buttons = _b[0], setButtons = _b[1];
57
+ var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
58
+ var reMapFlowData = function (flows) {
59
+ if (flows === void 0) { flows = []; }
60
+ var images = ICONS_NAMES;
61
+ var mappedFlows = flows.map(function (_a) {
62
+ var name = _a.name, url = _a.url, status = _a.status;
63
+ var type = status === 'initiated' ? 'pending' : 'completed';
64
+ var title = t("".concat(name, "_flow_").concat(type), { individual_name: username });
65
+ var src = "".concat(name, "_filled_icon");
66
+ var hoverSrc = "".concat(name, "_white_icon");
67
+ return {
68
+ title: title,
69
+ href: url,
70
+ src: images[src],
71
+ hoverSrc: images[hoverSrc],
72
+ isCompleted: status === 'completed'
73
+ };
74
+ });
75
+ setButtons(mappedFlows);
76
+ };
77
+ useEffect(function () {
78
+ if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0)
79
+ reMapFlowData(flows);
80
+ }, [flows]);
81
+ return (_jsxs(ContainerStyled, { children: [_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [t('ide_successfully_verified_message'), " "] }) }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons }) })] }));
78
82
  };
79
83
  export default memo(SuccessWithFlowButtons);
@@ -21,18 +21,17 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
+ import React from 'react';
24
25
  import Button from '../../../components/Button';
25
26
  import Icon from '../../../components/Icon';
26
27
  import { alpha, styled } from '@mui/material/styles';
27
28
  import Box from '@mui/material/Box';
28
29
  import { ICONS_NAMES } from '../../../constants';
29
- var IconStyled = styled(Icon)(function (_a) {
30
- var theme = _a.theme;
31
- return ({
32
- width: theme.spacing(3),
33
- height: theme.spacing(3),
34
- marginInlineStart: theme.spacing(0.75)
35
- });
30
+ var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'disabled'; } })(function (_a) {
31
+ var theme = _a.theme, disabled = _a.disabled;
32
+ return (__assign({ width: theme.spacing(3), height: theme.spacing(3), marginInlineStart: theme.spacing(0.75) }, (disabled && {
33
+ opacity: 0.3
34
+ })));
36
35
  });
37
36
  var ButtonBoxStyled = styled(Box)(function (_a) {
38
37
  var theme = _a.theme;
@@ -40,31 +39,35 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
40
39
  margin: theme.spacing(0, 2.5, 2.5, 2.5)
41
40
  });
42
41
  });
43
- var ButtonStyled = styled(Button, { shouldForwardProp: function (prop) { return prop !== 'hideIcon'; } })(function (_a) {
44
- var theme = _a.theme, hideIcon = _a.hideIcon;
42
+ var ButtonStyled = styled(Button, {
43
+ shouldForwardProp: function (prop) { return prop !== 'hideIcon' && prop !== 'touched'; }
44
+ })(function (_a) {
45
+ var theme = _a.theme, hideIcon = _a.hideIcon, touched = _a.touched;
45
46
  return ({
46
47
  paddingInlineStart: theme.spacing(0.75),
47
48
  textTransform: 'none',
48
- backgroundColor: theme.palette.common.white,
49
+ backgroundColor: touched ? theme.palette.primary.light : theme.palette.common.white,
49
50
  border: "1px solid ".concat(hideIcon ? theme.palette.primary.main : theme.palette.primary.light),
50
- color: hideIcon ? theme.palette.primary.main : theme.palette.primary.light,
51
+ color: hideIcon ? theme.palette.primary.main : touched ? theme.palette.common.white : theme.palette.primary.light,
51
52
  '&:hover': {
52
- backgroundColor: hideIcon ? theme.palette.primary.main : theme.palette.primary.light,
53
- color: theme.palette.common.white,
53
+ backgroundColor: touched ? theme.palette.primary.light : theme.palette.common.white,
54
+ color: hideIcon ? theme.palette.primary.main : touched ? theme.palette.common.white : theme.palette.primary.light,
54
55
  img: {
55
- filter: 'brightness(0) invert(1)'
56
+ filter: touched ? 'brightness(0) invert(1)' : ''
56
57
  }
57
58
  },
58
- '&:active': {
59
- backgroundColor: theme.palette.common.white
60
- },
61
59
  '&:disabled': {
62
60
  backgroundColor: theme.palette.common.white,
63
- color: hideIcon ? alpha(theme.palette.primary.main, 0.3) : theme.palette.primary.light
61
+ color: alpha(hideIcon ? theme.palette.primary.main : theme.palette.primary.light, 0.3),
62
+ border: "1px solid ".concat(alpha(hideIcon ? theme.palette.primary.main : theme.palette.primary.light, 0.3))
64
63
  }
65
64
  });
66
65
  });
67
66
  export default function AbsherButton(_a) {
68
67
  var children = _a.children, isAr = _a.isAr, hideIcon = _a.hideIcon, disabled = _a.disabled, props = __rest(_a, ["children", "isAr", "hideIcon", "disabled"]);
69
- return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ hideIcon: hideIcon, disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { src: ICONS_NAMES.ABSHER_LOGO }) }, props, { children: children })) }));
68
+ var _b = React.useState(false), touched = _b[0], setTouched = _b[1];
69
+ var handleTouch = function () {
70
+ setTouched(true);
71
+ };
72
+ return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ onTouchStart: handleTouch, touched: touched, hideIcon: hideIcon, disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.ABSHER_LOGO }) }, props, { children: children })) }));
70
73
  }
@@ -1,13 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from '../../../components/Button';
3
- declare type buttonProps = {
3
+ export declare type ButtonItemProps = {
4
4
  title: string;
5
5
  href: string;
6
6
  src: string;
7
7
  hoverSrc: string;
8
+ isCompleted: boolean;
8
9
  };
9
10
  export interface EmailProvidersButtonsProps extends ButtonProps {
10
- buttons: buttonProps[];
11
+ buttons: ButtonItemProps[];
11
12
  }
12
13
  export default function FlowsButtons({ buttons }: EmailProvidersButtonsProps): JSX.Element;
13
- export {};
@@ -10,14 +10,16 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { createElement as _createElement } from "react";
13
14
  import React from 'react';
14
15
  import Button from '../../../components/Button';
15
16
  import { alpha, styled } from '@mui/material/styles';
16
17
  import Box from '@mui/material/Box';
17
18
  import Link from '@mui/material/Link';
18
19
  import { ICONS_NAMES } from '../../../constants';
20
+ import CheckIcon from '@mui/icons-material/Check';
19
21
  var Image = styled('img', { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
20
- var theme = _a.theme, isAr = _a.isAr;
22
+ var theme = _a.theme;
21
23
  return ({
22
24
  width: theme.spacing(3),
23
25
  height: theme.spacing(3),
@@ -32,31 +34,41 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
32
34
  margin: theme.spacing(0, 2.5, 2.5, 2.5)
33
35
  });
34
36
  });
35
- var ButtonStyled = styled(Button)(function (_a) {
36
- var theme = _a.theme;
37
- return ({
38
- width: '100%',
39
- textTransform: 'none',
40
- paddingInlineStart: theme.spacing(0.75),
41
- backgroundColor: theme.palette.common.white,
42
- border: "1px solid ".concat(theme.palette.primary.main),
43
- color: theme.palette.primary.main,
44
- '&:hover': {
45
- backgroundColor: theme.palette.primary.main,
46
- color: theme.palette.common.white
47
- },
48
- '&:disabled': {
37
+ var ButtonStyled = styled(Button, { shouldForwardProp: function (prop) { return prop !== 'isCompleted'; } })(function (_a) {
38
+ var theme = _a.theme, isCompleted = _a.isCompleted;
39
+ return (__assign(__assign({ width: '100%', textTransform: 'none', paddingInlineStart: theme.spacing(0.75), backgroundColor: theme.palette.common.white, border: "1px solid ".concat(theme.palette.primary.main), color: theme.palette.primary.main }, (isCompleted && {
40
+ paddingInlineEnd: '13px',
41
+ color: theme.palette.success.main,
42
+ border: "1px solid ".concat(theme.palette.success.main)
43
+ })), { '&:hover': __assign({ backgroundColor: theme.palette.primary.main, color: theme.palette.common.white }, (isCompleted && {
44
+ backgroundColor: theme.palette.common.white,
45
+ border: "1px solid ".concat(theme.palette.success.main),
46
+ color: theme.palette.success.main,
47
+ cursor: 'initial'
48
+ })), '&:disabled': {
49
49
  backgroundColor: theme.palette.common.white,
50
50
  color: alpha(theme.palette.primary.main, 0.3)
51
- }
51
+ } }));
52
+ });
53
+ var CheckIconStyled = styled(CheckIcon)(function (_a) {
54
+ var theme = _a.theme;
55
+ return ({
56
+ width: theme.spacing(2.5),
57
+ height: theme.spacing(2.5),
58
+ color: theme.palette.success.main
52
59
  });
53
60
  });
54
61
  export default function FlowsButtons(_a) {
55
62
  var buttons = _a.buttons;
56
63
  var _b = React.useState(), index = _b[0], setIndex = _b[1];
57
64
  return (_jsx(ButtonBoxStyled, { children: buttons.map(function (_a, idx) {
58
- var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc;
65
+ var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc, isCompleted = _a.isCompleted;
59
66
  var isLast = idx === buttons.length - 1;
60
- return (_jsx(Link, __assign({ underline: 'none', onMouseEnter: function () { return setIndex(idx); }, onMouseLeave: function () { return setIndex(undefined); } }, { children: _jsx(ButtonStyled, __assign({ sx: { mb: isLast ? 0 : 1.8 }, endIcon: _jsx(Image, { sx: { height: 15 }, src: index === idx ? ICONS_NAMES.Arrow_white_right_icon : ICONS_NAMES.Arrow_filled_right_icon }), startIcon: _jsx(Image, { src: index === idx ? hoverSrc : src, alt: title }), type: 'button' }, { children: title })) }), idx));
67
+ var linkProps = {
68
+ href: href,
69
+ target: '_blank'
70
+ };
71
+ return (_createElement(Link, __assign({}, (!isCompleted && linkProps), { underline: 'none', key: idx, onMouseEnter: function () { return !isCompleted && setIndex(idx); }, onMouseLeave: function () { return setIndex(undefined); } }),
72
+ _jsx(ButtonStyled, __assign({ isCompleted: isCompleted, sx: { mb: isLast ? 0 : 1.8 }, endIcon: isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsx(Image, { sx: { height: 15 }, src: index === idx ? ICONS_NAMES.Arrow_white_right_icon : ICONS_NAMES.Arrow_filled_right_icon })), startIcon: _jsx(Image, { src: index === idx ? hoverSrc : src, alt: title }), type: 'button' }, { children: title }))));
61
73
  }) }));
62
74
  }
@@ -21,6 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
+ import React from 'react';
24
25
  import Button from '../../../components/Button';
25
26
  import Icon from '../../../components/Icon';
26
27
  import { alpha, styled } from '@mui/material/styles';
@@ -38,24 +39,21 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
38
39
  margin: theme.spacing(0, 2.5, 2.5, 2.5)
39
40
  });
40
41
  });
41
- var ButtonStyled = styled(Button)(function (_a) {
42
- var theme = _a.theme;
42
+ var ButtonStyled = styled(Button, { shouldForwardProp: function (prop) { return prop !== 'touched'; } })(function (_a) {
43
+ var theme = _a.theme, touched = _a.touched;
43
44
  return ({
44
45
  paddingInlineStart: theme.spacing(0.75),
45
46
  textTransform: 'none',
46
- backgroundColor: theme.palette.common.white,
47
+ backgroundColor: touched ? theme.palette.primary.main : theme.palette.common.white,
47
48
  border: "1px solid ".concat(theme.palette.primary.main),
48
- color: theme.palette.primary.main,
49
+ color: touched ? theme.palette.common.white : theme.palette.primary.main,
49
50
  '&:hover': {
50
- backgroundColor: theme.palette.primary.main,
51
- color: theme.palette.common.white,
51
+ backgroundColor: touched ? theme.palette.primary.main : theme.palette.common.white,
52
+ color: touched ? theme.palette.common.white : theme.palette.primary.main,
52
53
  img: {
53
- filter: 'brightness(0) invert(1)'
54
+ filter: touched ? 'brightness(0) invert(1)' : ''
54
55
  }
55
56
  },
56
- '&:active': {
57
- backgroundColor: theme.palette.common.white
58
- },
59
57
  '&:disabled': {
60
58
  backgroundColor: theme.palette.common.white,
61
59
  color: alpha(theme.palette.primary.main, 0.3)
@@ -64,5 +62,9 @@ var ButtonStyled = styled(Button)(function (_a) {
64
62
  });
65
63
  export default function MobileButton(_a) {
66
64
  var children = _a.children, isAr = _a.isAr, hideIcon = _a.hideIcon, disabled = _a.disabled, props = __rest(_a, ["children", "isAr", "hideIcon", "disabled"]);
67
- return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.MOBILE_ICON }) }, props, { children: children })) }));
65
+ var _b = React.useState(false), touched = _b[0], setTouched = _b[1];
66
+ var handleTouch = function () {
67
+ setTouched(true);
68
+ };
69
+ return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ onTouchStart: handleTouch, touched: touched, disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.MOBILE_ICON }) }, props, { children: children })) }));
68
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",