@regulaforensics/react-native-document-reader-api 9.11.957-rc → 9.11.958-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.
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
13
13
 
14
14
  s.source = { :http => 'file:' + __dir__ }
15
15
  s.ios.deployment_target = '16.0'
16
- s.source_files = "ios/*.{swift,m}"
17
- s.dependency 'DocumentReaderStage', '9.11.7407'
16
+ s.source_files = "ios/*.{h,m}"
17
+ s.dependency 'DocumentReaderStage', '9.11.7419'
18
18
  s.dependency 'React'
19
19
  end
@@ -30,7 +30,7 @@ dependencies {
30
30
  //noinspection GradleDynamicVersion
31
31
  implementation 'com.facebook.react:react-native:+'
32
32
  //noinspection GradleDependency
33
- implementation('com.regula.documentreader:api:9.11.13810') {
33
+ implementation('com.regula.documentreader:api:9.11.13836') {
34
34
  transitive = true
35
35
  }
36
36
  }
@@ -139,7 +139,7 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
139
139
  "finalizePackage" -> finalizePackage(callback)
140
140
  "finalizePackageWithFinalizeConfig" -> finalizePackageWithFinalizeConfig(callback, args(0))
141
141
  "endBackendTransaction" -> endBackendTransaction()
142
- "getTranslation" -> getTranslation(callback, args(0), (args[1] as Number).toLong().toInt())
142
+ "getTranslation" -> getTranslation(callback, args(0), args(1))
143
143
  else -> Unit
144
144
  }
145
145
 
@@ -510,7 +510,7 @@ fun encryptedContainers(
510
510
  raw: String
511
511
  ) = callback(fromRawResults(raw).encryptedContainers)
512
512
 
