@tap-payments/auth-jsconnect 2.10.9-development → 2.10.9

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 (179) hide show
  1. package/README.md +2 -2
  2. package/build/@types/app.d.ts +2 -2
  3. package/build/@types/app.js +0 -1
  4. package/build/@types/form.d.ts +4 -2
  5. package/build/@types/index.d.ts +0 -1
  6. package/build/@types/index.js +0 -1
  7. package/build/api/auth.d.ts +1 -9
  8. package/build/api/axios.d.ts +1 -1
  9. package/build/api/entity.d.ts +3 -0
  10. package/build/api/index.d.ts +1 -7
  11. package/build/api/index.js +1 -3
  12. package/build/api/lead.d.ts +1 -0
  13. package/build/app/rootReducer.d.ts +0 -1
  14. package/build/app/rootReducer.js +1 -3
  15. package/build/app/settings.js +1 -2
  16. package/build/app/store.d.ts +0 -2
  17. package/build/assets/currencies/AEDSymbol.js +1 -1
  18. package/build/assets/currencies/SARSymbol.js +1 -1
  19. package/build/assets/locales/ar.json +13 -5
  20. package/build/assets/locales/en.json +14 -5
  21. package/build/components/OTPTimer/OTPTimer.d.ts +1 -2
  22. package/build/components/OTPTimer/OTPTimer.js +4 -4
  23. package/build/components/Tooltip/Tooltip.js +1 -1
  24. package/build/constants/api.d.ts +2 -0
  25. package/build/constants/api.js +4 -0
  26. package/build/constants/app.d.ts +12 -12
  27. package/build/constants/app.js +8 -119
  28. package/build/constants/assets.d.ts +4 -6
  29. package/build/constants/assets.js +118 -114
  30. package/build/constants/dummy.js +27 -20
  31. package/build/constants/flows.d.ts +0 -15
  32. package/build/constants/flows.js +0 -15
  33. package/build/constants/validation.d.ts +1 -1
  34. package/build/constants/validation.js +1 -1
  35. package/build/features/app/business/businessStore.js +15 -10
  36. package/build/features/app/connect/connectStore.d.ts +6 -5
  37. package/build/features/app/connect/connectStore.js +23 -10
  38. package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -5
  39. package/build/features/app/connectExpress/connectExpressStore.js +43 -14
  40. package/build/features/app/individual/individualStore.js +5 -3
  41. package/build/features/auth/Auth.d.ts +1 -1
  42. package/build/features/auth/screens/AuthenticationList/EntityList.js +2 -2
  43. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +1 -1
  44. package/build/features/business/screens/BusinessType/BusinessType.js +13 -2
  45. package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
  46. package/build/features/business/screens/BusinessType/LicenseList.js +15 -7
  47. package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
  48. package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
  49. package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
  50. package/build/features/business/screens/BusinessType/validation.js +31 -10
  51. package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
  52. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +2 -2
  53. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
  54. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +23 -7
  55. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
  56. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
  57. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +36 -0
  58. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
  59. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
  60. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
  61. package/build/features/entity/screens/EntityName/EntityName.js +16 -15
  62. package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
  63. package/build/features/entity/screens/EntityName/validation.d.ts +50 -48
  64. package/build/features/entity/screens/EntityName/validation.js +100 -85
  65. package/build/features/featuresScreens.d.ts +0 -1
  66. package/build/features/featuresScreens.js +0 -67
  67. package/build/features/shared/Button/Button.js +1 -1
  68. package/build/features/shared/Button/FlowsButtons.js +1 -1
  69. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +2 -2
  70. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -3
  71. package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
  72. package/build/hooks/useAppConfig.js +1 -1
  73. package/build/hooks/useAppDispatch.d.ts +0 -1
  74. package/build/index.d.ts +2 -3
  75. package/build/index.js +2 -4
  76. package/build/theme/palette.js +0 -12
  77. package/build/theme/typography.js +0 -4
  78. package/build/utils/common.d.ts +1 -1
  79. package/build/utils/common.js +14 -8
  80. package/build/utils/error.d.ts +1 -0
  81. package/build/utils/error.js +3 -0
  82. package/build/utils/string.d.ts +3 -2
  83. package/build/utils/string.js +5 -5
  84. package/build/utils/validation.js +1 -1
  85. package/package.json +3 -3
  86. package/build/@types/terminal.d.ts +0 -116
  87. package/build/@types/terminal.js +0 -1
  88. package/build/api/terminal.d.ts +0 -28
  89. package/build/api/terminal.js +0 -45
  90. package/build/components/DeviceCard/DeviceCard.d.ts +0 -18
  91. package/build/components/DeviceCard/DeviceCard.js +0 -103
  92. package/build/components/DeviceCard/index.d.ts +0 -3
  93. package/build/components/DeviceCard/index.js +0 -2
  94. package/build/features/app/terminal/terminalStore.d.ts +0 -109
  95. package/build/features/app/terminal/terminalStore.js +0 -673
  96. package/build/features/shared/PushNotification/PushNotification.d.ts +0 -11
  97. package/build/features/shared/PushNotification/PushNotification.js +0 -34
  98. package/build/features/shared/PushNotification/index.d.ts +0 -2
  99. package/build/features/shared/PushNotification/index.js +0 -2
  100. package/build/features/terminal/Terminal.d.ts +0 -14
  101. package/build/features/terminal/Terminal.js +0 -95
  102. package/build/features/terminal/index.d.ts +0 -1
  103. package/build/features/terminal/index.js +0 -1
  104. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +0 -3
  105. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +0 -68
  106. package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +0 -2
  107. package/build/features/terminal/screens/LinkNewTerminal/index.js +0 -2
  108. package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +0 -10
  109. package/build/features/terminal/screens/LinkNewTerminal/styles.js +0 -28
  110. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +0 -3
  111. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +0 -51
  112. package/build/features/terminal/screens/LinkedSuccess/index.d.ts +0 -2
  113. package/build/features/terminal/screens/LinkedSuccess/index.js +0 -2
  114. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +0 -3
  115. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +0 -50
  116. package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +0 -2
  117. package/build/features/terminal/screens/LinkedTerminalInfo/index.js +0 -2
  118. package/build/features/terminal/screens/Loading/Loading.d.ts +0 -4
  119. package/build/features/terminal/screens/Loading/Loading.js +0 -10
  120. package/build/features/terminal/screens/Loading/index.d.ts +0 -2
  121. package/build/features/terminal/screens/Loading/index.js +0 -2
  122. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +0 -3
  123. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +0 -56
  124. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +0 -2
  125. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +0 -2
  126. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +0 -36
  127. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +0 -34
  128. package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +0 -5
  129. package/build/features/terminal/screens/OperatorError/OperatorError.js +0 -9
  130. package/build/features/terminal/screens/OperatorError/index.d.ts +0 -2
  131. package/build/features/terminal/screens/OperatorError/index.js +0 -2
  132. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -3
  133. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -21
  134. package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +0 -2
  135. package/build/features/terminal/screens/ResetPasswordSuccess/index.js +0 -2
  136. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
  137. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -31
  138. package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +0 -2
  139. package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +0 -2
  140. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +0 -9
  141. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +0 -20
  142. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +0 -3
  143. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +0 -144
  144. package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +0 -2
  145. package/build/features/terminal/screens/TerminalDeviceList/index.js +0 -2
  146. package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +0 -9
  147. package/build/features/terminal/screens/TerminalDeviceList/styles.js +0 -13
  148. package/build/features/terminal/screens/TerminalListPage/TerminalListPage.d.ts +0 -3
  149. package/build/features/terminal/screens/TerminalListPage/TerminalListPage.js +0 -42
  150. package/build/features/terminal/screens/TerminalListPage/index.d.ts +0 -2
  151. package/build/features/terminal/screens/TerminalListPage/index.js +0 -2
  152. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +0 -3
  153. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +0 -53
  154. package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +0 -2
  155. package/build/features/terminal/screens/UnlinkedSuccess/index.js +0 -2
  156. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +0 -3
  157. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +0 -98
  158. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +0 -2
  159. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +0 -2
  160. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +0 -26
  161. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +0 -30
  162. package/build/features/terminal/screens/Verify/OTPInput.d.ts +0 -7
  163. package/build/features/terminal/screens/Verify/OTPInput.js +0 -51
  164. package/build/features/terminal/screens/Verify/Verify.d.ts +0 -5
  165. package/build/features/terminal/screens/Verify/Verify.js +0 -85
  166. package/build/features/terminal/screens/Verify/index.d.ts +0 -2
  167. package/build/features/terminal/screens/Verify/index.js +0 -2
  168. package/build/features/terminal/screens/Verify/validation.d.ts +0 -8
  169. package/build/features/terminal/screens/Verify/validation.js +0 -4
  170. package/build/features/terminal/screens/shared/Header.d.ts +0 -10
  171. package/build/features/terminal/screens/shared/Header.js +0 -30
  172. package/build/features/terminal/screens/shared/TerminalList.d.ts +0 -11
  173. package/build/features/terminal/screens/shared/TerminalList.js +0 -25
  174. package/build/features/terminal/screens/shared/index.d.ts +0 -5
  175. package/build/features/terminal/screens/shared/index.js +0 -5
  176. package/build/features/terminal/screens/shared/styles.d.ts +0 -196
  177. package/build/features/terminal/screens/shared/styles.js +0 -155
  178. package/build/features/terminal/screens/shared/utils.d.ts +0 -7
  179. package/build/features/terminal/screens/shared/utils.js +0 -24
