@tap-payments/auth-jsconnect 2.1.37-test → 2.1.39-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 (77) hide show
  1. package/build/@types/form.d.ts +4 -7
  2. package/build/api/auth.d.ts +4 -3
  3. package/build/api/auth.js +8 -4
  4. package/build/api/entity.d.ts +0 -8
  5. package/build/api/entity.js +0 -15
  6. package/build/api/file.d.ts +13 -0
  7. package/build/api/file.js +24 -0
  8. package/build/api/index.d.ts +11 -6
  9. package/build/api/index.js +3 -1
  10. package/build/assets/locales/ar.json +5 -1
  11. package/build/assets/locales/en.json +5 -1
  12. package/build/components/FileInput/DragAndDrop.js +1 -1
  13. package/build/components/ProgressBar/CircularProgressBar.d.ts +3 -1
  14. package/build/components/ProgressBar/CircularProgressBar.js +2 -2
  15. package/build/components/SimpleList/SimpleList.d.ts +1 -1
  16. package/build/components/SimpleList/SimpleList.js +3 -3
  17. package/build/constants/api.d.ts +2 -0
  18. package/build/constants/api.js +4 -0
  19. package/build/constants/assets.d.ts +1 -0
  20. package/build/constants/assets.js +1 -0
  21. package/build/constants/validation.d.ts +1 -0
  22. package/build/constants/validation.js +1 -0
  23. package/build/features/app/auth/authStore.js +1 -1
  24. package/build/features/app/bank/bankStore.js +1 -1
  25. package/build/features/app/business/businessStore.d.ts +7 -9
  26. package/build/features/app/business/businessStore.js +29 -67
  27. package/build/features/app/connect/connectStore.js +21 -33
  28. package/build/features/app/connectExpress/connectExpressStore.d.ts +18 -5
  29. package/build/features/app/connectExpress/connectExpressStore.js +197 -6
  30. package/build/features/app/individual/individualStore.d.ts +4 -16
  31. package/build/features/app/individual/individualStore.js +11 -89
  32. package/build/features/app/signIn/signInStore.js +13 -41
  33. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +1 -1
  34. package/build/features/brand/screens/BrandInfo/SalesChannels.js +6 -6
  35. package/build/features/brand/screens/BrandInfo/Segments.js +1 -1
  36. package/build/features/brand/screens/BrandInfo/TeamSize.js +1 -1
  37. package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
  38. package/build/features/business/screens/BusinessType/Article.js +10 -13
  39. package/build/features/business/screens/BusinessType/BusinessType.js +2 -4
  40. package/build/features/business/screens/BusinessType/LicenseCertificate.js +12 -50
  41. package/build/features/business/screens/BusinessType/validation.d.ts +3 -6
  42. package/build/features/business/screens/BusinessType/validation.js +1 -11
  43. package/build/features/connect/screens/Merchant/SalesChannels.js +4 -3
  44. package/build/features/connectExpress/ConnectExpress.d.ts +3 -2
  45. package/build/features/connectExpress/ConnectExpress.js +7 -14
  46. package/build/features/connectExpress/screens/CivilID/CivilID.js +13 -31
  47. package/build/features/connectExpress/screens/CivilID/IDNumber.js +0 -4
  48. package/build/features/connectExpress/screens/Mobile/Mobile.js +25 -49
  49. package/build/features/connectExpress/screens/NID/DOB.js +2 -2
  50. package/build/features/connectExpress/screens/NID/IDNumber.js +1 -5
  51. package/build/features/connectExpress/screens/NID/NID.js +11 -16
  52. package/build/features/connectExpress/screens/OTP/OTP.js +13 -23
  53. package/build/features/entity/screens/EntityCapital/ActivityList.js +1 -1
  54. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +18 -4
  55. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +11 -62
  56. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +11 -59
  57. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +6 -12
  58. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -23
  59. package/build/features/shared/Address/CountryList.js +1 -1
  60. package/build/features/shared/Address/InputSelect.js +1 -1
  61. package/build/features/shared/SalesChannels/SalesChannel.d.ts +3 -2
  62. package/build/features/shared/SalesChannels/SalesChannel.js +25 -11
  63. package/build/features/shared/UploadFile/UploadFile.js +1 -1
  64. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +38 -0
  65. package/build/features/shared/UploadMultipleFile/UploadFile.js +184 -1
  66. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +27 -0
  67. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +147 -1
  68. package/build/features/shared/UploadMultipleFile/index.d.ts +2 -0
  69. package/build/features/shared/UploadMultipleFile/index.js +2 -1
  70. package/build/hooks/index.d.ts +1 -0
  71. package/build/hooks/index.js +1 -0
  72. package/build/hooks/useCountry.d.ts +4 -0
  73. package/build/hooks/useCountry.js +7 -0
  74. package/build/index.d.ts +2 -2
  75. package/build/index.js +2 -3
  76. package/build/theme/typography.js +1 -1
  77. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, Segment, SourceOfIncome, TeamSize } from './app';
