scandit-capacitor-datacapture-barcode 7.0.0 → 7.0.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/ScanditCapacitorDatacaptureBarcode.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt +7 -0
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/find/BarcodeFindViewHandler.kt +1 -1
- package/dist/barcode.js +57 -15
- package/dist/barcode.js.map +1 -1
- package/dist/dts/definitions.d.ts +1 -0
- package/dist/dts/ts/Capacitor/BarcodeFindViewProxy.d.ts +1 -0
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/ios/Plugin/ScanditBarcodeCapture.swift +12 -4
- package/package.json +4 -4
|
@@ -179,6 +179,7 @@ export interface ScanditBarcodeFindNativeInterface {
|
|
|
179
179
|
updateFindView(barcodeFindViewJson: {
|
|
180
180
|
BarcodeFindView: string;
|
|
181
181
|
}): Promise<void>;
|
|
182
|
+
removeFindView(): Promise<void>;
|
|
182
183
|
showFindView(): Promise<void>;
|
|
183
184
|
hideFindView(): Promise<void>;
|
|
184
185
|
setBarcodeTransformer(): Promise<void>;
|
|
@@ -13,6 +13,7 @@ export declare class NativeBarcodeFindViewProxy extends BaseNativeProxy implemen
|
|
|
13
13
|
findNodeHandle(_view?: BarcodeFindView | undefined): number | null;
|
|
14
14
|
createView(_id: number | null, barcodeFindViewJson: string): Promise<void>;
|
|
15
15
|
updateView(barcodeFindViewJson: string): Promise<void>;
|
|
16
|
+
removeView(): Promise<void>;
|
|
16
17
|
subscribeBarcodeFindViewListener(): Promise<void>;
|
|
17
18
|
unsubscribeBarcodeFindViewListener(): Promise<void>;
|
|
18
19
|
private notifyListeners;
|
package/dist/index.js
CHANGED
|
@@ -1672,6 +1672,9 @@ class NativeBarcodeFindViewProxy extends BaseNativeProxy {
|
|
|
1672
1672
|
updateView(barcodeFindViewJson) {
|
|
1673
1673
|
return ScanditBarcodeFindPluginNative.updateFindView(JSON.parse(barcodeFindViewJson));
|
|
1674
1674
|
}
|
|
1675
|
+
removeView() {
|
|
1676
|
+
return ScanditBarcodeFindPluginNative.removeFindView();
|
|
1677
|
+
}
|
|
1675
1678
|
subscribeBarcodeFindViewListener() {
|
|
1676
1679
|
this.subscriptionBarcodeFindViewListener = window.Capacitor.Plugins[Capacitor.pluginName]
|
|
1677
1680
|
.addListener(BarcodeFindViewEvents.onFinishButtonTappedEventName, this.notifyListeners.bind(this));
|
|
@@ -1989,7 +1992,7 @@ class BarcodeFindView {
|
|
|
1989
1992
|
setTimeout(this.elementDidChange.bind(this), 300);
|
|
1990
1993
|
setTimeout(this.elementDidChange.bind(this), 1000);
|
|
1991
1994
|
});
|
|
1992
|
-
this.baseBarcodeFindView = new BaseBarcodeFindView(dataCaptureContext, barcodeFind, barcodeFindViewSettings, cameraSettings);
|
|
1995
|
+
this.baseBarcodeFindView = new BaseBarcodeFindView(dataCaptureContext, barcodeFind, barcodeFindViewSettings, cameraSettings, false);
|
|
1993
1996
|
this.baseBarcodeFindView.initialize(this);
|
|
1994
1997
|
}
|
|
1995
1998
|
set htmlElementState(newState) {
|
|
@@ -2119,16 +2122,20 @@ class BarcodeFindView {
|
|
|
2119
2122
|
return this.baseBarcodeFindView.pauseSearching();
|
|
2120
2123
|
}
|
|
2121
2124
|
connectToElement(element) {
|
|
2122
|
-
this.
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2125
|
+
this.baseBarcodeFindView.createNativeView().then(() => {
|
|
2126
|
+
this.htmlElement = element;
|
|
2127
|
+
this.htmlElementState = new HTMLElementState();
|
|
2128
|
+
// Initial update
|
|
2129
|
+
this.elementDidChange();
|
|
2130
|
+
this.subscribeToChangesOnHTMLElement();
|
|
2131
|
+
});
|
|
2127
2132
|
}
|
|
2128
2133
|
detachFromElement() {
|
|
2129
|
-
this.
|
|
2130
|
-
|
|
2131
|
-
|
|
2134
|
+
this.baseBarcodeFindView.removeNativeView().then(() => {
|
|
2135
|
+
this.unsubscribeFromChangesOnHTMLElement();
|
|
2136
|
+
this.htmlElement = null;
|
|
2137
|
+
this.elementDidChange();
|
|
2138
|
+
});
|
|
2132
2139
|
}
|
|
2133
2140
|
show() {
|
|
2134
2141
|
if (this.htmlElement) {
|