scandit-react-native-datacapture-core 6.28.0 → 7.0.0-beta.1
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/android/build.gradle +1 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCoreModule.kt +7 -23
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ui/ScanditViewGroupManager.kt +1 -1
- package/dist/core.js +442 -457
- package/dist/core.js.map +1 -1
- package/dist/dts/index.d.ts +3 -3
- package/dist/dts/native/CameraProxy.d.ts +1 -2
- package/dist/dts/native/DataCaptureContextProxy.d.ts +4 -3
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/ScanditDataCaptureCore.m +6 -5
- package/ios/Sources/ScanditDataCaptureCore.swift +12 -17
- package/package.json +2 -2
- package/scandit-react-native-datacapture-core.podspec +2 -2
package/android/build.gradle
CHANGED
|
@@ -68,7 +68,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
dependencies {
|
|
71
|
-
def sdk_version = "
|
|
71
|
+
def sdk_version = "7.0.0-beta.1"
|
|
72
72
|
|
|
73
73
|
println("Version of the native sdk used in this build: ${safeExtGet('global_sdk_version', sdk_version)}")
|
|
74
74
|
if (findProject(':scandit-datacapture-frameworks-core') != null) {
|
|
@@ -14,26 +14,19 @@ import com.scandit.datacapture.core.capture.DataCaptureVersion
|
|
|
14
14
|
import com.scandit.datacapture.frameworks.core.CoreModule
|
|
15
15
|
import com.scandit.datacapture.frameworks.core.deserialization.DefaultDeserializationLifecycleObserver
|
|
16
16
|
import com.scandit.datacapture.frameworks.core.deserialization.DeserializationLifecycleObserver
|
|
17
|
-
import com.scandit.datacapture.frameworks.core.utils.DefaultLastFrameData
|
|
18
17
|
import com.scandit.datacapture.frameworks.core.utils.DefaultMainThread
|
|
19
|
-
import com.scandit.datacapture.frameworks.core.utils.LastFrameData
|
|
20
18
|
import com.scandit.datacapture.frameworks.core.utils.MainThread
|
|
21
|
-
import com.scandit.datacapture.reactnative.core.utils.Error
|
|
22
19
|
import com.scandit.datacapture.reactnative.core.utils.ReactNativeResult
|
|
23
|
-
import com.scandit.datacapture.reactnative.core.utils.reject
|
|
24
20
|
|
|
25
21
|
class ScanditDataCaptureCoreModule(
|
|
26
22
|
reactContext: ReactApplicationContext,
|
|
27
23
|
private val coreModule: CoreModule,
|
|
28
24
|
private val mainThread: MainThread = DefaultMainThread.getInstance(),
|
|
29
|
-
private val lastFrameData: LastFrameData = DefaultLastFrameData.getInstance()
|
|
30
25
|
) : ReactContextBaseJavaModule(reactContext), DeserializationLifecycleObserver.Observer {
|
|
31
26
|
|
|
32
27
|
companion object {
|
|
33
28
|
private const val VERSION_KEY = "Version"
|
|
34
29
|
private const val DEFAULTS_KEY = "Defaults"
|
|
35
|
-
|
|
36
|
-
private val ERROR_NULL_FRAME = Error(5, "Frame is null, it might've been reused already.")
|
|
37
30
|
}
|
|
38
31
|
|
|
39
32
|
private val deserializationLifecycleObserver: DeserializationLifecycleObserver =
|
|
@@ -100,22 +93,8 @@ class ScanditDataCaptureCoreModule(
|
|
|
100
93
|
}
|
|
101
94
|
|
|
102
95
|
@ReactMethod
|
|
103
|
-
fun
|
|
104
|
-
|
|
105
|
-
if (it == null) {
|
|
106
|
-
promise.reject(ERROR_NULL_FRAME)
|
|
107
|
-
return@getLastFrameDataJson
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
promise.resolve(it)
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@ReactMethod
|
|
115
|
-
fun getLastFrameOrNull(promise: Promise) {
|
|
116
|
-
lastFrameData.getLastFrameDataJson {
|
|
117
|
-
promise.resolve(it)
|
|
118
|
-
}
|
|
96
|
+
fun getFrame(frameId: String, promise: Promise) {
|
|
97
|
+
coreModule.getLastFrameAsJson(frameId, ReactNativeResult(promise))
|
|
119
98
|
}
|
|
120
99
|
|
|
121
100
|
@ReactMethod
|
|
@@ -177,4 +156,9 @@ class ScanditDataCaptureCoreModule(
|
|
|
177
156
|
fun updateDataCaptureView(viewJson: String, promise: Promise) {
|
|
178
157
|
coreModule.updateDataCaptureView(viewJson, ReactNativeResult(promise))
|
|
179
158
|
}
|
|
159
|
+
|
|
160
|
+
@ReactMethod
|
|
161
|
+
fun getOpenSourceSoftwareLicenseInfo(promise: Promise) {
|
|
162
|
+
coreModule.getOpenSourceSoftwareLicenseInfo(ReactNativeResult(promise))
|
|
163
|
+
}
|
|
180
164
|
}
|
|
@@ -67,7 +67,7 @@ abstract class ScanditViewGroupManager<T> : ViewGroupManager<T>() where T : View
|
|
|
67
67
|
/**
|
|
68
68
|
* XXX RN is not calling measure() and layout() methods on dynamically added native Android
|
|
69
69
|
* Views. That's why we need to call those methods on our container (and it's children)
|
|
70
|
-
* ourselves - otherwise the views added by the
|
|
70
|
+
* ourselves - otherwise the views added by the BarcodeBatchAdvancedOverlay won't be visible.
|
|
71
71
|
* The hack has been taken from: https://github.com/facebook/react-native/issues/17968
|
|
72
72
|
*/
|
|
73
73
|
private fun scheduleMeasureAndLayout() {
|