scandit-react-native-datacapture-id 7.6.0-beta.1 → 7.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -75,7 +75,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
75
75
  }
76
76
 
77
77
  dependencies {
78
- def sdk_version = "7.6.0-beta.1"
78
+ def sdk_version = "7.6.1"
79
79
 
80
80
  println("Version of the native sdk used in this build: ${safeExtGet("global_sdk_version", sdk_version)}")
81
81
  api project(path: ":scandit-react-native-datacapture-core")
package/dist/id.js CHANGED
@@ -1797,19 +1797,20 @@ class IdCapture extends DefaultSerializeable {
1797
1797
  * Use the public constructor instead and configure the instance manually:
1798
1798
  * ```ts
1799
1799
  * const idCapture = new IdCapture(settings);
1800
- * context.setMode(idCapture);
1800
+ * context.addMode(idCapture);
1801
1801
  * ```
1802
1802
  */
1803
1803
  static forContext(context, settings) {
1804
1804
  const idCapture = new IdCapture(settings);
1805
1805
  if (context) {
1806
- context.setMode(idCapture);
1806
+ context.addMode(idCapture);
1807
1807
  }
1808
1808
  return idCapture;
1809
1809
  }
1810
1810
  constructor(settings) {
1811
1811
  super();
1812
1812
  this.type = 'idCapture';
1813
+ this.modeId = Math.floor(Math.random() * 100000000);
1813
1814
  this._isEnabled = true;
1814
1815
  this._feedback = IdCaptureFeedback.defaultFeedback;
1815
1816
  this.privateContext = null;
@@ -1920,13 +1921,13 @@ class IdCaptureOverlay extends DefaultSerializeable {
1920
1921
  * view.addOverlay(overlay);
1921
1922
  */
1922
1923
  static withIdCaptureForView(idCapture, view) {
1923
- const overlay = new IdCaptureOverlay();
1924
+ const overlay = new IdCaptureOverlay(idCapture);
1924
1925
  if (view) {
1925
1926
  view.addOverlay(overlay);
1926
1927
  }
1927
1928
  return overlay;
1928
1929
  }
1929
- constructor() {
1930
+ constructor(mode) {
1930
1931
  super();
1931
1932
  this.type = 'idCapture';
1932
1933
  this.controller = null;
@@ -1943,6 +1944,7 @@ class IdCaptureOverlay extends DefaultSerializeable {
1943
1944
  this._rejectedBrush = this._defaultRejectedBrush;
1944
1945
  this._frontSideTextHint = null;
1945
1946
  this._backSideTextHint = null;
1947
+ this.modeId = mode.modeId;
1946
1948
  }
1947
1949
  setFrontSideTextHint(text) {
1948
1950
  var _a;