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

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 (556) hide show
  1. package/build/@types/app.d.ts +44 -4
  2. package/build/@types/app.js +16 -0
  3. package/build/@types/config.d.ts +14 -0
  4. package/build/@types/form.d.ts +11 -1
  5. package/build/@types/redux.d.ts +1 -0
  6. package/build/api/account.d.ts +4 -1
  7. package/build/api/account.js +15 -1
  8. package/build/api/auth.d.ts +35 -20
  9. package/build/api/auth.js +1 -1
  10. package/build/api/axios.js +1 -2
  11. package/build/api/data.d.ts +4 -17
  12. package/build/api/data.js +5 -45
  13. package/build/api/entity.d.ts +3 -2
  14. package/build/api/entity.js +12 -4
  15. package/build/api/firebase.js +68 -8
  16. package/build/api/index.d.ts +14 -25
  17. package/build/api/lead.d.ts +16 -3
  18. package/build/api/lead.js +16 -0
  19. package/build/api/user.d.ts +7 -0
  20. package/build/api/user.js +9 -1
  21. package/build/app/rootReducer.d.ts +1 -0
  22. package/build/app/rootReducer.js +3 -1
  23. package/build/app/settings.d.ts +2 -1
  24. package/build/app/settings.js +51 -21
  25. package/build/app/store.d.ts +2 -0
  26. package/build/assets/locales/ar.json +353 -151
  27. package/build/assets/locales/en.json +349 -150
  28. package/build/components/AnimationFlow/AnimationFlow.d.ts +9 -5
  29. package/build/components/AnimationFlow/AnimationFlow.js +5 -5
  30. package/build/components/AnimationFlow/BottomSheet.d.ts +5 -2
  31. package/build/components/AnimationFlow/BottomSheet.js +43 -14
  32. package/build/components/AnimationFlow/Dialog.d.ts +4 -3
  33. package/build/components/AnimationFlow/Dialog.js +5 -3
  34. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
  35. package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
  36. package/build/components/ArabicDatePicker/style.css +32 -3
  37. package/build/components/DatePicker/DatePicker.d.ts +1 -1
  38. package/build/components/DatePicker/DatePicker.js +2 -2
  39. package/build/components/Footer/Footer.js +2 -1
  40. package/build/components/Input/Input.js +1 -1
  41. package/build/components/Providers/ThemeProvider.js +3 -3
  42. package/build/components/Tooltip/Tooltip.js +1 -1
  43. package/build/constants/api.d.ts +5 -7
  44. package/build/constants/api.js +11 -15
  45. package/build/constants/app.d.ts +39 -0
  46. package/build/constants/app.js +345 -35
  47. package/build/constants/assets.d.ts +3 -0
  48. package/build/constants/assets.js +4 -1
  49. package/build/constants/dummy.d.ts +4 -219
  50. package/build/constants/dummy.js +64 -6194
  51. package/build/constants/flows.d.ts +26 -0
  52. package/build/constants/flows.js +27 -0
  53. package/build/constants/index.d.ts +1 -0
  54. package/build/constants/index.js +1 -0
  55. package/build/constants/validation.d.ts +2 -0
  56. package/build/constants/validation.js +2 -0
  57. package/build/features/app/auth/authStore.d.ts +74 -8
  58. package/build/features/app/auth/authStore.js +495 -149
  59. package/build/features/app/bank/bankStore.d.ts +13 -18
  60. package/build/features/app/bank/bankStore.js +186 -153
  61. package/build/features/app/board/boardStore.d.ts +5 -1
  62. package/build/features/app/board/boardStore.js +82 -51
  63. package/build/features/app/brand/brandStore.d.ts +17 -33
  64. package/build/features/app/brand/brandStore.js +254 -257
  65. package/build/features/app/business/businessStore.d.ts +64 -15
  66. package/build/features/app/business/businessStore.js +442 -234
  67. package/build/features/app/connect/connectStore.d.ts +69 -14
  68. package/build/features/app/connect/connectStore.js +355 -120
  69. package/build/features/app/connectExpress/connectExpressStore.d.ts +89 -45
  70. package/build/features/app/connectExpress/connectExpressStore.js +668 -375
  71. package/build/features/app/entity/entityStore.d.ts +20 -36
  72. package/build/features/app/entity/entityStore.js +204 -238
  73. package/build/features/app/individual/individualStore.d.ts +18 -34
  74. package/build/features/app/individual/individualStore.js +269 -292
  75. package/build/features/app/kyc/kycStore.d.ts +121 -0
  76. package/build/features/app/kyc/kycStore.js +432 -0
  77. package/build/features/app/password/passwordStore.d.ts +42 -18
  78. package/build/features/app/password/passwordStore.js +260 -219
  79. package/build/features/app/signIn/signInStore.js +19 -15
  80. package/build/features/app/tax/taxStore.d.ts +13 -7
  81. package/build/features/app/tax/taxStore.js +170 -136
  82. package/build/features/auth/Auth.d.ts +5 -6
  83. package/build/features/auth/Auth.js +40 -15
  84. package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +2 -5
  85. package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
  86. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -0
  87. package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
  88. package/build/features/auth/screens/AuthSwitch/index.js +2 -0
  89. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +2 -8
  90. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -26
  91. package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +2 -2
  92. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +8 -2
  93. package/build/features/auth/screens/CivilID/CivilID.js +4 -35
  94. package/build/features/auth/screens/{NID → DOB}/DOB.js +3 -3
  95. package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
  96. package/build/features/auth/screens/DOB/DOBForm.js +59 -0
  97. package/build/features/auth/screens/DOB/index.d.ts +3 -0
  98. package/build/features/auth/screens/DOB/index.js +2 -0
  99. package/build/features/{business/screens/OTP → auth/screens/DOB}/validation.d.ts +4 -4
  100. package/build/features/auth/screens/DOB/validation.js +4 -0
  101. package/build/features/auth/screens/Email/Email.d.ts +5 -0
  102. package/build/features/auth/screens/Email/Email.js +57 -0
  103. package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
  104. package/build/features/auth/screens/Email/EmailField.js +52 -0
  105. package/build/features/auth/screens/Email/index.d.ts +3 -0
  106. package/build/features/auth/screens/Email/index.js +2 -0
  107. package/build/features/auth/screens/Email/validation.d.ts +8 -0
  108. package/build/features/auth/screens/Email/validation.js +4 -0
  109. package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
  110. package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
  111. package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
  112. package/build/features/auth/screens/EmailSent/index.js +2 -0
  113. package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
  114. package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
  115. package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
  116. package/build/features/auth/screens/MigratingData/index.js +2 -0
  117. package/build/features/auth/screens/Mobile/Mobile.js +6 -38
  118. package/build/features/auth/screens/Mobile/MobileNumber.js +13 -15
  119. package/build/features/auth/screens/Mobile/validation.js +11 -3
  120. package/build/features/auth/screens/NID/IDNumber.js +1 -1
  121. package/build/features/auth/screens/NID/NID.js +7 -43
  122. package/build/features/auth/screens/NID/validation.d.ts +0 -3
  123. package/build/features/auth/screens/NID/validation.js +0 -1
  124. package/build/features/auth/screens/OTP/OTP.js +41 -10
  125. package/build/features/auth/screens/OTP/OTPInput.js +23 -6
  126. package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
  127. package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
  128. package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
  129. package/build/features/auth/screens/OperatorError/index.js +2 -0
  130. package/build/features/auth/screens/Password/Password.d.ts +5 -0
  131. package/build/features/auth/screens/Password/Password.js +61 -0
  132. package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
  133. package/build/features/auth/screens/Password/PasswordField.js +28 -0
  134. package/build/features/auth/screens/Password/index.d.ts +3 -0
  135. package/build/features/auth/screens/Password/index.js +2 -0
  136. package/build/features/auth/screens/Password/validation.d.ts +8 -0
  137. package/build/features/auth/screens/Password/validation.js +4 -0
  138. package/build/features/auth/screens/PreparingData/PreparingData.js +3 -0
  139. package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
  140. package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
  141. package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
  142. package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
  143. package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  144. package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
  145. package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
  146. package/build/features/auth/screens/VerifyNafath/index.js +2 -0
  147. package/build/features/bank/Bank.d.ts +5 -1
  148. package/build/features/bank/Bank.js +22 -9
  149. package/build/features/bank/screens/BankDetails/BankDetails.js +20 -6
  150. package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
  151. package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
  152. package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
  153. package/build/features/bank/screens/OperatorError/index.js +2 -0
  154. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  155. package/build/features/bank/screens/Verify/Verify.js +7 -6
  156. package/build/features/board/Board.d.ts +2 -0
  157. package/build/features/board/Board.js +24 -13
  158. package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
  159. package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
  160. package/build/features/board/screens/OperatorError/index.d.ts +3 -0
  161. package/build/features/board/screens/OperatorError/index.js +2 -0
  162. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  163. package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  164. package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
  165. package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
  166. package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -4
  167. package/build/features/board/screens/Verify/Verify.js +3 -2
  168. package/build/features/brand/Brand.d.ts +5 -1
  169. package/build/features/brand/Brand.js +22 -9
  170. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +8 -35
  171. package/build/features/brand/screens/BrandActivities/BrandActivities.js +48 -11
  172. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +3 -3
  173. package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
  174. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +6 -3
  175. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -18
  176. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
  177. package/build/features/brand/screens/BrandActivities/TAC.d.ts +2 -7
  178. package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
  179. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  180. package/build/features/brand/screens/BrandInfo/BrandInfo.js +26 -6
  181. package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
  182. package/build/features/brand/screens/BrandInfo/validation.js +2 -2
  183. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +22 -6
  184. package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
  185. package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
  186. package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
  187. package/build/features/brand/screens/OperatorError/index.js +2 -0
  188. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  189. package/build/features/brand/screens/Verify/Verify.js +3 -2
  190. package/build/features/business/Business.js +20 -12
  191. package/build/features/business/screens/Activities/Activities.js +26 -9
  192. package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
  193. package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
  194. package/build/features/business/screens/Activities/OperationStartDate.d.ts +4 -2
  195. package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
  196. package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
  197. package/build/features/business/screens/BusinessType/BusinessType.js +11 -3
  198. package/build/features/business/screens/BusinessType/LicenseNumber.js +3 -3
  199. package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -26
  200. package/build/features/business/screens/Customers/CustomerLocations.d.ts +12 -37
  201. package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
  202. package/build/features/business/screens/Customers/Customers.js +50 -10
  203. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
  204. package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
  205. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
  206. package/build/features/business/screens/Customers/ExpectedSalesRange.js +11 -5
  207. package/build/features/business/screens/Customers/RefundPolicy.d.ts +13 -19
  208. package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
  209. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
  210. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
  211. package/build/features/business/screens/Customers/validation.d.ts +6 -6
  212. package/build/features/business/screens/Customers/validation.js +3 -8
  213. package/build/features/business/screens/DOB/DOB.d.ts +6 -0
  214. package/build/features/business/screens/DOB/DOB.js +45 -0
  215. package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
  216. package/build/features/business/screens/DOB/DOBForm.js +72 -0
  217. package/build/features/business/screens/DOB/index.d.ts +3 -0
  218. package/build/features/business/screens/DOB/index.js +2 -0
  219. package/build/features/{connectExpress/screens/IdentityOTP → business/screens/DOB}/validation.d.ts +4 -4
  220. package/build/features/business/screens/DOB/validation.js +4 -0
  221. package/build/features/business/screens/IDBOD/IDBOD.js +10 -2
  222. package/build/features/business/screens/IDBOD/validation.d.ts +0 -3
  223. package/build/features/business/screens/IDBOD/validation.js +0 -1
  224. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +2 -0
  225. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +103 -0
  226. package/build/features/{connectExpress/screens/IdentityOTP/OTP.d.ts → business/screens/MobileOwnership/MobileNumber.d.ts} +0 -2
  227. package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
  228. package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
  229. package/build/features/business/screens/MobileOwnership/index.js +2 -0
  230. package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
  231. package/build/features/business/screens/MobileOwnership/validation.js +38 -0
  232. package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
  233. package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
  234. package/build/features/business/screens/OperatorError/index.d.ts +3 -0
  235. package/build/features/business/screens/OperatorError/index.js +2 -0
  236. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
  237. package/build/features/business/screens/Verify/Verify.js +15 -4
  238. package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  239. package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
  240. package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
  241. package/build/features/business/screens/VerifyNafath/index.js +2 -0
  242. package/build/features/connect/Connect.d.ts +5 -1
  243. package/build/features/connect/Connect.js +16 -9
  244. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
  245. package/build/features/connect/screens/CivilID/CivilID.js +6 -1
  246. package/build/features/connect/screens/DOB/DOB.d.ts +5 -0
  247. package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
  248. package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
  249. package/build/features/connect/screens/DOB/DOBForm.js +59 -0
  250. package/build/features/connect/screens/DOB/index.d.ts +3 -0
  251. package/build/features/connect/screens/DOB/index.js +2 -0
  252. package/build/features/connect/screens/DOB/validation.d.ts +8 -0
  253. package/build/features/connect/screens/DOB/validation.js +4 -0
  254. package/build/features/connect/screens/Individual/Email.js +1 -3
  255. package/build/features/connect/screens/Individual/Individual.js +11 -5
  256. package/build/features/connect/screens/Individual/MobileNumber.js +8 -7
  257. package/build/features/connect/screens/Individual/validation.js +11 -3
  258. package/build/features/connect/screens/Merchant/BrandName.js +5 -2
  259. package/build/features/connect/screens/Merchant/validation.js +2 -2
  260. package/build/features/connect/screens/Mobile/Mobile.js +12 -9
  261. package/build/features/connect/screens/Mobile/MobileNumber.js +8 -7
  262. package/build/features/connect/screens/Mobile/validation.js +11 -3
  263. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +2 -0
  264. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +104 -0
  265. package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  266. package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
  267. package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
  268. package/build/features/connect/screens/MobileOwnership/index.js +2 -0
  269. package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
  270. package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
  271. package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
  272. package/build/features/connect/screens/NID/IDNumber.js +2 -2
  273. package/build/features/connect/screens/NID/NID.js +5 -11
  274. package/build/features/connect/screens/NID/validation.d.ts +0 -3
  275. package/build/features/connect/screens/NID/validation.js +0 -1
  276. package/build/features/connect/screens/OTP/OTP.js +6 -6
  277. package/build/features/connect/screens/OTP/OTPInput.js +3 -11
  278. package/build/features/connect/screens/OperatorError/OperatorError.js +1 -1
  279. package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  280. package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
  281. package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
  282. package/build/features/connect/screens/VerifyNafath/index.js +2 -0
  283. package/build/features/connectExpress/ConnectExpress.d.ts +5 -2
  284. package/build/features/connectExpress/ConnectExpress.js +62 -39
  285. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +4 -26
  286. package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +2 -2
  287. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
  288. package/build/features/connectExpress/screens/CivilID/CivilID.js +6 -1
  289. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
  290. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +8 -1
  291. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
  292. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -26
  293. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +2 -7
  294. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +2 -2
  295. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +30 -7
  296. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +1 -3
  297. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +9 -8
  298. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +11 -3
  299. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
  300. package/build/features/connectExpress/screens/DOB/DOB.d.ts +5 -0
  301. package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
  302. package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
  303. package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
  304. package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
  305. package/build/features/connectExpress/screens/DOB/index.js +2 -0
  306. package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
  307. package/build/features/connectExpress/screens/DOB/validation.js +4 -0
  308. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
  309. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
  310. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
  311. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
  312. package/build/features/connectExpress/screens/Mobile/Mobile.js +10 -3
  313. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +9 -8
  314. package/build/features/connectExpress/screens/Mobile/validation.js +21 -6
  315. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +2 -0
  316. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
  317. package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  318. package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
  319. package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
  320. package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
  321. package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
  322. package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
  323. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
  324. package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
  325. package/build/features/connectExpress/screens/NID/NID.js +10 -10
  326. package/build/features/connectExpress/screens/NID/TAC.d.ts +2 -7
  327. package/build/features/connectExpress/screens/NID/TAC.js +2 -2
  328. package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
  329. package/build/features/connectExpress/screens/NID/validation.js +0 -2
  330. package/build/features/connectExpress/screens/NIDMissed/NID.js +3 -3
  331. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +0 -3
  332. package/build/features/connectExpress/screens/NIDMissed/validation.js +0 -1
  333. package/build/features/connectExpress/screens/OTP/OTP.js +13 -15
  334. package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
  335. package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
  336. package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
  337. package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
  338. package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
  339. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
  340. package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
  341. package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
  342. package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
  343. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -3
  344. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  345. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +35 -0
  346. package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
  347. package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
  348. package/build/features/entity/Entity.d.ts +4 -1
  349. package/build/features/entity/Entity.js +22 -9
  350. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +2 -2
  351. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -4
  352. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +8 -4
  353. package/build/features/entity/screens/EntityCapital/EntityCapital.js +33 -9
  354. package/build/features/entity/screens/EntityName/EntityName.js +33 -15
  355. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -35
  356. package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
  357. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +1 -1
  358. package/build/features/entity/screens/EntityName/ExpiryDate.js +13 -8
  359. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +1 -1
  360. package/build/features/entity/screens/EntityName/IssuingDate.js +15 -8
  361. package/build/features/entity/screens/EntityName/LegalName.js +1 -13
  362. package/build/features/entity/screens/EntityName/LicenseNumber.js +6 -8
  363. package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
  364. package/build/features/entity/screens/EntityName/validation.d.ts +3 -3
  365. package/build/features/entity/screens/EntityName/validation.js +1 -10
  366. package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
  367. package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
  368. package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
  369. package/build/features/entity/screens/OperatorError/index.js +2 -0
  370. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  371. package/build/features/entity/screens/Verify/Verify.js +3 -2
  372. package/build/features/featuresScreens.d.ts +1 -0
  373. package/build/features/featuresScreens.js +211 -13
  374. package/build/features/individual/Individual.d.ts +4 -1
  375. package/build/features/individual/Individual.js +22 -9
  376. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
  377. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +44 -11
  378. package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +4 -26
  379. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
  380. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -26
  381. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +8 -3
  382. package/build/features/individual/screens/IndividualList/Email.js +2 -3
  383. package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
  384. package/build/features/individual/screens/IndividualList/IndividualList.js +21 -6
  385. package/build/features/individual/screens/IndividualList/MobileNumber.js +8 -10
  386. package/build/features/individual/screens/IndividualList/UserList.js +7 -7
  387. package/build/features/individual/screens/IndividualList/validation.js +11 -4
  388. package/build/features/individual/screens/IndividualPersonalInfo/Email.js +2 -4
  389. package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -26
  390. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
  391. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +76 -20
  392. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -5
  393. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +11 -3
  394. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +9 -11
  395. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +11 -3
  396. package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
  397. package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
  398. package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
  399. package/build/features/individual/screens/OperatorError/index.js +2 -0
  400. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  401. package/build/features/individual/screens/Verify/Verify.js +3 -2
  402. package/build/features/kyc/KYC.d.ts +10 -0
  403. package/build/features/kyc/KYC.js +99 -0
  404. package/build/features/kyc/index.d.ts +1 -0
  405. package/build/features/kyc/index.js +1 -0
  406. package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +5 -0
  407. package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.js +19 -0
  408. package/build/features/kyc/screens/AlreadySubmitted/index.d.ts +2 -0
  409. package/build/features/kyc/screens/AlreadySubmitted/index.js +2 -0
  410. package/build/features/kyc/screens/Loading/Loading.d.ts +4 -0
  411. package/build/features/kyc/screens/Loading/Loading.js +10 -0
  412. package/build/features/kyc/screens/Loading/index.d.ts +2 -0
  413. package/build/features/kyc/screens/Loading/index.js +2 -0
  414. package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +5 -0
  415. package/build/features/kyc/screens/OperatorError/OperatorError.js +9 -0
  416. package/build/features/kyc/screens/OperatorError/index.d.ts +2 -0
  417. package/build/features/kyc/screens/OperatorError/index.js +2 -0
  418. package/build/features/kyc/screens/Success/Success.d.ts +5 -0
  419. package/build/features/kyc/screens/Success/Success.js +32 -0
  420. package/build/features/kyc/screens/Success/index.d.ts +2 -0
  421. package/build/features/kyc/screens/Success/index.js +2 -0
  422. package/build/features/kyc/screens/Terms/Header.d.ts +6 -0
  423. package/build/features/kyc/screens/Terms/Header.js +36 -0
  424. package/build/features/kyc/screens/Terms/Terms.d.ts +4 -0
  425. package/build/features/kyc/screens/Terms/Terms.js +81 -0
  426. package/build/features/kyc/screens/Terms/index.d.ts +2 -0
  427. package/build/features/kyc/screens/Terms/index.js +2 -0
  428. package/build/features/kyc/screens/TokenError/TokenError.d.ts +5 -0
  429. package/build/features/kyc/screens/TokenError/TokenError.js +9 -0
  430. package/build/features/kyc/screens/TokenError/index.d.ts +2 -0
  431. package/build/features/kyc/screens/TokenError/index.js +2 -0
  432. package/build/features/kyc/screens/Users/Users.d.ts +3 -0
  433. package/build/features/kyc/screens/Users/Users.js +76 -0
  434. package/build/features/kyc/screens/Users/index.d.ts +2 -0
  435. package/build/features/kyc/screens/Users/index.js +2 -0
  436. package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  437. package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +45 -0
  438. package/build/features/kyc/screens/VerifyNafath/index.d.ts +3 -0
  439. package/build/features/kyc/screens/VerifyNafath/index.js +2 -0
  440. package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +5 -0
  441. package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +44 -0
  442. package/build/features/kyc/screens/VerifyPaci/index.d.ts +3 -0
  443. package/build/features/kyc/screens/VerifyPaci/index.js +2 -0
  444. package/build/features/password/Password.d.ts +4 -1
  445. package/build/features/password/Password.js +88 -31
  446. package/build/features/password/screens/CreatePassword/CreatePassword.js +10 -4
  447. package/build/features/password/screens/OTP/OTP.js +3 -3
  448. package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
  449. package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
  450. package/build/features/password/screens/OperatorError/index.d.ts +3 -0
  451. package/build/features/password/screens/OperatorError/index.js +2 -0
  452. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  453. package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  454. package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
  455. package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
  456. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  457. package/build/features/password/screens/Verify/Verify.js +7 -6
  458. package/build/features/shared/Address/CountryList.d.ts +7 -23
  459. package/build/features/shared/Address/InputSelect.d.ts +7 -23
  460. package/build/features/shared/Background/Background.js +1 -1
  461. package/build/features/shared/BusinessCountry/BusinessCountry.js +1 -1
  462. package/build/features/shared/Button/Button.js +3 -1
  463. package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
  464. package/build/features/shared/Button/FlowsButtons.js +18 -4
  465. package/build/features/shared/Button/NafathButton.d.ts +7 -0
  466. package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
  467. package/build/features/shared/Button/index.d.ts +2 -2
  468. package/build/features/shared/Button/index.js +2 -2
  469. package/build/features/shared/Calender/Calender.d.ts +2 -1
  470. package/build/features/shared/Calender/Calender.js +3 -3
  471. package/build/features/shared/Containers/FeatureContainer.d.ts +1 -0
  472. package/build/features/shared/Containers/FeatureContainer.js +5 -3
  473. package/build/features/shared/Dialog/DialogContainer.js +5 -4
  474. package/build/features/shared/Input/Input.d.ts +2 -2
  475. package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
  476. package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
  477. package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
  478. package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
  479. package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
  480. package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
  481. package/build/features/shared/NafathVerification/index.d.ts +2 -0
  482. package/build/features/shared/NafathVerification/index.js +2 -0
  483. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +6 -1
  484. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
  485. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  486. package/build/features/shared/UploadFile/FileUpload.d.ts +2 -7
  487. package/build/features/shared/UploadFile/UploadFile.d.ts +2 -7
  488. package/build/features/shared/UploadFile/UploadWrapper.d.ts +2 -7
  489. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +2 -7
  490. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +2 -7
  491. package/build/features/signIn/SignIn.js +18 -7
  492. package/build/features/signIn/screens/Mobile/MobileNumber.js +8 -7
  493. package/build/features/signIn/screens/Mobile/validation.js +11 -3
  494. package/build/features/signIn/screens/OTP/OTP.js +5 -4
  495. package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
  496. package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
  497. package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
  498. package/build/features/signIn/screens/OperatorError/index.js +2 -0
  499. package/build/features/tax/Tax.d.ts +4 -1
  500. package/build/features/tax/Tax.js +22 -9
  501. package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
  502. package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
  503. package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
  504. package/build/features/tax/screens/OperatorError/index.js +2 -0
  505. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
  506. package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -3
  507. package/build/features/tax/screens/Verify/Verify.js +7 -6
  508. package/build/hooks/index.d.ts +3 -0
  509. package/build/hooks/index.js +3 -0
  510. package/build/hooks/useAppConfig.d.ts +1 -1
  511. package/build/hooks/useAppConfig.js +4 -3
  512. package/build/hooks/useAppDispatch.d.ts +1 -0
  513. package/build/hooks/useAppTheme.js +4 -3
  514. package/build/hooks/useCountDown.d.ts +10 -0
  515. package/build/hooks/useCountDown.js +17 -0
  516. package/build/hooks/useFormDirtyCheck.d.ts +10 -0
  517. package/build/hooks/useFormDirtyCheck.js +66 -0
  518. package/build/hooks/useSanitizedTranslation.d.ts +2 -0
  519. package/build/hooks/useSanitizedTranslation.js +15 -0
  520. package/build/hooks/useVerifyToken.d.ts +4 -2
  521. package/build/hooks/useVerifyToken.js +9 -4
  522. package/build/index.css +360 -120
  523. package/build/index.d.ts +3 -2
  524. package/build/index.js +4 -2
  525. package/build/theme/components.js +7 -0
  526. package/build/theme/palette.js +2 -1
  527. package/build/theme/shadows.js +1 -1
  528. package/build/theme/theme.d.ts +1 -1
  529. package/build/theme/theme.js +2 -2
  530. package/build/utils/array.js +2 -2
  531. package/build/utils/common.d.ts +1 -0
  532. package/build/utils/common.js +16 -3
  533. package/build/utils/object.d.ts +1 -0
  534. package/build/utils/object.js +3 -0
  535. package/build/utils/string.d.ts +6 -2
  536. package/build/utils/string.js +28 -3
  537. package/build/utils/validation.d.ts +2 -0
  538. package/build/utils/validation.js +6 -0
  539. package/package.json +2 -2
  540. package/build/features/auth/screens/NID/DOB.d.ts +0 -6
  541. package/build/features/business/screens/OTP/OTP.d.ts +0 -8
  542. package/build/features/business/screens/OTP/OTP.js +0 -90
  543. package/build/features/business/screens/OTP/OTPInput.d.ts +0 -5
  544. package/build/features/business/screens/OTP/OTPInput.js +0 -49
  545. package/build/features/business/screens/OTP/index.d.ts +0 -3
  546. package/build/features/business/screens/OTP/index.js +0 -2
  547. package/build/features/business/screens/OTP/validation.js +0 -4
  548. package/build/features/connectExpress/screens/IdentityOTP/OTP.js +0 -87
  549. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +0 -5
  550. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +0 -54
  551. package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
  552. package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
  553. package/build/features/connectExpress/screens/IdentityOTP/validation.js +0 -4
  554. package/build/features/connectExpress/screens/NID/DOB.d.ts +0 -6
  555. package/build/features/shared/Button/AbsherButton.d.ts +0 -7
  556. /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { LanguageMode, DirectionMode } from '../@types';
