@ha_tecno/live-id-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +323 -0
  3. package/android/build.gradle +94 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +4 -0
  6. package/android/src/main/AndroidManifestNew.xml +2 -0
  7. package/android/src/main/java/com/liveidsdk/LiveIdSdkModule.kt +25 -0
  8. package/android/src/main/java/com/liveidsdk/LiveIdSdkPackage.kt +17 -0
  9. package/ios/LiveIdSdk-Bridging-Header.h +2 -0
  10. package/ios/LiveIdSdk.mm +14 -0
  11. package/ios/LiveIdSdk.swift +8 -0
  12. package/lib/commonjs/assets/arrow.png +0 -0
  13. package/lib/commonjs/assets/exampleInstructionWithBorder.jpeg +0 -0
  14. package/lib/commonjs/assets/exampleInstructionWithoutFinger.jpeg +0 -0
  15. package/lib/commonjs/assets/ic_redness_capture_tip.png +0 -0
  16. package/lib/commonjs/assets/logo.png +0 -0
  17. package/lib/commonjs/components/CameraConfigInfos/index.js +21 -0
  18. package/lib/commonjs/components/CameraConfigInfos/index.js.map +1 -0
  19. package/lib/commonjs/components/CameraConfigInfos/styles.js +19 -0
  20. package/lib/commonjs/components/CameraConfigInfos/styles.js.map +1 -0
  21. package/lib/commonjs/components/DeviceNullDisplay/index.js +59 -0
  22. package/lib/commonjs/components/DeviceNullDisplay/index.js.map +1 -0
  23. package/lib/commonjs/components/ErrorDisplay/index.js +59 -0
  24. package/lib/commonjs/components/ErrorDisplay/index.js.map +1 -0
  25. package/lib/commonjs/components/Gabarito/index.js +19 -0
  26. package/lib/commonjs/components/Gabarito/index.js.map +1 -0
  27. package/lib/commonjs/components/Gabarito/styles.js +30 -0
  28. package/lib/commonjs/components/Gabarito/styles.js.map +1 -0
  29. package/lib/commonjs/components/Toast/Toast.js +66 -0
  30. package/lib/commonjs/components/Toast/Toast.js.map +1 -0
  31. package/lib/commonjs/components/WaitingForResult/index.js +24 -0
  32. package/lib/commonjs/components/WaitingForResult/index.js.map +1 -0
  33. package/lib/commonjs/components/WaitingForResult/styles.js +32 -0
  34. package/lib/commonjs/components/WaitingForResult/styles.js.map +1 -0
  35. package/lib/commonjs/index.js +34 -0
  36. package/lib/commonjs/index.js.map +1 -0
  37. package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/index.js +49 -0
  38. package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/index.js.map +1 -0
  39. package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/styles.js +62 -0
  40. package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/styles.js.map +1 -0
  41. package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/index.js +298 -0
  42. package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/index.js.map +1 -0
  43. package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/styles.js +54 -0
  44. package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/styles.js.map +1 -0
  45. package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/index.js +44 -0
  46. package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/index.js.map +1 -0
  47. package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/styles.js +65 -0
  48. package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/styles.js.map +1 -0
  49. package/lib/commonjs/screens/CadastroFinger/index.js +50 -0
  50. package/lib/commonjs/screens/CadastroFinger/index.js.map +1 -0
  51. package/lib/commonjs/screens/CadastroScreen/CadastroScreen.js +186 -0
  52. package/lib/commonjs/screens/CadastroScreen/CadastroScreen.js.map +1 -0
  53. package/lib/commonjs/screens/ProvaVidas/index.js +246 -0
  54. package/lib/commonjs/screens/ProvaVidas/index.js.map +1 -0
  55. package/lib/commonjs/screens/ProvaVidas/styles.js +93 -0
  56. package/lib/commonjs/screens/ProvaVidas/styles.js.map +1 -0
  57. package/lib/commonjs/screens/ValidadeFinger/index.js +216 -0
  58. package/lib/commonjs/screens/ValidadeFinger/index.js.map +1 -0
  59. package/lib/commonjs/screens/ValidadeFinger/styles.js +54 -0
  60. package/lib/commonjs/screens/ValidadeFinger/styles.js.map +1 -0
  61. package/lib/commonjs/services/index.js +145 -0
  62. package/lib/commonjs/services/index.js.map +1 -0
  63. package/lib/commonjs/types/screen.js +2 -0
  64. package/lib/commonjs/types/screen.js.map +1 -0
  65. package/lib/commonjs/utils/file.js +38 -0
  66. package/lib/commonjs/utils/file.js.map +1 -0
  67. package/lib/commonjs/utils/getConfigCamera.js +25 -0
  68. package/lib/commonjs/utils/getConfigCamera.js.map +1 -0
  69. package/lib/commonjs/utils/index.js +14 -0
  70. package/lib/commonjs/utils/index.js.map +1 -0
  71. package/lib/module/assets/arrow.png +0 -0
  72. package/lib/module/assets/exampleInstructionWithBorder.jpeg +0 -0
  73. package/lib/module/assets/exampleInstructionWithoutFinger.jpeg +0 -0
  74. package/lib/module/assets/ic_redness_capture_tip.png +0 -0
  75. package/lib/module/assets/logo.png +0 -0
  76. package/lib/module/components/CameraConfigInfos/index.js +13 -0
  77. package/lib/module/components/CameraConfigInfos/index.js.map +1 -0
  78. package/lib/module/components/CameraConfigInfos/styles.js +13 -0
  79. package/lib/module/components/CameraConfigInfos/styles.js.map +1 -0
  80. package/lib/module/components/DeviceNullDisplay/index.js +51 -0
  81. package/lib/module/components/DeviceNullDisplay/index.js.map +1 -0
  82. package/lib/module/components/ErrorDisplay/index.js +51 -0
  83. package/lib/module/components/ErrorDisplay/index.js.map +1 -0
  84. package/lib/module/components/Gabarito/index.js +11 -0
  85. package/lib/module/components/Gabarito/index.js.map +1 -0
  86. package/lib/module/components/Gabarito/styles.js +24 -0
  87. package/lib/module/components/Gabarito/styles.js.map +1 -0
  88. package/lib/module/components/Toast/Toast.js +58 -0
  89. package/lib/module/components/Toast/Toast.js.map +1 -0
  90. package/lib/module/components/WaitingForResult/index.js +17 -0
  91. package/lib/module/components/WaitingForResult/index.js.map +1 -0
  92. package/lib/module/components/WaitingForResult/styles.js +26 -0
  93. package/lib/module/components/WaitingForResult/styles.js.map +1 -0
  94. package/lib/module/index.js +7 -0
  95. package/lib/module/index.js.map +1 -0
  96. package/lib/module/screens/CadastroFinger/components/AjudaCadastro/index.js +41 -0
  97. package/lib/module/screens/CadastroFinger/components/AjudaCadastro/index.js.map +1 -0
  98. package/lib/module/screens/CadastroFinger/components/AjudaCadastro/styles.js +56 -0
  99. package/lib/module/screens/CadastroFinger/components/AjudaCadastro/styles.js.map +1 -0
  100. package/lib/module/screens/CadastroFinger/components/CameraCadastro/index.js +288 -0
  101. package/lib/module/screens/CadastroFinger/components/CameraCadastro/index.js.map +1 -0
  102. package/lib/module/screens/CadastroFinger/components/CameraCadastro/styles.js +48 -0
  103. package/lib/module/screens/CadastroFinger/components/CameraCadastro/styles.js.map +1 -0
  104. package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/index.js +36 -0
  105. package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/index.js.map +1 -0
  106. package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/styles.js +59 -0
  107. package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/styles.js.map +1 -0
  108. package/lib/module/screens/CadastroFinger/index.js +42 -0
  109. package/lib/module/screens/CadastroFinger/index.js.map +1 -0
  110. package/lib/module/screens/CadastroScreen/CadastroScreen.js +177 -0
  111. package/lib/module/screens/CadastroScreen/CadastroScreen.js.map +1 -0
  112. package/lib/module/screens/ProvaVidas/index.js +239 -0
  113. package/lib/module/screens/ProvaVidas/index.js.map +1 -0
  114. package/lib/module/screens/ProvaVidas/styles.js +87 -0
  115. package/lib/module/screens/ProvaVidas/styles.js.map +1 -0
  116. package/lib/module/screens/ValidadeFinger/index.js +206 -0
  117. package/lib/module/screens/ValidadeFinger/index.js.map +1 -0
  118. package/lib/module/screens/ValidadeFinger/styles.js +48 -0
  119. package/lib/module/screens/ValidadeFinger/styles.js.map +1 -0
  120. package/lib/module/services/index.js +131 -0
  121. package/lib/module/services/index.js.map +1 -0
  122. package/lib/module/types/screen.js +2 -0
  123. package/lib/module/types/screen.js.map +1 -0
  124. package/lib/module/utils/file.js +29 -0
  125. package/lib/module/utils/file.js.map +1 -0
  126. package/lib/module/utils/getConfigCamera.js +19 -0
  127. package/lib/module/utils/getConfigCamera.js.map +1 -0
  128. package/lib/module/utils/index.js +3 -0
  129. package/lib/module/utils/index.js.map +1 -0
  130. package/lib/typescript/src/components/CameraConfigInfos/index.d.ts +9 -0
  131. package/lib/typescript/src/components/CameraConfigInfos/index.d.ts.map +1 -0
  132. package/lib/typescript/src/components/CameraConfigInfos/styles.d.ts +11 -0
  133. package/lib/typescript/src/components/CameraConfigInfos/styles.d.ts.map +1 -0
  134. package/lib/typescript/src/components/DeviceNullDisplay/index.d.ts +11 -0
  135. package/lib/typescript/src/components/DeviceNullDisplay/index.d.ts.map +1 -0
  136. package/lib/typescript/src/components/ErrorDisplay/index.d.ts +11 -0
  137. package/lib/typescript/src/components/ErrorDisplay/index.d.ts.map +1 -0
  138. package/lib/typescript/src/components/Gabarito/index.d.ts +3 -0
  139. package/lib/typescript/src/components/Gabarito/index.d.ts.map +1 -0
  140. package/lib/typescript/src/components/Gabarito/styles.d.ts +21 -0
  141. package/lib/typescript/src/components/Gabarito/styles.d.ts.map +1 -0
  142. package/lib/typescript/src/components/Toast/Toast.d.ts +42 -0
  143. package/lib/typescript/src/components/Toast/Toast.d.ts.map +1 -0
  144. package/lib/typescript/src/components/WaitingForResult/index.d.ts +7 -0
  145. package/lib/typescript/src/components/WaitingForResult/index.d.ts.map +1 -0
  146. package/lib/typescript/src/components/WaitingForResult/styles.d.ts +24 -0
  147. package/lib/typescript/src/components/WaitingForResult/styles.d.ts.map +1 -0
  148. package/lib/typescript/src/index.d.ts +5 -0
  149. package/lib/typescript/src/index.d.ts.map +1 -0
  150. package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/index.d.ts +7 -0
  151. package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/index.d.ts.map +1 -0
  152. package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/styles.d.ts +55 -0
  153. package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/styles.d.ts.map +1 -0
  154. package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/index.d.ts +16 -0
  155. package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/index.d.ts.map +1 -0
  156. package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/styles.d.ts +44 -0
  157. package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/styles.d.ts.map +1 -0
  158. package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/index.d.ts +12 -0
  159. package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/index.d.ts.map +1 -0
  160. package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.d.ts +54 -0
  161. package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.d.ts.map +1 -0
  162. package/lib/typescript/src/screens/CadastroFinger/index.d.ts +16 -0
  163. package/lib/typescript/src/screens/CadastroFinger/index.d.ts.map +1 -0
  164. package/lib/typescript/src/screens/CadastroScreen/CadastroScreen.d.ts +14 -0
  165. package/lib/typescript/src/screens/CadastroScreen/CadastroScreen.d.ts.map +1 -0
  166. package/lib/typescript/src/screens/ProvaVidas/index.d.ts +14 -0
  167. package/lib/typescript/src/screens/ProvaVidas/index.d.ts.map +1 -0
  168. package/lib/typescript/src/screens/ProvaVidas/styles.d.ts +85 -0
  169. package/lib/typescript/src/screens/ProvaVidas/styles.d.ts.map +1 -0
  170. package/lib/typescript/src/screens/ValidadeFinger/index.d.ts +14 -0
  171. package/lib/typescript/src/screens/ValidadeFinger/index.d.ts.map +1 -0
  172. package/lib/typescript/src/screens/ValidadeFinger/styles.d.ts +44 -0
  173. package/lib/typescript/src/screens/ValidadeFinger/styles.d.ts.map +1 -0
  174. package/lib/typescript/src/services/index.d.ts +21 -0
  175. package/lib/typescript/src/services/index.d.ts.map +1 -0
  176. package/lib/typescript/src/types/screen.d.ts +6 -0
  177. package/lib/typescript/src/types/screen.d.ts.map +1 -0
  178. package/lib/typescript/src/utils/file.d.ts +3 -0
  179. package/lib/typescript/src/utils/file.d.ts.map +1 -0
  180. package/lib/typescript/src/utils/getConfigCamera.d.ts +14 -0
  181. package/lib/typescript/src/utils/getConfigCamera.d.ts.map +1 -0
  182. package/lib/typescript/src/utils/index.d.ts +3 -0
  183. package/lib/typescript/src/utils/index.d.ts.map +1 -0
  184. package/live-id-sdk.podspec +41 -0
  185. package/package.json +184 -0
  186. package/src/assets/arrow.png +0 -0
  187. package/src/assets/exampleInstructionWithBorder.jpeg +0 -0
  188. package/src/assets/exampleInstructionWithoutFinger.jpeg +0 -0
  189. package/src/assets/ic_redness_capture_tip.png +0 -0
  190. package/src/assets/logo.png +0 -0
  191. package/src/components/CameraConfigInfos/index.tsx +25 -0
  192. package/src/components/CameraConfigInfos/styles.ts +13 -0
  193. package/src/components/DeviceNullDisplay/index.tsx +59 -0
  194. package/src/components/ErrorDisplay/index.tsx +60 -0
  195. package/src/components/Gabarito/index.tsx +11 -0
  196. package/src/components/Gabarito/styles.ts +23 -0
  197. package/src/components/Toast/Toast.tsx +61 -0
  198. package/src/components/WaitingForResult/index.tsx +22 -0
  199. package/src/components/WaitingForResult/styles.ts +27 -0
  200. package/src/index.tsx +6 -0
  201. package/src/screens/CadastroFinger/components/AjudaCadastro/index.tsx +49 -0
  202. package/src/screens/CadastroFinger/components/AjudaCadastro/styles.ts +56 -0
  203. package/src/screens/CadastroFinger/components/CameraCadastro/index.tsx +356 -0
  204. package/src/screens/CadastroFinger/components/CameraCadastro/styles.ts +47 -0
  205. package/src/screens/CadastroFinger/components/ImageDisplayScreen/index.tsx +45 -0
  206. package/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.ts +55 -0
  207. package/src/screens/CadastroFinger/index.tsx +56 -0
  208. package/src/screens/CadastroScreen/CadastroScreen.tsx +212 -0
  209. package/src/screens/ProvaVidas/index.tsx +308 -0
  210. package/src/screens/ProvaVidas/styles.ts +99 -0
  211. package/src/screens/ValidadeFinger/index.tsx +263 -0
  212. package/src/screens/ValidadeFinger/styles.ts +47 -0
  213. package/src/services/index.ts +143 -0
  214. package/src/types/screen.ts +5 -0
  215. package/src/utils/file.ts +30 -0
  216. package/src/utils/getConfigCamera.ts +45 -0
  217. package/src/utils/index.ts +3 -0
