@regulaforensics/document-reader 9.9.1244-rc → 9.9.1309-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/Package.swift +2 -2
- package/android/build.gradle.kts +1 -1
- package/android/cordova.gradle.kts +1 -1
- package/android/src/main/kotlin/com/regula/plugin/document/reader/Config.kt +2 -0
- package/android/src/main/kotlin/com/regula/plugin/document/reader/JSONConstructor.kt +10 -18
- package/android/src/main/kotlin/com/regula/plugin/document/reader/Main.kt +14 -4
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +4 -4
- package/examples/capacitor/package-lock.json +113 -661
- package/examples/capacitor/package.json +6 -5
- package/examples/ionic/config.xml +1 -1
- package/examples/ionic/package-lock.json +4315 -925
- package/examples/ionic/package.json +27 -5
- package/examples/ionic/scripts/ios.sh +3 -1
- package/examples/react_native/README.md +1 -1
- package/examples/react_native/app.config.ts +3 -0
- package/examples/react_native/index.tsx +52 -22
- package/examples/react_native/metro.config.js +1 -3
- package/examples/react_native/package-lock.json +1217 -1579
- package/examples/react_native/package.json +20 -19
- package/examples/react_native/scripts/android.sh +1 -8
- package/examples/react_native/scripts/ios.sh +3 -11
- package/examples/react_native/scripts/setup.sh +1 -5
- package/examples/react_native/scripts/withoutMetroServer.js +89 -0
- package/ios/RGLWConfig.m +2 -0
- package/ios/RGLWJSONConstructor.m +1 -0
- package/ios/RGLWMain.h +1 -0
- package/ios/RGLWMain.m +16 -0
- package/ios/RNDocumentReader.m +1 -0
- package/package.json +1 -1
- package/plugin.xml +3 -3
- package/react-native-document-reader.podspec +3 -3
- package/test/json.tsx +6 -6
- package/test/package-lock.json +2 -5
- package/test/test.tsx +259 -261
- package/www/capacitor/config/RFIDConfig.js +2 -0
- package/www/capacitor/index.js +2 -0
- package/www/capacitor/internal/bridge.js +8 -0
- package/www/capacitor/params/process_params/AuthenticityPropertiesParams.js +8 -0
- package/www/capacitor/results/authenticity/CheckDiagnose.js +2 -0
- package/www/capacitor/results/authenticity/SecurityFeatureType.js +1 -0
- package/www/capacitor/results/visual_results/FieldType.js +2 -0
- package/www/cordova.js +25 -0
- package/www/react-native/config/RFIDConfig.js +2 -0
- package/www/react-native/index.js +2 -0
- package/www/react-native/internal/bridge.js +8 -0
- package/www/react-native/params/process_params/AuthenticityPropertiesParams.js +8 -0
- package/www/react-native/results/authenticity/CheckDiagnose.js +2 -0
- package/www/react-native/results/authenticity/SecurityFeatureType.js +1 -0
- package/www/react-native/results/visual_results/FieldType.js +2 -0
- package/www/types/config/RFIDConfig.d.ts +15 -0
- package/www/types/config/RecognizeConfig.d.ts +2 -2
- package/www/types/params/process_params/AuthenticityPropertiesParams.d.ts +2 -0
- package/www/types/results/authenticity/CheckDiagnose.d.ts +2 -0
- package/www/types/results/authenticity/SecurityFeatureType.d.ts +1 -0
- package/www/types/results/visual_results/FieldType.d.ts +2 -0
- package/examples/react_native/index.html +0 -12
package/www/cordova.js
CHANGED
|
@@ -229,6 +229,7 @@ class RFIDConfig {
|
|
|
229
229
|
onRequestPACertificates
|
|
230
230
|
onRequestTACertificates
|
|
231
231
|
onRequestTASignature
|
|
232
|
+
onRequestAAChallenge
|
|
232
233
|
onRequestPACEProtocol
|
|
233
234
|
onRequestCAProtocol
|
|
234
235
|
|
|
@@ -249,6 +250,7 @@ class RFIDConfig {
|
|
|
249
250
|
"paCertificates": this.onRequestPACertificates != null,
|
|
250
251
|
"taCertificates": this.onRequestTACertificates != null,
|
|
251
252
|
"taSignature": this.onRequestTASignature != null,
|
|
253
|
+
"aaChallenge": this.onRequestAAChallenge != null,
|
|
252
254
|
"paceProtocol": this.onRequestPACEProtocol != null,
|
|
253
255
|
"caProtocol": this.onRequestCAProtocol != null,
|
|
254
256
|
}
|
|
@@ -1113,6 +1115,7 @@ class DocumentReader {
|
|
|
1113
1115
|
(0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setPaCertificateCompletion)(config.onRequestPACertificates);
|
|
1114
1116
|
(0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setTaCertificateCompletion)(config.onRequestTACertificates);
|
|
1115
1117
|
(0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setTaSignatureCompletion)(config.onRequestTASignature);
|
|
1118
|
+
(0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setAAChallengeCompletion)(config.onRequestAAChallenge);
|
|
1116
1119
|
|
|
1117
1120
|
(0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setPACEProtocolCompletion)(config.onRequestPACEProtocol);
|
|
1118
1121
|
(0,_internal_bridge__WEBPACK_IMPORTED_MODULE_0__._setCAProtocolCompletion)(config.onRequestCAProtocol);
|
|
@@ -1759,6 +1762,7 @@ class RFIDException {
|
|
|
1759
1762
|
|
|
1760
1763
|
__webpack_require__.r(__webpack_exports__);
|
|
1761
1764
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1765
|
+
/* harmony export */ _setAAChallengeCompletion: () => (/* binding */ _setAAChallengeCompletion),
|
|
1762
1766
|
/* harmony export */ _setCAProtocolCompletion: () => (/* binding */ _setCAProtocolCompletion),
|
|
1763
1767
|
/* harmony export */ _setChipDetectedCompletion: () => (/* binding */ _setChipDetectedCompletion),
|
|
1764
1768
|
/* harmony export */ _setCustomButtonTappedCompletion: () => (/* binding */ _setCustomButtonTappedCompletion),
|
|
@@ -1893,6 +1897,14 @@ function _setTaSignatureCompletion(completion) {
|
|
|
1893
1897
|
})
|
|
1894
1898
|
}
|
|
1895
1899
|
|
|
1900
|
+
function _setAAChallengeCompletion(completion) {
|
|
1901
|
+
_setEvent("aaChallengeCompletionEvent", completion, json => {
|
|
1902
|
+
return [json, async challenge => {
|
|
1903
|
+
await exec("provideAAChallenge", [challenge])
|
|
1904
|
+
}]
|
|
1905
|
+
})
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1896
1908
|
function _setPACEProtocolCompletion(completion) {
|
|
1897
1909
|
_setEvent("paceProtocolCompletionEvent", completion, json => {
|
|
1898
1910
|
return [JSON.parse(json).map(item => _rfid_PACEProtocol__WEBPACK_IMPORTED_MODULE_8__.PACEProtocol.fromJson(item)), async protocol => {
|
|
@@ -4541,11 +4553,18 @@ class AuthenticityPropertiesParams {
|
|
|
4541
4553
|
this._set({ "checkHoldersSignature": val });
|
|
4542
4554
|
}
|
|
4543
4555
|
|
|
4556
|
+
get checkDocumentDamage() { return this._checkDocumentDamage; }
|
|
4557
|
+
set checkDocumentDamage(val) {
|
|
4558
|
+
this._checkDocumentDamage = val;
|
|
4559
|
+
this._set({ "checkDocumentDamage": val });
|
|
4560
|
+
}
|
|
4561
|
+
|
|
4544
4562
|
static fromJson(jsonObject) {
|
|
4545
4563
|
if (jsonObject == null) return new AuthenticityPropertiesParams();
|
|
4546
4564
|
|
|
4547
4565
|
const result = new AuthenticityPropertiesParams();
|
|
4548
4566
|
result._checkHoldersSignature = jsonObject["checkHoldersSignature"];
|
|
4567
|
+
result._checkDocumentDamage = jsonObject["checkDocumentDamage"];
|
|
4549
4568
|
|
|
4550
4569
|
return result;
|
|
4551
4570
|
}
|
|
@@ -4560,6 +4579,7 @@ class AuthenticityPropertiesParams {
|
|
|
4560
4579
|
toJson() {
|
|
4561
4580
|
return {
|
|
4562
4581
|
"checkHoldersSignature": this.checkHoldersSignature,
|
|
4582
|
+
"checkDocumentDamage": this.checkDocumentDamage,
|
|
4563
4583
|
}
|
|
4564
4584
|
}
|
|
4565
4585
|
}
|
|
@@ -8273,6 +8293,8 @@ const CheckDiagnose = {
|
|
|
8273
8293
|
PROPERTY_NO_SIGNATURE: 260,
|
|
8274
8294
|
PROPERTY_TEXT_AS_SIGNATURE: 261,
|
|
8275
8295
|
PROPERTY_FINGERPRINT_AS_SIGNATURE: 262,
|
|
8296
|
+
PROPERTY_DOCUMENT_DAMAGED: 263,
|
|
8297
|
+
PROPERTY_DOCUMENT_CANCELLED: 264,
|
|
8276
8298
|
}
|
|
8277
8299
|
|
|
8278
8300
|
|
|
@@ -8353,6 +8375,7 @@ const SecurityFeatureType = {
|
|
|
8353
8375
|
PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
|
|
8354
8376
|
PORTRAIT_COMPARISON_EXTVSGHOST: 61,
|
|
8355
8377
|
SIGNATURE_PRESENCE: 62,
|
|
8378
|
+
DAMAGE_CHECK: 63,
|
|
8356
8379
|
}
|
|
8357
8380
|
|
|
8358
8381
|
|
|
@@ -11481,6 +11504,8 @@ const FieldType = {
|
|
|
11481
11504
|
DLCLASSCODE_B3_FROM: 706,
|
|
11482
11505
|
DLCLASSCODE_B3_TO: 707,
|
|
11483
11506
|
DLCLASSCODE_B3_NOTES: 708,
|
|
11507
|
+
ADDRESS_POST_OFFICE: 709,
|
|
11508
|
+
ADDRESS_LOT: 710,
|
|
11484
11509
|
}
|
|
11485
11510
|
|
|
11486
11511
|
FieldType.getTranslation = async function (value) {
|
|
@@ -18,6 +18,7 @@ export class RFIDConfig {
|
|
|
18
18
|
onRequestPACertificates
|
|
19
19
|
onRequestTACertificates
|
|
20
20
|
onRequestTASignature
|
|
21
|
+
onRequestAAChallenge
|
|
21
22
|
onRequestPACEProtocol
|
|
22
23
|
onRequestCAProtocol
|
|
23
24
|
|
|
@@ -38,6 +39,7 @@ export class RFIDConfig {
|
|
|
38
39
|
"paCertificates": this.onRequestPACertificates != null,
|
|
39
40
|
"taCertificates": this.onRequestTACertificates != null,
|
|
40
41
|
"taSignature": this.onRequestTASignature != null,
|
|
42
|
+
"aaChallenge": this.onRequestAAChallenge != null,
|
|
41
43
|
"paceProtocol": this.onRequestPACEProtocol != null,
|
|
42
44
|
"caProtocol": this.onRequestCAProtocol != null,
|
|
43
45
|
}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
_setPaCertificateCompletion,
|
|
13
13
|
_setTaCertificateCompletion,
|
|
14
14
|
_setTaSignatureCompletion,
|
|
15
|
+
_setAAChallengeCompletion,
|
|
15
16
|
_setPACEProtocolCompletion,
|
|
16
17
|
_setCAProtocolCompletion,
|
|
17
18
|
} from './internal/bridge'
|
|
@@ -538,6 +539,7 @@ export class DocumentReader {
|
|
|
538
539
|
_setPaCertificateCompletion(config.onRequestPACertificates);
|
|
539
540
|
_setTaCertificateCompletion(config.onRequestTACertificates);
|
|
540
541
|
_setTaSignatureCompletion(config.onRequestTASignature);
|
|
542
|
+
_setAAChallengeCompletion(config.onRequestAAChallenge);
|
|
541
543
|
|
|
542
544
|
_setPACEProtocolCompletion(config.onRequestPACEProtocol);
|
|
543
545
|
_setCAProtocolCompletion(config.onRequestCAProtocol);
|
|
@@ -106,6 +106,14 @@ export function _setTaSignatureCompletion(completion) {
|
|
|
106
106
|
})
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
export function _setAAChallengeCompletion(completion) {
|
|
110
|
+
_setEvent("aaChallengeCompletionEvent", completion, json => {
|
|
111
|
+
return [json, async challenge => {
|
|
112
|
+
await exec("provideAAChallenge", [challenge])
|
|
113
|
+
}]
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
|
|
109
117
|
export function _setPACEProtocolCompletion(completion) {
|
|
110
118
|
_setEvent("paceProtocolCompletionEvent", completion, json => {
|
|
111
119
|
return [JSON.parse(json).map(item => PACEProtocol.fromJson(item)), async protocol => {
|
|
@@ -7,11 +7,18 @@ export class AuthenticityPropertiesParams {
|
|
|
7
7
|
this._set({ "checkHoldersSignature": val });
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
get checkDocumentDamage() { return this._checkDocumentDamage; }
|
|
11
|
+
set checkDocumentDamage(val) {
|
|
12
|
+
this._checkDocumentDamage = val;
|
|
13
|
+
this._set({ "checkDocumentDamage": val });
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
static fromJson(jsonObject) {
|
|
11
17
|
if (jsonObject == null) return new AuthenticityPropertiesParams();
|
|
12
18
|
|
|
13
19
|
const result = new AuthenticityPropertiesParams();
|
|
14
20
|
result._checkHoldersSignature = jsonObject["checkHoldersSignature"];
|
|
21
|
+
result._checkDocumentDamage = jsonObject["checkDocumentDamage"];
|
|
15
22
|
|
|
16
23
|
return result;
|
|
17
24
|
}
|
|
@@ -26,6 +33,7 @@ export class AuthenticityPropertiesParams {
|
|
|
26
33
|
toJson() {
|
|
27
34
|
return {
|
|
28
35
|
"checkHoldersSignature": this.checkHoldersSignature,
|
|
36
|
+
"checkDocumentDamage": this.checkDocumentDamage,
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
39
|
}
|
|
@@ -51,6 +51,11 @@ export declare class RFIDConfig {
|
|
|
51
51
|
*/
|
|
52
52
|
onRequestTASignature?: TaSignatureCompletion;
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Callback for receiving RFID request data
|
|
56
|
+
*/
|
|
57
|
+
onRequestAAChallenge?: AAChallengeCompletion;
|
|
58
|
+
|
|
54
59
|
/**
|
|
55
60
|
* Callback for receiving RFID request data
|
|
56
61
|
*/
|
|
@@ -142,6 +147,16 @@ export type TaSignatureCompletion = (challenge: TAChallenge | null, request: TAS
|
|
|
142
147
|
*/
|
|
143
148
|
export type TASignatureRequest = (signature?: string) => Promise<void>;
|
|
144
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Callback for receiving RFID request data.
|
|
152
|
+
*/
|
|
153
|
+
export type AAChallengeCompletion = (challenge: string | null, request: AAChallengeRequest) => void;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Provided to a user for passing AAChallenge to the native part of DocumentReader.
|
|
157
|
+
*/
|
|
158
|
+
export type AAChallengeRequest = (challenge?: string | null) => Promise<void>;
|
|
159
|
+
|
|
145
160
|
/**
|
|
146
161
|
* Callback for receiving RFID request data.
|
|
147
162
|
*/
|
|
@@ -9,14 +9,14 @@ export declare class RecognizeConfig {
|
|
|
9
9
|
/**
|
|
10
10
|
* Documents processing scenario.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
scenario?: Scenario;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Configuration class for online processing.
|
|
16
16
|
*
|
|
17
17
|
* Requires network connection.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
onlineProcessingConfig?: OnlineProcessingConfig;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Image for processing. Base64 string.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<meta name="viewport" content="initial-scale=1, user-scalable=no, viewport-fit=cover">
|
|
2
|
-
<link rel="stylesheet" href="src/main.css">
|
|
3
|
-
|
|
4
|
-
<div id="content" style="height: 100%"></div>
|
|
5
|
-
|
|
6
|
-
<script>
|
|
7
|
-
(async () => {
|
|
8
|
-
document.getElementById("content").innerHTML = await fetch("src/main.html").then(r => r.text())
|
|
9
|
-
await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)))
|
|
10
|
-
window.ReactNativeWebView.postMessage(JSON.stringify({ id: "ready" }))
|
|
11
|
-
})()
|
|
12
|
-
</script>
|