@tap-payments/auth-jsconnect 2.3.43-test → 2.3.47-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 (78) hide show
  1. package/build/@types/form.d.ts +0 -1
  2. package/build/api/brand.d.ts +7 -0
  3. package/build/api/brand.js +10 -1
  4. package/build/api/index.d.ts +3 -1
  5. package/build/components/DatePicker/DatePicker.js +1 -0
  6. package/build/components/RadioGroup/RadioGroup.d.ts +5 -2
  7. package/build/components/RadioGroup/RadioGroup.js +5 -9
  8. package/build/components/RadioGroup/index.d.ts +1 -1
  9. package/build/features/app/brand/brandStore.js +14 -3
  10. package/build/features/app/business/businessStore.d.ts +3 -12
  11. package/build/features/app/business/businessStore.js +30 -70
  12. package/build/features/app/connectExpress/connectExpressStore.js +12 -8
  13. package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +6 -10
  14. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +0 -5
  15. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +5 -5
  16. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +0 -5
  17. package/build/features/brand/screens/BrandActivities/CustomerBase.js +5 -5
  18. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +13 -3
  19. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +12 -2
  20. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -1
  21. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +6 -9
  22. package/build/features/brand/screens/BrandActivities/TAC.d.ts +12 -0
  23. package/build/features/brand/screens/BrandActivities/TAC.js +6 -9
  24. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  25. package/build/features/brand/screens/BrandInfo/Segments.js +9 -1
  26. package/build/features/brand/screens/BrandInfo/TeamSize.js +9 -1
  27. package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -5
  28. package/build/features/business/screens/Activities/ActivitiesList.js +5 -5
  29. package/build/features/business/screens/Activities/OperationStartDate.js +1 -1
  30. package/build/features/business/screens/BusinessType/Article.d.ts +3 -1
  31. package/build/features/business/screens/BusinessType/Article.js +19 -54
  32. package/build/features/business/screens/BusinessType/BusinessType.js +4 -4
  33. package/build/features/business/screens/BusinessType/LicenseList.js +1 -1
  34. package/build/features/business/screens/Customers/CustomerLocations.d.ts +0 -5
  35. package/build/features/business/screens/Customers/CustomerLocations.js +5 -5
  36. package/build/features/business/screens/Customers/ExpectedCustomers.js +12 -2
  37. package/build/features/business/screens/Customers/ExpectedSalesRange.js +12 -2
  38. package/build/features/business/screens/IDBOD/DOB.js +1 -1
  39. package/build/features/connect/screens/Merchant/BrandList.js +1 -1
  40. package/build/features/connect/screens/Merchant/Segments.js +6 -1
  41. package/build/features/connect/screens/Merchant/TeamSize.js +6 -1
  42. package/build/features/connectExpress/screens/Brand/Brand.js +1 -1
  43. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +3 -3
  44. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
  45. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +12 -0
  46. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +6 -9
  47. package/build/features/connectExpress/screens/NID/TAC.d.ts +12 -0
  48. package/build/features/connectExpress/screens/NID/TAC.js +6 -9
  49. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +0 -5
  50. package/build/features/entity/screens/EntityCapital/ActivityList.js +5 -5
  51. package/build/features/entity/screens/EntityName/Article.js +1 -2
  52. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +0 -5
  53. package/build/features/entity/screens/EntityName/EntityTypeList.js +5 -5
  54. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +1 -1
  55. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +10 -2
  56. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +9 -1
  57. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +1 -1
  58. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -1
  59. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +9 -1
  60. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +9 -1
  61. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +1 -1
  62. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +1 -1
  63. package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +1 -1
  64. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +9 -1
  65. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +9 -6
  66. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +9 -1
  67. package/build/features/shared/Address/CountryList.js +1 -1
  68. package/build/features/shared/Address/InputSelect.js +1 -1
  69. package/build/features/shared/Input/Input.js +2 -3
  70. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +2 -1
  71. package/build/features/shared/SalesChannels/SalesChannel.js +2 -1
  72. package/build/features/shared/UploadFile/FileUpload.js +5 -5
  73. package/build/features/shared/UploadFile/UploadFile.js +7 -7
  74. package/build/features/shared/UploadMultipleFile/UploadFile.js +5 -5
  75. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +6 -9
  76. package/build/utils/string.d.ts +1 -1
  77. package/build/utils/string.js +6 -0
  78. package/package.json +1 -1