513
- fun getTranslation(callback: Callback, className: String, value: Int) = if (value == -1) callback("Unknown") else when (className) {
513
+ fun getTranslation(callback: Callback, className: String, value: Int) = when (className) {
514
514
  "RFIDErrorCodes" -> callback(eRFID_ErrorCodes.getTranslation(context, value))
515
515
  "LDSParsingErrorCodes" -> callback(eLDS_ParsingErrorCodes.getTranslation(context, value))
516
516
  "LDSParsingNotificationCodes" -> callback(eLDS_ParsingNotificationCodes.getTranslation(context, value))
@@ -25,9 +25,7 @@ import org.json.JSONObject
25
25
 
26
26
  var listenerCount = 0
27
27
 
28
- // Args pass null arguments as nulls, null elements in arrays as nulls,
29
- // but in maps keys with null values are removed.
30
- lateinit var args: List<Any?>
28
+ lateinit var args: JSONArray
31
29
  lateinit var binding: ReactContext
32
30
  val context: Context
33
31
  get() = binding.applicationContext
@@ -45,12 +43,12 @@ fun sendEvent(event: String, data: Any? = "") {
45
43
  }
46
44
 
47
45
  @Suppress("UNCHECKED_CAST")
48
- fun <T> argsNullable(index: Int): T? = when (val value = args[index]) {
49
- is Map<*, *> -> value.toJson()
50
- is List<*> -> value.toJson()
51
- is Double -> if (value % 1 == 0.0) value.toInt() else value
52
- else -> value
53
- } as T?
46
+ fun <T> argsNullable(index: Int): T? {
47
+ val value = args[index]
48
+ if (value is Double && value % 1 == 0.0) return value.toInt() as T
49
+ if (value.toString() == "null") return null
50
+ return value as T
51
+ }
54
52
 
55
53
  fun requestPermissions(activity: Activity, permissions: Array<String>, requestCode: Int) {
56
54
  (activity as PermissionAwareActivity).requestPermissions(permissions, requestCode) { code, perms, grantResults ->
@@ -93,7 +91,7 @@ class RNRegulaDocumentReaderModule(reactContext: ReactApplicationContext) : Reac
93
91
 
94
92
  @ReactMethod
95
93
  fun exec(moduleName: String, method: String, arguments: ReadableArray, success: com.facebook.react.bridge.Callback, error: com.facebook.react.bridge.Callback) {
96
- args = arguments.toArrayList()
94
+ args = JSONArray(arguments.toArrayList())
97
95
  try {
98
96
  methodCall(method) { data -> success(data.toSendable()) }
99
97
  } catch (error: Exception) {
@@ -17,7 +17,7 @@
17
17
  "react-native-radio-buttons-group": "3.1.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@babel/core": "^7.29.7",
20
+ "@babel/core": "^7.29.0",
21
21
  "@babel/runtime": "^7.28.4",
22
22
  "@react-native-community/cli": "20.2.0",
23
23
  "@react-native-community/cli-platform-android": "20.2.0",
@@ -7,8 +7,8 @@
7
7
  "ios": "react-native run-ios --no-packager"
8
8
  },
9
9
  "dependencies": {
10
- "@regulaforensics/react-native-document-reader-api": "9.11.957-rc",
11
- "@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.10.3891",
10
+ "@regulaforensics/react-native-document-reader-api": "9.11.958-rc",
11
+ "@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.11.3980-rc",
12
12
  "react": "19.3.1",
13
13
  "react-native": "0.88.1",
14
14
  "react-native-fs": "2.20.0",
@@ -16,11 +16,11 @@
16
16
  "react-native-radio-buttons-group": "3.1.0"
17
17
  },
18
18
  "overrides": {
19
- "fast-xml-parser": "^5.12.0",
20
- "js-yaml": "^4.3.2"
19
+ "fast-xml-parser": "^5.5.8",
20
+ "js-yaml": "^4.1.1"
21
21
  },
22
22
  "devDependencies": {
23
- "@babel/core": "^7.29.7",
23
+ "@babel/core": "^7.29.0",
24
24
  "@babel/runtime": "^7.28.4",
25
25
  "@react-native-community/cli": "20.2.0",
26
26
  "@react-native-community/cli-platform-android": "20.2.0",
@@ -0,0 +1,44 @@
1
+ #ifndef RGLWConfig_h
2
+ #define RGLWConfig_h
3
+
4
+ #import <DocumentReader/DocumentReader.h>
5
+ #import "RGLWJSONConstructor.h"
6
+
7
+ @import CoreGraphics;
8
+ @import UIKit;
9
+ @import AVFoundation;
10
+
11
+ @interface RGLWConfig : NSObject
12
+
13
+ +(void)setFunctionality:(NSDictionary*)options :(RGLFunctionality*)functionality;
14
+ +(void)setProcessParams:(NSDictionary*)options :(RGLProcessParams*)processParams;
15
+ +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization;
16
+ +(void)setRfidScenario:(NSDictionary*)options :(RGLRFIDScenario*)rfidScenario;
17
+ +(void)setDataGroups:(RGLDataGroup*)dataGroup dict:(NSDictionary*)dict;
18
+ +(void)setDTCDataGroup:(RGLDTCDataGroup*)dataGroup dict:(NSDictionary*)dict;
19
+ +(void)setImageQA:(RGLImageQA*)result input:(NSDictionary*)input;
20
+ +(void)setAuthenticityParams:(RGLAuthenticityParams*)result input:(NSDictionary*)input;
21
+ +(void)setLivenessParams:(RGLLivenessParams*)result input:(NSDictionary*)input;
22
+ +(void)setAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)result input:(NSDictionary*)input;
23
+
24
+ +(NSDictionary*)getFunctionality:(RGLFunctionality*)functionality;
25
+ +(NSDictionary*)getProcessParams:(RGLProcessParams*)processParams;
26
+ +(NSDictionary*)getCustomization:(RGLCustomization*)customization;
27
+ +(NSDictionary*)getRfidScenario:(RGLRFIDScenario*)rfidScenario;
28
+ +(NSDictionary*)getDataGroups:(RGLDataGroup*)dataGroup;
29
+ +(NSDictionary*)getDTCDataGroup:(RGLDTCDataGroup*)dataGroup;
30
+ +(NSDictionary*)getImageQA:(RGLImageQA*)input;
31
+ +(NSDictionary*)getAuthenticityParams:(RGLAuthenticityParams*)input;
32
+ +(NSDictionary*)getLivenessParams:(RGLLivenessParams*)input;
33
+ +(NSDictionary*)getAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)input;
34
+
35
+ +(RGLImageQualityCheckType)imageQualityCheckTypeWithNumber:(NSNumber*)value;
36
+ +(NSNumber*)generateDocReaderAction:(RGLDocReaderAction)action;
37
+ +(NSNumber*)generateRFIDCompleteAction:(RGLRFIDCompleteAction)action;
38
+ +(NSNumber*)generateImageQualityCheckType:(RGLImageQualityCheckType)value;
39
+
40
+ +(RGLDocReaderFrame)docReaderFrameWithString:(NSString*)value;
41
+ +(NSString*)generateDocReaderFrame:(RGLDocReaderFrame)value;
42
+
43
+ @end
44
+ #endif