@regulaforensics/react-native-document-reader-api 6.7.4 → 6.8.0

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.
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
14
14
  s.source = { :http => 'file:' + __dir__ }
15
15
  s.ios.deployment_target = '11.0'
16
16
  s.source_files = "ios/*.{h,m}"
17
- s.dependency 'DocumentReader', '6.7.2863'
17
+ s.dependency 'DocumentReader', '6.8.2981'
18
18
  s.dependency 'React'
19
19
  end
@@ -24,7 +24,7 @@ dependencies {
24
24
  //noinspection GradleDynamicVersion
25
25
  implementation 'com.facebook.react:react-native:+'
26
26
  //noinspection GradleDependency
27
- implementation('com.regula.documentreader:api:6.7.8311') {
27
+ implementation('com.regula.documentreader:api:6.8.8742') {
28
28
  transitive = true
29
29
  }
30
30
  }
@@ -423,6 +423,7 @@ class JSONConstructor {
423
423
  result.put("fieldType", input.fieldType);
424
424
  result.put("lightType", input.light);
425
425
  result.put("pageIndex", input.pageIndex);
426
+ result.put("originalPageIndex", input.originalPageIndex);
426
427
  result.put("fieldName", eGraphicFieldType.getTranslation(context, input.fieldType));
427
428
  result.put("lightName", eRPRM_Lights.getTranslation(context, input.light));
428
429
  result.put("value", input.imageBase64());
@@ -575,6 +576,7 @@ class JSONConstructor {
575
576
  result.put("dType", input.dType);
576
577
  result.put("dFormat", input.dFormat);
577
578
  result.put("dMRZ", input.dMRZ);
579
+ result.put("isDeprecated", input.isDeprecated);
578
580
  result.put("name", input.name);
579
581
  result.put("ICAOCode", input.ICAOCode);
580
582
  result.put("dDescription", input.dDescription);
@@ -6,6 +6,8 @@ import android.app.PendingIntent;
6
6
  import android.content.Context;
7
7
  import android.content.Intent;
8
8
  import android.content.IntentFilter;
9
+ import android.content.res.Configuration;
10
+ import android.content.res.Resources;
9
11
  import android.graphics.Bitmap;
10
12
  import android.nfc.NfcAdapter;
11
13
  import android.nfc.tech.IsoDep;
@@ -55,6 +57,7 @@ import java.io.IOException;
55
57
  import java.io.InputStream;
56
58
  import java.util.ArrayList;
57
59
  import java.util.List;
60
+ import java.util.Locale;
58
61
 
59
62
  import static com.regula.documentreader.api.DocumentReader.Instance;
60
63
 
@@ -75,6 +78,8 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
75
78
  private final static String bleOnServiceDisconnectedEvent = "bleOnServiceDisconnectedEvent";
76
79
  private final static String bleOnDeviceReadyEvent = "bleOnDeviceReadyEvent";
77
80
 
81
+ private final static String onCustomButtonTappedEvent = "onCustomButtonTappedEvent";
82
+
78
83
  private static int databaseDownloadProgress = 0;
79
84
  JSONArray data;
80
85
  private final ReactContext reactContext;
@@ -191,6 +196,10 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
191
196
  send(reactContext, bleOnDeviceReadyEvent, "");
192
197
  }
193
198
 
199
+ private void sendOnCustomButtonTappedEvent(int tag) {
200
+ send(reactContext, onCustomButtonTappedEvent, tag + "");
201
+ }
202
+
194
203
  private interface Callback {
195
204
  void success(Object o);
196
205
 
@@ -427,6 +436,12 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
427
436
  case "recognizeImagesWithImageInputs":
428
437
  recognizeImagesWithImageInputs(callback, args(0));
429
438
  break;
439
+ case "setOnCustomButtonTappedListener":
440
+ setOnCustomButtonTappedListener(callback);
441
+ break;
442
+ case "setLanguage":
443
+ setLanguage(callback, args(0));
444
+ break;
430
445
  case "textFieldValueByType":
431
446
  textFieldValueByType(callback, args(0), args(1));
432
447
  break;
@@ -821,6 +836,21 @@ public class RNRegulaDocumentReaderModule extends ReactContextBaseJavaModule imp
821
836
  startForegroundDispatch(getActivity());
822
837
  }
823
838
 
839
+ private void setOnCustomButtonTappedListener(Callback callback) {
840
+ Instance().setOnClickListener(view -> sendOnCustomButtonTappedEvent((int) view.getTag()));
841
+ callback.success();
842
+ }
843
+
844
+ private void setLanguage(Callback callback, String language) {
845
+ Locale locale = new Locale(language);
846
+ Locale.setDefault(locale);
847
+ Resources resources = getContext().getResources();
848
+ Configuration config = resources.getConfiguration();
849
+ config.setLocale(locale);
850
+ resources.updateConfiguration(config, resources.getDisplayMetrics());
851
+ callback.success();
852
+ }
853
+
824
854
  private void providePACertificates(Callback callback, JSONArray certificatesJSON) throws JSONException {
825
855
  if (paCertificateCompletion == null) {
826
856
  callback.error("paCertificateCompletion is null");
@@ -10,6 +10,7 @@ import com.regula.documentreader.api.params.OnlineProcessingConfig;
10
10
  import com.regula.documentreader.api.params.ParamsCustomization;
11
11
  import com.regula.documentreader.api.params.Functionality;
12
12
  import com.regula.documentreader.api.params.ProcessParam;
13
+ import com.regula.documentreader.api.params.rfid.RFIDParams;
13
14
  import com.regula.documentreader.api.params.rfid.ReprocParams;
14
15
  import com.regula.documentreader.api.params.rfid.dg.DataGroups;
15
16
 
@@ -229,6 +230,10 @@ class RegulaConfig {
229
230
  processParams.splitNames = opts.getBoolean("splitNames");
230
231
  if (opts.has("convertCase"))
231
232
  processParams.convertCase = opts.getInt("convertCase");
233
+ if (opts.has("doFlipYAxis"))
234
+ processParams.doFlipYAxis = opts.getBoolean("doFlipYAxis");
235
+ if (opts.has("rfidParams"))
236
+ processParams.rfidParams = RFIDParamsFromJSON(opts.getJSONObject("rfidParams"));
232
237
  }
233
238
 
234
239
  private static void setCustomization(ParamsCustomization customization, JSONObject opts, Context context) throws JSONException {
@@ -251,6 +256,8 @@ class RegulaConfig {
251
256
  editor.setMultipageButtonBackgroundColor(opts.getString("multipageButtonBackgroundColor"));
252
257
  if (opts.has("tintColor"))
253
258
  editor.setTintColor(opts.getString("tintColor"));
259
+ if (opts.has("cameraPreviewBackgroundColor"))
260
+ editor.setCameraPreviewBackgroundColor(opts.getString("cameraPreviewBackgroundColor"));
254
261
  if (opts.has("activityIndicatorColor"))
255
262
  editor.setActivityIndicatorColor(opts.getString("activityIndicatorColor"));
256
263
  if (opts.has("showStatusMessages"))
@@ -351,6 +358,8 @@ class RegulaConfig {
351
358
  editor.setHologramAnimationImageScaleType(ScaleType.valueOf(opts.getString("hologramAnimationImageScaleType")));
352
359
  if (opts.has("uiCustomizationLayer"))
353
360
  editor.setUiCustomizationLayer(opts.getJSONObject("uiCustomizationLayer"));
361
+ if (opts.has("activityIndicatorSize"))
362
+ editor.setActivityIndicatorSize(opts.getInt("activityIndicatorSize"));
354
363
 
355
364
  editor.applyImmediately(context);
356
365
  }
@@ -400,6 +409,7 @@ class RegulaConfig {
400
409
  object.put("resultStatus", customization.getResultStatus());
401
410
  object.put("cameraFrameDefaultColor", customization.getCameraFrameDefaultColor());
402
411
  object.put("cameraFrameActiveColor", customization.getCameraFrameActiveColor());
412
+ object.put("cameraPreviewBackgroundColor", customization.getCameraPreviewBackgroundColor());
403
413
  object.put("statusTextColor", customization.getStatusTextColor());
404
414
  object.put("resultStatusTextColor", customization.getResultStatusTextColor());
405
415
  object.put("resultStatusBackgroundColor", customization.getResultStatusBackgroundColor());
@@ -455,6 +465,7 @@ class RegulaConfig {
455
465
  object.put("hologramAnimationImageMatrix", customization.getHologramAnimationImageMatrix());
456
466
  object.put("hologramAnimationImageScaleType", customization.getHologramAnimationImageScaleType());
457
467
  object.put("uiCustomizationLayer", customization.getUiCustomizationLayer());
468
+ object.put("activityIndicatorSize", customization.getActivityIndicatorSize());
458
469
 
459
470
  return object;
460
471
  }
@@ -519,6 +530,7 @@ class RegulaConfig {
519
530
  object.put("respectImageQuality", processParams.respectImageQuality);
520
531
  object.put("splitNames", processParams.splitNames);
521
532
  object.put("convertCase", processParams.convertCase);
533
+ object.put("doFlipYAxis", processParams.doFlipYAxis);
522
534
 
523
535
  return object;
524
536
  }
@@ -713,4 +725,18 @@ class RegulaConfig {
713
725
  }
714
726
  return null;
715
727
  }
728
+
729
+ private static RFIDParams RFIDParamsFromJSON(JSONObject input) {
730
+ try {
731
+ RFIDParams result = new RFIDParams();
732
+
733
+ if (input.has("paIgnoreNotificationCodes"))
734
+ result.setPaIgnoreNotificationCodes(JSONConstructor.intArrayFromJSON(input.getJSONArray("paIgnoreNotificationCodes")));
735
+
736
+ return result;
737
+ } catch (JSONException e) {
738
+ e.printStackTrace();
739
+ }
740
+ return null;
741
+ }
716
742
  }
package/example/App.js CHANGED
@@ -49,6 +49,7 @@ export default class App extends Component {
49
49
  eventManager.addListener('completionEvent', e => this.handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(e["msg"]))))
50
50
  eventManager.addListener('rfidNotificationCompletionEvent', e => console.log("rfidNotificationCompletionEvent: " + e["msg"]))
51
51
  eventManager.addListener('paCertificateCompletionEvent', e => console.log("paCertificateCompletionEvent: " + e["msg"]))
52
+ eventManager.addListener('onCustomButtonTappedEvent', e => console.log("onCustomButtonTappedEvent: " + e["msg"]))
52
53
  DocumentReader.prepareDatabase("Full", (respond) => {
53
54
  console.log(respond)
54
55
  readFile(licPath, 'base64').then((res) => {
@@ -502,7 +502,7 @@
502
502
  "-ObjC",
503
503
  "-lc++",
504
504
  );
505
- PRODUCT_BUNDLE_IDENTIFIER = com.regula.dr.fullrfid;
505
+ PRODUCT_BUNDLE_IDENTIFIER = regula.DocumentReader;
506
506
  PRODUCT_NAME = DocumentReader;
507
507
  SWIFT_OPTIMIZATION_LEVEL = "-Onone";
508
508
  SWIFT_VERSION = 5.0;
@@ -528,7 +528,7 @@
528
528
  "-ObjC",
529
529
  "-lc++",
530
530
  );
531
- PRODUCT_BUNDLE_IDENTIFIER = com.regula.dr.fullrfid;
531
+ PRODUCT_BUNDLE_IDENTIFIER = regula.DocumentReader;
532
532
  PRODUCT_NAME = DocumentReader;
533
533
  SWIFT_VERSION = 5.0;
534
534
  VERSIONING_SYSTEM = "apple-generic";
@@ -10,8 +10,8 @@
10
10
  "lint": "eslint ."
11
11
  },
12
12
  "dependencies": {
13
- "@regulaforensics/react-native-document-reader-api": "6.7.4",
14
- "@regulaforensics/react-native-document-reader-core-fullrfid": "6.7.0",
13
+ "@regulaforensics/react-native-document-reader-api": "6.8.0",
14
+ "@regulaforensics/react-native-document-reader-core-fullrfid": "6.8.0",
15
15
  "react": "17.0.2",
16
16
  "react-native": "^0.67.0",
17
17
  "react-native-check-box": "^2.1.7",
package/index.d.ts CHANGED
@@ -134,6 +134,7 @@ export class DocumentReaderGraphicField {
134
134
  fieldType?: number
135
135
  lightType?: number
136
136
  pageIndex?: number
137
+ originalPageIndex?: number
137
138
  fieldName?: string
138
139
  lightName?: string
139
140
  value?: string
@@ -147,6 +148,7 @@ export class DocumentReaderGraphicField {
147
148
  result.fieldType = jsonObject["fieldType"]
148
149
  result.lightType = jsonObject["lightType"]
149
150
  result.pageIndex = jsonObject["pageIndex"]
151
+ result.originalPageIndex = jsonObject["originalPageIndex"]
150
152
  result.fieldName = jsonObject["fieldName"]
151
153
  result.lightName = jsonObject["lightName"]
152
154
  result.value = jsonObject["value"]
@@ -417,6 +419,7 @@ export class DocumentReaderDocumentType {
417
419
  dType?: number
418
420
  dFormat?: number
419
421
  dMRZ?: boolean
422
+ isDeprecated?: boolean
420
423
  name?: string
421
424
  ICAOCode?: string
422
425
  dDescription?: string
@@ -433,6 +436,7 @@ export class DocumentReaderDocumentType {
433
436
  result.dType = jsonObject["dType"]
434
437
  result.dFormat = jsonObject["dFormat"]
435
438
  result.dMRZ = jsonObject["dMRZ"]
439
+ result.isDeprecated = jsonObject["isDeprecated"]
436
440
  result.name = jsonObject["name"]
437
441
  result.ICAOCode = jsonObject["ICAOCode"]
438
442
  result.dDescription = jsonObject["dDescription"]
@@ -1143,6 +1147,8 @@ export class ImageInputParam {
1143
1147
  width?: number
1144
1148
  height?: number
1145
1149
  type?: number
1150
+ disableFrameShiftIR?: boolean
1151
+ doFlipYAxis?: boolean
1146
1152
 
1147
1153
  static fromJson(jsonObject?: any): ImageInputParam | undefined {
1148
1154
  if (jsonObject == null || jsonObject == undefined) return undefined
@@ -1151,6 +1157,8 @@ export class ImageInputParam {
1151
1157
  result.width = jsonObject["width"]
1152
1158
  result.height = jsonObject["height"]
1153
1159
  result.type = jsonObject["type"]
1160
+ result.disableFrameShiftIR = jsonObject["disableFrameShiftIR"]
1161
+ result.doFlipYAxis = jsonObject["doFlipYAxis"]
1154
1162
 
1155
1163
  return result
1156
1164
  }
@@ -1813,6 +1821,11 @@ export const eRPRM_Authenticity = {
1813
1821
  KINEGRAM: 131072,
1814
1822
  HOLOGRAMS_DETECTION: 524288,
1815
1823
  MRZ: 8388608,
1824
+ STATUS_ONLY: 0x80000000,
1825
+ OVI: 0x00000400,
1826
+ LIVENESS: 0x00200000,
1827
+ OCR: 0x00400000,
1828
+ UV: 1 | 4 | 16,
1816
1829
  }
1817
1830
 
1818
1831
  export const eRFID_ErrorCodes = {
@@ -2734,6 +2747,7 @@ export const ScenarioIdentifier = {
2734
2747
  SCENARIO_OCR_FREE: "OcrFree",
2735
2748
  SCENARIO_CREDIT_CARD: "CreditCard",
2736
2749
  SCENARIO_CAPTURE: "Capture",
2750
+ SCENARIO_BARCODE_AND_LOCATE: "BarcodeAndLocate",
2737
2751
  }
2738
2752
 
2739
2753
  export const eRFID_AccessControl_ProcedureType = {
@@ -2936,9 +2950,18 @@ export const eCheckDiagnose = {
2936
2950
  FINISHED_BY_TIMEOUT: 186,
2937
2951
  HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME: 187,
2938
2952
  LIVENESS_DEPTH_CHECK_FAILED: 190,
2939
- MRZ_QUALITY_WRONG_MRZ_DPI: 200,
2953
+ MRZ_QUALITY_WRONG_SYMBOL_POSITION: 200,
2940
2954
  MRZ_QUALITY_WRONG_BACKGROUND: 201,
2941
- LAST_DIAGNOSE_VALUE: 210,
2955
+ MRZ_QUALITY_WRONG_MRZ_WIDTH: 202,
2956
+ MRZ_QUALITY_WRONG_MRZ_HEIGHT: 203,
2957
+ MRZ_QUALITY_WRONG_LINE_POSITION: 204,
2958
+ MRZ_QUALITY_WRONG_FONT_TYPE: 205,
2959
+ OCR_QUALITY_TEXT_POSITION: 220,
2960
+ OCR_QUALITY_INVALID_FONT: 221,
2961
+ OCR_QUALITY_INVALID_BACKGROUND: 222,
2962
+ LAS_INK_INVALID_LINES_FREQUENCY: 230,
2963
+ LAST_DIAGNOSE_VALUE: 250,
2964
+ DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
2942
2965
  }
2943
2966
 
2944
2967
  export const RFIDDelegate = {
@@ -3712,7 +3735,7 @@ export const BarcodeType = {
3712
3735
  }
3713
3736
 
3714
3737
  export const eRPRM_SecurityFeatureType = {
3715
- NONE: -1,
3738
+ SECURITY_FEATURE_TYPE_NONE: -1,
3716
3739
  SECURITY_FEATURE_TYPE_BLANK: 0,
3717
3740
  SECURITY_FEATURE_TYPE_FILL: 1,
3718
3741
  SECURITY_FEATURE_TYPE_PHOTO: 2,
@@ -3741,7 +3764,22 @@ export const eRPRM_SecurityFeatureType = {
3741
3764
  SECURITY_FEATURE_TYPE_PHOTO_COLOR: 25,
3742
3765
  SECURITY_FEATURE_TYPE_PHOTO_SHAPE: 26,
3743
3766
  SECURITY_FEATURE_TYPE_PHOTO_CORNERS: 27,
3744
- DOCUMENT_CANCELLING_DETECTOR: 28,
3767
+ SECURITY_FEATURE_TYPE_OCR: 28,
3768
+ SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVS_VISUAL: 29,
3769
+ SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVS_RFID: 30,
3770
+ SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVS_LIVE: 31,
3771
+ SECURITY_FEATURE_TYPE_LIVENESS_DEPTH: 32,
3772
+ SECURITY_FEATURE_TYPE_MICROTEXT: 33,
3773
+ SECURITY_FEATURE_TYPE_FLUORESCENT_OBJECT: 34,
3774
+ SECURITY_FEATURE_TYPE_LANDMARKS_CHECK: 35,
3775
+ SECURITY_FEATURE_TYPE_FACE_PRESENCE: 36,
3776
+ SECURITY_FEATURE_TYPE_FACE_ABSENCE: 38,
3777
+ SECURITY_FEATURE_TYPE_LIVENESS_SCREEN_CAPTURE: 39,
3778
+ SECURITY_FEATURE_TYPE_LIVENESS_ELECTRONIC_DEVICE: 40,
3779
+ SECURITY_FEATURE_TYPE_LIVENESS_OVI: 41,
3780
+ SECURITY_FEATURE_TYPE_BARCODE_SIZE_CHECK: 42,
3781
+ SECURITY_FEATURE_TYPE_LAS_INK: 43,
3782
+ SECURITY_FEATURE_TYPE_LIVENESS_MLI: 44,
3745
3783
  }
3746
3784
 
3747
3785
  export const OnlineMode = {
@@ -6697,6 +6735,7 @@ export const eRPRM_Lights = {
6697
6735
  RPRM_Light_IR_SIDE: 16,
6698
6736
  RPRM_Light_IR_Full: (8 | 16),
6699
6737
  RPRM_LIGHT_OVD: 67108864,
6738
+ RPRM_LIGHT_WHITE_FULL_OVD: (6 | 67108864),
6700
6739
 
6701
6740
  getTranslation(value: number) {
6702
6741
  switch (value) {
@@ -6893,4 +6932,6 @@ export default class DocumentReader {
6893
6932
  static showScannerWithCameraIDAndOpts(cameraID: number, options: object, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6894
6933
  static recognizeImageWithCameraMode(image: string, mode: boolean, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6895
6934
  static recognizeImagesWithImageInputs(images: ImageInputData[], successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6935
+ static setOnCustomButtonTappedListener(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6936
+ static setLanguage(language: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6896
6937
  }
package/index.js CHANGED
@@ -103,6 +103,7 @@ export class DocumentReaderGraphicField {
103
103
  result.fieldType = jsonObject["fieldType"]
104
104
  result.lightType = jsonObject["lightType"]
105
105
  result.pageIndex = jsonObject["pageIndex"]
106
+ result.originalPageIndex = jsonObject["originalPageIndex"]
106
107
  result.fieldName = jsonObject["fieldName"]
107
108
  result.lightName = jsonObject["lightName"]
108
109
  result.value = jsonObject["value"]
@@ -282,6 +283,7 @@ export class DocumentReaderDocumentType {
282
283
  result.dType = jsonObject["dType"]
283
284
  result.dFormat = jsonObject["dFormat"]
284
285
  result.dMRZ = jsonObject["dMRZ"]
286
+ result.isDeprecated = jsonObject["isDeprecated"]
285
287
  result.name = jsonObject["name"]
286
288
  result.ICAOCode = jsonObject["ICAOCode"]
287
289
  result.dDescription = jsonObject["dDescription"]
@@ -769,6 +771,8 @@ export class ImageInputParam {
769
771
  result.width = jsonObject["width"]
770
772
  result.height = jsonObject["height"]
771
773
  result.type = jsonObject["type"]
774
+ result.disableFrameShiftIR = jsonObject["disableFrameShiftIR"]
775
+ result.doFlipYAxis = jsonObject["doFlipYAxis"]
772
776
 
773
777
  return result
774
778
  }
@@ -1333,6 +1337,11 @@ export const eRPRM_Authenticity = {
1333
1337
  KINEGRAM: 131072,
1334
1338
  HOLOGRAMS_DETECTION: 524288,
1335
1339
  MRZ: 8388608,
1340
+ STATUS_ONLY: 0x80000000,
1341
+ OVI: 0x00000400,
1342
+ LIVENESS: 0x00200000,
1343
+ OCR: 0x00400000,
1344
+ UV: 1 | 4 | 16,
1336
1345
  }
1337
1346
 
1338
1347
  export const eRFID_ErrorCodes = {
@@ -2254,6 +2263,7 @@ export const ScenarioIdentifier = {
2254
2263
  SCENARIO_OCR_FREE: "OcrFree",
2255
2264
  SCENARIO_CREDIT_CARD: "CreditCard",
2256
2265
  SCENARIO_CAPTURE: "Capture",
2266
+ SCENARIO_BARCODE_AND_LOCATE: "BarcodeAndLocate",
2257
2267
  }
2258
2268
 
2259
2269
  export const eRFID_AccessControl_ProcedureType = {
@@ -2456,9 +2466,18 @@ export const eCheckDiagnose = {
2456
2466
  FINISHED_BY_TIMEOUT: 186,
2457
2467
  HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME: 187,
2458
2468
  LIVENESS_DEPTH_CHECK_FAILED: 190,
2459
- MRZ_QUALITY_WRONG_MRZ_DPI: 200,
2469
+ MRZ_QUALITY_WRONG_SYMBOL_POSITION: 200,
2460
2470
  MRZ_QUALITY_WRONG_BACKGROUND: 201,
2461
- LAST_DIAGNOSE_VALUE: 210,
2471
+ MRZ_QUALITY_WRONG_MRZ_WIDTH: 202,
2472
+ MRZ_QUALITY_WRONG_MRZ_HEIGHT: 203,
2473
+ MRZ_QUALITY_WRONG_LINE_POSITION: 204,
2474
+ MRZ_QUALITY_WRONG_FONT_TYPE: 205,
2475
+ OCR_QUALITY_TEXT_POSITION: 220,
2476
+ OCR_QUALITY_INVALID_FONT: 221,
2477
+ OCR_QUALITY_INVALID_BACKGROUND: 222,
2478
+ LAS_INK_INVALID_LINES_FREQUENCY: 230,
2479
+ LAST_DIAGNOSE_VALUE: 250,
2480
+ DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
2462
2481
  }
2463
2482
 
2464
2483
  export const RFIDDelegate = {
@@ -3232,7 +3251,7 @@ export const BarcodeType = {
3232
3251
  }
3233
3252
 
3234
3253
  export const eRPRM_SecurityFeatureType = {
3235
- NONE: -1,
3254
+ SECURITY_FEATURE_TYPE_NONE: -1,
3236
3255
  SECURITY_FEATURE_TYPE_BLANK: 0,
3237
3256
  SECURITY_FEATURE_TYPE_FILL: 1,
3238
3257
  SECURITY_FEATURE_TYPE_PHOTO: 2,
@@ -3261,7 +3280,22 @@ export const eRPRM_SecurityFeatureType = {
3261
3280
  SECURITY_FEATURE_TYPE_PHOTO_COLOR: 25,
3262
3281
  SECURITY_FEATURE_TYPE_PHOTO_SHAPE: 26,
3263
3282
  SECURITY_FEATURE_TYPE_PHOTO_CORNERS: 27,
3264
- DOCUMENT_CANCELLING_DETECTOR: 28,
3283
+ SECURITY_FEATURE_TYPE_OCR: 28,
3284
+ SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVS_VISUAL: 29,
3285
+ SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVS_RFID: 30,
3286
+ SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVS_LIVE: 31,
3287
+ SECURITY_FEATURE_TYPE_LIVENESS_DEPTH: 32,
3288
+ SECURITY_FEATURE_TYPE_MICROTEXT: 33,
3289
+ SECURITY_FEATURE_TYPE_FLUORESCENT_OBJECT: 34,
3290
+ SECURITY_FEATURE_TYPE_LANDMARKS_CHECK: 35,
3291
+ SECURITY_FEATURE_TYPE_FACE_PRESENCE: 36,
3292
+ SECURITY_FEATURE_TYPE_FACE_ABSENCE: 38,
3293
+ SECURITY_FEATURE_TYPE_LIVENESS_SCREEN_CAPTURE: 39,
3294
+ SECURITY_FEATURE_TYPE_LIVENESS_ELECTRONIC_DEVICE: 40,
3295
+ SECURITY_FEATURE_TYPE_LIVENESS_OVI: 41,
3296
+ SECURITY_FEATURE_TYPE_BARCODE_SIZE_CHECK: 42,
3297
+ SECURITY_FEATURE_TYPE_LAS_INK: 43,
3298
+ SECURITY_FEATURE_TYPE_LIVENESS_MLI: 44,
3265
3299
  }
3266
3300
 
3267
3301
  export const OnlineMode = {
@@ -4494,6 +4528,16 @@ export const eVisualFieldType = {
4494
4528
  FT_DLCLASSCODE_PW_FROM: 654,
4495
4529
  FT_DLCLASSCODE_PW_NOTES: 655,
4496
4530
  FT_DLCLASSCODE_PW_TO: 656,
4531
+ FT_DLCLASSCODE_EB_FROM: 657,
4532
+ FT_DLCLASSCODE_EB_NOTES: 658,
4533
+ FT_DLCLASSCODE_EB_TO: 659,
4534
+ FT_DLCLASSCODE_EC_FROM: 660,
4535
+ FT_DLCLASSCODE_EC_NOTES: 661,
4536
+ FT_DLCLASSCODE_EC_TO: 662,
4537
+ FT_DLCLASSCODE_EC1_FROM: 663,
4538
+ FT_DLCLASSCODE_EC1_NOTES: 664,
4539
+ FT_DLCLASSCODE_EC1_TO: 665,
4540
+ FT_PLACE_OF_BIRTH_CITY: 666,
4497
4541
 
4498
4542
  getTranslation: function (value) {
4499
4543
  switch (value) {
@@ -6217,6 +6261,7 @@ export const eRPRM_Lights = {
6217
6261
  RPRM_Light_IR_SIDE: 16,
6218
6262
  RPRM_Light_IR_Full: (8 | 16),
6219
6263
  RPRM_LIGHT_OVD: 67108864,
6264
+ RPRM_LIGHT_WHITE_FULL_OVD: (6 | 67108864),
6220
6265
 
6221
6266
  getTranslation: function (value) {
6222
6267
  switch (value) {
@@ -6414,5 +6459,7 @@ DocumentReader.recognizeVideoFrame = (byteString, params, successCallback, error
6414
6459
  DocumentReader.showScannerWithCameraIDAndOpts = (cameraID, options, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "showScannerWithCameraIDAndOpts", [cameraID, options], successCallback, errorCallback)
6415
6460
  DocumentReader.recognizeImageWithCameraMode = (image, mode, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "recognizeImageWithCameraMode", [image, mode], successCallback, errorCallback)
6416
6461
  DocumentReader.recognizeImagesWithImageInputs = (images, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "recognizeImagesWithImageInputs", [images], successCallback, errorCallback)
6462
+ DocumentReader.setOnCustomButtonTappedListener = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setOnCustomButtonTappedListener", [], successCallback, errorCallback)
6463
+ DocumentReader.setLanguage = (language, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setLanguage", [language], successCallback, errorCallback)
6417
6464
 
6418
6465
  export default DocumentReader
@@ -7,6 +7,7 @@
7
7
 
8
8
  @interface RGLWJSONConstructor : NSObject
9
9
  +(NSString* _Nonnull)dictToString:(NSMutableDictionary* _Nonnull)input;
10
+ +(NSString* _Nonnull)arrayToString:(NSMutableArray* _Nonnull)input;
10
11
  +(NSMutableDictionary* _Nonnull)generateRfidNotificationCompletion:(NSInteger)notification;
11
12
  +(NSMutableDictionary* _Nonnull)generateRfidNotificationCompletionWithError:(NSInteger)notification : (NSInteger)value;
12
13
  +(NSMutableDictionary* _Nonnull)generateNSDictionary:(NSDictionary<NSNumber*, NSNumber*>* _Nullable)input;
@@ -1,5 +1,6 @@
1
1
  #import <Foundation/Foundation.h>
2
2
  #import "RGLWJSONConstructor.h"
3
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
3
4
 
4
5
  @implementation RGLWJSONConstructor
5
6
 
@@ -7,6 +8,10 @@
7
8
  return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:input options:NSJSONWritingPrettyPrinted error:nil] encoding:NSUTF8StringEncoding];
8
9
  }
9
10
 
11
+ +(NSString*)arrayToString:(NSMutableArray*)input {
12
+ return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:input options:NSJSONWritingPrettyPrinted error:nil] encoding:NSUTF8StringEncoding];
13
+ }
14
+
10
15
  +(NSMutableDictionary* _Nonnull)generateNSDictionary:(NSDictionary<NSNumber*, NSNumber*>* _Nullable)input {
11
16
  NSMutableDictionary *result = [NSMutableDictionary new];
12
17
  if(input == nil) return result;
@@ -504,6 +509,7 @@
504
509
  result[@"lightType"] = @(input.lightType);
505
510
  result[@"lightName"] = input.lightName;
506
511
  result[@"pageIndex"] = @(input.pageIndex);
512
+ result[@"originalPageIndex"] = @(input.originalPageIndex);
507
513
 
508
514
  return result;
509
515
  }
@@ -610,6 +616,7 @@
610
616
  result[@"dType"] = @(input.dType);
611
617
  result[@"dFormat"] = @(input.dFormat);
612
618
  result[@"dMRZ"] = @(input.dMRZ);
619
+ result[@"isDeprecated"] = @(input.isDeprecated);
613
620
  result[@"dDescription"] = input.dDescription;
614
621
  result[@"dYear"] = input.dYear;
615
622
  result[@"dCountryName"] = input.dCountryName;
@@ -1,11 +1,11 @@
1
- #ifndef RegulaConfig_h
2
- #define RegulaConfig_h
1
+ #ifndef RGLWRegulaConfig_h
2
+ #define RGLWRegulaConfig_h
3
3
  #import <DocumentReader/DocumentReader.h>
4
4
  @import CoreGraphics;
5
5
  @import UIKit;
6
6
  @import AVFoundation;
7
7
 
8
- @interface RegulaConfig : NSObject
8
+ @interface RGLWRegulaConfig : NSObject
9
9
 
10
10
  +(void)setConfig:(NSDictionary*) options : (RGLDocReader*) reader;
11
11
  +(NSMutableDictionary *)getConfig:(RGLDocReader*) reader;
@@ -1,7 +1,7 @@
1
1
  #import <Foundation/Foundation.h>
2
- #import "RegulaConfig.h"
2
+ #import "RGLWRegulaConfig.h"
3
3
 
4
- @implementation RegulaConfig
4
+ @implementation RGLWRegulaConfig
5
5
  +(void)setConfig:(NSDictionary*)options :(RGLDocReader*)reader {
6
6
  if([options valueForKey:@"customization"] != nil)
7
7
  [self setCustomization: [options valueForKey:@"customization"]: reader.customization];
@@ -578,6 +578,8 @@
578
578
  customization.toolbarSize = [[options valueForKey:@"toolbarSize"] floatValue];
579
579
  if([options valueForKey:@"statusBackgroundColor"] != nil)
580
580
  customization.statusBackgroundColor = [self getUIColorObjectFromHexString:[options valueForKey:@"statusBackgroundColor"] alpha:1];
581
+ if([options valueForKey:@"cameraPreviewBackgroundColor"] != nil)
582
+ customization.cameraPreviewBackgroundColor = [self getUIColorObjectFromHexString:[options valueForKey:@"cameraPreviewBackgroundColor"] alpha:1];
581
583
  if([options valueForKey:@"hologramAnimationImageContentMode"] != nil)
582
584
  customization.hologramAnimationImageContentMode = [self UIViewContentModeWithNSInteger:[[options valueForKey:@"hologramAnimationImageContentMode"] integerValue]];
583
585
  if([options valueForKey:@"hologramAnimationPositionMultiplier"] != nil)
@@ -625,7 +627,9 @@
625
627
  if([options valueForKey:@"cameraPosition"] != nil)
626
628
  functionality.cameraPosition = [self AVCaptureDevicePositionWithNSInteger:[[options valueForKey:@"cameraPosition"] integerValue]];
627
629
  if([options valueForKey:@"btDeviceName"] != nil)
630
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
628
631
  functionality.btDeviceName = [options valueForKey:@"btDeviceName"];
632
+ #pragma clang diagnostic pop
629
633
  if([options valueForKey:@"useAuthenticator"] != nil)
630
634
  functionality.useAuthenticator = [[options valueForKey:@"useAuthenticator"] boolValue];
631
635
  if([options valueForKey:@"showCaptureButtonDelayFromDetect"] != nil)
@@ -644,6 +648,8 @@
644
648
  functionality.recordScanningProcess = [[options valueForKey:@"recordScanningProcess"] boolValue];
645
649
  if([options valueForKey:@"manualMultipageMode"] != nil)
646
650
  functionality.manualMultipageMode = [[options valueForKey:@"manualMultipageMode"] boolValue];
651
+ if([options valueForKey:@"videoOutputSettings"] != nil)
652
+ functionality.videoOutputSettings = [options valueForKey:@"videoOutputSettings"];
647
653
  if([options valueForKey:@"onlineProcessingConfiguration"] != nil)
648
654
  functionality.onlineProcessingConfig = [self RGLOnlineProcessingConfigFromJSON:[options valueForKey:@"onlineProcessingConfiguration"]];;
649
655
  }
@@ -724,7 +730,7 @@
724
730
  if([options valueForKey:@"updateOCRValidityByGlare"] != nil)
725
731
  processParams.updateOCRValidityByGlare = [options valueForKey:@"updateOCRValidityByGlare"];
726
732
  if([options valueForKey:@"imageQA"] != nil)
727
- processParams.imageQA = [RegulaConfig ImageQAFromJson:[options valueForKey:@"imageQA"]];
733
+ processParams.imageQA = [RGLWRegulaConfig ImageQAFromJson:[options valueForKey:@"imageQA"]];
728
734
  if([options valueForKey:@"forceDocFormat"] != nil)
729
735
  processParams.forceDocFormat = [options valueForKey:@"forceDocFormat"];
730
736
  if([options valueForKey:@"noGraphics"] != nil)
@@ -761,6 +767,8 @@
761
767
  processParams.documentGroupFilter = [options mutableArrayValueForKey:@"documentGroupFilter"];
762
768
  if([options valueForKey:@"convertCase"] != nil)
763
769
  processParams.convertCase = [options valueForKey:@"convertCase"];
770
+ if([options valueForKey:@"rfidParams"] != nil)
771
+ processParams.rfidParams = [self RGLRFIDParamsFromJSON:[options valueForKey:@"rfidParams"]];
764
772
  }
765
773
 
766
774
  +(NSMutableDictionary *)getCustomization:(RGLCustomization*)customization {
@@ -817,6 +825,8 @@
817
825
  result[@"statusTextColor"] = [self hexStringFromUIColor:customization.statusTextColor];
818
826
  if(customization.resultStatusBackgroundColor != nil)
819
827
  result[@"resultStatusBackgroundColor"] = [self hexStringFromUIColor:customization.resultStatusBackgroundColor];
828
+ if(customization.cameraPreviewBackgroundColor != nil)
829
+ result[@"cameraPreviewBackgroundColor"] = [self hexStringFromUIColor:customization.cameraPreviewBackgroundColor];
820
830
  if(customization.cameraFrameDefaultColor != nil)
821
831
  result[@"cameraFrameDefaultColor"] = [self hexStringFromUIColor:customization.cameraFrameDefaultColor];
822
832
  if(customization.cameraFrameActiveColor != nil)
@@ -846,7 +856,9 @@
846
856
  result[@"videoCaptureMotionControl"] = [NSNumber numberWithBool:functionality.videoCaptureMotionControl];
847
857
  result[@"orientation"] = [NSNumber numberWithInteger:[self NSIntegerWithUIInterfaceOrientationMask:functionality.orientation]];
848
858
  result[@"cameraPosition"] = [NSNumber numberWithInteger:[self NSIntegerWithAVCaptureDevicePosition:functionality.cameraPosition]];
859
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
849
860
  result[@"btDeviceName"] = functionality.btDeviceName;
861
+ #pragma clang diagnostic pop
850
862
  result[@"useAuthenticator"] = [NSNumber numberWithBool:functionality.isUseAuthenticator];
851
863
  result[@"showCaptureButtonDelayFromDetect"] = [NSNumber numberWithDouble:functionality.showCaptureButtonDelayFromDetect];
852
864
  result[@"showCaptureButtonDelayFromStart"] = [NSNumber numberWithDouble:functionality.showCaptureButtonDelayFromStart];
@@ -856,6 +868,7 @@
856
868
  result[@"zoomFactor"] = [NSNumber numberWithBool:functionality.zoomFactor];
857
869
  result[@"recordScanningProcess"] = [NSNumber numberWithBool:functionality.recordScanningProcess];
858
870
  result[@"manualMultipageMode"] = [NSNumber numberWithBool:functionality.manualMultipageMode];
871
+ result[@"videoOutputSettings"] = functionality.videoOutputSettings;
859
872
 
860
873
  return result;
861
874
  }
@@ -901,7 +914,7 @@
901
914
  result[@"matchTextFieldMask"] = processParams.matchTextFieldMask;
902
915
  result[@"fastDocDetect"] = processParams.fastDocDetect;
903
916
  result[@"updateOCRValidityByGlare"] = processParams.updateOCRValidityByGlare;
904
- result[@"imageQA"] = [RegulaConfig ImageQAToJson:processParams.imageQA];
917
+ result[@"imageQA"] = [RGLWRegulaConfig ImageQAToJson:processParams.imageQA];
905
918
  result[@"forceDocFormat"] = processParams.forceDocFormat;
906
919
  result[@"noGraphics"] = processParams.noGraphics;
907
920
  result[@"documentAreaMin"] = processParams.documentAreaMin;
@@ -1029,4 +1042,13 @@
1029
1042
  rfidScenario.defaultReadingBufferSize = [[options valueForKey:@"defaultReadingBufferSize"] intValue];
1030
1043
  }
1031
1044
 
1045
+ +(RGLRFIDParams*)RGLRFIDParamsFromJSON:(NSDictionary*)input {
1046
+ RGLRFIDParams* result = [RGLRFIDParams new];
1047
+
1048
+ if([input valueForKey:@"paIgnoreNotificationCodes"] != nil)
1049
+ result.paIgnoreNotificationCodes = [input valueForKey:@"paIgnoreNotificationCodes"];
1050
+
1051
+ return result;
1052
+ }
1053
+
1032
1054
  @end