@tap-payments/auth-jsconnect 2.8.59-beta → 2.8.59-sandbox

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 (221) hide show
  1. package/build/@types/app.d.ts +1 -0
  2. package/build/@types/form.d.ts +1 -0
  3. package/build/@types/redux.d.ts +1 -0
  4. package/build/api/entity.d.ts +2 -2
  5. package/build/api/entity.js +12 -4
  6. package/build/api/index.d.ts +2 -2
  7. package/build/components/Tooltip/Tooltip.js +1 -1
  8. package/build/constants/api.d.ts +0 -1
  9. package/build/constants/api.js +0 -2
  10. package/build/constants/app.d.ts +0 -1
  11. package/build/constants/app.js +0 -1
  12. package/build/features/app/bank/bankStore.d.ts +13 -18
  13. package/build/features/app/bank/bankStore.js +184 -165
  14. package/build/features/app/board/boardStore.js +52 -30
  15. package/build/features/app/brand/brandStore.d.ts +16 -33
  16. package/build/features/app/brand/brandStore.js +239 -242
  17. package/build/features/app/business/businessStore.d.ts +0 -5
  18. package/build/features/app/business/businessStore.js +76 -87
  19. package/build/features/app/connectExpress/connectExpressStore.d.ts +15 -6
  20. package/build/features/app/connectExpress/connectExpressStore.js +111 -52
  21. package/build/features/app/entity/entityStore.d.ts +20 -36
  22. package/build/features/app/entity/entityStore.js +196 -246
  23. package/build/features/app/individual/individualStore.d.ts +22 -38
  24. package/build/features/app/individual/individualStore.js +263 -266
  25. package/build/features/app/password/passwordStore.d.ts +40 -23
  26. package/build/features/app/password/passwordStore.js +226 -233
  27. package/build/features/app/tax/taxStore.d.ts +13 -7
  28. package/build/features/app/tax/taxStore.js +168 -147
  29. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +13 -1
  30. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -26
  31. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +7 -1
  32. package/build/features/bank/Bank.d.ts +1 -0
  33. package/build/features/bank/Bank.js +7 -4
  34. package/build/features/bank/screens/BankDetails/BankDetails.js +18 -5
  35. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
  36. package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
  37. package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
  38. package/build/features/bank/screens/OperatorError/index.js +2 -0
  39. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  40. package/build/features/bank/screens/Verify/Verify.js +5 -5
  41. package/build/features/board/Board.js +8 -4
  42. package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
  43. package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
  44. package/build/features/board/screens/OperatorError/index.d.ts +3 -0
  45. package/build/features/board/screens/OperatorError/index.js +2 -0
  46. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -4
  47. package/build/features/brand/Brand.d.ts +1 -0
  48. package/build/features/brand/Brand.js +7 -4
  49. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +8 -35
  50. package/build/features/brand/screens/BrandActivities/BrandActivities.js +49 -12
  51. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +3 -3
  52. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +6 -3
  53. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -18
  54. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
  55. package/build/features/brand/screens/BrandActivities/TAC.d.ts +2 -7
  56. package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
  57. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  58. package/build/features/brand/screens/BrandInfo/BrandInfo.js +23 -5
  59. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +23 -7
  60. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
  61. package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
  62. package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
  63. package/build/features/brand/screens/OperatorError/index.js +2 -0
  64. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  65. package/build/features/brand/screens/Verify/Verify.js +1 -1
  66. package/build/features/business/Business.js +9 -4
  67. package/build/features/business/screens/Activities/Activities.js +12 -3
  68. package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
  69. package/build/features/business/screens/Activities/OperationStartDate.d.ts +1 -1
  70. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
  71. package/build/features/business/screens/BusinessType/BusinessType.js +10 -2
  72. package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -26
  73. package/build/features/business/screens/CivilID/CivilID.js +1 -1
  74. package/build/features/business/screens/Customers/CustomerLocations.d.ts +9 -36
  75. package/build/features/business/screens/Customers/Customers.js +12 -3
  76. package/build/features/business/screens/Customers/ExpectedSalesRange.js +6 -3
  77. package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -18
  78. package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
  79. package/build/features/business/screens/OTP/OTP.js +1 -1
  80. package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
  81. package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
  82. package/build/features/business/screens/OperatorError/index.d.ts +3 -0
  83. package/build/features/business/screens/OperatorError/index.js +2 -0
  84. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -2
  85. package/build/features/business/screens/Verify/Verify.js +13 -3
  86. package/build/features/connect/Connect.js +3 -2
  87. package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
  88. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +9 -2
  89. package/build/features/connect/screens/CivilID/CivilID.js +1 -1
  90. package/build/features/connect/screens/Individual/Email.js +3 -1
  91. package/build/features/connect/screens/Individual/Individual.js +1 -1
  92. package/build/features/connect/screens/Merchant/BrandList.js +3 -3
  93. package/build/features/connect/screens/Merchant/Merchant.js +1 -1
  94. package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
  95. package/build/features/connect/screens/Mobile/Mobile.js +11 -8
  96. package/build/features/connect/screens/NID/NID.js +1 -1
  97. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  98. package/build/features/connectExpress/ConnectExpress.js +2 -1
  99. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +5 -2
  100. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +9 -0
  101. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
  102. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +6 -1
  103. package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +3 -0
  104. package/build/features/connectExpress/screens/AuthenticationList/validation.js +10 -0
  105. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
  106. package/build/features/connectExpress/screens/CivilID/CivilID.js +1 -1
  107. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
  108. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -1
  109. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -26
  110. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +2 -7
  111. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +1 -1
  112. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -1
  113. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
  114. package/build/features/connectExpress/screens/Mobile/Mobile.js +9 -2
  115. package/build/features/connectExpress/screens/NID/NID.js +1 -1
  116. package/build/features/connectExpress/screens/NID/TAC.d.ts +2 -7
  117. package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
  118. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
  119. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
  120. package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
  121. package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
  122. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
  123. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
  124. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
  125. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
  126. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  127. package/build/features/entity/Entity.d.ts +1 -0
  128. package/build/features/entity/Entity.js +7 -4
  129. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +2 -2
  130. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
  131. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
  132. package/build/features/entity/screens/EntityCapital/EntityCapital.js +34 -10
  133. package/build/features/entity/screens/EntityName/EntityName.js +32 -15
  134. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -35
  135. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +1 -1
  136. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +1 -1
  137. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
  138. package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
  139. package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
  140. package/build/features/entity/screens/OperatorError/index.js +2 -0
  141. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  142. package/build/features/entity/screens/Verify/Verify.js +1 -1
  143. package/build/features/featuresScreens.js +67 -7
  144. package/build/features/individual/Individual.d.ts +1 -0
  145. package/build/features/individual/Individual.js +7 -4
  146. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
  147. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +54 -14
  148. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +14 -0
  149. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
  150. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
  151. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -26
  152. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
  153. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +4 -1
  154. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +3 -2
  155. package/build/features/individual/screens/IndividualList/Email.js +3 -2
  156. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
  157. package/build/features/individual/screens/IndividualList/IndividualList.js +18 -5
  158. package/build/features/individual/screens/IndividualList/UserList.js +13 -9
  159. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +4 -2
  160. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -26
  161. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
  162. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +76 -20
  163. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
  164. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
  165. package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
  166. package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
  167. package/build/features/individual/screens/OperatorError/index.js +2 -0
  168. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  169. package/build/features/individual/screens/Verify/Verify.js +1 -1
  170. package/build/features/password/Password.d.ts +1 -0
  171. package/build/features/password/Password.js +75 -28
  172. package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -4
  173. package/build/features/password/screens/OTP/OTP.js +1 -1
  174. package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
  175. package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
  176. package/build/features/password/screens/OperatorError/index.d.ts +3 -0
  177. package/build/features/password/screens/OperatorError/index.js +2 -0
  178. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  179. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  180. package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
  181. package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
  182. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  183. package/build/features/password/screens/Verify/Verify.js +5 -5
  184. package/build/features/shared/Address/CountryList.d.ts +7 -23
  185. package/build/features/shared/Address/InputSelect.d.ts +7 -23
  186. package/build/features/shared/Button/FlowsButtons.js +13 -3
  187. package/build/features/shared/Containers/FeatureContainer.d.ts +1 -0
  188. package/build/features/shared/Containers/FeatureContainer.js +3 -3
  189. package/build/features/shared/Input/Input.d.ts +2 -2
  190. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +5 -1
  191. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +2 -2
  192. package/build/features/shared/UploadFile/FileUpload.d.ts +2 -7
  193. package/build/features/shared/UploadFile/UploadFile.d.ts +2 -7
  194. package/build/features/shared/UploadFile/UploadWrapper.d.ts +2 -7
  195. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +2 -7
  196. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +2 -7
  197. package/build/features/signIn/SignIn.js +12 -3
  198. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
  199. package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
  200. package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
  201. package/build/features/signIn/screens/OperatorError/index.js +2 -0
  202. package/build/features/tax/Tax.d.ts +1 -0
  203. package/build/features/tax/Tax.js +7 -4
  204. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
  205. package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
  206. package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
  207. package/build/features/tax/screens/OperatorError/index.js +2 -0
  208. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +1 -1
  209. package/build/features/tax/screens/TaxDetails/TaxDetails.js +7 -2
  210. package/build/features/tax/screens/Verify/Verify.js +5 -5
  211. package/build/hooks/index.d.ts +1 -0
  212. package/build/hooks/index.js +1 -0
  213. package/build/hooks/useFormDirtyCheck.d.ts +10 -0
  214. package/build/hooks/useFormDirtyCheck.js +66 -0
  215. package/build/hooks/useVerifyToken.d.ts +5 -2
  216. package/build/hooks/useVerifyToken.js +10 -5
  217. package/build/utils/common.js +3 -3
  218. package/build/utils/locale.js +2 -1
  219. package/build/utils/string.d.ts +5 -2
  220. package/build/utils/string.js +34 -5
  221. package/package.json +2 -2
