barkoder-nativescript 0.0.8 → 1.0.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/README.md +115 -0
- package/barkoder-nativescript.android.ts +31 -31
- package/barkoder-nativescript.common.ts +6 -6
- package/barkoder-nativescript.ios.ts +25 -25
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# barKoder Barcode Scanner SDK for mobile Nativescript Apps
|
|
2
|
+
## Ultimate software-based barcode scanning solution for Nativescript
|
|
3
|
+
|
|
4
|
+
The [barKoder Barcode Scanner SDK](https://barkoder.com/barcode-scanner-sdk) Nativescript plugin grants an easy to use Nativescript solution with a great and option-rich interface that can be integrated in both iOS and Android apps. Integrating the barKoder Barcode Scanner SDK into your Enterprise or Consumer-facing mobile apps will instantly transform your user's smartphones and tablets into rugged barcode scanning devices without the need to procure and maintain expensive and sluggish hardware devices that have a very short life span.
|
|
5
|
+
|
|
6
|
+
Even though the barKoder barcode scanner SDK is a relatively new product, it is already more advanced than any competitor API's. Its robust barcode reading engine can be used to read the content of the most widely used barcodes with lightning fast speed and unprecedented recognition rate:
|
|
7
|
+
|
|
8
|
+
1D - [Codabar](https://barkoder.com/barcode-types/codaba), [Code 11](https://barkoder.com/barcode-types/code-11), [Code 25](https://barkoder.com/barcode-types/code-25), [Code 39](https://barkoder.com/barcode-types/code-39), [Code 93](https://barkoder.com/barcode-types/code-93), [Code 128](https://barkoder.com/barcode-types/code-128), [DotCode](https://barkoder.com/barcode-types/dotcode), [EAN-8](https://barkoder.com/barcode-types/ean-upc-code), [EAN-13](https://barkoder.com/barcode-types/ean-upc-code), [Interleaved 2 of 5](https://barkoder.com/barcode-types/code-25), [ITF-14](https://barkoder.com/barcode-types/code-25), [MSI Plessey](https://barkoder.com/barcode-types/msi-plessey), [Pharmacode](https://barkoder.com/barcode-types/code-32), [Telepen](https://barkoder.com/barcode-types/telepen), [UPC-A](https://barkoder.com/barcode-types/ean-upc-code) & [UPC-E](https://barkoder.com/barcode-types/ean-upc-code)
|
|
9
|
+
2D - [Aztec Code](https://barkoder.com/barcode-types/aztec), [Aztec Compact](https://barkoder.com/barcode-types/aztec), [Data Matrix](https://barkoder.com/barcode-types/data-matrix), [DotCode](https://barkoder.com/barcode-types/dotcode),[PDF417](https://barkoder.com/barcode-types/pdf417), [Micro PDF417](https://barkoder.com/barcode-types/pdf417), [QR Code](https://barkoder.com/barcode-types/qr-code) & [Micro QR Code](https://barkoder.com/barcode-types/qr-code)
|
|
10
|
+
|
|
11
|
+
The [barKoder SDK](https://barkoder.com/) features multiple algorithms that handle a wide variety of barcode scanning scenarios with unprecedented performance in terms of speed and success rate:
|
|
12
|
+
* [DPM Mode](https://barkoder.com/dpm-barcode-scanner-sdk) - Specially designed scanning template for decoding Data Matrix barcodes engraved using any Direct Part Marking (DPM) technique;
|
|
13
|
+
* [MatrixSight](https://barkoder.com/matrixsight) - MatrixSight® is the ultimate 2D barcode recognition system. Its capabilities transcend beyond anything that a traditional barcode scanner, be that hardware or software-based, can achieve. Simply put, there's no QR Code or Data Matrix barcode that is safe from the barKoder MatrixSight® algorithm. They can have absolutely no finder, alignment or timing patters and can even miss entire data segments but that still won't keep their data safe from being read;
|
|
14
|
+
* [Segment Decoding](https://barkoder.com/segment-decoding) - The advanced barcode localization logics that are part of the Segment Decoding® technique elevated the barKoder SDK into the most powerful scanning API when it comes to 1D barcode recognition, regardless whether the barcodes have been deformed, crumpled, wrinkled and otherwise altered. Even if it goes to a degree where a straight line can't pass through all its bars, a limitation that other decoders, including hardware ones can't alleviate. Segment Decoding® is unmatched in its performance levels and pattern matching capabilities, amortizing even the highest degree of barcode damages, including printing errors, label damage, scanner angles, low print quality, as well as various other levels of physical damage or environmental conditionings. The fact that the data can be extracted even from 1D barcodes that have significant deformations along their Z axis, makes barKoder especially handy when trying to recognize barcodes found on test tubes, bottles and other surfaces with rounded, curved, hollowed or otherwise irregular shapes;
|
|
15
|
+
* [VIN Barcode Scanning Mode](https://barkoder.com/vin-scanning-mode) - When you combine MatrixSight® & Segment Decoding®, the result is breathtaking and leads to the most advanced VIN barcode scanner on the market, able to capture the data even within the most stubborn & difficult to read VIN-powered Code 39, Code 128, Data Matrix & QR Codes;
|
|
16
|
+
* [DeBlur Mode](https://barkoder.com/deblur-mode) - Whether there's lens, motion or focus blur present in EAN or UPC barcodes, the barKoder DeBlur Mode alleviates it fully and doesn't allow the scanning experience to suffer;
|
|
17
|
+
* [PDF417-LineSight](https://barkoder.com/pdf417-linesight) - The robust PDF417 barcode scanner SDK that is offered by barKoder can detect even the most severely damaged PDF417 codes, including samples missing their start and stop patterns, stop row indicators or even entire data columns, making it the sublime choice for apps that need to reliably scan US or Canadian driver's licenses, South African vehicle license discs or driver's licenses, as well as various types of ID's such as Military, Argentinian, Colombian or South African Smart ID Cards.
|
|
18
|
+
* [Batch MultiScan](https://barkoder.com/batch-multiscan) - The Batch MultiScan feature of the barKoder Barcode Scanner SDK for mobile apps and websites, will enable your users to decode multiple barcodes regardless of their type or size in one go. The barKoder API covers all common 1D and 2D barcode symbologies, enabling intuitive and fast data capture while delivering an accuracy of at least 99%, even under the most difficult scanning conditions. Whether in inventory counting, on the last mile or in manufacturing, our fast and accurate Batch MultiScan algorithm greatly increases efficiency and helps create friction-less internal and external processes. The Batch MultiScan works with smartphones, tablets and industrial cameras, enabling true mobility wherever it’s applied.
|
|
19
|
+
* [DPM Recognition Mode](https://barkoder.com/dpm-barcode-scanner-sdk) - barKoder SDK's unique algorithms and features provided all the necessary conditions for creating a special mode for decoding even the most challenging Data Matrix barcodes, i.e. those engraved utilizing the Direct Part Marking (DPM) methods, something that previously was only possible with extremely expensive and specialized hardware scanners. Now all you need to achieve such barcode reading levels is your own personal smart device!
|
|
20
|
+
|
|
21
|
+
You can check out our free demo app Barcode Scanner by barKoder available both via [Apple App Store](https://apps.apple.com/us/app/barkoder-scanner/id6443715409?uo=2) & [Google Play Store](https://play.google.com/store/apps/details?id=com.barkoder.demoscanner).
|
|
22
|
+
|
|
23
|
+
## Trial License
|
|
24
|
+
|
|
25
|
+
If you run the barKoder Barcode Scanner SDK without a valid trial or production license, all results upon successful barcode scans will be partially masked by asterisks (*). You can get a trial license simply by [registering on the barKoder Portal](https://barkoder.com/register) and utilizing the self-service for [Evaluation License Generation](https://barkoder.com/spr/new)! Each trial license will be good for an initial duration of 30 days and can be deployed to up to 25 devices. For any custom requirements, contact our sales team via sales@barkoder.com
|
|
26
|
+
|
|
27
|
+
Note that a trial license is only supposed to be utilized in a development or staging environment.
|
|
28
|
+
|
|
29
|
+
## Free Developer Support
|
|
30
|
+
|
|
31
|
+
Our support is completely free for integration or testing purposes and granted through the [barKoder Portal](https://barkoder.com/login). After registering and logging into your account, you only need to submit a [Support Issue](https://barkoder.com/issues) form. Alternatively, you can contact us by email via support@barkoder.com.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Installation Guide for barKoder's Nativescript Barcode Reader SDK
|
|
35
|
+
|
|
36
|
+
This is a guide for the barKoder [React Native Plugin](https://barkoder.com/flutter-and-react). Follow these simple steps below to use the barkoder-react-native package in your React project:
|
|
37
|
+
|
|
38
|
+
## 1. Prepare environment
|
|
39
|
+
Install the dependencies and [setup your environment](https://docs.nativescript.org/setup)
|
|
40
|
+
|
|
41
|
+
## 2. Add our barkoder-nativescript package
|
|
42
|
+
To add the **barkoder-nativescript** package to your project, you have two options. You can either use the **barkoder-nativescript** package from **npm** or from a local path.
|
|
43
|
+
|
|
44
|
+
To use the package from [npm](https://www.npmjs.com/package/barkoder-nativescript) run this command:
|
|
45
|
+
|
|
46
|
+
```c
|
|
47
|
+
npm i barkoder-nativescript
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
if you are using **NPM** in your project.
|
|
51
|
+
|
|
52
|
+
If you prefer to use a local package, download the package from [https://barkoder.com](https://barkoder.com/repository), unzip the archive and add the package with setting the package path
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
tns plugin add <path to barkoder-nativescript package>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 3. Import package
|
|
59
|
+
Import the **Barkoder Constants** in your project with:
|
|
60
|
+
```typescript
|
|
61
|
+
import { BarkoderConstants } from 'barkoder-nativescript/barkoder-nativescript.common';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 4. BarkoderView
|
|
65
|
+
At this point the **barkoder-nativescript** package is installed and imported in your project. Next step is to add the **BarkoderView** in your layout.
|
|
66
|
+
```xml
|
|
67
|
+
|
|
68
|
+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo"
|
|
69
|
+
xmlns:Barkoder="barkoder-nativescript/barkoder-nativescript.common">
|
|
70
|
+
...
|
|
71
|
+
|
|
72
|
+
<Barkoder:BarkoderView id="barkoderView" class="scanner-container" width="100%" height="70%"/>
|
|
73
|
+
|
|
74
|
+
...
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 5. Init BarkoderView in View-Model and set the License Key
|
|
79
|
+
Inside **View-Model** we need to init a BarkoderView from layout xml.
|
|
80
|
+
```typescript
|
|
81
|
+
export class HelloWorldModel extends Observable implements BarkoderConstants.BarkoderResultCallback {
|
|
82
|
+
private barkoderView : any
|
|
83
|
+
constructor(args) {
|
|
84
|
+
super()
|
|
85
|
+
|
|
86
|
+
this.barkoderView = args.object.page.getViewById('barkoderView');
|
|
87
|
+
this.barkoderView.setLicenseKey("License_Key")
|
|
88
|
+
|
|
89
|
+
}
|
|
90
|
+
scanningFinished(results: any[], thumbnails: any[], resultImage: any): void {
|
|
91
|
+
console.log(`${results[0].textualData}`)
|
|
92
|
+
console.log(`${results[0].barcodeTypeName}`)
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## 6. Ready to Scan Event
|
|
97
|
+
SDK is fully initialized and ready for configuration or to start the scanning process.
|
|
98
|
+
```typescript
|
|
99
|
+
|
|
100
|
+
this.barkoderView.startScanning(this)
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
For the complete usage of the **barkoder-nativescript** package please check our sample.
|
|
104
|
+
|
|
105
|
+
## 7. Camera permissions
|
|
106
|
+
Our SDK requires camera permission to be granted in order to use scanning features.On Android, you specify the permissions in App_Resources/Android/src/main/AndroidManifest.xml. However, this plugin specifies the required permissions for you. [@nativescript/camera](https://www.npmjs.com/package/@nativescript/camera)
|
|
107
|
+
. For iOS you need to specify camera permission in **Info.plist** file inside your project
|
|
108
|
+
```swift
|
|
109
|
+
<key>NSCameraUsageDescription</key>
|
|
110
|
+
<string>Camera permission</string>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## 8. Licensing
|
|
114
|
+
The SDK will scan barcodes even without a valid license; however all results will be randomly masked with (*) Asterisk characters. By using our software you are agreeing to our [End User License Agreement](https://barkoder.com/EULA). To obtain a valid license, one should create an account [here](https://barkoder.com/register) and either get a trial license (to test the software out) or procure a production license that can be used within a live app.
|
|
115
|
+
|
|
@@ -28,10 +28,10 @@ export class BarkoderViewAndroid extends View {
|
|
|
28
28
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
startScanning(
|
|
31
|
+
startScanning(BarkoderResultCallback: BarkoderConstants.BarkoderResultCallback): void {
|
|
32
32
|
const resultCallback = new com.barkoder.interfaces.BarkoderResultCallback({
|
|
33
33
|
scanningFinished: (results: any[], thumbnails: any[], resultImage: any) => {
|
|
34
|
-
|
|
34
|
+
BarkoderResultCallback.scanningFinished(results, thumbnails, resultImage);
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
this.bkdView.startScanning(resultCallback);
|
|
@@ -54,8 +54,8 @@ export class BarkoderViewAndroid extends View {
|
|
|
54
54
|
this.bkdView.isFlashAvailable(isFlashAvailableCallback)
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
setFlashEnabled(
|
|
58
|
-
this.bkdView.setFlashEnabled(
|
|
57
|
+
setFlashEnabled(enabled : boolean) : void {
|
|
58
|
+
this.bkdView.setFlashEnabled(enabled)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
getMaxZoomFactor(callback : BarkoderConstants.MaxZoomAvailableCallback) {
|
|
@@ -67,8 +67,8 @@ export class BarkoderViewAndroid extends View {
|
|
|
67
67
|
this.bkdView.getMaxZoomFactor(MaxZoomCallback)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
setZoomFactor(
|
|
71
|
-
this.bkdView.setZoomFactor(
|
|
70
|
+
setZoomFactor(zoomFactor : number) : void {
|
|
71
|
+
this.bkdView.setZoomFactor(zoomFactor)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
getLocationLineColorHex() : any {
|
|
@@ -146,8 +146,8 @@ export class BarkoderViewAndroid extends View {
|
|
|
146
146
|
return this.bkdView.config.getDecoderConfig().formattingType
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
setLocationLineWidth(
|
|
150
|
-
const roundedValue = Math.round(
|
|
149
|
+
setLocationLineWidth(width : number) : void {
|
|
150
|
+
const roundedValue = Math.round(width * 100) / 100;
|
|
151
151
|
this.bkdView.config.setLocationLineWidth(roundedValue);
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -183,8 +183,8 @@ export class BarkoderViewAndroid extends View {
|
|
|
183
183
|
return this.bkdConfig.GetThreadsLimit()
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
setThreadsLimit(
|
|
187
|
-
this.bkdConfig.SetThreadsLimit(
|
|
186
|
+
setThreadsLimit(threadsLimit : number) : void {
|
|
187
|
+
this.bkdConfig.SetThreadsLimit(threadsLimit)
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
isLocationInPreviewEnabled() : Promise <any> {
|
|
@@ -276,52 +276,52 @@ export class BarkoderViewAndroid extends View {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
setMsiCheckSumType(msiCheckSumType : BarkoderConstants.
|
|
279
|
+
setMsiCheckSumType(msiCheckSumType : BarkoderConstants.MsiChecksumType) {
|
|
280
280
|
switch (msiCheckSumType) {
|
|
281
|
-
case BarkoderConstants.
|
|
281
|
+
case BarkoderConstants.MsiChecksumType.Disabled:
|
|
282
282
|
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Disabled
|
|
283
283
|
break;
|
|
284
|
-
case BarkoderConstants.
|
|
284
|
+
case BarkoderConstants.MsiChecksumType.Mod10:
|
|
285
285
|
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod10
|
|
286
286
|
break;
|
|
287
|
-
case BarkoderConstants.
|
|
287
|
+
case BarkoderConstants.MsiChecksumType.Mod11:
|
|
288
288
|
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod11
|
|
289
289
|
break;
|
|
290
|
-
case BarkoderConstants.
|
|
290
|
+
case BarkoderConstants.MsiChecksumType.Mod1010:
|
|
291
291
|
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod1010
|
|
292
292
|
break;
|
|
293
|
-
case BarkoderConstants.
|
|
293
|
+
case BarkoderConstants.MsiChecksumType.Mod1110:
|
|
294
294
|
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod1110
|
|
295
295
|
break;
|
|
296
|
-
case BarkoderConstants.
|
|
296
|
+
case BarkoderConstants.MsiChecksumType.Mod11IBM:
|
|
297
297
|
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod11IBM
|
|
298
298
|
break;
|
|
299
|
-
case BarkoderConstants.
|
|
299
|
+
case BarkoderConstants.MsiChecksumType.Mod1110IBM:
|
|
300
300
|
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod1110IBM
|
|
301
301
|
break;
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
setCode39CheckSumType(code39ChecksumType : BarkoderConstants.
|
|
305
|
+
setCode39CheckSumType(code39ChecksumType : BarkoderConstants.Code39ChecksumType) {
|
|
306
306
|
switch(code39ChecksumType) {
|
|
307
|
-
case BarkoderConstants.
|
|
307
|
+
case BarkoderConstants.Code39ChecksumType.Disabled:
|
|
308
308
|
this.bkdView.config.getDecoderConfig().Code39.checksumType = com.barkoder.Barkoder.Code39ChecksumType.Disabled
|
|
309
309
|
break;
|
|
310
|
-
case BarkoderConstants.
|
|
310
|
+
case BarkoderConstants.Code39ChecksumType.Enabled:
|
|
311
311
|
this.bkdView.config.getDecoderConfig().Code39.checksumType = com.barkoder.Barkoder.Code39ChecksumType.Enabled
|
|
312
312
|
break;
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
setCode11CheckSumType(code11CheckSumType : BarkoderConstants.
|
|
316
|
+
setCode11CheckSumType(code11CheckSumType : BarkoderConstants.Code11ChecksumType) {
|
|
317
317
|
switch(code11CheckSumType) {
|
|
318
|
-
case BarkoderConstants.
|
|
318
|
+
case BarkoderConstants.Code11ChecksumType.Disabled:
|
|
319
319
|
this.bkdView.config.getDecoderConfig().Code11.checksumType = com.barkoder.Barkoder.Code11ChecksumType.Disabled
|
|
320
320
|
break;
|
|
321
|
-
case BarkoderConstants.
|
|
321
|
+
case BarkoderConstants.Code11ChecksumType.Single:
|
|
322
322
|
this.bkdView.config.getDecoderConfig().Code11.checksumType = com.barkoder.Barkoder.Code11ChecksumType.Single
|
|
323
323
|
break;
|
|
324
|
-
case BarkoderConstants.
|
|
324
|
+
case BarkoderConstants.Code11ChecksumType.Double:
|
|
325
325
|
this.bkdView.config.getDecoderConfig().Code11.checksumType = com.barkoder.Barkoder.Code11ChecksumType.Double
|
|
326
326
|
break;
|
|
327
327
|
}
|
|
@@ -751,12 +751,12 @@ export class BarkoderViewAndroid extends View {
|
|
|
751
751
|
this.bkdView.config.getDecoderConfig().Datamatrix.dpmMode = dpmModeEnabled
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
-
setUpcEanDeblurEnabled(
|
|
755
|
-
this.bkdView.config.getDecoderConfig().upcEanDeblur =
|
|
754
|
+
setUpcEanDeblurEnabled(enabled : boolean) : void {
|
|
755
|
+
this.bkdView.config.getDecoderConfig().upcEanDeblur = enabled
|
|
756
756
|
}
|
|
757
757
|
|
|
758
|
-
setEnableMisshaped1DEnabled(
|
|
759
|
-
this.bkdView.config.getDecoderConfig().enableMisshaped1D =
|
|
758
|
+
setEnableMisshaped1DEnabled(enabled : boolean) : void {
|
|
759
|
+
this.bkdView.config.getDecoderConfig().enableMisshaped1D = enabled
|
|
760
760
|
}
|
|
761
761
|
|
|
762
762
|
setBarcodeThumbnailOnResultEnabled(enabled : boolean) : void{
|
|
@@ -767,8 +767,8 @@ export class BarkoderViewAndroid extends View {
|
|
|
767
767
|
return this.bkdView.config.getThumbnailOnResulEnabled()
|
|
768
768
|
}
|
|
769
769
|
|
|
770
|
-
setThresholdBetweenDuplicatesScans(
|
|
771
|
-
this.bkdView.config.setThresholdBetweenDuplicatesScans(
|
|
770
|
+
setThresholdBetweenDuplicatesScans(thresholdBetweenDuplicatesScans : number) : void {
|
|
771
|
+
this.bkdView.config.setThresholdBetweenDuplicatesScans(thresholdBetweenDuplicatesScans)
|
|
772
772
|
}
|
|
773
773
|
|
|
774
774
|
getThresholdBetweenDuplicatesScans() : Promise <any> {
|
|
@@ -69,7 +69,7 @@ export enum BarkoderResolution {
|
|
|
69
69
|
HIGH = 'Full HD'
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export enum
|
|
72
|
+
export enum MsiChecksumType {
|
|
73
73
|
Disabled = 0,
|
|
74
74
|
Mod10 = 1,
|
|
75
75
|
Mod11 = 2,
|
|
@@ -79,13 +79,13 @@ export enum MsiCheckSumType {
|
|
|
79
79
|
Mod1110IBM = 6
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
export enum
|
|
82
|
+
export enum Code11ChecksumType {
|
|
83
83
|
Disabled = 0,
|
|
84
84
|
Single = 1,
|
|
85
85
|
Double = 2
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
export enum
|
|
88
|
+
export enum Code39ChecksumType {
|
|
89
89
|
Disabled = 0,
|
|
90
90
|
Enabled = 1
|
|
91
91
|
}
|
|
@@ -269,7 +269,7 @@ export class MSIBarcodeConfig {
|
|
|
269
269
|
enabled?: boolean;
|
|
270
270
|
private minLength?: number;
|
|
271
271
|
private maxLength?: number;
|
|
272
|
-
checksum?:
|
|
272
|
+
checksum?: MsiChecksumType;
|
|
273
273
|
|
|
274
274
|
constructor(config: Partial<MSIBarcodeConfig>) {
|
|
275
275
|
Object.assign(this, config);
|
|
@@ -296,7 +296,7 @@ export class Code39BarcodeConfig {
|
|
|
296
296
|
enabled?: boolean;
|
|
297
297
|
private minLength?: number;
|
|
298
298
|
private maxLength?: number;
|
|
299
|
-
checksum?:
|
|
299
|
+
checksum?: Code39ChecksumType;
|
|
300
300
|
|
|
301
301
|
constructor(config: Partial<Code39BarcodeConfig>) {
|
|
302
302
|
Object.assign(this, config);
|
|
@@ -323,7 +323,7 @@ export class Code11BarcodeConfig {
|
|
|
323
323
|
enabled?: boolean;
|
|
324
324
|
private minLength?: number;
|
|
325
325
|
private maxLength?: number;
|
|
326
|
-
checksum?:
|
|
326
|
+
checksum?: Code11ChecksumType;
|
|
327
327
|
|
|
328
328
|
constructor(config: Partial<Code11BarcodeConfig>) {
|
|
329
329
|
Object.assign(this, config);
|
|
@@ -37,8 +37,8 @@ export class BarkoderViewIOS extends View{
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
setFlashEnabled(
|
|
41
|
-
this.bkdView.setFlash(
|
|
40
|
+
setFlashEnabled(enabled : boolean) : void {
|
|
41
|
+
this.bkdView.setFlash(enabled)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
getMaxZoomFactor(callback : BarkoderConstants.MaxZoomAvailableCallback): Promise<number> {
|
|
@@ -50,8 +50,8 @@ export class BarkoderViewIOS extends View{
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
setZoomFactor(
|
|
54
|
-
this.bkdView.setZoomFactor(
|
|
53
|
+
setZoomFactor(zoomFactor : number) : void {
|
|
54
|
+
this.bkdView.setZoomFactor(zoomFactor)
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
getLocationLineColorHex() : any {
|
|
@@ -135,8 +135,8 @@ export class BarkoderViewIOS extends View{
|
|
|
135
135
|
return this.bkdView.config.decoderConfig.formatting
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
setLocationLineWidth(
|
|
139
|
-
this.bkdView.config.locationLineWidth =
|
|
138
|
+
setLocationLineWidth(width : number) : void {
|
|
139
|
+
this.bkdView.config.locationLineWidth = width
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
getLocationLineWidth() : any {
|
|
@@ -259,52 +259,52 @@ export class BarkoderViewIOS extends View{
|
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
setMsiCheckSumType(msiCheckSumType : BarkoderConstants.
|
|
262
|
+
setMsiCheckSumType(msiCheckSumType : BarkoderConstants.MsiChecksumType) {
|
|
263
263
|
switch (msiCheckSumType) {
|
|
264
|
-
case BarkoderConstants.
|
|
264
|
+
case BarkoderConstants.MsiChecksumType.Disabled:
|
|
265
265
|
this.bkdView.config.decoderConfig.msi.checksum = 0
|
|
266
266
|
break;
|
|
267
|
-
case BarkoderConstants.
|
|
267
|
+
case BarkoderConstants.MsiChecksumType.Mod10:
|
|
268
268
|
this.bkdView.config.decoderConfig.msi.checksum = 1
|
|
269
269
|
break;
|
|
270
|
-
case BarkoderConstants.
|
|
270
|
+
case BarkoderConstants.MsiChecksumType.Mod11:
|
|
271
271
|
this.bkdView.config.decoderConfig.msi.checksum = 2
|
|
272
272
|
break;
|
|
273
|
-
case BarkoderConstants.
|
|
273
|
+
case BarkoderConstants.MsiChecksumType.Mod1010:
|
|
274
274
|
this.bkdView.config.decoderConfig.msi.checksum = 3
|
|
275
275
|
break;
|
|
276
|
-
case BarkoderConstants.
|
|
276
|
+
case BarkoderConstants.MsiChecksumType.Mod1110:
|
|
277
277
|
this.bkdView.config.decoderConfig.msi.checksum = 4
|
|
278
278
|
break;
|
|
279
|
-
case BarkoderConstants.
|
|
279
|
+
case BarkoderConstants.MsiChecksumType.Mod11IBM:
|
|
280
280
|
this.bkdView.config.decoderConfig.msi.checksum = 5
|
|
281
281
|
break;
|
|
282
|
-
case BarkoderConstants.
|
|
282
|
+
case BarkoderConstants.MsiChecksumType.Mod1110IBM:
|
|
283
283
|
this.bkdView.config.decoderConfig.msi.checksum = 6
|
|
284
284
|
break;
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
setCode39CheckSumType(standardCheckSumType : BarkoderConstants.
|
|
288
|
+
setCode39CheckSumType(standardCheckSumType : BarkoderConstants.Code39ChecksumType) {
|
|
289
289
|
switch(standardCheckSumType) {
|
|
290
|
-
case BarkoderConstants.
|
|
290
|
+
case BarkoderConstants.Code39ChecksumType.Disabled:
|
|
291
291
|
this.bkdView.config.decoderConfig.code39.checksum = 0
|
|
292
292
|
break;
|
|
293
|
-
case BarkoderConstants.
|
|
293
|
+
case BarkoderConstants.Code39ChecksumType.Enabled:
|
|
294
294
|
this.bkdView.config.decoderConfig.code39.checksum = 1
|
|
295
295
|
break;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
setCode11CheckSumType(code11CheckSumType : BarkoderConstants.
|
|
299
|
+
setCode11CheckSumType(code11CheckSumType : BarkoderConstants.Code11ChecksumType) {
|
|
300
300
|
switch(code11CheckSumType) {
|
|
301
|
-
case BarkoderConstants.
|
|
301
|
+
case BarkoderConstants.Code11ChecksumType.Disabled:
|
|
302
302
|
this.bkdView.config.decoderConfig.code11.checksum = 0
|
|
303
303
|
break;
|
|
304
|
-
case BarkoderConstants.
|
|
304
|
+
case BarkoderConstants.Code11ChecksumType.Single:
|
|
305
305
|
this.bkdView.config.decoderConfig.code11.checksum = 1
|
|
306
306
|
break;
|
|
307
|
-
case BarkoderConstants.
|
|
307
|
+
case BarkoderConstants.Code11ChecksumType.Double:
|
|
308
308
|
this.bkdView.config.decoderConfig.code11.checksum = 2
|
|
309
309
|
break;
|
|
310
310
|
}
|
|
@@ -714,12 +714,12 @@ export class BarkoderViewIOS extends View{
|
|
|
714
714
|
return this.bkdView.config.decoderConfig.maximumResultsCount
|
|
715
715
|
}
|
|
716
716
|
|
|
717
|
-
setUpcEanDeblurEnabled(
|
|
718
|
-
this.bkdView.config.decoderConfig.upcEanDeblur =
|
|
717
|
+
setUpcEanDeblurEnabled(enabled : boolean) : void {
|
|
718
|
+
this.bkdView.config.decoderConfig.upcEanDeblur = enabled
|
|
719
719
|
}
|
|
720
720
|
|
|
721
|
-
setEnableMisshaped1DEnabled(
|
|
722
|
-
this.bkdView.config.decoderConfig.enableMisshaped1D =
|
|
721
|
+
setEnableMisshaped1DEnabled(enabled : boolean) : void {
|
|
722
|
+
this.bkdView.config.decoderConfig.enableMisshaped1D = enabled
|
|
723
723
|
}
|
|
724
724
|
|
|
725
725
|
setBarcodeThumbnailOnResultEnabled(enabled : boolean) : void{
|
package/package.json
CHANGED