@byteluck-fe/model-driven-engine 2.8.0-alpha.1 → 2.8.0-alpha.10
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 +188 -54
- package/dist/esm/common/Runtime.js +69 -30
- package/dist/esm/common/Store.js +6 -1
- package/dist/esm/plugins/CalcPlugin.js +2 -0
- 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/common/Store.d.ts +1 -1
- package/dist/types/plugins/ES6ModulePlugin.d.ts +2 -1
- package/package.json +4 -4
|
@@ -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,7 +60,7 @@ 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(
|
|
63
|
+
static register(control: ControlExport): typeof import("@byteluck-fe/model-driven-core").RegisterControls;
|
|
64
64
|
static judgeControlIsRegistered(control: Parameters<(typeof Runtime)['register']>[0]): boolean;
|
|
65
65
|
mount(): void;
|
|
66
66
|
destroy(): void;
|
|
@@ -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,13 +79,14 @@ 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;
|
|
85
86
|
};
|
|
86
87
|
getRules(controlId?: string): import("async-validator").Rules | undefined;
|
|
87
88
|
getAntdRules(controlId?: string): import("async-validator").Rules | undefined;
|
|
88
|
-
getState(controlId?: string, rowIndex?: number):
|
|
89
|
+
getState(controlId?: string, rowIndex?: number): any;
|
|
89
90
|
getEmptyState(controlId?: string): any;
|
|
90
91
|
/**
|
|
91
92
|
* 设置payload的options,提供在不是使用标准api修改state的时候可以传递options,会在本次任务执行完成之后清空
|
|
@@ -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;
|
|
@@ -43,7 +43,7 @@ declare class Store {
|
|
|
43
43
|
* @param value
|
|
44
44
|
*/
|
|
45
45
|
setState(controlId: string, value: unknown, rowIndex?: number): void;
|
|
46
|
-
getState(controlId: string, rowIndex?: number):
|
|
46
|
+
getState(controlId: string, rowIndex?: number): any;
|
|
47
47
|
getEmptyState(controlId: string): Object | undefined;
|
|
48
48
|
getDataBind(controlId: string): DataBind | ObjectDataBind | undefined;
|
|
49
49
|
}
|
|
@@ -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.10",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"postpublish": "node ../../scripts/postpublish.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@byteluck-fe/model-driven-core": "2.8.0-alpha.
|
|
30
|
-
"@byteluck-fe/model-driven-shared": "2.7.0-alpha.
|
|
29
|
+
"@byteluck-fe/model-driven-core": "2.8.0-alpha.7",
|
|
30
|
+
"@byteluck-fe/model-driven-shared": "2.7.0-alpha.38a",
|
|
31
31
|
"@types/mathjs": "^9.4.2",
|
|
32
32
|
"mathjs": "^11.3.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "~18.0.6"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "d29f82f160d7446cf7335709be44340eeca7c60f"
|
|
38
38
|
}
|