@@ -14,8 +14,9 @@ import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import Collapse from '@mui/material/Collapse';
17
- import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
17
+ import { formatNumberAsCurrency, getCurrencyByCountryIso2, removeAllCharsFromNumber } from '../../../../utils';
18
18
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
19
+ import { settingsSelector } from '../../../../app/settings';
19
20
  import { ScreenContainer } from '../../../shared/Containers';
20
21
  import Input from '../../../shared/Input';
21
22
  import { individualSelector, clearError } from '../../../app/individual/individualStore';
@@ -24,10 +25,11 @@ var ShareValue = function (_a) {
24
25
  var _b;
25
26
  var show = _a.show, readOnly = _a.readOnly;
26
27
  var t = useTranslation().t;
27
- var data = useAppSelector(individualSelector).data;
28
+ var settingsData = useAppSelector(settingsSelector).data;
28
29
  var control = useFormContext().control;
29
30
  var bckError = useAppSelector(individualSelector).error;
30
31
  var dispatch = useAppDispatch();
32
+ var countryCode = settingsData.businessCountry;
31
33
  var handleChange = function (_a) {
32
34
  var target = _a.target;
33
35
  if (bckError)
@@ -35,11 +37,14 @@ var ShareValue = function (_a) {
35
37
  var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
36
38
  shareValueControl.field.onChange(value);
37
39
  };
40
+ var getCurrency = React.useMemo(function () {
41
+ return t(getCurrencyByCountryIso2(countryCode.iso2));
42
+ }, [countryCode.iso2]);
38
43
  var shareValueControl = useController({ control: control, name: 'shareValue' });
39
44
  var shareValue = shareValueControl.field.value;
40
45
  var error = (_b = shareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
41
46
  return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('share_value_label', {
42
- currency: t(data.currency)
47
+ currency: getCurrency
43
48
  }), onChange: handleChange, value: shareValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: shareValue, error: error }) }) })) })));