2
2
  export declare type MobileFormValues = {
3
- mobile: string | null;
3
+ mobile: string;
4
4
  countryCode: CountryCode;
5
5
  };
6
6
  export declare type EmailFormValues = {
@@ -51,8 +51,7 @@ export declare type BusinessTypeFormValues = {
51
51
  licenseNumber: string;
52
52
  entityLegalName?: string;
53
53
  selectedLicense?: License;
54
- certificateId?: string;
55
- certificateFile?: File;
54
+ certificateId?: Array<string>;
56
55
  articleId?: string;
57
56
  articleFile?: File;
58
57
  };
@@ -90,10 +89,8 @@ export interface IndividualExtraFormValues extends IndividualAttachmentsFormValu
90
89
  isInfluencer: boolean | null;
91
90
  }
92
91
  export declare type IndividualAttachmentsFormValues = {
93
- civilID?: string;
94
- civilIDFile?: File;
95
- signatureFileId?: string;
96
- signatureFile?: File;
92
+ civilID?: Array<string>;
93
+ signatureFileId?: Array<string>;
97
94
  civilIDUploading?: boolean;
98
95
  signatureFileUploading?: boolean;
99
96
  };
@@ -63,7 +63,7 @@ export declare type CreatePasswordBody = {
63
63
  step_name: string;
64
64
  encryption_contract: Array<string>;
65
65
  };
66
- export declare type VerifyAuthKitOTPBody = {
66
+ export declare type VerifyAuthExpressOTPBody = {
67
67
  auth_token?: string;
68
68
  lead_id?: string;
69
69
  data: string;
@@ -77,12 +77,13 @@ export declare type VerifyAuthKitOTPBody = {
77
77
  encryption_contract: Array<string>;
78
78
  };
79
79
  declare const authService: {
80
- createAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
80
+ createAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<any>;
81
81
  verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
82
82
  createPassword: (data: CreatePasswordBody) => Promise<any>;
83
- verifyAuthKitOTP: (data: VerifyAuthKitOTPBody) => Promise<any>;
83
+ verifyExpressAuth: (data: VerifyAuthExpressOTPBody) => Promise<any>;
84
84
  getVerifyAuth: (token: string, config?: AxiosRequestConfig) => Promise<any>;
85
85
  getTokenVerify: (token: string, config?: AxiosRequestConfig) => Promise<any>;
86
86
  createAuthKitNID: (data: CreateAuthBody) => Promise<any>;
87
+ createExpressAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<any>;
87
88
  };
88
89
  export { authService };
package/build/api/auth.js CHANGED
@@ -12,7 +12,10 @@ var __assign = (this && this.__assign) || function () {
12
12
  import instance, { httpClient } from './axios';
13
13
  import { ENDPOINT_PATHS } from '../constants';
14
14
  var createAuth = function (data, config) {
15
- return instance.post("".concat(ENDPOINT_PATHS.AUTH), data, config);
15
+ return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.AUTH), data: data }, config));
16
+ };
17
+ var createExpressAuth = function (data, config) {
18
+ return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.CREATE_EXPRESS_AUTH_PATH), data: data }, config));
16
19
  };
