@tap-payments/auth-jsconnect 2.0.30-test → 2.0.30

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 (294) hide show
  1. package/build/@types/app.d.ts +59 -20
  2. package/build/@types/app.js +16 -1
  3. package/build/@types/form.d.ts +21 -7
  4. package/build/api/auth.d.ts +24 -2
  5. package/build/api/auth.js +36 -1
  6. package/build/api/axios.js +2 -2
  7. package/build/api/brand.d.ts +2 -1
  8. package/build/api/brand.js +10 -1
  9. package/build/api/country.d.ts +3 -1
  10. package/build/api/country.js +3 -1
  11. package/build/api/data.d.ts +38 -7
  12. package/build/api/data.js +57 -17
  13. package/build/api/entity.d.ts +28 -5
  14. package/build/api/entity.js +23 -9
  15. package/build/api/firebase.d.ts +1 -1
  16. package/build/api/firebase.js +3 -1
  17. package/build/api/index.d.ts +41 -14
  18. package/build/api/individual.d.ts +76 -19
  19. package/build/api/individual.js +29 -2
  20. package/build/api/lead.d.ts +8 -6
  21. package/build/app/rootReducer.d.ts +2 -0
  22. package/build/app/rootReducer.js +5 -1
  23. package/build/app/settings.d.ts +8 -2
  24. package/build/app/settings.js +29 -12
  25. package/build/app/store.d.ts +5 -1
  26. package/build/assets/locales/ar.json +256 -179
  27. package/build/assets/locales/en.json +188 -104
  28. package/build/components/AnimationFlow/AnimationFlow.d.ts +5 -1
  29. package/build/components/AnimationFlow/AnimationFlow.js +6 -8
  30. package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
  31. package/build/components/AnimationFlow/BottomSheet.js +4 -3
  32. package/build/components/AnimationFlow/Dialog.d.ts +5 -1
  33. package/build/components/AnimationFlow/Dialog.js +11 -5
  34. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
  35. package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
  36. package/build/components/ArabicDatePicker/index.d.ts +2 -0
  37. package/build/components/ArabicDatePicker/index.js +2 -0
  38. package/build/components/ArabicDatePicker/style.css +24 -0
  39. package/build/components/FileInput/DragAndDrop.d.ts +10 -1
  40. package/build/components/FileInput/DragAndDrop.js +107 -8
  41. package/build/components/Lottie/Lottie.d.ts +878 -0
  42. package/build/components/Lottie/Lottie.js +58 -0
  43. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  44. package/build/components/Lottie/files/success.json +425 -0
  45. package/build/components/Lottie/index.d.ts +3 -0
  46. package/build/components/Lottie/index.js +3 -0
  47. package/build/components/OTPField/OTPField.d.ts +2 -1
  48. package/build/components/OTPField/OTPField.js +2 -2
  49. package/build/components/OTPTimer/OTPTimer.js +1 -1
  50. package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
  51. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  52. package/build/components/ProgressBar/index.d.ts +2 -0
  53. package/build/components/ProgressBar/index.js +2 -0
  54. package/build/components/RadioLabel/RadioLabel.d.ts +2 -1
  55. package/build/components/RadioLabel/RadioLabel.js +2 -2
  56. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -4
  57. package/build/components/SocialMediaGroup/SocialMediaGroup.js +3 -55
  58. package/build/constants/api.d.ts +6 -0
  59. package/build/constants/api.js +14 -1
  60. package/build/constants/app.d.ts +13 -0
  61. package/build/constants/app.js +97 -15
  62. package/build/constants/assets.d.ts +20 -1
  63. package/build/constants/assets.js +27 -8
  64. package/build/constants/dummy.d.ts +1 -1
  65. package/build/constants/dummy.js +2 -2
  66. package/build/constants/validation.d.ts +8 -0
  67. package/build/constants/validation.js +9 -1
  68. package/build/features/app/auth/authStore.d.ts +47 -0
  69. package/build/features/app/auth/authStore.js +265 -0
  70. package/build/features/app/bank/bankStore.d.ts +16 -0
  71. package/build/features/app/bank/bankStore.js +81 -37
  72. package/build/features/app/business/businessStore.d.ts +22 -3
  73. package/build/features/app/business/businessStore.js +430 -290
  74. package/build/features/app/connect/connectStore.d.ts +33 -30
  75. package/build/features/app/connect/connectStore.js +398 -258
  76. package/build/features/app/entity/entityStore.d.ts +53 -0
  77. package/build/features/app/entity/entityStore.js +461 -0
  78. package/build/features/app/individual/individualStore.d.ts +17 -0
  79. package/build/features/app/individual/individualStore.js +167 -83
  80. package/build/features/app/password/passwordStore.js +1 -1
  81. package/build/features/app/tax/taxStore.js +3 -2
  82. package/build/features/auth/Auth.d.ts +10 -0
  83. package/build/features/auth/Auth.js +87 -0
  84. package/build/features/auth/index.d.ts +1 -0
  85. package/build/features/auth/index.js +1 -0
  86. package/build/features/auth/screens/NID/DOB.d.ts +7 -0
  87. package/build/features/auth/screens/NID/DOB.js +47 -0
  88. package/build/features/auth/screens/NID/IDNumber.d.ts +3 -0
  89. package/build/features/auth/screens/NID/IDNumber.js +64 -0
  90. package/build/features/auth/screens/NID/NID.d.ts +5 -0
  91. package/build/features/auth/screens/NID/NID.js +67 -0
  92. package/build/features/auth/screens/NID/TAC.d.ts +3 -0
  93. package/build/features/auth/screens/NID/TAC.js +87 -0
  94. package/build/features/auth/screens/NID/index.d.ts +3 -0
  95. package/build/features/auth/screens/NID/index.js +2 -0
  96. package/build/features/auth/screens/NID/validation.d.ts +27 -0
  97. package/build/features/auth/screens/NID/validation.js +19 -0
  98. package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
  99. package/build/features/auth/screens/OTP/OTP.js +76 -0
  100. package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
  101. package/build/features/auth/screens/OTP/OTPInput.js +51 -0
  102. package/build/features/auth/screens/OTP/index.d.ts +3 -0
  103. package/build/features/auth/screens/OTP/index.js +2 -0
  104. package/build/features/auth/screens/OTP/validation.d.ts +8 -0
  105. package/build/features/auth/screens/OTP/validation.js +4 -0
  106. package/build/features/bank/Bank.js +12 -6
  107. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
  108. package/build/features/bank/screens/BankDetails/BankStatement.js +41 -8
  109. package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
  110. package/build/features/bank/screens/BankDetails/validation.js +2 -2
  111. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -8
  112. package/build/features/business/Business.d.ts +1 -1
  113. package/build/features/business/Business.js +14 -7
  114. package/build/features/business/screens/Activities/Activities.js +1 -6
  115. package/build/features/business/screens/Activities/ActivitiesList.d.ts +37 -1
  116. package/build/features/business/screens/Activities/ActivitiesList.js +51 -12
  117. package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
  118. package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
  119. package/build/features/business/screens/Activities/validation.d.ts +0 -51
  120. package/build/features/business/screens/Activities/validation.js +0 -9
  121. package/build/features/business/screens/BusinessType/BusinessType.js +20 -7
  122. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  123. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  124. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  125. package/build/features/business/screens/BusinessType/LicenseCertificate.js +76 -0
  126. package/build/features/business/screens/BusinessType/LicenseList.js +24 -7
  127. package/build/features/business/screens/BusinessType/LicenseNumber.js +14 -8
  128. package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -0
  129. package/build/features/business/screens/BusinessType/LicenseType.js +67 -0
  130. package/build/features/business/screens/BusinessType/validation.d.ts +19 -0
  131. package/build/features/business/screens/BusinessType/validation.js +50 -1
  132. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
  133. package/build/features/business/screens/CivilID/CivilID.js +84 -0
  134. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
  135. package/build/features/business/screens/CivilID/IDNumber.js +59 -0
  136. package/build/features/business/screens/CivilID/index.d.ts +3 -0
  137. package/build/features/business/screens/CivilID/index.js +2 -0
  138. package/build/features/business/screens/CivilID/validation.d.ts +8 -0
  139. package/build/features/business/screens/CivilID/validation.js +4 -0
  140. package/build/features/business/screens/Customers/CustomerLocations.d.ts +15 -2
  141. package/build/features/business/screens/Customers/CustomerLocations.js +32 -8
  142. package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
  143. package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
  144. package/build/features/business/screens/Customers/RefundPolicy.js +8 -2
  145. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -2
  146. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -7
  147. package/build/features/business/screens/Verify/Verify.js +4 -4
  148. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  149. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +157 -0
  150. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  151. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  152. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  153. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  154. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
  155. package/build/features/business/screens/VerifyPACI/index.js +2 -0
  156. package/build/features/connect/Connect.d.ts +2 -1
  157. package/build/features/connect/Connect.js +47 -12
  158. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  159. package/build/features/connect/screens/CivilID/CivilID.js +86 -0
  160. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  161. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  162. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  163. package/build/features/connect/screens/CivilID/index.js +2 -0
  164. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  165. package/build/features/connect/screens/CivilID/validation.js +4 -0
  166. package/build/features/connect/screens/Individual/Email.js +11 -3
  167. package/build/features/connect/screens/Individual/Individual.js +27 -14
  168. package/build/features/connect/screens/Merchant/BrandList.js +15 -7
  169. package/build/features/connect/screens/Merchant/BrandName.js +7 -4
  170. package/build/features/connect/screens/Merchant/Merchant.js +47 -50
  171. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +7 -0
  172. package/build/features/connect/screens/Merchant/SalesChannels.js +113 -0
  173. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +1 -4
  174. package/build/features/connect/screens/Merchant/SocialMedia.js +131 -66
  175. package/build/features/connect/screens/Merchant/TAC.js +8 -2
  176. package/build/features/connect/screens/Merchant/validation.d.ts +22 -45
  177. package/build/features/connect/screens/Merchant/validation.js +117 -116
  178. package/build/features/connect/screens/Mobile/Mobile.js +15 -6
  179. package/build/features/connect/screens/NID/NID.js +2 -1
  180. package/build/features/connect/screens/OTP/OTP.js +5 -4
  181. package/build/features/connect/screens/OTP/OTPInput.js +3 -2
  182. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  183. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +159 -0
  184. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  185. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  186. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  187. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  188. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  189. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  190. package/build/features/entity/Entity.d.ts +7 -0
  191. package/build/features/entity/Entity.js +70 -0
  192. package/build/features/entity/index.d.ts +1 -0
  193. package/build/features/entity/index.js +1 -0
  194. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
  195. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +140 -0
  196. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +5 -0
  197. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +56 -0
  198. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
  199. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
  200. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
  201. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
  202. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
  203. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
  204. package/build/features/{business/screens/Activities → entity/screens/EntityInfoConfirm}/SalesChannels.d.ts +0 -0
  205. package/build/features/{business/screens/Activities → entity/screens/EntityInfoConfirm}/SalesChannels.js +8 -5
  206. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +2 -0
  207. package/build/features/entity/screens/EntityInfoConfirm/index.js +2 -0
  208. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
  209. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
  210. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  211. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  212. package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -0
  213. package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -0
  214. package/build/features/entity/screens/Success/Success.d.ts +5 -0
  215. package/build/features/entity/screens/Success/Success.js +16 -0
  216. package/build/features/entity/screens/Success/index.d.ts +3 -0
  217. package/build/features/entity/screens/Success/index.js +2 -0
  218. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  219. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +110 -0
  220. package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  221. package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -0
  222. package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -0
  223. package/build/features/entity/screens/Verify/OTPInput.js +47 -0
  224. package/build/features/entity/screens/Verify/Verify.d.ts +5 -0
  225. package/build/features/entity/screens/Verify/Verify.js +78 -0
  226. package/build/features/entity/screens/Verify/index.d.ts +2 -0
  227. package/build/features/entity/screens/Verify/index.js +2 -0
  228. package/build/features/entity/screens/Verify/validation.d.ts +8 -0
  229. package/build/features/entity/screens/Verify/validation.js +4 -0
  230. package/build/features/featuresScreens.d.ts +2 -0
  231. package/build/features/featuresScreens.js +56 -0
  232. package/build/features/individual/Individual.d.ts +1 -1
  233. package/build/features/individual/Individual.js +14 -7
  234. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
  235. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +15 -3
  236. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
  237. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
  238. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -8
  239. package/build/features/individual/screens/Verify/Verify.js +4 -4
  240. package/build/features/password/Password.d.ts +1 -1
  241. package/build/features/password/Password.js +14 -7
  242. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -9
  243. package/build/features/shared/Background/Background.d.ts +7 -5
  244. package/build/features/shared/Background/Background.js +16 -5
  245. package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
  246. package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
  247. package/build/features/shared/Button/MobileButton.d.ts +2 -1
  248. package/build/features/shared/Button/MobileButton.js +2 -2
  249. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  250. package/build/features/shared/Dialog/CloseDialog.js +71 -0
  251. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  252. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  253. package/build/features/shared/Dialog/index.d.ts +4 -0
  254. package/build/features/shared/Dialog/index.js +4 -0
  255. package/build/features/shared/Input/Input.d.ts +1 -1
  256. package/build/features/shared/Input/Input.js +2 -2
  257. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  258. package/build/features/shared/UploadFile/UploadFile.d.ts +9 -3
  259. package/build/features/shared/UploadFile/UploadFile.js +23 -8
  260. package/build/features/signIn/SignIn.d.ts +1 -1
  261. package/build/features/signIn/SignIn.js +14 -6
  262. package/build/features/tax/Tax.d.ts +1 -1
  263. package/build/features/tax/Tax.js +16 -8
  264. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +11 -7
  265. package/build/hooks/index.d.ts +1 -0
  266. package/build/hooks/index.js +1 -0
  267. package/build/hooks/useAppConfig.d.ts +3 -1
  268. package/build/hooks/useAppConfig.js +4 -2
  269. package/build/hooks/useAppDispatch.d.ts +2 -0
  270. package/build/hooks/useErrorListener.js +0 -5
  271. package/build/hooks/useScreen.d.ts +3 -0
  272. package/build/hooks/useScreen.js +14 -0
  273. package/build/index.d.ts +4 -2
  274. package/build/index.js +8 -2
  275. package/build/utils/array.d.ts +13 -1
  276. package/build/utils/array.js +26 -0
  277. package/build/utils/common.d.ts +1 -0
  278. package/build/utils/common.js +3 -0
  279. package/build/utils/device.d.ts +1 -0
  280. package/build/utils/device.js +13 -0
  281. package/build/utils/html.d.ts +1 -0
  282. package/build/utils/html.js +6 -0
  283. package/build/utils/index.d.ts +1 -0
  284. package/build/utils/index.js +1 -0
  285. package/build/utils/locale.js +1 -1
  286. package/build/utils/object.d.ts +1 -0
  287. package/build/utils/object.js +12 -0
  288. package/build/utils/rsa.d.ts +2 -2
  289. package/build/utils/rsa.js +1 -1
  290. package/build/utils/string.d.ts +33 -20
  291. package/build/utils/string.js +71 -1
  292. package/build/utils/validation.d.ts +2 -0
  293. package/build/utils/validation.js +6 -0
  294. package/package.json +129 -128
