@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.
Files changed (429) hide show
  1. package/android/build.gradle +4 -0
  2. package/lib/commonjs/components/{WaitingForResult → CameraConfigInfo}/index.js +9 -11
  3. package/lib/commonjs/components/CameraConfigInfo/index.js.map +1 -0
  4. package/lib/commonjs/components/CameraConfigInfo/styles.js +20 -0
  5. package/lib/commonjs/components/CameraConfigInfo/styles.js.map +1 -0
  6. package/lib/commonjs/components/CaptureButton/index.js +88 -0
  7. package/lib/commonjs/components/CaptureButton/index.js.map +1 -0
  8. package/lib/commonjs/components/CaptureButton/styles.js +22 -0
  9. package/lib/commonjs/components/CaptureButton/styles.js.map +1 -0
  10. package/lib/commonjs/components/Gabarito/index.js +2 -2
  11. package/lib/commonjs/components/Gabarito/index.js.map +1 -1
  12. package/lib/commonjs/components/Gabarito/styles.js +10 -11
  13. package/lib/commonjs/components/Gabarito/styles.js.map +1 -1
  14. package/lib/commonjs/components/HelpRegister/index.js +51 -0
  15. package/lib/commonjs/components/HelpRegister/index.js.map +1 -0
  16. package/lib/commonjs/{screens/CadastroFinger/components/AjudaCadastro → components/HelpRegister}/styles.js +17 -20
  17. package/lib/commonjs/components/HelpRegister/styles.js.map +1 -0
  18. package/lib/commonjs/components/Toast/Toast.js +12 -12
  19. package/lib/commonjs/components/Toast/Toast.js.map +1 -1
  20. package/lib/commonjs/components/deviceNotFound/deviceNotFound.js +27 -0
  21. package/lib/commonjs/components/deviceNotFound/deviceNotFound.js.map +1 -0
  22. package/lib/commonjs/components/deviceNotFound/styles.js +36 -0
  23. package/lib/commonjs/components/deviceNotFound/styles.js.map +1 -0
  24. package/lib/commonjs/components/icon/icon.js +22 -0
  25. package/lib/commonjs/components/icon/icon.js.map +1 -0
  26. package/lib/commonjs/components/index.js +56 -0
  27. package/lib/commonjs/components/index.js.map +1 -0
  28. package/lib/commonjs/components/modalMessage/modalMessage.js +63 -0
  29. package/lib/commonjs/components/modalMessage/modalMessage.js.map +1 -0
  30. package/lib/commonjs/components/modalMessage/styles.js +51 -0
  31. package/lib/commonjs/components/modalMessage/styles.js.map +1 -0
  32. package/lib/commonjs/components/recordButton/recordButton.js +83 -0
  33. package/lib/commonjs/components/recordButton/recordButton.js.map +1 -0
  34. package/lib/commonjs/components/recordButton/styles.js +21 -0
  35. package/lib/commonjs/components/recordButton/styles.js.map +1 -0
  36. package/lib/commonjs/index.js +9 -11
  37. package/lib/commonjs/index.js.map +1 -1
  38. package/lib/commonjs/screens/CadastroScreen/CadastroScreen.js +29 -29
  39. package/lib/commonjs/screens/CadastroScreen/CadastroScreen.js.map +1 -1
  40. package/lib/commonjs/screens/FingerAuth/FingerAuth.js +128 -0
  41. package/lib/commonjs/screens/FingerAuth/FingerAuth.js.map +1 -0
  42. package/lib/commonjs/screens/FingerAuth/styles.js +35 -0
  43. package/lib/commonjs/screens/FingerAuth/styles.js.map +1 -0
  44. package/lib/commonjs/screens/FingerRegister/index.js +138 -0
  45. package/lib/commonjs/screens/FingerRegister/index.js.map +1 -0
  46. package/lib/commonjs/screens/FingerRegister/styles.js +35 -0
  47. package/lib/commonjs/screens/FingerRegister/styles.js.map +1 -0
  48. package/lib/commonjs/screens/LifeCertificate/index.js +145 -0
  49. package/lib/commonjs/screens/LifeCertificate/index.js.map +1 -0
  50. package/lib/commonjs/screens/LifeCertificate/styles.js +27 -0
  51. package/lib/commonjs/screens/LifeCertificate/styles.js.map +1 -0
  52. package/lib/commonjs/screens/index.js +28 -0
  53. package/lib/commonjs/screens/index.js.map +1 -0
  54. package/lib/commonjs/services/index.js +35 -101
  55. package/lib/commonjs/services/index.js.map +1 -1
  56. package/lib/commonjs/services/services.js +134 -0
  57. package/lib/commonjs/services/services.js.map +1 -0
  58. package/lib/commonjs/services/types.js +2 -0
  59. package/lib/commonjs/{types/screen.js.map → services/types.js.map} +1 -1
  60. package/lib/commonjs/store/createSelectors.js +16 -0
  61. package/lib/commonjs/store/createSelectors.js.map +1 -0
  62. package/lib/commonjs/store/modules/fingerAuth/index.js +19 -0
  63. package/lib/commonjs/store/modules/fingerAuth/index.js.map +1 -0
  64. package/lib/commonjs/store/modules/fingerAuth/selectors.js +13 -0
  65. package/lib/commonjs/store/modules/fingerAuth/selectors.js.map +1 -0
  66. package/lib/commonjs/store/modules/fingerAuth/slice.js +92 -0
  67. package/lib/commonjs/store/modules/fingerAuth/slice.js.map +1 -0
  68. package/lib/commonjs/store/modules/fingerAuth/type.js +2 -0
  69. package/lib/commonjs/store/modules/fingerAuth/type.js.map +1 -0
  70. package/lib/commonjs/store/modules/fingerRegister/index.js +19 -0
  71. package/lib/commonjs/store/modules/fingerRegister/index.js.map +1 -0
  72. package/lib/commonjs/store/modules/fingerRegister/selectors.js +13 -0
  73. package/lib/commonjs/store/modules/fingerRegister/selectors.js.map +1 -0
  74. package/lib/commonjs/store/modules/fingerRegister/slice.js +101 -0
  75. package/lib/commonjs/store/modules/fingerRegister/slice.js.map +1 -0
  76. package/lib/commonjs/store/modules/fingerRegister/types.js +2 -0
  77. package/lib/commonjs/store/modules/fingerRegister/types.js.map +1 -0
  78. package/lib/commonjs/store/modules/lifeCertificate/index.js +19 -0
  79. package/lib/commonjs/store/modules/lifeCertificate/index.js.map +1 -0
  80. package/lib/commonjs/store/modules/lifeCertificate/selectors.js +13 -0
  81. package/lib/commonjs/store/modules/lifeCertificate/selectors.js.map +1 -0
  82. package/lib/commonjs/store/modules/lifeCertificate/slice.js +101 -0
  83. package/lib/commonjs/store/modules/lifeCertificate/slice.js.map +1 -0
  84. package/lib/commonjs/store/modules/lifeCertificate/types.js +6 -0
  85. package/lib/commonjs/store/modules/lifeCertificate/types.js.map +1 -0
  86. package/lib/commonjs/utils/file.js +2 -2
  87. package/lib/commonjs/utils/getConfigCamera.js +1 -1
  88. package/lib/commonjs/utils/getConfigCamera.js.map +1 -1
  89. package/lib/module/components/CameraConfigInfo/index.js +15 -0
  90. package/lib/module/components/CameraConfigInfo/index.js.map +1 -0
  91. package/lib/module/components/CameraConfigInfo/styles.js +14 -0
  92. package/lib/module/components/CameraConfigInfo/styles.js.map +1 -0
  93. package/lib/module/components/CaptureButton/index.js +79 -0
  94. package/lib/module/components/CaptureButton/index.js.map +1 -0
  95. package/lib/module/components/CaptureButton/styles.js +16 -0
  96. package/lib/module/components/CaptureButton/styles.js.map +1 -0
  97. package/lib/module/components/Gabarito/index.js +5 -4
  98. package/lib/module/components/Gabarito/index.js.map +1 -1
  99. package/lib/module/components/Gabarito/styles.js +11 -12
  100. package/lib/module/components/Gabarito/styles.js.map +1 -1
  101. package/lib/module/{screens/CadastroFinger/components/AjudaCadastro → components/HelpRegister}/index.js +17 -15
  102. package/lib/module/components/HelpRegister/index.js.map +1 -0
  103. package/lib/module/components/HelpRegister/styles.js +53 -0
  104. package/lib/module/components/HelpRegister/styles.js.map +1 -0
  105. package/lib/module/components/Toast/Toast.js +14 -14
  106. package/lib/module/components/Toast/Toast.js.map +1 -1
  107. package/lib/module/components/deviceNotFound/deviceNotFound.js +20 -0
  108. package/lib/module/components/deviceNotFound/deviceNotFound.js.map +1 -0
  109. package/lib/module/components/deviceNotFound/styles.js +30 -0
  110. package/lib/module/components/deviceNotFound/styles.js.map +1 -0
  111. package/lib/module/components/icon/icon.js +15 -0
  112. package/lib/module/components/icon/icon.js.map +1 -0
  113. package/lib/module/components/index.js +9 -0
  114. package/lib/module/components/index.js.map +1 -0
  115. package/lib/module/components/modalMessage/modalMessage.js +54 -0
  116. package/lib/module/components/modalMessage/modalMessage.js.map +1 -0
  117. package/lib/module/components/modalMessage/styles.js +45 -0
  118. package/lib/module/components/modalMessage/styles.js.map +1 -0
  119. package/lib/module/components/recordButton/recordButton.js +74 -0
  120. package/lib/module/components/recordButton/recordButton.js.map +1 -0
  121. package/lib/module/components/recordButton/styles.js +15 -0
  122. package/lib/module/components/recordButton/styles.js.map +1 -0
  123. package/lib/module/index.js +4 -4
  124. package/lib/module/index.js.map +1 -1
  125. package/lib/module/screens/CadastroScreen/CadastroScreen.js +33 -33
  126. package/lib/module/screens/CadastroScreen/CadastroScreen.js.map +1 -1
  127. package/lib/module/screens/FingerAuth/FingerAuth.js +119 -0
  128. package/lib/module/screens/FingerAuth/FingerAuth.js.map +1 -0
  129. package/lib/module/screens/FingerAuth/styles.js +29 -0
  130. package/lib/module/screens/FingerAuth/styles.js.map +1 -0
  131. package/lib/module/screens/FingerRegister/index.js +129 -0
  132. package/lib/module/screens/FingerRegister/index.js.map +1 -0
  133. package/lib/module/screens/FingerRegister/styles.js +29 -0
  134. package/lib/module/screens/FingerRegister/styles.js.map +1 -0
  135. package/lib/module/screens/LifeCertificate/index.js +136 -0
  136. package/lib/module/screens/LifeCertificate/index.js.map +1 -0
  137. package/lib/module/screens/LifeCertificate/styles.js +21 -0
  138. package/lib/module/screens/LifeCertificate/styles.js.map +1 -0
  139. package/lib/module/screens/index.js +5 -0
  140. package/lib/module/screens/index.js.map +1 -0
  141. package/lib/module/services/index.js +9 -95
  142. package/lib/module/services/index.js.map +1 -1
  143. package/lib/module/services/services.js +123 -0
  144. package/lib/module/services/services.js.map +1 -0
  145. package/lib/module/services/types.js +2 -0
  146. package/lib/module/{types/screen.js.map → services/types.js.map} +1 -1
  147. package/lib/module/store/createSelectors.js +10 -0
  148. package/lib/module/store/createSelectors.js.map +1 -0
  149. package/lib/module/store/modules/fingerAuth/index.js +3 -0
  150. package/lib/module/store/modules/fingerAuth/index.js.map +1 -0
  151. package/lib/module/store/modules/fingerAuth/selectors.js +6 -0
  152. package/lib/module/store/modules/fingerAuth/selectors.js.map +1 -0
  153. package/lib/module/store/modules/fingerAuth/slice.js +86 -0
  154. package/lib/module/store/modules/fingerAuth/slice.js.map +1 -0
  155. package/lib/module/store/modules/fingerAuth/type.js +2 -0
  156. package/lib/module/store/modules/fingerAuth/type.js.map +1 -0
  157. package/lib/module/store/modules/fingerRegister/index.js +3 -0
  158. package/lib/module/store/modules/fingerRegister/index.js.map +1 -0
  159. package/lib/module/store/modules/fingerRegister/selectors.js +6 -0
  160. package/lib/module/store/modules/fingerRegister/selectors.js.map +1 -0
  161. package/lib/module/store/modules/fingerRegister/slice.js +95 -0
  162. package/lib/module/store/modules/fingerRegister/slice.js.map +1 -0
  163. package/lib/module/store/modules/fingerRegister/types.js +2 -0
  164. package/lib/module/store/modules/fingerRegister/types.js.map +1 -0
  165. package/lib/module/store/modules/lifeCertificate/index.js +3 -0
  166. package/lib/module/store/modules/lifeCertificate/index.js.map +1 -0
  167. package/lib/module/store/modules/lifeCertificate/selectors.js +6 -0
  168. package/lib/module/store/modules/lifeCertificate/selectors.js.map +1 -0
  169. package/lib/module/store/modules/lifeCertificate/slice.js +95 -0
  170. package/lib/module/store/modules/lifeCertificate/slice.js.map +1 -0
  171. package/lib/module/store/modules/lifeCertificate/types.js +2 -0
  172. package/lib/module/store/modules/lifeCertificate/types.js.map +1 -0
  173. package/lib/module/utils/file.js +3 -3
  174. package/lib/module/utils/getConfigCamera.js +4 -4
  175. package/lib/module/utils/getConfigCamera.js.map +1 -1
  176. package/lib/module/utils/index.js +1 -1
  177. package/lib/typescript/src/components/CameraConfigInfo/index.d.ts +8 -0
  178. package/lib/typescript/src/components/CameraConfigInfo/index.d.ts.map +1 -0
  179. package/lib/typescript/src/components/CameraConfigInfo/styles.d.ts +13 -0
  180. package/lib/typescript/src/components/CameraConfigInfo/styles.d.ts.map +1 -0
  181. package/lib/typescript/src/components/CaptureButton/index.d.ts +10 -0
  182. package/lib/typescript/src/components/CaptureButton/index.d.ts.map +1 -0
  183. package/lib/typescript/src/components/CaptureButton/styles.d.ts +15 -0
  184. package/lib/typescript/src/components/CaptureButton/styles.d.ts.map +1 -0
  185. package/lib/typescript/src/components/Gabarito/index.d.ts +2 -1
  186. package/lib/typescript/src/components/Gabarito/index.d.ts.map +1 -1
  187. package/lib/typescript/src/components/Gabarito/styles.d.ts +1 -2
  188. package/lib/typescript/src/components/Gabarito/styles.d.ts.map +1 -1
  189. package/lib/typescript/src/components/HelpRegister/index.d.ts +4 -0
  190. package/lib/typescript/src/components/HelpRegister/index.d.ts.map +1 -0
  191. package/lib/typescript/src/{screens/CadastroFinger/components/AjudaCadastro → components/HelpRegister}/styles.d.ts +2 -5
  192. package/lib/typescript/src/components/HelpRegister/styles.d.ts.map +1 -0
  193. package/lib/typescript/src/components/Toast/Toast.d.ts +1 -1
  194. package/lib/typescript/src/components/Toast/Toast.d.ts.map +1 -1
  195. package/lib/typescript/src/components/deviceNotFound/deviceNotFound.d.ts +8 -0
  196. package/lib/typescript/src/components/deviceNotFound/deviceNotFound.d.ts.map +1 -0
  197. package/lib/typescript/src/components/deviceNotFound/styles.d.ts +29 -0
  198. package/lib/typescript/src/components/deviceNotFound/styles.d.ts.map +1 -0
  199. package/lib/typescript/src/components/icon/icon.d.ts +9 -0
  200. package/lib/typescript/src/components/icon/icon.d.ts.map +1 -0
  201. package/lib/typescript/src/components/index.d.ts +9 -0
  202. package/lib/typescript/src/components/index.d.ts.map +1 -0
  203. package/lib/typescript/src/components/modalMessage/modalMessage.d.ts +11 -0
  204. package/lib/typescript/src/components/modalMessage/modalMessage.d.ts.map +1 -0
  205. package/lib/typescript/src/components/modalMessage/styles.d.ts +44 -0
  206. package/lib/typescript/src/components/modalMessage/styles.d.ts.map +1 -0
  207. package/lib/typescript/src/components/recordButton/recordButton.d.ts +10 -0
  208. package/lib/typescript/src/components/recordButton/recordButton.d.ts.map +1 -0
  209. package/lib/typescript/src/components/recordButton/styles.d.ts +14 -0
  210. package/lib/typescript/src/components/recordButton/styles.d.ts.map +1 -0
  211. package/lib/typescript/src/index.d.ts +3 -4
  212. package/lib/typescript/src/index.d.ts.map +1 -1
  213. package/lib/typescript/src/screens/CadastroScreen/CadastroScreen.d.ts +2 -4
  214. package/lib/typescript/src/screens/CadastroScreen/CadastroScreen.d.ts.map +1 -1
  215. package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts +9 -0
  216. package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts.map +1 -0
  217. package/lib/typescript/src/screens/FingerAuth/styles.d.ts +25 -0
  218. package/lib/typescript/src/screens/FingerAuth/styles.d.ts.map +1 -0
  219. package/lib/typescript/src/screens/FingerRegister/index.d.ts +9 -0
  220. package/lib/typescript/src/screens/FingerRegister/index.d.ts.map +1 -0
  221. package/lib/typescript/src/screens/FingerRegister/styles.d.ts +25 -0
  222. package/lib/typescript/src/screens/FingerRegister/styles.d.ts.map +1 -0
  223. package/lib/typescript/src/screens/LifeCertificate/index.d.ts +7 -0
  224. package/lib/typescript/src/screens/LifeCertificate/index.d.ts.map +1 -0
  225. package/lib/typescript/src/{components/WaitingForResult → screens/LifeCertificate}/styles.d.ts +7 -11
  226. package/lib/typescript/src/screens/LifeCertificate/styles.d.ts.map +1 -0
  227. package/lib/typescript/src/screens/index.d.ts +5 -0
  228. package/lib/typescript/src/screens/index.d.ts.map +1 -0
  229. package/lib/typescript/src/services/index.d.ts +2 -17
  230. package/lib/typescript/src/services/index.d.ts.map +1 -1
  231. package/lib/typescript/src/services/services.d.ts +6 -0
  232. package/lib/typescript/src/services/services.d.ts.map +1 -0
  233. package/lib/typescript/src/services/types.d.ts +37 -0
  234. package/lib/typescript/src/services/types.d.ts.map +1 -0
  235. package/lib/typescript/src/store/createSelectors.d.ts +11 -0
  236. package/lib/typescript/src/store/createSelectors.d.ts.map +1 -0
  237. package/lib/typescript/src/store/modules/fingerAuth/index.d.ts +3 -0
  238. package/lib/typescript/src/store/modules/fingerAuth/index.d.ts.map +1 -0
  239. package/lib/typescript/src/store/modules/fingerAuth/selectors.d.ts +20 -0
  240. package/lib/typescript/src/store/modules/fingerAuth/selectors.d.ts.map +1 -0
  241. package/lib/typescript/src/store/modules/fingerAuth/slice.d.ts +4 -0
  242. package/lib/typescript/src/store/modules/fingerAuth/slice.d.ts.map +1 -0
  243. package/lib/typescript/src/store/modules/fingerAuth/type.d.ts +28 -0
  244. package/lib/typescript/src/store/modules/fingerAuth/type.d.ts.map +1 -0
  245. package/lib/typescript/src/store/modules/fingerRegister/index.d.ts +3 -0
  246. package/lib/typescript/src/store/modules/fingerRegister/index.d.ts.map +1 -0
  247. package/lib/typescript/src/store/modules/fingerRegister/selectors.d.ts +22 -0
  248. package/lib/typescript/src/store/modules/fingerRegister/selectors.d.ts.map +1 -0
  249. package/lib/typescript/src/store/modules/fingerRegister/slice.d.ts +4 -0
  250. package/lib/typescript/src/store/modules/fingerRegister/slice.d.ts.map +1 -0
  251. package/lib/typescript/src/store/modules/fingerRegister/types.d.ts +30 -0
  252. package/lib/typescript/src/store/modules/fingerRegister/types.d.ts.map +1 -0
  253. package/lib/typescript/src/store/modules/lifeCertificate/index.d.ts +3 -0
  254. package/lib/typescript/src/store/modules/lifeCertificate/index.d.ts.map +1 -0
  255. package/lib/typescript/src/store/modules/lifeCertificate/selectors.d.ts +23 -0
  256. package/lib/typescript/src/store/modules/lifeCertificate/selectors.d.ts.map +1 -0
  257. package/lib/typescript/src/store/modules/lifeCertificate/slice.d.ts +4 -0
  258. package/lib/typescript/src/store/modules/lifeCertificate/slice.d.ts.map +1 -0
  259. package/lib/typescript/src/store/modules/lifeCertificate/types.d.ts +37 -0
  260. package/lib/typescript/src/store/modules/lifeCertificate/types.d.ts.map +1 -0
  261. package/lib/typescript/src/utils/getConfigCamera.d.ts +1 -1
  262. package/lib/typescript/src/utils/getConfigCamera.d.ts.map +1 -1
  263. package/lib/typescript/src/utils/index.d.ts +1 -1
  264. package/package.json +24 -42
  265. package/src/components/CameraConfigInfo/index.tsx +20 -0
  266. package/src/components/CameraConfigInfo/styles.ts +14 -0
  267. package/src/components/CaptureButton/index.tsx +74 -0
  268. package/src/components/CaptureButton/styles.ts +16 -0
  269. package/src/components/Gabarito/index.tsx +6 -4
  270. package/src/components/Gabarito/styles.ts +13 -14
  271. package/src/components/HelpRegister/index.tsx +40 -0
  272. package/src/components/HelpRegister/styles.ts +54 -0
  273. package/src/components/Toast/Toast.tsx +18 -22
  274. package/src/components/deviceNotFound/deviceNotFound.tsx +23 -0
  275. package/src/components/deviceNotFound/styles.ts +30 -0
  276. package/src/components/icon/icon.tsx +14 -0
  277. package/src/components/index.ts +9 -0
  278. package/src/components/modalMessage/modalMessage.tsx +73 -0
  279. package/src/components/modalMessage/styles.ts +45 -0
  280. package/src/components/recordButton/recordButton.tsx +75 -0
  281. package/src/components/recordButton/styles.ts +15 -0
  282. package/src/index.tsx +5 -4
  283. package/src/screens/CadastroScreen/CadastroScreen.tsx +35 -52
  284. package/src/screens/FingerAuth/FingerAuth.tsx +121 -0
  285. package/src/screens/FingerAuth/styles.ts +28 -0
  286. package/src/screens/FingerRegister/index.tsx +141 -0
  287. package/src/screens/FingerRegister/styles.ts +28 -0
  288. package/src/screens/LifeCertificate/index.tsx +152 -0
  289. package/src/screens/LifeCertificate/styles.ts +21 -0
  290. package/src/screens/index.ts +5 -0
  291. package/src/services/index.ts +12 -113
  292. package/src/services/services.ts +129 -0
  293. package/src/services/types.ts +42 -0
  294. package/src/store/createSelectors.ts +15 -0
  295. package/src/store/modules/fingerAuth/index.ts +3 -0
  296. package/src/store/modules/fingerAuth/selectors.ts +7 -0
  297. package/src/store/modules/fingerAuth/slice.ts +91 -0
  298. package/src/store/modules/fingerAuth/type.ts +29 -0
  299. package/src/store/modules/fingerRegister/index.ts +3 -0
  300. package/src/store/modules/fingerRegister/selectors.ts +7 -0
  301. package/src/store/modules/fingerRegister/slice.ts +101 -0
  302. package/src/store/modules/fingerRegister/types.ts +30 -0
  303. package/src/store/modules/lifeCertificate/index.ts +3 -0
  304. package/src/store/modules/lifeCertificate/selectors.ts +7 -0
  305. package/src/store/modules/lifeCertificate/slice.ts +100 -0
  306. package/src/store/modules/lifeCertificate/types.ts +40 -0
  307. package/src/utils/file.ts +3 -3
  308. package/src/utils/getConfigCamera.ts +7 -12
  309. package/src/utils/index.ts +1 -1
  310. package/lib/commonjs/components/CameraConfigInfos/index.js +0 -21
  311. package/lib/commonjs/components/CameraConfigInfos/index.js.map +0 -1
  312. package/lib/commonjs/components/CameraConfigInfos/styles.js +0 -19
  313. package/lib/commonjs/components/CameraConfigInfos/styles.js.map +0 -1
  314. package/lib/commonjs/components/DeviceNullDisplay/index.js +0 -59
  315. package/lib/commonjs/components/DeviceNullDisplay/index.js.map +0 -1
  316. package/lib/commonjs/components/ErrorDisplay/index.js +0 -59
  317. package/lib/commonjs/components/ErrorDisplay/index.js.map +0 -1
  318. package/lib/commonjs/components/WaitingForResult/index.js.map +0 -1
  319. package/lib/commonjs/components/WaitingForResult/styles.js +0 -32
  320. package/lib/commonjs/components/WaitingForResult/styles.js.map +0 -1
  321. package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/index.js +0 -49
  322. package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/index.js.map +0 -1
  323. package/lib/commonjs/screens/CadastroFinger/components/AjudaCadastro/styles.js.map +0 -1
  324. package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/index.js +0 -298
  325. package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/index.js.map +0 -1
  326. package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/styles.js +0 -54
  327. package/lib/commonjs/screens/CadastroFinger/components/CameraCadastro/styles.js.map +0 -1
  328. package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/index.js +0 -44
  329. package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/index.js.map +0 -1
  330. package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/styles.js +0 -65
  331. package/lib/commonjs/screens/CadastroFinger/components/ImageDisplayScreen/styles.js.map +0 -1
  332. package/lib/commonjs/screens/CadastroFinger/index.js +0 -50
  333. package/lib/commonjs/screens/CadastroFinger/index.js.map +0 -1
  334. package/lib/commonjs/screens/ProvaVidas/index.js +0 -246
  335. package/lib/commonjs/screens/ProvaVidas/index.js.map +0 -1
  336. package/lib/commonjs/screens/ProvaVidas/styles.js +0 -93
  337. package/lib/commonjs/screens/ProvaVidas/styles.js.map +0 -1
  338. package/lib/commonjs/screens/ValidadeFinger/index.js +0 -216
  339. package/lib/commonjs/screens/ValidadeFinger/index.js.map +0 -1
  340. package/lib/commonjs/screens/ValidadeFinger/styles.js +0 -54
  341. package/lib/commonjs/screens/ValidadeFinger/styles.js.map +0 -1
  342. package/lib/commonjs/types/screen.js +0 -2
  343. package/lib/module/components/CameraConfigInfos/index.js +0 -13
  344. package/lib/module/components/CameraConfigInfos/index.js.map +0 -1
  345. package/lib/module/components/CameraConfigInfos/styles.js +0 -13
  346. package/lib/module/components/CameraConfigInfos/styles.js.map +0 -1
  347. package/lib/module/components/DeviceNullDisplay/index.js +0 -51
  348. package/lib/module/components/DeviceNullDisplay/index.js.map +0 -1
  349. package/lib/module/components/ErrorDisplay/index.js +0 -51
  350. package/lib/module/components/ErrorDisplay/index.js.map +0 -1
  351. package/lib/module/components/WaitingForResult/index.js +0 -17
  352. package/lib/module/components/WaitingForResult/index.js.map +0 -1
  353. package/lib/module/components/WaitingForResult/styles.js +0 -26
  354. package/lib/module/components/WaitingForResult/styles.js.map +0 -1
  355. package/lib/module/screens/CadastroFinger/components/AjudaCadastro/index.js.map +0 -1
  356. package/lib/module/screens/CadastroFinger/components/AjudaCadastro/styles.js +0 -56
  357. package/lib/module/screens/CadastroFinger/components/AjudaCadastro/styles.js.map +0 -1
  358. package/lib/module/screens/CadastroFinger/components/CameraCadastro/index.js +0 -288
  359. package/lib/module/screens/CadastroFinger/components/CameraCadastro/index.js.map +0 -1
  360. package/lib/module/screens/CadastroFinger/components/CameraCadastro/styles.js +0 -48
  361. package/lib/module/screens/CadastroFinger/components/CameraCadastro/styles.js.map +0 -1
  362. package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/index.js +0 -36
  363. package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/index.js.map +0 -1
  364. package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/styles.js +0 -59
  365. package/lib/module/screens/CadastroFinger/components/ImageDisplayScreen/styles.js.map +0 -1
  366. package/lib/module/screens/CadastroFinger/index.js +0 -42
  367. package/lib/module/screens/CadastroFinger/index.js.map +0 -1
  368. package/lib/module/screens/ProvaVidas/index.js +0 -239
  369. package/lib/module/screens/ProvaVidas/index.js.map +0 -1
  370. package/lib/module/screens/ProvaVidas/styles.js +0 -87
  371. package/lib/module/screens/ProvaVidas/styles.js.map +0 -1
  372. package/lib/module/screens/ValidadeFinger/index.js +0 -206
  373. package/lib/module/screens/ValidadeFinger/index.js.map +0 -1
  374. package/lib/module/screens/ValidadeFinger/styles.js +0 -48
  375. package/lib/module/screens/ValidadeFinger/styles.js.map +0 -1
  376. package/lib/module/types/screen.js +0 -2
  377. package/lib/typescript/src/components/CameraConfigInfos/index.d.ts +0 -9
  378. package/lib/typescript/src/components/CameraConfigInfos/index.d.ts.map +0 -1
  379. package/lib/typescript/src/components/CameraConfigInfos/styles.d.ts +0 -11
  380. package/lib/typescript/src/components/CameraConfigInfos/styles.d.ts.map +0 -1
  381. package/lib/typescript/src/components/DeviceNullDisplay/index.d.ts +0 -11
  382. package/lib/typescript/src/components/DeviceNullDisplay/index.d.ts.map +0 -1
  383. package/lib/typescript/src/components/ErrorDisplay/index.d.ts +0 -11
  384. package/lib/typescript/src/components/ErrorDisplay/index.d.ts.map +0 -1
  385. package/lib/typescript/src/components/WaitingForResult/index.d.ts +0 -7
  386. package/lib/typescript/src/components/WaitingForResult/index.d.ts.map +0 -1
  387. package/lib/typescript/src/components/WaitingForResult/styles.d.ts.map +0 -1
  388. package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/index.d.ts +0 -7
  389. package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/index.d.ts.map +0 -1
  390. package/lib/typescript/src/screens/CadastroFinger/components/AjudaCadastro/styles.d.ts.map +0 -1
  391. package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/index.d.ts +0 -16
  392. package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/index.d.ts.map +0 -1
  393. package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/styles.d.ts +0 -44
  394. package/lib/typescript/src/screens/CadastroFinger/components/CameraCadastro/styles.d.ts.map +0 -1
  395. package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/index.d.ts +0 -12
  396. package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/index.d.ts.map +0 -1
  397. package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.d.ts +0 -54
  398. package/lib/typescript/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.d.ts.map +0 -1
  399. package/lib/typescript/src/screens/CadastroFinger/index.d.ts +0 -16
  400. package/lib/typescript/src/screens/CadastroFinger/index.d.ts.map +0 -1
  401. package/lib/typescript/src/screens/ProvaVidas/index.d.ts +0 -14
  402. package/lib/typescript/src/screens/ProvaVidas/index.d.ts.map +0 -1
  403. package/lib/typescript/src/screens/ProvaVidas/styles.d.ts +0 -85
  404. package/lib/typescript/src/screens/ProvaVidas/styles.d.ts.map +0 -1
  405. package/lib/typescript/src/screens/ValidadeFinger/index.d.ts +0 -14
  406. package/lib/typescript/src/screens/ValidadeFinger/index.d.ts.map +0 -1
  407. package/lib/typescript/src/screens/ValidadeFinger/styles.d.ts +0 -44
  408. package/lib/typescript/src/screens/ValidadeFinger/styles.d.ts.map +0 -1
  409. package/lib/typescript/src/types/screen.d.ts +0 -6
  410. package/lib/typescript/src/types/screen.d.ts.map +0 -1
  411. package/live-id-sdk.podspec +0 -41
  412. package/src/components/CameraConfigInfos/index.tsx +0 -25
  413. package/src/components/CameraConfigInfos/styles.ts +0 -13
  414. package/src/components/DeviceNullDisplay/index.tsx +0 -59
  415. package/src/components/ErrorDisplay/index.tsx +0 -60
  416. package/src/components/WaitingForResult/index.tsx +0 -22
  417. package/src/components/WaitingForResult/styles.ts +0 -27
  418. package/src/screens/CadastroFinger/components/AjudaCadastro/index.tsx +0 -49
  419. package/src/screens/CadastroFinger/components/AjudaCadastro/styles.ts +0 -56
  420. package/src/screens/CadastroFinger/components/CameraCadastro/index.tsx +0 -356
  421. package/src/screens/CadastroFinger/components/CameraCadastro/styles.ts +0 -47
  422. package/src/screens/CadastroFinger/components/ImageDisplayScreen/index.tsx +0 -45
  423. package/src/screens/CadastroFinger/components/ImageDisplayScreen/styles.ts +0 -55
  424. package/src/screens/CadastroFinger/index.tsx +0 -56
  425. package/src/screens/ProvaVidas/index.tsx +0 -308
  426. package/src/screens/ProvaVidas/styles.ts +0 -99
  427. package/src/screens/ValidadeFinger/index.tsx +0 -263
  428. package/src/screens/ValidadeFinger/styles.ts +0 -47
  429. 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": "1.0.0",
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
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
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
- "@commitlint/config-conventional": "^17.0.2",
54
- "@evilmartians/lefthook": "^1.5.0",
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
- "commitlint": "^17.0.2",
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.4.1",
63
+ "eslint": "^8.0.1",
63
64
  "eslint-config-prettier": "^8.5.0",
