react-native-timacare 3.3.55 → 3.3.56-alert
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 +8 -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/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/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 +50 -54
- 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 +299 -186
- 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 +0 -1
- 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 +0 -1
- 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 +64 -66
- 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 +50 -54
- 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/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/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/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/typescript/AppStore.d.ts.map +1 -1
- package/lib/typescript/RNTimacare.d.ts.map +1 -1
- package/lib/typescript/assets/icons/index.d.ts +5 -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/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/package.json +1 -1
- package/src/AppStore.tsx +7 -2
- package/src/RNTimacare.tsx +7 -1
- package/src/assets/icons/index.tsx +8 -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/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/screens/SelectorStore.tsx +7 -2
- package/src/screens/camera/CCCDCameraScreen.tsx +50 -54
- 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 +299 -186
- 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 +0 -1
- package/src/screens/nationalIDBack/Store.tsx +44 -26
- package/src/screens/nationalIDBack/index.tsx +0 -1
- 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 +64 -66
- 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 +50 -54
- 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/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,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.Types=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _initializerDefineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/initializerDefineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _applyDecoratedDescriptor2=_interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));var _initializerWarningHelper2=_interopRequireDefault(require("@babel/runtime/helpers/initializerWarningHelper"));var _mobx=require("mobx");var _api=require("../services/api");var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.Types=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _initializerDefineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/initializerDefineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _applyDecoratedDescriptor2=_interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));var _initializerWarningHelper2=_interopRequireDefault(require("@babel/runtime/helpers/initializerWarningHelper"));var _mobx=require("mobx");var _api=require("../services/api");var _AlertGlobal=require("../components/ModalNotification/AlertGlobal");var _log=require("../utils/log");var _class,_descriptor,_descriptor2,_descriptor3;var Types=exports.Types=function(Types){Types[Types["Province"]=0]="Province";Types[Types["District"]=1]="District";Types[Types["Ward"]=2]="Ward";Types[Types["Reason"]=3]="Reason";Types[Types["Job"]=4]="Job";Types[Types["Bank"]=5]="Bank";return Types;}({});var SelectorStore=(_class=function(){function SelectorStore(){(0,_classCallCheck2.default)(this,SelectorStore);(0,_initializerDefineProperty2.default)(this,"isLoading",_descriptor,this);(0,_initializerDefineProperty2.default)(this,"isError",_descriptor2,this);(0,_initializerDefineProperty2.default)(this,"data",_descriptor3,this);}return(0,_createClass2.default)(SelectorStore,[{key:"getData",value:function getData(params,type,onSuccess,onFailure){var response,_t,_t2;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:this.isLoading=true;this.data=[];response={};_t=type;_context.next=_t===Types.Province?1:_t===Types.District?3:_t===Types.Ward?5:_t===Types.Reason?7:_t===Types.Job?9:_t===Types.Bank?11:13;break;case 1:_context.next=2;return _regenerator.default.awrap(_api.Api.getInstance().getProvinces(params));case 2:response=_context.sent;return _context.abrupt("continue",13);case 3:_context.next=4;return _regenerator.default.awrap(_api.Api.getInstance().getDistricts(params));case 4:response=_context.sent;return _context.abrupt("continue",13);case 5:_context.next=6;return _regenerator.default.awrap(_api.Api.getInstance().getWards(params));case 6:response=_context.sent;return _context.abrupt("continue",13);case 7:_context.next=8;return _regenerator.default.awrap(_api.Api.getInstance().loanPurpose(params));case 8:response=_context.sent;return _context.abrupt("continue",13);case 9:_context.next=10;return _regenerator.default.awrap(_api.Api.getInstance().getJobs(params));case 10:response=_context.sent;return _context.abrupt("continue",13);case 11:_context.next=12;return _regenerator.default.awrap(_api.Api.getInstance().getBanks(params));case 12:response=_context.sent;return _context.abrupt("continue",13);case 13:if(!(response.kind==='ok')){_context.next=17;break;}this.isLoading=false;this.isError=false;_t2=type;_context.next=_t2===Types.Reason?14:15;break;case 14:this.data=response.data.data.map(function(item){return(0,_extends2.default)({},item,{name:item.text});});return _context.abrupt("continue",16);case 15:this.data=response.data.data;return _context.abrupt("continue",16);case 16:(0,_log.myLog)(response.data.data);if(onSuccess){onSuccess(response.data.data);}_context.next=18;break;case 17:this.isLoading=false;this.isError=false;_AlertGlobal.AlertGlobal.show({type:'warning',title:'Lỗi',message:response.Messages,primaryText:'Đóng'});case 18:case"end":return _context.stop();}},null,this,null,Promise);}}]);}(),_descriptor=(0,_applyDecoratedDescriptor2.default)(_class.prototype,"isLoading",[_mobx.observable],{configurable:true,enumerable:true,writable:true,initializer:function initializer(){return false;}}),_descriptor2=(0,_applyDecoratedDescriptor2.default)(_class.prototype,"isError",[_mobx.observable],{configurable:true,enumerable:true,writable:true,initializer:function initializer(){return false;}}),_descriptor3=(0,_applyDecoratedDescriptor2.default)(_class.prototype,"data",[_mobx.observable],{configurable:true,enumerable:true,writable:true,initializer:function initializer(){return[];}}),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"getData",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"getData"),_class.prototype),_class);var _default=exports.default=SelectorStore;
|
|
2
2
|
//# sourceMappingURL=SelectorStore.js.map
|
|
@@ -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":"47BACA,IAAAA,KAAA,CAAAC,OAAA,SACA,IAAAC,IAAA,CAAAD,OAAA,oBACA,IAAAE,YAAA,CAAAF,OAAA,gDACA,IAAAG,IAAA,CAAAH,OAAA,iBAAqC,IAAAI,MAAA,CAAAC,WAAA,CAAAC,YAAA,CAAAC,YAAA,IAEzB,CAAAC,KAAK,CAAAC,OAAA,CAAAD,KAAA,UAALA,KAAK,EAALA,KAAK,CAALA,KAAK,2BAALA,KAAK,CAALA,KAAK,2BAALA,KAAK,CAALA,KAAK,mBAALA,KAAK,CAALA,KAAK,uBAALA,KAAK,CAALA,KAAK,iBAALA,KAAK,CAALA,KAAK,yBAAL,CAAAA,KAAK,UASX,CAAAE,aAAa,EAAAN,MAAA,qBAAAM,cAAA,KAAAC,gBAAA,CAAAC,OAAA,OAAAF,aAAA,K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BAAA,CAAAtE,MAAA,CAAA8D,SAAA,YAAA9D,MAAA,CAAA8D,SAAA,EAAA9D,MAAA,MAAAuE,QAAA,CAAAlE,OAAA,CAAAG,OAAA,CA8DMF,aAAa","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)');
|
|
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 _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 _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)');_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();},[]);(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:156,columnNumber:7}},_react.default.createElement(_reactNative.ActivityIndicator,{size:"large",color:"#0000ff",__self:this,__source:{fileName:_jsxFileName,lineNumber:157,columnNumber:9}}));}return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'black'},pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:163,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:167,columnNumber:7}},device?_react.default.createElement(_reactNative.View,{style:$cameraFrame,__self:this,__source:{fileName:_jsxFileName,lineNumber:180,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:181,columnNumber:13}})):_react.default.createElement(_reactNative.ActivityIndicator,{__self:this,__source:{fileName:_jsxFileName,lineNumber:191,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:[$back,{top:insets.top+16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:195,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:196,columnNumber:9}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:209,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{textAlign:'center',zIndex:10,color:'#FFFFFF',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:211,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:224,columnNumber:7}},_react.default.createElement(_MText.MText,{style:{color:'#fff',marginBottom:16,textAlign:'center',paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:233,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:244,columnNumber:9}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:245,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={};
|
|
2
2
|
//# sourceMappingURL=CCCDCameraScreen.js.map
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React, { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
ActivityIndicator,
|
|
5
|
-
Alert,
|
|
6
5
|
Dimensions,
|
|
7
6
|
Platform,
|
|
8
7
|
StyleSheet,
|
|
@@ -16,6 +15,7 @@ import {
|
|
|
16
15
|
} from 'react-native-vision-camera';
|
|
17
16
|
import { IconBackWhite, TakePhotoSvg } from '../../assets/icons';
|
|
18
17
|
import { MText } from '../../components/MText';
|
|
18
|
+
import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
|
|
19
19
|
import { useNavigation, useIsFocused } from '@react-navigation/native';
|
|
20
20
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
21
21
|
import { commonStyles } from '../CommonStyles';
|
|
@@ -64,51 +64,49 @@ export default function CCCDCameraScreen(props) {
|
|
|
64
64
|
console.log(
|
|
65
65
|
'This feature is not available (on this device / in this context)'
|
|
66
66
|
);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
AlertGlobal.show({
|
|
68
|
+
type: 'warning',
|
|
69
|
+
title: 'Thông báo',
|
|
70
|
+
message:
|
|
71
|
+
'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ị!',
|
|
72
|
+
primaryText: 'Đồng ý',
|
|
73
|
+
});
|
|
72
74
|
break;
|
|
73
75
|
case RESULTS.DENIED:
|
|
74
76
|
console.log(
|
|
75
77
|
'The permission has not been requested / is denied but requestable'
|
|
76
78
|
);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
]
|
|
92
|
-
);
|
|
79
|
+
AlertGlobal.show({
|
|
80
|
+
type: 'warning',
|
|
81
|
+
title: 'Thông báo',
|
|
82
|
+
message:
|
|
83
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
84
|
+
primaryText: 'Đồng ý',
|
|
85
|
+
onPrimaryPress: () => {
|
|
86
|
+
if (Platform.OS === 'ios') {
|
|
87
|
+
openSettings();
|
|
88
|
+
} else {
|
|
89
|
+
requestPermissions();
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
93
|
break;
|
|
94
94
|
case RESULTS.LIMITED:
|
|
95
95
|
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
|
-
);
|
|
96
|
+
AlertGlobal.show({
|
|
97
|
+
type: 'warning',
|
|
98
|
+
title: 'Thông báo',
|
|
99
|
+
message:
|
|
100
|
+
'Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',
|
|
101
|
+
primaryText: 'Đồng ý',
|
|
102
|
+
onPrimaryPress: () => {
|
|
103
|
+
if (Platform.OS === 'ios') {
|
|
104
|
+
openSettings();
|
|
105
|
+
} else {
|
|
106
|
+
requestPermissions();
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
});
|
|
112
110
|
break;
|
|
113
111
|
case RESULTS.GRANTED:
|
|
114
112
|
console.log('The permission is granted');
|
|
@@ -116,22 +114,20 @@ export default function CCCDCameraScreen(props) {
|
|
|
116
114
|
break;
|
|
117
115
|
case RESULTS.BLOCKED:
|
|
118
116
|
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
|
-
);
|
|
117
|
+
AlertGlobal.show({
|
|
118
|
+
type: 'warning',
|
|
119
|
+
title: 'Thông báo',
|
|
120
|
+
message:
|
|
121
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
122
|
+
primaryText: 'Đồng ý',
|
|
123
|
+
onPrimaryPress: () => {
|
|
124
|
+
if (Platform.OS === 'ios') {
|
|
125
|
+
openSettings();
|
|
126
|
+
} else {
|
|
127
|
+
openSettings();
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
});
|
|
135
131
|
break;
|
|
136
132
|
}
|
|
137
133
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeVisionCamera","_icons","_MText","_native","_reactNativeSafeAreaContext","_CommonStyles","_reactNativePermissions","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CCCDCameraScreen","props","_props$route2","_props$route2$params","insets","useSafeAreaInsets","navigation","useNavigation","isFocused","useIsFocused","myCamera","useRef","_useState","useState","_useState2","_slicedToArray2","passPermission","setPassPermission","_useState3","_useState4","shouldRenderCamera","setShouldRenderCamera","device","useCameraDevice","format","useCameraFormat","photoResolution","width","height","takePicture","_callee","_props$route","_props$route$params","data","_t","_regenerator","async","_context","prev","next","current","abrupt","awrap","takePhoto","qualityPrioritization","sent","goBack","route","params","callback","path","console","error","stop","Promise","requestPermissions","request","Platform","OS","PERMISSIONS","IOS","CAMERA","ANDROID","then","result","RESULTS","UNAVAILABLE","log","Alert","alert","text","DENIED","onPress","openSettings","LIMITED","GRANTED","BLOCKED","useEffect","timeout","setTimeout","clearTimeout","createElement","View","style","commonStyles","fill","__self","__source","fileName","lineNumber","columnNumber","ActivityIndicator","size","color","flex","backgroundColor","pointerEvents","alignCenter","justifyCenter","position","Dimensions","$cameraFrame","Camera","ref","StyleSheet","absoluteFill","isActive","photo","$back","top","TouchableOpacity","left","zIndex","alignItems","IconBackWhite","MText","textAlign","fontSize","front","bottom","alignSelf","flexDirection","marginBottom","paddingHorizontal","TakePhotoSvg","overlayColor","right","overflow","$overlay","_extends2","absoluteFillObject","justifyContent","$container","$row","$darkOverlayTop","$darkOverlayBottom","$darkOverlaySide","$frameBorder"],"sourceRoot":"../../../../src","sources":["screens/camera/CCCDCameraScreen.tsx"],"mappings":"waACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,wBAAA,CAAAF,OAAA,+BAKA,IAAAG,MAAA,CAAAH,OAAA,uBACA,IAAAI,MAAA,CAAAJ,OAAA,2BACA,IAAAK,OAAA,CAAAL,OAAA,6BACA,IAAAM,2BAAA,CAAAN,OAAA,mCACA,IAAAO,aAAA,CAAAP,OAAA,oBACA,IAAAQ,uBAAA,CAAAR,OAAA,6BAKkC,IAAAS,YAAA,2FAAAV,wBAAAW,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAb,uBAAA,UAAAA,wBAAAW,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,CAAAM,CAAA,EAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,W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AtC,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAA7G,YAAA,CAAA8G,UAAA,KAAAC,YAAA,KAAE,CACC,CACd,CACF,CAAC,CAEX,CAEA,GAAM,CAAAmC,YAAY,CAAG,uBAAuB,CAC5C,GAAM,CAAAjB,KAAgB,CAAG,CACvBT,QAAQ,CAAE,UAAU,CACpBY,IAAI,CAAE,CAAC,CACPe,KAAK,CAAE,CACT,CAAC,CAED,GAAM,CAAAzB,YAAuB,CAAG,CAC9B1E,KAAK,CAAEyE,uBAAU,CAAC5G,GAAG,CAAC,QAAQ,CAAC,CAACmC,KAAK,CACrCC,MAAM,CAAE,GAAG,CACXmG,QAAQ,CAAE,QAAQ,CAClBhC,eAAe,CAAE,OACnB,CAAC,CAED,GAAM,CAAAiC,QAAmB,IAAAC,SAAA,CAAA3I,OAAA,KACpBkH,uBAAU,CAAC0B,kBAAkB,EAChCC,cAAc,CAAE,QAAQ,CACxBlB,UAAU,CAAE,QAAQ,EACrB,CAED,GAAM,CAAAmB,UAAqB,CAAG,CAC5BtC,IAAI,CAAE,CAAC,CACPC,eAAe,CAAE,MACnB,CAAC,CAED,GAAM,CAAAsC,IAAe,CAAG,CACtBZ,aAAa,CAAE,KAAK,CACpBR,UAAU,CAAE,QACd,CAAC,CAED,GAAM,CAAAqB,eAA0B,CAAG,CACjC3G,KAAK,CAAE,MAAM,CACboE,eAAe,CAAE8B,YACnB,CAAC,CAED,GAAM,CAAAU,kBAA6B,CAAG,CACpC5G,KAAK,CAAE,MAAM,CACboE,eAAe,CAAE8B,YACnB,CAAC,CACD,GAAM,CAAAW,gBAA2B,CAAG,CAClCzC,eAAe,CAAE8B,YACnB,CAAC,CACD,GAAM,CAAAY,YAAuB,CAAG,CAGhC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeVisionCamera","_icons","_MText","_AlertGlobal","_native","_reactNativeSafeAreaContext","_CommonStyles","_reactNativePermissions","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CCCDCameraScreen","props","_props$route2","_props$route2$params","insets","useSafeAreaInsets","navigation","useNavigation","isFocused","useIsFocused","myCamera","useRef","_useState","useState","_useState2","_slicedToArray2","passPermission","setPassPermission","_useState3","_useState4","shouldRenderCamera","setShouldRenderCamera","device","useCameraDevice","format","useCameraFormat","photoResolution","width","height","takePicture","_callee","_props$route","_props$route$params","data","_t","_regenerator","async","_context","prev","next","current","abrupt","awrap","takePhoto","qualityPrioritization","sent","goBack","route","params","callback","path","console","error","stop","Promise","requestPermissions","request","Platform","OS","PERMISSIONS","IOS","CAMERA","ANDROID","then","result","RESULTS","UNAVAILABLE","log","AlertGlobal","show","type","title","message","primaryText","DENIED","onPrimaryPress","openSettings","LIMITED","GRANTED","BLOCKED","useEffect","timeout","setTimeout","clearTimeout","createElement","View","style","commonStyles","fill","__self","__source","fileName","lineNumber","columnNumber","ActivityIndicator","size","color","flex","backgroundColor","pointerEvents","alignCenter","justifyCenter","position","Dimensions","$cameraFrame","Camera","ref","StyleSheet","absoluteFill","isActive","photo","$back","top","TouchableOpacity","onPress","left","zIndex","alignItems","IconBackWhite","MText","textAlign","fontSize","front","bottom","alignSelf","flexDirection","marginBottom","paddingHorizontal","TakePhotoSvg","overlayColor","right","overflow","$overlay","_extends2","absoluteFillObject","justifyContent","$container","$row","$darkOverlayTop","$darkOverlayBottom","$darkOverlaySide","$frameBorder"],"sourceRoot":"../../../../src","sources":["screens/camera/CCCDCameraScreen.tsx"],"mappings":"waACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAQA,IAAAE,wBAAA,CAAAF,OAAA,+BAKA,IAAAG,MAAA,CAAAH,OAAA,uBACA,IAAAI,MAAA,CAAAJ,OAAA,2BACA,IAAAK,YAAA,CAAAL,OAAA,mDACA,IAAAM,OAAA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AM,CAAE,GAAG,CACXuG,QAAQ,CAAE,QAAQ,CAClBjC,eAAe,CAAE,OACnB,CAAC,CAED,GAAM,CAAAkC,QAAmB,IAAAC,SAAA,CAAA/I,OAAA,KACpBqH,uBAAU,CAAC2B,kBAAkB,EAChCC,cAAc,CAAE,QAAQ,CACxBlB,UAAU,CAAE,QAAQ,EACrB,CAED,GAAM,CAAAmB,UAAqB,CAAG,CAC5BvC,IAAI,CAAE,CAAC,CACPC,eAAe,CAAE,MACnB,CAAC,CAED,GAAM,CAAAuC,IAAe,CAAG,CACtBZ,aAAa,CAAE,KAAK,CACpBR,UAAU,CAAE,QACd,CAAC,CAED,GAAM,CAAAqB,eAA0B,CAAG,CACjC/G,KAAK,CAAE,MAAM,CACbuE,eAAe,CAAE+B,YACnB,CAAC,CAED,GAAM,CAAAU,kBAA6B,CAAG,CACpChH,KAAK,CAAE,MAAM,CACbuE,eAAe,CAAE+B,YACnB,CAAC,CACD,GAAM,CAAAW,gBAA2B,CAAG,CAClC1C,eAAe,CAAE+B,YACnB,CAAC,CACD,GAAM,CAAAY,YAAuB,CAAG,CAGhC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Camera=void 0;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 _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _CommonStyles=require("../CommonStyles");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativePermissions=require("react-native-permissions");var _reactNativeVisionCamera=require("react-native-vision-camera");var _icons=require("../../assets/icons");var _Store=_interopRequireDefault(require("./Store"));var _MText=require("../../components/MText");var _reactNativeModal=_interopRequireDefault(require("react-native-modal"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _reactNativeFs=_interopRequireDefault(require("react-native-fs"));var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/camera/index.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 _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var cameraStore=new _Store.default();var Camera=exports.Camera=(0,_mobxReactLite.observer)(function Camera(props){var navigation=(0,_native.useNavigation)();var isFocused=(0,_native.useIsFocused)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),shouldRenderCamera=_useState2[0],setShouldRenderCamera=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),passPermission=_useState4[0],setPassPermission=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=(0,_slicedToArray2.default)(_useState5,2),flash=_useState6[0],setFlash=_useState6[1];var _useState7=(0,_react.useState)(props.route.params.front),_useState8=(0,_slicedToArray2.default)(_useState7,2),front=_useState8[0],setFront=_useState8[1];var _useState9=(0,_react.useState)(props.route.params.selfie),_useState0=(0,_slicedToArray2.default)(_useState9,1),selfie=_useState0[0];var _useState1=(0,_react.useState)(false),_useState10=(0,_slicedToArray2.default)(_useState1,2),taking=_useState10[0],setTaking=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=(0,_slicedToArray2.default)(_useState11,2),showModal=_useState12[0],setShowModal=_useState12[1];var myCamera=(0,_react.useRef)(null);var device=(0,_reactNativeVisionCamera.useCameraDevice)(front?'front':'back');var format=(0,_reactNativeVisionCamera.useCameraFormat)(device,[{photoResolution:{width:1280,height:720}}]);var takePhoto=function _callee(){var data,uri,base64;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(myCamera.current==null||taking)){_context.next=1;break;}return _context.abrupt("return");case 1:setTaking(true);_context.next=2;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'quality'}));case 2:data=_context.sent;uri='file://'+data.path;setTaking(false);navigation.goBack();if(props.route.params.callback){props.route.params.callback(uri);}if(!props.route.params.base64){_context.next=4;break;}_context.next=3;return _regenerator.default.awrap(_reactNativeFs.default.readFile(data.path,'base64'));case 3:base64=_context.sent;props.route.params.base64(base64);case 4:case"end":return _context.stop();}},null,null,null,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 ý'}]);break;}});};(0,_react.useEffect)(function(){_requestPermissions();if(selfie){cameraStore.interval=setInterval(function(){if(new Date().getTime()-cameraStore.lastFace>1000){cameraStore.isFace=false;}},1000);}return function(){clearInterval(cameraStore.interval);};},[]);var handlerFace=function handlerFace(event){if(event.type==='face'){cameraStore.isFace=true;cameraStore.lastFace=new Date().getTime();}};(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);return _react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.fill,{backgroundColor:'black'}],pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:215,columnNumber:5}},passPermission&&shouldRenderCamera&&_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:220,columnNumber:9}},device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:{width:_reactNative.Dimensions.get('window').width,height:'100%'},device:device,isActive:true,photo:true,format:format,torch:flash&&device.hasTorch?'on':'off',__self:this,__source:{fileName:_jsxFileName,lineNumber:233,columnNumber:13}}):_react.default.createElement(_reactNative.ActivityIndicator,{__self:this,__source:{fileName:_jsxFileName,lineNumber:246,columnNumber:13}})),_react.default.createElement(_reactNative.SafeAreaView,{style:[_CommonStyles.commonStyles.fill,{position:'absolute',width:'100%',height:'100%'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:251,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,{paddingHorizontal:16,marginTop:16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:257,columnNumber:9}},_react.default.createElement(_MButton.default,{onPress:function onPress(){navigation.goBack();},style:[{width:48,height:48,zIndex:1000}],__self:this,__source:{fileName:_jsxFileName,lineNumber:264,columnNumber:11}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:271,columnNumber:13}})),_react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:273,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{flex:0,justifyContent:'center',position:'absolute',bottom:0,width:'100%'},__self:this,__source:{fileName:_jsxFileName,lineNumber:275,columnNumber:9}},!props.route.params.front&&_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white',textAlign:'center',backgroundColor:'#00000099',paddingVertical:12}],__self:this,__source:{fileName:_jsxFileName,lineNumber:285,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh,",'\n',"ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),props.route.params.selfie&&_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white',textAlign:'center',backgroundColor:'#00000099',paddingVertical:12}],__self:this,__source:{fileName:_jsxFileName,lineNumber:301,columnNumber:13}},"Xin vui l\xF2ng nh\xECn th\u1EB3ng, khu\xF4n m\u1EB7t \u1EDF trong",'\n',"khung h\xECnh, \xE1nh s\xE1ng \u0111\u1EE7 r\xF5 n\xE9t khu\xF4n m\u1EB7t"),taking?_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{width:64,height:64,alignSelf:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:332,columnNumber:13}},_react.default.createElement(_reactNative.ActivityIndicator,{color:'white',size:"large",__self:this,__source:{fileName:_jsxFileName,lineNumber:339,columnNumber:15}})):_react.default.createElement(_MButton.default,{onPress:function onPress(){return takePhoto();},style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{margin:24}],__self:this,__source:{fileName:_jsxFileName,lineNumber:342,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:352,columnNumber:15}})))),_react.default.createElement(_reactNativeModal.default,{isVisible:showModal,__self:this,__source:{fileName:_jsxFileName,lineNumber:357,columnNumber:7}},_react.default.createElement(_reactNative.SafeAreaView,{style:{backgroundColor:'#FFFFFF',borderRadius:4},__self:this,__source:{fileName:_jsxFileName,lineNumber:358,columnNumber:9}},_react.default.createElement(_reactNative.View,{__self:this,__source:{fileName:_jsxFileName,lineNumber:359,columnNumber:11}},_react.default.createElement(_MText.MText,{style:[{marginTop:16,color:'#F05123',fontSize:16,textAlign:'center',fontWeight:'bold'}],center:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:360,columnNumber:13}},"B2: X\xC1C TH\u1EF0C KHU\xD4N M\u1EB6T"),_react.default.createElement(_reactNative.View,{style:{alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:374,columnNumber:13}},_react.default.createElement(_icons.Selfie,{__self:this,__source:{fileName:_jsxFileName,lineNumber:375,columnNumber:15}})),_react.default.createElement(_MText.MText,{style:{color:'#333333',textAlign:'center',fontSize:16,fontWeight:'600',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:377,columnNumber:13}},"B\u1EA1n vui l\xF2ng ch\u1EE5p \u1EA3nh",'\n',"khu\xF4n m\u1EB7t theo h\u01B0\u1EDBng d\u1EABn:"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',marginTop:16,alignItems:'center',paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:389,columnNumber:13}},_react.default.createElement(_icons.TimaNormal,{width:12,__self:this,__source:{fileName:_jsxFileName,lineNumber:397,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:398,columnNumber:15}},"Gi\u1EEF \u0111i\u1EC7n tho\u1EA1i \u1ED5n \u0111\u1ECBnh, th\u1EB3ng m\u1EB7t")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:402,columnNumber:13}},_react.default.createElement(_icons.TimaNormal,{width:12,__self:this,__source:{fileName:_jsxFileName,lineNumber:409,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:410,columnNumber:15}},"\u0110i\u1EC1u ch\u1EC9nh khu\xF4n m\u1EB7t n\u1EB1m g\u1ECDn trong v\xF2ng tr\xF2n")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:414,columnNumber:13}},_react.default.createElement(_icons.TimaNormal,{width:12,__self:this,__source:{fileName:_jsxFileName,lineNumber:420,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:421,columnNumber:15}},"Th\u1EF1c hi\u1EC7n quay tr\xE1i, ph\u1EA3i theo h\u01B0\u1EDBng d\u1EABn \u0111\u1EC3",'\n'," ho\xE0n th\xE0nh x\xE1c th\u1EF1c khu\xF4n m\u1EB7t")),_react.default.createElement(_reactNative.View,{style:{marginTop:24,paddingHorizontal:50},__self:this,__source:{fileName:_jsxFileName,lineNumber:426,columnNumber:13}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){return setShowModal(false);},__self:this,__source:{fileName:_jsxFileName,lineNumber:427,columnNumber:15}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF7A00','#EF4123'],style:{alignItems:'center',borderRadius:30,alignContent:'center',paddingVertical:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:428,columnNumber:17}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:'#ffffff'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:437,columnNumber:19}},"Ti\u1EBFp t\u1EE5c")))),_react.default.createElement(_reactNative.View,{style:{marginBottom:24,marginTop:8,flexDirection:'row',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:445,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:453,columnNumber:15}},"Cung c\u1EA5p b\u1EDFi",' '),_react.default.createElement(_icons.CIMBBank,{__self:this,__source:{fileName:_jsxFileName,lineNumber:456,columnNumber:15}}))))));});
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Camera=void 0;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 _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _CommonStyles=require("../CommonStyles");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativePermissions=require("react-native-permissions");var _reactNativeVisionCamera=require("react-native-vision-camera");var _icons=require("../../assets/icons");var _Store=_interopRequireDefault(require("./Store"));var _MText=require("../../components/MText");var _AlertGlobal=require("../../components/ModalNotification/AlertGlobal");var _reactNativeModal=_interopRequireDefault(require("react-native-modal"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _reactNativeFs=_interopRequireDefault(require("react-native-fs"));var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/camera/index.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 _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var cameraStore=new _Store.default();var Camera=exports.Camera=(0,_mobxReactLite.observer)(function Camera(props){var navigation=(0,_native.useNavigation)();var isFocused=(0,_native.useIsFocused)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),shouldRenderCamera=_useState2[0],setShouldRenderCamera=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),passPermission=_useState4[0],setPassPermission=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=(0,_slicedToArray2.default)(_useState5,2),flash=_useState6[0],setFlash=_useState6[1];var _useState7=(0,_react.useState)(props.route.params.front),_useState8=(0,_slicedToArray2.default)(_useState7,2),front=_useState8[0],setFront=_useState8[1];var _useState9=(0,_react.useState)(props.route.params.selfie),_useState0=(0,_slicedToArray2.default)(_useState9,1),selfie=_useState0[0];var _useState1=(0,_react.useState)(false),_useState10=(0,_slicedToArray2.default)(_useState1,2),taking=_useState10[0],setTaking=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=(0,_slicedToArray2.default)(_useState11,2),showModal=_useState12[0],setShowModal=_useState12[1];var myCamera=(0,_react.useRef)(null);var device=(0,_reactNativeVisionCamera.useCameraDevice)(front?'front':'back');var format=(0,_reactNativeVisionCamera.useCameraFormat)(device,[{photoResolution:{width:1280,height:720}}]);var takePhoto=function _callee(){var data,uri,base64;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(myCamera.current==null||taking)){_context.next=1;break;}return _context.abrupt("return");case 1:setTaking(true);_context.next=2;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'quality'}));case 2:data=_context.sent;uri='file://'+data.path;setTaking(false);navigation.goBack();if(props.route.params.callback){props.route.params.callback(uri);}if(!props.route.params.base64){_context.next=4;break;}_context.next=3;return _regenerator.default.awrap(_reactNativeFs.default.readFile(data.path,'base64'));case 3:base64=_context.sent;props.route.params.base64(base64);case 4:case"end":return _context.stop();}},null,null,null,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 ý'});break;}});};(0,_react.useEffect)(function(){_requestPermissions();if(selfie){cameraStore.interval=setInterval(function(){if(new Date().getTime()-cameraStore.lastFace>1000){cameraStore.isFace=false;}},1000);}return function(){clearInterval(cameraStore.interval);};},[]);var handlerFace=function handlerFace(event){if(event.type==='face'){cameraStore.isFace=true;cameraStore.lastFace=new Date().getTime();}};(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);return _react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.fill,{backgroundColor:'black'}],pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:211,columnNumber:5}},passPermission&&shouldRenderCamera&&_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:216,columnNumber:9}},device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:{width:_reactNative.Dimensions.get('window').width,height:'100%'},device:device,isActive:true,photo:true,format:format,torch:flash&&device.hasTorch?'on':'off',__self:this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:13}}):_react.default.createElement(_reactNative.ActivityIndicator,{__self:this,__source:{fileName:_jsxFileName,lineNumber:242,columnNumber:13}})),_react.default.createElement(_reactNative.SafeAreaView,{style:[_CommonStyles.commonStyles.fill,{position:'absolute',width:'100%',height:'100%'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:247,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,{paddingHorizontal:16,marginTop:16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:253,columnNumber:9}},_react.default.createElement(_MButton.default,{onPress:function onPress(){navigation.goBack();},style:[{width:48,height:48,zIndex:1000}],__self:this,__source:{fileName:_jsxFileName,lineNumber:260,columnNumber:11}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:267,columnNumber:13}})),_react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:269,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{flex:0,justifyContent:'center',position:'absolute',bottom:0,width:'100%'},__self:this,__source:{fileName:_jsxFileName,lineNumber:271,columnNumber:9}},!props.route.params.front&&_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white',textAlign:'center',backgroundColor:'#00000099',paddingVertical:12}],__self:this,__source:{fileName:_jsxFileName,lineNumber:281,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh,",'\n',"ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),props.route.params.selfie&&_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white',textAlign:'center',backgroundColor:'#00000099',paddingVertical:12}],__self:this,__source:{fileName:_jsxFileName,lineNumber:297,columnNumber:13}},"Xin vui l\xF2ng nh\xECn th\u1EB3ng, khu\xF4n m\u1EB7t \u1EDF trong",'\n',"khung h\xECnh, \xE1nh s\xE1ng \u0111\u1EE7 r\xF5 n\xE9t khu\xF4n m\u1EB7t"),taking?_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{width:64,height:64,alignSelf:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:328,columnNumber:13}},_react.default.createElement(_reactNative.ActivityIndicator,{color:'white',size:"large",__self:this,__source:{fileName:_jsxFileName,lineNumber:335,columnNumber:15}})):_react.default.createElement(_MButton.default,{onPress:function onPress(){return takePhoto();},style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{margin:24}],__self:this,__source:{fileName:_jsxFileName,lineNumber:338,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:348,columnNumber:15}})))),_react.default.createElement(_reactNativeModal.default,{isVisible:showModal,__self:this,__source:{fileName:_jsxFileName,lineNumber:353,columnNumber:7}},_react.default.createElement(_reactNative.SafeAreaView,{style:{backgroundColor:'#FFFFFF',borderRadius:4},__self:this,__source:{fileName:_jsxFileName,lineNumber:354,columnNumber:9}},_react.default.createElement(_reactNative.View,{__self:this,__source:{fileName:_jsxFileName,lineNumber:355,columnNumber:11}},_react.default.createElement(_MText.MText,{style:[{marginTop:16,color:'#F05123',fontSize:16,textAlign:'center',fontWeight:'bold'}],center:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:356,columnNumber:13}},"B2: X\xC1C TH\u1EF0C KHU\xD4N M\u1EB6T"),_react.default.createElement(_reactNative.View,{style:{alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:370,columnNumber:13}},_react.default.createElement(_icons.Selfie,{__self:this,__source:{fileName:_jsxFileName,lineNumber:371,columnNumber:15}})),_react.default.createElement(_MText.MText,{style:{color:'#333333',textAlign:'center',fontSize:16,fontWeight:'600',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:373,columnNumber:13}},"B\u1EA1n vui l\xF2ng ch\u1EE5p \u1EA3nh",'\n',"khu\xF4n m\u1EB7t theo h\u01B0\u1EDBng d\u1EABn:"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',marginTop:16,alignItems:'center',paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:385,columnNumber:13}},_react.default.createElement(_icons.TimaNormal,{width:12,__self:this,__source:{fileName:_jsxFileName,lineNumber:393,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:394,columnNumber:15}},"Gi\u1EEF \u0111i\u1EC7n tho\u1EA1i \u1ED5n \u0111\u1ECBnh, th\u1EB3ng m\u1EB7t")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:398,columnNumber:13}},_react.default.createElement(_icons.TimaNormal,{width:12,__self:this,__source:{fileName:_jsxFileName,lineNumber:405,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:406,columnNumber:15}},"\u0110i\u1EC1u ch\u1EC9nh khu\xF4n m\u1EB7t n\u1EB1m g\u1ECDn trong v\xF2ng tr\xF2n")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:410,columnNumber:13}},_react.default.createElement(_icons.TimaNormal,{width:12,__self:this,__source:{fileName:_jsxFileName,lineNumber:416,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:417,columnNumber:15}},"Th\u1EF1c hi\u1EC7n quay tr\xE1i, ph\u1EA3i theo h\u01B0\u1EDBng d\u1EABn \u0111\u1EC3",'\n'," ho\xE0n th\xE0nh x\xE1c th\u1EF1c khu\xF4n m\u1EB7t")),_react.default.createElement(_reactNative.View,{style:{marginTop:24,paddingHorizontal:50},__self:this,__source:{fileName:_jsxFileName,lineNumber:422,columnNumber:13}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){return setShowModal(false);},__self:this,__source:{fileName:_jsxFileName,lineNumber:423,columnNumber:15}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF7A00','#EF4123'],style:{alignItems:'center',borderRadius:30,alignContent:'center',paddingVertical:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:424,columnNumber:17}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:'#ffffff'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:433,columnNumber:19}},"Ti\u1EBFp t\u1EE5c")))),_react.default.createElement(_reactNative.View,{style:{marginBottom:24,marginTop:8,flexDirection:'row',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:441,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:449,columnNumber:15}},"Cung c\u1EA5p b\u1EDFi",' '),_react.default.createElement(_icons.CIMBBank,{__self:this,__source:{fileName:_jsxFileName,lineNumber:452,columnNumber:15}}))))));});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React, { useState, Fragment, useEffect, useRef } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
ActivityIndicator,
|
|
5
|
-
Alert,
|
|
6
5
|
Dimensions,
|
|
7
6
|
Image,
|
|
8
7
|
ImageStyle,
|
|
@@ -50,6 +49,7 @@ import {
|
|
|
50
49
|
import { Svg, Circle, Defs, ClipPath, Rect } from 'react-native-svg';
|
|
51
50
|
import Store from './Store';
|
|
52
51
|
import { MText } from '../../components/MText';
|
|
52
|
+
import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
|
|
53
53
|
import Modal from 'react-native-modal';
|
|
54
54
|
import LinearGradient from 'react-native-linear-gradient';
|
|
55
55
|
import RNFS from 'react-native-fs';
|
|
@@ -103,51 +103,49 @@ export const Camera = observer(function Camera(props: any) {
|
|
|
103
103
|
console.log(
|
|
104
104
|
'This feature is not available (on this device / in this context)'
|
|
105
105
|
);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
'
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
AlertGlobal.show({
|
|
107
|
+
type: 'warning',
|
|
108
|
+
title: 'Thông báo',
|
|
109
|
+
message:
|
|
110
|
+
'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ị!',
|
|
111
|
+
primaryText: 'Đồng ý',
|
|
112
|
+
});
|
|
111
113
|
break;
|
|
112
114
|
case RESULTS.DENIED:
|
|
113
115
|
console.log(
|
|
114
116
|
'The permission has not been requested / is denied but requestable'
|
|
115
117
|
);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
'
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
]
|
|
131
|
-
);
|
|
118
|
+
AlertGlobal.show({
|
|
119
|
+
type: 'warning',
|
|
120
|
+
title: 'Thông báo',
|
|
121
|
+
message:
|
|
122
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
123
|
+
primaryText: 'Đồng ý',
|
|
124
|
+
onPrimaryPress: () => {
|
|
125
|
+
if (Platform.OS === 'ios') {
|
|
126
|
+
openSettings();
|
|
127
|
+
} else {
|
|
128
|
+
requestPermissions();
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
132
|
break;
|
|
133
133
|
case RESULTS.LIMITED:
|
|
134
134
|
console.log('The permission is limited: some actions are possible');
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
'
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
]
|
|
150
|
-
);
|
|
135
|
+
AlertGlobal.show({
|
|
136
|
+
type: 'warning',
|
|
137
|
+
title: 'Thông báo',
|
|
138
|
+
message:
|
|
139
|
+
'Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',
|
|
140
|
+
primaryText: 'Đồng ý',
|
|
141
|
+
onPrimaryPress: () => {
|
|
142
|
+
if (Platform.OS === 'ios') {
|
|
143
|
+
openSettings();
|
|
144
|
+
} else {
|
|
145
|
+
requestPermissions();
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
});
|
|
151
149
|
break;
|
|
152
150
|
case RESULTS.GRANTED:
|
|
153
151
|
console.log('The permission is granted');
|
|
@@ -155,22 +153,20 @@ export const Camera = observer(function Camera(props: any) {
|
|
|
155
153
|
break;
|
|
156
154
|
case RESULTS.BLOCKED:
|
|
157
155
|
console.log('The permission is denied and not requestable anymore');
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
'
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
]
|
|
173
|
-
);
|
|
156
|
+
AlertGlobal.show({
|
|
157
|
+
type: 'warning',
|
|
158
|
+
title: 'Thông báo',
|
|
159
|
+
message:
|
|
160
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
161
|
+
primaryText: 'Đồng ý',
|
|
162
|
+
// onPrimaryPress: () => {
|
|
163
|
+
// if (Platform.OS === "ios") {
|
|
164
|
+
// openSettings()
|
|
165
|
+
// } else {
|
|
166
|
+
// openSettings()
|
|
167
|
+
// }
|
|
168
|
+
// },
|
|
169
|
+
});
|
|
174
170
|
break;
|
|
175
171
|
}
|
|
176
172
|
});
|