@@ -23,19 +23,4 @@ export declare const CONNECT_FLOWS: {
23
23
  verifyNafath: KYC_FLOWS;
24
24
  success: KYC_FLOWS;
25
25
  };
26
- terminal: {
27
- loadingData: string;
28
- operatorError: string;
29
- verify: string;
30
- noTerminalLinked: string;
31
- terminalDeviceList: string;
32
- terminalLinkNew: string;
33
- linkedTerminalInfo: string;
34
- unlinkedTerminalInfo: string;
35
- terminalLinkedSuccess: string;
36
- terminalUnlinkedSuccess: string;
37
- board: string;
38
- resetPassword: string;
39
- terminalList: string;
40
- };
41
26
  };
@@ -23,20 +23,5 @@ export var CONNECT_FLOWS = {
23
23
  verifyPACI: KYC_FLOWS.verifyPACI,
24
24
  verifyNafath: KYC_FLOWS.verifyNafath,
25
25
  success: KYC_FLOWS.success
26
- },
27
- terminal: {
28
- loadingData: 'TERMINAL_LOADING_DATA_STEP',
29
- operatorError: 'TERMINAL_OPERATOR_ERROR_STEP',
30
- verify: 'TERMINAL_VERIFY_OTP_STEP',
31
- noTerminalLinked: 'TERMINAL_NO_TERMINAL_LINKED',
32
- terminalDeviceList: 'TERMINAL_DEVICE_LIST_STEP',
33
- terminalLinkNew: 'TERMINAL_LINK_NEW_STEP',
34
- linkedTerminalInfo: 'TERMINAL_LINKED_INFO_STEP',
35
- unlinkedTerminalInfo: 'TERMINAL_UNLINKED_INFO_STEP',
36
- terminalLinkedSuccess: 'TERMINAL_LINKED_SUCCESS_STEP',
37
- terminalUnlinkedSuccess: 'TERMINAL_UNLINKED_SUCCESS_STEP',
38
- board: 'TERMINAL_BOARD_STEP',
39
- resetPassword: 'TERMINAL_RESET_PASSWORD',
40
- terminalList: 'TERMINAL_LIST_STEP'
41
26
  }
