@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
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ha_tecno/live-id-sdk",
|
3
|
-
"version": "
|
3
|
+
"version": "2.2.0",
|
4
4
|
"description": "React Native SDK for Live ID",
|
5
5
|
"main": "lib/commonjs/index",
|
6
6
|
"module": "lib/module/index",
|
@@ -27,10 +27,9 @@
|
|
27
27
|
],
|
28
28
|
"scripts": {
|
29
29
|
"example": "yarn workspace react-native-live-id-sdk-example",
|
30
|
-
"test": "jest",
|
31
30
|
"typecheck": "tsc --noEmit",
|
32
|
-
"
|
33
|
-
"
|
31
|
+
"format": "prettier --write .",
|
32
|
+
"lint": "eslint . --ext .ts,.tsx",
|
34
33
|
"prepare": "bob build",
|
35
34
|
"release": "release-it"
|
36
35
|
},
|
@@ -50,27 +49,37 @@
|
|
50
49
|
"registry": "https://registry.npmjs.org/"
|
51
50
|
},
|
52
51
|
"devDependencies": {
|
53
|
-
"@
|
54
|
-
"@
|
52
|
+
"@eslint/eslintrc": "^3.0.2",
|
53
|
+
"@eslint/js": "^9.0.0",
|
55
54
|
"@react-native/eslint-config": "^0.72.2",
|
56
55
|
"@release-it/conventional-changelog": "^5.0.0",
|
57
56
|
"@types/jest": "^28.1.2",
|
58
57
|
"@types/react": "~17.0.21",
|
59
58
|
"@types/react-native": "0.70.0",
|
60
|
-
"
|
59
|
+
"@types/react-native-vector-icons": "^6.4.18",
|
60
|
+
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
61
|
+
"@typescript-eslint/parser": "^7.5.0",
|
61
62
|
"del-cli": "^5.0.0",
|
62
|
-
"eslint": "^8.
|
63
|
+
"eslint": "^8.0.1",
|
63
64
|
"eslint-config-prettier": "^8.5.0",
|
64
|
-
"eslint-
|
65
|
+
"eslint-config-standard-with-typescript": "^43.0.1",
|
66
|
+
"eslint-plugin-import": "^2.25.2",
|
67
|
+
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
|
68
|
+
"eslint-plugin-prettier": "^5.1.3",
|
69
|
+
"eslint-plugin-promise": "^6.0.0",
|
70
|
+
"eslint-plugin-react": "^7.34.1",
|
71
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
72
|
+
"globals": "^15.0.0",
|
65
73
|
"jest": "^28.1.1",
|
66
74
|
"pod-install": "^0.1.0",
|
67
|
-
"prettier": "^2.
|
75
|
+
"prettier": "^3.2.5",
|
68
76
|
"react": "18.2.0",
|
69
77
|
"react-native": "0.72.7",
|
70
78
|
"react-native-builder-bob": "^0.20.0",
|
71
79
|
"release-it": "^15.0.0",
|
72
80
|
"turbo": "^1.10.7",
|
73
|
-
"typescript": "
|
81
|
+
"typescript": "*",
|
82
|
+
"typescript-eslint": "^7.5.0"
|
74
83
|
},
|
75
84
|
"resolutions": {
|
76
85
|
"@types/react": "17.0.21"
|
@@ -118,36 +127,6 @@
|
|
118
127
|
}
|
119
128
|
}
|
120
129
|
},
|
121
|
-
"eslintConfig": {
|
122
|
-
"root": true,
|
123
|
-
"extends": [
|
124
|
-
"@react-native",
|
125
|
-
"prettier"
|
126
|
-
],
|
127
|
-
"rules": {
|
128
|
-
"prettier/prettier": [
|
129
|
-
"error",
|
130
|
-
{
|
131
|
-
"quoteProps": "consistent",
|
132
|
-
"singleQuote": true,
|
133
|
-
"tabWidth": 2,
|
134
|
-
"trailingComma": "es5",
|
135
|
-
"useTabs": false
|
136
|
-
}
|
137
|
-
]
|
138
|
-
}
|
139
|
-
},
|
140
|
-
"eslintIgnore": [
|
141
|
-
"node_modules/",
|
142
|
-
"lib/"
|
143
|
-
],
|
144
|
-
"prettier": {
|
145
|
-
"quoteProps": "consistent",
|
146
|
-
"singleQuote": true,
|
147
|
-
"tabWidth": 2,
|
148
|
-
"trailingComma": "es5",
|
149
|
-
"useTabs": false
|
150
|
-
},
|
151
130
|
"react-native-builder-bob": {
|
152
131
|
"source": "src",
|
153
132
|
"output": "lib",
|
@@ -172,7 +151,10 @@
|
|
172
151
|
"react-native-orientation-locker": "^1.6.0",
|
173
152
|
"react-native-reanimated": "^3.6.1",
|
174
153
|
"react-native-responsive-fontsize": "^0.5.1",
|
175
|
-
"react-native-
|
154
|
+
"react-native-uuid": "^2.0.2",
|
155
|
+
"react-native-vector-icons": "^10.0.3",
|
156
|
+
"react-native-vision-camera": "^3.8.2",
|
157
|
+
"zustand": "^4.5.2"
|
176
158
|
},
|
177
159
|
"bugs": {
|
178
160
|
"url": "https://bitbucket.org/Hsergio45/liveid-sdk/issues"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Text, View } from "react-native";
|
3
|
+
import { styles } from "./styles";
|
4
|
+
|
5
|
+
type Props = {
|
6
|
+
exposure: number;
|
7
|
+
zoom: number;
|
8
|
+
};
|
9
|
+
|
10
|
+
const CameraConfigInfo = ({ exposure, zoom }: Props) => {
|
11
|
+
return (
|
12
|
+
<View style={styles.container}>
|
13
|
+
<Text style={styles.text}>
|
14
|
+
Exposure: {exposure} | Zoom: {zoom}
|
15
|
+
</Text>
|
16
|
+
</View>
|
17
|
+
);
|
18
|
+
};
|
19
|
+
|
20
|
+
export default CameraConfigInfo;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { StyleSheet } from "react-native";
|
2
|
+
|
3
|
+
export const styles = StyleSheet.create({
|
4
|
+
container: {
|
5
|
+
alignItems: "center",
|
6
|
+
padding: 10,
|
7
|
+
backgroundColor: "#0d0d0d"
|
8
|
+
},
|
9
|
+
text: {
|
10
|
+
fontSize: 18,
|
11
|
+
fontWeight: "500",
|
12
|
+
color: "#fff"
|
13
|
+
}
|
14
|
+
});
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import React, { useEffect } from "react";
|
2
|
+
import { Pressable } from "react-native";
|
3
|
+
import Animated, { useAnimatedStyle, useSharedValue, withSpring, withTiming } from "react-native-reanimated";
|
4
|
+
import Icon from "../icon/icon";
|
5
|
+
import { styles } from "./styles";
|
6
|
+
|
7
|
+
type Props = {
|
8
|
+
onPress: () => void;
|
9
|
+
imagesCount?: number;
|
10
|
+
authFinger?: boolean;
|
11
|
+
loading?: boolean;
|
12
|
+
};
|
13
|
+
|
14
|
+
const CaptureButton = ({ onPress, imagesCount, authFinger, loading }: Props) => {
|
15
|
+
const width = useSharedValue(75);
|
16
|
+
const translateX = useSharedValue(0);
|
17
|
+
const opacity = useSharedValue(0);
|
18
|
+
|
19
|
+
const animatedView = useAnimatedStyle(() => ({
|
20
|
+
width: width.value
|
21
|
+
}));
|
22
|
+
|
23
|
+
const animatedIcon = useAnimatedStyle(() => ({
|
24
|
+
transform: [{ translateX: -translateX.value }]
|
25
|
+
}));
|
26
|
+
|
27
|
+
const animatedText = useAnimatedStyle(() => ({
|
28
|
+
opacity: opacity.value,
|
29
|
+
color: "#fff",
|
30
|
+
transform: [{ translateX: translateX.value }]
|
31
|
+
}));
|
32
|
+
|
33
|
+
useEffect(() => {
|
34
|
+
if (imagesCount === 3) {
|
35
|
+
setTimeout(() => {
|
36
|
+
width.value = withSpring(75);
|
37
|
+
translateX.value = withSpring(0);
|
38
|
+
opacity.value = withTiming(0, { duration: 250 });
|
39
|
+
}, 500);
|
40
|
+
}
|
41
|
+
}, [width, opacity, translateX, imagesCount]);
|
42
|
+
|
43
|
+
const handlePress = () => {
|
44
|
+
onPress();
|
45
|
+
width.value = withSpring(150);
|
46
|
+
translateX.value = withSpring(25);
|
47
|
+
opacity.value = withTiming(1, { duration: 250 });
|
48
|
+
};
|
49
|
+
|
50
|
+
if (authFinger) {
|
51
|
+
return (
|
52
|
+
<Pressable onPress={handlePress} disabled={loading}>
|
53
|
+
<Animated.View style={[styles.box, { width: 75 }]}>
|
54
|
+
<Icon name="camera-outline" size={40} color="white" />
|
55
|
+
</Animated.View>
|
56
|
+
</Pressable>
|
57
|
+
);
|
58
|
+
}
|
59
|
+
|
60
|
+
return (
|
61
|
+
<Pressable onPress={handlePress} disabled={imagesCount === 3 ? true : false}>
|
62
|
+
<Animated.View style={[styles.box, animatedView]}>
|
63
|
+
<Animated.View style={animatedIcon}>
|
64
|
+
<Icon name="camera-outline" size={40} color="white" />
|
65
|
+
</Animated.View>
|
66
|
+
{(imagesCount ?? 0) > 0 ? (
|
67
|
+
<Animated.Text style={[styles.text, animatedText]}>{imagesCount}/3</Animated.Text>
|
68
|
+
) : undefined}
|
69
|
+
</Animated.View>
|
70
|
+
</Pressable>
|
71
|
+
);
|
72
|
+
};
|
73
|
+
|
74
|
+
export default CaptureButton;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { StyleSheet } from "react-native";
|
2
|
+
|
3
|
+
export const styles = StyleSheet.create({
|
4
|
+
box: {
|
5
|
+
flexDirection: "row",
|
6
|
+
height: 50,
|
7
|
+
justifyContent: "center",
|
8
|
+
alignItems: "center",
|
9
|
+
borderRadius: 50,
|
10
|
+
backgroundColor: "#1F75FF"
|
11
|
+
},
|
12
|
+
text: {
|
13
|
+
position: "absolute",
|
14
|
+
color: "#fff"
|
15
|
+
}
|
16
|
+
});
|
@@ -1,11 +1,13 @@
|
|
1
|
-
import React from
|
2
|
-
import { View } from
|
3
|
-
import { styles } from
|
1
|
+
import React from "react";
|
2
|
+
import { View } from "react-native";
|
3
|
+
import { styles } from "./styles";
|
4
4
|
|
5
|
-
|
5
|
+
const Gabarito = () => {
|
6
6
|
return (
|
7
7
|
<View style={styles.container}>
|
8
8
|
<View style={styles.gabarito} />
|
9
9
|
</View>
|
10
10
|
);
|
11
11
|
};
|
12
|
+
|
13
|
+
export default Gabarito;
|
@@ -1,23 +1,22 @@
|
|
1
|
-
import { StyleSheet, Dimensions } from
|
1
|
+
import { StyleSheet, Dimensions } from "react-native";
|
2
2
|
|
3
|
-
const width = Dimensions.get(
|
4
|
-
const height = Dimensions.get(
|
3
|
+
const width = Dimensions.get("window").width;
|
4
|
+
const height = Dimensions.get("window").height;
|
5
5
|
|
6
6
|
export const styles = StyleSheet.create({
|
7
7
|
container: {
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
marginTop: '50%',
|
8
|
+
position: "absolute",
|
9
|
+
justifyContent: "center",
|
10
|
+
alignSelf: "center"
|
12
11
|
},
|
13
12
|
gabarito: {
|
14
13
|
width: width * 0.5,
|
15
|
-
height: height * 0.
|
14
|
+
height: height * 0.4,
|
16
15
|
borderWidth: 3,
|
17
|
-
borderColor:
|
18
|
-
marginLeft:
|
19
|
-
borderTopLeftRadius:
|
20
|
-
borderBottomLeftRadius:
|
21
|
-
transform: [{ scaleX: 2 }]
|
22
|
-
}
|
16
|
+
borderColor: "red",
|
17
|
+
marginLeft: "15%",
|
18
|
+
borderTopLeftRadius: 75,
|
19
|
+
borderBottomLeftRadius: 75,
|
20
|
+
transform: [{ scaleX: 2 }]
|
21
|
+
}
|
23
22
|
});
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import { View, Image, Text, TouchableOpacity, Modal } from "react-native";
|
3
|
+
import { styles } from "./styles";
|
4
|
+
|
5
|
+
const HelpRegister = () => {
|
6
|
+
const [visible, setVisible] = useState(true);
|
7
|
+
|
8
|
+
const handleVisible = () => setVisible(false);
|
9
|
+
return (
|
10
|
+
<Modal animationType="fade" visible={visible}>
|
11
|
+
<View style={styles.container}>
|
12
|
+
<Text style={styles.title}>Instruções da Captura</Text>
|
13
|
+
<Text style={styles.text}>
|
14
|
+
1. Para cadastrar sua digital, escolha um fundo neutro. {`\n`}
|
15
|
+
ex: folha de papel ou parede lisa
|
16
|
+
</Text>
|
17
|
+
<Image
|
18
|
+
source={require("../../assets/exampleInstructionWithoutFinger.jpeg")}
|
19
|
+
style={styles.image}
|
20
|
+
resizeMode="stretch"
|
21
|
+
/>
|
22
|
+
<Text style={styles.text}>2. Posicione o dedo dentro da marcação indicada na tela</Text>
|
23
|
+
<View style={styles.containerImages}>
|
24
|
+
<Image source={require("../../assets/arrow.png")} style={styles.arrow} resizeMode="center" />
|
25
|
+
<Image
|
26
|
+
source={require("../../assets/exampleInstructionWithBorder.jpeg")}
|
27
|
+
style={styles.image}
|
28
|
+
resizeMode="contain"
|
29
|
+
/>
|
30
|
+
</View>
|
31
|
+
<Text style={styles.text}>3. Clique em "Tirar Foto" e aguarde.</Text>
|
32
|
+
<TouchableOpacity onPress={handleVisible} style={styles.button} activeOpacity={0.5}>
|
33
|
+
<Text style={styles.textButton}>Ir para captura</Text>
|
34
|
+
</TouchableOpacity>
|
35
|
+
</View>
|
36
|
+
</Modal>
|
37
|
+
);
|
38
|
+
};
|
39
|
+
|
40
|
+
export default HelpRegister;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { StyleSheet, Platform } from "react-native";
|
2
|
+
|
3
|
+
export const styles = StyleSheet.create({
|
4
|
+
container: {
|
5
|
+
flex: 1,
|
6
|
+
justifyContent: "center",
|
7
|
+
backgroundColor: "#f5f5f5",
|
8
|
+
paddingVertical: 10,
|
9
|
+
paddingHorizontal: 20,
|
10
|
+
gap: 10
|
11
|
+
},
|
12
|
+
containerImages: {
|
13
|
+
justifyContent: "center"
|
14
|
+
},
|
15
|
+
image: {
|
16
|
+
width: 150,
|
17
|
+
height: 150,
|
18
|
+
alignSelf: "center",
|
19
|
+
borderRadius: 15
|
20
|
+
},
|
21
|
+
arrow: {
|
22
|
+
position: "absolute",
|
23
|
+
width: 50,
|
24
|
+
height: 50,
|
25
|
+
marginHorizontal: 32
|
26
|
+
},
|
27
|
+
|
28
|
+
title: {
|
29
|
+
alignSelf: "center",
|
30
|
+
fontSize: 22,
|
31
|
+
fontWeight: "bold",
|
32
|
+
marginVertical: 10,
|
33
|
+
color: "#000"
|
34
|
+
},
|
35
|
+
text: {
|
36
|
+
fontSize: 18,
|
37
|
+
textAlign: "center",
|
38
|
+
fontWeight: Platform.OS === "ios" ? "300" : "normal",
|
39
|
+
marginVertical: 10,
|
40
|
+
color: "#000"
|
41
|
+
},
|
42
|
+
button: {
|
43
|
+
width: "100%",
|
44
|
+
alignItems: "center",
|
45
|
+
marginTop: 20,
|
46
|
+
padding: 12,
|
47
|
+
borderRadius: 10,
|
48
|
+
backgroundColor: "#3652AD"
|
49
|
+
},
|
50
|
+
textButton: {
|
51
|
+
fontSize: 18,
|
52
|
+
color: "#fff"
|
53
|
+
}
|
54
|
+
});
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import React from
|
2
|
-
import { View, Modal, Text, StyleSheet, TouchableOpacity } from
|
1
|
+
import React from "react";
|
2
|
+
import { View, Modal, Text, StyleSheet, TouchableOpacity } from "react-native";
|
3
3
|
|
4
4
|
interface ToastProps {
|
5
5
|
isVisible: boolean;
|
@@ -7,11 +7,7 @@ interface ToastProps {
|
|
7
7
|
onClose: () => void;
|
8
8
|
}
|
9
9
|
|
10
|
-
export const Toast: React.FC<ToastProps> = ({
|
11
|
-
isVisible,
|
12
|
-
message,
|
13
|
-
onClose,
|
14
|
-
}) => {
|
10
|
+
export const Toast: React.FC<ToastProps> = ({ isVisible, message, onClose }) => {
|
15
11
|
return (
|
16
12
|
<Modal transparent visible={isVisible} onRequestClose={onClose}>
|
17
13
|
<View style={styles.modalContainer}>
|
@@ -29,33 +25,33 @@ export const Toast: React.FC<ToastProps> = ({
|
|
29
25
|
export const styles = StyleSheet.create({
|
30
26
|
modalContainer: {
|
31
27
|
flex: 1,
|
32
|
-
backgroundColor:
|
33
|
-
justifyContent:
|
34
|
-
alignItems:
|
35
|
-
zIndex: 999
|
28
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
29
|
+
justifyContent: "center",
|
30
|
+
alignItems: "center",
|
31
|
+
zIndex: 999
|
36
32
|
},
|
37
33
|
modalCard: {
|
38
|
-
backgroundColor:
|
34
|
+
backgroundColor: "white",
|
39
35
|
padding: 16,
|
40
36
|
borderRadius: 8,
|
41
|
-
width:
|
42
|
-
alignItems:
|
37
|
+
width: "80%",
|
38
|
+
alignItems: "center"
|
43
39
|
},
|
44
40
|
messageText: {
|
45
41
|
fontSize: 18,
|
46
42
|
marginBottom: 16,
|
47
|
-
textAlign:
|
48
|
-
color:
|
43
|
+
textAlign: "center",
|
44
|
+
color: "#333"
|
49
45
|
},
|
50
46
|
closeButton: {
|
51
47
|
marginTop: 8,
|
52
|
-
backgroundColor:
|
48
|
+
backgroundColor: "#ccc",
|
53
49
|
padding: 8,
|
54
|
-
borderRadius: 4
|
50
|
+
borderRadius: 4
|
55
51
|
},
|
56
52
|
closeButtonText: {
|
57
|
-
color:
|
58
|
-
fontWeight:
|
59
|
-
textAlign:
|
60
|
-
}
|
53
|
+
color: "white",
|
54
|
+
fontWeight: "bold",
|
55
|
+
textAlign: "center"
|
56
|
+
}
|
61
57
|
});
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Pressable, Text, View } from "react-native";
|
3
|
+
import { styles } from "./styles";
|
4
|
+
|
5
|
+
type Props = {
|
6
|
+
hasPermission: boolean;
|
7
|
+
cameraPermission: () => void;
|
8
|
+
};
|
9
|
+
|
10
|
+
const DeviceNotFound = ({ hasPermission, cameraPermission }: Props) => {
|
11
|
+
return (
|
12
|
+
<View style={styles.container}>
|
13
|
+
<Text style={styles.text}>Device not found</Text>
|
14
|
+
<Pressable style={styles.button} onPress={cameraPermission}>
|
15
|
+
<Text style={styles.textButton}>
|
16
|
+
{hasPermission ? "Permission granted" : "Request permission"}
|
17
|
+
</Text>
|
18
|
+
</Pressable>
|
19
|
+
</View>
|
20
|
+
);
|
21
|
+
};
|
22
|
+
|
23
|
+
export default DeviceNotFound;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { StyleSheet } from "react-native";
|
2
|
+
|
3
|
+
export const styles = StyleSheet.create({
|
4
|
+
container: {
|
5
|
+
flex: 1,
|
6
|
+
justifyContent: "center",
|
7
|
+
alignItems: "center",
|
8
|
+
gap: 20,
|
9
|
+
},
|
10
|
+
text: {
|
11
|
+
color: "#000",
|
12
|
+
fontSize: 20,
|
13
|
+
},
|
14
|
+
button: {
|
15
|
+
alignItems: "center",
|
16
|
+
justifyContent: "center",
|
17
|
+
paddingVertical: 12,
|
18
|
+
paddingHorizontal: 32,
|
19
|
+
borderRadius: 4,
|
20
|
+
elevation: 3,
|
21
|
+
backgroundColor: "black",
|
22
|
+
},
|
23
|
+
textButton: {
|
24
|
+
fontSize: 16,
|
25
|
+
lineHeight: 21,
|
26
|
+
fontWeight: "bold",
|
27
|
+
letterSpacing: 0.25,
|
28
|
+
color: "white",
|
29
|
+
},
|
30
|
+
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import Ionicons from "react-native-vector-icons/Ionicons";
|
3
|
+
|
4
|
+
type Props = {
|
5
|
+
name: string;
|
6
|
+
size: number;
|
7
|
+
color: string;
|
8
|
+
};
|
9
|
+
|
10
|
+
const Icon = ({ name, size, color }: Props) => {
|
11
|
+
return <Ionicons name={name} size={size} color={color} />;
|
12
|
+
};
|
13
|
+
|
14
|
+
export default Icon;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import DeviceNotFound from "./deviceNotFound/deviceNotFound";
|
2
|
+
import ModalMessage from "./modalMessage/modalMessage";
|
3
|
+
import RecordButton from "./recordButton/recordButton";
|
4
|
+
import HelpRegister from "./HelpRegister";
|
5
|
+
import CaptureButton from "./CaptureButton";
|
6
|
+
import CameraConfigInfo from "./CameraConfigInfo";
|
7
|
+
import Gabarito from "./Gabarito";
|
8
|
+
|
9
|
+
export { DeviceNotFound, ModalMessage, RecordButton, HelpRegister, CaptureButton, CameraConfigInfo, Gabarito };
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import React, { useEffect, useMemo, useState } from "react";
|
2
|
+
import {
|
3
|
+
ActivityIndicator,
|
4
|
+
Modal,
|
5
|
+
Text,
|
6
|
+
TextStyle,
|
7
|
+
TouchableOpacity,
|
8
|
+
View,
|
9
|
+
ViewStyle,
|
10
|
+
useColorScheme
|
11
|
+
} from "react-native";
|
12
|
+
import { styles } from "./styles";
|
13
|
+
|
14
|
+
type Props = {
|
15
|
+
isLoading: boolean;
|
16
|
+
modal?: {
|
17
|
+
title: string;
|
18
|
+
message: string;
|
19
|
+
};
|
20
|
+
};
|
21
|
+
|
22
|
+
export const ModalMessage = ({ isLoading, modal }: Props) => {
|
23
|
+
const [visible, setVisible] = useState(false);
|
24
|
+
const isDark = useColorScheme() === "dark";
|
25
|
+
|
26
|
+
const backgroundColor = useMemo<ViewStyle>(() => {
|
27
|
+
return {
|
28
|
+
...styles.modal,
|
29
|
+
backgroundColor: isDark ? "#0f0f0f" : "#fff"
|
30
|
+
};
|
31
|
+
}, [isDark]);
|
32
|
+
|
33
|
+
const textColor = useMemo<TextStyle>(() => {
|
34
|
+
return {
|
35
|
+
color: isDark ? "#fff" : "#000"
|
36
|
+
};
|
37
|
+
}, [isDark]);
|
38
|
+
|
39
|
+
const handleModal = () => {
|
40
|
+
setVisible(false);
|
41
|
+
};
|
42
|
+
|
43
|
+
useEffect(() => {
|
44
|
+
if (isLoading === true) setVisible(true);
|
45
|
+
}, [isLoading]);
|
46
|
+
|
47
|
+
return (
|
48
|
+
<Modal animationType="fade" visible={visible} transparent>
|
49
|
+
<View style={styles.container}>
|
50
|
+
<View style={backgroundColor}>
|
51
|
+
{isLoading ? (
|
52
|
+
<>
|
53
|
+
<ActivityIndicator size="large" color="#0000ff" />
|
54
|
+
<Text style={[styles.title, textColor]}>Processando...</Text>
|
55
|
+
</>
|
56
|
+
) : (
|
57
|
+
<>
|
58
|
+
<Text style={[styles.title, textColor]}>{modal?.title}</Text>
|
59
|
+
<Text style={[styles.text, textColor]}>{modal?.message}</Text>
|
60
|
+
<View style={styles.button}>
|
61
|
+
<TouchableOpacity style={styles.button} onPress={handleModal}>
|
62
|
+
<Text style={styles.textButton}>Fechar</Text>
|
63
|
+
</TouchableOpacity>
|
64
|
+
</View>
|
65
|
+
</>
|
66
|
+
)}
|
67
|
+
</View>
|
68
|
+
</View>
|
69
|
+
</Modal>
|
70
|
+
);
|
71
|
+
};
|
72
|
+
|
73
|
+
export default ModalMessage;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { StyleSheet } from "react-native";
|
2
|
+
|
3
|
+
export const styles = StyleSheet.create({
|
4
|
+
container: {
|
5
|
+
flex: 1,
|
6
|
+
justifyContent: "center",
|
7
|
+
alignItems: "center"
|
8
|
+
},
|
9
|
+
modal: {
|
10
|
+
maxWidth: 300,
|
11
|
+
maxHeight: 200,
|
12
|
+
gap: 12,
|
13
|
+
borderRadius: 20,
|
14
|
+
padding: 18,
|
15
|
+
alignItems: "center",
|
16
|
+
shadowColor: "#000",
|
17
|
+
shadowOffset: {
|
18
|
+
width: 0,
|
19
|
+
height: 2
|
20
|
+
},
|
21
|
+
shadowOpacity: 0.25,
|
22
|
+
shadowRadius: 4,
|
23
|
+
elevation: 5
|
24
|
+
},
|
25
|
+
title: {
|
26
|
+
fontSize: 18,
|
27
|
+
fontWeight: "bold",
|
28
|
+
color: "#000"
|
29
|
+
},
|
30
|
+
text: {
|
31
|
+
fontSize: 16,
|
32
|
+
textAlign: "center",
|
33
|
+
color: "#000"
|
34
|
+
},
|
35
|
+
button: {
|
36
|
+
backgroundColor: "#0000ff",
|
37
|
+
paddingHorizontal: 12,
|
38
|
+
paddingVertical: 6,
|
39
|
+
borderRadius: 10
|
40
|
+
},
|
41
|
+
textButton: {
|
42
|
+
color: "#fff",
|
43
|
+
fontSize: 14
|
44
|
+
}
|
45
|
+
});
|