@byteluck-fe/model-driven-engine 2.1.0-sourcemap.9 → 2.2.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/esm/common/Engine.js +20 -19
- package/dist/esm/common/Runtime.js +0 -4
- package/dist/esm/common/proxyState.js +4 -11
- package/dist/esm/utils/runtimeUtils.js +1 -6
- package/dist/index.umd.js +7 -7
- package/dist/types/common/Engine.d.ts +1 -0
- package/dist/types/common/Runtime.d.ts +4 -7
- package/dist/types/common/proxyState.d.ts +1 -2
- package/dist/types/utils/runtimeUtils.d.ts +1 -1
- package/package.json +8 -4
|
@@ -169,5 +169,6 @@ declare class Engine extends Watcher<EventKeys> {
|
|
|
169
169
|
getInstanceInSubtableHeader<T extends ControlsKeys>(instance: ControlRuntimeInstance<T> | RuntimeControl): ControlRuntimeInstance<T> | undefined;
|
|
170
170
|
setControlConfig(...args: Parameters<Runtime['registerControlConfig']>): Runtime;
|
|
171
171
|
getControlConfig(control: ControlsKeys): Readonly<Record<string, unknown>> | undefined;
|
|
172
|
+
inList(controlId: string): boolean;
|
|
172
173
|
}
|
|
173
174
|
export { Engine, EventPayload, SchemaEventPayload, EngineProps };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { RuleItem } from 'async-validator';
|
|
2
|
-
import { ControlRuntimeInstance,
|
|
3
|
-
type SchemaBaseType = Schema<ControlsKeys>;
|
|
2
|
+
import { ControlRuntimeInstance, ControlsKeys, RegisterControls, BeforeCreateInstance } from '@byteluck-fe/model-driven-core';
|
|
4
3
|
export interface RuntimeProps {
|
|
5
|
-
schema:
|
|
4
|
+
schema: any;
|
|
6
5
|
beforeCreateInstance?: BeforeCreateInstance;
|
|
7
6
|
}
|
|
8
|
-
export type InstanceMap = Record<string, ControlRuntimeInstance<ControlsKeys>[]>;
|
|
9
7
|
export declare class Runtime extends RegisterControls<'Runtime'> {
|
|
10
8
|
private _schema;
|
|
11
9
|
private _instance;
|
|
@@ -13,11 +11,10 @@ export declare class Runtime extends RegisterControls<'Runtime'> {
|
|
|
13
11
|
private _instanceMap;
|
|
14
12
|
constructor(props: RuntimeProps);
|
|
15
13
|
getFlatInstances(): ControlRuntimeInstance<ControlsKeys>[];
|
|
16
|
-
get schema():
|
|
14
|
+
get schema(): any;
|
|
17
15
|
get instance(): ControlRuntimeInstance<ControlsKeys>[];
|
|
18
16
|
get flatInstances(): ControlRuntimeInstance<ControlsKeys>[];
|
|
19
|
-
get instanceMap():
|
|
17
|
+
get instanceMap(): Record<string, ControlRuntimeInstance<ControlsKeys>[]>;
|
|
20
18
|
get rules(): Record<string, RuleItem>;
|
|
21
19
|
get antdRules(): Record<string, RuleItem>;
|
|
22
20
|
}
|
|
23
|
-
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RuntimeControl, RuntimeFormControl, ControlRuntimeInstance } from '@byteluck-fe/model-driven-core';
|
|
2
|
-
import { InstanceMap } from './Runtime';
|
|
3
2
|
export type ArrayApi = 'splice' | 'push' | 'shift' | 'pop' | 'unshift' | 'reverse';
|
|
4
3
|
/**
|
|
5
4
|
* @param state 当前正在操作的state数据
|
|
@@ -26,5 +25,5 @@ export declare function proxyState<T extends object>(state: T, callback: Callbac
|
|
|
26
25
|
* @param flatInstance 拍平的instance数组
|
|
27
26
|
* @param key 操作的数据在state的key - 可以是深层次的 subtable.0.input等
|
|
28
27
|
* */
|
|
29
|
-
export declare function findItem(flatInstance: RuntimeControl[], key: string
|
|
28
|
+
export declare function findItem(flatInstance: RuntimeControl[], key: string): undefined | RuntimeFormControl | ControlRuntimeInstance<'subtable'>;
|
|
30
29
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ControlRuntimeInstance, ControlsKeys, RuntimeControl, RuntimeFormControl, RuntimeLayoutControl, RuntimeListControl, RuntimeSearchControl } from '@byteluck-fe/model-driven-core';
|
|
2
2
|
export declare function hasChildrenControl(instance: RuntimeControl): instance is RuntimeLayoutControl | RuntimeListControl | RuntimeSearchControl;
|
|
3
|
-
export declare function loopFormControl(control:
|
|
3
|
+
export declare function loopFormControl(control: RuntimeControl[], callback: (item: RuntimeFormControl | ControlRuntimeInstance<'subtable'>, children?: RuntimeFormControl[]) => any): void;
|
|
4
4
|
export declare function loopDataViewControl(control: ControlRuntimeInstance<ControlsKeys>[], callback: (item: ControlRuntimeInstance<'data-view' | 'simple-search'>) => any): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-engine",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"dist",
|
|
15
15
|
"types"
|
|
16
16
|
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"registry": "https://registry.npmjs.org/",
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
17
21
|
"scripts": {
|
|
18
22
|
"compiler": "tsc --emitDeclarationOnly && swc src -d dist/esm -C jsc.target=es5 -D",
|
|
19
23
|
"cleanup": "rimraf ./dist",
|
|
@@ -22,12 +26,12 @@
|
|
|
22
26
|
"postpublish": "node ../../scripts/postpublish.js"
|
|
23
27
|
},
|
|
24
28
|
"dependencies": {
|
|
25
|
-
"@byteluck-fe/model-driven-core": "2.
|
|
26
|
-
"@byteluck-fe/model-driven-shared": "2.0
|
|
29
|
+
"@byteluck-fe/model-driven-core": "2.2.0",
|
|
30
|
+
"@byteluck-fe/model-driven-shared": "2.2.0",
|
|
27
31
|
"mathjs": "^11.3.3"
|
|
28
32
|
},
|
|
29
33
|
"devDependencies": {
|
|
30
34
|
"@types/node": "~18.0.3"
|
|
31
35
|
},
|
|
32
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "9f7c76dba6655ecace2ab5bdf98ee45d858fc985"
|
|
33
37
|
}
|