@oiti/rn-liveness3d 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/README.md +6 -0
  2. package/android/build.gradle +23 -1
  3. package/android/settings.gradle +6 -0
  4. package/android/src/main/AndroidManifest.xml +3 -1
  5. package/android/src/main/java/br/com/oiti/rnliveness3d/RnLiveness3dModule.kt +136 -0
  6. package/android/src/main/java/{com → br/com}/oiti/rnliveness3d/RnLiveness3dPackage.kt +2 -2
  7. package/ios/Podfile +7 -3
  8. package/ios/Podfile.lock +7 -7
  9. package/ios/Pods/Manifest.lock +7 -7
  10. package/ios/RnLiveness3d.m +16 -1
  11. package/ios/RnLiveness3d.swift +203 -10
  12. package/ios/RnLiveness3d.xcodeproj/project.pbxproj +2 -1
  13. package/ios/info.plist +8 -0
  14. package/lib/commonjs/@types/ArgsType.js +2 -0
  15. package/lib/commonjs/@types/ArgsType.js.map +1 -0
  16. package/lib/commonjs/assets/images/imgOp.png +0 -0
  17. package/lib/commonjs/assets/images/left-arrow-b.png +0 -0
  18. package/lib/commonjs/assets/images/rigth-arrow.png +0 -0
  19. package/lib/commonjs/index.js +149 -7
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/screens/Liveness3D/InstructionsView.js +209 -0
  22. package/lib/commonjs/screens/Liveness3D/InstructionsView.js.map +1 -0
  23. package/lib/commonjs/screens/{InstructionsView.js → PermissionView.js} +108 -65
  24. package/lib/commonjs/screens/PermissionView.js.map +1 -0
  25. package/lib/commonjs/utils/normalize.js +16 -0
  26. package/lib/commonjs/utils/normalize.js.map +1 -0
  27. package/lib/module/@types/ArgsType.js +2 -0
  28. package/lib/module/@types/ArgsType.js.map +1 -0
  29. package/lib/module/assets/images/imgOp.png +0 -0
  30. package/lib/module/assets/images/left-arrow-b.png +0 -0
  31. package/lib/module/assets/images/rigth-arrow.png +0 -0
  32. package/lib/module/index.js +143 -7
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/screens/Liveness3D/InstructionsView.js +201 -0
  35. package/lib/module/screens/Liveness3D/InstructionsView.js.map +1 -0
  36. package/lib/module/screens/PermissionView.js +170 -0
  37. package/lib/module/screens/PermissionView.js.map +1 -0
  38. package/lib/module/utils/normalize.js +10 -0
  39. package/lib/module/utils/normalize.js.map +1 -0
  40. package/lib/typescript/@types/ArgsType.d.ts +12 -0
  41. package/lib/typescript/@types/ArgsType.d.ts.map +1 -0
  42. package/lib/typescript/index.d.ts +15 -3
  43. package/lib/typescript/index.d.ts.map +1 -1
  44. package/lib/typescript/screens/Liveness3D/InstructionsView.d.ts +5 -0
  45. package/lib/typescript/screens/Liveness3D/InstructionsView.d.ts.map +1 -0
  46. package/lib/typescript/screens/PermissionView.d.ts +5 -0
  47. package/lib/typescript/screens/PermissionView.d.ts.map +1 -0
  48. package/lib/typescript/utils/normalize.d.ts +2 -0
  49. package/lib/typescript/utils/normalize.d.ts.map +1 -0
  50. package/oiti-rn-liveness3d.podspec +2 -1
  51. package/package.json +1 -1
  52. package/src/@types/ArgsType.ts +12 -0
  53. package/src/assets/images/imgOp.png +0 -0
  54. package/src/assets/images/left-arrow-b.png +0 -0
  55. package/src/assets/images/rigth-arrow.png +0 -0
  56. package/src/index.tsx +173 -8
  57. package/src/screens/Liveness3D/InstructionsView.tsx +214 -0
  58. package/src/screens/PermissionView.tsx +174 -0
  59. package/src/utils/normalize.tsx +10 -0
  60. package/android/src/main/java/com/oiti/rnliveness3d/RnLiveness3dModule.kt +0 -24
  61. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/Info.plist +0 -42
  62. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Assets.car +0 -0
  63. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptcha +0 -0
  64. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/objects-11.0+.nib +0 -0
  65. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/runtime.nib +0 -0
  66. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Headers/FaceCaptcha-Swift.h +0 -666
  67. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Headers/FaceCaptcha.h +0 -19
  68. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Info.plist +0 -0
  69. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Bold.otf +0 -0
  70. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Bold.ttf +0 -0
  71. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Medium.otf +0 -0
  72. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Medium.ttf +0 -0
  73. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Regular.otf +0 -0
  74. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-Regular.ttf +0 -0
  75. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Inter-SemiBold.otf +0 -0
  76. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  77. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios.swiftinterface +0 -2189
  78. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/armv7-apple-ios.swiftdoc +0 -0
  79. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/armv7-apple-ios.swiftinterface +0 -2189
  80. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Modules/module.modulemap +0 -11
  81. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Bold.otf +0 -0
  82. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Bold.ttf +0 -0
  83. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Light.otf +0 -0
  84. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Medium.otf +0 -0
  85. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Medium.ttf +0 -0
  86. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/Ubuntu-Regular.ttf +0 -0
  87. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/_CodeSignature/CodeResources +0 -1304
  88. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_armv7/FaceCaptcha.framework/animation_loading.gif +0 -0
  89. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Assets.car +0 -0
  90. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptcha +0 -0
  91. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/objects-11.0+.nib +0 -0
  92. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/FaceCaptchaDefaultView.nib/runtime.nib +0 -0
  93. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Headers/FaceCaptcha-Swift.h +0 -998
  94. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Headers/FaceCaptcha.h +0 -19
  95. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Info.plist +0 -0
  96. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Bold.otf +0 -0
  97. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Bold.ttf +0 -0
  98. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Medium.otf +0 -0
  99. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Medium.ttf +0 -0
  100. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Regular.otf +0 -0
  101. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-Regular.ttf +0 -0
  102. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Inter-SemiBold.otf +0 -0
  103. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  104. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -2189
  105. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/i386-apple-ios-simulator.swiftdoc +0 -0
  106. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/i386-apple-ios-simulator.swiftinterface +0 -2189
  107. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  108. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/FaceCaptcha.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -2189
  109. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Modules/module.modulemap +0 -11
  110. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Bold.otf +0 -0
  111. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Bold.ttf +0 -0
  112. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Light.otf +0 -0
  113. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Medium.otf +0 -0
  114. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Medium.ttf +0 -0
  115. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/Ubuntu-Regular.ttf +0 -0
  116. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/_CodeSignature/CodeResources +0 -582
  117. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework/ios-arm64_i386_x86_64-simulator/FaceCaptcha.framework/animation_loading.gif +0 -0
  118. package/ios/Pods/FaceCaptcha/Framework/FaceCaptcha.xcframework.zip +0 -0
  119. package/ios/Pods/FaceCaptcha/LICENSE +0 -1
  120. package/ios/Pods/FaceCaptcha/README.md +0 -99
  121. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/Info.plist +0 -42
  122. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Assets.car +0 -0
  123. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/FaceTecSDK +0 -0
  124. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/GenericGuidanceContentLayout.nib +0 -0
  125. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecPublicApi.h +0 -1894
  126. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecPublicStringKeys.h +0 -92
  127. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Headers/FaceTecSDK.h +0 -16
  128. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Info.plist +0 -0
  129. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Modules/module.modulemap +0 -6
  130. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/ReadyScreenGuidanceContentLayout.nib +0 -0
  131. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/RetryScreenGuidanceContentLayout.nib +0 -0
  132. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/SharedGuidanceLayout.nib +0 -0
  133. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/9Uo-4b-JiE-view-Ae0-rb-UqS.nib +0 -0
  134. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/CJ6-MX-bJp-view-8JL-Rc-0g1.nib +0 -0
  135. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceScanViewController.nib +0 -0
  136. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecAdditionalReviewViewController.nib +0 -0
  137. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/FaceTecOCRConfirmationViewController.nib +0 -0
  138. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/IDCaptureViewController.nib +0 -0
  139. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/IDSelectionViewController.nib +0 -0
  140. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/Info.plist +0 -0
  141. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/Pyw-6G-JSY-view-Zue-Eo-Q2U.nib +0 -0
  142. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/alz-Ia-X3d-view-IKu-EI-Hug.nib +0 -0
  143. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/Storyboard.storyboardc/l2Q-cc-kD8-view-UUy-6c-meu.nib +0 -0
  144. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/attributions.txt +0 -137
  145. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/1f5b84f51ce0fcfbb76e904b7bcaa7560f601e1394a0b29367a09385312287eb +0 -0
  146. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/2b075ac1a6132b5b8a4c9ef0ba6b0cd84db7838aca9a000e50d907f40770a4ab +0 -0
  147. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/4c4774668f9b9333977fc891e7695420a0b4c27cc2c1cd3920ce9e0870e3c0e8 +0 -0
  148. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/59cc2a9af81aaca2376702c2490650f4da2775fa673274db98aad41b7ef101c0 +0 -0
  149. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/5b63e98b991aedabb60665503384f30bffd939decf9433883b30b78011ee501a +0 -0
  150. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/66388dc76dc16bc6b76b682edd218a575bf45b9b +0 -0
  151. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/6b3133f0f39ff89a2a169d61176ee17cafacc5e288f334e2b64ee82892d11ccd +0 -0
  152. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/9077d16225f9314163ef1e7db6fc7d4088bb903d134bd95f23d5591ca4dfbfca +0 -0
  153. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/Ys4TQh4aewlf1CpyzWLi +0 -0
  154. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/a74f2afb9d20f2375ccbd14e67c094b85c89ceb608f7cf8ae04f3f646a6c5672 +0 -0
  155. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/b501893e75f62ee1707643e35b21109927b07ed5b202321c961b424cbc2e4695 +0 -0
  156. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/b82962a4847bcf6d1bf89ea7543f83e184a1df7c4e7e3c343dd3e3e17cb9a645 +0 -0
  157. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/dbd7a353f0130bb983d6ba05917e9be991d70e8f028df4b74e30bc6497ef7f71 +0 -0
  158. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/f2.xml +0 -0
  159. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/fd6d368a5658496536e2bfae170d1b823a3629b242cafc09784bfba4e56d8c80 +0 -0
  160. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/marker +0 -0
  161. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/cache_uyertuazlkxcjrlwkejr/39bb748b334003e3fa/vu0ilin6we3lrzo5f83f7qs2jul4aq7v4aoynrmch8zfvpi8ezrfyafa4t0fx87l +0 -0
  162. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/en.lproj/FaceTec.strings +0 -0
  163. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_armv7/FaceTecSDK.framework/strip-unused-architectures-from-target.sh +0 -62
  164. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/FaceTecSDK +0 -0
  165. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecPublicApi.h +0 -1894
  166. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecPublicStringKeys.h +0 -92
  167. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Headers/FaceTecSDK.h +0 -16
  168. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Info.plist +0 -0
  169. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/Modules/module.modulemap +0 -6
  170. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework/ios-arm64_i386_x86_64-simulator/FaceTecSDK.framework/_CodeSignature/CodeResources +0 -162
  171. package/ios/Pods/OILiveness3D_FT/Framework/FaceTecSDK.xcframework.zip +0 -0
  172. package/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -661
  173. package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha-xcframeworks.sh +0 -121
  174. package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha.debug.xcconfig +0 -16
  175. package/ios/Pods/Target Support Files/FaceCaptcha/FaceCaptcha.release.xcconfig +0 -16
  176. package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT-xcframeworks.sh +0 -121
  177. package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT.debug.xcconfig +0 -14
  178. package/ios/Pods/Target Support Files/OILiveness3D_FT/OILiveness3D_FT.release.xcconfig +0 -14
  179. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-Info.plist +0 -26
  180. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-acknowledgements.markdown +0 -8
  181. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-acknowledgements.plist +0 -40
  182. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-dummy.m +0 -5
  183. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d-umbrella.h +0 -16
  184. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.debug.xcconfig +0 -14
  185. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.modulemap +0 -6
  186. package/ios/Pods/Target Support Files/Pods-RnLiveness3d/Pods-RnLiveness3d.release.xcconfig +0 -14
  187. package/lib/commonjs/assets/images/wave_bg.svg +0 -4
  188. package/lib/commonjs/screens/InstructionsView.js.map +0 -1
  189. package/lib/module/assets/images/wave_bg.svg +0 -4
  190. package/lib/module/screens/InstructionsView.js +0 -126
  191. package/lib/module/screens/InstructionsView.js.map +0 -1
  192. package/lib/typescript/screens/InstructionsView.d.ts +0 -2
  193. package/lib/typescript/screens/InstructionsView.d.ts.map +0 -1
  194. package/src/assets/images/wave_bg.svg +0 -4
  195. package/src/screens/InstructionsView.tsx +0 -141
