scandit-capacitor-datacapture-barcode 6.28.1 → 7.0.0-beta.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.
Files changed (26) hide show
  1. package/ScanditCapacitorDatacaptureBarcode.podspec +2 -2
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt +114 -57
  4. package/dist/barcode.js +562 -657
  5. package/dist/barcode.js.map +1 -1
  6. package/dist/dts/definitions.d.ts +13 -11
  7. package/dist/dts/ts/{BarcodeTrackingAdvancedOverlay.d.ts → BarcodeBatchAdvancedOverlay.d.ts} +7 -7
  8. package/dist/dts/ts/BarcodeBatchAdvancedOverlayListener.d.ts +10 -0
  9. package/dist/dts/ts/BarcodeCountView.d.ts +7 -0
  10. package/dist/dts/ts/Capacitor/{BarcodeTrackingAdvancedOverlayProxy.d.ts → BarcodeBatchAdvancedOverlayProxy.d.ts} +5 -5
  11. package/dist/dts/ts/Capacitor/{BarcodeTrackingBasicOverlayProxy.d.ts → BarcodeBatchBasicOverlayProxy.d.ts} +3 -3
  12. package/dist/dts/ts/Capacitor/{BarcodeTrackingListenerProxy.d.ts → BarcodeBatchListenerProxy.d.ts} +4 -4
  13. package/dist/dts/ts/Capacitor/BarcodeGeneratorProxy.d.ts +7 -0
  14. package/dist/dts/ts/Capacitor/BarcodeSelectionProxy.d.ts +1 -0
  15. package/dist/dts/ts/Capacitor/Capacitor.d.ts +17 -13
  16. package/dist/dts/ts/Capacitor/SparkScanViewProxy.d.ts +1 -2
  17. package/dist/dts/ts/SparkScanView.d.ts +54 -37
  18. package/dist/index.js +446 -252
  19. package/dist/index.js.map +1 -1
  20. package/ios/Plugin/BarcodeCountViewHandler.swift +11 -7
  21. package/ios/Plugin/Plugin.m +158 -153
  22. package/ios/Plugin/ScanditBarcodeCapture.swift +157 -95
  23. package/ios/Podfile +1 -1
  24. package/ios/ScanditBarcodeCapturePlugin.xcodeproj/project.pbxproj +4 -4
  25. package/package.json +4 -4
  26. package/dist/dts/ts/BarcodeTrackingAdvancedOverlayListener.d.ts +0 -10
package/dist/barcode.js CHANGED
@@ -1,4 +1,4 @@
1
- import { nameForSerialization, serializationDefault, NoViewfinder, NoneLocationSelection, DefaultSerializeable, ignoreFromSerialization, FactoryMaker, Feedback, Quadrilateral, CameraController, Brush, AimerViewfinder, Anchor, PointWithUnit, BaseController, CameraSettings, Color } from 'scandit-capacitor-datacapture-core/dist/core';
1
+ import { nameForSerialization, serializationDefault, NoViewfinder, NoneLocationSelection, DefaultSerializeable, ignoreFromSerialization, FactoryMaker, Feedback, Quadrilateral, Brush, AimerViewfinder, Anchor, PointWithUnit, BaseController, CameraSettings, Color, CameraController } from 'scandit-capacitor-datacapture-core/dist/core';
2
2
 
3
3
  var Symbology;
