@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
@@ -1,356 +0,0 @@
|
|
1
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
2
|
-
import { Alert, Text, View, TouchableOpacity, Button } from 'react-native';
|
3
|
-
import {
|
4
|
-
Camera,
|
5
|
-
useCameraFormat,
|
6
|
-
type Point,
|
7
|
-
useCameraDevice,
|
8
|
-
} from 'react-native-vision-camera';
|
9
|
-
import Modal, { type ModalProps } from 'react-native-modal';
|
10
|
-
import Orientation from 'react-native-orientation-locker';
|
11
|
-
import {
|
12
|
-
Gesture,
|
13
|
-
GestureDetector,
|
14
|
-
GestureHandlerRootView,
|
15
|
-
} from 'react-native-gesture-handler';
|
16
|
-
import { runOnJS } from 'react-native-reanimated';
|
17
|
-
|
18
|
-
import { AjudaCadastro } from '../AjudaCadastro';
|
19
|
-
import { ImageDisplayScreen } from '../ImageDisplayScreen';
|
20
|
-
import { sendImages } from '../../../../services';
|
21
|
-
import { getConfigCamera } from '../../../../utils';
|
22
|
-
import { encodeImageToBase64, validarBase64 } from '../../../../utils/file';
|
23
|
-
import type { ScreenProps } from '../../../../types/screen';
|
24
|
-
import { CameraConfigInfos } from '../../../../components/CameraConfigInfos';
|
25
|
-
import { DeviceNullDisplay } from '../../../../components/DeviceNullDisplay';
|
26
|
-
import { ErrorDisplay } from '../../../../components/ErrorDisplay';
|
27
|
-
import { Gabarito } from '../../../../components/Gabarito';
|
28
|
-
import { WaitingForResult } from '../../../../components/WaitingForResult';
|
29
|
-
import { styles } from './styles';
|
30
|
-
|
31
|
-
let vezesQualidadeDigitalCount = 0;
|
32
|
-
|
33
|
-
interface CameraCadastroProps {
|
34
|
-
isVisible?: boolean;
|
35
|
-
onCloseModal?: () => void;
|
36
|
-
onError?: (response?: any) => void;
|
37
|
-
onSuccess?: (response?: any) => void;
|
38
|
-
screenProps?: ScreenProps;
|
39
|
-
onMaxAttempts?: () => void;
|
40
|
-
maxAttempts?: number;
|
41
|
-
ModalParams?: ModalProps;
|
42
|
-
}
|
43
|
-
|
44
|
-
type GetConfigApi = {
|
45
|
-
id: number;
|
46
|
-
deviceModels: string[];
|
47
|
-
deviceType: string;
|
48
|
-
fps: number;
|
49
|
-
exposure: number;
|
50
|
-
zoom: number;
|
51
|
-
serviceType: string;
|
52
|
-
showButtonInfo: boolean;
|
53
|
-
};
|
54
|
-
|
55
|
-
export const CameraCadastro: React.FC<CameraCadastroProps> = ({
|
56
|
-
isVisible = false,
|
57
|
-
onCloseModal,
|
58
|
-
onError,
|
59
|
-
onSuccess,
|
60
|
-
screenProps,
|
61
|
-
onMaxAttempts,
|
62
|
-
maxAttempts = 3,
|
63
|
-
ModalParams,
|
64
|
-
}) => {
|
65
|
-
const id = screenProps?.id;
|
66
|
-
const camera = useRef<Camera>(null);
|
67
|
-
let base64Image: string[] = [];
|
68
|
-
|
69
|
-
const [showCamera, setShowCamera] = useState(false);
|
70
|
-
const [showOverlay, setShowOverlay] = useState(false);
|
71
|
-
|
72
|
-
const [arrayImages, setArrayImages] = useState<any[]>([]);
|
73
|
-
const [load, setLoad] = useState(false);
|
74
|
-
const [fingerErro, setFingerErro] = useState(false);
|
75
|
-
const [badImageModal, setBadImageModal] = useState(false);
|
76
|
-
const [cameraConfigs, setCameraConfigs] = useState<GetConfigApi>();
|
77
|
-
|
78
|
-
// mantem a tela em modo portrait
|
79
|
-
useEffect(() => {
|
80
|
-
Orientation.lockToPortrait();
|
81
|
-
return () => {
|
82
|
-
Orientation.unlockAllOrientations();
|
83
|
-
};
|
84
|
-
}, []);
|
85
|
-
|
86
|
-
// Pega a permissão da camera do dispositivo
|
87
|
-
const requestCameraPermission = useCallback(async () => {
|
88
|
-
try {
|
89
|
-
await Camera.requestCameraPermission();
|
90
|
-
} catch (error) {}
|
91
|
-
}, []);
|
92
|
-
|
93
|
-
// pra garantir que a permissão da camera seja solicitada
|
94
|
-
useEffect(() => {
|
95
|
-
requestCameraPermission();
|
96
|
-
}, [requestCameraPermission]);
|
97
|
-
|
98
|
-
useEffect(() => {
|
99
|
-
getConfigCamera('finger')
|
100
|
-
.then((config) => {
|
101
|
-
setCameraConfigs(config);
|
102
|
-
})
|
103
|
-
.catch((error) => {
|
104
|
-
console.error(error);
|
105
|
-
});
|
106
|
-
}, []);
|
107
|
-
|
108
|
-
const device = useCameraDevice('back', {
|
109
|
-
physicalDevices: ['wide-angle-camera'],
|
110
|
-
});
|
111
|
-
|
112
|
-
const cameraFormat = useCameraFormat(device, [
|
113
|
-
{
|
114
|
-
photoResolution: {
|
115
|
-
height: 1280,
|
116
|
-
width: 720,
|
117
|
-
},
|
118
|
-
},
|
119
|
-
]);
|
120
|
-
|
121
|
-
useEffect(() => {
|
122
|
-
if (fingerErro) {
|
123
|
-
Alert.alert('Erro', 'Tentavias excedidas !');
|
124
|
-
onMaxAttempts && onMaxAttempts();
|
125
|
-
}
|
126
|
-
}, [fingerErro, onMaxAttempts]);
|
127
|
-
|
128
|
-
const handleProximaTela = () => {
|
129
|
-
setShowCamera(true);
|
130
|
-
};
|
131
|
-
|
132
|
-
useEffect(() => {
|
133
|
-
return () => {
|
134
|
-
// clean up
|
135
|
-
if (vezesQualidadeDigitalCount >= 3) {
|
136
|
-
vezesQualidadeDigitalCount = 0;
|
137
|
-
}
|
138
|
-
setLoad(false);
|
139
|
-
setArrayImages([]);
|
140
|
-
setFingerErro(false);
|
141
|
-
setBadImageModal(false);
|
142
|
-
setShowCamera(false);
|
143
|
-
};
|
144
|
-
}, []);
|
145
|
-
|
146
|
-
// captura a foto da camera
|
147
|
-
useEffect(() => {
|
148
|
-
requestCameraPermission();
|
149
|
-
}, [requestCameraPermission]);
|
150
|
-
|
151
|
-
const capturedPhoto = async () => {
|
152
|
-
const photo = await camera.current?.takePhoto({
|
153
|
-
qualityPrioritization: 'speed',
|
154
|
-
flash: 'off',
|
155
|
-
});
|
156
|
-
if (photo == null) return;
|
157
|
-
const base64 = await encodeImageToBase64(photo.path);
|
158
|
-
base64Image.push(base64 ?? '');
|
159
|
-
setArrayImages((prevArray) => [...prevArray, ...base64Image]);
|
160
|
-
};
|
161
|
-
|
162
|
-
// Fecha o modal
|
163
|
-
const onCloseModalHandler = useCallback(() => {
|
164
|
-
ResetScreenAndStates();
|
165
|
-
onCloseModal && onCloseModal();
|
166
|
-
}, [onCloseModal]);
|
167
|
-
|
168
|
-
// Envia a imagem para a validação da digital
|
169
|
-
const sendFile = useCallback(async () => {
|
170
|
-
try {
|
171
|
-
let UID = id;
|
172
|
-
let finger = 'DI';
|
173
|
-
let images = arrayImages;
|
174
|
-
|
175
|
-
if (validarBase64(images) === false) return;
|
176
|
-
|
177
|
-
let req =
|
178
|
-
images.length === 3 ? await sendImages(UID, finger, images) : null;
|
179
|
-
|
180
|
-
if (req.code === 0) {
|
181
|
-
Alert.alert('Sucesso !');
|
182
|
-
onSuccess && onSuccess(req);
|
183
|
-
setLoad(false);
|
184
|
-
setArrayImages([]);
|
185
|
-
onCloseModalHandler();
|
186
|
-
setShowOverlay(false);
|
187
|
-
} else if (req.code === 1) {
|
188
|
-
Alert.alert('Já cadastrada !');
|
189
|
-
onCloseModalHandler();
|
190
|
-
setShowOverlay(false);
|
191
|
-
} else {
|
192
|
-
//alert("Erro, por favor, verifique e tente novamente !")
|
193
|
-
vezesQualidadeDigitalCount += 1; // Incrementa a contagem
|
194
|
-
if (arrayImages.length > 0) {
|
195
|
-
setBadImageModal(true);
|
196
|
-
}
|
197
|
-
setLoad(false);
|
198
|
-
setShowOverlay(false);
|
199
|
-
setArrayImages([]);
|
200
|
-
}
|
201
|
-
setLoad(false);
|
202
|
-
setShowOverlay(false);
|
203
|
-
} catch (error) {
|
204
|
-
console.log('Erro ao enviar imagens: ' + error);
|
205
|
-
setLoad(false);
|
206
|
-
setArrayImages([]);
|
207
|
-
onError && onError();
|
208
|
-
Alert.alert('Erro ao enviar imagem !');
|
209
|
-
vezesQualidadeDigitalCount += 1;
|
210
|
-
setShowOverlay(false);
|
211
|
-
}
|
212
|
-
}, [arrayImages, id, onError, onSuccess, onCloseModalHandler]);
|
213
|
-
|
214
|
-
// Envia a imagem para a validação da digital
|
215
|
-
useEffect(() => {
|
216
|
-
if (arrayImages.length === 3) {
|
217
|
-
setLoad(true);
|
218
|
-
setShowOverlay(true);
|
219
|
-
sendFile();
|
220
|
-
}
|
221
|
-
if (vezesQualidadeDigitalCount >= maxAttempts) {
|
222
|
-
setFingerErro(true); // Define fingerErro como true após 2 acessos
|
223
|
-
vezesQualidadeDigitalCount = 0;
|
224
|
-
}
|
225
|
-
}, [arrayImages, id, maxAttempts, sendFile]);
|
226
|
-
|
227
|
-
// Função para resetar os estados da tela
|
228
|
-
const ResetScreenAndStates = () => {
|
229
|
-
setLoad(false);
|
230
|
-
setArrayImages([]);
|
231
|
-
setFingerErro(false);
|
232
|
-
setBadImageModal(false);
|
233
|
-
setShowCamera(false);
|
234
|
-
};
|
235
|
-
|
236
|
-
// Função para focar a camera
|
237
|
-
const focus = useCallback((point: Point) => {
|
238
|
-
const c = camera.current;
|
239
|
-
if (c == null) return;
|
240
|
-
c.focus(point);
|
241
|
-
}, []);
|
242
|
-
|
243
|
-
// Função para focar a camera
|
244
|
-
const gesture = Gesture.Tap().onBegin(({ x, y }) => {
|
245
|
-
runOnJS(focus)({ x, y });
|
246
|
-
});
|
247
|
-
|
248
|
-
if (!showCamera) {
|
249
|
-
return <AjudaCadastro handleProximaTela={handleProximaTela} />;
|
250
|
-
}
|
251
|
-
|
252
|
-
if (!screenProps && isVisible) {
|
253
|
-
return (
|
254
|
-
<ErrorDisplay
|
255
|
-
isVisible={isVisible}
|
256
|
-
onCloseModalHandler={onCloseModalHandler}
|
257
|
-
requestCameraPermission={requestCameraPermission}
|
258
|
-
/>
|
259
|
-
);
|
260
|
-
}
|
261
|
-
|
262
|
-
if (device == null) {
|
263
|
-
return (
|
264
|
-
<DeviceNullDisplay
|
265
|
-
isVisible={isVisible}
|
266
|
-
onCloseModalHandler={onCloseModalHandler}
|
267
|
-
requestCameraPermission={requestCameraPermission}
|
268
|
-
/>
|
269
|
-
);
|
270
|
-
}
|
271
|
-
|
272
|
-
if (showCamera && screenProps && cameraConfigs !== null) {
|
273
|
-
return (
|
274
|
-
<Modal
|
275
|
-
style={styles.modal}
|
276
|
-
isVisible={isVisible}
|
277
|
-
swipeDirection="down"
|
278
|
-
propagateSwipe={true}
|
279
|
-
onSwipeComplete={onCloseModalHandler}
|
280
|
-
{...ModalParams}
|
281
|
-
>
|
282
|
-
<GestureHandlerRootView style={styles.root}>
|
283
|
-
<View style={styles.container}>
|
284
|
-
{showOverlay && (
|
285
|
-
<WaitingForResult
|
286
|
-
onPress={() => {
|
287
|
-
setShowOverlay(false);
|
288
|
-
}}
|
289
|
-
/>
|
290
|
-
)}
|
291
|
-
{!badImageModal ? (
|
292
|
-
<>
|
293
|
-
<GestureDetector gesture={gesture}>
|
294
|
-
<View style={styles.cameraContainer}>
|
295
|
-
<Camera
|
296
|
-
ref={camera}
|
297
|
-
style={styles.camera}
|
298
|
-
isActive={true}
|
299
|
-
device={device}
|
300
|
-
format={cameraFormat}
|
301
|
-
torch={'on'}
|
302
|
-
focusable={true}
|
303
|
-
exposure={cameraConfigs?.exposure}
|
304
|
-
zoom={cameraConfigs?.zoom}
|
305
|
-
photo={true}
|
306
|
-
enableHighQualityPhotos={true}
|
307
|
-
/>
|
308
|
-
{!showOverlay && <Gabarito />}
|
309
|
-
</View>
|
310
|
-
</GestureDetector>
|
311
|
-
<View style={styles.containerCapture}>
|
312
|
-
<TouchableOpacity disabled={load} onPress={capturedPhoto}>
|
313
|
-
<View style={styles.containerButton}>
|
314
|
-
{!load ? (
|
315
|
-
<Text style={styles.textButton}>
|
316
|
-
Tirar Foto ({arrayImages?.length}/3)
|
317
|
-
</Text>
|
318
|
-
) : (
|
319
|
-
<Text style={styles.textButton}>
|
320
|
-
Verificando Digital...
|
321
|
-
</Text>
|
322
|
-
)}
|
323
|
-
</View>
|
324
|
-
</TouchableOpacity>
|
325
|
-
</View>
|
326
|
-
<View style={styles.containerButtonClose}>
|
327
|
-
<Button
|
328
|
-
disabled={load}
|
329
|
-
title="Fechar Camera"
|
330
|
-
onPress={onCloseModalHandler}
|
331
|
-
/>
|
332
|
-
</View>
|
333
|
-
<View style={styles.cameraConfigs}>
|
334
|
-
<CameraConfigInfos
|
335
|
-
exposure={cameraConfigs?.exposure}
|
336
|
-
zoom={cameraConfigs?.zoom}
|
337
|
-
showButtonInfo={cameraConfigs?.showButtonInfo}
|
338
|
-
/>
|
339
|
-
</View>
|
340
|
-
</>
|
341
|
-
) : (
|
342
|
-
<ImageDisplayScreen
|
343
|
-
onCloseModal={() => {
|
344
|
-
setBadImageModal(false);
|
345
|
-
setArrayImages([]);
|
346
|
-
}}
|
347
|
-
screenProps={{ base64Image: arrayImages[0] }}
|
348
|
-
/>
|
349
|
-
)}
|
350
|
-
</View>
|
351
|
-
</GestureHandlerRootView>
|
352
|
-
</Modal>
|
353
|
-
);
|
354
|
-
}
|
355
|
-
return null;
|
356
|
-
};
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import { StyleSheet, Dimensions, Platform } from 'react-native';
|
2
|
-
|
3
|
-
const { height } = Dimensions.get('window');
|
4
|
-
|
5
|
-
export const styles = StyleSheet.create({
|
6
|
-
container: {
|
7
|
-
flex: 1,
|
8
|
-
},
|
9
|
-
root: {
|
10
|
-
flex: 1,
|
11
|
-
},
|
12
|
-
cameraContainer: {
|
13
|
-
flex: 1,
|
14
|
-
},
|
15
|
-
camera: {
|
16
|
-
flex: 1,
|
17
|
-
justifyContent: 'flex-end',
|
18
|
-
paddingBottom: height * 0.2,
|
19
|
-
},
|
20
|
-
containerCapture: {
|
21
|
-
height: height * 0.2,
|
22
|
-
alignItems: 'center',
|
23
|
-
justifyContent: 'center',
|
24
|
-
},
|
25
|
-
modal: {
|
26
|
-
margin: 0,
|
27
|
-
},
|
28
|
-
containerButton: {
|
29
|
-
width: 350,
|
30
|
-
height: 100,
|
31
|
-
borderRadius: 80,
|
32
|
-
backgroundColor: 'blue',
|
33
|
-
alignItems: 'center',
|
34
|
-
justifyContent: 'center',
|
35
|
-
},
|
36
|
-
textButton: {
|
37
|
-
fontSize: 18,
|
38
|
-
fontWeight: '500',
|
39
|
-
color: '#fff',
|
40
|
-
},
|
41
|
-
containerButtonClose: {
|
42
|
-
marginBottom: Platform.OS === 'ios' ? 48 : 0,
|
43
|
-
},
|
44
|
-
cameraConfigs: {
|
45
|
-
alignItems: 'center',
|
46
|
-
},
|
47
|
-
});
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { View, Image, Text, Button, ScrollView } from 'react-native';
|
3
|
-
import { styles } from './styles';
|
4
|
-
import type { ScreenProps } from '../../../../types/screen';
|
5
|
-
|
6
|
-
interface ImageDisplayScreenProps {
|
7
|
-
isVisible?: boolean;
|
8
|
-
onCloseModal?: () => void;
|
9
|
-
onError?: (response?: any) => void;
|
10
|
-
onSuccess?: (response?: any) => void;
|
11
|
-
screenProps?: ScreenProps;
|
12
|
-
}
|
13
|
-
|
14
|
-
export const ImageDisplayScreen: React.FC<ImageDisplayScreenProps> = ({
|
15
|
-
onCloseModal,
|
16
|
-
screenProps,
|
17
|
-
}) => {
|
18
|
-
const base64Image = screenProps?.base64Image;
|
19
|
-
|
20
|
-
const onCloseModalHandler = () => {
|
21
|
-
onCloseModal && onCloseModal();
|
22
|
-
};
|
23
|
-
|
24
|
-
return (
|
25
|
-
<ScrollView contentContainerStyle={styles.container}>
|
26
|
-
<View style={styles.imageContainer}>
|
27
|
-
{/* Parte gráfica da "Tela 1" */}
|
28
|
-
<Image
|
29
|
-
source={{ uri: `data:image/jpeg;base64,${base64Image}` }}
|
30
|
-
style={styles.image}
|
31
|
-
/>
|
32
|
-
<Text style={styles.imageText}>Para cadastro, qualidade ruim !</Text>
|
33
|
-
|
34
|
-
{/* Parte gráfica da "Tela 2" */}
|
35
|
-
<View style={styles.additionalGraphics}>
|
36
|
-
<View style={styles.graphicElement1} />
|
37
|
-
<View style={styles.graphicElement2} />
|
38
|
-
</View>
|
39
|
-
</View>
|
40
|
-
<View style={styles.buttonContainer}>
|
41
|
-
<Button title="Tentar Novamente" onPress={onCloseModalHandler} />
|
42
|
-
</View>
|
43
|
-
</ScrollView>
|
44
|
-
);
|
45
|
-
};
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import { Dimensions, StyleSheet } from 'react-native';
|
2
|
-
|
3
|
-
export const styles = StyleSheet.create({
|
4
|
-
container: {
|
5
|
-
paddingBottom: 30,
|
6
|
-
flex: 1,
|
7
|
-
backgroundColor: '#ffffff',
|
8
|
-
},
|
9
|
-
imageContainer: {
|
10
|
-
marginBottom: 5,
|
11
|
-
alignItems: 'center',
|
12
|
-
justifyContent: 'center',
|
13
|
-
},
|
14
|
-
image: {
|
15
|
-
width: '100%',
|
16
|
-
height: '90%',
|
17
|
-
aspectRatio: 1,
|
18
|
-
resizeMode: 'contain',
|
19
|
-
},
|
20
|
-
imageText: {
|
21
|
-
marginTop: 15,
|
22
|
-
fontSize: 16,
|
23
|
-
fontWeight: 'bold',
|
24
|
-
},
|
25
|
-
buttonContainer: {
|
26
|
-
marginBottom: 150,
|
27
|
-
alignItems: 'center',
|
28
|
-
},
|
29
|
-
additionalGraphics: {
|
30
|
-
width: '100%',
|
31
|
-
height: Dimensions.get('window').height * 0.4,
|
32
|
-
backgroundColor: 'transparent', // Ajuste a cor de fundo desejada
|
33
|
-
position: 'absolute',
|
34
|
-
alignSelf: 'center',
|
35
|
-
marginTop: '35%',
|
36
|
-
alignItems: 'center',
|
37
|
-
justifyContent: 'center',
|
38
|
-
},
|
39
|
-
graphicElement1: {
|
40
|
-
width: Dimensions.get('window').width * 0.5,
|
41
|
-
height: Dimensions.get('window').height * 0.3,
|
42
|
-
backgroundColor: 'transparent', // Ajuste o estilo desejado
|
43
|
-
borderWidth: 3,
|
44
|
-
borderColor: 'yellow',
|
45
|
-
marginLeft: 40,
|
46
|
-
borderTopLeftRadius: 60,
|
47
|
-
borderBottomLeftRadius: 60,
|
48
|
-
borderTopRightRadius: 0,
|
49
|
-
borderBottomRightRadius: 0,
|
50
|
-
transform: [{ scaleX: 2 }],
|
51
|
-
},
|
52
|
-
graphicElement2: {
|
53
|
-
// Defina o estilo para o segundo elemento gráfico
|
54
|
-
},
|
55
|
-
});
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { CameraCadastro } from './components/CameraCadastro';
|
3
|
-
import Modal, { type ModalProps } from 'react-native-modal';
|
4
|
-
import type { ScreenProps } from '../../types/screen';
|
5
|
-
|
6
|
-
interface CadastroFingerProps {
|
7
|
-
isVisible: boolean;
|
8
|
-
onCloseModal?: () => void;
|
9
|
-
onError?: (response?: any) => void;
|
10
|
-
onSuccess?: (response?: any) => void;
|
11
|
-
ModalParams?: ModalProps;
|
12
|
-
screenProps?: ScreenProps;
|
13
|
-
onMaxAttempts?: () => void;
|
14
|
-
maxAttempts?: number;
|
15
|
-
}
|
16
|
-
|
17
|
-
export const CadastroFinger: React.FC<CadastroFingerProps> = ({
|
18
|
-
isVisible = false,
|
19
|
-
onCloseModal,
|
20
|
-
onError,
|
21
|
-
onSuccess,
|
22
|
-
ModalParams,
|
23
|
-
screenProps,
|
24
|
-
onMaxAttempts,
|
25
|
-
maxAttempts,
|
26
|
-
}) => {
|
27
|
-
const onCloseModalHandler = () => {
|
28
|
-
onCloseModal && onCloseModal();
|
29
|
-
};
|
30
|
-
|
31
|
-
return (
|
32
|
-
<Modal
|
33
|
-
// eslint-disable-next-line react-native/no-inline-styles
|
34
|
-
style={{ margin: 0 }}
|
35
|
-
isVisible={isVisible}
|
36
|
-
swipeDirection="down"
|
37
|
-
propagateSwipe={true}
|
38
|
-
onSwipeComplete={onCloseModalHandler}
|
39
|
-
{...ModalParams}
|
40
|
-
>
|
41
|
-
<CameraCadastro
|
42
|
-
maxAttempts={maxAttempts}
|
43
|
-
onMaxAttempts={onMaxAttempts}
|
44
|
-
isVisible={isVisible}
|
45
|
-
onCloseModal={onCloseModalHandler}
|
46
|
-
screenProps={screenProps}
|
47
|
-
onError={() => {
|
48
|
-
onError && onError();
|
49
|
-
}}
|
50
|
-
onSuccess={() => {
|
51
|
-
onSuccess && onSuccess();
|
52
|
-
}}
|
53
|
-
/>
|
54
|
-
</Modal>
|
55
|
-
);
|
56
|
-
};
|