3
3
  import { settingsSelector } from '../app/settings';
4
- import { isMobile } from 'react-device-detect';
4
+ import { isMobile, isTablet } from 'react-device-detect';
5
5
  import { useAppSelector } from './useAppSelector';
6
6
  import { appTheme } from '../theme';
7
7
  export var useAppTheme = function () {
@@ -9,7 +9,8 @@ export var useAppTheme = function () {
9
9
  var data = useAppSelector(settingsSelector).data;
10
10
  useEffect(function () {
11
11
  var dir = data.language === LanguageMode.AR ? DirectionMode.RTL : DirectionMode.LTR;
12
- setTheme(appTheme(data.skin, isMobile, dir));
13
- }, [data.skin, data.language, isMobile]);
12
+ var isSmallScreen = isMobile && !isTablet;
13
+ setTheme(appTheme(data.skin, dir, isSmallScreen));
14
+ }, [data.skin, data.language, isMobile, isTablet]);
14
15
  return { theme: theme };
15
16
  };
@@ -0,0 +1,10 @@
1
+ interface CountDownOptions {
2
+ end?: number;
3
+ start: number;
4
+ startTimer: boolean;
5
+ sleepMS?: number;
6
+ }
7
+ export declare const useCountDown: ({ end, start, startTimer, sleepMS }: CountDownOptions) => {
8
+ count: number;
9
+ };
10
+ export {};
@@ -0,0 +1,17 @@
1
+ import { useEffect, useState } from 'react';
2
+ export var useCountDown = function (_a) {
3
+ var _b = _a.end, end = _b === void 0 ? 0 : _b, start = _a.start, startTimer = _a.startTimer, _c = _a.sleepMS, sleepMS = _c === void 0 ? 0 : _c;
4
+ var _d = useState(start), count = _d[0], setCount = _d[1];
5
+ var decrement = function () {
6
+ setCount(count - 1);
7
+ };
8
+ useEffect(function () {
9
+ if (count === end || !startTimer)
10
+ return;
11
+ var timer = setTimeout(function () {
12
+ decrement();
13
+ }, sleepMS);
14
+ return function () { return clearTimeout(timer); };
15
+ }, [count, startTimer]);
16
+ return { count: count };
17
+ };
@@ -0,0 +1,10 @@
1
+ import { FieldValues, UseFormReturn } from 'react-hook-form';
2
+ type UseFormWithDirtyCheck = {
3
+ isDirty: boolean;
4
+ };
5
+ type CustomAttrProps = {
6
+ name: string;
7
+ keys: string[];
8
+ };
9
+ export declare const useFormDirtyCheck: <TFieldValues extends FieldValues>(method: UseFormReturn<TFieldValues, any, undefined>, backendData: TFieldValues, customAttrs?: CustomAttrProps[]) => UseFormWithDirtyCheck;
10
+ export {};
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+ import _ from 'lodash';
3
+ export var useFormDirtyCheck = function (method, backendData, customAttrs) {
4
+ var _a = React.useState(false), isDirty = _a[0], setIsDirty = _a[1];
5
+ var data = method.watch();
6
+ var isValidData = function (formValue, backendValue) {
7
+ if (_.isUndefined(formValue))
8
+ return false;
9
+ if (_.isArray(formValue) && formValue.length === 0)
10
+ return false;
11
+ if (_.isObject(formValue) && _.isEmpty(formValue))
12
+ return false;
13
+ if (formValue === '' && !backendValue)
14
+ return false;
15
+ return true;
16
+ };
17
+ var isArray = function (data, backendData) {
18
+ return backendData && data && _.isArray(backendData) && _.isArray(data);
19
+ };
20
+ var isObject = function (data, backendData) {
21
+ return backendData && data && _.isObject(data) && _.isObject(backendData);
22
+ };
23
+ var mapArrayOfObjectWithKeys = function (items, keys) {
24
+ return _.map(items, function (item) { return _.pick(item, keys); });
25
+ };
26
+ var mapObjectWithKeys = function (item, keys) {
27
+ return _.pick(item, keys);
28
+ };
29
+ var deepComparison = function (data, backendData, customAttrs) {
30
+ var _loop_1 = function (key) {
31
+ var formValue = data === null || data === void 0 ? void 0 : data[key];
32
+ var backEndValue = backendData === null || backendData === void 0 ? void 0 : backendData[key];
33
+ if (!isValidData(formValue, backEndValue))
34
+ return "continue";
35
+ var customAttr = customAttrs === null || customAttrs === void 0 ? void 0 : customAttrs.find(function (el) { return el.name === key; });
36
+ if (customAttr) {
37
+ var keys = customAttr.keys;
38
+ if (isArray(formValue, backEndValue)) {
39
+ formValue = mapArrayOfObjectWithKeys(formValue, keys);
40
+ backEndValue = mapArrayOfObjectWithKeys(backEndValue, keys);
41
+ if (formValue.length !== backEndValue.length)
42
+ return { value: true };
43
+ if (_.differenceWith(formValue, backEndValue, _.isEqual).length > 0)
44
+ return { value: true };
45
+ }
46
+ if (isObject(formValue, backEndValue)) {
47
+ formValue = mapObjectWithKeys(formValue, keys);
48
+ backEndValue = mapObjectWithKeys(backEndValue, keys);
49
+ }
50
+ }
51
+ if (!_.isEqual(formValue, backEndValue))
52
+ return { value: true };
53
+ };
54
+ for (var key in backendData) {
55
+ var state_1 = _loop_1(key);
56
+ if (typeof state_1 === "object")
57
+ return state_1.value;
58
+ }
59
+ return false;
60
+ };
61
+ React.useEffect(function () {
62
+ var isDirty = deepComparison(data, backendData, customAttrs);
63
+ setIsDirty(isDirty);
64
+ }, [data, backendData]);
65
+ return { isDirty: isDirty };
66
+ };
@@ -0,0 +1,2 @@
1
+ import { StringMap, TOptions } from 'i18next';
2
+ export declare const useSanitizedTranslation: () => (key: string, options?: string | TOptions<StringMap> | undefined) => string;
@@ -0,0 +1,15 @@
1
+ import { useCallback } from 'react';
2
+ import { useTranslation } from 'react-i18next';
3
+ export var useSanitizedTranslation = function () {
4
+ var t = useTranslation().t;
5
+ var sanitize = useCallback(function (key) {
6
+ if (!key)
7
+ return '';
8
+ return key.replace(/[$#[\].]/g, '');
9
+ }, []);
10
+ var sanitizedTranslate = useCallback(function (key, options) {
11
+ var sanitizedError = sanitize(key);
12
+ return t(sanitizedError, options);
13
+ }, [t, sanitize]);
14
+ return sanitizedTranslate;
15
+ };
@@ -1,5 +1,5 @@
1
1
  import { ScreenStepNavigation } from '../@types';
2
- interface VerifyLeadTokenProps {
2
+ export interface VerifyLeadTokenProps {
3
3
  token: string;
4
4
  isInternally?: boolean;
5
5
  }
@@ -8,9 +8,11 @@ interface IVerifyToken {
8
8
  internalToken?: string;
9
9
  open: boolean;
10
10
  settingLoading: boolean;
11
+ isValidOperator: boolean;
11
12
  navigation: ScreenStepNavigation[];
12
13
  loadingScreenName: string;
14
+ operatorErrorScreenName: string;
13
15
  mode?: 'popup' | 'page' | 'content';
14
16
  }
15
- export declare const useVerifyToken: ({ verify, internalToken, navigation, open, settingLoading, loadingScreenName, mode }: IVerifyToken) => void;
17
+ export declare const useVerifyToken: ({ verify, internalToken, navigation, open, settingLoading, loadingScreenName, mode, isValidOperator, operatorErrorScreenName }: IVerifyToken) => void;
16
18
  export {};
@@ -3,7 +3,7 @@ import { getParameterByName } from '../utils';
3
3
  import { useAppDispatch } from './useAppDispatch';
4
4
  import { useEffect } from 'react';
5
5
  export var useVerifyToken = function (_a) {
6
- var verify = _a.verify, internalToken = _a.internalToken, navigation = _a.navigation, open = _a.open, settingLoading = _a.settingLoading, loadingScreenName = _a.loadingScreenName, mode = _a.mode;
6
+ var verify = _a.verify, internalToken = _a.internalToken, navigation = _a.navigation, open = _a.open, settingLoading = _a.settingLoading, loadingScreenName = _a.loadingScreenName, mode = _a.mode, isValidOperator = _a.isValidOperator, operatorErrorScreenName = _a.operatorErrorScreenName;
7
7
  var dispatch = useAppDispatch();
8
8
  var verifyTokenFun = function () {
9
9
  var token = internalToken ? internalToken : getParameterByName('token');
@@ -15,9 +15,14 @@ export var useVerifyToken = function (_a) {
15
15
  dispatch(verify({ token: token, isInternally: !!internalToken }));
16
16
  };
17
17
  useEffect(function () {
18
- if (!settingLoading && open)
19
- verifyTokenFun();
20
- }, [settingLoading, open]);
18
+ if (settingLoading || !open)
19
+ return;
20
+ if (!isValidOperator) {
21
+ dispatch(handleCurrentActiveScreen(operatorErrorScreenName));
22
+ return;
23
+ }
24
+ verifyTokenFun();
25
+ }, [settingLoading, open, isValidOperator]);
21
26
  useEffect(function () {
22
27
  if (internalToken && open && mode !== 'content')
23
28
  dispatch(handleCurrentActiveScreen(loadingScreenName));
package/build/index.css CHANGED
@@ -3,138 +3,378 @@
3
3
  @import url('https://fonts.googleapis.com/icon?family=Material+Icons');
4
4
  @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');
5
5
  @import url('https://fonts.googleapis.com/css?family=Tajawal&display=swap');
6
+ /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
7
+
8
+ /* Document
9
+ ========================================================================== */
10
+ * {
11
+ word-break: normal;
12
+ }
13
+
14
+ *,
15
+ *::after,
16
+ *::before {
17
+ margin: 0;
18
+ padding: 0;
19
+ -webkit-box-sizing: inherit;
20
+ box-sizing: inherit;
21
+ -webkit-font-smoothing: antialiased;
22
+ }
23
+
24
+ /**
25
+ * 1. Correct the line height in all browsers.
26
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
27
+ */
28
+
29
+ html {
30
+ line-height: 1.15; /* 1 */
31
+ -webkit-text-size-adjust: 100%; /* 2 */
32
+ }
33
+
34
+ /* Sections
35
+ ========================================================================== */
36
+
37
+ /**
38
+ * Remove the margin in all browsers.
39
+ */
40
+
41
+ body {
42
+ cursor: default;
43
+ margin: 0 !important;
44
+ padding: 0 !important;
45
+ -webkit-box-sizing: border-box;
46
+ box-sizing: border-box;
47
+ -webkit-text-size-adjust: 100%;
48
+ -webkit-font-smoothing: antialiased;
49
+ -moz-osx-font-smoothing: grayscale;
50
+ scroll-behavior: smooth;
51
+ text-rendering: optimizeSpeed;
52
+ }
53
+
54
+ /**
55
+ * Render the `main` element consistently in IE.
56
+ */
57
+
58
+ main {
59
+ min-height: 50vh;
60
+ display: block;
61
+ }
62
+
63
+ /**
64
+ * Correct the font size and margin on `h1` elements within `section` and
65
+ * `article` contexts in Chrome, Firefox, and Safari.
66
+ */
67
+
68
+ h1 {
69
+ font-size: 2em;
70
+ margin: 0.67em 0;
71
+ }
72
+
73
+ /* Grouping content
74
+ ========================================================================== */
75
+
76
+ /**
77
+ * 1. Add the correct box sizing in Firefox.
78
+ * 2. Show the overflow in Edge and IE.
79
+ */
80
+
81
+ hr {
82
+ box-sizing: content-box; /* 1 */
83
+ height: 0; /* 1 */
84
+ overflow: visible; /* 2 */
85
+ }
86
+
87
+ /**
88
+ * 1. Correct the inheritance and scaling of font size in all browsers.
89
+ * 2. Correct the odd `em` font sizing in all browsers.
90
+ */
91
+
92
+ pre {
93
+ font-family: monospace, monospace; /* 1 */
94
+ font-size: 1em; /* 2 */
95
+ }
96
+
97
+ /* Text-level semantics
98
+ ========================================================================== */
99
+
100
+ /**
101
+ * Remove the gray background on active links in IE 10.
102
+ */
103
+
104
+ a {
105
+ background-color: transparent;
106
+ }
107
+
108
+ /**
109
+ * 1. Remove the bottom border in Chrome 57-
110
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
111
+ */
112
+
113
+ abbr[title] {
114
+ border-bottom: none; /* 1 */
115
+ text-decoration: underline; /* 2 */
116
+ text-decoration: underline dotted; /* 2 */
117
+ }
118
+
119
+ /**
120
+ * Add the correct font weight in Chrome, Edge, and Safari.
121
+ */
122
+
123
+ b,
124
+ strong {
125
+ font-weight: bolder;
126
+ }
127
+
128
+ /**
129
+ * 1. Correct the inheritance and scaling of font size in all browsers.
130
+ * 2. Correct the odd `em` font sizing in all browsers.
131
+ */
6
132
 
7
- /* http://meyerweb.com/eric/tools/css/reset/
8
- v2.0 | 20110126
9
- License: none (public domain)
10
- */
11
-
12
- html,
13
- body,
14
- div,
15
- span,
16
- applet,
17
- object,
18
- iframe,
19
- h1,
20
- h2,
21
- h3,
22
- h4,
23
- h5,
24
- h6,
25
- p,
26
- blockquote,
27
- pre,
28
- a,
29
- abbr,
30
- acronym,
31
- address,
32
- big,
33
- cite,
34
133
  code,
35
- del,
36
- dfn,
37
- em,
38
- img,
39
- ins,
40
134
  kbd,
41
- q,
42
- s,
43
- samp,
44
- small,
45
- strike,
46
- strong,
135
+ samp {
136
+ font-family: monospace, monospace; /* 1 */
137
+ font-size: 1em; /* 2 */
138
+ }
139
+
140
+ /**
141
+ * Add the correct font size in all browsers.
142
+ */
143
+
144
+ small {
145
+ font-size: 80%;
146
+ }
147
+
148
+ /**
149
+ * Prevent `sub` and `sup` elements from affecting the line height in
150
+ * all browsers.
151
+ */
152
+
47
153
  sub,
48
- sup,
49
- tt,
50
- var,
51
- b,
52
- u,
53
- i,
54
- center,
55
- dl,
56
- dt,
57
- dd,
58
- ol,
59
- ul,
60
- li,
61
- fieldset,
62
- form,
63
- label,
64
- legend,
65
- table,
66
- caption,
67
- tbody,
68
- tfoot,
69
- thead,
70
- tr,
71
- th,
72
- td,
73
- article,
74
- aside,
75
- canvas,
76
- details,
77
- embed,
78
- figure,
79
- figcaption,
80
- footer,
81
- header,
82
- hgroup,
83
- menu,
84
- nav,
85
- output,
86
- ruby,
87
- section,
88
- summary,
89
- time,
90
- mark,
91
- audio,
92
- video {
93
- margin: 0;
154
+ sup {
155
+ font-size: 75%;
156
+ line-height: 0;
157
+ position: relative;
158
+ vertical-align: baseline;
159
+ }
160
+
161
+ sub {
162
+ bottom: -0.25em;
163
+ }
164
+
165
+ sup {
166
+ top: -0.5em;
167
+ }
168
+
169
+ /* Embedded content
170
+ ========================================================================== */
171
+
172
+ /**
173
+ * Remove the border on images inside links in IE 10.
174
+ */
175
+
176
+ img {
177
+ border-style: none;
178
+ object-fit: unset;
179
+ }
180
+
181
+ /* Forms
182
+ ========================================================================== */
183
+
184
+ /**
185
+ * 1. Change the font styles in all browsers.
186
+ * 2. Remove the margin in Firefox and Safari.
187
+ */
188
+
189
+ button,
190
+ input,
191
+ optgroup,
192
+ select,
193
+ textarea {
194
+ font-family: inherit; /* 1 */
195
+ font-size: 100%; /* 1 */
196
+ line-height: 1.15; /* 1 */
197
+ margin: 0; /* 2 */
198
+ }
199
+
200
+ /**
201
+ * Show the overflow in IE.
202
+ * 1. Show the overflow in Edge.
203
+ */
204
+
205
+ button,
206
+ input {
207
+ /* 1 */
208
+ overflow: visible;
209
+ }
210
+
211
+ /**
212
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
213
+ * 1. Remove the inheritance of text transform in Firefox.
214
+ */
215
+
216
+ button,
217
+ select {
218
+ /* 1 */
219
+ text-transform: none;
220
+ }
221
+
222
+ /**
223
+ * Correct the inability to style clickable types in iOS and Safari.
224
+ */
225
+
226
+ button,
227
+ [type='button'],
228
+ [type='reset'],
229
+ [type='submit'] {
230
+ -webkit-appearance: button;
231
+ }
232
+
233
+ /**
234
+ * Remove the inner border and padding in Firefox.
235
+ */
236
+
237
+ button::-moz-focus-inner,
238
+ [type='button']::-moz-focus-inner,
239
+ [type='reset']::-moz-focus-inner,
240
+ [type='submit']::-moz-focus-inner {
241
+ border-style: none;
94
242
  padding: 0;
95
- border: 0;
96
- font-size: 100%;
97
- font: inherit;
243
+ }
244
+
245
+ /**
246
+ * Restore the focus styles unset by the previous rule.
247
+ */
248
+
249
+ button:-moz-focusring,
250
+ [type='button']:-moz-focusring,
251
+ [type='reset']:-moz-focusring,
252
+ [type='submit']:-moz-focusring {
253
+ outline: 1px dotted ButtonText;
254
+ }
255
+
256
+ /**
257
+ * Correct the padding in Firefox.
258
+ */
259
+
260
+ fieldset {
261
+ padding: 0.35em 0.75em 0.625em;
262
+ }
263
+
264
+ /**
265
+ * 1. Correct the text wrapping in Edge and IE.
266
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
267
+ * 3. Remove the padding so developers are not caught out when they zero out
268
+ * `fieldset` elements in all browsers.
269
+ */
270
+
271
+ legend {
272
+ box-sizing: border-box; /* 1 */
273
+ color: inherit; /* 2 */
274
+ display: table; /* 1 */
275
+ max-width: 100%; /* 1 */
276
+ padding: 0; /* 3 */
277
+ white-space: normal; /* 1 */
278
+ }
279
+
280
+ /**
281
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
282
+ */
283
+
284
+ progress {
98
285
  vertical-align: baseline;
99
286
  }
100
- /* HTML5 display-role reset for older browsers */
101
- article,
102
- aside,
103
- details,
104
- figcaption,
105
- figure,
106
- footer,
107
- header,
108
- hgroup,
109
- menu,
110
- nav,
111
- section {
112
- display: block;
287
+
288
+ /**
289
+ * Remove the default vertical scrollbar in IE 10+.
290
+ */
291
+
292
+ textarea {
293
+ overflow: auto;
113
294
  }
114
- body {
115
- line-height: 1;
116
- overflow-y: hidden;
295
+
296
+ /**
297
+ * 1. Add the correct box sizing in IE 10.
298
+ * 2. Remove the padding in IE 10.
299
+ */
300
+
301
+ [type='checkbox'],
302
+ [type='radio'] {
303
+ box-sizing: border-box; /* 1 */
304
+ padding: 0; /* 2 */
117
305
  }
118
- ol,
119
- ul {
120
- list-style: none;
306
+
307
+ /**
308
+ * Correct the cursor style of increment and decrement buttons in Chrome.
309
+ */
310
+
311
+ [type='number']::-webkit-inner-spin-button,
312
+ [type='number']::-webkit-outer-spin-button {
313
+ height: auto;
121
314
  }
122
- blockquote,
123
- q {
124
- quotes: none;
315
+
316
+ /**
317
+ * 1. Correct the odd appearance in Chrome and Safari.
318
+ * 2. Correct the outline style in Safari.
319
+ */
320
+
321
+ [type='search'] {
322
+ -webkit-appearance: textfield; /* 1 */
323
+ outline-offset: -2px; /* 2 */
125
324
  }
126
- blockquote:before,
127
- blockquote:after,
128
- q:before,
129
- q:after {
130
- content: '';
131
- content: none;
325
+
326
+ /**
327
+ * Remove the inner padding in Chrome and Safari on macOS.
328
+ */
329
+
330
+ [type='search']::-webkit-search-decoration {
331
+ -webkit-appearance: none;
132
332
  }
133
- table {
134
- border-collapse: collapse;
135
- border-spacing: 0;
333
+
334
+ /**
335
+ * 1. Correct the inability to style clickable types in iOS and Safari.
336
+ * 2. Change font properties to `inherit` in Safari.
337
+ */
338
+
339
+ ::-webkit-file-upload-button {
340
+ -webkit-appearance: button; /* 1 */
341
+ font: inherit; /* 2 */
136
342
  }
137
343
 
138
- * {
139
- box-sizing: border-box;
344
+ /* Interactive
345
+ ========================================================================== */
346
+
347
+ /*
348
+ * Add the correct display in Edge, IE 10+, and Firefox.
349
+ */
350
+
351
+ details {
352
+ display: block;
353
+ }
354
+
355
+ /*
356
+ * Add the correct display in all browsers.
357
+ */
358
+
359
+ summary {
360
+ display: list-item;
361
+ }
362
+
363
+ /* Misc
364
+ ========================================================================== */
365
+
366
+ /**
367
+ * Add the correct display in IE 10+.
368
+ */
369
+
370
+ template {
371
+ display: none;
372
+ }
373
+
374
+ /**
375
+ * Add the correct display in IE 10.
376
+ */
377
+
378
+ [hidden] {
379
+ display: none;
140
380
  }