@ha_tecno/live-id-sdk 2.14.0 → 2.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. package/lib/commonjs/assets/svg/btn.svg +4 -0
  2. package/lib/commonjs/assets/svg/fingers/LI.svg +5 -0
  3. package/lib/commonjs/assets/svg/fingers/LM.svg +5 -0
  4. package/lib/commonjs/assets/svg/fingers/LP.svg +5 -0
  5. package/lib/commonjs/assets/svg/fingers/LR.svg +5 -0
  6. package/lib/commonjs/assets/svg/fingers/LT.svg +5 -0
  7. package/lib/commonjs/assets/svg/fingers/RI.svg +5 -0
  8. package/lib/commonjs/assets/svg/fingers/RM.svg +5 -0
  9. package/lib/commonjs/assets/svg/fingers/RP.svg +5 -0
  10. package/lib/commonjs/assets/svg/fingers/RR.svg +5 -0
  11. package/lib/commonjs/assets/svg/fingers/RT.svg +5 -0
  12. package/lib/commonjs/assets/svg/hand.svg +15 -0
  13. package/lib/commonjs/assets/svg/phone.svg +39 -0
  14. package/lib/commonjs/assets/svg/recordButton.svg +4 -0
  15. package/lib/commonjs/assets/svg/rectangle.svg +3 -0
  16. package/lib/commonjs/components/Gabarito/gabarito.js +56 -0
  17. package/lib/commonjs/components/Gabarito/gabarito.js.map +1 -0
  18. package/lib/commonjs/components/Gabarito/styles.js +2 -16
  19. package/lib/commonjs/components/Gabarito/styles.js.map +1 -1
  20. package/lib/commonjs/components/{Gabarito/index.js → HAButton/HAButton.js} +11 -7
  21. package/lib/commonjs/components/HAButton/HAButton.js.map +1 -0
  22. package/lib/commonjs/components/HAButton/styles.js +28 -0
  23. package/lib/commonjs/components/HAButton/styles.js.map +1 -0
  24. package/lib/commonjs/components/HACaptureButton/HACaptureButton.js +21 -0
  25. package/lib/commonjs/components/HACaptureButton/HACaptureButton.js.map +1 -0
  26. package/lib/commonjs/components/HACaptureInstructions/HACard/styles.js +4 -1
  27. package/lib/commonjs/components/HACaptureInstructions/HACard/styles.js.map +1 -1
  28. package/lib/commonjs/components/HACaptureInstructions/style.js +9 -3
  29. package/lib/commonjs/components/HACaptureInstructions/style.js.map +1 -1
  30. package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js +3 -5
  31. package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js.map +1 -1
  32. package/lib/commonjs/components/HACarouselCalibration/HAPagination/styles.js +2 -1
  33. package/lib/commonjs/components/HACarouselCalibration/HAPagination/styles.js.map +1 -1
  34. package/lib/commonjs/components/{modalMessage/modalMessage.js → HAModalMessage/HAModalMessage.js} +26 -14
  35. package/lib/commonjs/components/HAModalMessage/HAModalMessage.js.map +1 -0
  36. package/lib/commonjs/components/{modalMessage → HAModalMessage}/styles.js +15 -9
  37. package/lib/commonjs/components/HAModalMessage/styles.js.map +1 -0
  38. package/lib/commonjs/components/HARecordButton/HARecordButton.js +21 -0
  39. package/lib/commonjs/components/HARecordButton/HARecordButton.js.map +1 -0
  40. package/lib/commonjs/components/HARecordButton/styles.js +2 -0
  41. package/lib/commonjs/components/HARecordButton/styles.js.map +1 -0
  42. package/lib/commonjs/components/HARecordInstructions/HARecordInstructions.js +101 -0
  43. package/lib/commonjs/components/HARecordInstructions/HARecordInstructions.js.map +1 -0
  44. package/lib/commonjs/components/HARecordInstructions/data.js +14 -0
  45. package/lib/commonjs/components/HARecordInstructions/data.js.map +1 -0
  46. package/lib/commonjs/components/HARecordInstructions/styles.js +65 -0
  47. package/lib/commonjs/components/HARecordInstructions/styles.js.map +1 -0
  48. package/lib/commonjs/components/HAStepIndicator/HAStepIndicator.js +39 -0
  49. package/lib/commonjs/components/HAStepIndicator/HAStepIndicator.js.map +1 -0
  50. package/lib/commonjs/components/HAStepIndicator/styles.js +48 -0
  51. package/lib/commonjs/components/HAStepIndicator/styles.js.map +1 -0
  52. package/lib/commonjs/components/index.js +44 -9
  53. package/lib/commonjs/components/index.js.map +1 -1
  54. package/lib/commonjs/index.js +6 -0
  55. package/lib/commonjs/index.js.map +1 -1
  56. package/lib/commonjs/screens/FingerAuth/FingerAuth.js +15 -20
  57. package/lib/commonjs/screens/FingerAuth/FingerAuth.js.map +1 -1
  58. package/lib/commonjs/screens/FingerAuth/styles.js +18 -11
  59. package/lib/commonjs/screens/FingerAuth/styles.js.map +1 -1
  60. package/lib/commonjs/screens/FingerRegister/FingerRegister.js +96 -62
  61. package/lib/commonjs/screens/FingerRegister/FingerRegister.js.map +1 -1
  62. package/lib/commonjs/screens/FingerRegister/data.js +60 -0
  63. package/lib/commonjs/screens/FingerRegister/data.js.map +1 -0
  64. package/lib/commonjs/screens/FingerRegister/styles.js +71 -34
  65. package/lib/commonjs/screens/FingerRegister/styles.js.map +1 -1
  66. package/lib/commonjs/screens/LifeCertificate/LifeCertificate.js +19 -22
  67. package/lib/commonjs/screens/LifeCertificate/LifeCertificate.js.map +1 -1
  68. package/lib/commonjs/screens/LifeCertificate/styles.js +23 -4
  69. package/lib/commonjs/screens/LifeCertificate/styles.js.map +1 -1
  70. package/lib/commonjs/screens/RegisterOperations/registerOperationPointsBiometrics.js +76 -49
  71. package/lib/commonjs/screens/RegisterOperations/registerOperationPointsBiometrics.js.map +1 -1
  72. package/lib/commonjs/screens/RegisterOperations/registerOperationPointsLifeCertificate.js +73 -34
  73. package/lib/commonjs/screens/RegisterOperations/registerOperationPointsLifeCertificate.js.map +1 -1
  74. package/lib/commonjs/screens/RegisterOperations/styles.js +74 -21
  75. package/lib/commonjs/screens/RegisterOperations/styles.js.map +1 -1
  76. package/lib/commonjs/services/services.js +1 -1
  77. package/lib/commonjs/services/services.js.map +1 -1
  78. package/lib/commonjs/store/modules/lifeCertificate/slice.js +5 -3
  79. package/lib/commonjs/store/modules/lifeCertificate/slice.js.map +1 -1
  80. package/lib/commonjs/store/modules/operationPoints/slice.js +48 -18
  81. package/lib/commonjs/store/modules/operationPoints/slice.js.map +1 -1
  82. package/lib/module/assets/svg/btn.svg +4 -0
  83. package/lib/module/assets/svg/fingers/LI.svg +5 -0
  84. package/lib/module/assets/svg/fingers/LM.svg +5 -0
  85. package/lib/module/assets/svg/fingers/LP.svg +5 -0
  86. package/lib/module/assets/svg/fingers/LR.svg +5 -0
  87. package/lib/module/assets/svg/fingers/LT.svg +5 -0
  88. package/lib/module/assets/svg/fingers/RI.svg +5 -0
  89. package/lib/module/assets/svg/fingers/RM.svg +5 -0
  90. package/lib/module/assets/svg/fingers/RP.svg +5 -0
  91. package/lib/module/assets/svg/fingers/RR.svg +5 -0
  92. package/lib/module/assets/svg/fingers/RT.svg +5 -0
  93. package/lib/module/assets/svg/hand.svg +15 -0
  94. package/lib/module/assets/svg/phone.svg +39 -0
  95. package/lib/module/assets/svg/recordButton.svg +4 -0
  96. package/lib/module/assets/svg/rectangle.svg +3 -0
  97. package/lib/module/components/Gabarito/gabarito.js +49 -0
  98. package/lib/module/components/Gabarito/gabarito.js.map +1 -0
  99. package/lib/module/components/Gabarito/styles.js +3 -17
  100. package/lib/module/components/Gabarito/styles.js.map +1 -1
  101. package/lib/module/components/HAButton/HAButton.js +16 -0
  102. package/lib/module/components/HAButton/HAButton.js.map +1 -0
  103. package/lib/module/components/HAButton/styles.js +22 -0
  104. package/lib/module/components/HAButton/styles.js.map +1 -0
  105. package/lib/module/components/HACaptureButton/HACaptureButton.js +14 -0
  106. package/lib/module/components/HACaptureButton/HACaptureButton.js.map +1 -0
  107. package/lib/module/components/HACaptureInstructions/HACard/styles.js +5 -2
  108. package/lib/module/components/HACaptureInstructions/HACard/styles.js.map +1 -1
  109. package/lib/module/components/HACaptureInstructions/style.js +10 -4
  110. package/lib/module/components/HACaptureInstructions/style.js.map +1 -1
  111. package/lib/module/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js +3 -5
  112. package/lib/module/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js.map +1 -1
  113. package/lib/module/components/HACarouselCalibration/HAPagination/styles.js +2 -1
  114. package/lib/module/components/HACarouselCalibration/HAPagination/styles.js.map +1 -1
  115. package/lib/module/components/{modalMessage/modalMessage.js → HAModalMessage/HAModalMessage.js} +26 -14
  116. package/lib/module/components/HAModalMessage/HAModalMessage.js.map +1 -0
  117. package/lib/module/components/{modalMessage → HAModalMessage}/styles.js +15 -9
  118. package/lib/module/components/HAModalMessage/styles.js.map +1 -0
  119. package/lib/module/components/HARecordButton/HARecordButton.js +14 -0
  120. package/lib/module/components/HARecordButton/HARecordButton.js.map +1 -0
  121. package/lib/module/components/HARecordButton/styles.js +2 -0
  122. package/lib/module/components/HARecordButton/styles.js.map +1 -0
  123. package/lib/module/components/HARecordInstructions/HARecordInstructions.js +92 -0
  124. package/lib/module/components/HARecordInstructions/HARecordInstructions.js.map +1 -0
  125. package/lib/module/components/HARecordInstructions/data.js +8 -0
  126. package/lib/module/components/HARecordInstructions/data.js.map +1 -0
  127. package/lib/module/components/HARecordInstructions/styles.js +59 -0
  128. package/lib/module/components/HARecordInstructions/styles.js.map +1 -0
  129. package/lib/module/components/HAStepIndicator/HAStepIndicator.js +32 -0
  130. package/lib/module/components/HAStepIndicator/HAStepIndicator.js.map +1 -0
  131. package/lib/module/components/HAStepIndicator/styles.js +42 -0
  132. package/lib/module/components/HAStepIndicator/styles.js.map +1 -0
  133. package/lib/module/components/index.js +8 -3
  134. package/lib/module/components/index.js.map +1 -1
  135. package/lib/module/index.js +2 -2
  136. package/lib/module/index.js.map +1 -1
  137. package/lib/module/screens/FingerAuth/FingerAuth.js +17 -22
  138. package/lib/module/screens/FingerAuth/FingerAuth.js.map +1 -1
  139. package/lib/module/screens/FingerAuth/styles.js +19 -12
  140. package/lib/module/screens/FingerAuth/styles.js.map +1 -1
  141. package/lib/module/screens/FingerRegister/FingerRegister.js +100 -66
  142. package/lib/module/screens/FingerRegister/FingerRegister.js.map +1 -1
  143. package/lib/module/screens/FingerRegister/data.js +53 -0
  144. package/lib/module/screens/FingerRegister/data.js.map +1 -0
  145. package/lib/module/screens/FingerRegister/styles.js +72 -35
  146. package/lib/module/screens/FingerRegister/styles.js.map +1 -1
  147. package/lib/module/screens/LifeCertificate/LifeCertificate.js +22 -25
  148. package/lib/module/screens/LifeCertificate/LifeCertificate.js.map +1 -1
  149. package/lib/module/screens/LifeCertificate/styles.js +24 -5
  150. package/lib/module/screens/LifeCertificate/styles.js.map +1 -1
  151. package/lib/module/screens/RegisterOperations/registerOperationPointsBiometrics.js +78 -52
  152. package/lib/module/screens/RegisterOperations/registerOperationPointsBiometrics.js.map +1 -1
  153. package/lib/module/screens/RegisterOperations/registerOperationPointsLifeCertificate.js +73 -36
  154. package/lib/module/screens/RegisterOperations/registerOperationPointsLifeCertificate.js.map +1 -1
  155. package/lib/module/screens/RegisterOperations/styles.js +74 -21
  156. package/lib/module/screens/RegisterOperations/styles.js.map +1 -1
  157. package/lib/module/services/services.js +1 -1
  158. package/lib/module/services/services.js.map +1 -1
  159. package/lib/module/store/modules/lifeCertificate/slice.js +5 -3
  160. package/lib/module/store/modules/lifeCertificate/slice.js.map +1 -1
  161. package/lib/module/store/modules/operationPoints/slice.js +48 -18
  162. package/lib/module/store/modules/operationPoints/slice.js.map +1 -1
  163. package/lib/typescript/src/components/Gabarito/gabarito.d.ts +19 -0
  164. package/lib/typescript/src/components/Gabarito/gabarito.d.ts.map +1 -0
  165. package/lib/typescript/src/components/Gabarito/styles.d.ts +1 -13
  166. package/lib/typescript/src/components/Gabarito/styles.d.ts.map +1 -1
  167. package/lib/typescript/src/components/HAButton/HAButton.d.ts +8 -0
  168. package/lib/typescript/src/components/HAButton/HAButton.d.ts.map +1 -0
  169. package/lib/typescript/src/components/HAButton/styles.d.ts +15 -0
  170. package/lib/typescript/src/components/HAButton/styles.d.ts.map +1 -0
  171. package/lib/typescript/src/components/HACaptureButton/HACaptureButton.d.ts +7 -0
  172. package/lib/typescript/src/components/HACaptureButton/HACaptureButton.d.ts.map +1 -0
  173. package/lib/typescript/src/components/HACaptureInstructions/HACard/styles.d.ts +1 -1
  174. package/lib/typescript/src/components/HACaptureInstructions/HACard/styles.d.ts.map +1 -1
  175. package/lib/typescript/src/components/HACaptureInstructions/style.d.ts +3 -3
  176. package/lib/typescript/src/components/HACaptureInstructions/style.d.ts.map +1 -1
  177. package/lib/typescript/src/components/HACarouselCalibration/HACarouselItem/HACarouselItem.d.ts.map +1 -1
  178. package/lib/typescript/src/components/HACarouselCalibration/HAPagination/styles.d.ts +1 -1
  179. package/lib/typescript/src/components/HACarouselCalibration/HAPagination/styles.d.ts.map +1 -1
  180. package/lib/typescript/src/components/HAModalMessage/HAModalMessage.d.ts +13 -0
  181. package/lib/typescript/src/components/HAModalMessage/HAModalMessage.d.ts.map +1 -0
  182. package/lib/typescript/src/components/{modalMessage → HAModalMessage}/styles.d.ts +12 -6
  183. package/lib/typescript/src/components/HAModalMessage/styles.d.ts.map +1 -0
  184. package/lib/typescript/src/components/HARecordButton/HARecordButton.d.ts +8 -0
  185. package/lib/typescript/src/components/HARecordButton/HARecordButton.d.ts.map +1 -0
  186. package/lib/typescript/src/components/HARecordButton/styles.d.ts +1 -0
  187. package/lib/typescript/src/components/HARecordButton/styles.d.ts.map +1 -0
  188. package/lib/typescript/src/components/HARecordInstructions/HARecordInstructions.d.ts +7 -0
  189. package/lib/typescript/src/components/HARecordInstructions/HARecordInstructions.d.ts.map +1 -0
  190. package/lib/typescript/src/components/HARecordInstructions/data.d.ts +5 -0
  191. package/lib/typescript/src/components/HARecordInstructions/data.d.ts.map +1 -0
  192. package/lib/typescript/src/components/HARecordInstructions/styles.d.ts +52 -0
  193. package/lib/typescript/src/components/HARecordInstructions/styles.d.ts.map +1 -0
  194. package/lib/typescript/src/components/HAStepIndicator/HAStepIndicator.d.ts +8 -0
  195. package/lib/typescript/src/components/HAStepIndicator/HAStepIndicator.d.ts.map +1 -0
  196. package/lib/typescript/src/components/HAStepIndicator/styles.d.ts +41 -0
  197. package/lib/typescript/src/components/HAStepIndicator/styles.d.ts.map +1 -0
  198. package/lib/typescript/src/components/index.d.ts +8 -3
  199. package/lib/typescript/src/components/index.d.ts.map +1 -1
  200. package/lib/typescript/src/index.d.ts +2 -2
  201. package/lib/typescript/src/index.d.ts.map +1 -1
  202. package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts +1 -2
  203. package/lib/typescript/src/screens/FingerAuth/FingerAuth.d.ts.map +1 -1
  204. package/lib/typescript/src/screens/FingerAuth/styles.d.ts +17 -7
  205. package/lib/typescript/src/screens/FingerAuth/styles.d.ts.map +1 -1
  206. package/lib/typescript/src/screens/FingerRegister/FingerRegister.d.ts +1 -2
  207. package/lib/typescript/src/screens/FingerRegister/FingerRegister.d.ts.map +1 -1
  208. package/lib/typescript/src/screens/FingerRegister/data.d.ts +9 -0
  209. package/lib/typescript/src/screens/FingerRegister/data.d.ts.map +1 -0
  210. package/lib/typescript/src/screens/FingerRegister/styles.d.ts +64 -27
  211. package/lib/typescript/src/screens/FingerRegister/styles.d.ts.map +1 -1
  212. package/lib/typescript/src/screens/LifeCertificate/LifeCertificate.d.ts +1 -2
  213. package/lib/typescript/src/screens/LifeCertificate/LifeCertificate.d.ts.map +1 -1
  214. package/lib/typescript/src/screens/LifeCertificate/styles.d.ts +18 -2
  215. package/lib/typescript/src/screens/LifeCertificate/styles.d.ts.map +1 -1
  216. package/lib/typescript/src/screens/RegisterOperations/registerOperationPointsBiometrics.d.ts.map +1 -1
  217. package/lib/typescript/src/screens/RegisterOperations/registerOperationPointsLifeCertificate.d.ts.map +1 -1
  218. package/lib/typescript/src/screens/RegisterOperations/styles.d.ts +59 -18
  219. package/lib/typescript/src/screens/RegisterOperations/styles.d.ts.map +1 -1
  220. package/lib/typescript/src/store/modules/lifeCertificate/selectors.d.ts +2 -1
  221. package/lib/typescript/src/store/modules/lifeCertificate/selectors.d.ts.map +1 -1
  222. package/lib/typescript/src/store/modules/lifeCertificate/slice.d.ts.map +1 -1
  223. package/lib/typescript/src/store/modules/lifeCertificate/types.d.ts +2 -1
  224. package/lib/typescript/src/store/modules/lifeCertificate/types.d.ts.map +1 -1
  225. package/lib/typescript/src/store/modules/operationPoints/selectors.d.ts +12 -4
  226. package/lib/typescript/src/store/modules/operationPoints/selectors.d.ts.map +1 -1
  227. package/lib/typescript/src/store/modules/operationPoints/slice.d.ts.map +1 -1
  228. package/lib/typescript/src/store/modules/operationPoints/types.d.ts +12 -4
  229. package/lib/typescript/src/store/modules/operationPoints/types.d.ts.map +1 -1
  230. package/package.json +5 -1
  231. package/src/assets/svg/btn.svg +4 -0
  232. package/src/assets/svg/fingers/LI.svg +5 -0
  233. package/src/assets/svg/fingers/LM.svg +5 -0
  234. package/src/assets/svg/fingers/LP.svg +5 -0
  235. package/src/assets/svg/fingers/LR.svg +5 -0
  236. package/src/assets/svg/fingers/LT.svg +5 -0
  237. package/src/assets/svg/fingers/RI.svg +5 -0
  238. package/src/assets/svg/fingers/RM.svg +5 -0
  239. package/src/assets/svg/fingers/RP.svg +5 -0
  240. package/src/assets/svg/fingers/RR.svg +5 -0
  241. package/src/assets/svg/fingers/RT.svg +5 -0
  242. package/src/assets/svg/hand.svg +15 -0
  243. package/src/assets/svg/phone.svg +39 -0
  244. package/src/assets/svg/recordButton.svg +4 -0
  245. package/src/assets/svg/rectangle.svg +3 -0
  246. package/src/components/Gabarito/gabarito.tsx +38 -0
  247. package/src/components/Gabarito/styles.ts +3 -16
  248. package/src/components/HAButton/HAButton.tsx +18 -0
  249. package/src/components/HAButton/styles.ts +22 -0
  250. package/src/components/HACaptureButton/HACaptureButton.tsx +17 -0
  251. package/src/components/HACaptureInstructions/HACard/styles.ts +5 -2
  252. package/src/components/HACaptureInstructions/style.ts +16 -4
  253. package/src/components/HACarouselCalibration/HACarouselItem/HACarouselItem.tsx +2 -4
  254. package/src/components/HACarouselCalibration/HAPagination/styles.ts +2 -1
  255. package/src/components/HAModalMessage/HAModalMessage.tsx +72 -0
  256. package/src/components/{modalMessage → HAModalMessage}/styles.ts +12 -9
  257. package/src/components/HARecordButton/HARecordButton.tsx +18 -0
  258. package/src/components/HARecordButton/styles.ts +0 -0
  259. package/src/components/HARecordInstructions/HARecordInstructions.tsx +73 -0
  260. package/src/components/HARecordInstructions/data.ts +10 -0
  261. package/src/components/HARecordInstructions/styles.ts +50 -0
  262. package/src/components/HAStepIndicator/HAStepIndicator.tsx +34 -0
  263. package/src/components/HAStepIndicator/styles.ts +42 -0
  264. package/src/components/index.ts +14 -4
  265. package/src/index.tsx +3 -2
  266. package/src/screens/FingerAuth/FingerAuth.tsx +20 -14
  267. package/src/screens/FingerAuth/styles.ts +19 -11
  268. package/src/screens/FingerRegister/FingerRegister.tsx +107 -63
  269. package/src/screens/FingerRegister/data.ts +65 -0
  270. package/src/screens/FingerRegister/styles.ts +67 -34
  271. package/src/screens/LifeCertificate/LifeCertificate.tsx +31 -25
  272. package/src/screens/LifeCertificate/styles.ts +17 -5
  273. package/src/screens/RegisterOperations/registerOperationPointsBiometrics.tsx +68 -35
  274. package/src/screens/RegisterOperations/registerOperationPointsLifeCertificate.tsx +74 -46
  275. package/src/screens/RegisterOperations/styles.ts +65 -22
  276. package/src/services/services.ts +2 -2
  277. package/src/store/modules/lifeCertificate/slice.ts +5 -3
  278. package/src/store/modules/lifeCertificate/types.ts +2 -1
  279. package/src/store/modules/operationPoints/slice.ts +52 -17
  280. package/src/store/modules/operationPoints/types.ts +12 -4
  281. package/lib/commonjs/components/Gabarito/index.js.map +0 -1
  282. package/lib/commonjs/components/modalMessage/modalMessage.js.map +0 -1
  283. package/lib/commonjs/components/modalMessage/styles.js.map +0 -1
  284. package/lib/module/components/Gabarito/index.js +0 -12
  285. package/lib/module/components/Gabarito/index.js.map +0 -1
  286. package/lib/module/components/modalMessage/modalMessage.js.map +0 -1
  287. package/lib/module/components/modalMessage/styles.js.map +0 -1
  288. package/lib/typescript/src/components/Gabarito/index.d.ts +0 -4
  289. package/lib/typescript/src/components/Gabarito/index.d.ts.map +0 -1
  290. package/lib/typescript/src/components/modalMessage/modalMessage.d.ts +0 -11
  291. package/lib/typescript/src/components/modalMessage/modalMessage.d.ts.map +0 -1
  292. package/lib/typescript/src/components/modalMessage/styles.d.ts.map +0 -1
  293. package/src/components/Gabarito/index.tsx +0 -13
  294. package/src/components/modalMessage/modalMessage.tsx +0 -73