@@ -0,0 +1,8 @@
1
+ import * as yup from 'yup';
2
+ export declare const OTPValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
5
+ otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
+ otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
+ }>>>;
@@ -0,0 +1,4 @@
1
+ import * as yup from 'yup';
2
+ export var OTPValidation = yup.object().shape({
3
+ otp: yup.string().min(6, 'otp_min_length').required('otp_required')
4
+ });
@@ -6,3 +6,5 @@ export declare const individualFeatureScreens: Array<FeatureScreenStep>;
6
6
  export declare const bankFeatureScreens: Array<FeatureScreenStep>;
7
7
  export declare const taxFeatureScreens: Array<FeatureScreenStep>;
8
8
  export declare const signInFeatureScreens: Array<FeatureScreenStep>;
9
+ export declare const entityFeatureScreens: Array<FeatureScreenStep>;
10
+ export declare const authFeatureScreens: Array<FeatureScreenStep>;
@@ -1,5 +1,7 @@
1
1
  import MobileScreen from './connect/screens/Mobile';
2
2
  import NIDScreen from './connect/screens/NID';
3
+ import ConnectCivilIDScreen from '../features/connect/screens/CivilID';
4
+ import ConnectVerifyPACIScreen from './connect/screens/VerifyPACI';
3
5
  import IndividualScreen from './connect/screens/Individual';
