@tap-payments/auth-jsconnect 2.8.51-development → 2.8.52-beta

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 (229) hide show
  1. package/build/@types/app.d.ts +0 -1
  2. package/build/@types/form.d.ts +0 -1
  3. package/build/@types/redux.d.ts +0 -1
  4. package/build/api/axios.js +1 -2
  5. package/build/api/entity.d.ts +2 -2
  6. package/build/api/entity.js +4 -12
  7. package/build/api/index.d.ts +2 -2
  8. package/build/constants/api.d.ts +1 -0
  9. package/build/constants/api.js +2 -0
  10. package/build/constants/app.d.ts +2 -0
  11. package/build/constants/app.js +2 -0
  12. package/build/features/app/auth/authStore.js +23 -2
  13. package/build/features/app/bank/bankStore.d.ts +18 -13
  14. package/build/features/app/bank/bankStore.js +165 -184
  15. package/build/features/app/board/boardStore.js +30 -52
  16. package/build/features/app/brand/brandStore.d.ts +33 -16
  17. package/build/features/app/brand/brandStore.js +242 -239
  18. package/build/features/app/business/businessStore.d.ts +5 -0
  19. package/build/features/app/business/businessStore.js +87 -76
  20. package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -15
  21. package/build/features/app/connectExpress/connectExpressStore.js +68 -107
  22. package/build/features/app/entity/entityStore.d.ts +36 -20
  23. package/build/features/app/entity/entityStore.js +246 -196
  24. package/build/features/app/individual/individualStore.d.ts +38 -22
  25. package/build/features/app/individual/individualStore.js +266 -263
  26. package/build/features/app/password/passwordStore.d.ts +23 -40
  27. package/build/features/app/password/passwordStore.js +233 -226
  28. package/build/features/app/tax/taxStore.d.ts +7 -13
  29. package/build/features/app/tax/taxStore.js +147 -168
  30. package/build/features/auth/Auth.js +5 -1
  31. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +1 -13
  32. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +26 -4
  33. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +1 -7
  34. package/build/features/auth/screens/OTP/OTP.js +6 -1
  35. package/build/features/auth/screens/OTP/OTPInput.js +11 -0
  36. package/build/features/bank/Bank.d.ts +0 -1
  37. package/build/features/bank/Bank.js +4 -7
  38. package/build/features/bank/screens/BankDetails/BankDetails.js +5 -18
  39. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  40. package/build/features/bank/screens/Verify/Verify.js +5 -5
  41. package/build/features/board/Board.js +4 -8
  42. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -3
  43. package/build/features/brand/Brand.d.ts +0 -1
  44. package/build/features/brand/Brand.js +4 -7
  45. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +35 -8
  46. package/build/features/brand/screens/BrandActivities/BrandActivities.js +12 -49
  47. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +3 -3
  48. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -6
  49. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +18 -5
  50. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
  51. package/build/features/brand/screens/BrandActivities/TAC.d.ts +7 -2
  52. package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
  53. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  54. package/build/features/brand/screens/BrandInfo/BrandInfo.js +5 -23
  55. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +7 -23
  56. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  57. package/build/features/brand/screens/Verify/Verify.js +1 -1
  58. package/build/features/business/Business.js +4 -9
  59. package/build/features/business/screens/Activities/Activities.js +3 -12
  60. package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
  61. package/build/features/business/screens/Activities/OperationStartDate.d.ts +1 -1
  62. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
  63. package/build/features/business/screens/BusinessType/BusinessType.js +2 -10
  64. package/build/features/business/screens/BusinessType/LicenseType.d.ts +26 -4
  65. package/build/features/business/screens/CivilID/CivilID.js +1 -1
  66. package/build/features/business/screens/Customers/CustomerLocations.d.ts +36 -9
  67. package/build/features/business/screens/Customers/Customers.js +3 -12
  68. package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -6
  69. package/build/features/business/screens/Customers/RefundPolicy.d.ts +18 -5
  70. package/build/features/business/screens/IDBOD/IDBOD.js +2 -10
  71. package/build/features/business/screens/OTP/OTP.js +1 -1
  72. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -14
  73. package/build/features/business/screens/Verify/Verify.js +3 -13
  74. package/build/features/connect/Connect.js +4 -5
  75. package/build/features/connect/screens/BrandSegment/BrandSegment.js +1 -1
  76. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +2 -9
  77. package/build/features/connect/screens/CivilID/CivilID.js +7 -2
  78. package/build/features/connect/screens/Individual/Email.js +1 -3
  79. package/build/features/connect/screens/Individual/Individual.js +1 -1
  80. package/build/features/connect/screens/Merchant/BrandList.js +3 -3
  81. package/build/features/connect/screens/Merchant/Merchant.js +1 -1
  82. package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
  83. package/build/features/connect/screens/Mobile/Mobile.js +8 -11
  84. package/build/features/connect/screens/NID/NID.js +1 -1
  85. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  86. package/build/features/connectExpress/ConnectExpress.js +18 -5
  87. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +2 -5
  88. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +1 -6
  89. package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +0 -3
  90. package/build/features/connectExpress/screens/AuthenticationList/validation.js +0 -10
  91. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +1 -7
  92. package/build/features/connectExpress/screens/CivilID/CivilID.js +7 -2
  93. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +1 -1
  94. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +9 -2
  95. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +26 -4
  96. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +7 -2
  97. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +9 -2
  98. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
  99. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +24 -14
  100. package/build/features/connectExpress/screens/IdentityOTP/OTP.js +8 -7
  101. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +7 -5
  102. package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -9
  103. package/build/features/connectExpress/screens/NID/NID.js +7 -2
  104. package/build/features/connectExpress/screens/NID/TAC.d.ts +7 -2
  105. package/build/features/connectExpress/screens/NIDMissed/NID.js +1 -1
  106. package/build/features/connectExpress/screens/OTP/OTP.js +6 -1
  107. package/build/features/connectExpress/screens/OTP/OTPInput.js +11 -1
  108. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  109. package/build/features/entity/Entity.d.ts +0 -1
  110. package/build/features/entity/Entity.js +4 -7
  111. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +2 -2
  112. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +4 -8
  113. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +4 -8
  114. package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -34
  115. package/build/features/entity/screens/EntityName/EntityName.js +15 -32
  116. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +35 -8
  117. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +1 -1
  118. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +1 -1
  119. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  120. package/build/features/entity/screens/Verify/Verify.js +1 -1
  121. package/build/features/featuresScreens.js +7 -67
  122. package/build/features/individual/Individual.d.ts +0 -1
  123. package/build/features/individual/Individual.js +4 -7
  124. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
  125. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -54
  126. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +2 -5
  127. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +26 -4
  128. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
  129. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -4
  130. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -3
  131. package/build/features/individual/screens/IndividualList/Email.js +2 -3
  132. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
  133. package/build/features/individual/screens/IndividualList/IndividualList.js +5 -18
  134. package/build/features/individual/screens/IndividualList/UserList.js +9 -13
  135. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
  136. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +26 -4
  137. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
  138. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +20 -76
  139. package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
  140. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  141. package/build/features/individual/screens/Verify/Verify.js +1 -1
  142. package/build/features/password/Password.d.ts +0 -1
  143. package/build/features/password/Password.js +28 -75
  144. package/build/features/password/screens/CreatePassword/CreatePassword.js +4 -8
  145. package/build/features/password/screens/OTP/OTP.js +1 -1
  146. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  147. package/build/features/password/screens/Verify/Verify.js +5 -5
  148. package/build/features/shared/Address/CountryList.d.ts +23 -7
  149. package/build/features/shared/Address/InputSelect.d.ts +23 -7
  150. package/build/features/shared/Button/FlowsButtons.js +3 -13
  151. package/build/features/shared/Containers/FeatureContainer.d.ts +0 -1
  152. package/build/features/shared/Containers/FeatureContainer.js +3 -3
  153. package/build/features/shared/Input/Input.d.ts +2 -2
  154. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +1 -5
  155. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +3 -3
  156. package/build/features/shared/UploadFile/FileUpload.d.ts +7 -2
  157. package/build/features/shared/UploadFile/UploadFile.d.ts +7 -2
  158. package/build/features/shared/UploadFile/UploadWrapper.d.ts +7 -2
  159. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +7 -2
  160. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +7 -2
  161. package/build/features/signIn/SignIn.js +3 -12
  162. package/build/features/tax/Tax.d.ts +0 -1
  163. package/build/features/tax/Tax.js +4 -7
  164. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  165. package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -7
  166. package/build/features/tax/screens/Verify/Verify.js +5 -5
  167. package/build/hooks/index.d.ts +0 -1
  168. package/build/hooks/index.js +0 -1
  169. package/build/hooks/useVerifyToken.d.ts +2 -5
  170. package/build/hooks/useVerifyToken.js +5 -10
  171. package/build/utils/common.js +4 -4
  172. package/build/utils/locale.js +1 -2
  173. package/build/utils/string.d.ts +2 -5
  174. package/build/utils/string.js +5 -34
  175. package/package.json +2 -2
  176. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +0 -5
  177. package/build/features/bank/screens/OperatorError/OperatorError.js +0 -9
  178. package/build/features/bank/screens/OperatorError/index.d.ts +0 -3
  179. package/build/features/bank/screens/OperatorError/index.js +0 -2
  180. package/build/features/board/screens/OperatorError/OperatorError.d.ts +0 -5
  181. package/build/features/board/screens/OperatorError/OperatorError.js +0 -9
  182. package/build/features/board/screens/OperatorError/index.d.ts +0 -3
  183. package/build/features/board/screens/OperatorError/index.js +0 -2
  184. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +0 -5
  185. package/build/features/brand/screens/OperatorError/OperatorError.js +0 -9
  186. package/build/features/brand/screens/OperatorError/index.d.ts +0 -3
  187. package/build/features/brand/screens/OperatorError/index.js +0 -2
  188. package/build/features/business/screens/OperatorError/OperatorError.d.ts +0 -5
  189. package/build/features/business/screens/OperatorError/OperatorError.js +0 -9
  190. package/build/features/business/screens/OperatorError/index.d.ts +0 -3
  191. package/build/features/business/screens/OperatorError/index.js +0 -2
  192. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +0 -9
  193. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +0 -90
  194. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +0 -5
  195. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +0 -9
  196. package/build/features/connectExpress/screens/OperatorError/index.d.ts +0 -3
  197. package/build/features/connectExpress/screens/OperatorError/index.js +0 -2
  198. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -5
  199. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +0 -34
  200. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +0 -2
  201. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +0 -2
  202. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +0 -5
  203. package/build/features/entity/screens/OperatorError/OperatorError.js +0 -9
  204. package/build/features/entity/screens/OperatorError/index.d.ts +0 -3
  205. package/build/features/entity/screens/OperatorError/index.js +0 -2
  206. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +0 -14
  207. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +0 -76
  208. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +0 -5
  209. package/build/features/individual/screens/OperatorError/OperatorError.js +0 -9
  210. package/build/features/individual/screens/OperatorError/index.d.ts +0 -3
  211. package/build/features/individual/screens/OperatorError/index.js +0 -2
  212. package/build/features/password/screens/OperatorError/OperatorError.d.ts +0 -5
  213. package/build/features/password/screens/OperatorError/OperatorError.js +0 -9
  214. package/build/features/password/screens/OperatorError/index.d.ts +0 -3
  215. package/build/features/password/screens/OperatorError/index.js +0 -2
  216. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +0 -4
  217. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +0 -10
  218. package/build/features/password/screens/PrepareDataLoading/index.d.ts +0 -2
  219. package/build/features/password/screens/PrepareDataLoading/index.js +0 -2
  220. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +0 -5
  221. package/build/features/signIn/screens/OperatorError/OperatorError.js +0 -9
  222. package/build/features/signIn/screens/OperatorError/index.d.ts +0 -3
  223. package/build/features/signIn/screens/OperatorError/index.js +0 -2
  224. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +0 -5
  225. package/build/features/tax/screens/OperatorError/OperatorError.js +0 -9
  226. package/build/features/tax/screens/OperatorError/index.d.ts +0 -3
  227. package/build/features/tax/screens/OperatorError/index.js +0 -2
  228. package/build/hooks/useFormDirtyCheck.d.ts +0 -10
  229. package/build/hooks/useFormDirtyCheck.js +0 -66
