scandit-datacapture-frameworks-core 7.1.0 → 7.2.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/dist/dts/BaseController.d.ts +21 -2
- package/dist/dts/FactoryMaker.d.ts +1 -0
- package/dist/dts/common/Brush.d.ts +2 -0
- package/dist/dts/context/DataCaptureContext.d.ts +15 -14
- package/dist/dts/context/controller/DataCaptureContextController.d.ts +2 -2
- package/dist/dts/view/DataCaptureView.d.ts +1 -0
- package/dist/index.js +267 -197
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,12 @@ export declare class BaseController<PROXY> {
|
|
|
4
4
|
private proxyName;
|
|
5
5
|
protected get _proxy(): PROXY;
|
|
6
6
|
constructor(proxyName: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class BaseNewController<PROXY> {
|
|
9
|
+
protected eventEmitter: EventEmitter;
|
|
10
|
+
private _cachedProxy;
|
|
11
|
+
protected get _proxy(): PROXY;
|
|
12
|
+
constructor(proxyName: string);
|
|
7
13
|
emit(event: any, payload: any): void;
|
|
8
14
|
}
|
|
9
15
|
export declare class BaseNativeProxy {
|
|
@@ -17,6 +23,7 @@ export interface NativeCaller {
|
|
|
17
23
|
callFn(fnName: string, args: object | undefined | null): Promise<any>;
|
|
18
24
|
registerEvent(evName: string, handler: (args: any) => Promise<void>): Promise<any>;
|
|
19
25
|
unregisterEvent(evName: string, subscription: any): Promise<void>;
|
|
26
|
+
eventHook(args: any): any;
|
|
20
27
|
}
|
|
21
28
|
export interface ProxyEvent {
|
|
22
29
|
name: string;
|
|
@@ -34,8 +41,8 @@ export declare class AdvancedNativeProxy extends BaseNativeProxy {
|
|
|
34
41
|
constructor(nativeCaller: NativeCaller, events?: ProxyEvent[]);
|
|
35
42
|
dispose(): Promise<void>;
|
|
36
43
|
_call(fnName: string, args: object | undefined | null): Promise<any>;
|
|
37
|
-
_registerEvent
|
|
38
|
-
_unregisterEvent
|
|
44
|
+
private _registerEvent;
|
|
45
|
+
private _unregisterEvent;
|
|
39
46
|
}
|
|
40
47
|
/**
|
|
41
48
|
* Function to create a custom AdvancedNativeProxy. This will return an object which will provide dynamically the
|
|
@@ -48,3 +55,15 @@ export declare class AdvancedNativeProxy extends BaseNativeProxy {
|
|
|
48
55
|
* @param eventsEnum
|
|
49
56
|
*/
|
|
50
57
|
export declare function createAdvancedNativeProxy<PROXY>(nativeCaller: NativeCaller, eventsEnum?: any): PROXY;
|
|
58
|
+
/**
|
|
59
|
+
* Function to create a custom AdvancedNativeProxy. This will return an object which will provide dynamically the
|
|
60
|
+
* methods specified in the PROXY interface.
|
|
61
|
+
*
|
|
62
|
+
* The Proxy interface implemented in order to call native methods will require a special mark
|
|
63
|
+
* `$methodName` for method calls
|
|
64
|
+
* `on$methodName` for the listeners added to the events defined in eventsEnum
|
|
65
|
+
* @param klass
|
|
66
|
+
* @param nativeCaller
|
|
67
|
+
* @param eventsEnum
|
|
68
|
+
*/
|
|
69
|
+
export declare function createAdvancedNativeFromCtorProxy<PROXY>(klass: new (nativeCaller: NativeCaller, events: ProxyEvent[]) => Partial<PROXY>, nativeCaller: NativeCaller, eventsEnum?: any): PROXY;
|
|
@@ -8,5 +8,6 @@ export declare class FactoryMaker {
|
|
|
8
8
|
static bindLazyInstance<T>(clsName: string, builder: () => T): void;
|
|
9
9
|
static bindInstanceIfNotExists(clsName: string, instance: any): void;
|
|
10
10
|
static getInstance<T>(clsName: string): T | undefined;
|
|
11
|
+
static createInstance<T>(clsName: string): T | undefined;
|
|
11
12
|
}
|
|
12
13
|
export {};
|
|
@@ -3,6 +3,7 @@ import { Color } from "./Color";
|
|
|
3
3
|
export interface PrivateBrush {
|
|
4
4
|
readonly copy: Brush;
|
|
5
5
|
defaults: any;
|
|
6
|
+
fromJSON(json: any): Brush;
|
|
6
7
|
toJSON(): BrushJSON;
|
|
7
8
|
}
|
|
8
9
|
export interface BrushJSON {
|
|
@@ -25,4 +26,5 @@ export declare class Brush extends DefaultSerializeable {
|
|
|
25
26
|
private get copy();
|
|
26
27
|
constructor();
|
|
27
28
|
constructor(fillColor: Color, strokeColor: Color, strokeWidth: number);
|
|
29
|
+
private static fromJSON;
|
|
28
30
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { BaseDataCaptureView } from
|
|
2
|
-
import { FrameSource } from
|
|
3
|
-
import { DefaultSerializeable } from
|
|
4
|
-
import { DataCaptureComponent } from
|
|
5
|
-
import { DataCaptureContextController } from
|
|
6
|
-
import { DataCaptureContextCreationOptions } from
|
|
7
|
-
import { DataCaptureContextListener } from
|
|
8
|
-
import { DataCaptureContextSettings } from
|
|
9
|
-
import { DataCaptureMode } from
|
|
10
|
-
import { OpenSourceSoftwareLicenseInfo } from
|
|
1
|
+
import { BaseDataCaptureView } from '../view';
|
|
2
|
+
import { FrameSource } from '../frame';
|
|
3
|
+
import { DefaultSerializeable } from '../serializable';
|
|
4
|
+
import { DataCaptureComponent } from './DataCaptureComponent';
|
|
5
|
+
import { DataCaptureContextController } from './controller/DataCaptureContextController';
|
|
6
|
+
import { DataCaptureContextCreationOptions } from './DataCaptureContextCreationOptions';
|
|
7
|
+
import { DataCaptureContextListener } from './DataCaptureContextListener';
|
|
8
|
+
import { DataCaptureContextSettings } from './DataCaptureContextSettings';
|
|
9
|
+
import { DataCaptureMode } from './DataCaptureMode';
|
|
10
|
+
import { OpenSourceSoftwareLicenseInfo } from './OpenSourceSoftwareLicenseInfo';
|
|
11
11
|
export declare class DataCaptureContext extends DefaultSerializeable {
|
|
12
12
|
private licenseKey;
|
|
13
13
|
private deviceName;
|
|
14
|
-
private static
|
|
14
|
+
private static _instance;
|
|
15
|
+
static get sharedInstance(): DataCaptureContext;
|
|
15
16
|
private controller;
|
|
16
17
|
private _framework;
|
|
17
18
|
private _frameworkVersion;
|
|
@@ -30,19 +31,20 @@ export declare class DataCaptureContext extends DefaultSerializeable {
|
|
|
30
31
|
static forLicenseKey(licenseKey: string): DataCaptureContext;
|
|
31
32
|
static forLicenseKeyWithSettings(licenseKey: string, settings: DataCaptureContextSettings | null): DataCaptureContext;
|
|
32
33
|
static forLicenseKeyWithOptions(licenseKey: string, options: DataCaptureContextCreationOptions | null): DataCaptureContext;
|
|
34
|
+
static initialize(licenseKey: string, options?: DataCaptureContextCreationOptions | null, settings?: DataCaptureContextSettings | null): DataCaptureContext;
|
|
33
35
|
private static create;
|
|
34
36
|
private constructor();
|
|
35
37
|
setFrameSource(frameSource: FrameSource | null): Promise<void>;
|
|
36
38
|
addListener(listener: DataCaptureContextListener): void;
|
|
37
39
|
removeListener(listener: DataCaptureContextListener): void;
|
|
38
40
|
addMode(mode: DataCaptureMode): void;
|
|
41
|
+
setMode(mode: DataCaptureMode): void;
|
|
42
|
+
removeCurrentMode(): void;
|
|
39
43
|
removeMode(mode: DataCaptureMode): void;
|
|
40
44
|
removeAllModes(): void;
|
|
41
45
|
dispose(): void;
|
|
42
46
|
applySettings(settings: DataCaptureContextSettings): Promise<void>;
|
|
43
47
|
static getOpenSourceSoftwareLicenseInfo(): Promise<OpenSourceSoftwareLicenseInfo>;
|
|
44
|
-
private initialize;
|
|
45
|
-
private initializeAsync;
|
|
46
48
|
private update;
|
|
47
49
|
}
|
|
48
50
|
export interface PrivateDataCaptureContext {
|
|
@@ -53,5 +55,4 @@ export interface PrivateDataCaptureContext {
|
|
|
53
55
|
view: BaseDataCaptureView | null;
|
|
54
56
|
update: () => Promise<void>;
|
|
55
57
|
initialize(): void;
|
|
56
|
-
initializeAsync(): Promise<void>;
|
|
57
58
|
}
|
|
@@ -29,7 +29,6 @@ export declare class DataCaptureContextController {
|
|
|
29
29
|
static get frameworkVersion(): string;
|
|
30
30
|
private get privateContext();
|
|
31
31
|
static forDataCaptureContext(context: DataCaptureContext): DataCaptureContextController;
|
|
32
|
-
static forDataCaptureContextAsync(context: DataCaptureContext): Promise<DataCaptureContextController>;
|
|
33
32
|
private constructor();
|
|
34
33
|
updateContextFromJSON(): Promise<void>;
|
|
35
34
|
addModeToContext(mode: DataCaptureMode): Promise<void>;
|
|
@@ -37,9 +36,10 @@ export declare class DataCaptureContextController {
|
|
|
37
36
|
removeAllModesFromContext(): Promise<void>;
|
|
38
37
|
dispose(): void;
|
|
39
38
|
private unsubscribeListener;
|
|
40
|
-
|
|
39
|
+
initialize(): Promise<void>;
|
|
41
40
|
private initializeContextFromJSON;
|
|
42
41
|
static getOpenSourceSoftwareLicenseInfo(): Promise<OpenSourceSoftwareLicenseInfo>;
|
|
42
|
+
private _listenerRegistered;
|
|
43
43
|
private subscribeListener;
|
|
44
44
|
private notifyListenersOfDeserializationError;
|
|
45
45
|
private notifyListenersOfDidChangeStatus;
|
|
@@ -15,6 +15,7 @@ export declare class BaseDataCaptureView extends DefaultSerializeable {
|
|
|
15
15
|
private get coreDefaults();
|
|
16
16
|
private _scanAreaMargins;
|
|
17
17
|
get scanAreaMargins(): MarginsWithUnit;
|
|
18
|
+
viewId: number | null;
|
|
18
19
|
set scanAreaMargins(newValue: MarginsWithUnit);
|
|
19
20
|
private _pointOfInterest;
|
|
20
21
|
get pointOfInterest(): PointWithUnit;
|