scandit-datacapture-frameworks-core 7.1.1 → 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.
@@ -4,7 +4,6 @@ export declare class BaseController<PROXY> {
4
4
  private proxyName;
5
5
  protected get _proxy(): PROXY;
6
6
  constructor(proxyName: string);
7
- emit(event: any, payload: any): void;
8
7
  }
9
8
  export declare class BaseNewController<PROXY> {
10
9
  protected eventEmitter: EventEmitter;
@@ -24,6 +23,7 @@ export interface NativeCaller {
24
23
  callFn(fnName: string, args: object | undefined | null): Promise<any>;
25
24
  registerEvent(evName: string, handler: (args: any) => Promise<void>): Promise<any>;
26
25
  unregisterEvent(evName: string, subscription: any): Promise<void>;
26
+ eventHook(args: any): any;
27
27
  }
28
28
  export interface ProxyEvent {
29
29
  name: string;
@@ -41,8 +41,8 @@ export declare class AdvancedNativeProxy extends BaseNativeProxy {
41
41
  constructor(nativeCaller: NativeCaller, events?: ProxyEvent[]);
42
42
  dispose(): Promise<void>;
43
43
  _call(fnName: string, args: object | undefined | null): Promise<any>;
44
- _registerEvent(event: ProxyEvent): Promise<void>;
45
- _unregisterEvent(event: ProxyEvent): Promise<void>;
44
+ private _registerEvent;
45
+ private _unregisterEvent;
46
46
  }
47
47
  /**
48
48
  * Function to create a custom AdvancedNativeProxy. This will return an object which will provide dynamically the
@@ -55,3 +55,15 @@ export declare class AdvancedNativeProxy extends BaseNativeProxy {
55
55
  * @param eventsEnum
56
56
  */
57
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;
@@ -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 "../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";
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 instance;
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
- private initialize;
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;