@@ -25,7 +25,7 @@ import { AuthForType } from '../../../../@types';
25
25
  import { useForm, FormProvider } from 'react-hook-form';
26
26
  import { yupResolver } from '@hookform/resolvers/yup';
27
27
  import Form from '../../../../components/Form';
28
- import { maskPhone, maskID, deepCopy } from '../../../../utils';
28
+ import { maskPhone, maskID, deepCopy, sendCustomEventToGTM } from '../../../../utils';
29
29
  import { OTPValidation } from './validation';
30
30
  import OTPInput from './OTPInput';
31
31
  var OTPTitleContainerStyled = styled(Box)(function (_a) {
@@ -64,6 +64,11 @@ var OTP = function () {
64
64
  dispatch(clearError());
65
65
  }, [methods.formState.isValid]);
66
66
  React.useEffect(function () {
67
+ sendCustomEventToGTM({
68
+ event: 'Send Event',
69
+ event_category: 'User Registration Flow',
70
+ event_action: 'First OTP Page Viewed'
71
+ });
67
72
  return function () {
68
73
  dispatch(resetOTPValue());
69
74
  };
@@ -20,6 +20,7 @@ import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
20
  import { AuthForType } from '../../../../@types';
21
21
  import { resendMobileAuthOTP, resendNIDAuthOTP, connectExpressSelector, clearError } from '../../../app/connectExpress/connectExpressStore';
22
22
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
23
+ import { sendCustomEventToGTM } from '../../../../utils';
23
24
  var BoxStyled = styled(Box)(function (_a) {
24
25
  var theme = _a.theme;
25
26
  return ({
@@ -34,8 +35,15 @@ var OTPInput = function (_a) {
34
35
  var dispatch = useAppDispatch();
35
36
  var otpControl = useController({ name: 'otp', control: control });
36
37
  var _c = useAppSelector(connectExpressSelector), data = _c.data, error = _c.error;
37
- var mobileData = data.mobileData, nidData = data.nidData, responseData = data.responseData;
38
+ var mobileData = data.mobileData, nidData = data.nidData;
38
39
  var isNidAuth = data.otpData.authFor === AuthForType.NATIONAL_ID;
40
+ var sendEventAskAnotherOTP = function () {
41
+ sendCustomEventToGTM({
42
+ event: 'Send Event',
43
+ event_category: 'User Registration Flow',
44
+ event_action: 'Another OTP asked'
45
+ });
46
+ };
39
47
  var handleOnOTPChange = function (otp) {
40
48
  if (error)
41
49
  dispatch(clearError());
@@ -44,11 +52,13 @@ var OTPInput = function (_a) {
44
52
  var handleOnResendOTP = function () {
45
53
  if (otpControl.field.value)
46
54
  setValue('otp', '', { shouldValidate: true });
55
+ sendEventAskAnotherOTP();
47
56
  dispatch(resendMobileAuthOTP(mobileData));
48
57
  };
49
58
  var handleOnResendAbsherOTP = function () {
50
59
  if (otpControl.field.value)
51
60
  setValue('otp', '', { shouldValidate: true });
61
+ sendEventAskAnotherOTP();
52
62
  dispatch(resendNIDAuthOTP(nidData));
53
63
  };
54
64
  var otpValue = otpControl.field.value;
@@ -28,7 +28,7 @@ var SuccessWithFlowButtons = function () {
28
28
  var _b = data.responseData || {}, boardData = _b.boardData, leadData = _b.leadData, boardInfo = _b.boardInfo;
29
29
  var name = (leadData || {}).name;
30
30
  var _c = boardData || {}, business = _c.business, merchant = _c.merchant, bank = _c.bank_account, user = _c.user, individuals = _c.individuals, entity = _c.entity, brand = _c.brand;
31
- var _d = boardInfo || {}, flows = _d.info, recipient = _d.recipient;
31
+ var flows = (boardInfo || {}).info;
32
32
  var boardInfoId = boardInfo === null || boardInfo === void 0 ? void 0 : boardInfo.id;
33
33
  var boardId = boardData === null || boardData === void 0 ? void 0 : boardData.id;
34
34
  var individualsInfo = __assign(__assign({}, individuals), (!(user === null || user === void 0 ? void 0 : user.is_authorized) && { data_state: user === null || user === void 0 ? void 0 : user.data_state }));
@@ -36,6 +36,6 @@ var SuccessWithFlowButtons = function () {
36
36
  var name = _a.name;
37
37
  return name !== FlowsTypes.PASSWORD;
38
38
  }); }, [flows]);
39
- return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, loading: loading, boardId: boardId, boardInfoId: boardInfoId, brand: brand, business: business, entity: entity, flows: filteredFlows || [], merchant: merchant, individuals: individualsInfo, user: __assign({ names: { en: name } }, user), onClose: isScopeAuthentication ? onClose : undefined, recipient: recipient }));
39
+ return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, loading: loading, boardId: boardId, boardInfoId: boardInfoId, brand: brand, business: business, entity: entity, flows: filteredFlows || [], merchant: merchant, individuals: individualsInfo, user: __assign({ names: { en: name } }, user), onClose: isScopeAuthentication ? onClose : undefined }));
40
40
  };
41
41
  export default memo(SuccessWithFlowButtons);
@@ -2,7 +2,6 @@ import { LibConfig } from '../../@types';
2
2
  export interface EntityLibProps extends LibConfig {
3
3
  verifyToken?: string;
4
4
  configToken?: string;
5
- loaderColor?: string;
6
5
  }
7
6
  export declare function EntityElement(props: EntityLibProps): import("react/jsx-runtime").JSX.Element;
8
7
  export declare function renderEntityLib(config: EntityLibProps, elementId: string): {
@@ -36,7 +36,7 @@ import { entityFeatureScreens } from '../featuresScreens';
36
36
  import { entitySelector, verifyLeadToken } from '../app/entity/entityStore';
37
37
  import Background from '../shared/Background';
38
38
  var Entity = memo(function (_a) {
39
- var configToken = _a.configToken, verifyToken = _a.verifyToken, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "verifyToken", "loaderColor"]);
39
+ var configToken = _a.configToken, verifyToken = _a.verifyToken, props = __rest(_a, ["configToken", "verifyToken"]);
40
40
  var theme = useAppTheme().theme;
41
41
  var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
42
42
  var _c = useAppSelector(entitySelector), customLoading = _c.customLoading, entityError = _c.error, loading = _c.loading;
@@ -49,11 +49,8 @@ var Entity = memo(function (_a) {
49
49
  loadingScreenName: 'ENTITY_LOADING_DATA_STEP',
50
50
  navigation: featureScreensNavigation,
51
51
  open: open,
52
- mode: props.mode,
53
52
  internalToken: verifyToken,
54
- settingLoading: settingLoading,
55
- operatorErrorScreenName: 'ENTITY_OPERATOR_ERROR_STEP',
56
- isValidOperator: data.isValidOperator
53
+ settingLoading: settingLoading
57
54
  });
58
55
  React.useEffect(function () {
59
56
  initializeGTM();
@@ -61,8 +58,8 @@ var Entity = memo(function (_a) {
61
58
  title: 'Entity'
62
59
  });
63
60
  }, []);
64
- var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
65
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: entityFeatureScreens.map(function (_a, index) {
61
+ var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
62
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: entityFeatureScreens.map(function (_a, index) {
66
63
  var Element = _a.element, name = _a.name;
67
64
  var isActive = activeScreen.name === name;
68
65
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export declare const NameContainer: 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" | "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"> & {
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"> & {
5
5
  component?: React.ElementType<any> | undefined;
6
6
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
7
7
  isSelected?: boolean | undefined;
@@ -9,7 +9,7 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
9
9
  }, {}, {}>;
10
10
  export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
11
11
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
12
- }, "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"> & {
12
+ }, "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"> & {
13
13
  component?: React.ElementType<any> | undefined;
14
14
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
15
15
  export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -14,17 +14,16 @@ import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
17
- import { settingsSelector } from '../../../../app/settings';
18
- import { formatNumberAsCurrency, getCurrencyByCountryIso2, removeAllCharsFromNumber } from '../../../../utils';
17
+ import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
19
18
  import { ScreenContainer } from '../../../shared/Containers';
20
19
  import Input from '../../../shared/Input';
21
- import { clearError } from '../../../app/entity/entityStore';
20
+ import { clearError, entitySelector } from '../../../app/entity/entityStore';
22
21
  import { EndAdornment } from '../../../shared/EndAdornment';
23
22
  var CapitalPaid = function (_a) {
24
23
  var _b;
25
24
  var readOnly = _a.readOnly, isVerified = _a.isVerified;
26
25
  var t = useTranslation().t;
27
- var settingsData = useAppSelector(settingsSelector).data;
26
+ var data = useAppSelector(entitySelector).data;
28
27
  var control = useFormContext().control;
29
28
  var dispatch = useAppDispatch();
30
29
  var handleChange = function (_a) {
@@ -34,14 +33,11 @@ var CapitalPaid = function (_a) {
34
33
  var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
35
34
  capitalPaidControl.field.onChange(value);
36
35
  };
37
- var getCurrency = React.useMemo(function () {
38
- return t(getCurrencyByCountryIso2(settingsData.businessCountry.iso2));
39
- }, [settingsData.businessCountry.iso2]);
40
36
  var capitalPaidControl = useController({ control: control, name: 'capitalPaid' });
41
37
  var capitalPaidValue = capitalPaidControl.field.value;
42
38
  var error = (_b = capitalPaidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
43
39
  return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_paid_label', {
44
- currency: getCurrency
40
+ currency: t(data.currency)
45
41
  }), required: true, onChange: handleChange, value: capitalPaidValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_paid_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalPaidValue, isVerified: isVerified }) }) })));
