scandit-capacitor-datacapture-label 8.6.2 → 8.7.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.
@@ -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.6.2'
21
+ s.dependency "scandit-datacapture-frameworks-label", '= 8.7.0'
22
22
  end
@@ -143,7 +143,7 @@ if (ext.has('repos')) {
143
143
  }
144
144
 
145
145
  dependencies {
146
- def sdk_version = "8.6.2"
146
+ def sdk_version = "8.7.0"
147
147
 
148
148
  implementation fileTree(dir: 'libs', include: ['*.jar'])
149
149
  implementation fileTree(dir: 'library', include: ['*.aar'])
@@ -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 = LabelCaptureModule.create(this);
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 getDefaults(PluginCall call) {
94
+ public void getDynamicDefaults(PluginCall call) {
92
95
  Map<String, Object> defaultsMap = new HashMap<>();
93
- defaultsMap.put("LabelCapture", labelModule.getDefaults());
96
+ defaultsMap.put("LabelCapture", labelModule.getDynamicDefaults());
94
97
 
95
- JSObject defaults = null;
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
  }
@@ -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;