package/package.json ADDED
@@ -0,0 +1,184 @@
1
+ {
2
+ "name": "@ha_tecno/live-id-sdk",
3
+ "version": "1.0.0",
4
+ "description": "React Native SDK for Live ID",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/src/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "*.podspec",
17
+ "!ios/build",
18
+ "!android/build",
19
+ "!android/gradle",
20
+ "!android/gradlew",
21
+ "!android/gradlew.bat",
22
+ "!android/local.properties",
23
+ "!**/__tests__",
24
+ "!**/__fixtures__",
25
+ "!**/__mocks__",
26
+ "!**/.*"
27
+ ],
28
+ "scripts": {
29
+ "example": "yarn workspace react-native-live-id-sdk-example",
30
+ "test": "jest",
31
+ "typecheck": "tsc --noEmit",
32
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
34
+ "prepare": "bob build",
35
+ "release": "release-it"
36
+ },
37
+ "keywords": [
38
+ "react-native",
39
+ "ios",
40
+ "android"
41
+ ],
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://bitbucket.org/Hsergio45/liveid-sdk.git"
45
+ },
46
+ "author": "Gustavo Bacellar, Ewerton Vinicius Turco",
47
+ "license": "MIT",
48
+ "homepage": "https://bitbucket.org/Hsergio45/liveid-sdk/src/main/README.md",
49
+ "publishConfig": {
50
+ "registry": "https://registry.npmjs.org/"
51
+ },
52
+ "devDependencies": {
53
+ "@commitlint/config-conventional": "^17.0.2",
54
+ "@evilmartians/lefthook": "^1.5.0",
55
+ "@react-native/eslint-config": "^0.72.2",
56
+ "@release-it/conventional-changelog": "^5.0.0",
57
+ "@types/jest": "^28.1.2",
58
+ "@types/react": "~17.0.21",
59
+ "@types/react-native": "0.70.0",
60
+ "commitlint": "^17.0.2",
61
+ "del-cli": "^5.0.0",
62
+ "eslint": "^8.4.1",
63
+ "eslint-config-prettier": "^8.5.0",
64
+ "eslint-plugin-prettier": "^4.0.0",
65
+ "jest": "^28.1.1",
66
+ "pod-install": "^0.1.0",
67
+ "prettier": "^2.0.5",
68
+ "react": "18.2.0",
69
+ "react-native": "0.72.7",
70
+ "react-native-builder-bob": "^0.20.0",
71
+ "release-it": "^15.0.0",
72
+ "turbo": "^1.10.7",
73
+ "typescript": "^5.3.3"
74
+ },
75
+ "resolutions": {
76
+ "@types/react": "17.0.21"
77
+ },
78
+ "peerDependencies": {
79
+ "react": "*",
80
+ "react-native": "*",
81
+ "react-native-fs": "^2.20.0",
82
+ "react-native-modal": "^13.0.1",
83
+ "react-native-responsive-fontsize": "^0.5.1"
84
+ },
85
+ "workspaces": [
86
+ "example"
87
+ ],
88
+ "packageManager": "yarn@3.6.1",
89
+ "engines": {
90
+ "node": ">= 18.0.0"
91
+ },
92
+ "jest": {
93
+ "preset": "react-native",
94
+ "modulePathIgnorePatterns": [
95
+ "<rootDir>/example/node_modules",
96
+ "<rootDir>/lib/"
97
+ ]
98
+ },
99
+ "commitlint": {
100
+ "extends": [
101
+ "@commitlint/config-conventional"
102
+ ]
103
+ },
104
+ "release-it": {
105
+ "git": {
106
+ "commitMessage": "chore: release ${version}",
107
+ "tagName": "v${version}"
108
+ },
109
+ "npm": {
110
+ "publish": true
111
+ },
112
+ "github": {
113
+ "release": true
114
+ },
115
+ "plugins": {
116
+ "@release-it/conventional-changelog": {
117
+ "preset": "angular"
118
+ }
119
+ }
120
+ },
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
+ "react-native-builder-bob": {
152
+ "source": "src",
153
+ "output": "lib",
154
+ "targets": [
155
+ "commonjs",
156
+ "module",
157
+ [
158
+ "typescript",
159
+ {
160
+ "project": "tsconfig.build.json"
161
+ }
162
+ ]
163
+ ]
164
+ },
165
+ "dependencies": {
166
+ "axios": "^1.6.8",
167
+ "firebase": "^10.7.2",
168
+ "react-native-device-info": "^10.13.1",
169
+ "react-native-fs": "^2.20.0",
170
+ "react-native-gesture-handler": "^2.14.1",
171
+ "react-native-modal": "^13.0.1",
172
+ "react-native-orientation-locker": "^1.6.0",
173
+ "react-native-reanimated": "^3.6.1",
174
+ "react-native-responsive-fontsize": "^0.5.1",
175
+ "react-native-vision-camera": "^3.8.2"
176
+ },
177
+ "bugs": {
178
+ "url": "https://bitbucket.org/Hsergio45/liveid-sdk/issues"
179
+ },
180
+ "directories": {
181
+ "example": "example",
182
+ "lib": "lib"
183
+ }
184
+ }
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { Text } from 'react-native';
3
+ import { styles } from './styles';
4
+
5
+ type Props = {
6
+ exposure?: number;
7
+ zoom?: number;
8
+ showButtonInfo?: boolean;
9
+ };
10
+
11
+ export const CameraConfigInfos = ({
12
+ exposure,
13
+ zoom,
14
+ showButtonInfo,
15
+ }: Props) => {
16
+ return (
17
+ <>
18
+ {showButtonInfo ? (
19
+ <Text style={styles.text}>
20
+ Exposição: {exposure} | Zoom: {zoom}
21
+ </Text>
22
+ ) : null}
23
+ </>
24
+ );
25
+ };
@@ -0,0 +1,13 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import { RFValue } from 'react-native-responsive-fontsize';
3
+
4
+ export const styles = StyleSheet.create({
5
+ text: {
6
+ fontSize: 18,
7
+ fontWeight: '500',
8
+ color: '#fff',
9
+ textAlign: 'center',
10
+ width: RFValue(300),
11
+ marginBottom: RFValue(20),
12
+ },
13
+ });
@@ -0,0 +1,59 @@
1
+ import React from 'react';
2
+ import { View, Text, Button, StyleSheet } from 'react-native';
3
+ import Modal, { type ModalProps } from 'react-native-modal';
4
+
5
+ interface DeviceNullDisplayProps {
6
+ isVisible: boolean;
7
+ modalParams?: ModalProps;
8
+ onCloseModalHandler: () => void;
9
+ requestCameraPermission: () => void;
10
+ }
11
+
12
+ export const DeviceNullDisplay: React.FC<DeviceNullDisplayProps> = ({
13
+ isVisible,
14
+ onCloseModalHandler,
15
+ requestCameraPermission,
16
+ ...modalParams
17
+ }) => {
18
+ return (
19
+ <Modal
20
+ style={styles.modal}
21
+ isVisible={isVisible}
22
+ swipeDirection="down"
23
+ propagateSwipe={true}
24
+ onSwipeComplete={onCloseModalHandler}
25
+ {...modalParams}
26
+ >
27
+ <View style={styles.container}>
28
+ <Text style={styles.errorText}>
29
+ O dispositivo não possui camera ou não foi possivel acessar a camera !
30
+ </Text>
31
+ <View style={styles.buttonContainer}>
32
+ <Button title="Fechar Camera" onPress={onCloseModalHandler} />
33
+ </View>
34
+ <Button title="Tentar novamente" onPress={requestCameraPermission} />
35
+ </View>
36
+ </Modal>
37
+ );
38
+ };
39
+
40
+ const styles = StyleSheet.create({
41
+ modal: {
42
+ margin: 0,
43
+ },
44
+ container: {
45
+ flex: 1,
46
+ alignItems: 'center',
47
+ justifyContent: 'center',
48
+ backgroundColor: 'white',
49
+ },
50
+ errorText: {
51
+ color: 'black',
52
+ fontWeight: 'bold',
53
+ fontSize: 20,
54
+ marginBottom: 16,
55
+ },
56
+ buttonContainer: {
57
+ marginBottom: 16,
58
+ },
59
+ });
@@ -0,0 +1,60 @@
1
+ import React from 'react';
2
+ import { View, Text, Button, StyleSheet } from 'react-native';
3
+ import Modal, { type ModalProps } from 'react-native-modal';
4
+
5
+ interface ErrorDisplayProps {
6
+ isVisible: boolean;
7
+ modalParams?: ModalProps;
8
+ onCloseModalHandler: () => void;
9
+ requestCameraPermission: () => void;
10
+ }
11
+
12
+ export const ErrorDisplay: React.FC<ErrorDisplayProps> = ({
13
+ isVisible,
14
+ onCloseModalHandler,
15
+ requestCameraPermission,
16
+ ...modalParams
17
+ }) => {
18
+ return (
19
+ <Modal
20
+ style={styles.modal}
21
+ isVisible={isVisible}
22
+ swipeDirection="down"
23
+ propagateSwipe={true}
24
+ onSwipeComplete={onCloseModalHandler}
25
+ {...modalParams}
26
+ >
27
+ <View style={styles.container}>
28
+ <Text style={styles.errorText}>
29
+ Ocorreu um erro ao tentar acessar o dispositivo! Você deve passar o id
30
+ do usuário para validar a digital.
31
+ </Text>
32
+ <View style={styles.buttonContainer}>
33
+ <Button title="Fechar Camera" onPress={onCloseModalHandler} />
34
+ </View>
35
+ <Button title="Tentar novamente" onPress={requestCameraPermission} />
36
+ </View>
37
+ </Modal>
38
+ );
39
+ };
40
+
41
+ const styles = StyleSheet.create({
42
+ modal: {
43
+ margin: 0,
44
+ },
45
+ container: {
46
+ flex: 1,
47
+ alignItems: 'center',
48
+ justifyContent: 'center',
49
+ backgroundColor: 'white',
50
+ },
51
+ errorText: {
52
+ color: 'black',
53
+ fontWeight: 'bold',
54
+ fontSize: 20,
55
+ marginBottom: 16,
56
+ },
57
+ buttonContainer: {
58
+ marginBottom: 16,
59
+ },
60
+ });
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import { styles } from './styles';
4
+
5
+ export const Gabarito = () => {
6
+ return (
7
+ <View style={styles.container}>
8
+ <View style={styles.gabarito} />
9
+ </View>
10
+ );
11
+ };
@@ -0,0 +1,23 @@
1
+ import { StyleSheet, Dimensions } from 'react-native';
2
+
3
+ const width = Dimensions.get('window').width;
4
+ const height = Dimensions.get('window').height;
5
+
6
+ export const styles = StyleSheet.create({
7
+ container: {
8
+ justifyContent: 'center',
9
+ alignSelf: 'center',
10
+ position: `absolute`,
11
+ marginTop: '50%',
12
+ },
13
+ gabarito: {
14
+ width: width * 0.5,
15
+ height: height * 0.3,
16
+ borderWidth: 3,
17
+ borderColor: 'red',
18
+ marginLeft: '15%',
19
+ borderTopLeftRadius: 125,
20
+ borderBottomLeftRadius: 125,
21
+ transform: [{ scaleX: 2 }],
22
+ },
23
+ });
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import { View, Modal, Text, StyleSheet, TouchableOpacity } from 'react-native';
3
+
4
+ interface ToastProps {
5
+ isVisible: boolean;
6
+ message: string;
7
+ onClose: () => void;
8
+ }
9
+
10
+ export const Toast: React.FC<ToastProps> = ({
11
+ isVisible,
12
+ message,
13
+ onClose,
14
+ }) => {
15
+ return (
16
+ <Modal transparent visible={isVisible} onRequestClose={onClose}>
17
+ <View style={styles.modalContainer}>
18
+ <View style={styles.modalCard}>
19
+ <Text style={styles.messageText}>{message}</Text>
20
+ <TouchableOpacity style={styles.closeButton} onPress={onClose}>
21
+ <Text style={styles.closeButtonText}>Fechar</Text>
22
+ </TouchableOpacity>
23
+ </View>
24
+ </View>
25
+ </Modal>
26
+ );
27
+ };
28
+
29
+ export const styles = StyleSheet.create({
30
+ modalContainer: {
31
+ flex: 1,
32
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
33
+ justifyContent: 'center',
34
+ alignItems: 'center',
35
+ zIndex: 999,
36
+ },
37
+ modalCard: {
38
+ backgroundColor: 'white',
39
+ padding: 16,
40
+ borderRadius: 8,
41
+ width: '80%',
42
+ alignItems: 'center',
43
+ },
44
+ messageText: {
45
+ fontSize: 18,
46
+ marginBottom: 16,
47
+ textAlign: 'center',
48
+ color: '#333',
49
+ },
50
+ closeButton: {
51
+ marginTop: 8,
52
+ backgroundColor: '#ccc',
53
+ padding: 8,
54
+ borderRadius: 4,
55
+ },
56
+ closeButtonText: {
57
+ color: 'white',
58
+ fontWeight: 'bold',
59
+ textAlign: 'center',
60
+ },
61
+ });
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { View, Text } from 'react-native';
3
+ import { styles } from './styles';
4
+ import { TouchableWithoutFeedback } from 'react-native';
5
+
6
+ interface WaitingForResultProps {
7
+ onPress?: () => void;
8
+ }
9
+
10
+ export const WaitingForResult: React.FC<WaitingForResultProps> = ({
11
+ onPress,
12
+ }) => {
13
+ return (
14
+ <TouchableWithoutFeedback onPress={onPress} style={styles.flexi}>
15
+ <View style={styles.overlay}>
16
+ <Text style={styles.textOverlay}>
17
+ Você já pode retirar o dedo da tela, aguarde o resultado.
18
+ </Text>
19
+ </View>
20
+ </TouchableWithoutFeedback>
21
+ );
22
+ };
@@ -0,0 +1,27 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import { RFValue } from 'react-native-responsive-fontsize';
3
+
4
+ export const styles = StyleSheet.create({
5
+ flexi: {
6
+ flex: 1,
7
+ },
8
+ overlay: {
9
+ zIndex: 2,
10
+ flex: 1,
11
+ height: '100%',
12
+ width: '100%',
13
+ backgroundColor: `rgba(44, 45, 46, 0.5)`,
14
+ alignItems: `center`,
15
+ justifyContent: `center`,
16
+ position: `absolute`,
17
+ },
18
+
19
+ textOverlay: {
20
+ fontSize: RFValue(18),
21
+ fontWeight: `500`,
22
+ color: `#fff`,
23
+ textAlign: `center`,
24
+ width: RFValue(300),
25
+ marginBottom: RFValue(20),
26
+ },
27
+ });
package/src/index.tsx ADDED
@@ -0,0 +1,6 @@
1
+ export { ValidaFinger } from './screens/ValidadeFinger';
2
+
3
+ // deprecated
4
+ export { CameraProvaVidas } from './screens/ProvaVidas';
5
+ export { CadastroFinger } from './screens/CadastroFinger';
6
+ export { CadastroScreen } from './screens/CadastroScreen/CadastroScreen';
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import { View, Image, Text, TouchableOpacity } from 'react-native';
3
+ import { styles } from './styles';
4
+
5
+ type AjudaCadastroProps = {
6
+ handleProximaTela: () => void;
7
+ };
8
+
9
+ export const AjudaCadastro = ({ handleProximaTela }: AjudaCadastroProps) => {
10
+ return (
11
+ <View style={styles.container}>
12
+ <View style={styles.content}>
13
+ <Text style={styles.title}>Instruções da Captura</Text>
14
+ <Text style={styles.text}>
15
+ 1. Para cadastrar sua digital, escolha um fundo neutro {`\n`}
16
+ ex: folha de papel branca ou parede lisa
17
+ </Text>
18
+ <Image
19
+ source={require('../../../../assets/exampleInstructionWithoutFinger.jpeg')}
20
+ style={styles.image}
21
+ resizeMode="stretch"
22
+ />
23
+ <Text style={styles.text}>
24
+ 2. Posicione o dedo dentro do marcação indicada na tela
25
+ </Text>
26
+ <View style={styles.containerImages}>
27
+ <Image
28
+ source={require('../../../../assets/arrow.png')}
29
+ style={styles.arrow}
30
+ resizeMode="center"
31
+ />
32
+ <Image
33
+ source={require('../../../../assets/exampleInstructionWithBorder.jpeg')}
34
+ style={styles.image}
35
+ resizeMode="contain"
36
+ />
37
+ </View>
38
+ <Text style={styles.text}>3. Clique em "Tirar Foto" e aguarde.</Text>
39
+ <TouchableOpacity
40
+ onPress={handleProximaTela}
41
+ style={styles.button}
42
+ activeOpacity={0.5}
43
+ >
44
+ <Text style={styles.textButton}>Ir para captura</Text>
45
+ </TouchableOpacity>
46
+ </View>
47
+ </View>
48
+ );
49
+ };
@@ -0,0 +1,56 @@
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
+ gap: 10,
9
+ },
10
+ containerImages: {
11
+ justifyContent: 'center',
12
+ },
13
+ image: {
14
+ width: 150,
15
+ height: 150,
16
+ alignSelf: 'center',
17
+ borderRadius: 15,
18
+ },
19
+ arrow: {
20
+ position: 'absolute',
21
+ width: 50,
22
+ height: 50,
23
+ marginHorizontal: 32,
24
+ },
25
+ content: {
26
+ marginVertical: 10,
27
+ marginHorizontal: 20,
28
+ gap: 10,
29
+ },
30
+ title: {
31
+ alignSelf: 'center',
32
+ fontSize: 22,
33
+ fontWeight: 'bold',
34
+ marginVertical: 10,
35
+ color: '#000',
36
+ },
37
+ text: {
38
+ fontSize: 18,
39
+ textAlign: 'center',
40
+ fontWeight: Platform.OS === 'ios' ? '300' : 'normal',
41
+ marginVertical: 10,
42
+ color: '#000',
43
+ },
44
+ button: {
45
+ width: '100%',
46
+ alignItems: 'center',
47
+ marginTop: 20,
48
+ padding: 12,
49
+ borderRadius: 10,
50
+ backgroundColor: '#3652AD',
51
+ },
52
+ textButton: {
53
+ fontSize: 18,
54
+ color: '#fff',
55
+ },
56
+ });