@@ -52,7 +52,6 @@ export declare type BusinessTypeFormValues = {
52
52
  selectedLicense?: License;
53
53
  certificateId?: Array<string>;
54
54
  articleId?: string;
55
- articleFile?: File;
56
55
  };
57
56
  export declare type ActivitiesFormValues = {
58
57
  activities: Array<Activity> | undefined;
@@ -1,9 +1,16 @@
1
1
  import { BrandListBody, UpdateBrandBody, UpdateSalesChannels } from '../api/individual';
2
+ export declare type RemoveBrandActivity = {
3
+ id: string;
4
+ activities?: Array<{
5
+ id: string;
6
+ }>;
7
+ };
2
8
  declare const brandService: {
3
9
  retrieveBrand: (id: string) => Promise<any>;
4
10
  getBrandList: (data: BrandListBody) => Promise<any>;
5
11
  updateBrandInfo: ({ id, ...data }: UpdateBrandBody) => Promise<any>;
6
12
  updateBrandSales: ({ id, ...data }: UpdateSalesChannels) => void;
7
13
  getBrandListByIndividualId: (id: string) => Promise<any>;
14
+ removeBrandActivity: ({ id, ...data }: RemoveBrandActivity) => Promise<any>;
8
15
  };
9
16
  export { brandService };
@@ -47,11 +47,20 @@ var updateBrandSales = function (_a) {
47
47
  data: data
48
48
  });
49
49
  };
50
+ var removeBrandActivity = function (_a) {
51
+ var id = _a.id, data = __rest(_a, ["id"]);
52
+ return httpClient({
53
+ method: 'put',
54
+ url: "".concat(ENDPOINT_PATHS.BRAND, "/").concat(id, "/activities/remove"),
55
+ data: data
56
+ });
57
+ };
50
58
  var brandService = {
51
59
  retrieveBrand: retrieveBrand,
52
60
  getBrandList: getBrandList,
53
61
  updateBrandInfo: updateBrandInfo,
54
62
  updateBrandSales: updateBrandSales,
55
- getBrandListByIndividualId: getBrandListByIndividualId
63
+ getBrandListByIndividualId: getBrandListByIndividualId,
64
+ removeBrandActivity: removeBrandActivity
56
65
  };
57
66
  export { brandService };
@@ -9,6 +9,7 @@ import { DataElementBody } from './data';
9
9
  import { BrandListBody, UpdateBrandBody, UpdateIndividualBody, GetIndividualListBody } from './individual';
10
10
  import { UpdateBoardBody, RequestEmailBody } from './board';
11
11
  import { GetUserListBody } from './user';
12
+ import { RemoveBrandActivity } from './brand';
12
13
  import { UploadFileBody } from './file';
13
14
  import { DocumentUpdateBody, DocumentInfo, DocumentBody } from './document';
14
15
  declare const API: {
@@ -130,6 +131,7 @@ declare const API: {
130
131
  updateBrandInfo: ({ id, ...data }: UpdateBrandBody) => Promise<any>;
131
132
  updateBrandSales: ({ id, ...data }: import("./individual").UpdateSalesChannels) => void;
132
133
  getBrandListByIndividualId: (id: string) => Promise<any>;
134
+ removeBrandActivity: ({ id, ...data }: RemoveBrandActivity) => Promise<any>;
133
135
  };
134
136
  fileService: {
135
137
  uploadFile: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -142,6 +144,6 @@ declare const API: {
142
144
  removeFilesFromDocument: ({ id, ...data }: DocumentBody) => Promise<import("axios").AxiosResponse<any, any>>;
143
145
  };
144
146
  };
145
- export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody };
147
+ export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, RemoveBrandActivity };
146
148
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
147
149
  export default API;
