scandit-datacapture-frameworks-label 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/dist/dts/defaults/LabelCaptureDefaults.d.ts +4 -1
- package/dist/dts/labelcapture/LabelCapture.d.ts +21 -3
- package/dist/dts/labelcapture/LabelCaptureFeedback.d.ts +19 -0
- package/dist/dts/labelcapture/controller/LabelCaptureAdvancedOverlayController.d.ts +2 -2
- package/dist/dts/labelcapture/controller/LabelCaptureBasicOverlayController.d.ts +3 -2
- package/dist/dts/labelcapture/controller/LabelCaptureController.d.ts +14 -3
- package/dist/dts/labelcapture/controller/LabelCaptureValidationFlowOverlayController.d.ts +2 -2
- package/dist/dts/labelcapture/index.d.ts +2 -0
- package/dist/dts/labelcapture/private/PrivateLabelCapture.d.ts +1 -0
- package/dist/dts/labelcapture/view/LabelCaptureAdvancedOverlay.d.ts +14 -6
- package/dist/dts/labelcapture/view/LabelCaptureBasicOverlay.d.ts +16 -4
- package/dist/dts/labelcapture/view/LabelCaptureValidationFlowOverlay.d.ts +12 -4
- package/dist/index.js +288 -110
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Brush, CameraSettings } from 'scandit-datacapture-frameworks-core';
|
|
1
|
+
import { Brush, CameraSettings, Feedback } from 'scandit-datacapture-frameworks-core';
|
|
2
2
|
export interface LabelCaptureDefaults {
|
|
3
3
|
LabelCapture: {
|
|
4
4
|
RecommendedCameraSettings: CameraSettings;
|
|
@@ -17,6 +17,9 @@ export interface LabelCaptureDefaults {
|
|
|
17
17
|
manualInputButtonText: string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
Feedback: {
|
|
21
|
+
success: Feedback;
|
|
22
|
+
};
|
|
20
23
|
};
|
|
21
24
|
}
|
|
22
25
|
export declare function loadLabelCaptureDefaults(jsonDefaults: any): void;
|
|
@@ -1,24 +1,42 @@
|
|
|
1
1
|
import { DefaultSerializeable, CameraSettings, DataCaptureContext, DataCaptureMode } from 'scandit-datacapture-frameworks-core';
|
|
2
2
|
import { LabelCaptureListener } from './LabelCaptureListener';
|
|
3
3
|
import { LabelCaptureSettings } from './LabelCaptureSettings';
|
|
4
|
+
import { LabelCaptureFeedback } from './LabelCaptureFeedback';
|
|
4
5
|
export declare class LabelCapture extends DefaultSerializeable implements DataCaptureMode {
|
|
6
|
+
private type;
|
|
7
|
+
private modeId;
|
|
8
|
+
private parentId;
|
|
5
9
|
get isEnabled(): boolean;
|
|
6
10
|
set isEnabled(isEnabled: boolean);
|
|
7
11
|
get context(): DataCaptureContext | null;
|
|
12
|
+
static createRecommendedCameraSettings(): CameraSettings;
|
|
13
|
+
private static _recommendedCameraSettings;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use createRecommendedCameraSettings() instead to get a new instance that can be safely modified.
|
|
16
|
+
*/
|
|
8
17
|
static get recommendedCameraSettings(): CameraSettings;
|
|
9
|
-
private type;
|
|
10
|
-
private modeId;
|
|
11
18
|
private _isEnabled;
|
|
12
19
|
private settings;
|
|
20
|
+
private _feedback;
|
|
13
21
|
private hasListeners;
|
|
14
22
|
private privateContext;
|
|
15
23
|
private get _context();
|
|
16
24
|
private set _context(value);
|
|
17
25
|
private listeners;
|
|
18
26
|
private controller;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Since 7.6. This factory will be removed in 8.0.
|
|
29
|
+
* Use the public constructor instead and configure manually:
|
|
30
|
+
* ```ts
|
|
31
|
+
* const mode = new LabelCapture(settings);
|
|
32
|
+
* context.addMode(mode);
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
19
35
|
static forContext(context: DataCaptureContext | null, settings: LabelCaptureSettings): LabelCapture;
|
|
20
|
-
|
|
36
|
+
constructor(settings: LabelCaptureSettings);
|
|
21
37
|
applySettings(settings: LabelCaptureSettings): Promise<void>;
|
|
22
38
|
addListener(listener: LabelCaptureListener): void;
|
|
23
39
|
removeListener(listener: LabelCaptureListener): void;
|
|
40
|
+
get feedback(): LabelCaptureFeedback;
|
|
41
|
+
set feedback(feedback: LabelCaptureFeedback);
|
|
24
42
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DefaultSerializeable, Feedback } from "scandit-datacapture-frameworks-core";
|
|
2
|
+
import { LabelCaptureController } from "./controller/LabelCaptureController";
|
|
3
|
+
export declare class LabelCaptureFeedback extends DefaultSerializeable {
|
|
4
|
+
static get defaultFeedback(): LabelCaptureFeedback;
|
|
5
|
+
private static get labelCaptureDefaults();
|
|
6
|
+
private _success;
|
|
7
|
+
get success(): Feedback;
|
|
8
|
+
set success(success: Feedback);
|
|
9
|
+
private controller;
|
|
10
|
+
private updateFeedback;
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export interface PrivateLabelCaptureFeedback {
|
|
14
|
+
controller: LabelCaptureController | null;
|
|
15
|
+
fromJSON(json: LabelCaptureFeedbackJSON): LabelCaptureFeedback;
|
|
16
|
+
}
|
|
17
|
+
export interface LabelCaptureFeedbackJSON {
|
|
18
|
+
success: Feedback;
|
|
19
|
+
}
|
|
@@ -62,8 +62,8 @@ export interface LabelCaptureAdvancedOverlayProxy {
|
|
|
62
62
|
}
|
|
63
63
|
export declare class LabelCaptureAdvancedOverlayController extends BaseController<LabelCaptureAdvancedOverlayProxy> {
|
|
64
64
|
private overlay;
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
constructor(overlay: LabelCaptureAdvancedOverlay);
|
|
66
|
+
private initialize;
|
|
67
67
|
setViewForCapturedLabel(label: CapturedLabel, view: LabelCaptureAdvancedOverlayView | null): Promise<void>;
|
|
68
68
|
setAnchorForCapturedLabel(label: CapturedLabel, anchor: Anchor): Promise<void>;
|
|
69
69
|
setOffsetForCapturedLabel(label: CapturedLabel, offset: PointWithUnit): Promise<void>;
|
|
@@ -36,8 +36,8 @@ export interface LabelCaptureBasicOverlayProxy {
|
|
|
36
36
|
}
|
|
37
37
|
export declare class LabelCaptureBasicOverlayController extends BaseController<LabelCaptureBasicOverlayProxy> {
|
|
38
38
|
private overlay;
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
constructor(overlay: LabelCaptureBasicOverlay);
|
|
40
|
+
private initialize;
|
|
41
41
|
setBrushForFieldOfLabel(brush: Brush | null, field: LabelField, label: CapturedLabel): Promise<void>;
|
|
42
42
|
setBrushForLabel(brush: Brush | null, label: CapturedLabel): Promise<void>;
|
|
43
43
|
subscribeListener(): Promise<void>;
|
|
@@ -46,6 +46,7 @@ export declare class LabelCaptureBasicOverlayController extends BaseController<L
|
|
|
46
46
|
private handleDidTapLabel;
|
|
47
47
|
unsubscribeListener(): Promise<void>;
|
|
48
48
|
updateBasicOverlay(basicOverlayJson: string): Promise<void>;
|
|
49
|
+
dispose(): void;
|
|
49
50
|
private get dataCaptureViewId();
|
|
50
51
|
}
|
|
51
52
|
export interface LabelCaptureBasicOverlayEventPayload {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNewController, EventEmitter } from "scandit-datacapture-frameworks-core";
|
|
2
2
|
import { LabelCapture } from "../LabelCapture";
|
|
3
|
+
import { LabelCaptureFeedback } from "../LabelCaptureFeedback";
|
|
3
4
|
export declare enum LabelCaptureListenerEvents {
|
|
4
5
|
didUpdateSession = "LabelCaptureListener.didUpdateSession"
|
|
5
6
|
}
|
|
@@ -22,21 +23,31 @@ export interface LabelCaptureProxy {
|
|
|
22
23
|
$unregisterListenerForEvents({ modeId }: {
|
|
23
24
|
modeId: number;
|
|
24
25
|
}): Promise<void>;
|
|
25
|
-
$finishDidUpdateSessionCallback({ isEnabled }: {
|
|
26
|
+
$finishDidUpdateSessionCallback({ modeId, isEnabled }: {
|
|
27
|
+
modeId: number;
|
|
26
28
|
isEnabled: boolean;
|
|
27
29
|
}): Promise<void>;
|
|
30
|
+
$updateLabelCaptureFeedback({ modeId, feedbackJson }: {
|
|
31
|
+
modeId: number;
|
|
32
|
+
feedbackJson: string;
|
|
33
|
+
}): Promise<void>;
|
|
28
34
|
subscribeForEvents(events: string[]): void;
|
|
29
35
|
unsubscribeFromEvents(events: string[]): void;
|
|
30
36
|
dispose(): void;
|
|
31
37
|
eventEmitter: EventEmitter;
|
|
32
38
|
}
|
|
33
|
-
export declare class LabelCaptureController extends
|
|
39
|
+
export declare class LabelCaptureController extends BaseNewController<LabelCaptureProxy> {
|
|
34
40
|
private mode;
|
|
41
|
+
private _boundHandleDidUpdateSession?;
|
|
35
42
|
constructor(mode: LabelCapture);
|
|
43
|
+
private initialize;
|
|
36
44
|
setModeEnabledState(isEnabled: boolean): Promise<void>;
|
|
37
45
|
updateLabelCaptureSettings(settingsJson: string): Promise<void>;
|
|
38
46
|
subscribeLabelCaptureListener(): Promise<void>;
|
|
39
47
|
private handleDidUpdateSessionEvent;
|
|
40
48
|
unsubscribeLabelCaptureListener(): Promise<void>;
|
|
49
|
+
updateFeedback(feedback: LabelCaptureFeedback): void;
|
|
50
|
+
dispose(): void;
|
|
51
|
+
private get modeId();
|
|
41
52
|
private notifyListenersOfDidUpdateSession;
|
|
42
53
|
}
|
|
@@ -26,8 +26,8 @@ export interface LabelCaptureValidationFlowOverlayProxy {
|
|
|
26
26
|
export declare class LabelCaptureValidationFlowOverlayController extends BaseController<LabelCaptureValidationFlowOverlayProxy> {
|
|
27
27
|
private overlay;
|
|
28
28
|
private isSubscribed;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
constructor(overlay: LabelCaptureValidationFlowOverlay);
|
|
30
|
+
private initialize;
|
|
31
31
|
updateValidationFlowOverlay(): Promise<void>;
|
|
32
32
|
subscribeLabelCaptureValidationFlowListener(): void;
|
|
33
33
|
unsubscribeLabelCaptureValidationFlowListener(): void;
|
|
@@ -6,6 +6,7 @@ export * from './ExpiryDateText';
|
|
|
6
6
|
export * from './ImeiOneBarcode';
|
|
7
7
|
export * from './ImeiTwoBarcode';
|
|
8
8
|
export * from './LabelCapture';
|
|
9
|
+
export * from './LabelCaptureFeedback';
|
|
9
10
|
export * from './view/LabelCaptureAdvancedOverlay';
|
|
10
11
|
export * from './LabelCaptureListener';
|
|
11
12
|
export * from './LabelCaptureSession';
|
|
@@ -36,3 +37,4 @@ export * from './view/LabelCaptureValidationFlowOverlay';
|
|
|
36
37
|
export * from './LabelCaptureValidationFlowListener';
|
|
37
38
|
export * from './LabelCaptureValidationFlowSettings';
|
|
38
39
|
export * from './controller/LabelCaptureValidationFlowOverlayController';
|
|
40
|
+
export * from './private/PrivateLabelCapture';
|
|
@@ -5,21 +5,29 @@ import { LabelCaptureAdvancedOverlayListener } from "./LabelCaptureAdvancedOverl
|
|
|
5
5
|
import { CapturedLabel } from '../CapturedLabel';
|
|
6
6
|
import { LabelField } from '../LabelField';
|
|
7
7
|
export declare class LabelCaptureAdvancedOverlay extends DefaultSerializeable implements DataCaptureOverlay {
|
|
8
|
-
private
|
|
8
|
+
private type;
|
|
9
|
+
private controller;
|
|
10
|
+
private _view;
|
|
11
|
+
private modeId;
|
|
9
12
|
private get view();
|
|
13
|
+
private set view(value);
|
|
10
14
|
get shouldShowScanAreaGuides(): boolean;
|
|
11
15
|
set shouldShowScanAreaGuides(shouldShow: boolean);
|
|
12
|
-
private type;
|
|
13
|
-
private proxy;
|
|
14
|
-
private mode;
|
|
15
|
-
private _view;
|
|
16
16
|
private _listener;
|
|
17
17
|
private hasListener;
|
|
18
18
|
get listener(): LabelCaptureAdvancedOverlayListener | null;
|
|
19
19
|
set listener(listener: LabelCaptureAdvancedOverlayListener | null);
|
|
20
20
|
private _shouldShowScanAreaGuides;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Since 7.6. This factory will be removed in 8.0.
|
|
23
|
+
* Use the public constructor instead and add the overlay to the view manually:
|
|
24
|
+
* ```ts
|
|
25
|
+
* const overlay = new LabelCaptureAdvancedOverlay(labelCapture);
|
|
26
|
+
* view.addOverlay(overlay);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
21
29
|
static withLabelCaptureForView(labelCapture: LabelCapture, view: DataCaptureView | null): LabelCaptureAdvancedOverlay;
|
|
22
|
-
|
|
30
|
+
constructor(mode: LabelCapture);
|
|
23
31
|
setViewForCapturedLabel(capturedLabel: CapturedLabel, view: LabelCaptureAdvancedOverlayView | null): Promise<void>;
|
|
24
32
|
setViewForCapturedLabelField(field: LabelField, capturedLabel: CapturedLabel, view: LabelCaptureAdvancedOverlayView | null): Promise<void>;
|
|
25
33
|
setAnchorForCapturedLabel(capturedLabel: CapturedLabel, anchor: Anchor): Promise<void>;
|
|
@@ -13,10 +13,11 @@ export declare class LabelCaptureBasicOverlay extends DefaultSerializeable imple
|
|
|
13
13
|
static get defaultLabelBrush(): Brush;
|
|
14
14
|
private static get labelCaptureDefaults();
|
|
15
15
|
private type;
|
|
16
|
-
private
|
|
16
|
+
private controller;
|
|
17
17
|
private _view;
|
|
18
|
-
private
|
|
18
|
+
private modeId;
|
|
19
19
|
private get view();
|
|
20
|
+
private set view(value);
|
|
20
21
|
private _predictedFieldBrush;
|
|
21
22
|
get predictedFieldBrush(): Brush | null;
|
|
22
23
|
set predictedFieldBrush(newBrush: Brush | null);
|
|
@@ -31,15 +32,26 @@ export declare class LabelCaptureBasicOverlay extends DefaultSerializeable imple
|
|
|
31
32
|
private _listener;
|
|
32
33
|
get listener(): LabelCaptureBasicOverlayListener | null;
|
|
33
34
|
set listener(listener: LabelCaptureBasicOverlayListener | null);
|
|
34
|
-
private controller;
|
|
35
35
|
get shouldShowScanAreaGuides(): boolean;
|
|
36
36
|
set shouldShowScanAreaGuides(shouldShow: boolean);
|
|
37
37
|
private _viewfinder;
|
|
38
38
|
get viewfinder(): Viewfinder | null;
|
|
39
39
|
set viewfinder(newViewfinder: Viewfinder | null);
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Since 7.6. These factories will be removed in 8.0.
|
|
42
|
+
* Use the public constructor instead and add the overlay to the view manually:
|
|
43
|
+
* const overlay = new LabelCaptureBasicOverlay(labelCapture);
|
|
44
|
+
* view.addOverlay(overlay);
|
|
45
|
+
*/
|
|
40
46
|
static withLabelCapture(labelCapture: LabelCapture): LabelCaptureBasicOverlay;
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Since 7.6. These factories will be removed in 8.0.
|
|
49
|
+
* Use the public constructor instead and add the overlay to the view manually:
|
|
50
|
+
* const overlay = new LabelCaptureBasicOverlay(labelCapture);
|
|
51
|
+
* view.addOverlay(overlay);
|
|
52
|
+
*/
|
|
41
53
|
static withLabelCaptureForView(labelCapture: LabelCapture, view: DataCaptureView | null): LabelCaptureBasicOverlay;
|
|
42
|
-
|
|
54
|
+
constructor(mode: LabelCapture);
|
|
43
55
|
setBrushForFieldOfLabel(brush: Brush, field: LabelField, label: CapturedLabel): Promise<void>;
|
|
44
56
|
setBrushForLabel(brush: Brush, label: CapturedLabel): Promise<void>;
|
|
45
57
|
}
|
|
@@ -4,17 +4,25 @@ import { LabelCaptureValidationFlowSettings } from '../LabelCaptureValidationFlo
|
|
|
4
4
|
import { LabelCaptureValidationFlowListener } from '../LabelCaptureValidationFlowListener';
|
|
5
5
|
export declare class LabelCaptureValidationFlowOverlay extends DefaultSerializeable implements DataCaptureOverlay {
|
|
6
6
|
private type;
|
|
7
|
-
private mode;
|
|
8
|
-
private _view;
|
|
9
7
|
private settings;
|
|
10
8
|
private hasListener;
|
|
11
9
|
private _listener;
|
|
12
10
|
private controller;
|
|
13
|
-
private
|
|
11
|
+
private _view;
|
|
12
|
+
private modeId;
|
|
14
13
|
private get view();
|
|
14
|
+
private set view(value);
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Since 7.6. This factory will be removed in 8.0.
|
|
17
|
+
* Use the public constructor instead and add the overlay to the view manually:
|
|
18
|
+
* ```ts
|
|
19
|
+
* const overlay = new LabelCaptureValidationFlowOverlay(labelCapture);
|
|
20
|
+
* view.addOverlay(overlay);
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
15
23
|
static withLabelCaptureForView(labelCapture: LabelCapture, view: DataCaptureView | null): LabelCaptureValidationFlowOverlay;
|
|
16
24
|
get listener(): LabelCaptureValidationFlowListener | null;
|
|
17
25
|
set listener(listener: LabelCaptureValidationFlowListener | null);
|
|
18
26
|
applySettings(settings: LabelCaptureValidationFlowSettings): Promise<void>;
|
|
19
|
-
|
|
27
|
+
constructor(mode: LabelCapture);
|
|
20
28
|
}
|