@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.
Files changed (55) hide show
  1. package/README.md +1 -1
  2. package/RNFaceSDK.podspec +3 -3
  3. package/android/CVDFaceSDK.kt +22 -8
  4. package/android/build.gradle +2 -2
  5. package/android/cordova.gradle +2 -2
  6. package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +7 -1
  7. package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
  8. package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +2 -7
  9. package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiModule.kt +16 -6
  10. package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +1 -1
  11. package/examples/capacitor/README.md +1 -1
  12. package/examples/capacitor/android/app/capacitor.build.gradle +5 -4
  13. package/examples/capacitor/android/capacitor.settings.gradle +3 -0
  14. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  15. package/examples/capacitor/android/variables.gradle +12 -12
  16. package/examples/capacitor/ios/App/Podfile +3 -0
  17. package/examples/capacitor/ios/App/Podfile.lock +72 -0
  18. package/examples/capacitor/package-lock.json +11336 -0
  19. package/examples/capacitor/package.json +17 -19
  20. package/examples/capacitor/scripts/setup.sh +2 -0
  21. package/examples/capacitor/src/pages/Home.tsx +16 -12
  22. package/examples/cordova/README.md +1 -1
  23. package/examples/cordova/package-lock.json +1373 -0
  24. package/examples/cordova/package.json +2 -2
  25. package/examples/cordova/scripts/setup.sh +5 -1
  26. package/examples/ionic/README.md +1 -1
  27. package/examples/ionic/package-lock.json +15761 -0
  28. package/examples/ionic/package.json +2 -2
  29. package/examples/ionic/scripts/setup.sh +5 -1
  30. package/examples/ionic/src/app/home/home.page.ts +11 -11
  31. package/examples/react-native/Gemfile.lock +23 -21
  32. package/examples/react-native/ios/Podfile +2 -0
  33. package/examples/react-native/ios/Podfile.lock +471 -424
  34. package/examples/react-native/package-lock.json +615 -702
  35. package/examples/react-native/package.json +7 -7
  36. package/examples/react-native/scripts/android.sh +4 -0
  37. package/examples/react-native/scripts/ios.sh +4 -0
  38. package/ios/RFSWJSONConstructor.m +13 -15
  39. package/ios/RFSWMain.m +1 -1
  40. package/package.json +1 -1
  41. package/plugin.xml +4 -4
  42. package/www/capacitor/detect_faces/detect_faces_request.js +2 -0
  43. package/www/capacitor/image_quality/image_quality_characteristic.js +2 -0
  44. package/www/capacitor/image_quality/image_quality_group.js +1 -0
  45. package/www/capacitor/internal/bridge.js +8 -7
  46. package/www/capacitor/person_database/person_database.js +1 -1
  47. package/www/cordova.js +84 -75
  48. package/www/react-native/detect_faces/detect_faces_request.js +2 -0
  49. package/www/react-native/image_quality/image_quality_characteristic.js +2 -0
  50. package/www/react-native/image_quality/image_quality_group.js +1 -0
  51. package/www/react-native/internal/bridge.js +8 -7
  52. package/www/react-native/person_database/person_database.js +1 -1
  53. package/www/types/person_database/person_database.d.ts +1 -1
  54. package/.gitlab/report.yaml +0 -75
  55. 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.195-rc",
19
- "@regulaforensics/face-core-basic": "7.1.112-rc",
20
- "@awesome-cordova-plugins/camera": "6.6.0",
21
- "@awesome-cordova-plugins/file": "6.6.0",
22
- "@awesome-cordova-plugins/dialogs": "6.6.0",
23
- "@capacitor/android": "7.0.0-rc.0",
24
- "@capacitor/core": "7.0.0-rc.0",
25
- "@capacitor/ios": "7.0.0-rc.0",
26
- "@capacitor/app": "7.0.0-rc.0",
27
- "@capacitor/haptics": "7.0.0-rc.0",
28
- "@capacitor/keyboard": "7.0.0-rc.0",
29
- "@capacitor/status-bar": "7.0.0-rc.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": "7.0.0",
35
- "cordova-plugin-file": "8.0.1",
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-rc.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
  }
@@ -2,3 +2,5 @@
2
2
  set -e
3
3
 
4
4
  npm install
5
+ cd ios/App
6
+ pod install || pod update
@@ -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 { Dialogs } from '@awesome-cordova-plugins/dialogs'
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("data:image/png;base64," + base64)
72
+ setUiImage1(base64)
73
73
  setLivenessStatus("null")
74
74
  }
75
75
  if (position == 2) {
76
76
  image2 = mfImage
77
- setUiImage2("data:image/png;base64," + base64)
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
- }).then((result: string) => setImage(result, ImageType.PRINTED, position))
93
+ })
94
+ setImage(image, ImageType.PRINTED, position)
94
95
  }
95
96
 
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)
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> {
@@ -21,7 +21,7 @@
21
21
  ```bash
22
22
  cordova plugin remove @regulaforensics/face-core-basic
23
23
  cordova plugin add @regulaforensics/face-core-match
24
- cordova prepare
24
+ npm run setup
25
25
  ```
26
26
 
27
27
  4. Turn off the internet and run the app.