react-native-scanbot-barcode-scanner-sdk 4.0.3 → 4.0.4-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.
package/Libraries.txt CHANGED
@@ -1,4 +1,4 @@
1
- Open Source libraries used in the Scanbot Barcode SDK for React Native version 4.0.3
1
+ Open Source libraries used in the Scanbot Barcode SDK for React Native version 4.0.4-beta.2
2
2
 
3
3
  ```text
4
4
 
@@ -109,7 +109,7 @@ public final class ObjectMapper {
109
109
  final Map<String, Object> pointMap = (Map<String, Object>) value;
110
110
  if (pointMap != null) {
111
111
  final Object widthObj = pointMap.get("width");
112
- final Object heightObj = pointMap.get("width");
112
+ final Object heightObj = pointMap.get("height");
113
113
  if (widthObj != null && heightObj != null) {
114
114
  int x = ((Number) widthObj).intValue();
115
115
  int y = ((Number) heightObj).intValue();
@@ -172,7 +172,6 @@ public class ScanbotBarcodeCameraView extends FrameLayout implements BarcodeDete
172
172
  config.finderInset.bottom);
173
173
  }
174
174
 
175
- finderOverlayView.setFinderMinPadding(config.getFinderMinimumPadding());
176
175
  finderOverlayView.setRequiredAspectRatios(Collections.singletonList(config.getFinderAspectRatio()));
177
176
  finderOverlayView.requestLayout();
178
177
 
@@ -1,6 +1,7 @@
1
1
  package io.scanbot.barcodesdk.plugin.reactnative.components.barcodecameraview;
2
2
 
3
3
  import android.graphics.Color;
4
+ import android.graphics.Rect;
4
5
 
5
6
  import androidx.annotation.NonNull;
6
7
 
@@ -10,7 +11,6 @@ import java.util.ArrayList;
10
11
  import java.util.List;
11
12
 
12
13
  import io.scanbot.barcodesdk.plugin.reactnative.ObjectMapper;
13
- import io.scanbot.barcodesdk.plugin.reactnative.components.base.models.ScanbotFinderInset;
14
14
  import io.scanbot.barcodesdk.plugin.reactnative.utils.JSONUtils;
15
15
  import io.scanbot.sdk.AspectRatio;
16
16
  import io.scanbot.sdk.barcode.BarcodeFilter;
@@ -29,14 +29,13 @@ public class ScanbotBarcodeCameraViewConfiguration {
29
29
  public BarcodeScannerAdditionalConfig additionalConfiguration;
30
30
  public BarcodeFilter barcodeFilter;
31
31
  public BarcodeDensity codeDensity;
32
- public ScanbotFinderInset finderInset;
32
+ public Rect finderInset;
33
33
 
34
34
  // Automatically mapped properties (must have a getter and a setter with the same name)
35
35
  private boolean shouldUseFinderView = false;
36
36
  private int finderLineWidth = 1;
37
37
  private int finderLineColor = Color.WHITE;
38
38
  private int finderBackgroundColor = Color.BLACK;
39
- private int finderMinimumPadding = 64;
40
39
  private float finderBackgroundOpacity = 0.66f;
41
40
  private float cameraZoomFactor = -1;
42
41
  private boolean flashEnabled = false;
@@ -55,10 +54,6 @@ public class ScanbotBarcodeCameraViewConfiguration {
55
54
  this.finderLineColor = viewFinderLineColor;
56
55
  }
57
56
 
58
- public void setFinderMinimumPadding(int finderMinimumPadding) {
59
- this.finderMinimumPadding = finderMinimumPadding;
60
- }
61
-
62
57
  public void setFinderBackgroundColor(@androidx.annotation.ColorInt int viewFinderBackgroundColor) {
63
58
  this.finderBackgroundColor = viewFinderBackgroundColor;
64
59
  }
@@ -87,8 +82,6 @@ public class ScanbotBarcodeCameraViewConfiguration {
87
82
  return finderLineWidth;
88
83
  }
89
84
 
90
- public int getFinderMinimumPadding() { return finderMinimumPadding; }
91
-
92
85
  public int getFinderLineColor() {
93
86
  return finderLineColor;
94
87
  }
@@ -120,7 +113,7 @@ public class ScanbotBarcodeCameraViewConfiguration {
120
113
  */
121
114
  private void populateFinderInset(ReadableMap jsonConfig) {
122
115
  if (jsonConfig.hasKey("finderInset")) {
123
- this.finderInset = new ScanbotFinderInset();
116
+ this.finderInset = new Rect();
124
117
  jsonConfig = jsonConfig.getMap("finderInset");
125
118
  assert jsonConfig != null;
126
119
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-scanbot-barcode-scanner-sdk",
3
3
  "title": "Scanbot Barcode Scanner SDK for React Native",
4
- "version": "4.0.3",
4
+ "version": "4.0.4-beta.2",
5
5
  "scanbot": {
6
6
  "iosVersion": "4.0.2"
7
7
  },
@@ -193,7 +193,7 @@ export class ScanbotBarcodeCameraView extends React.Component<Properties, {}> {
193
193
  outObj.cameraZoomFactor = obj.cameraZoomFactor ?? -1;
194
194
  outObj.finderAspectRatio = obj.finderAspectRatio ?? { width: -1, height: -1 };
195
195
  outObj.finderBackgroundOpacity = obj.finderBackgroundOpacity ?? -1;
196
- outObj.finderInset = obj.finderInset ?? { left: -1, top: -1, right: -1, bottom: -1};
196
+ outObj.finderInset = obj.finderInset
197
197
  outObj.finderLineWidth = obj.finderLineWidth ?? -1;
198
198
  outObj.maximumTextLength = obj.maximumTextLength ?? -1;
199
199
  outObj.minimumTextLength = obj.minimumTextLength ?? -1;
@@ -1,8 +0,0 @@
1
- package io.scanbot.barcodesdk.plugin.reactnative.components.base.models;
2
-
3
- public class ScanbotFinderInset {
4
- public int left = 0;
5
- public int top = 0;
6
- public int right = 0;
7
- public int bottom = 0;
8
- }