4
6
  import MerchantInfoScreen from './connect/screens/Merchant';
5
7
  import ConnectOTPScreen from './connect/screens/OTP';
@@ -13,6 +15,8 @@ import ActivitiesPage from './business/screens/Activities';
13
15
  import SuccessPage from './business/screens/Success';
14
16
  import SuccessWithFlowButtonsPage from './business/screens/SuccessWithFlowButtons';
15
17
  import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
18
+ import BusCivilIDscreen from './business/screens/CivilID';
19
+ import BusVerifyPACIScreen from './business/screens/VerifyPACI';
16
20
  import PasswordVerifyPage from './password/screens/Verify';
17
21
  import CreatePasswordPage from './password/screens/CreatePassword';
18
22
  import PasswordOTPPage from './password/screens/OTP';
@@ -38,11 +42,22 @@ import SignInMobilePage from './signIn/screens/Mobile';
38
42
  import SignInEmailPage from './signIn/screens/Email';
39
43
  import SignInOTPPage from './signIn/screens/OTP';
40
44
  import SignInPasswordPage from './signIn/screens/Password';
45
+ import EntityVerifyPage from './entity/screens/Verify';
46
+ import EntityInfoConfirmPage from './entity/screens/EntityInfoConfirm';
47
+ import EntitySuccessPage from './entity/screens/Success';
48
+ import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
49
+ import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
50
+ import AuthNIDPage from './auth/screens/NID';
51
+ import AuthVerifyPage from './auth/screens/OTP';
41
52
  export var connectFeatureScreens = [
42
53
  {
43
54
  name: 'CONNECT_NID_STEP',
44
55
  element: NIDScreen
45
56
  },
57
+ {
58
+ name: 'CONNECT_CIVIL_ID_STEP',
59
+ element: ConnectCivilIDScreen
60
+ },
46
61
  {
47
62
  name: 'CONNECT_MOBILE_STEP',
48
63
  element: MobileScreen
@@ -51,6 +66,10 @@ export var connectFeatureScreens = [
51
66
  name: 'CONNECT_OTP_STEP',
52
67
  element: ConnectOTPScreen
53
68
  },
69
+ {
70
+ name: 'CONNECT_VERIFY_PACI_STEP',
71
+ element: ConnectVerifyPACIScreen
72
+ },
54
73
  {
55
74
  name: 'CONNECT_INDIVIDUAL_STEP',
56
75
  element: IndividualScreen
@@ -73,6 +92,14 @@ export var businessFeatureScreens = [
73
92
  name: 'BUSINESS_IDBOD_STEP',
74
93
  element: IDBODPage
75
94
  },
95
+ {
96
+ name: 'BUSINESS_CIVIL_ID_STEP',
97
+ element: BusCivilIDscreen
98
+ },
99
+ {
100
+ name: 'BUSINESS_VERIFY_PACI_STEP',
101
+ element: BusVerifyPACIScreen
102
+ },
76
103
  {
77
104
  name: 'BUSINESS_OTP_STEP',
78
105
  element: BusinessOTPPage
@@ -191,3 +218,32 @@ export var signInFeatureScreens = [
191
218
  element: SignInPasswordPage
192
219
  }
193
220
  ];
221
+ export var entityFeatureScreens = [
222
+ {
223
+ name: 'ENTITY_VERIFY_STEP',
224
+ element: EntityVerifyPage
225
+ },
226
+ {
227
+ name: 'ENTITY_INFO_STEP',
228
+ element: EntityInfoConfirmPage
229
+ },
230
+ {
231
+ name: 'ENTITY_DETAILS_SUCCESS_STEP',
232
+ element: EntitySuccessPage
233
+ },
234
+ {
235
+ name: 'ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP',
236
+ element: EntitySuccessWithFlowPage
237
+ },
238
+ { name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
239
+ ];
240
+ export var authFeatureScreens = [
241
+ {
242
+ name: 'AUTH_NID_STEP',
243
+ element: AuthNIDPage
244
+ },
245
+ {
246
+ name: 'AUTH_VERIFY_STEP',
247
+ element: AuthVerifyPage
248
+ }
249
+ ];
@@ -4,4 +4,4 @@ export interface IndividualLibProps extends LibConfig {
4
4
  }
5
5
  export declare function IndividualLib(props: IndividualLibProps): JSX.Element;
6
6
  export declare function renderIndividualLib(config: IndividualLibProps, elementId: string): void;
7
- export declare function unmountIndividualLib(elementId: string): void;
7
+ export declare function unmountIndividualLib(elementId: string, unmountTimeout?: number): void;
@@ -17,9 +17,9 @@ import AnimationFlow from '../../components/AnimationFlow';
17
17
  import { store } from '../../app/store';
18
18
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
19
19
  import Collapse from '../../components/Collapse';
20
- import { getParameterByName, reactElement } from '../../utils';
20
+ import { getParameterByName, reactElement, removeElement } from '../../utils';
21
21
  import { FeatureContainer } from '../shared/Containers';
22
- import { INDIVIDUAL_SCREENS_NAVIGATION } from '../../constants';
22
+ import { DIALOG_ID, INDIVIDUAL_SCREENS_NAVIGATION } from '../../constants';
23
23
  import { individualFeatureScreens } from '../featuresScreens';
24
24
  import { individualSelector, verifyLeadToken } from '../app/individual/individualStore';
25
25
  import CustomFooter from '../shared/Footer';
@@ -28,7 +28,7 @@ var Individual = memo(function (props) {
28
28
  var theme = useAppTheme().theme;
29
29
  var dispatch = useAppDispatch();
30
30
  var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
31
- var _b = useAppSelector(individualSelector), customLoading = _b.customLoading, individualError = _b.error;
31
+ var _b = useAppSelector(individualSelector), customLoading = _b.customLoading, individualError = _b.error, loading = _b.loading;
32
32
  useAppConfig(__assign({ navigation: INDIVIDUAL_SCREENS_NAVIGATION }, props));
33
33
  useErrorListener(individualError || error);
34
34
  useStepStartedListener();
@@ -43,10 +43,10 @@ var Individual = memo(function (props) {
43
43
  dispatch(verifyLeadToken(token));
44
44
  };
45
45
  useEffect(function () {
46
- if (!settingLoading)
46
+ if (!settingLoading && open)
47
47
  verifyToken();
48
48
  }, [settingLoading]);
49
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: individualFeatureScreens.map(function (_a, index) {
49
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: individualFeatureScreens.map(function (_a, index) {
50
50
  var Element = _a.element, name = _a.name;
51
51
  var isActive = activeScreen.name === name;
52
52
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -58,6 +58,13 @@ export function IndividualLib(props) {
58
58
  export function renderIndividualLib(config, elementId) {
59
59
  reactElement(elementId).render(_jsx(IndividualLib, __assign({}, config)));
60
60
  }
61
- export function unmountIndividualLib(elementId) {
62
- reactElement(elementId).unmount();
61
+ export function unmountIndividualLib(elementId, unmountTimeout) {
62
+ if (unmountTimeout === void 0) { unmountTimeout = 1000; }
63
+ var element = document.getElementById(elementId);
64
+ setTimeout(function () {
65
+ var _a;
66
+ ((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
67
+ removeElement(DIALOG_ID);
68
+ elementId && reactElement(elementId).unmount();
69
+ }, unmountTimeout);
63
70
  }
@@ -55,7 +55,7 @@ var AdditionalIndividualInfo = function (_a) {
55
55
  var _e = React.useState(false), employerFieldsActive = _e[0], setEmployerFieldsActive = _e[1];
56
56
  React.useEffect(function () {
57
57
  var _a, _b;
58
- if (((_b = (_a = methods.getValues('sourceIncome')) === null || _a === void 0 ? void 0 : _a.name_en) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'salary')
58
+ if (((_b = (_a = methods.getValues('sourceIncome')) === null || _a === void 0 ? void 0 : _a.name.en) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'salary')
59
59
  setEmployerFieldsActive(true);
60
60
  else {
61
61
  setEmployerFieldsActive(false);
@@ -35,6 +35,7 @@ import { individualSelector } from '../../../app/individual/individualStore';
35
35
  import Text from '../../../../components/Text';
36
36
  import ExpandIcon from '../../../../components/ExpandIcon';
37
37
  import SimpleList from '../../../../components/SimpleList';
38
+ import Search from '../../../../features/shared/Search';
38
39
  var Container = styled(Box)(function () { return ({
39
40
  display: 'flex'
40
41
  }); });
@@ -75,15 +76,26 @@ var MonthlyIncome = function (_a) {
75
76
  var _a;
76
77
  setAnchorEl(null);
77
78
  (_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
79
+ if ((monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.length) > 0) {
80
+ setIncomeList(monthlyIncomeList);
81
+ }
78
82
  };
79
83
  var onSelectItem = function (source) {
80
84
  onCloseList();
81
85
  monthlyIncomeControl.field.onChange(source);
82
86
  };
87
+ var handleSearch = function (value) {
88
+ var filteredList = monthlyIncomeList === null || monthlyIncomeList === void 0 ? void 0 : monthlyIncomeList.filter(function (income) {
89
+ var _a, _b, _c, _d;
90
+ return ((_b = (_a = income === null || income === void 0 ? void 0 : income.range) === null || _a === void 0 ? void 0 : _a.en) === null || _b === void 0 ? void 0 : _b.replace(',', '').toLowerCase().includes(value.toLowerCase())) ||
91
+ ((_d = (_c = income === null || income === void 0 ? void 0 : income.range) === null || _c === void 0 ? void 0 : _c.ar) === null || _d === void 0 ? void 0 : _d.replace(',', '').toLowerCase().includes(value.toLowerCase()));
92
+ });
93
+ setIncomeList(filteredList);
94
+ };
83
95
  var income = monthlyIncomeControl.field.value;
84
96
  var error = (_b = monthlyIncomeControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
85
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(Input, { label: t('please_enter_actual_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.name_ar : income === null || income === void 0 ? void 0 : income.name_en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name_en', list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
86
- return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (income === null || income === void 0 ? void 0 : income.id) }, { children: isAr ? item.name_ar : item === null || item === void 0 ? void 0 : item.name_en })) }), item.id === (income === null || income === void 0 ? void 0 : income.id) && _jsx(CheckIconStyled, {})] }));
87
- } }) }))] })) })));
97
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(Input, { label: t('please_enter_actual_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleList, { searchKeyPath: 'range.en', list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
98
+ return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (income === null || income === void 0 ? void 0 : income.id) }, { children: isAr ? item.range.ar : item === null || item === void 0 ? void 0 : item.range.en })) }), item.id === (income === null || income === void 0 ? void 0 : income.id) && _jsx(CheckIconStyled, {})] }));
99
+ } })] }))] })) })));
88
100
  };
