react-native-timacare 3.3.55 → 3.3.57-cccd

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 (612) hide show
  1. package/lib/commonjs/AppStore.js +1 -1
  2. package/lib/commonjs/AppStore.js.flow +7 -2
  3. package/lib/commonjs/AppStore.js.map +1 -1
  4. package/lib/commonjs/RNTimacare.js +1 -1
  5. package/lib/commonjs/RNTimacare.js.flow +7 -1
  6. package/lib/commonjs/RNTimacare.js.map +1 -1
  7. package/lib/commonjs/assets/icons/index.js +1 -1
  8. package/lib/commonjs/assets/icons/index.js.flow +10 -0
  9. package/lib/commonjs/assets/icons/index.js.map +1 -1
  10. package/lib/commonjs/assets/icons/modal_confirm.svg +15 -0
  11. package/lib/commonjs/assets/icons/modal_notice.svg +74 -0
  12. package/lib/commonjs/assets/icons/modal_success.svg +55 -0
  13. package/lib/commonjs/assets/icons/modal_warning.svg +48 -0
  14. package/lib/commonjs/assets/icons/user_security.svg +10 -0
  15. package/lib/commonjs/assets/tts/Frame1000011947.png +0 -0
  16. package/lib/commonjs/components/AppModal.js +2 -0
  17. package/lib/commonjs/components/AppModal.js.flow +34 -0
  18. package/lib/commonjs/components/AppModal.js.map +1 -0
  19. package/lib/commonjs/components/ItemTimaOne.js +2 -0
  20. package/lib/commonjs/components/{ItemTimaOneV3.js.flow → ItemTimaOne.js.flow} +1 -1
  21. package/lib/commonjs/components/ItemTimaOne.js.map +1 -0
  22. package/lib/commonjs/components/ModalNotification/AlertGlobal.js +2 -0
  23. package/lib/commonjs/components/ModalNotification/AlertGlobal.js.flow +100 -0
  24. package/lib/commonjs/components/ModalNotification/AlertGlobal.js.map +1 -0
  25. package/lib/commonjs/components/ModalNotification/index.js +2 -0
  26. package/lib/commonjs/components/ModalNotification/index.js.flow +224 -0
  27. package/lib/commonjs/components/ModalNotification/index.js.map +1 -0
  28. package/lib/commonjs/components/ModalOptionLoan.js +1 -1
  29. package/lib/commonjs/components/ModalOptionLoan.js.flow +15 -7
  30. package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
  31. package/lib/commonjs/components/ModalOptionLoanDigital.js +1 -1
  32. package/lib/commonjs/components/ModalOptionLoanDigital.js.flow +15 -7
  33. package/lib/commonjs/components/ModalOptionLoanDigital.js.map +1 -1
  34. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  35. package/lib/commonjs/navigation/primary-navigator.js.flow +7 -0
  36. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  37. package/lib/commonjs/screens/NFC/OcrStart.js +2 -0
  38. package/lib/commonjs/screens/NFC/OcrStart.js.flow +171 -0
  39. package/lib/commonjs/screens/NFC/OcrStart.js.map +1 -0
  40. package/lib/commonjs/screens/NFC/ScanMRZ.js +2 -0
  41. package/lib/commonjs/screens/NFC/ScanMRZ.js.flow +563 -0
  42. package/lib/commonjs/screens/NFC/ScanMRZ.js.map +1 -0
  43. package/lib/commonjs/screens/SelectorStore.js +1 -1
  44. package/lib/commonjs/screens/SelectorStore.js.flow +7 -2
  45. package/lib/commonjs/screens/SelectorStore.js.map +1 -1
  46. package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
  47. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +253 -187
  48. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
  49. package/lib/commonjs/screens/camera/index.js +1 -1
  50. package/lib/commonjs/screens/camera/index.js.flow +50 -54
  51. package/lib/commonjs/screens/camera/index.js.map +1 -1
  52. package/lib/commonjs/screens/cimb-sign/index.js +1 -1
  53. package/lib/commonjs/screens/cimb-sign/index.js.flow +10 -14
  54. package/lib/commonjs/screens/cimb-sign/index.js.map +1 -1
  55. package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
  56. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +75 -54
  57. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
  58. package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
  59. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +77 -54
  60. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
  61. package/lib/commonjs/screens/detail-loan/store.js +1 -1
  62. package/lib/commonjs/screens/detail-loan/store.js.flow +39 -7
  63. package/lib/commonjs/screens/detail-loan/store.js.map +1 -1
  64. package/lib/commonjs/screens/detail-loan-tima/InforLoan.js +1 -1
  65. package/lib/commonjs/screens/detail-loan-tima/InforLoan.js.flow +20 -4
  66. package/lib/commonjs/screens/detail-loan-tima/InforLoan.js.map +1 -1
  67. package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js +1 -1
  68. package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js.flow +19 -4
  69. package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js.map +1 -1
  70. package/lib/commonjs/screens/digital-lending/Step6.js +1 -1
  71. package/lib/commonjs/screens/digital-lending/Step6.js.flow +24 -29
  72. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -1
  73. package/lib/commonjs/screens/digital-lending/store.js +1 -1
  74. package/lib/commonjs/screens/digital-lending/store.js.flow +113 -20
  75. package/lib/commonjs/screens/digital-lending/store.js.map +1 -1
  76. package/lib/commonjs/screens/eSign/Store.js +1 -1
  77. package/lib/commonjs/screens/eSign/Store.js.flow +69 -34
  78. package/lib/commonjs/screens/eSign/Store.js.map +1 -1
  79. package/lib/commonjs/screens/eSign/index.js +1 -1
  80. package/lib/commonjs/screens/eSign/index.js.flow +33 -34
  81. package/lib/commonjs/screens/eSign/index.js.map +1 -1
  82. package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
  83. package/lib/commonjs/screens/full-submit/accept_policy.js.flow +101 -85
  84. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
  85. package/lib/commonjs/screens/full-submit/store.js +1 -1
  86. package/lib/commonjs/screens/full-submit/store.js.flow +157 -27
  87. package/lib/commonjs/screens/full-submit/store.js.map +1 -1
  88. package/lib/commonjs/screens/full-submit/update-info.js +1 -1
  89. package/lib/commonjs/screens/full-submit/update-info.js.flow +0 -1
  90. package/lib/commonjs/screens/full-submit/update-info.js.map +1 -1
  91. package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
  92. package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +15 -7
  93. package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -1
  94. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js +1 -1
  95. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.flow +16 -7
  96. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.map +1 -1
  97. package/lib/commonjs/screens/home/Store.js +1 -1
  98. package/lib/commonjs/screens/home/Store.js.flow +44 -23
  99. package/lib/commonjs/screens/home/Store.js.map +1 -1
  100. package/lib/commonjs/screens/home/index.js +1 -1
  101. package/lib/commonjs/screens/home/index.js.flow +306 -298
  102. package/lib/commonjs/screens/home/index.js.map +1 -1
  103. package/lib/commonjs/screens/liveness/LivenessStore.js +1 -1
  104. package/lib/commonjs/screens/liveness/LivenessStore.js.flow +111 -89
  105. package/lib/commonjs/screens/liveness/LivenessStore.js.map +1 -1
  106. package/lib/commonjs/screens/liveness/index.js +1 -1
  107. package/lib/commonjs/screens/liveness/index.js.flow +67 -68
  108. package/lib/commonjs/screens/liveness/index.js.map +1 -1
  109. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  110. package/lib/commonjs/screens/liveness-v2/index.js.flow +52 -52
  111. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  112. package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
  113. package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js.flow +20 -10
  114. package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
  115. package/lib/commonjs/screens/loan/UpdateLoan.js +1 -1
  116. package/lib/commonjs/screens/loan/UpdateLoan.js.flow +56 -23
  117. package/lib/commonjs/screens/loan/UpdateLoan.js.map +1 -1
  118. package/lib/commonjs/screens/motobike/InfoLoanMotobike.js +1 -1
  119. package/lib/commonjs/screens/motobike/InfoLoanMotobike.js.flow +43 -29
  120. package/lib/commonjs/screens/motobike/InfoLoanMotobike.js.map +1 -1
  121. package/lib/commonjs/screens/motobike/PolicyF88.js +1 -1
  122. package/lib/commonjs/screens/motobike/PolicyF88.js.flow +15 -6
  123. package/lib/commonjs/screens/motobike/PolicyF88.js.map +1 -1
  124. package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js +1 -1
  125. package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js.flow +13 -3
  126. package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js.map +1 -1
  127. package/lib/commonjs/screens/mrz-scanner/index.js +1 -1
  128. package/lib/commonjs/screens/mrz-scanner/index.js.flow +56 -55
  129. package/lib/commonjs/screens/mrz-scanner/index.js.map +1 -1
  130. package/lib/commonjs/screens/mrz-scanner/store.js +1 -1
  131. package/lib/commonjs/screens/mrz-scanner/store.js.flow +13 -3
  132. package/lib/commonjs/screens/mrz-scanner/store.js.map +1 -1
  133. package/lib/commonjs/screens/nationalID/Store.js +1 -1
  134. package/lib/commonjs/screens/nationalID/Store.js.flow +50 -29
  135. package/lib/commonjs/screens/nationalID/Store.js.map +1 -1
  136. package/lib/commonjs/screens/nationalID/index.js +1 -1
  137. package/lib/commonjs/screens/nationalID/index.js.flow +123 -219
  138. package/lib/commonjs/screens/nationalID/index.js.map +1 -1
  139. package/lib/commonjs/screens/nationalIDBack/Store.js +1 -1
  140. package/lib/commonjs/screens/nationalIDBack/Store.js.flow +44 -26
  141. package/lib/commonjs/screens/nationalIDBack/Store.js.map +1 -1
  142. package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
  143. package/lib/commonjs/screens/nationalIDBack/index.js.flow +129 -210
  144. package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
  145. package/lib/commonjs/screens/notification/ListLoanStore.js +1 -1
  146. package/lib/commonjs/screens/notification/ListLoanStore.js.flow +19 -4
  147. package/lib/commonjs/screens/notification/ListLoanStore.js.map +1 -1
  148. package/lib/commonjs/screens/notification/index.js +1 -1
  149. package/lib/commonjs/screens/notification/index.js.flow +0 -1
  150. package/lib/commonjs/screens/notification/index.js.map +1 -1
  151. package/lib/commonjs/screens/notification/store.js +1 -1
  152. package/lib/commonjs/screens/notification/store.js.flow +7 -2
  153. package/lib/commonjs/screens/notification/store.js.map +1 -1
  154. package/lib/commonjs/screens/personal/index.js +1 -1
  155. package/lib/commonjs/screens/personal/index.js.flow +21 -19
  156. package/lib/commonjs/screens/personal/index.js.map +1 -1
  157. package/lib/commonjs/screens/qualify/Store.js.flow +0 -1
  158. package/lib/commonjs/screens/qualify/Store.js.map +1 -1
  159. package/lib/commonjs/screens/quick-submit/store.js +1 -1
  160. package/lib/commonjs/screens/quick-submit/store.js.flow +85 -15
  161. package/lib/commonjs/screens/quick-submit/store.js.map +1 -1
  162. package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
  163. package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js.flow +20 -4
  164. package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
  165. package/lib/commonjs/screens/schedule-payment/store.js +1 -1
  166. package/lib/commonjs/screens/schedule-payment/store.js.flow +13 -5
  167. package/lib/commonjs/screens/schedule-payment/store.js.map +1 -1
  168. package/lib/commonjs/screens/selfie/SelfieStore.js +1 -1
  169. package/lib/commonjs/screens/selfie/SelfieStore.js.flow +25 -9
  170. package/lib/commonjs/screens/selfie/SelfieStore.js.map +1 -1
  171. package/lib/commonjs/screens/selfie/index.js +1 -1
  172. package/lib/commonjs/screens/selfie/index.js.flow +0 -1
  173. package/lib/commonjs/screens/selfie/index.js.map +1 -1
  174. package/lib/commonjs/screens/sign-tima/ViewContract.js +1 -1
  175. package/lib/commonjs/screens/sign-tima/ViewContract.js.flow +17 -18
  176. package/lib/commonjs/screens/sign-tima/ViewContract.js.map +1 -1
  177. package/lib/commonjs/screens/sign-tima/store.js +1 -1
  178. package/lib/commonjs/screens/sign-tima/store.js.flow +37 -7
  179. package/lib/commonjs/screens/sign-tima/store.js.map +1 -1
  180. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js +1 -1
  181. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.flow +36 -10
  182. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
  183. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  184. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +321 -609
  185. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  186. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js +1 -1
  187. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.flow +21 -4
  188. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.map +1 -1
  189. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
  190. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +50 -54
  191. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  192. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
  193. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +31 -25
  194. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  195. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  196. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +88 -82
  197. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  198. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
  199. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +25 -5
  200. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  201. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
  202. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.flow +19 -4
  203. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -1
  204. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
  205. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +19 -4
  206. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
  207. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js +1 -1
  208. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.flow +42 -25
  209. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.map +1 -1
  210. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +1 -1
  211. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +63 -56
  212. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  213. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  214. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +63 -55
  215. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  216. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
  217. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.flow +50 -43
  218. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
  219. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  220. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +275 -341
  221. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  222. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +1 -1
  223. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +19 -4
  224. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
  225. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
  226. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.flow +19 -4
  227. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -1
  228. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
  229. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +19 -4
  230. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
  231. package/lib/commonjs/screens/toan-trinh-so/store.js +1 -1
  232. package/lib/commonjs/screens/toan-trinh-so/store.js.flow +82 -37
  233. package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -1
  234. package/lib/commonjs/screens/uploadVideo/index.js +1 -1
  235. package/lib/commonjs/screens/uploadVideo/index.js.flow +26 -21
  236. package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
  237. package/lib/commonjs/screens/uploadVideo/videoStore.js +1 -1
  238. package/lib/commonjs/screens/uploadVideo/videoStore.js.flow +19 -4
  239. package/lib/commonjs/screens/uploadVideo/videoStore.js.map +1 -1
  240. package/lib/commonjs/screens/v3/AssetInformation.js +1 -1
  241. package/lib/commonjs/screens/v3/AssetInformation.js.flow +35 -16
  242. package/lib/commonjs/screens/v3/AssetInformation.js.map +1 -1
  243. package/lib/commonjs/screens/v3/LoanBuyCar.js +1 -1
  244. package/lib/commonjs/screens/v3/LoanBuyCar.js.flow +35 -16
  245. package/lib/commonjs/screens/v3/LoanBuyCar.js.map +1 -1
  246. package/lib/commonjs/services/api/api.js +1 -1
  247. package/lib/commonjs/services/api/api.js.flow +23 -26
  248. package/lib/commonjs/services/api/api.js.map +1 -1
  249. package/lib/commonjs/utils/cameraCrop.js +2 -0
  250. package/lib/commonjs/utils/cameraCrop.js.flow +96 -0
  251. package/lib/commonjs/utils/cameraCrop.js.map +1 -0
  252. package/lib/module/AppStore.js +1 -1
  253. package/lib/module/AppStore.js.map +1 -1
  254. package/lib/module/RNTimacare.js +1 -1
  255. package/lib/module/RNTimacare.js.map +1 -1
  256. package/lib/module/assets/icons/index.js +1 -1
  257. package/lib/module/assets/icons/index.js.map +1 -1
  258. package/lib/module/assets/icons/modal_confirm.svg +15 -0
  259. package/lib/module/assets/icons/modal_notice.svg +74 -0
  260. package/lib/module/assets/icons/modal_success.svg +55 -0
  261. package/lib/module/assets/icons/modal_warning.svg +48 -0
  262. package/lib/module/assets/icons/user_security.svg +10 -0
  263. package/lib/module/assets/tts/Frame1000011947.png +0 -0
  264. package/lib/module/components/AppModal.js +2 -0
  265. package/lib/module/components/AppModal.js.map +1 -0
  266. package/lib/module/components/ItemTimaOne.js +2 -0
  267. package/lib/module/components/ItemTimaOne.js.map +1 -0
  268. package/lib/module/components/ModalNotification/AlertGlobal.js +2 -0
  269. package/lib/module/components/ModalNotification/AlertGlobal.js.map +1 -0
  270. package/lib/module/components/ModalNotification/index.js +2 -0
  271. package/lib/module/components/ModalNotification/index.js.map +1 -0
  272. package/lib/module/components/ModalOptionLoan.js +1 -1
  273. package/lib/module/components/ModalOptionLoan.js.map +1 -1
  274. package/lib/module/components/ModalOptionLoanDigital.js +1 -1
  275. package/lib/module/components/ModalOptionLoanDigital.js.map +1 -1
  276. package/lib/module/navigation/primary-navigator.js +1 -1
  277. package/lib/module/navigation/primary-navigator.js.map +1 -1
  278. package/lib/module/screens/NFC/OcrStart.js +2 -0
  279. package/lib/module/screens/NFC/OcrStart.js.map +1 -0
  280. package/lib/module/screens/NFC/ScanMRZ.js +2 -0
  281. package/lib/module/screens/NFC/ScanMRZ.js.map +1 -0
  282. package/lib/module/screens/SelectorStore.js +1 -1
  283. package/lib/module/screens/SelectorStore.js.map +1 -1
  284. package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
  285. package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
  286. package/lib/module/screens/camera/index.js +1 -1
  287. package/lib/module/screens/camera/index.js.map +1 -1
  288. package/lib/module/screens/cimb-sign/index.js +1 -1
  289. package/lib/module/screens/cimb-sign/index.js.map +1 -1
  290. package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
  291. package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
  292. package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
  293. package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
  294. package/lib/module/screens/detail-loan/store.js +1 -1
  295. package/lib/module/screens/detail-loan/store.js.map +1 -1
  296. package/lib/module/screens/detail-loan-tima/InforLoan.js +1 -1
  297. package/lib/module/screens/detail-loan-tima/InforLoan.js.map +1 -1
  298. package/lib/module/screens/detail-loan-tima/PaymentSchedule.js +1 -1
  299. package/lib/module/screens/detail-loan-tima/PaymentSchedule.js.map +1 -1
  300. package/lib/module/screens/digital-lending/Step6.js +1 -1
  301. package/lib/module/screens/digital-lending/Step6.js.map +1 -1
  302. package/lib/module/screens/digital-lending/store.js +1 -1
  303. package/lib/module/screens/digital-lending/store.js.map +1 -1
  304. package/lib/module/screens/eSign/Store.js +1 -1
  305. package/lib/module/screens/eSign/Store.js.map +1 -1
  306. package/lib/module/screens/eSign/index.js +1 -1
  307. package/lib/module/screens/eSign/index.js.map +1 -1
  308. package/lib/module/screens/full-submit/accept_policy.js +1 -1
  309. package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
  310. package/lib/module/screens/full-submit/store.js +1 -1
  311. package/lib/module/screens/full-submit/store.js.map +1 -1
  312. package/lib/module/screens/full-submit/update-info.js +1 -1
  313. package/lib/module/screens/full-submit/update-info.js.map +1 -1
  314. package/lib/module/screens/home/DigitalTopupItem.js +1 -1
  315. package/lib/module/screens/home/DigitalTopupItem.js.map +1 -1
  316. package/lib/module/screens/home/ItemMotoBikeLoan.js +1 -1
  317. package/lib/module/screens/home/ItemMotoBikeLoan.js.map +1 -1
  318. package/lib/module/screens/home/Store.js +1 -1
  319. package/lib/module/screens/home/Store.js.map +1 -1
  320. package/lib/module/screens/home/index.js +1 -1
  321. package/lib/module/screens/home/index.js.map +1 -1
  322. package/lib/module/screens/liveness/LivenessStore.js +1 -1
  323. package/lib/module/screens/liveness/LivenessStore.js.map +1 -1
  324. package/lib/module/screens/liveness/index.js +1 -1
  325. package/lib/module/screens/liveness/index.js.map +1 -1
  326. package/lib/module/screens/liveness-v2/index.js +1 -1
  327. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  328. package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
  329. package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
  330. package/lib/module/screens/loan/UpdateLoan.js +1 -1
  331. package/lib/module/screens/loan/UpdateLoan.js.map +1 -1
  332. package/lib/module/screens/motobike/InfoLoanMotobike.js +1 -1
  333. package/lib/module/screens/motobike/InfoLoanMotobike.js.map +1 -1
  334. package/lib/module/screens/motobike/PolicyF88.js +1 -1
  335. package/lib/module/screens/motobike/PolicyF88.js.map +1 -1
  336. package/lib/module/screens/motobike/ReviewLoanMotobike.js +1 -1
  337. package/lib/module/screens/motobike/ReviewLoanMotobike.js.map +1 -1
  338. package/lib/module/screens/mrz-scanner/index.js +1 -1
  339. package/lib/module/screens/mrz-scanner/index.js.map +1 -1
  340. package/lib/module/screens/mrz-scanner/store.js +1 -1
  341. package/lib/module/screens/mrz-scanner/store.js.map +1 -1
  342. package/lib/module/screens/nationalID/Store.js +1 -1
  343. package/lib/module/screens/nationalID/Store.js.map +1 -1
  344. package/lib/module/screens/nationalID/index.js +1 -1
  345. package/lib/module/screens/nationalID/index.js.map +1 -1
  346. package/lib/module/screens/nationalIDBack/Store.js +1 -1
  347. package/lib/module/screens/nationalIDBack/Store.js.map +1 -1
  348. package/lib/module/screens/nationalIDBack/index.js +1 -1
  349. package/lib/module/screens/nationalIDBack/index.js.map +1 -1
  350. package/lib/module/screens/notification/ListLoanStore.js +1 -1
  351. package/lib/module/screens/notification/ListLoanStore.js.map +1 -1
  352. package/lib/module/screens/notification/index.js +1 -1
  353. package/lib/module/screens/notification/index.js.map +1 -1
  354. package/lib/module/screens/notification/store.js +1 -1
  355. package/lib/module/screens/notification/store.js.map +1 -1
  356. package/lib/module/screens/personal/index.js +1 -1
  357. package/lib/module/screens/personal/index.js.map +1 -1
  358. package/lib/module/screens/qualify/Store.js.map +1 -1
  359. package/lib/module/screens/quick-submit/store.js +1 -1
  360. package/lib/module/screens/quick-submit/store.js.map +1 -1
  361. package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
  362. package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
  363. package/lib/module/screens/schedule-payment/store.js +1 -1
  364. package/lib/module/screens/schedule-payment/store.js.map +1 -1
  365. package/lib/module/screens/selfie/SelfieStore.js +1 -1
  366. package/lib/module/screens/selfie/SelfieStore.js.map +1 -1
  367. package/lib/module/screens/selfie/index.js +1 -1
  368. package/lib/module/screens/selfie/index.js.map +1 -1
  369. package/lib/module/screens/sign-tima/ViewContract.js +1 -1
  370. package/lib/module/screens/sign-tima/ViewContract.js.map +1 -1
  371. package/lib/module/screens/sign-tima/store.js +1 -1
  372. package/lib/module/screens/sign-tima/store.js.map +1 -1
  373. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js +1 -1
  374. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
  375. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  376. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  377. package/lib/module/screens/toan-trinh-so/RegisterBack.js +1 -1
  378. package/lib/module/screens/toan-trinh-so/RegisterBack.js.map +1 -1
  379. package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
  380. package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  381. package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
  382. package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  383. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  384. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  385. package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
  386. package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  387. package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
  388. package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -1
  389. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
  390. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
  391. package/lib/module/screens/toan-trinh-so/TTSOTP.js +1 -1
  392. package/lib/module/screens/toan-trinh-so/TTSOTP.js.map +1 -1
  393. package/lib/module/screens/toan-trinh-so/TTSSelfie.js +1 -1
  394. package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  395. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  396. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  397. package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
  398. package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
  399. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  400. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  401. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +1 -1
  402. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
  403. package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
  404. package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -1
  405. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
  406. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
  407. package/lib/module/screens/toan-trinh-so/store.js +1 -1
  408. package/lib/module/screens/toan-trinh-so/store.js.map +1 -1
  409. package/lib/module/screens/uploadVideo/index.js +1 -1
  410. package/lib/module/screens/uploadVideo/index.js.map +1 -1
  411. package/lib/module/screens/uploadVideo/videoStore.js +1 -1
  412. package/lib/module/screens/uploadVideo/videoStore.js.map +1 -1
  413. package/lib/module/screens/v3/AssetInformation.js +1 -1
  414. package/lib/module/screens/v3/AssetInformation.js.map +1 -1
  415. package/lib/module/screens/v3/LoanBuyCar.js +1 -1
  416. package/lib/module/screens/v3/LoanBuyCar.js.map +1 -1
  417. package/lib/module/services/api/api.js +1 -1
  418. package/lib/module/services/api/api.js.map +1 -1
  419. package/lib/module/utils/cameraCrop.js +2 -0
  420. package/lib/module/utils/cameraCrop.js.map +1 -0
  421. package/lib/typescript/AppStore.d.ts.map +1 -1
  422. package/lib/typescript/RNTimacare.d.ts.map +1 -1
  423. package/lib/typescript/assets/icons/index.d.ts +6 -1
  424. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  425. package/lib/typescript/components/AppModal.d.ts +18 -0
  426. package/lib/typescript/components/AppModal.d.ts.map +1 -0
  427. package/lib/typescript/components/ItemTimaOne.d.ts +7 -0
  428. package/lib/typescript/components/ItemTimaOne.d.ts.map +1 -0
  429. package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts +30 -0
  430. package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts.map +1 -0
  431. package/lib/typescript/components/ModalNotification/index.d.ts +35 -0
  432. package/lib/typescript/components/ModalNotification/index.d.ts.map +1 -0
  433. package/lib/typescript/components/ModalOptionLoan.d.ts.map +1 -1
  434. package/lib/typescript/components/ModalOptionLoanDigital.d.ts.map +1 -1
  435. package/lib/typescript/navigation/primary-navigator.d.ts +3 -0
  436. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  437. package/lib/typescript/screens/NFC/OcrStart.d.ts +2 -0
  438. package/lib/typescript/screens/NFC/OcrStart.d.ts.map +1 -0
  439. package/lib/typescript/screens/NFC/ScanMRZ.d.ts +15 -0
  440. package/lib/typescript/screens/NFC/ScanMRZ.d.ts.map +1 -0
  441. package/lib/typescript/screens/SelectorStore.d.ts.map +1 -1
  442. package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
  443. package/lib/typescript/screens/camera/index.d.ts.map +1 -1
  444. package/lib/typescript/screens/cimb-sign/index.d.ts.map +1 -1
  445. package/lib/typescript/screens/detail-loan/ShowQrCode.d.ts.map +1 -1
  446. package/lib/typescript/screens/detail-loan/store.d.ts.map +1 -1
  447. package/lib/typescript/screens/detail-loan-tima/InforLoan.d.ts.map +1 -1
  448. package/lib/typescript/screens/detail-loan-tima/PaymentSchedule.d.ts.map +1 -1
  449. package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -1
  450. package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -1
  451. package/lib/typescript/screens/eSign/Store.d.ts.map +1 -1
  452. package/lib/typescript/screens/eSign/index.d.ts.map +1 -1
  453. package/lib/typescript/screens/full-submit/accept_policy.d.ts.map +1 -1
  454. package/lib/typescript/screens/full-submit/store.d.ts.map +1 -1
  455. package/lib/typescript/screens/full-submit/update-info.d.ts.map +1 -1
  456. package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -1
  457. package/lib/typescript/screens/home/ItemMotoBikeLoan.d.ts.map +1 -1
  458. package/lib/typescript/screens/home/Store.d.ts.map +1 -1
  459. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  460. package/lib/typescript/screens/liveness/LivenessStore.d.ts.map +1 -1
  461. package/lib/typescript/screens/liveness/index.d.ts.map +1 -1
  462. package/lib/typescript/screens/loan/PreviewSchedulePaymentTopup.d.ts.map +1 -1
  463. package/lib/typescript/screens/loan/UpdateLoan.d.ts.map +1 -1
  464. package/lib/typescript/screens/motobike/InfoLoanMotobike.d.ts.map +1 -1
  465. package/lib/typescript/screens/motobike/PolicyF88.d.ts.map +1 -1
  466. package/lib/typescript/screens/motobike/ReviewLoanMotobike.d.ts.map +1 -1
  467. package/lib/typescript/screens/mrz-scanner/index.d.ts.map +1 -1
  468. package/lib/typescript/screens/mrz-scanner/store.d.ts.map +1 -1
  469. package/lib/typescript/screens/nationalID/Store.d.ts.map +1 -1
  470. package/lib/typescript/screens/nationalID/index.d.ts.map +1 -1
  471. package/lib/typescript/screens/nationalIDBack/Store.d.ts.map +1 -1
  472. package/lib/typescript/screens/nationalIDBack/index.d.ts.map +1 -1
  473. package/lib/typescript/screens/notification/ListLoanStore.d.ts.map +1 -1
  474. package/lib/typescript/screens/notification/index.d.ts.map +1 -1
  475. package/lib/typescript/screens/notification/store.d.ts.map +1 -1
  476. package/lib/typescript/screens/personal/index.d.ts.map +1 -1
  477. package/lib/typescript/screens/qualify/Store.d.ts.map +1 -1
  478. package/lib/typescript/screens/quick-submit/store.d.ts.map +1 -1
  479. package/lib/typescript/screens/schedule-payment/DigitalSchedulePayment.d.ts.map +1 -1
  480. package/lib/typescript/screens/schedule-payment/store.d.ts.map +1 -1
  481. package/lib/typescript/screens/selfie/SelfieStore.d.ts.map +1 -1
  482. package/lib/typescript/screens/selfie/index.d.ts.map +1 -1
  483. package/lib/typescript/screens/sign-tima/ViewContract.d.ts.map +1 -1
  484. package/lib/typescript/screens/sign-tima/store.d.ts.map +1 -1
  485. package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts.map +1 -1
  486. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
  487. package/lib/typescript/screens/toan-trinh-so/RegisterBack.d.ts.map +1 -1
  488. package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -1
  489. package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -1
  490. package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -1
  491. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
  492. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDBack.d.ts.map +1 -1
  493. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts.map +1 -1
  494. package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts.map +1 -1
  495. package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -1
  496. package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
  497. package/lib/typescript/screens/toan-trinh-so/TopupLoanInfo.d.ts.map +1 -1
  498. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
  499. package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts.map +1 -1
  500. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationBack.d.ts.map +1 -1
  501. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts.map +1 -1
  502. package/lib/typescript/screens/toan-trinh-so/store.d.ts.map +1 -1
  503. package/lib/typescript/screens/uploadVideo/index.d.ts.map +1 -1
  504. package/lib/typescript/screens/uploadVideo/videoStore.d.ts.map +1 -1
  505. package/lib/typescript/screens/v3/AssetInformation.d.ts.map +1 -1
  506. package/lib/typescript/screens/v3/LoanBuyCar.d.ts.map +1 -1
  507. package/lib/typescript/services/api/api.d.ts.map +1 -1
  508. package/lib/typescript/utils/cameraCrop.d.ts +43 -0
  509. package/lib/typescript/utils/cameraCrop.d.ts.map +1 -0
  510. package/package.json +2 -1
  511. package/src/AppStore.tsx +7 -2
  512. package/src/RNTimacare.tsx +7 -1
  513. package/src/assets/icons/index.tsx +10 -0
  514. package/src/assets/icons/modal_confirm.svg +15 -0
  515. package/src/assets/icons/modal_notice.svg +74 -0
  516. package/src/assets/icons/modal_success.svg +55 -0
  517. package/src/assets/icons/modal_warning.svg +48 -0
  518. package/src/assets/icons/user_security.svg +10 -0
  519. package/src/assets/tts/Frame1000011947.png +0 -0
  520. package/src/components/AppModal.tsx +34 -0
  521. package/src/components/{ItemTimaOneV3.tsx → ItemTimaOne.tsx} +1 -1
  522. package/src/components/ModalNotification/AlertGlobal.tsx +100 -0
  523. package/src/components/ModalNotification/index.tsx +224 -0
  524. package/src/components/ModalOptionLoan.tsx +15 -7
  525. package/src/components/ModalOptionLoanDigital.tsx +15 -7
  526. package/src/navigation/primary-navigator.tsx +7 -0
  527. package/src/screens/NFC/OcrStart.tsx +171 -0
  528. package/src/screens/NFC/ScanMRZ.tsx +563 -0
  529. package/src/screens/SelectorStore.tsx +7 -2
  530. package/src/screens/camera/CCCDCameraScreen.tsx +253 -187
  531. package/src/screens/camera/index.tsx +50 -54
  532. package/src/screens/cimb-sign/index.tsx +10 -14
  533. package/src/screens/detail-loan/PaymentInfo.tsx +75 -54
  534. package/src/screens/detail-loan/ShowQrCode.tsx +77 -54
  535. package/src/screens/detail-loan/store.tsx +39 -7
  536. package/src/screens/detail-loan-tima/InforLoan.tsx +20 -4
  537. package/src/screens/detail-loan-tima/PaymentSchedule.tsx +19 -4
  538. package/src/screens/digital-lending/Step6.tsx +24 -29
  539. package/src/screens/digital-lending/store.tsx +113 -20
  540. package/src/screens/eSign/Store.tsx +69 -34
  541. package/src/screens/eSign/index.tsx +33 -34
  542. package/src/screens/full-submit/accept_policy.tsx +101 -85
  543. package/src/screens/full-submit/store.tsx +157 -27
  544. package/src/screens/full-submit/update-info.tsx +0 -1
  545. package/src/screens/home/DigitalTopupItem.tsx +15 -7
  546. package/src/screens/home/ItemMotoBikeLoan.tsx +16 -7
  547. package/src/screens/home/Store.tsx +44 -23
  548. package/src/screens/home/index.tsx +306 -298
  549. package/src/screens/liveness/LivenessStore.tsx +111 -89
  550. package/src/screens/liveness/index.tsx +67 -68
  551. package/src/screens/liveness-v2/index.tsx +52 -52
  552. package/src/screens/loan/PreviewSchedulePaymentTopup.tsx +20 -10
  553. package/src/screens/loan/UpdateLoan.tsx +56 -23
  554. package/src/screens/motobike/InfoLoanMotobike.tsx +43 -29
  555. package/src/screens/motobike/PolicyF88.tsx +15 -6
  556. package/src/screens/motobike/ReviewLoanMotobike.tsx +13 -3
  557. package/src/screens/mrz-scanner/index.tsx +56 -55
  558. package/src/screens/mrz-scanner/store.ts +13 -3
  559. package/src/screens/nationalID/Store.tsx +50 -29
  560. package/src/screens/nationalID/index.tsx +123 -219
  561. package/src/screens/nationalIDBack/Store.tsx +44 -26
  562. package/src/screens/nationalIDBack/index.tsx +129 -210
  563. package/src/screens/notification/ListLoanStore.tsx +19 -4
  564. package/src/screens/notification/index.tsx +0 -1
  565. package/src/screens/notification/store.tsx +7 -2
  566. package/src/screens/personal/index.tsx +21 -19
  567. package/src/screens/qualify/Store.tsx +0 -1
  568. package/src/screens/quick-submit/store.tsx +85 -15
  569. package/src/screens/schedule-payment/DigitalSchedulePayment.tsx +20 -4
  570. package/src/screens/schedule-payment/store.tsx +13 -5
  571. package/src/screens/selfie/SelfieStore.tsx +25 -9
  572. package/src/screens/selfie/index.tsx +0 -1
  573. package/src/screens/sign-tima/ViewContract.tsx +17 -18
  574. package/src/screens/sign-tima/store.tsx +37 -7
  575. package/src/screens/toan-trinh-so/LoanInterestRate.tsx +36 -10
  576. package/src/screens/toan-trinh-so/OCR.tsx +321 -609
  577. package/src/screens/toan-trinh-so/RegisterBack.tsx +21 -4
  578. package/src/screens/toan-trinh-so/RegisterCamera.tsx +50 -54
  579. package/src/screens/toan-trinh-so/ReviewInformation.tsx +31 -25
  580. package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +88 -82
  581. package/src/screens/toan-trinh-so/ReviewLoan.tsx +25 -5
  582. package/src/screens/toan-trinh-so/TTSNationalIDBack.tsx +19 -4
  583. package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +19 -4
  584. package/src/screens/toan-trinh-so/TTSOTP.tsx +42 -25
  585. package/src/screens/toan-trinh-so/TTSSelfie.tsx +63 -56
  586. package/src/screens/toan-trinh-so/TTSSignLoan.tsx +63 -55
  587. package/src/screens/toan-trinh-so/TopupLoanInfo.tsx +50 -43
  588. package/src/screens/toan-trinh-so/VehicleCamera.tsx +275 -341
  589. package/src/screens/toan-trinh-so/VehicleRegistration.tsx +19 -4
  590. package/src/screens/toan-trinh-so/VehicleRegistrationBack.tsx +19 -4
  591. package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +19 -4
  592. package/src/screens/toan-trinh-so/store.ts +82 -37
  593. package/src/screens/uploadVideo/index.tsx +26 -21
  594. package/src/screens/uploadVideo/videoStore.tsx +19 -4
  595. package/src/screens/v3/AssetInformation.tsx +35 -16
  596. package/src/screens/v3/LoanBuyCar.tsx +35 -16
  597. package/src/services/api/api.ts +23 -26
  598. package/src/utils/cameraCrop.ts +96 -0
  599. package/lib/commonjs/components/ItemTimaOneV2.js +0 -2
  600. package/lib/commonjs/components/ItemTimaOneV2.js.flow +0 -617
  601. package/lib/commonjs/components/ItemTimaOneV2.js.map +0 -1
  602. package/lib/commonjs/components/ItemTimaOneV3.js +0 -2
  603. package/lib/commonjs/components/ItemTimaOneV3.js.map +0 -1
  604. package/lib/module/components/ItemTimaOneV2.js +0 -2
  605. package/lib/module/components/ItemTimaOneV2.js.map +0 -1
  606. package/lib/module/components/ItemTimaOneV3.js +0 -2
  607. package/lib/module/components/ItemTimaOneV3.js.map +0 -1
  608. package/lib/typescript/components/ItemTimaOneV2.d.ts +0 -7
  609. package/lib/typescript/components/ItemTimaOneV2.d.ts.map +0 -1
  610. package/lib/typescript/components/ItemTimaOneV3.d.ts +0 -7
  611. package/lib/typescript/components/ItemTimaOneV3.d.ts.map +0 -1
  612. package/src/components/ItemTimaOneV2.tsx +0 -617
