barkoder-nativescript 0.0.7 → 1.0.0
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.
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "barkoder-nativescript",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Nativescript support for Barkoder - a Barcode Scanner SDK for the modern enterprise.",
|
|
5
5
|
"main": "barkoder-nativescript",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -74,7 +74,9 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"tns-core-modules": "^6.0.0",
|
|
77
|
-
"tns-platform-declarations": "^6.0.0"
|
|
77
|
+
"tns-platform-declarations": "^6.0.0",
|
|
78
|
+
"@nativescript/camera": "^5.1.1",
|
|
79
|
+
"nativescript-permissions": "^1.3.12"
|
|
78
80
|
},
|
|
79
81
|
"bootstrapper": "nativescript-plugin-seed"
|
|
80
82
|
}
|