@@ -42,6 +42,7 @@ var Container = styled(Box, { shouldForwardProp: function (prop) { return prop !
42
42
  var theme = _a.theme, disabled = _a.disabled;
43
43
  return ({
44
44
  cursor: disabled ? 'auto' : 'pointer',
45
+ opacity: disabled ? '0.6' : '1',
45
46
  fontFamily: theme.typography.fontFamily
46
47
  });
47
48
  });
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { RadioGroupProps } from '@mui/material/RadioGroup';
3
- export type { RadioGroupProps };
4
- declare const _default: React.MemoExoticComponent<({ children, ...props }: RadioGroupProps) => JSX.Element>;
3
+ interface RadioGroupStyledProps extends RadioGroupProps {
4
+ readOnly?: boolean;
5
+ }
6
+ export type { RadioGroupStyledProps };
7
+ declare const _default: React.MemoExoticComponent<({ children, ...props }: RadioGroupStyledProps) => JSX.Element>;
5
8
  export default _default;
@@ -24,15 +24,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import * as React from 'react';
25
25
  import { styled } from '@mui/material/styles';
26
26
  import RadioGroup from '@mui/material/RadioGroup';
27
- var RadioGroupStyled = styled(RadioGroup)(function (_a) {
28
- var theme = _a.theme;
29
- return ({
30
- width: '100%',
31
- flexDirection: 'row',
32
- display: 'flex',
33
- direction: theme.direction,
34
- marginInlineStart: theme.spacing(0.25)
35
- });
27
+ var RadioGroupStyled = styled(RadioGroup, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
28
+ var theme = _a.theme, readOnly = _a.readOnly;
29
+ return (__assign({ width: '100%', flexDirection: 'row', display: 'flex', direction: theme.direction, marginInlineStart: theme.spacing(0.25) }, (readOnly && {
30
+ opacity: 0.6
31
+ })));
36
32
  });
37
33
  var RadioGroupComponent = function (_a) {
38
34
  var children = _a.children, props = __rest(_a, ["children"]);
@@ -1,3 +1,3 @@
1
- import RadioGroup, { RadioGroupProps } from './RadioGroup';
1
+ import RadioGroup, { RadioGroupStyledProps as RadioGroupProps } from './RadioGroup';
2
2
  export type { RadioGroupProps };
3
3
  export default RadioGroup;
@@ -332,19 +332,30 @@ export var retrieveEntityList = createAsyncThunk('retrieveEntityList', function
332
332
  });
333
333
  }); });
