scandit-capacitor-datacapture-barcode 6.22.0-beta.2 → 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.2'
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.2"
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
@@ -4232,8 +4232,9 @@ __decorate([
4232
4232
  ], RectangularWithIcons, "barcodePickDefaults", null);
4233
4233
 
4234
4234
  class BarcodeFindFeedback extends DefaultSerializeable {
4235
- get found() {
4236
- return BarcodeFindFeedback.barcodeFindDefaults.Feedback.found;
4235
+ constructor() {
4236
+ super(...arguments);
4237
+ this.found = BarcodeFindFeedback.barcodeFindDefaults.Feedback.found;
4237
4238
  }
4238
4239
  static get barcodeFindDefaults() {
4239
4240
  return getBarcodeFindDefaults();
@@ -4263,7 +4264,8 @@ class BarcodeFindController extends BaseController {
4263
4264
  return this._proxy.updateFindMode(JSON.stringify(this._barcodeFind.toJSON()));
4264
4265
  }
4265
4266
  setItemList(items) {
4266
- return this._proxy.setItemList(JSON.stringify(items));
4267
+ const jsonString = items.map(item => item.toJSON());
4268
+ return this._proxy.setItemList(JSON.stringify(jsonString));
4267
4269
  }
4268
4270
  start() {
4269
4271
  return this._proxy.barcodeFindModeStart();
@@ -4279,7 +4281,7 @@ class BarcodeFindController extends BaseController {
4279
4281
  }
4280
4282
  filterFoundItemsFromEvent(eventBody) {
4281
4283
  const foundItemsData = JSON.parse(eventBody).foundItems;
4282
- const itemsToFind = this._barcodeFind.itemsToFind;
4284
+ const itemsToFind = JSON.parse(this._barcodeFind.itemsToFind);
4283
4285
  const foundItems = itemsToFind.filter((item) => foundItemsData.includes(item.searchOptions.barcodeData));
4284
4286
  return foundItems;
4285
4287
  }
@@ -4325,7 +4327,7 @@ class BarcodeFind extends DefaultSerializeable {
4325
4327
  this._feedback = BarcodeFindFeedback.defaultFeedback;
4326
4328
  this._enabled = true;
4327
4329
  this._isInCallback = false;
4328
- this.itemsToFind = [];
4330
+ this.itemsToFind = "";
4329
4331
  this.listeners = [];
4330
4332
  this._settings = settings;
4331
4333
  this._controller = BarcodeFindController.forBarcodeFind(this);
@@ -4388,7 +4390,7 @@ class BarcodeFind extends DefaultSerializeable {
4388
4390
  this._controller.unsubscribeListeners();
4389
4391
  }
4390
4392
  setItemList(items) {
4391
- this.itemsToFind = items;
4393
+ this.itemsToFind = JSON.stringify(items.map(item => item.toJSON()));
4392
4394
  return this._controller.setItemList(items);
4393
4395
  // return this.update();
4394
4396
  }