@@ -1,16 +1,24 @@
1
- import React, { useCallback, useEffect, useRef, useState } from "react";
2
- import { View, Text } from "react-native";
1
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
+ import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
3
3
  import { Camera, Point, useCameraDevice, useCameraFormat, 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
- import Picker, { PickerStyle } from "react-native-picker-select";
8
-
9
- import { CameraConfigInfo, CaptureButton, DeviceNotFound, Gabarito, ModalMessage } from "../../components";
10
- import { styles } from "./styles";
7
+ import { BottomSheetModal, BottomSheetModalProvider, BottomSheetFlatList } from "@gorhom/bottom-sheet";
8
+
9
+ import {
10
+ DeviceNotFound,
11
+ Gabarito,
12
+ HAButton,
13
+ HACaptureButton,
14
+ HAModalMessage,
15
+ HAStepProgress,
16
+ Icon
17
+ } from "../../components";
11
18
  import { useDispatch, useSelector } from "../../store/modules/fingerRegister";
12
- import { filteredFingers, useIsForeground } from "../../utils";
13
- import Icon from "../../components/icon/icon";
19
+ import { useIsForeground } from "../../utils";
20
+ import { styles } from "./styles";
21
+ import data from "./data";
14
22
 
15
23
  enum Finger {
16
24
  LEFT_THUMB = "LT",
@@ -30,36 +38,22 @@ type Props = {
30
38
  onSuccess: (code: number) => void;
31
39
  isFocused?: boolean;
32
40
  mock?: boolean;
33
- testID?: string;
34
41
  registerUser?: boolean;
35
42
  registeredFingers?: string[];
36
43
  };
37
44
 
38
- const MultiFingerRegister = ({ testID, UID, onSuccess, isFocused, mock, registerUser, registeredFingers }: Props) => {
45
+ const MultiFingerRegister = ({ UID, onSuccess, isFocused, mock, registerUser, registeredFingers }: Props) => {
39
46
  const [torch, setTorch] = useState<"off" | "on">("off");
40
47
  const cameraRef = useRef<Camera>(null);
41
48
  const isForeground = useIsForeground();
42
49
  const isActive = isFocused !== undefined ? isForeground && isFocused : isForeground;
43
50
  const { hasPermission, requestPermission } = useCameraPermission();
51
+ const bottomSheetModalRef = useRef<BottomSheetModal>(null);
44
52
  const device = useCameraDevice("back");
45
53
  const state = useSelector();
46
54
  const dispatch = useDispatch();
47
55
 
48
56
  const containerCaptureStyled = [styles.containerCapture, { bottom: state.showButtonInfo ? 75 : 20 }];
49
- const pickerStyled: PickerStyle = {
50
- chevronDown: { display: "none" },
51
- chevronUp: { display: "none" },
52
- inputIOS: {
53
- fontSize: 16,
54
- color: "#000",
55
- textAlign: "center"
56
- },
57
- inputAndroid: {
58
- fontSize: 14,
59
- color: "#000",
60
- textAlign: "center"
61
- }
62
- };
63
57
 
64
58
  const itemsPicker = [
65
59
  { label: "Indicador Direito", value: Finger.RIGHT_INDEX },
@@ -74,7 +68,7 @@ const MultiFingerRegister = ({ testID, UID, onSuccess, isFocused, mock, register
74
68
  { label: "Polegar Esquerdo", value: Finger.LEFT_THUMB }
75
69
  ];
76
70
 
77
- const filteredItemsPicker = filteredFingers(registeredFingers ?? [], itemsPicker);
71
+ const fingerName = itemsPicker.find((i) => i.value === state.currentFinger)?.label;
78
72
 
79
73
  useEffect(() => {
80
74
  Orientation.lockToPortrait();
@@ -115,7 +109,7 @@ const MultiFingerRegister = ({ testID, UID, onSuccess, isFocused, mock, register
115
109
 
116
110
  useEffect(() => {
117
111
  if (state.code === 0) {
118
- dispatch.setModal("Sucesso!", "Cadastro de digital realizado com sucesso!");
112
+ dispatch.setModal("Tudo certo!", "Sua biometria foi cadastrada com sucesso. Agora você pode acessar o LiveID!");
119
113
  onSuccess && onSuccess?.(state.code);
120
114
  mock === true ? setTimeout(() => dispatch.handleLoading(), 2000) : dispatch.handleLoading();
121
115
  dispatch.handleFinger();
@@ -135,6 +129,7 @@ const MultiFingerRegister = ({ testID, UID, onSuccess, isFocused, mock, register
135
129
  };
136
130
 
137
131
  const focus = useCallback((point: Point) => {
132
+ bottomSheetModalRef.current?.dismiss();
138
133
  const camera = cameraRef.current;
139
134
  if (camera != null) {
140
135
  camera.focus(point);
@@ -145,56 +140,105 @@ const MultiFingerRegister = ({ testID, UID, onSuccess, isFocused, mock, register
145
140
  runOnJS(focus)({ x, y });
146
141
  });
147
142
 
143
+ const onInitialized = () => setTorch("on");
144
+
148
145
  const handleCurrentFinger = (value: string) => {
146
+ bottomSheetModalRef.current?.dismiss();
149
147
  dispatch.setCurrentFinger(value as Finger);
150
148
  };
151
149
 
152
- const onInitialized = () => setTorch("on");
150
+ const handlePresentModalPress = useCallback(() => {
151
+ bottomSheetModalRef.current?.present();
152
+ }, []);
153
+
154
+ const snapPoints = useMemo(() => ["25%", "50%"], []);
155
+
156
+ const renderItem = useCallback(({ item, index }) => {
157
+ const isRegistered = registeredFingers?.some((registeredItem) => registeredItem === item.finger);
158
+
159
+ return (
160
+ <View style={styles.containerItem} key={index}>
161
+ {index === 0 && <Text style={styles.textItem}>Mão Esquerda</Text>}
162
+ {index === 1 && <Text style={styles.textItem}>Mão Direita</Text>}
163
+ <TouchableOpacity
164
+ style={styles.containerItemContent}
165
+ onPress={() => handleCurrentFinger(item.finger)}
166
+ disabled={isRegistered}
167
+ >
168
+ {isRegistered && (
169
+ <View style={styles.iconCheckmark}>
170
+ <Icon name="checkmark" size={14} color="#fff" />
171
+ </View>
172
+ )}
173
+ {item.ImageComponent && <item.ImageComponent width={85} height={118} />}
174
+ <Text style={styles.textItemContent}>{item.text}</Text>
175
+ </TouchableOpacity>
176
+ </View>
177
+ );
178
+ }, []);
153
179
 
154
180
  if (device == null || hasPermission === false)
155
181
  return <DeviceNotFound hasPermission={hasPermission} cameraPermission={cameraPermission} />;
156
182
 
183
+ const ListHeaderComponent = () => {
184
+ return (
185
+ <View style={styles.headerBottomSheet}>
186
+ <Text style={styles.titleBottomSheet}>Escolha o dedo que deseja cadastrar.</Text>
187
+ <View style={{ width: "100%", marginTop: 20, borderTopWidth: 2, borderColor: "#ffffff20" }} />
188
+ </View>
189
+ );
190
+ };
191
+
157
192
  return (
158
193
  <GestureHandlerRootView style={styles.root}>
159
- <GestureDetector gesture={gesture}>
160
- <View style={styles.cameraContainer}>
161
- <Camera
162
- ref={cameraRef}
163
- style={styles.camera}
164
- device={device}
165
- format={cameraFormat}
166
- isActive={isActive}
167
- torch={torch}
168
- exposure={state.exposure}
169
- zoom={state.zoom}
170
- onInitialized={onInitialized}
171
- photo
172
- />
173
- <Gabarito />
174
- </View>
175
- </GestureDetector>
176
- <View style={containerCaptureStyled}>
177
- <CaptureButton onPress={takePhoto} imagesCount={state.base64Images.length} testID={testID} />
178
- </View>
179
- {state.showButtonInfo && <CameraConfigInfo exposure={state.exposure} zoom={state.zoom} />}
180
- <ModalMessage isLoading={state.loading} modal={state.modal} />
181
- <View style={styles.containerModal}>
182
- <View style={styles.modal}>
183
- {!registerUser && <Text>Se quiser outro dedo, clique abaixo</Text>}
184
- <View style={{ flexDirection: "row", justifyContent: "center", alignItems: "center" }}>
185
- <Picker
186
- disabled={registerUser}
187
- style={pickerStyled}
188
- useNativeAndroidPickerStyle={false}
189
- placeholder={{}}
190
- items={filteredItemsPicker}
191
- value={state.currentFinger}
192
- onValueChange={handleCurrentFinger}
194
+ <BottomSheetModalProvider>
195
+ <GestureDetector gesture={gesture}>
196
+ <View style={styles.camera}>
197
+ <View style={styles.containerText}>
198
+ <HAStepProgress totalSteps={3} step={state.base64Images.length + 1} />
199
+ <Text style={styles.text}>Posicione o dedo {fingerName} na marcação vermelha.</Text>
200
+ </View>
201
+ <Camera
202
+ ref={cameraRef}
203
+ style={StyleSheet.absoluteFillObject}
204
+ device={device}
205
+ format={cameraFormat}
206
+ isActive={isActive}
207
+ torch={torch}
208
+ exposure={state.exposure}
209
+ zoom={state.zoom}
210
+ onInitialized={onInitialized}
211
+ photo
193
212
  />
194
- <Icon name="arrow-down" size={20} color="#000" />
213
+ <Gabarito finger={state.currentFinger} />
195
214
  </View>
215
+ </GestureDetector>
216
+ <View style={containerCaptureStyled}>
217
+ {!registerUser && <HAButton text="Selecionar outro dedo" onPress={handlePresentModalPress} />}
218
+ <HACaptureButton onPress={takePhoto} />
196
219
  </View>
197
- </View>
220
+ <HAModalMessage
221
+ isLoading={state.loading}
222
+ modal={state.modal}
223
+ messageLoading="Estamos processando suas capturas."
224
+ />
225
+ <BottomSheetModal
226
+ ref={bottomSheetModalRef}
227
+ index={1}
228
+ enableDynamicSizing
229
+ snapPoints={snapPoints}
230
+ handleStyle={styles.handleStyle}
231
+ handleIndicatorStyle={styles.handleIndicatorStyle}
232
+ >
233
+ <BottomSheetFlatList
234
+ data={data}
235
+ numColumns={2}
236
+ renderItem={renderItem}
237
+ ListHeaderComponent={ListHeaderComponent}
238
+ contentContainerStyle={styles.contentContainerBottomSheet}
239
+ />
240
+ </BottomSheetModal>
241
+ </BottomSheetModalProvider>
198
242
  </GestureHandlerRootView>
199
243
  );
200
244
  };
@@ -0,0 +1,65 @@
1
+ import LT from "../../assets/svg/fingers/LT.svg";
2
+ import RT from "../../assets/svg/fingers/RT.svg";
3
+ import LI from "../../assets/svg/fingers/LI.svg";
4
+ import RI from "../../assets/svg/fingers/RI.svg";
5
+ import LM from "../../assets/svg/fingers/LM.svg";
6
+ import RM from "../../assets/svg/fingers/RM.svg";
7
+ import LR from "../../assets/svg/fingers/LR.svg";
8
+ import RR from "../../assets/svg/fingers/RR.svg";
9
+ import LP from "../../assets/svg/fingers/LP.svg";
10
+ import RP from "../../assets/svg/fingers/RP.svg";
11
+
12
+ const data: { text: string; ImageComponent: React.FC<React.SVGProps<SVGSVGElement>>; finger: string }[] = [
13
+ {
14
+ text: "Indicador",
15
+ ImageComponent: LI,
16
+ finger: "LI"
17
+ },
18
+ {
19
+ text: "Indicador",
20
+ ImageComponent: RI,
21
+ finger: "RI"
22
+ },
23
+ {
24
+ text: "Médio",
25
+ ImageComponent: LM,
26
+ finger: "LM"
27
+ },
28
+ {
29
+ text: "Médio",
30
+ ImageComponent: RM,
31
+ finger: "RM"
32
+ },
33
+ {
34
+ text: "Anelar",
35
+ ImageComponent: LR,
36
+ finger: "LR"
37
+ },
38
+ {
39
+ text: "Anelar",
40
+ ImageComponent: RR,
41
+ finger: "RR"
42
+ },
43
+ {
44
+ text: "Mínimo",
45
+ ImageComponent: LP,
46
+ finger: "LP"
47
+ },
48
+ {
49
+ text: "Mínimo",
50
+ ImageComponent: RP,
51
+ finger: "RP"
52
+ },
53
+ {
54
+ text: "Polegar",
55
+ ImageComponent: LT,
56
+ finger: "LT"
57
+ },
58
+ {
59
+ text: "Polegar",
60
+ ImageComponent: RT,
61
+ finger: "RT"
62
+ }
63
+ ];
64
+
65
+ export default data;
@@ -1,6 +1,4 @@
1
- import { StyleSheet, Dimensions, Platform } from "react-native";
2
-
3
- const { height } = Dimensions.get("window");
1
+ import { StyleSheet, Platform } from "react-native";
4
2
 
5
3
  export const styles = StyleSheet.create({
6
4
  container: {
@@ -9,51 +7,86 @@ export const styles = StyleSheet.create({
9
7
  root: {
10
8
  flex: 1
11
9
  },
12
- cameraContainer: {
10
+ camera: {
13
11
  flex: 1,
14
12
  justifyContent: "center"
15
13
  },
16
- camera: {
17
- flex: 1,
18
- paddingBottom: height * 0.2
14
+ containerText: {
15
+ position: "absolute",
16
+ top: 0,
17
+ width: "100%",
18
+ alignItems: "center",
19
+ zIndex: 99,
20
+ paddingVertical: 20
21
+ },
22
+ text: {
23
+ color: "#ffffff",
24
+ fontSize: Platform.select({
25
+ ios: 20,
26
+ android: 18
27
+ }),
28
+ fontWeight: "600",
29
+ textAlign: "center",
30
+ paddingHorizontal: 20
19
31
  },
20
32
  containerCapture: {
21
33
  position: "absolute",
22
34
  width: "100%",
23
- alignItems: "center"
35
+ alignItems: "center",
36
+ gap: 20
24
37
  },
25
38
  cameraConfigs: {
26
39
  alignItems: "center"
27
40
  },
28
- containerModalIcon: {
29
- position: "absolute",
30
- top: 10,
31
- right: 10,
32
- zIndex: 9999
41
+ containerItem: {
42
+ alignItems: "center"
33
43
  },
34
- containerModal: {
35
- position: "absolute",
36
- justifyContent: "flex-start",
37
- alignSelf: "center"
44
+ textItem: {
45
+ fontSize: 18,
46
+ color: "#fff",
47
+ fontWeight: "bold",
48
+ paddingVertical: 10
38
49
  },
39
- modal: {
40
- margin: 20,
41
- alignItems: "center",
42
- backgroundColor: "white",
50
+ containerItemContent: {
51
+ padding: 6,
52
+ marginHorizontal: 20,
53
+ marginVertical: 10,
54
+ borderWidth: 2,
55
+ borderColor: "#FFF",
43
56
  borderRadius: 20,
44
- padding: Platform.OS === "ios" ? 35 : 20,
45
- shadowColor: "#000",
46
- shadowOffset: {
47
- width: 0,
48
- height: 2
49
- },
50
- shadowOpacity: 0.25,
51
- shadowRadius: 4,
52
- elevation: 5
53
- },
54
- iconClose: {
57
+ width: 150,
58
+ height: 150,
59
+ justifyContent: "center",
60
+ alignItems: "center"
61
+ },
62
+ iconCheckmark: {
55
63
  position: "absolute",
56
- alignSelf: "flex-end",
57
- padding: 8
64
+ top: 0,
65
+ right: 0,
66
+ margin: 7,
67
+ padding: 5,
68
+ backgroundColor: "#005EFF",
69
+ borderRadius: 50
70
+ },
71
+ textItemContent: {
72
+ color: "#fff",
73
+ fontWeight: "bold"
74
+ },
75
+ handleStyle: {
76
+ backgroundColor: "#0d0d0d"
77
+ },
78
+ handleIndicatorStyle: {
79
+ backgroundColor: "#fff"
80
+ },
81
+ headerBottomSheet: {
82
+ backgroundColor: "#0d0d0d",
83
+ alignItems: "center",
84
+ padding: 10
85
+ },
86
+ titleBottomSheet: { fontSize: 22, fontWeight: "bold", textAlign: "center", color: "#fff" },
87
+ contentContainerBottomSheet: {
88
+ backgroundColor: "#0d0d0d",
89
+ alignItems: "center",
90
+ paddingVertical: 20
58
91
  }
59
92
  });
@@ -1,19 +1,18 @@
1
- import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
- import { StatusBar, View } from "react-native";
1
+ import React, { useCallback, useEffect, useRef, useState } from "react";
2
+ import { View, Text } from "react-native";
3
3
  import Orientation from "react-native-orientation-locker";
4
4
  import { Camera, VideoFile, useCameraDevice, useCameraFormat, useCameraPermission } from "react-native-vision-camera";
5
5
  import { useDispatch, useSelector } from "../../store/modules/lifeCertificate";
6
- import { DeviceNotFound, ModalMessage, RecordButton, CameraConfigInfo } from "../../components";
6
+ import { DeviceNotFound, HAModalMessage, HARecordButton } from "../../components";
7
7
  import { styles } from "./styles";
8
8
  import { useIsForeground } from "../../utils";
9
9
 
10
10
  type Props = {
11
11
  UID: string;
12
12
  mock?: boolean;
13
- testID?: string;
14
13
  };
15
14
 
16
- const LifeCertificate = ({ testID, UID, mock }: Props) => {
15
+ const LifeCertificate = ({ UID, mock }: Props) => {
17
16
  const [torch, setTorch] = useState<"on" | "off">("off");
18
17
  const camera = useRef<Camera>(null);
19
18
  const isActive = useIsForeground();
@@ -44,22 +43,25 @@ const LifeCertificate = ({ testID, UID, mock }: Props) => {
44
43
  dispatch.getConfig("liveness");
45
44
  }, [cameraPermission, dispatch.getConfig]);
46
45
 
47
- const containerRecordStyled = useMemo(
48
- () => [styles.containerRecord, { bottom: state.showButtonInfo ? 75 : 20 }],
49
- [state.showButtonInfo]
50
- );
51
-
52
46
  useEffect(() => {
53
47
  Orientation.lockToPortrait();
54
48
  }, []);
55
49
 
56
50
  useEffect(() => {
57
- if (state.code === 0) {
58
- dispatch.setModal("Sucesso!", `Seu batimento está em: ${state.bpm}.\nProva de vida concluída!`);
51
+ if (state.code === 0 && state.bpm != null) {
52
+ dispatch.setModal(
53
+ "Prova de vida concluída!",
54
+ `Tudo certo! Seu batimento cardíaco está em: ${state.bpm} bpm.`,
55
+ state.bpm
56
+ );
59
57
  mock === true ? setTimeout(() => dispatch.handleLoading(), 2000) : dispatch.handleLoading();
60
58
  }
61
59
  if (state.code !== 0 && state.code !== null) {
62
- dispatch.setModal("Ocorreu um erro!", `Erro: ${state.message}`);
60
+ dispatch.setModal(
61
+ "Algo deu errado!",
62
+ `Não conseguimos ler seus batimentos cardíacos. Tente novamente, por favor.`,
63
+ 0
64
+ );
63
65
  dispatch.handleLoading();
64
66
  }
65
67
  setTimer(10);
@@ -69,7 +71,7 @@ const LifeCertificate = ({ testID, UID, mock }: Props) => {
69
71
  const sendFile = useCallback(
70
72
  async (file: VideoFile) => {
71
73
  if (!UID) {
72
- dispatch.setModal("Ocorreu um erro!", "Erro ao enviar o arquivo (id error)");
74
+ dispatch.setModal("Ocorreu um erro!", "Erro ao enviar o arquivo (id error)", 0);
73
75
  }
74
76
  dispatch.sendLifeCertificate({
75
77
  videoFile: file,
@@ -126,7 +128,14 @@ const LifeCertificate = ({ testID, UID, mock }: Props) => {
126
128
 
127
129
  return (
128
130
  <View style={styles.containerCamera}>
129
- <StatusBar barStyle="light-content" />
131
+ <View style={styles.containerContent}>
132
+ <View style={styles.containerTimer}>
133
+ <Text style={styles.text}>{timer < 0 ? 0 : timer} s</Text>
134
+ </View>
135
+ <Text style={styles.text}>
136
+ Coloque o dedo na câmera, pressione suavemente, clique no botão de captura e aguarde por 10 segundos.
137
+ </Text>
138
+ </View>
130
139
  <Camera
131
140
  ref={camera}
132
141
  style={styles.camera}
@@ -141,17 +150,14 @@ const LifeCertificate = ({ testID, UID, mock }: Props) => {
141
150
  onInitialized={onInitialized}
142
151
  video
143
152
  />
144
- <View style={containerRecordStyled}>
145
- <RecordButton
146
- testID={testID}
147
- onPress={recordingVideo}
148
- disabled={state.isRecording || state.loading}
149
- timer={timer}
150
- isRecording={state.isRecording}
151
- />
153
+ <View style={styles.containerRecord}>
154
+ <HARecordButton onPress={recordingVideo} disabled={state.isRecording || state.loading} />
152
155
  </View>
153
- {state.showButtonInfo && <CameraConfigInfo exposure={state.exposure} zoom={state.zoom} />}
154
- <ModalMessage isLoading={state.loading} modal={state.modal} />
156
+ <HAModalMessage
157
+ isLoading={state.loading}
158
+ modal={state.modal}
159
+ messageLoading="Estamos verificando sua prova de vida."
160
+ />
155
161
  </View>
156
162
  );
157
163
  };
@@ -1,4 +1,4 @@
1
- import { StyleSheet } from "react-native";
1
+ import { StyleSheet, Platform } from "react-native";
2
2
 
3
3
  export const styles = StyleSheet.create({
4
4
  containerCamera: {
@@ -11,11 +11,23 @@ export const styles = StyleSheet.create({
11
11
  containerRecord: {
12
12
  position: "absolute",
13
13
  width: "100%",
14
- alignItems: "center"
14
+ alignItems: "center",
15
+ bottom: 20
16
+ },
17
+ containerContent: { position: "absolute", top: 0, alignItems: "center", zIndex: 99, paddingVertical: 20, gap: 20 },
18
+ containerTimer: {
19
+ backgroundColor: "#00000075",
20
+ borderRadius: 25,
21
+ padding: 6
15
22
  },
16
23
  text: {
17
- fontSize: 20,
18
- fontWeight: "500",
19
- color: "#000"
24
+ color: "#ffffff",
25
+ fontSize: Platform.select({
26
+ ios: 20,
27
+ android: 18
28
+ }),
29
+ fontWeight: "600",
30
+ textAlign: "center",
31
+ paddingHorizontal: 20
20
32
  }
21
33
  });