scandit-capacitor-datacapture-barcode 6.22.0-beta.1 → 6.22.0

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.
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
17
17
 
18
18
  s.dependency "Capacitor"
19
19
  s.dependency "ScanditCapacitorDatacaptureCore", "= #{version}"
20
- s.dependency "scandit-datacapture-frameworks-barcode", '= 6.22.0-beta.1'
20
+ s.dependency "scandit-datacapture-frameworks-barcode", '= 6.22.0'
21
21
  end
@@ -56,7 +56,7 @@ repositories {
56
56
  }
57
57
 
58
58
  dependencies {
59
- def sdk_version = "6.22.0-beta.1"
59
+ def sdk_version = "6.22.0"
60
60
 
61
61
  implementation fileTree(dir: 'libs', include: ['*.jar'])
62
62
  implementation fileTree(dir: 'library', include: ['*.aar'])
@@ -823,12 +823,12 @@ class ScanditBarcodeNative :
823
823
  fun createFindView(
824
824
  call: PluginCall
825
825
  ) {
826
- val viewJson = call.getString("view")
826
+ val viewJson = call.getObject("View")
827
827
 
828
828
  viewJson?.let {
829
829
  val container = barcodeFindViewHandler.prepareContainer(this.context)
830
830
 
831
- val result = barcodeFindModule.getView(container, viewJson)
831
+ val result = barcodeFindModule.getView(container, call.data.toString())
832
832
  if (result.isFailure) {
833
833
  call.reject(
834
834
  result.exceptionOrNull()?.message
package/dist/barcode.js CHANGED
@@ -1101,9 +1101,10 @@ class BarcodeCaptureListenerController {
1101
1101
  return this._proxy.updateBarcodeCaptureOverlay(JSON.stringify(overlay.toJSON()));
1102
1102
  }
1103
1103
  subscribeListener() {
1104
+ var _a, _b, _c, _d;
1104
1105
  this._proxy.registerListenerForEvents();
1105
- this._proxy.subscribeDidUpdateSessionListener();
1106
- this._proxy.subscribeDidScanListener();
1106
+ (_b = (_a = this._proxy).subscribeDidUpdateSessionListener) === null || _b === void 0 ? void 0 : _b.call(_a);
1107
+ (_d = (_c = this._proxy).subscribeDidScanListener) === null || _d === void 0 ? void 0 : _d.call(_c);
1107
1108
  this.eventEmitter.on(BarcodeCaptureListenerEvents.inCallback, (value) => {
1108
1109
  this.barcodeCapture.isInListenerCallback = value;
1109
1110
  });
@@ -1474,9 +1475,10 @@ class BarcodeSelectionListenerController {
1474
1475
  return this._proxy.resetSession();
1475
1476
  }
1476
1477
  subscribeListener() {
1478
+ var _a, _b, _c, _d;
1477
1479
  this._proxy.registerListenerForEvents();
1478
- this._proxy.subscribeDidUpdateSelectionListener();
1479
- this._proxy.subscribeDidUpdateSession();
1480
+ (_b = (_a = this._proxy).subscribeDidUpdateSelectionListener) === null || _b === void 0 ? void 0 : _b.call(_a);
1481
+ (_d = (_c = this._proxy).subscribeDidUpdateSession) === null || _d === void 0 ? void 0 : _d.call(_c);
1480
1482
  this.eventEmitter.on(BarcodeSelectionListenerEvents.didUpdateSelection, (body) => {
1481
1483
  const payload = JSON.parse(body);
1482
1484
  const session = BarcodeSelectionSession.fromJSON(JSON.parse(payload.session));
@@ -2731,8 +2733,9 @@ class BarcodeTrackingListenerController {
2731
2733
  return this._proxy.resetSession();
2732
2734
  }
2733
2735
  subscribeListener() {
2736
+ var _a, _b;
2734
2737
  this._proxy.registerListenerForEvents();
2735
- this._proxy.subscribeDidUpdateSession();
2738
+ (_b = (_a = this._proxy).subscribeDidUpdateSession) === null || _b === void 0 ? void 0 : _b.call(_a);
2736
2739
  this.eventEmitter.on(BarcodeTrackingListenerEvents.inCallback, (value) => {
2737
2740
  this.barcodeTracking.isInListenerCallback = value;
2738
2741
  });
@@ -2897,11 +2900,12 @@ class BarcodeTrackingAdvancedOverlayController {
2897
2900
  return this._proxy.updateBarcodeTrackingAdvancedOverlay(JSON.stringify(this.overlay.toJSON()));
2898
2901
  }
2899
2902
  subscribeListener() {
2903
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2900
2904
  this._proxy.registerListenerForAdvancedOverlayEvents();
2901
- this._proxy.subscribeViewForTrackedBarcode();
2902
- this._proxy.subscribeAnchorForTrackedBarcode();
2903
- this._proxy.subscribeOffsetForTrackedBarcode();
2904
- this._proxy.subscribeDidTapViewForTrackedBarcode();
2905
+ (_b = (_a = this._proxy).subscribeViewForTrackedBarcode) === null || _b === void 0 ? void 0 : _b.call(_a);
2906
+ (_d = (_c = this._proxy).subscribeAnchorForTrackedBarcode) === null || _d === void 0 ? void 0 : _d.call(_c);
2907
+ (_f = (_e = this._proxy).subscribeOffsetForTrackedBarcode) === null || _f === void 0 ? void 0 : _f.call(_e);
2908
+ (_h = (_g = this._proxy).subscribeDidTapViewForTrackedBarcode) === null || _h === void 0 ? void 0 : _h.call(_g);
2905
2909
  this.eventEmitter.on(BarcodeTrackingAdvancedOverlayListenerEvents.viewForTrackedBarcode, (body) => __awaiter(this, void 0, void 0, function* () {
2906
2910
  const payload = JSON.parse(body);
2907
2911
  const trackedBarcode = TrackedBarcode
@@ -2974,9 +2978,10 @@ class BarcodeTrackingBasicOverlayController {
2974
2978
  return this._proxy.updateBarcodeTrackingBasicOverlay(JSON.stringify(this.overlay.toJSON()));
2975
2979
  }
2976
2980
  subscribeListener() {
2981
+ var _a, _b, _c, _d;
2977
2982
  this._proxy.registerListenerForBasicOverlayEvents();
2978
- this._proxy.subscribeBrushForTrackedBarcode();
2979
- this._proxy.subscribeDidTapTrackedBarcode();
2983
+ (_b = (_a = this._proxy).subscribeBrushForTrackedBarcode) === null || _b === void 0 ? void 0 : _b.call(_a);
2984
+ (_d = (_c = this._proxy).subscribeDidTapTrackedBarcode) === null || _d === void 0 ? void 0 : _d.call(_c);
2980
2985
  this.eventEmitter.on(BarcodeTrackingBasicOverlayListenerEvents.brushForTrackedBarcode, (body) => {
2981
2986
  const payload = JSON.parse(body);
2982
2987
  const trackedBarcode = TrackedBarcode
@@ -4114,7 +4119,7 @@ __decorate([
4114
4119
  nameForSerialization('highlightStyle')
4115
4120
  ], BarcodePickViewSettings.prototype, "_highlightStyle", void 0);
4116
4121
  __decorate([
4117
- nameForSerialization('showLoadingDialog')
4122
+ nameForSerialization('shouldShowLoadingDialog')
4118
4123
  ], BarcodePickViewSettings.prototype, "_showLoadingDialog", void 0);
4119
4124
  __decorate([
4120
4125
  nameForSerialization('showFinishButton')
@@ -4126,10 +4131,10 @@ __decorate([
4126
4131
  nameForSerialization('showZoomButton')
4127
4132
  ], BarcodePickViewSettings.prototype, "_showZoomButton", void 0);
4128
4133
  __decorate([
4129
- nameForSerialization('loadingDialogText')
4134
+ nameForSerialization('showLoadingDialogText')
4130
4135
  ], BarcodePickViewSettings.prototype, "_loadingDialogText", void 0);
4131
4136
  __decorate([
4132
- nameForSerialization('showGuidelines')
4137
+ nameForSerialization('shouldShowGuidelines')
4133
4138
  ], BarcodePickViewSettings.prototype, "_showGuidelines", void 0);
4134
4139
  __decorate([
4135
4140
  nameForSerialization('initialGuidelineText')
@@ -4138,7 +4143,7 @@ __decorate([
4138
4143
  nameForSerialization('moveCloserGuidelineText')
4139
4144
  ], BarcodePickViewSettings.prototype, "_moveCloserGuidelineText", void 0);
4140
4145
  __decorate([
4141
- nameForSerialization('showHints')
4146
+ nameForSerialization('shouldShowHints')
4142
4147
  ], BarcodePickViewSettings.prototype, "_showHints", void 0);
4143
4148
  __decorate([
4144
4149
  nameForSerialization('onFirstItemToPickFoundHintText')
@@ -4227,8 +4232,9 @@ __decorate([
4227
4232
  ], RectangularWithIcons, "barcodePickDefaults", null);
4228
4233
 
4229
4234
  class BarcodeFindFeedback extends DefaultSerializeable {
4230
- get found() {
4231
- return BarcodeFindFeedback.barcodeFindDefaults.Feedback.found;
4235
+ constructor() {
4236
+ super(...arguments);
4237
+ this.found = BarcodeFindFeedback.barcodeFindDefaults.Feedback.found;
4232
4238
  }
4233
4239
  static get barcodeFindDefaults() {
4234
4240
  return getBarcodeFindDefaults();
@@ -4258,7 +4264,8 @@ class BarcodeFindController extends BaseController {
4258
4264
  return this._proxy.updateFindMode(JSON.stringify(this._barcodeFind.toJSON()));
4259
4265
  }
4260
4266
  setItemList(items) {
4261
- return this._proxy.setItemList(JSON.stringify(items));
4267
+ const jsonString = items.map(item => item.toJSON());
4268
+ return this._proxy.setItemList(JSON.stringify(jsonString));
4262
4269
  }
4263
4270
  start() {
4264
4271
  return this._proxy.barcodeFindModeStart();
@@ -4274,7 +4281,7 @@ class BarcodeFindController extends BaseController {
4274
4281
  }
4275
4282
  filterFoundItemsFromEvent(eventBody) {
4276
4283
  const foundItemsData = JSON.parse(eventBody).foundItems;
4277
- const itemsToFind = this._barcodeFind.itemsToFind;
4284
+ const itemsToFind = JSON.parse(this._barcodeFind.itemsToFind);
4278
4285
  const foundItems = itemsToFind.filter((item) => foundItemsData.includes(item.searchOptions.barcodeData));
4279
4286
  return foundItems;
4280
4287
  }
@@ -4320,7 +4327,7 @@ class BarcodeFind extends DefaultSerializeable {
4320
4327
  this._feedback = BarcodeFindFeedback.defaultFeedback;
4321
4328
  this._enabled = true;
4322
4329
  this._isInCallback = false;
4323
- this.itemsToFind = [];
4330
+ this.itemsToFind = "";
4324
4331
  this.listeners = [];
4325
4332
  this._settings = settings;
4326
4333
  this._controller = BarcodeFindController.forBarcodeFind(this);
@@ -4383,7 +4390,7 @@ class BarcodeFind extends DefaultSerializeable {
4383
4390
  this._controller.unsubscribeListeners();
4384
4391
  }
4385
4392
  setItemList(items) {
4386
- this.itemsToFind = items;
4393
+ this.itemsToFind = JSON.stringify(items.map(item => item.toJSON()));
4387
4394
  return this._controller.setItemList(items);
4388
4395
  // return this.update();
4389
4396
  }