@regulaforensics/cordova-plugin-document-reader-api 8.1.152-nightly → 8.1.173-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/example/package.json +2 -2
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/BluetoothUtil.kt +14 -0
- package/src/android/Config.kt +4 -0
- package/src/android/Main.kt +15 -0
- package/src/android/build.gradle +2 -2
- package/src/ios/RGLWConfig.m +4 -0
- package/src/ios/RGLWMain.m +13 -0
- package/www/DocumentReader.js +9 -0
package/example/package.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "Regula Forensics Inc.",
|
|
14
14
|
"license": "commercial",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@regulaforensics/cordova-plugin-document-reader-api": "8.1.
|
|
17
|
-
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "8.
|
|
16
|
+
"@regulaforensics/cordova-plugin-document-reader-api": "8.1.173-rc",
|
|
17
|
+
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "8.2.521-rc",
|
|
18
18
|
"cordova-android": "13.0.0",
|
|
19
19
|
"cordova-ios": "7.1.1",
|
|
20
20
|
"cordova-plugin-add-swift-support": "2.0.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/cordova-plugin-document-reader-api",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.173-rc",
|
|
4
4
|
"description": "Cordova plugin for reading and validation of identification documents (API framework)",
|
|
5
5
|
"cordova": {
|
|
6
6
|
"id": "@regulaforensics/cordova-plugin-document-reader-api",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="8.1.
|
|
2
|
+
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="8.1.173-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>DocumentReaderApi</name>
|
|
4
4
|
<description>Cordova plugin Document reader api</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<source url="https://github.com/CocoaPods/Specs.git"/>
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
|
-
<pod name="
|
|
32
|
+
<pod name="DocumentReaderStage" spec="8.2.4893" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|
|
@@ -144,3 +144,17 @@ fun requestEnableLocationService(activity: Activity) {
|
|
|
144
144
|
val myIntent = Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)
|
|
145
145
|
startActivityForResult(activity, myIntent, INTENT_REQUEST_ENABLE_LOCATION)
|
|
146
146
|
}
|
|
147
|
+
|
|
148
|
+
// btDevice functionality(temporary, will be reworked)
|
|
149
|
+
|
|
150
|
+
fun btDeviceRequestFlashing() {
|
|
151
|
+
bluetooth?.requestFlashing()
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
fun btDeviceRequestFlashingFullIR() {
|
|
155
|
+
bluetooth?.requestFlashingFullIR()
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
fun btDeviceRequestTurnOffAll() {
|
|
159
|
+
bluetooth?.requestTurnOffAll()
|
|
160
|
+
}
|
package/src/android/Config.kt
CHANGED
|
@@ -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),
|
package/src/android/Main.kt
CHANGED
|
@@ -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)
|
|
@@ -87,6 +91,9 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
|
|
|
87
91
|
"clearPKDCertificates" -> clearPKDCertificates()
|
|
88
92
|
"startNewSession" -> startNewSession()
|
|
89
93
|
"connectBluetoothDevice" -> connectBluetoothDevice(callback)
|
|
94
|
+
"btDeviceRequestFlashing" -> btDeviceRequestFlashing()
|
|
95
|
+
"btDeviceRequestFlashingFullIR" -> btDeviceRequestFlashingFullIR()
|
|
96
|
+
"btDeviceRequestTurnOffAll" -> btDeviceRequestTurnOffAll()
|
|
90
97
|
"setLocalizationDictionary" -> setLocalizationDictionary(args(0))
|
|
91
98
|
"getLicense" -> getLicense(callback)
|
|
92
99
|
"getAvailableScenarios" -> getAvailableScenarios(callback)
|
|
@@ -139,6 +146,10 @@ fun getDocumentReaderIsReady(callback: Callback) = callback(Instance().isReady)
|
|
|
139
146
|
|
|
140
147
|
fun getDocumentReaderStatus(callback: Callback) = callback(Instance().status)
|
|
141
148
|
|
|
149
|
+
fun getRfidSessionStatus(iosOnly: Callback) = iosOnly(null)
|
|
150
|
+
|
|
151
|
+
fun setRfidSessionStatus(iosOnly: String?) = Unit
|
|
152
|
+
|
|
142
153
|
fun getTag(callback: Callback) = callback(Instance().tag)
|
|
143
154
|
|
|
144
155
|
fun setTag(tag: String?) = tag.let { Instance().tag = it }
|
|
@@ -151,6 +162,10 @@ fun getEnv(callback: Callback) = callback(Instance().env)
|
|
|
151
162
|
|
|
152
163
|
fun setEnv(tag: String?) = tag.let { Instance().env = it }
|
|
153
164
|
|
|
165
|
+
fun getLocale(callback: Callback) = callback(Instance().locale)
|
|
166
|
+
|
|
167
|
+
fun setLocale(locale: String?) = locale.let { Instance().locale = it }
|
|
168
|
+
|
|
154
169
|
fun getFunctionality(callback: Callback) = callback(getFunctionality(Instance().functionality()))
|
|
155
170
|
|
|
156
171
|
fun setFunctionality(functionality: JSONObject) = setFunctionality(Instance().functionality(), functionality)
|
package/src/android/build.gradle
CHANGED
|
@@ -8,13 +8,13 @@ android {
|
|
|
8
8
|
|
|
9
9
|
repositories {
|
|
10
10
|
maven {
|
|
11
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader/
|
|
11
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
dependencies {
|
|
16
16
|
//noinspection GradleDependency
|
|
17
|
-
implementation ('com.regula.documentreader:api:8.1.
|
|
17
|
+
implementation ('com.regula.documentreader:api:8.1.11646'){
|
|
18
18
|
transitive = true
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/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/src/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]; },
|
|
@@ -50,6 +52,9 @@
|
|
|
50
52
|
@"clearPKDCertificates": ^{ [self clearPKDCertificates]; },
|
|
51
53
|
@"startNewSession": ^{ [self startNewSession]; },
|
|
52
54
|
@"connectBluetoothDevice": ^{ [self connectBluetoothDevice :args[0] :callback]; },
|
|
55
|
+
@"btDeviceRequestFlashing": ^{ /* android only */ },
|
|
56
|
+
@"btDeviceRequestFlashingFullIR": ^{ /* android only */ },
|
|
57
|
+
@"btDeviceRequestTurnOffAll": ^{ /* android only */ },
|
|
53
58
|
@"setLocalizationDictionary": ^{ [self setLocalizationDictionary :args[0]]; },
|
|
54
59
|
@"getLicense": ^{ [self getLicense :callback]; },
|
|
55
60
|
@"getAvailableScenarios": ^{ [self getAvailableScenarios :callback]; },
|
|
@@ -126,6 +131,14 @@ static NSDictionary* headers;
|
|
|
126
131
|
[RGLDocReader.shared setEnv:tag];
|
|
127
132
|
}
|
|
128
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
|
+
|
|
129
142
|
+(void)getFunctionality:(RGLWCallback)callback {
|
|
130
143
|
callback([RGLWJSONConstructor dictToString: [RGLWConfig getFunctionality: RGLDocReader.shared.functionality]]);
|
|
131
144
|
}
|
package/www/DocumentReader.js
CHANGED
|
@@ -1388,6 +1388,7 @@ class ProcessParams {
|
|
|
1388
1388
|
result.generateDTCVC = jsonObject["generateDTCVC"]
|
|
1389
1389
|
result.strictDLCategoryExpiry = jsonObject["strictDLCategoryExpiry"]
|
|
1390
1390
|
result.generateAlpha2Codes = jsonObject["generateAlpha2Codes"]
|
|
1391
|
+
result.disableAuthResolutionFilter = jsonObject["disableAuthResolutionFilter"]
|
|
1391
1392
|
result.barcodeParserType = jsonObject["barcodeParserType"]
|
|
1392
1393
|
result.perspectiveAngle = jsonObject["perspectiveAngle"]
|
|
1393
1394
|
result.minDPI = jsonObject["minDPI"]
|
|
@@ -1566,6 +1567,7 @@ class Customization {
|
|
|
1566
1567
|
result.changeFrameButtonExpandImage = jsonObject["changeFrameButtonExpandImage"]
|
|
1567
1568
|
result.changeFrameButtonCollapseImage = jsonObject["changeFrameButtonCollapseImage"]
|
|
1568
1569
|
result.livenessAnimationImage = jsonObject["livenessAnimationImage"]
|
|
1570
|
+
result.multipageButtonImage = jsonObject["multipageButtonImage"]
|
|
1569
1571
|
result.statusTextFont = Font.fromJson(jsonObject["statusTextFont"])
|
|
1570
1572
|
result.resultStatusTextFont = Font.fromJson(jsonObject["resultStatusTextFont"])
|
|
1571
1573
|
result.multipageButtonTextFont = Font.fromJson(jsonObject["multipageButtonTextFont"])
|
|
@@ -4068,6 +4070,8 @@ const eVisualFieldType = {
|
|
|
4068
4070
|
FT_MVC_AGENCY: 695,
|
|
4069
4071
|
FT_ISSUING_STATE_CODE_ALPHA2: 696,
|
|
4070
4072
|
FT_NATIONALITY_CODE_ALPHA2: 697,
|
|
4073
|
+
FT_FIRST_ISSUE_DATE_CHECKDIGIT: 698,
|
|
4074
|
+
FT_FIRST_ISSUE_DATE_CHECKSUM: 699,
|
|
4071
4075
|
}
|
|
4072
4076
|
|
|
4073
4077
|
const DocReaderOrientation = {
|
|
@@ -4353,6 +4357,8 @@ DocumentReader.getTenant = (successCallback, errorCallback) => cordova.exec(succ
|
|
|
4353
4357
|
DocumentReader.setTenant = (tenant, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setTenant", tenant])
|
|
4354
4358
|
DocumentReader.getEnv = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getEnv"])
|
|
4355
4359
|
DocumentReader.setEnv = (env, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setEnv", env])
|
|
4360
|
+
DocumentReader.getLocale = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getLocale"])
|
|
4361
|
+
DocumentReader.setLocale = (locale, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setLocale", locale])
|
|
4356
4362
|
DocumentReader.getFunctionality = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getFunctionality"])
|
|
4357
4363
|
DocumentReader.setFunctionality = (functionality, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setFunctionality", functionality])
|
|
4358
4364
|
DocumentReader.getProcessParams = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getProcessParams"])
|
|
@@ -4386,6 +4392,9 @@ DocumentReader.addPKDCertificates = (certificates, successCallback, errorCallbac
|
|
|
4386
4392
|
DocumentReader.clearPKDCertificates = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["clearPKDCertificates"])
|
|
4387
4393
|
DocumentReader.startNewSession = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startNewSession"])
|
|
4388
4394
|
DocumentReader.connectBluetoothDevice = (btDeviceName, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["connectBluetoothDevice", btDeviceName])
|
|
4395
|
+
DocumentReader.btDeviceRequestFlashing = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["btDeviceRequestFlashing"])
|
|
4396
|
+
DocumentReader.btDeviceRequestFlashingFullIR = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["btDeviceRequestFlashingFullIR"])
|
|
4397
|
+
DocumentReader.btDeviceRequestTurnOffAll = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["btDeviceRequestTurnOffAll"])
|
|
4389
4398
|
DocumentReader.setLocalizationDictionary = (dictionary, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setLocalizationDictionary", dictionary])
|
|
4390
4399
|
DocumentReader.getLicense = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getLicense"])
|
|
4391
4400
|
DocumentReader.getAvailableScenarios = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getAvailableScenarios"])
|