@regulaforensics/react-native-document-reader-api 8.2.179-rc → 8.2.180-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/RNDocumentReaderApi.podspec +1 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +4 -0
- package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +12 -0
- package/example/package.json +2 -2
- package/index.d.ts +8 -0
- package/index.js +6 -0
- package/ios/RGLWConfig.m +4 -0
- package/ios/RGLWMain.m +10 -0
- package/package.json +1 -1
|
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.source = { :http => 'file:' + __dir__ }
|
|
15
15
|
s.ios.deployment_target = '13.0'
|
|
16
16
|
s.source_files = "ios/*.{h,m}"
|
|
17
|
-
s.dependency '
|
|
17
|
+
s.dependency 'DocumentReaderNightly', '8.2.4892'
|
|
18
18
|
s.dependency 'React'
|
|
19
19
|
end
|
package/android/build.gradle
CHANGED
|
@@ -32,7 +32,7 @@ android {
|
|
|
32
32
|
rootProject.allprojects {
|
|
33
33
|
repositories {
|
|
34
34
|
maven {
|
|
35
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader/
|
|
35
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -41,7 +41,7 @@ dependencies {
|
|
|
41
41
|
//noinspection GradleDynamicVersion
|
|
42
42
|
implementation 'com.facebook.react:react-native:+'
|
|
43
43
|
//noinspection GradleDependency
|
|
44
|
-
implementation('com.regula.documentreader:api:8.2.
|
|
44
|
+
implementation('com.regula.documentreader:api:8.2.11644') {
|
|
45
45
|
transitive = true
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -137,6 +137,7 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
|
|
|
137
137
|
"generateDTCVC" -> processParams.generateDTCVC = v as Boolean
|
|
138
138
|
"strictDLCategoryExpiry" -> processParams.strictDLCategoryExpiry = v as Boolean
|
|
139
139
|
"generateAlpha2Codes" -> processParams.generateAlpha2Codes = v as Boolean
|
|
140
|
+
"disableAuthResolutionFilter" -> processParams.disableAuthResolutionFilter = v as Boolean
|
|
140
141
|
"measureSystem" -> processParams.measureSystem = v.toInt()
|
|
141
142
|
"barcodeParserType" -> processParams.barcodeParserType = v.toInt()
|
|
142
143
|
"perspectiveAngle" -> processParams.perspectiveAngle = v.toInt()
|
|
@@ -221,6 +222,7 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
|
|
|
221
222
|
"generateDTCVC" to processParams.generateDTCVC,
|
|
222
223
|
"strictDLCategoryExpiry" to processParams.strictDLCategoryExpiry,
|
|
223
224
|
"generateAlpha2Codes" to processParams.generateAlpha2Codes,
|
|
225
|
+
"disableAuthResolutionFilter" to processParams.disableAuthResolutionFilter,
|
|
224
226
|
"measureSystem" to processParams.measureSystem,
|
|
225
227
|
"barcodeParserType" to processParams.barcodeParserType,
|
|
226
228
|
"perspectiveAngle" to processParams.perspectiveAngle,
|
|
@@ -316,6 +318,7 @@ fun setCustomization(customization: ParamsCustomization, opts: JSONObject) = opt
|
|
|
316
318
|
"torchButtonOnImage" -> editor.setTorchImageOn(v.toDrawable())
|
|
317
319
|
"torchButtonOffImage" -> editor.setTorchImageOff(v.toDrawable())
|
|
318
320
|
"livenessAnimationImage" -> editor.setLivenessAnimationImage(v.toDrawable())
|
|
321
|
+
"multipageButtonImage" -> editor.setMultipageButtonImage(v.toDrawable())
|
|
319
322
|
"helpAnimationImageMatrix" -> editor.setHelpAnimationImageMatrix(matrixFromJSON(v as JSONArray?)).setHelpAnimationImageScaleType(ImageView.ScaleType.MATRIX)
|
|
320
323
|
"multipageAnimationFrontImageMatrix" -> editor.setMultipageAnimationFrontImageMatrix(matrixFromJSON(v as JSONArray?)).setMultipageAnimationFrontImageScaleType(ImageView.ScaleType.MATRIX)
|
|
321
324
|
"multipageAnimationBackImageMatrix" -> editor.setMultipageAnimationBackImageMatrix(matrixFromJSON(v as JSONArray?)).setMultipageAnimationBackImageScaleType(ImageView.ScaleType.MATRIX)
|
|
@@ -401,6 +404,7 @@ fun getCustomization(customization: ParamsCustomization) = mapOf(
|
|
|
401
404
|
"torchButtonOnImage" to customization.torchImageOnDrawable.toBase64(),
|
|
402
405
|
"torchButtonOffImage" to customization.torchImageOffDrawable.toBase64(),
|
|
403
406
|
"livenessAnimationImage" to customization.livenessAnimationImage.toBase64(),
|
|
407
|
+
"multipageButtonImage" to customization.multipageButtonDrawable.toBase64(),
|
|
404
408
|
"helpAnimationImageMatrix" to generateMatrix(customization.helpAnimationImageMatrix),
|
|
405
409
|
"multipageAnimationFrontImageMatrix" to generateMatrix(customization.multipageAnimationFrontImageMatrix),
|
|
406
410
|
"multipageAnimationBackImageMatrix" to generateMatrix(customization.multipageAnimationBackImageMatrix),
|
|
@@ -47,12 +47,16 @@ import com.regula.plugin.documentreader.Convert.toByteArray
|
|
|
47
47
|
fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
|
|
48
48
|
"getDocumentReaderIsReady" -> getDocumentReaderIsReady(callback)
|
|
49
49
|
"getDocumentReaderStatus" -> getDocumentReaderStatus(callback)
|
|
50
|
+
"getRfidSessionStatus" -> getRfidSessionStatus(callback)
|
|
51
|
+
"setRfidSessionStatus" -> setRfidSessionStatus(argsNullable(0))
|
|
50
52
|
"getTag" -> getTag(callback)
|
|
51
53
|
"setTag" -> setTag(argsNullable(0))
|
|
52
54
|
"getTenant" -> getTenant(callback)
|
|
53
55
|
"setTenant" -> setTenant(argsNullable(0))
|
|
54
56
|
"getEnv" -> getEnv(callback)
|
|
55
57
|
"setEnv" -> setEnv(argsNullable(0))
|
|
58
|
+
"getLocale" -> getLocale(callback)
|
|
59
|
+
"setLocale" -> setLocale(argsNullable(0))
|
|
56
60
|
"getFunctionality" -> getFunctionality(callback)
|
|
57
61
|
"setFunctionality" -> setFunctionality(args(0))
|
|
58
62
|
"getProcessParams" -> getProcessParams(callback)
|
|
@@ -142,6 +146,10 @@ fun getDocumentReaderIsReady(callback: Callback) = callback(Instance().isReady)
|
|
|
142
146
|
|
|
143
147
|
fun getDocumentReaderStatus(callback: Callback) = callback(Instance().status)
|
|
144
148
|
|
|
149
|
+
fun getRfidSessionStatus(iosOnly: Callback) = iosOnly(null)
|
|
150
|
+
|
|
151
|
+
fun setRfidSessionStatus(iosOnly: String?) = Unit
|
|
152
|
+
|
|
145
153
|
fun getTag(callback: Callback) = callback(Instance().tag)
|
|
146
154
|
|
|
147
155
|
fun setTag(tag: String?) = tag.let { Instance().tag = it }
|
|
@@ -154,6 +162,10 @@ fun getEnv(callback: Callback) = callback(Instance().env)
|
|
|
154
162
|
|
|
155
163
|
fun setEnv(tag: String?) = tag.let { Instance().env = it }
|
|
156
164
|
|
|
165
|
+
fun getLocale(callback: Callback) = callback(Instance().locale)
|
|
166
|
+
|
|
167
|
+
fun setLocale(locale: String?) = locale.let { Instance().locale = it }
|
|
168
|
+
|
|
157
169
|
fun getFunctionality(callback: Callback) = callback(getFunctionality(Instance().functionality()))
|
|
158
170
|
|
|
159
171
|
fun setFunctionality(functionality: JSONObject) = setFunctionality(Instance().functionality(), functionality)
|
package/example/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"test": "jest"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@regulaforensics/react-native-document-reader-api": "8.2.
|
|
14
|
-
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "8.2.
|
|
13
|
+
"@regulaforensics/react-native-document-reader-api": "8.2.180-nightly",
|
|
14
|
+
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "8.2.509-nightly",
|
|
15
15
|
"react-native-progress": "5.0.0",
|
|
16
16
|
"react-native-radio-buttons-group": "3.0.5",
|
|
17
17
|
"@rneui/base": "4.0.0-rc.7",
|
package/index.d.ts
CHANGED
|
@@ -2133,6 +2133,7 @@ export class ProcessParams {
|
|
|
2133
2133
|
generateDTCVC?: boolean
|
|
2134
2134
|
strictDLCategoryExpiry?: boolean
|
|
2135
2135
|
generateAlpha2Codes?: boolean
|
|
2136
|
+
disableAuthResolutionFilter?: boolean
|
|
2136
2137
|
barcodeParserType?: number
|
|
2137
2138
|
perspectiveAngle?: number
|
|
2138
2139
|
minDPI?: number
|
|
@@ -2213,6 +2214,7 @@ export class ProcessParams {
|
|
|
2213
2214
|
result.generateDTCVC = jsonObject["generateDTCVC"]
|
|
2214
2215
|
result.strictDLCategoryExpiry = jsonObject["strictDLCategoryExpiry"]
|
|
2215
2216
|
result.generateAlpha2Codes = jsonObject["generateAlpha2Codes"]
|
|
2217
|
+
result.disableAuthResolutionFilter = jsonObject["disableAuthResolutionFilter"]
|
|
2216
2218
|
result.barcodeParserType = jsonObject["barcodeParserType"]
|
|
2217
2219
|
result.perspectiveAngle = jsonObject["perspectiveAngle"]
|
|
2218
2220
|
result.minDPI = jsonObject["minDPI"]
|
|
@@ -2422,6 +2424,7 @@ export class Customization {
|
|
|
2422
2424
|
changeFrameButtonExpandImage?: string
|
|
2423
2425
|
changeFrameButtonCollapseImage?: string
|
|
2424
2426
|
livenessAnimationImage?: string
|
|
2427
|
+
multipageButtonImage?: string
|
|
2425
2428
|
statusTextFont?: Font
|
|
2426
2429
|
resultStatusTextFont?: Font
|
|
2427
2430
|
multipageButtonTextFont?: Font
|
|
@@ -2497,6 +2500,7 @@ export class Customization {
|
|
|
2497
2500
|
result.changeFrameButtonExpandImage = jsonObject["changeFrameButtonExpandImage"]
|
|
2498
2501
|
result.changeFrameButtonCollapseImage = jsonObject["changeFrameButtonCollapseImage"]
|
|
2499
2502
|
result.livenessAnimationImage = jsonObject["livenessAnimationImage"]
|
|
2503
|
+
result.multipageButtonImage = jsonObject["multipageButtonImage"]
|
|
2500
2504
|
result.statusTextFont = Font.fromJson(jsonObject["statusTextFont"])
|
|
2501
2505
|
result.resultStatusTextFont = Font.fromJson(jsonObject["resultStatusTextFont"])
|
|
2502
2506
|
result.multipageButtonTextFont = Font.fromJson(jsonObject["multipageButtonTextFont"])
|
|
@@ -5134,6 +5138,8 @@ export const eVisualFieldType = {
|
|
|
5134
5138
|
FT_MVC_AGENCY: 695,
|
|
5135
5139
|
FT_ISSUING_STATE_CODE_ALPHA2: 696,
|
|
5136
5140
|
FT_NATIONALITY_CODE_ALPHA2: 697,
|
|
5141
|
+
FT_FIRST_ISSUE_DATE_CHECKDIGIT: 698,
|
|
5142
|
+
FT_FIRST_ISSUE_DATE_CHECKSUM: 699,
|
|
5137
5143
|
}
|
|
5138
5144
|
|
|
5139
5145
|
export const DocReaderOrientation = {
|
|
@@ -5418,6 +5424,8 @@ export default class DocumentReader {
|
|
|
5418
5424
|
static setTenant(tenant: string | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5419
5425
|
static getEnv(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5420
5426
|
static setEnv(env: string | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5427
|
+
static getLocale(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5428
|
+
static setLocale(locale: string | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5421
5429
|
static getFunctionality(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5422
5430
|
static setFunctionality(functionality: Functionality, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5423
5431
|
static getProcessParams(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
package/index.js
CHANGED
|
@@ -1463,6 +1463,7 @@ export class ProcessParams {
|
|
|
1463
1463
|
result.generateDTCVC = jsonObject["generateDTCVC"]
|
|
1464
1464
|
result.strictDLCategoryExpiry = jsonObject["strictDLCategoryExpiry"]
|
|
1465
1465
|
result.generateAlpha2Codes = jsonObject["generateAlpha2Codes"]
|
|
1466
|
+
result.disableAuthResolutionFilter = jsonObject["disableAuthResolutionFilter"]
|
|
1466
1467
|
result.barcodeParserType = jsonObject["barcodeParserType"]
|
|
1467
1468
|
result.perspectiveAngle = jsonObject["perspectiveAngle"]
|
|
1468
1469
|
result.minDPI = jsonObject["minDPI"]
|
|
@@ -1641,6 +1642,7 @@ export class Customization {
|
|
|
1641
1642
|
result.changeFrameButtonExpandImage = jsonObject["changeFrameButtonExpandImage"]
|
|
1642
1643
|
result.changeFrameButtonCollapseImage = jsonObject["changeFrameButtonCollapseImage"]
|
|
1643
1644
|
result.livenessAnimationImage = jsonObject["livenessAnimationImage"]
|
|
1645
|
+
result.multipageButtonImage = jsonObject["multipageButtonImage"]
|
|
1644
1646
|
result.statusTextFont = Font.fromJson(jsonObject["statusTextFont"])
|
|
1645
1647
|
result.resultStatusTextFont = Font.fromJson(jsonObject["resultStatusTextFont"])
|
|
1646
1648
|
result.multipageButtonTextFont = Font.fromJson(jsonObject["multipageButtonTextFont"])
|
|
@@ -4143,6 +4145,8 @@ export const eVisualFieldType = {
|
|
|
4143
4145
|
FT_MVC_AGENCY: 695,
|
|
4144
4146
|
FT_ISSUING_STATE_CODE_ALPHA2: 696,
|
|
4145
4147
|
FT_NATIONALITY_CODE_ALPHA2: 697,
|
|
4148
|
+
FT_FIRST_ISSUE_DATE_CHECKDIGIT: 698,
|
|
4149
|
+
FT_FIRST_ISSUE_DATE_CHECKSUM: 699,
|
|
4146
4150
|
}
|
|
4147
4151
|
|
|
4148
4152
|
export const DocReaderOrientation = {
|
|
@@ -4428,6 +4432,8 @@ DocumentReader.getTenant = (successCallback, errorCallback) => RNRegulaDocumentR
|
|
|
4428
4432
|
DocumentReader.setTenant = (tenant, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setTenant", [tenant], successCallback, errorCallback)
|
|
4429
4433
|
DocumentReader.getEnv = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "getEnv", [], successCallback, errorCallback)
|
|
4430
4434
|
DocumentReader.setEnv = (env, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setEnv", [env], successCallback, errorCallback)
|
|
4435
|
+
DocumentReader.getLocale = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "getLocale", [], successCallback, errorCallback)
|
|
4436
|
+
DocumentReader.setLocale = (locale, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setLocale", [locale], successCallback, errorCallback)
|
|
4431
4437
|
DocumentReader.getFunctionality = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "getFunctionality", [], successCallback, errorCallback)
|
|
4432
4438
|
DocumentReader.setFunctionality = (functionality, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setFunctionality", [functionality], successCallback, errorCallback)
|
|
4433
4439
|
DocumentReader.getProcessParams = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "getProcessParams", [], successCallback, errorCallback)
|
package/ios/RGLWConfig.m
CHANGED
|
@@ -184,6 +184,7 @@
|
|
|
184
184
|
if (options[@"generateDTCVC"]) processParams.generateDTCVC = options[@"generateDTCVC"];
|
|
185
185
|
if (options[@"strictDLCategoryExpiry"]) processParams.strictDLCategoryExpiry = options[@"strictDLCategoryExpiry"];
|
|
186
186
|
if (options[@"generateAlpha2Codes"]) processParams.generateAlpha2Codes = options[@"generateAlpha2Codes"];
|
|
187
|
+
if (options[@"disableAuthResolutionFilter"]) processParams.disableAuthResolutionFilter = options[@"disableAuthResolutionFilter"];
|
|
187
188
|
|
|
188
189
|
// Int
|
|
189
190
|
if([options valueForKey:@"measureSystem"] != nil)
|
|
@@ -314,6 +315,7 @@
|
|
|
314
315
|
result[@"generateDTCVC"] = processParams.generateDTCVC;
|
|
315
316
|
result[@"strictDLCategoryExpiry"] = processParams.strictDLCategoryExpiry;
|
|
316
317
|
result[@"generateAlpha2Codes"] = processParams.generateAlpha2Codes;
|
|
318
|
+
result[@"disableAuthResolutionFilter"] = processParams.disableAuthResolutionFilter;
|
|
317
319
|
|
|
318
320
|
// Int
|
|
319
321
|
result[@"measureSystem"] = [NSNumber numberWithInteger:processParams.measureSystem];
|
|
@@ -475,6 +477,7 @@
|
|
|
475
477
|
customization.torchButtonOffImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"torchButtonOffImage"]];
|
|
476
478
|
if([options valueForKey:@"livenessAnimationImage"] != nil)
|
|
477
479
|
customization.livenessAnimationImage = [RGLWJSONConstructor imageWithBase64:[options valueForKey:@"livenessAnimationImage"]];
|
|
480
|
+
if(options[@"multipageButtonImage"]) customization.multipageButtonImage = [RGLWJSONConstructor imageWithBase64:options[@"multipageButtonImage"]];
|
|
478
481
|
|
|
479
482
|
// Font
|
|
480
483
|
if([options valueForKey:@"statusTextFont"] != nil)
|
|
@@ -576,6 +579,7 @@
|
|
|
576
579
|
result[@"torchButtonOnImage"] = [RGLWJSONConstructor base64WithImage:customization.torchButtonOnImage];
|
|
577
580
|
result[@"torchButtonOffImage"] = [RGLWJSONConstructor base64WithImage:customization.torchButtonOffImage];
|
|
578
581
|
result[@"livenessAnimationImage"] = [RGLWJSONConstructor base64WithImage:customization.livenessAnimationImage];
|
|
582
|
+
result[@"multipageButtonImage"] = [RGLWJSONConstructor base64WithImage:customization.multipageButtonImage];
|
|
579
583
|
|
|
580
584
|
// Font
|
|
581
585
|
result[@"statusTextFont"] = [self generateUIFont:customization.statusTextFont];
|
package/ios/RGLWMain.m
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
@"setTenant": ^{ [self setTenant :args[0]]; },
|
|
17
17
|
@"getEnv": ^{ [self getEnv :callback]; },
|
|
18
18
|
@"setEnv": ^{ [self setEnv :args[0]]; },
|
|
19
|
+
@"getLocale": ^{ [self getLocale :callback]; },
|
|
20
|
+
@"setLocale": ^{ [self setLocale :args[0]]; },
|
|
19
21
|
@"getFunctionality": ^{ [self getFunctionality :callback]; },
|
|
20
22
|
@"setFunctionality": ^{ [self setFunctionality :args[0]]; },
|
|
21
23
|
@"getProcessParams": ^{ [self getProcessParams :callback]; },
|
|
@@ -129,6 +131,14 @@ static NSDictionary* headers;
|
|
|
129
131
|
[RGLDocReader.shared setEnv:tag];
|
|
130
132
|
}
|
|
131
133
|
|
|
134
|
+
+(void)getLocale:(RGLWCallback)callback {
|
|
135
|
+
callback([RGLDocReader.shared languageLocaleCode]);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
+(void)setLocale:(NSString*)locale {
|
|
139
|
+
[RGLDocReader.shared setLanguageLocaleCode:locale];
|
|
140
|
+
}
|
|
141
|
+
|
|
132
142
|
+(void)getFunctionality:(RGLWCallback)callback {
|
|
133
143
|
callback([RGLWJSONConstructor dictToString: [RGLWConfig getFunctionality: RGLDocReader.shared.functionality]]);
|
|
134
144
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/react-native-document-reader-api",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.180-nightly",
|
|
4
4
|
"description": "React Native module for reading and validation of identification documents (API framework)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|