@byteluck-fe/model-driven-engine 2.1.0-sourcemap.2 → 2.1.0-sourcemap.3
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.
|
@@ -5,6 +5,7 @@ export interface RuntimeProps {
|
|
|
5
5
|
schema: SchemaBaseType | SchemaBaseType[];
|
|
6
6
|
beforeCreateInstance?: BeforeCreateInstance;
|
|
7
7
|
}
|
|
8
|
+
export type InstanceMap = Record<string, ControlRuntimeInstance<ControlsKeys>[]>;
|
|
8
9
|
export declare class Runtime extends RegisterControls<'Runtime'> {
|
|
9
10
|
private _schema;
|
|
10
11
|
private _instance;
|
|
@@ -15,7 +16,7 @@ export declare class Runtime extends RegisterControls<'Runtime'> {
|
|
|
15
16
|
get schema(): SchemaBaseType | SchemaBaseType[];
|
|
16
17
|
get instance(): ControlRuntimeInstance<ControlsKeys>[];
|
|
17
18
|
get flatInstances(): ControlRuntimeInstance<ControlsKeys>[];
|
|
18
|
-
get instanceMap():
|
|
19
|
+
get instanceMap(): InstanceMap;
|
|
19
20
|
get rules(): Record<string, RuleItem>;
|
|
20
21
|
get antdRules(): Record<string, RuleItem>;
|
|
21
22
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RuntimeControl, RuntimeFormControl, ControlRuntimeInstance } from '@byteluck-fe/model-driven-core';
|
|
2
|
+
import { InstanceMap } from './Runtime';
|
|
2
3
|
export type ArrayApi = 'splice' | 'push' | 'shift' | 'pop' | 'unshift' | 'reverse';
|
|
3
4
|
/**
|
|
4
5
|
* @param state 当前正在操作的state数据
|
|
@@ -25,5 +26,5 @@ export declare function proxyState<T extends object>(state: T, callback: Callbac
|
|
|
25
26
|
* @param flatInstance 拍平的instance数组
|
|
26
27
|
* @param key 操作的数据在state的key - 可以是深层次的 subtable.0.input等
|
|
27
28
|
* */
|
|
28
|
-
export declare function findItem(flatInstance: RuntimeControl[], key: string): undefined | RuntimeFormControl | ControlRuntimeInstance<'subtable'>;
|
|
29
|
+
export declare function findItem(flatInstance: RuntimeControl[], key: string, instanceMap: InstanceMap): undefined | RuntimeFormControl | ControlRuntimeInstance<'subtable'>;
|
|
29
30
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-engine",
|
|
3
|
-
"version": "2.1.0-sourcemap.
|
|
3
|
+
"version": "2.1.0-sourcemap.3",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "~18.0.3"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "4cb226e39799d42055b1458b3aeb391a6386a7bc"
|
|
33
33
|
}
|