42
27
  };
@@ -10,6 +10,7 @@ export declare const LICENSE_NUMBER_MIN_LENGTH = 5;
10
10
  export declare const FL_NUMBER_ENTITY_LENGTH = 50;
11
11
  export declare const FL_MIN_LICENSE_LENGTH = 5;
12
12
  export declare const CR_MIN_LICENSE_LENGTH = 5;
13
+ export declare const UNIFIED_NUMBER_MIN_LENGTH = 2;
13
14
  export declare const MAX_EMAIL_LENGTH = 50;
14
15
  export declare const BRAND_NAME_MAX_LENGTH = 99;
15
16
  export declare const KW_MIN_LICENSE_LENGTH = 3;
@@ -32,4 +33,3 @@ export declare const DIGITS_ONLY: RegExp;
32
33
  export declare const REGEX_PHONE_APP_NAME: RegExp;
33
34
  export declare const REGEX_IBAN: RegExp;
34
35
  export declare const NAFATH_PACI_TIMEOUT_DURATION = 30000;
35
- export declare const TERMINAL_PUSH_NOTIFICATION_DURATION = 10000000;
@@ -10,6 +10,7 @@ export var LICENSE_NUMBER_MIN_LENGTH = 5;
10
10
  export var FL_NUMBER_ENTITY_LENGTH = 50;
11
11
  export var FL_MIN_LICENSE_LENGTH = 5;
12
12
  export var CR_MIN_LICENSE_LENGTH = 5;
13
+ export var UNIFIED_NUMBER_MIN_LENGTH = 2;
13
14
  export var MAX_EMAIL_LENGTH = 50;
14
15
  export var BRAND_NAME_MAX_LENGTH = 99;
15
16
  export var KW_MIN_LICENSE_LENGTH = 3;
@@ -32,4 +33,3 @@ export var DIGITS_ONLY = /^\d+$/;
32
33
  export var REGEX_PHONE_APP_NAME = /^[a-zA-Z0-9[._-]*$/;
33
34
  export var REGEX_IBAN = /^[a-zA-Z]{2}[a-zA-Z0-9]{13,34}$/g;
34
35
  export var NAFATH_PACI_TIMEOUT_DURATION = 30000;
35
- export var TERMINAL_PUSH_NOTIFICATION_DURATION = 10000000;
@@ -651,26 +651,26 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
651
651
  });
652
652
  }); });
653
653
  export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
654
- var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, documentData, entityData, brandData, data_1, brandRes, _c, message, error, list, entityId, documentBody, payload_1;
654
+ var _a, settings, business, isKWCountry, selectedLicense, licenseNumber, entityLegalName, certificateId, articleId, selectedEntityLicense, unifiedNumber, isFL, _b, lead_id, brand, stepName, payload, data, accountBody, accountData, documentData, entityData, brandData, data_1, brandRes, _c, message, error, list, entityId, documentBody, payload_1;
655
655
  var _d, _e, _f;
656
656
  return __generator(this, function (_g) {
657
657
  switch (_g.label) {
658
658
  case 0:
659
659
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
660
660
  isKWCountry = isKW(settings.data.businessCountry.iso2);
661
- selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense;
661
+ selectedLicense = params.selectedLicense, licenseNumber = params.licenseNumber, entityLegalName = params.entityLegalName, certificateId = params.certificateId, articleId = params.articleId, selectedEntityLicense = params.selectedEntityLicense, unifiedNumber = params.unifiedNumber;
662
662
  isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
663
663
  _b = business.data.verify.responseBody || {}, lead_id = _b.lead_id, brand = _b.brand;
664
664
  stepName = 'BUSINESS_ACTIVITIES_STEP';
665
665
  payload = __assign(__assign(__assign(__assign({ id: lead_id || '', entity: {
666
666
  id: (selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && (isKWCountry ? !isFL : true) ? selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id : ''
667
- } }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
667
+ }, unified_number: unifiedNumber }, (!(selectedEntityLicense === null || selectedEntityLicense === void 0 ? void 0 : selectedEntityLicense.id) && {
668
668
  license_number: isKWCountry && isFL ? '' : licenseNumber,
669
669
  license_type: isFL ? LicenseType.FL : LicenseType.CR,
670
670
  business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type
671
671
  })), { step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO }), (isKWCountry && {
672
672
  business_name: isFL ? undefined : { ar: entityLegalName, en: entityLegalName }
673
- })), { encryption_contract: ['license_number', 'business_type', 'license_type'] });
673
+ })), { encryption_contract: ['license_number', 'business_type', 'license_type', 'entity.unified_number'] });
674
674
  return [4, API.leadService.updateLead(payload)];
675
675
  case 1:
