scandit-react-native-datacapture-core 6.23.0 → 6.24.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 +22 -18
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ui/DataCaptureViewManager.kt +6 -3
- package/dist/core.js +15 -9
- package/dist/core.js.map +1 -1
- package/dist/dts/index.d.ts +1 -1
- package/dist/dts/native/CameraProxy.d.ts +1 -1
- package/dist/dts/native/DataCaptureContextProxy.d.ts +2 -2
- package/dist/index.js +14 -29
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -7
- package/scandit-react-native-datacapture-core.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import com.android.Version
|
|
2
|
+
|
|
3
|
+
apply plugin: "com.android.library"
|
|
4
|
+
apply plugin: "kotlin-android"
|
|
4
5
|
|
|
5
|
-
def supportsNamespace() {
|
|
6
|
-
def parsed =
|
|
6
|
+
static def supportsNamespace() {
|
|
7
|
+
def parsed = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
7
8
|
def major = parsed[0].toInteger()
|
|
8
9
|
def minor = parsed[1].toInteger()
|
|
9
10
|
|
|
@@ -16,25 +17,28 @@ def supportsNamespace() {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
buildscript {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// Simple helper that allows the root project to override versions declared by this library.
|
|
21
|
+
ext.safeExtGet = { prop, fallback -> rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback }
|
|
22
|
+
|
|
23
|
+
// Ensures backward compatibility
|
|
24
|
+
ext.getKotlinVersion = {
|
|
25
|
+
if (ext.has("kotlinVersion")) {
|
|
26
|
+
ext.kotlinVersion()
|
|
27
|
+
} else {
|
|
28
|
+
ext.safeExtGet("kotlinVersion", "1.7.21")
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
repositories {
|
|
25
|
-
google()
|
|
26
33
|
mavenCentral()
|
|
34
|
+
google()
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
dependencies {
|
|
30
|
-
classpath
|
|
31
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
38
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
32
39
|
}
|
|
33
40
|
}
|
|
34
41
|
|
|
35
|
-
apply plugin: 'com.android.library'
|
|
36
|
-
apply plugin: 'kotlin-android'
|
|
37
|
-
|
|
38
42
|
android {
|
|
39
43
|
if (supportsNamespace()) {
|
|
40
44
|
sourceSets {
|
|
@@ -45,11 +49,11 @@ android {
|
|
|
45
49
|
namespace "com.scandit.datacapture.reactnative.core"
|
|
46
50
|
}
|
|
47
51
|
|
|
48
|
-
compileSdkVersion safeExtGet(
|
|
52
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 33)
|
|
49
53
|
|
|
50
54
|
defaultConfig {
|
|
51
|
-
minSdkVersion safeExtGet(
|
|
52
|
-
targetSdkVersion safeExtGet(
|
|
55
|
+
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
56
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
53
57
|
versionCode 1
|
|
54
58
|
versionName "1.0"
|
|
55
59
|
}
|
|
@@ -60,7 +64,7 @@ android {
|
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
dependencies {
|
|
63
|
-
def sdk_version = "6.
|
|
67
|
+
def sdk_version = "6.24.0-beta.1"
|
|
64
68
|
|
|
65
69
|
println("Version of the native sdk used in this build: ${safeExtGet('global_sdk_version', sdk_version)}")
|
|
66
70
|
if (findProject(':scandit-datacapture-frameworks-core') != null) {
|
|
@@ -11,6 +11,7 @@ import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
|
|
11
11
|
import android.widget.FrameLayout
|
|
12
12
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
13
13
|
import com.scandit.datacapture.core.ui.DataCaptureView
|
|
14
|
+
import com.scandit.datacapture.frameworks.core.deserialization.DefaultDeserializationLifecycleObserver
|
|
14
15
|
import com.scandit.datacapture.frameworks.core.deserialization.DeserializationLifecycleObserver
|
|
15
16
|
import com.scandit.datacapture.frameworks.core.utils.DefaultMainThread
|
|
16
17
|
import com.scandit.datacapture.frameworks.core.utils.MainThread
|
|
@@ -18,12 +19,14 @@ import java.lang.ref.WeakReference
|
|
|
18
19
|
|
|
19
20
|
class DataCaptureViewManager(
|
|
20
21
|
private val mainThread: MainThread = DefaultMainThread.getInstance()
|
|
21
|
-
) :
|
|
22
|
-
ScanditViewGroupManager<FrameLayout>(),
|
|
22
|
+
) : ScanditViewGroupManager<FrameLayout>(),
|
|
23
23
|
DeserializationLifecycleObserver.Observer {
|
|
24
24
|
|
|
25
|
+
private val deserializationLifecycleObserver: DeserializationLifecycleObserver =
|
|
26
|
+
DefaultDeserializationLifecycleObserver.getInstance()
|
|
27
|
+
|
|
25
28
|
init {
|
|
26
|
-
|
|
29
|
+
deserializationLifecycleObserver.attach(this)
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
override fun getName(): String = "RNTDataCaptureView"
|
package/dist/core.js
CHANGED
|
@@ -979,8 +979,8 @@ class DataCaptureContextSettings extends DefaultSerializeable {
|
|
|
979
979
|
|
|
980
980
|
var DataCaptureContextEvents;
|
|
981
981
|
(function (DataCaptureContextEvents) {
|
|
982
|
-
DataCaptureContextEvents["didChangeStatus"] = "
|
|
983
|
-
DataCaptureContextEvents["didStartObservingContext"] = "
|
|
982
|
+
DataCaptureContextEvents["didChangeStatus"] = "DataCaptureContextListener.onStatusChanged";
|
|
983
|
+
DataCaptureContextEvents["didStartObservingContext"] = "DataCaptureContextListener.onObservationStarted";
|
|
984
984
|
})(DataCaptureContextEvents || (DataCaptureContextEvents = {}));
|
|
985
985
|
class DataCaptureContextController {
|
|
986
986
|
get framework() {
|
|
@@ -1027,7 +1027,7 @@ class DataCaptureContextController {
|
|
|
1027
1027
|
this._proxy.dispose();
|
|
1028
1028
|
}
|
|
1029
1029
|
unsubscribeListener() {
|
|
1030
|
-
this._proxy.
|
|
1030
|
+
this._proxy.unregisterListenerForDataCaptureContext();
|
|
1031
1031
|
this.eventEmitter.removeListener(DataCaptureContextEvents.didChangeStatus);
|
|
1032
1032
|
this.eventEmitter.removeListener(DataCaptureContextEvents.didStartObservingContext);
|
|
1033
1033
|
}
|
|
@@ -1038,7 +1038,7 @@ class DataCaptureContextController {
|
|
|
1038
1038
|
initializeContextFromJSON() {
|
|
1039
1039
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1040
1040
|
try {
|
|
1041
|
-
this._proxy.contextFromJSON(this.context);
|
|
1041
|
+
yield this._proxy.contextFromJSON(this.context);
|
|
1042
1042
|
}
|
|
1043
1043
|
catch (error) {
|
|
1044
1044
|
this.notifyListenersOfDeserializationError(error);
|
|
@@ -1048,7 +1048,7 @@ class DataCaptureContextController {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
subscribeListener() {
|
|
1050
1050
|
var _a, _b, _c, _d;
|
|
1051
|
-
this._proxy.
|
|
1051
|
+
this._proxy.registerListenerForDataCaptureContext();
|
|
1052
1052
|
(_b = (_a = this._proxy).subscribeDidChangeStatus) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
1053
1053
|
(_d = (_c = this._proxy).subscribeDidStartObservingContext) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
1054
1054
|
this.eventEmitter.on(DataCaptureContextEvents.didChangeStatus, (contextStatus) => {
|
|
@@ -1725,9 +1725,15 @@ var Direction;
|
|
|
1725
1725
|
Direction["BottomToTop"] = "bottomToTop";
|
|
1726
1726
|
})(Direction || (Direction = {}));
|
|
1727
1727
|
|
|
1728
|
+
var ScanIntention;
|
|
1729
|
+
(function (ScanIntention) {
|
|
1730
|
+
ScanIntention["Manual"] = "manual";
|
|
1731
|
+
ScanIntention["Smart"] = "smart";
|
|
1732
|
+
})(ScanIntention || (ScanIntention = {}));
|
|
1733
|
+
|
|
1728
1734
|
var DataCaptureViewEvents;
|
|
1729
1735
|
(function (DataCaptureViewEvents) {
|
|
1730
|
-
DataCaptureViewEvents["didChangeSize"] = "
|
|
1736
|
+
DataCaptureViewEvents["didChangeSize"] = "DataCaptureViewListener.onSizeChanged";
|
|
1731
1737
|
})(DataCaptureViewEvents || (DataCaptureViewEvents = {}));
|
|
1732
1738
|
class DataCaptureViewController extends BaseController {
|
|
1733
1739
|
static forDataCaptureView(view) {
|
|
@@ -2736,8 +2742,8 @@ class RadiusLocationSelection extends DefaultSerializeable {
|
|
|
2736
2742
|
get radius() {
|
|
2737
2743
|
return this._radius;
|
|
2738
2744
|
}
|
|
2739
|
-
static fromJSON(
|
|
2740
|
-
const radius = NumberWithUnit.fromJSON(
|
|
2745
|
+
static fromJSON(locationSelectionJson) {
|
|
2746
|
+
const radius = NumberWithUnit.fromJSON(locationSelectionJson.radius);
|
|
2741
2747
|
return new RadiusLocationSelection(radius);
|
|
2742
2748
|
}
|
|
2743
2749
|
constructor(radius) {
|
|
@@ -2831,5 +2837,5 @@ var Expiration;
|
|
|
2831
2837
|
|
|
2832
2838
|
createEventEmitter();
|
|
2833
2839
|
|
|
2834
|
-
export { AimerViewfinder, Anchor, BaseController, BaseDataCaptureView, BaseNativeProxy, Brush, Camera, CameraController, CameraPosition, CameraSettings, Color, ContextStatus, ControlImage, DataCaptureContext, DataCaptureContextEvents, DataCaptureContextSettings, DataCaptureViewController, DataCaptureViewEvents, DefaultSerializeable, Direction, EventEmitter, Expiration, FactoryMaker, Feedback, FocusGestureStrategy, FocusRange, FrameSourceListenerEvents, FrameSourceState, ImageBuffer, ImageFrameSource, LaserlineViewfinder, LaserlineViewfinderStyle, LicenseInfo, LogoStyle, MarginsWithUnit, MeasureUnit, NoViewfinder, NoneLocationSelection, NumberWithUnit, Orientation, Point, PointWithUnit, PrivateFocusGestureDeserializer, PrivateFrameData, PrivateZoomGestureDeserializer, Quadrilateral, RadiusLocationSelection, Rect, RectWithUnit, RectangularLocationSelection, RectangularViewfinder, RectangularViewfinderAnimation, RectangularViewfinderLineStyle, RectangularViewfinderStyle, Size, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizingMode, Sound, SpotlightViewfinder, SwipeToZoom, TapToFocus, TorchState, TorchSwitchControl, Vibration, VibrationType, VideoResolution, WaveFormVibration, ZoomSwitchControl, getCoreDefaults, ignoreFromSerialization, ignoreFromSerializationIfNull, loadCoreDefaults, nameForSerialization, serializationDefault };
|
|
2840
|
+
export { AimerViewfinder, Anchor, BaseController, BaseDataCaptureView, BaseNativeProxy, Brush, Camera, CameraController, CameraPosition, CameraSettings, Color, ContextStatus, ControlImage, DataCaptureContext, DataCaptureContextEvents, DataCaptureContextSettings, DataCaptureViewController, DataCaptureViewEvents, DefaultSerializeable, Direction, EventEmitter, Expiration, FactoryMaker, Feedback, FocusGestureStrategy, FocusRange, FrameSourceListenerEvents, FrameSourceState, ImageBuffer, ImageFrameSource, LaserlineViewfinder, LaserlineViewfinderStyle, LicenseInfo, LogoStyle, MarginsWithUnit, MeasureUnit, NoViewfinder, NoneLocationSelection, NumberWithUnit, Orientation, Point, PointWithUnit, PrivateFocusGestureDeserializer, PrivateFrameData, PrivateZoomGestureDeserializer, Quadrilateral, RadiusLocationSelection, Rect, RectWithUnit, RectangularLocationSelection, RectangularViewfinder, RectangularViewfinderAnimation, RectangularViewfinderLineStyle, RectangularViewfinderStyle, ScanIntention, Size, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizingMode, Sound, SpotlightViewfinder, SwipeToZoom, TapToFocus, TorchState, TorchSwitchControl, Vibration, VibrationType, VideoResolution, WaveFormVibration, ZoomSwitchControl, getCoreDefaults, ignoreFromSerialization, ignoreFromSerializationIfNull, loadCoreDefaults, nameForSerialization, serializationDefault };
|
|
2835
2841
|
//# sourceMappingURL=core.js.map
|