scandit-capacitor-datacapture-barcode 7.5.1 → 7.6.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.
- package/ScanditCapacitorDatacaptureBarcode.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt +103 -83
- package/dist/barcode.js +653 -264
- package/dist/barcode.js.map +1 -1
- package/dist/dts/definitions.d.ts +1 -1
- package/dist/dts/ts/BarcodeBatchAdvancedOverlay.d.ts +11 -2
- package/dist/dts/ts/BarcodeFindView.d.ts +11 -2
- package/dist/index.js +29 -9
- package/dist/index.js.map +1 -1
- package/ios/Plugin/ScanditBarcodeCapture.swift +72 -46
- package/package.json +4 -4
|
@@ -18,7 +18,7 @@ export { ArucoDictionary, ArucoDictionaryPreset, ArucoMarker } from 'scandit-dat
|
|
|
18
18
|
export { BarcodeBatchAdvancedOverlayListener } from './ts/BarcodeBatchAdvancedOverlayListener';
|
|
19
19
|
export { BarcodeBatchAdvancedOverlay } from './ts/BarcodeBatchAdvancedOverlay';
|
|
20
20
|
export { BarcodeFind, BarcodeFindFeedback, BarcodeFindItem, BarcodeFindItemContent, BarcodeFindItemSearchOptions } from 'scandit-datacapture-frameworks-barcode';
|
|
21
|
-
export { BarcodeFindListener, BarcodeFindSettings, BarcodeFindViewSettings, BarcodeFindViewUiListener, BarcodeFindTransformer } from 'scandit-datacapture-frameworks-barcode';
|
|
21
|
+
export { BarcodeFindListener, BarcodeFindSettings, BarcodeFindViewSettings, BarcodeFindViewUiListener, BarcodeFindTransformer, BarcodeFindViewProps } from 'scandit-datacapture-frameworks-barcode';
|
|
22
22
|
export { BarcodeFindView } from './ts/BarcodeFindView';
|
|
23
23
|
export { SparkScan, SparkScanListener, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningMode, SparkScanScanningModeDefault, SparkScanScanningModeTarget } from 'scandit-datacapture-frameworks-barcode';
|
|
24
24
|
export { SparkScanSettings, SparkScanViewState, SparkScanViewSettings, SparkScanSession, SparkScanToastSettings, BatterySavingMode, SparkScanMiniPreviewSize } from 'scandit-datacapture-frameworks-barcode';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Anchor, DataCaptureOverlay,
|
|
1
|
+
import { Anchor, DataCaptureOverlay, PointWithUnit } from 'scandit-datacapture-frameworks-core';
|
|
2
2
|
import { BarcodeBatch, TrackedBarcode } from 'scandit-datacapture-frameworks-barcode';
|
|
3
3
|
import { BarcodeBatchAdvancedOverlayListener } from './BarcodeBatchAdvancedOverlayListener';
|
|
4
4
|
import { TrackedBarcodeView } from './TrackedBarcodeView';
|
|
5
|
+
import { DataCaptureView } from 'scandit-capacitor-datacapture-core';
|
|
5
6
|
export declare class BarcodeBatchAdvancedOverlay implements DataCaptureOverlay {
|
|
6
7
|
private baseBarcodeBatchOverlay;
|
|
7
8
|
private get type();
|
|
@@ -9,8 +10,16 @@ export declare class BarcodeBatchAdvancedOverlay implements DataCaptureOverlay {
|
|
|
9
10
|
set shouldShowScanAreaGuides(shouldShow: boolean);
|
|
10
11
|
get listener(): BarcodeBatchAdvancedOverlayListener | null;
|
|
11
12
|
set listener(listener: BarcodeBatchAdvancedOverlayListener | null);
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Since 7.6. This factory will be removed in 8.0.
|
|
15
|
+
* Create the overlay and add it to the view manually instead:
|
|
16
|
+
* ```ts
|
|
17
|
+
* const overlay = new BarcodeBatchAdvancedOverlay();
|
|
18
|
+
* view.addOverlay(overlay);
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
12
21
|
static withBarcodeBatchForView(barcodeBatch: BarcodeBatch, view: DataCaptureView | null): BarcodeBatchAdvancedOverlay;
|
|
13
|
-
|
|
22
|
+
constructor(mode: BarcodeBatch);
|
|
14
23
|
setViewForTrackedBarcode(view: Promise<TrackedBarcodeView | null>, trackedBarcode: TrackedBarcode): Promise<void>;
|
|
15
24
|
setAnchorForTrackedBarcode(anchor: Anchor, trackedBarcode: TrackedBarcode): Promise<void>;
|
|
16
25
|
setOffsetForTrackedBarcode(offset: PointWithUnit, trackedBarcode: TrackedBarcode): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BarcodeFind, BarcodeFindViewSettings, BarcodeFindViewUiListener } from 'scandit-datacapture-frameworks-barcode';
|
|
1
|
+
import { BarcodeFind, BarcodeFindViewProps, BarcodeFindViewSettings, BarcodeFindViewUiListener } from 'scandit-datacapture-frameworks-barcode';
|
|
2
2
|
import { Anchor, CameraSettings, DataCaptureContext } from 'scandit-datacapture-frameworks-core';
|
|
3
3
|
export declare class BarcodeFindView {
|
|
4
4
|
private baseBarcodeFindView;
|
|
@@ -6,10 +6,19 @@ export declare class BarcodeFindView {
|
|
|
6
6
|
private _htmlElementState;
|
|
7
7
|
private scrollListener;
|
|
8
8
|
private domObserver;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use the constructor instead.
|
|
11
|
+
*/
|
|
9
12
|
static forMode(dataCaptureContext: DataCaptureContext, barcodeFind: BarcodeFind): BarcodeFindView;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use the constructor instead.
|
|
15
|
+
*/
|
|
10
16
|
static forModeWithViewSettings(dataCaptureContext: DataCaptureContext, barcodeFind: BarcodeFind, viewSettings: BarcodeFindViewSettings): BarcodeFindView;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use the constructor instead.
|
|
19
|
+
*/
|
|
11
20
|
static forModeWithViewSettingsAndCameraSettings(dataCaptureContext: DataCaptureContext, barcodeFind: BarcodeFind, viewSettings: BarcodeFindViewSettings, cameraSettings: CameraSettings): BarcodeFindView;
|
|
12
|
-
|
|
21
|
+
constructor(props: BarcodeFindViewProps);
|
|
13
22
|
private set htmlElementState(value);
|
|
14
23
|
private get htmlElementState();
|
|
15
24
|
private orientationChangeListener;
|
package/dist/index.js
CHANGED
|
@@ -601,13 +601,21 @@ class BarcodeBatchAdvancedOverlay {
|
|
|
601
601
|
set listener(listener) {
|
|
602
602
|
this.baseBarcodeBatchOverlay.listener = listener;
|
|
603
603
|
}
|
|
604
|
+
/**
|
|
605
|
+
* @deprecated Since 7.6. This factory will be removed in 8.0.
|
|
606
|
+
* Create the overlay and add it to the view manually instead:
|
|
607
|
+
* ```ts
|
|
608
|
+
* const overlay = new BarcodeBatchAdvancedOverlay();
|
|
609
|
+
* view.addOverlay(overlay);
|
|
610
|
+
* ```
|
|
611
|
+
*/
|
|
604
612
|
static withBarcodeBatchForView(barcodeBatch, view) {
|
|
605
|
-
const overlay = new BarcodeBatchAdvancedOverlay();
|
|
606
|
-
overlay.baseBarcodeBatchOverlay
|
|
613
|
+
const overlay = new BarcodeBatchAdvancedOverlay(barcodeBatch);
|
|
614
|
+
view === null || view === void 0 ? void 0 : view.addOverlay(overlay.baseBarcodeBatchOverlay);
|
|
607
615
|
return overlay;
|
|
608
616
|
}
|
|
609
|
-
constructor() {
|
|
610
|
-
this.baseBarcodeBatchOverlay = new BaseBarcodeBatchAdvancedOverlay();
|
|
617
|
+
constructor(mode) {
|
|
618
|
+
this.baseBarcodeBatchOverlay = new BaseBarcodeBatchAdvancedOverlay(mode);
|
|
611
619
|
}
|
|
612
620
|
setViewForTrackedBarcode(view, trackedBarcode) {
|
|
613
621
|
return this.baseBarcodeBatchOverlay.setViewForTrackedBarcode(view, trackedBarcode);
|
|
@@ -627,16 +635,25 @@ class BarcodeBatchAdvancedOverlay {
|
|
|
627
635
|
}
|
|
628
636
|
|
|
629
637
|
class BarcodeFindView {
|
|
638
|
+
/**
|
|
639
|
+
* @deprecated Use the constructor instead.
|
|
640
|
+
*/
|
|
630
641
|
static forMode(dataCaptureContext, barcodeFind) {
|
|
631
|
-
return new BarcodeFindView(dataCaptureContext, barcodeFind);
|
|
642
|
+
return new BarcodeFindView({ context: dataCaptureContext, barcodeFind });
|
|
632
643
|
}
|
|
644
|
+
/**
|
|
645
|
+
* @deprecated Use the constructor instead.
|
|
646
|
+
*/
|
|
633
647
|
static forModeWithViewSettings(dataCaptureContext, barcodeFind, viewSettings) {
|
|
634
|
-
return new BarcodeFindView(dataCaptureContext, barcodeFind, viewSettings);
|
|
648
|
+
return new BarcodeFindView({ context: dataCaptureContext, barcodeFind, viewSettings });
|
|
635
649
|
}
|
|
650
|
+
/**
|
|
651
|
+
* @deprecated Use the constructor instead.
|
|
652
|
+
*/
|
|
636
653
|
static forModeWithViewSettingsAndCameraSettings(dataCaptureContext, barcodeFind, viewSettings, cameraSettings) {
|
|
637
|
-
return new BarcodeFindView(dataCaptureContext, barcodeFind, viewSettings, cameraSettings);
|
|
654
|
+
return new BarcodeFindView({ context: dataCaptureContext, barcodeFind, viewSettings, cameraSettings });
|
|
638
655
|
}
|
|
639
|
-
constructor(
|
|
656
|
+
constructor(props) {
|
|
640
657
|
this.htmlElement = null;
|
|
641
658
|
this._htmlElementState = new HTMLElementState();
|
|
642
659
|
this.scrollListener = this.elementDidChange.bind(this);
|
|
@@ -647,7 +664,7 @@ class BarcodeFindView {
|
|
|
647
664
|
setTimeout(this.elementDidChange.bind(this), 300);
|
|
648
665
|
setTimeout(this.elementDidChange.bind(this), 1000);
|
|
649
666
|
});
|
|
650
|
-
this.baseBarcodeFindView = new BaseBarcodeFindView(
|
|
667
|
+
this.baseBarcodeFindView = new BaseBarcodeFindView(props);
|
|
651
668
|
}
|
|
652
669
|
set htmlElementState(newState) {
|
|
653
670
|
const didChangeShown = this._htmlElementState.isShown !== newState.isShown;
|
|
@@ -1864,6 +1881,9 @@ function initBarcodeProxy() {
|
|
|
1864
1881
|
FactoryMaker.bindLazyInstance('BarcodeCaptureListenerProxy', () => {
|
|
1865
1882
|
return createNativeProxy(capacitorBarcodeNativeCaller);
|
|
1866
1883
|
});
|
|
1884
|
+
FactoryMaker.bindLazyInstance('BarcodeCaptureOverlayProxy', () => {
|
|
1885
|
+
return createNativeProxy(capacitorBarcodeNativeCaller);
|
|
1886
|
+
});
|
|
1867
1887
|
FactoryMaker.bindLazyInstance('BarcodeBatchListenerProxy', () => {
|
|
1868
1888
|
return createNativeProxy(capacitorBarcodeNativeCaller);
|
|
1869
1889
|
});
|