@@ -1,5 +1,17 @@
1
- export declare function startLiveness3d(appKey: string): Promise<any>;
2
- export declare function StartLiveness3dCustomView({ instructionView, }: {
3
- instructionView: any;
1
+ import { FC } from 'react';
2
+ import type { ArgsType } from './@types/ArgsType';
3
+ export declare function startLiveness3d(options: ArgsType): Promise<any>;
4
+ export declare function logEvent3D(name: string, appkey: string): Promise<any>;
5
+ export declare function checkIosPermission(): Promise<any>;
6
+ export declare function checkIosPermissionGranted(): Promise<any>;
7
+ export declare function Liveness3dView({ CustomInstructionView, CustomPermissionView, options, }: {
8
+ CustomInstructionView: FC;
9
+ CustomPermissionView: FC;
10
+ options: ArgsType;
11
+ }): JSX.Element;
12
+ export declare function GetIntructionView({ CustomInstructionView, CustomPermissionView, options, }: {
13
+ CustomInstructionView: FC;
14
+ CustomPermissionView: FC;
15
+ options: ArgsType;
4
16
  }): JSX.Element;
5
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAE5D;AAED,wBAAgB,yBAAyB,CAAC,EACxC,eAAe,GAChB,EAAE;IACD,eAAe,EAAE,GAAG,CAAC;CACtB,eAEA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAuB,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AA0BlD,wBAAgB,eAAe,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAwB/D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAErE;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,GAAG,CAAC,CAEjD;AACD,wBAAgB,yBAAyB,IAAI,OAAO,CAAC,GAAG,CAAC,CAExD;AAoDD,wBAAgB,cAAc,CAAC,EAC7B,qBAAqB,EACrB,oBAAoB,EACpB,OAAO,GACR,EAAE;IACD,qBAAqB,EAAE,EAAE,CAAC;IAC1B,oBAAoB,EAAE,EAAE,CAAC;IACzB,OAAO,EAAE,QAAQ,CAAC;CACnB,eAQA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,qBAAqB,EACrB,oBAAoB,EACpB,OAAO,GACR,EAAE;IACD,qBAAqB,EAAE,EAAE,CAAC;IAC1B,oBAAoB,EAAE,EAAE,CAAC;IACzB,OAAO,EAAE,QAAQ,CAAC;CACnB,eAsDA"}
@@ -0,0 +1,5 @@
1
+ export default function InstructionsView({ onVerify, onBack, }: {
2
+ onVerify(): void;
3
+ onBack(): void;
4
+ }): JSX.Element;
5
+ //# sourceMappingURL=InstructionsView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstructionsView.d.ts","sourceRoot":"","sources":["../../../../src/screens/Liveness3D/InstructionsView.tsx"],"names":[],"mappings":"AAkBA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,MAAM,GACP,EAAE;IACD,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,IAAI,CAAC;CAChB,eAkDA"}
@@ -0,0 +1,5 @@
1
+ export default function PermissionView({ onVerify, onBack, }: {
2
+ onVerify(): void;
3
+ onBack(): void;
4
+ }): JSX.Element;
5
+ //# sourceMappingURL=PermissionView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionView.d.ts","sourceRoot":"","sources":["../../../src/screens/PermissionView.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,QAAQ,EACR,MAAM,GACP,EAAE;IACD,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,IAAI,CAAC;CAChB,eA+BA"}
@@ -0,0 +1,2 @@
1
+ export declare function normalize(size: any, scale: any): any;
2
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/utils/normalize.tsx"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,OAO9C"}
@@ -17,7 +17,8 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.ios.dependency 'FaceCaptcha', '~> 4.0.9-beta1'
20
+ s.ios.dependency 'FaceCaptcha', '~> 4.1.1'
21
+ #s.ios.dependency 'OISecurity', '~> 1.0.0'
21
22
 
22
23
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
24
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oiti/rn-liveness3d",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -0,0 +1,12 @@
1
+ export type ArgsType = {
2
+ appkey: string;
3
+ environment: '.HML' | '.PRD';
4
+ baseUrl: string;
5
+ apparence: ApparenceType;
6
+ liveness3Dtext: object;
7
+ };
8
+
9
+ export type ApparenceType = {
10
+ backgroundColor: string | undefined;
11
+ loadingColor: string | undefined;
12
+ };
Binary file
package/src/index.tsx CHANGED
@@ -1,5 +1,8 @@
1
- import React from 'react';
2
- import { NativeModules, Platform } from 'react-native';
1
+ import React, { FC, useEffect, useState } from 'react';
2
+ import { NativeModules, Platform, PermissionsAndroid } from 'react-native';
3
+ import type { ArgsType } from './@types/ArgsType';
4
+ import InstructionsView from './screens/Liveness3D/InstructionsView';
5
+ import PermissionView from './screens/PermissionView';
3
6
 
4
7
  const LINKING_ERROR =
5
8
  `The package '@oiti/rn-liveness3d' doesn't seem to be linked. Make sure: \n\n` +
@@ -7,6 +10,11 @@ const LINKING_ERROR =
7
10
  '- You rebuilt the app after installing the package\n' +
8
11
  '- You are not using Expo Go\n';
9
12
 
13
+ const SCREEN = Object.freeze({
14
+ INSTRUCTION_VIEW: 1,
15
+ PERMISSION_VIEW: 2,
16
+ } as const);
17
+
10
18
  const RnLiveness3d = NativeModules.RnLiveness3d
11
19
  ? NativeModules.RnLiveness3d
12
20
  : new Proxy(
@@ -18,14 +26,171 @@ const RnLiveness3d = NativeModules.RnLiveness3d
18
26
  }
19
27
  );