676
676
  data = _g.sent();
@@ -988,6 +988,7 @@ var initialState = {
988
988
  businessTypeData: {
989
989
  licenseNumber: '',
990
990
  entityLegalName: '',
991
+ unifiedNumber: '',
991
992
  isPrevDob: false
992
993
  },
993
994
  activitiesData: {
@@ -1264,7 +1265,7 @@ export var businessSlice = createSlice({
1264
1265
  state.loading = true;
1265
1266
  })
1266
1267
  .addCase(retrieveEntityList.fulfilled, function (state, action) {
1267
- var _a, _b, _c, _d;
1268
+ var _a, _b, _c, _d, _e, _f;
1268
1269
  state.error = null;
1269
1270
  state.loading = false;
1270
1271
  var data = action.payload;
@@ -1285,7 +1286,7 @@ export var businessSlice = createSlice({
1285
1286
  licenseList = __spreadArray(__spreadArray([], licenseList, true), mappedFL, true);
1286
1287
  licenseList = licenseList.filter(function (_a) {
1287
1288
  var license = _a.license;
1288
- return !(entityLicenseList || []).some(function (e) { return e.license.number === license.number; });
1289
+ return !(entityLicenseList || []).some(function (e) { var _a, _b; return e.license.number === license.number || ((_a = e.license.additional_info) === null || _a === void 0 ? void 0 : _a.unified_number) === ((_b = license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number); });
1289
1290
  });
1290
1291
  }
1291
1292
  }
@@ -1295,8 +1296,10 @@ export var businessSlice = createSlice({
1295
1296
  var selectedLicense = licenseList === null || licenseList === void 0 ? void 0 : licenseList[0];
1296
1297
  var isOtherLicense_1 = ((_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.number) === 'other_fl' || ((_c = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _c === void 0 ? void 0 : _c.number) === 'other_cr';
1297
1298
  state.data.businessTypeData.selectedLicense = selectedLicense;
1298
- if (!isOtherLicense_1)
1299
+ if (!isOtherLicense_1) {
1299
1300
  state.data.businessTypeData.licenseNumber = ((_d = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _d === void 0 ? void 0 : _d.number) || '';
1301
+ state.data.businessTypeData.unifiedNumber = ((_f = (_e = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _e === void 0 ? void 0 : _e.additional_info) === null || _f === void 0 ? void 0 : _f.unified_number) || '';
1302
+ }
1300
1303
  }
1301
1304
  })
1302
1305
  .addCase(retrieveEntityList.rejected, function (state, action) {
@@ -1308,10 +1311,10 @@ export var businessSlice = createSlice({
1308
1311
  state.loading = true;
1309
1312
  })
1310
1313
  .addCase(retrieveAllEntityList.fulfilled, function (state, action) {
1311
- var _a;
1314
+ var _a, _b, _c;
1312
1315
  state.error = null;
1313
1316
  state.loading = false;
1314
- var _b = action.payload, data = _b.data, businessCountryCode = _b.businessCountryCode, entityId = _b.entityId;
1317
+ var _d = action.payload, data = _d.data, businessCountryCode = _d.businessCountryCode, entityId = _d.entityId;
1315
1318
  var isKWCountry = isKW(businessCountryCode);
1316
1319
  var list = (data === null || data === void 0 ? void 0 : data.entities_info) || [];
1317
1320
  if (isKWCountry) {
@@ -1329,8 +1332,10 @@ export var businessSlice = createSlice({
1329
1332
  var selectedLicense = findEntity ? findEntity : entityLicenseList[0];
1330
1333
  state.data.businessTypeData.selectedEntityLicense = selectedLicense;
1331
1334
  state.data.businessTypeData.selectedLicense = selectedLicense;
1332
- if (!isOtherLicense(selectedLicense))
1335
+ if (!isOtherLicense(selectedLicense)) {
1333
1336
  state.data.businessTypeData.licenseNumber = ((_a = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _a === void 0 ? void 0 : _a.number) || '';
1337
+ state.data.businessTypeData.unifiedNumber = ((_c = (_b = selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.license) === null || _b === void 0 ? void 0 : _b.additional_info) === null || _c === void 0 ? void 0 : _c.unified_number) || '';
1338
+ }
1334
1339
  }
1335
1340
  })
1336
1341
  .addCase(retrieveAllEntityList.rejected, function (state, action) {
@@ -82,14 +82,15 @@ export declare const updateLeadMobile: import("@reduxjs/toolkit").AsyncThunk<{
82
82
  export declare const skipUpdateLeadMobile: import("@reduxjs/toolkit").AsyncThunk<{
83
83
  leadResponse: any;
84
84
  }, void, {}>;
85
+ interface EmailCheckProps {
86
+ email: string;
87
+ cancelToken: CancelToken;
88
+ onSuccess?: () => void;
89
+ }
85
90
  export declare const checkEmailAvailability: import("@reduxjs/toolkit").AsyncThunk<{
86
91
  response: any;
87
92
  formData: string;
88
- } | undefined, {
89
- email: string;
90
- cancelToken: CancelToken;
91
- onSuccess?: (() => void) | undefined;
92
- }, {}>;
93
+ } | undefined, EmailCheckProps, {}>;
93
94
  export declare const checkBrandNameAvailability: import("@reduxjs/toolkit").AsyncThunk<{
94
95
  response: any;
95
96
  formData: {
@@ -71,7 +71,7 @@ import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2
71
71
  import { COLLECT_DOB_INFO_NAFATH, CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, NAFATH_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, OTHER_BRAND } from '../../../constants';
72
72
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
73
73
  import { AuthForType, FlowsTypes } from '../../../@types';
74
- import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, isNetworkError, isTimeoutError } from '../../../utils';
74
+ import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, isNetworkError, isTimeoutError, isInternalServerError } from '../../../utils';
75
75
  export var updateBusinessCountry = createAsyncThunk('connect/updateBusinessCountry', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
76
76
  var connect, payload, data;
77
77
  return __generator(this, function (_a) {
@@ -763,23 +763,36 @@ export var skipUpdateLeadMobile = createAsyncThunk('connect/skipUpdateLeadMobile
763
763
  export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
764
764
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
765
765
  return __awaiter(void 0, void 0, void 0, function () {
766
- var connect, requestBody, data;
767
- var _b, _c;
768
- return __generator(this, function (_d) {
769
- switch (_d.label) {
766
+ var responseBody, requestBody, data, retryData;
767
+ var _b, _c, _d, _e;
768
+ return __generator(this, function (_f) {
769
+ switch (_f.label) {
770
770
  case 0:
771
- connect = thunkApi.getState().connect;
771
+ responseBody = thunkApi.getState().connect.data.otpData.responseBody;
772
772
  requestBody = {
773
773
  email: email,
774
- country: (_c = (_b = connect.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.leadData) === null || _c === void 0 ? void 0 : _c.country_code,
774
+ country: (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.leadData) === null || _b === void 0 ? void 0 : _b.country_code,
775
775
  encryption_contract: ['email']
776
776
  };
777
777
  return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
778
778
  case 1:
779
- data = (_d.sent()).data;
780
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
781
- if (!data.errors)
779
+ data = (_f.sent()).data;
780
+ if (!data.errors) {
781
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
782
782
  return [2, { response: data, formData: email }];
783
+ }
784
+ if (!isInternalServerError((_d = (_c = data.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.error)) {
785
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
786
+ return [2];
787
+ }
788
+ return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
789
+ case 2:
790
+ retryData = (_f.sent()).data;
791
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
792
+ if (!retryData.errors)
793
+ return [2, { response: retryData, formData: email }];
794
+ if (isInternalServerError((_e = retryData.errors) === null || _e === void 0 ? void 0 : _e[0].error))
795
+ return [2, { response: { is_available: true }, formData: email }];
783
796
  return [2];
784
797
  }
785
798
  });
@@ -82,14 +82,15 @@ export declare const verifyNafathIdentityAsync: import("@reduxjs/toolkit").Async
82
82
  isNextScreenIsDob: boolean;
83
83
  }, verifyPACIAsyncParams, {}>;
84
84
  export declare const verifyPaciLeadIdentityAsync: import("@reduxjs/toolkit").AsyncThunk<any, verifyPACIAsyncParams, {}>;
85
+ interface EmailCheckProps {
86
+ email: string;
87
+ cancelToken: CancelToken;
88
+ onSuccess?: () => void;
89
+ }
85
90
  export declare const checkEmailAvailabilityAsync: import("@reduxjs/toolkit").AsyncThunk<{
86
91
  response: any;
87
92
  formData: string;
88
- } | undefined, {
89
- email: string;
90
- cancelToken: CancelToken;
91
- onSuccess?: (() => void) | undefined;
92
- }, {}>;
93
+ } | undefined, EmailCheckProps, {}>;
93
94
  export declare const checkBrandNameAvailabilityAsync: import("@reduxjs/toolkit").AsyncThunk<{
94
95
  response: any;
95
96
  formData: {
@@ -61,7 +61,7 @@ import { FlowsTypes, AuthForType, BusinessType, LicenseType, AuthForScreen } fro
61
61
  import API from '../../../api';
62
62
  import { ADD_NEW_ENTITY, COLLECT_DOB_INFO_NAFATH, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, NAFATH_PACI_TIMEOUT_DURATION, NAFATH_VERIFICATION_FAILED, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH, SCOPE_MERCHANT } from '../../../constants';
63
63
  import { defaultCountry } from '../../../constants';
64
- import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension, getMetaData, isNetworkError, isTimeoutError } from '../../../utils';
64
+ import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, sendCustomDimension, getMetaData, isNetworkError, isTimeoutError, isInternalServerError } from '../../../utils';
65
65
  export var updateBusinessCountryAsync = createAsyncThunk('connectExpress/updateBusinessCountryAsync', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
66
  var connectExpress, payload, data;
67
67
  return __generator(this, function (_a) {
@@ -838,23 +838,36 @@ export var verifyPaciLeadIdentityAsync = createAsyncThunk('connectExpress/verify
838
838
  export var checkEmailAvailabilityAsync = createAsyncThunk('connectExpress/CheckEmailAvailabilityAsync', function (_a, thunkApi) {
839
839
  var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
840
840
  return __awaiter(void 0, void 0, void 0, function () {
841
- var connectExpress, requestBody, data;
842
- var _b, _c;
843
- return __generator(this, function (_d) {
844
- switch (_d.label) {
841
+ var responseData, requestBody, data, retryData;
842
+ var _b, _c, _d, _e, _f;
843
+ return __generator(this, function (_g) {
844
+ switch (_g.label) {
845
845
  case 0:
846
- connectExpress = thunkApi.getState().connectExpress;
846
+ responseData = thunkApi.getState().connectExpress.data.responseData;
847
847
  requestBody = {
848
848
  email: email,
849
- country: (_c = (_b = connectExpress.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) === null || _c === void 0 ? void 0 : _c.country_code,
849
+ country: (_b = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _b === void 0 ? void 0 : _b.country_code,
850
850
  encryption_contract: ['email']
851
851
  };
852
852
  return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
853
853
  case 1:
854
- data = (_d.sent()).data;
855
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
856
- if (!data.errors)
854
+ data = (_g.sent()).data;
855
+ if (!data.errors) {
856
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
857
857
  return [2, { response: data, formData: email }];
858
+ }
859
+ if (!isInternalServerError((_d = (_c = data.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.error)) {
860
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
861
+ return [2];
862
+ }
863
+ return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
864
+ case 2:
865
+ retryData = (_g.sent()).data;
866
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
867
+ if (!retryData.errors)
868
+ return [2, { response: retryData, formData: email }];
869
+ if (isInternalServerError((_f = (_e = retryData.errors) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.error))
870
+ return [2, { response: { is_available: true }, formData: email }];
858
871
  return [2];
859
872
  }
860
873
  });
@@ -1129,13 +1142,13 @@ export var updateLeadIndividualAsync = createAsyncThunk('connectExpress/updateLe
1129
1142
  export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDataAsync ', function (_a, thunkApi) {
1130
1143
  var formData = _a.formData, originalFormData = _a.originalFormData;
1131
1144
  return __awaiter(void 0, void 0, void 0, function () {
1132
- var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
1145
+ var _b, settings, connectExpress, selectedLicense, brandName, licenseNumber, termAndConditionChecked, unifiedNumber, isKWCountry, isFL, _c, responseData, isLeadIdPassed, id, brandNameBody, payload, data;
1133
1146
  var _d, _e;
1134
1147
  return __generator(this, function (_f) {
1135
1148
  switch (_f.label) {
1136
1149
  case 0:
1137
1150
  _b = thunkApi.getState(), settings = _b.settings, connectExpress = _b.connectExpress;
1138
- selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked;
1151
+ selectedLicense = formData.selectedLicense, brandName = formData.brandName, licenseNumber = formData.licenseNumber, termAndConditionChecked = formData.termAndConditionChecked, unifiedNumber = formData.unifiedNumber;
1139
1152
  isKWCountry = isKW(settings.data.businessCountry.iso2);
1140
1153
  isFL = (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) === BusinessType.FL;
1141
1154
  _c = connectExpress.data, responseData = _c.responseData, isLeadIdPassed = _c.isLeadIdPassed;
@@ -1153,6 +1166,7 @@ export var updateLeadBusinessDataAsync = createAsyncThunk('updateLeadBusinessDat
1153
1166
  license_type: (selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type) ? (isFL ? LicenseType.FL : LicenseType.CR) : undefined,
1154
1167
  business_type: selectedLicense === null || selectedLicense === void 0 ? void 0 : selectedLicense.type,
1155
1168
  is_acknowledged: true,
1169
+ unified_number: unifiedNumber,
1156
1170
  terms_conditions_accepted: !isLeadIdPassed ? termAndConditionChecked : undefined,
1157
1171
  step_name: CONNECT_EXPRESS_STEP_NAMES.UPDATE_LEAD_BRAND_BUSINESS,
1158
1172
  encryption_contract: []
@@ -1480,6 +1494,7 @@ var initialState = {
1480
1494
  businessData: {
1481
1495
  brandName: '',
1482
1496
  licenseNumber: '',
1497
+ unifiedNumber: '',
1483
1498
  termAndConditionChecked: false
1484
1499
  },
1485
1500
  authenticationData: {
@@ -1776,7 +1791,7 @@ export var connectSlice = createSlice({
1776
1791
  state.error = null;
1777
1792
  })
1778
1793
  .addCase(retrieveEntityListAsync.fulfilled, function (state, action) {
1779
- var _a, _b;
1794
+ var _a, _b, _c, _d;
1780
1795
  state.loading = false;
1781
1796
  var data = action.payload;
1782
1797
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
@@ -1796,7 +1811,8 @@ export var connectSlice = createSlice({
1796
1811
  }
1797
1812
  }
1798
1813
  licenseList = __spreadArray(__spreadArray([], licenseList, true), [OTHER_CR_LICENSE, OTHER_FL_LICENSE], false);
1799
- var _c = ((_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}, license_number = _c.license_number, license_type = _c.license_type;
1814
+ var _e = ((_b = state.data.responseData) === null || _b === void 0 ? void 0 : _b.leadData) || {}, license_number = _e.license_number, license_type = _e.license_type, entity = _e.entity;
1815
+ var unified_number = (_d = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.additional_info) === null || _d === void 0 ? void 0 : _d.unified_number;
1800
1816
  var selectedLicense = undefined;
1801
1817
  if (license_number) {
1802
1818
  var findLicense = licenseList.find(function (_a) {
@@ -1812,6 +1828,18 @@ export var connectSlice = createSlice({
1812
1828
  selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: license_number } });
1813
1829
  state.data.businessData.licenseNumber = license_number;
1814
1830
  }
1831
+ if (unified_number) {
1832
+ var findLicense = licenseList.find(function (_a) {
1833
+ var _b;
1834
+ var license = _a.license;
1835
+ return ((_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number) === unified_number;
1836
+ });
1837
+ if (findLicense)
1838
+ selectedLicense = findLicense;
1839
+ else
1840
+ selectedLicense = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: '', additional_info: { unified_number: unified_number } } });
1841
+ state.data.businessData.unifiedNumber = unified_number;
1842
+ }
1815
1843
  state.data.businessData.selectedLicense = selectedLicense;
1816
1844
  state.data.responseData = __assign(__assign({}, state.data.responseData), { licenseList: licenseList });
1817
1845
  })
@@ -1914,6 +1942,7 @@ export var connectSlice = createSlice({
1914
1942
  state.loading = false;
1915
1943
  state.error = null;
1916
1944
  state.data.individualData.mobile = action.payload.formData.mobile;
1945
+ state.data.individualData.countryCode = action.payload.formData.countryCode;
1917
1946
  state.data.responseData = __assign(__assign({}, state.data.responseData), { individualData: action.payload.leadResponse, verifyAuthMobile: action.payload.leadResponse });
1918
1947
  state.data.verifyAuthOtpData.authFor = AuthForScreen.MOBILE_OWNERSHIP;
1919
1948
  })
@@ -621,7 +621,8 @@ export var updateIndividualPersonalInfo = createAsyncThunk('individual/updateInd
621
621
  expiry: isExpiryNonEditable || !expiryDate ? undefined : new Date(expiryDate).getTime(),
622
622
  type: isIdTypeNonEditable || !identification_id_type ? undefined : identification_id_type
623
623
  }
624
- })), (!isDOBNonEditable && {
624
+ })), (!isDOBNonEditable &&
625
+ dob && {
625
626
  date_of_birth: dob
626
627
  })), (hasBirth &&
627
628
  !(isBirthCityNonEditable && isBirthCountryNonEditable) && {
@@ -911,8 +912,8 @@ var initialState = {
911
912
  gender: IndividualGender.MALE,
912
913
  nid: '',
913
914
  issuedCountry: undefined,
914
- expiryDate: '',
915
- dob: '',
915
+ expiryDate: undefined,
916
+ dob: undefined,
916
917
  placeOfBirthCountry: undefined,
917
918
  placeOfBirthCity: undefined,
918
919
  nationality: undefined
@@ -1181,6 +1182,7 @@ export var individualSlice = createSlice({
1181
1182
  state.data.individualData.isAuthorized = is_authorized;
1182
1183
  })
1183
1184
  .addCase(retrieveIndividualInfo.rejected, function (state, action) {
1185
+ state.addOrRequestDetailLoading = false;
1184
1186
  state.error = action.error.message;
1185
1187
  })
1186
1188
  .addCase(getIndividualList.pending, function (state) {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { LibConfig } from '../../@types';
3
- export interface AuthLibProps extends Pick<LibConfig, 'open' | 'mode' | 'scope' | 'merchantDomain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'appInfo' | 'businessCountryCode' | 'language' | 'onFlowCompleted' | 'onError' | 'onStepCompleted' | 'onReady' | 'onClose' | 'onStepStarted'> {
3
+ export interface AuthLibProps extends Pick<LibConfig, 'open' | 'mode' | 'scope' | 'merchantDomain' | 'publicKey' | 'redirectUrl' | 'data' | 'postURL' | 'appInfo' | 'businessCountryCode' | 'language' | 'onFlowCompleted' | 'onError' | 'onStepCompleted' | 'onReady' | 'onClose' | 'onStepStarted' | 'region'> {
4
4
  leadId?: string;
5
5
  configToken?: string;
6
6
  }
@@ -76,8 +76,8 @@ var EntityList = function (_a) {
76
76
  var selectedEntity = selectedEntityControl.field.value;
77
77
  React.useEffect(function () {
78
78
  if (entityList.length > 0) {
79
- var filteredEntityList = entityList.filter(function (entity) { return (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_id) && entity.business_id === brandInfo.business_id; });
80
- var list_1 = __spreadArray(__spreadArray([], filteredEntityList, true), [entityList[entityList.length - 1]], false) || [];
79
+ var filteredEntityList = entityList.filter(function (entity) { return (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_id) && entity.business_id === brandInfo.business_id; }) || [];
80
+ var list_1 = __spreadArray(__spreadArray([], filteredEntityList, true), [entityList[entityList.length - 1]], false);
81
81
  setList(list_1);
82
82
  if (filteredEntityList.length) {
83
83
  setValue('entityInfo', filteredEntityList[0], { shouldValidate: true });
@@ -35,7 +35,7 @@ export declare const LinkStyled: import("@emotion/styled").StyledComponent<Omit<
35
35
  variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
36
36
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof React.AnchorHTMLAttributes<HTMLAnchorElement>> & {
37
37
  ref?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject<HTMLAnchorElement> | null | undefined;
38
- }, "left" | "right" | "type" | 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" | "bottom" | "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" | "translate" | "slot" | "title" | "children" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "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" | "underline" | "variant" | "href" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "download" | "hrefLang" | "media" | "ping" | "rel" | "target" | "referrerPolicy" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
38
+ }, "left" | "right" | "type" | 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" | "bottom" | "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" | "translate" | "slot" | "title" | "children" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "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" | "underline" | "referrerPolicy" | "variant" | "href" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "download" | "hrefLang" | "media" | "ping" | "rel" | "target" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
39
39
  declare type RefundPolicyProps = {
40
40
  readOnly?: boolean;
41
41
  };
@@ -32,6 +32,7 @@ import Article from './Article';
32
32
  import EntityLicenseList from './EntityLicenseList';
33
33
  import LicenseNumber from './LicenseNumber';
34
34
  import EntityName from './EntityName';
35
+ import UnifiedNumber from './UnifiedNumber';
35
36
  var ListType;
36
37
  (function (ListType) {
37
38
  ListType["LicenseList"] = "LicenseList";
@@ -40,7 +41,7 @@ var ListType;
40
41
  var BusinessType = function (_a) {
41
42
  var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error, uploading = _b.uploading, uploadingArticle = _b.uploadingArticle;
42
43
  var settingsData = useAppSelector(settingsSelector).data;
43
- var _c = data.businessTypeData, selectedLicense = _c.selectedLicense, licenseNumber = _c.licenseNumber, entityLegalName = _c.entityLegalName, certificateId = _c.certificateId, articleId = _c.articleId, selectedEntityLicense = _c.selectedEntityLicense, responseBody = _c.responseBody, isPrevDob = _c.isPrevDob;
44
+ var _c = data.businessTypeData, selectedLicense = _c.selectedLicense, licenseNumber = _c.licenseNumber, entityLegalName = _c.entityLegalName, certificateId = _c.certificateId, articleId = _c.articleId, selectedEntityLicense = _c.selectedEntityLicense, responseBody = _c.responseBody, isPrevDob = _c.isPrevDob, unifiedNumber = _c.unifiedNumber;
44
45
  var entityLicenseList = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.entityLicenseList) || [];
45
46
  var t = useTranslation().t;
46
47
  var isAr = useLanguage().isAr;
@@ -73,6 +74,7 @@ var BusinessType = function (_a) {
73
74
  selectedLicense: selectedLicense,
74
75
  selectedEntityLicense: selectedEntityLicense,
75
76
  licenseNumber: licenseNumber,
77
+ unifiedNumber: unifiedNumber,
76
78
  entityLegalName: entityLegalName,
77
79
  certificateId: certificateId,
78
80
  articleId: articleId
@@ -89,6 +91,7 @@ var BusinessType = function (_a) {
89
91
  selectedLicense: data.selectedLicense,
90
92
  selectedEntityLicense: data.selectedEntityLicense,
91
93
  licenseNumber: data.licenseNumber,
94
+ unifiedNumber: data.unifiedNumber,
92
95
  entityLegalName: data.entityLegalName,
93
96
  certificateId: data.certificateId,
94
97
  articleId: data.articleId
@@ -98,17 +101,25 @@ var BusinessType = function (_a) {
98
101
  var onBack = function () {
99
102
  dispatch(handlePrevScreenStep(isPrevDob ? 'BUSINESS_DOB_STEP' : 'BUSINESS_IDBOD_STEP'));
100
103
  };
104
+ var showLicenseNumber = function () {
105
+ if (isKWCountry)
106
+ return !isAnyListActive && isCR;
107
+ if (isSACountry)
108
+ return !isAnyListActive && isFL;
109
+ return !isAnyListActive;
110
+ };
101
111
  var isLicenseListActive = listActive === ListType.LicenseList;
102
112
  var isEntityLicenseListActive = listActive === ListType.EntityLicenseList;
103
113
  var isAnyListActive = isLicenseListActive || isEntityLicenseListActive;
104
114
  var selected = methods.getValues('selectedLicense');
105
115
  var selectedLicenseEntity = methods.getValues('selectedEntityLicense');
106
116
  var isCR = (selected === null || selected === void 0 ? void 0 : selected.type) === Type.CR;
117
+ var isFL = (selected === null || selected === void 0 ? void 0 : selected.type) === Type.FL;
107
118
  var hasEntityList = !!(entityLicenseList === null || entityLicenseList === void 0 ? void 0 : entityLicenseList.length);
108
119
  var showLicenseList = hasEntityList ? (isSACountry || isOtherCountry) && isOtherLicense(selectedLicenseEntity) : isSACountry || isOtherCountry;
109
120
  var showEntityList = isKWCountry ? hasEntityList && !isLicenseListActive && isCR : hasEntityList && !isLicenseListActive;
110
121
  var disabled = !methods.formState.isValid || uploading || uploadingArticle;
111
122
  var disableBack = !data.otpData.isNID;
112
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(LicenseType, { show: !listActive && isKWCountry }), _jsx(EntityLicenseList, { show: showEntityList, onListOpen: function () { return handleMenuClick(ListType.EntityLicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(LicenseList, { show: showLicenseList && !isEntityLicenseListActive, onListOpen: function () { return handleMenuClick(ListType.LicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityName, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(LicenseNumber, { show: isKWCountry ? !isAnyListActive && isCR : !isAnyListActive }), _jsx(LicenseCertificate, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(Article, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(Collapse, __assign({ in: !isAnyListActive, timeout: 500 }, { children: _jsx(Button, __assign({ disableBack: disableBack, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
123
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(LicenseType, { show: !listActive && isKWCountry }), _jsx(EntityLicenseList, { show: showEntityList, onListOpen: function () { return handleMenuClick(ListType.EntityLicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(LicenseList, { show: showLicenseList && !isEntityLicenseListActive, onListOpen: function () { return handleMenuClick(ListType.LicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityName, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(LicenseNumber, { show: showLicenseNumber() }), _jsx(UnifiedNumber, { show: isSACountry && isCR && !isAnyListActive }), _jsx(LicenseCertificate, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(Article, { show: !isAnyListActive && isKWCountry && isCR }), _jsx(Collapse, __assign({ in: !isAnyListActive, timeout: 500 }, { children: _jsx(Button, __assign({ disableBack: disableBack, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
113
124
  };
114
125
  export default React.memo(BusinessType);