64
- "eslint-plugin-prettier": "^4.0.0",
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.0.5",
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": "^5.3.3"
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-vision-camera": "^3.8.2"
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 'react';
2
- import { View } from 'react-native';
3
- import { styles } from './styles';
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import { styles } from "./styles";
4
4
 
5
- export const Gabarito = () => {
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 'react-native';
1
+ import { StyleSheet, Dimensions } from "react-native";
2
2
 
3
- const width = Dimensions.get('window').width;
4
- const height = Dimensions.get('window').height;
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
- justifyContent: 'center',
9
- alignSelf: 'center',
10
- position: `absolute`,
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.3,
14
+ height: height * 0.4,
16
15
  borderWidth: 3,
17
- borderColor: 'red',
18
- marginLeft: '15%',
19
- borderTopLeftRadius: 125,
20
- borderBottomLeftRadius: 125,
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 'react';
2
- import { View, Modal, Text, StyleSheet, TouchableOpacity } from 'react-native';
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: 'rgba(0, 0, 0, 0.5)',
33
- justifyContent: 'center',
34
- alignItems: 'center',
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: 'white',
34
+ backgroundColor: "white",
39
35
  padding: 16,
40
36
  borderRadius: 8,
41
- width: '80%',
42
- alignItems: 'center',
37
+ width: "80%",
38
+ alignItems: "center"
43
39
  },
44
40
  messageText: {
45
41
  fontSize: 18,
46
42
  marginBottom: 16,
47
- textAlign: 'center',
48
- color: '#333',
43
+ textAlign: "center",
44
+ color: "#333"
49
45
  },
50
46
  closeButton: {
51
47
  marginTop: 8,
52
- backgroundColor: '#ccc',
48
+ backgroundColor: "#ccc",
53
49
  padding: 8,
54
- borderRadius: 4,
50
+ borderRadius: 4
55
51
  },
56
52
  closeButtonText: {
57
- color: 'white',
58
- fontWeight: 'bold',
59
- textAlign: 'center',
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
+ });