89
101
  export default React.memo(MonthlyIncome);
@@ -35,6 +35,7 @@ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
35
35
  import Input from '../../../shared/Input';
36
36
  import ExpandIcon from '../../../../components/ExpandIcon';
37
37
  import SimpleList from '../../../../components/SimpleList';
38
+ import Search from '../../../../features/shared/Search';
38
39
  var Container = styled(Box)(function () { return ({
39
40
  display: 'flex'
40
41
  }); });
@@ -80,10 +81,17 @@ var Occupation = function (_a) {
80
81
  onCloseList();
81
82
  occupationControl.field.onChange(occupation);
82
83
  };
84
+ var handleSearch = function (value) {
85
+ var filteredList = occupationsList === null || occupationsList === void 0 ? void 0 : occupationsList.filter(function (occupation) {
86
+ return occupation.name.en.toLowerCase().includes(value.toLowerCase()) ||
87
+ occupation.name.ar.toLowerCase().includes(value.toLowerCase());
88
+ });
89
+ setOccupationList(filteredList);
90
+ };
83
91
  var occupation = occupationControl.field.value;
84
92
  var error = (_c = occupationControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
85
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('occupation_title'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_occupation'), value: (isAr ? occupation === null || occupation === void 0 ? void 0 : occupation.name_ar : occupation === null || occupation === void 0 ? void 0 : occupation.name_en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name_en', list: occupationList, onSelectItem: onSelectItem, renderItem: function (item) {
86
- return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.id) }, { children: isAr ? item.name_ar : item === null || item === void 0 ? void 0 : item.name_en })) }), item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.id) && _jsx(CheckIconStyled, {})] }));
87
- } }) }))] })) })));
93
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('occupation_title'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_occupation'), value: (isAr ? occupation === null || occupation === void 0 ? void 0 : occupation.name.ar : occupation === null || occupation === void 0 ? void 0 : occupation.name.en) || '', warningMessage: error && t(error) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleList, { searchKeyPath: 'name.en', list: occupationList, onSelectItem: onSelectItem, renderItem: function (item) {
94
+ return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.id) }, { children: isAr ? item.name.ar : item === null || item === void 0 ? void 0 : item.name.en })) }), item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.id) && _jsx(CheckIconStyled, {})] }));
95
+ } })] }))] })) })));
88
96
  };
