@byteluck-fe/model-driven-engine 3.0.0-beta.5 → 4.34.0-lx1
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 +85 -59
- package/dist/esm/common/Runtime.js +3 -7
- package/dist/esm/common/Store.js +9 -11
- package/dist/esm/common/checkerValue.js +1 -1
- package/dist/esm/common/proxyState.js +27 -34
- package/dist/esm/plugins/ControlsEventPlugin.js +1 -11
- package/dist/esm/plugins/StylePlugin.js +6 -14
- package/dist/esm/utils/runtimeUtils.js +1 -2
- package/dist/index.umd.js +6 -6
- package/dist/types/common/Engine.d.ts +3 -8
- package/dist/types/common/proxyState.d.ts +6 -3
- package/dist/types/plugins/ControlsEventPlugin.d.ts +1 -3
- package/dist/types/plugins/StylePlugin.d.ts +1 -2
- package/package.json +38 -38
|
@@ -40,12 +40,8 @@ type EngineProps<T extends keyof LayoutControls = keyof LayoutControls> = {
|
|
|
40
40
|
autoMount?: boolean;
|
|
41
41
|
debug?: boolean;
|
|
42
42
|
externalParams?: Record<string, unknown>;
|
|
43
|
-
messagesI18n: any;
|
|
44
|
-
children: {
|
|
45
|
-
[key: string]: Engine;
|
|
46
|
-
};
|
|
47
43
|
};
|
|
48
|
-
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' |
|
|
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;
|
|
49
45
|
declare class Engine extends Watcher<EventKeys> {
|
|
50
46
|
private store;
|
|
51
47
|
rawStore: Record<string, any>;
|
|
@@ -54,9 +50,6 @@ declare class Engine extends Watcher<EventKeys> {
|
|
|
54
50
|
isMounted: boolean;
|
|
55
51
|
id: string;
|
|
56
52
|
readonly externalParams?: Record<string, any>;
|
|
57
|
-
children: {
|
|
58
|
-
[key: string]: Engine;
|
|
59
|
-
};
|
|
60
53
|
private __plugins;
|
|
61
54
|
private __pluginsApplied;
|
|
62
55
|
private readonly $options;
|
|
@@ -114,6 +107,8 @@ declare class Engine extends Watcher<EventKeys> {
|
|
|
114
107
|
* @param states
|
|
115
108
|
*/
|
|
116
109
|
setStates(states: StatesType | StateType, rowIndex?: number, options?: any): void;
|
|
110
|
+
getTitleField(key: string): unknown;
|
|
111
|
+
getSystemField(key: string): any;
|
|
117
112
|
/**
|
|
118
113
|
* 通过dataCode和fieldCode来获取控件的值
|
|
119
114
|
* @param dataCode 模型编码 - 如果是主表的话就是主表的模型编码,明细子表的话就是子表的模型编码
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { RuntimeFormControl, ControlRuntimeInstance } from '@byteluck-fe/model-driven-core';
|
|
2
|
+
import { Engine } from './Engine';
|
|
3
3
|
export type ArrayApi = 'splice' | 'push' | 'shift' | 'pop' | 'unshift' | 'reverse';
|
|
4
4
|
/**
|
|
5
5
|
* @param state 当前正在操作的state数据
|
|
@@ -26,5 +26,8 @@ export declare function proxyState<T extends object>(state: T, callback: Callbac
|
|
|
26
26
|
* @param flatInstance 拍平的instance数组
|
|
27
27
|
* @param key 操作的数据在state的key - 可以是深层次的 subtable.0.input等
|
|
28
28
|
* */
|
|
29
|
-
export declare function findItem(
|
|
29
|
+
export declare function findItem(key: string, engine: Engine): {
|
|
30
|
+
instance: undefined | RuntimeFormControl | ControlRuntimeInstance<'subtable'>;
|
|
31
|
+
rowIndex: undefined | number;
|
|
32
|
+
};
|
|
30
33
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Engine } from '../common/Engine';
|
|
2
2
|
import { Plugin } from '../common/Plugin';
|
|
3
|
-
import { CustomEventItem } from '@byteluck-fe/model-driven-shared';
|
|
4
3
|
export type ControlsEvent = {
|
|
5
4
|
[controlId: string]: {
|
|
6
5
|
[eventName: string]: string[];
|
|
@@ -9,8 +8,7 @@ export type ControlsEvent = {
|
|
|
9
8
|
export declare class ControlsEventPlugin implements Plugin {
|
|
10
9
|
private config;
|
|
11
10
|
private engine;
|
|
12
|
-
|
|
13
|
-
constructor(config: ControlsEvent, customEvents: CustomEventItem[]);
|
|
11
|
+
constructor(config: ControlsEvent);
|
|
14
12
|
apply(engine: Engine): void;
|
|
15
13
|
private engineAddEventListener;
|
|
16
14
|
private callControlEvent;
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@byteluck-fe/model-driven-engine",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "> TODO: description",
|
|
5
|
-
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
|
-
"homepage": "",
|
|
7
|
-
"license": "ISC",
|
|
8
|
-
"main": "dist/esm/index.js",
|
|
9
|
-
"module": "dist/esm/index.js",
|
|
10
|
-
"umd": "dist/index.umd.js",
|
|
11
|
-
"types": "dist/types",
|
|
12
|
-
"files": [
|
|
13
|
-
"bin",
|
|
14
|
-
"dist",
|
|
15
|
-
"types"
|
|
16
|
-
],
|
|
17
|
-
"publishConfig": {
|
|
18
|
-
"registry": "https://registry.npmjs.org/",
|
|
19
|
-
"access": "public"
|
|
20
|
-
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"compiler": "tsc --emitDeclarationOnly && swc src -d dist/esm -C jsc.target=es5 -D",
|
|
23
|
-
"cleanup": "rimraf ./dist",
|
|
24
|
-
"prepublish": "npm run cleanup && npm run compiler && npm run build",
|
|
25
|
-
"build": "rollup -c",
|
|
26
|
-
"postpublish": "node ../../scripts/postpublish.js"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@byteluck-fe/model-driven-core": "
|
|
30
|
-
"@byteluck-fe/model-driven-shared": "
|
|
31
|
-
"@types/mathjs": "^9.4.2",
|
|
32
|
-
"mathjs": "^11.3.3"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@types/node": "~18.0.6"
|
|
36
|
-
},
|
|
37
|
-
"gitHead": "
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@byteluck-fe/model-driven-engine",
|
|
3
|
+
"version": "4.34.0-lx1",
|
|
4
|
+
"description": "> TODO: description",
|
|
5
|
+
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
|
+
"homepage": "",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"main": "dist/esm/index.js",
|
|
9
|
+
"module": "dist/esm/index.js",
|
|
10
|
+
"umd": "dist/index.umd.js",
|
|
11
|
+
"types": "dist/types",
|
|
12
|
+
"files": [
|
|
13
|
+
"bin",
|
|
14
|
+
"dist",
|
|
15
|
+
"types"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"registry": "https://registry.npmjs.org/",
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"compiler": "tsc --emitDeclarationOnly && swc src -d dist/esm -C jsc.target=es5 -D",
|
|
23
|
+
"cleanup": "rimraf ./dist",
|
|
24
|
+
"prepublish": "npm run cleanup && npm run compiler && npm run build",
|
|
25
|
+
"build": "rollup -c",
|
|
26
|
+
"postpublish": "node ../../scripts/postpublish.js"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@byteluck-fe/model-driven-core": "4.34.0-lx1",
|
|
30
|
+
"@byteluck-fe/model-driven-shared": "2.9.1-beta.1",
|
|
31
|
+
"@types/mathjs": "^9.4.2",
|
|
32
|
+
"mathjs": "^11.3.3"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "~18.0.6"
|
|
36
|
+
},
|
|
37
|
+
"gitHead": "c6070af7a1a7524a3d74ecf8c80c8c15115fddba"
|
|
38
|
+
}
|