20
28
 
21
- export function startLiveness3d(appKey: string): Promise<any> {
22
- return RnLiveness3d.startliveness3d(appKey);
29
+ export function startLiveness3d(options: ArgsType): Promise<any> {
30
+ let args: ArgsType = {
31
+ appkey: options?.appkey === undefined ? '' : options?.appkey,
32
+ environment:
33
+ options?.environment === undefined ? '.HML' : options?.environment,
34
+ baseUrl: options?.baseUrl === undefined ? '' : options?.baseUrl,
35
+ apparence: {
36
+ backgroundColor:
37
+ options?.apparence?.backgroundColor === ''
38
+ ? '#1E1E1E'
39
+ : options?.apparence?.backgroundColor,
40
+ loadingColor:
41
+ options?.apparence?.loadingColor === ''
42
+ ? '#05D758'
43
+ : options?.apparence?.loadingColor,
44
+ },
45
+ liveness3Dtext: options.liveness3Dtext || [],
46
+ };
47
+
48
+ if (Platform.OS === 'android') {
49
+ return RnLiveness3d.startliveness3d(args.appkey);
50
+ }
51
+
52
+ return RnLiveness3d.startliveness3d(args);
53
+ }
54
+
55
+ export function logEvent3D(name: string, appkey: string): Promise<any> {
56
+ return RnLiveness3d.logevent({ event: name, appkey: appkey });
57
+ }
58
+
59
+ export function checkIosPermission(): Promise<any> {
60
+ return RnLiveness3d.checkiospermission({ p: 'granted' });
61
+ }
62
+ export function checkIosPermissionGranted(): Promise<any> {
63
+ return RnLiveness3d.checkpermissiongranted({ p: 'granted' });
23
64
  }
24
65
 
25
- export function StartLiveness3dCustomView({
26
- instructionView,
66
+ const PERMISSIONS_REQUEST: any = PermissionsAndroid.PERMISSIONS.CAMERA;
67
+
68
+ const requestCameraPermission = async (options: ArgsType) => {
69
+ if (Platform.OS === 'ios') {
70
+ checkIosPermission().then((result) => {
71
+ if (result === 'true') {
72
+ return RnLiveness3d.startliveness3d(options);
73
+ }
74
+ if (result === 'false') {
75
+ return;
76
+ }
77
+ });
78
+ }
79
+ try {
80
+ const granted = await PermissionsAndroid.request(PERMISSIONS_REQUEST, {
81
+ title: 'Cool Photo App Camera Permission',
82
+ message: 'Precisamos acessar sua cãmera ',
83
+ buttonNeutral: 'Ver Depois',
84
+ buttonNegative: 'Cancelar',
85
+ buttonPositive: 'OK',
86
+ });
87
+
88
+ if (granted === PermissionsAndroid.RESULTS.GRANTED) {
89
+ startLiveness3d(options).then((result) => console.log(result));
90
+ } else {
91
+ console.log('Camera permission denied');
92
+ }
93
+ } catch (err) {
94
+ console.warn(err);
95
+ }
96
+ };
97
+
98
+ async function checkPermission(): Promise<boolean> {
99
+ if (Platform.OS === 'ios') {
100
+ const grantediso = await checkIosPermissionGranted();
101
+ if (grantediso === 'true') {
102
+ return true;
103
+ }
104
+ if (grantediso === 'false') {
105
+ return false;
106
+ }
107
+ }
108
+ const granted = await PermissionsAndroid.check(PERMISSIONS_REQUEST);
109
+ if (granted) {
110
+ return true;
111
+ } else {
112
+ return false;
113
+ }
114
+ }
115
+
116
+ export function Liveness3dView({
117
+ CustomInstructionView,
118
+ CustomPermissionView,
119
+ options,
27
120
  }: {
28
- instructionView: any;
121
+ CustomInstructionView: FC;
122
+ CustomPermissionView: FC;
123
+ options: ArgsType;
29
124
  }) {
30
- return <>{instructionView}</>;
125
+ return (
126
+ <GetIntructionView
127
+ CustomInstructionView={CustomInstructionView}
128
+ CustomPermissionView={CustomPermissionView}
129
+ options={options}
130
+ />
131
+ );
132
+ }
133
+
134
+ export function GetIntructionView({
135
+ CustomInstructionView,
136
+ CustomPermissionView,
137
+ options,
138
+ }: {
139
+ CustomInstructionView: FC;
140
+ CustomPermissionView: FC;
141
+ options: ArgsType;
142
+ }) {
143
+ const [screen, setScreen] = useState(1);
144
+
145
+ function onBack() {
146
+ switch (screen) {
147
+ case SCREEN.INSTRUCTION_VIEW:
148
+ setScreen(1);
149
+ break;
150
+ case SCREEN.PERMISSION_VIEW:
151
+ setScreen(1);
152
+ break;
153
+ }
154
+ }
155
+ async function verifyPermission() {
156
+ if (screen === 1) {
157
+ logEvent3D('ACTION_L3FT_instructionContinue', options.appkey);
158
+ if ((await checkPermission()) === true) {
159
+ startLiveness3d(options).then((result) => console.log(result));
160
+ } else {
161
+ setScreen(2);
162
+ }
163
+ }
164
+ if (screen === 2) {
165
+ logEvent3D('ACTION_L3FT_permissionVerify', options.appkey);
166
+ await requestCameraPermission(options);
167
+ setScreen(1);
168
+ }
169
+ }
170
+ useEffect(() => {
171
+ if (screen === 1) {
172
+ logEvent3D('STATE_L3FT_instructionView', options.appkey);
173
+ }
174
+ if (screen === 2) {
175
+ logEvent3D('STATE_L3FT_permissionView', options.appkey);
176
+ }
177
+ });
178
+
179
+ return (
180
+ <>
181
+ {screen === 1 &&
182
+ (!CustomInstructionView ? (
183
+ <InstructionsView onVerify={verifyPermission} onBack={onBack} />
184
+ ) : (
185
+ CustomInstructionView
186
+ ))}
187
+
188
+ {screen === 2 &&
189
+ (!CustomPermissionView ? (
190
+ <PermissionView onVerify={verifyPermission} onBack={onBack} />
191
+ ) : (
192
+ CustomPermissionView
193
+ ))}
194
+ </>
195
+ );
31
196
  }
@@ -0,0 +1,214 @@
1
+ import * as React from 'react';
2
+
3
+ import {
4
+ StyleSheet,
5
+ View,
6
+ Text,
7
+ Image,
8
+ TouchableOpacity,
9
+ Dimensions,
10
+ Platform,
11
+ } from 'react-native';
12
+ import { normalize } from '../../utils/normalize';
13
+
14
+ const { width: SCREEN_WIDTH, height: SCREEN_HEIGHT } = Dimensions.get('window');
15
+
16
+ const scaleW = SCREEN_WIDTH / 320;
17
+ const scaleH = SCREEN_HEIGHT / 920;
18
+
19
+ export default function InstructionsView({
20
+ onVerify,
21
+ onBack,
22
+ }: {
23
+ onVerify(): void;
24
+ onBack(): void;
25
+ }) {
26
+ return (
27
+ <View style={styles.container}>
28
+ <View style={styles.boxImg}>
29
+ <TouchableOpacity onPress={() => onBack()} style={styles.navigationBar}>
30
+ <Image
31
+ source={require('../../assets/images/left-arrow.png')}
32
+ style={styles.leftArrow}
33
+ />
34
+ </TouchableOpacity>
35
+ <View style={styles.imgContainer}>
36
+ <Image
37
+ source={require('../../assets/images/img_face.png')}
38
+ style={styles.imgFace}
39
+ />
40
+ </View>
41
+ </View>
42
+
43
+ <View style={styles.boxBtn}>
44
+ <Text style={styles.title}>Reconhecimento Facial</Text>
45
+ <Text style={styles.subtitle}>Isso garante que você é você mesmo.</Text>
46
+
47
+ <View style={styles.intructions}>
48
+ <View style={styles.rowInstructions}>
49
+ <View style={styles.boxIcon}>
50
+ <Image
51
+ source={require('../../assets/images/lightbulb_outline.png')}
52
+ />
53
+ </View>
54
+ <Text style={styles.boxText}>
55
+ Escolha um ambiente bem iluminado.
56
+ </Text>
57
+ </View>
58
+ <View style={styles.rowInstructions}>
59
+ <View style={styles.boxIcon}>
60
+ <Image source={require('../../assets/images/face.png')} />
61
+ </View>
62
+ <Text style={styles.boxText}>
63
+ Não use acessórios como bonés, máscaras e afins.
64
+ </Text>
65
+ </View>
66
+ </View>
67
+ <View style={styles.viewBtn}>
68
+ <TouchableOpacity onPress={() => onVerify()} style={styles.nextBtn}>
69
+ <Text style={styles.nextText}>Continuar</Text>
70
+ </TouchableOpacity>
71
+ </View>
72
+ </View>
73
+ </View>
74
+ );
75
+ }
76
+
77
+ const styles = StyleSheet.create({
78
+ container: {
79
+ flex: 1,
80
+ alignItems: 'center',
81
+ backgroundColor: '#1648CD',
82
+ width: '100%',
83
+ justifyContent: 'center',
84
+ },
85
+ rowInstructions: {
86
+ width: '100%',
87
+ flex: 2,
88
+ alignItems: 'center',
89
+ flexDirection: 'row',
90
+ },
91
+ viewBtn: {
92
+ width: '90%',
93
+ flex: 1,
94
+ justifyContent: 'center',
95
+ alignItems: 'center',
96
+ },
97
+ navigationBar: {
98
+ width: '100%',
99
+ },
100
+ intructions: {
101
+ width: '90%',
102
+ flex: 1.5,
103
+ },
104
+ boxIcon: {
105
+ width: 64,
106
+ height: 64,
107
+ alignItems: 'center',
108
+ justifyContent: 'center',
109
+ borderColor: '#E0E0E0',
110
+ borderWidth: 1,
111
+ backgroundColor: '#F5f5f5',
112
+ borderRadius: 100,
113
+ },
114
+ boxText: {
115
+ paddingLeft: 20,
116
+ width: '75%',
117
+ color: '#000000',
118
+ fontSize: normalize(25, scaleW),
119
+ },
120
+ imgContainer: {
121
+ flex: 1,
122
+ width: '90%',
123
+ alignItems: 'center',
124
+ justifyContent: 'flex-end',
125
+ },
126
+ title: {
127
+ marginTop: 30,
128
+ marginLeft: 20,
129
+ width: '90%',
130
+ fontSize: normalize(29, scaleW),
131
+ fontWeight: 'bold',
132
+ /* fontFamily: 'Ubuntu-Bold', */
133
+ color: '#1E1E1E',
134
+ },
135
+ nextBtn: {
136
+ width: 300,
137
+ backgroundColor: '#05D758',
138
+ alignItems: 'center',
139
+ fontWeight: 900,
140
+ borderRadius: 50,
141
+ marginTop: 0,
142
+ },
143
+ nextText: {
144
+ /* fontFamily: 'Ubuntu-Medium', */
145
+ fontSize: normalize(25, scaleW),
146
+ margin: 13,
147
+ color: '#000000',
148
+ },
149
+ description_one: {
150
+ textAlign: 'center',
151
+ color: '#FFFFFF',
152
+ /* fontFamily: 'Ubuntu-Bold', */
153
+ fontSize: 30,
154
+ marginLeft: 60,
155
+ marginRight: 60,
156
+ marginTop: 10,
157
+ },
158
+ boxInfo: {
159
+ width: '100%',
160
+ paddingTop: 15,
161
+ alignItems: 'center',
162
+ backgroundColor: '#037eee',
163
+ },
164
+ boxBtn: {
165
+ width: '100%',
166
+ flex: Platform.OS === 'ios' ? 1 : 1.3,
167
+ borderTopLeftRadius: 35,
168
+ borderTopRightRadius: 35,
169
+ height: '100%',
170
+ alignItems: 'center',
171
+ backgroundColor: '#FFFFFF',
172
+ },
173
+ boxImg: {
174
+ width: '100%',
175
+ flex: 1,
176
+ height: '100%',
177
+ alignItems: 'center',
178
+ },
179
+ subtitle: {
180
+ /* fontFamily: 'Ubuntu-Regular', */
181
+ fontSize: normalize(20, scaleW),
182
+ marginLeft: 20,
183
+ width: '90%',
184
+ color: '#666666',
185
+ paddingBottom: 25,
186
+ },
187
+ iconTop: {
188
+ marginTop: 60,
189
+ marginLeft: 20,
190
+ width: 55,
191
+ height: 55,
192
+ },
193
+ leftArrow: {
194
+ marginTop: normalize(70, scaleH),
195
+ marginLeft: 20,
196
+ width: 25,
197
+ height: 25,
198
+ },
199
+ imgFace: {
200
+ height: '100%',
201
+ flex: 1,
202
+ aspectRatio: 4 / 4.4,
203
+ },
204
+ waveTop: {
205
+ flex: 1,
206
+ width: '100%',
207
+ height: 400,
208
+ },
209
+ box: {
210
+ width: 60,
211
+ height: 60,
212
+ marginVertical: 20,
213
+ },
214
+ });
@@ -0,0 +1,174 @@
1
+ import * as React from 'react';
2
+ import { Dimensions } from 'react-native';
3
+
4
+ import { StyleSheet, View, Text, Image, TouchableOpacity } from 'react-native';
5
+ import { normalize } from '../utils/normalize';
6
+
7
+ const { height: SCREEN_HEIGHT } = Dimensions.get('window');
8
+
9
+ //const scaleW = SCREEN_WIDTH / 320;
10
+ const scaleH = SCREEN_HEIGHT / 920;
11
+
12
+ export default function PermissionView({
13
+ onVerify,
14
+ onBack,
15
+ }: {
16
+ onVerify(): void;
17
+ onBack(): void;
18
+ }) {
19
+ return (
20
+ <View style={styles.container}>
21
+ <View style={styles.navigationBar}>
22
+ <TouchableOpacity onPress={() => onBack()} style={styles.navigationBar}>
23
+ <Image
24
+ source={require('../assets/images/left-arrow-b.png')}
25
+ style={styles.leftArrow}
26
+ />
27
+ </TouchableOpacity>
28
+ </View>
29
+
30
+ <View style={styles.containerPerm}>
31
+ <View style={styles.imgContainer}>
32
+ <Image
33
+ source={require('../assets/images/camera_alt.png')}
34
+ style={styles.imgFace}
35
+ />
36
+ <View style={styles.intructions}>
37
+ <Text style={styles.title}>Permissões da câmera desativadas.</Text>
38
+ <Text style={styles.subtitle}>
39
+ Habilitar as configurações do seu aparelho.
40
+ </Text>
41
+ <TouchableOpacity onPress={() => onVerify()} style={styles.nextBtn}>
42
+ <Text style={styles.nextText}>Verificar</Text>
43
+ </TouchableOpacity>
44
+ </View>
45
+ </View>
46
+ </View>
47
+ </View>
48
+ );
49
+ }
50
+
51
+ const styles = StyleSheet.create({
52
+ container: {
53
+ flex: 1,
54
+ alignItems: 'center',
55
+ backgroundColor: '#FFFFF',
56
+ width: '100%',
57
+ justifyContent: 'center',
58
+ },
59
+ rowInstructions: {
60
+ width: '100%',
61
+ flex: 2,
62
+ alignItems: 'center',
63
+ flexDirection: 'row',
64
+ },
65
+ viewBtn: {
66
+ width: '90%',
67
+ flex: 1,
68
+ justifyContent: 'center',
69
+ alignItems: 'center',
70
+ },
71
+ navigationBar: {
72
+ width: '100%',
73
+ backgroundColor: '#FFF',
74
+ },
75
+ containerPerm: {
76
+ width: '100%',
77
+ backgroundColor: '#FFFFFF',
78
+ justifyContent: 'center',
79
+ flex: 1,
80
+ alignItems: 'center',
81
+ },
82
+ intructions: {
83
+ width: '90%',
84
+ flex: 1,
85
+ },
86
+ boxIcon: {
87
+ width: 64,
88
+ height: 64,
89
+ alignItems: 'center',
90
+ justifyContent: 'center',
91
+ borderColor: '#E0E0E0',
92
+ borderWidth: 1,
93
+ backgroundColor: '#F5f5f5',
94
+ borderRadius: 100,
95
+ },
96
+ boxText: {
97
+ paddingLeft: 20,
98
+ width: '75%',
99
+ color: '#000000',
100
+ fontSize: 25,
101
+ },
102
+ imgContainer: {
103
+ flex: 1,
104
+ width: '90%',
105
+ marginTop: 100,
106
+ alignItems: 'center',
107
+ textAlign: 'center',
108
+ justifyContent: 'center',
109
+ },
110
+ title: {
111
+ marginTop: 30,
112
+ width: '100%',
113
+ marginBottom: 20,
114
+ fontSize: 29,
115
+ fontWeight: 'bold',
116
+ alignItems: 'center',
117
+ textAlign: 'center',
118
+ /* fontFamily: 'Ubuntu-Bold', */
119
+ color: '#1E1E1E',
120
+ },
121
+ nextBtn: {
122
+ width: '100%',
123
+ backgroundColor: '#05D758',
124
+ alignItems: 'center',
125
+ fontWeight: 900,
126
+ borderRadius: 50,
127
+ marginTop: 0,
128
+ },
129
+ nextText: {
130
+ /* fontFamily: 'Ubuntu-Medium', */
131
+ fontSize: 25,
132
+ margin: 13,
133
+ },
134
+ boxBtn: {
135
+ width: '100%',
136
+ flex: 1,
137
+ borderTopLeftRadius: 35,
138
+ borderTopRightRadius: 35,
139
+ alignItems: 'center',
140
+ backgroundColor: '#FFFFFF',
141
+ },
142
+ subtitle: {
143
+ /* fontFamily: 'Ubuntu-Regular', */
144
+ fontSize: 23,
145
+ width: '100%',
146
+ color: '#666666',
147
+ alignItems: 'center',
148
+ textAlign: 'center',
149
+ paddingBottom: 25,
150
+ },
151
+ iconTop: {
152
+ marginTop: 60,
153
+ marginLeft: 20,
154
+ width: 55,
155
+ height: 55,
156
+ },
157
+ leftArrow: {
158
+ marginTop: normalize(70, scaleH),
159
+ marginLeft: 20,
160
+ width: 25,
161
+ height: 25,
162
+ },
163
+ imgFace: {},
164
+ waveTop: {
165
+ flex: 1,
166
+ width: '100%',
167
+ height: 400,
168
+ },
169
+ box: {
170
+ width: 60,
171
+ height: 60,
172
+ marginVertical: 20,
173
+ },
174
+ });
@@ -0,0 +1,10 @@
1
+ import { Platform, PixelRatio } from 'react-native';
2
+
3
+ export function normalize(size: any, scale: any) {
4
+ const newSize = size * scale;
5
+ if (Platform.OS === 'ios') {
6
+ return size;
7
+ } else {
8
+ return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 10;
9
+ }
10
+ }