89
97
  export default Occupation;
@@ -82,8 +82,8 @@ var SourceOfIncome = function (_a) {
82
82
  };
83
83
  var source = sourceIncomeControl.field.value;
84
84
  var error = (_c = sourceIncomeControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
85
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('tap_js_source_of_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name_ar : source === null || source === void 0 ? void 0 : source.name_en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name_en', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
86
- return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.name_ar : item === null || item === void 0 ? void 0 : item.name_en })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIconStyled, {})] }));
85
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('tap_js_source_of_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name.ar : source === null || source === void 0 ? void 0 : source.name.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
86
+ return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.name.ar : item === null || item === void 0 ? void 0 : item.name.en })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIconStyled, {})] }));
87
87
  } }) }))] })) })));
88
88
  };
89
89
  export default React.memo(SourceOfIncome);
@@ -16,7 +16,7 @@ import { styled } from '@mui/material/styles';
16
16
  import { FlowsButtons } from '../../../shared/Button';
17
17
  import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
18
18
  import { useAppSelector, useLanguage } from '../../../../hooks';
19
- import { getResetFlowUrl, showLastFour } from '../../../../utils';
19
+ import { concatenateObjectValues, getResetFlowUrl, showLastFour } from '../../../../utils';
20
20
  import { individualSelector } from '../../../app/individual/individualStore';