17
20
  var verifyAuth = function (data, config) {
18
21
  return instance.put("".concat(ENDPOINT_PATHS.AUTH), data, config);
@@ -30,7 +33,7 @@ var getVerifyAuth = function (token, config) {
30
33
  var getTokenVerify = function (token, config) {
31
34
  return httpClient(__assign({ method: 'get', url: "".concat(ENDPOINT_PATHS.TOKEN_VERIFY, "/").concat(token) }, config));
32
35
  };
33
- var verifyAuthKitOTP = function (data) {
36
+ var verifyExpressAuth = function (data) {
34
37
  return httpClient({
35
38
  method: 'put',
36
39
  url: "".concat(ENDPOINT_PATHS.VERIFY_AUTH_OTP),
@@ -48,9 +51,10 @@ var authService = {
48
51
  createAuth: createAuth,
49
52
  verifyAuth: verifyAuth,
50
53
  createPassword: createPassword,
51
- verifyAuthKitOTP: verifyAuthKitOTP,
54
+ verifyExpressAuth: verifyExpressAuth,
52
55
  getVerifyAuth: getVerifyAuth,
53
56
  getTokenVerify: getTokenVerify,
54
- createAuthKitNID: createAuthKitNID
57
+ createAuthKitNID: createAuthKitNID,
58
+ createExpressAuth: createExpressAuth
55
59
  };
56
60
  export { authService };
@@ -47,13 +47,6 @@ export declare type EntityBankUpdateBody = {
47
47
  step_name: string;
48
48
  encryption_contract?: Array<string>;
49
49
  };
50
- export declare type UploadFileBody = {
51
- file_link_create: boolean;
52
- file?: File;
53
- title: string | undefined;
54
- purpose: string;
55
- type?: string;
56
- };
57
50
  export declare type UpdateEntityBody = {
58
51
  id: string;
59
52
  license?: {
@@ -121,7 +114,6 @@ declare const entityService: {
121
114
  retrieveBankAccount: (id: string) => Promise<any>;
122
115
  retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
123
116
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
124
- uploadFileInfo: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<any>;
125
117
  updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
126
118
  retrieveEntity: (entity_id: string) => Promise<any>;
127
119
  updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
@@ -1,14 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  var __rest = (this && this.__rest) || function (s, e) {
13
2
  var t = {};
14
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -72,9 +61,6 @@ var retrieveBankAccount = function (id) {
72
61
  url: "".concat(ENDPOINT_PATHS.BANK, "/").concat(id)
73
62
  });
74
63
  };
75
- var uploadFileInfo = function (data, config) {
76
- return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.FILES_PATH), data: data, headers: { 'Content-Type': 'multipart/form-data' } }, config));
77
- };
78
64
  var updateIndividualInfo = function (_a) {
79
65
  var id = _a.id, data = __rest(_a, ["id"]);
80
66
  return httpClient({
@@ -103,7 +89,6 @@ var entityService = {
103
89
  retrieveBankAccount: retrieveBankAccount,
104
90
  retrieveEntityInfo: retrieveEntityInfo,
105
91
  updateIndividualInfo: updateIndividualInfo,
106
- uploadFileInfo: uploadFileInfo,
107
92
  updateDocumentInfo: updateDocumentInfo,
108
93
  retrieveEntity: retrieveEntity,
109
94
  updateEntity: updateEntity,
@@ -0,0 +1,13 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ export declare type UploadFileBody = {
3
+ file_link_create: boolean;
4
+ file?: File;
5
+ title: string | undefined;
6
+ purpose: string;
7
+ type?: string;
8
+ };
9
+ declare const fileService: {
10
+ uploadFile: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
11
+ uploadFileInfo: (data: UploadFileBody, config?: AxiosRequestConfig) => Promise<any>;
12
+ };
13
+ export { fileService };
@@ -0,0 +1,24 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { ENDPOINT_PATHS } from '../constants';
13
+ import instance, { httpClient } from './axios';
14
+ var uploadFileInfo = function (data, config) {
15
+ return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.FILES_PATH), data: data, headers: { 'Content-Type': 'multipart/form-data' } }, config));
16
+ };
17
+ var uploadFile = function (data, config) {
18
+ return instance.post("".concat(ENDPOINT_PATHS.FILES_PATH), data, __assign({ headers: { 'Content-Type': 'multipart/form-data' } }, config));
19
+ };
20
+ var fileService = {
21
+ uploadFile: uploadFile,
22
+ uploadFileInfo: uploadFileInfo
23
+ };
24
+ export { fileService };
@@ -1,13 +1,14 @@
1
1
  import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, getAxiosHeaders } from './axios';
2
2
  import { ValidateOperatorBody } from './operator';
3
- import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthKitOTPBody } from './auth';
3
+ import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody } from './auth';
4
4
  import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
5
5
  import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
6
- import { EntityInfoBody, EntityBankUpdateBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, UpdateEntityActivityBody, UpdateEntityCapitalBody } from './entity';
6
+ import { EntityInfoBody, EntityBankUpdateBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, UpdateEntityActivityBody, UpdateEntityCapitalBody } from './entity';
7
7
  import { CreateAccountBody } from './account';
8
8
  import { DataElementBody } from './data';
9
9
  import { BrandListBody, UpdateBrandBody, UpdateIndividualBody } from './individual';
10
10
  import { UpdateBoardBody } from './board';
11
+ import { UploadFileBody } from './file';
11
12
  declare const API: {
12
13
  locationService: {
13
14
  getIP: () => Promise<any>;
@@ -22,13 +23,14 @@ declare const API: {
22
23
  };
23
24
  };
24
25
  authService: {
25
- createAuth: (data: CreateAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
26
+ createAuth: (data: CreateAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
26
27
  verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
27
28
  createPassword: (data: CreatePasswordBody) => Promise<any>;
28
- verifyAuthKitOTP: (data: VerifyAuthKitOTPBody) => Promise<any>;
29
+ verifyExpressAuth: (data: VerifyAuthExpressOTPBody) => Promise<any>;
29
30
  getVerifyAuth: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
30
31
  getTokenVerify: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
31
32
  createAuthKitNID: (data: CreateAuthBody) => Promise<any>;
33
+ createExpressAuth: (data: CreateAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
32
34
  };
33
35
  leadService: {
34
36
  createLead: (data: CreateLeadBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -47,7 +49,6 @@ declare const API: {
47
49
  retrieveBankAccount: (id: string) => Promise<any>;
48
50
  retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
49
51
  updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
50
- uploadFileInfo: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
51
52
  updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
52
53
  retrieveEntity: (entity_id: string) => Promise<any>;
53
54
  updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
@@ -120,7 +121,11 @@ declare const API: {
120
121
  updateBrandSales: ({ id, ...data }: import("./individual").UpdateSalesChannels) => void;
121
122
  getBrandListByIndividualId: (id: string) => Promise<any>;
122
123
  };
124
+ fileService: {
125
+ uploadFile: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
126
+ uploadFileInfo: (data: UploadFileBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
127
+ };
123
128
  };
124
- export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthKitOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody };
129
+ export type { ValidateOperatorBody, CreateAuthBody, 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 };
125
130
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
126
131
  export default API;
@@ -13,6 +13,7 @@ import { individualService } from './individual';
13
13
  import { boardService } from './board';
14
14
  import { userService } from './user';
15
15
  import { brandService } from './brand';
16
+ import { fileService } from './file';
16
17
  var API = {
17
18
  locationService: locationService,
18
19
  operatorService: operatorService,
@@ -27,7 +28,8 @@ var API = {
27
28
  individualService: individualService,
28
29
  boardService: boardService,
29
30
  userService: userService,
30
- brandService: brandService
31
+ brandService: brandService,
32
+ fileService: fileService
31
33
  };
32
34
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
33
35
  export default API;
@@ -141,6 +141,7 @@
141
141
  "file_not_supported_alert": "نوع الملف غير مدعوم",
142
142
  "file_size_alert": "حجم الملف اكبر من المطلوب",
143
143
  "file_upload_error": "هناك مشكلة في رفع الملف, يرجى المحاولة لاحقاً.",
144
+ "file_upload_article_error": "هناك مشكلة في رفع الملف, يرجى المحاولة لاحقاً.",
144
145
  "file_upload_failed": "أنت تواجه بعض التحديات في تحميل الملف. يرجى المحاولة مرة أخرى.",
145
146
  "file_uploading_title": "جاري الرفع.....",
146
147
  "fl_kw_max_length": "May you please verify the entered freelancer registration reference. (Note - the freelancer registration may contains characters and digits).",
@@ -333,6 +334,8 @@
333
334
  "paci_verification_redirection_message": "You will be redirected now",
334
335
  "commercial_reg_hint": "Commercial Registration",
335
336
  "homemaker_reg_hint": "Home Business",
337
+ "file_already_exist": "File is already uploaded",
338
+ "file_exceed_max_limit": "You can able to upload maximum {{length}} files",
336
339
  "unified_number_label": "Unified Number",
337
340
  "unified_number_hint": "00000",
338
341
  "business_expiry_date": "Expiry Date",
@@ -352,5 +355,6 @@
352
355
  "capital_paid_required": "Please Enter paid amount",
353
356
  "capital_share_count_required": "Please Enter share count",
354
357
  "capital_share_value_required": "Please Enter share value",
355
- "unified_number_required": "Unified Number Required"
358
+ "unified_number_required": "Unified Number Required",
359
+ "uploaded_file": "file"
356
360
  }
@@ -148,6 +148,7 @@
148
148
  "file_not_supported_alert": "File not supported, please try again",
149
149
  "file_size_alert": "Your file is too big, please upload another",
150
150
  "file_upload_error": "Something went wrong, please try again",
151
+ "file_upload_article_error": "Something went wrong, please try again",
151
152
  "file_upload_failed": "You are experiencing some challenges uploading the file. Please give it another try.",
152
153
  "file_uploading_title": "Uploading....",
153
154
  "fl_kw_max_length": "May you please verify the entered freelancer registration reference. (Note - the freelancer registration may contains characters and digits).",
@@ -360,6 +361,8 @@
360
361
  "paci_verification_redirection_message": "You will be redirected now",
361
362
  "commercial_reg_hint": "Commercial Registration",
362
363
  "homemaker_reg_hint": "Home Business",
364
+ "file_already_exist": "file is already uploaded",
365
+ "file_exceed_max_limit": "You can able to upload maximum {{length}} files",
363
366
  "unified_number_label": "Unified Number",
364
367
  "unified_number_hint": "00000",
365
368
  "business_expiry_date": "Expiry Date",
@@ -379,5 +382,6 @@
379
382
  "capital_paid_required": "Please Enter paid amount",
380
383
  "capital_share_count_required": "Please Enter share count",
381
384
  "capital_share_value_required": "Please Enter share value",
382
- "unified_number_required": "Unified Number Required"
385
+ "unified_number_required": "Unified Number Required",
386
+ "uploaded_file": "file"
383
387
  }
@@ -99,7 +99,7 @@ var TextDoneStyled = styled(Text)(function (_a) {
99
99
  });
100
100
  var WarningContainer = styled(Box)(function (_a) {
101
101
  var theme = _a.theme;
102
- return (__assign({ background: theme.palette.warning.dark, paddingBlock: theme.spacing(1.5), paddingInlineStart: theme.spacing(2.5), border: '0.5px solid', display: 'flex', justifyContent: 'space-around', borderColor: theme.palette.warning.main, color: theme.palette.warning.light, padding: theme.spacing(0.5, 1), borderRadius: theme.spacing(12.5) }, theme.typography.caption));
102
+ return (__assign({ background: theme.palette.warning.dark, paddingBlock: theme.spacing(1.5), paddingInlineStart: theme.spacing(2.5), border: '0.5px solid', display: 'flex', justifyContent: 'space-around', borderColor: theme.palette.warning.main, color: theme.palette.warning.light, padding: theme.spacing(0.5, 1), borderRadius: theme.spacing(12.5), alignItems: 'center' }, theme.typography.caption));
103
103
  });
104
104
  var DragAndDrop = function (_a) {
105
105
  var title = _a.title, subTitle = _a.subTitle, description = _a.description, error = _a.error, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, progress = _a.progress, uploading = _a.uploading, fileExists = _a.fileExists, uploadSuccess = _a.uploadSuccess, onSuccess = _a.onSuccess, multiple = _a.multiple;
@@ -1,10 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { CircularProgressProps } from '@mui/material/CircularProgress';
3
+ import { SxProps, Theme } from '@mui/material/styles';
3
4
  export interface CircularProps extends CircularProgressProps {
4
5
  size: number;
5
6
  value: number;
7
+ textSx?: SxProps<Theme>;
6
8
  }
7
- declare function CircularProgressWithLabel({ size, value, ...props }: CircularProps): JSX.Element;
9
+ declare function CircularProgressWithLabel({ size, value, textSx, ...props }: CircularProps): JSX.Element;
8
10
  declare namespace CircularProgressWithLabel {
9
11
  var defaultProps: {
10
12
  size: number;
@@ -39,8 +39,8 @@ var BoxStyled = styled(Box)(function (_a) {
39
39
  });
40
40
  });
41
41
  export default function CircularProgressWithLabel(_a) {
42
- var size = _a.size, value = _a.value, props = __rest(_a, ["size", "value"]);
43
- return (_jsxs(Box, __assign({ sx: { position: 'relative', display: 'inline-flex' } }, { children: [_jsx(CircularProgress, __assign({ variant: 'determinate', size: size, value: value }, props)), _jsx(BoxStyled, { children: _jsx(Typography, __assign({ variant: 'caption', component: 'div', color: 'text.primary' }, { children: "".concat(Math.round(value), "%") })) })] })));
42
+ var size = _a.size, value = _a.value, textSx = _a.textSx, props = __rest(_a, ["size", "value", "textSx"]);
43
+ return (_jsxs(Box, __assign({ sx: { position: 'relative', display: 'inline-flex' } }, { children: [_jsx(CircularProgress, __assign({ variant: 'determinate', size: size, value: value }, props)), _jsx(BoxStyled, { children: _jsx(Typography, __assign({ variant: 'caption', sx: textSx, component: 'div', color: 'text.primary' }, { children: "".concat(Math.round(value), "%") })) })] })));
44
44
  }
45
45
  CircularProgressWithLabel.defaultProps = {
46
46
  size: 54,
@@ -7,7 +7,7 @@ export interface SimpleListProps<T> extends ListProps {
7
7
  onSelectItem: (item: T) => void;
8
8
  renderItem: (item: T, idx: number) => React.ReactElement;
9
9
  searchKeyPath?: string;
10
- searchValuePath?: string;
10
+ searchValuePath?: string[];
11
11
  }
12
12
  declare function SimpleList<T>({ list, listItemProps, onSelectItem, renderItem, children, searchKeyPath, searchValuePath, ...rest }: SimpleListProps<T>): JSX.Element;
13
13
  declare namespace SimpleList {
@@ -94,15 +94,15 @@ function SimpleList(_a) {
94
94
  var onSearch = function (value) {
95
95
  if (value) {
96
96
  var filteredArr = items.filter(function (item) {
97
- var searchValue = get(item, searchValuePath || '') || '';
98
- return searchValue.toLowerCase().includes(value.toLowerCase());
97
+ var target = (searchValuePath === null || searchValuePath === void 0 ? void 0 : searchValuePath.map(function (path) { return get(item, path) || ''; })) || [];
98
+ return target.some(function (item) { return item === null || item === void 0 ? void 0 : item.toLowerCase().includes(value.toLowerCase()); });
99
99
  });
100
100
  setItems(filteredArr);
101
101
  return;
102
102
  }
103
103
  setItems(list);
104
104
  };
105
- return (_jsxs(_Fragment, { children: [searchValuePath && _jsx(Search, { onSearchValue: onSearch }), _jsx(ListStyled, __assign({}, rest, { children: children ||
105
+ return (_jsxs(_Fragment, { children: [(searchValuePath === null || searchValuePath === void 0 ? void 0 : searchValuePath.length) && _jsx(Search, { onSearchValue: onSearch }), _jsx(ListStyled, __assign({}, rest, { children: children ||
106
106
  items.map(function (item, idx) {
107
107
  return (_createElement(ListItemStyled, __assign({}, listItemProps, { onClick: function () {
108
108
  onSelectItem(item);
@@ -1,4 +1,6 @@
1
1
  export declare const ENDPOINT_PATHS: {
2
+ CREATE_EXPRESS_AUTH_PATH: string;
3
+ Verify_Express_Auth_OTP_PATH: string;
2
4
  ADDRESS_PATH: string;
3
5
  SANDBOX_BASE_URL: string;
4
6
  PRODUCTION_BASE_URL: string;
@@ -33,6 +33,8 @@ var FILES = '/files';
33
33
  var TOKEN_VERIFY_PATH = '/token/verify';
34
34
  var RETRIEVE_USER_INFO_PATH = '/user';
35
35
  var BOARD_PATH = '/board';
36
+ var CREATE_EXPRESS_AUTH_PATH = '/connect/auth';
37
+ var Verify_Express_Auth_OTP_PATH = '/connect/auth';
36
38
  var CONNECT_PATH = '/connect';
37
39
  var CREATE_AUTH_NID_PATH = "".concat(CONNECT_PATH, "/auth");
38
40
  var VERIFY_AUTH_OTP_PATH = "".concat(CONNECT_PATH, "/auth");
@@ -41,6 +43,8 @@ var SEGMENTS_PATH = '/businessSegment/list';
41
43
  var TEAM_SIZE_PATH = '/businessSegment/team/list';
42
44
  var ADDRESS_PATH = '/address';
43
45
  export var ENDPOINT_PATHS = {
46
+ CREATE_EXPRESS_AUTH_PATH: CREATE_EXPRESS_AUTH_PATH,
47
+ Verify_Express_Auth_OTP_PATH: Verify_Express_Auth_OTP_PATH,
44
48
  ADDRESS_PATH: ADDRESS_PATH,
45
49
  SANDBOX_BASE_URL: SANDBOX_BASE_URL,
46
50
  PRODUCTION_BASE_URL: PRODUCTION_BASE_URL,
@@ -54,6 +54,7 @@ export declare const ICONS_NAMES: {
54
54
  UPLOAD_ICON: string;
55
55
  ACTIVE_UPLOAD_ICON: string;
56
56
  WARNING_ICON: string;
57
+ ERROR_ICON: string;
57
58
  DONE_ICON: string;
58
59
  DOC_ICON: string;
59
60
  DROP_FILE_ICON: string;
@@ -54,6 +54,7 @@ export var ICONS_NAMES = {
54
54
  UPLOAD_ICON: 'https://dash.b-cdn.net/icons/menu/upload-file.svg',
55
55
  ACTIVE_UPLOAD_ICON: 'https://dash.b-cdn.net/icons/menu/active-upload-icon.png',
56
56
  WARNING_ICON: 'https://dash.b-cdn.net/icons/menu/warning-icon.svg',
57
+ ERROR_ICON: 'https://dash.b-cdn.net/icons/menu/upload_error_icon.svg',
57
58
  DONE_ICON: 'https://dash.b-cdn.net/icons/menu/done.svg',
58
59
  DOC_ICON: 'https://dash.b-cdn.net/icons/menu/document-icon.svg',
59
60
  DROP_FILE_ICON: 'https://dash.b-cdn.net/icons/menu/upload-file-sample.svg',
@@ -12,6 +12,7 @@ export declare const KW_MIN_LICENSE_LENGTH = 3;
12
12
  export declare const KW_MAX_LICENSE_LENGTH = 50;
13
13
  export declare const SAUDI_NUMBER_LENGTH = 9;
14
14
  export declare const MAX_FILE_SIZE = 5000000;
15
+ export declare const MAX_FILE_SIZE_FOUR_MB = 4000000;
15
16
  export declare const VALID_FILE_FORMATS: string[];
16
17
  export declare const REGEX_FULL_NAME: RegExp;
17
18
  export declare const REGEX_WEBSITE: RegExp;
@@ -12,6 +12,7 @@ export var KW_MIN_LICENSE_LENGTH = 3;
12
12
  export var KW_MAX_LICENSE_LENGTH = 50;
13
13
  export var SAUDI_NUMBER_LENGTH = 9;
14
14
  export var MAX_FILE_SIZE = 5000000;
15
+ export var MAX_FILE_SIZE_FOUR_MB = 4000000;
15
16
  export var VALID_FILE_FORMATS = ['image/jpeg', 'image/png', 'image/jpg', 'application/pdf'];
16
17
  export var REGEX_FULL_NAME = /^([a-zA-Z]{2,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,})$/g;
17
18
  export var REGEX_WEBSITE = /^[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,63}(:[0-9]{1,5})?(\/.*)?$/;
@@ -71,7 +71,7 @@ export var verifyAuthOTP = createAsyncThunk('verifyAuthOTPKit', function (params
71
71
  terms: auth.data.termAndConditionChecked ? ['general'] : [],
72
72
  encryption_contract: ['data']
73
73
  };
74
- return [4, API.authService.verifyAuthKitOTP(payload)];
74
+ return [4, API.authService.verifyExpressAuth(payload)];
75
75
  case 1:
76
76
  data = _g.sent();
77
77
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
@@ -243,7 +243,7 @@ export var uploadBankStatement = createAsyncThunk('uploadBankStatement', functio
243
243
  var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
244
244
  onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
245
245
  };
246
- return [4, API.entityService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
246
+ return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
247
247
  case 1:
248
248
  data = _b.sent();
249
249
  return [2, { data: data }];
@@ -1,5 +1,5 @@
1
1
  import { RootState } from '../../../app/store';
2
- import { ActivitiesFormValues, CustomersFormValues, BusinessTypeFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, FlowsTypes, Activity, CivilFormValues } from '../../../@types';
2
+ import { ActivitiesFormValues, CustomersFormValues, BusinessTypeFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, FlowsTypes, Activity, CivilFormValues, ActionState } from '../../../@types';
3
3
  export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
4
4
  data: any;
5
5
  leadData: any;
@@ -59,14 +59,11 @@ export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThu
59
59
  documentData: any;
60
60
  entityData: any;
61
61
  }, BusinessTypeFormValues, {}>;
62
- interface UploadLicenseCertificateParams {
62
+ interface UploadArticleParams {
63
63
  file: File;
64
64
  onProgress?: (value: number) => void;
65
- }
66
- export declare const uploadLicenseCertificate: import("@reduxjs/toolkit").AsyncThunk<{
67
- data: any;
68
- }, UploadLicenseCertificateParams, {}>;
69
- interface UploadArticleParams extends UploadLicenseCertificateParams {
65
+ onSuccess?: (fileId: string) => void;
66
+ onFailure?: (error: string) => void;
70
67
  }
71
68
  export declare const uploadArticle: import("@reduxjs/toolkit").AsyncThunk<{
72
69
  data: any;
@@ -116,15 +113,16 @@ export interface BusinessState extends SharedState<BusinessData> {
116
113
  customLoading?: boolean;
117
114
  uploading?: boolean;
118
115
  uploadingArticle?: boolean;
116
+ uploadingArticleError?: string | null;
119
117
  }
120
118
  export declare const businessSlice: import("@reduxjs/toolkit").Slice<BusinessState, {
121
119
  clearError: (state: BusinessState) => void;
122
120
  stopLoader: (state: BusinessState) => void;
123
121
  resetOTPScreen: (state: BusinessState) => void;
124
- clearCertificateId: (state: BusinessState) => void;
125
122
  clearArticleId: (state: BusinessState) => void;
123
+ uploadingStatus: (state: BusinessState, action: ActionState<boolean>) => void;
126
124
  }, "business/store">;
127
- export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, clearCertificateId: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, clearArticleId: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
125
+ 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>;
128
126
  declare const _default: import("redux").Reducer<BusinessState, import("redux").AnyAction>;
129
127
  export default _default;
130
128
  export declare const businessSelector: (state: RootState) => BusinessState;