scandit-capacitor-datacapture-core 6.23.0-beta.2 → 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/ScanditCapacitorDatacaptureCore.podspec +1 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/scandit/capacitor/datacapture/core/ScanditCaptureCoreNative.kt +11 -2
- package/dist/core.js +15 -9
- package/dist/core.js.map +1 -1
- package/dist/dts/definitions.d.ts +1 -1
- package/dist/dts/ts/Capacitor/CameraProxy.d.ts +1 -1
- package/dist/dts/ts/Capacitor/Capacitor.d.ts +4 -1
- package/dist/dts/ts/Capacitor/CommonCapacitor.d.ts +3 -1
- package/dist/dts/ts/Capacitor/DataCaptureContextProxy.d.ts +2 -2
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/ios/Plugin/Plugin.m +1 -0
- package/ios/Plugin/ScanditCaptureCore.swift +6 -0
- package/package.json +19 -10
package/android/build.gradle
CHANGED
|
@@ -11,7 +11,7 @@ def safeExtGet(prop, fallback) {
|
|
|
11
11
|
buildscript {
|
|
12
12
|
ext {
|
|
13
13
|
kotlin_version = "1.8.20"
|
|
14
|
-
agp_version = "8.0
|
|
14
|
+
agp_version = "8.1.0"
|
|
15
15
|
}
|
|
16
16
|
repositories {
|
|
17
17
|
google()
|
|
@@ -56,7 +56,7 @@ repositories {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
dependencies {
|
|
59
|
-
def sdk_version = "6.
|
|
59
|
+
def sdk_version = "6.24.0-beta.1"
|
|
60
60
|
|
|
61
61
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
62
62
|
|
package/android/src/main/java/com/scandit/capacitor/datacapture/core/ScanditCaptureCoreNative.kt
CHANGED
|
@@ -15,6 +15,7 @@ import com.scandit.capacitor.datacapture.core.utils.CapacitorResult
|
|
|
15
15
|
import com.scandit.datacapture.core.source.*
|
|
16
16
|
import com.scandit.datacapture.core.ui.DataCaptureView
|
|
17
17
|
import com.scandit.datacapture.frameworks.core.CoreModule
|
|
18
|
+
import com.scandit.datacapture.frameworks.core.deserialization.DefaultDeserializationLifecycleObserver
|
|
18
19
|
import com.scandit.datacapture.frameworks.core.deserialization.DeserializationLifecycleObserver
|
|
19
20
|
import com.scandit.datacapture.frameworks.core.events.Emitter
|
|
20
21
|
import com.scandit.datacapture.frameworks.core.listeners.FrameworksDataCaptureContextListener
|
|
@@ -60,6 +61,8 @@ class ScanditCaptureCoreNative :
|
|
|
60
61
|
)
|
|
61
62
|
private val mainThread: MainThread = DefaultMainThread.getInstance()
|
|
62
63
|
private val lastFrameData: LastFrameData = DefaultLastFrameData.getInstance()
|
|
64
|
+
private val deserializationLifecycleObserver: DeserializationLifecycleObserver =
|
|
65
|
+
DefaultDeserializationLifecycleObserver.getInstance()
|
|
63
66
|
|
|
64
67
|
private var lastFrameSourceState: FrameSourceState = FrameSourceState.OFF
|
|
65
68
|
|
|
@@ -89,7 +92,7 @@ class ScanditCaptureCoreNative :
|
|
|
89
92
|
|
|
90
93
|
captureViewHandler.attachWebView(bridge.webView, bridge.activity)
|
|
91
94
|
coreModule.onCreate(this.context)
|
|
92
|
-
|
|
95
|
+
deserializationLifecycleObserver.attach(this)
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
override fun handleOnStart() {
|
|
@@ -110,7 +113,7 @@ class ScanditCaptureCoreNative :
|
|
|
110
113
|
}
|
|
111
114
|
|
|
112
115
|
override fun handleOnDestroy() {
|
|
113
|
-
|
|
116
|
+
deserializationLifecycleObserver.detach(this)
|
|
114
117
|
coreModule.onDestroy()
|
|
115
118
|
}
|
|
116
119
|
|
|
@@ -294,6 +297,12 @@ class ScanditCaptureCoreNative :
|
|
|
294
297
|
call.resolve()
|
|
295
298
|
}
|
|
296
299
|
|
|
300
|
+
@PluginMethod
|
|
301
|
+
fun unsubscribeContextListener(call: PluginCall) {
|
|
302
|
+
coreModule.unregisterDataCaptureContextListener()
|
|
303
|
+
call.resolve()
|
|
304
|
+
}
|
|
305
|
+
|
|
297
306
|
@PluginMethod
|
|
298
307
|
fun subscribeViewListener(call: PluginCall) {
|
|
299
308
|
coreModule.registerDataCaptureViewListener()
|
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
|