@@ -1,19 +1,20 @@
1
1
  //@ts-nocheck
2
- import React, { useEffect, useRef, useState } from 'react';
3
- import { observer, Observer } from 'mobx-react-lite';
2
+ import React, {
3
+ useCallback,
4
+ useEffect,
5
+ useMemo,
6
+ useRef,
7
+ useState,
8
+ } from 'react';
9
+ import { observer } from 'mobx-react-lite';
4
10
  import {
5
11
  View,
6
- NativeModules,
7
12
  TouchableOpacity,
8
- SafeAreaView,
9
13
  TextStyle,
10
14
  ViewStyle,
11
15
  ImageStyle,
12
16
  Image,
13
- ActivityIndicator,
14
- Dimensions,
15
17
  StyleSheet,
16
- Alert,
17
18
  Platform,
18
19
  } from 'react-native';
19
20
  import { MText } from '../../components/MText';
@@ -24,56 +25,66 @@ import {
24
25
  RESULTS,
25
26
  openSettings,
26
27
  } from 'react-native-permissions';
27
- import {
28
- Camera as VisionCamera,
29
- useCameraDevice,
30
- useCameraFormat,
31
- } from 'react-native-vision-camera';
28
+ import { Camera as VisionCamera, useCameraDevices } from 'react-native-vision-camera';
32
29
  import Modal from 'react-native-modal';