21
21
  import Box from '@mui/material/Box';
22
22
  import Text from '../../../../components/Text';
@@ -44,23 +44,27 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
44
44
  });
45
45
  });
46
46
  var SuccessWithFlowButtons = function () {
47
- var _a, _b, _c;
47
+ var _a, _b, _c, _d;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
50
  var data = useAppSelector(individualSelector).data;
51
- var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id;
52
- var _e = useState([]), buttons = _e[0], setButtons = _e[1];
53
- var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
51
+ var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank_account, merchant = _e.merchant, user = _e.user;
52
+ var _f = useState([]), buttons = _f[0], setButtons = _f[1];
53
+ var _g = nameObj || {}, en = _g.en, ar = _g.ar;
54
+ var username = isAr
55
+ ? concatenateObjectValues(ar || en, ['first', 'last'])
56
+ : concatenateObjectValues(en, ['first', 'last']);
54
57
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
55
58
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
56
59
  var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
57
- var taxID = (entity === null || entity === void 0 ? void 0 : entity.tax_number) || '';
60
+ var taxID = (entity === null || entity === void 0 ? void 0 : entity.vat_id) || '';
58
61
  var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
59
62
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
63
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
- var maskedId = !!identification_id ? " ".concat(t('masking_symbols')).concat(identification_id) : '';
64
+ var identification = (user || {}).identification;
65
+ var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
62
66
  var settings = useAppSelector(settingsSelector);
63
- var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
67
+ var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
64
68
  var email = (contact || { email: '' }).email;
65
69
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
66
70
  var reMapFlowData = function (flows) {
@@ -47,9 +47,9 @@ var FormStyled = styled(Form)(function () { return ({
47
47
  flexDirection: 'column'
48
48
  }); });
49
49
  var VerifyNumber = function (_a) {
50
- var _b, _c, _d;
50
+ var _b, _c;
51
51
  var dispatch = useAppDispatch();
52
- var _e = useAppSelector(individualSelector), data = _e.data, loading = _e.loading, error = _e.error;
52
+ var _d = useAppSelector(individualSelector), data = _d.data, loading = _d.loading, error = _d.error;
53
53
  var methods = useForm({
54
54
  resolver: yupResolver(OTPValidation),
55
55
  defaultValues: data.otpData,
@@ -57,8 +57,8 @@ var VerifyNumber = function (_a) {
57
57
  });
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
- var _f = React.useState(false), resendLoading = _f[0], setResendLoading = _f[1];
61
- var phone = (_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number;
60
+ var _e = React.useState(false), resendLoading = _e[0], setResendLoading = _e[1];
61
+ var phone = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.verification_by) === null || _c === void 0 ? void 0 : _c.sent_to;
62
62
  React.useEffect(function () {
63
63
  if (error && methods.formState.isValid && phone)
64
64
  dispatch(clearError());
@@ -4,4 +4,4 @@ export interface PasswordLibProps extends LibConfig {
4
4
  }
5
5
  export declare function PasswordLib(props: PasswordLibProps): JSX.Element;
6
6
  export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): void;
7
- export declare function unmountPasswordLib(elementId: string): void;
7
+ export declare function unmountPasswordLib(elementId: string, unmountTimeout?: number): void;
@@ -18,8 +18,8 @@ import { store } from '../../app/store';
18
18
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
19
19
  import Collapse from '../../components/Collapse';
20
20
  import { FeatureContainer } from '../shared/Containers';
21
- import { getParameterByName, reactElement } from '../../utils';
22
- import { PASSWORD_OPERATION_TYPE, PASSWORD_SCREENS_NAVIGATION } from '../../constants';
21
+ import { getParameterByName, reactElement, removeElement } from '../../utils';
22
+ import { DIALOG_ID, PASSWORD_OPERATION_TYPE, PASSWORD_SCREENS_NAVIGATION } from '../../constants';
23
23
  import { passwordFeatureScreens } from '../featuresScreens';
24
24
  import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
25
25
  import CustomFooter from '../shared/Footer';
@@ -28,7 +28,7 @@ var Password = memo(function (props) {
28
28
  var theme = useAppTheme().theme;
29
29
  var dispatch = useAppDispatch();
30
30
  var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
31
- var _b = useAppSelector(passwordSelector), customLoading = _b.customLoading, passwordError = _b.error;
31
+ var _b = useAppSelector(passwordSelector), customLoading = _b.customLoading, passwordError = _b.error, loading = _b.loading;
32
32
  useAppConfig(__assign({ navigation: PASSWORD_SCREENS_NAVIGATION }, props));
33
33
  useErrorListener(passwordError || error);
34
34
  useStepStartedListener();
@@ -50,10 +50,10 @@ var Password = memo(function (props) {
50
50
  dispatch(verifyLeadToken(token));
51
51
  };
52
52
  useEffect(function () {
53
- if (!settingLoading)
53
+ if (!settingLoading && open)
54
54
  verifyToken();
55
55
  }, [settingLoading]);
56
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: passwordFeatureScreens.map(function (_a, index) {
56
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: passwordFeatureScreens.map(function (_a, index) {
57
57
  var Element = _a.element, name = _a.name;
58
58
  var isActive = activeScreen.name === name;
59
59
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -65,6 +65,13 @@ export function PasswordLib(props) {
65
65
  export function renderPasswordLib(config, elementId) {
66
66
  reactElement(elementId).render(_jsx(PasswordLib, __assign({}, config)));
67
67
  }
68
- export function unmountPasswordLib(elementId) {
69
- reactElement(elementId).unmount();
68
+ export function unmountPasswordLib(elementId, unmountTimeout) {
69
+ if (unmountTimeout === void 0) { unmountTimeout = 1000; }
70
+ var element = document.getElementById(elementId);
71
+ setTimeout(function () {
72
+ var _a;
73
+ ((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
74
+ removeElement(DIALOG_ID);
75
+ elementId && reactElement(elementId).unmount();
76
+ }, unmountTimeout);
70
77
  }
@@ -16,7 +16,7 @@ import { styled } from '@mui/material/styles';
16
16
  import { FlowsButtons } from '../../../shared/Button';
17
17
  import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
18
18
  import { useAppSelector, useLanguage } from '../../../../hooks';
19
- import { getResetFlowUrl, showLastFour } from '../../../../utils';
19
+ import { getResetFlowUrl, showLastFour, concatenateObjectValues } from '../../../../utils';
20
20
  import { passwordSelector } from '../../../app/password/passwordStore';
21
21
  import Box from '@mui/material/Box';
22
22
  import Text from '../../../../components/Text';
@@ -44,24 +44,27 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
44
44
  });
45
45
  });
46
46
  var SuccessWithFlowButtons = function () {
47
- var _a, _b, _c;
47
+ var _a, _b, _c, _d;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
50
  var data = useAppSelector(passwordSelector).data;
51
- var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id;
52
- var _e = useState([]), buttons = _e[0], setButtons = _e[1];
53
- var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
51
+ var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank_account, merchant = _e.merchant, user = _e.user;
52
+ var _f = useState([]), buttons = _f[0], setButtons = _f[1];
53
+ var _g = nameObj || {}, en = _g.en, ar = _g.ar;
54
+ var username = isAr
55
+ ? concatenateObjectValues(ar || en, ['first', 'last'])
56
+ : concatenateObjectValues(en, ['first', 'last']);
54
57
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
55
58
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
56
59
  var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
57
- var taxID = (entity === null || entity === void 0 ? void 0 : entity.tax_number) || '';
60
+ var taxID = (entity === null || entity === void 0 ? void 0 : entity.vat_id) || '';
58
61
  var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
59
62
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
63
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
- var maskedId = !!identification_id ? " ".concat(t('masking_symbols')).concat(identification_id) : '';
62
- console.log(username);
64
+ var identification = user.identification;
65
+ var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
63
66
  var settings = useAppSelector(settingsSelector);
64
- var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
67
+ var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
65
68
  var email = (contact || { email: '' }).email;
66
69
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
67
70
  var reMapFlowData = function (flows) {
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
- declare type TapOrigin = {
3
- isTapOrigin: boolean;
4
- };
5
- interface BackgroundProps extends TapOrigin {
2
+ import { SxProps, Theme } from '@mui/material/styles';
3
+ interface BackgroundProps {
6
4
  children: React.ReactNode;
7
5
  loading?: boolean;
6
+ hideLogo?: boolean;
7
+ sx?: SxProps<Theme>;
8
+ open: boolean;
9
+ isTapOrigin: boolean;
8
10
  }
9
- declare const _default: React.MemoExoticComponent<({ children, isTapOrigin, loading }: BackgroundProps) => JSX.Element>;
11
+ declare const _default: React.MemoExoticComponent<({ children, isTapOrigin, loading, hideLogo, sx, open }: BackgroundProps) => JSX.Element>;
10
12
  export default _default;
@@ -14,17 +14,28 @@ import { memo } from 'react';
14
14
  import { styled } from '@mui/material/styles';
15
15
  import Box from '@mui/material/Box';
16
16
  import LogoBackground from './LogoBackground';
17
- var BackgroundStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
18
- var isTapOrigin = _a.isTapOrigin, theme = _a.theme;
17
+ import { BACKGROUND_ID } from '../../../constants';
18
+ import { useScreen } from '../../../hooks';
19
+ var BackgroundStyled = styled(Box, {
20
+ shouldForwardProp: function (prop) { return !['isTapOrigin', 'open', 'isSmall'].includes(prop); }
21
+ })(function (_a) {
22
+ var isTapOrigin = _a.isTapOrigin, open = _a.open, isSmall = _a.isSmall;
19
23
  return ({
20
24
  width: '100vw',
21
25
  height: '100vh',
22
- background: isTapOrigin ? 'linear-gradient(180deg, #98ABAF 0%, #D9D6CC 100%)' : 'rgba(0, 0, 0, 0.5)'
26
+ zIndex: isSmall ? 'auto' : 999,
27
+ position: 'absolute',
28
+ background: !open
29
+ ? 'inherit'
30
+ : isTapOrigin
31
+ ? 'linear-gradient(180deg, #98ABAF 0%, #D9D6CC 100%)'
32
+ : 'rgba(0, 0, 0, 0.5)'
23
33
  });
24
34
  });
25
35
  var Background = function (_a) {
26
- var children = _a.children, isTapOrigin = _a.isTapOrigin, loading = _a.loading;
36
+ var children = _a.children, isTapOrigin = _a.isTapOrigin, loading = _a.loading, hideLogo = _a.hideLogo, sx = _a.sx, open = _a.open;
27
37
  var showLogo = !loading && isTapOrigin;
28
- return (_jsxs(BackgroundStyled, __assign({ id: 'background', isTapOrigin: isTapOrigin }, { children: [showLogo && _jsx(LogoBackground, {}), children] })));
38
+ var small = useScreen().small;
39
+ return (_jsxs(BackgroundStyled, __assign({ id: BACKGROUND_ID, isSmall: small, isTapOrigin: isTapOrigin, sx: sx, open: open }, { children: [showLogo && !hideLogo && _jsx(LogoBackground, {}), children] })));
29
40
  };
30
41
  export default memo(Background);
@@ -8,6 +8,7 @@ export interface EmailProvidersButtonsProps extends ButtonProps {
8
8
  gmail: buttonProps;
9
9
  outlook: buttonProps;
10
10
  apple: buttonProps;
11
+ mail: buttonProps;
11
12
  }
12
- export default function EmailProvidersButtons({ gmail, outlook, apple }: EmailProvidersButtonsProps): JSX.Element;
13
+ export default function EmailProvidersButtons({ gmail, outlook, apple, mail }: EmailProvidersButtonsProps): JSX.Element;
13
14
  export {};
@@ -10,11 +10,13 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import React from 'react';
13
14
  import Button from '../../../components/Button';
14
15
  import { styled } from '@mui/material/styles';
15
16
  import Box from '@mui/material/Box';
16
17
  import Link from '@mui/material/Link';
17
18
  import { ICONS_NAMES } from '../../../constants';
19
+ import { getBrowserInfo } from '../../../utils';
18
20
  var Image = styled('img')(function (_a) {
19
21
  var theme = _a.theme;
20
22
  return ({
@@ -57,6 +59,9 @@ var AppleButtonStyled = styled(Button)(function (_a) {
57
59
  });
58
60
  });
59
61
  export default function EmailProvidersButtons(_a) {
60
- var gmail = _a.gmail, outlook = _a.outlook, apple = _a.apple;
61
- return (_jsxs(ButtonBoxStyled, { children: [_jsx(Link, __assign({ href: gmail.href, underline: 'none', target: '_blank' }, { children: _jsx(GMailButtonStyled, __assign({ variant: 'outlined', startIcon: _jsx(Image, { src: ICONS_NAMES.GMAIL_Filled_ICON, alt: gmail.title }), type: 'button' }, { children: gmail.title })) })), _jsx(Link, __assign({ href: apple.href, underline: 'none', target: '_blank' }, { children: _jsx(AppleButtonStyled, __assign({ variant: 'outlined', startIcon: _jsx(Image, { src: ICONS_NAMES.Apple_Filled_ICON, alt: apple.title }), type: 'button' }, { children: apple.title })) })), _jsx(Link, __assign({ href: outlook.href, underline: 'none', target: '_blank' }, { children: _jsx(OutlookButtonStyled, __assign({ variant: 'outlined', startIcon: _jsx(Image, { src: ICONS_NAMES.outlook_Filled_ICON, alt: outlook.title }), type: 'button' }, { children: outlook.title })) }))] }));
62
+ var _b;
63
+ var gmail = _a.gmail, outlook = _a.outlook, apple = _a.apple, mail = _a.mail;
64
+ var os = getBrowserInfo().os;
65
+ var _c = React.useState(false), hoverApple = _c[0], setHoverApple = _c[1];
66
+ return (_jsxs(ButtonBoxStyled, { children: [_jsx(Link, __assign({ href: gmail.href, underline: 'none', target: '_blank' }, { children: _jsx(GMailButtonStyled, __assign({ variant: 'outlined', startIcon: _jsx(Image, { src: ICONS_NAMES.GMAIL_Filled_ICON, alt: gmail.title }), type: 'button' }, { children: gmail.title })) })), ((_b = os === null || os === void 0 ? void 0 : os.name) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'windows' ? (_jsx(Link, __assign({ href: mail.href, underline: 'none', target: '_blank' }, { children: _jsx(OutlookButtonStyled, __assign({ variant: 'outlined', onMouseDown: function () { return setHoverApple(true); }, onMouseUp: function () { return setHoverApple(false); }, startIcon: _jsx(Image, { src: ICONS_NAMES.Mail_Filled_icon, alt: outlook.title }), type: 'button' }, { children: mail.title })) }))) : (_jsx(Link, __assign({ href: apple.href, underline: 'none', target: '_blank' }, { children: _jsx(AppleButtonStyled, __assign({ variant: 'outlined', onMouseEnter: function () { return setHoverApple(true); }, onMouseLeave: function () { return setHoverApple(false); }, startIcon: _jsx(Image, { src: hoverApple ? ICONS_NAMES.apple_white_icon : ICONS_NAMES.Apple_Filled_ICON, alt: apple.title }), type: 'button' }, { children: apple.title })) }))), _jsx(Link, __assign({ href: outlook.href, underline: 'none', target: '_blank' }, { children: _jsx(OutlookButtonStyled, __assign({ variant: 'outlined', startIcon: _jsx(Image, { src: ICONS_NAMES.outlook_Filled_ICON, alt: outlook.title }), type: 'button' }, { children: outlook.title })) }))] }));
62
67
  }
@@ -3,6 +3,7 @@ import { ButtonProps } from '../../../components/Button';
3
3
  interface MobileButtonProps extends ButtonProps {
4
4
  loading?: boolean;
5
5
  hideIcon?: boolean;
6
+ icon?: string;
6
7
  }
7
- export default function MobileButton({ children, hideIcon, disabled, ...props }: MobileButtonProps): JSX.Element;
8
+ export default function MobileButton({ children, hideIcon, icon, disabled, ...props }: MobileButtonProps): JSX.Element;
8
9
  export {};
@@ -39,6 +39,6 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
39
39
  });
40
40
  });
41
41
  export default function MobileButton(_a) {
42
- var children = _a.children, hideIcon = _a.hideIcon, disabled = _a.disabled, props = __rest(_a, ["children", "hideIcon", "disabled"]);
43
- return (_jsx(ButtonBoxStyled, { children: _jsx(Button, __assign({ disabled: disabled, type: 'button', variant: 'outlined', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.MOBILE_ICON }) }, props, { children: children })) }));
42
+ var children = _a.children, hideIcon = _a.hideIcon, icon = _a.icon, disabled = _a.disabled, props = __rest(_a, ["children", "hideIcon", "icon", "disabled"]);
43
+ return (_jsx(ButtonBoxStyled, { children: _jsx(Button, __assign({ disabled: disabled, type: 'button', variant: 'outlined', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: !!icon ? icon : ICONS_NAMES.MOBILE_ICON }) }, props, { children: children })) }));
44
44
  }
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ interface CloseDialogStyledProps {
3
+ message?: string;
4
+ confirmTitle: string;
5
+ closeTitle: string;
6
+ open: boolean;
7
+ onConfirm?: () => void;
8
+ onCancel?: () => void;
9
+ }
10
+ export default function CloseDialog({ message, confirmTitle, closeTitle, open, onConfirm, onCancel }: CloseDialogStyledProps): JSX.Element;
11
+ export {};