@regulaforensics/react-native-document-reader-api 9.11.954-nightly → 9.11.957-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/RNDocumentReaderApi.podspec +2 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/regula/plugin/document/reader/Main.kt +2 -2
- package/android/src/main/java/com/regula/plugin/document/reader/RNRegulaDocumentReaderModule.kt +10 -8
- package/example/package-lock.json +1 -1
- package/example/package.json +5 -5
- package/ios/Config.swift +1115 -0
- package/ios/Decoder.swift +1866 -0
- package/ios/Implementation.swift +346 -0
- package/ios/RNRegulaDocumentReader.m +8 -44
- package/ios/RNRegulaDocumentReader.swift +71 -0
- package/ios/Utils.swift +179 -0
- package/package.json +1 -1
- package/ios/RGLWConfig.h +0 -44
- package/ios/RGLWConfig.m +0 -1577
- package/ios/RGLWJSONConstructor.h +0 -216
- package/ios/RGLWJSONConstructor.m +0 -2875
- package/ios/RGLWMain.h +0 -34
- package/ios/RGLWMain.m +0 -722
- package/ios/RNRegulaDocumentReader.h +0 -8
|
@@ -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/*.{
|
|
17
|
-
s.dependency '
|
|
16
|
+
s.source_files = "ios/*.{swift,m}"
|
|
17
|
+
s.dependency 'DocumentReaderStage', '9.11.7407'
|
|
18
18
|
s.dependency 'React'
|
|
19
19
|
end
|
package/android/build.gradle
CHANGED
|
@@ -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.
|
|
33
|
+
implementation('com.regula.documentreader:api:9.11.13810') {
|
|
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
|
|
142
|
+
"getTranslation" -> getTranslation(callback, args(0), (args[1] as Number).toLong().toInt())
|
|
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) = when (className) {
|
|
513
|
+
fun getTranslation(callback: Callback, className: String, value: Int) = if (value == -1) callback("Unknown") else 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))
|
package/android/src/main/java/com/regula/plugin/document/reader/RNRegulaDocumentReaderModule.kt
CHANGED
|
@@ -25,7 +25,9 @@ import org.json.JSONObject
|
|
|
25
25
|
|
|
26
26
|
var listenerCount = 0
|
|
27
27
|
|
|
28
|
-
|
|
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?>
|
|
29
31
|
lateinit var binding: ReactContext
|
|
30
32
|
val context: Context
|
|
31
33
|
get() = binding.applicationContext
|
|
@@ -43,12 +45,12 @@ fun sendEvent(event: String, data: Any? = "") {
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
@Suppress("UNCHECKED_CAST")
|
|
46
|
-
fun <T> argsNullable(index: Int): T? {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (value
|
|
50
|
-
|
|
51
|
-
}
|
|
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?
|
|
52
54
|
|
|
53
55
|
fun requestPermissions(activity: Activity, permissions: Array<String>, requestCode: Int) {
|
|
54
56
|
(activity as PermissionAwareActivity).requestPermissions(permissions, requestCode) { code, perms, grantResults ->
|
|
@@ -91,7 +93,7 @@ class RNRegulaDocumentReaderModule(reactContext: ReactApplicationContext) : Reac
|
|
|
91
93
|
|
|
92
94
|
@ReactMethod
|
|
93
95
|
fun exec(moduleName: String, method: String, arguments: ReadableArray, success: com.facebook.react.bridge.Callback, error: com.facebook.react.bridge.Callback) {
|
|
94
|
-
args =
|
|
96
|
+
args = arguments.toArrayList()
|
|
95
97
|
try {
|
|
96
98
|
methodCall(method) { data -> success(data.toSendable()) }
|
|
97
99
|
} 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.
|
|
20
|
+
"@babel/core": "^7.29.7",
|
|
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",
|
package/example/package.json
CHANGED
|
@@ -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.
|
|
11
|
-
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.
|
|
10
|
+
"@regulaforensics/react-native-document-reader-api": "9.11.957-rc",
|
|
11
|
+
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.10.3891",
|
|
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.
|
|
20
|
-
"js-yaml": "^4.
|
|
19
|
+
"fast-xml-parser": "^5.12.0",
|
|
20
|
+
"js-yaml": "^4.3.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@babel/core": "^7.29.
|
|
23
|
+
"@babel/core": "^7.29.7",
|
|
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",
|