33
30
  import LinearGradient from 'react-native-linear-gradient';
34
- import {
35
- Cam2Svg,
36
- ChipSvg,
37
- CloseIcon,
38
- IconBackWhite,
39
- TakePhotoSvg,
40
- TimaSmall,
41
- } from '../../assets/icons';
42
- import MButton from '../../components/MButton';
43
- import { commonStyles } from '../CommonStyles';
44
- import {
45
- StackActions,
46
- useNavigation,
47
- useIsFocused,
48
- } from '@react-navigation/native';
49
- import TextRecognition from '@react-native-ml-kit/text-recognition';
31
+ import { CloseIcon, IconBack, TakePhotoSvg, TimaSmall } from '../../assets/icons';
32
+ import { useNavigation, useIsFocused } from '@react-navigation/native';
50
33
  import { ScreenNames } from '../../navigation';
51
- import { Api } from '../../services/api';
52
- import Loading from '../../components/Loading';
53
- import DeviceInfo from 'react-native-device-info';
54
34
  import { IconUpload } from '../../assets/svgs';
55
35
  import ImagePicker from 'react-native-image-crop-picker';
56
36
  import { launchImageLibrary } from 'react-native-image-picker';
57
37
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
38
+ import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
39
+ import {
40
+ cropPhotoToAspect,
41
+ pickClosestFocusDevice,
42
+ } from '../../utils/cameraCrop';
58
43
 