334
334
  export var updateBrandActivities = createAsyncThunk('brandUpdateBrandActivities', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
335
- var _a, settings, brand, _b, data_status, id, isActivitiesNonEditable, isCustomerBaseLocationNonEditable, isCustomerBaseNonEditable, isTermsNonEditable, isSalesRangeNonEditable, activities, customerLocations, expectedCustomer, expectedSale, requestBody, customerLocation, customerBaseId, salesId, customerBase, brandData;
335
+ var _a, settings, brand, _b, data_status, id, brandActivities, isActivitiesNonEditable, isCustomerBaseLocationNonEditable, isCustomerBaseNonEditable, isTermsNonEditable, isSalesRangeNonEditable, activities, customerLocations, expectedCustomer, expectedSale, removedActivities, payload, requestBody, customerLocation, customerBaseId, salesId, customerBase, brandData;
336
336
  var _c, _d, _e;
337
337
  return __generator(this, function (_f) {
338
338
  switch (_f.label) {
339
339
  case 0:
340
340
  _a = thunkApi.getState(), settings = _a.settings, brand = _a.brand;
341
- _b = ((_c = brand.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) || {}, data_status = _b.data_status, id = _b.id;
341
+ _b = ((_c = brand.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.brand) || {}, data_status = _b.data_status, id = _b.id, brandActivities = _b.activities;
342
342
  isActivitiesNonEditable = hasNoneEditableValue(data_status, 'activities');
343
343
  isCustomerBaseLocationNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.operations, 'customer_base_location');
344
344
  isCustomerBaseNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.operations, 'customer_base');
345
345
  isTermsNonEditable = hasNoneEditableValue(data_status, 'terms');
346
346
  isSalesRangeNonEditable = hasNoneEditableValue(data_status === null || data_status === void 0 ? void 0 : data_status.operations, 'sales_range');
347
347
  activities = params.activities, customerLocations = params.customerLocations, expectedCustomer = params.expectedCustomer, expectedSale = params.expectedSale;
348
+ removedActivities = (brandActivities || []).filter(function (brandActivity) { return !(activities || []).some(function (activity) { return activity.id === brandActivity.id; }); });
349
+ if (!(!isActivitiesNonEditable && (removedActivities === null || removedActivities === void 0 ? void 0 : removedActivities.length) > 0)) return [3, 2];
350
+ payload = {
351
+ id: id,
352
+ activities: removedActivities
353
+ };
354
+ return [4, API.brandService.removeBrandActivity(payload)];
355
+ case 1:
356
+ _f.sent();
357
+ _f.label = 2;
358
+ case 2:
348
359
  requestBody = {
349
360
  id: id,
350
361
  activities: isActivitiesNonEditable ? undefined : activities,
@@ -363,7 +374,7 @@ export var updateBrandActivities = createAsyncThunk('brandUpdateBrandActivities'
363
374
  requestBody = __assign(__assign({}, requestBody), { operations: __assign(__assign({}, requestBody.operations), { sales: salesId }) });
364
375
  }
365
376
  return [4, API.brandService.updateBrandInfo(requestBody)];
366
- case 1:
377
+ case 3:
367
378
  brandData = (_f.sent()).data;
368
379
  thunkApi.dispatch(handleNextScreenStep());
369
380
  (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, id);
@@ -60,15 +60,6 @@ export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThu
60
60
  documentData: any;
61
61
  entityData: any;
62
62
  }, BusinessTypeFormValues, {}>;
63
- interface UploadArticleParams {
64
- file: File;
65
- onProgress?: (value: number) => void;
66
- onSuccess?: (fileId: string) => void;
67
- onFailure?: (error: string) => void;
68
- }
69
- export declare const uploadArticle: import("@reduxjs/toolkit").AsyncThunk<{
70
- data: any;
71
- }, UploadArticleParams, {}>;
72
63
  export declare const updateActivitiesInfo: import("@reduxjs/toolkit").AsyncThunk<{
73
64
  data: any;
74
65
  formData: {
@@ -114,16 +105,16 @@ export interface BusinessState extends SharedState<BusinessData> {
114
105
  customLoading?: boolean;
115
106
  uploading?: boolean;
116
107
  uploadingArticle?: boolean;
117
- uploadingArticleError?: string | null;
118
108
  }
119
109
  export declare const businessSlice: import("@reduxjs/toolkit").Slice<BusinessState, {
120
110
  clearError: (state: BusinessState) => void;
121
111
  stopLoader: (state: BusinessState) => void;
122
112
  resetOTPScreen: (state: BusinessState) => void;
123
- clearArticleId: (state: BusinessState) => void;
124
113
  uploadingStatus: (state: BusinessState, action: ActionState<boolean>) => void;
114
+ uploadingArticleStatus: (state: BusinessState, action: ActionState<boolean>) => void;
115
+ clearAOAFile: (state: BusinessState) => void;
125
116
  }, "business/store">;
126
- export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, clearArticleId: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, uploadingStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
117
+ export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, uploadingStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, uploadingArticleStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>, clearAOAFile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
127
118
  declare const _default: import("redux").Reducer<BusinessState, import("redux").AnyAction>;
128
119
  export default _default;
129
120
  export declare const businessSelector: (state: RootState) => BusinessState;
@@ -441,36 +441,37 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
441
441
  });
442
442
  }); });
443
443
  export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