44
49
  };
45
50
  export default React.memo(ShareValue);
@@ -1,6 +1,6 @@
1
1
  import * as yup from 'yup';
2
2
  import { IndividualType } from '../../../../@types';
3
- export declare const IndividualInfoValidationSchema: (objects: Array<IndividualType>, isKWCountry: boolean) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ export declare const IndividualInfoValidationSchema: (objects: Array<IndividualType>, isKWCountry: boolean, hasAuthorizedField: boolean) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
4
4
  occupation: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
5
5
  sourceIncome: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
6
6
  monthlyIncome: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
@@ -10,6 +10,7 @@ export declare const IndividualInfoValidationSchema: (objects: Array<IndividualT
10
10
  isInfluencer: yup.BooleanSchema<boolean | null | undefined, import("yup/lib/types").AnyObject, boolean | null | undefined>;
11
11
  shareCount: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
12
12
  shareValue: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
13
+ isAuthorized: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
13
14
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
14
15
  occupation: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
15
16
  sourceIncome: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
@@ -20,6 +21,7 @@ export declare const IndividualInfoValidationSchema: (objects: Array<IndividualT
20
21
  isInfluencer: yup.BooleanSchema<boolean | null | undefined, import("yup/lib/types").AnyObject, boolean | null | undefined>;
21
22
  shareCount: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
22
23
  shareValue: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
24
+ isAuthorized: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
23
25
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
24
26
  occupation: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
25
27
  sourceIncome: import("yup/lib/object").OptionalObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
@@ -30,4 +32,5 @@ export declare const IndividualInfoValidationSchema: (objects: Array<IndividualT
30
32
  isInfluencer: yup.BooleanSchema<boolean | null | undefined, import("yup/lib/types").AnyObject, boolean | null | undefined>;
31
33
  shareCount: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
32
34
  shareValue: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
35
+ isAuthorized: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
33
36
  }>>>;
@@ -1,6 +1,6 @@
1
1
  import * as yup from 'yup';
2
2
  import { getIndividualType } from '../../../../utils';
3
- export var IndividualInfoValidationSchema = function (objects, isKWCountry) {
3
+ export var IndividualInfoValidationSchema = function (objects, isKWCountry, hasAuthorizedField) {
4
4
  var isUserType = getIndividualType(objects).isUser;
5
5
  return yup.object().shape({
6
6
  occupation: isUserType ? yup.object().required('alert_choose_occupation') : yup.object().optional(),
@@ -11,6 +11,7 @@ export var IndividualInfoValidationSchema = function (objects, isKWCountry) {
11
11
  isPEP: isUserType ? yup.boolean().required('please_choose_relative_pep') : yup.boolean().optional().nullable(),
12
12
  isInfluencer: isUserType && isKWCountry ? yup.boolean().required('please_choose_are_you_influncer') : yup.boolean().optional().nullable(),
13
13
  shareCount: yup.string().optional(),
14
- shareValue: yup.string().optional()
14
+ shareValue: yup.string().optional(),
15
+ isAuthorized: hasAuthorizedField ? yup.boolean().required('please_choose_is_authorized') : yup.boolean().optional()
15
16
  });
16
17
  };
@@ -54,7 +54,7 @@ import { useController, useFormContext } from 'react-hook-form';
54
54
  import { styled } from '@mui/material/styles';
55
55
  import CircularProgress from '@mui/material/CircularProgress';
56
56
  import { useAppDispatch } from '../../../../hooks';
57
- import { isValidEmail } from '../../../../utils';
57
+ import { isValidEmail, removeAllOtherThanCharsNumbersAtAndDot } from '../../../../utils';
58
58
  import Collapse from '../../../../components/Collapse';
59
59
  import { ScreenContainer } from '../../../shared/Containers';
60
60
  import Input from '../../../shared/Input';
@@ -103,7 +103,8 @@ var Email = function (_a) {
103
103
  }
104
104
  }, [emailValue, error]);
105
105
  var handleEmailChange = function (event) {
106
- emailControl.field.onChange(event.target.value);
106
+ var value = removeAllOtherThanCharsNumbersAtAndDot(event.target.value);
107
+ emailControl.field.onChange(value);
107
108
  };
108
109
  var clearEmail = function () {
109
110
  emailControl.field.onChange('');
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  export declare const TitleStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
4
+ }, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
5
5
  component?: React.ElementType<any> | undefined;
6
6
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
7
7
  export declare const SubTitleStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
8
8
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
9
- }, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
9
+ }, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
10
10
  component?: React.ElementType<any> | undefined;
