@byteluck-fe/model-driven-engine 2.7.0-alpha.0 → 2.7.0-alpha.2

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,17 +5,17 @@ import { Runtime, RuntimeProps } from './Runtime';
5
5
  import { DataBindMappingFieldItem, dataBindMappingType, DataBindMappingTypeItem, StatesType, StateType } from './Store';
6
6
  import { ActionManager } from './ActionManager';
7
7
  import { DataManager } from './DataManager';
8
- export declare type getDataControlIdMappingType = {
8
+ export type getDataControlIdMappingType = {
9
9
  [controlId: string]: {
10
10
  dataBind: any;
11
11
  dataView: string;
12
12
  children: getDataControlIdMappingType;
13
13
  };
14
14
  };
15
- declare type dataSetType = {
15
+ type dataSetType = {
16
16
  [dataCode: string]: Record<string, unknown> | Record<string, unknown>[];
17
17
  };
18
- declare type FieldSetType = {
18
+ type FieldSetType = {
19
19
  [fieldCode: string]: unknown;
20
20
  };
21
21
  interface EventPayload {
@@ -32,7 +32,7 @@ interface SchemaEventPayload {
32
32
  props: string;
33
33
  rowIndex?: number;
34
34
  }
35
- declare type EngineProps<T extends keyof LayoutControls = keyof LayoutControls> = {
35
+ type EngineProps<T extends keyof LayoutControls = keyof LayoutControls> = {
36
36
  schema: RuntimeProps['schema'];
37
37
  beforeCreateInstance?: RuntimeProps['beforeCreateInstance'];
38
38
  plugins?: Plugin[];
@@ -41,7 +41,7 @@ declare type EngineProps<T extends keyof LayoutControls = keyof LayoutControls>
41
41
  debug?: boolean;
42
42
  externalParams?: Record<string, unknown>;
43
43
  };
44
- declare type EventKeys = 'click' | 'click-finish' | 'wps-open' | 'wps-save' | 'wps-rename' | 'change' | 'schema-change' | 'search' | 'checked' | 'input' | 'focus' | 'blur' | 'list-change' | 'list-splice' | 'list-delete' | 'list-before-insert' | 'list-search' | 'list-mounted' | 'list-actions' | 'engine-mounted' | 'engine-submit' | 'engine-submit-params' | 'engine-submitted' | string;
44
+ type EventKeys = 'click' | 'click-finish' | 'wps-open' | 'wps-save' | 'wps-rename' | 'change' | 'schema-change' | 'search' | 'checked' | 'input' | 'focus' | 'blur' | 'list-change' | 'list-splice' | 'list-delete' | 'list-before-insert' | 'list-search' | 'list-mounted' | 'list-actions' | 'engine-mounted' | 'engine-submit' | 'engine-submit-params' | 'engine-submitted' | string;
45
45
  declare class Engine extends Watcher<EventKeys> {
46
46
  private store;
47
47
  rawStore: Record<string, any>;
@@ -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): InstanceType<import("@byteluck-fe/model-driven-core").ControlsConstructor<RowType, "Runtime">> | undefined;
73
+ listControlCreateRow<RowType extends ControlsKeys>(instance: RuntimeListControl, rowType: RowType): 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;
@@ -4,7 +4,7 @@ export interface RuntimeProps {
4
4
  schema: any;
5
5
  beforeCreateInstance?: BeforeCreateInstance;
6
6
  }
7
- export declare type InstanceMap = Record<string, ControlRuntimeInstance<ControlsKeys>[]>;
7
+ export type InstanceMap = Record<string, ControlRuntimeInstance<ControlsKeys>[]>;
8
8
  export declare class Runtime extends RegisterControls<'Runtime'> {
9
9
  private _schema;
10
10
  private _instance;
@@ -1,11 +1,11 @@
1
1
  import { RuntimeControl, DataBind, ObjectDataBind, OptionSetting } from '@byteluck-fe/model-driven-core';
2
- export declare type StateType = {
2
+ export type StateType = {
3
3
  [controlId: string]: unknown;
4
4
  };
5
- export declare type StatesType = {
5
+ export type StatesType = {
6
6
  [dataViewId: string]: StateType;
7
7
  };
8
- export declare type controlIdMappingType = {
8
+ export type controlIdMappingType = {
9
9
  [controlId: string]: {
10
10
  dataBind: DataBind | ObjectDataBind;
11
11
  dataView: string;
@@ -24,10 +24,10 @@ export interface DataBindMappingFieldItem {
24
24
  dataBind: DataBind | ObjectDataBind;
25
25
  dataViewId: string[];
26
26
  }
27
- export declare type dataBindMappingType = {
27
+ export type dataBindMappingType = {
28
28
  [dataCode: string]: DataBindMappingTypeItem;
29
29
  };
30
- declare type StoreProps = {
30
+ type StoreProps = {
31
31
  instance: RuntimeControl[];
32
32
  };
33
33
  declare class Store {
@@ -1,14 +1,14 @@
1
1
  import { RuntimeControl, RuntimeFormControl, ControlRuntimeInstance } from '@byteluck-fe/model-driven-core';
2
2
  import { InstanceMap } from './Runtime';
3
- export declare type ArrayApi = 'splice' | 'push' | 'shift' | 'pop' | 'unshift' | 'reverse';
3
+ export type ArrayApi = 'splice' | 'push' | 'shift' | 'pop' | 'unshift' | 'reverse';
4
4
  /**
5
5
  * @param state 当前正在操作的state数据
6
6
  * @param key 当前操作的state的key 这个key是从store.state开始的
7
7
  * @param type 如果state是数组,并且直接操作api的话,会携带type参数,代表当前操作的数组的某个api
8
8
  * @param args 如果state是数组,并且直接操作api的话,会携带args参数,代表当前操作的api的参数
9
9
  */
10
- declare type Callback = (state: object, key: string, type?: ArrayApi | unknown, args?: unknown[], result?: unknown) => void;
11
- declare type BeforeSetCallback = (state: object, key: string, newValue: unknown, oldValue: unknown) => never | unknown;
10
+ type Callback = (state: object, key: string, type?: ArrayApi | unknown, args?: unknown[], result?: unknown) => void;
11
+ type BeforeSetCallback = (state: object, key: string, newValue: unknown, oldValue: unknown) => never | unknown;
12
12
  export declare const engineProxyFlag: unique symbol;
13
13
  export declare const engineTargetKey: unique symbol;
14
14
  export declare const engineArrayBeforeSetCallbackFlag: unique symbol;
@@ -1,6 +1,6 @@
1
1
  import { Engine } from '../common/Engine';
2
2
  import { Plugin } from '../common/Plugin';
3
- export declare type ControlsEvent = {
3
+ export type ControlsEvent = {
4
4
  [controlId: string]: {
5
5
  [eventName: string]: string[];
6
6
  };
@@ -1,18 +1,18 @@
1
1
  import { Engine, Plugin } from '../common';
2
- export declare type VariableMap = {
2
+ export type VariableMap = {
3
3
  [key: string]: any;
4
4
  };
5
- export declare type ActionConfig = {
5
+ export type ActionConfig = {
6
6
  module: {
7
7
  compiled: string;
8
8
  source: string;
9
9
  type: 'FUNCTION';
10
10
  };
11
11
  };
12
- export declare type FuncMap = {
12
+ export type FuncMap = {
13
13
  [key: string]: Function;
14
14
  };
15
- export declare type Module = {
15
+ export type Module = {
16
16
  funcMap: FuncMap;
17
17
  variables: VariableMap;
18
18
  };
@@ -1,5 +1,5 @@
1
1
  import { Engine, Plugin } from '../common';
2
- export declare type LifecycleEvent = {
2
+ export type LifecycleEvent = {
3
3
  did_mount: string[];
4
4
  did_submit: string[];
5
5
  will_submit: string[];
@@ -1,5 +1,5 @@
1
1
  import { Engine, Plugin } from '../common';
2
- export declare type StyleConfig = {
2
+ export type StyleConfig = {
3
3
  compiled: string;
4
4
  source: string;
5
5
  type: 'CSS';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-engine",
3
- "version": "2.7.0-alpha.0",
3
+ "version": "2.7.0-alpha.2",
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.7.0-alpha.0",
30
- "@byteluck-fe/model-driven-shared": "2.7.0-alpha.0",
29
+ "@byteluck-fe/model-driven-core": "2.7.0-alpha.2",
30
+ "@byteluck-fe/model-driven-shared": "2.7.0-alpha.2",
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": "1f71ece061d5febd6e6d9809b2ee8d35aa74c41f"
37
+ "gitHead": "23607484dc1f65494b32a6c2e9fff86f0ce8dc54"
38
38
  }