4
4
  (function (Symbology) {
@@ -51,7 +51,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
51
51
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
52
52
  PERFORMANCE OF THIS SOFTWARE.
53
53
  ***************************************************************************** */
54
- /* global Reflect, Promise, SuppressedError, Symbol */
54
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
55
55
 
56
56
 
57
57
  function __decorate(decorators, target, key, desc) {
@@ -313,13 +313,7 @@ function parseBarcodeCaptureDefaults(jsonDefaults) {
313
313
  },
314
314
  BarcodeCaptureOverlay: {
315
315
  defaultStyle: jsonDefaults.BarcodeCaptureOverlay.defaultStyle,
316
- DefaultBrush: {
317
- fillColor: Color
318
- .fromJSON(jsonDefaults.BarcodeCaptureOverlay.DefaultBrush.fillColor),
319
- strokeColor: Color
320
- .fromJSON(jsonDefaults.BarcodeCaptureOverlay.DefaultBrush.strokeColor),
321
- strokeWidth: jsonDefaults.BarcodeCaptureOverlay.DefaultBrush.strokeWidth,
322
- },
316
+ DefaultBrush: new Brush(Color.fromJSON(jsonDefaults.BarcodeCaptureOverlay.DefaultBrush.fillColor), Color.fromJSON(jsonDefaults.BarcodeCaptureOverlay.DefaultBrush.strokeColor), jsonDefaults.BarcodeCaptureOverlay.DefaultBrush.strokeWidth),
323
317
  styles: Object
324
318
  .keys(jsonDefaults.BarcodeCaptureOverlay.Brushes)
325
319
  .reduce((previousValue, currentValue) => {
@@ -626,55 +620,6 @@ __decorate([
626
620
  nameForSerialization('structuredAppendData')
627
621
  ], Barcode.prototype, "_structuredAppendData", void 0);
628
622
 
629
- class TrackedBarcode {
630
- constructor() {
631
- /**
632
- * @deprecated
633
- */
634
- this._deltaTime = 0;
635
- /**
636
- * @deprecated
637
- */
638
- this._predictedLocation = undefined;
639
- }
640
- get barcode() { return this._barcode; }
641
- get location() { return this._location; }
642
- get identifier() { return this._identifier; }
643
- get sessionFrameSequenceID() {
644
- return this._sessionFrameSequenceID;
645
- }
646
- /**
647
- * @deprecated
648
- */
649
- get deltaTime() {
650
- return this._deltaTime;
651
- }
652
- /**
653
- * @deprecated
654
- */
655
- get predictedLocation() {
656
- return this._predictedLocation;
657
- }
658
- get shouldAnimateFromPreviousToNextState() {
659
- // tslint:disable-next-line:no-console
660
- console.warn('shouldAnimateFromPreviousToNextState is deprecated and returns "false" when accessed');
661
- return false;
662
- }
663
- static fromJSON(json, sessionFrameSequenceID) {
664
- const trackedBarcode = new TrackedBarcode();
665
- // The serialization returns the identifier as a string, not a number, which it originally is.
666
- // This is because the identifier needs to be used as a key in a dictionary, which in JSON can only be a string.
667
- // We can assume that it is a number in the string that we can safely parse.
668
- trackedBarcode._identifier = parseInt(json.identifier, 10);
669
- trackedBarcode._barcode = Barcode.fromJSON(json.barcode);
670
- trackedBarcode._location = Quadrilateral.fromJSON(json.location);
671
- trackedBarcode._sessionFrameSequenceID = sessionFrameSequenceID ? sessionFrameSequenceID : null;
672
- trackedBarcode._deltaTime = json.deltaTime;
673
- trackedBarcode._predictedLocation = trackedBarcode._location;
674
- return trackedBarcode;
675
- }
676
- }
677
-
678
623
  var BatterySavingMode;
679
624
  (function (BatterySavingMode) {
680
625
  BatterySavingMode["On"] = "on";
@@ -735,6 +680,26 @@ __decorate([
735
680
  nameForSerialization('quantity')
736
681
  ], TargetBarcode.prototype, "_quantity", void 0);
737
682
 
683
+ class TrackedBarcode {
684
+ get barcode() { return this._barcode; }
685
+ get location() { return this._location; }
686
+ get identifier() { return this._identifier; }
687
+ get sessionFrameSequenceID() {
688
+ return this._sessionFrameSequenceID;
689
+ }
690
+ static fromJSON(json, sessionFrameSequenceID) {
691
+ const trackedBarcode = new TrackedBarcode();
692
+ // The serialization returns the identifier as a string, not a number, which it originally is.
693
+ // This is because the identifier needs to be used as a key in a dictionary, which in JSON can only be a string.
694
+ // We can assume that it is a number in the string that we can safely parse.
695
+ trackedBarcode._identifier = parseInt(json.identifier, 10);
696
+ trackedBarcode._barcode = Barcode.fromJSON(json.barcode);
697
+ trackedBarcode._location = Quadrilateral.fromJSON(json.location);
698
+ trackedBarcode._sessionFrameSequenceID = sessionFrameSequenceID ? sessionFrameSequenceID : null;
699
+ return trackedBarcode;
700
+ }
701
+ }
702
+
738
703
  class BarcodeSpatialGrid extends DefaultSerializeable {
739
704
  static fromJSON(json) {
740
705
  const spatialGrid = new BarcodeSpatialGrid();
@@ -810,15 +775,13 @@ class BarcodeCountSessionController {
810
775
 
811
776
  class BarcodeCountSession extends DefaultSerializeable {
812
777
  static fromJSON(json) {
778
+ var _a;
779
+ const sessionJson = JSON.parse(json.session);
813
780
  const session = new BarcodeCountSession();
814
- session._frameSequenceID = json.frameSequenceId;
815
- session._additionalBarcodes = json.additionalBarcodes;
816
- session._recognizedBarcodes = {};
817
- Object.entries(json.recognizedBarcodes)
818
- .forEach(([key, value]) => {
819
- const trackedBarcode = TrackedBarcode.fromJSON(value, session._frameSequenceID);
820
- session._recognizedBarcodes[parseInt(key, 10)] = trackedBarcode;
821
- });
781
+ session._frameSequenceID = sessionJson.frameSequenceId;
782
+ session._additionalBarcodes = sessionJson.additionalBarcodes;
783
+ session._recognizedBarcodes = sessionJson.recognizedBarcodes.map(Barcode.fromJSON);
784
+ session.frameId = (_a = json.frameId) !== null && _a !== void 0 ? _a : '';
822
785
  return session;
823
786
  }
824
787
  constructor() {
@@ -838,14 +801,14 @@ class BarcodeCountSession extends DefaultSerializeable {
838
801
  return this.sessionController.resetSession();
839
802
  }
840
803
  getSpatialMap() {
841
- var _a;
842
804
  return __awaiter(this, void 0, void 0, function* () {
805
+ var _a;
843
806
  return (_a = yield this.sessionController.getSpatialMap()) !== null && _a !== void 0 ? _a : null;
844
807
  });
845
808
  }
846
809
  getSpatialMapWithHints(expectedNumberOfRows, expectedNumberOfColumns) {
847
- var _a;
848
810
  return __awaiter(this, void 0, void 0, function* () {
811
+ var _a;
849
812
  return (_a = yield this.sessionController.getSpatialMapWithHints(expectedNumberOfRows, expectedNumberOfColumns)) !== null && _a !== void 0 ? _a : null;
850
813
  });
851
814
  }
@@ -862,6 +825,9 @@ __decorate([
862
825
  __decorate([
863
826
  ignoreFromSerialization
864
827
  ], BarcodeCountSession.prototype, "sessionController", void 0);
828
+ __decorate([
829
+ ignoreFromSerialization
830
+ ], BarcodeCountSession.prototype, "frameId", void 0);
865
831
 
866
832
  var BarcodeCountListenerEvents;
867
833
  (function (BarcodeCountListenerEvents) {
@@ -897,12 +863,12 @@ class BarcodeCountListenerController {
897
863
  this._proxy.registerBarcodeCountListener();
898
864
  this._proxy.subscribeDidScan();
899
865
  this._proxy.subscribeDidListSessionUpdate();
900
- this.eventEmitter.on(BarcodeCountListenerEvents.didScan, (body) => {
866
+ this.eventEmitter.on(BarcodeCountListenerEvents.didScan, (body) => __awaiter(this, void 0, void 0, function* () {
901
867
  const payload = JSON.parse(body);
902
- const session = BarcodeCountSession.fromJSON(JSON.parse(payload.session));
903
- this.notifyListenersOfDidScanSession(session);
868
+ const session = BarcodeCountSession.fromJSON(payload);
869
+ yield this.notifyListenersOfDidScanSession(session);
904
870
  this._proxy.finishOnScan();
905
- });
871
+ }));
906
872
  this.eventEmitter.on(BarcodeCountListenerEvents.didListSessionUpdate, (body) => {
907
873
  const payload = JSON.parse(body);
908
874
  const session = BarcodeCountCaptureListSession
@@ -929,14 +895,16 @@ class BarcodeCountListenerController {
929
895
  this._proxy.setBarcodeCountCaptureList(JSON.stringify(barcodeCountCaptureList.targetBarcodes));
930
896
  }
931
897
  notifyListenersOfDidScanSession(session) {
932
- const mode = this.barcodeCount;
933
- mode.isInListenerCallback = true;
934
- mode.listeners.forEach(listener => {
935
- if (listener.didScan) {
936
- listener.didScan(this.barcodeCount, session, CameraController.getLastFrame);
898
+ return __awaiter(this, void 0, void 0, function* () {
899
+ const mode = this.barcodeCount;
900
+ mode.isInListenerCallback = true;
901
+ for (const listener of mode.listeners) {
902
+ if (listener.didScan) {
903
+ yield listener.didScan(this.barcodeCount, session, () => CameraController.getFrame(session.frameId));
904
+ }
937
905
  }
906
+ mode.isInListenerCallback = false;
938
907
  });
939
- mode.isInListenerCallback = false;
940
908
  }
941
909
  notifyListenersOfDidListSessionUpdate(session) {
942
910
  var _a;
@@ -1338,6 +1306,9 @@ function parseBarcodeCountToolbarDefaults(jsonDefaults) {
1338
1306
  };
1339
1307
  return barcodeCountToolbarSettingsDefault;
1340
1308
  }
1309
+ function parseBrush(brushJson) {
1310
+ return new Brush(Color.fromHex(brushJson.fillColor), Color.fromHex(brushJson.strokeColor), brushJson.strokeWidth);
1311
+ }
1341
1312
  function parseBarcodeCountDefaults(jsonDefaults) {
1342
1313
  const viewJsonDefaults = jsonDefaults.BarcodeCountView;
1343
1314
  const toolbarJsonDefaults = viewJsonDefaults.toolbarSettings;
@@ -1367,9 +1338,9 @@ function parseBarcodeCountDefaults(jsonDefaults) {
1367
1338
  shouldShowSingleScanButton: viewJsonDefaults.shouldShowSingleScanButton,
1368
1339
  shouldShowFloatingShutterButton: viewJsonDefaults.shouldShowFloatingShutterButton,
1369
1340
  shouldShowToolbar: viewJsonDefaults.shouldShowToolbar,
1370
- defaultNotInListBrush: viewJsonDefaults.defaultNotInListBrush,
1371
- defaultRecognizedBrush: viewJsonDefaults.defaultRecognizedBrush,
1372
- defaultUnrecognizedBrush: viewJsonDefaults.defaultUnrecognizedBrush,
1341
+ defaultNotInListBrush: parseBrush(viewJsonDefaults.notInListBrush),
1342
+ defaultRecognizedBrush: parseBrush(viewJsonDefaults.recognizedBrush),
1343
+ defaultUnrecognizedBrush: parseBrush(viewJsonDefaults.unrecognizedBrush),
1373
1344
  shouldShowScanAreaGuides: viewJsonDefaults.shouldShowScanAreaGuides,
1374
1345
  clearHighlightsButtonText: viewJsonDefaults.clearHighlightsButtonText,
1375
1346
  exitButtonText: viewJsonDefaults.exitButtonText,
@@ -1400,39 +1371,41 @@ function parseBarcodeCountDefaults(jsonDefaults) {
1400
1371
  singleScanButtonContentDescription: viewJsonDefaults.singleScanButtonContentDescription || null,
1401
1372
  shouldShowTorchControl: viewJsonDefaults.shouldShowTorchControl,
1402
1373
  torchControlPosition: viewJsonDefaults.torchControlPosition,
1374
+ tapToUncountEnabled: viewJsonDefaults.tapToUncountEnabled,
1375
+ textForTapToUncountHint: viewJsonDefaults.textForTapToUncountHint,
1403
1376
  }
1404
1377
  };
1405
1378
  return barcodeCountDefaults;
1406
1379
  }
1407
1380
 
1408
- function getBarcodeTrackingDefaults() {
1409
- return FactoryMaker.getInstance('BarcodeTrackingDefaults');
1381
+ function getBarcodeBatchDefaults() {
1382
+ return FactoryMaker.getInstance('BarcodeBatchDefaults');
1410
1383
  }
1411
- function parseBarcodeTrackingDefaults(jsonDefaults) {
1412
- const barcodeTrackingDefaults = {
1384
+ function parseBarcodeBatchDefaults(jsonDefaults) {
1385
+ const barcodeBatchDefaults = {
1413
1386
  RecommendedCameraSettings: CameraSettings
1414
1387
  .fromJSON(jsonDefaults.RecommendedCameraSettings),
1415
- BarcodeTrackingBasicOverlay: {
1416
- defaultStyle: jsonDefaults.BarcodeTrackingBasicOverlay.defaultStyle,
1388
+ BarcodeBatchBasicOverlay: {
1389
+ defaultStyle: jsonDefaults.BarcodeBatchBasicOverlay.defaultStyle,
1417
1390
  styles: Object
1418
- .keys(jsonDefaults.BarcodeTrackingBasicOverlay.Brushes)
1391
+ .keys(jsonDefaults.BarcodeBatchBasicOverlay.Brushes)
1419
1392
  .reduce((previousValue, currentValue) => {
1420
1393
  return Object.assign(Object.assign({}, previousValue), { [currentValue]: {
1421
1394
  DefaultBrush: {
1422
1395
  fillColor: Color
1423
- .fromJSON(jsonDefaults.BarcodeTrackingBasicOverlay.
1396
+ .fromJSON(jsonDefaults.BarcodeBatchBasicOverlay.
1424
1397
  Brushes[currentValue].fillColor),
1425
1398
  strokeColor: Color
1426
- .fromJSON(jsonDefaults.BarcodeTrackingBasicOverlay.
1399
+ .fromJSON(jsonDefaults.BarcodeBatchBasicOverlay.
1427
1400
  Brushes[currentValue].strokeColor),
1428
- strokeWidth: jsonDefaults.BarcodeTrackingBasicOverlay.
1401
+ strokeWidth: jsonDefaults.BarcodeBatchBasicOverlay.
1429
1402
  Brushes[currentValue].strokeWidth,
1430
1403
  },
1431
1404
  } });
1432
1405
  }, {}),
1433
1406
  }
1434
1407
  };
1435
- return barcodeTrackingDefaults;
1408
+ return barcodeBatchDefaults;
1436
1409
  }
1437
1410
 
1438
1411
  function getSparkScanDefaults() {
@@ -1547,33 +1520,22 @@ function parseSparkScanDefaults(jsonDefaults) {
1547
1520
  locationSelection: (fromJSON) => {
1548
1521
  return fromJSON(JSON.parse(jsonDefaults.SparkScanSettings.locationSelection));
1549
1522
  },
1550
- singleBarcodeAutoDetection: jsonDefaults.SparkScanSettings.singleBarcodeAutoDetection,
1551
1523
  scanIntention: jsonDefaults.SparkScanSettings.scanIntention,
1552
1524
  },
1553
1525
  SparkScanView: {
1554
- shouldShowScanAreaGuides: jsonDefaults.SparkScanView.shouldShowScanAreaGuides,
1555
1526
  brush: new Brush(Color.fromJSON(jsonDefaults.SparkScanView.brush.fillColor), Color.fromJSON(jsonDefaults.SparkScanView.brush.strokeColor), jsonDefaults.SparkScanView.brush.strokeWidth),
1556
- torchButtonVisible: jsonDefaults.SparkScanView.torchButtonVisible,
1527
+ torchControlVisible: jsonDefaults.SparkScanView.torchControlVisible,
1557
1528
  scanningBehaviorButtonVisible: jsonDefaults.SparkScanView.scanningBehaviorButtonVisible,
1558
- handModeButtonVisible: jsonDefaults.SparkScanView.handModeButtonVisible,
1559
1529
  barcodeCountButtonVisible: jsonDefaults.SparkScanView.barcodeCountButtonVisible,
1560
1530
  barcodeFindButtonVisible: jsonDefaults.SparkScanView.barcodeFindButtonVisible,
1561
1531
  targetModeButtonVisible: jsonDefaults.SparkScanView.targetModeButtonVisible,
1562
- soundModeButtonVisible: false, // Deprecated, will be removed in the next version
1563
- hapticModeButtonVisible: false, // Deprecated, will be removed in the next version
1564
1532
  previewSizeControlVisible: jsonDefaults.SparkScanView.previewSizeControlVisible,
1565
- stopCapturingText: jsonDefaults.SparkScanView.stopCapturingText || null,
1566
- startCapturingText: jsonDefaults.SparkScanView.stopCapturingText || null,
1567
- resumeCapturingText: jsonDefaults.SparkScanView.resumeCapturingText || null,
1568
- scanningCapturingText: jsonDefaults.SparkScanView.scanningCapturingText || null,
1569
- targetModeHintText: jsonDefaults.SparkScanView.scanningCapturingText || null,
1570
- shouldShowTargetModeHint: jsonDefaults.SparkScanView.shouldShowTargetModeHint,
1571
- captureButtonBackgroundColor: jsonDefaults.SparkScanView.captureButtonBackgroundColor ? Color
1572
- .fromJSON(jsonDefaults.SparkScanView.captureButtonBackgroundColor) : null,
1573
- captureButtonActiveBackgroundColor: jsonDefaults.SparkScanView.captureButtonActiveBackgroundColor ? Color
1574
- .fromJSON(jsonDefaults.SparkScanView.captureButtonActiveBackgroundColor) : null,
1575
- captureButtonTintColor: jsonDefaults.SparkScanView.captureButtonTintColor ? Color
1576
- .fromJSON(jsonDefaults.SparkScanView.captureButtonTintColor) : null,
1533
+ triggerButtonAnimationColor: jsonDefaults.SparkScanView.triggerButtonAnimationColor || null,
1534
+ triggerButtonExpandedColor: jsonDefaults.SparkScanView.triggerButtonExpandedColor || null,
1535
+ triggerButtonCollapsedColor: jsonDefaults.SparkScanView.triggerButtonCollapsedColor || null,
1536
+ triggerButtonTintColor: jsonDefaults.SparkScanView.triggerButtonTintColor || null,
1537
+ triggerButtonVisible: jsonDefaults.SparkScanView.triggerButtonVisible || null,
1538
+ triggerButtonImage: jsonDefaults.SparkScanView.triggerButtonImage || null,
1577
1539
  toolbarBackgroundColor: jsonDefaults.SparkScanView.toolbarBackgroundColor ? Color
1578
1540
  .fromJSON(jsonDefaults.SparkScanView.toolbarBackgroundColor) : null,
1579
1541
  toolbarIconActiveTintColor: jsonDefaults.SparkScanView.toolbarIconActiveTintColor ? Color
@@ -1583,14 +1545,12 @@ function parseSparkScanDefaults(jsonDefaults) {
1583
1545
  cameraSwitchButtonVisible: jsonDefaults.SparkScanView.cameraSwitchButtonVisible,
1584
1546
  SparkScanViewSettings: {
1585
1547
  triggerButtonCollapseTimeout: sparkScanViewSettingsDefaults.triggerButtonCollapseTimeout,
1586
- continuousCaptureTimeout: sparkScanViewSettingsDefaults.continuousCaptureTimeout,
1587
1548
  defaultScanningMode: (fromJSON) => {
1588
1549
  return fromJSON(JSON.parse(sparkScanViewSettingsDefaults.defaultScanningMode));
1589
1550
  },
1590
1551
  defaultTorchState: sparkScanViewSettingsDefaults.defaultTorchState,
1591
1552
  soundEnabled: sparkScanViewSettingsDefaults.soundEnabled,
1592
1553
  hapticEnabled: sparkScanViewSettingsDefaults.hapticEnabled,
1593
- defaultHandMode: sparkScanViewSettingsDefaults.defaultHandMode,
1594
1554
  holdToScanEnabled: sparkScanViewSettingsDefaults.holdToScanEnabled,
1595
1555
  hardwareTriggerEnabled: sparkScanViewSettingsDefaults.hardwareTriggerEnabled,
1596
1556
  hardwareTriggerKeyCode: sparkScanViewSettingsDefaults.hardwareTriggerKeyCode,
@@ -1605,7 +1565,6 @@ function parseSparkScanDefaults(jsonDefaults) {
1605
1565
  targetModeDisabledMessage: toastSettingsDefaults.targetModeDisabledMessage,
1606
1566
  continuousModeEnabledMessage: toastSettingsDefaults.continuousModeEnabledMessage,
1607
1567
  continuousModeDisabledMessage: toastSettingsDefaults.continuousModeDisabledMessage,
1608
- cameraTimeoutMessage: toastSettingsDefaults.cameraTimeoutMessage,
1609
1568
  worldFacingCameraEnabledMessage: toastSettingsDefaults.worldFacingCameraEnabledMessage,
1610
1569
  userFacingCameraEnabledMessage: toastSettingsDefaults.userFacingCameraEnabledMessage,
1611
1570
  scanPausedMessage: toastSettingsDefaults.scanPausedMessage,
@@ -1620,6 +1579,7 @@ function parseSparkScanDefaults(jsonDefaults) {
1620
1579
  zoomFactorIn: sparkScanViewSettingsDefaults.zoomFactorIn,
1621
1580
  inactiveStateTimeout: sparkScanViewSettingsDefaults.inactiveStateTimeout,
1622
1581
  defaultCameraPosition: sparkScanViewSettingsDefaults.defaultCameraPosition,
1582
+ defaultMiniPreviewSize: sparkScanViewSettingsDefaults.defaultMiniPreviewSize,
1623
1583
  }
1624
1584
  },
1625
1585
  };
@@ -1646,9 +1606,9 @@ function loadBarcodeSelectionDefaults(jsonDefaults) {
1646
1606
  const defaults = parseBarcodeSelectionDefaults(jsonDefaults);
1647
1607
  FactoryMaker.bindInstanceIfNotExists('BarcodeSelectionDefaults', defaults);
1648
1608
  }
1649
- function loadBarcodeTrackingDefaults(jsonDefaults) {
1650
- const defaults = parseBarcodeTrackingDefaults(jsonDefaults);
1651
- FactoryMaker.bindInstanceIfNotExists('BarcodeTrackingDefaults', defaults);
1609
+ function loadBarcodeBatchDefaults(jsonDefaults) {
1610
+ const defaults = parseBarcodeBatchDefaults(jsonDefaults);
1611
+ FactoryMaker.bindInstanceIfNotExists('BarcodeBatchDefaults', defaults);
1652
1612
  }
1653
1613
  function loadSparkScanDefaults(jsonDefaults) {
1654
1614
  const defaults = parseSparkScanDefaults(jsonDefaults);
@@ -1660,14 +1620,6 @@ function loadBarcodeFindDefaults(jsonDefaults) {
1660
1620
  }
1661
1621
 
1662
1622
  class BarcodeCaptureSession {
1663
- /**
1664
- * @deprecated Prefer use of the property `newlyRecognizedBarcode` instead.
1665
- */
1666
- get newlyRecognizedBarcodes() {
1667
- // tslint:disable-next-line:no-console
1668
- console.warn('The newlyRecognizedBarcodes has been deprecated. Prefer use of the property `newlyRecognizedBarcode` instead.');
1669
- return this._newlyRecognizedBarcodes;
1670
- }
1671
1623
  get newlyRecognizedBarcode() {
1672
1624
  return this._newlyRecognizedBarcode;
1673
1625
  }
@@ -1678,15 +1630,16 @@ class BarcodeCaptureSession {
1678
1630
  return this._frameSequenceID;
1679
1631
  }
1680
1632
  static fromJSON(json) {
1633
+ var _a;
1634
+ const sessionJson = JSON.parse(json.session);
1681
1635
  const session = new BarcodeCaptureSession();
1682
- session._newlyRecognizedBarcode = json.newlyRecognizedBarcode != null ?
1683
- Barcode.fromJSON(json.newlyRecognizedBarcode) :
1636
+ session._newlyRecognizedBarcode = sessionJson.newlyRecognizedBarcode != null ?
1637
+ Barcode.fromJSON(sessionJson.newlyRecognizedBarcode) :
1684
1638
  null;
1685
- session._newlyRecognizedBarcodes = json.newlyRecognizedBarcodes
1686
- .map(Barcode.fromJSON);
1687
- session._newlyLocalizedBarcodes = json.newlyLocalizedBarcodes
1639
+ session._newlyLocalizedBarcodes = sessionJson.newlyLocalizedBarcodes
1688
1640
  .map(LocalizedOnlyBarcode.fromJSON);
1689
- session._frameSequenceID = json.frameSequenceId;
1641
+ session._frameSequenceID = sessionJson.frameSequenceId;
1642
+ session.frameId = (_a = json.frameId) !== null && _a !== void 0 ? _a : '';
1690
1643
  return session;
1691
1644
  }
1692
1645
  reset() {
@@ -1736,18 +1689,18 @@ class BarcodeCaptureListenerController {
1736
1689
  this.eventEmitter.on(BarcodeCaptureListenerEvents.inCallback, (value) => {
1737
1690
  this.barcodeCapture.isInListenerCallback = value;
1738
1691
  });
1739
- this.eventEmitter.on(BarcodeCaptureListenerEvents.didUpdateSession, (body) => {
1692
+ this.eventEmitter.on(BarcodeCaptureListenerEvents.didUpdateSession, (body) => __awaiter(this, void 0, void 0, function* () {
1740
1693
  const payload = JSON.parse(body);
1741
- const session = BarcodeCaptureSession.fromJSON(JSON.parse(payload.session));
1742
- this.notifyListenersOfDidUpdateSession(session);
1694
+ const session = BarcodeCaptureSession.fromJSON(payload);
1695
+ yield this.notifyListenersOfDidUpdateSession(session);
1743
1696
  this._proxy.finishDidUpdateSessionCallback(this.barcodeCapture.isEnabled);
1744
- });
1745
- this.eventEmitter.on(BarcodeCaptureListenerEvents.didScan, (body) => {
1697
+ }));
1698
+ this.eventEmitter.on(BarcodeCaptureListenerEvents.didScan, (body) => __awaiter(this, void 0, void 0, function* () {
1746
1699
  const payload = JSON.parse(body);
1747
- const session = BarcodeCaptureSession.fromJSON(JSON.parse(payload.session));
1748
- this.notifyListenersOfDidScan(session);
1700
+ const session = BarcodeCaptureSession.fromJSON(payload);
1701
+ yield this.notifyListenersOfDidScan(session);
1749
1702
  this._proxy.finishDidScanCallback(this.barcodeCapture.isEnabled);
1750
- });
1703
+ }));
1751
1704
  }
1752
1705
  unsubscribeListener() {
1753
1706
  this._proxy.unregisterListenerForEvents();
@@ -1756,24 +1709,28 @@ class BarcodeCaptureListenerController {
1756
1709
  this.eventEmitter.removeAllListeners(BarcodeCaptureListenerEvents.didScan);
1757
1710
  }
1758
1711
  notifyListenersOfDidUpdateSession(session) {
1759
- const mode = this.barcodeCapture;
1760
- mode.isInListenerCallback = true;
1761
- mode.listeners.forEach(listener => {
1762
- if (listener.didUpdateSession) {
1763
- listener.didUpdateSession(this.barcodeCapture, session, CameraController.getLastFrame);
1712
+ return __awaiter(this, void 0, void 0, function* () {
1713
+ const mode = this.barcodeCapture;
1714
+ mode.isInListenerCallback = true;
1715
+ for (const listener of mode.listeners) {
1716
+ if (listener.didUpdateSession) {
1717
+ listener.didUpdateSession(this.barcodeCapture, session, () => CameraController.getFrame(session.frameId));
1718
+ }
1764
1719
  }
1720
+ mode.isInListenerCallback = false;
1765
1721
  });
1766
- mode.isInListenerCallback = false;
1767
1722
  }
1768
1723
  notifyListenersOfDidScan(session) {
1769
- const mode = this.barcodeCapture;
1770
- mode.isInListenerCallback = true;
1771
- mode.listeners.forEach(listener => {
1772
- if (listener.didScan) {
1773
- listener.didScan(this.barcodeCapture, session, CameraController.getLastFrame);
1724
+ return __awaiter(this, void 0, void 0, function* () {
1725
+ const mode = this.barcodeCapture;
1726
+ mode.isInListenerCallback = true;
1727
+ for (const listener of mode.listeners) {
1728
+ if (listener.didScan) {
1729
+ listener.didScan(this.barcodeCapture, session, () => CameraController.getFrame(session.frameId));
1730
+ }
1774
1731
  }
1732
+ mode.isInListenerCallback = false;
1775
1733
  });
1776
- mode.isInListenerCallback = false;
1777
1734
  }
1778
1735
  }
1779
1736
 
@@ -1883,12 +1840,6 @@ class BarcodeCaptureOverlay extends DefaultSerializeable {
1883
1840
  static get barcodeCaptureDefaults() {
1884
1841
  return getBarcodeCaptureDefaults();
1885
1842
  }
1886
- static get defaultBrush() {
1887
- // tslint:disable-next-line:no-console
1888
- console.warn('defaultBrush is deprecated and will be removed in a future release. ' +
1889
- 'Use .brush to get the default for your selected style');
1890
- return new Brush(BarcodeCaptureOverlay.barcodeCaptureDefaults.BarcodeCaptureOverlay.styles[BarcodeCaptureOverlay.barcodeCaptureDefaults.BarcodeCaptureOverlay.defaultStyle].DefaultBrush.fillColor, BarcodeCaptureOverlay.barcodeCaptureDefaults.BarcodeCaptureOverlay.styles[BarcodeCaptureOverlay.barcodeCaptureDefaults.BarcodeCaptureOverlay.defaultStyle].DefaultBrush.strokeColor, BarcodeCaptureOverlay.barcodeCaptureDefaults.BarcodeCaptureOverlay.styles[BarcodeCaptureOverlay.barcodeCaptureDefaults.BarcodeCaptureOverlay.defaultStyle].DefaultBrush.strokeWidth);
1891
- }
1892
1843
  get brush() {
1893
1844
  return this._brush;
1894
1845
  }
@@ -1979,10 +1930,6 @@ __decorate([
1979
1930
  var BarcodeCaptureOverlayStyle;
1980
1931
  (function (BarcodeCaptureOverlayStyle) {
1981
1932
  BarcodeCaptureOverlayStyle["Frame"] = "frame";
1982
- /**
1983
- * @deprecated The legacy is deprecated.
1984
- */
1985
- BarcodeCaptureOverlayStyle["Legacy"] = "legacy";
1986
1933
  })(BarcodeCaptureOverlayStyle || (BarcodeCaptureOverlayStyle = {}));
1987
1934
 
1988
1935
  class BarcodeCaptureSettings extends DefaultSerializeable {
@@ -2068,6 +2015,40 @@ __decorate([
2068
2015
  ignoreFromSerialization
2069
2016
  ], BarcodeCaptureSettings, "barcodeCaptureDefaults", null);
2070
2017
 
2018
+ class BarcodeSelectionFeedback extends DefaultSerializeable {
2019
+ constructor() {
2020
+ super(...arguments);
2021
+ this.controller = null;
2022
+ this._selection = BarcodeSelectionFeedback.barcodeSelectionDefaults.Feedback.selection;
2023
+ }
2024
+ get selection() {
2025
+ return this._selection;
2026
+ }
2027
+ set selection(selection) {
2028
+ this._selection = selection;
2029
+ this.updateFeedback();
2030
+ }
2031
+ static get barcodeSelectionDefaults() {
2032
+ return getBarcodeSelectionDefaults();
2033
+ }
2034
+ static get default() {
2035
+ return new BarcodeSelectionFeedback();
2036
+ }
2037
+ updateFeedback() {
2038
+ var _a;
2039
+ (_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateFeedback(JSON.stringify(this.toJSON()));
2040
+ }
2041
+ }
2042
+ __decorate([
2043
+ ignoreFromSerialization
2044
+ ], BarcodeSelectionFeedback.prototype, "controller", void 0);
2045
+ __decorate([
2046
+ nameForSerialization('selection')
2047
+ ], BarcodeSelectionFeedback.prototype, "_selection", void 0);
2048
+ __decorate([
2049
+ ignoreFromSerialization
2050
+ ], BarcodeSelectionFeedback, "barcodeSelectionDefaults", null);
2051
+
2071
2052
  class BarcodeSelectionSession {
2072
2053
  get selectedBarcodes() {
2073
2054
  return this._selectedBarcodes;
@@ -2082,14 +2063,17 @@ class BarcodeSelectionSession {
2082
2063
  return this._frameSequenceID;
2083
2064
  }
2084
2065
  static fromJSON(json) {
2066
+ var _a;
2067
+ const sessionJson = JSON.parse(json.session);
2085
2068
  const session = new BarcodeSelectionSession();
2086
- session._selectedBarcodes = json.selectedBarcodes
2069
+ session._selectedBarcodes = sessionJson.selectedBarcodes
2087
2070
  .map(Barcode.fromJSON);
2088
- session._newlySelectedBarcodes = json.newlySelectedBarcodes
2071
+ session._newlySelectedBarcodes = sessionJson.newlySelectedBarcodes
2089
2072
  .map(Barcode.fromJSON);
2090
- session._newlyUnselectedBarcodes = json.newlyUnselectedBarcodes
2073
+ session._newlyUnselectedBarcodes = sessionJson.newlyUnselectedBarcodes
2091
2074
  .map(Barcode.fromJSON);
2092
- session._frameSequenceID = json.frameSequenceId;
2075
+ session._frameSequenceID = sessionJson.frameSequenceId;
2076
+ session.frameId = (_a = json.frameId) !== null && _a !== void 0 ? _a : '';
2093
2077
  return session;
2094
2078
  }
2095
2079
  getCount(barcode) {
@@ -2130,20 +2114,20 @@ class BarcodeSelectionListenerController {
2130
2114
  this._proxy.registerListenerForEvents();
2131
2115
  (_b = (_a = this._proxy).subscribeDidUpdateSelectionListener) === null || _b === void 0 ? void 0 : _b.call(_a);
2132
2116
  (_d = (_c = this._proxy).subscribeDidUpdateSession) === null || _d === void 0 ? void 0 : _d.call(_c);
2133
- this.eventEmitter.on(BarcodeSelectionListenerEvents.didUpdateSelection, (body) => {
2117
+ this.eventEmitter.on(BarcodeSelectionListenerEvents.didUpdateSelection, (body) => __awaiter(this, void 0, void 0, function* () {
2134
2118
  const payload = JSON.parse(body);
2135
- const session = BarcodeSelectionSession.fromJSON(JSON.parse(payload.session));
2119
+ const session = BarcodeSelectionSession.fromJSON(payload);
2136
2120
  session.listenerController = this;
2137
- this.notifyListenersOfDidUpdateSelection(session);
2121
+ yield this.notifyListenersOfDidUpdateSelection(session);
2138
2122
  this._proxy.finishDidUpdateSelectionCallback(this.barcodeSelection.isEnabled);
2139
- });
2140
- this.eventEmitter.on(BarcodeSelectionListenerEvents.didUpdateSession, (body) => {
2123
+ }));
2124
+ this.eventEmitter.on(BarcodeSelectionListenerEvents.didUpdateSession, (body) => __awaiter(this, void 0, void 0, function* () {
2141
2125
  const payload = JSON.parse(body);
2142
- const session = BarcodeSelectionSession.fromJSON(JSON.parse(payload.session));
2126
+ const session = BarcodeSelectionSession.fromJSON(payload);
2143
2127
  session.listenerController = this;
2144
- this.notifyListenersOfDidUpdateSession(session);
2128
+ yield this.notifyListenersOfDidUpdateSession(session);
2145
2129
  this._proxy.finishDidUpdateSessionCallback(this.barcodeSelection.isEnabled);
2146
- });
2130
+ }));
2147
2131
  }
2148
2132
  unsubscribeListener() {
2149
2133
  this._proxy.unregisterListenerForEvents();
@@ -2151,24 +2135,28 @@ class BarcodeSelectionListenerController {
2151
2135
  this.eventEmitter.removeAllListeners(BarcodeSelectionListenerEvents.didUpdateSession);
2152
2136
  }
2153
2137
  notifyListenersOfDidUpdateSelection(session) {
2154
- const mode = this.barcodeSelection;
2155
- mode.isInListenerCallback = true;
2156
- mode.listeners.forEach(listener => {
2157
- if (listener.didUpdateSelection) {
2158
- listener.didUpdateSelection(this.barcodeSelection, session, CameraController.getLastFrame);
2138
+ return __awaiter(this, void 0, void 0, function* () {
2139
+ const mode = this.barcodeSelection;
2140
+ mode.isInListenerCallback = true;
2141
+ for (const listener of mode.listeners) {
2142
+ if (listener.didUpdateSelection) {
2143
+ yield listener.didUpdateSelection(this.barcodeSelection, session, () => CameraController.getFrameOrNull(session.frameId));
2144
+ }
2159
2145
  }
2146
+ mode.isInListenerCallback = false;
2160
2147
  });
2161
- mode.isInListenerCallback = false;
2162
2148
  }
2163
2149
  notifyListenersOfDidUpdateSession(session) {
2164
- const mode = this.barcodeSelection;
2165
- mode.isInListenerCallback = true;
2166
- mode.listeners.forEach(listener => {
2167
- if (listener.didUpdateSession) {
2168
- listener.didUpdateSession(this.barcodeSelection, session, CameraController.getLastFrame);
2150
+ return __awaiter(this, void 0, void 0, function* () {
2151
+ const mode = this.barcodeSelection;
2152
+ mode.isInListenerCallback = true;
2153
+ for (const listener of mode.listeners) {
2154
+ if (listener.didUpdateSession) {
2155
+ yield listener.didUpdateSession(this.barcodeSelection, session, () => CameraController.getFrameOrNull(session.frameId));
2156
+ }
2169
2157
  }
2158
+ mode.isInListenerCallback = false;
2170
2159
  });
2171
- mode.isInListenerCallback = false;
2172
2160
  }
2173
2161
  }
2174
2162
 
@@ -2206,6 +2194,9 @@ class BarcodeSelectionController {
2206
2194
  applyBarcodeSelectionModeSettings(newSettings) {
2207
2195
  return this._proxy.applyBarcodeSelectionModeSettings(JSON.stringify(newSettings.toJSON()));
2208
2196
  }
2197
+ updateFeedback(feedbackJson) {
2198
+ this._proxy.updateFeedback(feedbackJson);
2199
+ }
2209
2200
  convertBarcodesToJson(barcodes) {
2210
2201
  return barcodes.flat().map((barcode) => ({
2211
2202
  data: barcode.data,
@@ -2232,7 +2223,8 @@ class BarcodeSelection extends DefaultSerializeable {
2232
2223
  }
2233
2224
  set feedback(feedback) {
2234
2225
  this._feedback = feedback;
2235
- this.modeController.updateBarcodeSelectionMode(this);
2226
+ this.feedback.controller = this.modeController;
2227
+ this.modeController.updateFeedback(JSON.stringify(this.feedback.toJSON()));
2236
2228
  }
2237
2229
  get pointOfInterest() {
2238
2230
  return this._pointOfInterest;
@@ -2271,12 +2263,14 @@ class BarcodeSelection extends DefaultSerializeable {
2271
2263
  super();
2272
2264
  this.type = 'barcodeSelection';
2273
2265
  this._isEnabled = true;
2266
+ this._feedback = new BarcodeSelectionFeedback();
2274
2267
  this._pointOfInterest = null;
2275
2268
  this.privateContext = null;
2276
2269
  this.listeners = [];
2277
- this.modeController = new BarcodeSelectionController();
2278
2270
  this.isInListenerCallback = false;
2279
2271
  this.listenerController = BarcodeSelectionListenerController.forBarcodeSelection(this);
2272
+ this.modeController = new BarcodeSelectionController();
2273
+ this._feedback.controller = this.modeController;
2280
2274
  }
2281
2275
  applySettings(settings) {
2282
2276
  this.settings = settings;
@@ -2374,22 +2368,6 @@ var BarcodeSelectionTypeName;
2374
2368
  BarcodeSelectionTypeName["Tap"] = "tapSelection";
2375
2369
  })(BarcodeSelectionTypeName || (BarcodeSelectionTypeName = {}));
2376
2370
 
2377
- class BarcodeSelectionFeedback extends DefaultSerializeable {
2378
- constructor() {
2379
- super(...arguments);
2380
- this.selection = BarcodeSelectionFeedback.barcodeSelectionDefaults.Feedback.selection;
2381
- }
2382
- static get barcodeSelectionDefaults() {
2383
- return getBarcodeSelectionDefaults();
2384
- }
2385
- static get default() {
2386
- return new BarcodeSelectionFeedback();
2387
- }
2388
- }
2389
- __decorate([
2390
- ignoreFromSerialization
2391
- ], BarcodeSelectionFeedback, "barcodeSelectionDefaults", null);
2392
-
2393
2371
  var BarcodeSelectionBrushProviderEvents;
2394
2372
  (function (BarcodeSelectionBrushProviderEvents) {
2395
2373
  BarcodeSelectionBrushProviderEvents["inCallback"] = "BarcodeSelectionAimedBrushProvider.inCallback";
@@ -2738,26 +2716,22 @@ __decorate([
2738
2716
  ignoreFromSerialization
2739
2717
  ], BarcodeSelectionSettings, "barcodeDefaults", null);
2740
2718
 
2741
- var BarcodeTrackingBasicOverlayStyle;
2742
- (function (BarcodeTrackingBasicOverlayStyle) {
2743
- BarcodeTrackingBasicOverlayStyle["Frame"] = "frame";
2744
- BarcodeTrackingBasicOverlayStyle["Dot"] = "dot";
2745
- /**
2746
- * @deprecated The legacy style of the BarcodeTrackingBasicOverlay is deprecated.
2747
- */
2748
- BarcodeTrackingBasicOverlayStyle["Legacy"] = "legacy";
2749
- })(BarcodeTrackingBasicOverlayStyle || (BarcodeTrackingBasicOverlayStyle = {}));
2719
+ var BarcodeBatchBasicOverlayStyle;
2720
+ (function (BarcodeBatchBasicOverlayStyle) {
2721
+ BarcodeBatchBasicOverlayStyle["Frame"] = "frame";
2722
+ BarcodeBatchBasicOverlayStyle["Dot"] = "dot";
2723
+ })(BarcodeBatchBasicOverlayStyle || (BarcodeBatchBasicOverlayStyle = {}));
2750
2724
 
2751
2725
  /**
2752
- * @deprecated Setting a scenario is no longer recommended, use the BarcodeTrackingSettings empty constructor instead.
2726
+ * @deprecated Setting a scenario is no longer recommended, use the BarcodeBatchSettings empty constructor instead.
2753
2727
  */
2754
- var BarcodeTrackingScenario;
2755
- (function (BarcodeTrackingScenario) {
2756
- BarcodeTrackingScenario["A"] = "A";
2757
- BarcodeTrackingScenario["B"] = "B";
2758
- })(BarcodeTrackingScenario || (BarcodeTrackingScenario = {}));
2728
+ var BarcodeBatchScenario;
2729
+ (function (BarcodeBatchScenario) {
2730
+ BarcodeBatchScenario["A"] = "A";
2731
+ BarcodeBatchScenario["B"] = "B";
2732
+ })(BarcodeBatchScenario || (BarcodeBatchScenario = {}));
2759
2733
 
2760
- class BarcodeTrackingSession {
2734
+ class BarcodeBatchSession {
2761
2735
  get addedTrackedBarcodes() {
2762
2736
  return this._addedTrackedBarcodes;
2763
2737
  }
@@ -2774,25 +2748,28 @@ class BarcodeTrackingSession {
2774
2748
  return this._frameSequenceID;
2775
2749
  }
2776
2750
  static fromJSON(json) {
2777
- const session = new BarcodeTrackingSession();
2778
- session._frameSequenceID = json.frameSequenceId;
2779
- session._addedTrackedBarcodes = json.addedTrackedBarcodes
2751
+ var _a;
2752
+ const sessionJson = JSON.parse(json.session);
2753
+ const session = new BarcodeBatchSession();
2754
+ session._frameSequenceID = sessionJson.frameSequenceId;
2755
+ session._addedTrackedBarcodes = sessionJson.addedTrackedBarcodes
2780
2756
  .map((trackedBarcodeJSON) => {
2781
2757
  return TrackedBarcode
2782
- .fromJSON(trackedBarcodeJSON, json.frameSequenceId);
2758
+ .fromJSON(trackedBarcodeJSON, sessionJson.frameSequenceId);
2783
2759
  });
2784
- session._removedTrackedBarcodes = json.removedTrackedBarcodes;
2785
- session._updatedTrackedBarcodes = json.updatedTrackedBarcodes
2760
+ session._removedTrackedBarcodes = sessionJson.removedTrackedBarcodes;
2761
+ session._updatedTrackedBarcodes = sessionJson.updatedTrackedBarcodes
2786
2762
  .map((trackedBarcodeJSON) => {
2787
2763
  return TrackedBarcode
2788
- .fromJSON(trackedBarcodeJSON, json.frameSequenceId);
2764
+ .fromJSON(trackedBarcodeJSON, sessionJson.frameSequenceId);
2789
2765
  });
2790
- session._trackedBarcodes = Object.keys(json.trackedBarcodes)
2766
+ session._trackedBarcodes = Object.keys(sessionJson.trackedBarcodes)
2791
2767
  .reduce((trackedBarcodes, identifier) => {
2792
2768
  trackedBarcodes[identifier] = TrackedBarcode
2793
- .fromJSON(json.trackedBarcodes[identifier], json.frameSequenceId);
2769
+ .fromJSON(sessionJson.trackedBarcodes[identifier], sessionJson.frameSequenceId);
2794
2770
  return trackedBarcodes;
2795
2771
  }, {});
2772
+ session.frameId = (_a = json.frameId) !== null && _a !== void 0 ? _a : '';
2796
2773
  return session;
2797
2774
  }
2798
2775
  reset() {
@@ -2800,19 +2777,19 @@ class BarcodeTrackingSession {
2800
2777
  }
2801
2778
  }
2802
2779
 
2803
- var BarcodeTrackingListenerEvents;
2804
- (function (BarcodeTrackingListenerEvents) {
2805
- BarcodeTrackingListenerEvents["inCallback"] = "BarcodeTrackingListener.inCallback";
2806
- BarcodeTrackingListenerEvents["didUpdateSession"] = "BarcodeTrackingListener.didUpdateSession";
2807
- })(BarcodeTrackingListenerEvents || (BarcodeTrackingListenerEvents = {}));
2808
- class BarcodeTrackingListenerController {
2780
+ var BarcodeBatchListenerEvents;
2781
+ (function (BarcodeBatchListenerEvents) {
2782
+ BarcodeBatchListenerEvents["inCallback"] = "BarcodeBatchListener.inCallback";
2783
+ BarcodeBatchListenerEvents["didUpdateSession"] = "BarcodeBatchListener.didUpdateSession";
2784
+ })(BarcodeBatchListenerEvents || (BarcodeBatchListenerEvents = {}));
2785
+ class BarcodeBatchListenerController {
2809
2786
  get _proxy() {
2810
- return FactoryMaker.getInstance("BarcodeTrackingListenerProxy");
2787
+ return FactoryMaker.getInstance("BarcodeBatchListenerProxy");
2811
2788
  }
2812
- static forBarcodeTracking(barcodeTracking) {
2813
- const controller = new BarcodeTrackingListenerController();
2814
- controller.barcodeTracking = barcodeTracking;
2815
- controller._proxy.isModeEnabled = () => barcodeTracking.isEnabled;
2789
+ static forBarcodeBatch(barcodeBatch) {
2790
+ const controller = new BarcodeBatchListenerController();
2791
+ controller.barcodeBatch = barcodeBatch;
2792
+ controller._proxy.isModeEnabled = () => barcodeBatch.isEnabled;
2816
2793
  return controller;
2817
2794
  }
2818
2795
  constructor() {
@@ -2825,43 +2802,45 @@ class BarcodeTrackingListenerController {
2825
2802
  var _a, _b;
2826
2803
  this._proxy.registerListenerForEvents();
2827
2804
  (_b = (_a = this._proxy).subscribeDidUpdateSession) === null || _b === void 0 ? void 0 : _b.call(_a);
2828
- this.eventEmitter.on(BarcodeTrackingListenerEvents.inCallback, (value) => {
2829
- this.barcodeTracking.isInListenerCallback = value;
2805
+ this.eventEmitter.on(BarcodeBatchListenerEvents.inCallback, (value) => {
2806
+ this.barcodeBatch.isInListenerCallback = value;
2830
2807
  });
2831
- this.eventEmitter.on(BarcodeTrackingListenerEvents.didUpdateSession, (body) => {
2808
+ this.eventEmitter.on(BarcodeBatchListenerEvents.didUpdateSession, (body) => __awaiter(this, void 0, void 0, function* () {
2832
2809
  const payload = JSON.parse(body);
2833
- const session = BarcodeTrackingSession.fromJSON(JSON.parse(payload.session));
2834
- this.notifyListenersOfDidUpdateSession(session);
2835
- this._proxy.finishDidUpdateSessionCallback(this.barcodeTracking.isEnabled);
2836
- });
2810
+ const session = BarcodeBatchSession.fromJSON(payload);
2811
+ yield this.notifyListenersOfDidUpdateSession(session);
2812
+ this._proxy.finishDidUpdateSessionCallback(this.barcodeBatch.isEnabled);
2813
+ }));
2837
2814
  }
2838
2815
  unsubscribeListener() {
2839
2816
  this._proxy.unregisterListenerForEvents();
2840
- this.eventEmitter.removeAllListeners(BarcodeTrackingListenerEvents.inCallback);
2841
- this.eventEmitter.removeAllListeners(BarcodeTrackingListenerEvents.didUpdateSession);
2817
+ this.eventEmitter.removeAllListeners(BarcodeBatchListenerEvents.inCallback);
2818
+ this.eventEmitter.removeAllListeners(BarcodeBatchListenerEvents.didUpdateSession);
2842
2819
  }
2843
2820
  setModeEnabledState(enabled) {
2844
2821
  this._proxy.setModeEnabledState(enabled);
2845
2822
  }
2846
- updateBarcodeTrackingMode() {
2847
- return this._proxy.updateBarcodeTrackingMode(JSON.stringify(this.barcodeTracking.toJSON()));
2823
+ updateBarcodeBatchMode() {
2824
+ return this._proxy.updateBarcodeBatchMode(JSON.stringify(this.barcodeBatch.toJSON()));
2848
2825
  }
2849
- applyBarcodeTrackingModeSettings(newSettings) {
2850
- return this._proxy.applyBarcodeTrackingModeSettings(JSON.stringify(newSettings.toJSON()));
2826
+ applyBarcodeBatchModeSettings(newSettings) {
2827
+ return this._proxy.applyBarcodeBatchModeSettings(JSON.stringify(newSettings.toJSON()));
2851
2828
  }
2852
2829
  notifyListenersOfDidUpdateSession(session) {
2853
- const mode = this.barcodeTracking;
2854
- mode.isInListenerCallback = true;
2855
- mode.listeners.forEach(listener => {
2856
- if (listener.didUpdateSession) {
2857
- listener.didUpdateSession(this.barcodeTracking, session, CameraController.getLastFrame);
2830
+ return __awaiter(this, void 0, void 0, function* () {
2831
+ const mode = this.barcodeBatch;
2832
+ mode.isInListenerCallback = true;
2833
+ for (const listener of mode.listeners) {
2834
+ if (listener.didUpdateSession) {
2835
+ yield listener.didUpdateSession(this.barcodeBatch, session, () => CameraController.getFrame(session.frameId));
2836
+ }
2858
2837
  }
2838
+ mode.isInListenerCallback = false;
2859
2839
  });
2860
- mode.isInListenerCallback = false;
2861
2840
  }
2862
2841
  }
2863
2842
 
2864
- class BarcodeTracking extends DefaultSerializeable {
2843
+ class BarcodeBatch extends DefaultSerializeable {
2865
2844
  get isEnabled() {
2866
2845
  return this._isEnabled;
2867
2846
  }
@@ -2873,7 +2852,7 @@ class BarcodeTracking extends DefaultSerializeable {
2873
2852
  return this._context;
2874
2853
  }
2875
2854
  static get recommendedCameraSettings() {
2876
- return BarcodeTracking.barcodeTrackingDefaults.RecommendedCameraSettings;
2855
+ return BarcodeBatch.barcodeBatchDefaults.RecommendedCameraSettings;
2877
2856
  }
2878
2857
  get _context() {
2879
2858
  return this.privateContext;
@@ -2887,16 +2866,16 @@ class BarcodeTracking extends DefaultSerializeable {
2887
2866
  }
2888
2867
  this.privateContext = newContext;
2889
2868
  }
2890
- static get barcodeTrackingDefaults() {
2891
- return getBarcodeTrackingDefaults();
2869
+ static get barcodeBatchDefaults() {
2870
+ return getBarcodeBatchDefaults();
2892
2871
  }
2893
2872
  static forContext(context, settings) {
2894
- const barcodeTracking = new BarcodeTracking();
2895
- barcodeTracking.settings = settings;
2873
+ const barcodeBatch = new BarcodeBatch();
2874
+ barcodeBatch.settings = settings;
2896
2875
  if (context) {
2897
- context.addMode(barcodeTracking);
2876
+ context.addMode(barcodeBatch);
2898
2877
  }
2899
- return barcodeTracking;
2878
+ return barcodeBatch;
2900
2879
  }
2901
2880
  constructor() {
2902
2881
  super();
@@ -2905,11 +2884,11 @@ class BarcodeTracking extends DefaultSerializeable {
2905
2884
  this.privateContext = null;
2906
2885
  this.listeners = [];
2907
2886
  this.isInListenerCallback = false;
2908
- this.listenerController = BarcodeTrackingListenerController.forBarcodeTracking(this);
2887
+ this.listenerController = BarcodeBatchListenerController.forBarcodeBatch(this);
2909
2888
  }
2910
2889
  applySettings(settings) {
2911
2890
  this.settings = settings;
2912
- return this.listenerController.applyBarcodeTrackingModeSettings(settings);
2891
+ return this.listenerController.applyBarcodeBatchModeSettings(settings);
2913
2892
  }
2914
2893
  addListener(listener) {
2915
2894
  if (this.listeners.includes(listener)) {
@@ -2930,36 +2909,36 @@ class BarcodeTracking extends DefaultSerializeable {
2930
2909
  }
2931
2910
  __decorate([
2932
2911
  ignoreFromSerialization
2933
- ], BarcodeTracking.prototype, "_isEnabled", void 0);
2912
+ ], BarcodeBatch.prototype, "_isEnabled", void 0);
2934
2913
  __decorate([
2935
2914
  ignoreFromSerialization
2936
- ], BarcodeTracking.prototype, "privateContext", void 0);
2915
+ ], BarcodeBatch.prototype, "privateContext", void 0);
2937
2916
  __decorate([
2938
2917
  ignoreFromSerialization
2939
- ], BarcodeTracking.prototype, "listeners", void 0);
2918
+ ], BarcodeBatch.prototype, "listeners", void 0);
2940
2919
  __decorate([
2941
2920
  ignoreFromSerialization
2942
- ], BarcodeTracking.prototype, "listenerController", void 0);
2921
+ ], BarcodeBatch.prototype, "listenerController", void 0);
2943
2922
  __decorate([
2944
2923
  ignoreFromSerialization
2945
- ], BarcodeTracking.prototype, "isInListenerCallback", void 0);
2924
+ ], BarcodeBatch.prototype, "isInListenerCallback", void 0);
2946
2925
  __decorate([
2947
2926
  ignoreFromSerialization
2948
- ], BarcodeTracking, "barcodeTrackingDefaults", null);
2949
-
2950
- var BarcodeTrackingAdvancedOverlayListenerEvents;
2951
- (function (BarcodeTrackingAdvancedOverlayListenerEvents) {
2952
- BarcodeTrackingAdvancedOverlayListenerEvents["didTapViewForTrackedBarcode"] = "BarcodeTrackingAdvancedOverlayListener.didTapViewForTrackedBarcode";
2953
- BarcodeTrackingAdvancedOverlayListenerEvents["viewForTrackedBarcode"] = "BarcodeTrackingAdvancedOverlayListener.viewForTrackedBarcode";
2954
- BarcodeTrackingAdvancedOverlayListenerEvents["anchorForTrackedBarcode"] = "BarcodeTrackingAdvancedOverlayListener.anchorForTrackedBarcode";
2955
- BarcodeTrackingAdvancedOverlayListenerEvents["offsetForTrackedBarcode"] = "BarcodeTrackingAdvancedOverlayListener.offsetForTrackedBarcode";
2956
- })(BarcodeTrackingAdvancedOverlayListenerEvents || (BarcodeTrackingAdvancedOverlayListenerEvents = {}));
2957
- class BarcodeTrackingAdvancedOverlayController {
2927
+ ], BarcodeBatch, "barcodeBatchDefaults", null);
2928
+
2929
+ var BarcodeBatchAdvancedOverlayListenerEvents;
2930
+ (function (BarcodeBatchAdvancedOverlayListenerEvents) {
2931
+ BarcodeBatchAdvancedOverlayListenerEvents["didTapViewForTrackedBarcode"] = "BarcodeBatchAdvancedOverlayListener.didTapViewForTrackedBarcode";
2932
+ BarcodeBatchAdvancedOverlayListenerEvents["viewForTrackedBarcode"] = "BarcodeBatchAdvancedOverlayListener.viewForTrackedBarcode";
2933
+ BarcodeBatchAdvancedOverlayListenerEvents["anchorForTrackedBarcode"] = "BarcodeBatchAdvancedOverlayListener.anchorForTrackedBarcode";
2934
+ BarcodeBatchAdvancedOverlayListenerEvents["offsetForTrackedBarcode"] = "BarcodeBatchAdvancedOverlayListener.offsetForTrackedBarcode";
2935
+ })(BarcodeBatchAdvancedOverlayListenerEvents || (BarcodeBatchAdvancedOverlayListenerEvents = {}));
2936
+ class BarcodeBatchAdvancedOverlayController {
2958
2937
  get _proxy() {
2959
- return FactoryMaker.getInstance("BarcodeTrackingAdvancedOverlayProxy");
2938
+ return FactoryMaker.getInstance("BarcodeBatchAdvancedOverlayProxy");
2960
2939
  }
2961
2940
  static forOverlay(overlay) {
2962
- const controller = new BarcodeTrackingAdvancedOverlayController();
2941
+ const controller = new BarcodeBatchAdvancedOverlayController();
2963
2942
  controller.overlay = overlay;
2964
2943
  return controller;
2965
2944
  }
@@ -2985,8 +2964,8 @@ class BarcodeTrackingAdvancedOverlayController {
2985
2964
  clearTrackedBarcodeViews() {
2986
2965
  return this._proxy.clearTrackedBarcodeViews();
2987
2966
  }
2988
- updateBarcodeTrackingAdvancedOverlay() {
2989
- return this._proxy.updateBarcodeTrackingAdvancedOverlay(JSON.stringify(this.overlay.toJSON()));
2967
+ updateBarcodeBatchAdvancedOverlay() {
2968
+ return this._proxy.updateBarcodeBatchAdvancedOverlay(JSON.stringify(this.overlay.toJSON()));
2990
2969
  }
2991
2970
  subscribeListener() {
2992
2971
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -2995,7 +2974,7 @@ class BarcodeTrackingAdvancedOverlayController {
2995
2974
  (_d = (_c = this._proxy).subscribeAnchorForTrackedBarcode) === null || _d === void 0 ? void 0 : _d.call(_c);
2996
2975
  (_f = (_e = this._proxy).subscribeOffsetForTrackedBarcode) === null || _f === void 0 ? void 0 : _f.call(_e);
2997
2976
  (_h = (_g = this._proxy).subscribeDidTapViewForTrackedBarcode) === null || _h === void 0 ? void 0 : _h.call(_g);
2998
- this.eventEmitter.on(BarcodeTrackingAdvancedOverlayListenerEvents.viewForTrackedBarcode, (body) => __awaiter(this, void 0, void 0, function* () {
2977
+ this.eventEmitter.on(BarcodeBatchAdvancedOverlayListenerEvents.viewForTrackedBarcode, (body) => __awaiter(this, void 0, void 0, function* () {
2999
2978
  const payload = JSON.parse(body);
3000
2979
  const trackedBarcode = TrackedBarcode
3001
2980
  .fromJSON(JSON.parse(payload.trackedBarcode));
@@ -3004,7 +2983,7 @@ class BarcodeTrackingAdvancedOverlayController {
3004
2983
  this._proxy.setViewForTrackedBarcode(this._proxy.getJSONStringForView(view), trackedBarcode.identifier, trackedBarcode.sessionFrameSequenceID);
3005
2984
  }
3006
2985
  }));
3007
- this.eventEmitter.on(BarcodeTrackingAdvancedOverlayListenerEvents.anchorForTrackedBarcode, (body) => {
2986
+ this.eventEmitter.on(BarcodeBatchAdvancedOverlayListenerEvents.anchorForTrackedBarcode, (body) => {
3008
2987
  const payload = JSON.parse(body);
3009
2988
  const trackedBarcode = TrackedBarcode
3010
2989
  .fromJSON(JSON.parse(payload.trackedBarcode));
@@ -3014,7 +2993,7 @@ class BarcodeTrackingAdvancedOverlayController {
3014
2993
  }
3015
2994
  this.setAnchorForTrackedBarcode(anchor, trackedBarcode);
3016
2995
  });
3017
- this.eventEmitter.on(BarcodeTrackingAdvancedOverlayListenerEvents.offsetForTrackedBarcode, (body) => {
2996
+ this.eventEmitter.on(BarcodeBatchAdvancedOverlayListenerEvents.offsetForTrackedBarcode, (body) => {
3018
2997
  const payload = JSON.parse(body);
3019
2998
  const trackedBarcode = TrackedBarcode
3020
2999
  .fromJSON(JSON.parse(payload.trackedBarcode));
@@ -3024,7 +3003,7 @@ class BarcodeTrackingAdvancedOverlayController {
3024
3003
  }
3025
3004
  this.setOffsetForTrackedBarcode(offset, trackedBarcode);
3026
3005
  });
3027
- this.eventEmitter.on(BarcodeTrackingAdvancedOverlayListenerEvents.didTapViewForTrackedBarcode, (body) => {
3006
+ this.eventEmitter.on(BarcodeBatchAdvancedOverlayListenerEvents.didTapViewForTrackedBarcode, (body) => {
3028
3007
  var _a, _b;
3029
3008
  const payload = JSON.parse(body);
3030
3009
  const trackedBarcode = TrackedBarcode
@@ -3034,23 +3013,23 @@ class BarcodeTrackingAdvancedOverlayController {
3034
3013
  }
3035
3014
  unsubscribeListener() {
3036
3015
  this._proxy.unregisterListenerForAdvancedOverlayEvents();
3037
- this.eventEmitter.removeAllListeners(BarcodeTrackingAdvancedOverlayListenerEvents.anchorForTrackedBarcode);
3038
- this.eventEmitter.removeAllListeners(BarcodeTrackingAdvancedOverlayListenerEvents.offsetForTrackedBarcode);
3039
- this.eventEmitter.removeAllListeners(BarcodeTrackingAdvancedOverlayListenerEvents.viewForTrackedBarcode);
3016
+ this.eventEmitter.removeAllListeners(BarcodeBatchAdvancedOverlayListenerEvents.anchorForTrackedBarcode);
3017
+ this.eventEmitter.removeAllListeners(BarcodeBatchAdvancedOverlayListenerEvents.offsetForTrackedBarcode);
3018
+ this.eventEmitter.removeAllListeners(BarcodeBatchAdvancedOverlayListenerEvents.viewForTrackedBarcode);
3040
3019
  }
3041
3020
  }
3042
3021
 
3043
- var BarcodeTrackingBasicOverlayListenerEvents;
3044
- (function (BarcodeTrackingBasicOverlayListenerEvents) {
3045
- BarcodeTrackingBasicOverlayListenerEvents["brushForTrackedBarcode"] = "BarcodeTrackingBasicOverlayListener.brushForTrackedBarcode";
3046
- BarcodeTrackingBasicOverlayListenerEvents["didTapTrackedBarcode"] = "BarcodeTrackingBasicOverlayListener.didTapTrackedBarcode";
3047
- })(BarcodeTrackingBasicOverlayListenerEvents || (BarcodeTrackingBasicOverlayListenerEvents = {}));
3048
- class BarcodeTrackingBasicOverlayController {
3022
+ var BarcodeBatchBasicOverlayListenerEvents;
3023
+ (function (BarcodeBatchBasicOverlayListenerEvents) {
3024
+ BarcodeBatchBasicOverlayListenerEvents["brushForTrackedBarcode"] = "BarcodeBatchBasicOverlayListener.brushForTrackedBarcode";
3025
+ BarcodeBatchBasicOverlayListenerEvents["didTapTrackedBarcode"] = "BarcodeBatchBasicOverlayListener.didTapTrackedBarcode";
3026
+ })(BarcodeBatchBasicOverlayListenerEvents || (BarcodeBatchBasicOverlayListenerEvents = {}));
3027
+ class BarcodeBatchBasicOverlayController {
3049
3028
  get _proxy() {
3050
- return FactoryMaker.getInstance("BarcodeTrackingBasicOverlayProxy");
3029
+ return FactoryMaker.getInstance("BarcodeBatchBasicOverlayProxy");
3051
3030
  }
3052
3031
  static forOverlay(overlay) {
3053
- const controller = new BarcodeTrackingBasicOverlayController();
3032
+ const controller = new BarcodeBatchBasicOverlayController();
3054
3033
  controller.overlay = overlay;
3055
3034
  return controller;
3056
3035
  }
@@ -3063,15 +3042,15 @@ class BarcodeTrackingBasicOverlayController {
3063
3042
  clearTrackedBarcodeBrushes() {
3064
3043
  return this._proxy.clearTrackedBarcodeBrushes();
3065
3044
  }
3066
- updateBarcodeTrackingBasicOverlay() {
3067
- return this._proxy.updateBarcodeTrackingBasicOverlay(JSON.stringify(this.overlay.toJSON()));
3045
+ updateBarcodeBatchBasicOverlay() {
3046
+ return this._proxy.updateBarcodeBatchBasicOverlay(JSON.stringify(this.overlay.toJSON()));
3068
3047
  }
3069
3048
  subscribeListener() {
3070
3049
  var _a, _b, _c, _d;
3071
3050
  this._proxy.registerListenerForBasicOverlayEvents();
3072
3051
  (_b = (_a = this._proxy).subscribeBrushForTrackedBarcode) === null || _b === void 0 ? void 0 : _b.call(_a);
3073
3052
  (_d = (_c = this._proxy).subscribeDidTapTrackedBarcode) === null || _d === void 0 ? void 0 : _d.call(_c);
3074
- this.eventEmitter.on(BarcodeTrackingBasicOverlayListenerEvents.brushForTrackedBarcode, (body) => {
3053
+ this.eventEmitter.on(BarcodeBatchBasicOverlayListenerEvents.brushForTrackedBarcode, (body) => {
3075
3054
  const payload = JSON.parse(body);
3076
3055
  const trackedBarcode = TrackedBarcode
3077
3056
  .fromJSON(JSON.parse(payload.trackedBarcode));
@@ -3081,7 +3060,7 @@ class BarcodeTrackingBasicOverlayController {
3081
3060
  this.setBrushForTrackedBarcode(brush, trackedBarcode);
3082
3061
  }
3083
3062
  });
3084
- this.eventEmitter.on(BarcodeTrackingBasicOverlayListenerEvents.didTapTrackedBarcode, (body) => {
3063
+ this.eventEmitter.on(BarcodeBatchBasicOverlayListenerEvents.didTapTrackedBarcode, (body) => {
3085
3064
  const payload = JSON.parse(body);
3086
3065
  const trackedBarcode = TrackedBarcode
3087
3066
  .fromJSON(JSON.parse(payload.trackedBarcode));
@@ -3092,12 +3071,12 @@ class BarcodeTrackingBasicOverlayController {
3092
3071
  }
3093
3072
  unsubscribeListener() {
3094
3073
  this._proxy.unregisterListenerForBasicOverlayEvents();
3095
- this.eventEmitter.removeAllListeners(BarcodeTrackingBasicOverlayListenerEvents.brushForTrackedBarcode);
3096
- this.eventEmitter.removeAllListeners(BarcodeTrackingBasicOverlayListenerEvents.didTapTrackedBarcode);
3074
+ this.eventEmitter.removeAllListeners(BarcodeBatchBasicOverlayListenerEvents.brushForTrackedBarcode);
3075
+ this.eventEmitter.removeAllListeners(BarcodeBatchBasicOverlayListenerEvents.didTapTrackedBarcode);
3097
3076
  }
3098
3077
  }
3099
3078
 
3100
- class BarcodeTrackingBasicOverlay extends DefaultSerializeable {
3079
+ class BarcodeBatchBasicOverlay extends DefaultSerializeable {
3101
3080
  set view(newView) {
3102
3081
  if (newView == null) {
3103
3082
  this.controller.unsubscribeListener();
@@ -3110,12 +3089,6 @@ class BarcodeTrackingBasicOverlay extends DefaultSerializeable {
3110
3089
  get view() {
3111
3090
  return this._view;
3112
3091
  }
3113
- static get defaultBrush() {
3114
- // tslint:disable-next-line:no-console
3115
- console.warn('defaultBrush is deprecated and will be removed in a future release. ' +
3116
- 'Use .brush to get the default for your selected style');
3117
- return new Brush(BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.styles[BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.fillColor, BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.styles[BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.strokeColor, BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.styles[BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.defaultStyle].DefaultBrush.strokeWidth);
3118
- }
3119
3092
  get defaultBrush() {
3120
3093
  return this.brush;
3121
3094
  }
@@ -3127,44 +3100,44 @@ class BarcodeTrackingBasicOverlay extends DefaultSerializeable {
3127
3100
  }
3128
3101
  set brush(newBrush) {
3129
3102
  this._brush = newBrush;
3130
- this.controller.updateBarcodeTrackingBasicOverlay();
3103
+ this.controller.updateBarcodeBatchBasicOverlay();
3131
3104
  }
3132
3105
  get shouldShowScanAreaGuides() {
3133
3106
  return this._shouldShowScanAreaGuides;
3134
3107
  }
3135
3108
  set shouldShowScanAreaGuides(shouldShow) {
3136
3109
  this._shouldShowScanAreaGuides = shouldShow;
3137
- this.controller.updateBarcodeTrackingBasicOverlay();
3110
+ this.controller.updateBarcodeBatchBasicOverlay();
3138
3111
  }
3139
3112
  get style() {
3140
3113
  return this._style;
3141
3114
  }
3142
- static withBarcodeTracking(barcodeTracking) {
3143
- return BarcodeTrackingBasicOverlay.withBarcodeTrackingForView(barcodeTracking, null);
3115
+ static withBarcodeBatch(barcodeBatch) {
3116
+ return BarcodeBatchBasicOverlay.withBarcodeBatchForView(barcodeBatch, null);
3144
3117
  }
3145
- static withBarcodeTrackingForView(barcodeTracking, view) {
3146
- return this.withBarcodeTrackingForViewWithStyle(barcodeTracking, view, BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.defaultStyle);
3118
+ static withBarcodeBatchForView(barcodeBatch, view) {
3119
+ return this.withBarcodeBatchForViewWithStyle(barcodeBatch, view, BarcodeBatchBasicOverlay.barcodeBatchDefaults.BarcodeBatchBasicOverlay.defaultStyle);
3147
3120
  }
3148
- static withBarcodeTrackingForViewWithStyle(barcodeTracking, view, style) {
3149
- const overlay = new BarcodeTrackingBasicOverlay();
3150
- overlay.barcodeTracking = barcodeTracking;
3121
+ static withBarcodeBatchForViewWithStyle(barcodeBatch, view, style) {
3122
+ const overlay = new BarcodeBatchBasicOverlay();
3123
+ overlay.barcodeBatch = barcodeBatch;
3151
3124
  overlay._style = style;
3152
- overlay._brush = new Brush(BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.styles[style].DefaultBrush.fillColor, BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.styles[style].DefaultBrush.strokeColor, BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.styles[style].DefaultBrush.strokeWidth);
3125
+ overlay._brush = new Brush(BarcodeBatchBasicOverlay.barcodeBatchDefaults.BarcodeBatchBasicOverlay.styles[style].DefaultBrush.fillColor, BarcodeBatchBasicOverlay.barcodeBatchDefaults.BarcodeBatchBasicOverlay.styles[style].DefaultBrush.strokeColor, BarcodeBatchBasicOverlay.barcodeBatchDefaults.BarcodeBatchBasicOverlay.styles[style].DefaultBrush.strokeWidth);
3153
3126
  if (view) {
3154
3127
  view.addOverlay(overlay);
3155
3128
  }
3156
3129
  return overlay;
3157
3130
  }
3158
- static get barcodeTrackingDefaults() {
3159
- return getBarcodeTrackingDefaults();
3131
+ static get barcodeBatchDefaults() {
3132
+ return getBarcodeBatchDefaults();
3160
3133
  }
3161
3134
  constructor() {
3162
3135
  super();
3163
3136
  this.type = 'barcodeTrackingBasic';
3164
- this._brush = BarcodeTrackingBasicOverlay.barcodeTrackingDefaults.BarcodeTrackingBasicOverlay.DefaultBrush;
3137
+ this._brush = BarcodeBatchBasicOverlay.barcodeBatchDefaults.BarcodeBatchBasicOverlay.DefaultBrush;
3165
3138
  this._shouldShowScanAreaGuides = false;
3166
3139
  this.listener = null;
3167
- this.controller = BarcodeTrackingBasicOverlayController.forOverlay(this);
3140
+ this.controller = BarcodeBatchBasicOverlayController.forOverlay(this);
3168
3141
  }
3169
3142
  setBrushForTrackedBarcode(brush, trackedBarcode) {
3170
3143
  return this.controller.setBrushForTrackedBarcode(brush, trackedBarcode);
@@ -3175,43 +3148,43 @@ class BarcodeTrackingBasicOverlay extends DefaultSerializeable {
3175
3148
  }
3176
3149
  __decorate([
3177
3150
  ignoreFromSerialization
3178
- ], BarcodeTrackingBasicOverlay.prototype, "barcodeTracking", void 0);
3151
+ ], BarcodeBatchBasicOverlay.prototype, "barcodeBatch", void 0);
3179
3152
  __decorate([
3180
3153
  ignoreFromSerialization
3181
- ], BarcodeTrackingBasicOverlay.prototype, "_view", void 0);
3154
+ ], BarcodeBatchBasicOverlay.prototype, "_view", void 0);
3182
3155
  __decorate([
3183
3156
  nameForSerialization('style')
3184
- ], BarcodeTrackingBasicOverlay.prototype, "_style", void 0);
3157
+ ], BarcodeBatchBasicOverlay.prototype, "_style", void 0);
3185
3158
  __decorate([
3186
3159
  ignoreFromSerialization
3187
- ], BarcodeTrackingBasicOverlay.prototype, "defaultBrush", null);
3160
+ ], BarcodeBatchBasicOverlay.prototype, "defaultBrush", null);
3188
3161
  __decorate([
3189
3162
  nameForSerialization('defaultBrush')
3190
- ], BarcodeTrackingBasicOverlay.prototype, "_brush", void 0);
3163
+ ], BarcodeBatchBasicOverlay.prototype, "_brush", void 0);
3191
3164
  __decorate([
3192
3165
  nameForSerialization('shouldShowScanAreaGuides')
3193
- ], BarcodeTrackingBasicOverlay.prototype, "_shouldShowScanAreaGuides", void 0);
3166
+ ], BarcodeBatchBasicOverlay.prototype, "_shouldShowScanAreaGuides", void 0);
3194
3167
  __decorate([
3195
3168
  ignoreFromSerialization
3196
- ], BarcodeTrackingBasicOverlay.prototype, "listener", void 0);
3169
+ ], BarcodeBatchBasicOverlay.prototype, "listener", void 0);
3197
3170
  __decorate([
3198
3171
  ignoreFromSerialization
3199
- ], BarcodeTrackingBasicOverlay.prototype, "controller", void 0);
3172
+ ], BarcodeBatchBasicOverlay.prototype, "controller", void 0);
3200
3173
  __decorate([
3201
3174
  ignoreFromSerialization
3202
- ], BarcodeTrackingBasicOverlay, "barcodeTrackingDefaults", null);
3175
+ ], BarcodeBatchBasicOverlay, "barcodeBatchDefaults", null);
3203
3176
 
3204
- class BarcodeTrackingSettings extends DefaultSerializeable {
3177
+ class BarcodeBatchSettings extends DefaultSerializeable {
3205
3178
  get enabledSymbologies() {
3206
3179
  return Object.keys(this.symbologies)
3207
3180
  .filter(symbology => this.symbologies[symbology].isEnabled);
3208
3181
  }
3209
3182
  /**
3210
- * @deprecated Setting a scenario is no longer recommended, use the BarcodeTrackingSettings empty constructor instead.
3183
+ * @deprecated Setting a scenario is no longer recommended, use the BarcodeBatchSettings empty constructor instead.
3211
3184
  */
3212
3185
  static forScenario(scenario) {
3213
- console.warn('Setting a scenario is no longer recommended, use the BarcodeTrackingSettings empty constructor instead.');
3214
- const settings = new BarcodeTrackingSettings();
3186
+ console.warn('Setting a scenario is no longer recommended, use the BarcodeBatchSettings empty constructor instead.');
3187
+ const settings = new BarcodeBatchSettings();
3215
3188
  settings.scenario = scenario;
3216
3189
  return settings;
3217
3190
  }
@@ -3227,7 +3200,7 @@ class BarcodeTrackingSettings extends DefaultSerializeable {
3227
3200
  }
3228
3201
  settingsForSymbology(symbology) {
3229
3202
  if (!this.symbologies[symbology]) {
3230
- const symbologySettings = BarcodeTrackingSettings.barcodeDefaults.SymbologySettings[symbology];
3203
+ const symbologySettings = BarcodeBatchSettings.barcodeDefaults.SymbologySettings[symbology];
3231
3204
  symbologySettings._symbology = symbology;
3232
3205
  this.symbologies[symbology] = symbologySettings;
3233
3206
  }
@@ -3251,18 +3224,18 @@ class BarcodeTrackingSettings extends DefaultSerializeable {
3251
3224
  }
3252
3225
  __decorate([
3253
3226
  nameForSerialization('arucoDictionary')
3254
- ], BarcodeTrackingSettings.prototype, "_arucoDictionary", void 0);
3227
+ ], BarcodeBatchSettings.prototype, "_arucoDictionary", void 0);
3255
3228
  __decorate([
3256
3229
  ignoreFromSerialization
3257
- ], BarcodeTrackingSettings, "barcodeDefaults", null);
3230
+ ], BarcodeBatchSettings, "barcodeDefaults", null);
3258
3231
 
3259
- class BaseBarcodeTrackingAdvancedOverlay extends DefaultSerializeable {
3232
+ class BaseBarcodeBatchAdvancedOverlay extends DefaultSerializeable {
3260
3233
  get shouldShowScanAreaGuides() {
3261
3234
  return this._shouldShowScanAreaGuides;
3262
3235
  }
3263
3236
  set shouldShowScanAreaGuides(shouldShow) {
3264
3237
  this._shouldShowScanAreaGuides = shouldShow;
3265
- this.controller.updateBarcodeTrackingAdvancedOverlay();
3238
+ this.controller.updateBarcodeBatchAdvancedOverlay();
3266
3239
  }
3267
3240
  set view(newView) {
3268
3241
  if (newView == null) {
@@ -3276,8 +3249,8 @@ class BaseBarcodeTrackingAdvancedOverlay extends DefaultSerializeable {
3276
3249
  get view() {
3277
3250
  return this._view;
3278
3251
  }
3279
- initialize(barcodeTracking, view) {
3280
- this.barcodeTracking = barcodeTracking;
3252
+ initialize(barcodeBatch, view) {
3253
+ this.barcodeBatch = barcodeBatch;
3281
3254
  if (view) {
3282
3255
  view.addOverlay(this);
3283
3256
  }
@@ -3287,7 +3260,7 @@ class BaseBarcodeTrackingAdvancedOverlay extends DefaultSerializeable {
3287
3260
  this.type = 'barcodeTrackingAdvanced';
3288
3261
  this._shouldShowScanAreaGuides = false;
3289
3262
  this.listener = null;
3290
- this.controller = BarcodeTrackingAdvancedOverlayController.forOverlay(this);
3263
+ this.controller = BarcodeBatchAdvancedOverlayController.forOverlay(this);
3291
3264
  }
3292
3265
  setViewForTrackedBarcode(view, trackedBarcode) {
3293
3266
  return this.controller.setViewForTrackedBarcode(view, trackedBarcode);
@@ -3304,60 +3277,35 @@ class BaseBarcodeTrackingAdvancedOverlay extends DefaultSerializeable {
3304
3277
  }
3305
3278
  __decorate([
3306
3279
  nameForSerialization('shouldShowScanAreaGuides')
3307
- ], BaseBarcodeTrackingAdvancedOverlay.prototype, "_shouldShowScanAreaGuides", void 0);
3308
- __decorate([
3309
- ignoreFromSerialization
3310
- ], BaseBarcodeTrackingAdvancedOverlay.prototype, "barcodeTracking", void 0);
3280
+ ], BaseBarcodeBatchAdvancedOverlay.prototype, "_shouldShowScanAreaGuides", void 0);
3311
3281
  __decorate([
3312
3282
  ignoreFromSerialization
3313
- ], BaseBarcodeTrackingAdvancedOverlay.prototype, "listener", void 0);
3283
+ ], BaseBarcodeBatchAdvancedOverlay.prototype, "barcodeBatch", void 0);
3314
3284
  __decorate([
3315
3285
  ignoreFromSerialization
3316
- ], BaseBarcodeTrackingAdvancedOverlay.prototype, "controller", void 0);
3286
+ ], BaseBarcodeBatchAdvancedOverlay.prototype, "listener", void 0);
3317
3287
  __decorate([
3318
3288
  ignoreFromSerialization
3319
- ], BaseBarcodeTrackingAdvancedOverlay.prototype, "_view", void 0);
3320
-
3321
- // @Deprecated('This class is not used anymore. Use SparkScanBarcodeFeedback and FeedbackDelegate instead.')
3322
- class SparkScanFeedback extends DefaultSerializeable {
3323
- static get sparkScanDefaults() {
3324
- return getSparkScanDefaults();
3325
- }
3326
- static get default() {
3327
- return new SparkScanFeedback(Feedback.defaultFeedback, Feedback.defaultFeedback);
3328
- }
3329
- constructor(success, error) {
3330
- super();
3331
- this.success = success;
3332
- this.error = error;
3333
- console.warn('This class is not used anymore. Use SparkScanBarcodeFeedback and FeedbackDelegate instead.');
3334
- }
3335
- }
3289
+ ], BaseBarcodeBatchAdvancedOverlay.prototype, "controller", void 0);
3336
3290
  __decorate([
3337
3291
  ignoreFromSerialization
3338
- ], SparkScanFeedback, "sparkScanDefaults", null);
3292
+ ], BaseBarcodeBatchAdvancedOverlay.prototype, "_view", void 0);
3339
3293
 
3340
3294
  class SparkScanSession {
3341
3295
  static fromJSON(json) {
3296
+ var _a;
3297
+ const sessionJson = JSON.parse(json.session);
3342
3298
  const session = new SparkScanSession();
3343
- session._newlyRecognizedBarcode = json.newlyRecognizedBarcode != null ?
3344
- Barcode.fromJSON(json.newlyRecognizedBarcode) :
3299
+ session._newlyRecognizedBarcode = sessionJson.newlyRecognizedBarcode != null ?
3300
+ Barcode.fromJSON(sessionJson.newlyRecognizedBarcode) :
3345
3301
  null;
3346
- session._newlyRecognizedBarcodes = json.newlyRecognizedBarcodes.map(Barcode.fromJSON);
3347
- session._frameSequenceID = json.frameSequenceId;
3302
+ session._frameSequenceID = sessionJson.frameSequenceId;
3303
+ session.frameId = (_a = json.frameId) !== null && _a !== void 0 ? _a : '';
3348
3304
  return session;
3349
3305
  }
3350
3306
  get newlyRecognizedBarcode() {
3351
3307
  return this._newlyRecognizedBarcode;
3352
3308
  }
3353
- /**
3354
- * @deprecated Prefer use of the property `newlyRecognizedBarcode` instead.
3355
- */
3356
- get newlyRecognizedBarcodes() {
3357
- // tslint:disable-next-line:no-console
3358
- console.warn('The newlyRecognizedBarcodes has been deprecated. Prefer use of the property `newlyRecognizedBarcode` instead.');
3359
- return this._newlyRecognizedBarcodes;
3360
- }
3361
3309
  get frameSequenceID() {
3362
3310
  return this._frameSequenceID;
3363
3311
  }
@@ -3392,18 +3340,18 @@ class SparkScanListenerController extends BaseController {
3392
3340
  this._proxy.registerListenerForEvents();
3393
3341
  this._proxy.subscribeDidScanListener();
3394
3342
  this._proxy.subscribeDidUpdateSessionListener();
3395
- this.eventEmitter.on(SparkScanListenerEvents.didUpdateSession, (body) => {
3343
+ this.eventEmitter.on(SparkScanListenerEvents.didUpdateSession, (body) => __awaiter(this, void 0, void 0, function* () {
3396
3344
  const payload = JSON.parse(body);
3397
- const session = SparkScanSession.fromJSON(JSON.parse(payload.session));
3398
- this.notifyListenersOfDidUpdateSession(session);
3345
+ const session = SparkScanSession.fromJSON(payload);
3346
+ yield this.notifyListenersOfDidUpdateSession(session);
3399
3347
  this._proxy.finishDidUpdateSessionCallback(this.sparkScan.isEnabled);
3400
- });
3401
- this.eventEmitter.on(SparkScanListenerEvents.didScan, (body) => {
3348
+ }));
3349
+ this.eventEmitter.on(SparkScanListenerEvents.didScan, (body) => __awaiter(this, void 0, void 0, function* () {
3402
3350
  const payload = JSON.parse(body);
3403
- const session = SparkScanSession.fromJSON(JSON.parse(payload.session));
3404
- this.notifyListenersOfDidScan(session);
3351
+ const session = SparkScanSession.fromJSON(payload);
3352
+ yield this.notifyListenersOfDidScan(session);
3405
3353
  this._proxy.finishDidScanCallback(this.sparkScan.isEnabled);
3406
- });
3354
+ }));
3407
3355
  }
3408
3356
  unsubscribeListener() {
3409
3357
  this._proxy.unregisterListenerForEvents();
@@ -3414,24 +3362,28 @@ class SparkScanListenerController extends BaseController {
3414
3362
  this._proxy.setModeEnabledState(enabled);
3415
3363
  }
3416
3364
  notifyListenersOfDidUpdateSession(session) {
3417
- const mode = this.sparkScan;
3418
- mode.isInListenerCallback = true;
3419
- mode.listeners.forEach(listener => {
3420
- if (listener.didUpdateSession) {
3421
- listener.didUpdateSession(this.sparkScan, session, CameraController.getLastFrameOrNull);
3365
+ return __awaiter(this, void 0, void 0, function* () {
3366
+ const mode = this.sparkScan;
3367
+ mode.isInListenerCallback = true;
3368
+ for (const listener of mode.listeners) {
3369
+ if (listener.didUpdateSession) {
3370
+ yield listener.didUpdateSession(this.sparkScan, session, () => CameraController.getFrameOrNull(session.frameId));
3371
+ }
3422
3372
  }
3373
+ mode.isInListenerCallback = false;
3423
3374
  });
3424
- mode.isInListenerCallback = false;
3425
3375
  }
3426
3376
  notifyListenersOfDidScan(session) {
3427
- const mode = this.sparkScan;
3428
- mode.isInListenerCallback = true;
3429
- mode.listeners.forEach(listener => {
3430
- if (listener.didScan) {
3431
- listener.didScan(this.sparkScan, session, CameraController.getLastFrameOrNull);
3377
+ return __awaiter(this, void 0, void 0, function* () {
3378
+ const mode = this.sparkScan;
3379
+ mode.isInListenerCallback = true;
3380
+ for (const listener of mode.listeners) {
3381
+ if (listener.didScan) {
3382
+ yield listener.didScan(this.sparkScan, session, () => CameraController.getFrameOrNull(session.frameId));
3383
+ }
3432
3384
  }
3385
+ mode.isInListenerCallback = false;
3433
3386
  });
3434
- mode.isInListenerCallback = false;
3435
3387
  }
3436
3388
  }
3437
3389
 
@@ -3446,13 +3398,6 @@ class SparkScan extends DefaultSerializeable {
3446
3398
  get context() {
3447
3399
  return this._context;
3448
3400
  }
3449
- get feedback() {
3450
- return this._feedback;
3451
- }
3452
- set feedback(feedback) {
3453
- this._feedback = feedback;
3454
- this.didChange();
3455
- }
3456
3401
  get _context() {
3457
3402
  return this.privateContext;
3458
3403
  }
@@ -3468,7 +3413,6 @@ class SparkScan extends DefaultSerializeable {
3468
3413
  super();
3469
3414
  this.type = 'sparkScan';
3470
3415
  this._isEnabled = true;
3471
- this._feedback = SparkScanFeedback.default;
3472
3416
  this.privateContext = null;
3473
3417
  this.listeners = [];
3474
3418
  this.isInListenerCallback = false;
@@ -3517,9 +3461,6 @@ class SparkScan extends DefaultSerializeable {
3517
3461
  __decorate([
3518
3462
  ignoreFromSerialization
3519
3463
  ], SparkScan.prototype, "_isEnabled", void 0);
3520
- __decorate([
3521
- nameForSerialization('feedback')
3522
- ], SparkScan.prototype, "_feedback", void 0);
3523
3464
  __decorate([
3524
3465
  ignoreFromSerialization
3525
3466
  ], SparkScan.prototype, "privateContext", void 0);
@@ -3533,6 +3474,12 @@ __decorate([
3533
3474
  ignoreFromSerialization
3534
3475
  ], SparkScan.prototype, "isInListenerCallback", void 0);
3535
3476
 
3477
+ var SparkScanMiniPreviewSize;
3478
+ (function (SparkScanMiniPreviewSize) {
3479
+ SparkScanMiniPreviewSize["Regular"] = "expanded";
3480
+ SparkScanMiniPreviewSize["Expanded"] = "expanded";
3481
+ })(SparkScanMiniPreviewSize || (SparkScanMiniPreviewSize = {}));
3482
+
3536
3483
  var SparkScanPreviewBehavior;
3537
3484
  (function (SparkScanPreviewBehavior) {
3538
3485
  SparkScanPreviewBehavior["Persistent"] = "accurate";
@@ -3549,7 +3496,6 @@ class SparkScanToastSettings extends DefaultSerializeable {
3549
3496
  this._targetModeDisabledMessage = SparkScanToastSettings.toastSettings.targetModeDisabledMessage;
3550
3497
  this._continuousModeEnabledMessage = SparkScanToastSettings.toastSettings.continuousModeEnabledMessage;
3551
3498
  this._continuousModeDisabledMessage = SparkScanToastSettings.toastSettings.continuousModeDisabledMessage;
3552
- this._cameraTimeoutMessage = SparkScanToastSettings.toastSettings.cameraTimeoutMessage;
3553
3499
  this._scanPausedMessage = SparkScanToastSettings.toastSettings.scanPausedMessage;
3554
3500
  this._zoomedInMessage = SparkScanToastSettings.toastSettings.zoomedInMessage;
3555
3501
  this._zoomedOutMessage = SparkScanToastSettings.toastSettings.zoomedOutMessage;
@@ -3600,12 +3546,6 @@ class SparkScanToastSettings extends DefaultSerializeable {
3600
3546
  get continuousModeDisabledMessage() {
3601
3547
  return this._continuousModeDisabledMessage;
3602
3548
  }
3603
- set cameraTimeoutMessage(message) {
3604
- this._cameraTimeoutMessage = message;
3605
- }
3606
- get cameraTimeoutMessage() {
3607
- return this._cameraTimeoutMessage;
3608
- }
3609
3549
  set scanPausedMessage(message) {
3610
3550
  this._scanPausedMessage = message;
3611
3551
  }
@@ -3676,9 +3616,6 @@ __decorate([
3676
3616
  __decorate([
3677
3617
  nameForSerialization('continuousModeDisabledMessage')
3678
3618
  ], SparkScanToastSettings.prototype, "_continuousModeDisabledMessage", void 0);
3679
- __decorate([
3680
- nameForSerialization('cameraTimeoutMessage')
3681
- ], SparkScanToastSettings.prototype, "_cameraTimeoutMessage", void 0);
3682
3619
  __decorate([
3683
3620
  nameForSerialization('scanPausedMessage')
3684
3621
  ], SparkScanToastSettings.prototype, "_scanPausedMessage", void 0);
@@ -3778,23 +3715,7 @@ __decorate([
3778
3715
  nameForSerialization('settings')
3779
3716
  ], SparkScanScanningModeTarget.prototype, "_settings", void 0);
3780
3717
 
3781
- var SparkScanScanningPrecision;
3782
- (function (SparkScanScanningPrecision) {
3783
- SparkScanScanningPrecision["Default"] = "default";
3784
- SparkScanScanningPrecision["Accurate"] = "accurate";
3785
- })(SparkScanScanningPrecision || (SparkScanScanningPrecision = {}));
3786
-
3787
3718
  class SparkScanSettings extends DefaultSerializeable {
3788
- get singleBarcodeAutoDetection() {
3789
- // tslint:disable-next-line:no-console
3790
- console.warn('singleBarcodeAutoDetection is deprecated and will be removed in a future release.');
3791
- return this._singleBarcodeAutoDetection;
3792
- }
3793
- set singleBarcodeAutoDetection(isEnabled) {
3794
- // tslint:disable-next-line:no-console
3795
- console.warn('singleBarcodeAutoDetection is deprecated and will be removed in a future release.');
3796
- this._singleBarcodeAutoDetection = isEnabled;
3797
- }
3798
3719
  get batterySaving() {
3799
3720
  return this._batterySaving;
3800
3721
  }
@@ -3802,13 +3723,9 @@ class SparkScanSettings extends DefaultSerializeable {
3802
3723
  this._batterySaving = newValue;
3803
3724
  }
3804
3725
  get locationSelection() {
3805
- // tslint:disable-next-line:no-console
3806
- console.warn('locationSelection is deprecated and will be removed in a future release.');
3807
3726
  return this._locationSelection;
3808
3727
  }
3809
3728
  set locationSelection(newValue) {
3810
- // tslint:disable-next-line:no-console
3811
- console.warn('locationSelection is deprecated and will be removed in a future release.');
3812
3729
  this._locationSelection = newValue;
3813
3730
  }
3814
3731
  get enabledSymbologies() {
@@ -3824,9 +3741,8 @@ class SparkScanSettings extends DefaultSerializeable {
3824
3741
  constructor() {
3825
3742
  super();
3826
3743
  this.codeDuplicateFilter = SparkScanSettings.sparkScanDefaults.SparkScanSettings.codeDuplicateFilter;
3827
- this._singleBarcodeAutoDetection = SparkScanSettings.sparkScanDefaults.SparkScanSettings.singleBarcodeAutoDetection;
3828
3744
  this._batterySaving = SparkScanSettings.sparkScanDefaults.SparkScanSettings.batterySaving;
3829
- this._locationSelection = null;
3745
+ this._locationSelection = SparkScanSettings.sparkScanDefaults.SparkScanSettings.locationSelection;
3830
3746
  this.properties = {};
3831
3747
  this.symbologies = {};
3832
3748
  this.scanIntention = SparkScanSettings.sparkScanDefaults.SparkScanSettings.scanIntention;
@@ -3852,14 +3768,11 @@ class SparkScanSettings extends DefaultSerializeable {
3852
3768
  this.settingsForSymbology(symbology).isEnabled = enabled;
3853
3769
  }
3854
3770
  }
3855
- __decorate([
3856
- nameForSerialization('singleBarcodeAutoDetection')
3857
- ], SparkScanSettings.prototype, "_singleBarcodeAutoDetection", void 0);
3858
3771
  __decorate([
3859
3772
  nameForSerialization('batterySaving')
3860
3773
  ], SparkScanSettings.prototype, "_batterySaving", void 0);
3861
3774
  __decorate([
3862
- ignoreFromSerialization
3775
+ nameForSerialization('locationSelection')
3863
3776
  ], SparkScanSettings.prototype, "_locationSelection", void 0);
3864
3777
  __decorate([
3865
3778
  ignoreFromSerialization
@@ -3868,75 +3781,12 @@ __decorate([
3868
3781
  ignoreFromSerialization
3869
3782
  ], SparkScanSettings, "barcodeDefaults", null);
3870
3783
 
3871
- class SparkScanViewFeedback extends DefaultSerializeable {
3872
- constructor() {
3873
- super();
3874
- }
3875
- }
3876
-
3877
- class SparkScanViewErrorFeedback extends SparkScanViewFeedback {
3878
- get message() {
3879
- return this._message;
3880
- }
3881
- get resumeCapturingDelay() {
3882
- return this._resumeCapturingDelay;
3883
- }
3884
- get visualFeedbackColor() {
3885
- return this._visualFeedbackColor;
3886
- }
3887
- get brush() {
3888
- return this._errorBrush;
3889
- }
3890
- constructor(message, resumeCapturingDelay, visualFeedbackColor, errorBrush) {
3891
- super();
3892
- this.type = 'error';
3893
- this._message = message;
3894
- this._resumeCapturingDelay = resumeCapturingDelay;
3895
- this._visualFeedbackColor = visualFeedbackColor;
3896
- this._errorBrush = errorBrush;
3897
- }
3898
- }
3899
- __decorate([
3900
- nameForSerialization('message')
3901
- ], SparkScanViewErrorFeedback.prototype, "_message", void 0);
3902
- __decorate([
3903
- nameForSerialization('resumeCapturingDelay')
3904
- ], SparkScanViewErrorFeedback.prototype, "_resumeCapturingDelay", void 0);
3905
- __decorate([
3906
- nameForSerialization('visualFeedbackColor')
3907
- ], SparkScanViewErrorFeedback.prototype, "_visualFeedbackColor", void 0);
3908
- __decorate([
3909
- nameForSerialization('brush')
3910
- ], SparkScanViewErrorFeedback.prototype, "_errorBrush", void 0);
3911
-
3912
- var SparkScanViewHandMode;
3913
- (function (SparkScanViewHandMode) {
3914
- SparkScanViewHandMode["Right"] = "right";
3915
- SparkScanViewHandMode["Left"] = "left";
3916
- })(SparkScanViewHandMode || (SparkScanViewHandMode = {}));
3917
-
3918
- class SparkScanViewSuccessFeedback extends SparkScanViewFeedback {
3919
- get visualFeedbackColor() {
3920
- return this._visualFeedbackColor;
3921
- }
3922
- constructor(visualFeedbackColor) {
3923
- super();
3924
- this.type = 'success';
3925
- this._visualFeedbackColor = visualFeedbackColor;
3926
- }
3927
- }
3928
- __decorate([
3929
- nameForSerialization('visualFeedbackColor')
3930
- ], SparkScanViewSuccessFeedback.prototype, "_visualFeedbackColor", void 0);
3931
-
3932
3784
  class SparkScanViewSettings extends DefaultSerializeable {
3933
3785
  constructor() {
3934
3786
  super(...arguments);
3935
3787
  this.triggerButtonCollapseTimeout = SparkScanViewSettings.viewSettingsDefaults.triggerButtonCollapseTimeout;
3936
- this.continuousCaptureTimeout = SparkScanViewSettings.viewSettingsDefaults.continuousCaptureTimeout;
3937
3788
  this.defaultTorchState = SparkScanViewSettings.viewSettingsDefaults.defaultTorchState;
3938
3789
  this.defaultScanningMode = SparkScanViewSettings.viewSettingsDefaults.defaultScanningMode;
3939
- this.defaultHandMode = SparkScanViewSettings.viewSettingsDefaults.defaultHandMode;
3940
3790
  this.holdToScanEnabled = SparkScanViewSettings.viewSettingsDefaults.holdToScanEnabled;
3941
3791
  this.soundEnabled = SparkScanViewSettings.viewSettingsDefaults.soundEnabled;
3942
3792
  this.hapticEnabled = SparkScanViewSettings.viewSettingsDefaults.hapticEnabled;
@@ -3951,6 +3801,7 @@ class SparkScanViewSettings extends DefaultSerializeable {
3951
3801
  this.zoomFactorIn = SparkScanViewSettings.viewSettingsDefaults.zoomFactorIn;
3952
3802
  this.inactiveStateTimeout = SparkScanViewSettings.viewSettingsDefaults.inactiveStateTimeout;
3953
3803
  this.defaultCameraPosition = SparkScanViewSettings.viewSettingsDefaults.defaultCameraPosition;
3804
+ this.defaultMiniPreviewSize = SparkScanViewSettings.viewSettingsDefaults.defaultMiniPreviewSize;
3954
3805
  }
3955
3806
  scanModeFromJSON(json) {
3956
3807
  const scanningBehavior = json.settings.scanningBehavior;
@@ -3973,11 +3824,20 @@ __decorate([
3973
3824
  ignoreFromSerialization
3974
3825
  ], SparkScanViewSettings, "sparkScanDefaults", null);
3975
3826
 
3827
+ var SparkScanViewState;
3828
+ (function (SparkScanViewState) {
3829
+ SparkScanViewState["Initial"] = "initial";
3830
+ SparkScanViewState["Idle"] = "idle";
3831
+ SparkScanViewState["Inactive"] = "inactive";
3832
+ SparkScanViewState["Active"] = "active";
3833
+ SparkScanViewState["Error"] = "error";
3834
+ })(SparkScanViewState || (SparkScanViewState = {}));
3835
+
3976
3836
  var SparkScanViewEvents;
3977
3837
  (function (SparkScanViewEvents) {
3978
- SparkScanViewEvents["fastFindButtonTapped"] = "SparkScanViewUiListener.fastFindButtonTapped";
3979
3838
  SparkScanViewEvents["barcodeFindButtonTapped"] = "SparkScanViewUiListener.barcodeFindButtonTapped";
3980
3839
  SparkScanViewEvents["barcodeCountButtonTapped"] = "SparkScanViewUiListener.barcodeCountButtonTapped";
3840
+ SparkScanViewEvents["didChangeViewState"] = "SparkScanViewUiListener.didChangeViewState";
3981
3841
  })(SparkScanViewEvents || (SparkScanViewEvents = {}));
3982
3842
  var SparkScanFeedbackDelegateEvents;
3983
3843
  (function (SparkScanFeedbackDelegateEvents) {
@@ -4005,10 +3865,6 @@ class SparkScanViewController extends BaseController {
4005
3865
  this._proxy.prepareSparkScanViewScanning();
4006
3866
  });
4007
3867
  }
4008
- emitFeedback(feedback) {
4009
- const json = JSON.stringify(feedback.toJSON());
4010
- return this._proxy.emitSparkScanViewFeedback(json);
4011
- }
4012
3868
  dispose() {
4013
3869
  this.sparkScan.unsubscribeNativeListeners();
4014
3870
  this.unsubscribeListeners();
@@ -4021,19 +3877,19 @@ class SparkScanViewController extends BaseController {
4021
3877
  var _a, _b;
4022
3878
  (_b = (_a = this.view.uiListener) === null || _a === void 0 ? void 0 : _a.didTapBarcodeCountButton) === null || _b === void 0 ? void 0 : _b.call(_a, this.view);
4023
3879
  });
4024
- this.eventEmitter.on(SparkScanViewEvents.fastFindButtonTapped, () => {
4025
- var _a, _b;
4026
- (_b = (_a = this.view.uiListener) === null || _a === void 0 ? void 0 : _a.didTapFastFindButton) === null || _b === void 0 ? void 0 : _b.call(_a, this.view);
4027
- });
4028
3880
  this.eventEmitter.on(SparkScanViewEvents.barcodeFindButtonTapped, () => {
4029
3881
  var _a, _b;
4030
3882
  (_b = (_a = this.view.uiListener) === null || _a === void 0 ? void 0 : _a.didTapBarcodeFindButton) === null || _b === void 0 ? void 0 : _b.call(_a, this.view);
4031
3883
  });
3884
+ this.eventEmitter.on(SparkScanViewEvents.didChangeViewState, (newState) => {
3885
+ var _a, _b;
3886
+ (_b = (_a = this.view.uiListener) === null || _a === void 0 ? void 0 : _a.didChangeViewState) === null || _b === void 0 ? void 0 : _b.call(_a, newState);
3887
+ });
4032
3888
  }
4033
3889
  unsubscribeListeners() {
4034
3890
  this._proxy.unregisterSparkScanViewListenerEvents();
4035
3891
  this.eventEmitter.off(SparkScanViewEvents.barcodeCountButtonTapped);
4036
- this.eventEmitter.off(SparkScanViewEvents.fastFindButtonTapped);
3892
+ this.eventEmitter.off(SparkScanViewEvents.barcodeFindButtonTapped);
4037
3893
  }
4038
3894
  create() {
4039
3895
  const viewJson = {
@@ -4107,40 +3963,27 @@ class BaseSparkScanView {
4107
3963
  this._feedbackDelegate = null;
4108
3964
  this._previewSizeControlVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.previewSizeControlVisible;
4109
3965
  this._cameraSwitchButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.cameraSwitchButtonVisible;
4110
- this._shouldShowScanAreaGuides = BaseSparkScanView.sparkScanDefaults.SparkScanView.shouldShowScanAreaGuides;
4111
- this._torchButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.torchButtonVisible;
4112
3966
  this._scanningBehaviorButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.scanningBehaviorButtonVisible;
4113
- this._handModeButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.handModeButtonVisible;
4114
3967
  this._barcodeCountButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.barcodeCountButtonVisible;
4115
3968
  this._fastFindButtonVisible = false;
4116
3969
  this._barcodeFindButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.barcodeFindButtonVisible;
4117
3970
  this._targetModeButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.targetModeButtonVisible;
4118
- this._soundModeButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.soundModeButtonVisible;
4119
- this._hapticModeButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.hapticModeButtonVisible;
4120
- this._stopCapturingText = BaseSparkScanView.sparkScanDefaults.SparkScanView.stopCapturingText;
4121
- this._startCapturingText = BaseSparkScanView.sparkScanDefaults.SparkScanView.startCapturingText;
4122
- this._resumeCapturingText = BaseSparkScanView.sparkScanDefaults.SparkScanView.resumeCapturingText;
4123
- this._scanningCapturingText = BaseSparkScanView.sparkScanDefaults.SparkScanView.scanningCapturingText;
4124
- this._captureButtonActiveBackgroundColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.captureButtonActiveBackgroundColor;
4125
- this._captureButtonBackgroundColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.captureButtonBackgroundColor;
4126
- this._captureButtonTintColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.captureButtonTintColor;
4127
3971
  this._toolbarBackgroundColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.toolbarBackgroundColor;
4128
3972
  this._toolbarIconActiveTintColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.toolbarIconActiveTintColor;
4129
3973
  this._toolbarIconInactiveTintColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.toolbarIconInactiveTintColor;
4130
- this._targetModeHintText = BaseSparkScanView.sparkScanDefaults.SparkScanView.targetModeHintText;
4131
- this._shouldShowTargetModeHint = BaseSparkScanView.sparkScanDefaults.SparkScanView.shouldShowTargetModeHint;
3974
+ this._triggerButtonAnimationColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.triggerButtonAnimationColor;
3975
+ this._triggerButtonExpandedColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.triggerButtonExpandedColor;
3976
+ this._triggerButtonCollapsedColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.triggerButtonCollapsedColor;
3977
+ this._triggerButtonTintColor = BaseSparkScanView.sparkScanDefaults.SparkScanView.triggerButtonTintColor;
3978
+ this._triggerButtonVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.triggerButtonVisible;
3979
+ this._triggerButtonImage = BaseSparkScanView.sparkScanDefaults.SparkScanView.triggerButtonImage;
3980
+ this._torchControlVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.torchControlVisible;
3981
+ this._previewCloseControlVisible = BaseSparkScanView.sparkScanDefaults.SparkScanView.previewSizeControlVisible;
4132
3982
  this._sparkScan = sparkScan;
4133
3983
  this.context = context;
4134
3984
  this._viewSettings = settings !== null && settings !== void 0 ? settings : new SparkScanViewSettings();
4135
3985
  this._controller = SparkScanViewController.forSparkScanView(this, sparkScan);
4136
3986
  }
4137
- get brush() {
4138
- return this._brush;
4139
- }
4140
- set brush(newValue) {
4141
- this._brush = newValue;
4142
- this.update();
4143
- }
4144
3987
  get previewSizeControlVisible() {
4145
3988
  return this._previewSizeControlVisible;
4146
3989
  }
@@ -4149,25 +3992,31 @@ class BaseSparkScanView {
4149
3992
  this.update();
4150
3993
  }
4151
3994
  /**
4152
- * @deprecated This property is deprecated as it's no longer needed.
3995
+ * @deprecated The torch button has been moved to the mini preview. Use property `torchControlVisible` instead.
4153
3996
  */
4154
- get shouldShowScanAreaGuides() {
4155
- console.warn('This property is deprecated as it\'s no longer needed.');
4156
- return this._shouldShowScanAreaGuides;
3997
+ // @ts-ignore
3998
+ get torchButtonVisible() {
3999
+ console.warn('The torch button has been moved to the mini preview. Use property `torchControlVisible` instead.');
4157
4000
  }
4158
4001
  /**
4159
- * @deprecated This property is deprecated as it's no longer needed.
4002
+ * @deprecated The torch button has been moved to the mini preview. Use property `torchControlVisible` instead.
4160
4003
  */
4161
- set shouldShowScanAreaGuides(newValue) {
4162
- console.warn('This property is deprecated as it\'s no longer needed.');
4163
- this._shouldShowScanAreaGuides = newValue;
4004
+ // @ts-ignore
4005
+ set torchButtonVisible(newValue) {
4006
+ console.warn('The torch button has been moved to the mini preview. Use property `torchControlVisible` instead.');
4007
+ }
4008
+ get torchControlVisible() {
4009
+ return this._torchControlVisible;
4010
+ }
4011
+ set torchControlVisible(newValue) {
4012
+ this._torchControlVisible = newValue;
4164
4013
  this.update();
4165
4014
  }
4166
- get torchButtonVisible() {
4167
- return this._torchButtonVisible;
4015
+ get previewCloseControlVisible() {
4016
+ return this._previewCloseControlVisible;
4168
4017
  }
4169
- set torchButtonVisible(newValue) {
4170
- this._torchButtonVisible = newValue;
4018
+ set previewCloseControlVisible(newValue) {
4019
+ this._previewCloseControlVisible = newValue;
4171
4020
  this.update();
4172
4021
  }
4173
4022
  get scanningBehaviorButtonVisible() {
@@ -4177,13 +4026,6 @@ class BaseSparkScanView {
4177
4026
  this._scanningBehaviorButtonVisible = newValue;
4178
4027
  this.update();
4179
4028
  }
4180
- get handModeButtonVisible() {
4181
- return this._handModeButtonVisible;
4182
- }
4183
- set handModeButtonVisible(newValue) {
4184
- this._handModeButtonVisible = newValue;
4185
- this.update();
4186
- }
4187
4029
  get barcodeCountButtonVisible() {
4188
4030
  return this._barcodeCountButtonVisible;
4189
4031
  }
@@ -4191,20 +4033,6 @@ class BaseSparkScanView {
4191
4033
  this._barcodeCountButtonVisible = newValue;
4192
4034
  this.update();
4193
4035
  }
4194
- /**
4195
- * @deprecated This method was renamed. Use onBarcodeFindButtonTappedIn instead.
4196
- */
4197
- get fastFindButtonVisible() {
4198
- console.warn('This property was renamed. Use the property `barcodeFindButtonVisible` instead.');
4199
- return this._fastFindButtonVisible;
4200
- }
4201
- /**
4202
- * @deprecated This method was renamed. Use onBarcodeFindButtonTappedIn instead.
4203
- */
4204
- set fastFindButtonVisible(newValue) {
4205
- // NOOP
4206
- console.warn('This property was renamed. Use the property `barcodeFindButtonVisible` instead.');
4207
- }
4208
4036
  get barcodeFindButtonVisible() {
4209
4037
  return this._barcodeFindButtonVisible;
4210
4038
  }
@@ -4220,83 +4048,104 @@ class BaseSparkScanView {
4220
4048
  this.update();
4221
4049
  }
4222
4050
  /**
4223
- * @deprecated This property is deprecated as sound mode button will be removed in the future.
4051
+ * @deprecated The trigger button no longer displays text.
4224
4052
  */
4225
- get soundModeButtonVisible() {
4226
- console.warn('This property is deprecated as sound mode button will be removed in the future.');
4227
- return this._soundModeButtonVisible;
4053
+ // @ts-ignore
4054
+ get stopCapturingText() {
4055
+ console.warn('The trigger button no longer displays text.');
4228
4056
  }
4229
4057
  /**
4230
- * @deprecated This property is deprecated as sound mode button will be removed in the future.
4058
+ * @deprecated The trigger button no longer displays text.
4231
4059
  */
4232
- set soundModeButtonVisible(newValue) {
4233
- console.warn('This property is deprecated as sound mode button will be removed in the future.');
4234
- this._soundModeButtonVisible = newValue;
4235
- this.update();
4060
+ // @ts-ignore
4061
+ set stopCapturingText(newValue) {
4062
+ console.warn('The trigger button no longer displays text.');
4236
4063
  }
4237
4064
  /**
4238
- * @deprecated This property is deprecated as haptic mode button will be removed in the future.
4065
+ * @deprecated The trigger button no longer displays text.
4239
4066
  */
4240
- get hapticModeButtonVisible() {
4241
- console.warn('This property is deprecated as haptic mode button will be removed in the future.');
4242
- return this._hapticModeButtonVisible;
4067
+ // @ts-ignore
4068
+ get startCapturingText() {
4069
+ console.warn('The trigger button no longer displays text.');
4243
4070
  }
4244
4071
  /**
4245
- * @deprecated This property is deprecated as haptic mode button will be removed in the future.
4072
+ * @deprecated The trigger button no longer displays text.
4246
4073
  */
4247
- set hapticModeButtonVisible(newValue) {
4248
- console.warn('This property is deprecated as haptic mode button will be removed in the future.');
4249
- this._hapticModeButtonVisible = newValue;
4250
- this.update();
4251
- }
4252
- get stopCapturingText() {
4253
- return this._stopCapturingText;
4254
- }
4255
- set stopCapturingText(newValue) {
4256
- this._stopCapturingText = newValue;
4257
- this.update();
4258
- }
4259
- get startCapturingText() {
4260
- return this._startCapturingText;
4261
- }
4074
+ // @ts-ignore
4262
4075
  set startCapturingText(newValue) {
4263
- this._startCapturingText = newValue;
4264
- this.update();
4076
+ console.warn('The trigger button no longer displays text.');
4265
4077
  }
4078
+ /**
4079
+ * @deprecated The trigger button no longer displays text.
4080
+ */
4081
+ // @ts-ignore
4266
4082
  get resumeCapturingText() {
4267
- return this._resumeCapturingText;
4083
+ console.warn('The trigger button no longer displays text.');
4268
4084
  }
4085
+ /**
4086
+ * @deprecated The trigger button no longer displays text.
4087
+ */
4088
+ // @ts-ignore
4269
4089
  set resumeCapturingText(newValue) {
4270
- this._resumeCapturingText = newValue;
4271
- this.update();
4090
+ console.warn('The trigger button no longer displays text.');
4272
4091
  }
4092
+ /**
4093
+ * @deprecated The trigger button no longer displays text.
4094
+ */
4095
+ // @ts-ignore
4273
4096
  get scanningCapturingText() {
4274
- return this._scanningCapturingText;
4097
+ console.warn('The trigger button no longer displays text.');
4275
4098
  }
4099
+ /**
4100
+ * @deprecated The trigger button no longer displays text.
4101
+ */
4102
+ // @ts-ignore
4276
4103
  set scanningCapturingText(newValue) {
4277
- this._scanningCapturingText = newValue;
4278
- this.update();
4104
+ console.warn('The trigger button no longer displays text.');
4279
4105
  }
4106
+ /**
4107
+ * @deprecated This property is not relevant anymore.
4108
+ */
4109
+ // @ts-ignore
4280
4110
  get captureButtonActiveBackgroundColor() {
4281
- return this._captureButtonActiveBackgroundColor;
4111
+ console.warn('captureButtonActiveBackgroundColor is deprecated.');
4282
4112
  }
4113
+ /**
4114
+ * @deprecated This property is not relevant anymore.
4115
+ */
4116
+ // @ts-ignore
4283
4117
  set captureButtonActiveBackgroundColor(newValue) {
4284
- this._captureButtonActiveBackgroundColor = newValue;
4285
- this.update();
4118
+ console.warn('captureButtonActiveBackgroundColor is deprecated.');
4286
4119
  }
4120
+ /**
4121
+ * @deprecated Use triggerButtonCollapsedColor and triggerButtonExpandedColor instead.
4122
+ */
4123
+ // @ts-ignore
4287
4124
  get captureButtonBackgroundColor() {
4288
- return this._captureButtonBackgroundColor;
4125
+ console.warn('captureButtonBackgroundColor is deprecated. ' +
4126
+ 'Use triggerButtonCollapsedColor and triggerButtonExpandedColor instead.');
4289
4127
  }
4128
+ /**
4129
+ * @deprecated Use triggerButtonCollapsedColor and triggerButtonExpandedColor instead.
4130
+ */
4131
+ // @ts-ignore
4290
4132
  set captureButtonBackgroundColor(newValue) {
4291
- this._captureButtonBackgroundColor = newValue;
4292
- this.update();
4133
+ console.warn('captureButtonBackgroundColor is deprecated. ' +
4134
+ 'Use triggerButtonCollapsedColor and triggerButtonExpandedColor instead.');
4293
4135
  }
4136
+ /**
4137
+ * @deprecated use triggerButtonTintColor instead.
4138
+ */
4139
+ // @ts-ignore
4294
4140
  get captureButtonTintColor() {
4295
- return this._captureButtonTintColor;
4141
+ console.warn('triggerButtonTintColor is deprecated. Use triggerButtonTintColor instead.');
4296
4142
  }
4143
+ /**
4144
+ * @deprecated use triggerButtonTintColor instead.
4145
+ */
4146
+ // @ts-ignore
4297
4147
  set captureButtonTintColor(newValue) {
4298
- this._captureButtonTintColor = newValue;
4299
- this.update();
4148
+ console.warn('triggerButtonTintColor is deprecated. Use triggerButtonTintColor instead.');
4300
4149
  }
4301
4150
  get toolbarBackgroundColor() {
4302
4151
  return this._toolbarBackgroundColor;
@@ -4319,30 +4168,54 @@ class BaseSparkScanView {
4319
4168
  this._toolbarIconInactiveTintColor = newValue;
4320
4169
  this.update();
4321
4170
  }
4322
- get targetModeHintText() {
4323
- return this._targetModeHintText;
4171
+ get cameraSwitchButtonVisible() {
4172
+ return this._cameraSwitchButtonVisible;
4324
4173
  }
4325
- set targetModeHintText(newValue) {
4326
- this._targetModeHintText = newValue;
4174
+ set cameraSwitchButtonVisible(newValue) {
4175
+ this._cameraSwitchButtonVisible = newValue;
4327
4176
  this.update();
4328
4177
  }
4329
- get shouldShowTargetModeHint() {
4330
- return this._shouldShowTargetModeHint;
4178
+ get triggerButtonAnimationColor() {
4179
+ return this._triggerButtonAnimationColor;
4331
4180
  }
4332
- set shouldShowTargetModeHint(newValue) {
4333
- this._shouldShowTargetModeHint = newValue;
4181
+ set triggerButtonAnimationColor(newValue) {
4182
+ this._triggerButtonAnimationColor = newValue;
4334
4183
  this.update();
4335
4184
  }
4336
- get cameraSwitchButtonVisible() {
4337
- return this._cameraSwitchButtonVisible;
4185
+ get triggerButtonExpandedColor() {
4186
+ return this._triggerButtonExpandedColor;
4338
4187
  }
4339
- set cameraSwitchButtonVisible(newValue) {
4340
- this._cameraSwitchButtonVisible = newValue;
4188
+ set triggerButtonExpandedColor(newValue) {
4189
+ this._triggerButtonExpandedColor = newValue;
4190
+ this.update();
4191
+ }
4192
+ get triggerButtonCollapsedColor() {
4193
+ return this._triggerButtonCollapsedColor;
4194
+ }
4195
+ set triggerButtonCollapsedColor(newValue) {
4196
+ this._triggerButtonCollapsedColor = newValue;
4197
+ this.update();
4198
+ }
4199
+ get triggerButtonTintColor() {
4200
+ return this._triggerButtonTintColor;
4201
+ }
4202
+ set triggerButtonTintColor(newValue) {
4203
+ this._triggerButtonTintColor = newValue;
4204
+ this.update();
4205
+ }
4206
+ get triggerButtonImage() {
4207
+ return this._triggerButtonImage;
4208
+ }
4209
+ set triggerButtonImage(newValue) {
4210
+ this._triggerButtonImage = newValue;
4341
4211
  this.update();
4342
4212
  }
4343
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4344
- emitFeedback(feedback) {
4345
- console.warn('emitFeedback is deprecated and does nothing. Use the property feedbackDelegate instead.');
4213
+ get triggerButtonVisible() {
4214
+ return this._triggerButtonVisible;
4215
+ }
4216
+ set triggerButtonVisible(newValue) {
4217
+ this._triggerButtonVisible = newValue;
4218
+ this.update();
4346
4219
  }
4347
4220
  showToast(text) {
4348
4221
  this._controller.showToast(text);
@@ -4402,28 +4275,27 @@ class BaseSparkScanView {
4402
4275
  var _a;
4403
4276
  const json = {
4404
4277
  brush: this._brush.toJSON(),
4405
- torchButtonVisible: this.torchButtonVisible,
4406
4278
  scanningBehaviorButtonVisible: this.scanningBehaviorButtonVisible,
4407
- handModeButtonVisible: this.handModeButtonVisible,
4408
4279
  barcodeCountButtonVisible: this.barcodeCountButtonVisible,
4409
4280
  barcodeFindButtonVisible: this.barcodeFindButtonVisible,
4410
4281
  targetModeButtonVisible: this.targetModeButtonVisible,
4411
- soundModeButtonVisible: this.soundModeButtonVisible,
4412
- hapticModeButtonVisible: this.hapticModeButtonVisible,
4413
4282
  stopCapturingText: this.stopCapturingText,
4414
4283
  startCapturingText: this.startCapturingText,
4415
4284
  resumeCapturingText: this.resumeCapturingText,
4416
4285
  scanningCapturingText: this.scanningCapturingText,
4417
- captureButtonActiveBackgroundColor: this.captureButtonActiveBackgroundColor,
4418
- captureButtonBackgroundColor: this.captureButtonBackgroundColor,
4419
- captureButtonTintColor: this.captureButtonTintColor,
4420
4286
  toolbarBackgroundColor: this.toolbarBackgroundColor,
4421
4287
  toolbarIconActiveTintColor: this.toolbarIconActiveTintColor,
4422
4288
  toolbarIconInactiveTintColor: this.toolbarIconInactiveTintColor,
4423
- targetModeHintText: this.targetModeHintText,
4424
- shouldShowTargetModeHint: this.shouldShowTargetModeHint,
4425
4289
  hasFeedbackDelegate: this._feedbackDelegate != null,
4426
4290
  cameraSwitchButtonVisible: this.cameraSwitchButtonVisible,
4291
+ triggerButtonAnimationColor: this.triggerButtonAnimationColor,
4292
+ triggerButtonExpandedColor: this.triggerButtonExpandedColor,
4293
+ triggerButtonCollapsedColor: this.triggerButtonCollapsedColor,
4294
+ triggerButtonTintColor: this.triggerButtonTintColor,
4295
+ triggerButtonVisible: this.triggerButtonVisible,
4296
+ triggerButtonImage: this.triggerButtonImage,
4297
+ torchControlVisible: this.torchControlVisible,
4298
+ previewCloseControlVisible: this.previewCloseControlVisible,
4427
4299
  };
4428
4300
  if (this._viewSettings != null) {
4429
4301
  json.viewSettings = (_a = this._viewSettings) === null || _a === void 0 ? void 0 : _a.toJSON();
@@ -6242,11 +6114,13 @@ class BaseBarcodeFindView {
6242
6114
  }
6243
6115
 
6244
6116
  class BarcodeGeneratorCreationOptions {
6245
- constructor(backgroundColor = null, foregroundColor = null, errorCorrectionLevel = null, versionNumber = null) {
6117
+ constructor(backgroundColor = null, foregroundColor = null, errorCorrectionLevel = null, versionNumber = null, minimumErrorCorrectionPercent = null, layers = null) {
6246
6118
  this.backgroundColor = backgroundColor;
6247
6119
  this.foregroundColor = foregroundColor;
6248
6120
  this.errorCorrectionLevel = errorCorrectionLevel;
6249
6121
  this.versionNumber = versionNumber;
6122
+ this.minimumErrorCorrectionPercent = minimumErrorCorrectionPercent;
6123
+ this.layers = layers;
6250
6124
  }
6251
6125
  }
6252
6126
 
@@ -6326,7 +6200,6 @@ class BarcodeGeneratorController {
6326
6200
  static forBarcodeGenerator(generator) {
6327
6201
  const controller = new BarcodeGeneratorController();
6328
6202
  controller.generator = generator;
6329
- controller.initialize();
6330
6203
  return controller;
6331
6204
  }
6332
6205
  initialize() {
@@ -6334,7 +6207,7 @@ class BarcodeGeneratorController {
6334
6207
  // We call update because it returns a promise, this guarantees, that by the time
6335
6208
  // we need the deserialized context, it will be set in the native layer.
6336
6209
  yield this.generator.dataCaptureContext.update();
6337
- this.create();
6210
+ yield this.create();
6338
6211
  });
6339
6212
  }
6340
6213
  create() {
@@ -6351,6 +6224,20 @@ class BarcodeGeneratorController {
6351
6224
  }
6352
6225
  }
6353
6226
 
6227
+ class AztecBarcodeGeneratorBuilder extends BarcodeGeneratorBuilder {
6228
+ constructor(dataCaptureContext) {
6229
+ super('aztecGenerator', dataCaptureContext);
6230
+ }
6231
+ withMinimumErrorCorrectionPercent(minimumErrorCorrectionPercent) {
6232
+ this.options.minimumErrorCorrectionPercent = minimumErrorCorrectionPercent;
6233
+ return this;
6234
+ }
6235
+ withLayers(layers) {
6236
+ this.options.layers = layers;
6237
+ return this;
6238
+ }
6239
+ }
6240
+
6354
6241
  class BarcodeGenerator extends DefaultSerializeable {
6355
6242
  get id() {
6356
6243
  return this._id;
@@ -6359,22 +6246,37 @@ class BarcodeGenerator extends DefaultSerializeable {
6359
6246
  super();
6360
6247
  this._id = `${Date.now()}`;
6361
6248
  this.errorCorrectionLevel = null;
6249
+ this.initializationPromise = undefined;
6362
6250
  this.dataCaptureContext = dataCaptureContext;
6363
6251
  this.type = type;
6364
6252
  this.backgroundColor = backgroundColor;
6365
6253
  this.foregroundColor = foregroundColor;
6366
6254
  this.errorCorrectionLevel = errorCorrectionLevel;
6367
6255
  this.versionNumber = versionNumber;
6368
- this.controller = BarcodeGeneratorController.forBarcodeGenerator(this);
6256
+ }
6257
+ initialize() {
6258
+ return __awaiter(this, void 0, void 0, function* () {
6259
+ this.controller = BarcodeGeneratorController.forBarcodeGenerator(this);
6260
+ this.initializationPromise = this.controller.initialize();
6261
+ return this.initializationPromise;
6262
+ });
6369
6263
  }
6370
6264
  static create(type, options, dataCaptureContext) {
6371
- return new BarcodeGenerator(dataCaptureContext, type, options.backgroundColor, options.backgroundColor, options.errorCorrectionLevel, options.versionNumber);
6265
+ const generator = new BarcodeGenerator(dataCaptureContext, type, options.backgroundColor, options.backgroundColor, options.errorCorrectionLevel, options.versionNumber);
6266
+ generator.initialize();
6267
+ return generator;
6372
6268
  }
6373
6269
  generate(text, imageWidth) {
6374
- return this.controller.generate(text, imageWidth);
6270
+ return __awaiter(this, void 0, void 0, function* () {
6271
+ yield this.initializationPromise;
6272
+ return this.controller.generate(text, imageWidth);
6273
+ });
6375
6274
  }
6376
6275
  generateFromBase64EncodedData(data, imageWidth) {
6377
- return this.controller.generateFromBase64EncodedData(data, imageWidth);
6276
+ return __awaiter(this, void 0, void 0, function* () {
6277
+ yield this.initializationPromise;
6278
+ return this.controller.generateFromBase64EncodedData(data, imageWidth);
6279
+ });
6378
6280
  }
6379
6281
  dispose() {
6380
6282
  this.controller.dispose();
@@ -6400,6 +6302,9 @@ class BarcodeGenerator extends DefaultSerializeable {
6400
6302
  static dataMatrixBarcodeGeneratorBuilder(dataCaptureContext) {
6401
6303
  return new DataMatrixBarcodeGeneratorBuilder(dataCaptureContext);
6402
6304
  }
6305
+ static aztecBarcodeGeneratorBuilder(dataCaptureContext) {
6306
+ return new AztecBarcodeGeneratorBuilder(dataCaptureContext);
6307
+ }
6403
6308
  }
6404
6309
  __decorate([
6405
6310
  nameForSerialization('id')
@@ -6419,4 +6324,4 @@ var QrCodeErrorCorrectionLevel;
6419
6324
  QrCodeErrorCorrectionLevel["High"] = "high";
6420
6325
  })(QrCodeErrorCorrectionLevel || (QrCodeErrorCorrectionLevel = {}));
6421
6326
 
6422
- export { ArucoDictionary, ArucoDictionaryPreset, ArucoMarker, Barcode, BarcodeCapture, BarcodeCaptureFeedback, BarcodeCaptureListenerController, BarcodeCaptureListenerEvents, BarcodeCaptureOverlay, BarcodeCaptureOverlayStyle, BarcodeCaptureSession, BarcodeCaptureSettings, BarcodeCount, BarcodeCountCaptureList, BarcodeCountCaptureListSession, BarcodeCountFeedback, BarcodeCountListenerController, BarcodeCountListenerEvents, BarcodeCountSession, BarcodeCountSessionController, BarcodeCountSettings, BarcodeCountToolbarSettings, BarcodeCountViewEvents, BarcodeCountViewStyle, BarcodeFilterHighlightSettingsBrush, BarcodeFilterHighlightType, BarcodeFilterSettings, BarcodeFind, BarcodeFindController, BarcodeFindFeedback, BarcodeFindItem, BarcodeFindItemContent, BarcodeFindItemSearchOptions, BarcodeFindListenerEvents, BarcodeFindSettings, BarcodeFindViewEvents, BarcodeFindViewSettings, BarcodeGenerator, BarcodeGeneratorBuilder, BarcodeGeneratorController, BarcodePick, BarcodePickActionCallback, BarcodePickAsyncMapperProductProvider, BarcodePickEvents, BarcodePickIconStyle, BarcodePickListenerController, BarcodePickListenerEvents, BarcodePickProduct, BarcodePickProductController, BarcodePickProductProviderCallback, BarcodePickProductProviderCallbackItem, BarcodePickScanningSession, BarcodePickSettings, BarcodePickState, BarcodePickStatusIconSettings, BarcodePickViewController, BarcodePickViewListenerEvents, BarcodePickViewSettings, BarcodePickViewUiListenerEvents, BarcodeSelection, BarcodeSelectionAimerSelection, BarcodeSelectionAutoSelectionStrategy, BarcodeSelectionBasicOverlay, BarcodeSelectionBasicOverlayStyle, BarcodeSelectionBrushProviderEvents, BarcodeSelectionController, BarcodeSelectionFeedback, BarcodeSelectionFreezeBehavior, BarcodeSelectionListenerController, BarcodeSelectionListenerEvents, BarcodeSelectionManualSelectionStrategy, BarcodeSelectionOverlayController, BarcodeSelectionSession, BarcodeSelectionSettings, BarcodeSelectionStrategyType, BarcodeSelectionTapBehavior, BarcodeSelectionTapSelection, BarcodeSelectionTypeName, BarcodeSpatialGrid, BarcodeTracking, BarcodeTrackingAdvancedOverlayController, BarcodeTrackingAdvancedOverlayListenerEvents, BarcodeTrackingBasicOverlay, BarcodeTrackingBasicOverlayController, BarcodeTrackingBasicOverlayListenerEvents, BarcodeTrackingBasicOverlayStyle, BarcodeTrackingListenerController, BarcodeTrackingListenerEvents, BarcodeTrackingScenario, BarcodeTrackingSession, BarcodeTrackingSettings, BaseBarcodeFindView, BaseBarcodePickView, BaseBarcodeTrackingAdvancedOverlay, BaseSparkScanView, BatterySavingMode, BrushForStateObject, Checksum, Code128BarcodeGeneratorBuilder, Code39BarcodeGeneratorBuilder, CompositeFlag, CompositeType, DataMatrixBarcodeGeneratorBuilder, Dot, DotWithIcons, Ean13BarcodeGeneratorBuilder, Ean13UpcaClassification, EncodingRange, InterleavedTwoOfFiveBarcodeGeneratorBuilder, LocalizedOnlyBarcode, PrivateBarcodeSelectionStrategy, PrivateBarcodeSelectionType, QrCodeBarcodeGeneratorBuilder, QrCodeErrorCorrectionLevel, Range, Rectangular, RectangularWithIcons, SparkScan, SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback, SparkScanFeedback, SparkScanFeedbackDelegateEvents, SparkScanListenerController, SparkScanListenerEvents, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningModeDefault, SparkScanScanningModeTarget, SparkScanScanningPrecision, SparkScanSession, SparkScanSettings, SparkScanToastSettings, SparkScanViewController, SparkScanViewErrorFeedback, SparkScanViewEvents, SparkScanViewFeedback, SparkScanViewHandMode, SparkScanViewSettings, SparkScanViewSuccessFeedback, StructuredAppendData, Symbology, SymbologyDescription, SymbologySettings, TargetBarcode, TrackedBarcode, UpcaBarcodeGeneratorBuilder, getBarcodeCaptureDefaults, getBarcodeCountDefaults, getBarcodeDefaults, getBarcodeFindDefaults, getBarcodePickDefaults, getBarcodeSelectionDefaults, getBarcodeTrackingDefaults, getSparkScanDefaults, loadBarcodeCaptureDefaults, loadBarcodeCountDefaults, loadBarcodeDefaults, loadBarcodeFindDefaults, loadBarcodePickDefaults, loadBarcodeSelectionDefaults, loadBarcodeTrackingDefaults, loadSparkScanDefaults };
6327
+ export { ArucoDictionary, ArucoDictionaryPreset, ArucoMarker, AztecBarcodeGeneratorBuilder, Barcode, BarcodeBatch, BarcodeBatchAdvancedOverlayController, BarcodeBatchAdvancedOverlayListenerEvents, BarcodeBatchBasicOverlay, BarcodeBatchBasicOverlayController, BarcodeBatchBasicOverlayListenerEvents, BarcodeBatchBasicOverlayStyle, BarcodeBatchListenerController, BarcodeBatchListenerEvents, BarcodeBatchScenario, BarcodeBatchSession, BarcodeBatchSettings, BarcodeCapture, BarcodeCaptureFeedback, BarcodeCaptureListenerController, BarcodeCaptureListenerEvents, BarcodeCaptureOverlay, BarcodeCaptureOverlayStyle, BarcodeCaptureSession, BarcodeCaptureSettings, BarcodeCount, BarcodeCountCaptureList, BarcodeCountCaptureListSession, BarcodeCountFeedback, BarcodeCountListenerController, BarcodeCountListenerEvents, BarcodeCountSession, BarcodeCountSessionController, BarcodeCountSettings, BarcodeCountToolbarSettings, BarcodeCountViewEvents, BarcodeCountViewStyle, BarcodeFilterHighlightSettingsBrush, BarcodeFilterHighlightType, BarcodeFilterSettings, BarcodeFind, BarcodeFindController, BarcodeFindFeedback, BarcodeFindItem, BarcodeFindItemContent, BarcodeFindItemSearchOptions, BarcodeFindListenerEvents, BarcodeFindSettings, BarcodeFindViewEvents, BarcodeFindViewSettings, BarcodeGenerator, BarcodeGeneratorBuilder, BarcodeGeneratorController, BarcodePick, BarcodePickActionCallback, BarcodePickAsyncMapperProductProvider, BarcodePickEvents, BarcodePickIconStyle, BarcodePickListenerController, BarcodePickListenerEvents, BarcodePickProduct, BarcodePickProductController, BarcodePickProductProviderCallback, BarcodePickProductProviderCallbackItem, BarcodePickScanningSession, BarcodePickSettings, BarcodePickState, BarcodePickStatusIconSettings, BarcodePickViewController, BarcodePickViewListenerEvents, BarcodePickViewSettings, BarcodePickViewUiListenerEvents, BarcodeSelection, BarcodeSelectionAimerSelection, BarcodeSelectionAutoSelectionStrategy, BarcodeSelectionBasicOverlay, BarcodeSelectionBasicOverlayStyle, BarcodeSelectionBrushProviderEvents, BarcodeSelectionController, BarcodeSelectionFeedback, BarcodeSelectionFreezeBehavior, BarcodeSelectionListenerController, BarcodeSelectionListenerEvents, BarcodeSelectionManualSelectionStrategy, BarcodeSelectionOverlayController, BarcodeSelectionSession, BarcodeSelectionSettings, BarcodeSelectionStrategyType, BarcodeSelectionTapBehavior, BarcodeSelectionTapSelection, BarcodeSelectionTypeName, BarcodeSpatialGrid, BaseBarcodeBatchAdvancedOverlay, BaseBarcodeFindView, BaseBarcodePickView, BaseSparkScanView, BatterySavingMode, BrushForStateObject, Checksum, Code128BarcodeGeneratorBuilder, Code39BarcodeGeneratorBuilder, CompositeFlag, CompositeType, DataMatrixBarcodeGeneratorBuilder, Dot, DotWithIcons, Ean13BarcodeGeneratorBuilder, Ean13UpcaClassification, EncodingRange, InterleavedTwoOfFiveBarcodeGeneratorBuilder, LocalizedOnlyBarcode, PrivateBarcodeSelectionStrategy, PrivateBarcodeSelectionType, QrCodeBarcodeGeneratorBuilder, QrCodeErrorCorrectionLevel, Range, Rectangular, RectangularWithIcons, SparkScan, SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback, SparkScanFeedbackDelegateEvents, SparkScanListenerController, SparkScanListenerEvents, SparkScanMiniPreviewSize, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningModeDefault, SparkScanScanningModeTarget, SparkScanSession, SparkScanSettings, SparkScanToastSettings, SparkScanViewController, SparkScanViewEvents, SparkScanViewSettings, SparkScanViewState, StructuredAppendData, Symbology, SymbologyDescription, SymbologySettings, TargetBarcode, TrackedBarcode, UpcaBarcodeGeneratorBuilder, getBarcodeBatchDefaults, getBarcodeCaptureDefaults, getBarcodeCountDefaults, getBarcodeDefaults, getBarcodeFindDefaults, getBarcodePickDefaults, getBarcodeSelectionDefaults, getSparkScanDefaults, loadBarcodeBatchDefaults, loadBarcodeCaptureDefaults, loadBarcodeCountDefaults, loadBarcodeDefaults, loadBarcodeFindDefaults, loadBarcodePickDefaults, loadBarcodeSelectionDefaults, loadSparkScanDefaults };