scandit-capacitor-datacapture-label 8.6.0 → 8.7.0-beta.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/ScanditCapacitorDatacaptureLabel.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/scandit/capacitor/datacapture/label/ScanditLabelNative.java +9 -5
- package/dist/dts/index.d.ts +30 -0
- package/dist/dts/label.d.ts +2796 -155
- package/dist/index.js +393 -192
- package/dist/index.js.map +1 -1
- package/ios/Sources/ScanditCapacitorLabel/ScanditCapacitorLabel.swift +5 -4
- package/package.json +4 -3
|
@@ -18,5 +18,5 @@ Pod::Spec.new do |s|
|
|
|
18
18
|
s.dependency "Capacitor"
|
|
19
19
|
s.dependency "ScanditCapacitorDatacaptureCore", "= #{version}"
|
|
20
20
|
s.dependency "ScanditCapacitorDatacaptureBarcode", "= #{version}"
|
|
21
|
-
s.dependency "scandit-datacapture-frameworks-label", '= 8.
|
|
21
|
+
s.dependency "scandit-datacapture-frameworks-label", '= 8.7.0-beta.1'
|
|
22
22
|
end
|
package/android/build.gradle
CHANGED
package/android/src/main/java/com/scandit/capacitor/datacapture/label/ScanditLabelNative.java
CHANGED
|
@@ -21,6 +21,8 @@ import com.scandit.capacitor.datacapture.core.utils.CapacitorMethodCall;
|
|
|
21
21
|
import com.scandit.capacitor.datacapture.core.utils.CapacitorResult;
|
|
22
22
|
import com.scandit.datacapture.frameworks.core.CoreModule;
|
|
23
23
|
import com.scandit.datacapture.frameworks.core.events.Emitter;
|
|
24
|
+
import com.scandit.datacapture.frameworks.core.listeners.registry.ListenerRegistry;
|
|
25
|
+
import com.scandit.datacapture.frameworks.core.listeners.registry.RegistryEmitter;
|
|
24
26
|
import com.scandit.datacapture.frameworks.core.locator.DefaultServiceLocator;
|
|
25
27
|
import com.scandit.datacapture.frameworks.core.utils.DefaultFrameworksLog;
|
|
26
28
|
import com.scandit.datacapture.frameworks.core.utils.FrameworksLog;
|
|
@@ -46,7 +48,8 @@ public class ScanditLabelNative extends Plugin implements Emitter {
|
|
|
46
48
|
private final DefaultServiceLocator serviceLocator;
|
|
47
49
|
|
|
48
50
|
public ScanditLabelNative() {
|
|
49
|
-
this.labelModule =
|
|
51
|
+
this.labelModule =
|
|
52
|
+
LabelCaptureModule.create(new RegistryEmitter(this, ListenerRegistry.getInstance()));
|
|
50
53
|
this.logger = DefaultFrameworksLog.getInstance();
|
|
51
54
|
this.serviceLocator = DefaultServiceLocator.getInstance();
|
|
52
55
|
}
|
|
@@ -88,15 +91,16 @@ public class ScanditLabelNative extends Plugin implements Emitter {
|
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
@PluginMethod
|
|
91
|
-
public void
|
|
94
|
+
public void getDynamicDefaults(PluginCall call) {
|
|
92
95
|
Map<String, Object> defaultsMap = new HashMap<>();
|
|
93
|
-
defaultsMap.put("LabelCapture", labelModule.
|
|
96
|
+
defaultsMap.put("LabelCapture", labelModule.getDynamicDefaults());
|
|
94
97
|
|
|
95
|
-
JSObject defaults
|
|
98
|
+
JSObject defaults;
|
|
96
99
|
try {
|
|
97
100
|
defaults = JSObject.fromJSONObject(new JSONObject(defaultsMap));
|
|
98
101
|
} catch (JSONException e) {
|
|
99
|
-
call.reject("Unable to get the label capture defaults.", e);
|
|
102
|
+
call.reject("Unable to get the label capture dynamic defaults.", e);
|
|
103
|
+
return;
|
|
100
104
|
}
|
|
101
105
|
call.resolve(defaults);
|
|
102
106
|
}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,14 +1,44 @@
|
|
|
1
1
|
export { AdaptiveRecognitionMode, AdaptiveRecognitionResult, AdaptiveRecognitionResultType, BarcodeField, CapturedLabel, CustomBarcode, CustomText, DateText, ExpiryDateText, ImeiOneBarcode, ImeiTwoBarcode, LabelCapture, LabelCaptureAdaptiveRecognitionListener, LabelCaptureAdaptiveRecognitionOverlay, LabelCaptureAdaptiveRecognitionSettings, LabelCaptureAdvancedOverlay, LabelCaptureAdvancedOverlayListener, LabelCaptureBasicOverlay, LabelCaptureBasicOverlayListener, LabelCaptureFeedback, LabelCaptureListener, LabelCaptureSession, LabelCaptureSettings, LabelCaptureValidationFlowListener, LabelCaptureValidationFlowOverlay, LabelCaptureValidationFlowSettings, LabelDateComponentFormat, LabelDateFormat, LabelDateResult, LabelDefinition, LabelField, LabelFieldDefinition, LabelFieldLocation, LabelFieldLocationType, LabelFieldState, LabelFieldType, LabelFieldValueType, LabelResultUpdateType, PackingDateText, PartNumberBarcode, ReceiptScanningLineItem, ReceiptScanningResult, SerialNumberBarcode, TextField, TotalPriceText, UnitPriceText, WeightText } from './label';
|
|
2
2
|
import { DefaultSerializeable, Size } from 'scandit-capacitor-datacapture-core/dist/dts/core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Options for creating a {@link LabelCaptureAdvancedOverlayView}.
|
|
6
|
+
*
|
|
7
|
+
* @since 8.0.0
|
|
8
|
+
*/
|
|
4
9
|
interface LabelCaptureAdvancedOverlayViewOptions {
|
|
10
|
+
/**
|
|
11
|
+
* The size of the overlay view.
|
|
12
|
+
*
|
|
13
|
+
* @since 8.0.0
|
|
14
|
+
*/
|
|
5
15
|
size?: Size;
|
|
16
|
+
/**
|
|
17
|
+
* The scale factor for the overlay view.
|
|
18
|
+
*
|
|
19
|
+
* @since 8.0.0
|
|
20
|
+
*/
|
|
6
21
|
scale?: number;
|
|
7
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* A view that can be shown for a {@link CapturedLabel} through a {@link LabelCaptureAdvancedOverlay}.
|
|
25
|
+
*
|
|
26
|
+
* @since 8.0.0
|
|
27
|
+
*/
|
|
8
28
|
declare class LabelCaptureAdvancedOverlayView extends DefaultSerializeable {
|
|
9
29
|
private data;
|
|
10
30
|
private options;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a view based on an HTML element.
|
|
33
|
+
*
|
|
34
|
+
* @since 8.0.0
|
|
35
|
+
*/
|
|
11
36
|
static withHTMLElement(element: HTMLElement, options: LabelCaptureAdvancedOverlayViewOptions | null): Promise<LabelCaptureAdvancedOverlayView>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a view based on base64 encoded data. The image data should be image/png.
|
|
39
|
+
*
|
|
40
|
+
* @since 8.0.0
|
|
41
|
+
*/
|
|
12
42
|
static withBase64EncodedData(data: string, options: LabelCaptureAdvancedOverlayViewOptions | null): Promise<LabelCaptureAdvancedOverlayView>;
|
|
13
43
|
private static getEncodedImageData;
|
|
14
44
|
private static getSize;
|