@regulaforensics/face-sdk 7.1.195-rc → 7.1.201-nightly
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 +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +7 -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 +2 -7
- package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiModule.kt +16 -6
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +1 -1
- package/examples/capacitor/README.md +1 -1
- package/examples/capacitor/android/app/capacitor.build.gradle +5 -4
- package/examples/capacitor/android/capacitor.settings.gradle +3 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/examples/capacitor/android/variables.gradle +12 -12
- package/examples/capacitor/ios/App/Podfile +3 -0
- package/examples/capacitor/ios/App/Podfile.lock +72 -0
- package/examples/capacitor/package-lock.json +11336 -0
- package/examples/capacitor/package.json +17 -19
- package/examples/capacitor/scripts/setup.sh +2 -0
- package/examples/capacitor/src/pages/Home.tsx +16 -12
- package/examples/cordova/README.md +1 -1
- package/examples/cordova/package-lock.json +1373 -0
- package/examples/cordova/package.json +2 -2
- package/examples/cordova/scripts/setup.sh +5 -1
- package/examples/ionic/README.md +1 -1
- package/examples/ionic/package-lock.json +15761 -0
- package/examples/ionic/package.json +2 -2
- package/examples/ionic/scripts/setup.sh +5 -1
- package/examples/ionic/src/app/home/home.page.ts +11 -11
- package/examples/react-native/Gemfile.lock +23 -21
- package/examples/react-native/ios/Podfile +2 -0
- package/examples/react-native/ios/Podfile.lock +471 -424
- package/examples/react-native/package-lock.json +615 -702
- package/examples/react-native/package.json +7 -7
- package/examples/react-native/scripts/android.sh +4 -0
- package/examples/react-native/scripts/ios.sh +4 -0
- package/ios/RFSWJSONConstructor.m +13 -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/image_quality/image_quality_characteristic.js +2 -0
- package/www/capacitor/image_quality/image_quality_group.js +1 -0
- package/www/capacitor/internal/bridge.js +8 -7
- package/www/capacitor/person_database/person_database.js +1 -1
- package/www/cordova.js +84 -75
- package/www/react-native/detect_faces/detect_faces_request.js +2 -0
- 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/internal/bridge.js +8 -7
- package/www/react-native/person_database/person_database.js +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
|
@@ -15,34 +15,33 @@
|
|
|
15
15
|
"lint": "eslint"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@regulaforensics/face-sdk": "7.1.
|
|
19
|
-
"@regulaforensics/face-core-basic": "7.1.
|
|
20
|
-
"@awesome-cordova-plugins/camera": "6.
|
|
21
|
-
"@awesome-cordova-plugins/file": "6.
|
|
22
|
-
"@
|
|
23
|
-
"@capacitor/
|
|
24
|
-
"@capacitor/core": "7.0.0
|
|
25
|
-
"@capacitor/
|
|
26
|
-
"@capacitor/
|
|
27
|
-
"@capacitor/
|
|
28
|
-
"@capacitor/keyboard": "7.0.0
|
|
29
|
-
"@capacitor/status-bar": "7.0.0
|
|
18
|
+
"@regulaforensics/face-sdk": "7.1.201-nightly",
|
|
19
|
+
"@regulaforensics/face-core-basic": "7.1.114-nightly",
|
|
20
|
+
"@awesome-cordova-plugins/camera": "6.14.0",
|
|
21
|
+
"@awesome-cordova-plugins/file": "6.14.0",
|
|
22
|
+
"@capacitor/android": "^7.0.0",
|
|
23
|
+
"@capacitor/app": "^7.0.0",
|
|
24
|
+
"@capacitor/core": "^7.0.0",
|
|
25
|
+
"@capacitor/dialog": "^7.0.0",
|
|
26
|
+
"@capacitor/haptics": "^7.0.0",
|
|
27
|
+
"@capacitor/ios": "^7.0.0",
|
|
28
|
+
"@capacitor/keyboard": "^7.0.0",
|
|
29
|
+
"@capacitor/status-bar": "^7.0.0",
|
|
30
30
|
"@ionic/react": "^7.0.0",
|
|
31
31
|
"@ionic/react-router": "^7.0.0",
|
|
32
32
|
"@types/react-router": "^5.1.20",
|
|
33
33
|
"@types/react-router-dom": "^5.3.3",
|
|
34
|
-
"cordova-plugin-camera": "
|
|
35
|
-
"cordova-plugin-file": "8.
|
|
36
|
-
"cordova-plugin-dialogs": "^2.0.2",
|
|
37
|
-
"jetifier": "2.0.0",
|
|
34
|
+
"cordova-plugin-camera": "8.0.0",
|
|
35
|
+
"cordova-plugin-file": "8.1.3",
|
|
38
36
|
"ionicons": "^7.0.0",
|
|
37
|
+
"jetifier": "2.0.0",
|
|
39
38
|
"react": "^18.2.0",
|
|
40
39
|
"react-dom": "^18.2.0",
|
|
41
40
|
"react-router": "^5.3.4",
|
|
42
41
|
"react-router-dom": "^5.3.4"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
|
-
"@capacitor/cli": "7.0.0
|
|
44
|
+
"@capacitor/cli": "^7.0.0",
|
|
46
45
|
"@testing-library/dom": ">=7.21.4",
|
|
47
46
|
"@testing-library/jest-dom": "^5.16.5",
|
|
48
47
|
"@testing-library/react": "^14.0.0",
|
|
@@ -59,6 +58,5 @@
|
|
|
59
58
|
"typescript": "^5.1.6",
|
|
60
59
|
"vite": "^5.0.0",
|
|
61
60
|
"vitest": "^0.34.6"
|
|
62
|
-
}
|
|
63
|
-
"description": "An Ionic project"
|
|
61
|
+
}
|
|
64
62
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IonPage } from '@ionic/react'
|
|
2
2
|
import React from "react"
|
|
3
3
|
import { File } from '@awesome-cordova-plugins/file'
|
|
4
|
-
import {
|
|
4
|
+
import { Dialog } from '@capacitor/dialog'
|
|
5
5
|
import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera'
|
|
6
6
|
import { FaceSDK, MatchFacesRequest, MatchFacesImage, InitConfig, LivenessSkipStep, ImageType, LivenessStatus, LivenessConfig } from '@regulaforensics/face-sdk'
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ async function startLiveness() {
|
|
|
20
20
|
}
|
|
21
21
|
})
|
|
22
22
|
if (response.image == null) return
|
|
23
|
-
setImage(response.image, ImageType.LIVE, 1)
|
|
23
|
+
setImage("data:image/png;base64," + response.image, ImageType.LIVE, 1)
|
|
24
24
|
setLivenessStatus(response.liveness == LivenessStatus.PASSED ? "passed" : "unknown")
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -69,12 +69,12 @@ function setImage(base64: string, type: number, position: number) {
|
|
|
69
69
|
var mfImage = new MatchFacesImage(base64, type)
|
|
70
70
|
if (position == 1) {
|
|
71
71
|
image1 = mfImage
|
|
72
|
-
setUiImage1(
|
|
72
|
+
setUiImage1(base64)
|
|
73
73
|
setLivenessStatus("null")
|
|
74
74
|
}
|
|
75
75
|
if (position == 2) {
|
|
76
76
|
image2 = mfImage
|
|
77
|
-
setUiImage2(
|
|
77
|
+
setUiImage2(base64)
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -82,22 +82,26 @@ async function useCamera(position: number) {
|
|
|
82
82
|
var response = await faceSdk.startFaceCapture()
|
|
83
83
|
if (response.image == null) return
|
|
84
84
|
var image = response.image
|
|
85
|
-
setImage(image.image, image.imageType, position)
|
|
85
|
+
setImage("data:image/png;base64," + image.image, image.imageType, position)
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
function useGallery(position: number) {
|
|
89
|
-
Camera.getPicture({
|
|
88
|
+
async function useGallery(position: number) {
|
|
89
|
+
var image = await Camera.getPicture({
|
|
90
90
|
destinationType: DestinationType.DATA_URL,
|
|
91
91
|
mediaType: MediaType.PICTURE,
|
|
92
92
|
sourceType: PictureSourceType.PHOTOLIBRARY
|
|
93
|
-
})
|
|
93
|
+
})
|
|
94
|
+
setImage(image, ImageType.PRINTED, position)
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
function pickImage(position: number) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
async function pickImage(position: number) {
|
|
98
|
+
var response = await Dialog.confirm({
|
|
99
|
+
message: "Select option",
|
|
100
|
+
okButtonTitle: "Use camera",
|
|
101
|
+
cancelButtonTitle: "Use gallery"
|
|
100
102
|
})
|
|
103
|
+
if (response.value) useCamera(position)
|
|
104
|
+
else useGallery(position)
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
async function loadAssetIfExists(path: string): Promise<string | null> {
|