46
42
  };
47
43
  export default React.memo(CapitalPaid);
@@ -13,18 +13,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
- import { formatNumberAsCurrency, getCurrencyByCountryIso2, removeAllCharsFromNumber } from '../../../../utils';
16
+ import { formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
17
17
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
- import { settingsSelector } from '../../../../app/settings';
19
18
  import { ScreenContainer } from '../../../shared/Containers';
20
19
  import Input from '../../../shared/Input';
21
- import { clearError } from '../../../app/entity/entityStore';
20
+ import { clearError, entitySelector } from '../../../app/entity/entityStore';
22
21
  import { EndAdornment } from '../../../shared/EndAdornment';
23
22
  var CapitalShareValue = function (_a) {
24
23
  var _b;
25
24
  var readOnly = _a.readOnly, isVerified = _a.isVerified;
26
25
  var t = useTranslation().t;
27
- var settingsData = useAppSelector(settingsSelector).data;
26
+ var data = useAppSelector(entitySelector).data;
28
27
  var control = useFormContext().control;
29
28
  var dispatch = useAppDispatch();
30
29
  var handleChange = function (_a) {
@@ -34,14 +33,11 @@ var CapitalShareValue = function (_a) {
34
33
  var value = formatNumberAsCurrency(removeAllCharsFromNumber(target.value));
35
34
  capitalShareValueControl.field.onChange(value);
36
35
  };
37
- var getCurrency = React.useMemo(function () {
38
- return t(getCurrencyByCountryIso2(settingsData.businessCountry.iso2));
39
- }, [settingsData.businessCountry.iso2]);
40
36
  var capitalShareValueControl = useController({ control: control, name: 'capitalShareValue' });
41
37
  var capitalShareValueValue = capitalShareValueControl.field.value;
42
38
  var error = (_b = capitalShareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
43
39
  return (_jsx(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: _jsx(Input, { readOnly: readOnly, label: t('capital_share_value_label', {
44
- currency: getCurrency
40
+ currency: t(data.currency)
45
41
  }), required: true, onChange: handleChange, value: capitalShareValueValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('capital_share_value_hint'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: capitalShareValueValue, isVerified: isVerified }) }) })));
46
42
  };
