@byteluck-fe/model-driven-engine 2.8.0-alpha.1 → 2.8.0-alpha.1b
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/esm/common/Engine.js +180 -86
- package/dist/esm/common/Runtime.js +69 -30
- package/dist/esm/plugins/ES6ModulePlugin.js +47 -18
- package/dist/index.umd.js +7 -7
- package/dist/types/common/Engine.d.ts +5 -4
- package/dist/types/common/Runtime.d.ts +1 -0
- package/dist/types/plugins/ES6ModulePlugin.d.ts +2 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ControlRuntimeInstance, ControlsInstance, ControlsKeys, DataBind, DeepPartial, LayoutControls, ObjectDataBind, RuntimeControl, RuntimeListControl, Schema } from '@byteluck-fe/model-driven-core';
|
|
1
|
+
import { ControlExport, ControlRuntimeInstance, ControlsInstance, ControlsKeys, DataBind, DeepPartial, LayoutControls, ObjectDataBind, RuntimeControl, RuntimeListControl, Schema } from '@byteluck-fe/model-driven-core';
|
|
2
2
|
import { Callback, Watcher } from '@byteluck-fe/model-driven-shared';
|
|
3
3
|
import { Plugin } from './Plugin';
|
|
4
4
|
import { Runtime, RuntimeProps } from './Runtime';
|
|
@@ -60,8 +60,8 @@ declare class Engine extends Watcher<EventKeys> {
|
|
|
60
60
|
private debugLog;
|
|
61
61
|
use(plugin: Plugin): this;
|
|
62
62
|
registerControl(...arg: Parameters<Runtime['register']>): this;
|
|
63
|
-
static register(
|
|
64
|
-
static judgeControlIsRegistered(control: Parameters<
|
|
63
|
+
static register(control: ControlExport): typeof import("@byteluck-fe/model-driven-core").RegisterControls;
|
|
64
|
+
static judgeControlIsRegistered(control: Parameters<typeof Runtime['register']>[0]): boolean;
|
|
65
65
|
mount(): void;
|
|
66
66
|
destroy(): void;
|
|
67
67
|
private _handlerProxyState;
|
|
@@ -70,7 +70,7 @@ declare class Engine extends Watcher<EventKeys> {
|
|
|
70
70
|
private _handlerArrayUpdate;
|
|
71
71
|
private _handlerObjectUpdate;
|
|
72
72
|
private applyPlugins;
|
|
73
|
-
listControlCreateRow<RowType extends ControlsKeys>(instance: RuntimeListControl, rowType: RowType): NonNullable<InstanceType<import("@byteluck-fe/model-driven-core").ControlsConstructor<RowType, "Runtime">>> | undefined;
|
|
73
|
+
listControlCreateRow<RowType extends ControlsKeys>(instance: RuntimeListControl, rowType: RowType): RuntimeControl | NonNullable<InstanceType<import("@byteluck-fe/model-driven-core").ControlsConstructor<RowType, "Runtime">>> | undefined;
|
|
74
74
|
listControlAddRow(instance: RuntimeListControl, rowType?: ControlsKeys): void;
|
|
75
75
|
emit(eventKey: EventKeys, payload: EventPayload): Promise<unknown[]>;
|
|
76
76
|
on(key: EventKeys, callback: Callback): void;
|
|
@@ -79,6 +79,7 @@ declare class Engine extends Watcher<EventKeys> {
|
|
|
79
79
|
createControlInstance: <T extends never>(type: T, initSchema?: DeepPartial<Schema<T, InstanceType<import("@byteluck-fe/model-driven-core").Controls[T]["Property"]>>> | undefined) => InstanceType<import("@byteluck-fe/model-driven-core").ControlsConstructor<T, "Runtime">> | undefined;
|
|
80
80
|
schemaEvent(eventKey: 'schema-change', payload: SchemaEventPayload): void;
|
|
81
81
|
updateInstanceProps(instance: SchemaEventPayload['instance'] | string, props: string, value: unknown, rowIndex?: number): void;
|
|
82
|
+
getRule(controlType: string, props: any): any[];
|
|
82
83
|
getAllRules(controlId?: string): {
|
|
83
84
|
rules: import("async-validator").Rules | undefined;
|
|
84
85
|
antdRules: import("async-validator").Rules | undefined;
|
|
@@ -10,6 +10,7 @@ export declare class Runtime extends RegisterControls<'Runtime'> {
|
|
|
10
10
|
private _instance;
|
|
11
11
|
private _flatInstances;
|
|
12
12
|
private _instanceMap;
|
|
13
|
+
private _controlParentIdMap;
|
|
13
14
|
constructor(props: RuntimeProps);
|
|
14
15
|
getFlatInstances(): ControlRuntimeInstance<ControlsKeys>[];
|
|
15
16
|
get schema(): any;
|
|
@@ -20,7 +20,8 @@ export declare class ES6ModulePlugin implements Plugin {
|
|
|
20
20
|
private config;
|
|
21
21
|
private engine;
|
|
22
22
|
private env;
|
|
23
|
-
|
|
23
|
+
private eventJs;
|
|
24
|
+
constructor(config: ActionConfig, env: any, eventJs?: any);
|
|
24
25
|
apply(engine: Engine): void;
|
|
25
26
|
}
|
|
26
27
|
export declare function parseModule(action: ActionConfig, engine: Engine, env: any): Module | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-engine",
|
|
3
|
-
"version": "2.8.0-alpha.
|
|
3
|
+
"version": "2.8.0-alpha.1b",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"postpublish": "node ../../scripts/postpublish.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@byteluck-fe/model-driven-core": "2.8.0-alpha.
|
|
29
|
+
"@byteluck-fe/model-driven-core": "2.8.0-alpha.1b",
|
|
30
30
|
"@byteluck-fe/model-driven-shared": "2.7.0-alpha.36",
|
|
31
31
|
"@types/mathjs": "^9.4.2",
|
|
32
32
|
"mathjs": "^11.3.3"
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "~18.0.6"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "e885fc64b96c04f4aa5c22c243f82296728830ec"
|
|
38
38
|
}
|