scandit-datacapture-frameworks-core 7.2.2 → 7.3.0-beta.2
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 +1 -20
- package/dist/dts/controllers/BaseNewController.d.ts +5 -0
- package/dist/dts/controllers/index.d.ts +1 -0
- package/dist/dts/index.d.ts +2 -0
- package/dist/dts/proxies/AdvancedInstanceAwareNativeProxy.d.ts +30 -0
- package/dist/dts/proxies/BaseInstanceAwareNativeProxy.d.ts +5 -0
- package/dist/dts/proxies/NativeCaller.d.ts +9 -0
- package/dist/dts/proxies/ProxyEvent.d.ts +4 -0
- package/dist/dts/proxies/index.d.ts +4 -0
- package/dist/index.js +298 -171
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,15 @@
|
|
|
1
1
|
import { EventEmitter } from "./EventEmitter";
|
|
2
|
+
import { NativeCaller, ProxyEvent } from "./proxies";
|
|
2
3
|
export declare class BaseController<PROXY> {
|
|
3
4
|
protected eventEmitter: EventEmitter;
|
|
4
5
|
private proxyName;
|
|
5
6
|
protected get _proxy(): PROXY;
|
|
6
7
|
constructor(proxyName: string);
|
|
7
8
|
}
|
|
8
|
-
export declare class BaseNewController<PROXY> {
|
|
9
|
-
protected eventEmitter: EventEmitter;
|
|
10
|
-
private _cachedProxy;
|
|
11
|
-
protected get _proxy(): PROXY;
|
|
12
|
-
constructor(proxyName: string);
|
|
13
|
-
emit(event: any, payload: any): void;
|
|
14
|
-
}
|
|
15
9
|
export declare class BaseNativeProxy {
|
|
16
10
|
protected eventEmitter: EventEmitter;
|
|
17
11
|
constructor();
|
|
18
12
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Framework specific native calls provider
|
|
21
|
-
*/
|
|
22
|
-
export interface NativeCaller {
|
|
23
|
-
callFn(fnName: string, args: object | undefined | null): Promise<any>;
|
|
24
|
-
registerEvent(evName: string, handler: (args: any) => Promise<void>): Promise<any>;
|
|
25
|
-
unregisterEvent(evName: string, subscription: any): Promise<void>;
|
|
26
|
-
eventHook(args: any): any;
|
|
27
|
-
}
|
|
28
|
-
export interface ProxyEvent {
|
|
29
|
-
name: string;
|
|
30
|
-
nativeEventName: string;
|
|
31
|
-
}
|
|
32
13
|
/**
|
|
33
14
|
* AdvancedNativeProxy will provide an easy way to communicate between native proxies
|
|
34
15
|
* and other parts of the architecture such as the controller layer
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./BaseNewController";
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseInstanceAwareNativeProxy } from "./BaseInstanceAwareNativeProxy";
|
|
2
|
+
import { NativeCaller } from "./NativeCaller";
|
|
3
|
+
import { ProxyEvent } from "./ProxyEvent";
|
|
4
|
+
/**
|
|
5
|
+
* AdvancedNativeProxy will provide an easy way to communicate between native proxies
|
|
6
|
+
* and other parts of the architecture such as the controller layer
|
|
7
|
+
*/
|
|
8
|
+
export declare class AdvancedInstanceAwareNativeProxy extends BaseInstanceAwareNativeProxy {
|
|
9
|
+
protected nativeCaller: NativeCaller;
|
|
10
|
+
protected events: ProxyEvent[];
|
|
11
|
+
protected eventSubscriptions: Map<string, any>;
|
|
12
|
+
private eventHandlers;
|
|
13
|
+
[k: string]: any;
|
|
14
|
+
constructor(nativeCaller: NativeCaller, events?: ProxyEvent[]);
|
|
15
|
+
dispose(): Promise<void>;
|
|
16
|
+
_call(fnName: string, args: object | undefined | null): Promise<any>;
|
|
17
|
+
private _registerEvent;
|
|
18
|
+
private _unregisterEvent;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Function to create a custom AdvancedNativeProxy. This will return an object which will provide dynamically the
|
|
22
|
+
* methods specified in the PROXY interface.
|
|
23
|
+
*
|
|
24
|
+
* The Proxy interface implemented in order to call native methods will require a special mark
|
|
25
|
+
* `$methodName` for method calls
|
|
26
|
+
* `on$methodName` for the listeners added to the events defined in eventsEnum
|
|
27
|
+
* @param nativeCaller
|
|
28
|
+
* @param eventsEnum
|
|
29
|
+
*/
|
|
30
|
+
export declare function createAdvancedInstanceAwareNativeProxy<PROXY>(nativeCaller: NativeCaller, eventsEnum?: any): PROXY;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework specific native calls provider
|
|
3
|
+
*/
|
|
4
|
+
export interface NativeCaller {
|
|
5
|
+
callFn(fnName: string, args: object | undefined | null): Promise<any>;
|
|
6
|
+
registerEvent(evName: string, handler: (args: any) => Promise<void>): Promise<any>;
|
|
7
|
+
unregisterEvent(evName: string, subscription: any): Promise<void>;
|
|
8
|
+
eventHook(args: any): any;
|
|
9
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ProxyEvent } from "./ProxyEvent";
|
|
2
|
+
export { BaseInstanceAwareNativeProxy } from "./BaseInstanceAwareNativeProxy";
|
|
3
|
+
export { AdvancedInstanceAwareNativeProxy, createAdvancedInstanceAwareNativeProxy } from "./AdvancedInstanceAwareNativeProxy";
|
|
4
|
+
export { NativeCaller } from "./NativeCaller";
|