@regulaforensics/face-sdk 7.1.211-rc → 7.1.253-beta
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.
- package/README.md +1 -1
- package/RNFaceSDK.podspec +3 -3
- package/android/CVDFaceSDK.kt +22 -8
- package/android/build.gradle +1 -1
- package/android/cordova.gradle +1 -1
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +9 -1
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +15 -9
- package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiModule.kt +16 -6
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +32 -2
- package/examples/capacitor/README.md +3 -8
- package/examples/capacitor/android/app/build.gradle +2 -6
- package/examples/capacitor/android/app/capacitor.build.gradle +4 -4
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +3 -16
- package/examples/capacitor/android/app/src/main/java/com/regula/{faceapi → documentreader}/MainActivity.java +1 -1
- package/examples/capacitor/android/app/src/main/res/values/strings.xml +2 -2
- package/examples/capacitor/android/build.gradle +1 -1
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +2 -1
- package/examples/capacitor/android/gradlew +21 -13
- package/examples/capacitor/android/gradlew.bat +12 -10
- package/examples/capacitor/android/variables.gradle +11 -11
- package/examples/capacitor/index.html +8 -104
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +4 -4
- package/examples/capacitor/ios/App/Podfile +2 -3
- package/examples/capacitor/ios/App/Podfile.lock +57 -0
- package/examples/capacitor/package-lock.json +3536 -0
- package/examples/capacitor/package.json +19 -56
- package/examples/capacitor/public/images/portrait.png +0 -0
- package/examples/capacitor/scripts/setup.sh +2 -0
- package/examples/capacitor/src/main.css +77 -0
- package/examples/capacitor/src/main.html +22 -0
- package/examples/capacitor/src/main.tsx +152 -11
- package/examples/capacitor/tsconfig.json +1 -17
- package/examples/capacitor/vite.config.ts +10 -9
- package/examples/cordova/README.md +4 -6
- package/examples/cordova/config.xml +4 -15
- package/examples/cordova/package-lock.json +1313 -0
- package/examples/cordova/package.json +8 -12
- package/examples/cordova/scripts/setup.sh +4 -1
- package/examples/cordova/www/images/portrait.png +0 -0
- package/examples/cordova/www/index.html +19 -92
- package/examples/cordova/www/src/main.css +77 -0
- package/examples/cordova/www/src/main.html +22 -0
- package/examples/cordova/www/{js/index.js → src/main.js} +41 -43
- package/examples/ionic/README.md +3 -6
- package/examples/ionic/angular.json +6 -154
- package/examples/ionic/config.xml +4 -93
- package/examples/ionic/index.html +19 -0
- package/examples/ionic/index.ts +17 -0
- package/examples/ionic/package-lock.json +13777 -0
- package/examples/ionic/package.json +24 -75
- package/examples/ionic/scripts/setup.sh +4 -1
- package/examples/ionic/src/images/portrait.png +0 -0
- package/examples/ionic/src/main.css +77 -0
- package/examples/ionic/src/main.html +22 -0
- package/examples/ionic/src/main.ts +157 -8
- package/examples/ionic/tsconfig.json +6 -20
- package/examples/react-native/Gemfile +7 -0
- package/examples/react-native/README.md +4 -10
- package/examples/react-native/android/app/build.gradle +2 -70
- package/examples/react-native/android/app/src/main/AndroidManifest.xml +21 -21
- package/examples/react-native/android/app/src/main/java/com/regula/{face/api → documentreader}/MainActivity.kt +2 -2
- package/examples/react-native/android/app/src/main/java/com/regula/{face/api → documentreader}/MainApplication.kt +1 -1
- package/examples/react-native/android/build.gradle +3 -3
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/examples/react-native/android/gradle.properties +0 -34
- package/examples/react-native/android/gradlew +1 -2
- package/examples/react-native/android/settings.gradle +1 -1
- package/examples/react-native/images/portrait.png +0 -0
- package/examples/react-native/index.html +11 -0
- package/examples/react-native/index.tsx +51 -0
- package/examples/react-native/ios/{FaceSDK → App}/AppDelegate.mm +1 -1
- package/examples/react-native/ios/{FaceSDK.xcodeproj → App.xcodeproj}/project.pbxproj +52 -269
- package/examples/react-native/ios/{FaceSDK.xcodeproj/xcshareddata/xcschemes/FaceSDK.xcscheme → App.xcodeproj/xcshareddata/xcschemes/App.xcscheme} +9 -27
- package/examples/react-native/ios/{FaceSDK.xcworkspace → App.xcworkspace}/contents.xcworkspacedata +1 -1
- package/examples/react-native/ios/Podfile +3 -6
- package/examples/react-native/ios/Podfile.lock +565 -512
- package/examples/react-native/metro.config.js +16 -11
- package/examples/react-native/package-lock.json +2121 -6901
- package/examples/react-native/package.json +12 -34
- package/examples/react-native/patches/react-native-webview+13.13.5.patch +36 -0
- package/examples/react-native/scripts/android.sh +5 -0
- package/examples/react-native/scripts/ios.sh +5 -1
- package/examples/react-native/src/main.css +77 -0
- package/examples/react-native/src/main.html +22 -0
- package/examples/react-native/{App.tsx → src/main.tsx} +19 -86
- package/ios/RFSWConfig.m +7 -1
- package/ios/RFSWJSONConstructor.h +2 -0
- package/ios/RFSWJSONConstructor.m +32 -15
- package/ios/RFSWMain.m +1 -1
- package/package.json +1 -1
- package/plugin.xml +4 -4
- package/www/capacitor/detect_faces/detect_faces_request.js +2 -0
- package/www/capacitor/face_capture/face_capture_config.js +6 -2
- package/www/capacitor/image_quality/image_quality_characteristic.js +2 -0
- package/www/capacitor/image_quality/image_quality_group.js +1 -0
- package/www/capacitor/init/init_config.js +8 -0
- package/www/capacitor/internal/bridge.js +8 -7
- package/www/capacitor/liveness/liveness_backend_exception.js +8 -0
- package/www/capacitor/liveness/liveness_config.js +3 -3
- package/www/capacitor/person_database/person_database.js +1 -1
- package/www/cordova.js +109 -80
- package/www/react-native/detect_faces/detect_faces_request.js +2 -0
- package/www/react-native/face_capture/face_capture_config.js +6 -2
- package/www/react-native/image_quality/image_quality_characteristic.js +2 -0
- package/www/react-native/image_quality/image_quality_group.js +1 -0
- package/www/react-native/init/init_config.js +8 -0
- package/www/react-native/internal/bridge.js +8 -7
- package/www/react-native/liveness/liveness_backend_exception.js +8 -0
- package/www/react-native/liveness/liveness_config.js +3 -3
- package/www/react-native/person_database/person_database.js +1 -1
- package/www/types/face_capture/face_capture_config.d.ts +6 -1
- package/www/types/init/init_config.d.ts +7 -1
- package/www/types/liveness/liveness_backend_exception.d.ts +9 -1
- package/www/types/liveness/liveness_config.d.ts +1 -1
- package/www/types/person_database/person_database.d.ts +1 -1
- package/.gitlab/report.yaml +0 -75
- package/.gitlab-ci.yml +0 -49
- package/examples/capacitor/.browserslistrc +0 -6
- package/examples/capacitor/.eslintrc.js +0 -17
- package/examples/capacitor/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +0 -26
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -170
- package/examples/capacitor/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -34
- package/examples/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
- package/examples/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/values/ic_launcher_background.xml +0 -4
- package/examples/capacitor/android/app/src/main/res/xml/file_paths.xml +0 -5
- package/examples/capacitor/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +0 -18
- package/examples/capacitor/capacitor.config.ts +0 -12
- package/examples/capacitor/cypress/e2e/test.cy.ts +0 -6
- package/examples/capacitor/cypress/fixtures/example.json +0 -5
- package/examples/capacitor/cypress/support/commands.ts +0 -37
- package/examples/capacitor/cypress/support/e2e.ts +0 -20
- package/examples/capacitor/cypress.config.ts +0 -10
- package/examples/capacitor/public/assets/img/id.png +0 -0
- package/examples/capacitor/public/assets/img/portrait.png +0 -0
- package/examples/capacitor/public/favicon.png +0 -0
- package/examples/capacitor/public/manifest.json +0 -21
- package/examples/capacitor/src/App.test.tsx +0 -8
- package/examples/capacitor/src/App.tsx +0 -42
- package/examples/capacitor/src/components/ExploreContainer.css +0 -24
- package/examples/capacitor/src/components/ExploreContainer.tsx +0 -14
- package/examples/capacitor/src/pages/Home.tsx +0 -159
- package/examples/capacitor/src/setupTests.ts +0 -14
- package/examples/capacitor/src/theme/variables.css +0 -242
- package/examples/capacitor/src/vite-env.d.ts +0 -1
- package/examples/capacitor/tsconfig.node.json +0 -9
- package/examples/cordova/jsconfig.json +0 -1
- package/examples/cordova/www/css/index.css +0 -107
- package/examples/cordova/www/img/id.png +0 -0
- package/examples/cordova/www/img/portrait.png +0 -0
- package/examples/ionic/browserslist +0 -12
- package/examples/ionic/e2e/protractor.conf.js +0 -28
- package/examples/ionic/e2e/src/app.e2e-spec.ts +0 -14
- package/examples/ionic/e2e/src/app.po.ts +0 -11
- package/examples/ionic/e2e/tsconfig.json +0 -13
- package/examples/ionic/karma.conf.js +0 -31
- package/examples/ionic/resources/README.md +0 -8
- package/examples/ionic/resources/android/icon/drawable-hdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-ldpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-mdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xxhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xxxhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-hdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-ldpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-mdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-hdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-ldpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-mdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/xml/network_security_config.xml +0 -6
- package/examples/ionic/resources/ios/icon/icon-1024.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-24@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-27.5@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-44@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-50.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-50@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-72.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-72@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-76.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-76@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-83.5@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-86@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-98@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon.png +0 -0
- package/examples/ionic/resources/ios/icon/icon@2x.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-2436h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-568h@2x~iphone.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-667h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-736h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape-2436h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape-736h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape@2x~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape@~ipadpro.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait@2x~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait@~ipadpro.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default@2x~iphone.png +0 -0
- package/examples/ionic/resources/ios/splash/Default@2x~universal~anyany.png +0 -0
- package/examples/ionic/resources/ios/splash/Default~iphone.png +0 -0
- package/examples/ionic/resources/splash.png +0 -0
- package/examples/ionic/src/app/app-routing.module.ts +0 -15
- package/examples/ionic/src/app/app.component.html +0 -3
- package/examples/ionic/src/app/app.component.spec.ts +0 -47
- package/examples/ionic/src/app/app.component.ts +0 -27
- package/examples/ionic/src/app/app.module.ts +0 -23
- package/examples/ionic/src/app/home/home.module.ts +0 -29
- package/examples/ionic/src/app/home/home.page.html +0 -75
- package/examples/ionic/src/app/home/home.page.scss +0 -1
- package/examples/ionic/src/app/home/home.page.spec.ts +0 -24
- package/examples/ionic/src/app/home/home.page.ts +0 -166
- package/examples/ionic/src/assets/icon/favicon.png +0 -0
- package/examples/ionic/src/assets/img/portrait.png +0 -0
- package/examples/ionic/src/assets/shapes.svg +0 -1
- package/examples/ionic/src/environments/environment.prod.ts +0 -3
- package/examples/ionic/src/environments/environment.ts +0 -16
- package/examples/ionic/src/global.scss +0 -31
- package/examples/ionic/src/index.html +0 -25
- package/examples/ionic/src/polyfills.ts +0 -66
- package/examples/ionic/src/test.ts +0 -20
- package/examples/ionic/src/theme/variables.scss +0 -77
- package/examples/ionic/src/zone-flags.ts +0 -5
- package/examples/ionic/tsconfig.app.json +0 -14
- package/examples/ionic/tsconfig.spec.json +0 -19
- package/examples/ionic/tslint.json +0 -88
- package/examples/react-native/.watchmanconfig +0 -1
- package/examples/react-native/Gemfile.lock +0 -137
- package/examples/react-native/android/app/proguard-rules.pro +0 -10
- package/examples/react-native/android/app/src/debug/AndroidManifest.xml +0 -9
- package/examples/react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
- package/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/values/strings.xml +0 -3
- package/examples/react-native/android/app/src/main/res/values/styles.xml +0 -9
- package/examples/react-native/app.json +0 -5
- package/examples/react-native/index.js +0 -5
- package/examples/react-native/ios/FaceSDKTests/FaceSDKTests.m +0 -66
- package/examples/react-native/ios/FaceSDKTests/Info.plist +0 -24
- /package/examples/capacitor/android/app/src/main/res/{mipmap-xxxhdpi → drawable}/ic_launcher.png +0 -0
- /package/examples/cordova/www/{img → images}/logo.png +0 -0
- /package/examples/ionic/src/{app/app.component.scss → assets/.gitkeep} +0 -0
- /package/examples/ionic/{resources → src/images}/icon.png +0 -0
- /package/examples/react-native/android/app/src/main/res/{mipmap-xxxhdpi → drawable}/ic_launcher.png +0 -0
- /package/examples/react-native/android/app/src/main/res/{mipmap-xxxhdpi → drawable}/ic_launcher_round.png +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/AppDelegate.h +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/Images.xcassets/Contents.json +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/Info.plist +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/LaunchScreen.storyboard +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/PrivacyInfo.xcprivacy +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/main.m +0 -0
- /package/examples/react-native/ios/{FaceSDK.xcworkspace → App.xcworkspace}/xcshareddata/IDEWorkspaceChecks.plist +0 -0
|
@@ -1,64 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "face-sdk",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"type": "module",
|
|
6
3
|
"scripts": {
|
|
7
4
|
"setup": "scripts/setup.sh",
|
|
8
5
|
"ios": "scripts/ios.sh",
|
|
9
|
-
"android": "scripts/android.sh"
|
|
10
|
-
"dev": "vite",
|
|
11
|
-
"build": "tsc && vite build",
|
|
12
|
-
"preview": "vite preview",
|
|
13
|
-
"test.e2e": "cypress run",
|
|
14
|
-
"test.unit": "vitest",
|
|
15
|
-
"lint": "eslint"
|
|
6
|
+
"android": "scripts/android.sh"
|
|
16
7
|
},
|
|
17
8
|
"dependencies": {
|
|
18
|
-
"@regulaforensics/face-sdk": "7.1.
|
|
19
|
-
"@regulaforensics/face-core-basic": "7.1.
|
|
20
|
-
"@awesome-cordova-plugins/camera": "6.6.0",
|
|
9
|
+
"@regulaforensics/face-sdk": "7.1.253-beta",
|
|
10
|
+
"@regulaforensics/face-core-basic": "7.1.99-beta",
|
|
21
11
|
"@awesome-cordova-plugins/file": "6.6.0",
|
|
22
|
-
"@awesome-cordova-plugins/
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"@capacitor/
|
|
26
|
-
"@capacitor/
|
|
27
|
-
"@capacitor/
|
|
28
|
-
"@capacitor/
|
|
29
|
-
"@capacitor/
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"ionicons": "^7.0.0",
|
|
39
|
-
"react": "^18.2.0",
|
|
40
|
-
"react-dom": "^18.2.0",
|
|
41
|
-
"react-router": "^5.3.4",
|
|
42
|
-
"react-router-dom": "^5.3.4"
|
|
43
|
-
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@capacitor/cli": "7.0.0-rc.0",
|
|
46
|
-
"@testing-library/dom": ">=7.21.4",
|
|
47
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
48
|
-
"@testing-library/react": "^14.0.0",
|
|
49
|
-
"@testing-library/user-event": "^14.4.3",
|
|
50
|
-
"@types/react": "^18.0.27",
|
|
51
|
-
"@types/react-dom": "^18.0.10",
|
|
52
|
-
"@vitejs/plugin-legacy": "^5.0.0",
|
|
53
|
-
"@vitejs/plugin-react": "^4.0.1",
|
|
54
|
-
"cypress": "^13.5.0",
|
|
55
|
-
"eslint": "^8.35.0",
|
|
56
|
-
"eslint-plugin-react": "^7.32.2",
|
|
57
|
-
"jsdom": "^22.1.0",
|
|
58
|
-
"terser": "^5.4.0",
|
|
59
|
-
"typescript": "^5.1.6",
|
|
60
|
-
"vite": "^5.0.0",
|
|
61
|
-
"vitest": "^0.34.6"
|
|
62
|
-
},
|
|
63
|
-
"description": "An Ionic project"
|
|
64
|
-
}
|
|
12
|
+
"@awesome-cordova-plugins/camera": "6.6.0",
|
|
13
|
+
"cordova-plugin-file": "8.1.3",
|
|
14
|
+
"cordova-plugin-camera": "8.0.0",
|
|
15
|
+
"@capacitor/dialog": "7.0.1",
|
|
16
|
+
"@capacitor/cli": "7.0.1",
|
|
17
|
+
"@capacitor/core": "7.0.1",
|
|
18
|
+
"@capacitor/app": "7.0.0",
|
|
19
|
+
"@capacitor/ios": "7.0.1",
|
|
20
|
+
"@capacitor/android": "7.0.1",
|
|
21
|
+
"@capacitor/status-bar": "7.0.0",
|
|
22
|
+
"@ionic/react": "8.4.3",
|
|
23
|
+
"@vitejs/plugin-react": "4.3.4",
|
|
24
|
+
"vite-plugin-static-copy": "2.3.1",
|
|
25
|
+
"@types/react-router-dom": "5.3.3"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
html,
|
|
2
|
+
body {
|
|
3
|
+
width: 99%;
|
|
4
|
+
height: 99vh;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.page {
|
|
10
|
+
height: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.column {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.row {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.header {
|
|
31
|
+
text-align: center;
|
|
32
|
+
padding-top: 80px;
|
|
33
|
+
margin-top: -10px;
|
|
34
|
+
background-color: rgba(0, 0, 0, 0.03);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.title {
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
font-size: 18px;
|
|
40
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.divider {
|
|
44
|
+
height: 1px;
|
|
45
|
+
background-color: rgba(0, 0, 0, 0.075);
|
|
46
|
+
margin-top: 13px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.no-scroll {
|
|
50
|
+
flex-grow: 1;
|
|
51
|
+
overflow-y: hidden;
|
|
52
|
+
overflow-x: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.button {
|
|
56
|
+
width: 175px;
|
|
57
|
+
height: 40px;
|
|
58
|
+
margin: 5px;
|
|
59
|
+
margin-top: 10px;
|
|
60
|
+
background-color: #4285F4;
|
|
61
|
+
color: white;
|
|
62
|
+
border: none;
|
|
63
|
+
padding: 10px 20px;
|
|
64
|
+
font-size: 16px;
|
|
65
|
+
border-radius: 100px;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
transition: all 0.3s ease;
|
|
68
|
+
user-select: none;
|
|
69
|
+
-webkit-user-select: none;
|
|
70
|
+
-moz-user-select: none;
|
|
71
|
+
-ms-user-select: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.button:active {
|
|
75
|
+
position: relative;
|
|
76
|
+
top: 1px;
|
|
77
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="page">
|
|
2
|
+
<div class="column header">
|
|
3
|
+
<span id="status" class="title">Loading...</span>
|
|
4
|
+
<div class="column divider"></div>
|
|
5
|
+
</div>
|
|
6
|
+
<div id="main" class="column no-scroll">
|
|
7
|
+
<div class="column">
|
|
8
|
+
<img id="first-image" src="images/portrait.png" width="150px" style="padding: 10px">
|
|
9
|
+
<img id="second-image" src="images/portrait.png" width="150px" style="padding: 10px">
|
|
10
|
+
</div>
|
|
11
|
+
<div class="column" style="padding: 10px">
|
|
12
|
+
<button id="match-faces" class="button">Match</button>
|
|
13
|
+
<button id="start-liveness" class="button">Liveness</button>
|
|
14
|
+
<button id="clear-results" class="button">Clear</button>
|
|
15
|
+
</div>
|
|
16
|
+
<div>
|
|
17
|
+
Similarity: <span style="margin-right: 15px" id="similarity-status">null</span> Liveness: <span
|
|
18
|
+
id="liveness-status">null</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div style="padding-top: 100px;"></div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
@@ -1,11 +1,152 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
)
|
|
1
|
+
import '@ionic/react/css/core.css'
|
|
2
|
+
import './main.css'
|
|
3
|
+
import { setupIonicReact } from '@ionic/react'
|
|
4
|
+
import { StatusBar, Style } from '@capacitor/status-bar'
|
|
5
|
+
import { File } from '@awesome-cordova-plugins/file'
|
|
6
|
+
import { Dialog } from '@capacitor/dialog'
|
|
7
|
+
import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera'
|
|
8
|
+
import { FaceSDK, MatchFacesRequest, MatchFacesImage, InitConfig, LivenessSkipStep, ImageType, LivenessStatus, LivenessConfig } from '@regulaforensics/face-sdk'
|
|
9
|
+
|
|
10
|
+
async function init() {
|
|
11
|
+
if (!await initializeReader()) return
|
|
12
|
+
setStatus("Ready")
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async function startLiveness() {
|
|
16
|
+
var response = await faceSdk.startLiveness({
|
|
17
|
+
config: new LivenessConfig({
|
|
18
|
+
skipStep: [LivenessSkipStep.ONBOARDING_STEP]
|
|
19
|
+
}),
|
|
20
|
+
notificationCompletion: (notification) => {
|
|
21
|
+
console.log("LivenessStatus: " + notification.status)
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
if (response.image == null) return
|
|
25
|
+
setImage("data:image/png;base64," + response.image, ImageType.LIVE, 1)
|
|
26
|
+
setLivenessStatus(response.liveness == LivenessStatus.PASSED ? "passed" : "unknown")
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async function matchFaces() {
|
|
30
|
+
if (image1 == null || image2 == null) {
|
|
31
|
+
setStatus("Both images required!")
|
|
32
|
+
return
|
|
33
|
+
}
|
|
34
|
+
setStatus("Processing...")
|
|
35
|
+
var request = new MatchFacesRequest([image1, image2])
|
|
36
|
+
var response = await faceSdk.matchFaces(request)
|
|
37
|
+
var split = await faceSdk.splitComparedFaces(response.results, 0.75)
|
|
38
|
+
var match = split.matchedFaces
|
|
39
|
+
setSimilarityStatus("failed")
|
|
40
|
+
if (match.length > 0)
|
|
41
|
+
setSimilarityStatus((match[0].similarity * 100).toFixed(2) + "%")
|
|
42
|
+
setStatus("Ready")
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function clearResults() {
|
|
46
|
+
setStatus("Ready")
|
|
47
|
+
setSimilarityStatus("null")
|
|
48
|
+
setLivenessStatus("null")
|
|
49
|
+
resetImages()
|
|
50
|
+
image1 = null
|
|
51
|
+
image2 = null
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// If 'regula.license' exists, init using license(enables offline match)
|
|
55
|
+
// otherwise init without license.
|
|
56
|
+
async function initializeReader() {
|
|
57
|
+
setStatus("Initializing...")
|
|
58
|
+
|
|
59
|
+
var license = await loadAssetIfExists("regula.license")
|
|
60
|
+
var config: InitConfig | undefined
|
|
61
|
+
if (license != null) config = new InitConfig(license)
|
|
62
|
+
var [success, error] = await faceSdk.initialize({ config: config })
|
|
63
|
+
|
|
64
|
+
if (!success && error != null) {
|
|
65
|
+
setStatus(error.message)
|
|
66
|
+
console.log(error.code + ": " + error.message)
|
|
67
|
+
}
|
|
68
|
+
return success
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function setImage(base64: string, type: number, position: number) {
|
|
72
|
+
setSimilarityStatus("null")
|
|
73
|
+
var mfImage = new MatchFacesImage(base64, type)
|
|
74
|
+
if (position == 1) {
|
|
75
|
+
image1 = mfImage
|
|
76
|
+
setUiImage1(base64)
|
|
77
|
+
setLivenessStatus("null")
|
|
78
|
+
}
|
|
79
|
+
if (position == 2) {
|
|
80
|
+
image2 = mfImage
|
|
81
|
+
setUiImage2(base64)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function useCamera(position: number) {
|
|
86
|
+
var response = await faceSdk.startFaceCapture()
|
|
87
|
+
if (response.image == null) return
|
|
88
|
+
var image = response.image
|
|
89
|
+
setImage("data:image/png;base64," + image.image, image.imageType, position)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async function useGallery(position: number) {
|
|
93
|
+
var image = await Camera.getPicture({
|
|
94
|
+
destinationType: DestinationType.DATA_URL,
|
|
95
|
+
mediaType: MediaType.PICTURE,
|
|
96
|
+
sourceType: PictureSourceType.PHOTOLIBRARY
|
|
97
|
+
})
|
|
98
|
+
setImage(image, ImageType.PRINTED, position)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
async function pickImage(position: number) {
|
|
102
|
+
var response = await Dialog.confirm({
|
|
103
|
+
message: "Select option",
|
|
104
|
+
okButtonTitle: "Use camera",
|
|
105
|
+
cancelButtonTitle: "Use gallery"
|
|
106
|
+
})
|
|
107
|
+
if (response.value) useCamera(position)
|
|
108
|
+
else useGallery(position)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function loadAssetIfExists(path: string): Promise<string | null> {
|
|
112
|
+
try {
|
|
113
|
+
var dir = await File.resolveDirectoryUrl(File.applicationDirectory + "public/assets")
|
|
114
|
+
var fileEntry = await File.getFile(dir, path, null)
|
|
115
|
+
var result = await new Promise<string | null>((resolve, _) => {
|
|
116
|
+
fileEntry.file(file => {
|
|
117
|
+
var reader = new FileReader()
|
|
118
|
+
reader.onloadend = (_) => resolve(reader.result as string)
|
|
119
|
+
reader.readAsDataURL(file)
|
|
120
|
+
}, _ => resolve(null))
|
|
121
|
+
})
|
|
122
|
+
return result
|
|
123
|
+
} catch (_) {
|
|
124
|
+
return null
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
var faceSdk = FaceSDK.instance
|
|
129
|
+
var image1: MatchFacesImage | null
|
|
130
|
+
var image2: MatchFacesImage | null
|
|
131
|
+
|
|
132
|
+
var setStatus = (data: string) => document.getElementById("status").innerHTML = data
|
|
133
|
+
var setLivenessStatus = (data: string) => document.getElementById("liveness-status").innerHTML = data
|
|
134
|
+
var setSimilarityStatus = (data: string) => document.getElementById("similarity-status").innerHTML = data
|
|
135
|
+
var setUiImage1 = (data: string) => (document.getElementById("first-image") as HTMLImageElement).src = data
|
|
136
|
+
var setUiImage2 = (data: string) => (document.getElementById("second-image") as HTMLImageElement).src = data
|
|
137
|
+
var resetImages = () => {
|
|
138
|
+
setUiImage1("images/portrait.png")
|
|
139
|
+
setUiImage2("images/portrait.png")
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
setupIonicReact()
|
|
143
|
+
StatusBar.setStyle({ style: Style.Light })
|
|
144
|
+
document.addEventListener('deviceready', () => {
|
|
145
|
+
document.getElementById("first-image").onclick = () => pickImage(1)
|
|
146
|
+
document.getElementById("second-image").onclick = () => pickImage(2)
|
|
147
|
+
document.getElementById("match-faces").onclick = () => matchFaces()
|
|
148
|
+
document.getElementById("start-liveness").onclick = () => startLiveness()
|
|
149
|
+
document.getElementById("clear-results").onclick = () => clearResults()
|
|
150
|
+
|
|
151
|
+
init()
|
|
152
|
+
})
|
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
6
|
-
"allowJs": false,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"esModuleInterop": false,
|
|
9
|
-
"allowSyntheticDefaultImports": true,
|
|
10
|
-
"strict": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"module": "ESNext",
|
|
13
|
-
"moduleResolution": "Node",
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"isolatedModules": true,
|
|
16
|
-
"noEmit": true,
|
|
17
3
|
"jsx": "react-jsx"
|
|
18
|
-
}
|
|
19
|
-
"include": ["src"],
|
|
20
|
-
"references": [{ "path": "./tsconfig.node.json" }]
|
|
4
|
+
}
|
|
21
5
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import legacy from '@vitejs/plugin-legacy'
|
|
2
1
|
import react from '@vitejs/plugin-react'
|
|
3
2
|
import { defineConfig } from 'vite'
|
|
3
|
+
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
4
4
|
|
|
5
|
-
// https://vitejs.dev/config/
|
|
6
5
|
export default defineConfig({
|
|
7
6
|
plugins: [
|
|
8
7
|
react(),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
viteStaticCopy({
|
|
9
|
+
targets: [
|
|
10
|
+
{
|
|
11
|
+
src: 'src/main.html',
|
|
12
|
+
dest: '.'
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
})],
|
|
16
|
+
build: { outDir: 'www' }
|
|
16
17
|
})
|
|
@@ -12,16 +12,14 @@
|
|
|
12
12
|
**Note**: this is just one way of running the app. You can also pass `-o` or `--open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
## How to use
|
|
15
|
+
## How to use offline match
|
|
16
16
|
1. Place a license that supports offline match at `www/regula.license`.
|
|
17
17
|
|
|
18
|
-
2. Change
|
|
19
|
-
|
|
20
|
-
3. Change core with the following commands:
|
|
18
|
+
2. Change core with the following commands:
|
|
21
19
|
```bash
|
|
22
20
|
cordova plugin remove @regulaforensics/face-core-basic
|
|
23
21
|
cordova plugin add @regulaforensics/face-core-match
|
|
24
|
-
|
|
22
|
+
npm run setup
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
3. Turn off the internet and run the app.
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
<widget android-packageName="com.regula.documentreader.api.androidtest" ios-CFBundleIdentifier="com.regula.documentreader.qa" version="1.0.0"
|
|
2
|
+
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
3
|
<name>FaceSDK</name>
|
|
4
|
-
<author email="cordova.support@regulaforensics.com" href="https://mobile.regulaforensics.com">Regula Forensics Inc.</author>
|
|
5
|
-
<content src="index.html" />
|
|
6
|
-
<access origin="*" />
|
|
7
|
-
<allow-intent href="http://*/*" />
|
|
8
|
-
<allow-intent href="https://*/*" />
|
|
9
|
-
<allow-intent href="tel:*" />
|
|
10
|
-
<allow-intent href="sms:*" />
|
|
11
|
-
<allow-intent href="mailto:*" />
|
|
12
|
-
<allow-intent href="geo:*" />
|
|
13
4
|
<platform name="android">
|
|
14
5
|
<preference name="orientation" value="portrait" />
|
|
15
6
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
16
|
-
<preference name="android-minSdkVersion" value="
|
|
7
|
+
<preference name="android-minSdkVersion" value="24" />
|
|
17
8
|
<preference name="android-targetSdkVersion" value="35" />
|
|
18
|
-
<allow-intent href="market:*" />
|
|
19
9
|
<config-file parent="/*" target="AndroidManifest.xml">
|
|
20
10
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
21
11
|
</config-file>
|
|
@@ -25,8 +15,7 @@
|
|
|
25
15
|
</platform>
|
|
26
16
|
<platform name="ios">
|
|
27
17
|
<preference name="orientation" value="portrait" />
|
|
28
|
-
<
|
|
29
|
-
<allow-intent href="itms-apps:*" />
|
|
18
|
+
<preference name="DisallowOverscroll" value="true" />
|
|
30
19
|
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
|
|
31
20
|
<string>To use camera</string>
|
|
32
21
|
</config-file>
|