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,7 +1,7 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
2
|
import { observable, action, toJS } from 'mobx';
|
|
3
3
|
import { Api } from '../services/api';
|
|
4
|
-
import {
|
|
4
|
+
import { AlertGlobal } from '../components/ModalNotification/AlertGlobal';
|
|
5
5
|
import { myLog } from '../utils/log';
|
|
6
6
|
|
|
7
7
|
export enum Types {
|
|
@@ -70,7 +70,12 @@ class SelectorStore {
|
|
|
70
70
|
} else {
|
|
71
71
|
this.isLoading = false;
|
|
72
72
|
this.isError = false;
|
|
73
|
-
|
|
73
|
+
AlertGlobal.show({
|
|
74
|
+
type: 'warning',
|
|
75
|
+
title: 'Lỗi',
|
|
76
|
+
message: response.Messages,
|
|
77
|
+
primaryText: 'Đóng',
|
|
78
|
+
});
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mobx","require","_api","
|
|
1
|
+
{"version":3,"names":["_mobx","require","_api","_AlertGlobal","_log","_class","_descriptor","_descriptor2","_descriptor3","Types","exports","SelectorStore","_classCallCheck2","default","_initializerDefineProperty2","_createClass2","key","value","getData","params","type","onSuccess","onFailure","response","_t","_t2","_regenerator","async","_context","prev","next","isLoading","data","Province","District","Ward","Reason","Job","Bank","awrap","Api","getInstance","getProvinces","sent","abrupt","getDistricts","getWards","loanPurpose","getJobs","getBanks","kind","isError","map","item","_extends2","name","text","myLog","AlertGlobal","show","title","message","Messages","primaryText","stop","Promise","_applyDecoratedDescriptor2","prototype","observable","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","_default"],"sourceRoot":"../../../src","sources":["screens/SelectorStore.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=CCCDCameraScreen;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeVisionCamera=require("react-native-vision-camera");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _CommonStyles=require("../CommonStyles");var _reactNativePermissions=require("react-native-permissions");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/camera/CCCDCameraScreen.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function CCCDCameraScreen(props){var _props$route2,_props$route2$params;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var isFocused=(0,_native.useIsFocused)();var myCamera=(0,_react.useRef)(null);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),passPermission=_useState2[0],setPassPermission=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),shouldRenderCamera=_useState4[0],setShouldRenderCamera=_useState4[1];var device=(0,_reactNativeVisionCamera.useCameraDevice)('back');var format=(0,_reactNativeVisionCamera.useCameraFormat)(device,[{photoResolution:{width:1280,height:720}}]);var takePicture=function _callee(){var _props$route,_props$route$params,data,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(myCamera.current==null)){_context.next=1;break;}return _context.abrupt("return");case 1:_context.prev=1;_context.next=2;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'quality'}));case 2:data=_context.sent;navigation.goBack();if((_props$route=props.route)!=null&&(_props$route$params=_props$route.params)!=null&&_props$route$params.callback){props.route.params.callback('file://'+data.path);}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.error(_t);case 4:case"end":return _context.stop();}},null,null,[[1,3]],Promise);};var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','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ị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.LIMITED:console.log('The permission is limited: some actions are possible');_reactNative.Alert.alert('Thông báo','Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};(0,_react.useEffect)(function(){_requestPermissions();},[]);(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);if(!passPermission&&!shouldRenderCamera){return _react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:160,columnNumber:7}},_react.default.createElement(_reactNative.ActivityIndicator,{size:"large",color:"#0000ff",__self:this,__source:{fileName:_jsxFileName,lineNumber:161,columnNumber:9}}));}return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'black'},pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:167,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.fill,_CommonStyles.commonStyles.justifyCenter,{position:'absolute',width:_reactNative.Dimensions.get('window').width,height:_reactNative.Dimensions.get('window').height}],__self:this,__source:{fileName:_jsxFileName,lineNumber:171,columnNumber:7}},device?_react.default.createElement(_reactNative.View,{style:$cameraFrame,__self:this,__source:{fileName:_jsxFileName,lineNumber:184,columnNumber:11}},_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:_reactNative.StyleSheet.absoluteFill,device:device,isActive:true,photo:true,format:format,__self:this,__source:{fileName:_jsxFileName,lineNumber:185,columnNumber:13}})):_react.default.createElement(_reactNative.ActivityIndicator,{__self:this,__source:{fileName:_jsxFileName,lineNumber:195,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:[$back,{top:insets.top+16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:199,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:0,width:48,height:48,zIndex:1000,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:200,columnNumber:9}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:213,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{textAlign:'center',zIndex:10,color:'#FFFFFF',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:215,columnNumber:9}},props!=null&&(_props$route2=props.route)!=null&&(_props$route2$params=_props$route2.params)!=null&&_props$route2$params.front?'Chụp CMND/ CCCD mặt trước':'Chụp CMND/ CCCD mặt sau')),_react.default.createElement(_reactNative.View,{style:{position:'absolute',bottom:insets.bottom,alignSelf:'center',flexDirection:'column',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:228,columnNumber:7}},_react.default.createElement(_MText.MText,{style:{color:'#fff',marginBottom:16,textAlign:'center',paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:237,columnNumber:9}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:takePicture,__self:this,__source:{fileName:_jsxFileName,lineNumber:248,columnNumber:9}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:249,columnNumber:11}}))));}var overlayColor='rgba(22, 22, 22, 0.7)';var $back={position:'absolute',left:0,right:0};var $cameraFrame={width:_reactNative.Dimensions.get('window').width,height:260,overflow:'hidden',backgroundColor:'black'};var $overlay=(0,_extends2.default)({},_reactNative.StyleSheet.absoluteFillObject,{justifyContent:'center',alignItems:'center'});var $container={flex:1,backgroundColor:'#000'};var $row={flexDirection:'row',alignItems:'center'};var $darkOverlayTop={width:'100%',backgroundColor:overlayColor};var $darkOverlayBottom={width:'100%',backgroundColor:overlayColor};var $darkOverlaySide={backgroundColor:overlayColor};var $frameBorder={};
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=CCCDCameraScreen;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeVisionCamera=require("react-native-vision-camera");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _AlertGlobal=require("../../components/ModalNotification/AlertGlobal");var _native=require("@react-navigation/native");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _CommonStyles=require("../CommonStyles");var _reactNativePermissions=require("react-native-permissions");var _cameraCrop=require("../../utils/cameraCrop");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/camera/CCCDCameraScreen.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t4 in e)"default"!==_t4&&{}.hasOwnProperty.call(e,_t4)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t4))&&(i.get||i.set)?o(f,_t4,i):f[_t4]=e[_t4]);return f;})(e,t);}var ORANGE='#F05123';var CARD_ASPECT_RATIO=85.6/54;var FRAME_ASPECT=CARD_ASPECT_RATIO;function CCCDCameraScreen(props){var _props$route2,_props$route2$params;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var isFocused=(0,_native.useIsFocused)();var myCamera=(0,_react.useRef)(null);var frameSize=(0,_react.useRef)({width:0,height:0});var focusTimer=(0,_react.useRef)(null);var takingRef=(0,_react.useRef)(false);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),passPermission=_useState2[0],setPassPermission=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),shouldRenderCamera=_useState4[0],setShouldRenderCamera=_useState4[1];var _useState5=(0,_react.useState)(null),_useState6=(0,_slicedToArray2.default)(_useState5,2),focusPoint=_useState6[0],setFocusPoint=_useState6[1];var devices=(0,_reactNativeVisionCamera.useCameraDevices)();var device=(0,_react.useMemo)(function(){return(0,_cameraCrop.pickClosestFocusDevice)(devices,'back');},[devices]);var focusAt=(0,_react.useCallback)(function _callee(x,y){var cam,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:cam=myCamera.current;if(!(cam==null||!(device!=null&&device.supportsFocus))){_context.next=1;break;}return _context.abrupt("return");case 1:setFocusPoint({x:x,y:y});if(focusTimer.current)clearTimeout(focusTimer.current);focusTimer.current=setTimeout(function(){return setFocusPoint(null);},800);_context.prev=2;_context.next=3;return _regenerator.default.awrap(cam.focus({x:x,y:y}));case 3:_context.next=5;break;case 4:_context.prev=4;_t=_context["catch"](2);case 5:case"end":return _context.stop();}},null,null,[[2,4]],Promise);},[device]);var takePicture=function _callee2(){var _props$route,_props$route$params,_frameSize$current,fw,fh,data,uri,_t2,_t3;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(myCamera.current==null||takingRef.current)){_context2.next=1;break;}return _context2.abrupt("return");case 1:takingRef.current=true;_context2.prev=2;_frameSize$current=frameSize.current,fw=_frameSize$current.width,fh=_frameSize$current.height;if(!(device!=null&&device.supportsFocus&&fw&&fh)){_context2.next=6;break;}_context2.prev=3;_context2.next=4;return _regenerator.default.awrap(myCamera.current.focus({x:fw/2,y:fh/2}));case 4:_context2.next=6;break;case 5:_context2.prev=5;_t2=_context2["catch"](3);case 6:_context2.next=7;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'quality'}));case 7:data=_context2.sent;_context2.next=8;return _regenerator.default.awrap((0,_cameraCrop.cropPhotoToAspect)(data,FRAME_ASPECT));case 8:uri=_context2.sent;navigation.goBack();if((_props$route=props.route)!=null&&(_props$route$params=_props$route.params)!=null&&_props$route$params.callback){props.route.params.callback(uri);}_context2.next=10;break;case 9:_context2.prev=9;_t3=_context2["catch"](2);console.error(_t3);takingRef.current=false;case 10:case"end":return _context2.stop();}},null,null,[[2,9],[3,5]],Promise);};var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'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ị!',primaryText:'Đồng ý'});break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',primaryText:'Đồng ý',onPrimaryPress:function onPrimaryPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}});break;case _reactNativePermissions.RESULTS.LIMITED:console.log('The permission is limited: some actions are possible');_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',primaryText:'Đồng ý',onPrimaryPress:function onPrimaryPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}});break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',primaryText:'Đồng ý',onPrimaryPress:function onPrimaryPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}});break;}});};(0,_react.useEffect)(function(){_requestPermissions();return function(){if(focusTimer.current)clearTimeout(focusTimer.current);};},[]);(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);if(!passPermission&&!shouldRenderCamera){return _react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:209,columnNumber:7}},_react.default.createElement(_reactNative.ActivityIndicator,{size:"large",color:"#0000ff",__self:this,__source:{fileName:_jsxFileName,lineNumber:210,columnNumber:9}}));}return _react.default.createElement(_reactNative.View,{style:styles.container,__self:this,__source:{fileName:_jsxFileName,lineNumber:216,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:[styles.header,{paddingTop:insets.top+16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:217,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){return navigation.goBack();},hitSlop:{top:12,bottom:12,left:12,right:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:218,columnNumber:9}},_react.default.createElement(_icons.IconBack,{__self:this,__source:{fileName:_jsxFileName,lineNumber:222,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:styles.titleWrap,__self:this,__source:{fileName:_jsxFileName,lineNumber:224,columnNumber:9}},_react.default.createElement(_MText.MText,{style:styles.headerTitle,__self:this,__source:{fileName:_jsxFileName,lineNumber:225,columnNumber:11}},"CMND / CCCD"))),_react.default.createElement(_MText.MText,{style:styles.instruction,__self:this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:7}},props!=null&&(_props$route2=props.route)!=null&&(_props$route2$params=_props$route2.params)!=null&&_props$route2$params.front?'Chụp CMND/ CCCD mặt trước':'Chụp CMND/ CCCD mặt sau'),_react.default.createElement(_reactNative.View,{style:styles.photoFrame,onLayout:function onLayout(e){frameSize.current=e.nativeEvent.layout;},onStartShouldSetResponder:function onStartShouldSetResponder(){return true;},onResponderRelease:function onResponderRelease(e){return focusAt(e.nativeEvent.locationX,e.nativeEvent.locationY);},__self:this,__source:{fileName:_jsxFileName,lineNumber:237,columnNumber:7}},device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:_reactNative.StyleSheet.absoluteFill,device:device,isActive:isFocused,photo:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:248,columnNumber:11}}):null,_react.default.createElement(_reactNative.View,{style:[styles.corner,styles.cornerTL],__self:this,__source:{fileName:_jsxFileName,lineNumber:256,columnNumber:9}}),_react.default.createElement(_reactNative.View,{style:[styles.corner,styles.cornerTR],__self:this,__source:{fileName:_jsxFileName,lineNumber:257,columnNumber:9}}),_react.default.createElement(_reactNative.View,{style:[styles.corner,styles.cornerBL],__self:this,__source:{fileName:_jsxFileName,lineNumber:258,columnNumber:9}}),_react.default.createElement(_reactNative.View,{style:[styles.corner,styles.cornerBR],__self:this,__source:{fileName:_jsxFileName,lineNumber:259,columnNumber:9}}),focusPoint&&_react.default.createElement(_reactNative.View,{pointerEvents:"none",style:[styles.focusRing,{left:focusPoint.x-32,top:focusPoint.y-32}],__self:this,__source:{fileName:_jsxFileName,lineNumber:261,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:styles.spacer,__self:this,__source:{fileName:_jsxFileName,lineNumber:271,columnNumber:7}}),_react.default.createElement(_MText.MText,{style:[styles.hint,{marginTop:0,marginBottom:20}],__self:this,__source:{fileName:_jsxFileName,lineNumber:272,columnNumber:7}},"\u0110\u01B0a gi\u1EA5y t\u1EDD l\u1EA1i g\u1EA7n cho v\u1EEBa khung, ch\u1EA1m v\xE0o m\xE0n h\xECnh",'\n',"\u0111\u1EC3 l\u1EA5y n\xE9t n\u1EBFu \u1EA3nh b\u1ECB m\u1EDD."),_react.default.createElement(_reactNative.TouchableOpacity,{style:[styles.captureButton,{marginBottom:insets.bottom+24}],onPress:takePicture,__self:this,__source:{fileName:_jsxFileName,lineNumber:276,columnNumber:7}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:280,columnNumber:9}})));}var styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:'#FFFFFF'},header:{flexDirection:'row',alignItems:'center',paddingHorizontal:16,paddingTop:8},titleWrap:{flex:1,alignItems:'center',justifyContent:'center',marginRight:24},headerTitle:{color:'#333333',fontSize:16,fontWeight:'600'},instruction:{textAlign:'center',color:'#333333',fontSize:14,lineHeight:20,marginTop:20,marginBottom:28},photoFrame:{marginHorizontal:24,aspectRatio:CARD_ASPECT_RATIO,borderRadius:8,overflow:'hidden',backgroundColor:'#000000'},corner:{position:'absolute',width:26,height:26,borderColor:ORANGE},focusRing:{position:'absolute',width:64,height:64,borderRadius:8,borderWidth:1.5,borderColor:'#FFD54A'},cornerTL:{top:0,left:0,borderTopWidth:4,borderLeftWidth:4,borderTopLeftRadius:8},cornerTR:{top:0,right:0,borderTopWidth:4,borderRightWidth:4,borderTopRightRadius:8},cornerBL:{bottom:0,left:0,borderBottomWidth:4,borderLeftWidth:4,borderBottomLeftRadius:8},cornerBR:{bottom:0,right:0,borderBottomWidth:4,borderRightWidth:4,borderBottomRightRadius:8},hint:{textAlign:'center',color:'#555555',fontSize:13,lineHeight:19,marginTop:48},spacer:{flex:1},captureButton:{alignSelf:'center'}});
|
|
2
2
|
//# sourceMappingURL=CCCDCameraScreen.js.map
|
|
@@ -1,9 +1,13 @@
|
|
|
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
10
|
ActivityIndicator,
|
|
5
|
-
Alert,
|
|
6
|
-
Dimensions,
|
|
7
11
|
Platform,
|
|
8
12
|
StyleSheet,
|
|
9
13
|
TouchableOpacity,
|
|
@@ -11,11 +15,11 @@ import {
|
|
|
11
15
|
} from 'react-native';
|
|
12
16
|
import {
|
|
13
17
|
Camera as VisionCamera,
|
|
14
|
-
|
|
15
|
-
useCameraFormat,
|
|
18
|
+
useCameraDevices,
|
|
16
19
|
} from 'react-native-vision-camera';
|
|
17
|
-
import {
|
|
20
|
+
import { IconBack, TakePhotoSvg } from '../../assets/icons';
|
|
18
21
|
import { MText } from '../../components/MText';
|
|
22
|
+
import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
|
|
19
23
|
import { useNavigation, useIsFocused } from '@react-navigation/native';
|
|
20
24
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
21
25
|
import { commonStyles } from '../CommonStyles';
|
|
@@ -25,31 +29,77 @@ import {
|
|
|
25
29
|
RESULTS,
|
|
26
30
|
openSettings,
|
|
27
31
|
} from 'react-native-permissions';
|
|
32
|
+
import {
|
|
33
|
+
cropPhotoToAspect,
|
|
34
|
+
pickClosestFocusDevice,
|
|
35
|
+
} from '../../utils/cameraCrop';
|
|
36
|
+
|
|
37
|
+
const ORANGE = '#F05123';
|
|
38
|
+
// Thẻ CMND/CCCD theo chuẩn ID-1: 85.6mm x 54mm
|
|
39
|
+
const CARD_ASPECT_RATIO = 85.6 / 54;
|
|
40
|
+
// Cắt ảnh vừa đúng khung (khung dùng aspectRatio = CARD_ASPECT_RATIO)
|
|
41
|
+
const FRAME_ASPECT = CARD_ASPECT_RATIO;
|
|
28
42
|
|
|
29
43
|
export default function CCCDCameraScreen(props) {
|
|
30
44
|
const insets = useSafeAreaInsets();
|
|
31
45
|
const navigation = useNavigation();
|
|
32
46
|
const isFocused = useIsFocused();
|
|
33
47
|
const myCamera = useRef(null);
|
|
48
|
+
const frameSize = useRef({ width: 0, height: 0 });
|
|
49
|
+
const focusTimer = useRef(null);
|
|
50
|
+
const takingRef = useRef(false);
|
|
34
51
|
const [passPermission, setPassPermission] = useState(false);
|
|
35
52
|
const [shouldRenderCamera, setShouldRenderCamera] = useState(false);
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
53
|
+
const [focusPoint, setFocusPoint] = useState(null);
|
|
54
|
+
|
|
55
|
+
// Chọn ống kính sau lấy nét gần nhất (macro) để chụp cận thẻ mà không mờ
|
|
56
|
+
const devices = useCameraDevices();
|
|
57
|
+
const device = useMemo(() => pickClosestFocusDevice(devices, 'back'), [
|
|
58
|
+
devices,
|
|
39
59
|
]);
|
|
40
60
|
|
|
61
|
+
// Lấy nét vào một điểm (toạ độ theo hệ của khung preview = camera view).
|
|
62
|
+
// Dùng cho chạm-để-lấy-nét và lấy nét giữa khung trước khi chụp -> tránh mờ
|
|
63
|
+
// khi đưa giấy tờ lại gần (camera không tự bám nét kịp).
|
|
64
|
+
const focusAt = useCallback(
|
|
65
|
+
async (x, y) => {
|
|
66
|
+
const cam = myCamera.current;
|
|
67
|
+
if (cam == null || !device?.supportsFocus) return;
|
|
68
|
+
setFocusPoint({ x, y });
|
|
69
|
+
if (focusTimer.current) clearTimeout(focusTimer.current);
|
|
70
|
+
focusTimer.current = setTimeout(() => setFocusPoint(null), 800);
|
|
71
|
+
try {
|
|
72
|
+
await cam.focus({ x, y });
|
|
73
|
+
} catch (e) {
|
|
74
|
+
// focus có thể lỗi nếu đang lấy nét dở hoặc điểm ngoài vùng -> bỏ qua
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
[device]
|
|
78
|
+
);
|
|
79
|
+
|
|
41
80
|
const takePicture = async () => {
|
|
42
|
-
if (myCamera.current == null) return;
|
|
81
|
+
if (myCamera.current == null || takingRef.current) return;
|
|
82
|
+
takingRef.current = true;
|
|
43
83
|
try {
|
|
84
|
+
// Lấy nét giữa khung trước khi chụp để tài liệu ở gần vẫn nét
|
|
85
|
+
const { width: fw, height: fh } = frameSize.current;
|
|
86
|
+
if (device?.supportsFocus && fw && fh) {
|
|
87
|
+
try {
|
|
88
|
+
await myCamera.current.focus({ x: fw / 2, y: fh / 2 });
|
|
89
|
+
} catch (e) {}
|
|
90
|
+
}
|
|
44
91
|
const data = await myCamera.current.takePhoto({
|
|
45
92
|
qualityPrioritization: 'quality',
|
|
46
93
|
});
|
|
94
|
+
// Cắt ảnh vừa đúng khung preview (giữ nguyên logic điều hướng bên dưới)
|
|
95
|
+
const uri = await cropPhotoToAspect(data, FRAME_ASPECT);
|
|
47
96
|
navigation.goBack();
|
|
48
97
|
if (props.route?.params?.callback) {
|
|
49
|
-
props.route.params.callback(
|
|
98
|
+
props.route.params.callback(uri);
|
|
50
99
|
}
|
|
51
100
|
} catch (err) {
|
|
52
101
|
console.error(err);
|
|
102
|
+
takingRef.current = false;
|
|
53
103
|
}
|
|
54
104
|
};
|
|
55
105
|
|
|
@@ -64,51 +114,49 @@ export default function CCCDCameraScreen(props) {
|
|
|
64
114
|
console.log(
|
|
65
115
|
'This feature is not available (on this device / in this context)'
|
|
66
116
|
);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'
|
|
70
|
-
|
|
71
|
-
|
|
117
|
+
AlertGlobal.show({
|
|
118
|
+
type: 'warning',
|
|
119
|
+
title: 'Thông báo',
|
|
120
|
+
message:
|
|
121
|
+
'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ị!',
|
|
122
|
+
primaryText: 'Đồng ý',
|
|
123
|
+
});
|
|
72
124
|
break;
|
|
73
125
|
case RESULTS.DENIED:
|
|
74
126
|
console.log(
|
|
75
127
|
'The permission has not been requested / is denied but requestable'
|
|
76
128
|
);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
]
|
|
92
|
-
);
|
|
129
|
+
AlertGlobal.show({
|
|
130
|
+
type: 'warning',
|
|
131
|
+
title: 'Thông báo',
|
|
132
|
+
message:
|
|
133
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
134
|
+
primaryText: 'Đồng ý',
|
|
135
|
+
onPrimaryPress: () => {
|
|
136
|
+
if (Platform.OS === 'ios') {
|
|
137
|
+
openSettings();
|
|
138
|
+
} else {
|
|
139
|
+
requestPermissions();
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
});
|
|
93
143
|
break;
|
|
94
144
|
case RESULTS.LIMITED:
|
|
95
145
|
console.log('The permission is limited: some actions are possible');
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
'
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
]
|
|
111
|
-
);
|
|
146
|
+
AlertGlobal.show({
|
|
147
|
+
type: 'warning',
|
|
148
|
+
title: 'Thông báo',
|
|
149
|
+
message:
|
|
150
|
+
'Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',
|
|
151
|
+
primaryText: 'Đồng ý',
|
|
152
|
+
onPrimaryPress: () => {
|
|
153
|
+
if (Platform.OS === 'ios') {
|
|
154
|
+
openSettings();
|
|
155
|
+
} else {
|
|
156
|
+
requestPermissions();
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
});
|
|
112
160
|
break;
|
|
113
161
|
case RESULTS.GRANTED:
|
|
114
162
|
console.log('The permission is granted');
|
|
@@ -116,22 +164,20 @@ export default function CCCDCameraScreen(props) {
|
|
|
116
164
|
break;
|
|
117
165
|
case RESULTS.BLOCKED:
|
|
118
166
|
console.log('The permission is denied and not requestable anymore');
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
'
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
]
|
|
134
|
-
);
|
|
167
|
+
AlertGlobal.show({
|
|
168
|
+
type: 'warning',
|
|
169
|
+
title: 'Thông báo',
|
|
170
|
+
message:
|
|
171
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
172
|
+
primaryText: 'Đồng ý',
|
|
173
|
+
onPrimaryPress: () => {
|
|
174
|
+
if (Platform.OS === 'ios') {
|
|
175
|
+
openSettings();
|
|
176
|
+
} else {
|
|
177
|
+
openSettings();
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
});
|
|
135
181
|
break;
|
|
136
182
|
}
|
|
137
183
|
});
|
|
@@ -139,6 +185,9 @@ export default function CCCDCameraScreen(props) {
|
|
|
139
185
|
|
|
140
186
|
useEffect(() => {
|
|
141
187
|
requestPermissions();
|
|
188
|
+
return () => {
|
|
189
|
+
if (focusTimer.current) clearTimeout(focusTimer.current);
|
|
190
|
+
};
|
|
142
191
|
}, []);
|
|
143
192
|
|
|
144
193
|
useEffect(() => {
|
|
@@ -164,138 +213,155 @@ export default function CCCDCameraScreen(props) {
|
|
|
164
213
|
}
|
|
165
214
|
|
|
166
215
|
return (
|
|
167
|
-
<View
|
|
168
|
-
style={{
|
|
169
|
-
pointerEvents={'box-none'}
|
|
170
|
-
>
|
|
171
|
-
<View
|
|
172
|
-
style={[
|
|
173
|
-
commonStyles.alignCenter,
|
|
174
|
-
commonStyles.fill,
|
|
175
|
-
commonStyles.justifyCenter,
|
|
176
|
-
{
|
|
177
|
-
position: 'absolute',
|
|
178
|
-
width: Dimensions.get('window').width,
|
|
179
|
-
height: Dimensions.get('window').height,
|
|
180
|
-
},
|
|
181
|
-
]}
|
|
182
|
-
>
|
|
183
|
-
{device ? (
|
|
184
|
-
<View style={$cameraFrame}>
|
|
185
|
-
<VisionCamera
|
|
186
|
-
ref={myCamera}
|
|
187
|
-
style={StyleSheet.absoluteFill}
|
|
188
|
-
device={device}
|
|
189
|
-
isActive={true}
|
|
190
|
-
photo={true}
|
|
191
|
-
format={format}
|
|
192
|
-
/>
|
|
193
|
-
</View>
|
|
194
|
-
) : (
|
|
195
|
-
<ActivityIndicator />
|
|
196
|
-
)}
|
|
197
|
-
</View>
|
|
198
|
-
|
|
199
|
-
<View style={[$back, { top: insets.top + 16 }]}>
|
|
216
|
+
<View style={styles.container}>
|
|
217
|
+
<View style={[styles.header, { paddingTop: insets.top + 16 }]}>
|
|
200
218
|
<TouchableOpacity
|
|
201
|
-
onPress={() =>
|
|
202
|
-
|
|
203
|
-
}}
|
|
204
|
-
style={{
|
|
205
|
-
position: 'absolute',
|
|
206
|
-
left: 0,
|
|
207
|
-
width: 48,
|
|
208
|
-
height: 48,
|
|
209
|
-
zIndex: 1000,
|
|
210
|
-
alignItems: 'center',
|
|
211
|
-
}}
|
|
219
|
+
onPress={() => navigation.goBack()}
|
|
220
|
+
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
|
|
212
221
|
>
|
|
213
|
-
<
|
|
222
|
+
<IconBack />
|
|
214
223
|
</TouchableOpacity>
|
|
215
|
-
<
|
|
216
|
-
style={
|
|
217
|
-
|
|
218
|
-
zIndex: 10,
|
|
219
|
-
color: '#FFFFFF',
|
|
220
|
-
fontSize: 16,
|
|
221
|
-
}}
|
|
222
|
-
>
|
|
223
|
-
{props?.route?.params?.front
|
|
224
|
-
? 'Chụp CMND/ CCCD mặt trước'
|
|
225
|
-
: 'Chụp CMND/ CCCD mặt sau'}
|
|
226
|
-
</MText>
|
|
224
|
+
<View style={styles.titleWrap}>
|
|
225
|
+
<MText style={styles.headerTitle}>CMND / CCCD</MText>
|
|
226
|
+
</View>
|
|
227
227
|
</View>
|
|
228
|
+
|
|
229
|
+
<MText style={styles.instruction}>
|
|
230
|
+
{props?.route?.params?.front
|
|
231
|
+
? 'Chụp CMND/ CCCD mặt trước'
|
|
232
|
+
: 'Chụp CMND/ CCCD mặt sau'}
|
|
233
|
+
</MText>
|
|
234
|
+
|
|
235
|
+
{/* Khung tỉ lệ thẻ: vùng nhìn thấy của preview = vùng sẽ crop.
|
|
236
|
+
Chạm vào khung để lấy nét thủ công. */}
|
|
228
237
|
<View
|
|
229
|
-
style={
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
alignSelf: 'center',
|
|
233
|
-
flexDirection: 'column',
|
|
234
|
-
alignItems: 'center',
|
|
238
|
+
style={styles.photoFrame}
|
|
239
|
+
onLayout={(e) => {
|
|
240
|
+
frameSize.current = e.nativeEvent.layout;
|
|
235
241
|
}}
|
|
242
|
+
onStartShouldSetResponder={() => true}
|
|
243
|
+
onResponderRelease={(e) =>
|
|
244
|
+
focusAt(e.nativeEvent.locationX, e.nativeEvent.locationY)
|
|
245
|
+
}
|
|
236
246
|
>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
{device ? (
|
|
248
|
+
<VisionCamera
|
|
249
|
+
ref={myCamera}
|
|
250
|
+
style={StyleSheet.absoluteFill}
|
|
251
|
+
device={device}
|
|
252
|
+
isActive={isFocused}
|
|
253
|
+
photo={true}
|
|
254
|
+
/>
|
|
255
|
+
) : null}
|
|
256
|
+
<View style={[styles.corner, styles.cornerTL]} />
|
|
257
|
+
<View style={[styles.corner, styles.cornerTR]} />
|
|
258
|
+
<View style={[styles.corner, styles.cornerBL]} />
|
|
259
|
+
<View style={[styles.corner, styles.cornerBR]} />
|
|
260
|
+
{focusPoint && (
|
|
261
|
+
<View
|
|
262
|
+
pointerEvents="none"
|
|
263
|
+
style={[
|
|
264
|
+
styles.focusRing,
|
|
265
|
+
{ left: focusPoint.x - 32, top: focusPoint.y - 32 },
|
|
266
|
+
]}
|
|
267
|
+
/>
|
|
268
|
+
)}
|
|
251
269
|
</View>
|
|
270
|
+
|
|
271
|
+
<View style={styles.spacer} />
|
|
272
|
+
<MText style={[styles.hint, { marginTop: 0, marginBottom: 20 }]}>
|
|
273
|
+
Đư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 nếu
|
|
274
|
+
ảnh bị mờ.
|
|
275
|
+
</MText>
|
|
276
|
+
<TouchableOpacity
|
|
277
|
+
style={[styles.captureButton, { marginBottom: insets.bottom + 24 }]}
|
|
278
|
+
onPress={takePicture}
|
|
279
|
+
>
|
|
280
|
+
<TakePhotoSvg />
|
|
281
|
+
</TouchableOpacity>
|
|
252
282
|
</View>
|
|
253
283
|
);
|
|
254
284
|
}
|
|
255
285
|
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
286
|
+
const styles = StyleSheet.create({
|
|
287
|
+
container: { flex: 1, backgroundColor: '#FFFFFF' },
|
|
288
|
+
header: {
|
|
289
|
+
flexDirection: 'row',
|
|
290
|
+
alignItems: 'center',
|
|
291
|
+
paddingHorizontal: 16,
|
|
292
|
+
paddingTop: 8,
|
|
293
|
+
},
|
|
294
|
+
titleWrap: {
|
|
295
|
+
flex: 1,
|
|
296
|
+
alignItems: 'center',
|
|
297
|
+
justifyContent: 'center',
|
|
298
|
+
marginRight: 24,
|
|
299
|
+
},
|
|
300
|
+
headerTitle: { color: '#333333', fontSize: 16, fontWeight: '600' },
|
|
301
|
+
instruction: {
|
|
302
|
+
textAlign: 'center',
|
|
303
|
+
color: '#333333',
|
|
304
|
+
fontSize: 14,
|
|
305
|
+
lineHeight: 20,
|
|
306
|
+
marginTop: 20,
|
|
307
|
+
marginBottom: 28,
|
|
308
|
+
},
|
|
309
|
+
photoFrame: {
|
|
310
|
+
marginHorizontal: 24,
|
|
311
|
+
aspectRatio: CARD_ASPECT_RATIO,
|
|
312
|
+
borderRadius: 8,
|
|
313
|
+
overflow: 'hidden',
|
|
314
|
+
backgroundColor: '#000000',
|
|
315
|
+
},
|
|
316
|
+
corner: {
|
|
317
|
+
position: 'absolute',
|
|
318
|
+
width: 26,
|
|
319
|
+
height: 26,
|
|
320
|
+
borderColor: ORANGE,
|
|
321
|
+
},
|
|
322
|
+
focusRing: {
|
|
323
|
+
position: 'absolute',
|
|
324
|
+
width: 64,
|
|
325
|
+
height: 64,
|
|
326
|
+
borderRadius: 8,
|
|
327
|
+
borderWidth: 1.5,
|
|
328
|
+
borderColor: '#FFD54A',
|
|
329
|
+
},
|
|
330
|
+
cornerTL: {
|
|
331
|
+
top: 0,
|
|
332
|
+
left: 0,
|
|
333
|
+
borderTopWidth: 4,
|
|
334
|
+
borderLeftWidth: 4,
|
|
335
|
+
borderTopLeftRadius: 8,
|
|
336
|
+
},
|
|
337
|
+
cornerTR: {
|
|
338
|
+
top: 0,
|
|
339
|
+
right: 0,
|
|
340
|
+
borderTopWidth: 4,
|
|
341
|
+
borderRightWidth: 4,
|
|
342
|
+
borderTopRightRadius: 8,
|
|
343
|
+
},
|
|
344
|
+
cornerBL: {
|
|
345
|
+
bottom: 0,
|
|
346
|
+
left: 0,
|
|
347
|
+
borderBottomWidth: 4,
|
|
348
|
+
borderLeftWidth: 4,
|
|
349
|
+
borderBottomLeftRadius: 8,
|
|
350
|
+
},
|
|
351
|
+
cornerBR: {
|
|
352
|
+
bottom: 0,
|
|
353
|
+
right: 0,
|
|
354
|
+
borderBottomWidth: 4,
|
|
355
|
+
borderRightWidth: 4,
|
|
356
|
+
borderBottomRightRadius: 8,
|
|
357
|
+
},
|
|
358
|
+
hint: {
|
|
359
|
+
textAlign: 'center',
|
|
360
|
+
color: '#555555',
|
|
361
|
+
fontSize: 13,
|
|
362
|
+
lineHeight: 19,
|
|
363
|
+
marginTop: 48,
|
|
364
|
+
},
|
|
365
|
+
spacer: { flex: 1 },
|
|
366
|
+
captureButton: { alignSelf: 'center' },
|
|
367
|
+
});
|