@ha_tecno/live-id-sdk 2.14.1 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/assets/svg/btn.svg +4 -0
- package/lib/commonjs/assets/svg/fingers/LI.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/LM.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/LP.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/LR.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/LT.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/RI.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/RM.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/RP.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/RR.svg +5 -0
- package/lib/commonjs/assets/svg/fingers/RT.svg +5 -0
- package/lib/commonjs/assets/svg/hand.svg +15 -0
- package/lib/commonjs/assets/svg/phone.svg +39 -0
- package/lib/commonjs/assets/svg/recordButton.svg +4 -0
- package/lib/commonjs/assets/svg/rectangle.svg +3 -0
- package/lib/commonjs/components/Gabarito/gabarito.js +56 -0
- package/lib/commonjs/components/Gabarito/gabarito.js.map +1 -0
- package/lib/commonjs/components/Gabarito/styles.js +2 -16
- package/lib/commonjs/components/Gabarito/styles.js.map +1 -1
- package/lib/commonjs/components/{Gabarito/index.js → HAButton/HAButton.js} +11 -7
- package/lib/commonjs/components/HAButton/HAButton.js.map +1 -0
- package/lib/commonjs/components/HAButton/styles.js +28 -0
- package/lib/commonjs/components/HAButton/styles.js.map +1 -0
- package/lib/commonjs/components/HACaptureButton/HACaptureButton.js +21 -0
- package/lib/commonjs/components/HACaptureButton/HACaptureButton.js.map +1 -0
- package/lib/commonjs/components/HACaptureInstructions/HACard/styles.js +4 -1
- package/lib/commonjs/components/HACaptureInstructions/HACard/styles.js.map +1 -1
- package/lib/commonjs/components/HACaptureInstructions/style.js +8 -2
- package/lib/commonjs/components/HACaptureInstructions/style.js.map +1 -1
- package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js +3 -5
- package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js.map +1 -1
- package/lib/commonjs/components/HACarouselCalibration/HAPagination/styles.js +2 -1
- package/lib/commonjs/components/HACarouselCalibration/HAPagination/styles.js.map +1 -1
- package/lib/commonjs/components/{modalMessage/modalMessage.js → HAModalMessage/HAModalMessage.js} +26 -14
- package/lib/commonjs/components/HAModalMessage/HAModalMessage.js.map +1 -0
- package/lib/commonjs/components/{modalMessage → HAModalMessage}/styles.js +15 -9
- package/lib/commonjs/components/HAModalMessage/styles.js.map +1 -0
- package/lib/commonjs/components/HARecordButton/HARecordButton.js +21 -0
- package/lib/commonjs/components/HARecordButton/HARecordButton.js.map +1 -0
- package/lib/commonjs/components/HARecordButton/styles.js +2 -0
- package/lib/commonjs/components/HARecordButton/styles.js.map +1 -0
- package/lib/commonjs/components/HARecordInstructions/HARecordInstructions.js +101 -0
- package/lib/commonjs/components/HARecordInstructions/HARecordInstructions.js.map +1 -0
- package/lib/commonjs/components/HARecordInstructions/data.js +14 -0
- package/lib/commonjs/components/HARecordInstructions/data.js.map +1 -0
- package/lib/commonjs/components/HARecordInstructions/styles.js +65 -0
- package/lib/commonjs/components/HARecordInstructions/styles.js.map +1 -0
- package/lib/commonjs/components/HAStepIndicator/HAStepIndicator.js +39 -0
- package/lib/commonjs/components/HAStepIndicator/HAStepIndicator.js.map +1 -0
- package/lib/commonjs/components/HAStepIndicator/styles.js +48 -0
- package/lib/commonjs/components/HAStepIndicator/styles.js.map +1 -0
- package/lib/commonjs/components/index.js +44 -9
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/screens/FingerAuth/FingerAuth.js +15 -20
- package/lib/commonjs/screens/FingerAuth/FingerAuth.js.map +1 -1
- package/lib/commonjs/screens/FingerAuth/styles.js +18 -11
- package/lib/commonjs/screens/FingerAuth/styles.js.map +1 -1
- package/lib/commonjs/screens/FingerRegister/FingerRegister.js +96 -62
- package/lib/commonjs/screens/FingerRegister/FingerRegister.js.map +1 -1
- package/lib/commonjs/screens/FingerRegister/data.js +60 -0
- package/lib/commonjs/screens/FingerRegister/data.js.map +1 -0
- package/lib/commonjs/screens/FingerRegister/styles.js +71 -34
- package/lib/commonjs/screens/FingerRegister/styles.js.map +1 -1
- package/lib/commonjs/screens/LifeCertificate/LifeCertificate.js +19 -22
- package/lib/commonjs/screens/LifeCertificate/LifeCertificate.js.map +1 -1
- package/lib/commonjs/screens/LifeCertificate/styles.js +23 -4
- package/lib/commonjs/screens/LifeCertificate/styles.js.map +1 -1
- package/lib/commonjs/screens/RegisterOperations/registerOperationPointsBiometrics.js +76 -49
- package/lib/commonjs/screens/RegisterOperations/registerOperationPointsBiometrics.js.map +1 -1
- package/lib/commonjs/screens/RegisterOperations/registerOperationPointsLifeCertificate.js +73 -34
- package/lib/commonjs/screens/RegisterOperations/registerOperationPointsLifeCertificate.js.map +1 -1
- package/lib/commonjs/screens/RegisterOperations/styles.js +74 -21
- package/lib/commonjs/screens/RegisterOperations/styles.js.map +1 -1
- package/lib/commonjs/services/services.js +1 -1
- package/lib/commonjs/services/services.js.map +1 -1
- package/lib/commonjs/store/modules/lifeCertificate/slice.js +5 -3
- package/lib/commonjs/store/modules/lifeCertificate/slice.js.map +1 -1
- package/lib/commonjs/store/modules/operationPoints/slice.js +48 -18
- package/lib/commonjs/store/modules/operationPoints/slice.js.map +1 -1
- package/lib/module/assets/svg/btn.svg +4 -0
- package/lib/module/assets/svg/fingers/LI.svg +5 -0
- package/lib/module/assets/svg/fingers/LM.svg +5 -0
- package/lib/module/assets/svg/fingers/LP.svg +5 -0
- package/lib/module/assets/svg/fingers/LR.svg +5 -0
- package/lib/module/assets/svg/fingers/LT.svg +5 -0
- package/lib/module/assets/svg/fingers/RI.svg +5 -0
- package/lib/module/assets/svg/fingers/RM.svg +5 -0
- package/lib/module/assets/svg/fingers/RP.svg +5 -0
- package/lib/module/assets/svg/fingers/RR.svg +5 -0
- package/lib/module/assets/svg/fingers/RT.svg +5 -0
- package/lib/module/assets/svg/hand.svg +15 -0
- package/lib/module/assets/svg/phone.svg +39 -0
- package/lib/module/assets/svg/recordButton.svg +4 -0
- package/lib/module/assets/svg/rectangle.svg +3 -0
- package/lib/module/components/Gabarito/gabarito.js +49 -0
- package/lib/module/components/Gabarito/gabarito.js.map +1 -0
- package/lib/module/components/Gabarito/styles.js +3 -17
- package/lib/module/components/Gabarito/styles.js.map +1 -1
- package/lib/module/components/HAButton/HAButton.js +16 -0
- package/lib/module/components/HAButton/HAButton.js.map +1 -0
- package/lib/module/components/HAButton/styles.js +22 -0
- package/lib/module/components/HAButton/styles.js.map +1 -0
- package/lib/module/components/HACaptureButton/HACaptureButton.js +14 -0
- package/lib/module/components/HACaptureButton/HACaptureButton.js.map +1 -0
- package/lib/module/components/HACaptureInstructions/HACard/styles.js +5 -2
- package/lib/module/components/HACaptureInstructions/HACard/styles.js.map +1 -1
- package/lib/module/components/HACaptureInstructions/style.js +9 -3
- package/lib/module/components/HACaptureInstructions/style.js.map +1 -1
- package/lib/module/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js +3 -5
- package/lib/module/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js.map +1 -1
- package/lib/module/components/HACarouselCalibration/HAPagination/styles.js +2 -1
- package/lib/module/components/HACarouselCalibration/HAPagination/styles.js.map +1 -1
- package/lib/module/components/{modalMessage/modalMessage.js → HAModalMessage/HAModalMessage.js} +26 -14
- package/lib/module/components/HAModalMessage/HAModalMessage.js.map +1 -0
- package/lib/module/components/{modalMessage → HAModalMessage}/styles.js +15 -9
- package/lib/module/components/HAModalMessage/styles.js.map +1 -0
- package/lib/module/components/HARecordButton/HARecordButton.js +14 -0
- package/lib/module/components/HARecordButton/HARecordButton.js.map +1 -0
- package/lib/module/components/HARecordButton/styles.js +2 -0
- package/lib/module/components/HARecordButton/styles.js.map +1 -0
- package/lib/module/components/HARecordInstructions/HARecordInstructions.js +92 -0
- package/lib/module/components/HARecordInstructions/HARecordInstructions.js.map +1 -0
- package/lib/module/components/HARecordInstructions/data.js +8 -0
- package/lib/module/components/HARecordInstructions/data.js.map +1 -0
- package/lib/module/components/HARecordInstructions/styles.js +59 -0
- package/lib/module/components/HARecordInstructions/styles.js.map +1 -0
- package/lib/module/components/HAStepIndicator/HAStepIndicator.js +32 -0
- package/lib/module/components/HAStepIndicator/HAStepIndicator.js.map +1 -0
- package/lib/module/components/HAStepIndicator/styles.js +42 -0
- package/lib/module/components/HAStepIndicator/styles.js.map +1 -0
- package/lib/module/components/index.js +8 -3
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/FingerAuth/FingerAuth.js +17 -22
- package/lib/module/screens/FingerAuth/FingerAuth.js.map +1 -1
- package/lib/module/screens/FingerAuth/styles.js +19 -12
- package/lib/module/screens/FingerAuth/styles.js.map +1 -1
- package/lib/module/screens/FingerRegister/FingerRegister.js +100 -66
- package/lib/module/screens/FingerRegister/FingerRegister.js.map +1 -1
- package/lib/module/screens/FingerRegister/data.js +53 -0
- package/lib/module/screens/FingerRegister/data.js.map +1 -0
- package/lib/module/screens/FingerRegister/styles.js +72 -35
- package/lib/module/screens/FingerRegister/styles.js.map +1 -1
- package/lib/module/screens/LifeCertificate/LifeCertificate.js +22 -25
- package/lib/module/screens/LifeCertificate/LifeCertificate.js.map +1 -1
- package/lib/module/screens/LifeCertificate/styles.js +24 -5
- package/lib/module/screens/LifeCertificate/styles.js.map +1 -1
- package/lib/module/screens/RegisterOperations/registerOperationPointsBiometrics.js +78 -52
- package/lib/module/screens/RegisterOperations/registerOperationPointsBiometrics.js.map +1 -1
- package/lib/module/screens/RegisterOperations/registerOperationPointsLifeCertificate.js +73 -36
- package/lib/module/screens/RegisterOperations/registerOperationPointsLifeCertificate.js.map +1 -1
- package/lib/module/screens/RegisterOperations/styles.js +74 -21
- package/lib/module/screens/RegisterOperations/styles.js.map +1 -1
- package/lib/module/services/services.js +1 -1
- package/lib/module/services/services.js.map +1 -1
- package/lib/module/store/modules/lifeCertificate/slice.js +5 -3
- package/lib/module/store/modules/lifeCertificate/slice.js.map +1 -1
- package/lib/module/store/modules/operationPoints/slice.js +48 -18
- package/lib/module/store/modules/operationPoints/slice.js.map +1 -1
- package/lib/typescript/src/components/Gabarito/gabarito.d.ts +19 -0
- package/lib/typescript/src/components/Gabarito/gabarito.d.ts.map +1 -0
- package/lib/typescript/src/components/Gabarito/styles.d.ts +1 -13
- package/lib/typescript/src/components/Gabarito/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/HAButton/HAButton.d.ts +8 -0
- package/lib/typescript/src/components/HAButton/HAButton.d.ts.map +1 -0
- package/lib/typescript/src/components/HAButton/styles.d.ts +15 -0
- package/lib/typescript/src/components/HAButton/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/HACaptureButton/HACaptureButton.d.ts +7 -0
- package/lib/typescript/src/components/HACaptureButton/HACaptureButton.d.ts.map +1 -0
- package/lib/typescript/src/components/HACaptureInstructions/HACard/styles.d.ts +1 -1
- package/lib/typescript/src/components/HACaptureInstructions/HACard/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/HACaptureInstructions/style.d.ts +2 -2
- package/lib/typescript/src/components/HACaptureInstructions/style.d.ts.map +1 -1
- package/lib/typescript/src/components/HACarouselCalibration/HACarouselItem/HACarouselItem.d.ts.map +1 -1
- package/lib/typescript/src/components/HACarouselCalibration/HAPagination/styles.d.ts +1 -1
- package/lib/typescript/src/components/HACarouselCalibration/HAPagination/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/HAModalMessage/HAModalMessage.d.ts +13 -0
- package/lib/typescript/src/components/HAModalMessage/HAModalMessage.d.ts.map +1 -0
- package/lib/typescript/src/components/{modalMessage → HAModalMessage}/styles.d.ts +12 -6
- package/lib/typescript/src/components/HAModalMessage/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/HARecordButton/HARecordButton.d.ts +8 -0
- package/lib/typescript/src/components/HARecordButton/HARecordButton.d.ts.map +1 -0
- package/lib/typescript/src/components/HARecordButton/styles.d.ts +1 -0
- package/lib/typescript/src/components/HARecordButton/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/HARecordInstructions/HARecordInstructions.d.ts +7 -0
- package/lib/typescript/src/components/HARecordInstructions/HARecordInstructions.d.ts.map +1 -0
- package/lib/typescript/src/components/HARecordInstructions/data.d.ts +5 -0
- package/lib/typescript/src/components/HARecordInstructions/data.d.ts.map +1 -0
- package/lib/typescript/src/components/HARecordInstructions/styles.d.ts +52 -0
- package/lib/typescript/src/components/HARecordInstructions/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/HAStepIndicator/HAStepIndicator.d.ts +8 -0
- package/lib/typescript/src/components/HAStepIndicator/HAStepIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/HAStepIndicator/styles.d.ts +41 -0
- package/lib/typescript/src/components/HAStepIndicator/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +8 -3
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts +1 -2
- package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts.map +1 -1
- package/lib/typescript/src/screens/FingerAuth/styles.d.ts +17 -7
- package/lib/typescript/src/screens/FingerAuth/styles.d.ts.map +1 -1
- package/lib/typescript/src/screens/FingerRegister/FingerRegister.d.ts +1 -2
- package/lib/typescript/src/screens/FingerRegister/FingerRegister.d.ts.map +1 -1
- package/lib/typescript/src/screens/FingerRegister/data.d.ts +9 -0
- package/lib/typescript/src/screens/FingerRegister/data.d.ts.map +1 -0
- package/lib/typescript/src/screens/FingerRegister/styles.d.ts +64 -27
- package/lib/typescript/src/screens/FingerRegister/styles.d.ts.map +1 -1
- package/lib/typescript/src/screens/LifeCertificate/LifeCertificate.d.ts +1 -2
- package/lib/typescript/src/screens/LifeCertificate/LifeCertificate.d.ts.map +1 -1
- package/lib/typescript/src/screens/LifeCertificate/styles.d.ts +18 -2
- package/lib/typescript/src/screens/LifeCertificate/styles.d.ts.map +1 -1
- package/lib/typescript/src/screens/RegisterOperations/registerOperationPointsBiometrics.d.ts.map +1 -1
- package/lib/typescript/src/screens/RegisterOperations/registerOperationPointsLifeCertificate.d.ts.map +1 -1
- package/lib/typescript/src/screens/RegisterOperations/styles.d.ts +59 -18
- package/lib/typescript/src/screens/RegisterOperations/styles.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/lifeCertificate/selectors.d.ts +2 -1
- package/lib/typescript/src/store/modules/lifeCertificate/selectors.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/lifeCertificate/slice.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/lifeCertificate/types.d.ts +2 -1
- package/lib/typescript/src/store/modules/lifeCertificate/types.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/operationPoints/selectors.d.ts +12 -4
- package/lib/typescript/src/store/modules/operationPoints/selectors.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/operationPoints/slice.d.ts.map +1 -1
- package/lib/typescript/src/store/modules/operationPoints/types.d.ts +12 -4
- package/lib/typescript/src/store/modules/operationPoints/types.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/assets/svg/btn.svg +4 -0
- package/src/assets/svg/fingers/LI.svg +5 -0
- package/src/assets/svg/fingers/LM.svg +5 -0
- package/src/assets/svg/fingers/LP.svg +5 -0
- package/src/assets/svg/fingers/LR.svg +5 -0
- package/src/assets/svg/fingers/LT.svg +5 -0
- package/src/assets/svg/fingers/RI.svg +5 -0
- package/src/assets/svg/fingers/RM.svg +5 -0
- package/src/assets/svg/fingers/RP.svg +5 -0
- package/src/assets/svg/fingers/RR.svg +5 -0
- package/src/assets/svg/fingers/RT.svg +5 -0
- package/src/assets/svg/hand.svg +15 -0
- package/src/assets/svg/phone.svg +39 -0
- package/src/assets/svg/recordButton.svg +4 -0
- package/src/assets/svg/rectangle.svg +3 -0
- package/src/components/Gabarito/gabarito.tsx +38 -0
- package/src/components/Gabarito/styles.ts +3 -16
- package/src/components/HAButton/HAButton.tsx +18 -0
- package/src/components/HAButton/styles.ts +22 -0
- package/src/components/HACaptureButton/HACaptureButton.tsx +17 -0
- package/src/components/HACaptureInstructions/HACard/styles.ts +5 -2
- package/src/components/HACaptureInstructions/style.ts +15 -3
- package/src/components/HACarouselCalibration/HACarouselItem/HACarouselItem.tsx +2 -4
- package/src/components/HACarouselCalibration/HAPagination/styles.ts +2 -1
- package/src/components/HAModalMessage/HAModalMessage.tsx +72 -0
- package/src/components/{modalMessage → HAModalMessage}/styles.ts +12 -9
- package/src/components/HARecordButton/HARecordButton.tsx +18 -0
- package/src/components/HARecordButton/styles.ts +0 -0
- package/src/components/HARecordInstructions/HARecordInstructions.tsx +73 -0
- package/src/components/HARecordInstructions/data.ts +10 -0
- package/src/components/HARecordInstructions/styles.ts +50 -0
- package/src/components/HAStepIndicator/HAStepIndicator.tsx +34 -0
- package/src/components/HAStepIndicator/styles.ts +42 -0
- package/src/components/index.ts +14 -4
- package/src/index.tsx +3 -2
- package/src/screens/FingerAuth/FingerAuth.tsx +20 -14
- package/src/screens/FingerAuth/styles.ts +19 -11
- package/src/screens/FingerRegister/FingerRegister.tsx +107 -63
- package/src/screens/FingerRegister/data.ts +65 -0
- package/src/screens/FingerRegister/styles.ts +67 -34
- package/src/screens/LifeCertificate/LifeCertificate.tsx +31 -25
- package/src/screens/LifeCertificate/styles.ts +17 -5
- package/src/screens/RegisterOperations/registerOperationPointsBiometrics.tsx +68 -35
- package/src/screens/RegisterOperations/registerOperationPointsLifeCertificate.tsx +74 -46
- package/src/screens/RegisterOperations/styles.ts +65 -22
- package/src/services/services.ts +2 -2
- package/src/store/modules/lifeCertificate/slice.ts +5 -3
- package/src/store/modules/lifeCertificate/types.ts +2 -1
- package/src/store/modules/operationPoints/slice.ts +52 -17
- package/src/store/modules/operationPoints/types.ts +12 -4
- package/lib/commonjs/components/Gabarito/index.js.map +0 -1
- package/lib/commonjs/components/modalMessage/modalMessage.js.map +0 -1
- package/lib/commonjs/components/modalMessage/styles.js.map +0 -1
- package/lib/module/components/Gabarito/index.js +0 -12
- package/lib/module/components/Gabarito/index.js.map +0 -1
- package/lib/module/components/modalMessage/modalMessage.js.map +0 -1
- package/lib/module/components/modalMessage/styles.js.map +0 -1
- package/lib/typescript/src/components/Gabarito/index.d.ts +0 -4
- package/lib/typescript/src/components/Gabarito/index.d.ts.map +0 -1
- package/lib/typescript/src/components/modalMessage/modalMessage.d.ts +0 -11
- package/lib/typescript/src/components/modalMessage/modalMessage.d.ts.map +0 -1
- package/lib/typescript/src/components/modalMessage/styles.d.ts.map +0 -1
- package/src/components/Gabarito/index.tsx +0 -13
- package/src/components/modalMessage/modalMessage.tsx +0 -73
@@ -0,0 +1,72 @@
|
|
1
|
+
import React, { useEffect, useMemo, useState } from "react";
|
2
|
+
import { ActivityIndicator, Modal, Text, TextStyle, TouchableOpacity, View, useColorScheme } from "react-native";
|
3
|
+
import { styles } from "./styles";
|
4
|
+
|
5
|
+
type Props = {
|
6
|
+
isLoading: boolean;
|
7
|
+
modal?: {
|
8
|
+
title: string;
|
9
|
+
message: string;
|
10
|
+
bpm?: number;
|
11
|
+
};
|
12
|
+
messageLoading: string;
|
13
|
+
};
|
14
|
+
|
15
|
+
export const ModalMessage = ({ isLoading, messageLoading, modal }: Props) => {
|
16
|
+
const [visible, setVisible] = useState(false);
|
17
|
+
const isDark = useColorScheme() === "dark";
|
18
|
+
|
19
|
+
const backgroundColor = { ...styles.modal, backgroundColor: isDark ? "#333333" : "#fff" };
|
20
|
+
const containerButtonStyle = { ...styles.containerButton, borderColor: isDark ? "#ffffff20" : "#00000020" };
|
21
|
+
|
22
|
+
const messageFilteredByTitle =
|
23
|
+
modal?.message.includes("Tudo certo!") || modal?.message.includes("Cadastro do dispositivo")
|
24
|
+
? "Confirmar"
|
25
|
+
: "Tentar novamente";
|
26
|
+
const messageFilteredByBPM = modal?.bpm !== 0 ? "Confirmar" : "Tentar novamente";
|
27
|
+
const messageFiltered = modal?.bpm === undefined ? messageFilteredByTitle : messageFilteredByBPM;
|
28
|
+
|
29
|
+
const textColor = useMemo<TextStyle>(() => {
|
30
|
+
return {
|
31
|
+
color: isDark ? "#fff" : "#000"
|
32
|
+
};
|
33
|
+
}, [isDark]);
|
34
|
+
|
35
|
+
const handleModal = () => {
|
36
|
+
setVisible(false);
|
37
|
+
};
|
38
|
+
|
39
|
+
useEffect(() => {
|
40
|
+
if (isLoading === true) setVisible(true);
|
41
|
+
}, [isLoading]);
|
42
|
+
|
43
|
+
return (
|
44
|
+
<Modal animationType="fade" visible={visible} transparent>
|
45
|
+
<View style={styles.container}>
|
46
|
+
<View style={backgroundColor}>
|
47
|
+
{isLoading ? (
|
48
|
+
<View style={styles.containerContent}>
|
49
|
+
<ActivityIndicator size="large" color="#005EFF" />
|
50
|
+
<Text style={[styles.title, textColor]}>Aguarde!</Text>
|
51
|
+
<Text style={[styles.text]}>{messageLoading}</Text>
|
52
|
+
</View>
|
53
|
+
) : (
|
54
|
+
<>
|
55
|
+
<View style={styles.containerContent}>
|
56
|
+
<Text style={[styles.title, textColor]}>{modal?.title}</Text>
|
57
|
+
<Text style={styles.text}>{modal?.message}</Text>
|
58
|
+
</View>
|
59
|
+
<View style={containerButtonStyle}>
|
60
|
+
<TouchableOpacity style={styles.button} onPress={handleModal}>
|
61
|
+
<Text style={styles.textButton}>{messageFiltered}</Text>
|
62
|
+
</TouchableOpacity>
|
63
|
+
</View>
|
64
|
+
</>
|
65
|
+
)}
|
66
|
+
</View>
|
67
|
+
</View>
|
68
|
+
</Modal>
|
69
|
+
);
|
70
|
+
};
|
71
|
+
|
72
|
+
export default ModalMessage;
|
@@ -9,10 +9,8 @@ export const styles = StyleSheet.create({
|
|
9
9
|
modal: {
|
10
10
|
maxWidth: 300,
|
11
11
|
maxHeight: 200,
|
12
|
-
gap: 12,
|
13
12
|
borderRadius: 20,
|
14
13
|
padding: 18,
|
15
|
-
alignItems: "center",
|
16
14
|
shadowColor: "#000",
|
17
15
|
shadowOffset: {
|
18
16
|
width: 0,
|
@@ -22,24 +20,29 @@ export const styles = StyleSheet.create({
|
|
22
20
|
shadowRadius: 4,
|
23
21
|
elevation: 5
|
24
22
|
},
|
23
|
+
containerContent: {
|
24
|
+
alignItems: "center",
|
25
|
+
gap: 12
|
26
|
+
},
|
25
27
|
title: {
|
26
28
|
fontSize: 18,
|
27
|
-
fontWeight: "
|
28
|
-
color: "#000"
|
29
|
+
fontWeight: "600"
|
29
30
|
},
|
30
31
|
text: {
|
31
|
-
fontSize:
|
32
|
+
fontSize: 14,
|
32
33
|
textAlign: "center",
|
33
|
-
|
34
|
+
fontWeight: "400",
|
35
|
+
color: "#B1B3C2"
|
34
36
|
},
|
37
|
+
containerButton: { borderTopWidth: 2, marginTop: 20 },
|
35
38
|
button: {
|
36
|
-
|
39
|
+
alignItems: "center",
|
40
|
+
paddingTop: 12,
|
37
41
|
paddingHorizontal: 12,
|
38
|
-
paddingVertical: 6,
|
39
42
|
borderRadius: 10
|
40
43
|
},
|
41
44
|
textButton: {
|
42
|
-
color: "#
|
45
|
+
color: "#005EFF",
|
43
46
|
fontSize: 14
|
44
47
|
}
|
45
48
|
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import RecordButton from "../../assets/svg/recordButton.svg";
|
3
|
+
import { TouchableOpacity } from "react-native";
|
4
|
+
|
5
|
+
type HARecordButtonType = {
|
6
|
+
onPress: () => void;
|
7
|
+
disabled: boolean;
|
8
|
+
};
|
9
|
+
|
10
|
+
const HARecordButton = ({ onPress, disabled }: HARecordButtonType) => {
|
11
|
+
return (
|
12
|
+
<TouchableOpacity onPress={onPress} disabled={disabled}>
|
13
|
+
<RecordButton />
|
14
|
+
</TouchableOpacity>
|
15
|
+
);
|
16
|
+
};
|
17
|
+
|
18
|
+
export default HARecordButton;
|
File without changes
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import React, { useEffect } from "react";
|
2
|
+
import { SafeAreaView, View, Text, TouchableOpacity } from "react-native";
|
3
|
+
import { useTheme } from "../../theme/theme";
|
4
|
+
import { data } from "./data";
|
5
|
+
import { styles } from "./styles";
|
6
|
+
import Phone from "../../assets/svg/phone.svg";
|
7
|
+
import Hand from "../../assets/svg/hand.svg";
|
8
|
+
import Animated, {
|
9
|
+
Easing,
|
10
|
+
useAnimatedStyle,
|
11
|
+
useSharedValue,
|
12
|
+
withRepeat,
|
13
|
+
withSequence,
|
14
|
+
withTiming
|
15
|
+
} from "react-native-reanimated";
|
16
|
+
|
17
|
+
type HARecordInstructionsType = {
|
18
|
+
onPress: () => void;
|
19
|
+
};
|
20
|
+
|
21
|
+
const HARecordInstructions = ({ onPress }: HARecordInstructionsType) => {
|
22
|
+
const { backgroundColor, text, blue, gray } = useTheme();
|
23
|
+
const offset = useSharedValue(0);
|
24
|
+
|
25
|
+
const containerStyle = { ...styles.container, backgroundColor };
|
26
|
+
const titleStyle = { ...styles.title, color: text };
|
27
|
+
const cardStyle = { ...styles.containerCard, backgroundColor: gray };
|
28
|
+
const subTitleStyle = { ...styles.subTitle, color: text };
|
29
|
+
const textStyle = { ...styles.text, color: text };
|
30
|
+
const buttonStyle = { ...styles.containerButton, backgroundColor: blue };
|
31
|
+
|
32
|
+
const duration = 2000;
|
33
|
+
const easing = Easing.bezier(0.25, 0, 0.25, 1);
|
34
|
+
useEffect(() => {
|
35
|
+
offset.value = withRepeat(
|
36
|
+
withSequence(withTiming(35, { duration, easing }), withTiming(0, { duration, easing })),
|
37
|
+
-1
|
38
|
+
);
|
39
|
+
}, []);
|
40
|
+
|
41
|
+
const style = useAnimatedStyle(() => ({
|
42
|
+
transform: [{ translateX: offset.value }]
|
43
|
+
}));
|
44
|
+
|
45
|
+
return (
|
46
|
+
<SafeAreaView style={containerStyle}>
|
47
|
+
<Text style={titleStyle}>Como realizar a prova de vida</Text>
|
48
|
+
{data.map((item, index) => (
|
49
|
+
<View style={cardStyle} key={index}>
|
50
|
+
<View style={styles.card}>
|
51
|
+
<View style={styles.content}>
|
52
|
+
<Text style={subTitleStyle}>{item.title}</Text>
|
53
|
+
<Text style={textStyle}>{item.text}</Text>
|
54
|
+
</View>
|
55
|
+
{index === 0 && (
|
56
|
+
<View style={styles.row}>
|
57
|
+
<Animated.View style={[styles.zIndex, style]}>
|
58
|
+
<Hand width={65} height={98} />
|
59
|
+
</Animated.View>
|
60
|
+
<Phone width={65} height={98} />
|
61
|
+
</View>
|
62
|
+
)}
|
63
|
+
</View>
|
64
|
+
</View>
|
65
|
+
))}
|
66
|
+
<TouchableOpacity style={buttonStyle} onPress={onPress}>
|
67
|
+
<Text style={styles.buttonText}>Realizar prova de vida</Text>
|
68
|
+
</TouchableOpacity>
|
69
|
+
</SafeAreaView>
|
70
|
+
);
|
71
|
+
};
|
72
|
+
|
73
|
+
export default HARecordInstructions;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export const data: { title: string; text: string }[] = [
|
2
|
+
{
|
3
|
+
title: "1. Posicione o seu dedo",
|
4
|
+
text: "Coloque seu dedo na câmera conforme indicado na animação."
|
5
|
+
},
|
6
|
+
{
|
7
|
+
title: "Relizar a prova de vida",
|
8
|
+
text: "Faça uma leve pressão na câmera, clique no botão de captura e aguarde 10 segundos."
|
9
|
+
}
|
10
|
+
];
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { StyleSheet, Platform } from "react-native";
|
2
|
+
|
3
|
+
export const styles = StyleSheet.create({
|
4
|
+
container: {
|
5
|
+
flex: 1,
|
6
|
+
justifyContent: "center"
|
7
|
+
},
|
8
|
+
title: { fontSize: 24, fontWeight: "600", textAlign: "center", paddingBottom: 20 },
|
9
|
+
containerCard: {
|
10
|
+
marginHorizontal: 20,
|
11
|
+
paddingHorizontal: 20,
|
12
|
+
marginBottom: 20,
|
13
|
+
borderRadius: 10
|
14
|
+
},
|
15
|
+
card: { padding: 10, alignItems: "center", gap: 20 },
|
16
|
+
content: {
|
17
|
+
gap: 12
|
18
|
+
},
|
19
|
+
subTitle: {
|
20
|
+
fontSize: 16,
|
21
|
+
fontWeight: "600"
|
22
|
+
},
|
23
|
+
text: {
|
24
|
+
fontSize: Platform.select({
|
25
|
+
android: 14,
|
26
|
+
ios: 16
|
27
|
+
})
|
28
|
+
},
|
29
|
+
row: {
|
30
|
+
flexDirection: "row"
|
31
|
+
},
|
32
|
+
zIndex: {
|
33
|
+
zIndex: 99
|
34
|
+
},
|
35
|
+
containerButton: {
|
36
|
+
marginHorizontal: 40,
|
37
|
+
padding: 14,
|
38
|
+
borderRadius: 16,
|
39
|
+
justifyContent: "center",
|
40
|
+
alignItems: "center"
|
41
|
+
},
|
42
|
+
buttonText: {
|
43
|
+
color: "#FFF",
|
44
|
+
fontSize: Platform.select({
|
45
|
+
android: 16,
|
46
|
+
ios: 18
|
47
|
+
}),
|
48
|
+
fontWeight: "500"
|
49
|
+
}
|
50
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { View } from "react-native";
|
3
|
+
import Icon from "../icon/icon";
|
4
|
+
import { styles } from "./styles";
|
5
|
+
|
6
|
+
type Props = {
|
7
|
+
step: number;
|
8
|
+
totalSteps: number;
|
9
|
+
};
|
10
|
+
|
11
|
+
const HAStepProgress = ({ step, totalSteps }: Props) => {
|
12
|
+
const renderStepIndicator = () => {
|
13
|
+
const indicators = [];
|
14
|
+
for (let i = 1; i <= totalSteps; i++) {
|
15
|
+
indicators.push(
|
16
|
+
<View key={i} style={styles.stepContainer}>
|
17
|
+
<View style={[styles.stepIndicator, i <= step && styles.activeStep]}>
|
18
|
+
<Icon
|
19
|
+
name={i === step ? "ellipsis-horizontal" : "checkmark"}
|
20
|
+
size={24}
|
21
|
+
color={i <= step ? "#FFF" : "transparent"}
|
22
|
+
/>
|
23
|
+
</View>
|
24
|
+
{i < totalSteps && <View style={[styles.line, i < step && styles.activeLine]} />}
|
25
|
+
</View>
|
26
|
+
);
|
27
|
+
}
|
28
|
+
return <View style={styles.indicatorContainer}>{indicators}</View>;
|
29
|
+
};
|
30
|
+
|
31
|
+
return <>{renderStepIndicator()}</>;
|
32
|
+
};
|
33
|
+
|
34
|
+
export default HAStepProgress;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { StyleSheet } from "react-native";
|
2
|
+
|
3
|
+
export const styles = StyleSheet.create({
|
4
|
+
indicatorContainer: {
|
5
|
+
flexDirection: "row",
|
6
|
+
marginBottom: 20
|
7
|
+
},
|
8
|
+
stepContainer: {
|
9
|
+
flexDirection: "row",
|
10
|
+
alignItems: "center"
|
11
|
+
},
|
12
|
+
stepIndicator: {
|
13
|
+
width: 35,
|
14
|
+
height: 35,
|
15
|
+
borderRadius: 20,
|
16
|
+
borderWidth: 2,
|
17
|
+
borderColor: "#ffffff30",
|
18
|
+
backgroundColor: "#ffffff30",
|
19
|
+
justifyContent: "center",
|
20
|
+
alignItems: "center"
|
21
|
+
},
|
22
|
+
activeStep: {
|
23
|
+
borderColor: "#005EFF",
|
24
|
+
backgroundColor: "#005EFF"
|
25
|
+
},
|
26
|
+
stepText: {
|
27
|
+
color: "#E7E7E7",
|
28
|
+
fontWeight: "bold",
|
29
|
+
fontSize: 16
|
30
|
+
},
|
31
|
+
activeStepText: {
|
32
|
+
color: "#fff"
|
33
|
+
},
|
34
|
+
line: {
|
35
|
+
width: 100,
|
36
|
+
height: 2,
|
37
|
+
backgroundColor: "#ffffff30"
|
38
|
+
},
|
39
|
+
activeLine: {
|
40
|
+
backgroundColor: "#005EFF"
|
41
|
+
}
|
42
|
+
});
|
package/src/components/index.ts
CHANGED
@@ -1,17 +1,22 @@
|
|
1
1
|
import DeviceNotFound from "./deviceNotFound/deviceNotFound";
|
2
|
-
import
|
2
|
+
import HAModalMessage from "./HAModalMessage/HAModalMessage";
|
3
3
|
import RecordButton from "./recordButton/recordButton";
|
4
4
|
import CaptureButton from "./CaptureButton";
|
5
5
|
import CameraConfigInfo from "./CameraConfigInfo";
|
6
|
-
import Gabarito from "./Gabarito";
|
6
|
+
import Gabarito from "./Gabarito/gabarito";
|
7
7
|
import HAText from "./Typograph/typograph";
|
8
8
|
import Icon from "./icon/icon";
|
9
9
|
import HACarouselCalibration from "./HACarouselCalibration/HACarouselCalibration";
|
10
10
|
import HACaptureInstructions from "./HACaptureInstructions/HACaptureInstructions";
|
11
|
+
import HARecordInstructions from "./HARecordInstructions/HARecordInstructions";
|
12
|
+
import HARecordButton from "./HARecordButton/HARecordButton";
|
13
|
+
import HACaptureButton from "./HACaptureButton/HACaptureButton";
|
14
|
+
import HAStepProgress from "./HAStepIndicator/HAStepIndicator";
|
15
|
+
import HAButton from "./HAButton/HAButton";
|
11
16
|
|
12
17
|
export {
|
13
18
|
DeviceNotFound,
|
14
|
-
|
19
|
+
HAModalMessage,
|
15
20
|
RecordButton,
|
16
21
|
CaptureButton,
|
17
22
|
CameraConfigInfo,
|
@@ -19,5 +24,10 @@ export {
|
|
19
24
|
HAText,
|
20
25
|
Icon,
|
21
26
|
HACarouselCalibration,
|
22
|
-
HACaptureInstructions
|
27
|
+
HACaptureInstructions,
|
28
|
+
HARecordInstructions,
|
29
|
+
HARecordButton,
|
30
|
+
HACaptureButton,
|
31
|
+
HAStepProgress,
|
32
|
+
HAButton
|
23
33
|
};
|
package/src/index.tsx
CHANGED
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
RegisterOperationPointsLifeCertificate
|
7
7
|
} from "./screens";
|
8
8
|
|
9
|
-
import { HACarouselCalibration, HACaptureInstructions } from "./components";
|
9
|
+
import { HACarouselCalibration, HACaptureInstructions, HARecordInstructions } from "./components";
|
10
10
|
|
11
11
|
export {
|
12
12
|
LifeCertificate,
|
@@ -15,5 +15,6 @@ export {
|
|
15
15
|
RegisterOperationPointsBiometrics,
|
16
16
|
RegisterOperationPointsLifeCertificate,
|
17
17
|
HACarouselCalibration,
|
18
|
-
HACaptureInstructions
|
18
|
+
HACaptureInstructions,
|
19
|
+
HARecordInstructions
|
19
20
|
};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
2
|
-
import { View } from "react-native";
|
2
|
+
import { View, StyleSheet, Text } from "react-native";
|
3
3
|
import { Camera, useCameraFormat, Point, useCameraDevice, useCameraPermission } from "react-native-vision-camera";
|
4
4
|
import Orientation from "react-native-orientation-locker";
|
5
5
|
import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
|
6
6
|
import { runOnJS } from "react-native-reanimated";
|
7
7
|
|
8
8
|
import { styles } from "./styles";
|
9
|
-
import { DeviceNotFound, Gabarito,
|
9
|
+
import { DeviceNotFound, Gabarito, HAModalMessage, HACaptureButton } from "../../components";
|
10
10
|
import { useIsForeground } from "../../utils";
|
11
11
|
import { useDispatch, useSelector } from "../../store/modules/fingerAuth";
|
12
12
|
|
@@ -15,10 +15,9 @@ type Props = {
|
|
15
15
|
onSuccess: (code: number) => void;
|
16
16
|
isFocused?: boolean;
|
17
17
|
mock?: boolean;
|
18
|
-
testID?: string;
|
19
18
|
};
|
20
19
|
|
21
|
-
const FingerAuth = ({
|
20
|
+
const FingerAuth = ({ UID, onSuccess, isFocused, mock }: Props) => {
|
22
21
|
const [torch, setTorch] = useState<"off" | "on">("off");
|
23
22
|
const cameraRef = useRef<Camera>(null);
|
24
23
|
const isForeground = useIsForeground();
|
@@ -28,8 +27,6 @@ const FingerAuth = ({ testID, UID, onSuccess, isFocused, mock }: Props) => {
|
|
28
27
|
const dispatch = useDispatch();
|
29
28
|
const state = useSelector();
|
30
29
|
|
31
|
-
const containerCaptureStyled = [styles.containerCapture, { bottom: state.showButtonInfo ? 75 : 20 }];
|
32
|
-
|
33
30
|
useEffect(() => {
|
34
31
|
Orientation.lockToPortrait();
|
35
32
|
return () => {
|
@@ -59,12 +56,15 @@ const FingerAuth = ({ testID, UID, onSuccess, isFocused, mock }: Props) => {
|
|
59
56
|
|
60
57
|
useEffect(() => {
|
61
58
|
if (state.code === 0) {
|
62
|
-
dispatch.setModal(
|
59
|
+
dispatch.setModal(
|
60
|
+
"Identidade confirmada!",
|
61
|
+
"Sua identidade foi validada com sucesso. Você já pode acessar a aplicação."
|
62
|
+
);
|
63
63
|
onSuccess && onSuccess?.(state.code);
|
64
64
|
mock === true ? setTimeout(() => dispatch.handleLoading(), 2000) : dispatch.handleLoading();
|
65
65
|
}
|
66
66
|
if (state.code !== 0 && state.code !== null) {
|
67
|
-
dispatch.setModal("
|
67
|
+
dispatch.setModal("Digital não detectada!", `Erro: ${state.message}`);
|
68
68
|
dispatch.handleLoading();
|
69
69
|
}
|
70
70
|
dispatch.resetState();
|
@@ -94,10 +94,13 @@ const FingerAuth = ({ testID, UID, onSuccess, isFocused, mock }: Props) => {
|
|
94
94
|
return (
|
95
95
|
<GestureHandlerRootView style={styles.root}>
|
96
96
|
<GestureDetector gesture={gesture}>
|
97
|
-
<View style={styles.
|
97
|
+
<View style={styles.camera}>
|
98
|
+
<View style={styles.containerText}>
|
99
|
+
<Text style={styles.text}>Posicione o dedo indicador direito na marcação vermelha para acessar o app.</Text>
|
100
|
+
</View>
|
98
101
|
<Camera
|
99
102
|
ref={cameraRef}
|
100
|
-
style={
|
103
|
+
style={StyleSheet.absoluteFillObject}
|
101
104
|
isActive={isActive}
|
102
105
|
device={device}
|
103
106
|
format={cameraFormat}
|
@@ -110,11 +113,14 @@ const FingerAuth = ({ testID, UID, onSuccess, isFocused, mock }: Props) => {
|
|
110
113
|
<Gabarito />
|
111
114
|
</View>
|
112
115
|
</GestureDetector>
|
113
|
-
<View style={
|
114
|
-
<
|
116
|
+
<View style={styles.containerCapture}>
|
117
|
+
<HACaptureButton onPress={takePhoto} />
|
115
118
|
</View>
|
116
|
-
|
117
|
-
|
119
|
+
<HAModalMessage
|
120
|
+
isLoading={state.loading}
|
121
|
+
modal={state.modal}
|
122
|
+
messageLoading="Estamos validando a sua identidade."
|
123
|
+
/>
|
118
124
|
</GestureHandlerRootView>
|
119
125
|
);
|
120
126
|
};
|
@@ -1,26 +1,34 @@
|
|
1
|
-
import { StyleSheet
|
2
|
-
|
3
|
-
const { height } = Dimensions.get("window");
|
1
|
+
import { StyleSheet } from "react-native";
|
4
2
|
|
5
3
|
export const styles = StyleSheet.create({
|
6
|
-
container: {
|
7
|
-
flex: 1
|
8
|
-
},
|
9
4
|
root: {
|
10
5
|
flex: 1
|
11
6
|
},
|
12
|
-
|
7
|
+
camera: {
|
13
8
|
flex: 1,
|
14
9
|
justifyContent: "center"
|
15
10
|
},
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
containerText: {
|
12
|
+
position: "absolute",
|
13
|
+
top: 0,
|
14
|
+
width: "100%",
|
15
|
+
alignItems: "center",
|
16
|
+
zIndex: 99,
|
17
|
+
paddingVertical: 20,
|
18
|
+
gap: 20
|
19
|
+
},
|
20
|
+
text: {
|
21
|
+
color: "#ffffff",
|
22
|
+
fontSize: 20,
|
23
|
+
fontWeight: "600",
|
24
|
+
textAlign: "center",
|
25
|
+
paddingHorizontal: 20
|
19
26
|
},
|
20
27
|
containerCapture: {
|
21
28
|
position: "absolute",
|
22
29
|
width: "100%",
|
23
|
-
alignItems: "center"
|
30
|
+
alignItems: "center",
|
31
|
+
bottom: 20
|
24
32
|
},
|
25
33
|
cameraConfigs: {
|
26
34
|
alignItems: "center"
|