react-native-scanbot-barcode-scanner-sdk 4.0.4 → 4.2.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.
- package/LICENSE +1 -1
- package/Libraries.txt +85 -419
- package/RNScanbotBarcodeSDK.podspec +3 -3
- package/android/build.gradle +12 -13
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkModule.kt +179 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkPackage.kt +23 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkPluginResultDelegate.kt +23 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcodecameraview/ScanbotBarcodeCameraView.java +79 -70
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/extensions/JSONObject.kt +90 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/extensions/ReadableMap.kt +53 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/utils/JSONUtils.kt +24 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/utils/ScanbotViewUtils.java +4 -0
- package/android/src/new-architecture/io/scanbot/barcodesdk/plugin/reactnative/components/barcodecameraview/ScanbotBarcodeCameraViewManager.java +0 -2
- package/index.d.ts +24 -29
- package/index.js +9 -2
- package/ios/Components/BarcodeCameraView/NewArchitecture/RTNScanbotBarcodeCameraView.h +0 -1
- package/ios/Components/BarcodeCameraView/NewArchitecture/RTNScanbotBarcodeCameraView.mm +120 -148
- package/ios/Components/BarcodeCameraView/OldArchitecture/RNScanbotBarcodeCameraView.h +0 -31
- package/ios/Components/BarcodeCameraView/OldArchitecture/RNScanbotBarcodeCameraView.mm +45 -158
- package/ios/Components/BarcodeCameraView/OldArchitecture/RNScanbotBarcodeCameraViewManager.mm +0 -1
- package/ios/ScanbotBarcodeSdk.h +1 -12
- package/ios/ScanbotBarcodeSdk.m +64 -489
- package/ios/ScanbotBarcodeSdkPluginResultDelegate.h +18 -0
- package/ios/ScanbotBarcodeSdkPluginResultDelegate.m +36 -0
- package/js/{RTNScanbotBarcodeCameraViewNativeComponent.tsx → RTNScanbotBarcodeCameraViewNativeComponent.ts} +7 -35
- package/package.json +5 -2
- package/src/components/barcode-camera-view/{scanbot-barcode-camera-view-types.tsx → scanbot-barcode-camera-view-types.ts} +57 -16
- package/src/components/barcode-camera-view/scanbot-barcode-camera-view.tsx +14 -4
- package/src/configurations.ts +374 -0
- package/src/customConfigurations.ts +97 -0
- package/src/customResults.ts +6 -0
- package/src/customTypes.ts +10 -0
- package/src/results.ts +38 -0
- package/src/types.ts +1355 -0
- package/android/.project +0 -34
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradlew +0 -185
- package/android/gradlew.bat +0 -89
- package/android/src/main/java/com/reactlibrary/ScanbotBarcodeSdkModule.java +0 -19
- package/android/src/main/java/com/reactlibrary/ScanbotBarcodeSdkPackage.java +0 -38
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ObjectMapper.java +0 -166
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkConfiguration.java +0 -75
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkModule.java +0 -460
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkPackage.java +0 -36
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/StorageUtils.java +0 -108
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/barcode/ScanbotBarcodeDetectorAdditionalConfigBuilder.java +0 -37
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/barcode/ScanbotBarcodeDetectorConfigBuilder.java +0 -45
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcodecameraview/ScanbotBarcodeCameraViewConfiguration.java +0 -195
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/filters/ReactBarcodeExtensionsFilter.java +0 -59
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/utils/JSONUtils.java +0 -440
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/utils/LogUtils.java +0 -43
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/utils/ResponseUtils.java +0 -33
- package/android/src/main/res/drawable/ic_baseline_arrow_back_24.xml +0 -10
- package/android/src/main/res/values/attrs.xml +0 -5
- package/ios/Categories/SBSDKPolygon+JSON.h +0 -16
- package/ios/Categories/SBSDKPolygon+JSON.m +0 -21
- package/ios/Categories/UIColor+JSON.h +0 -14
- package/ios/Categories/UIColor+JSON.m +0 -61
- package/ios/ScanbotBarcodeSDKConfiguration.h +0 -15
- package/ios/ScanbotBarcodeSDKConfiguration.m +0 -13
- package/ios/ScanbotBarcodeSdk.xcodeproj/project.pbxproj +0 -271
- package/ios/ScanbotBarcodeSdk.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/ScanbotBarcodeSdk.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/SharedConfiguration.h +0 -18
- package/ios/SharedConfiguration.m +0 -20
- package/ios/Utils/BarcodeMapping.h +0 -336
- package/ios/Utils/HashUtils.h +0 -46
- package/ios/Utils/JSONMappings.h +0 -25
- package/ios/Utils/LoggingUtils.h +0 -23
- package/ios/Utils/ObjectMapper.h +0 -26
- package/ios/Utils/ObjectMapper.m +0 -143
- package/ios/Utils/ReactBarcodeExtensionsFilter.h +0 -22
- package/ios/Utils/ReactBarcodeExtensionsFilter.m +0 -55
- package/ios/Utils/ScanbotStorageUtils.h +0 -25
- package/ios/Utils/ScanbotStorageUtils.m +0 -111
- package/src/configuration.ts +0 -328
- package/src/enum.ts +0 -106
- package/src/model.ts +0 -104
- package/src/result.ts +0 -45
- /package/src/components/barcode-camera-view/{scanbot-native-barcode-camera-view.tsx → scanbot-native-barcode-camera-view.ts} +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { CompressFormat } from "./customTypes";
|
|
2
|
+
import { BarcodeDocumentFormat, BarcodeFormat, CodeDensity, EngineMode, Gs1HandlingMode, MSIPlesseyChecksumAlgorithm } from "./types";
|
|
3
|
+
|
|
4
|
+
interface InternalBarcodeDetectionCommonParameters {
|
|
5
|
+
/**
|
|
6
|
+
* Accepted barcode formats
|
|
7
|
+
*/
|
|
8
|
+
barcodeFormats?: BarcodeFormat[];
|
|
9
|
+
/**
|
|
10
|
+
* An optional array of barcode document formats that act as a detection filter.
|
|
11
|
+
* By default all supported document formats will be detected.
|
|
12
|
+
*/
|
|
13
|
+
acceptedDocumentFormats?: BarcodeDocumentFormat[];
|
|
14
|
+
/**
|
|
15
|
+
* Barcode scanner engine mode. Default is NEXT_GEN
|
|
16
|
+
*/
|
|
17
|
+
engineMode?: EngineMode;
|
|
18
|
+
/**
|
|
19
|
+
* Optional minimum required text length of the detected barcode.
|
|
20
|
+
* The default is 0 (setting is turned off).
|
|
21
|
+
* NOTE: This feature works on ITF barcodes only.
|
|
22
|
+
*/
|
|
23
|
+
minimumTextLength?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Optional maximum required text length of the detected barcode.
|
|
26
|
+
* The default is 0 (setting is turned off).
|
|
27
|
+
* NOTE: This feature works on ITF barcodes only.
|
|
28
|
+
*/
|
|
29
|
+
maximumTextLength?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Optional minimum required quiet zone on the barcode.
|
|
32
|
+
* Measured in modules (the size of minimal bar on the barcode).
|
|
33
|
+
* The default is 10.
|
|
34
|
+
* NOTE: This feature works on ITF barcodes only.
|
|
35
|
+
*/
|
|
36
|
+
minimum1DBarcodesQuietZone?: number;
|
|
37
|
+
/** The GS1 handling mode. The default value is PARSE. */
|
|
38
|
+
gs1HandlingMode?: Gs1HandlingMode;
|
|
39
|
+
/**
|
|
40
|
+
* With this option enabled, the scanner removes checks digits for UPC, EAN and MSI Plessey codes.
|
|
41
|
+
* Has no effect if both single and double digit MSI Plessey checksums are enabled.
|
|
42
|
+
* The default is `false`
|
|
43
|
+
*/
|
|
44
|
+
stripCheckDigits?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The checksum algorithm for MSI Plessey barcodes.
|
|
47
|
+
* The default value is Mod10.
|
|
48
|
+
*/
|
|
49
|
+
msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm;
|
|
50
|
+
/**
|
|
51
|
+
* If `true`, enabled the mode which slightly decreases the scanning quality and the energy consumption, and increases the scanning speed. If `false` - mode is disabled. The default is `false`. Android only.
|
|
52
|
+
* */
|
|
53
|
+
lowPowerMode?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The expected density of QR codes in an image.
|
|
56
|
+
*/
|
|
57
|
+
codeDensity?: CodeDensity;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface DetectBarcodesOnImageArguments extends InternalBarcodeDetectionCommonParameters {
|
|
61
|
+
/**
|
|
62
|
+
* The input image file URI
|
|
63
|
+
*/
|
|
64
|
+
imageFileUri: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface PdfExtractorArguments {
|
|
68
|
+
/**
|
|
69
|
+
* The location of the PDF file
|
|
70
|
+
*/
|
|
71
|
+
pdfFilePath: string;
|
|
72
|
+
/**
|
|
73
|
+
* The quality that each extracted image should have.
|
|
74
|
+
* This tweaks the compression, affecting the final image file size.
|
|
75
|
+
* (100: maximum quality, 0: minimum quality)
|
|
76
|
+
*
|
|
77
|
+
* Default value is 90
|
|
78
|
+
*/
|
|
79
|
+
quality?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Integer scaling factor applied to the PDF media box frame while extracting.
|
|
82
|
+
* Affects the output image quality.
|
|
83
|
+
* In most cases the recommended value is 2 or higher.
|
|
84
|
+
*
|
|
85
|
+
* Default value is 2.
|
|
86
|
+
*/
|
|
87
|
+
scaling?: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface ExtractImagesFromPdfArguments extends PdfExtractorArguments {
|
|
91
|
+
/**
|
|
92
|
+
* Compress format used for extracted images. Android only.
|
|
93
|
+
*
|
|
94
|
+
* Default value is JPEG.
|
|
95
|
+
*/
|
|
96
|
+
compressFormat?: CompressFormat
|
|
97
|
+
}
|
package/src/results.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BarcodeResultField,
|
|
3
|
+
DetectBarcodesOnImagesField,
|
|
4
|
+
LicenseStatus,
|
|
5
|
+
} from './types';
|
|
6
|
+
|
|
7
|
+
export interface BarcodeScannerResult {
|
|
8
|
+
/** The array of detected barcodes */
|
|
9
|
+
barcodes?: BarcodeResultField[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface BatchBarcodeScannerResult extends BarcodeScannerResult {}
|
|
13
|
+
|
|
14
|
+
export interface DetectBarcodesOnImageResult {
|
|
15
|
+
/** The detected barcodes */
|
|
16
|
+
barcodes: BarcodeResultField[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface DetectBarcodesOnImagesResult {
|
|
20
|
+
/** An array for which each element has a imageUri and the list of detected barcodes */
|
|
21
|
+
results: DetectBarcodesOnImagesField[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ExtractImagesFromPdfResult {
|
|
25
|
+
/** The URIs of the extracted images */
|
|
26
|
+
imageFilesUrls: string[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface GetLicenseInfoResult {
|
|
30
|
+
/** True if the license is valid, false otherwise */
|
|
31
|
+
isLicenseValid: boolean;
|
|
32
|
+
/** The license status */
|
|
33
|
+
licenseStatus: LicenseStatus;
|
|
34
|
+
/** Detailed license status message for development and debug purposes */
|
|
35
|
+
licenseStatusMessage?: string;
|
|
36
|
+
/** The license expiration date in milliseconds */
|
|
37
|
+
licenseExpirationDate?: number;
|
|
38
|
+
}
|