@regulaforensics/cordova-plugin-document-reader-api 7.3.499-nightly → 7.3.502-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/.github/ISSUE_TEMPLATE/config.yml +2 -2
- package/example/package.json +2 -2
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/Config.kt +7 -0
- package/src/android/DocumentReader.kt +12 -1
- package/src/android/build.gradle +1 -1
- package/src/ios/RGLWDocumentReader.h +1 -1
- package/src/ios/RGLWDocumentReader.m +25 -1
- package/www/DocumentReader.js +26 -0
- package/.github/ISSUE_TEMPLATE/bug-report.md +0 -39
- package/.github/ISSUE_TEMPLATE/feature-request.md +0 -20
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
blank_issues_enabled: false
|
|
2
2
|
contact_links:
|
|
3
|
-
- name:
|
|
3
|
+
- name: Submit a request
|
|
4
4
|
url: https://support.regulaforensics.com/hc/requests/new?utm_source=github
|
|
5
|
-
about:
|
|
5
|
+
about: Submit any requests to Regula Support Team
|
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": "7.3.
|
|
17
|
-
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "
|
|
16
|
+
"@regulaforensics/cordova-plugin-document-reader-api": "7.3.502-nightly",
|
|
17
|
+
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "",
|
|
18
18
|
"cordova-android": "12.0.1",
|
|
19
19
|
"cordova-ios": "7.0.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": "7.3.
|
|
3
|
+
"version": "7.3.502-nightly",
|
|
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="cordova-plugin-document-reader-api" version="7.3.
|
|
2
|
+
<plugin id="cordova-plugin-document-reader-api" version="7.3.502-nightly"
|
|
3
3
|
xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
4
4
|
<name>DocumentReaderApi</name>
|
|
5
5
|
<description>Cordova plugin Document reader api</description>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<config>
|
|
27
27
|
</config>
|
|
28
28
|
<pods>
|
|
29
|
-
<pod name="DocumentReaderNightly" spec="7.3.
|
|
29
|
+
<pod name="DocumentReaderNightly" spec="7.3.3707" />
|
|
30
30
|
</pods>
|
|
31
31
|
</podspec>
|
|
32
32
|
</platform>
|
package/src/android/Config.kt
CHANGED
|
@@ -18,6 +18,7 @@ import androidx.core.content.ContextCompat
|
|
|
18
18
|
import com.regula.documentreader.api.enums.CustomizationColor
|
|
19
19
|
import com.regula.documentreader.api.enums.CustomizationFont
|
|
20
20
|
import com.regula.documentreader.api.enums.CustomizationImage
|
|
21
|
+
import com.regula.documentreader.api.enums.LogLevel
|
|
21
22
|
import com.regula.documentreader.api.params.AuthenticityParams
|
|
22
23
|
import com.regula.documentreader.api.params.Functionality
|
|
23
24
|
import com.regula.documentreader.api.params.ImageQA
|
|
@@ -146,6 +147,8 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
|
|
|
146
147
|
"imageOutputMaxWidth" -> processParams.imageOutputMaxWidth = v.toInt()
|
|
147
148
|
"processAuth" -> processParams.processAuth = v.toInt()
|
|
148
149
|
"convertCase" -> processParams.convertCase = v.toInt()
|
|
150
|
+
"logLevel" -> processParams.logLevel = LogLevel.valueOf(v.toString())
|
|
151
|
+
"mrzDetectMode" -> processParams.mrzDetectMode = v.toInt()
|
|
149
152
|
"dateFormat" -> processParams.dateFormat = v as String
|
|
150
153
|
"scenario" -> processParams.scenario = v as String
|
|
151
154
|
"captureButtonScenario" -> processParams.captureButtonScenario = v as String
|
|
@@ -220,6 +223,8 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
|
|
|
220
223
|
"imageOutputMaxWidth" to processParams.imageOutputMaxWidth,
|
|
221
224
|
"processAuth" to processParams.processAuth,
|
|
222
225
|
"convertCase" to processParams.convertCase,
|
|
226
|
+
"logLevel" to processParams.logLevel?.toString(),
|
|
227
|
+
"mrzDetectMode" to processParams.mrzDetectMode,
|
|
223
228
|
"dateFormat" to processParams.dateFormat,
|
|
224
229
|
"scenario" to processParams.scenario,
|
|
225
230
|
"captureButtonScenario" to processParams.captureButtonScenario,
|
|
@@ -654,6 +659,7 @@ fun setColors(input: ParamsCustomization.CustomizationEditor, opts: JSONObject)
|
|
|
654
659
|
"rfidProcessingScreenProgressBar" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR, value)
|
|
655
660
|
"rfidProcessingScreenProgressBarBackground" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND, value)
|
|
656
661
|
"rfidProcessingScreenResultLabelText" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT, value)
|
|
662
|
+
"rfidProcessingScreenLoadingBar" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_LOADING_BAR, value)
|
|
657
663
|
}
|
|
658
664
|
}
|
|
659
665
|
|
|
@@ -665,6 +671,7 @@ fun getColors(input: Map<CustomizationColor, Long>) = mapOf(
|
|
|
665
671
|
"rfidProcessingScreenProgressBar" to input[CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR],
|
|
666
672
|
"rfidProcessingScreenProgressBarBackground" to input[CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND],
|
|
667
673
|
"rfidProcessingScreenResultLabelText" to input[CustomizationColor.RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT],
|
|
674
|
+
"rfidProcessingScreenLoadingBar" to input[CustomizationColor.RFID_PROCESSING_SCREEN_LOADING_BAR],
|
|
668
675
|
).toJsonObject()
|
|
669
676
|
|
|
670
677
|
fun setFonts(input: ParamsCustomization.CustomizationEditor, opts: JSONObject) = opts.forEach { key, value ->
|
|
@@ -104,6 +104,10 @@ fun exec(arguments: JSONArray, tempContext: CallbackContext) {
|
|
|
104
104
|
"setRfidSessionStatus" -> setRfidSessionStatus(callback)
|
|
105
105
|
"getTag" -> getTag(callback)
|
|
106
106
|
"setTag" -> setTag(argsNullable(0))
|
|
107
|
+
"getTenant" -> getTenant(callback)
|
|
108
|
+
"setTenant" -> setTenant(argsNullable(0))
|
|
109
|
+
"getEnv" -> getEnv(callback)
|
|
110
|
+
"setEnv" -> setEnv(argsNullable(0))
|
|
107
111
|
"getFunctionality" -> getFunctionality(callback)
|
|
108
112
|
"setFunctionality" -> setFunctionality(args(0))
|
|
109
113
|
"getProcessParams" -> getProcessParams(callback)
|
|
@@ -177,7 +181,6 @@ val context
|
|
|
177
181
|
get() = activity
|
|
178
182
|
|
|
179
183
|
var backgroundRFIDEnabled = false
|
|
180
|
-
var databaseDownloadProgress = 0
|
|
181
184
|
|
|
182
185
|
const val eventCompletion = "completion"
|
|
183
186
|
const val eventDatabaseProgress = "database_progress"
|
|
@@ -213,6 +216,14 @@ fun getTag(callback: Callback) = callback.success(Instance().tag)
|
|
|
213
216
|
|
|
214
217
|
fun setTag(tag: String?) = tag.let { Instance().tag = it }
|
|
215
218
|
|
|
219
|
+
fun getTenant(callback: Callback) = callback.success(Instance().tenant)
|
|
220
|
+
|
|
221
|
+
fun setTenant(tag: String?) = tag.let { Instance().tenant = it }
|
|
222
|
+
|
|
223
|
+
fun getEnv(callback: Callback) = callback.success(Instance().env)
|
|
224
|
+
|
|
225
|
+
fun setEnv(tag: String?) = tag.let { Instance().env = it }
|
|
226
|
+
|
|
216
227
|
fun getFunctionality(callback: Callback) = callback.success(getFunctionality(Instance().functionality()))
|
|
217
228
|
|
|
218
229
|
fun setFunctionality(functionality: JSONObject) = setFunctionality(Instance().functionality(), functionality)
|
package/src/android/build.gradle
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
@class DocReader;
|
|
8
8
|
|
|
9
9
|
typedef void (^RGLWCallback)(id _Nullable response);
|
|
10
|
-
typedef void (^RGLWEventSender)(NSString*
|
|
10
|
+
typedef void (^RGLWEventSender)(NSString* _Nullable event, id _Nullable data);
|
|
11
11
|
typedef void (^RGLWRFIDSignatureCallback)(NSData * _Nonnull signature);
|
|
12
12
|
|
|
13
13
|
@interface RGLWDocumentReader : CDVPlugin<RGLRecordScanningProcessDelegate,
|
|
@@ -9,7 +9,7 @@ static CDVInvokedUrlCommand* _command;
|
|
|
9
9
|
+ (CDVInvokedUrlCommand*)command { return _command; }
|
|
10
10
|
+ (void) setCommand:(CDVInvokedUrlCommand*)command { _command = command; }
|
|
11
11
|
|
|
12
|
-
RGLWEventSender sendEvent = ^(NSString*
|
|
12
|
+
static RGLWEventSender sendEvent = ^(NSString* event, id data) {
|
|
13
13
|
NSArray *skippedEvents = @[RGLWVideoEncoderCompletionEvent, RGLWOnCustomButtonTappedEvent];
|
|
14
14
|
if([skippedEvents containsObject:event]) return;
|
|
15
15
|
|
|
@@ -51,6 +51,14 @@ RGLWEventSender sendEvent = ^(NSString* _Nonnull event, id _Nullable data) {
|
|
|
51
51
|
[self getTag :successCallback :errorCallback];
|
|
52
52
|
else if([action isEqualToString:@"setTag"])
|
|
53
53
|
[self setTag :[args objectAtIndex:0] :successCallback :errorCallback];
|
|
54
|
+
else if([action isEqualToString:@"getTenant"])
|
|
55
|
+
[self getTenant :successCallback :errorCallback];
|
|
56
|
+
else if([action isEqualToString:@"setTenant"])
|
|
57
|
+
[self setTenant :[args objectAtIndex:0] :successCallback :errorCallback];
|
|
58
|
+
else if([action isEqualToString:@"getEnv"])
|
|
59
|
+
[self getEnv :successCallback :errorCallback];
|
|
60
|
+
else if([action isEqualToString:@"setEnv"])
|
|
61
|
+
[self setEnv :[args objectAtIndex:0] :successCallback :errorCallback];
|
|
54
62
|
else if([action isEqualToString:@"getFunctionality"])
|
|
55
63
|
[self getFunctionality :successCallback :errorCallback];
|
|
56
64
|
else if([action isEqualToString:@"setFunctionality"])
|
|
@@ -219,6 +227,22 @@ NSString* RGLWOnCustomButtonTappedEvent = @"onCustomButtonTappedEvent";
|
|
|
219
227
|
[RGLDocReader.shared setTag:tag];
|
|
220
228
|
}
|
|
221
229
|
|
|
230
|
+
- (void) getTenant:(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
|
|
231
|
+
successCallback([RGLDocReader.shared tenant]);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
- (void) setTenant:(NSString*)tag :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
|
|
235
|
+
[RGLDocReader.shared setTenant:tag];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
- (void) getEnv:(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
|
|
239
|
+
successCallback([RGLDocReader.shared env]);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
- (void) setEnv:(NSString*)tag :(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
|
|
243
|
+
[RGLDocReader.shared setEnv:tag];
|
|
244
|
+
}
|
|
245
|
+
|
|
222
246
|
- (void) getFunctionality:(RGLWCallback)successCallback :(RGLWCallback)errorCallback{
|
|
223
247
|
successCallback([RGLWJSONConstructor dictToString: [RGLWConfig getFunctionality: RGLDocReader.shared.functionality]]);
|
|
224
248
|
}
|
package/www/DocumentReader.js
CHANGED
|
@@ -1381,6 +1381,8 @@ class ProcessParams {
|
|
|
1381
1381
|
result.imageOutputMaxWidth = jsonObject["imageOutputMaxWidth"]
|
|
1382
1382
|
result.processAuth = jsonObject["processAuth"]
|
|
1383
1383
|
result.convertCase = jsonObject["convertCase"]
|
|
1384
|
+
result.logLevel = jsonObject["logLevel"]
|
|
1385
|
+
result.mrzDetectMode = jsonObject["mrzDetectMode"]
|
|
1384
1386
|
result.measureSystem = jsonObject["measureSystem"]
|
|
1385
1387
|
result.forceDocID = jsonObject["forceDocID"]
|
|
1386
1388
|
result.dateFormat = jsonObject["dateFormat"]
|
|
@@ -1771,6 +1773,7 @@ const CustomizationColor = {
|
|
|
1771
1773
|
RFID_PROCESSING_SCREEN_PROGRESS_BAR: "rfidProcessingScreenProgressBar",
|
|
1772
1774
|
RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND: "rfidProcessingScreenProgressBarBackground",
|
|
1773
1775
|
RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT: "rfidProcessingScreenResultLabelText",
|
|
1776
|
+
RFID_PROCESSING_SCREEN_LOADING_BAR: "rfidProcessingScreenLoadingBar",
|
|
1774
1777
|
}
|
|
1775
1778
|
|
|
1776
1779
|
const eRFID_ErrorCodes = {
|
|
@@ -2417,6 +2420,9 @@ const eCheckDiagnose = {
|
|
|
2417
2420
|
FIELD_POS_CORRECTOR_HIGHLIGHT_IR: 80,
|
|
2418
2421
|
FIELD_POS_CORRECTOR_GLARES_IN_PHOTO_AREA: 81,
|
|
2419
2422
|
FIELD_POS_CORRECTOR_PHOTO_REPLACED: 82,
|
|
2423
|
+
FIELD_POS_CORRECTOR_LANDMARKS_CHECK_ERROR: 83,
|
|
2424
|
+
FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR: 84,
|
|
2425
|
+
FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR: 85,
|
|
2420
2426
|
OVI_IR_INVISIBLE: 90,
|
|
2421
2427
|
OVI_INSUFFICIENT_AREA: 91,
|
|
2422
2428
|
OVI_COLOR_INVARIABLE: 92,
|
|
@@ -2504,6 +2510,14 @@ const TextProcessing = {
|
|
|
2504
2510
|
ocCapital: 3,
|
|
2505
2511
|
}
|
|
2506
2512
|
|
|
2513
|
+
const LogLevel = {
|
|
2514
|
+
FatalError: "FatalError",
|
|
2515
|
+
Error: "Error",
|
|
2516
|
+
Warning: "Warning",
|
|
2517
|
+
Info: "Info",
|
|
2518
|
+
Debug: "Debug",
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2507
2521
|
const AnimationImage = {
|
|
2508
2522
|
UNKNOWN: 0,
|
|
2509
2523
|
PASSPORT_SINGLE_PAGE: 1,
|
|
@@ -4145,6 +4159,12 @@ const eRPRM_Lights = {
|
|
|
4145
4159
|
RPRM_LIGHT_WHITE_FULL_OVD: (6 | 67108864),
|
|
4146
4160
|
}
|
|
4147
4161
|
|
|
4162
|
+
const eMrzDetectionModes = {
|
|
4163
|
+
DEFAULT: 0,
|
|
4164
|
+
RESIZE_BINARIZE_WINDOW: 1,
|
|
4165
|
+
BLUR_BEFORE_BINARIZATION: 2,
|
|
4166
|
+
}
|
|
4167
|
+
|
|
4148
4168
|
const Enum = {
|
|
4149
4169
|
FontStyle,
|
|
4150
4170
|
eRPRM_Authenticity,
|
|
@@ -4174,6 +4194,7 @@ const Enum = {
|
|
|
4174
4194
|
eCheckDiagnose,
|
|
4175
4195
|
RFIDDelegate,
|
|
4176
4196
|
TextProcessing,
|
|
4197
|
+
LogLevel,
|
|
4177
4198
|
AnimationImage,
|
|
4178
4199
|
ProcessingFinishedStatus,
|
|
4179
4200
|
DocFormat,
|
|
@@ -4204,6 +4225,7 @@ const Enum = {
|
|
|
4204
4225
|
CustomizationImage,
|
|
4205
4226
|
DocReaderFrame,
|
|
4206
4227
|
eRPRM_Lights,
|
|
4228
|
+
eMrzDetectionModes,
|
|
4207
4229
|
}
|
|
4208
4230
|
|
|
4209
4231
|
const DocumentReader = {}
|
|
@@ -4216,6 +4238,10 @@ DocumentReader.getRfidSessionStatus = (successCallback, errorCallback) => cordov
|
|
|
4216
4238
|
DocumentReader.setRfidSessionStatus = (status, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setRfidSessionStatus", status])
|
|
4217
4239
|
DocumentReader.getTag = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getTag"])
|
|
4218
4240
|
DocumentReader.setTag = (tag, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setTag", tag])
|
|
4241
|
+
DocumentReader.getTenant = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getTenant"])
|
|
4242
|
+
DocumentReader.setTenant = (tenant, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setTenant", tenant])
|
|
4243
|
+
DocumentReader.getEnv = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getEnv"])
|
|
4244
|
+
DocumentReader.setEnv = (env, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setEnv", env])
|
|
4219
4245
|
DocumentReader.getFunctionality = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getFunctionality"])
|
|
4220
4246
|
DocumentReader.setFunctionality = (functionality, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setFunctionality", functionality])
|
|
4221
4247
|
DocumentReader.getProcessParams = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getProcessParams"])
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug Report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: "[BR] "
|
|
5
|
-
labels: bug
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Before Submitting, be sure to**
|
|
11
|
-
- [ ] Update to the latest stable version.
|
|
12
|
-
- [ ] Read and follow the guides described in the [documentation](https://docs.regulaforensics.com?utm_source=github).
|
|
13
|
-
- [ ] Try to reproduce in our demo project.
|
|
14
|
-
- [ ] Search for your issue in the existing GitHub issues.
|
|
15
|
-
|
|
16
|
-
**Bug Description**
|
|
17
|
-
<!--A clear and concise description of what the bug is.-->
|
|
18
|
-
|
|
19
|
-
**Steps To Reproduce**
|
|
20
|
-
<!--
|
|
21
|
-
1. Go to '...'
|
|
22
|
-
2. Click on '....'
|
|
23
|
-
3. Scroll down to '....'
|
|
24
|
-
4. See error
|
|
25
|
-
-->
|
|
26
|
-
|
|
27
|
-
**Expected behavior**
|
|
28
|
-
<!--A clear and concise description of what you expected to happen.-->
|
|
29
|
-
|
|
30
|
-
**Screenshots**
|
|
31
|
-
<!--If applicable, add screenshots to help explain your issue.-->
|
|
32
|
-
|
|
33
|
-
**Environment:**
|
|
34
|
-
- Device: <!--[e.g. iPhone 12]-->
|
|
35
|
-
- OS: <!--[e.g. iOS]-->
|
|
36
|
-
- OS version: <!--[e.g. 10.0]-->
|
|
37
|
-
|
|
38
|
-
**Additional context**
|
|
39
|
-
<!--Add any other context about the problem here.-->
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature Request
|
|
3
|
-
about: Suggest an idea for this product
|
|
4
|
-
title: "[FR] "
|
|
5
|
-
labels: enhancement
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Is your feature request related to a problem? Please describe.**
|
|
11
|
-
<!--A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]-->
|
|
12
|
-
|
|
13
|
-
**Describe the solution you'd like**
|
|
14
|
-
<!--A clear and concise description of what you want to happen.-->
|
|
15
|
-
|
|
16
|
-
**Describe alternatives you've considered**
|
|
17
|
-
<!--A clear and concise description of any alternative solutions or features you've considered.-->
|
|
18
|
-
|
|
19
|
-
**Additional context**
|
|
20
|
-
<!--Add any other context or screenshots about the feature request here.-->
|