444
- var _a, settings, business, isNonSA, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, articleId, documentBody, payload_1;
445
- var _b, _c, _d, _e, _f, _g;
446
- return __generator(this, function (_h) {
447
- switch (_h.label) {
444
+ var _a, settings, business, isNonSA, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, documentBody, payload_1;
445
+ var _b, _c, _d, _e;
446
+ return __generator(this, function (_f) {
447
+ switch (_f.label) {
448
448
  case 0:
449
449
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
450
450
  isNonSA = !isSA(settings.data.businessCountry.iso2);
451
- isFL = ((_b = params.selectedLicense) === null || _b === void 0 ? void 0 : _b.type) === BusinessType.FL;
451
+ selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId;
452
+ isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
452
453
  payload = {
453
- id: ((_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.lead_id) || '',
454
- license_number: isNonSA && isFL ? '' : params.licenseNumber,
454
+ id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.lead_id) || '',
455
+ license_number: isNonSA && isFL ? '' : licenseNumber,
455
456
  license_type: isFL ? 'freelance' : 'commercial_registration',
456
- business_type: (_d = params.selectedLicense) === null || _d === void 0 ? void 0 : _d.type,
457
+ business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type,
457
458
  step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO,
458
- business: isNonSA && isFL ? undefined : { ar: params.entityLegalName, en: params.entityLegalName },
459
+ business: isNonSA && isFL ? undefined : { ar: entityLegalName, en: entityLegalName },
459
460
  encryption_contract: ['license_number', 'business_type', 'license_type']
460
461
  };
461
462
  return [4, API.leadService.updateLead(payload)];
462
463
  case 1:
463
- data = _h.sent();
464
+ data = _f.sent();
464
465
  entity_activities = data.entity_activities;
465
466
  if (!!entity_activities) return [3, 3];
466
467
  return [4, API.dataService.getActivities()];
467
468
  case 2:
468
- list = (_h.sent()).list;
469
+ list = (_f.sent()).list;
469
470
  data.entity_activities = list;
470
- _h.label = 3;
471
+ _f.label = 3;
471
472
  case 3:
472
473
  accountBody = {
473
- lead_id: (_e = business.data.verify.responseBody) === null || _e === void 0 ? void 0 : _e.lead_id,
474
+ lead_id: (_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.lead_id,
474
475
  notify: {
475
476
  email: false,
476
477
  phone: false
@@ -481,24 +482,23 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
481
482
  };
482
483
  return [4, API.accountService.createAccount(accountBody)];
483
484
  case 4:
484
- accountData = _h.sent();
485
+ accountData = _f.sent();
485
486
  entityData = undefined;
486
487
  entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
487
- articleId = business.data.businessTypeData.articleId;
488
- if (!((params.certificateId || []).length > 0)) return [3, 6];
488
+ if (!((certificateId || []).length > 0)) return [3, 6];
489
489
  documentBody = {
490
490
  entity_id: entityId || '',
491
491
  documents: [
492
492
  {
493
493
  type: DocumentPurpose.CR,
494
- images: params.certificateId
494
+ images: certificateId
495
495
  }
496
496
  ]
497
497
  };
498
498
  return [4, API.documentService.updateDocumentInfo(documentBody)];
499
499
  case 5:
500
- documentData = _h.sent();
501
- _h.label = 6;
500
+ documentData = _f.sent();
501
+ _f.label = 6;
502
502
  case 6:
503
503
  if (!(articleId && entityId)) return [3, 8];
504
504
  payload_1 = {
@@ -507,44 +507,15 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
507
507
  };
508
508
  return [4, API.entityService.updateEntity(payload_1)];
509
509
  case 7:
510
- entityData = _h.sent();
511
- _h.label = 8;
510
+ entityData = _f.sent();
511
+ _f.label = 8;
512
512
  case 8:
513
513
  thunkApi.dispatch(handleNextScreenStep());
514
- (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
514
+ (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
515
515
  return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
516
516
  }
517
517
  });
518
518
  }); });
519
- export var uploadArticle = createAsyncThunk('businessUploadArticle', function (_a) {
520
- var file = _a.file, onProgress = _a.onProgress;
521
- return __awaiter(void 0, void 0, void 0, function () {
522
- var typeArray, type, uploadPayload, onUploadProgress, data;
523
- var _b;
524
- return __generator(this, function (_c) {
525
- switch (_c.label) {
526
- case 0:
527
- typeArray = ((_b = file === null || file === void 0 ? void 0 : file.type) === null || _b === void 0 ? void 0 : _b.split('/')) || [];
528
- type = typeArray[1] || '';
529
- uploadPayload = {
530
- file_link_create: true,
531
- title: file === null || file === void 0 ? void 0 : file.name,
532
- purpose: DocumentPurpose.ARTICLE_ASSOCIATION,
533
- type: type,
534
- file: file
535
- };
536
- onUploadProgress = function (progressEvent) {
537
- var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
538
- onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
539
- };
540
- return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
541
- case 1:
542
- data = _c.sent();
543
- return [2, { data: data }];
544
- }
545
- });
546
- });
547
- });
548
519
  export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
549
520
  var _a, settings, business, activities, stepName, id, requestBody, data;
550
521
  var _b, _c, _d, _e, _f;
@@ -708,7 +679,6 @@ var initialState = {
708
679
  customLoading: false,
709
680
  uploading: false,
710
681
  uploadingArticle: false,
711
- uploadingArticleError: null,
712
682
  data: {
713
683
  flowName: FlowsTypes.BUSINESS,
714
684
  verify: {
@@ -756,11 +726,15 @@ export var businessSlice = createSlice({
756
726
  resetOTPScreen: function (state) {
757
727
  state.data.otpData.otp = '';
758
728
  },
759
- clearArticleId: function (state) {
760
- state.data.businessTypeData.articleId = '';
761
- },
762
729
  uploadingStatus: function (state, action) {
763
730
  state.uploading = action.payload;
731
+ },
732
+ uploadingArticleStatus: function (state, action) {
733
+ state.uploadingArticle = action.payload;
734
+ },
735
+ clearAOAFile: function (state) {
736
+ var entity = (state.data.verify.responseBody || {}).entity;
737
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: __assign(__assign({}, entity), { AOA_file: undefined, AOA_file_id: undefined }) });
764
738
  }
765
739
  },
766
740
  extraReducers: function (builder) {
@@ -1041,20 +1015,6 @@ export var businessSlice = createSlice({
1041
1015
  .addCase(updateLeadBusinessType.rejected, function (state, action) {
1042
1016
  state.loading = false;
1043
1017
  state.error = action.error.message;
1044
- })
1045
- .addCase(uploadArticle.pending, function (state) {
1046
- state.uploadingArticleError = null;
1047
- state.uploadingArticle = true;
1048
- })
1049
- .addCase(uploadArticle.fulfilled, function (state, action) {
1050
- state.uploadingArticleError = null;
1051
- state.uploadingArticle = false;
1052
- var data = action.payload.data;
1053
- state.data.businessTypeData.articleId = data === null || data === void 0 ? void 0 : data.id;
1054
- })
1055
- .addCase(uploadArticle.rejected, function (state) {
1056
- state.uploadingArticle = false;
1057
- state.uploadingArticleError = 'file_upload_article_error';
1058
1018
  })
1059
1019
  .addCase(updateActivitiesInfo.pending, function (state) {
1060
1020
  state.loading = true;
@@ -1138,6 +1098,6 @@ export var businessSlice = createSlice({
1138
1098
  });
1139
1099
  }
1140
1100
  });
1141
- export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, clearArticleId = _a.clearArticleId, uploadingStatus = _a.uploadingStatus;
1101
+ export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, uploadingArticleStatus = _a.uploadingArticleStatus, clearAOAFile = _a.clearAOAFile;
1142
1102
  export default businessSlice.reducer;
1143
1103
  export var businessSelector = function (state) { return state.business; };
@@ -1027,7 +1027,7 @@ export var connectSlice = createSlice({
1027
1027
  state.error = null;
1028
1028
  })
1029
1029
  .addCase(retrieveEntityListAsync.fulfilled, function (state, action) {
1030
- var _a, _b, _c, _d, _e;
1030
+ var _a, _b;
1031
1031
  state.loading = false;
1032
1032
  var data = action.payload;
1033
1033
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
@@ -1047,19 +1047,23 @@ export var connectSlice = createSlice({
1047
1047
  }
1048
1048
  }
1049
1049
  licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
1050
- var _f = ((_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}, license_number = _f.license_number, license_type = _f.license_type;
1050
+ var _c = ((_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}, license_number = _c.license_number, license_type = _c.license_type;
1051
+ var selectedLicense = undefined;
1051
1052
  if (license_number) {
1052
1053
  var findLicense = licenseList.find(function (_a) {
1053
1054
  var license = _a.license;
1054
1055
  return (license === null || license === void 0 ? void 0 : license.number) === license_number;
1055
1056
  });
1056
- var selectedLicense = (findLicense !== null && findLicense !== void 0 ? findLicense : license_type === 'freelance')
1057
- ? __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: license_number } }) : __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: license_number } });
1058
- state.data.businessData.selectedLicense = selectedLicense;
1059
- 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';
1060
- if (!isOtherLicense)
1061
- state.data.businessData.licenseNumber = ((_e = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _e === void 0 ? void 0 : _e.number) || '';
1057
+ if (findLicense)
1058
+ selectedLicense = findLicense;
1059
+ else if (!findLicense && license_type === 'freelance') {
1060
+ selectedLicense = __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: license_number } });
1061
+ }
1062
+ else
1063
+ selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: license_number } });
1064
+ state.data.businessData.licenseNumber = license_number;
1062
1065
  }
