@byteluck-fe/model-driven-engine 2.8.1-alpha.1 → 2.8.1-alpha.12

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.
@@ -81,10 +81,17 @@ declare class Engine extends Watcher<EventKeys> {
81
81
  updateInstanceProps(instance: SchemaEventPayload['instance'] | string, props: string, value: unknown, rowIndex?: number): void;
82
82
  getRule(controlType: string, props: any): any[];
83
83
  getAllRules(controlId?: string): {
84
+ rules: Record<string, import("async-validator").RuleItem>;
85
+ antdRules: Record<string, import("async-validator").RuleItem>;
86
+ fieldCodeRules: Record<string, import("async-validator").RuleItem>;
87
+ defaultAntdRules: Record<string, import("async-validator").RuleItem>;
88
+ defaultRule: Record<string, import("async-validator").RuleItem>;
89
+ defaultFieldRules: Record<string, import("async-validator").RuleItem>;
90
+ } | {
84
91
  rules: import("async-validator").Rules | undefined;
85
92
  antdRules: import("async-validator").Rules | undefined;
86
93
  };
87
- getRules(controlId?: string): import("async-validator").Rules | undefined;
94
+ getRules(controlId?: string, isGetFieldCodeRules?: boolean): import("async-validator").RuleItem | import("async-validator").RuleItem[] | import("async-validator").Rules | undefined;
88
95
  getAntdRules(controlId?: string): import("async-validator").Rules | undefined;
89
96
  getState(controlId?: string, rowIndex?: number): any;
90
97
  getEmptyState(controlId?: string): any;
@@ -180,6 +187,7 @@ declare class Engine extends Watcher<EventKeys> {
180
187
  getInstanceInSubtableHeader<T extends ControlsKeys, K extends ControlRuntimeInstance<T>, U extends ControlRuntimeInstance<ControlsKeys>>(instance: K | RuntimeControl): K | undefined;
181
188
  setControlConfig(...args: Parameters<Runtime['registerControlConfig']>): Runtime;
182
189
  getControlConfig(control: ControlsKeys): Readonly<Record<string, unknown>> | undefined;
183
- inList(controlId: string): undefined;
190
+ inList(controlId: string): string | undefined;
191
+ findSubtableHeadersControl(controlId: string): undefined;
184
192
  }
185
193
  export { Engine, EventPayload, SchemaEventPayload, EngineProps };
@@ -20,7 +20,12 @@ export declare class Runtime extends RegisterControls<'Runtime'> {
20
20
  get allRules(): {
21
21
  rules: Record<string, RuleItem>;
22
22
  antdRules: Record<string, RuleItem>;
23
+ fieldCodeRules: Record<string, RuleItem>;
24
+ defaultAntdRules: Record<string, RuleItem>;
25
+ defaultRule: Record<string, RuleItem>;
26
+ defaultFieldRules: Record<string, RuleItem>;
23
27
  };
24
28
  get rules(): Record<string, RuleItem>;
29
+ get fieldCodeRules(): Record<string, RuleItem>;
25
30
  get antdRules(): Record<string, RuleItem>;
26
31
  }
@@ -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.1",
3
+ "version": "2.8.1-alpha.12",
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.1",
30
- "@byteluck-fe/model-driven-shared": "2.7.0-alpha.38a",
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": "60d755b96c42296a27fb89b2cd88fa2a71569e9e"
37
+ "gitHead": "581d3865f28a027173e3186a2c7119178bdc0f37"
38
38
  }