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.
- package/lib/commonjs/AppStore.js +1 -1
- package/lib/commonjs/AppStore.js.flow +7 -2
- package/lib/commonjs/AppStore.js.map +1 -1
- package/lib/commonjs/RNTimacare.js +1 -1
- package/lib/commonjs/RNTimacare.js.flow +7 -1
- package/lib/commonjs/RNTimacare.js.map +1 -1
- package/lib/commonjs/assets/icons/index.js +1 -1
- package/lib/commonjs/assets/icons/index.js.flow +10 -0
- package/lib/commonjs/assets/icons/index.js.map +1 -1
- package/lib/commonjs/assets/icons/modal_confirm.svg +15 -0
- package/lib/commonjs/assets/icons/modal_notice.svg +74 -0
- package/lib/commonjs/assets/icons/modal_success.svg +55 -0
- package/lib/commonjs/assets/icons/modal_warning.svg +48 -0
- package/lib/commonjs/assets/icons/user_security.svg +10 -0
- package/lib/commonjs/assets/tts/Frame1000011947.png +0 -0
- package/lib/commonjs/components/AppModal.js +2 -0
- package/lib/commonjs/components/AppModal.js.flow +34 -0
- package/lib/commonjs/components/AppModal.js.map +1 -0
- package/lib/commonjs/components/ItemTimaOne.js +2 -0
- package/lib/commonjs/components/{ItemTimaOneV3.js.flow → ItemTimaOne.js.flow} +1 -1
- package/lib/commonjs/components/ItemTimaOne.js.map +1 -0
- package/lib/commonjs/components/ModalNotification/AlertGlobal.js +2 -0
- package/lib/commonjs/components/ModalNotification/AlertGlobal.js.flow +100 -0
- package/lib/commonjs/components/ModalNotification/AlertGlobal.js.map +1 -0
- package/lib/commonjs/components/ModalNotification/index.js +2 -0
- package/lib/commonjs/components/ModalNotification/index.js.flow +224 -0
- package/lib/commonjs/components/ModalNotification/index.js.map +1 -0
- package/lib/commonjs/components/ModalOptionLoan.js +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js.flow +15 -7
- package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
- package/lib/commonjs/components/ModalOptionLoanDigital.js +1 -1
- package/lib/commonjs/components/ModalOptionLoanDigital.js.flow +15 -7
- package/lib/commonjs/components/ModalOptionLoanDigital.js.map +1 -1
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +7 -0
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/NFC/OcrStart.js +2 -0
- package/lib/commonjs/screens/NFC/OcrStart.js.flow +171 -0
- package/lib/commonjs/screens/NFC/OcrStart.js.map +1 -0
- package/lib/commonjs/screens/NFC/ScanMRZ.js +2 -0
- package/lib/commonjs/screens/NFC/ScanMRZ.js.flow +563 -0
- package/lib/commonjs/screens/NFC/ScanMRZ.js.map +1 -0
- package/lib/commonjs/screens/SelectorStore.js +1 -1
- package/lib/commonjs/screens/SelectorStore.js.flow +7 -2
- package/lib/commonjs/screens/SelectorStore.js.map +1 -1
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +253 -187
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
- package/lib/commonjs/screens/camera/index.js +1 -1
- package/lib/commonjs/screens/camera/index.js.flow +50 -54
- package/lib/commonjs/screens/camera/index.js.map +1 -1
- package/lib/commonjs/screens/cimb-sign/index.js +1 -1
- package/lib/commonjs/screens/cimb-sign/index.js.flow +10 -14
- package/lib/commonjs/screens/cimb-sign/index.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +75 -54
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +77 -54
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/store.js +1 -1
- package/lib/commonjs/screens/detail-loan/store.js.flow +39 -7
- package/lib/commonjs/screens/detail-loan/store.js.map +1 -1
- package/lib/commonjs/screens/detail-loan-tima/InforLoan.js +1 -1
- package/lib/commonjs/screens/detail-loan-tima/InforLoan.js.flow +20 -4
- package/lib/commonjs/screens/detail-loan-tima/InforLoan.js.map +1 -1
- package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js +1 -1
- package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js.flow +19 -4
- package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step6.js +1 -1
- package/lib/commonjs/screens/digital-lending/Step6.js.flow +24 -29
- package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/store.js +1 -1
- package/lib/commonjs/screens/digital-lending/store.js.flow +113 -20
- package/lib/commonjs/screens/digital-lending/store.js.map +1 -1
- package/lib/commonjs/screens/eSign/Store.js +1 -1
- package/lib/commonjs/screens/eSign/Store.js.flow +69 -34
- package/lib/commonjs/screens/eSign/Store.js.map +1 -1
- package/lib/commonjs/screens/eSign/index.js +1 -1
- package/lib/commonjs/screens/eSign/index.js.flow +33 -34
- package/lib/commonjs/screens/eSign/index.js.map +1 -1
- package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
- package/lib/commonjs/screens/full-submit/accept_policy.js.flow +101 -85
- package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
- package/lib/commonjs/screens/full-submit/store.js +1 -1
- package/lib/commonjs/screens/full-submit/store.js.flow +157 -27
- package/lib/commonjs/screens/full-submit/store.js.map +1 -1
- package/lib/commonjs/screens/full-submit/update-info.js +1 -1
- package/lib/commonjs/screens/full-submit/update-info.js.flow +0 -1
- package/lib/commonjs/screens/full-submit/update-info.js.map +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +15 -7
- package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -1
- package/lib/commonjs/screens/home/ItemMotoBikeLoan.js +1 -1
- package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.flow +16 -7
- package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.map +1 -1
- package/lib/commonjs/screens/home/Store.js +1 -1
- package/lib/commonjs/screens/home/Store.js.flow +44 -23
- package/lib/commonjs/screens/home/Store.js.map +1 -1
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +306 -298
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/commonjs/screens/liveness/LivenessStore.js +1 -1
- package/lib/commonjs/screens/liveness/LivenessStore.js.flow +111 -89
- package/lib/commonjs/screens/liveness/LivenessStore.js.map +1 -1
- package/lib/commonjs/screens/liveness/index.js +1 -1
- package/lib/commonjs/screens/liveness/index.js.flow +67 -68
- package/lib/commonjs/screens/liveness/index.js.map +1 -1
- package/lib/commonjs/screens/liveness-v2/index.js +1 -1
- package/lib/commonjs/screens/liveness-v2/index.js.flow +52 -52
- package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
- package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
- package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js.flow +20 -10
- package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
- package/lib/commonjs/screens/loan/UpdateLoan.js +1 -1
- package/lib/commonjs/screens/loan/UpdateLoan.js.flow +56 -23
- package/lib/commonjs/screens/loan/UpdateLoan.js.map +1 -1
- package/lib/commonjs/screens/motobike/InfoLoanMotobike.js +1 -1
- package/lib/commonjs/screens/motobike/InfoLoanMotobike.js.flow +43 -29
- package/lib/commonjs/screens/motobike/InfoLoanMotobike.js.map +1 -1
- package/lib/commonjs/screens/motobike/PolicyF88.js +1 -1
- package/lib/commonjs/screens/motobike/PolicyF88.js.flow +15 -6
- package/lib/commonjs/screens/motobike/PolicyF88.js.map +1 -1
- package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js +1 -1
- package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js.flow +13 -3
- package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js.map +1 -1
- package/lib/commonjs/screens/mrz-scanner/index.js +1 -1
- package/lib/commonjs/screens/mrz-scanner/index.js.flow +56 -55
- package/lib/commonjs/screens/mrz-scanner/index.js.map +1 -1
- package/lib/commonjs/screens/mrz-scanner/store.js +1 -1
- package/lib/commonjs/screens/mrz-scanner/store.js.flow +13 -3
- package/lib/commonjs/screens/mrz-scanner/store.js.map +1 -1
- package/lib/commonjs/screens/nationalID/Store.js +1 -1
- package/lib/commonjs/screens/nationalID/Store.js.flow +50 -29
- package/lib/commonjs/screens/nationalID/Store.js.map +1 -1
- package/lib/commonjs/screens/nationalID/index.js +1 -1
- package/lib/commonjs/screens/nationalID/index.js.flow +123 -219
- package/lib/commonjs/screens/nationalID/index.js.map +1 -1
- package/lib/commonjs/screens/nationalIDBack/Store.js +1 -1
- package/lib/commonjs/screens/nationalIDBack/Store.js.flow +44 -26
- package/lib/commonjs/screens/nationalIDBack/Store.js.map +1 -1
- package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
- package/lib/commonjs/screens/nationalIDBack/index.js.flow +129 -210
- package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
- package/lib/commonjs/screens/notification/ListLoanStore.js +1 -1
- package/lib/commonjs/screens/notification/ListLoanStore.js.flow +19 -4
- package/lib/commonjs/screens/notification/ListLoanStore.js.map +1 -1
- package/lib/commonjs/screens/notification/index.js +1 -1
- package/lib/commonjs/screens/notification/index.js.flow +0 -1
- package/lib/commonjs/screens/notification/index.js.map +1 -1
- package/lib/commonjs/screens/notification/store.js +1 -1
- package/lib/commonjs/screens/notification/store.js.flow +7 -2
- package/lib/commonjs/screens/notification/store.js.map +1 -1
- package/lib/commonjs/screens/personal/index.js +1 -1
- package/lib/commonjs/screens/personal/index.js.flow +21 -19
- package/lib/commonjs/screens/personal/index.js.map +1 -1
- package/lib/commonjs/screens/qualify/Store.js.flow +0 -1
- package/lib/commonjs/screens/qualify/Store.js.map +1 -1
- package/lib/commonjs/screens/quick-submit/store.js +1 -1
- package/lib/commonjs/screens/quick-submit/store.js.flow +85 -15
- package/lib/commonjs/screens/quick-submit/store.js.map +1 -1
- package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
- package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js.flow +20 -4
- package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
- package/lib/commonjs/screens/schedule-payment/store.js +1 -1
- package/lib/commonjs/screens/schedule-payment/store.js.flow +13 -5
- package/lib/commonjs/screens/schedule-payment/store.js.map +1 -1
- package/lib/commonjs/screens/selfie/SelfieStore.js +1 -1
- package/lib/commonjs/screens/selfie/SelfieStore.js.flow +25 -9
- package/lib/commonjs/screens/selfie/SelfieStore.js.map +1 -1
- package/lib/commonjs/screens/selfie/index.js +1 -1
- package/lib/commonjs/screens/selfie/index.js.flow +0 -1
- package/lib/commonjs/screens/selfie/index.js.map +1 -1
- package/lib/commonjs/screens/sign-tima/ViewContract.js +1 -1
- package/lib/commonjs/screens/sign-tima/ViewContract.js.flow +17 -18
- package/lib/commonjs/screens/sign-tima/ViewContract.js.map +1 -1
- package/lib/commonjs/screens/sign-tima/store.js +1 -1
- package/lib/commonjs/screens/sign-tima/store.js.flow +37 -7
- package/lib/commonjs/screens/sign-tima/store.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.flow +36 -10
- package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +321 -609
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.flow +21 -4
- package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +50 -54
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +31 -25
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +88 -82
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +25 -5
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.flow +19 -4
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +19 -4
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.flow +42 -25
- package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +63 -56
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +63 -55
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.flow +50 -43
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +275 -341
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +19 -4
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.flow +19 -4
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +19 -4
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/store.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/store.js.flow +82 -37
- package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -1
- package/lib/commonjs/screens/uploadVideo/index.js +1 -1
- package/lib/commonjs/screens/uploadVideo/index.js.flow +26 -21
- package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
- package/lib/commonjs/screens/uploadVideo/videoStore.js +1 -1
- package/lib/commonjs/screens/uploadVideo/videoStore.js.flow +19 -4
- package/lib/commonjs/screens/uploadVideo/videoStore.js.map +1 -1
- package/lib/commonjs/screens/v3/AssetInformation.js +1 -1
- package/lib/commonjs/screens/v3/AssetInformation.js.flow +35 -16
- package/lib/commonjs/screens/v3/AssetInformation.js.map +1 -1
- package/lib/commonjs/screens/v3/LoanBuyCar.js +1 -1
- package/lib/commonjs/screens/v3/LoanBuyCar.js.flow +35 -16
- package/lib/commonjs/screens/v3/LoanBuyCar.js.map +1 -1
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +23 -26
- package/lib/commonjs/services/api/api.js.map +1 -1
- package/lib/commonjs/utils/cameraCrop.js +2 -0
- package/lib/commonjs/utils/cameraCrop.js.flow +96 -0
- package/lib/commonjs/utils/cameraCrop.js.map +1 -0
- package/lib/module/AppStore.js +1 -1
- package/lib/module/AppStore.js.map +1 -1
- package/lib/module/RNTimacare.js +1 -1
- package/lib/module/RNTimacare.js.map +1 -1
- package/lib/module/assets/icons/index.js +1 -1
- package/lib/module/assets/icons/index.js.map +1 -1
- package/lib/module/assets/icons/modal_confirm.svg +15 -0
- package/lib/module/assets/icons/modal_notice.svg +74 -0
- package/lib/module/assets/icons/modal_success.svg +55 -0
- package/lib/module/assets/icons/modal_warning.svg +48 -0
- package/lib/module/assets/icons/user_security.svg +10 -0
- package/lib/module/assets/tts/Frame1000011947.png +0 -0
- package/lib/module/components/AppModal.js +2 -0
- package/lib/module/components/AppModal.js.map +1 -0
- package/lib/module/components/ItemTimaOne.js +2 -0
- package/lib/module/components/ItemTimaOne.js.map +1 -0
- package/lib/module/components/ModalNotification/AlertGlobal.js +2 -0
- package/lib/module/components/ModalNotification/AlertGlobal.js.map +1 -0
- package/lib/module/components/ModalNotification/index.js +2 -0
- package/lib/module/components/ModalNotification/index.js.map +1 -0
- package/lib/module/components/ModalOptionLoan.js +1 -1
- package/lib/module/components/ModalOptionLoan.js.map +1 -1
- package/lib/module/components/ModalOptionLoanDigital.js +1 -1
- package/lib/module/components/ModalOptionLoanDigital.js.map +1 -1
- package/lib/module/navigation/primary-navigator.js +1 -1
- package/lib/module/navigation/primary-navigator.js.map +1 -1
- package/lib/module/screens/NFC/OcrStart.js +2 -0
- package/lib/module/screens/NFC/OcrStart.js.map +1 -0
- package/lib/module/screens/NFC/ScanMRZ.js +2 -0
- package/lib/module/screens/NFC/ScanMRZ.js.map +1 -0
- package/lib/module/screens/SelectorStore.js +1 -1
- package/lib/module/screens/SelectorStore.js.map +1 -1
- package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
- package/lib/module/screens/camera/index.js +1 -1
- package/lib/module/screens/camera/index.js.map +1 -1
- package/lib/module/screens/cimb-sign/index.js +1 -1
- package/lib/module/screens/cimb-sign/index.js.map +1 -1
- package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
- package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
- package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
- package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/module/screens/detail-loan/store.js +1 -1
- package/lib/module/screens/detail-loan/store.js.map +1 -1
- package/lib/module/screens/detail-loan-tima/InforLoan.js +1 -1
- package/lib/module/screens/detail-loan-tima/InforLoan.js.map +1 -1
- package/lib/module/screens/detail-loan-tima/PaymentSchedule.js +1 -1
- package/lib/module/screens/detail-loan-tima/PaymentSchedule.js.map +1 -1
- package/lib/module/screens/digital-lending/Step6.js +1 -1
- package/lib/module/screens/digital-lending/Step6.js.map +1 -1
- package/lib/module/screens/digital-lending/store.js +1 -1
- package/lib/module/screens/digital-lending/store.js.map +1 -1
- package/lib/module/screens/eSign/Store.js +1 -1
- package/lib/module/screens/eSign/Store.js.map +1 -1
- package/lib/module/screens/eSign/index.js +1 -1
- package/lib/module/screens/eSign/index.js.map +1 -1
- package/lib/module/screens/full-submit/accept_policy.js +1 -1
- package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
- package/lib/module/screens/full-submit/store.js +1 -1
- package/lib/module/screens/full-submit/store.js.map +1 -1
- package/lib/module/screens/full-submit/update-info.js +1 -1
- package/lib/module/screens/full-submit/update-info.js.map +1 -1
- package/lib/module/screens/home/DigitalTopupItem.js +1 -1
- package/lib/module/screens/home/DigitalTopupItem.js.map +1 -1
- package/lib/module/screens/home/ItemMotoBikeLoan.js +1 -1
- package/lib/module/screens/home/ItemMotoBikeLoan.js.map +1 -1
- package/lib/module/screens/home/Store.js +1 -1
- package/lib/module/screens/home/Store.js.map +1 -1
- package/lib/module/screens/home/index.js +1 -1
- package/lib/module/screens/home/index.js.map +1 -1
- package/lib/module/screens/liveness/LivenessStore.js +1 -1
- package/lib/module/screens/liveness/LivenessStore.js.map +1 -1
- package/lib/module/screens/liveness/index.js +1 -1
- package/lib/module/screens/liveness/index.js.map +1 -1
- package/lib/module/screens/liveness-v2/index.js +1 -1
- package/lib/module/screens/liveness-v2/index.js.map +1 -1
- package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
- package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
- package/lib/module/screens/loan/UpdateLoan.js +1 -1
- package/lib/module/screens/loan/UpdateLoan.js.map +1 -1
- package/lib/module/screens/motobike/InfoLoanMotobike.js +1 -1
- package/lib/module/screens/motobike/InfoLoanMotobike.js.map +1 -1
- package/lib/module/screens/motobike/PolicyF88.js +1 -1
- package/lib/module/screens/motobike/PolicyF88.js.map +1 -1
- package/lib/module/screens/motobike/ReviewLoanMotobike.js +1 -1
- package/lib/module/screens/motobike/ReviewLoanMotobike.js.map +1 -1
- package/lib/module/screens/mrz-scanner/index.js +1 -1
- package/lib/module/screens/mrz-scanner/index.js.map +1 -1
- package/lib/module/screens/mrz-scanner/store.js +1 -1
- package/lib/module/screens/mrz-scanner/store.js.map +1 -1
- package/lib/module/screens/nationalID/Store.js +1 -1
- package/lib/module/screens/nationalID/Store.js.map +1 -1
- package/lib/module/screens/nationalID/index.js +1 -1
- package/lib/module/screens/nationalID/index.js.map +1 -1
- package/lib/module/screens/nationalIDBack/Store.js +1 -1
- package/lib/module/screens/nationalIDBack/Store.js.map +1 -1
- package/lib/module/screens/nationalIDBack/index.js +1 -1
- package/lib/module/screens/nationalIDBack/index.js.map +1 -1
- package/lib/module/screens/notification/ListLoanStore.js +1 -1
- package/lib/module/screens/notification/ListLoanStore.js.map +1 -1
- package/lib/module/screens/notification/index.js +1 -1
- package/lib/module/screens/notification/index.js.map +1 -1
- package/lib/module/screens/notification/store.js +1 -1
- package/lib/module/screens/notification/store.js.map +1 -1
- package/lib/module/screens/personal/index.js +1 -1
- package/lib/module/screens/personal/index.js.map +1 -1
- package/lib/module/screens/qualify/Store.js.map +1 -1
- package/lib/module/screens/quick-submit/store.js +1 -1
- package/lib/module/screens/quick-submit/store.js.map +1 -1
- package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
- package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
- package/lib/module/screens/schedule-payment/store.js +1 -1
- package/lib/module/screens/schedule-payment/store.js.map +1 -1
- package/lib/module/screens/selfie/SelfieStore.js +1 -1
- package/lib/module/screens/selfie/SelfieStore.js.map +1 -1
- package/lib/module/screens/selfie/index.js +1 -1
- package/lib/module/screens/selfie/index.js.map +1 -1
- package/lib/module/screens/sign-tima/ViewContract.js +1 -1
- package/lib/module/screens/sign-tima/ViewContract.js.map +1 -1
- package/lib/module/screens/sign-tima/store.js +1 -1
- package/lib/module/screens/sign-tima/store.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/LoanInterestRate.js +1 -1
- package/lib/module/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterBack.js +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterBack.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSOTP.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSOTP.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSelfie.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
- package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/store.js +1 -1
- package/lib/module/screens/toan-trinh-so/store.js.map +1 -1
- package/lib/module/screens/uploadVideo/index.js +1 -1
- package/lib/module/screens/uploadVideo/index.js.map +1 -1
- package/lib/module/screens/uploadVideo/videoStore.js +1 -1
- package/lib/module/screens/uploadVideo/videoStore.js.map +1 -1
- package/lib/module/screens/v3/AssetInformation.js +1 -1
- package/lib/module/screens/v3/AssetInformation.js.map +1 -1
- package/lib/module/screens/v3/LoanBuyCar.js +1 -1
- package/lib/module/screens/v3/LoanBuyCar.js.map +1 -1
- package/lib/module/services/api/api.js +1 -1
- package/lib/module/services/api/api.js.map +1 -1
- package/lib/module/utils/cameraCrop.js +2 -0
- package/lib/module/utils/cameraCrop.js.map +1 -0
- package/lib/typescript/AppStore.d.ts.map +1 -1
- package/lib/typescript/RNTimacare.d.ts.map +1 -1
- package/lib/typescript/assets/icons/index.d.ts +6 -1
- package/lib/typescript/assets/icons/index.d.ts.map +1 -1
- package/lib/typescript/components/AppModal.d.ts +18 -0
- package/lib/typescript/components/AppModal.d.ts.map +1 -0
- package/lib/typescript/components/ItemTimaOne.d.ts +7 -0
- package/lib/typescript/components/ItemTimaOne.d.ts.map +1 -0
- package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts +30 -0
- package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts.map +1 -0
- package/lib/typescript/components/ModalNotification/index.d.ts +35 -0
- package/lib/typescript/components/ModalNotification/index.d.ts.map +1 -0
- package/lib/typescript/components/ModalOptionLoan.d.ts.map +1 -1
- package/lib/typescript/components/ModalOptionLoanDigital.d.ts.map +1 -1
- package/lib/typescript/navigation/primary-navigator.d.ts +3 -0
- package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
- package/lib/typescript/screens/NFC/OcrStart.d.ts +2 -0
- package/lib/typescript/screens/NFC/OcrStart.d.ts.map +1 -0
- package/lib/typescript/screens/NFC/ScanMRZ.d.ts +15 -0
- package/lib/typescript/screens/NFC/ScanMRZ.d.ts.map +1 -0
- package/lib/typescript/screens/SelectorStore.d.ts.map +1 -1
- package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
- package/lib/typescript/screens/camera/index.d.ts.map +1 -1
- package/lib/typescript/screens/cimb-sign/index.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/ShowQrCode.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/store.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan-tima/InforLoan.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan-tima/PaymentSchedule.d.ts.map +1 -1
- package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -1
- package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -1
- package/lib/typescript/screens/eSign/Store.d.ts.map +1 -1
- package/lib/typescript/screens/eSign/index.d.ts.map +1 -1
- package/lib/typescript/screens/full-submit/accept_policy.d.ts.map +1 -1
- package/lib/typescript/screens/full-submit/store.d.ts.map +1 -1
- package/lib/typescript/screens/full-submit/update-info.d.ts.map +1 -1
- package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -1
- package/lib/typescript/screens/home/ItemMotoBikeLoan.d.ts.map +1 -1
- package/lib/typescript/screens/home/Store.d.ts.map +1 -1
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/screens/liveness/LivenessStore.d.ts.map +1 -1
- package/lib/typescript/screens/liveness/index.d.ts.map +1 -1
- package/lib/typescript/screens/loan/PreviewSchedulePaymentTopup.d.ts.map +1 -1
- package/lib/typescript/screens/loan/UpdateLoan.d.ts.map +1 -1
- package/lib/typescript/screens/motobike/InfoLoanMotobike.d.ts.map +1 -1
- package/lib/typescript/screens/motobike/PolicyF88.d.ts.map +1 -1
- package/lib/typescript/screens/motobike/ReviewLoanMotobike.d.ts.map +1 -1
- package/lib/typescript/screens/mrz-scanner/index.d.ts.map +1 -1
- package/lib/typescript/screens/mrz-scanner/store.d.ts.map +1 -1
- package/lib/typescript/screens/nationalID/Store.d.ts.map +1 -1
- package/lib/typescript/screens/nationalID/index.d.ts.map +1 -1
- package/lib/typescript/screens/nationalIDBack/Store.d.ts.map +1 -1
- package/lib/typescript/screens/nationalIDBack/index.d.ts.map +1 -1
- package/lib/typescript/screens/notification/ListLoanStore.d.ts.map +1 -1
- package/lib/typescript/screens/notification/index.d.ts.map +1 -1
- package/lib/typescript/screens/notification/store.d.ts.map +1 -1
- package/lib/typescript/screens/personal/index.d.ts.map +1 -1
- package/lib/typescript/screens/qualify/Store.d.ts.map +1 -1
- package/lib/typescript/screens/quick-submit/store.d.ts.map +1 -1
- package/lib/typescript/screens/schedule-payment/DigitalSchedulePayment.d.ts.map +1 -1
- package/lib/typescript/screens/schedule-payment/store.d.ts.map +1 -1
- package/lib/typescript/screens/selfie/SelfieStore.d.ts.map +1 -1
- package/lib/typescript/screens/selfie/index.d.ts.map +1 -1
- package/lib/typescript/screens/sign-tima/ViewContract.d.ts.map +1 -1
- package/lib/typescript/screens/sign-tima/store.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/RegisterBack.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSNationalIDBack.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TopupLoanInfo.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationBack.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/store.d.ts.map +1 -1
- package/lib/typescript/screens/uploadVideo/index.d.ts.map +1 -1
- package/lib/typescript/screens/uploadVideo/videoStore.d.ts.map +1 -1
- package/lib/typescript/screens/v3/AssetInformation.d.ts.map +1 -1
- package/lib/typescript/screens/v3/LoanBuyCar.d.ts.map +1 -1
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/lib/typescript/utils/cameraCrop.d.ts +43 -0
- package/lib/typescript/utils/cameraCrop.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/AppStore.tsx +7 -2
- package/src/RNTimacare.tsx +7 -1
- package/src/assets/icons/index.tsx +10 -0
- package/src/assets/icons/modal_confirm.svg +15 -0
- package/src/assets/icons/modal_notice.svg +74 -0
- package/src/assets/icons/modal_success.svg +55 -0
- package/src/assets/icons/modal_warning.svg +48 -0
- package/src/assets/icons/user_security.svg +10 -0
- package/src/assets/tts/Frame1000011947.png +0 -0
- package/src/components/AppModal.tsx +34 -0
- package/src/components/{ItemTimaOneV3.tsx → ItemTimaOne.tsx} +1 -1
- package/src/components/ModalNotification/AlertGlobal.tsx +100 -0
- package/src/components/ModalNotification/index.tsx +224 -0
- package/src/components/ModalOptionLoan.tsx +15 -7
- package/src/components/ModalOptionLoanDigital.tsx +15 -7
- package/src/navigation/primary-navigator.tsx +7 -0
- package/src/screens/NFC/OcrStart.tsx +171 -0
- package/src/screens/NFC/ScanMRZ.tsx +563 -0
- package/src/screens/SelectorStore.tsx +7 -2
- package/src/screens/camera/CCCDCameraScreen.tsx +253 -187
- package/src/screens/camera/index.tsx +50 -54
- package/src/screens/cimb-sign/index.tsx +10 -14
- package/src/screens/detail-loan/PaymentInfo.tsx +75 -54
- package/src/screens/detail-loan/ShowQrCode.tsx +77 -54
- package/src/screens/detail-loan/store.tsx +39 -7
- package/src/screens/detail-loan-tima/InforLoan.tsx +20 -4
- package/src/screens/detail-loan-tima/PaymentSchedule.tsx +19 -4
- package/src/screens/digital-lending/Step6.tsx +24 -29
- package/src/screens/digital-lending/store.tsx +113 -20
- package/src/screens/eSign/Store.tsx +69 -34
- package/src/screens/eSign/index.tsx +33 -34
- package/src/screens/full-submit/accept_policy.tsx +101 -85
- package/src/screens/full-submit/store.tsx +157 -27
- package/src/screens/full-submit/update-info.tsx +0 -1
- package/src/screens/home/DigitalTopupItem.tsx +15 -7
- package/src/screens/home/ItemMotoBikeLoan.tsx +16 -7
- package/src/screens/home/Store.tsx +44 -23
- package/src/screens/home/index.tsx +306 -298
- package/src/screens/liveness/LivenessStore.tsx +111 -89
- package/src/screens/liveness/index.tsx +67 -68
- package/src/screens/liveness-v2/index.tsx +52 -52
- package/src/screens/loan/PreviewSchedulePaymentTopup.tsx +20 -10
- package/src/screens/loan/UpdateLoan.tsx +56 -23
- package/src/screens/motobike/InfoLoanMotobike.tsx +43 -29
- package/src/screens/motobike/PolicyF88.tsx +15 -6
- package/src/screens/motobike/ReviewLoanMotobike.tsx +13 -3
- package/src/screens/mrz-scanner/index.tsx +56 -55
- package/src/screens/mrz-scanner/store.ts +13 -3
- package/src/screens/nationalID/Store.tsx +50 -29
- package/src/screens/nationalID/index.tsx +123 -219
- package/src/screens/nationalIDBack/Store.tsx +44 -26
- package/src/screens/nationalIDBack/index.tsx +129 -210
- package/src/screens/notification/ListLoanStore.tsx +19 -4
- package/src/screens/notification/index.tsx +0 -1
- package/src/screens/notification/store.tsx +7 -2
- package/src/screens/personal/index.tsx +21 -19
- package/src/screens/qualify/Store.tsx +0 -1
- package/src/screens/quick-submit/store.tsx +85 -15
- package/src/screens/schedule-payment/DigitalSchedulePayment.tsx +20 -4
- package/src/screens/schedule-payment/store.tsx +13 -5
- package/src/screens/selfie/SelfieStore.tsx +25 -9
- package/src/screens/selfie/index.tsx +0 -1
- package/src/screens/sign-tima/ViewContract.tsx +17 -18
- package/src/screens/sign-tima/store.tsx +37 -7
- package/src/screens/toan-trinh-so/LoanInterestRate.tsx +36 -10
- package/src/screens/toan-trinh-so/OCR.tsx +321 -609
- package/src/screens/toan-trinh-so/RegisterBack.tsx +21 -4
- package/src/screens/toan-trinh-so/RegisterCamera.tsx +50 -54
- package/src/screens/toan-trinh-so/ReviewInformation.tsx +31 -25
- package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +88 -82
- package/src/screens/toan-trinh-so/ReviewLoan.tsx +25 -5
- package/src/screens/toan-trinh-so/TTSNationalIDBack.tsx +19 -4
- package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +19 -4
- package/src/screens/toan-trinh-so/TTSOTP.tsx +42 -25
- package/src/screens/toan-trinh-so/TTSSelfie.tsx +63 -56
- package/src/screens/toan-trinh-so/TTSSignLoan.tsx +63 -55
- package/src/screens/toan-trinh-so/TopupLoanInfo.tsx +50 -43
- package/src/screens/toan-trinh-so/VehicleCamera.tsx +275 -341
- package/src/screens/toan-trinh-so/VehicleRegistration.tsx +19 -4
- package/src/screens/toan-trinh-so/VehicleRegistrationBack.tsx +19 -4
- package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +19 -4
- package/src/screens/toan-trinh-so/store.ts +82 -37
- package/src/screens/uploadVideo/index.tsx +26 -21
- package/src/screens/uploadVideo/videoStore.tsx +19 -4
- package/src/screens/v3/AssetInformation.tsx +35 -16
- package/src/screens/v3/LoanBuyCar.tsx +35 -16
- package/src/services/api/api.ts +23 -26
- package/src/utils/cameraCrop.ts +96 -0
- package/lib/commonjs/components/ItemTimaOneV2.js +0 -2
- package/lib/commonjs/components/ItemTimaOneV2.js.flow +0 -617
- package/lib/commonjs/components/ItemTimaOneV2.js.map +0 -1
- package/lib/commonjs/components/ItemTimaOneV3.js +0 -2
- package/lib/commonjs/components/ItemTimaOneV3.js.map +0 -1
- package/lib/module/components/ItemTimaOneV2.js +0 -2
- package/lib/module/components/ItemTimaOneV2.js.map +0 -1
- package/lib/module/components/ItemTimaOneV3.js +0 -2
- package/lib/module/components/ItemTimaOneV3.js.map +0 -1
- package/lib/typescript/components/ItemTimaOneV2.d.ts +0 -7
- package/lib/typescript/components/ItemTimaOneV2.d.ts.map +0 -1
- package/lib/typescript/components/ItemTimaOneV3.d.ts +0 -7
- package/lib/typescript/components/ItemTimaOneV3.d.ts.map +0 -1
- package/src/components/ItemTimaOneV2.tsx +0 -617
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import React, {
|
|
2
|
+
import React, {
|
|
3
|
+
useCallback,
|
|
4
|
+
useEffect,
|
|
5
|
+
useMemo,
|
|
6
|
+
useRef,
|
|
7
|
+
useState,
|
|
8
|
+
} from 'react';
|
|
3
9
|
import {
|
|
4
|
-
Alert,
|
|
5
|
-
Dimensions,
|
|
6
10
|
Image,
|
|
7
11
|
ImageStyle,
|
|
8
12
|
Platform,
|
|
@@ -16,12 +20,7 @@ import { useNavigation, useIsFocused } from '@react-navigation/native';
|
|
|
16
20
|
import Modal from 'react-native-modal';
|
|
17
21
|
import { MText } from '../../components/MText';
|
|
18
22
|
import LinearGradient from 'react-native-linear-gradient';
|
|
19
|
-
import {
|
|
20
|
-
CloseIcon,
|
|
21
|
-
IconBackWhite,
|
|
22
|
-
TakePhotoSvg,
|
|
23
|
-
TimaSmall,
|
|
24
|
-
} from '../../assets/icons';
|
|
23
|
+
import { CloseIcon, IconBack, TakePhotoSvg, TimaSmall } from '../../assets/icons';
|
|
25
24
|
import MButton from '../../components/MButton';
|
|
26
25
|
import {
|
|
27
26
|
request,
|
|
@@ -29,22 +28,21 @@ import {
|
|
|
29
28
|
RESULTS,
|
|
30
29
|
openSettings,
|
|
31
30
|
} from 'react-native-permissions';
|
|
32
|
-
import {
|
|
33
|
-
Camera as VisionCamera,
|
|
34
|
-
useCameraDevice,
|
|
35
|
-
useCameraFormat,
|
|
36
|
-
} from 'react-native-vision-camera';
|
|
37
|
-
import { commonStyles } from '../CommonStyles';
|
|
31
|
+
import { Camera as VisionCamera, useCameraDevices } from 'react-native-vision-camera';
|
|
38
32
|
import { ScreenNames } from '../../navigation';
|
|
39
33
|
import { load, OCR_V2, save } from '../../utils/storage';
|
|
40
|
-
import { IconUpload } from '../../assets/svgs';
|
|
41
34
|
import ImagePicker from 'react-native-image-crop-picker';
|
|
42
35
|
import { launchImageLibrary } from 'react-native-image-picker';
|
|
43
36
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
37
|
+
import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
|
|
38
|
+
import {
|
|
39
|
+
cropPhotoToAspect,
|
|
40
|
+
pickClosestFocusDevice,
|
|
41
|
+
} from '../../utils/cameraCrop';
|
|
44
42
|
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const
|
|
43
|
+
const ORANGE = '#F05123';
|
|
44
|
+
// Đăng ký xe (cà vẹt) có tỉ lệ gần với thẻ ID-1: 85.6mm x 54mm
|
|
45
|
+
const CARD_ASPECT_RATIO = 85.6 / 54;
|
|
48
46
|
|
|
49
47
|
export default function VehicleCamera(props: any) {
|
|
50
48
|
const insets = useSafeAreaInsets();
|
|
@@ -59,28 +57,45 @@ export default function VehicleCamera(props: any) {
|
|
|
59
57
|
const [shouldRenderCamera, setShouldRenderCamera] = useState(false);
|
|
60
58
|
const navigation = useNavigation();
|
|
61
59
|
const [showModal, setShowModal] = useState(false);
|
|
62
|
-
const [title
|
|
60
|
+
const [title] = useState(
|
|
63
61
|
props?.route?.params?.front
|
|
64
62
|
? 'Chụp đăng ký xe mặt trước'
|
|
65
63
|
: 'Chụp đăng ký xe mặt sau'
|
|
66
64
|
);
|
|
67
65
|
const [taking, setTaking] = useState(false);
|
|
68
66
|
const [passPermission, setPassPermission] = useState(false);
|
|
67
|
+
const [focusPoint, setFocusPoint] = useState(null);
|
|
69
68
|
|
|
70
69
|
const myCamera = useRef(null);
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
|
|
70
|
+
const frameSize = useRef({ width: 0, height: 0 });
|
|
71
|
+
const focusTimer = useRef(null);
|
|
72
|
+
|
|
73
|
+
// Chọn ống kính sau lấy nét gần nhất (macro) để chụp cận thẻ mà không mờ
|
|
74
|
+
const devices = useCameraDevices();
|
|
75
|
+
const device = useMemo(() => pickClosestFocusDevice(devices, 'back'), [
|
|
76
|
+
devices,
|
|
74
77
|
]);
|
|
75
78
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
// Lấy nét vào một điểm (toạ độ theo hệ khung preview = camera view). Dùng cho
|
|
80
|
+
// 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.
|
|
81
|
+
const focusAt = useCallback(
|
|
82
|
+
async (x, y) => {
|
|
83
|
+
const cam = myCamera.current;
|
|
84
|
+
if (cam == null || !device?.supportsFocus) return;
|
|
85
|
+
setFocusPoint({ x, y });
|
|
86
|
+
if (focusTimer.current) clearTimeout(focusTimer.current);
|
|
87
|
+
focusTimer.current = setTimeout(() => setFocusPoint(null), 800);
|
|
88
|
+
try {
|
|
89
|
+
await cam.focus({ x, y });
|
|
90
|
+
} catch (e) {
|
|
91
|
+
// focus có thể lỗi nếu đang lấy nét dở hoặc điểm ngoài vùng -> bỏ qua
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
[device]
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
// Điều hướng sau khi có ảnh (giữ nguyên logic gốc của VehicleCamera)
|
|
98
|
+
const goNextWithUri = (uri) => {
|
|
84
99
|
if (props?.route?.params?.front) {
|
|
85
100
|
navigation.push(ScreenNames.VehicleRegistrationFront, {
|
|
86
101
|
uri,
|
|
@@ -97,6 +112,36 @@ export default function VehicleCamera(props: any) {
|
|
|
97
112
|
}
|
|
98
113
|
};
|
|
99
114
|
|
|
115
|
+
const takePhoto = async () => {
|
|
116
|
+
if (myCamera.current == null || taking) return;
|
|
117
|
+
setTaking(true);
|
|
118
|
+
try {
|
|
119
|
+
// Lấy nét giữa khung trước khi chụp để tài liệu ở gần vẫn nét
|
|
120
|
+
const { width: fw, height: fh } = frameSize.current;
|
|
121
|
+
if (device?.supportsFocus && fw && fh) {
|
|
122
|
+
try {
|
|
123
|
+
await myCamera.current.focus({ x: fw / 2, y: fh / 2 });
|
|
124
|
+
} catch (e) {}
|
|
125
|
+
}
|
|
126
|
+
const data = await myCamera.current.takePhoto({
|
|
127
|
+
qualityPrioritization: 'quality',
|
|
128
|
+
});
|
|
129
|
+
// Cắt ảnh vừa đúng khung theo tỉ lệ thẻ (xử lý orientation trong util)
|
|
130
|
+
const uri = await cropPhotoToAspect(data, CARD_ASPECT_RATIO);
|
|
131
|
+
setTaking(false);
|
|
132
|
+
goNextWithUri(uri);
|
|
133
|
+
} catch (e) {
|
|
134
|
+
console.error(e);
|
|
135
|
+
setTaking(false);
|
|
136
|
+
AlertGlobal.show({
|
|
137
|
+
type: 'warning',
|
|
138
|
+
title: 'Thông báo',
|
|
139
|
+
message: 'Không chụp được ảnh. Vui lòng thử lại.',
|
|
140
|
+
primaryText: 'Đồng ý',
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
100
145
|
const requestPermissions = () => {
|
|
101
146
|
request(
|
|
102
147
|
Platform.OS === 'ios'
|
|
@@ -108,51 +153,49 @@ export default function VehicleCamera(props: any) {
|
|
|
108
153
|
console.log(
|
|
109
154
|
'This feature is not available (on this device / in this context)'
|
|
110
155
|
);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
'
|
|
114
|
-
|
|
115
|
-
|
|
156
|
+
AlertGlobal.show({
|
|
157
|
+
type: 'warning',
|
|
158
|
+
title: 'Thông báo',
|
|
159
|
+
message:
|
|
160
|
+
'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ị!',
|
|
161
|
+
primaryText: 'Đồng ý',
|
|
162
|
+
});
|
|
116
163
|
break;
|
|
117
164
|
case RESULTS.DENIED:
|
|
118
165
|
console.log(
|
|
119
166
|
'The permission has not been requested / is denied but requestable'
|
|
120
167
|
);
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
'
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
]
|
|
136
|
-
);
|
|
168
|
+
AlertGlobal.show({
|
|
169
|
+
type: 'warning',
|
|
170
|
+
title: 'Thông báo',
|
|
171
|
+
message:
|
|
172
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
173
|
+
primaryText: 'Đồng ý',
|
|
174
|
+
onPrimaryPress: () => {
|
|
175
|
+
if (Platform.OS === 'ios') {
|
|
176
|
+
openSettings();
|
|
177
|
+
} else {
|
|
178
|
+
requestPermissions();
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
});
|
|
137
182
|
break;
|
|
138
183
|
case RESULTS.LIMITED:
|
|
139
184
|
console.log('The permission is limited: some actions are possible');
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
'
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
]
|
|
155
|
-
);
|
|
185
|
+
AlertGlobal.show({
|
|
186
|
+
type: 'warning',
|
|
187
|
+
title: 'Thông báo',
|
|
188
|
+
message:
|
|
189
|
+
'Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',
|
|
190
|
+
primaryText: 'Đồng ý',
|
|
191
|
+
onPrimaryPress: () => {
|
|
192
|
+
if (Platform.OS === 'ios') {
|
|
193
|
+
openSettings();
|
|
194
|
+
} else {
|
|
195
|
+
requestPermissions();
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
});
|
|
156
199
|
break;
|
|
157
200
|
case RESULTS.GRANTED:
|
|
158
201
|
console.log('The permission is granted');
|
|
@@ -160,22 +203,20 @@ export default function VehicleCamera(props: any) {
|
|
|
160
203
|
break;
|
|
161
204
|
case RESULTS.BLOCKED:
|
|
162
205
|
console.log('The permission is denied and not requestable anymore');
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
'
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
]
|
|
178
|
-
);
|
|
206
|
+
AlertGlobal.show({
|
|
207
|
+
type: 'warning',
|
|
208
|
+
title: 'Thông báo',
|
|
209
|
+
message:
|
|
210
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
211
|
+
primaryText: 'Đồng ý',
|
|
212
|
+
onPrimaryPress: () => {
|
|
213
|
+
if (Platform.OS === 'ios') {
|
|
214
|
+
openSettings();
|
|
215
|
+
} else {
|
|
216
|
+
openSettings();
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
});
|
|
179
220
|
break;
|
|
180
221
|
}
|
|
181
222
|
});
|
|
@@ -193,6 +234,9 @@ export default function VehicleCamera(props: any) {
|
|
|
193
234
|
useEffect(() => {
|
|
194
235
|
requestPermissions();
|
|
195
236
|
loadIntro();
|
|
237
|
+
return () => {
|
|
238
|
+
if (focusTimer.current) clearTimeout(focusTimer.current);
|
|
239
|
+
};
|
|
196
240
|
}, []);
|
|
197
241
|
|
|
198
242
|
useEffect(() => {
|
|
@@ -209,228 +253,92 @@ export default function VehicleCamera(props: any) {
|
|
|
209
253
|
return () => clearTimeout(timeout);
|
|
210
254
|
}, [isFocused]);
|
|
211
255
|
|
|
256
|
+
// Giữ nguyên logic chọn ảnh từ thư viện của VehicleCamera
|
|
212
257
|
const pickImageFromGallery = async () => {
|
|
213
258
|
if (Platform.OS === 'android') {
|
|
214
|
-
const result = await launchImageLibrary({
|
|
215
|
-
mediaType: 'photo',
|
|
216
|
-
});
|
|
259
|
+
const result = await launchImageLibrary({ mediaType: 'photo' });
|
|
217
260
|
if (result.assets) {
|
|
218
|
-
|
|
219
|
-
navigation.push(ScreenNames.VehicleRegistrationFront, {
|
|
220
|
-
uri: result.assets[0]?.uri,
|
|
221
|
-
loan: props?.route?.params?.loan,
|
|
222
|
-
});
|
|
223
|
-
} else if (props.route?.params?.callback) {
|
|
224
|
-
navigation.goBack();
|
|
225
|
-
props.route?.params?.callback(result.assets[0]?.uri);
|
|
226
|
-
} else {
|
|
227
|
-
navigation.push(ScreenNames.VehicleRegistrationBack, {
|
|
228
|
-
uri: result.assets[0]?.uri,
|
|
229
|
-
loan: props?.route?.params?.loan,
|
|
230
|
-
});
|
|
231
|
-
}
|
|
261
|
+
goNextWithUri(result.assets[0]?.uri);
|
|
232
262
|
}
|
|
233
263
|
} else {
|
|
234
264
|
ImagePicker.openPicker({}).then((image) => {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
Platform.OS === 'android' ? image?.path : 'file://' + image?.path,
|
|
239
|
-
loan: props?.route?.params?.loan,
|
|
240
|
-
});
|
|
241
|
-
} else if (props.route?.params?.callback) {
|
|
242
|
-
navigation.goBack();
|
|
243
|
-
props.route?.params?.callback(
|
|
244
|
-
Platform.OS === 'android' ? image?.path : 'file://' + image?.path
|
|
245
|
-
);
|
|
246
|
-
} else {
|
|
247
|
-
navigation.push(ScreenNames.VehicleRegistrationBack, {
|
|
248
|
-
uri:
|
|
249
|
-
Platform.OS === 'android' ? image?.path : 'file://' + image?.path,
|
|
250
|
-
loan: props?.route?.params?.loan,
|
|
251
|
-
});
|
|
252
|
-
}
|
|
265
|
+
goNextWithUri(
|
|
266
|
+
Platform.OS === 'android' ? image?.path : 'file://' + image?.path
|
|
267
|
+
);
|
|
253
268
|
});
|
|
254
269
|
}
|
|
255
270
|
};
|
|
256
271
|
|
|
257
272
|
return (
|
|
258
|
-
<View
|
|
259
|
-
style={[$flex, { backgroundColor: '#000' }]}
|
|
260
|
-
pointerEvents={'box-none'}
|
|
261
|
-
>
|
|
273
|
+
<View style={styles.container}>
|
|
262
274
|
{passPermission && shouldRenderCamera ? (
|
|
263
|
-
|
|
264
|
-
{
|
|
265
|
-
<
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
photo={true}
|
|
274
|
-
format={format}
|
|
275
|
-
/>
|
|
276
|
-
) : null}
|
|
277
|
-
<View style={$overlay}>
|
|
278
|
-
<View style={$darkOverlayTop} />
|
|
279
|
-
<View style={$overlayRow}>
|
|
280
|
-
<View style={$darkOverlaySide} />
|
|
281
|
-
<View style={$frameBorder}>
|
|
282
|
-
<Corner
|
|
283
|
-
style={{
|
|
284
|
-
top: 0,
|
|
285
|
-
left: 0,
|
|
286
|
-
borderTopWidth: CORNER_WIDTH,
|
|
287
|
-
borderLeftWidth: CORNER_WIDTH,
|
|
288
|
-
borderColor: BORDER_COLOR,
|
|
289
|
-
}}
|
|
290
|
-
/>
|
|
291
|
-
|
|
292
|
-
<Corner
|
|
293
|
-
style={{
|
|
294
|
-
top: 0,
|
|
295
|
-
right: 0,
|
|
296
|
-
borderTopWidth: CORNER_WIDTH,
|
|
297
|
-
borderRightWidth: CORNER_WIDTH,
|
|
298
|
-
borderColor: BORDER_COLOR,
|
|
299
|
-
}}
|
|
300
|
-
/>
|
|
301
|
-
|
|
302
|
-
<Corner
|
|
303
|
-
style={{
|
|
304
|
-
bottom: 0,
|
|
305
|
-
left: 0,
|
|
306
|
-
borderBottomWidth: CORNER_WIDTH,
|
|
307
|
-
borderLeftWidth: CORNER_WIDTH,
|
|
308
|
-
borderColor: BORDER_COLOR,
|
|
309
|
-
}}
|
|
310
|
-
/>
|
|
311
|
-
|
|
312
|
-
<Corner
|
|
313
|
-
style={{
|
|
314
|
-
bottom: 0,
|
|
315
|
-
right: 0,
|
|
316
|
-
borderBottomWidth: CORNER_WIDTH,
|
|
317
|
-
borderRightWidth: CORNER_WIDTH,
|
|
318
|
-
borderColor: BORDER_COLOR,
|
|
319
|
-
}}
|
|
320
|
-
/>
|
|
321
|
-
</View>
|
|
322
|
-
<View style={$darkOverlaySide} />
|
|
275
|
+
<>
|
|
276
|
+
<View style={[styles.header, { paddingTop: insets.top + 16 }]}>
|
|
277
|
+
<TouchableOpacity
|
|
278
|
+
onPress={() => navigation.goBack()}
|
|
279
|
+
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
|
|
280
|
+
>
|
|
281
|
+
<IconBack />
|
|
282
|
+
</TouchableOpacity>
|
|
283
|
+
<View style={styles.titleWrap}>
|
|
284
|
+
<MText style={styles.headerTitle}>ĐĂNG KÝ XE</MText>
|
|
323
285
|
</View>
|
|
324
|
-
<View style={$darkOverlayBottom} />
|
|
325
286
|
</View>
|
|
326
287
|
|
|
288
|
+
<MText style={styles.instruction}>{title}</MText>
|
|
289
|
+
|
|
290
|
+
{/* Khung tỉ lệ thẻ: vùng nhìn thấy của preview = vùng sẽ crop.
|
|
291
|
+
Chạm vào khung để lấy nét thủ công. */}
|
|
327
292
|
<View
|
|
328
|
-
style={
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
left: 0,
|
|
332
|
-
right: 0,
|
|
333
|
-
zIndex: 1000,
|
|
293
|
+
style={styles.photoFrame}
|
|
294
|
+
onLayout={(e) => {
|
|
295
|
+
frameSize.current = e.nativeEvent.layout;
|
|
334
296
|
}}
|
|
297
|
+
onStartShouldSetResponder={() => true}
|
|
298
|
+
onResponderRelease={(e) =>
|
|
299
|
+
focusAt(e.nativeEvent.locationX, e.nativeEvent.locationY)
|
|
300
|
+
}
|
|
335
301
|
>
|
|
336
|
-
{
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}}
|
|
354
|
-
>
|
|
355
|
-
Tải ảnh từ thư viện
|
|
356
|
-
</MText>
|
|
357
|
-
</TouchableOpacity> */}
|
|
358
|
-
{!taking && (
|
|
359
|
-
<>
|
|
360
|
-
<MText
|
|
361
|
-
style={{
|
|
362
|
-
color: 'white',
|
|
363
|
-
textAlign: 'center',
|
|
364
|
-
fontSize: 14,
|
|
365
|
-
}}
|
|
366
|
-
>
|
|
367
|
-
Vui lòng đặt giấy tờ nằm vừa khung hình chữ nhật,{'\n'}chụp đủ
|
|
368
|
-
ánh sáng và rõ nét.
|
|
369
|
-
</MText>
|
|
370
|
-
<View
|
|
371
|
-
style={{
|
|
372
|
-
alignItems: 'center',
|
|
373
|
-
marginVertical: 24,
|
|
374
|
-
}}
|
|
375
|
-
>
|
|
376
|
-
<MButton
|
|
377
|
-
onPress={() => {
|
|
378
|
-
takePhoto();
|
|
379
|
-
}}
|
|
380
|
-
>
|
|
381
|
-
<TakePhotoSvg />
|
|
382
|
-
</MButton>
|
|
383
|
-
</View>
|
|
384
|
-
</>
|
|
385
|
-
)}
|
|
386
|
-
</View>
|
|
387
|
-
<View
|
|
388
|
-
style={[
|
|
389
|
-
commonStyles.fill,
|
|
390
|
-
{ position: 'absolute', width: '100%', height: '100%' },
|
|
391
|
-
]}
|
|
392
|
-
>
|
|
393
|
-
<View
|
|
394
|
-
style={[
|
|
395
|
-
commonStyles.row,
|
|
396
|
-
commonStyles.alignCenter,
|
|
397
|
-
{ paddingVertical: 16, marginTop: insets.top },
|
|
398
|
-
]}
|
|
399
|
-
>
|
|
400
|
-
<MButton
|
|
401
|
-
onPress={() => {
|
|
402
|
-
navigation.goBack();
|
|
403
|
-
}}
|
|
302
|
+
{device ? (
|
|
303
|
+
<VisionCamera
|
|
304
|
+
key={cameraKey}
|
|
305
|
+
ref={myCamera}
|
|
306
|
+
style={StyleSheet.absoluteFill}
|
|
307
|
+
device={device}
|
|
308
|
+
isActive={isFocused}
|
|
309
|
+
photo={true}
|
|
310
|
+
/>
|
|
311
|
+
) : null}
|
|
312
|
+
<View style={[styles.corner, styles.cornerTL]} />
|
|
313
|
+
<View style={[styles.corner, styles.cornerTR]} />
|
|
314
|
+
<View style={[styles.corner, styles.cornerBL]} />
|
|
315
|
+
<View style={[styles.corner, styles.cornerBR]} />
|
|
316
|
+
{focusPoint && (
|
|
317
|
+
<View
|
|
318
|
+
pointerEvents="none"
|
|
404
319
|
style={[
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
height: 48,
|
|
408
|
-
zIndex: 1000,
|
|
409
|
-
position: 'absolute',
|
|
410
|
-
left: 16,
|
|
411
|
-
top: 16,
|
|
412
|
-
},
|
|
320
|
+
styles.focusRing,
|
|
321
|
+
{ left: focusPoint.x - 32, top: focusPoint.y - 32 },
|
|
413
322
|
]}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
</MButton>
|
|
417
|
-
<View style={{ flex: 1, alignItems: 'center' }}>
|
|
418
|
-
<MText style={$title}>ĐĂNG KÝ XE</MText>
|
|
419
|
-
</View>
|
|
420
|
-
</View>
|
|
421
|
-
<MText
|
|
422
|
-
style={{
|
|
423
|
-
color: 'white',
|
|
424
|
-
textAlign: 'center',
|
|
425
|
-
}}
|
|
426
|
-
>
|
|
427
|
-
{title}
|
|
428
|
-
</MText>
|
|
323
|
+
/>
|
|
324
|
+
)}
|
|
429
325
|
</View>
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
326
|
+
|
|
327
|
+
<View style={styles.spacer} />
|
|
328
|
+
<MText style={[styles.hint, { marginTop: 0, marginBottom: 20 }]}>
|
|
329
|
+
Đư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
|
|
330
|
+
nếu ảnh bị mờ.
|
|
331
|
+
</MText>
|
|
332
|
+
<TouchableOpacity
|
|
333
|
+
style={[styles.captureButton, { marginBottom: insets.bottom + 24 }]}
|
|
334
|
+
onPress={takePhoto}
|
|
335
|
+
disabled={taking}
|
|
336
|
+
>
|
|
337
|
+
<TakePhotoSvg />
|
|
338
|
+
</TouchableOpacity>
|
|
339
|
+
</>
|
|
340
|
+
) : null}
|
|
341
|
+
|
|
434
342
|
<Modal
|
|
435
343
|
isVisible={showModal}
|
|
436
344
|
style={$modal}
|
|
@@ -555,58 +463,88 @@ export default function VehicleCamera(props: any) {
|
|
|
555
463
|
);
|
|
556
464
|
}
|
|
557
465
|
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
466
|
+
const styles = StyleSheet.create({
|
|
467
|
+
container: { flex: 1, backgroundColor: '#FFFFFF' },
|
|
468
|
+
header: {
|
|
469
|
+
flexDirection: 'row',
|
|
470
|
+
alignItems: 'center',
|
|
471
|
+
paddingHorizontal: 16,
|
|
472
|
+
paddingTop: 8,
|
|
473
|
+
},
|
|
474
|
+
titleWrap: {
|
|
475
|
+
flex: 1,
|
|
476
|
+
alignItems: 'center',
|
|
477
|
+
justifyContent: 'center',
|
|
478
|
+
marginRight: 24,
|
|
479
|
+
},
|
|
480
|
+
headerTitle: { color: '#333333', fontSize: 16, fontWeight: '600' },
|
|
481
|
+
instruction: {
|
|
482
|
+
textAlign: 'center',
|
|
483
|
+
color: '#333333',
|
|
484
|
+
fontSize: 14,
|
|
485
|
+
lineHeight: 20,
|
|
486
|
+
marginTop: 20,
|
|
487
|
+
marginBottom: 28,
|
|
488
|
+
},
|
|
489
|
+
photoFrame: {
|
|
490
|
+
marginHorizontal: 24,
|
|
491
|
+
aspectRatio: CARD_ASPECT_RATIO,
|
|
492
|
+
borderRadius: 8,
|
|
493
|
+
overflow: 'hidden',
|
|
494
|
+
backgroundColor: '#000000',
|
|
495
|
+
},
|
|
496
|
+
corner: {
|
|
497
|
+
position: 'absolute',
|
|
498
|
+
width: 26,
|
|
499
|
+
height: 26,
|
|
500
|
+
borderColor: ORANGE,
|
|
501
|
+
},
|
|
502
|
+
focusRing: {
|
|
503
|
+
position: 'absolute',
|
|
504
|
+
width: 64,
|
|
505
|
+
height: 64,
|
|
506
|
+
borderRadius: 8,
|
|
507
|
+
borderWidth: 1.5,
|
|
508
|
+
borderColor: '#FFD54A',
|
|
509
|
+
},
|
|
510
|
+
cornerTL: {
|
|
511
|
+
top: 0,
|
|
512
|
+
left: 0,
|
|
513
|
+
borderTopWidth: 4,
|
|
514
|
+
borderLeftWidth: 4,
|
|
515
|
+
borderTopLeftRadius: 8,
|
|
516
|
+
},
|
|
517
|
+
cornerTR: {
|
|
518
|
+
top: 0,
|
|
519
|
+
right: 0,
|
|
520
|
+
borderTopWidth: 4,
|
|
521
|
+
borderRightWidth: 4,
|
|
522
|
+
borderTopRightRadius: 8,
|
|
523
|
+
},
|
|
524
|
+
cornerBL: {
|
|
525
|
+
bottom: 0,
|
|
526
|
+
left: 0,
|
|
527
|
+
borderBottomWidth: 4,
|
|
528
|
+
borderLeftWidth: 4,
|
|
529
|
+
borderBottomLeftRadius: 8,
|
|
530
|
+
},
|
|
531
|
+
cornerBR: {
|
|
532
|
+
bottom: 0,
|
|
533
|
+
right: 0,
|
|
534
|
+
borderBottomWidth: 4,
|
|
535
|
+
borderRightWidth: 4,
|
|
536
|
+
borderBottomRightRadius: 8,
|
|
537
|
+
},
|
|
538
|
+
hint: {
|
|
539
|
+
textAlign: 'center',
|
|
540
|
+
color: '#555555',
|
|
541
|
+
fontSize: 13,
|
|
542
|
+
lineHeight: 19,
|
|
543
|
+
marginTop: 48,
|
|
544
|
+
},
|
|
545
|
+
spacer: { flex: 1 },
|
|
546
|
+
captureButton: { alignSelf: 'center' },
|
|
547
|
+
});
|
|
610
548
|
|
|
611
549
|
const $row: ViewStyle = {
|
|
612
550
|
flexDirection: 'row',
|
|
@@ -655,10 +593,6 @@ const $description: TextStyle = {
|
|
|
655
593
|
textAlign: 'center',
|
|
656
594
|
};
|
|
657
595
|
|
|
658
|
-
const $flex: ViewStyle = {
|
|
659
|
-
flex: 1,
|
|
660
|
-
};
|
|
661
|
-
|
|
662
596
|
const $modal: ViewStyle = {
|
|
663
597
|
justifyContent: 'flex-end',
|
|
664
598
|
margin: 0,
|