@ha_tecno/live-id-sdk 1.0.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/android/build.gradle +4 -0
- package/lib/commonjs/components/{WaitingForResult → CameraConfigInfo}/index.js +9 -11
- package/lib/commonjs/components/CameraConfigInfo/index.js.map +1 -0
- package/lib/commonjs/components/CameraConfigInfo/styles.js +20 -0
- package/lib/commonjs/components/CameraConfigInfo/styles.js.map +1 -0
- package/lib/commonjs/components/CaptureButton/index.js +88 -0
- package/lib/commonjs/components/CaptureButton/index.js.map +1 -0
- package/lib/commonjs/components/CaptureButton/styles.js +22 -0
- package/lib/commonjs/components/CaptureButton/styles.js.map +1 -0
- package/lib/commonjs/components/Gabarito/index.js +2 -2
- package/lib/commonjs/components/Gabarito/index.js.map +1 -1
- package/lib/commonjs/components/Gabarito/styles.js +10 -11
- package/lib/commonjs/components/Gabarito/styles.js.map +1 -1
- package/lib/commonjs/components/HelpRegister/index.js +51 -0
- package/lib/commonjs/components/HelpRegister/index.js.map +1 -0
- package/lib/commonjs/{screens/CadastroFinger/components/AjudaCadastro → components/HelpRegister}/styles.js +17 -20
- package/lib/commonjs/components/HelpRegister/styles.js.map +1 -0
- package/lib/commonjs/components/Toast/Toast.js +12 -12
- package/lib/commonjs/components/Toast/Toast.js.map +1 -1
- package/lib/commonjs/components/deviceNotFound/deviceNotFound.js +27 -0
- package/lib/commonjs/components/deviceNotFound/deviceNotFound.js.map +1 -0
- package/lib/commonjs/components/deviceNotFound/styles.js +36 -0
- package/lib/commonjs/components/deviceNotFound/styles.js.map +1 -0
- package/lib/commonjs/components/icon/icon.js +22 -0
- package/lib/commonjs/components/icon/icon.js.map +1 -0
- package/lib/commonjs/components/index.js +56 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/components/modalMessage/modalMessage.js +63 -0
- package/lib/commonjs/components/modalMessage/modalMessage.js.map +1 -0
- package/lib/commonjs/components/modalMessage/styles.js +51 -0
- package/lib/commonjs/components/modalMessage/styles.js.map +1 -0
- package/lib/commonjs/components/recordButton/recordButton.js +83 -0
- package/lib/commonjs/components/recordButton/recordButton.js.map +1 -0
- package/lib/commonjs/components/recordButton/styles.js +21 -0
- package/lib/commonjs/components/recordButton/styles.js.map +1 -0
- package/lib/commonjs/index.js +9 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/screens/CadastroScreen/CadastroScreen.js +29 -29
- package/lib/commonjs/screens/CadastroScreen/CadastroScreen.js.map +1 -1
- package/lib/commonjs/screens/FingerAuth/FingerAuth.js +128 -0
- package/lib/commonjs/screens/FingerAuth/FingerAuth.js.map +1 -0
- package/lib/commonjs/screens/FingerAuth/styles.js +35 -0
- package/lib/commonjs/screens/FingerAuth/styles.js.map +1 -0
- package/lib/commonjs/screens/FingerRegister/index.js +138 -0
- package/lib/commonjs/screens/FingerRegister/index.js.map +1 -0
- package/lib/commonjs/screens/FingerRegister/styles.js +35 -0
- package/lib/commonjs/screens/FingerRegister/styles.js.map +1 -0
- package/lib/commonjs/screens/LifeCertificate/index.js +145 -0
- package/lib/commonjs/screens/LifeCertificate/index.js.map +1 -0
- package/lib/commonjs/screens/LifeCertificate/styles.js +27 -0
- package/lib/commonjs/screens/LifeCertificate/styles.js.map +1 -0
- package/lib/commonjs/screens/index.js +28 -0
- package/lib/commonjs/screens/index.js.map +1 -0
- package/lib/commonjs/services/index.js +35 -101
- package/lib/commonjs/services/index.js.map +1 -1
- package/lib/commonjs/services/services.js +134 -0
- package/lib/commonjs/services/services.js.map +1 -0
- package/lib/commonjs/services/types.js +2 -0
- package/lib/commonjs/{types/screen.js.map → services/types.js.map} +1 -1
- package/lib/commonjs/store/createSelectors.js +16 -0
- package/lib/commonjs/store/createSelectors.js.map +1 -0
- package/lib/commonjs/store/modules/fingerAuth/index.js +19 -0
- package/lib/commonjs/store/modules/fingerAuth/index.js.map +1 -0
- package/lib/commonjs/store/modules/fingerAuth/selectors.js +13 -0
- package/lib/commonjs/store/modules/fingerAuth/selectors.js.map +1 -0
- package/lib/commonjs/store/modules/fingerAuth/slice.js +92 -0
- package/lib/commonjs/store/modules/fingerAuth/slice.js.map +1 -0
- package/lib/commonjs/store/modules/fingerAuth/type.js +2 -0
- package/lib/commonjs/store/modules/fingerAuth/type.js.map +1 -0
- package/lib/commonjs/store/modules/fingerRegister/index.js +19 -0
- package/lib/commonjs/store/modules/fingerRegister/index.js.map +1 -0
- package/lib/commonjs/store/modules/fingerRegister/selectors.js +13 -0
- package/lib/commonjs/store/modules/fingerRegister/selectors.js.map +1 -0
- package/lib/commonjs/store/modules/fingerRegister/slice.js +101 -0
- package/lib/commonjs/store/modules/fingerRegister/slice.js.map +1 -0
- package/lib/commonjs/store/modules/fingerRegister/types.js +2 -0
- package/lib/commonjs/store/modules/fingerRegister/types.js.map +1 -0
- package/lib/commonjs/store/modules/lifeCertificate/index.js +19 -0
- package/lib/commonjs/store/modules/lifeCertificate/index.js.map +1 -0
- package/lib/commonjs/store/modules/lifeCertificate/selectors.js +13 -0
- package/lib/commonjs/store/modules/lifeCertificate/selectors.js.map +1 -0
- package/lib/commonjs/store/modules/lifeCertificate/slice.js +101 -0
- package/lib/commonjs/store/modules/lifeCertificate/slice.js.map +1 -0
- package/lib/commonjs/store/modules/lifeCertificate/types.js +6 -0
- package/lib/commonjs/store/modules/lifeCertificate/types.js.map +1 -0
- package/lib/commonjs/utils/file.js +2 -2
- package/lib/commonjs/utils/getConfigCamera.js +1 -1
- package/lib/commonjs/utils/getConfigCamera.js.map +1 -1
- package/lib/module/components/CameraConfigInfo/index.js +15 -0
- package/lib/module/components/CameraConfigInfo/index.js.map +1 -0
- package/lib/module/components/CameraConfigInfo/styles.js +14 -0
- package/lib/module/components/CameraConfigInfo/styles.js.map +1 -0
- package/lib/module/components/CaptureButton/index.js +79 -0
- package/lib/module/components/CaptureButton/index.js.map +1 -0
- package/lib/module/components/CaptureButton/styles.js +16 -0
- package/lib/module/components/CaptureButton/styles.js.map +1 -0
- package/lib/module/components/Gabarito/index.js +5 -4
- package/lib/module/components/Gabarito/index.js.map +1 -1
- package/lib/module/components/Gabarito/styles.js +11 -12
- package/lib/module/components/Gabarito/styles.js.map +1 -1
- package/lib/module/{screens/CadastroFinger/components/AjudaCadastro → components/HelpRegister}/index.js +17 -15
- package/lib/module/components/HelpRegister/index.js.map +1 -0
- package/lib/module/components/HelpRegister/styles.js +53 -0
- package/lib/module/components/HelpRegister/styles.js.map +1 -0
- package/lib/module/components/Toast/Toast.js +14 -14
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/components/deviceNotFound/deviceNotFound.js +20 -0
- package/lib/module/components/deviceNotFound/deviceNotFound.js.map +1 -0
- package/lib/module/components/deviceNotFound/styles.js +30 -0
- package/lib/module/components/deviceNotFound/styles.js.map +1 -0
- package/lib/module/components/icon/icon.js +15 -0
- package/lib/module/components/icon/icon.js.map +1 -0
- package/lib/module/components/index.js +9 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/modalMessage/modalMessage.js +54 -0
- package/lib/module/components/modalMessage/modalMessage.js.map +1 -0
- package/lib/module/components/modalMessage/styles.js +45 -0
- package/lib/module/components/modalMessage/styles.js.map +1 -0
- package/lib/module/components/recordButton/recordButton.js +74 -0
- package/lib/module/components/recordButton/recordButton.js.map +1 -0
- package/lib/module/components/recordButton/styles.js +15 -0
- package/lib/module/components/recordButton/styles.js.map +1 -0
- package/lib/module/index.js +4 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/CadastroScreen/CadastroScreen.js +33 -33
- package/lib/module/screens/CadastroScreen/CadastroScreen.js.map +1 -1
- package/lib/module/screens/FingerAuth/FingerAuth.js +119 -0
- package/lib/module/screens/FingerAuth/FingerAuth.js.map +1 -0
- package/lib/module/screens/FingerAuth/styles.js +29 -0
- package/lib/module/screens/FingerAuth/styles.js.map +1 -0
- package/lib/module/screens/FingerRegister/index.js +129 -0
- package/lib/module/screens/FingerRegister/index.js.map +1 -0
- package/lib/module/screens/FingerRegister/styles.js +29 -0
- package/lib/module/screens/FingerRegister/styles.js.map +1 -0
- package/lib/module/screens/LifeCertificate/index.js +136 -0
- package/lib/module/screens/LifeCertificate/index.js.map +1 -0
- package/lib/module/screens/LifeCertificate/styles.js +21 -0
- package/lib/module/screens/LifeCertificate/styles.js.map +1 -0
- package/lib/module/screens/index.js +5 -0
- package/lib/module/screens/index.js.map +1 -0
- package/lib/module/services/index.js +9 -95
- package/lib/module/services/index.js.map +1 -1
- package/lib/module/services/services.js +123 -0
- package/lib/module/services/services.js.map +1 -0
- package/lib/module/services/types.js +2 -0
- package/lib/module/{types/screen.js.map → services/types.js.map} +1 -1
- package/lib/module/store/createSelectors.js +10 -0
- package/lib/module/store/createSelectors.js.map +1 -0
- package/lib/module/store/modules/fingerAuth/index.js +3 -0
- package/lib/module/store/modules/fingerAuth/index.js.map +1 -0
- package/lib/module/store/modules/fingerAuth/selectors.js +6 -0
- package/lib/module/store/modules/fingerAuth/selectors.js.map +1 -0
- package/lib/module/store/modules/fingerAuth/slice.js +86 -0
- package/lib/module/store/modules/fingerAuth/slice.js.map +1 -0
- package/lib/module/store/modules/fingerAuth/type.js +2 -0
- package/lib/module/store/modules/fingerAuth/type.js.map +1 -0
- package/lib/module/store/modules/fingerRegister/index.js +3 -0
- package/lib/module/store/modules/fingerRegister/index.js.map +1 -0
- package/lib/module/store/modules/fingerRegister/selectors.js +6 -0
- package/lib/module/store/modules/fingerRegister/selectors.js.map +1 -0
- package/lib/module/store/modules/fingerRegister/slice.js +95 -0
- package/lib/module/store/modules/fingerRegister/slice.js.map +1 -0
- package/lib/module/store/modules/fingerRegister/types.js +2 -0
- package/lib/module/store/modules/fingerRegister/types.js.map +1 -0
- package/lib/module/store/modules/lifeCertificate/index.js +3 -0
- package/lib/module/store/modules/lifeCertificate/index.js.map +1 -0
- package/lib/module/store/modules/lifeCertificate/selectors.js +6 -0
- package/lib/module/store/modules/lifeCertificate/selectors.js.map +1 -0
- package/lib/module/store/modules/lifeCertificate/slice.js +95 -0
- package/lib/module/store/modules/lifeCertificate/slice.js.map +1 -0
- package/lib/module/store/modules/lifeCertificate/types.js +2 -0
- package/lib/module/store/modules/lifeCertificate/types.js.map +1 -0
- package/lib/module/utils/file.js +3 -3
- package/lib/module/utils/getConfigCamera.js +4 -4
- package/lib/module/utils/getConfigCamera.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/typescript/src/components/CameraConfigInfo/index.d.ts +8 -0
- package/lib/typescript/src/components/CameraConfigInfo/index.d.ts.map +1 -0
- package/lib/typescript/src/components/CameraConfigInfo/styles.d.ts +13 -0
- package/lib/typescript/src/components/CameraConfigInfo/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/CaptureButton/index.d.ts +10 -0
- package/lib/typescript/src/components/CaptureButton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/CaptureButton/styles.d.ts +15 -0
- package/lib/typescript/src/components/CaptureButton/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/Gabarito/index.d.ts +2 -1
- package/lib/typescript/src/components/Gabarito/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Gabarito/styles.d.ts +1 -2
- package/lib/typescript/src/components/Gabarito/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/HelpRegister/index.d.ts +4 -0
- package/lib/typescript/src/components/HelpRegister/index.d.ts.map +1 -0
- package/lib/typescript/src/{screens/CadastroFinger/components/AjudaCadastro → components/HelpRegister}/styles.d.ts +2 -5
- package/lib/typescript/src/components/HelpRegister/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/Toast/Toast.d.ts +1 -1
- package/lib/typescript/src/components/Toast/Toast.d.ts.map +1 -1
- package/lib/typescript/src/components/deviceNotFound/deviceNotFound.d.ts +8 -0
- package/lib/typescript/src/components/deviceNotFound/deviceNotFound.d.ts.map +1 -0
- package/lib/typescript/src/components/deviceNotFound/styles.d.ts +29 -0
- package/lib/typescript/src/components/deviceNotFound/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/icon.d.ts +9 -0
- package/lib/typescript/src/components/icon/icon.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +9 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/modalMessage/modalMessage.d.ts +11 -0
- package/lib/typescript/src/components/modalMessage/modalMessage.d.ts.map +1 -0
- package/lib/typescript/src/components/modalMessage/styles.d.ts +44 -0
- package/lib/typescript/src/components/modalMessage/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/recordButton/recordButton.d.ts +10 -0
- package/lib/typescript/src/components/recordButton/recordButton.d.ts.map +1 -0
- package/lib/typescript/src/components/recordButton/styles.d.ts +14 -0
- package/lib/typescript/src/components/recordButton/styles.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/CadastroScreen/CadastroScreen.d.ts +2 -4
- package/lib/typescript/src/screens/CadastroScreen/CadastroScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts +9 -0
- package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts.map +1 -0
- package/lib/typescript/src/screens/FingerAuth/styles.d.ts +25 -0
- package/lib/typescript/src/screens/FingerAuth/styles.d.ts.map +1 -0
- package/lib/typescript/src/screens/FingerRegister/index.d.ts +9 -0
- package/lib/typescript/src/screens/FingerRegister/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/FingerRegister/styles.d.ts +25 -0
- package/lib/typescript/src/screens/FingerRegister/styles.d.ts.map +1 -0
- package/lib/typescript/src/screens/LifeCertificate/index.d.ts +7 -0
- package/lib/typescript/src/screens/LifeCertificate/index.d.ts.map +1 -0
- package/lib/typescript/src/{components/WaitingForResult → screens/LifeCertificate}/styles.d.ts +7 -11
- package/lib/typescript/src/screens/LifeCertificate/styles.d.ts.map +1 -0
- package/lib/typescript/src/screens/index.d.ts +5 -0
- package/lib/typescript/src/screens/index.d.ts.map +1 -0
- package/lib/typescript/src/services/index.d.ts +2 -17
- package/lib/typescript/src/services/index.d.ts.map +1 -1
- package/lib/typescript/src/services/services.d.ts +6 -0
- package/lib/typescript/src/services/services.d.ts.map +1 -0
- package/lib/typescript/src/services/types.d.ts +37 -0
- package/lib/typescript/src/services/types.d.ts.map +1 -0
- package/lib/typescript/src/store/createSelectors.d.ts +11 -0
- package/lib/typescript/src/store/createSelectors.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/fingerAuth/index.d.ts +3 -0
- package/lib/typescript/src/store/modules/fingerAuth/index.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/fingerAuth/selectors.d.ts +20 -0
- package/lib/typescript/src/store/modules/fingerAuth/selectors.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/fingerAuth/slice.d.ts +4 -0
- package/lib/typescript/src/store/modules/fingerAuth/slice.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/fingerAuth/type.d.ts +28 -0
- package/lib/typescript/src/store/modules/fingerAuth/type.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/fingerRegister/index.d.ts +3 -0
- package/lib/typescript/src/store/modules/fingerRegister/index.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/fingerRegister/selectors.d.ts +22 -0
- package/lib/typescript/src/store/modules/fingerRegister/selectors.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/fingerRegister/slice.d.ts +4 -0
- package/lib/typescript/src/store/modules/fingerRegister/slice.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/fingerRegister/types.d.ts +30 -0
- package/lib/typescript/src/store/modules/fingerRegister/types.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/lifeCertificate/index.d.ts +3 -0
- package/lib/typescript/src/store/modules/lifeCertificate/index.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/lifeCertificate/selectors.d.ts +23 -0
- package/lib/typescript/src/store/modules/lifeCertificate/selectors.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/lifeCertificate/slice.d.ts +4 -0
- package/lib/typescript/src/store/modules/lifeCertificate/slice.d.ts.map +1 -0
- package/lib/typescript/src/store/modules/lifeCertificate/types.d.ts +37 -0
- package/lib/typescript/src/store/modules/lifeCertificate/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/getConfigCamera.d.ts +1 -1
- package/lib/typescript/src/utils/getConfigCamera.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +1 -1
- package/package.json +24 -42
- package/src/components/CameraConfigInfo/index.tsx +20 -0
- package/src/components/CameraConfigInfo/styles.ts +14 -0
- package/src/components/CaptureButton/index.tsx +74 -0
- package/src/components/CaptureButton/styles.ts +16 -0
- package/src/components/Gabarito/index.tsx +6 -4
- package/src/components/Gabarito/styles.ts +13 -14
- package/src/components/HelpRegister/index.tsx +40 -0
- package/src/components/HelpRegister/styles.ts +54 -0
- package/src/components/Toast/Toast.tsx +18 -22
- package/src/components/deviceNotFound/deviceNotFound.tsx +23 -0
- package/src/components/deviceNotFound/styles.ts +30 -0
- package/src/components/icon/icon.tsx +14 -0
- package/src/components/index.ts +9 -0
- package/src/components/modalMessage/modalMessage.tsx +73 -0
- package/src/components/modalMessage/styles.ts +45 -0
- package/src/components/recordButton/recordButton.tsx +75 -0
- package/src/components/recordButton/styles.ts +15 -0
- package/src/index.tsx +5 -4
- package/src/screens/CadastroScreen/CadastroScreen.tsx +35 -52
- package/src/screens/FingerAuth/FingerAuth.tsx +121 -0
- package/src/screens/FingerAuth/styles.ts +28 -0
- package/src/screens/FingerRegister/index.tsx +141 -0
- package/src/screens/FingerRegister/styles.ts +28 -0
- package/src/screens/LifeCertificate/index.tsx +152 -0
- package/src/screens/LifeCertificate/styles.ts +21 -0
- package/src/screens/index.ts +5 -0
- package/src/services/index.ts +12 -113
- package/src/services/services.ts +129 -0
- package/src/services/types.ts +42 -0
- package/src/store/createSelectors.ts +15 -0
- package/src/store/modules/fingerAuth/index.ts +3 -0
- package/src/store/modules/fingerAuth/selectors.ts +7 -0
- package/src/store/modules/fingerAuth/slice.ts +91 -0
- package/src/store/modules/fingerAuth/type.ts +29 -0
- package/src/store/modules/fingerRegister/index.ts +3 -0
- package/src/store/modules/fingerRegister/selectors.ts +7 -0
- package/src/store/modules/fingerRegister/slice.ts +101 -0
- package/src/store/modules/fingerRegister/types.ts +30 -0
- package/src/store/modules/lifeCertificate/index.ts +3 -0
- package/src/store/modules/lifeCertificate/selectors.ts +7 -0
- package/src/store/modules/lifeCertificate/slice.ts +100 -0
- package/src/store/modules/lifeCertificate/types.ts +40 -0
- package/src/utils/file.ts +3 -3
- package/src/utils/getConfigCamera.ts +7 -12
- package/src/utils/index.ts +1 -1
- package/lib/commonjs/components/CameraConfigInfos/index.js +0 -21
- package/lib/commonjs/components/CameraConfigInfos/index.js.map +0 -1
- package/lib/commonjs/components/CameraConfigInfos/styles.js +0 -19
- package/lib/commonjs/components/CameraConfigInfos/styles.js.map +0 -1
- package/lib/commonjs/components/DeviceNullDisplay/index.js +0 -59
- package/lib/commonjs/components/DeviceNullDisplay/index.js.map +0 -1
- package/lib/commonjs/components/ErrorDisplay/index.js +0 -59
- package/lib/commonjs/components/ErrorDisplay/index.js.map +0 -1
- package/lib/commonjs/components/WaitingForResult/index.js.map +0 -1
- package/lib/commonjs/components/WaitingForResult/styles.js +0 -32
- package/lib/commonjs/components/WaitingForResult/styles.js.map +0 -1
- package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/index.js +0 -49
- package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/index.js.map +0 -1
- package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/styles.js.map +0 -1
- package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/index.js +0 -298
- package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/index.js.map +0 -1
- package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/styles.js +0 -54
- package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/styles.js.map +0 -1
- package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/index.js +0 -44
- package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/index.js.map +0 -1
- package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/styles.js +0 -65
- package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/styles.js.map +0 -1
- package/lib/commonjs/screens/CadastroFinger/index.js +0 -50
- package/lib/commonjs/screens/CadastroFinger/index.js.map +0 -1
- package/lib/commonjs/screens/ProvaVidas/index.js +0 -246
- package/lib/commonjs/screens/ProvaVidas/index.js.map +0 -1
- package/lib/commonjs/screens/ProvaVidas/styles.js +0 -93
- package/lib/commonjs/screens/ProvaVidas/styles.js.map +0 -1
- package/lib/commonjs/screens/ValidadeFinger/index.js +0 -216
- package/lib/commonjs/screens/ValidadeFinger/index.js.map +0 -1
- package/lib/commonjs/screens/ValidadeFinger/styles.js +0 -54
- package/lib/commonjs/screens/ValidadeFinger/styles.js.map +0 -1
- package/lib/commonjs/types/screen.js +0 -2
- package/lib/module/components/CameraConfigInfos/index.js +0 -13
- package/lib/module/components/CameraConfigInfos/index.js.map +0 -1
- package/lib/module/components/CameraConfigInfos/styles.js +0 -13
- package/lib/module/components/CameraConfigInfos/styles.js.map +0 -1
- package/lib/module/components/DeviceNullDisplay/index.js +0 -51
- package/lib/module/components/DeviceNullDisplay/index.js.map +0 -1
- package/lib/module/components/ErrorDisplay/index.js +0 -51
- package/lib/module/components/ErrorDisplay/index.js.map +0 -1
- package/lib/module/components/WaitingForResult/index.js +0 -17
- package/lib/module/components/WaitingForResult/index.js.map +0 -1
- package/lib/module/components/WaitingForResult/styles.js +0 -26
- package/lib/module/components/WaitingForResult/styles.js.map +0 -1
- package/lib/module/screens/CadastroFinger/components/AjudaCadastro/index.js.map +0 -1
- package/lib/module/screens/CadastroFinger/components/AjudaCadastro/styles.js +0 -56
- package/lib/module/screens/CadastroFinger/components/AjudaCadastro/styles.js.map +0 -1
- package/lib/module/screens/CadastroFinger/components/CameraCadastro/index.js +0 -288
- package/lib/module/screens/CadastroFinger/components/CameraCadastro/index.js.map +0 -1
- package/lib/module/screens/CadastroFinger/components/CameraCadastro/styles.js +0 -48
- package/lib/module/screens/CadastroFinger/components/CameraCadastro/styles.js.map +0 -1
- package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/index.js +0 -36
- package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/index.js.map +0 -1
- package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/styles.js +0 -59
- package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/styles.js.map +0 -1
- package/lib/module/screens/CadastroFinger/index.js +0 -42
- package/lib/module/screens/CadastroFinger/index.js.map +0 -1
- package/lib/module/screens/ProvaVidas/index.js +0 -239
- package/lib/module/screens/ProvaVidas/index.js.map +0 -1
- package/lib/module/screens/ProvaVidas/styles.js +0 -87
- package/lib/module/screens/ProvaVidas/styles.js.map +0 -1
- package/lib/module/screens/ValidadeFinger/index.js +0 -206
- package/lib/module/screens/ValidadeFinger/index.js.map +0 -1
- package/lib/module/screens/ValidadeFinger/styles.js +0 -48
- package/lib/module/screens/ValidadeFinger/styles.js.map +0 -1
- package/lib/module/types/screen.js +0 -2
- package/lib/typescript/src/components/CameraConfigInfos/index.d.ts +0 -9
- package/lib/typescript/src/components/CameraConfigInfos/index.d.ts.map +0 -1
- package/lib/typescript/src/components/CameraConfigInfos/styles.d.ts +0 -11
- package/lib/typescript/src/components/CameraConfigInfos/styles.d.ts.map +0 -1
- package/lib/typescript/src/components/DeviceNullDisplay/index.d.ts +0 -11
- package/lib/typescript/src/components/DeviceNullDisplay/index.d.ts.map +0 -1
- package/lib/typescript/src/components/ErrorDisplay/index.d.ts +0 -11
- package/lib/typescript/src/components/ErrorDisplay/index.d.ts.map +0 -1
- package/lib/typescript/src/components/WaitingForResult/index.d.ts +0 -7
- package/lib/typescript/src/components/WaitingForResult/index.d.ts.map +0 -1
- package/lib/typescript/src/components/WaitingForResult/styles.d.ts.map +0 -1
- package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/index.d.ts +0 -7
- package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/index.d.ts.map +0 -1
- package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/styles.d.ts.map +0 -1
- package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/index.d.ts +0 -16
- package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/index.d.ts.map +0 -1
- package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/styles.d.ts +0 -44
- package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/styles.d.ts.map +0 -1
- package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/index.d.ts +0 -12
- package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/index.d.ts.map +0 -1
- package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.d.ts +0 -54
- package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.d.ts.map +0 -1
- package/lib/typescript/src/screens/CadastroFinger/index.d.ts +0 -16
- package/lib/typescript/src/screens/CadastroFinger/index.d.ts.map +0 -1
- package/lib/typescript/src/screens/ProvaVidas/index.d.ts +0 -14
- package/lib/typescript/src/screens/ProvaVidas/index.d.ts.map +0 -1
- package/lib/typescript/src/screens/ProvaVidas/styles.d.ts +0 -85
- package/lib/typescript/src/screens/ProvaVidas/styles.d.ts.map +0 -1
- package/lib/typescript/src/screens/ValidadeFinger/index.d.ts +0 -14
- package/lib/typescript/src/screens/ValidadeFinger/index.d.ts.map +0 -1
- package/lib/typescript/src/screens/ValidadeFinger/styles.d.ts +0 -44
- package/lib/typescript/src/screens/ValidadeFinger/styles.d.ts.map +0 -1
- package/lib/typescript/src/types/screen.d.ts +0 -6
- package/lib/typescript/src/types/screen.d.ts.map +0 -1
- package/live-id-sdk.podspec +0 -41
- package/src/components/CameraConfigInfos/index.tsx +0 -25
- package/src/components/CameraConfigInfos/styles.ts +0 -13
- package/src/components/DeviceNullDisplay/index.tsx +0 -59
- package/src/components/ErrorDisplay/index.tsx +0 -60
- package/src/components/WaitingForResult/index.tsx +0 -22
- package/src/components/WaitingForResult/styles.ts +0 -27
- package/src/screens/CadastroFinger/components/AjudaCadastro/index.tsx +0 -49
- package/src/screens/CadastroFinger/components/AjudaCadastro/styles.ts +0 -56
- package/src/screens/CadastroFinger/components/CameraCadastro/index.tsx +0 -356
- package/src/screens/CadastroFinger/components/CameraCadastro/styles.ts +0 -47
- package/src/screens/CadastroFinger/components/ImageDisplayScreen/index.tsx +0 -45
- package/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.ts +0 -55
- package/src/screens/CadastroFinger/index.tsx +0 -56
- package/src/screens/ProvaVidas/index.tsx +0 -308
- package/src/screens/ProvaVidas/styles.ts +0 -99
- package/src/screens/ValidadeFinger/index.tsx +0 -263
- package/src/screens/ValidadeFinger/styles.ts +0 -47
- package/src/types/screen.ts +0 -5
@@ -0,0 +1,45 @@
|
|
1
|
+
import { StyleSheet } from "react-native";
|
2
|
+
export const styles = StyleSheet.create({
|
3
|
+
container: {
|
4
|
+
flex: 1,
|
5
|
+
justifyContent: "center",
|
6
|
+
alignItems: "center"
|
7
|
+
},
|
8
|
+
modal: {
|
9
|
+
maxWidth: 300,
|
10
|
+
maxHeight: 200,
|
11
|
+
gap: 12,
|
12
|
+
borderRadius: 20,
|
13
|
+
padding: 18,
|
14
|
+
alignItems: "center",
|
15
|
+
shadowColor: "#000",
|
16
|
+
shadowOffset: {
|
17
|
+
width: 0,
|
18
|
+
height: 2
|
19
|
+
},
|
20
|
+
shadowOpacity: 0.25,
|
21
|
+
shadowRadius: 4,
|
22
|
+
elevation: 5
|
23
|
+
},
|
24
|
+
title: {
|
25
|
+
fontSize: 18,
|
26
|
+
fontWeight: "bold",
|
27
|
+
color: "#000"
|
28
|
+
},
|
29
|
+
text: {
|
30
|
+
fontSize: 16,
|
31
|
+
textAlign: "center",
|
32
|
+
color: "#000"
|
33
|
+
},
|
34
|
+
button: {
|
35
|
+
backgroundColor: "#0000ff",
|
36
|
+
paddingHorizontal: 12,
|
37
|
+
paddingVertical: 6,
|
38
|
+
borderRadius: 10
|
39
|
+
},
|
40
|
+
textButton: {
|
41
|
+
color: "#fff",
|
42
|
+
fontSize: 14
|
43
|
+
}
|
44
|
+
});
|
45
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["StyleSheet","styles","create","container","flex","justifyContent","alignItems","modal","maxWidth","maxHeight","gap","borderRadius","padding","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","title","fontSize","fontWeight","color","text","textAlign","button","backgroundColor","paddingHorizontal","paddingVertical","textButton"],"sourceRoot":"../../../../src","sources":["components/modalMessage/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,OAAO,MAAMC,MAAM,GAAGD,UAAU,CAACE,MAAM,CAAC;EACtCC,SAAS,EAAE;IACTC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDC,KAAK,EAAE;IACLC,QAAQ,EAAE,GAAG;IACbC,SAAS,EAAE,GAAG;IACdC,GAAG,EAAE,EAAE;IACPC,YAAY,EAAE,EAAE;IAChBC,OAAO,EAAE,EAAE;IACXN,UAAU,EAAE,QAAQ;IACpBO,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MACZC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE;IACV,CAAC;IACDC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC;EACDC,KAAK,EAAE;IACLC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE;EACT,CAAC;EACDC,IAAI,EAAE;IACJH,QAAQ,EAAE,EAAE;IACZI,SAAS,EAAE,QAAQ;IACnBF,KAAK,EAAE;EACT,CAAC;EACDG,MAAM,EAAE;IACNC,eAAe,EAAE,SAAS;IAC1BC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBlB,YAAY,EAAE;EAChB,CAAC;EACDmB,UAAU,EAAE;IACVP,KAAK,EAAE,MAAM;IACbF,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC"}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import React, { useEffect } from "react";
|
2
|
+
import { Pressable } from "react-native";
|
3
|
+
import Animated, { interpolateColor, useAnimatedStyle, useSharedValue, withSpring, withTiming } from "react-native-reanimated";
|
4
|
+
import Icon from "../icon/icon";
|
5
|
+
import { styles } from "./styles";
|
6
|
+
const RecordButton = ({
|
7
|
+
onPress,
|
8
|
+
disabled,
|
9
|
+
timer,
|
10
|
+
isRecording
|
11
|
+
}) => {
|
12
|
+
const progress = useSharedValue(0);
|
13
|
+
const width = useSharedValue(100);
|
14
|
+
const translateX = useSharedValue(0);
|
15
|
+
const opacity = useSharedValue(0);
|
16
|
+
const animatedView = useAnimatedStyle(() => ({
|
17
|
+
width: width.value,
|
18
|
+
backgroundColor: interpolateColor(progress.value, [0, 1], ["#1F75FF", "#DE3737"])
|
19
|
+
}));
|
20
|
+
const animatedIcon = useAnimatedStyle(() => ({
|
21
|
+
transform: [{
|
22
|
+
translateX: -translateX.value
|
23
|
+
}]
|
24
|
+
}));
|
25
|
+
const animatedText = useAnimatedStyle(() => ({
|
26
|
+
opacity: opacity.value,
|
27
|
+
transform: [{
|
28
|
+
translateX: translateX.value
|
29
|
+
}]
|
30
|
+
}));
|
31
|
+
useEffect(() => {
|
32
|
+
if (timer === 0) {
|
33
|
+
setTimeout(() => {
|
34
|
+
width.value = withSpring(100);
|
35
|
+
translateX.value = withSpring(0);
|
36
|
+
opacity.value = withTiming(0, {
|
37
|
+
duration: 250
|
38
|
+
});
|
39
|
+
}, 500);
|
40
|
+
setTimeout(() => {
|
41
|
+
progress.value = withSpring(0, {
|
42
|
+
duration: 1000
|
43
|
+
});
|
44
|
+
}, 5);
|
45
|
+
}
|
46
|
+
}, [width, opacity, timer, progress, translateX]);
|
47
|
+
const handlePress = () => {
|
48
|
+
onPress();
|
49
|
+
width.value = withSpring(175);
|
50
|
+
translateX.value = withSpring(25);
|
51
|
+
opacity.value = withTiming(1, {
|
52
|
+
duration: 250
|
53
|
+
});
|
54
|
+
progress.value = withSpring(1, {
|
55
|
+
duration: 1000
|
56
|
+
});
|
57
|
+
};
|
58
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
59
|
+
onPress: handlePress,
|
60
|
+
disabled: disabled
|
61
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
62
|
+
style: [styles.container, animatedView]
|
63
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
64
|
+
style: animatedIcon
|
65
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
66
|
+
name: "videocam-outline",
|
67
|
+
size: 40,
|
68
|
+
color: "white"
|
69
|
+
})), isRecording && timer >= 0 ? /*#__PURE__*/React.createElement(Animated.Text, {
|
70
|
+
style: [styles.text, animatedText]
|
71
|
+
}, timer) : undefined));
|
72
|
+
};
|
73
|
+
export default RecordButton;
|
74
|
+
//# sourceMappingURL=recordButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","useEffect","Pressable","Animated","interpolateColor","useAnimatedStyle","useSharedValue","withSpring","withTiming","Icon","styles","RecordButton","onPress","disabled","timer","isRecording","progress","width","translateX","opacity","animatedView","value","backgroundColor","animatedIcon","transform","animatedText","setTimeout","duration","handlePress","createElement","View","style","container","name","size","color","Text","text","undefined"],"sourceRoot":"../../../../src","sources":["components/recordButton/recordButton.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,SAAS,QAAQ,cAAc;AACxC,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAChC,OAAOC,IAAI,MAAM,cAAc;AAC/B,SAASC,MAAM,QAAQ,UAAU;AASjC,MAAMC,YAAY,G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CAAC;AAEhB,CAAC;AAED,eAAe3B,YAAY"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { StyleSheet } from "react-native";
|
2
|
+
export const styles = StyleSheet.create({
|
3
|
+
container: {
|
4
|
+
flexDirection: "row",
|
5
|
+
height: 50,
|
6
|
+
justifyContent: "center",
|
7
|
+
alignItems: "center",
|
8
|
+
borderRadius: 50
|
9
|
+
},
|
10
|
+
text: {
|
11
|
+
position: "absolute",
|
12
|
+
color: "#fff"
|
13
|
+
}
|
14
|
+
});
|
15
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["StyleSheet","styles","create","container","flexDirection","height","justifyContent","alignItems","borderRadius","text","position","color"],"sourceRoot":"../../../../src","sources":["components/recordButton/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,OAAO,MAAMC,MAAM,GAAGD,UAAU,CAACE,MAAM,CAAC;EACvCC,SAAS,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBC,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,YAAY,EAAE;EACf,CAAC;EACDC,IAAI,EAAE;IACLC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACR;AACD,CAAC,CAAC"}
|
package/lib/module/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
import { LifeCertificate, FingerRegister, FingerAuth } from "./screens";
|
2
2
|
|
3
3
|
// deprecated
|
4
|
-
|
5
|
-
export {
|
6
|
-
export {
|
4
|
+
|
5
|
+
export { CadastroScreen } from "./screens/CadastroScreen/CadastroScreen";
|
6
|
+
export { LifeCertificate, FingerRegister, FingerAuth };
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["LifeCertificate","FingerRegister","FingerAuth","CadastroScreen"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,eAAe,EAAEC,cAAc,EAAEC,UAAU,QAAQ,WAAW;;AAEvE;;AAEA,SAASC,cAAc,QAAQ,yCAAyC;AAExE,SAASH,eAAe,EAAEC,cAAc,EAAEC,UAAU"}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
2
2
|
/* eslint-disable react-native/no-inline-styles */
|
3
|
-
import React, { useEffect, useState } from
|
4
|
-
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert, Image } from
|
5
|
-
import { cadastro } from
|
6
|
-
import Modal from
|
3
|
+
import React, { useEffect, useState } from "react";
|
4
|
+
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert, Image } from "react-native";
|
5
|
+
import { cadastro } from "../../services";
|
6
|
+
import Modal from "react-native-modal";
|
7
7
|
export const CadastroScreen = ({
|
8
8
|
isVisible = false,
|
9
9
|
onCloseModal,
|
@@ -11,12 +11,12 @@ export const CadastroScreen = ({
|
|
11
11
|
onSuccess,
|
12
12
|
ModalParams
|
13
13
|
}) => {
|
14
|
-
const [cpf, setCpf] = useState(
|
15
|
-
const [nome, setNome] = useState(
|
16
|
-
const [senha, setSenha] = useState(
|
17
|
-
const [confirmarSenha, setConfirmarSenha] = useState(
|
14
|
+
const [cpf, setCpf] = useState("");
|
15
|
+
const [nome, setNome] = useState("");
|
16
|
+
const [senha, setSenha] = useState("");
|
17
|
+
const [confirmarSenha, setConfirmarSenha] = useState("");
|
18
18
|
const generateRandomElevenDigits = () => {
|
19
|
-
let cpf =
|
19
|
+
let cpf = "";
|
20
20
|
for (let i = 0; i < 11; i++) {
|
21
21
|
cpf += Math.floor(Math.random() * 9);
|
22
22
|
}
|
@@ -24,7 +24,7 @@ export const CadastroScreen = ({
|
|
24
24
|
};
|
25
25
|
const generateRandomName = () => {
|
26
26
|
// uma strin aleatória de 10 caracteres a 14 caracteres
|
27
|
-
let name =
|
27
|
+
let name = "";
|
28
28
|
const length = Math.floor(Math.random() * 5) + 10;
|
29
29
|
for (let i = 0; i < length; i++) {
|
30
30
|
name += String.fromCharCode(Math.floor(Math.random() * 26) + 97);
|
@@ -37,8 +37,8 @@ export const CadastroScreen = ({
|
|
37
37
|
const generateRnadomUser = () => {
|
38
38
|
setCpf(generateRandomElevenDigits());
|
39
39
|
setNome(generateRandomName());
|
40
|
-
setSenha(
|
41
|
-
setConfirmarSenha(
|
40
|
+
setSenha("123");
|
41
|
+
setConfirmarSenha("123");
|
42
42
|
};
|
43
43
|
const handleCadastro = async () => {
|
44
44
|
try {
|
@@ -48,7 +48,7 @@ export const CadastroScreen = ({
|
|
48
48
|
var jsonString = JSON.stringify(response);
|
49
49
|
onSuccess && onSuccess(response);
|
50
50
|
onCloseModalHandler();
|
51
|
-
if (jsonString.includes(
|
51
|
+
if (jsonString.includes("person_id")) {
|
52
52
|
if (response.finger === false) {
|
53
53
|
// openModal({
|
54
54
|
// type: 'ajuda',
|
@@ -61,18 +61,18 @@ export const CadastroScreen = ({
|
|
61
61
|
// type: 'login',
|
62
62
|
// });
|
63
63
|
}
|
64
|
-
} else if (jsonString.includes(
|
65
|
-
Alert.alert(
|
64
|
+
} else if (jsonString.includes("User exists")) {
|
65
|
+
Alert.alert("Usuário já cadastrado!");
|
66
66
|
// openModal({
|
67
67
|
// type: 'login',
|
68
68
|
// });
|
69
|
-
} else if (jsonString.includes(
|
70
|
-
Alert.alert(
|
69
|
+
} else if (jsonString.includes("erro")) {
|
70
|
+
Alert.alert("Usuário não cadastrado", "Por favor, cadastre-se!");
|
71
71
|
} else {
|
72
|
-
Alert.alert(
|
72
|
+
Alert.alert("Erro", "Ocorreu um erro ao fazer o Cadastro. Por favor, tente novamente mais tarde.");
|
73
73
|
}
|
74
74
|
} else {
|
75
|
-
Alert.alert(
|
75
|
+
Alert.alert("Erro", "As senhas não coincidem. Por favor, tente novamente.");
|
76
76
|
return;
|
77
77
|
}
|
78
78
|
} catch (error) {
|
@@ -95,7 +95,7 @@ export const CadastroScreen = ({
|
|
95
95
|
}, ModalParams), /*#__PURE__*/React.createElement(View, {
|
96
96
|
style: styles.container
|
97
97
|
}, /*#__PURE__*/React.createElement(Image, {
|
98
|
-
source: require(
|
98
|
+
source: require("../../assets/logo.png"),
|
99
99
|
style: styles.logo
|
100
100
|
}), /*#__PURE__*/React.createElement(Text, {
|
101
101
|
style: styles.title
|
@@ -136,42 +136,42 @@ export const CadastroScreen = ({
|
|
136
136
|
const styles = StyleSheet.create({
|
137
137
|
container: {
|
138
138
|
flex: 1,
|
139
|
-
alignItems:
|
140
|
-
justifyContent:
|
141
|
-
backgroundColor:
|
139
|
+
alignItems: "center",
|
140
|
+
justifyContent: "center",
|
141
|
+
backgroundColor: "#fff"
|
142
142
|
},
|
143
143
|
title: {
|
144
144
|
fontSize: 24,
|
145
145
|
marginBottom: 16,
|
146
|
-
color:
|
146
|
+
color: "#00bfff"
|
147
147
|
},
|
148
148
|
input: {
|
149
|
-
width:
|
149
|
+
width: "80%",
|
150
150
|
height: 50,
|
151
151
|
padding: 10,
|
152
152
|
borderWidth: 1,
|
153
|
-
borderColor:
|
153
|
+
borderColor: "#ccc",
|
154
154
|
borderRadius: 4,
|
155
155
|
marginBottom: 16,
|
156
156
|
fontSize: 16,
|
157
|
-
color:
|
157
|
+
color: "#000"
|
158
158
|
},
|
159
159
|
button: {
|
160
|
-
width:
|
160
|
+
width: "80%",
|
161
161
|
height: 50,
|
162
|
-
backgroundColor:
|
162
|
+
backgroundColor: "#00bfff",
|
163
163
|
borderRadius: 4,
|
164
|
-
alignItems:
|
165
|
-
justifyContent:
|
164
|
+
alignItems: "center",
|
165
|
+
justifyContent: "center"
|
166
166
|
},
|
167
167
|
buttonText: {
|
168
168
|
fontSize: 16,
|
169
|
-
color:
|
169
|
+
color: "#fff"
|
170
170
|
},
|
171
171
|
logo: {
|
172
172
|
width: 500,
|
173
173
|
height: 250,
|
174
|
-
resizeMode:
|
174
|
+
resizeMode: "contain"
|
175
175
|
}
|
176
176
|
});
|
177
177
|
//# sourceMappingURL=CadastroScreen.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","View","Text","TextInput","TouchableOpacity","StyleSheet","Alert","Image","cadastro","Modal","CadastroScreen","isVisible","onCloseModal","onError","onSuccess","ModalParams","cpf","setCpf","nome","setNome","senha","setSenha","confirmarSenha","setConfirmarSenha","generateRandomElevenDigits","i","Math","floor","random","generateRandomName","name","length","String","fromCharCode","generateRnadomUser","handleCadastro","response","console","log","jsonString","JSON","stringify","onCloseModalHandler","includes","finger","alert","error","createElement","_extends","style","margin","swipeDirection","propagateSwipe","onSwipeComplete","styles","container","source","require","logo","title","input","placeholder","placeholderTextColor","keyboardType","value","onChangeText","secureTextEntry","text","button","onPress","buttonText","create","flex","alignItems","justifyContent","backgroundColor","fontSize","marginBottom","color","width","height","padding","borderWidth","borderColor","borderRadius","resizeMode"],"sourceRoot":"../../../../src","sources":["screens/CadastroScreen/CadastroScreen.tsx"],"mappings":";AAAA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,
|
1
|
+
{"version":3,"names":["React","useEffect","useState","View","Text","TextInput","TouchableOpacity","StyleSheet","Alert","Image","cadastro","Modal","CadastroScreen","isVisible","onCloseModal","onError","onSuccess","ModalParams","cpf","setCpf","nome","setNome","senha","setSenha","confirmarSenha","setConfirmarSenha","generateRandomElevenDigits","i","Math","floor","random","generateRandomName","name","length","String","fromCharCode","generateRnadomUser","handleCadastro","response","console","log","jsonString","JSON","stringify","onCloseModalHandler","includes","finger","alert","error","createElement","_extends","style","margin","swipeDirection","propagateSwipe","onSwipeComplete","styles","container","source","require","logo","title","input","placeholder","placeholderTextColor","keyboardType","value","onChangeText","secureTextEntry","text","button","onPress","buttonText","create","flex","alignItems","justifyContent","backgroundColor","fontSize","marginBottom","color","width","height","padding","borderWidth","borderColor","borderRadius","resizeMode"],"sourceRoot":"../../../../src","sources":["screens/CadastroScreen/CadastroScreen.tsx"],"mappings":";AAAA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,cAAc;AAChG,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,KAAK,MAA2B,oBAAoB;AAU3D,OAAO,MAAMC,cAA6C,GAAGA,CAAC;EAC5DC,SAAS,GAAG,KAAK;EACjBC,YAAY;EACZC,OAAO;EACPC,SAAS;EACTC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,GAAG,EAAEC,MAAM,CAAC,GAAGjB,QAAQ,CAAC,EAAE,CAAC;EAClC,MAAM,CAACkB,IAAI,EAAEC,OAAO,CAAC,GAAGnB,QAAQ,CAAC,EAAE,CAAC;EACpC,MAAM,CAACoB,KAAK,EAAEC,QAAQ,CAAC,GAAGrB,QAAQ,CAAC,EAAE,CAAC;EACtC,MAAM,CAACsB,cAAc,EAAEC,iBAAiB,CAAC,GAAGvB,QAAQ,CAAC,EAAE,CAAC;EAExD,MAAMwB,0BAA0B,GAAGA,CAAA,KAAM;IACvC,IAAIR,GAAG,GAAG,EAAE;IACZ,KAAK,IAAIS,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;MAC3BT,GAAG,IAAIU,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;IACtC;IACA,OAAOZ,GAAG;EACZ,CAAC;EAED,MAAMa,kBAAkB,GAAGA,CAAA,KAAM;IAC/B;IACA,IAAIC,IAAI,GAAG,E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MhB,MAAM,GAAGjD,UAAU,CAACkE,MAAM,CAAC;EAC/BhB,SAAS,EAAE;IACTiB,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,eAAe,EAAE;EACnB,CAAC;EACDhB,KAAK,EAAE;IACLiB,QAAQ,EAAE,EAAE;IACZC,YAAY,EAAE,EAAE;IAChBC,KAAK,EAAE;EACT,CAAC;EACDlB,KAAK,EAAE;IACLmB,KAAK,EAAE,KAAK;IACZC,MAAM,EAAE,EAAE;IACVC,OAAO,EAAE,EAAE;IACXC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE,CAAC;IACfP,YAAY,EAAE,EAAE;IAChBD,QAAQ,EAAE,EAAE;IACZE,KAAK,EAAE;EACT,CAAC;EACDV,MAAM,EAAE;IACNW,KAAK,EAAE,KAAK;IACZC,MAAM,EAAE,EAAE;IACVL,eAAe,EAAE,SAAS;IAC1BS,YAAY,EAAE,CAAC;IACfX,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDJ,UAAU,EAAE;IACVM,QAAQ,EAAE,EAAE;IACZE,KAAK,EAAE;EACT,CAAC;EACDpB,IAAI,EAAE;IACJqB,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE,GAAG;IACXK,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
@@ -0,0 +1,119 @@
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
2
|
+
import { View } from "react-native";
|
3
|
+
import { Camera, useCameraFormat, useCameraDevice, useCameraPermission } from "react-native-vision-camera";
|
4
|
+
import Orientation from "react-native-orientation-locker";
|
5
|
+
import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
|
6
|
+
import { runOnJS } from "react-native-reanimated";
|
7
|
+
import { styles } from "./styles";
|
8
|
+
import { DeviceNotFound, Gabarito, CameraConfigInfo, ModalMessage, CaptureButton } from "../../components";
|
9
|
+
import { useDispatch, useSelector } from "../../store/modules/fingerAuth";
|
10
|
+
const FingerAuth = ({
|
11
|
+
UID,
|
12
|
+
qualityPrioritization,
|
13
|
+
onSuccess
|
14
|
+
}) => {
|
15
|
+
const cameraRef = useRef(null);
|
16
|
+
const {
|
17
|
+
hasPermission,
|
18
|
+
requestPermission
|
19
|
+
} = useCameraPermission();
|
20
|
+
const device = useCameraDevice("back");
|
21
|
+
const dispatch = useDispatch();
|
22
|
+
const state = useSelector();
|
23
|
+
useEffect(() => {
|
24
|
+
Orientation.lockToPortrait();
|
25
|
+
return () => {
|
26
|
+
Orientation.unlockAllOrientations();
|
27
|
+
};
|
28
|
+
}, []);
|
29
|
+
const cameraPermission = useCallback(async () => {
|
30
|
+
if (!hasPermission) {
|
31
|
+
await requestPermission();
|
32
|
+
}
|
33
|
+
}, [hasPermission, requestPermission]);
|
34
|
+
useEffect(() => {
|
35
|
+
cameraPermission();
|
36
|
+
dispatch.getConfig("finger");
|
37
|
+
}, [cameraPermission]);
|
38
|
+
const containerCaptureStyled = useMemo(() => [styles.containerCapture, {
|
39
|
+
bottom: state.showButtonInfo ? 75 : 20
|
40
|
+
}], [state.showButtonInfo]);
|
41
|
+
const cameraFormat = useCameraFormat(device, [{
|
42
|
+
photoResolution: {
|
43
|
+
height: 1280,
|
44
|
+
width: 720
|
45
|
+
}
|
46
|
+
}]);
|
47
|
+
useEffect(() => {
|
48
|
+
if (state.code === 0) {
|
49
|
+
dispatch.setModal("Sucesso!", "Usuário Identificado!");
|
50
|
+
onSuccess && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(state.code));
|
51
|
+
dispatch.handleLoading();
|
52
|
+
}
|
53
|
+
if (state.code !== 0 && state.code !== null) {
|
54
|
+
dispatch.setModal("Ocorreu um erro!", `Erro: ${state.message}`);
|
55
|
+
dispatch.handleLoading();
|
56
|
+
}
|
57
|
+
dispatch.resetState();
|
58
|
+
}, [state.code, state.message, dispatch.handleLoading, dispatch.resetState, dispatch.setModal]);
|
59
|
+
const takePhoto = async () => {
|
60
|
+
var _cameraRef$current;
|
61
|
+
const photo = await ((_cameraRef$current = cameraRef.current) === null || _cameraRef$current === void 0 ? void 0 : _cameraRef$current.takePhoto({
|
62
|
+
qualityPrioritization: qualityPrioritization,
|
63
|
+
flash: "on"
|
64
|
+
}));
|
65
|
+
if (photo != null) dispatch.sendImage(photo.path, UID);
|
66
|
+
};
|
67
|
+
const focus = useCallback(point => {
|
68
|
+
const camera = cameraRef.current;
|
69
|
+
if (camera != null) {
|
70
|
+
camera.focus(point);
|
71
|
+
}
|
72
|
+
}, []);
|
73
|
+
const gesture = Gesture.Tap().onBegin(({
|
74
|
+
x,
|
75
|
+
y
|
76
|
+
}) => {
|
77
|
+
runOnJS(focus)({
|
78
|
+
x,
|
79
|
+
y
|
80
|
+
});
|
81
|
+
});
|
82
|
+
if (device == null || hasPermission === false) return /*#__PURE__*/React.createElement(DeviceNotFound, {
|
83
|
+
hasPermission: hasPermission,
|
84
|
+
cameraPermission: cameraPermission
|
85
|
+
});
|
86
|
+
return /*#__PURE__*/React.createElement(GestureHandlerRootView, {
|
87
|
+
style: styles.root
|
88
|
+
}, /*#__PURE__*/React.createElement(GestureDetector, {
|
89
|
+
gesture: gesture
|
90
|
+
}, /*#__PURE__*/React.createElement(View, {
|
91
|
+
style: styles.cameraContainer
|
92
|
+
}, /*#__PURE__*/React.createElement(Camera, {
|
93
|
+
ref: cameraRef,
|
94
|
+
style: styles.camera,
|
95
|
+
isActive: true,
|
96
|
+
device: device,
|
97
|
+
format: cameraFormat,
|
98
|
+
torch: "on",
|
99
|
+
focusable: true,
|
100
|
+
exposure: state.exposure,
|
101
|
+
zoom: state.exposure,
|
102
|
+
photo: true,
|
103
|
+
enableHighQualityPhotos: true
|
104
|
+
}), /*#__PURE__*/React.createElement(Gabarito, null))), /*#__PURE__*/React.createElement(View, {
|
105
|
+
style: containerCaptureStyled
|
106
|
+
}, /*#__PURE__*/React.createElement(CaptureButton, {
|
107
|
+
authFinger: true,
|
108
|
+
onPress: takePhoto,
|
109
|
+
loading: state.loading
|
110
|
+
})), state.showButtonInfo && /*#__PURE__*/React.createElement(CameraConfigInfo, {
|
111
|
+
exposure: state.exposure,
|
112
|
+
zoom: state.exposure
|
113
|
+
}), /*#__PURE__*/React.createElement(ModalMessage, {
|
114
|
+
isLoading: state.loading,
|
115
|
+
modal: state.modal
|
116
|
+
}));
|
117
|
+
};
|
118
|
+
export default FingerAuth;
|
119
|
+
//# sourceMappingURL=FingerAuth.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useMemo","useRef","View","Camera","useCameraFormat","useCameraDevice","useCameraPermission","Orientation","Gesture","GestureDetector","GestureHandlerRootView","runOnJS","styles","DeviceNotFound","Gabarito","CameraConfigInfo","ModalMessage","CaptureButton","useDispatch","useSelector","FingerAuth","UID","qualityPrioritization","onSuccess","cameraRef","hasPermission","requestPermission","device","dispatch","state","lockToPortrait","unlockAllOrientations","cameraPermission","getConfig","containerCaptureStyled","containerCapture","bottom","showButtonInfo","cameraFormat","photoResolution","height","width","code","setModal","handleLoading","message","resetState","takePhoto","_cameraRef$current","photo","current","flash","sendImage","path","focus","point","camera","gesture","Tap","onBegin","x","y","createElement","style","root","cameraContainer","ref","isActive","format","torch","focusable","exposure","zoom","enableHighQualityPhotos","authFinger","onPress","loading","isLoading","modal"],"sourceRoot":"../../../../src","sources":["screens/FingerAuth/FingerAuth.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACtE,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,EAAEC,eAAe,EAASC,eAAe,EAAEC,mBAAmB,QAAQ,4BAA4B;AACjH,OAAOC,WAAW,MAAM,iCAAiC;AACzD,SAASC,OAAO,EAAEC,eAAe,EAAEC,sBAAsB,QAAQ,8BAA8B;AAC/F,SAASC,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B,uBAAuB,EAAE;EAAK,CAC/B,CAAC,eACF5E,KAAA,CAAAiE,aAAA,CAAChD,QAAQ,MAAE,CACP,CACS,CAAC,eAClBjB,KAAA,CAAAiE,aAAA,CAAC5D,IAAI;IAAC6D,KAAK,EAAE7B;EAAuB,gBAClCrC,KAAA,CAAAiE,aAAA,CAAC7C,aAAa;IAACyD,UAAU;IAACC,OAAO,EAAE5B,SAAU;IAAC6B,OAAO,EAAE/C,KAAK,CAAC+C;EAAQ,CAAE,CACnE,CAAC,EACN/C,KAAK,CAACQ,cAAc,iBAAIxC,KAAA,CAAAiE,aAAA,CAAC/C,gBAAgB;IAACwD,QAAQ,EAAE1C,KAAK,CAAC0C,QAAS;IAACC,IAAI,EAAE3C,KAAK,CAAC0C;EAAS,CAAE,CAAC,eAC7F1E,KAAA,CAAAiE,aAAA,CAAC9C,YAAY;IAAC6D,SAAS,EAAEhD,KAAK,CAAC+C,OAAQ;IAACE,KAAK,EAAEjD,KAAK,CAACiD;EAAM,CAAE,CACvC,CAAC;AAE7B,CAAC;AAED,eAAe1D,UAAU"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { StyleSheet, Dimensions } from "react-native";
|
2
|
+
const {
|
3
|
+
height
|
4
|
+
} = Dimensions.get("window");
|
5
|
+
export const styles = StyleSheet.create({
|
6
|
+
container: {
|
7
|
+
flex: 1
|
8
|
+
},
|
9
|
+
root: {
|
10
|
+
flex: 1
|
11
|
+
},
|
12
|
+
cameraContainer: {
|
13
|
+
flex: 1,
|
14
|
+
justifyContent: "center"
|
15
|
+
},
|
16
|
+
camera: {
|
17
|
+
flex: 1,
|
18
|
+
paddingBottom: height * 0.2
|
19
|
+
},
|
20
|
+
containerCapture: {
|
21
|
+
position: "absolute",
|
22
|
+
width: "100%",
|
23
|
+
alignItems: "center"
|
24
|
+
},
|
25
|
+
cameraConfigs: {
|
26
|
+
alignItems: "center"
|
27
|
+
}
|
28
|
+
});
|
29
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["StyleSheet","Dimensions","height","get","styles","create","container","flex","root","cameraContainer","justifyContent","camera","paddingBottom","containerCapture","position","width","alignItems","cameraConfigs"],"sourceRoot":"../../../../src","sources":["screens/FingerAuth/styles.ts"],"mappings":"AAAA,SAASA,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAErD,MAAM;EAAEC;AAAO,CAAC,GAAGD,UAAU,CAACE,GAAG,CAAC,QAAQ,CAAC;AAE3C,OAAO,MAAMC,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;EACtCC,SAAS,EAAE;IACTC,IAAI,EAAE;EACR,CAAC;EACDC,IAAI,EAAE;IACJD,IAAI,EAAE;EACR,CAAC;EACDE,eAAe,EAAE;IACfF,IAAI,EAAE,CAAC;IACPG,cAAc,EAAE;EAClB,CAAC;EACDC,MAAM,EAAE;IACNJ,IAAI,EAAE,CAAC;IACPK,aAAa,EAAEV,MAAM,GAAG;EAC1B,CAAC;EACDW,gBAAgB,EAAE;IAChBC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,UAAU,EAAE;EACd,CAAC;EACDC,aAAa,EAAE;IACbD,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
@@ -0,0 +1,129 @@
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
2
|
+
import { View } from "react-native";
|
3
|
+
import { Camera, useCameraFormat, useCameraDevice, useCameraPermission } from "react-native-vision-camera";
|
4
|
+
import Orientation from "react-native-orientation-locker";
|
5
|
+
import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
|
6
|
+
import { runOnJS } from "react-native-reanimated";
|
7
|
+
import { styles } from "./styles";
|
8
|
+
import { useSelector, useDispatch } from "../../store/modules/fingerRegister";
|
9
|
+
import { CaptureButton, DeviceNotFound, HelpRegister, ModalMessage, CameraConfigInfo, Gabarito } from "../../components";
|
10
|
+
const FingerRegister = ({
|
11
|
+
UID,
|
12
|
+
qualityPrioritization,
|
13
|
+
onSuccess
|
14
|
+
}) => {
|
15
|
+
const cameraRef = useRef(null);
|
16
|
+
const {
|
17
|
+
hasPermission,
|
18
|
+
requestPermission
|
19
|
+
} = useCameraPermission();
|
20
|
+
const state = useSelector();
|
21
|
+
const dispatch = useDispatch();
|
22
|
+
const device = useCameraDevice("back");
|
23
|
+
const base64ImagesCount = state.base64Images.length;
|
24
|
+
useEffect(() => {
|
25
|
+
Orientation.lockToPortrait();
|
26
|
+
return () => {
|
27
|
+
Orientation.unlockAllOrientations();
|
28
|
+
};
|
29
|
+
}, []);
|
30
|
+
useEffect(() => {
|
31
|
+
if (state.base64Images !== undefined && base64ImagesCount === 3) {
|
32
|
+
if (!UID) {
|
33
|
+
dispatch.setModal("Ocorreu um erro!", "Erro: UID não encontrado!");
|
34
|
+
}
|
35
|
+
dispatch.handleLoading();
|
36
|
+
dispatch.sendImages(state.base64Images, UID);
|
37
|
+
}
|
38
|
+
}, [dispatch.sendImages, dispatch.handleLoading, state.base64Images, base64ImagesCount]);
|
39
|
+
useEffect(() => {
|
40
|
+
if (state.code === 0) {
|
41
|
+
dispatch.setModal("Sucesso!", "Cadastro de digital realizado com sucesso!");
|
42
|
+
onSuccess && (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(state.code));
|
43
|
+
dispatch.handleLoading();
|
44
|
+
}
|
45
|
+
if (state.code !== 0 && state.code !== null) {
|
46
|
+
dispatch.setModal("Ocorreu um erro!", `Erro: ${state.message}`);
|
47
|
+
dispatch.handleLoading();
|
48
|
+
}
|
49
|
+
dispatch.resetState();
|
50
|
+
}, [state.code, state.message, dispatch.handleLoading, dispatch.resetState, dispatch.setModal]);
|
51
|
+
const cameraPermission = useCallback(async () => {
|
52
|
+
if (!hasPermission) {
|
53
|
+
await requestPermission();
|
54
|
+
}
|
55
|
+
}, [hasPermission, requestPermission]);
|
56
|
+
useEffect(() => {
|
57
|
+
cameraPermission();
|
58
|
+
dispatch.getConfig("finger");
|
59
|
+
}, [cameraPermission]);
|
60
|
+
const containerCaptureStyled = useMemo(() => [styles.containerCapture, {
|
61
|
+
bottom: state.showButtonInfo ? 75 : 20
|
62
|
+
}], [state.showButtonInfo]);
|
63
|
+
const cameraFormat = useCameraFormat(device, [{
|
64
|
+
photoResolution: {
|
65
|
+
width: 1920,
|
66
|
+
height: 1080
|
67
|
+
},
|
68
|
+
pixelFormat: "native"
|
69
|
+
}]);
|
70
|
+
const takePhoto = async () => {
|
71
|
+
var _cameraRef$current;
|
72
|
+
const photo = await ((_cameraRef$current = cameraRef.current) === null || _cameraRef$current === void 0 ? void 0 : _cameraRef$current.takePhoto({
|
73
|
+
qualityPrioritization: qualityPrioritization,
|
74
|
+
flash: "on"
|
75
|
+
}));
|
76
|
+
if (photo != null) dispatch.setImagePath(photo.path);
|
77
|
+
};
|
78
|
+
const focus = useCallback(point => {
|
79
|
+
const camera = cameraRef.current;
|
80
|
+
if (camera != null) {
|
81
|
+
camera.focus(point);
|
82
|
+
}
|
83
|
+
}, []);
|
84
|
+
const gesture = Gesture.Tap().onBegin(({
|
85
|
+
x,
|
86
|
+
y
|
87
|
+
}) => {
|
88
|
+
runOnJS(focus)({
|
89
|
+
x,
|
90
|
+
y
|
91
|
+
});
|
92
|
+
});
|
93
|
+
if (device == null || hasPermission === false) return /*#__PURE__*/React.createElement(DeviceNotFound, {
|
94
|
+
hasPermission: hasPermission,
|
95
|
+
cameraPermission: cameraPermission
|
96
|
+
});
|
97
|
+
return /*#__PURE__*/React.createElement(GestureHandlerRootView, {
|
98
|
+
style: styles.root
|
99
|
+
}, /*#__PURE__*/React.createElement(HelpRegister, null), /*#__PURE__*/React.createElement(GestureDetector, {
|
100
|
+
gesture: gesture
|
101
|
+
}, /*#__PURE__*/React.createElement(View, {
|
102
|
+
style: styles.cameraContainer
|
103
|
+
}, /*#__PURE__*/React.createElement(Camera, {
|
104
|
+
ref: cameraRef,
|
105
|
+
style: styles.camera,
|
106
|
+
isActive: true,
|
107
|
+
device: device,
|
108
|
+
format: cameraFormat,
|
109
|
+
torch: "on",
|
110
|
+
focusable: true,
|
111
|
+
exposure: state.exposure,
|
112
|
+
zoom: state.exposure,
|
113
|
+
photo: true,
|
114
|
+
enableHighQualityPhotos: true
|
115
|
+
}), /*#__PURE__*/React.createElement(Gabarito, null))), /*#__PURE__*/React.createElement(View, {
|
116
|
+
style: containerCaptureStyled
|
117
|
+
}, /*#__PURE__*/React.createElement(CaptureButton, {
|
118
|
+
onPress: takePhoto,
|
119
|
+
imagesCount: base64ImagesCount
|
120
|
+
})), state.showButtonInfo && /*#__PURE__*/React.createElement(CameraConfigInfo, {
|
121
|
+
exposure: state.exposure,
|
122
|
+
zoom: state.zoom
|
123
|
+
}), /*#__PURE__*/React.createElement(ModalMessage, {
|
124
|
+
isLoading: state.loading,
|
125
|
+
modal: state.modal
|
126
|
+
}));
|
127
|
+
};
|
128
|
+
export default FingerRegister;
|
129
|
+
//# sourceMappingURL=index.js.map
|