1066
+ state.data.businessData.selectedLicense = selectedLicense;
1063
1067
  state.data.responseData = __assign(__assign({}, state.data.responseData), { licenseList: licenseList });
1064
1068
  })
1065
1069
  .addCase(retrieveEntityListAsync.rejected, function (state, action) {
@@ -19,15 +19,11 @@ import CheckBox from '../../../../components/CheckBox';
19
19
  import Text from '../../../../components/Text';
20
20
  import Warning from '../../../../components/Warning';
21
21
  import Collapse from '../../../../components/Collapse';
22
- var ConfirmContainerStyled = styled(Box)(function (_a) {
23
- var theme = _a.theme;
24
- return ({
25
- display: 'flex',
26
- flexDirection: 'row',
27
- alignItems: 'center',
28
- padding: theme.spacing(0, 2.5, 1.5, 2.5),
29
- marginBlockStart: theme.spacing(3)
30
- });
22
+ var ConfirmContainerStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
23
+ var theme = _a.theme, readOnly = _a.readOnly;
24
+ return (__assign({ display: 'flex', flexDirection: 'row', alignItems: 'center', padding: theme.spacing(0, 2.5, 1.5, 2.5), marginBlockStart: theme.spacing(3) }, (readOnly && {
25
+ opacity: '0.6'
26
+ })));
31
27
  });
32
28
  var TextStyled = styled(Text)(function (_a) {
33
29
  var theme = _a.theme;
@@ -65,6 +61,6 @@ var ConfirmPolicy = function (_a) {
65
61
  return;
66
62
  confirmControl.field.onChange(checked);
67
63
  };
68
- return (_jsxs(ScreenContainer, { children: [_jsxs(ConfirmContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: confirmChecked, onChange: handleConfirmCheckedChange }), _jsx(TextStyled, { children: t('bank_confirm_information') })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
64
+ return (_jsxs(ScreenContainer, { children: [_jsxs(ConfirmContainerStyled, __assign({ readOnly: readOnly }, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: confirmChecked, onChange: handleConfirmCheckedChange }), _jsx(TextStyled, { children: t('bank_confirm_information') })] })), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
69
65
  };
70
66
  export default ConfirmPolicy;
@@ -13,11 +13,6 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
13
13
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
14
14
  }, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
15
15
  export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
16
- export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "value" | "components" | "componentsProps" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
17
- placeholder?: string | undefined;
18
- hide?: boolean | undefined;
19
- warningType?: "alert" | "error" | "hint" | undefined;
20
- } & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
21
16
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
22
17
  children?: React.ReactNode;
23
18
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
@@ -36,7 +36,7 @@ import { alpha, styled } from '@mui/material/styles';
36
36
  import InfoIcon from '@mui/icons-material/Info';
37
37
  import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
38
38
  import Text from '../../../../components/Text';
39
- import Input from '../../../../components/Input';
39
+ import Input from '../../../shared/Input';
40
40
  import Tooltip from '../../../../components/Tooltip';
41
41
  import { useTranslation } from 'react-i18next';
42
42
  import { useController, useFormContext } from 'react-hook-form';
@@ -56,12 +56,12 @@ export var MandatoryStyled = styled('span')(function (_a) {
56
56
  var theme = _a.theme;
57
57
  return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
58
58
  });
59
- export var InputStyled = styled(Input)(function (_a) {
60
- var theme = _a.theme;
59
+ var InputStyled = styled(Input)(function (_a) {
60
+ var theme = _a.theme, readOnly = _a.readOnly;
61
61
  return ({
62
62
  paddingInlineEnd: theme.spacing(2.5),
63
63
  '& .MuiInputBase-input': {
64
- cursor: 'pointer'
64
+ cursor: readOnly ? 'default' : 'pointer'
65
65
  }
66
66
  });
67
67
  });
@@ -160,7 +160,7 @@ var ActivitiesList = function (_a) {
160
160
  var getSelectedActivityFlag = function (item) {
161
161
  return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === item.id; });
162
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, disabled: disabled, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: disabled ? undefined : !!anchorEl ? onCloseList : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
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: readOnly, disabled: disabled, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: disabled ? undefined : !!anchorEl ? onCloseList : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
164
164
  var _a, _b, _c;
165
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
166
  } }) }))] })] }) })));
