scandit-react-native-datacapture-core 6.27.1 → 6.27.2

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.
@@ -68,7 +68,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
68
68
  }
69
69
 
70
70
  dependencies {
71
- def sdk_version = "6.27.1"
71
+ def sdk_version = "6.27.2"
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) {
@@ -2,10 +2,15 @@ package com.scandit.datacapture.reactnative.core.utils
2
2
 
3
3
  import com.facebook.react.bridge.Promise
4
4
  import com.scandit.datacapture.frameworks.core.result.FrameworksResult
5
+ import org.json.JSONObject
5
6
  import kotlin.Error
6
7
 
7
8
  class ReactNativeResult(private val promise: Promise) : FrameworksResult {
8
9
  override fun success(result: Any?) {
10
+ if (result is Map<*, *>) {
11
+ promise.resolve(JSONObject(result).toString())
12
+ return
13
+ }
9
14
  promise.resolve(result)
10
15
  }
11
16
 
package/dist/core.js CHANGED
@@ -989,6 +989,16 @@ class DataCaptureContextSettings extends DefaultSerializeable {
989
989
  }
990
990
  }
991
991
 
992
+ class DataCaptureContextFeatures {
993
+ static get featureFlags() {
994
+ return this._featureFlags;
995
+ }
996
+ static set featureFlags(value) {
997
+ this._featureFlags = value;
998
+ }
999
+ }
1000
+ DataCaptureContextFeatures._featureFlags = {};
1001
+
992
1002
  var DataCaptureContextEvents;
993
1003
  (function (DataCaptureContextEvents) {
994
1004
  DataCaptureContextEvents["didChangeStatus"] = "DataCaptureContextListener.onStatusChanged";
@@ -1050,7 +1060,9 @@ class DataCaptureContextController {
1050
1060
  initializeContextFromJSON() {
1051
1061
  return __awaiter(this, void 0, void 0, function* () {
1052
1062
  try {
1053
- yield this._proxy.contextFromJSON(this.context);
1063
+ const featureFlagsString = yield this._proxy.contextFromJSON(this.context);
1064
+ DataCaptureContextFeatures.featureFlags =
1065
+ JSON.parse(featureFlagsString);
1054
1066
  }
1055
1067
  catch (error) {
1056
1068
  this.notifyListenersOfDeserializationError(error);
@@ -2875,5 +2887,5 @@ var Expiration;
2875
2887
 
2876
2888
  createEventEmitter();
2877
2889
 
2878
- 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 };
2890
+ export { AimerViewfinder, Anchor, BaseController, BaseDataCaptureView, BaseNativeProxy, Brush, Camera, CameraController, CameraPosition, CameraSettings, Color, ContextStatus, ControlImage, DataCaptureContext, DataCaptureContextEvents, DataCaptureContextFeatures, 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 };
2879
2891
  //# sourceMappingURL=core.js.map