@regulaforensics/idv 3.4.86-beta → 3.6.97-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/RNIDV.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/idv/Main.kt +8 -0
- package/android/src/main/java/com/regula/plugin/idv/Utils.kt +7 -0
- package/examples/capacitor/package-lock.json +955 -1161
- package/examples/capacitor/package.json +5 -7
- package/examples/ionic/package-lock.json +2839 -2228
- package/examples/ionic/package.json +15 -9
- package/examples/react_native/package-lock.json +1656 -3335
- package/examples/react_native/package.json +17 -16
- package/ios/Main.swift +8 -0
- package/ios/RNIDV.swift +2 -1
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/package-lock.json +1 -1
- package/www/capacitor/index.js +12 -0
- package/www/capacitor/internal/bridge.js +9 -0
- package/www/cordova.js +23 -0
- package/www/react-native/index.js +12 -0
- package/www/react-native/internal/bridge.js +9 -0
- package/www/types/index.d.ts +13 -0
package/RNIDV.podspec
CHANGED
|
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
|
|
|
5
5
|
|
|
6
6
|
Pod::Spec.new do |s|
|
|
7
7
|
s.name = 'RNIDV'
|
|
8
|
-
s.version = '3.
|
|
8
|
+
s.version = '3.6.97-nightly'
|
|
9
9
|
s.summary = package['description']
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
|
|
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.ios.deployment_target = '14.0'
|
|
17
17
|
s.source_files = [ 'ios/**/*.swift', 'ios/**/RN*.m' ]
|
|
18
18
|
s.exclude_files = [ 'ios/CDVIDV.swift' ]
|
|
19
|
-
s.dependency '
|
|
19
|
+
s.dependency 'IDVSDKNightly', '3.6.1898'
|
|
20
20
|
s.dependency 'React'
|
|
21
21
|
end
|
package/android/build.gradle
CHANGED
|
@@ -18,14 +18,14 @@ android {
|
|
|
18
18
|
rootProject.allprojects {
|
|
19
19
|
repositories {
|
|
20
20
|
maven {
|
|
21
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
21
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
dependencies {
|
|
27
27
|
implementation 'com.facebook.react:react-native:+'
|
|
28
|
-
implementation('com.regula.idv:api:3.
|
|
28
|
+
implementation('com.regula.idv:api:3.6.265') {
|
|
29
29
|
transitive = true
|
|
30
30
|
}
|
|
31
31
|
}
|
package/android/cordova.gradle
CHANGED
|
@@ -9,12 +9,12 @@ android {
|
|
|
9
9
|
|
|
10
10
|
repositories {
|
|
11
11
|
maven {
|
|
12
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
12
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
dependencies {
|
|
17
|
-
implementation('com.regula.idv:api:3.
|
|
17
|
+
implementation('com.regula.idv:api:3.6.265') {
|
|
18
18
|
transitive = true
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,12 +6,15 @@ import com.regula.idv.api.enums.SessionRestoreMode
|
|
|
6
6
|
import com.regula.idv.api.listeners.IdvSdkListener
|
|
7
7
|
import com.regula.idv.module.BaseException
|
|
8
8
|
import com.regula.idv.module.IModule
|
|
9
|
+
import com.regula.idv.module.enums.IdvLogLevel
|
|
10
|
+
import org.json.JSONArray
|
|
9
11
|
import org.json.JSONObject
|
|
10
12
|
|
|
11
13
|
const val didStartSessionEvent = "didStartSessionEvent"
|
|
12
14
|
const val didEndSessionEvent = "didEndSessionEvent"
|
|
13
15
|
const val didStartRestoreSessionEvent = "didStartRestoreSessionEvent"
|
|
14
16
|
const val didContinueRemoteSessionEvent = "didContinueRemoteSessionEvent"
|
|
17
|
+
const val didReceiveLogEventEvent = "didReceiveLogEventEvent"
|
|
15
18
|
|
|
16
19
|
val allModules = listOf(
|
|
17
20
|
"com.regula.idv.docreader.DocReaderModule",
|
|
@@ -20,6 +23,7 @@ val allModules = listOf(
|
|
|
20
23
|
|
|
21
24
|
fun methodCall(method: String, callback: Callback): Any = when (method) {
|
|
22
25
|
"setSessionRestoreMode" -> instance().sessionRestoreMode = SessionRestoreMode.entries[args(0)]
|
|
26
|
+
"setLogLevel" -> instance().logLevel = HashSet(args<JSONArray>(0).toList<Int>().map { IdvLogLevel.entries[it] })
|
|
23
27
|
"getCurrentSessionId" -> callback(instance().currentSessionId())
|
|
24
28
|
"initialize" -> initialize(callback)
|
|
25
29
|
"deinitialize" -> deinitialize(callback)
|
|
@@ -141,4 +145,8 @@ var listener = object : IdvSdkListener {
|
|
|
141
145
|
override fun didEndSession() = sendEvent(didEndSessionEvent)
|
|
142
146
|
override fun didStartRestoreSession() = sendEvent(didStartRestoreSessionEvent)
|
|
143
147
|
override fun didContinueRemoteSession() = sendEvent(didContinueRemoteSessionEvent)
|
|
148
|
+
override fun didReceiveLogEvent(level: IdvLogLevel, message: String) = sendEvent(didReceiveLogEventEvent, mapOf(
|
|
149
|
+
"level" to level.ordinal,
|
|
150
|
+
"message" to message,
|
|
151
|
+
).toJson())
|
|
144
152
|
}
|
|
@@ -31,6 +31,13 @@ fun Map<*, *>.toJson(): JSONObject {
|
|
|
31
31
|
return result
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
fun <T> JSONArray.toList() = this.let {
|
|
35
|
+
val result = mutableListOf<T>()
|
|
36
|
+
@Suppress("UNCHECKED_CAST")
|
|
37
|
+
for (i in 0 until length()) result.add(get(i) as T)
|
|
38
|
+
result
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
fun Any?.toSendable(): Any? = this?.let {
|
|
35
42
|
if (it is JSONObject || it is JSONArray) it.toString()
|
|
36
43
|
else it
|