11
11
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
12
12
  export interface IndividualListProps {
@@ -16,11 +16,13 @@ import Box from '@mui/material/Box';
16
16
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
17
17
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
18
  import Text from '../../../../components/Text';
19
- import Button from '../../../../components/Button';
20
19
  import Collapse from '../../../../components/Collapse';
21
20
  import Warning from '../../../../components/Warning';
21
+ import Button from '../../../../components/Button';
22
+ import Loader from '../../../../components/Loader';
23
+ import { sendCustomEventToGTM } from '../../../../utils';
22
24
  import { ScreenContainer } from '../../../shared/Containers';
23
- import { individualSelector } from '../../../app/individual/individualStore';
25
+ import { individualSelector, retrieveBoardStatus } from '../../../app/individual/individualStore';
24
26
  import UserList from './UserList';
25
27
  var BoxStyled = styled(Box)(function (_a) {
26
28
  var theme = _a.theme;
@@ -49,12 +51,23 @@ export var SubTitleStyled = styled(Text)(function (_a) {
49
51
  var IndividualList = function () {
50
52
  var dispatch = useAppDispatch();
51
53
  var t = useTranslation().t;
52
- var error = useAppSelector(individualSelector).error;
54
+ var _a = useAppSelector(individualSelector), error = _a.error, data = _a.data, loading = _a.loading;
53
55
  var settingsData = useAppSelector(settingsSelector).data;
56
+ var flows = (data.verify.responseBody || {}).flows;
54
57
  var onBack = function () {
55
- dispatch(handlePrevScreenStep());
58
+ sendCustomEventToGTM({
59
+ event: 'Send Event',
60
+ event_category: 'Board Flows - Individual',
61
+ event_action: 'Individual Details Back Button',
62
+ event_label: settingsData.businessCountry.iso2
63
+ });
64
+ if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
65
+ dispatch(handlePrevScreenStep());
66
+ return;
67
+ }
68
+ dispatch(retrieveBoardStatus());
56
69
  };
57
70
  var hideBack = settingsData.appConfig.mode === 'content';
58
- return (_jsxs(ScreenContainer, { children: [_jsxs(BoxStyled, { children: [_jsxs(ContentStyled, { children: [_jsx(TitleStyled, { children: t('company_individuals') }), _jsx(SubTitleStyled, { children: t('company_individuals_add_or_request_details') })] }), _jsx(UserList, {})] }), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'error' }, { children: t(error || '') })) })), !hideBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: function () { return onBack(); }, variant: 'text' }, { children: t('back') })))] }));
71
+ return (_jsxs(ScreenContainer, { children: [_jsxs(BoxStyled, { children: [_jsxs(ContentStyled, { children: [_jsx(TitleStyled, { children: t('company_individuals') }), _jsx(SubTitleStyled, { children: t('company_individuals_add_or_request_details') })] }), _jsx(UserList, {})] }), _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'error' }, { children: t(error || '') })) })), !hideBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: function () { return onBack(); }, variant: 'text' }, { children: loading ? _jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 15, toggleAnimation: !!loading }) : t('back') })))] }));
59
72
  };
60
73
  export default IndividualList;
@@ -25,7 +25,7 @@ import { useTranslation } from 'react-i18next';
25
25
  import { yupResolver } from '@hookform/resolvers/yup';
26
26
  import { alpha, styled, useTheme } from '@mui/material/styles';
27
27
  import Box from '@mui/material/Box';
28
- import { getUserName, isValidEmail } from '../../../../utils';
28
+ import { getUserName, isKWOrSA, isValidEmail } from '../../../../utils';
29
29
  import { useLanguage, useAppSelector, useAppDispatch, useSetFromDefaultValues } from '../../../../hooks';
30
30
  import { IndividualType } from '../../../../@types';
31
31
  import Collapse from '../../../../components/Collapse';
@@ -35,9 +35,10 @@ import Text from '../../../../components/Text';
35
35
  import CheckIcon from '../../../shared/CheckIcon';
36
36
  import { ScreenContainer } from '../../../shared/Containers';
37
37
  import { addDetailsAsync, individualSelector, requestDetailsByEmail, resetIndividualData } from '../../../app/individual/individualStore';
38
- import IndividualActionButtons from '../../../../features/shared/Button/IndividualActionButtons';
38
+ import IndividualActionButtons from '../../../shared/Button/IndividualActionButtons';
39
39
  import { IndividualCollectInfoValidationSchema } from './validation';
40
40
  import CollectPhoneEmail from './CollectPhoneEmail';
