@byteluck-fe/model-driven-engine 2.8.1-alpha.0 → 2.8.1-alpha.11
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 +47 -45
- package/dist/esm/common/Runtime.js +100 -1
- package/dist/esm/common/Store.js +19 -1
- package/dist/esm/plugins/ControlsEventPlugin.js +2 -2
- package/dist/esm/plugins/LifecycleEventPlugin.js +2 -2
- package/dist/index.umd.js +8 -8
- 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 +5 -1
- package/package.json +4 -4
|
@@ -84,7 +84,7 @@ declare class Engine extends Watcher<EventKeys> {
|
|
|
84
84
|
rules: import("async-validator").Rules | undefined;
|
|
85
85
|
antdRules: import("async-validator").Rules | undefined;
|
|
86
86
|
};
|
|
87
|
-
getRules(controlId?: string): import("async-validator").Rules | undefined;
|
|
87
|
+
getRules(controlId?: string, isGetFieldCodeRules?: boolean): import("async-validator").RuleItem | import("async-validator").RuleItem[] | import("async-validator").Rules | undefined;
|
|
88
88
|
getAntdRules(controlId?: string): import("async-validator").Rules | undefined;
|
|
89
89
|
getState(controlId?: string, rowIndex?: number): any;
|
|
90
90
|
getEmptyState(controlId?: string): any;
|
|
@@ -175,11 +175,12 @@ declare class Engine extends Watcher<EventKeys> {
|
|
|
175
175
|
* 如果控件在表内,则返回行下标
|
|
176
176
|
* 如果控件不在明细表内,则返回undefined
|
|
177
177
|
* */
|
|
178
|
-
getInstanceRowIndex
|
|
178
|
+
getInstanceRowIndex<T extends ControlRuntimeInstance<ControlsKeys>>(instance: T | RuntimeControl): number | undefined;
|
|
179
179
|
getInstanceParentControl<T extends ControlsKeys>(instance: ControlRuntimeInstance<ControlsKeys> | RuntimeControl, controlType: T): ControlRuntimeInstance<T> | undefined;
|
|
180
|
-
getInstanceInSubtableHeader<T extends ControlsKeys
|
|
180
|
+
getInstanceInSubtableHeader<T extends ControlsKeys, K extends ControlRuntimeInstance<T>, U extends ControlRuntimeInstance<ControlsKeys>>(instance: K | RuntimeControl): K | undefined;
|
|
181
181
|
setControlConfig(...args: Parameters<Runtime['registerControlConfig']>): Runtime;
|
|
182
182
|
getControlConfig(control: ControlsKeys): Readonly<Record<string, unknown>> | undefined;
|
|
183
|
-
inList(controlId: string): undefined;
|
|
183
|
+
inList(controlId: string): string | undefined;
|
|
184
|
+
findSubtableHeadersControl(controlId: string): undefined;
|
|
184
185
|
}
|
|
185
186
|
export { Engine, EventPayload, SchemaEventPayload, EngineProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RuntimeControl, DataBind, ObjectDataBind, OptionSetting } from '@byteluck-fe/model-driven-core';
|
|
1
|
+
import { RuntimeControl, DataBind, ObjectDataBind, OptionSetting, ControlRuntimeInstance, ControlsKeys } from '@byteluck-fe/model-driven-core';
|
|
2
2
|
export type StateType = {
|
|
3
3
|
[controlId: string]: unknown;
|
|
4
4
|
};
|
|
@@ -27,6 +27,9 @@ export interface DataBindMappingFieldItem {
|
|
|
27
27
|
export type dataBindMappingType = {
|
|
28
28
|
[dataCode: string]: DataBindMappingTypeItem;
|
|
29
29
|
};
|
|
30
|
+
export type SubtableHeadersControlIdMapping = {
|
|
31
|
+
[controlId: string]: ControlRuntimeInstance<ControlsKeys>;
|
|
32
|
+
};
|
|
30
33
|
type StoreProps = {
|
|
31
34
|
instance: RuntimeControl[];
|
|
32
35
|
};
|
|
@@ -35,6 +38,7 @@ declare class Store {
|
|
|
35
38
|
state: StatesType;
|
|
36
39
|
dataBindMapping: dataBindMappingType;
|
|
37
40
|
controlIdMapping: controlIdMappingType;
|
|
41
|
+
subtableHeadersControlIdMapping: SubtableHeadersControlIdMapping;
|
|
38
42
|
readonly defaultState: StatesType;
|
|
39
43
|
constructor(props: StoreProps);
|
|
40
44
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-engine",
|
|
3
|
-
"version": "2.8.1-alpha.
|
|
3
|
+
"version": "2.8.1-alpha.11",
|
|
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.1-alpha.
|
|
30
|
-
"@byteluck-fe/model-driven-shared": "2.
|
|
29
|
+
"@byteluck-fe/model-driven-core": "2.8.1-alpha.5",
|
|
30
|
+
"@byteluck-fe/model-driven-shared": "2.8.1-alpha.5",
|
|
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": "a336cf0d270cf542fe2266ae66868c5fc7cd5d00"
|
|
38
38
|
}
|