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/dist/dts/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { initCoreDefaults } from './private/Defaults';
|
|
|
3
3
|
export { initCoreDefaults };
|
|
4
4
|
export { initCoreProxy };
|
|
5
5
|
export { Point, Quadrilateral, NumberWithUnit, PointWithUnit, Rect, RectWithUnit, SizeWithUnit, Size, SizeWithAspect, SizeWithUnitAndAspect, MarginsWithUnit, Color, Brush } from 'scandit-datacapture-frameworks-core';
|
|
6
|
-
export { MeasureUnit, SizingMode, Anchor, Orientation, Direction } from 'scandit-datacapture-frameworks-core';
|
|
6
|
+
export { MeasureUnit, SizingMode, Anchor, Orientation, Direction, ScanIntention } from 'scandit-datacapture-frameworks-core';
|
|
7
7
|
export { Control, ZoomSwitchControl, TorchSwitchControl } from 'scandit-datacapture-frameworks-core';
|
|
8
8
|
export { FrameSourceState, FrameSourceListener, FrameSource } from 'scandit-datacapture-frameworks-core';
|
|
9
9
|
export { DataCaptureContextListener, ContextStatus } from 'scandit-datacapture-frameworks-core';
|
|
@@ -9,6 +9,6 @@ export declare class NativeCameraProxy implements CameraProxy {
|
|
|
9
9
|
isTorchAvailable(position: CameraPosition): Promise<boolean>;
|
|
10
10
|
switchCameraToDesiredState(desiredStateJson: string): Promise<void>;
|
|
11
11
|
registerListenerForCameraEvents(): void;
|
|
12
|
-
unregisterListenerForCameraEvents(): void
|
|
12
|
+
unregisterListenerForCameraEvents(): Promise<void>;
|
|
13
13
|
subscribeDidChangeState(): void;
|
|
14
14
|
}
|
|
@@ -9,8 +9,8 @@ export declare class NativeDataCaptureContextProxy extends BaseNativeProxy imple
|
|
|
9
9
|
removeModeFromContext(modeJson: string): Promise<void>;
|
|
10
10
|
removeAllModesFromContext(): Promise<void>;
|
|
11
11
|
dispose(): void;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
registerListenerForDataCaptureContext(): void;
|
|
13
|
+
unregisterListenerForDataCaptureContext(): Promise<void>;
|
|
14
14
|
subscribeDidChangeStatus(): void;
|
|
15
15
|
subscribeDidStartObservingContext(): void;
|
|
16
16
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FactoryMaker, FrameSourceListenerEvents, BaseNativeProxy,
|
|
2
|
-
export { AimerViewfinder, Anchor, Brush, Camera, CameraPosition, CameraSettings, Color, DataCaptureContext, DataCaptureContextSettings, Direction, Expiration, Feedback, FocusGestureStrategy, FocusRange, FrameSourceState, ImageBuffer, ImageFrameSource, LaserlineViewfinder, LaserlineViewfinderStyle, LicenseInfo, LogoStyle, MarginsWithUnit, MeasureUnit, NoViewfinder, NoneLocationSelection, NumberWithUnit, Orientation, Point, PointWithUnit, Quadrilateral, RadiusLocationSelection, Rect, RectWithUnit, RectangularLocationSelection, RectangularViewfinder, RectangularViewfinderAnimation, RectangularViewfinderLineStyle, RectangularViewfinderStyle, Size, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizingMode, Sound, SpotlightViewfinder, SwipeToZoom, TapToFocus, TorchState, TorchSwitchControl, Vibration, VideoResolution, WaveFormVibration, ZoomSwitchControl } from './core.js';
|
|
1
|
+
import { FactoryMaker, FrameSourceListenerEvents, BaseNativeProxy, DataCaptureContextEvents, ContextStatus, DataCaptureViewEvents, loadCoreDefaults, BaseDataCaptureView } from './core.js';
|
|
2
|
+
export { AimerViewfinder, Anchor, Brush, Camera, CameraPosition, CameraSettings, Color, DataCaptureContext, DataCaptureContextSettings, Direction, Expiration, Feedback, FocusGestureStrategy, FocusRange, FrameSourceState, ImageBuffer, ImageFrameSource, LaserlineViewfinder, LaserlineViewfinderStyle, LicenseInfo, LogoStyle, MarginsWithUnit, MeasureUnit, NoViewfinder, NoneLocationSelection, NumberWithUnit, Orientation, Point, PointWithUnit, Quadrilateral, RadiusLocationSelection, Rect, RectWithUnit, RectangularLocationSelection, RectangularViewfinder, RectangularViewfinderAnimation, RectangularViewfinderLineStyle, RectangularViewfinderStyle, ScanIntention, Size, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizingMode, Sound, SpotlightViewfinder, SwipeToZoom, TapToFocus, TorchState, TorchSwitchControl, Vibration, VideoResolution, WaveFormVibration, ZoomSwitchControl } from './core.js';
|
|
3
3
|
import { NativeModules, NativeEventEmitter, Platform, requireNativeComponent } from 'react-native';
|
|
4
4
|
|
|
5
5
|
// tslint:disable-next-line:variable-name
|
|
@@ -14,10 +14,6 @@ class NativeFeedbackProxy {
|
|
|
14
14
|
const NativeModule$5 = NativeModules.ScanditDataCaptureCore;
|
|
15
15
|
const RNEventEmitter$3 = new NativeEventEmitter(NativeModule$5);
|
|
16
16
|
// tslint:enable:variable-name
|
|
17
|
-
var FrameSourceListenerName$1;
|
|
18
|
-
(function (FrameSourceListenerName) {
|
|
19
|
-
FrameSourceListenerName["didChangeState"] = "FrameSourceListener.onStateChanged";
|
|
20
|
-
})(FrameSourceListenerName$1 || (FrameSourceListenerName$1 = {}));
|
|
21
17
|
class NativeImageFrameSourceProxy {
|
|
22
18
|
eventEmitter;
|
|
23
19
|
nativeListeners = [];
|
|
@@ -39,7 +35,7 @@ class NativeImageFrameSourceProxy {
|
|
|
39
35
|
this.nativeListeners = [];
|
|
40
36
|
}
|
|
41
37
|
subscribeDidChangeState() {
|
|
42
|
-
const didChangeState = RNEventEmitter$3.addListener(
|
|
38
|
+
const didChangeState = RNEventEmitter$3.addListener(FrameSourceListenerEvents.didChangeState, (body) => {
|
|
43
39
|
const payload = JSON.parse(body);
|
|
44
40
|
this.eventEmitter.emit(FrameSourceListenerEvents.didChangeState, payload);
|
|
45
41
|
});
|
|
@@ -51,11 +47,6 @@ class NativeImageFrameSourceProxy {
|
|
|
51
47
|
const NativeModule$4 = NativeModules.ScanditDataCaptureCore;
|
|
52
48
|
const RNEventEmitter$2 = new NativeEventEmitter(NativeModule$4);
|
|
53
49
|
// tslint:enable:variable-name
|
|
54
|
-
var DataCaptureContextListenerName;
|
|
55
|
-
(function (DataCaptureContextListenerName) {
|
|
56
|
-
DataCaptureContextListenerName["didChangeStatus"] = "DataCaptureContextListener.onStatusChanged";
|
|
57
|
-
DataCaptureContextListenerName["didStartObservingContext"] = "DataCaptureContextListener.onObservationStarted";
|
|
58
|
-
})(DataCaptureContextListenerName || (DataCaptureContextListenerName = {}));
|
|
59
50
|
const { major, minor, patch } = Platform.constants?.reactNativeVersion;
|
|
60
51
|
class NativeDataCaptureContextProxy extends BaseNativeProxy {
|
|
61
52
|
nativeListeners = [];
|
|
@@ -83,16 +74,17 @@ class NativeDataCaptureContextProxy extends BaseNativeProxy {
|
|
|
83
74
|
dispose() {
|
|
84
75
|
return NativeModule$4.dispose();
|
|
85
76
|
}
|
|
86
|
-
|
|
77
|
+
registerListenerForDataCaptureContext() {
|
|
87
78
|
NativeModule$4.registerListenerForEvents();
|
|
88
79
|
}
|
|
89
|
-
|
|
90
|
-
NativeModule$4.unregisterListenerForEvents();
|
|
80
|
+
unregisterListenerForDataCaptureContext() {
|
|
81
|
+
const p = NativeModule$4.unregisterListenerForEvents();
|
|
91
82
|
this.nativeListeners.forEach(listener => listener.remove());
|
|
92
83
|
this.nativeListeners = [];
|
|
84
|
+
return p;
|
|
93
85
|
}
|
|
94
86
|
subscribeDidChangeStatus() {
|
|
95
|
-
const didChangeStatus = RNEventEmitter$2.addListener(
|
|
87
|
+
const didChangeStatus = RNEventEmitter$2.addListener(DataCaptureContextEvents.didChangeStatus, (body) => {
|
|
96
88
|
const payload = JSON.parse(body);
|
|
97
89
|
const contextStatus = ContextStatus.fromJSON(JSON.parse(payload.status));
|
|
98
90
|
this.eventEmitter.emit(DataCaptureContextEvents.didChangeStatus, contextStatus);
|
|
@@ -100,7 +92,7 @@ class NativeDataCaptureContextProxy extends BaseNativeProxy {
|
|
|
100
92
|
this.nativeListeners.push(didChangeStatus);
|
|
101
93
|
}
|
|
102
94
|
subscribeDidStartObservingContext() {
|
|
103
|
-
const didStartObservingContext = RNEventEmitter$2.addListener(
|
|
95
|
+
const didStartObservingContext = RNEventEmitter$2.addListener(DataCaptureContextEvents.didStartObservingContext, () => {
|
|
104
96
|
this.eventEmitter.emit(DataCaptureContextEvents.didStartObservingContext);
|
|
105
97
|
});
|
|
106
98
|
this.nativeListeners.push(didStartObservingContext);
|
|
@@ -111,10 +103,6 @@ class NativeDataCaptureContextProxy extends BaseNativeProxy {
|
|
|
111
103
|
const NativeModule$3 = NativeModules.ScanditDataCaptureCore;
|
|
112
104
|
const RNEventEmitter$1 = new NativeEventEmitter(NativeModule$3);
|
|
113
105
|
// tslint:enable:variable-name
|
|
114
|
-
var DataCaptureViewListenerName;
|
|
115
|
-
(function (DataCaptureViewListenerName) {
|
|
116
|
-
DataCaptureViewListenerName["didChangeSize"] = "DataCaptureViewListener.onSizeChanged";
|
|
117
|
-
})(DataCaptureViewListenerName || (DataCaptureViewListenerName = {}));
|
|
118
106
|
class NativeDataCaptureViewProxy extends BaseNativeProxy {
|
|
119
107
|
nativeListeners = [];
|
|
120
108
|
constructor() {
|
|
@@ -159,7 +147,7 @@ class NativeDataCaptureViewProxy extends BaseNativeProxy {
|
|
|
159
147
|
this.nativeListeners = [];
|
|
160
148
|
}
|
|
161
149
|
subscribeDidChangeSize() {
|
|
162
|
-
const didChangeSize = RNEventEmitter$1.addListener(
|
|
150
|
+
const didChangeSize = RNEventEmitter$1.addListener(DataCaptureViewEvents.didChangeSize, (body) => {
|
|
163
151
|
const payload = JSON.parse(body);
|
|
164
152
|
this.eventEmitter.emit(DataCaptureViewEvents.didChangeSize, JSON.stringify(payload));
|
|
165
153
|
});
|
|
@@ -181,10 +169,6 @@ class NativeDataCaptureViewProxy extends BaseNativeProxy {
|
|
|
181
169
|
const NativeModule$2 = NativeModules.ScanditDataCaptureCore;
|
|
182
170
|
const RNEventEmitter = new NativeEventEmitter(NativeModule$2);
|
|
183
171
|
// tslint:enable:variable-name
|
|
184
|
-
var FrameSourceListenerName;
|
|
185
|
-
(function (FrameSourceListenerName) {
|
|
186
|
-
FrameSourceListenerName["didChangeState"] = "FrameSourceListener.onStateChanged";
|
|
187
|
-
})(FrameSourceListenerName || (FrameSourceListenerName = {}));
|
|
188
172
|
class NativeCameraProxy {
|
|
189
173
|
nativeListeners = [];
|
|
190
174
|
eventEmitter;
|
|
@@ -210,12 +194,13 @@ class NativeCameraProxy {
|
|
|
210
194
|
NativeModule$2.registerListenerForCameraEvents();
|
|
211
195
|
}
|
|
212
196
|
unregisterListenerForCameraEvents() {
|
|
213
|
-
NativeModule$2.unregisterListenerForCameraEvents();
|
|
197
|
+
const p = NativeModule$2.unregisterListenerForCameraEvents();
|
|
214
198
|
this.nativeListeners.forEach(listener => listener.remove());
|
|
215
199
|
this.nativeListeners = [];
|
|
200
|
+
return p;
|
|
216
201
|
}
|
|
217
202
|
subscribeDidChangeState() {
|
|
218
|
-
const didChangeState = RNEventEmitter.addListener(
|
|
203
|
+
const didChangeState = RNEventEmitter.addListener(FrameSourceListenerEvents.didChangeState, (body) => {
|
|
219
204
|
const payload = JSON.parse(body);
|
|
220
205
|
const newState = payload.state;
|
|
221
206
|
this.eventEmitter.emit(FrameSourceListenerEvents.didChangeState, newState);
|
|
@@ -242,7 +227,7 @@ function initCoreDefaults() {
|
|
|
242
227
|
const NativeModule = NativeModules.ScanditDataCaptureCore;
|
|
243
228
|
class DataCaptureVersion {
|
|
244
229
|
static get pluginVersion() {
|
|
245
|
-
return '6.
|
|
230
|
+
return '6.24.0-beta.1';
|
|
246
231
|
}
|
|
247
232
|
static get sdkVersion() {
|
|
248
233
|
return NativeModule.Version;
|