59
- const { NFCReader } = NativeModules;
44
+ const ORANGE = '#F05123';
45
+ // Thẻ CMND/CCCD theo chuẩn ID-1: 85.6mm x 54mm
46
+ const CARD_ASPECT_RATIO = 85.6 / 54;
60
47
 
61
48
  export const OCR = observer(function OCR(props: any) {
62
49
  const insets = useSafeAreaInsets();
63
50
  const isFocused = useIsFocused();
64
- const [isLoading, setIsLoading] = useState(false);
65
51
  const navigation = useNavigation();
66
52
  const [showModal, setShowModal] = useState(false);
67
- const [type, setType] = useState('passport');
68
53
  const [taking, setTaking] = useState(false);
69
54
  const [passPermission, setPassPermission] = useState(false);
70
55
  const [shouldRenderCamera, setShouldRenderCamera] = useState(false);
56
+ const [focusPoint, setFocusPoint] = useState(null);
57
+
71
58
  const myCamera = useRef(null);
72
- const device = useCameraDevice('back');
73
- const format = useCameraFormat(device, [
74
- { photoResolution: { width: 1280, height: 720 } },
59
+ const frameSize = useRef({ width: 0, height: 0 });
60
+ const focusTimer = useRef(null);
61
+
62
+ // Chọn ống kính sau lấy nét gần nhất (macro) để chụp cận thẻ mà không mờ
63
+ const devices = useCameraDevices();
64
+ const device = useMemo(() => pickClosestFocusDevice(devices, 'back'), [
65
+ devices,
75
66
  ]);
76
67
 
68
+ const front = props?.route?.params?.front;
69
+
70
+ // Lấy nét vào một điểm (toạ độ theo hệ khung preview = camera view). Dùng cho
71
+ // chạm-để-lấy-nét và lấy nét giữa khung trước khi chụp -> tránh mờ khi gần.
72
+ const focusAt = useCallback(
73
+ async (x, y) => {
74
+ const cam = myCamera.current;
75
+ if (cam == null || !device?.supportsFocus) return;
76
+ setFocusPoint({ x, y });
77
+ if (focusTimer.current) clearTimeout(focusTimer.current);
78
+ focusTimer.current = setTimeout(() => setFocusPoint(null), 800);
79
+ try {
80
+ await cam.focus({ x, y });
81
+ } catch (e) {
82
+ // focus có thể lỗi nếu đang lấy nét dở hoặc điểm ngoài vùng -> bỏ qua
83
+ }
84
+ },
85
+ [device]
86
+ );
87
+
77
88
  const requestPermissions = () => {
78
89
  request(
79
90
  Platform.OS === 'ios'
@@ -85,51 +96,49 @@ export const OCR = observer(function OCR(props: any) {
85
96
  console.log(
86
97
  'This feature is not available (on this device / in this context)'
87
98
  );
88
- Alert.alert(
89
- 'Thông báo',
90
- 'Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',
91
- [{ text: 'Đồng ý' }]
92
- );
99
+ AlertGlobal.show({
100
+ type: 'warning',
101
+ title: 'Thông báo',
102
+ message:
103
+ 'Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',
104
+ primaryText: 'Đóng',
105
+ });
93
106
  break;
94
107
  case RESULTS.DENIED:
95
108
  console.log(
96
109
  'The permission has not been requested / is denied but requestable'
97
110
  );
98
- Alert.alert(
99
- 'Thông báo',
100
- 'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
101
- [
102
- {
103
- text: 'Đồng ý',
104
- onPress: () => {
105
- if (Platform.OS === 'ios') {
106
- openSettings();
107
- } else {
108
- requestPermissions();
109
- }
110
- },
111
- },
112
- ]
113
- );
111
+ AlertGlobal.show({
112
+ type: 'warning',
113
+ title: 'Thông báo',
114
+ message:
115
+ 'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
116
+ primaryText: 'Đồng ý',
117
+ onPrimaryPress: () => {
118
+ if (Platform.OS === 'ios') {
119
+ openSettings();
120
+ } else {
121
+ requestPermissions();
122
+ }
123
+ },
124
+ });
114
125
  break;
115
126
  case RESULTS.LIMITED:
116
127
  console.log('The permission is limited: some actions are possible');
117
- Alert.alert(
118
- 'Thông báo',
119
- 'Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',
120
- [
121
- {
122
- text: 'Đồng ý',
123
- onPress: () => {
124
- if (Platform.OS === 'ios') {
125
- openSettings();
126
- } else {
127
- requestPermissions();
128
- }
129
- },
130
- },
131
- ]
132
- );
128
+ AlertGlobal.show({
129
+ type: 'warning',
130
+ title: 'Thông báo',
131
+ message:
132
+ 'Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',
133
+ primaryText: 'Đồng ý',
134
+ onPrimaryPress: () => {
135
+ if (Platform.OS === 'ios') {
136
+ openSettings();
137
+ } else {
138
+ requestPermissions();
139
+ }
140
+ },
141
+ });
133
142
  break;
134
143
  case RESULTS.GRANTED:
135
144
  console.log('The permission is granted');
@@ -137,22 +146,20 @@ export const OCR = observer(function OCR(props: any) {
137
146
  break;
138
147
  case RESULTS.BLOCKED:
139
148
  console.log('The permission is denied and not requestable anymore');
140
- Alert.alert(
141
- 'Thông báo',
142
- 'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
143
- [
144
- {
145
- text: 'Đồng ý',
146
- onPress: () => {
147
- if (Platform.OS === 'ios') {
148
- openSettings();
149
- } else {
150
- openSettings();
151
- }
152
- },
153
- },
154
- ]
155
- );
149
+ AlertGlobal.show({
150
+ type: 'warning',
151
+ title: 'Thông báo',
152
+ message:
153
+ 'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
154
+ primaryText: 'Đồng ý',
155
+ onPrimaryPress: () => {
156
+ if (Platform.OS === 'ios') {
157
+ openSettings();
158
+ } else {
159
+ requestPermissions();
160
+ }
161
+ },
162
+ });
156
163
  break;
157
164
  }
158
165
  });
@@ -182,129 +189,19 @@ export const OCR = observer(function OCR(props: any) {
182
189
  useEffect(() => {
183
190
  requestPermissions();
184
191
  loadIntro();
192
+ return () => {
193
+ if (focusTimer.current) clearTimeout(focusTimer.current);
194
+ };
185
195
  }, []);
186
196
 
187
- const saveDataNfc = async (body) => {
188
- try {
189
- const response = await Api.getInstance().saveNfcInfo({
190
- ...body,
191
- loanBriefId: props?.route?.params?.loan?.id,
192
- });
193
- if (response.kind === 'ok') {
194
- if (response.data?.meta?.errorCode === 200) {
195
- setTimeout(() => {
196
- navigation.push(ScreenNames.TTSSelfie, {
197
- loan: props?.route?.params?.loan,
198
- });
199
- }, 500);
200
- } else {
201
- Alert.alert('Thông báo', response?.data?.meta?.errorMessage);
202
- }
203
- } else {
204
- Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau');
205
- }
206
- } catch (error) {
207
- console.log(error);
208
- }
209
- };
210
-
211
- const convertToDate = (input, end) => {
212
- let yearPrefix = input.substring(0, 2);
213
- let year = end
214
- ? '20' + yearPrefix
215
- : parseInt(yearPrefix) > 20
216
- ? '19' + yearPrefix
217
- : '20' + yearPrefix;
218
- let month = input.substring(2, 4);
219
- let day = input.substring(4, 6);
220
-
221
- return year + '-' + month + '-' + day;
222
- };
223
-
224
- const extractMRZInfo = (text) => {
225
- let documentNumber = '';
226
- let birthDate = '';
227
- let expirationDate = '';
228
- const regex1 = /VNM(\d{9})/;
229
- const match1 = text.match(regex1);
230
-
231
- // If a match is found, return the 9 digits, otherwise return null
232
- if (match1) {
233
- documentNumber = match1[1];
234
- }
235
-
236
- console.log('documentNumber', documentNumber);
237
-
238
- // Regular expression to match 'VNM' followed by 9 digits, then two 6-digit numbers
239
- const regex = /(\d{6}).[MF](\d{6})/;
240
-
241
- // Search for the pattern in the text
242
- const match = text.replace(/ /g, '').match(regex);
243
-
244
- // If a match is found, return the captured groups, otherwise return null
245
- if (match) {
246
- console.log({
247
- documentNumber: documentNumber,
248
- birthDate: match[1],
249
- expirationDate: match[2],
250
- });
251
- (birthDate = match[1]), (expirationDate = match[2]);
252
- } else {
253
- return null;
254
- }
255
- if (documentNumber && birthDate && expirationDate) {
256
- try {
257
- NFCReader.readNFCCard(
258
- documentNumber,
259
- convertToDate(birthDate, false),
260
- convertToDate(expirationDate, true),
261
- (error, response) => {
262
- try {
263
- const convertData = JSON.parse(response);
264
- saveDataNfc(convertData);
265
- } catch (e) {
266
- console.log(e);
267
- }
268
- }
269
- );
270
- } catch (e) {
271
- console.log(e);
272
- }
273
- }
274
- };
275
-
276
- const handleTextRecognition = async (imagePath) => {
277
- try {
278
- const result = await TextRecognition.recognize(imagePath);
279
- extractMRZInfo(result.text);
280
- } catch (error) {
281
- console.log(error);
282
- }
283
- };
284
-
285
- const scanNfc = async () => {
286
- if (myCamera.current) {
287
- const data = await myCamera.current.takePhoto({
288
- qualityPrioritization: 'speed',
289
- });
290
- await handleTextRecognition('file://' + data.path);
291
- }
292
- };
293
-
294
- const takePhoto = async () => {
295
- if (myCamera.current == null || taking) return;
296
- setTaking(true);
297
- const data = await myCamera.current.takePhoto({
298
- qualityPrioritization: 'quality',
299
- });
300
- const uri = 'file://' + data.path;
301
- setTaking(false);
302
- if (props?.route?.params?.front && !props.route?.params?.callback) {
197
+ // Điều hướng sau khi có ảnh (giữ nguyên logic gốc của OCR)
198
+ const goNextWithUri = (uri) => {
199
+ if (front && !props.route?.params?.callback) {
303
200
  navigation.push(ScreenNames.TTSNationalIDFront, {
304
201
  uri,
305
202
  loan: props?.route?.params?.loan,
306
203
  });
307
- } else if (!props?.route?.params?.front && !props.route?.params?.callback) {
204
+ } else if (!front && !props.route?.params?.callback) {
308
205
  navigation.push(ScreenNames.TTSNationalIDBack, {
309
206
  uri,
310
207
  loan: props?.route?.params?.loan,
@@ -315,229 +212,135 @@ export const OCR = observer(function OCR(props: any) {
315
212
  }
316
213
  };
317
214
 
215
+ const takePhoto = async () => {
216
+ if (myCamera.current == null || taking) return;
217
+ setTaking(true);
218
+ try {
219
+ // Lấy nét giữa khung trước khi chụp để tài liệu ở gần vẫn nét
220
+ const { width: fw, height: fh } = frameSize.current;
221
+ if (device?.supportsFocus && fw && fh) {
222
+ try {
223
+ await myCamera.current.focus({ x: fw / 2, y: fh / 2 });
224
+ } catch (e) {}
225
+ }
226
+ const data = await myCamera.current.takePhoto({
227
+ qualityPrioritization: 'quality',
228
+ });
229
+ // Cắt ảnh vừa đúng khung theo tỉ lệ thẻ (xử lý orientation trong util)
230
+ const uri = await cropPhotoToAspect(data, CARD_ASPECT_RATIO);
231
+ setTaking(false);
232
+ goNextWithUri(uri);
233
+ } catch (e) {
234
+ console.error(e);
235
+ setTaking(false);
236
+ AlertGlobal.show({
237
+ type: 'warning',
238
+ title: 'Thông báo',
239
+ message: 'Không chụp được ảnh. Vui lòng thử lại.',
240
+ primaryText: 'Đóng',
241
+ });
242
+ }
243
+ };
244
+
318
245
  const pickImageFromGallery = async () => {
319
246
  if (Platform.OS === 'android') {
320
- const result = await launchImageLibrary({
321
- mediaType: 'photo',
322
- });
247
+ const result = await launchImageLibrary({ mediaType: 'photo' });
323
248
  if (result.assets) {
324
- if (props?.route?.params?.front && !props.route?.params?.callback) {
325
- navigation.push(ScreenNames.TTSNationalIDFront, {
326
- uri: result.assets[0]?.uri,
327
- loan: props?.route?.params?.loan,
328
- });
329
- } else if (
330
- !props?.route?.params?.front &&
331
- !props.route?.params?.callback
332
- ) {
333
- navigation.push(ScreenNames.TTSNationalIDBack, {
334
- uri: result.assets[0]?.uri,
335
- loan: props?.route?.params?.loan,
336
- });
337
- } else {
338
- navigation.goBack();
339
- props.route?.params?.callback(result.assets[0]?.uri);
340
- }
249
+ goNextWithUri(result.assets[0]?.uri);
341
250
  }
342
251
  } else {
343
252
  ImagePicker.openPicker({}).then((image) => {
344
- if (props?.route?.params?.front && !props.route?.params?.callback) {
345
- navigation.push(ScreenNames.TTSNationalIDFront, {
346
- uri:
347
- Platform.OS === 'android' ? image?.path : 'file://' + image?.path,
348
- loan: props?.route?.params?.loan,
349
- });
350
- } else if (
351
- !props?.route?.params?.front &&
352
- !props.route?.params?.callback
353
- ) {
354
- navigation.push(ScreenNames.TTSNationalIDBack, {
355
- uri:
356
- Platform.OS === 'android' ? image?.path : 'file://' + image?.path,
357
- loan: props?.route?.params?.loan,
358
- });
359
- } else {
360
- navigation.goBack();
361
- props.route?.params?.callback(
362
- Platform.OS === 'android' ? image?.path : 'file://' + image?.path
363
- );
364
- }
253
+ goNextWithUri(
254
+ Platform.OS === 'android' ? image?.path : 'file://' + image?.path
255
+ );
365
256
  });
366
257
  }
367
258
  };
368
259
 
369
260
  return (
370
- <View
371
- style={{ flex: 1, backgroundColor: 'black' }}
372
- pointerEvents={'box-none'}
373
- >
374
- <View
375
- style={{
376
- alignItems: 'center',
377
- position: 'absolute',
378
- top: insets.top + 16,
379
- left: 0,
380
- right: 0,
381
- zIndex: 100,
382
- }}
383
- >
384
- <TouchableOpacity
385
- onPress={() => {
386
- navigation.navigate(ScreenNames.Main);
387
- }}
388
- style={{
389
- position: 'absolute',
390
- left: 10,
391
- top: 4,
392
- width: 24,
393
- height: 24,
394
- alignItems: 'center',
395
- justifyContent: 'center',
396
- }}
397
- >
398
- <IconBackWhite />
399
- </TouchableOpacity>
400
-
401
- <MText
402
- style={{
403
- color: 'white',
404
- fontSize: 16,
405
- textAlign: 'center',
406
- padding: 16,
407
- marginTop: 10,
408
- }}
409
- >
410
- {type === 'passport' && props?.route?.params?.front
411
- ? 'Chụp CMND/ CCCD mặt trước'
412
- : type === 'passport'
413
- ? 'Chụp CMND/ CCCD mặt sau'
414
- : 'Dùng camera để quét chuỗi ký tự mặt sau thẻ CCCD gắn chíp ở phía dưới'}
415
- </MText>
416
- </View>
417
-
418
- {passPermission && type === 'passport' && shouldRenderCamera ? (
419
- <View
420
- style={[
421
- commonStyles.alignCenter,
422
- commonStyles.fill,
423
- commonStyles.justifyCenter,
424
- {
425
- position: 'absolute',
426
- width: Dimensions.get('window').width,
427
- height: Dimensions.get('window').height,
428
- },
429
- ]}
430
- >
431
- {device ? (
432
- <View style={styles.passportCameraFrame}>
261
+ <View style={styles.container}>
262
+ {passPermission && shouldRenderCamera ? (
263
+ <>
264
+ <View style={[styles.header, { paddingTop: insets.top + 16 }]}>
265
+ <TouchableOpacity
266
+ onPress={() => navigation.navigate(ScreenNames.Main)}
267
+ hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
268
+ >
269
+ <IconBack />
270
+ </TouchableOpacity>
271
+ <View style={styles.titleWrap}>
272
+ <MText style={styles.headerTitle}>CMND / CCCD</MText>
273
+ </View>
274
+ </View>
275
+
276
+ <MText style={styles.instruction}>
277
+ {front ? 'Chụp CMND/ CCCD mặt trước' : 'Chụp CMND/ CCCD mặt sau'}
278
+ </MText>
279
+
280
+ {/* Khung tỉ lệ thẻ: vùng nhìn thấy của preview = vùng sẽ crop.
281
+ Chạm vào khung để lấy nét thủ công. */}
282
+ <View
283
+ style={styles.photoFrame}
284
+ onLayout={(e) => {
285
+ frameSize.current = e.nativeEvent.layout;
286
+ }}
287
+ onStartShouldSetResponder={() => true}
288
+ onResponderRelease={(e) =>
289
+ focusAt(e.nativeEvent.locationX, e.nativeEvent.locationY)
290
+ }
291
+ >
292
+ {device ? (
433
293
  <VisionCamera
434
294
  ref={myCamera}
435
295
  style={StyleSheet.absoluteFill}
436
296
  device={device}
437
- isActive={true}
297
+ isActive={isFocused}
438
298
  photo={true}
439
- format={format}
440
299
  />
441
- </View>
442
- ) : (
443
- <ActivityIndicator />
444
- )}
300
+ ) : null}
301
+ <View style={[styles.corner, styles.cornerTL]} />
302
+ <View style={[styles.corner, styles.cornerTR]} />
303
+ <View style={[styles.corner, styles.cornerBL]} />
304
+ <View style={[styles.corner, styles.cornerBR]} />
305
+ {focusPoint && (
306
+ <View
307
+ pointerEvents="none"
308
+ style={[
309
+ styles.focusRing,
310
+ { left: focusPoint.x - 32, top: focusPoint.y - 32 },
311
+ ]}
312
+ />
313
+ )}
314
+ </View>
315
+
445
316
  <TouchableOpacity
446
- onPress={() => {
447
- pickImageFromGallery();
448
- }}
449
- style={{
450
- flexDirection: 'row',
451
- alignItems: 'center',
452
- marginTop: 16,
453
- }}
317
+ style={styles.galleryButton}
318
+ onPress={pickImageFromGallery}
454
319
  >
455
320
  <IconUpload />
456
- <MText
457
- style={{
458
- color: 'white',
459
- fontSize: 12,
460
- marginLeft: 8,
461
- }}
462
- >
463
- Tải ảnh từ thư viện
464
- </MText>
321
+ <MText style={styles.galleryText}>Tải ảnh từ thư viện</MText>
465
322
  </TouchableOpacity>
466
323
 
467
- <View style={[styles.buttonContainer, { bottom: insets.bottom }]}>
468
- <MText
469
- style={{
470
- color: 'white',
471
- fontSize: 14,
472
- textAlign: 'center',
473
- padding: 16,
474
- }}
475
- >
476
- Vui lòng đặt giấy tờ nằm vừa khung hình chữ nhật, chụp đủ ánh sáng
477
- và rõ nét.
478
- </MText>
479
- <MButton
480
- onPress={() => {
481
- takePhoto();
482
- }}
483
- >
484
- <TakePhotoSvg />
485
- </MButton>
486
- </View>
487
- </View>
488
- ) : passPermission && type === 'nfc' && shouldRenderCamera ? (
489
- <>
490
- {device ? (
491
- <VisionCamera
492
- ref={myCamera}
493
- style={styles.camera}
494
- device={device}
495
- isActive={true}
496
- photo={true}
497
- format={format}
498
- />
499
- ) : null}
500
- <View style={styles.overlay}>
501
- <View style={styles.overlayTop} />
502
- <View style={styles.overlayCenter}>
503
- <View style={styles.overlayLeft} />
504
- <View style={styles.overlayRect}></View>
505
- <View style={styles.overlayRight} />
506
- </View>
507
- <View style={styles.overlayBottom} />
508
- </View>
509
- <View
510
- style={[styles.buttonContainer, { bottom: insets.bottom + 24 }]}
324
+ <View style={styles.spacer} />
325
+ <MText style={[styles.hint, { marginTop: 0, marginBottom: 20 }]}>
326
+ Đưa giấy tờ lại gần cho vừa khung, chạm vào màn hình{'\n'}để lấy nét
327
+ nếu ảnh bị mờ.
328
+ </MText>
329
+ <TouchableOpacity
330
+ style={[styles.captureButton, { marginBottom: insets.bottom + 24 }]}
331
+ onPress={takePhoto}
332
+ disabled={taking}
511
333
  >
512
- <MText
513
- style={{
514
- color: 'white',
515
- fontSize: 14,
516
- textAlign: 'center',
517
- padding: 16,
518
- }}
519
- >
520
- Vui lòng đặt chuỗi kí tự nằm vừa khung hình chữ nhật, chụp đủ ánh
521
- sáng và rõ nét.
522
- </MText>
523
- <TouchableOpacity
524
- onPress={() => {
525
- scanNfc();
526
- }}
527
- >
528
- <TakePhotoSvg />
529
- </TouchableOpacity>
530
- </View>
334
+ <TakePhotoSvg />
335
+ </TouchableOpacity>
531
336
  </>
532
- ) : (
533
- <></>
534
- )}
337
+ ) : null}
535
338
 
536
339
  <Modal
537
340
  isVisible={showModal}
538
341
  style={$modal}
539
342
  backdropTransitionInTiming={0}
540
- nimationOutTiming={200}
343
+ animationOutTiming={200}
541
344
  animationInTiming={200}
542
345
  animationIn={'slideInUp'}
543
346
  animationOut={'fadeOutDown'}
@@ -566,9 +369,7 @@ export const OCR = observer(function OCR(props: any) {
566
369
  <CloseIcon />
567
370
  </TouchableOpacity>
568
371
  <MText style={$title}>NHẬN DIỆN GIẤY TỜ TÙY THÂN</MText>
569
- <MText style={$description}>
570
- Chụp ảnh 2 mặt hoặc NFC CCCD/ CMND
571
- </MText>
372
+ <MText style={$description}>Chụp ảnh 2 mặt CCCD/ CMND</MText>
572
373
 
573
374
  <Image
574
375
  source={require('../../assets/tts/vehicleStep.png')}
@@ -576,52 +377,9 @@ export const OCR = observer(function OCR(props: any) {
576
377
  />
577
378
 
578
379
  <View style={$bg}>
579
- <View
580
- style={{
581
- flexDirection: 'column',
582
- alignItems: 'center',
583
- }}
584
- >
585
- <Image
586
- source={require('../../assets/tts/Frame1000011946.png')}
587
- style={{
588
- width: '60%',
589
- height: 70,
590
- resizeMode: 'contain',
591
- marginVertical: 16,
592
- }}
593
- />
594
- </View>
595
- <View style={{ marginTop: 10, paddingHorizontal: 24 }}>
596
- <MText style={[$title2, { textAlign: 'left' }]}>
597
- Cách 1: NFC (Áp dụng cho CCCD gắn chip)
598
- </MText>
599
- <View style={$row}>
600
- <TimaSmall />
601
- <MText style={$txt}>
602
- Đặt phần chip đồng gần lại với phần phía trên của{'\n'}mặt
603
- lưng điện thoại
604
- </MText>
605
- </View>
606
- <View style={$row}>
607
- <TimaSmall />
608
- <MText style={$txt}>
609
- Giữ nguyên cho đến khi đọc xong thông tin thẻ
610
- </MText>
611
- </View>
612
- <Image
613
- source={require('../../assets/tts/Frame1000011953.png')}
614
- style={{
615
- width: '100%',
616
- height: 70,
617
- resizeMode: 'contain',
618
- marginTop: 16,
619
- }}
620
- />
621
- </View>
622
- <View style={{ marginTop: 10, paddingHorizontal: 24 }}>
380
+ <View style={{ marginTop: 16, paddingHorizontal: 24 }}>
623
381
  <MText style={[$title2, { textAlign: 'left' }]}>
624
- Cách 2: Chụp 2 mặt
382
+ Lưu ý chụp CCCD/ CMND
625
383
  </MText>
626
384
  <View style={$row}>
627
385
  <TimaSmall />
@@ -653,82 +411,131 @@ export const OCR = observer(function OCR(props: any) {
653
411
  />
654
412
  </View>
655
413
 
656
- <View
414
+ <TouchableOpacity
415
+ onPress={() => {
416
+ setShowModal(false);
417
+ save(OCR_V1, true);
418
+ }}
657
419
  style={{
658
- flexDirection: 'row',
659
- alignItems: 'center',
660
420
  margin: 16,
421
+ height: 40,
422
+ alignItems: 'center',
423
+ justifyContent: 'center',
424
+ borderRadius: 40,
425
+ borderWidth: 1,
426
+ borderColor: '#EF592E',
661
427
  }}
662
428
  >
663
- <TouchableOpacity
664
- onPress={() => {
665
- setType('passport');
666
- setShowModal(false);
667
- save(OCR_V1, true);
668
- }}
669
- style={{
670
- flex: 1,
671
- borderWidth: 1,
672
- borderColor: '#EF592E',
673
- height: 40,
674
- alignItems: 'center',
675
- justifyContent: 'center',
676
- borderRadius: 40,
677
- // marginRight: 16,
678
- }}
679
- >
680
- <MText
681
- style={{
682
- color: '#EF592E',
683
- fontSize: 16,
684
- }}
685
- >
686
- Chụp 2 mặt
687
- </MText>
688
- </TouchableOpacity>
689
- {/* <MButton
690
- style={{
691
- flex: 1,
692
- }}
693
- onPress={() => {
694
- setType('nfc');
695
- setShowModal(false);
696
- save(OCR_V1, true);
697
- }}
698
- >
699
- <LinearGradient
700
- start={{ x: 1, y: 0 }}
701
- end={{ x: 0, y: 1 }}
702
- style={{
703
- height: 40,
704
- marginVertical: 16,
705
- borderRadius: 30,
706
- alignItems: 'center',
707
- justifyContent: 'center',
708
- }}
709
- colors={['#FF7A00', '#EF4123']}
710
- >
711
- <MText
712
- style={{
713
- fontSize: 16,
714
- color: 'white',
715
- }}
716
- >
717
- NFC
718
- </MText>
719
- </LinearGradient>
720
- </MButton> */}
721
- </View>
722
- <View style={{ height: 24 }}></View>
429
+ <MText style={{ color: '#EF592E', fontSize: 16 }}>
430
+ Chụp 2 mặt
431
+ </MText>
432
+ </TouchableOpacity>
433
+ <View style={{ height: 24 }} />
723
434
  </View>
724
435
  </View>
725
436
  </LinearGradient>
726
437
  </Modal>
727
-
728
- <Loading isLoading={isLoading} />
729
438
  </View>
730
439
  );
731
440
  });
441
+
442
+ const styles = StyleSheet.create({
443
+ container: { flex: 1, backgroundColor: '#FFFFFF' },
444
+ header: {
445
+ flexDirection: 'row',
446
+ alignItems: 'center',
447
+ paddingHorizontal: 16,
448
+ paddingTop: 8,
449
+ },
450
+ titleWrap: {
451
+ flex: 1,
452
+ alignItems: 'center',
453
+ justifyContent: 'center',
454
+ marginRight: 24,
455
+ },
456
+ headerTitle: { color: '#333333', fontSize: 16, fontWeight: '600' },
457
+ instruction: {
458
+ textAlign: 'center',
459
+ color: '#333333',
460
+ fontSize: 14,
461
+ lineHeight: 20,
462
+ marginTop: 20,
463
+ marginBottom: 28,
464
+ },
465
+ photoFrame: {
466
+ marginHorizontal: 24,
467
+ aspectRatio: CARD_ASPECT_RATIO,
468
+ borderRadius: 8,
469
+ overflow: 'hidden',
470
+ backgroundColor: '#000000',
471
+ },
472
+ corner: {
473
+ position: 'absolute',
474
+ width: 26,
475
+ height: 26,
476
+ borderColor: ORANGE,
477
+ },
478
+ focusRing: {
479
+ position: 'absolute',
480
+ width: 64,
481
+ height: 64,
482
+ borderRadius: 8,
483
+ borderWidth: 1.5,
484
+ borderColor: '#FFD54A',
485
+ },
486
+ cornerTL: {
487
+ top: 0,
488
+ left: 0,
489
+ borderTopWidth: 4,
490
+ borderLeftWidth: 4,
491
+ borderTopLeftRadius: 8,
492
+ },
493
+ cornerTR: {
494
+ top: 0,
495
+ right: 0,
496
+ borderTopWidth: 4,
497
+ borderRightWidth: 4,
498
+ borderTopRightRadius: 8,
499
+ },
500
+ cornerBL: {
501
+ bottom: 0,
502
+ left: 0,
503
+ borderBottomWidth: 4,
504
+ borderLeftWidth: 4,
505
+ borderBottomLeftRadius: 8,
506
+ },
507
+ cornerBR: {
508
+ bottom: 0,
509
+ right: 0,
510
+ borderBottomWidth: 4,
511
+ borderRightWidth: 4,
512
+ borderBottomRightRadius: 8,
513
+ },
514
+ galleryButton: {
515
+ alignSelf: 'center',
516
+ flexDirection: 'row',
517
+ alignItems: 'center',
518
+ gap: 8,
519
+ marginTop: 20,
520
+ paddingHorizontal: 14,
521
+ paddingVertical: 8,
522
+ borderRadius: 8,
523
+ borderWidth: 1,
524
+ borderColor: ORANGE,
525
+ backgroundColor: '#FFFFFF',
526
+ },
527
+ galleryText: { color: '#333333', fontSize: 13 },
528
+ hint: {
529
+ textAlign: 'center',
530
+ color: '#555555',
531
+ fontSize: 13,
532
+ lineHeight: 19,
533
+ marginTop: 48,
534
+ },
535
+ spacer: { flex: 1 },
536
+ captureButton: { alignSelf: 'center' },
537
+ });
538
+
732
539
  const $row: ViewStyle = {
733
540
  flexDirection: 'row',
734
541
  alignItems: 'center',
@@ -776,10 +583,6 @@ const $description: TextStyle = {
776
583
  textAlign: 'center',
777
584
  };
778
585
 
779
- const $flex: ViewStyle = {
780
- flex: 1,
781
- };
782
-
783
586
  const $modal: ViewStyle = {
784
587
  justifyContent: 'flex-end',
785
588
  margin: 0,
@@ -789,94 +592,3 @@ const $container: ViewStyle = {
789
592
  borderTopRightRadius: 26,
790
593
  borderTopLeftRadius: 26,
791
594
  };
792
-
793
- const styles = StyleSheet.create({
794
- container: {
795
- flex: 1,
796
- },
797
- camera: {
798
- flex: 1,
799
- },
800
- passportCameraFrame: {
801
- width: Dimensions.get('window').width,
802
- height: 260,
803
- overflow: 'hidden',
804
- backgroundColor: 'black',
805
- },
806
- buttonContainer: {
807
- flex: 0,
808
- flexDirection: 'column',
809
- justifyContent: 'center',
810
- alignItems: 'center',
811
- position: 'absolute',
812
- left: 0,
813
- right: 0,
814
- zIndex: 1000,
815
- },
816
- captureButton: {
817
- width: 56,
818
- height: 56,
819
- borderRadius: 35,
820
- backgroundColor: 'white',
821
- justifyContent: 'center',
822
- alignItems: 'center',
823
- },
824
- innerCaptureButton: {
825
- width: 60,
826
- height: 60,
827
- borderRadius: 30,
828
- backgroundColor: 'red',
829
- },
830
- overlay: {
831
- position: 'absolute',
832
- top: 0,
833
- left: 0,
834
- right: 0,
835
- bottom: 0,
836
- justifyContent: 'center',
837
- alignItems: 'center',
838
- },
839
- overlayTop: {
840
- flex: 1,
841
- backgroundColor: 'black',
842
- width: '100%',
843
- },
844
- overlayCenter: {
845
- flexDirection: 'row',
846
- },
847
- overlayLeft: {
848
- flex: 1,
849
- backgroundColor: 'black',
850
- },
851
- overlayRect: {
852
- width: '90%',
853
- height: 100,
854
- borderColor: 'white',
855
- borderWidth: 2,
856
- justifyContent: 'center',
857
- alignItems: 'center',
858
- },
859
- instructionText: {
860
- color: 'white',
861
- textAlign: 'center',
862
- paddingHorizontal: 10,
863
- fontSize: 14,
864
- position: 'absolute',
865
- top: -50,
866
- },
867
- overlayRight: {
868
- flex: 1,
869
- backgroundColor: 'black',
870
- },
871
- overlayBottom: {
872
- flex: 1,
873
- backgroundColor: 'black',
874
- width: '100%',
875
- },
876
- mrzContainer: {
877
- padding: 10,
878
- },
879
- mrzText: {
880
- fontSize: 16,
881
- },
882
- });