41
+ import { settingsSelector } from '../../../../app/settings';
41
42
  var ScreenContainerStyled = styled(ScreenContainer)(function (_a) {
42
43
  var theme = _a.theme;
43
44
  return ({
@@ -84,11 +85,12 @@ var UserList = function (_a) {
84
85
  var dispatch = useAppDispatch();
85
86
  var _j = React.useState(false), emailChecking = _j[0], setEmailChecking = _j[1];
86
87
  var theme = useTheme();
87
- var _k = useAppSelector(individualSelector), data = _k.data, loading = _k.loading, error = _k.error;
88
+ var _k = useAppSelector(individualSelector), data = _k.data, addOrRequestDetailLoading = _k.addOrRequestDetailLoading, error = _k.error;
89
+ var settingsData = useAppSelector(settingsSelector).data;
88
90
  var _l = data.individualCollectData, email = _l.email, mobile = _l.mobile, responseBody = _l.responseBody;
89
91
  var is_available = (responseBody || {}).is_available;
90
92
  var verify = data.verify;
91
- var _m = verify.responseBody || {}, userList = _m.userList, notification = _m.notification;
93
+ var _m = verify.responseBody || {}, userList = _m.userList, recipient = _m.recipient, userRes = _m.user;
92
94
  var methods = useForm({
93
95
  resolver: yupResolver(IndividualCollectInfoValidationSchema(activeUser)),
94
96
  defaultValues: {
@@ -157,8 +159,10 @@ var UserList = function (_a) {
157
159
  return (activeUser === null || activeUser === void 0 ? void 0 : activeUser.id) === user.id;
158
160
  };
159
161
  var isSameUserRequestedBefore = function (user) {
160
- var _a, _b;
161
- return (_a = user === null || user === void 0 ? void 0 : user.ids) === null || _a === void 0 ? void 0 : _a.includes((_b = notification === null || notification === void 0 ? void 0 : notification.recipient) === null || _b === void 0 ? void 0 : _b.id);
162
+ var _a;
163
+ if (!(userRes === null || userRes === void 0 ? void 0 : userRes.is_authorized) && !isKWOrSA(settingsData.businessCountry.iso2))
164
+ return false;
165
+ return (_a = user === null || user === void 0 ? void 0 : user.ids) === null || _a === void 0 ? void 0 : _a.includes(recipient === null || recipient === void 0 ? void 0 : recipient.id);
162
166
  };
163
167
  var getUserStatus = function (user) {
164
168
  return user === null || user === void 0 ? void 0 : user.individual_data_state;
@@ -188,11 +192,11 @@ var UserList = function (_a) {
188
192
  return (_jsx(ScreenContainerStyled, { children: usersMenuList.map(function (user, index) {
189
193
  return (_jsxs(Box, __assign({ sx: index !== usersMenuList.length - 1 ? { borderBottom: "1px solid ".concat(alpha(theme.palette.divider, 0.8)) } : {} }, { children: [_jsxs(TextBoxStyled, __assign({ sx: {
190
194
  cursor: emailChecking ? 'default' : 'pointer'
191
- }, onClick: !!anchorEl && isActiveUser(user) ? function () { return onCloseUserAction(); } : function (e) { return onClickUser(user, e); } }, { children: [_jsx(TextStyled, { children: _jsx("span", { children: getName(user) || '' }) }), (user === null || user === void 0 ? void 0 : user.isRequestedEmail) ? _jsx(CheckIcon, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl && isActiveUser(user) })] })), _jsx(Collapse, __assign({ in: !!anchorEl && isActiveUser(user), timeout: 300 }, { children: _jsx(IndividualActionButtons, { isAr: isAr, addDetails: {
195
+ }, onClick: !!anchorEl && isActiveUser(user) ? function () { return onCloseUserAction(); } : function (e) { return onClickUser(user, e); } }, { children: [_jsxs(TextStyled, { children: [_jsx("span", { children: getName(user) || '' }), _jsx(RoleTextStyled, { children: getUserRole(user) || '' })] }), (user === null || user === void 0 ? void 0 : user.isRequestedEmail) ? _jsx(CheckIcon, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl && isActiveUser(user) })] })), _jsx(Collapse, __assign({ in: !!anchorEl && isActiveUser(user), timeout: 300 }, { children: _jsx(IndividualActionButtons, { isAr: isAr, addDetails: {
192
196
  status: getUserStatus(user),
193
197
  title: t('add_details'),
194
198
  onClick: onAddDetails,
195
- loading: isActiveUser(user) && loading && type === IndividualRequestType.ADD
199
+ loading: isActiveUser(user) && !!addOrRequestDetailLoading && type === IndividualRequestType.ADD
196
200
  }, requestEmail: {
197
201
  children: getCollectForm(user),
198
202
  title: t('request_details_by_email'),
@@ -200,7 +204,7 @@ var UserList = function (_a) {
200
204
  disabled: showCollectForm ? disabled : false,
201
205
  onClick: onRequestEmail,
202
206
  show: !isSameUserRequestedBefore(user),
203
- loading: isActiveUser(user) && loading && type === IndividualRequestType.REQUEST_EMAIL
207
+ loading: isActiveUser(user) && !!addOrRequestDetailLoading && type === IndividualRequestType.REQUEST_EMAIL
204
208
  } }) }))] }), index));
205
209
  }) }));
206
210
  };
@@ -15,9 +15,10 @@ import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import { styled } from '@mui/material/styles';
17
17
  import Collapse from '../../../../components/Collapse';
18
+ import { removeAllOtherThanCharsNumbersAtAndDot } from '../../../../utils';
18
19
  import { ScreenContainer } from '../../../shared/Containers';
19
20
  import Input from '../../../shared/Input';
20
- import { EndAdornment } from '../../../../features/shared/EndAdornment';
21
+ import { EndAdornment } from '../../../shared/EndAdornment';
21
22
  var InputStyled = styled(Input)(function () { return ({
22
23
  input: {
23
24
  textTransform: 'lowercase'
@@ -32,7 +33,8 @@ var Email = function (_a) {
32
33
  var emailValue = emailControl.field.value;
33
34
  var error = (_b = emailControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
34
35
  var handleEmailChange = function (event) {
35
- emailControl.field.onChange(event.target.value);
36
+ var value = removeAllOtherThanCharsNumbersAtAndDot(event.target.value);
37
+ emailControl.field.onChange(value);
36
38
  };
37
39
  var clearNumber = function () {
38
40
  emailControl.field.onChange('');
@@ -1,32 +1,10 @@
1
1
  import * as React from 'react';
2
- export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
3
- children?: React.ReactNode;
4
- classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
5
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
6
- fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
7
- htmlColor?: string | undefined;
8
- inheritViewBox?: boolean | undefined;
9
- shapeRendering?: string | undefined;
10
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
11
- titleAccess?: string | undefined;
12
- viewBox?: string | undefined;
13
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
2
+ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<import("@mui/material").SvgIconOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
14
3
  ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
15
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
- export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
17
- children?: React.ReactNode;
18
- classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
19
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
20
- fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
21
- htmlColor?: string | undefined;
22
- inheritViewBox?: boolean | undefined;
23
- shapeRendering?: string | undefined;
24
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
25
- titleAccess?: string | undefined;
26
- viewBox?: string | undefined;
27
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
4
+ }, "className" | "style" | "classes" | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
+ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<import("@mui/material").SvgIconOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
28
6
  ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
29
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
7
+ }, "className" | "style" | "classes" | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
30
8
  type GenderProps = {
31
9
  show: boolean;
32
10
  readOnly?: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export declare const RoleTextStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
4
+ }, "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
5
5
  component?: React.ElementType<any> | undefined;
6
6
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
7
7
  export interface IndividualPersonalInfoProps {
@@ -17,8 +17,8 @@ import { useTranslation } from 'react-i18next';
17
17
  import { handleCurrentActiveScreen, handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
18
18
  import Box from '@mui/material/Box';
19
19
  import { alpha, styled } from '@mui/material/styles';
20
- import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
21
- import { convertToEnglishDateFormat, deepCopy, getUserName, isOtherThanKWOrSA } from '../../../../utils';
20
+ import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
21
+ import { convertToEnglishDateFormat, deepCopy, findCountryByIddPrefix, findCountryByIso2, getUserName, isKWOrSA, isOtherThanKWOrSA, sendCustomEventToGTM } from '../../../../utils';
22
22
  import Form from '../../../../components/Form';
23
23
  import Collapse from '../../../../components/Collapse';
24
24
  import Text from '../../../../components/Text';
@@ -50,17 +50,17 @@ var ListType;
50
50
  ListType["NationalityList"] = "NationalityList";
51
51
  })(ListType || (ListType = {}));
52
52
  var IndividualPersonalInfo = function (_a) {
53
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
53
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
54
54
  var t = useTranslation().t;
55
55
  var isAr = useLanguage().isAr;
56
56
  var dispatch = useAppDispatch();
57
- var _l = useAppSelector(individualSelector), data = _l.data, loading = _l.loading, error = _l.error, cityLoading = _l.cityLoading;
57
+ var _p = useAppSelector(individualSelector), data = _p.data, loading = _p.loading, error = _p.error, cityLoading = _p.cityLoading;
58
58
  var settingsData = useAppSelector(settingsSelector).data;
59
59
  var countries = settingsData.countries;
60
60
  var verify = data.verify, individualPersonalData = data.individualPersonalData;
61
- var _m = verify.responseBody || {}, user = _m.user, flows = _m.flows;
61
+ var _q = verify.responseBody || {}, user = _q.user, flows = _q.flows;
62
62
  var name = individualPersonalData.name, email = individualPersonalData.email, mobile = individualPersonalData.mobile, countryCode = individualPersonalData.countryCode, gender = individualPersonalData.gender, nid = individualPersonalData.nid, issuedCountry = individualPersonalData.issuedCountry, expiryDate = individualPersonalData.expiryDate, dob = individualPersonalData.dob, placeOfBirthCountry = individualPersonalData.placeOfBirthCountry, placeOfBirthCity = individualPersonalData.placeOfBirthCity, nationality = individualPersonalData.nationality;
63
- var _o = user || {}, data_status = _o.data_status, is_authorized = _o.is_authorized, data_verification = _o.data_verification, contact = _o.contact, genderRes = _o.gender, identification = _o.identification, birth = _o.birth, nationalityRes = _o.nationality;
63
+ var _r = user || {}, data_status = _r.data_status, is_authorized = _r.is_authorized, data_verification = _r.data_verification, contact = _r.contact, genderRes = _r.gender, identification = _r.identification, birth = _r.birth, nationalityRes = _r.nationality;
64
64
  var isOtherCountry = React.useMemo(function () { return isOtherThanKWOrSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
65
65
  var methods = useForm({
66
66
  resolver: yupResolver(IndividualInfoValidationSchema(isOtherCountry)),
@@ -82,9 +82,51 @@ var IndividualPersonalInfo = function (_a) {
82
82
  });
83
83
  var watch = methods.watch;
84
84
  useSetFromDefaultValues(methods, data.individualPersonalData);
85
- var _p = React.useState(), listActive = _p[0], setListActive = _p[1];
86
- var _q = React.useState(false), dobActive = _q[0], setDobActive = _q[1];
87
- var _r = React.useState(false), expiryDateActive = _r[0], setExpiryDateActive = _r[1];
85
+ var _s = React.useState(), listActive = _s[0], setListActive = _s[1];
86
+ var _t = React.useState(false), dobActive = _t[0], setDobActive = _t[1];
87
+ var _u = React.useState(false), expiryDateActive = _u[0], setExpiryDateActive = _u[1];
88
+ var expDateRes = (identification === null || identification === void 0 ? void 0 : identification.expiry) && convertToEnglishDateFormat(new Date(identification === null || identification === void 0 ? void 0 : identification.expiry));
89
+ var dobDateRes = (birth === null || birth === void 0 ? void 0 : birth.date) && convertToEnglishDateFormat(new Date(birth === null || birth === void 0 ? void 0 : birth.date));
90
+ var resCountryCode = React.useMemo(function () {
91
+ var _a;
92
+ if (!((_a = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _a === void 0 ? void 0 : _a.country_code))
93
+ return {};
94
+ return findCountryByIddPrefix(countries, contact.phone.country_code) || {};
95
+ }, [(_b = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _b === void 0 ? void 0 : _b.country_code]);
96
+ var resIssuedCountry = React.useMemo(function () {
97
+ if (!(identification === null || identification === void 0 ? void 0 : identification.issued_country_code))
98
+ return;
99
+ return findCountryByIso2(countries, identification.issued_country_code);
100
+ }, [identification === null || identification === void 0 ? void 0 : identification.issued_country_code]);
101
+ var resPlaceOfBirthCountry = React.useMemo(function () {
102
+ if (!(birth === null || birth === void 0 ? void 0 : birth.country))
103
+ return;
104
+ return findCountryByIso2(countries, birth.country);
105
+ }, [birth === null || birth === void 0 ? void 0 : birth.country]);
106
+ var resNationality = React.useMemo(function () {
107
+ if (!nationalityRes)
108
+ return;
109
+ return findCountryByIso2(countries, nationalityRes);
110
+ }, [nationalityRes]);
111
+ var isDirty = useFormDirtyCheck(methods, {
112
+ name: getUserName(user, false),
113
+ email: contact === null || contact === void 0 ? void 0 : contact.email,
114
+ mobile: (_c = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _c === void 0 ? void 0 : _c.number,
115
+ countryCode: resCountryCode,
116
+ gender: genderRes === null || genderRes === void 0 ? void 0 : genderRes.toLowerCase(),
117
+ nid: identification === null || identification === void 0 ? void 0 : identification.id,
118
+ issuedCountry: resIssuedCountry,
119
+ expiryDate: expDateRes,
120
+ dob: dobDateRes,
121
+ placeOfBirthCountry: resPlaceOfBirthCountry,
122
+ placeOfBirthCity: ((_d = birth === null || birth === void 0 ? void 0 : birth.city) === null || _d === void 0 ? void 0 : _d.cityId) && { id: birth.city.cityId },
123
+ nationality: resNationality
124
+ }, [
125
+ {
126
+ name: 'placeOfBirthCity',
127
+ keys: ['id']
128
+ }
129
+ ]).isDirty;
88
130
  var originalReadOnly = useFormReadOnly(methods);
89
131
  var noneEditable = useDataNoneEditable(data_status, [
90
132
  'name.en',
@@ -120,36 +162,50 @@ var IndividualPersonalInfo = function (_a) {
120
162
  'nationality',
121
163
  'gender'
122
164
  ]);
123
- var expDateRes = (identification === null || identification === void 0 ? void 0 : identification.expiry) && convertToEnglishDateFormat(new Date(identification === null || identification === void 0 ? void 0 : identification.expiry));
124
- var dobDateRes = (birth === null || birth === void 0 ? void 0 : birth.date) && convertToEnglishDateFormat(new Date(birth === null || birth === void 0 ? void 0 : birth.date));
125
165
  var isNameVerified = dataVerified['name.en'] && dataVerified['name.ar'] && getUserName(user, isAr) === watch('name');
126
166
  var isPhoneNumberVerified = dataVerified['contact.phone.number'] &&
127
167
  dataVerified['contact.phone.country_code'] &&
128
- ((_b = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _b === void 0 ? void 0 : _b.number) === watch('mobile') &&
129
- ((_c = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _c === void 0 ? void 0 : _c.country_code) === ((_e = (_d = watch('countryCode')) === null || _d === void 0 ? void 0 : _d.idd_prefix) === null || _e === void 0 ? void 0 : _e.toString());
168
+ ((_e = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _e === void 0 ? void 0 : _e.number) === watch('mobile') &&
169
+ ((_f = contact === null || contact === void 0 ? void 0 : contact.phone) === null || _f === void 0 ? void 0 : _f.country_code) === ((_h = (_g = watch('countryCode')) === null || _g === void 0 ? void 0 : _g.idd_prefix) === null || _h === void 0 ? void 0 : _h.toString());
130
170
  var isEmailVerified = dataVerified['contact.email'] && (contact === null || contact === void 0 ? void 0 : contact.email) === watch('email');
131
171
  var isGenderVerified = dataVerified['gender'] && genderRes === watch('gender');
132
172
  var isIDVerified = dataVerified['identification.id'] && (identification === null || identification === void 0 ? void 0 : identification.id) === watch('nid');
133
- var isIssuedCountryVerified = dataVerified['identification.issuer_country'] && (identification === null || identification === void 0 ? void 0 : identification.issued_country_code) === ((_f = watch('issuedCountry')) === null || _f === void 0 ? void 0 : _f.iso2);
173
+ var isIssuedCountryVerified = dataVerified['identification.issuer_country'] && (identification === null || identification === void 0 ? void 0 : identification.issued_country_code) === ((_j = watch('issuedCountry')) === null || _j === void 0 ? void 0 : _j.iso2);
134
174
  var isExpiryDateVerified = dataVerified['identification.expiry'] && expDateRes === watch('expiryDate');
135
175
  var isDOBVerified = dataVerified['birth.date'] && dobDateRes === watch('dob');
136
- var isBirthCountryVerified = dataVerified['birth.country'] && (birth === null || birth === void 0 ? void 0 : birth.country) === ((_g = watch('placeOfBirthCountry')) === null || _g === void 0 ? void 0 : _g.iso2);
137
- var isBirthCityVerified = dataVerified['birth.city'] && ((_h = birth === null || birth === void 0 ? void 0 : birth.city) === null || _h === void 0 ? void 0 : _h.cityId) === ((_j = watch('placeOfBirthCity')) === null || _j === void 0 ? void 0 : _j.id);
138
- var isNationalityVerified = dataVerified['nationality'] && nationalityRes === ((_k = watch('nationality')) === null || _k === void 0 ? void 0 : _k.iso2);
176
+ var isBirthCountryVerified = dataVerified['birth.country'] && (birth === null || birth === void 0 ? void 0 : birth.country) === ((_k = watch('placeOfBirthCountry')) === null || _k === void 0 ? void 0 : _k.iso2);
177
+ var isBirthCityVerified = dataVerified['birth.city'] && ((_l = birth === null || birth === void 0 ? void 0 : birth.city) === null || _l === void 0 ? void 0 : _l.cityId) === ((_m = watch('placeOfBirthCity')) === null || _m === void 0 ? void 0 : _m.id);
178
+ var isNationalityVerified = dataVerified['nationality'] && nationalityRes === ((_o = watch('nationality')) === null || _o === void 0 ? void 0 : _o.iso2);
179
+ var isKWOrSaCountry = React.useMemo(function () { return isKWOrSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
139
180
  var onSubmit = function (data) {
140
- dispatch(updateIndividualPersonalInfo(deepCopy(getFelids(data))));
181
+ var formData = __assign(__assign({}, deepCopy(getFelids(data))), { isDirty: isDirty });
182
+ dispatch(updateIndividualPersonalInfo(formData));
141
183
  };
142
184
  React.useEffect(function () {
143
185
  if (error)
144
186
  dispatch(clearError());
145
187
  }, [methods.formState.isValid]);
188
+ React.useEffect(function () {
189
+ sendCustomEventToGTM({
190
+ event: 'Send Event',
191
+ event_category: 'Board Flows - Individual',
192
+ event_action: 'Update Personal Data Page',
193
+ event_label: settingsData.businessCountry.iso2
194
+ });
195
+ }, []);
146
196
  var onBack = function () {
147
197
  if (error)
148
198
  dispatch(clearError());
149
- if (is_authorized) {
199
+ if (is_authorized || !isKWOrSaCountry) {
150
200
  dispatch(handleCurrentActiveScreen('INDIVIDUAL_LIST_STEP'));
151
201
  return;
152
202
  }
203
+ sendCustomEventToGTM({
204
+ event: 'Send Event',
205
+ event_category: 'Board Flows - Individual',
206
+ event_action: 'Individual Details Back Button',
207
+ event_label: settingsData.businessCountry.iso2
208
+ });
153
209
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
154
210
  dispatch(handlePrevScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
155
211
  return;
@@ -173,7 +229,7 @@ var IndividualPersonalInfo = function (_a) {
173
229
  var isBirthCountryListActive = listActive === ListType.BirthCountryList;
174
230
  var isBirthCityListActive = listActive === ListType.BirthCityList;
175
231
  var isNationalityListActive = listActive === ListType.NationalityList;
176
- var disableBack = settingsData.appConfig.mode === 'content' && !is_authorized;
232
+ var disableBack = settingsData.appConfig.mode === 'content' && !(is_authorized || !isKWOrSaCountry);
177
233
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Name, { show: showField, readOnly: readOnly['name'] || (noneEditable['name.en'] && noneEditable['name.ar']), isVerified: isNameVerified }), _jsx(MobileNumber, { readOnly: readOnly['mobile'] || noneEditable['contact.phone.number'] || noneEditable['contact.phone.country_code'], show: !isDateFieldActive && !isBirthCountryListActive && !isBirthCityListActive && !isNationalityListActive && !isIssuedCountryListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.MobileCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isPhoneNumberVerified }), _jsx(Email, { show: showField, readOnly: readOnly['email'] || noneEditable['contact.email'], isVerified: isEmailVerified }), _jsx(Gender, { show: showField, readOnly: readOnly['gender'] || noneEditable['gender'], isVerified: isGenderVerified }), _jsx(ID, { show: showField, readOnly: readOnly['nid'] || noneEditable['identification.id'], isVerified: isIDVerified }), _jsx(IssuedCountry, { readOnly: readOnly['issuedCountry'] || noneEditable['identification.issuer_country'], show: !isMobileCountryListActive && !isDateFieldActive && !isBirthCountryListActive && !isBirthCityListActive && !isNationalityListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.IssuedCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isIssuedCountryVerified }), _jsx(ExpiryDate, { show: !listActive && !dobActive, onDateClicked: handleExpiryDateActive, readOnly: readOnly['expiryDate'] || noneEditable['identification.expiry'], isVerified: isExpiryDateVerified }), _jsx(DOB, { show: !listActive && !expiryDateActive, onDateClicked: handleDobActive, readOnly: readOnly['dob'] || noneEditable['birth.date'], isVerified: isDOBVerified }), _jsx(BirthCountry, { readOnly: readOnly['placeOfBirthCountry'] || noneEditable['birth.country'], show: !isMobileCountryListActive && !isDateFieldActive && !isIssuedCountryListActive && !isBirthCityListActive && !isNationalityListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.BirthCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isBirthCountryVerified }), _jsx(BirthCity, { readOnly: readOnly['placeOfBirthCity'] || noneEditable['birth.city'], show: !isMobileCountryListActive &&
178
234
  !isDateFieldActive &&
179
235
  !isIssuedCountryListActive &&
@@ -58,7 +58,7 @@ var PhoneInfo = function (_a) {
58
58
  if (error && methods.formState.isValid)
59
59
  dispatch(clearError());
60
60
  }, [methods.formState.isValid]);
61
- var disabled = !methods.formState.isValid || !!error;
61
+ var disabled = !methods.formState.isValid;
62
62
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(MobileNumber, { readOnly: readOnly['mobile'], show: true, sx: { mb: 7.5 }, countries: countries, onListOpen: function () { return setListActive(true); }, onListClose: function () { return setListActive(false); } }), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
63
63
  };
64
64
  export default React.memo(PhoneInfo);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OperatorErrorProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OperatorErrorProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import GenericError from '../../../shared/GenericError';
5
+ var OperatorError = function (_a) {
6
+ var t = useTranslation().t;
7
+ return _jsx(GenericError, { error: t('operator_is_invalid'), errorTitle: t('oops') });
8
+ };
9
+ export default React.memo(OperatorError);
@@ -0,0 +1,3 @@
1
+ import OperatorError, { OperatorErrorProps } from './OperatorError';
2
+ export type { OperatorErrorProps };
3
+ export default OperatorError;
@@ -0,0 +1,2 @@
1
+ import OperatorError from './OperatorError';
2
+ export default OperatorError;
@@ -25,6 +25,6 @@ var SuccessWithFlowButtons = function () {
25
25
  var onClose = function () {
26
26
  dispatch(onCloseCompleteIndividual());
27
27
  };
28
- return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: isScopeAuthentication ? onClose : undefined, status: board_status }));
28
+ return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: isScopeAuthentication ? onClose : undefined, recipient: recipient, status: board_status }));
29
29
  };
30
30
  export default memo(SuccessWithFlowButtons);
@@ -72,7 +72,7 @@ var VerifyNumber = function (_a) {
72
72
  var onSubmit = function (formData) {
73
73
  dispatch(verifyLeadOTP(deepCopy(formData)));
74
74
  };
75
- var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
75
+ var disabled = !methods.formState.isValid || !phone || resendLoading;
76
76
  var dataLoading = loading || cityLoading;
77
77
  var showMobileNumber = !loading && !cityLoading && phone;
78
78
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [dataLoading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), showMobileNumber && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
@@ -2,6 +2,7 @@ import { LibConfig } from '../../@types';
2
2
  export interface PasswordLibProps extends LibConfig {
3
3
  verifyToken?: string;
4
4
  configToken?: string;
5
+ loaderColor?: string;
5
6
  }
6
7
  export declare function PasswordElement(props: PasswordLibProps): import("react/jsx-runtime").JSX.Element;
7
8
  export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): {