@@ -25,11 +25,6 @@ export declare const BaseLabelStyled: import("@emotion/styled").StyledComponent<
25
25
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
26
26
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
27
27
  }, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
28
- export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "value" | "components" | "componentsProps" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
29
- placeholder?: string | undefined;
30
- hide?: boolean | undefined;
31
- warningType?: "alert" | "error" | "hint" | undefined;
32
- } & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
33
28
  export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
34
29
  align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
35
30
  children?: React.ReactNode;
@@ -30,7 +30,7 @@ import Text from '../../../../components/Text';
30
30
  import Collapse from '../../../../components/Collapse';
31
31
  import CheckIcon from '@mui/icons-material/Check';
32
32
  import ExpandIcon from '../../../../components/ExpandIcon';
33
- import Input from '../../../../components/Input';
33
+ import Input from '../../../shared/Input';
34
34
  import Tooltip from '../../../../components/Tooltip';
35
35
  import SimpleList from '../../../../components/SimpleList';
36
36
  import { ScreenContainer } from '../../../shared/Containers';
@@ -46,12 +46,12 @@ export var BaseLabelStyled = styled(Text)(function (_a) {
46
46
  var theme = _a.theme;
47
47
  return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
48
48
  });
49
- export var InputStyled = styled(Input)(function (_a) {
50
- var theme = _a.theme;
49
+ var InputStyled = styled(Input)(function (_a) {
50
+ var theme = _a.theme, readOnly = _a.readOnly;
51
51
  return ({
52
52
  paddingInlineEnd: theme.spacing(2.5),
53
53
  '& .MuiInputBase-input': {
54
- cursor: 'pointer'
54
+ cursor: readOnly ? 'default' : 'pointer'
55
55
  }
56
56
  });
57
57
  });
@@ -140,7 +140,7 @@ var CustomerBase = function (_a) {
140
140
  };
141
141
  var customerLocationsValue = customerLocationsControl.field.value;
142
142
  var customerLocationSelected = customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue[0];
143
- return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(BaseLabelStyled, { children: t('select_customer_base') }), _jsx(Tooltip, __assign({ title: t('customer_base_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(InputStyled, { readOnly: true, disabled: disabled, placeholder: t('choose_expected_sales'), value: isAr ? (_b = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.en) !== null && _c !== void 0 ? _c : '', onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name.en', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
143
+ return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(BaseLabelStyled, { children: t('select_customer_base') }), _jsx(Tooltip, __assign({ title: t('customer_base_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(InputStyled, { readOnly: readOnly, disabled: disabled, placeholder: t('choose_expected_sales'), value: isAr ? (_b = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.en) !== null && _c !== void 0 ? _c : '', onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name.en', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
144
144
  return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.name.ar : item.name.en })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIconStyled, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(RemainingCheck, {})] }));
145
145
  } })] }))] }) })));
146
146
  };