47
43
  export default React.memo(CapitalShareValue);
@@ -15,11 +15,11 @@ import { FormProvider, useForm } from 'react-hook-form';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import { styled } from '@mui/material/styles';
17
17
  import Collapse from '@mui/material/Collapse';
18
- import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
19
- import { deepCopy, formatNumberAsCurrency, removeAllCharsFromNumber, sendCustomEventToGTM } from '../../../../utils';
18
+ import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
19
+ import { deepCopy, removeAllCharsFromNumber } from '../../../../utils';
20
20
  import { clearError, entitySelector, updateEntityCapital } from '../../../app/entity/entityStore';
21
21
  import { yupResolver } from '@hookform/resolvers/yup';
22
- import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
22
+ import { handlePrevScreenStep } from '../../../../app/settings';
23
23
  import { ScreenContainer } from '../../../shared/Containers';
24
24
  import Form from '../../../../components/Form';
25
25
  import Button from '../../../shared/Button';
@@ -39,36 +39,21 @@ var EntityCapital = function (_a) {
39
39
  var isAr = useLanguage().isAr;
40
40
  var t = useTranslation().t;
41
41
  var dispatch = useAppDispatch();
42
- var settingsData = useAppSelector(settingsSelector).data;
43
42
  var _k = data.entityCapitalData, responseBody = _k.responseBody, capitalPaid = _k.capitalPaid, capitalShareCount = _k.capitalShareCount, capitalShareValue = _k.capitalShareValue, activities = _k.activities;
44
43
  var entity = (data.verify.responseBody || {}).entity;
45
- var _l = entity || {}, data_verification = _l.data_verification, capital = _l.capital, resActivities = _l.activities;
46
- var resCapitalPaidValue = (_b = capital === null || capital === void 0 ? void 0 : capital.paid) === null || _b === void 0 ? void 0 : _b.toString();
47
- var resCapitalShareCount = (_d = (_c = capital === null || capital === void 0 ? void 0 : capital.shares) === null || _c === void 0 ? void 0 : _c.count) === null || _d === void 0 ? void 0 : _d.toString();
48
- var resCapitalShareValue = (_f = (_e = capital === null || capital === void 0 ? void 0 : capital.shares) === null || _e === void 0 ? void 0 : _e.value) === null || _f === void 0 ? void 0 : _f.toString();
44
+ var _l = entity || {}, data_verification = _l.data_verification, capital = _l.capital;
49
45
  var methods = useForm({
50
46
  resolver: yupResolver(EntityCapitalValidationSchema()),
51
47
  defaultValues: {
52
48
  activities: activities,
53
49
  capitalPaid: capitalPaid,
54
- capitalShareCount: capitalShareCount === null || capitalShareCount === void 0 ? void 0 : capitalShareCount.toString(),
50
+ capitalShareCount: capitalShareCount,
55
51
  capitalShareValue: capitalShareValue
56
52
  },
57
53
  mode: 'onChange'
58
54
  });
59
55
  useSetFromDefaultValues(methods, data.entityCapitalData, true);
60
56
  var watch = methods.watch;
61
- var isDirty = useFormDirtyCheck(methods, {
62
- activities: resActivities,
63
- capitalPaid: resCapitalPaidValue && formatNumberAsCurrency(resCapitalPaidValue),
64
- capitalShareCount: resCapitalShareCount,
65
- capitalShareValue: resCapitalShareValue && formatNumberAsCurrency(resCapitalShareValue)
66
- }, [
67
- {
68
- name: 'activities',
69
- keys: ['id']
70
- }
71
- ]).isDirty;
72
57
  var originalReadOnly = useFormReadOnly(methods);
73
58
  var noneEditable = useDataNoneEditable(entity === null || entity === void 0 ? void 0 : entity.data_status, [
74
59
  'activities',
@@ -79,20 +64,11 @@ var EntityCapital = function (_a) {
79
64
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
80
65
  var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
81
66
  var dataVerified = useDataVerified(data_verification, ['capital.paid', 'capital.shares.count', 'capital.shares.value']);
82
- var isCapitalPaidVerified = dataVerified['capital.paid'] && resCapitalPaidValue === removeAllCharsFromNumber(watch('capitalPaid'));
83
- var isCapitalShareCountVerified = dataVerified['capital.shares.count'] && resCapitalShareCount === ((_g = watch('capitalShareCount')) === null || _g === void 0 ? void 0 : _g.toString());
84
- var isCapitalShareValueVerified = dataVerified['capital.shares.value'] && resCapitalShareValue === removeAllCharsFromNumber(watch('capitalShareValue'));
85
- React.useEffect(function () {
86
- sendCustomEventToGTM({
87
- event: 'Send Event',
88
- event_category: 'Board Flows - Entity',
89
- event_action: 'Entity Activities and Capital Details Page',
90
- event_label: settingsData.businessCountry.iso2
91
- });
92
- }, []);
67
+ var isCapitalPaidVerified = dataVerified['capital.paid'] && ((_b = capital === null || capital === void 0 ? void 0 : capital.paid) === null || _b === void 0 ? void 0 : _b.toString()) === removeAllCharsFromNumber(watch('capitalPaid'));
68
+ var isCapitalShareCountVerified = dataVerified['capital.shares.count'] && ((_d = (_c = capital === null || capital === void 0 ? void 0 : capital.shares) === null || _c === void 0 ? void 0 : _c.count) === null || _d === void 0 ? void 0 : _d.toString()) === ((_e = watch('capitalShareCount')) === null || _e === void 0 ? void 0 : _e.toString());
69
+ var isCapitalShareValueVerified = dataVerified['capital.shares.value'] && ((_g = (_f = capital === null || capital === void 0 ? void 0 : capital.shares) === null || _f === void 0 ? void 0 : _f.value) === null || _g === void 0 ? void 0 : _g.toString()) === removeAllCharsFromNumber(watch('capitalShareValue'));
93
70
  var onSubmit = function (data) {
94
- var formData = __assign(__assign({}, deepCopy(getFelids(data))), { isDirty: isDirty });
95
- dispatch(updateEntityCapital(formData));
71
+ dispatch(updateEntityCapital(deepCopy(getFelids(data))));
96
72
  };
97
73
  var onBack = function () {
98
74
  dispatch(handlePrevScreenStep());
@@ -104,7 +80,7 @@ var EntityCapital = function (_a) {
104
80
  var handleActivitiesOpenClose = function (flag) {
105
81
  setAnchorEl(flag);
106
82
  };
107
- var disabled = !methods.formState.isValid || uploading;
83
+ var disabled = !methods.formState.isValid || !!error || uploading;
108
84
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(ActivityList, { readOnly: readOnly['activities'] || noneEditable['activities'], onListOpen: function () { return handleActivitiesOpenClose(true); }, onListClose: function () { return handleActivitiesOpenClose(false); } }), _jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(CapitalPaid, { readOnly: readOnly['capitalPaid'] || noneEditable['capital.paid'], isVerified: isCapitalPaidVerified }), _jsx(CapitalShareCount, { readOnly: readOnly['capitalShareCount'] || noneEditable['capital.shares.count'], isVerified: isCapitalShareCountVerified }), _jsx(CapitalShareValue, { readOnly: readOnly['capitalShareValue'] || noneEditable['capital.shares.value'], isVerified: isCapitalShareValueVerified }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] }))] })) })) }));
109
85
  };
