react-native-scanbot-barcode-scanner-sdk 3.5.1-alpha2 → 3.6.0-alpha.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.
- package/Libraries.txt +1 -3
- package/RNScanbotBarcodeSDK.podspec +1 -1
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/barcode/ScanbotBarcodeDetectorAdditionalConfigBuilder.java +0 -1
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/utils/JSONUtils.java +2 -10
- package/ios/Components/BarcodeCameraView/RNScanbotBarcodeCameraView.h +0 -1
- package/ios/Components/BarcodeCameraView/RNScanbotBarcodeCameraView.m +0 -4
- package/ios/Utils/BarcodeMapping.h +1 -0
- package/package.json +5 -3
- package/src/components/barcode-camera-view/scanbot-barcode-camera-view-types.tsx +5 -4
- package/src/components/barcode-camera-view/scanbot-barcode-camera-view.tsx +7 -8
- package/src/components/barcode-camera-view/scanbot-native-barcode-camera-view.tsx +2 -2
- package/src/configuration.ts +0 -8
- package/src/enum.ts +2 -1
- package/android/.gradle/6.8/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.8/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
package/Libraries.txt
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
Open Source libraries used in the Scanbot Barcode SDK for React Native version 3.5.
|
|
1
|
+
Open Source libraries used in the Scanbot Barcode SDK for React Native version 3.5.1
|
|
2
2
|
|
|
3
3
|
------------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
Open Source libraries used in the Scanbot Barcode Scanner SDK for iOS version 3.5.0:
|
|
6
|
-
|
|
7
5
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
8
6
|
|
|
9
7
|
backward-cpp
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Thu
|
|
2
|
-
gradle.version=
|
|
1
|
+
#Thu Apr 20 12:17:41 CEST 2023
|
|
2
|
+
gradle.version=7.1.1
|
package/android/build.gradle
CHANGED
|
@@ -31,7 +31,6 @@ class ScanbotBarcodeDetectorAdditionalConfigBuilder implements Function1<Barcode
|
|
|
31
31
|
builder.setGs1DecodingEnabled(config.getGs1DecodingEnabled());
|
|
32
32
|
builder.setMsiPlesseyChecksumAlgorithms(config.getMsiPlesseyChecksumAlgorithms());
|
|
33
33
|
builder.setCodeDensity(config.getCodeDensity());
|
|
34
|
-
builder.setDecodeStacks1D(config.getDecodeStacks1D());
|
|
35
34
|
|
|
36
35
|
return Unit.INSTANCE;
|
|
37
36
|
}
|
|
@@ -205,12 +205,6 @@ public final class JSONUtils {
|
|
|
205
205
|
changed = true;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
int decodeStacks1D = BarcodeScannerAdditionalConfig.DEFAULT_DECODE_STACKS_1D;
|
|
209
|
-
if (configuration.hasKey("decodeStacks1D")) {
|
|
210
|
-
decodeStacks1D = configuration.getInt("decodeStacks1D");
|
|
211
|
-
changed = true;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
208
|
return changed ? new BarcodeScannerAdditionalConfig(
|
|
215
209
|
minimumTextLength,
|
|
216
210
|
maximumTextLength,
|
|
@@ -219,8 +213,7 @@ public final class JSONUtils {
|
|
|
219
213
|
msiPlesseyChecksumAlgorithms,
|
|
220
214
|
stripCheckDigits,
|
|
221
215
|
lowPowerMode,
|
|
222
|
-
codeDensity
|
|
223
|
-
decodeStacks1D
|
|
216
|
+
codeDensity
|
|
224
217
|
) : null;
|
|
225
218
|
}
|
|
226
219
|
|
|
@@ -235,8 +228,7 @@ public final class JSONUtils {
|
|
|
235
228
|
config.getMsiPlesseyChecksumAlgorithms(),
|
|
236
229
|
config.getStripCheckDigits(),
|
|
237
230
|
config.getLowPowerMode(),
|
|
238
|
-
config.getCodeDensity()
|
|
239
|
-
config.getDecodeStacks1D()
|
|
231
|
+
config.getCodeDensity()
|
|
240
232
|
) : null;
|
|
241
233
|
}
|
|
242
234
|
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
@property (nonatomic) SBSDKBarcodeEngineMode engineMode;
|
|
55
55
|
@property (nonatomic) SBSDKUIBarcodeFilter* _Nullable barcodeFilter;
|
|
56
56
|
@property (nonatomic) SBSDKBarcodeDensity codeDensity;
|
|
57
|
-
@property (nonatomic, copy) NSNumber* _Nullable decodeStacks1D;
|
|
58
57
|
@property (nonatomic) UIEdgeInsets finderInset;
|
|
59
58
|
@end
|
|
60
59
|
|
|
@@ -144,9 +144,6 @@
|
|
|
144
144
|
if (_cameraViewConfiguration.codeDensity) {
|
|
145
145
|
additionalParameters.codeDensity = _cameraViewConfiguration.codeDensity;
|
|
146
146
|
}
|
|
147
|
-
if (_cameraViewConfiguration.decodeStacks1D) {
|
|
148
|
-
additionalParameters.decodeStacks1D = [_cameraViewConfiguration.decodeStacks1D intValue];
|
|
149
|
-
}
|
|
150
147
|
|
|
151
148
|
viewController.additionalDetectionParameters = additionalParameters;
|
|
152
149
|
|
|
@@ -280,7 +277,6 @@
|
|
|
280
277
|
self.engineMode = -1;
|
|
281
278
|
self.flashEnabled = nil;
|
|
282
279
|
self.finderInset = UIEdgeInsetsMake(32, 32, 32, 32);
|
|
283
|
-
self.decodeStacks1D = nil;
|
|
284
280
|
}
|
|
285
281
|
return self;
|
|
286
282
|
}
|
|
@@ -30,6 +30,7 @@ static inline SBSDKBarcodeType* barcodeTypeFromString(NSString* string) {
|
|
|
30
30
|
if ([string isEqualToString:@"RSS_EXPANDED"]) return SBSDKBarcodeTypeRSSExpanded;
|
|
31
31
|
if ([string isEqualToString:@"IATA_2_OF_5"]) return SBSDKBarcodeTypeIATA2Of5;
|
|
32
32
|
if ([string isEqualToString:@"INDUSTRIAL_2_OF_5"]) return SBSDKBarcodeTypeIndustrial2Of5;
|
|
33
|
+
if ([string isEqualToString:@"CODE_25"]) return SBSDKBarcodeTypeCode25;
|
|
33
34
|
return nil;
|
|
34
35
|
}
|
|
35
36
|
|
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": "3.
|
|
4
|
+
"version": "3.6.0-alpha.1",
|
|
5
5
|
"description": "Scanbot Barcode Scanner SDK React Native Plugin for Android and iOS",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
|
@@ -46,8 +46,10 @@
|
|
|
46
46
|
"react-native": ">=0.60 <1.0.x"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"react": "^
|
|
50
|
-
"react-native": "^0.
|
|
49
|
+
"@types/react": "^18.2.6",
|
|
50
|
+
"@types/react-native": "^0.72.0",
|
|
51
|
+
"react": "^18.2.0",
|
|
52
|
+
"react-native": "^0.71.8"
|
|
51
53
|
},
|
|
52
54
|
"contributors": [
|
|
53
55
|
{
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { forSlideLeft } from '@react-navigation/stack/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators';
|
|
2
1
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { BarcodeResult } from 'react-native-scanbot-barcode-scanner-sdk';
|
|
4
|
-
import { BarcodeAdditionalParameters } from 'react-native-scanbot-barcode-scanner-sdk/src/configuration';
|
|
5
2
|
import {
|
|
6
3
|
BarcodeDocumentFormat,
|
|
7
4
|
BarcodeFilter,
|
|
8
5
|
BarcodeFormat,
|
|
9
6
|
EngineMode,
|
|
10
7
|
} from '../../enum';
|
|
11
|
-
import { FinderAspectRatio
|
|
8
|
+
import { FinderAspectRatio } from '../../model';
|
|
9
|
+
|
|
10
|
+
import { BarcodeResult } from '../../result';
|
|
11
|
+
import { BarcodeAdditionalParameters } from '../../configuration';
|
|
12
12
|
|
|
13
13
|
export interface ScanbotBarcodeCameraViewProperties {
|
|
14
14
|
onBarcodeScannerResult?: (result: BarcodeResult) => void;
|
|
15
15
|
requestComponentReload?: () => void;
|
|
16
16
|
configuration?: ScanbotBarcodeCameraViewConfiguration;
|
|
17
17
|
style: StyleProp<ViewStyle>;
|
|
18
|
+
children: React.ReactNode;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export interface ScanbotBarcodeCameraViewBarcode {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {EmitterSubscription, findNodeHandle, NativeMethods, Platform, UIManager} from 'react-native';
|
|
3
|
-
import {Dimensions} from 'react-native';
|
|
4
|
-
import {ScanbotBarcodeCameraViewProperties} from './scanbot-barcode-camera-view-types';
|
|
2
|
+
import { EmitterSubscription, findNodeHandle, NativeMethods, Platform, UIManager } from 'react-native';
|
|
3
|
+
import { Dimensions } from 'react-native';
|
|
4
|
+
import { ScanbotBarcodeCameraViewProperties } from './scanbot-barcode-camera-view-types';
|
|
5
5
|
import ScanbotNativeBarcodeCameraView from './scanbot-native-barcode-camera-view';
|
|
6
6
|
|
|
7
7
|
const Device = {
|
|
@@ -23,7 +23,7 @@ type Properties = ScanbotBarcodeCameraViewProperties;
|
|
|
23
23
|
export class ScanbotBarcodeCameraView extends React.Component<Properties, {}> {
|
|
24
24
|
|
|
25
25
|
// Camera View Reference
|
|
26
|
-
cameraViewReference: React.RefObject<React.Component<ScanbotBarcodeCameraViewProperties
|
|
26
|
+
cameraViewReference: React.RefObject<React.Component<ScanbotBarcodeCameraViewProperties> & Readonly<NativeMethods>>
|
|
27
27
|
|
|
28
28
|
// String length of auto-generated component key
|
|
29
29
|
static UNIQUE_VIEW_KEY_LENGTH = 6;
|
|
@@ -115,7 +115,6 @@ export class ScanbotBarcodeCameraView extends React.Component<Properties, {}> {
|
|
|
115
115
|
style={style}
|
|
116
116
|
key={this.cameraKey}
|
|
117
117
|
ref={this.cameraViewReference}
|
|
118
|
-
|
|
119
118
|
onBarcodeScannerResult={this._onBarcodeScannerResult}
|
|
120
119
|
/>
|
|
121
120
|
);
|
|
@@ -166,13 +165,13 @@ export class ScanbotBarcodeCameraView extends React.Component<Properties, {}> {
|
|
|
166
165
|
|
|
167
166
|
preprocessStyle = () => {
|
|
168
167
|
const style = this.props.style as any;
|
|
169
|
-
const newStyle = {...style} || {};
|
|
168
|
+
const newStyle = { ...style } || {};
|
|
170
169
|
// Override / Define styles here
|
|
171
170
|
return newStyle;
|
|
172
171
|
};
|
|
173
172
|
|
|
174
173
|
preprocessProps = () => {
|
|
175
|
-
const props = {...this.props};
|
|
174
|
+
const props = { ...this.props };
|
|
176
175
|
delete props.style;
|
|
177
176
|
return props;
|
|
178
177
|
};
|
|
@@ -212,7 +211,7 @@ export class ScanbotBarcodeCameraView extends React.Component<Properties, {}> {
|
|
|
212
211
|
if (!viewId) {
|
|
213
212
|
return;
|
|
214
213
|
}
|
|
215
|
-
this.sendCommandToViewId(viewId, command, args);
|
|
214
|
+
this.sendCommandToViewId(viewId, command, args);
|
|
216
215
|
}
|
|
217
216
|
|
|
218
217
|
sendCommandToViewId = (viewId: number, command: string, args: any = []) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {requireNativeComponent} from 'react-native';
|
|
2
|
-
import {ScanbotBarcodeCameraViewProperties} from './scanbot-barcode-camera-view-types';
|
|
1
|
+
import { requireNativeComponent } from 'react-native';
|
|
2
|
+
import { ScanbotBarcodeCameraViewProperties } from './scanbot-barcode-camera-view-types';
|
|
3
3
|
|
|
4
4
|
export default requireNativeComponent<ScanbotBarcodeCameraViewProperties>(
|
|
5
5
|
'ScanbotBarcodeCameraView',
|
package/src/configuration.ts
CHANGED
|
@@ -255,12 +255,4 @@ export interface BarcodeAdditionalParameters {
|
|
|
255
255
|
* High density. Finds up to 24 QR codes in one image or video frame.
|
|
256
256
|
*/
|
|
257
257
|
codeDensity?: CodeDensity;
|
|
258
|
-
/**
|
|
259
|
-
* The number of stacks to split a 1D barcode crop before extracting its scanlines. For stacked RSS barcodes,
|
|
260
|
-
* this should be set to the number of stacks with which the barcode was printed.
|
|
261
|
-
* For other barcode formats, the default of 1 works fine.
|
|
262
|
-
* Setting it higher will slightly increase the recognition time, improve the performance of hard barcodes
|
|
263
|
-
* and possibly increase the number of false positives.
|
|
264
|
-
*/
|
|
265
|
-
decodeStacks1D?: Number;
|
|
266
258
|
}
|
package/src/enum.ts
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|