@regulaforensics/face-sdk 6.4.229-rc → 6.4.255-rc
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 +2 -2
- 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 +18 -55
- 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 +7 -11
- 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 +23 -74
- 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/Gemfile.lock +28 -21
- 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 +11 -33
- 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 +3 -3
- 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/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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
DELETED
|
Binary file
|
|
Binary file
|
package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
DELETED
|
Binary file
|
|
Binary file
|
package/examples/capacitor/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
package com.getcapacitor.myapp;
|
|
2
|
-
|
|
3
|
-
import static org.junit.Assert.*;
|
|
4
|
-
|
|
5
|
-
import org.junit.Test;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Example local unit test, which will execute on the development machine (host).
|
|
9
|
-
*
|
|
10
|
-
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
11
|
-
*/
|
|
12
|
-
public class ExampleUnitTest {
|
|
13
|
-
|
|
14
|
-
@Test
|
|
15
|
-
public void addition_isCorrect() throws Exception {
|
|
16
|
-
assertEquals(4, 2 + 2);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
// ***********************************************
|
|
3
|
-
// This example commands.ts shows you how to
|
|
4
|
-
// create various custom commands and overwrite
|
|
5
|
-
// existing commands.
|
|
6
|
-
//
|
|
7
|
-
// For more comprehensive examples of custom
|
|
8
|
-
// commands please read more here:
|
|
9
|
-
// https://on.cypress.io/custom-commands
|
|
10
|
-
// ***********************************************
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
// -- This is a parent command --
|
|
14
|
-
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
// -- This is a child command --
|
|
18
|
-
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
// -- This is a dual command --
|
|
22
|
-
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// -- This will overwrite an existing command --
|
|
26
|
-
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
27
|
-
//
|
|
28
|
-
// declare global {
|
|
29
|
-
// namespace Cypress {
|
|
30
|
-
// interface Chainable {
|
|
31
|
-
// login(email: string, password: string): Chainable<void>
|
|
32
|
-
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
33
|
-
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
34
|
-
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
35
|
-
// }
|
|
36
|
-
// }
|
|
37
|
-
// }
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// ***********************************************************
|
|
2
|
-
// This example support/e2e.ts is processed and
|
|
3
|
-
// loaded automatically before your test files.
|
|
4
|
-
//
|
|
5
|
-
// This is a great place to put global configuration and
|
|
6
|
-
// behavior that modifies Cypress.
|
|
7
|
-
//
|
|
8
|
-
// You can change the location of this file or turn off
|
|
9
|
-
// automatically serving support files with the
|
|
10
|
-
// 'supportFile' configuration option.
|
|
11
|
-
//
|
|
12
|
-
// You can read more here:
|
|
13
|
-
// https://on.cypress.io/configuration
|
|
14
|
-
// ***********************************************************
|
|
15
|
-
|
|
16
|
-
// Import commands.js using ES2015 syntax:
|
|
17
|
-
import './commands'
|
|
18
|
-
|
|
19
|
-
// Alternatively you can use CommonJS syntax:
|
|
20
|
-
// require('./commands')
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "Ionic App",
|
|
3
|
-
"name": "My Ionic App",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "assets/icon/favicon.png",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "assets/icon/icon.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "512x512",
|
|
14
|
-
"purpose": "maskable"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"start_url": ".",
|
|
18
|
-
"display": "standalone",
|
|
19
|
-
"theme_color": "#ffffff",
|
|
20
|
-
"background_color": "#ffffff"
|
|
21
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Redirect, Route } from 'react-router-dom';
|
|
2
|
-
import { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react';
|
|
3
|
-
import { IonReactRouter } from '@ionic/react-router';
|
|
4
|
-
import Home from './pages/Home';
|
|
5
|
-
|
|
6
|
-
/* Core CSS required for Ionic components to work properly */
|
|
7
|
-
import '@ionic/react/css/core.css';
|
|
8
|
-
|
|
9
|
-
/* Basic CSS for apps built with Ionic */
|
|
10
|
-
import '@ionic/react/css/normalize.css';
|
|
11
|
-
import '@ionic/react/css/structure.css';
|
|
12
|
-
import '@ionic/react/css/typography.css';
|
|
13
|
-
|
|
14
|
-
/* Optional CSS utils that can be commented out */
|
|
15
|
-
import '@ionic/react/css/padding.css';
|
|
16
|
-
import '@ionic/react/css/float-elements.css';
|
|
17
|
-
import '@ionic/react/css/text-alignment.css';
|
|
18
|
-
import '@ionic/react/css/text-transformation.css';
|
|
19
|
-
import '@ionic/react/css/flex-utils.css';
|
|
20
|
-
import '@ionic/react/css/display.css';
|
|
21
|
-
|
|
22
|
-
/* Theme variables */
|
|
23
|
-
import './theme/variables.css';
|
|
24
|
-
|
|
25
|
-
setupIonicReact();
|
|
26
|
-
|
|
27
|
-
const App: React.FC = () => (
|
|
28
|
-
<IonApp>
|
|
29
|
-
<IonReactRouter>
|
|
30
|
-
<IonRouterOutlet>
|
|
31
|
-
<Route exact path="/home">
|
|
32
|
-
<Home />
|
|
33
|
-
</Route>
|
|
34
|
-
<Route exact path="/">
|
|
35
|
-
<Redirect to="/home" />
|
|
36
|
-
</Route>
|
|
37
|
-
</IonRouterOutlet>
|
|
38
|
-
</IonReactRouter>
|
|
39
|
-
</IonApp>
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
export default App;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#container {
|
|
2
|
-
text-align: center;
|
|
3
|
-
position: absolute;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
top: 50%;
|
|
7
|
-
transform: translateY(-50%);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
#container strong {
|
|
11
|
-
font-size: 20px;
|
|
12
|
-
line-height: 26px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
#container p {
|
|
16
|
-
font-size: 16px;
|
|
17
|
-
line-height: 22px;
|
|
18
|
-
color: #8c8c8c;
|
|
19
|
-
margin: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
#container a {
|
|
23
|
-
text-decoration: none;
|
|
24
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import './ExploreContainer.css';
|
|
2
|
-
|
|
3
|
-
interface ContainerProps { }
|
|
4
|
-
|
|
5
|
-
const ExploreContainer: React.FC<ContainerProps> = () => {
|
|
6
|
-
return (
|
|
7
|
-
<div id="container">
|
|
8
|
-
<strong>Ready to create an app?</strong>
|
|
9
|
-
<p>Start with Ionic <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
|
|
10
|
-
</div>
|
|
11
|
-
);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default ExploreContainer;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { IonPage } from '@ionic/react'
|
|
2
|
-
import React from "react"
|
|
3
|
-
import { File } from '@awesome-cordova-plugins/file'
|
|
4
|
-
import { Dialogs } from '@awesome-cordova-plugins/dialogs'
|
|
5
|
-
import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera'
|
|
6
|
-
import { FaceSDK, MatchFacesRequest, MatchFacesImage, InitConfig, LivenessSkipStep, ImageType, LivenessStatus, LivenessConfig } from '@regulaforensics/face-sdk'
|
|
7
|
-
|
|
8
|
-
async function init() {
|
|
9
|
-
if (!await initialize()) return
|
|
10
|
-
setStatus("Ready")
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async function startLiveness() {
|
|
14
|
-
var response = await faceSdk.startLiveness({
|
|
15
|
-
config: new LivenessConfig({
|
|
16
|
-
skipStep: [LivenessSkipStep.ONBOARDING_STEP]
|
|
17
|
-
}),
|
|
18
|
-
notificationCompletion: (notification) => {
|
|
19
|
-
console.log("LivenessStatus: " + notification.status)
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
if (response.image == null) return
|
|
23
|
-
setImage(response.image, ImageType.LIVE, 1)
|
|
24
|
-
setLivenessStatus(response.liveness == LivenessStatus.PASSED ? "passed" : "unknown")
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async function matchFaces() {
|
|
28
|
-
if (image1 == null || image2 == null) {
|
|
29
|
-
setStatus("Both images required!")
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
setStatus("Processing...")
|
|
33
|
-
var request = new MatchFacesRequest([image1, image2])
|
|
34
|
-
var response = await faceSdk.matchFaces(request)
|
|
35
|
-
var split = await faceSdk.splitComparedFaces(response.results, 0.75)
|
|
36
|
-
var match = split.matchedFaces
|
|
37
|
-
setSimilarityStatus("failed")
|
|
38
|
-
if (match.length > 0)
|
|
39
|
-
setSimilarityStatus((match[0].similarity * 100).toFixed(2) + "%")
|
|
40
|
-
setStatus("Ready")
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function clearResults() {
|
|
44
|
-
setStatus("Ready")
|
|
45
|
-
setSimilarityStatus("null")
|
|
46
|
-
setLivenessStatus("null")
|
|
47
|
-
resetImages()
|
|
48
|
-
image1 = null
|
|
49
|
-
image2 = null
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// If 'regula.license' exists, init using license(enables offline match)
|
|
53
|
-
// otherwise init without license.
|
|
54
|
-
async function initialize() {
|
|
55
|
-
setStatus("Initializing...")
|
|
56
|
-
var license = await loadAssetIfExists("regula.license")
|
|
57
|
-
var config: InitConfig | undefined
|
|
58
|
-
if (license != null) config = new InitConfig(license)
|
|
59
|
-
var [success, error] = await faceSdk.initialize({ config: config })
|
|
60
|
-
if (!success && error != null) {
|
|
61
|
-
setStatus(error.message)
|
|
62
|
-
console.log(error.code + ": " + error.message)
|
|
63
|
-
}
|
|
64
|
-
return success
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function setImage(base64: string, type: number, position: number) {
|
|
68
|
-
setSimilarityStatus("null")
|
|
69
|
-
var mfImage = new MatchFacesImage(base64, type)
|
|
70
|
-
if (position == 1) {
|
|
71
|
-
image1 = mfImage
|
|
72
|
-
setUiImage1("data:image/png;base64," + base64)
|
|
73
|
-
setLivenessStatus("null")
|
|
74
|
-
}
|
|
75
|
-
if (position == 2) {
|
|
76
|
-
image2 = mfImage
|
|
77
|
-
setUiImage2("data:image/png;base64," + base64)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async function useCamera(position: number) {
|
|
82
|
-
var response = await faceSdk.startFaceCapture()
|
|
83
|
-
if (response.image == null) return
|
|
84
|
-
var image = response.image
|
|
85
|
-
setImage(image.image, image.imageType, position)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function useGallery(position: number) {
|
|
89
|
-
Camera.getPicture({
|
|
90
|
-
destinationType: DestinationType.DATA_URL,
|
|
91
|
-
mediaType: MediaType.PICTURE,
|
|
92
|
-
sourceType: PictureSourceType.PHOTOLIBRARY
|
|
93
|
-
}).then((result: string) => setImage(result, ImageType.PRINTED, position))
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function pickImage(position: number) {
|
|
97
|
-
Dialogs.confirm("", "Select option", ["Use gallery", "Use camera"]).then(button => {
|
|
98
|
-
if (button == 1) useGallery(position)
|
|
99
|
-
else useCamera(position)
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
async function loadAssetIfExists(path: string): Promise<string | null> {
|
|
104
|
-
try {
|
|
105
|
-
var dir = await File.resolveDirectoryUrl(File.applicationDirectory + "public/assets")
|
|
106
|
-
var fileEntry = await File.getFile(dir, path, {})
|
|
107
|
-
var result = await new Promise<string | null>((resolve, _) => {
|
|
108
|
-
fileEntry.file(file => {
|
|
109
|
-
var reader = new FileReader()
|
|
110
|
-
reader.onloadend = (_) => resolve(reader.result as string)
|
|
111
|
-
reader.readAsDataURL(file)
|
|
112
|
-
}, _ => resolve(null))
|
|
113
|
-
})
|
|
114
|
-
return result
|
|
115
|
-
} catch (_) {
|
|
116
|
-
return null
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
var faceSdk = FaceSDK.instance
|
|
121
|
-
|
|
122
|
-
var image1: MatchFacesImage | null
|
|
123
|
-
var image2: MatchFacesImage | null
|
|
124
|
-
|
|
125
|
-
var setStatus = (data: string) => status.innerHTML = data
|
|
126
|
-
var setSimilarityStatus = (data: string) => similarityResult.innerHTML = data
|
|
127
|
-
var setLivenessStatus = (data: string) => livenessResult.innerHTML = data
|
|
128
|
-
var setUiImage1 = (data: string) => img1.src = data
|
|
129
|
-
var setUiImage2 = (data: string) => img2.src = data
|
|
130
|
-
var resetImages = () => {
|
|
131
|
-
setUiImage1("assets/img/portrait.png")
|
|
132
|
-
setUiImage2("assets/img/portrait.png")
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const status = document.querySelector('.status') as HTMLElement
|
|
136
|
-
const similarityResult = document.querySelector('.similarityResult') as HTMLElement
|
|
137
|
-
const livenessResult = document.querySelector('.livenessResult') as HTMLElement
|
|
138
|
-
const img1 = document.querySelector('.img1') as any
|
|
139
|
-
const img2 = document.querySelector('.img2') as any
|
|
140
|
-
const matchFacesButton = document.querySelector('.matchFacesButton') as HTMLElement
|
|
141
|
-
const livenessButton = document.querySelector('.livenessButton') as HTMLElement
|
|
142
|
-
const clearResultsButton = document.querySelector('.clearResultsButton') as HTMLElement
|
|
143
|
-
|
|
144
|
-
img1.addEventListener("click", () => pickImage(1))
|
|
145
|
-
img2.addEventListener("click", () => pickImage(2))
|
|
146
|
-
matchFacesButton.addEventListener("click", matchFaces)
|
|
147
|
-
livenessButton.addEventListener("click", startLiveness)
|
|
148
|
-
clearResultsButton.addEventListener("click", clearResults)
|
|
149
|
-
|
|
150
|
-
document.addEventListener('deviceready', init)
|
|
151
|
-
|
|
152
|
-
const Home: React.FC = () => {
|
|
153
|
-
return (
|
|
154
|
-
<IonPage>
|
|
155
|
-
</IonPage>
|
|
156
|
-
)
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export default Home
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
2
|
-
// allows you to do things like:
|
|
3
|
-
// expect(element).toHaveTextContent(/react/i)
|
|
4
|
-
// learn more: https://github.com/testing-library/jest-dom
|
|
5
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
6
|
-
|
|
7
|
-
// Mock matchmedia
|
|
8
|
-
window.matchMedia = window.matchMedia || function() {
|
|
9
|
-
return {
|
|
10
|
-
matches: false,
|
|
11
|
-
addListener: function() {},
|
|
12
|
-
removeListener: function() {}
|
|
13
|
-
};
|
|
14
|
-
};
|