110
86
  export default EntityCapital;
@@ -15,9 +15,9 @@ import { FormProvider, useForm } from 'react-hook-form';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { styled } from '@mui/material/styles';
18
- import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
18
+ import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
19
19
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
20
- import { convertToEnglishDateFormat, deepCopy, getFileDetailsFromDocument, isKW, isSA, sendCustomEventToGTM } from '../../../../utils';
20
+ import { convertToEnglishDateFormat, deepCopy, getFileDetailsFromDocument, isKW, isSA } from '../../../../utils';
21
21
  import { BusinessType, DocumentPurpose } from '../../../../@types';
22
22
  import Form from '../../../../components/Form';
23
23
  import Collapse from '../../../../components/Collapse';
@@ -38,22 +38,22 @@ var FormStyled = styled(Form)(function () { return ({
38
38
  flexDirection: 'column'
39
39
  }); });
40
40
  var EntityName = function (_a) {
41
- var _b, _c;
42
- var _d = React.useState(false), issueAnchorEl = _d[0], setIssueAnchorEl = _d[1];
43
- var _e = React.useState(false), expiryAnchorEl = _e[0], setExpiryAnchorEl = _e[1];
44
- var _f = React.useState(false), entityTypeAnchorEl = _f[0], setEntityTypeAnchorEl = _f[1];
45
- var _g = useAppSelector(entitySelector), data = _g.data, loading = _g.loading, error = _g.error, uploading = _g.uploading, uploadingArticle = _g.uploadingArticle;
41
+ var _b;
42
+ var _c = React.useState(false), issueAnchorEl = _c[0], setIssueAnchorEl = _c[1];
43
+ var _d = React.useState(false), expiryAnchorEl = _d[0], setExpiryAnchorEl = _d[1];
44
+ var _e = React.useState(false), entityTypeAnchorEl = _e[0], setEntityTypeAnchorEl = _e[1];
45
+ var _f = useAppSelector(entitySelector), data = _f.data, loading = _f.loading, error = _f.error, uploading = _f.uploading, uploadingArticle = _f.uploadingArticle;
46
46
  var settingsData = useAppSelector(settingsSelector).data;
47
47
  var isAr = useLanguage().isAr;
48
48
  var t = useTranslation().t;
49
49
  var dispatch = useAppDispatch();
50
- var _h = data.entityNameData, legalName = _h.legalName, licenseNumber = _h.licenseNumber, licenseType = _h.licenseType, entityType = _h.entityType, issuingDate = _h.issuingDate, expiryDate = _h.expiryDate, unifiedNumber = _h.unifiedNumber, certificateId = _h.certificateId, articleId = _h.articleId;
50
+ var _g = data.entityNameData, legalName = _g.legalName, licenseNumber = _g.licenseNumber, licenseType = _g.licenseType, entityType = _g.entityType, issuingDate = _g.issuingDate, expiryDate = _g.expiryDate, unifiedNumber = _g.unifiedNumber, certificateId = _g.certificateId, articleId = _g.articleId;
51
51
  var country_code = settingsData.businessCountry.iso2;
52
52
  var isSACountry = React.useMemo(function () { return isSA(country_code); }, [country_code]);
53
53
  var isKWCountry = React.useMemo(function () { return isKW(country_code); }, [country_code]);
54
54
  var isCR = licenseType === BusinessType.CR;
55
- var _j = data.verify.responseBody || {}, entity = _j.entity, flows = _j.flows, entityTypes = _j.entityTypes;
56
- var _k = entity || {}, AOA_file = _k.AOA_file, id = _k.id, documents = _k.documents, data_status = _k.data_status, data_verification = _k.data_verification, legal_name = _k.legal_name, type = _k.type, license = _k.license;
55
+ var _h = data.verify.responseBody || {}, entity = _h.entity, flows = _h.flows;
56
+ var _j = entity || {}, AOA_file = _j.AOA_file, id = _j.id, documents = _j.documents, data_status = _j.data_status, data_verification = _j.data_verification, legal_name = _j.legal_name, type = _j.type, license = _j.license;
57
57
  var getSchema = function () {
58
58
  if (isSACountry)
59
59
  return EntityNameValidationSchema();
@@ -80,18 +80,6 @@ var EntityName = function (_a) {
80
80
  useSetFromDefaultValues(methods, data.entityNameData, true);
81
81
  var defaultCertificateFiles = React.useMemo(function () { return getFileDetailsFromDocument(documents, DocumentPurpose.CR); }, [documents]);
82
82
  var defaultArticleFile = React.useMemo(function () { return AOA_file && __assign(__assign({}, AOA_file), { docId: id }); }, [AOA_file]);
83
- var issueDateRes = (license === null || license === void 0 ? void 0 : license.issuing_date) && convertToEnglishDateFormat(new Date(license.issuing_date));
84
- var expDateRes = (license === null || license === void 0 ? void 0 : license.expiry_date) && convertToEnglishDateFormat(new Date(license.expiry_date));
85
- var isDirty = useFormDirtyCheck(methods, {
86
- legalName: (legal_name === null || legal_name === void 0 ? void 0 : legal_name.en) || (legal_name === null || legal_name === void 0 ? void 0 : legal_name.ar),
87
- licenseNumber: license === null || license === void 0 ? void 0 : license.number,
88
- licenseType: (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR,
89
- entityType: type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]),
90
- issuingDate: issueDateRes,
91
- expiryDate: expDateRes,
92
- unifiedNumber: (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number,
93
- articleId: defaultArticleFile === null || defaultArticleFile === void 0 ? void 0 : defaultArticleFile.id
94
- }).isDirty;
95
83
  var originalReadOnly = useFormReadOnly(methods, { certificateId: defaultCertificateFiles, articleId: defaultArticleFile });
96
84
  var noneEditable = useDataNoneEditable(data_status, [
97
85
  'legal_name.en',
@@ -116,16 +104,17 @@ var EntityName = function (_a) {
116
104
  'license.expiry_date',
117
105
  'AOA_file_id'
118
106
  ]);
107
+ var issueDateRes = (license === null || license === void 0 ? void 0 : license.issuing_date) && convertToEnglishDateFormat(new Date(license.issuing_date));
108
+ var expDateRes = (license === null || license === void 0 ? void 0 : license.expiry_date) && convertToEnglishDateFormat(new Date(license.expiry_date));
119
109
  var isLegalNameVerified = dataVerified['legal_name.en'] && dataVerified['legal_name.ar'] && ((legal_name === null || legal_name === void 0 ? void 0 : legal_name.en) === watch('legalName') || (legal_name === null || legal_name === void 0 ? void 0 : legal_name.ar) === watch('legalName'));
120
110
  var isEntityTypeVerified = dataVerified['type'] && type === watch('entityType');
121
111
  var isLicenseNumberVerified = dataVerified['license.number'] && (license === null || license === void 0 ? void 0 : license.number) === watch('licenseNumber');
122
- var isUnifiedNumberVerified = dataVerified['license.additional_info'] && ((_c = license === null || license === void 0 ? void 0 : license.additional_info) === null || _c === void 0 ? void 0 : _c.unified_number) === watch('unifiedNumber');
112
+ var isUnifiedNumberVerified = dataVerified['license.additional_info'] && ((_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number) === watch('unifiedNumber');
123
113
  var isIssuingDateVerified = dataVerified['license.issuing_date'] && issueDateRes === watch('issuingDate');
124
114
  var isExpiryDateVerified = dataVerified['license.expiry_date'] && expDateRes === watch('expiryDate');
125
115
  var isArticleIdVerified = dataVerified['AOA_file_id'];
126
116
  var onSubmit = function (data) {
127
- var formData = __assign(__assign({}, deepCopy(getFelids(data))), { isDirty: isDirty });
128
- dispatch(updateEntityName(formData));
117
+ dispatch(updateEntityName(deepCopy(getFelids(data))));
129
118
  };
130
119
  var handleIssueDateOpenClose = function (flag) {
131
120
  setIssueAnchorEl(flag);
@@ -137,12 +126,6 @@ var EntityName = function (_a) {
137
126
  setEntityTypeAnchorEl(flag);
138
127
  };
139
128
  var onBack = function () {
140
- sendCustomEventToGTM({
141
- event: 'Send Event',
142
- event_category: 'Board Flows - Entity',
143
- event_action: 'Entity Details Back button',
144
- event_label: settingsData.businessCountry.iso2
145
- });
146
129
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
147
130
  dispatch(handlePrevScreenStep());
148
131
  return;
@@ -153,7 +136,7 @@ var EntityName = function (_a) {
153
136
  if (error)
154
137
  dispatch(clearError());
155
138
  }, [methods.formState.isValid]);
156
- var disabled = !methods.formState.isValid || uploading || uploadingArticle;
139
+ var disabled = !methods.formState.isValid || !!error || uploading || uploadingArticle;
157
140
  var showLicenseNumber = isKWCountry ? isCR : true;
158
141
  var showUnifiedNumber = isSACountry ? isCR : false;
159
142
  var disableBack = settingsData.appConfig.mode === 'content';
@@ -1,21 +1,48 @@
1
1
  import * as React from 'react';
2
2
  export declare const InputLabelStyled: 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" | "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"> & {
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"> & {
5
5
  component?: React.ElementType<any> | undefined;
6
6
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
7
- export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<import("@mui/material").SvgIconOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
7
+ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
8
+ children?: React.ReactNode;
9
+ classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
10
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
11
+ fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
12
+ htmlColor?: string | undefined;
13
+ inheritViewBox?: boolean | undefined;
14
+ shapeRendering?: string | undefined;
15
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
16
+ titleAccess?: string | undefined;
17
+ viewBox?: string | undefined;
18
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
8
19
  ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
9
- }, "className" | "style" | "classes" | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
10
- export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<import("@mui/material").SvgIconOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
20
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
21
+ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
22
+ children?: React.ReactNode;
23
+ classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
24
+ color?: "inherit" | "disabled" | "error" | "info" | "success" | "action" | "primary" | "secondary" | "warning" | undefined;
25
+ fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
26
+ htmlColor?: string | undefined;
27
+ inheritViewBox?: boolean | undefined;
28
+ shapeRendering?: string | undefined;
29
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
30
+ titleAccess?: string | undefined;
31
+ viewBox?: string | undefined;
32
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
11
33
  ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
12
- }, "className" | "style" | "classes" | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
13
- export declare const LabelContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
34
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
35
+ export declare const LabelContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
36
+ children?: React.ReactNode;
37
+ component?: React.ElementType<any> | undefined;
38
+ ref?: React.Ref<unknown> | undefined;
39
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
40
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
41
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
15
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
42
+ }, ("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" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
43
  export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
17
44
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
18
- }, "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"> & {
45
+ }, "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"> & {
19
46
  component?: React.ElementType<any> | undefined;
20
47
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
21
48
  isSelected: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export declare const InputLabelStyled: 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" | "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"> & {
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"> & {
5
5
  component?: React.ElementType<any> | undefined;
6
6
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
7
7
  export interface ExpiryDateProps {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export declare const InputLabelStyled: 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" | "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"> & {
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"> & {
5
5
  component?: React.ElementType<any> | undefined;
6
6
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
7
7
  export interface IssuingDateProps {
@@ -21,10 +21,10 @@ var SuccessWithFlowButtons = function () {
21
21
  var _a = useAppSelector(entitySelector), data = _a.data, loading = _a.loading;
22
22
  var settingsData = useAppSelector(settingsSelector).data;
23
23
  var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
24
- var _b = data.verify.responseBody || {}, flows = _b.flows, entity = _b.entity, brand = _b.brand, bank = _b.bank_account, merchant = _b.merchant, user = _b.user, business = _b.business, board_id = _b.board_id, board_info_id = _b.board_info_id, name = _b.name, individuals = _b.individuals, recipient = _b.recipient;
24
+ var _b = data.verify.responseBody || {}, flows = _b.flows, entity = _b.entity, brand = _b.brand, bank = _b.bank_account, merchant = _b.merchant, user = _b.user, business = _b.business, board_id = _b.board_id, board_info_id = _b.board_info_id, name = _b.name, individuals = _b.individuals;
25
25
  var onClose = function () {
26
26
  dispatch(onCloseCompleteEntity());
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, individuals: individuals, boardInfoId: board_info_id, flows: flows || [], onClose: isScopeAuthentication ? onClose : undefined, recipient: recipient }));
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, individuals: individuals, boardInfoId: board_info_id, flows: flows || [], onClose: isScopeAuthentication ? onClose : undefined }));
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(verifyEntityLeadOTP(deepCopy(formData)));
74
74
  };
75
- var disabled = !methods.formState.isValid || !phone || resendLoading;
75
+ var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
76
76
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _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') }))] })) })) }));
77
77
  };
78
78
  export default React.memo(VerifyNumber);