@regulaforensics/react-native-document-reader-api 9.10.916-rc → 9.10.918-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/RNDocumentReaderApi.podspec +1 -1
- package/android/src/main/java/com/regula/plugin/document/reader/Config.kt +2 -0
- package/android/src/main/java/com/regula/plugin/document/reader/JSONConstructor.kt +10 -18
- package/android/src/main/java/com/regula/plugin/document/reader/Main.kt +14 -4
- package/example/App.tsx +53 -39
- package/example/README.md +2 -8
- package/example/android/app/build.gradle +5 -31
- package/example/android/app/src/main/java/com/regula/dr/fullauthrfid/MainActivity.kt +22 -0
- package/example/android/app/src/main/java/com/regula/dr/fullauthrfid/MainApplication.kt +28 -0
- package/example/android/build.gradle +7 -5
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +2 -1
- package/example/android/gradle.properties +6 -5
- package/example/babel.config.js +3 -0
- package/example/ios/DocumentReader/AppDelegate.mm +10 -5
- package/example/ios/DocumentReader/Info.plist +21 -24
- package/example/ios/DocumentReader/SceneDelegate.h +7 -0
- package/example/ios/DocumentReader/SceneDelegate.mm +27 -0
- package/example/ios/DocumentReader.xcodeproj/project.pbxproj +17 -238
- package/example/ios/DocumentReader.xcodeproj/xcshareddata/xcschemes/DocumentReader.xcscheme +0 -18
- package/example/ios/Podfile +5 -9
- package/example/metro.config.js +2 -20
- package/example/package-lock.json +2687 -9340
- package/example/package.json +19 -40
- package/example/tsconfig.json +6 -0
- package/index.d.ts +20 -10
- package/index.js +13 -5
- 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/RNRegulaDocumentReader.m +1 -0
- package/package.json +1 -1
- package/example/android/app/src/debug/AndroidManifest.xml +0 -13
- package/example/android/app/src/debug/java/com/regula/dr/fullrfid/ReactNativeFlipper.java +0 -75
- package/example/android/app/src/main/java/com/regula/dr/fullauthrfid/MainActivity.java +0 -32
- package/example/android/app/src/main/java/com/regula/dr/fullauthrfid/MainApplication.java +0 -68
- package/example/android/app/src/release/java/com/regula/dr/fullrfid/ReactNativeFlipper.java +0 -20
- package/example/ios/DocumentReaderTests/DocumentReaderTests.m +0 -66
- package/example/ios/DocumentReaderTests/Info.plist +0 -24
- package/example/react-native.config.js +0 -5
- package/example/vendor/image-size-metro-compat/index.cjs +0 -16
- package/example/vendor/image-size-metro-compat/package.json +0 -8
package/example/package.json
CHANGED
|
@@ -3,56 +3,35 @@
|
|
|
3
3
|
"version": "0.0.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"android": "react-native run-android",
|
|
7
|
-
"ios": "react-native run-ios"
|
|
8
|
-
"lint": "eslint .",
|
|
9
|
-
"start": "react-native start",
|
|
10
|
-
"test": "jest"
|
|
6
|
+
"android": "react-native run-android --no-packager",
|
|
7
|
+
"ios": "react-native run-ios --no-packager"
|
|
11
8
|
},
|
|
12
9
|
"dependencies": {
|
|
13
|
-
"@regulaforensics/react-native-document-reader-api": "9.10.
|
|
10
|
+
"@regulaforensics/react-native-document-reader-api": "9.10.918-rc",
|
|
14
11
|
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.10.3862-rc",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"react": "19.0.0",
|
|
18
|
-
"react-native": "0.79.0",
|
|
12
|
+
"react": "19.3.1",
|
|
13
|
+
"react-native": "0.88.1",
|
|
19
14
|
"react-native-fs": "2.20.0",
|
|
20
|
-
"react-native-image-picker": "
|
|
21
|
-
"react-native-
|
|
22
|
-
"react-native-radio-buttons-group": "3.0.5",
|
|
23
|
-
"react-native-vector-icons": "10.2.0",
|
|
24
|
-
"image-size": "file:vendor/image-size-metro-compat"
|
|
15
|
+
"react-native-image-picker": "8.3.0",
|
|
16
|
+
"react-native-radio-buttons-group": "3.1.0"
|
|
25
17
|
},
|
|
26
18
|
"overrides": {
|
|
27
19
|
"fast-xml-parser": "^5.5.8",
|
|
28
|
-
"js-yaml": "^4.1.1"
|
|
29
|
-
"brace-expansion": "^5.0.9",
|
|
30
|
-
"image-size": "$image-size",
|
|
31
|
-
"glob@7.2.3": {
|
|
32
|
-
"minimatch": "^10.2.6"
|
|
33
|
-
}
|
|
20
|
+
"js-yaml": "^4.1.1"
|
|
34
21
|
},
|
|
35
22
|
"devDependencies": {
|
|
36
|
-
"@babel/core": "^7.
|
|
37
|
-
"@babel/preset-env": "^7.26.0",
|
|
23
|
+
"@babel/core": "^7.29.0",
|
|
38
24
|
"@babel/runtime": "^7.28.4",
|
|
39
|
-
"@react-native-community/cli": "
|
|
40
|
-
"@react-native-community/cli-platform-android": "
|
|
41
|
-
"@react-native-community/cli-platform-ios": "
|
|
42
|
-
"@react-native/babel-preset": "0.
|
|
43
|
-
"@react-native/
|
|
44
|
-
"@react
|
|
45
|
-
"
|
|
46
|
-
"@
|
|
47
|
-
"@types/react-test-renderer": "^19.0.0",
|
|
48
|
-
"babel-jest": "^29.7.0",
|
|
49
|
-
"eslint": "^8.19.0",
|
|
50
|
-
"jest": "^29.7.0",
|
|
51
|
-
"prettier": "2.8.8",
|
|
52
|
-
"react-test-renderer": "19.0.0",
|
|
53
|
-
"typescript": "5.7.3"
|
|
25
|
+
"@react-native-community/cli": "20.2.0",
|
|
26
|
+
"@react-native-community/cli-platform-android": "20.2.0",
|
|
27
|
+
"@react-native-community/cli-platform-ios": "20.2.0",
|
|
28
|
+
"@react-native/babel-preset": "0.88.1",
|
|
29
|
+
"@react-native/metro-config": "0.88.1",
|
|
30
|
+
"@types/react": "^19.3.0",
|
|
31
|
+
"typescript": "6.0.3",
|
|
32
|
+
"@react-native/typescript-config": "0.88.1"
|
|
54
33
|
},
|
|
55
34
|
"engines": {
|
|
56
|
-
"node": ">=
|
|
35
|
+
"node": "^22.13.0 || ^24.3.0 || >=26.0.0"
|
|
57
36
|
}
|
|
58
|
-
}
|
|
37
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -2213,12 +2213,14 @@ export class LivenessParams {
|
|
|
2213
2213
|
|
|
2214
2214
|
export class AuthenticityPropertiesParams {
|
|
2215
2215
|
checkHoldersSignature?: boolean
|
|
2216
|
+
checkDocumentDamage?: boolean
|
|
2216
2217
|
|
|
2217
2218
|
static fromJson(jsonObject?: any): AuthenticityPropertiesParams | undefined {
|
|
2218
2219
|
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
2219
2220
|
const result = new AuthenticityPropertiesParams
|
|
2220
2221
|
|
|
2221
2222
|
result.checkHoldersSignature = jsonObject["checkHoldersSignature"]
|
|
2223
|
+
result.checkDocumentDamage = jsonObject["checkDocumentDamage"]
|
|
2222
2224
|
|
|
2223
2225
|
return result
|
|
2224
2226
|
}
|
|
@@ -3486,21 +3488,23 @@ export class CAProtocol {
|
|
|
3486
3488
|
}
|
|
3487
3489
|
|
|
3488
3490
|
export class RFIDConfig {
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3491
|
+
paCertificates?: boolean
|
|
3492
|
+
taCertificates?: boolean
|
|
3493
|
+
taSignature?: boolean
|
|
3494
|
+
aaChallenge?: boolean
|
|
3495
|
+
paceProtocol?: boolean
|
|
3496
|
+
caProtocol?: boolean
|
|
3494
3497
|
|
|
3495
3498
|
static fromJson(jsonObject?: any): RFIDConfig | undefined {
|
|
3496
3499
|
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
3497
3500
|
const result = new RFIDConfig
|
|
3498
3501
|
|
|
3499
|
-
result.
|
|
3500
|
-
result.
|
|
3501
|
-
result.
|
|
3502
|
-
result.
|
|
3503
|
-
result.
|
|
3502
|
+
result.paCertificates = jsonObject["paCertificates"]
|
|
3503
|
+
result.taCertificates = jsonObject["taCertificates"]
|
|
3504
|
+
result.taSignature = jsonObject["taSignature"]
|
|
3505
|
+
result.aaChallenge = jsonObject["aaChallenge"]
|
|
3506
|
+
result.paceProtocol = jsonObject["paceProtocol"]
|
|
3507
|
+
result.caProtocol = jsonObject["caProtocol"]
|
|
3504
3508
|
|
|
3505
3509
|
return result
|
|
3506
3510
|
}
|
|
@@ -4378,6 +4382,8 @@ export const eCheckDiagnose = {
|
|
|
4378
4382
|
CHD_PROPERTY_NO_SIGNATURE: 260,
|
|
4379
4383
|
CHD_PROPERTY_TEXT_AS_SIGNATURE: 261,
|
|
4380
4384
|
CHD_PROPERTY_FINGERPRINT_AS_SIGNATURE: 262,
|
|
4385
|
+
CHD_PROPERTY_DOCUMENT_DAMAGED: 263,
|
|
4386
|
+
CHD_PROPERTY_DOCUMENT_CANCELLED: 264,
|
|
4381
4387
|
}
|
|
4382
4388
|
|
|
4383
4389
|
export const eMDLIntentToRetain = {
|
|
@@ -4794,6 +4800,7 @@ export const eRPRM_SecurityFeatureType = {
|
|
|
4794
4800
|
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
|
|
4795
4801
|
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
|
|
4796
4802
|
SECURITY_FEATURE_TYPE_SIGNATURE_PRESENCE: 62,
|
|
4803
|
+
SECURITY_FEATURE_TYPE_DAMAGE_CHECK: 63,
|
|
4797
4804
|
}
|
|
4798
4805
|
|
|
4799
4806
|
export const OnlineMode = {
|
|
@@ -5920,6 +5927,8 @@ export const eVisualFieldType = {
|
|
|
5920
5927
|
FT_DLCLASSCODE_B3_FROM: 706,
|
|
5921
5928
|
FT_DLCLASSCODE_B3_TO: 707,
|
|
5922
5929
|
FT_DLCLASSCODE_B3_NOTES: 708,
|
|
5930
|
+
FT_ADDRESS_POST_OFFICE: 709,
|
|
5931
|
+
FT_ADDRESS_LOT: 710,
|
|
5923
5932
|
}
|
|
5924
5933
|
|
|
5925
5934
|
export const DocReaderOrientation = {
|
|
@@ -6282,6 +6291,7 @@ export default class DocumentReader {
|
|
|
6282
6291
|
static providePACertificates(certificates: PKDCertificate[] | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
6283
6292
|
static provideTACertificates(certificates: PKDCertificate[] | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
6284
6293
|
static provideTASignature(signature: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
6294
|
+
static provideAAChallenge(challenge: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
6285
6295
|
static selectPACEProtocol(protocol: PACEProtocol, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
6286
6296
|
static selectCAProtocol(protocol: CAProtocol, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
6287
6297
|
static setTCCParams(params: TccParams, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
package/index.js
CHANGED
|
@@ -1503,6 +1503,7 @@ export class AuthenticityPropertiesParams {
|
|
|
1503
1503
|
const result = new AuthenticityPropertiesParams()
|
|
1504
1504
|
|
|
1505
1505
|
result.checkHoldersSignature = jsonObject["checkHoldersSignature"]
|
|
1506
|
+
result.checkDocumentDamage = jsonObject["checkDocumentDamage"]
|
|
1506
1507
|
|
|
1507
1508
|
return result
|
|
1508
1509
|
}
|
|
@@ -2272,11 +2273,12 @@ export class RFIDConfig {
|
|
|
2272
2273
|
if (jsonObject == null) return null
|
|
2273
2274
|
const result = new RFIDConfig()
|
|
2274
2275
|
|
|
2275
|
-
result.
|
|
2276
|
-
result.
|
|
2277
|
-
result.
|
|
2278
|
-
result.
|
|
2279
|
-
result.
|
|
2276
|
+
result.paCertificates = jsonObject["paCertificates"]
|
|
2277
|
+
result.taCertificates = jsonObject["taCertificates"]
|
|
2278
|
+
result.taSignature = jsonObject["taSignature"]
|
|
2279
|
+
result.aaChallenge = jsonObject["aaChallenge"]
|
|
2280
|
+
result.paceProtocol = jsonObject["paceProtocol"]
|
|
2281
|
+
result.caProtocol = jsonObject["caProtocol"]
|
|
2280
2282
|
|
|
2281
2283
|
return result
|
|
2282
2284
|
}
|
|
@@ -3156,6 +3158,8 @@ export const eCheckDiagnose = {
|
|
|
3156
3158
|
CHD_PROPERTY_NO_SIGNATURE: 260,
|
|
3157
3159
|
CHD_PROPERTY_TEXT_AS_SIGNATURE: 261,
|
|
3158
3160
|
CHD_PROPERTY_FINGERPRINT_AS_SIGNATURE: 262,
|
|
3161
|
+
CHD_PROPERTY_DOCUMENT_DAMAGED: 263,
|
|
3162
|
+
CHD_PROPERTY_DOCUMENT_CANCELLED: 264,
|
|
3159
3163
|
}
|
|
3160
3164
|
|
|
3161
3165
|
export const eMDLIntentToRetain = {
|
|
@@ -3572,6 +3576,7 @@ export const eRPRM_SecurityFeatureType = {
|
|
|
3572
3576
|
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
|
|
3573
3577
|
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
|
|
3574
3578
|
SECURITY_FEATURE_TYPE_SIGNATURE_PRESENCE: 62,
|
|
3579
|
+
SECURITY_FEATURE_TYPE_DAMAGE_CHECK: 63,
|
|
3575
3580
|
}
|
|
3576
3581
|
|
|
3577
3582
|
export const OnlineMode = {
|
|
@@ -4698,6 +4703,8 @@ export const eVisualFieldType = {
|
|
|
4698
4703
|
FT_DLCLASSCODE_B3_FROM: 706,
|
|
4699
4704
|
FT_DLCLASSCODE_B3_TO: 707,
|
|
4700
4705
|
FT_DLCLASSCODE_B3_NOTES: 708,
|
|
4706
|
+
FT_ADDRESS_POST_OFFICE: 709,
|
|
4707
|
+
FT_ADDRESS_LOT: 710,
|
|
4701
4708
|
}
|
|
4702
4709
|
|
|
4703
4710
|
export const DocReaderOrientation = {
|
|
@@ -5061,6 +5068,7 @@ DocumentReader.stopRFIDReader = (successCallback, errorCallback) => RNRegulaDocu
|
|
|
5061
5068
|
DocumentReader.providePACertificates = (certificates, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "providePACertificates", [certificates], successCallback, errorCallback)
|
|
5062
5069
|
DocumentReader.provideTACertificates = (certificates, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "provideTACertificates", [certificates], successCallback, errorCallback)
|
|
5063
5070
|
DocumentReader.provideTASignature = (signature, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "provideTASignature", [signature], successCallback, errorCallback)
|
|
5071
|
+
DocumentReader.provideAAChallenge = (challenge, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "provideAAChallenge", [challenge], successCallback, errorCallback)
|
|
5064
5072
|
DocumentReader.selectPACEProtocol = (protocol, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "selectPACEProtocol", [protocol], successCallback, errorCallback)
|
|
5065
5073
|
DocumentReader.selectCAProtocol = (protocol, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "selectCAProtocol", [protocol], successCallback, errorCallback)
|
|
5066
5074
|
DocumentReader.setTCCParams = (params, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setTCCParams", [params], successCallback, errorCallback)
|
package/ios/RGLWConfig.m
CHANGED
|
@@ -1102,6 +1102,7 @@
|
|
|
1102
1102
|
|
|
1103
1103
|
+(void)setAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)result input:(NSDictionary*)input {
|
|
1104
1104
|
if(input[@"checkHoldersSignature"]) result.checkHoldersSignature = input[@"checkHoldersSignature"];
|
|
1105
|
+
if(input[@"checkDocumentDamage"]) result.checkDocumentDamage = input[@"checkDocumentDamage"];
|
|
1105
1106
|
}
|
|
1106
1107
|
|
|
1107
1108
|
+(NSDictionary*)getAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)input {
|
|
@@ -1109,6 +1110,7 @@
|
|
|
1109
1110
|
NSMutableDictionary *result = [NSMutableDictionary new];
|
|
1110
1111
|
|
|
1111
1112
|
result[@"checkHoldersSignature"] = input.checkHoldersSignature;
|
|
1113
|
+
result[@"checkDocumentDamage"] = input.checkDocumentDamage;
|
|
1112
1114
|
|
|
1113
1115
|
return result;
|
|
1114
1116
|
}
|
|
@@ -246,6 +246,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
if (input[@"scenario"]) config.scenario = input[@"scenario"];
|
|
249
|
+
if (input[@"onlineProcessingConfig"]) config.onlineProcessingConfig = [self onlineProcessingConfigFromJson:input[@"onlineProcessingConfig"]];
|
|
249
250
|
if (input[@"livePortrait"]) config.livePortrait = [self imageWithBase64:input[@"livePortrait"]];
|
|
250
251
|
if (input[@"extPortrait"]) config.extPortrait = [self imageWithBase64:input[@"extPortrait"]];
|
|
251
252
|
if (input[@"oneShotIdentification"]) config.oneShotIdentification = input[@"oneShotIdentification"];
|
package/ios/RGLWMain.h
CHANGED
|
@@ -27,6 +27,7 @@ static NSString* _Nonnull rfidOnRetryReadChipEvent = @"rfidOnRetryReadChipEvent"
|
|
|
27
27
|
static NSString* _Nonnull paCertificateCompletionEvent = @"pa_certificate_completion";
|
|
28
28
|
static NSString* _Nonnull taCertificateCompletionEvent = @"ta_certificate_completion";
|
|
29
29
|
static NSString* _Nonnull taSignatureCompletionEvent = @"ta_signature_completion";
|
|
30
|
+
static NSString* _Nonnull aaChallengeCompletionEvent = @"aaChallengeCompletionEvent";
|
|
30
31
|
static NSString* _Nonnull paceProtocolCompletionEvent = @"paceProtocolCompletionEvent";
|
|
31
32
|
static NSString* _Nonnull caProtocolCompletionEvent = @"caProtocolCompletionEvent";
|
|
32
33
|
static NSString* _Nonnull drVideoEncoderCompletionEvent = @"video_encoder_completion";
|
package/ios/RGLWMain.m
CHANGED
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
@"providePACertificates": ^{ [self providePACertificates :args[0]]; },
|
|
48
48
|
@"provideTACertificates": ^{ [self provideTACertificates :args[0]]; },
|
|
49
49
|
@"provideTASignature": ^{ [self provideTASignature :args[0]]; },
|
|
50
|
+
@"provideAAChallenge": ^{ [self provideAAChallenge :args[0]]; },
|
|
50
51
|
@"selectPACEProtocol": ^{ [self selectPACEProtocol :args[0]]; },
|
|
51
52
|
@"selectCAProtocol": ^{ [self selectCAProtocol :args[0]]; },
|
|
52
53
|
@"setTCCParams": ^{ [self setTCCParams :args[0] :callback]; },
|
|
@@ -289,6 +290,10 @@ static NSDictionary* headers;
|
|
|
289
290
|
taSignatureCompletion([RGLWJSONConstructor base64Decode:signature]);
|
|
290
291
|
}
|
|
291
292
|
|
|
293
|
+
+(void)provideAAChallenge:(NSString*)challenge {
|
|
294
|
+
aaChallengeCompletion(challenge);
|
|
295
|
+
}
|
|
296
|
+
|
|
292
297
|
+(void)selectPACEProtocol:(NSDictionary*)protocol {
|
|
293
298
|
paceProtocolCompletion([RGLWJSONConstructor paceProtocolFromJson:protocol]);
|
|
294
299
|
}
|
|
@@ -632,6 +637,7 @@ RGLWCallback savedCallbackForBluetoothResult;
|
|
|
632
637
|
RGLRFIDCertificatesCallback paCertificateCompletion;
|
|
633
638
|
RGLRFIDCertificatesCallback taCertificateCompletion;
|
|
634
639
|
RGLWRFIDSignatureCallback taSignatureCompletion;
|
|
640
|
+
RGLRFIDAAChallengeCallback aaChallengeCompletion;
|
|
635
641
|
RGLRFIDAccessControlPACECallback paceProtocolCompletion;
|
|
636
642
|
RGLRFIDAccessControlCACallback caProtocolCompletion;
|
|
637
643
|
|
|
@@ -667,6 +673,16 @@ NSDictionary* rfidReaderRequest;
|
|
|
667
673
|
}
|
|
668
674
|
}
|
|
669
675
|
|
|
676
|
+
- (void)onRequestAAChallenge:(NSString*)challenge callback:(void(^)(NSString* challenge))callback {
|
|
677
|
+
if ([rfidReaderRequest isKindOfClass:[NSDictionary class]] && [rfidReaderRequest[@"aaChallenge"] boolValue]) {
|
|
678
|
+
aaChallengeCompletion = callback;
|
|
679
|
+
sendEvent(aaChallengeCompletionEvent, challenge);
|
|
680
|
+
} else {
|
|
681
|
+
aaChallengeCompletion = nil;
|
|
682
|
+
callback(nil);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
670
686
|
- (void)onRequestPACEProtocolWithOptions:(NSArray<RGLRFIDAccessControlPACE*>*)protocols callback:(RGLRFIDAccessControlPACECallback)callback {
|
|
671
687
|
if ([rfidReaderRequest isKindOfClass:[NSDictionary class]] && [rfidReaderRequest[@"paceProtocol"] boolValue]) {
|
|
672
688
|
paceProtocolCompletion = callback;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/react-native-document-reader-api",
|
|
3
|
-
"version": "9.10.
|
|
3
|
+
"version": "9.10.918-rc",
|
|
4
4
|
"description": "React Native module for reading and validation of identification documents (API framework)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
-
xmlns:tools="http://schemas.android.com/tools">
|
|
4
|
-
|
|
5
|
-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
6
|
-
|
|
7
|
-
<application
|
|
8
|
-
android:usesCleartextTraffic="true"
|
|
9
|
-
tools:targetApi="28"
|
|
10
|
-
tools:ignore="GoogleAppIndexingWarning">
|
|
11
|
-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
|
|
12
|
-
</application>
|
|
13
|
-
</manifest>
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
|
5
|
-
* directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
package com.regula.dr.fullauthrfid;
|
|
8
|
-
|
|
9
|
-
import android.content.Context;
|
|
10
|
-
import com.facebook.flipper.android.AndroidFlipperClient;
|
|
11
|
-
import com.facebook.flipper.android.utils.FlipperUtils;
|
|
12
|
-
import com.facebook.flipper.core.FlipperClient;
|
|
13
|
-
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
|
|
14
|
-
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
|
|
15
|
-
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
|
|
16
|
-
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
|
17
|
-
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
|
18
|
-
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
|
19
|
-
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
|
20
|
-
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
|
21
|
-
import com.facebook.react.ReactInstanceEventListener;
|
|
22
|
-
import com.facebook.react.ReactInstanceManager;
|
|
23
|
-
import com.facebook.react.bridge.ReactContext;
|
|
24
|
-
import com.facebook.react.modules.network.NetworkingModule;
|
|
25
|
-
import okhttp3.OkHttpClient;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Class responsible of loading Flipper inside your React Native application. This is the debug
|
|
29
|
-
* flavor of it. Here you can add your own plugins and customize the Flipper setup.
|
|
30
|
-
*/
|
|
31
|
-
public class ReactNativeFlipper {
|
|
32
|
-
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
33
|
-
if (FlipperUtils.shouldEnableFlipper(context)) {
|
|
34
|
-
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
|
35
|
-
|
|
36
|
-
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
|
37
|
-
client.addPlugin(new DatabasesFlipperPlugin(context));
|
|
38
|
-
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
|
39
|
-
client.addPlugin(CrashReporterPlugin.getInstance());
|
|
40
|
-
|
|
41
|
-
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
|
42
|
-
NetworkingModule.setCustomClientBuilder(
|
|
43
|
-
new NetworkingModule.CustomClientBuilder() {
|
|
44
|
-
@Override
|
|
45
|
-
public void apply(OkHttpClient.Builder builder) {
|
|
46
|
-
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
client.addPlugin(networkFlipperPlugin);
|
|
50
|
-
client.start();
|
|
51
|
-
|
|
52
|
-
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
|
53
|
-
// Hence we run if after all native modules have been initialized
|
|
54
|
-
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
|
55
|
-
if (reactContext == null) {
|
|
56
|
-
reactInstanceManager.addReactInstanceEventListener(
|
|
57
|
-
new ReactInstanceEventListener() {
|
|
58
|
-
@Override
|
|
59
|
-
public void onReactContextInitialized(ReactContext reactContext) {
|
|
60
|
-
reactInstanceManager.removeReactInstanceEventListener(this);
|
|
61
|
-
reactContext.runOnNativeModulesQueueThread(
|
|
62
|
-
new Runnable() {
|
|
63
|
-
@Override
|
|
64
|
-
public void run() {
|
|
65
|
-
client.addPlugin(new FrescoFlipperPlugin());
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
client.addPlugin(new FrescoFlipperPlugin());
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
package com.regula.dr.fullauthrfid;
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.ReactActivity;
|
|
4
|
-
import com.facebook.react.ReactActivityDelegate;
|
|
5
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
6
|
-
import com.facebook.react.defaults.DefaultReactActivityDelegate;
|
|
7
|
-
|
|
8
|
-
public class MainActivity extends ReactActivity {
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
|
12
|
-
* rendering of the component.
|
|
13
|
-
*/
|
|
14
|
-
@Override
|
|
15
|
-
protected String getMainComponentName() {
|
|
16
|
-
return "DocumentReader";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
|
|
21
|
-
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
|
|
22
|
-
* (aka React 18) with two boolean flags.
|
|
23
|
-
*/
|
|
24
|
-
@Override
|
|
25
|
-
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
26
|
-
return new DefaultReactActivityDelegate(
|
|
27
|
-
this,
|
|
28
|
-
getMainComponentName(),
|
|
29
|
-
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
|
|
30
|
-
DefaultNewArchitectureEntryPoint.getFabricEnabled());
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
package com.regula.dr.fullauthrfid;
|
|
2
|
-
|
|
3
|
-
import android.app.Application;
|
|
4
|
-
import com.facebook.react.PackageList;
|
|
5
|
-
import com.facebook.react.ReactApplication;
|
|
6
|
-
import com.facebook.react.ReactNativeHost;
|
|
7
|
-
import com.facebook.react.ReactPackage;
|
|
8
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
9
|
-
import com.facebook.react.defaults.DefaultReactNativeHost;
|
|
10
|
-
import com.facebook.soloader.SoLoader;
|
|
11
|
-
|
|
12
|
-
import java.io.IOException;
|
|
13
|
-
import java.util.List;
|
|
14
|
-
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
|
|
15
|
-
|
|
16
|
-
public class MainApplication extends Application implements ReactApplication {
|
|
17
|
-
|
|
18
|
-
private final ReactNativeHost mReactNativeHost =
|
|
19
|
-
new DefaultReactNativeHost(this) {
|
|
20
|
-
@Override
|
|
21
|
-
public boolean getUseDeveloperSupport() {
|
|
22
|
-
return BuildConfig.DEBUG;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@Override
|
|
26
|
-
protected List<ReactPackage> getPackages() {
|
|
27
|
-
@SuppressWarnings("UnnecessaryLocalVariable")
|
|
28
|
-
List<ReactPackage> packages = new PackageList(this).getPackages();
|
|
29
|
-
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
30
|
-
// packages.add(new MyReactNativePackage());
|
|
31
|
-
return packages;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@Override
|
|
35
|
-
protected String getJSMainModuleName() {
|
|
36
|
-
return "index";
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@Override
|
|
40
|
-
protected boolean isNewArchEnabled() {
|
|
41
|
-
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@Override
|
|
45
|
-
protected Boolean isHermesEnabled() {
|
|
46
|
-
return BuildConfig.IS_HERMES_ENABLED;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
@Override
|
|
51
|
-
public ReactNativeHost getReactNativeHost() {
|
|
52
|
-
return mReactNativeHost;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Override
|
|
56
|
-
public void onCreate() {
|
|
57
|
-
super.onCreate();
|
|
58
|
-
try {
|
|
59
|
-
SoLoader.init(this, OpenSourceMergedSoMapping.INSTANCE);
|
|
60
|
-
} catch (IOException e) {
|
|
61
|
-
throw new RuntimeException(e);
|
|
62
|
-
}
|
|
63
|
-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
64
|
-
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
65
|
-
DefaultNewArchitectureEntryPoint.load();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
|
5
|
-
* directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
package com.regula.dr.fullauthrfid;
|
|
8
|
-
|
|
9
|
-
import android.content.Context;
|
|
10
|
-
import com.facebook.react.ReactInstanceManager;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Class responsible of loading Flipper inside your React Native application. This is the release
|
|
14
|
-
* flavor of it so it's empty as we don't want to load Flipper.
|
|
15
|
-
*/
|
|
16
|
-
public class ReactNativeFlipper {
|
|
17
|
-
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
18
|
-
// Do nothing as we don't want to initialize Flipper on Release.
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
#import <XCTest/XCTest.h>
|
|
3
|
-
|
|
4
|
-
#import <React/RCTLog.h>
|
|
5
|
-
#import <React/RCTRootView.h>
|
|
6
|
-
|
|
7
|
-
#define TIMEOUT_SECONDS 600
|
|
8
|
-
#define TEXT_TO_LOOK_FOR @"Welcome to React"
|
|
9
|
-
|
|
10
|
-
@interface DocumentReaderTests : XCTestCase
|
|
11
|
-
|
|
12
|
-
@end
|
|
13
|
-
|
|
14
|
-
@implementation DocumentReaderTests
|
|
15
|
-
|
|
16
|
-
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
|
|
17
|
-
{
|
|
18
|
-
if (test(view)) {
|
|
19
|
-
return YES;
|
|
20
|
-
}
|
|
21
|
-
for (UIView *subview in [view subviews]) {
|
|
22
|
-
if ([self findSubviewInView:subview matching:test]) {
|
|
23
|
-
return YES;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return NO;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
- (void)testRendersWelcomeScreen
|
|
30
|
-
{
|
|
31
|
-
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
|
|
32
|
-
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
|
|
33
|
-
BOOL foundElement = NO;
|
|
34
|
-
|
|
35
|
-
__block NSString *redboxError = nil;
|
|
36
|
-
#ifdef DEBUG
|
|
37
|
-
RCTSetLogFunction(
|
|
38
|
-
^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
|
|
39
|
-
if (level >= RCTLogLevelError) {
|
|
40
|
-
redboxError = message;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
#endif
|
|
44
|
-
|
|
45
|
-
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
|
|
46
|
-
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
47
|
-
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
48
|
-
|
|
49
|
-
foundElement = [self findSubviewInView:vc.view
|
|
50
|
-
matching:^BOOL(UIView *view) {
|
|
51
|
-
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
|
|
52
|
-
return YES;
|
|
53
|
-
}
|
|
54
|
-
return NO;
|
|
55
|
-
}];
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
#ifdef DEBUG
|
|
59
|
-
RCTSetLogFunction(RCTDefaultLogFunction);
|
|
60
|
-
#endif
|
|
61
|
-
|
|
62
|
-
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
|
|
63
|
-
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
-
<string>en</string>
|
|
7
|
-
<key>CFBundleExecutable</key>
|
|
8
|
-
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
-
<key>CFBundleIdentifier</key>
|
|
10
|
-
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
-
<string>6.0</string>
|
|
13
|
-
<key>CFBundleName</key>
|
|
14
|
-
<string>$(PRODUCT_NAME)</string>
|
|
15
|
-
<key>CFBundlePackageType</key>
|
|
16
|
-
<string>BNDL</string>
|
|
17
|
-
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>1.0</string>
|
|
19
|
-
<key>CFBundleSignature</key>
|
|
20
|
-
<string>????</string>
|
|
21
|
-
<key>CFBundleVersion</key>
|
|
22
|
-
<string>1</string>
|
|
23
|
-
</dict>
|
|
24
|
-
</plist>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const fs = require('node:fs')
|
|
2
|
-
const next = require('image-size-next')
|
|
3
|
-
|
|
4
|
-
function imageSize(input) {
|
|
5
|
-
const data = typeof input === 'string'
|
|
6
|
-
? fs.readFileSync(input)
|
|
7
|
-
: input
|
|
8
|
-
|
|
9
|
-
return next.imageSize(data)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
module.exports = imageSize
|
|
13
|
-
module.exports.default = imageSize
|
|
14
|
-
module.exports.imageSize = imageSize
|
|
15
|
-
module.exports.disableTypes = next.disableTypes
|
|
16
|
-
module.exports.types = next.types
|