@ibiz-template/runtime 0.7.41-alpha.125 → 0.7.41-alpha.127
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/index.esm.js +37832 -37545
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +8 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +25 -0
- package/out/application.d.ts +0 -7
- package/out/application.d.ts.map +1 -1
- package/out/application.js +0 -21
- package/out/controller/control/app-menu/app-menu.controller.js +1 -1
- package/out/controller/control/toolbar/toolbar.controller.js +1 -1
- package/out/controller/control/tree/tree.service.d.ts.map +1 -1
- package/out/controller/control/tree/tree.service.js +1 -1
- package/out/controller/utils/view-msg/view-msg-controller.d.ts.map +1 -1
- package/out/controller/utils/view-msg/view-msg-controller.js +1 -1
- package/out/de-logic/de-logic-context.d.ts +4 -13
- package/out/de-logic/de-logic-context.d.ts.map +1 -1
- package/out/de-logic/de-logic-context.js +2 -3
- package/out/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.d.ts +15 -5
- package/out/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.js +3 -4
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts +2 -1
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts +2 -1
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link.d.ts +6 -7
- package/out/de-logic/de-logic-link/de-logic-link.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link.js +3 -4
- package/out/de-logic/de-logic-node/de-logic-node.d.ts +2 -1
- package/out/de-logic/de-logic-node/de-logic-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/index.d.ts +1 -0
- package/out/de-logic/de-logic-node/index.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/index.js +1 -0
- package/out/de-logic/de-logic.d.ts +31 -37
- package/out/de-logic/de-logic.d.ts.map +1 -1
- package/out/de-logic/de-logic.js +49 -98
- package/out/de-logic/index.d.ts +31 -40
- package/out/de-logic/index.d.ts.map +1 -1
- package/out/de-logic/index.js +57 -76
- package/out/de-logic/provider.d.ts +6 -0
- package/out/de-logic/provider.d.ts.map +1 -0
- package/out/de-logic/provider.js +25 -0
- package/out/install.d.ts.map +1 -1
- package/out/install.js +6 -0
- package/out/interface/api/app/i-api-app-hub-service.d.ts +7 -0
- package/out/interface/api/app/i-api-app-hub-service.d.ts.map +1 -1
- package/out/interface/api/common/i-api-de-logic-params.d.ts +9 -0
- package/out/interface/api/common/i-api-de-logic-params.d.ts.map +1 -0
- package/out/interface/api/common/i-api-logic-context.d.ts +83 -0
- package/out/interface/api/common/i-api-logic-context.d.ts.map +1 -0
- package/out/interface/api/common/i-api-logic-context.js +1 -0
- package/out/interface/api/common/i-api-logic-params.d.ts +27 -0
- package/out/interface/api/common/i-api-logic-params.d.ts.map +1 -0
- package/out/interface/api/common/i-api-logic-params.js +1 -0
- package/out/interface/api/common/i-api-ui-logic-params.d.ts +3 -21
- package/out/interface/api/common/i-api-ui-logic-params.d.ts.map +1 -1
- package/out/interface/api/common/index.d.ts +2 -0
- package/out/interface/api/common/index.d.ts.map +1 -1
- package/out/interface/api/controller/control/form-detail/i-api-form-detail.controller.d.ts +1 -1
- package/out/interface/common/i-logic-context/i-logic-context.d.ts +27 -0
- package/out/interface/common/i-logic-context/i-logic-context.d.ts.map +1 -0
- package/out/interface/common/i-logic-context/i-logic-context.js +1 -0
- package/out/interface/common/i-logic-link-cond/i-logic-link-cond.d.ts +18 -0
- package/out/interface/common/i-logic-link-cond/i-logic-link-cond.d.ts.map +1 -0
- package/out/interface/common/i-logic-link-cond/i-logic-link-cond.js +1 -0
- package/out/interface/common/index.d.ts +2 -1
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/de-logic/i-de-logic-context.d.ts +10 -0
- package/out/interface/de-logic/i-de-logic-context.d.ts.map +1 -0
- package/out/interface/de-logic/i-de-logic-context.js +1 -0
- package/out/interface/de-logic/i-de-logic-link-cond.d.ts +33 -0
- package/out/interface/de-logic/i-de-logic-link-cond.d.ts.map +1 -0
- package/out/interface/de-logic/i-de-logic-link-cond.js +1 -0
- package/out/interface/de-logic/i-de-logic-link.d.ts +43 -0
- package/out/interface/de-logic/i-de-logic-link.d.ts.map +1 -0
- package/out/interface/de-logic/i-de-logic-link.js +1 -0
- package/out/interface/de-logic/i-de-logic-node.d.ts +10 -0
- package/out/interface/de-logic/i-de-logic-node.d.ts.map +1 -0
- package/out/interface/de-logic/i-de-logic-node.js +1 -0
- package/out/interface/de-logic/i-de-logic-params.d.ts +10 -0
- package/out/interface/de-logic/i-de-logic-params.d.ts.map +1 -0
- package/out/interface/de-logic/i-de-logic-params.js +1 -0
- package/out/interface/de-logic/i-de-logic.d.ts +23 -0
- package/out/interface/de-logic/i-de-logic.d.ts.map +1 -0
- package/out/interface/de-logic/i-de-logic.js +1 -0
- package/out/interface/de-logic/index.d.ts +7 -0
- package/out/interface/de-logic/index.d.ts.map +1 -0
- package/out/interface/de-logic/index.js +1 -0
- package/out/interface/index.d.ts +1 -0
- package/out/interface/index.d.ts.map +1 -1
- package/out/interface/index.js +1 -0
- package/out/interface/provider/i-de-logic-node.provider.d.ts +29 -0
- package/out/interface/provider/i-de-logic-node.provider.d.ts.map +1 -0
- package/out/interface/provider/i-de-logic-node.provider.js +1 -0
- package/out/interface/provider/i-de-logic.provider.d.ts +22 -0
- package/out/interface/provider/i-de-logic.provider.d.ts.map +1 -0
- package/out/interface/provider/i-de-logic.provider.js +1 -0
- package/out/interface/provider/i-ui-action.provider.d.ts +2 -1
- package/out/interface/provider/i-ui-action.provider.d.ts.map +1 -1
- package/out/interface/provider/i-ui-logic-node.provider.d.ts +20 -14
- package/out/interface/provider/i-ui-logic-node.provider.d.ts.map +1 -1
- package/out/interface/provider/i-ui-logic.provider.d.ts +22 -0
- package/out/interface/provider/i-ui-logic.provider.d.ts.map +1 -0
- package/out/interface/provider/i-ui-logic.provider.js +1 -0
- package/out/interface/provider/index.d.ts +3 -0
- package/out/interface/provider/index.d.ts.map +1 -1
- package/out/interface/register/i-register-params.d.ts +17 -7
- package/out/interface/register/i-register-params.d.ts.map +1 -1
- package/out/interface/ui-logic/i-ui-logic-context.d.ts +8 -83
- package/out/interface/ui-logic/i-ui-logic-context.d.ts.map +1 -1
- package/out/interface/ui-logic/i-ui-logic-link-cond.d.ts +33 -0
- package/out/interface/ui-logic/i-ui-logic-link-cond.d.ts.map +1 -0
- package/out/interface/ui-logic/i-ui-logic-link-cond.js +1 -0
- package/out/interface/ui-logic/i-ui-logic-link.d.ts +43 -0
- package/out/interface/ui-logic/i-ui-logic-link.d.ts.map +1 -0
- package/out/interface/ui-logic/i-ui-logic-link.js +1 -0
- package/out/interface/ui-logic/i-ui-logic-node.d.ts +10 -0
- package/out/interface/ui-logic/i-ui-logic-node.d.ts.map +1 -0
- package/out/interface/ui-logic/i-ui-logic-node.js +1 -0
- package/out/interface/{common/i-ui-logic-params → ui-logic}/i-ui-logic-params.d.ts +3 -5
- package/out/interface/ui-logic/i-ui-logic-params.d.ts.map +1 -0
- package/out/interface/ui-logic/i-ui-logic-params.js +1 -0
- package/out/interface/ui-logic/i-ui-logic.d.ts +23 -0
- package/out/interface/ui-logic/i-ui-logic.d.ts.map +1 -0
- package/out/interface/ui-logic/i-ui-logic.js +1 -0
- package/out/interface/ui-logic/index.d.ts +5 -0
- package/out/interface/ui-logic/index.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +11 -3
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +11 -3
- package/out/locale/zh-CN/index.d.ts +11 -3
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +11 -3
- package/out/register/custom-register.d.ts +19 -3
- package/out/register/custom-register.d.ts.map +1 -1
- package/out/register/custom-register.js +55 -6
- package/out/register/helper/app-menu-item-register.d.ts +2 -2
- package/out/register/helper/app-menu-item-register.d.ts.map +1 -1
- package/out/register/helper/app-menu-item-register.js +21 -10
- package/out/register/helper/de-logic-node-register.d.ts +24 -0
- package/out/register/helper/de-logic-node-register.d.ts.map +1 -0
- package/out/register/helper/de-logic-node-register.js +50 -0
- package/out/register/helper/de-logic-register.d.ts +20 -0
- package/out/register/helper/de-logic-register.d.ts.map +1 -0
- package/out/register/helper/de-logic-register.js +41 -0
- package/out/register/helper/index.d.ts +3 -0
- package/out/register/helper/index.d.ts.map +1 -1
- package/out/register/helper/index.js +3 -0
- package/out/register/helper/portlet-register.d.ts +3 -5
- package/out/register/helper/portlet-register.d.ts.map +1 -1
- package/out/register/helper/portlet-register.js +20 -19
- package/out/register/helper/toolbar-item-register.d.ts +5 -7
- package/out/register/helper/toolbar-item-register.d.ts.map +1 -1
- package/out/register/helper/toolbar-item-register.js +24 -16
- package/out/register/helper/ui-logic-node-register.d.ts +13 -9
- package/out/register/helper/ui-logic-node-register.d.ts.map +1 -1
- package/out/register/helper/ui-logic-node-register.js +51 -17
- package/out/register/helper/ui-logic-register.d.ts +20 -0
- package/out/register/helper/ui-logic-register.d.ts.map +1 -0
- package/out/register/helper/ui-logic-register.js +41 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +1 -1
- package/out/ui-logic/index.d.ts +5 -10
- package/out/ui-logic/index.d.ts.map +1 -1
- package/out/ui-logic/index.js +12 -14
- package/out/ui-logic/provider.d.ts +6 -0
- package/out/ui-logic/provider.d.ts.map +1 -0
- package/out/ui-logic/provider.js +32 -0
- package/out/ui-logic/ui-logic-context.d.ts +1 -1
- package/out/ui-logic/ui-logic-context.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.d.ts +16 -5
- package/out/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.js +3 -4
- package/out/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.d.ts +2 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.d.ts +2 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link.d.ts +6 -8
- package/out/ui-logic/ui-logic-link/ui-logic-link.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link.js +3 -5
- package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.js +3 -3
- package/out/ui-logic/ui-logic-node/ui-logic-node.d.ts +9 -14
- package/out/ui-logic/ui-logic-node/ui-logic-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/ui-logic-node.js +2 -4
- package/out/ui-logic/ui-logic.d.ts +27 -36
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +35 -108
- package/out/utils/dr-ctrl-util/index.d.ts.map +1 -1
- package/out/utils/dr-ctrl-util/index.js +1 -1
- package/package.json +2 -2
- package/src/app-hub.ts +28 -0
- package/src/application.ts +0 -23
- package/src/controller/control/app-menu/app-menu.controller.ts +1 -1
- package/src/controller/control/toolbar/toolbar.controller.ts +1 -1
- package/src/controller/control/tree/tree.service.ts +1 -0
- package/src/controller/utils/view-msg/view-msg-controller.ts +7 -1
- package/src/de-logic/de-logic-context.ts +4 -16
- package/src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts +17 -5
- package/src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts +5 -1
- package/src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts +5 -1
- package/src/de-logic/de-logic-link/de-logic-link.ts +6 -6
- package/src/de-logic/de-logic-node/de-logic-node.ts +2 -1
- package/src/de-logic/de-logic-node/index.ts +1 -0
- package/src/de-logic/de-logic.ts +60 -123
- package/src/de-logic/index.ts +66 -85
- package/src/de-logic/provider.ts +83 -0
- package/src/install.ts +6 -0
- package/src/interface/api/app/i-api-app-hub-service.ts +8 -0
- package/src/interface/api/common/i-api-de-logic-params.ts +8 -0
- package/src/interface/api/common/i-api-logic-context.ts +83 -0
- package/src/interface/api/common/i-api-logic-params.ts +29 -0
- package/src/interface/api/common/i-api-ui-logic-params.ts +3 -24
- package/src/interface/api/common/index.ts +2 -0
- package/src/interface/api/controller/control/form-detail/i-api-form-detail.controller.ts +1 -1
- package/src/interface/common/i-logic-context/i-logic-context.ts +27 -0
- package/src/interface/common/i-logic-link-cond/i-logic-link-cond.ts +18 -0
- package/src/interface/common/index.ts +2 -1
- package/src/interface/de-logic/i-de-logic-context.ts +9 -0
- package/src/interface/de-logic/i-de-logic-link-cond.ts +33 -0
- package/src/interface/de-logic/i-de-logic-link.ts +47 -0
- package/src/interface/de-logic/i-de-logic-node.ts +9 -0
- package/src/interface/de-logic/i-de-logic-params.ts +9 -0
- package/src/interface/de-logic/i-de-logic.ts +23 -0
- package/src/interface/de-logic/index.ts +10 -0
- package/src/interface/index.ts +1 -0
- package/src/interface/provider/i-de-logic-node.provider.ts +29 -0
- package/src/interface/provider/i-de-logic.provider.ts +22 -0
- package/src/interface/provider/i-ui-action.provider.ts +2 -1
- package/src/interface/provider/i-ui-logic-node.provider.ts +20 -14
- package/src/interface/provider/i-ui-logic.provider.ts +22 -0
- package/src/interface/provider/index.ts +3 -0
- package/src/interface/register/i-register-params.ts +31 -7
- package/src/interface/ui-logic/i-ui-logic-context.ts +9 -95
- package/src/interface/ui-logic/i-ui-logic-link-cond.ts +33 -0
- package/src/interface/ui-logic/i-ui-logic-link.ts +47 -0
- package/src/interface/ui-logic/i-ui-logic-node.ts +9 -0
- package/src/interface/{common/i-ui-logic-params → ui-logic}/i-ui-logic-params.ts +3 -5
- package/src/interface/ui-logic/i-ui-logic.ts +23 -0
- package/src/interface/ui-logic/index.ts +9 -0
- package/src/locale/en/index.ts +20 -4
- package/src/locale/zh-CN/index.ts +18 -3
- package/src/register/custom-register.ts +69 -12
- package/src/register/helper/app-menu-item-register.ts +26 -13
- package/src/register/helper/de-logic-node-register.ts +76 -0
- package/src/register/helper/de-logic-register.ts +63 -0
- package/src/register/helper/index.ts +3 -0
- package/src/register/helper/portlet-register.ts +23 -22
- package/src/register/helper/toolbar-item-register.ts +32 -19
- package/src/register/helper/ui-logic-node-register.ts +79 -25
- package/src/register/helper/ui-logic-register.ts +63 -0
- package/src/service/service/entity/method/de-action.ts +7 -1
- package/src/ui-logic/index.ts +17 -16
- package/src/ui-logic/provider.ts +122 -0
- package/src/ui-logic/ui-logic-context.ts +1 -1
- package/src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts +18 -5
- package/src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts +5 -1
- package/src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts +5 -1
- package/src/ui-logic/ui-logic-link/ui-logic-link.ts +6 -7
- package/src/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.ts +3 -3
- package/src/ui-logic/ui-logic-node/ui-logic-node.ts +9 -14
- package/src/ui-logic/ui-logic.ts +46 -141
- package/src/utils/dr-ctrl-util/index.ts +7 -1
- package/out/interface/common/i-ui-logic-params/i-ui-logic-params.d.ts.map +0 -1
- /package/out/interface/{common/i-ui-logic-params/i-ui-logic-params.js → api/common/i-api-de-logic-params.js} +0 -0
|
@@ -1,95 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly context: IContext;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 数据
|
|
14
|
-
*/
|
|
15
|
-
readonly data: IData;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 视图参数
|
|
19
|
-
*/
|
|
20
|
-
readonly viewParam: IParams;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 界面逻辑参数
|
|
24
|
-
*
|
|
25
|
-
* @author chitanda
|
|
26
|
-
* @date 2023-11-01 17:11:52
|
|
27
|
-
* @type {Record<string, unknown>}
|
|
28
|
-
*/
|
|
29
|
-
readonly params: Record<string, unknown>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* UI 逻辑执行返回值
|
|
33
|
-
*
|
|
34
|
-
* @author chitanda
|
|
35
|
-
* @date 2023-11-01 17:11:29
|
|
36
|
-
* @type {unknown}
|
|
37
|
-
*/
|
|
38
|
-
result: unknown;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* 是否存在结束节点
|
|
42
|
-
*
|
|
43
|
-
* @author chitanda
|
|
44
|
-
* @date 2023-11-01 17:11:57
|
|
45
|
-
* @type {boolean}
|
|
46
|
-
*/
|
|
47
|
-
isEndNode: boolean;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 默认参数节点名称
|
|
51
|
-
*
|
|
52
|
-
* @default 'Default'
|
|
53
|
-
* @author chitanda
|
|
54
|
-
* @date 2023-11-01 17:11:31
|
|
55
|
-
* @type {string}
|
|
56
|
-
*/
|
|
57
|
-
defaultParamName: string;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* 重置实体逻辑参数
|
|
61
|
-
*
|
|
62
|
-
* @author chitanda
|
|
63
|
-
* @date 2023-11-01 17:11:18
|
|
64
|
-
* @param {string} name
|
|
65
|
-
*/
|
|
66
|
-
resetParam(name: string): void;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 设置上一次返回值
|
|
70
|
-
*
|
|
71
|
-
* @author chitanda
|
|
72
|
-
* @date 2023-11-01 17:11:31
|
|
73
|
-
* @param {string} name
|
|
74
|
-
*/
|
|
75
|
-
renewParam(name: string): void;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* 设置上一次返回值
|
|
79
|
-
*
|
|
80
|
-
* @author chitanda
|
|
81
|
-
* @date 2023-11-01 17:11:48
|
|
82
|
-
* @param {unknown} value
|
|
83
|
-
*/
|
|
84
|
-
setLastReturn(value: unknown): void;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* 是否是实体参数变量(即后台数据对象)
|
|
88
|
-
*
|
|
89
|
-
* @author chitanda
|
|
90
|
-
* @date 2023-11-01 17:11:01
|
|
91
|
-
* @param {string} paramId
|
|
92
|
-
* @return {*} {boolean}
|
|
93
|
-
*/
|
|
94
|
-
isEntityParam(paramId: string): boolean;
|
|
95
|
-
}
|
|
1
|
+
import { ILogicContext } from '../common';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 界面逻辑执行上下文
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IUILogicContext
|
|
7
|
+
* @extends {ILogicContext}
|
|
8
|
+
*/
|
|
9
|
+
export interface IUILogicContext extends ILogicContext {}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ILogicLinkCond } from '../common';
|
|
2
|
+
import { IUILogicContext } from './i-ui-logic-context';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 界面逻辑连接条件接口
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IUILogicLinkCond
|
|
8
|
+
*/
|
|
9
|
+
export interface IUILogicLinkCond extends ILogicLinkCond {
|
|
10
|
+
/**
|
|
11
|
+
* @description 条件判断
|
|
12
|
+
* @param {IUILogicContext} ctx 界面逻辑执行上下文
|
|
13
|
+
* @param {IContext} context 上下文
|
|
14
|
+
* @param {IData} data 数据
|
|
15
|
+
* @returns {*} {boolean}
|
|
16
|
+
* @memberof IUILogicLinkCond
|
|
17
|
+
*/
|
|
18
|
+
test(ctx: IUILogicContext, context: IContext, data: IData): boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @description 界面逻辑连接条件项接口
|
|
23
|
+
* @export
|
|
24
|
+
* @interface IUILogicLinkSingleCond
|
|
25
|
+
*/
|
|
26
|
+
export interface IUILogicLinkSingleCond extends IUILogicLinkCond {}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description 界面逻辑连接条件组接口
|
|
30
|
+
* @export
|
|
31
|
+
* @interface IUILogicLinkGroupCond
|
|
32
|
+
*/
|
|
33
|
+
export interface IUILogicLinkGroupCond extends IUILogicLinkCond {}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IDEUILogicLink } from '@ibiz/model-core';
|
|
2
|
+
import { IUILogicLinkGroupCond } from './i-ui-logic-link-cond';
|
|
3
|
+
import { IUILogicNode } from './i-ui-logic-node';
|
|
4
|
+
import { IUILogicContext } from './i-ui-logic-context';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @description 界面逻辑连线接口
|
|
8
|
+
* @export
|
|
9
|
+
* @interface IUILogicLink
|
|
10
|
+
*/
|
|
11
|
+
export interface IUILogicLink {
|
|
12
|
+
/**
|
|
13
|
+
* @description 源节点
|
|
14
|
+
* @type {(IUILogicNode | null)}
|
|
15
|
+
* @memberof IUILogicLink
|
|
16
|
+
*/
|
|
17
|
+
srcNode: IUILogicNode | null;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description 目标节点
|
|
21
|
+
* @type {(IUILogicNode | null)}
|
|
22
|
+
* @memberof IUILogicLink
|
|
23
|
+
*/
|
|
24
|
+
dstNode: IUILogicNode | null;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description 模型
|
|
28
|
+
* @type {IDEUILogicLink}
|
|
29
|
+
* @memberof IUILogicLink
|
|
30
|
+
*/
|
|
31
|
+
model: IDEUILogicLink;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description 连接条件组
|
|
35
|
+
* @type {(IUILogicLinkGroupCond | null)}
|
|
36
|
+
* @memberof IUILogicLink
|
|
37
|
+
*/
|
|
38
|
+
groupCond: IUILogicLinkGroupCond | null;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description 执行连接
|
|
42
|
+
* @param {IUILogicContext} ctx 界面逻辑执行上下文
|
|
43
|
+
* @returns {*} {Promise<boolean>}
|
|
44
|
+
* @memberof IUILogicLink
|
|
45
|
+
*/
|
|
46
|
+
exec(ctx: IUILogicContext): Promise<boolean>;
|
|
47
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { IApiUILogicParams } from '
|
|
2
|
-
import { IControlController, IViewController } from '
|
|
1
|
+
import { IApiUILogicParams } from '../api';
|
|
2
|
+
import { IControlController, IViewController } from '../controller';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @author lxm
|
|
7
|
-
* @date 2023-05-08 09:31:01
|
|
5
|
+
* @description 界面逻辑通用参数接口
|
|
8
6
|
* @export
|
|
9
7
|
* @interface IUILogicParams
|
|
10
8
|
* @extends {IApiUILogicParams}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IAppDataEntity, IDEUILogic } from '@ibiz/model-core';
|
|
2
|
+
import { IUILogicProvider } from '../provider';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 界面逻辑接口
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IUILogic
|
|
8
|
+
* @extends {IUILogicProvider}
|
|
9
|
+
*/
|
|
10
|
+
export interface IUILogic extends IUILogicProvider {
|
|
11
|
+
/**
|
|
12
|
+
* @description 模型
|
|
13
|
+
* @type {IDEUILogic}
|
|
14
|
+
* @memberof IUILogic
|
|
15
|
+
*/
|
|
16
|
+
model: IDEUILogic;
|
|
17
|
+
/**
|
|
18
|
+
* @description 实体模型
|
|
19
|
+
* @type {IAppDataEntity}
|
|
20
|
+
* @memberof IUILogic
|
|
21
|
+
*/
|
|
22
|
+
entity: IAppDataEntity;
|
|
23
|
+
}
|
|
@@ -1 +1,10 @@
|
|
|
1
1
|
export type { IUILogicContext } from './i-ui-logic-context';
|
|
2
|
+
export type { IUILogicLink } from './i-ui-logic-link';
|
|
3
|
+
export type { IUILogic } from './i-ui-logic';
|
|
4
|
+
export type { IUILogicNode } from './i-ui-logic-node';
|
|
5
|
+
export type {
|
|
6
|
+
IUILogicLinkCond,
|
|
7
|
+
IUILogicLinkGroupCond,
|
|
8
|
+
IUILogicLinkSingleCond,
|
|
9
|
+
} from './i-ui-logic-link-cond';
|
|
10
|
+
export type { IUILogicParams } from './i-ui-logic-params';
|
package/src/locale/en/index.ts
CHANGED
|
@@ -444,13 +444,11 @@ export const en = {
|
|
|
444
444
|
noImplementedRouting:
|
|
445
445
|
'Getting view routing parameter variables is not implemented',
|
|
446
446
|
},
|
|
447
|
-
application: {
|
|
448
|
-
noExtensionPlugin:
|
|
449
|
-
'Attempted to load application [{appId}] extension plugin, but no extension plugin was found',
|
|
450
|
-
},
|
|
451
447
|
hub: {
|
|
452
448
|
failedParse: 'View parameter {paramsName} failed to parse: {error}',
|
|
453
449
|
noExist: 'View [{id}] does not exist',
|
|
450
|
+
noExtensionPlugin:
|
|
451
|
+
'Attempted to load application [{appId}] extension plugin, but no extension plugin was found',
|
|
454
452
|
},
|
|
455
453
|
logicScheduler: {
|
|
456
454
|
executor: {
|
|
@@ -598,6 +596,24 @@ export const en = {
|
|
|
598
596
|
'[Custom Extended UIAction] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
599
597
|
deMethodCustomRegistration:
|
|
600
598
|
'[Custom Extended DEMethod] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
599
|
+
uiLogic: 'Cannot find an adapter for the corresponding interface logic',
|
|
600
|
+
frontEndTypeNode:
|
|
601
|
+
'Cannot find an adapter for node type {logicNodeType}',
|
|
602
|
+
uiLogicCustomRegistration:
|
|
603
|
+
'[Custom Extended UILogic] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
604
|
+
uiLogicNodeCustomRegistration:
|
|
605
|
+
'[Custom Extended UILogic Node] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
606
|
+
menuItemCustomRegistration:
|
|
607
|
+
'[Custom Extended Menu Item] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
608
|
+
deLogicCustomRegistration:
|
|
609
|
+
'[Custom Extended DELogic] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
610
|
+
deLogic: 'Cannot find an adapter for the corresponding entity logic',
|
|
611
|
+
deLogicNodeCustomRegistration:
|
|
612
|
+
'[Custom Extended DELogic Node] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
613
|
+
portalCustomRegistration:
|
|
614
|
+
'[Custom Extended Portlet] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
615
|
+
toolbarItemCustomRegistration:
|
|
616
|
+
'[Custom Extended Toolbar Item] Cannot find an adapter with a custom registration ID of [{registerKey}].',
|
|
601
617
|
},
|
|
602
618
|
},
|
|
603
619
|
service: {
|
|
@@ -371,12 +371,10 @@ export const zhCn = {
|
|
|
371
371
|
global: {
|
|
372
372
|
noImplemented: '获取应用全局变量没有实现',
|
|
373
373
|
},
|
|
374
|
-
application: {
|
|
375
|
-
noExtensionPlugin: '尝试加载应用[{appId}]扩展插件,暂未找到扩展插件',
|
|
376
|
-
},
|
|
377
374
|
hub: {
|
|
378
375
|
failedParse: '视图参数 {paramsName} 解析失败:{error}',
|
|
379
376
|
noExist: '视图[{id}]不存在',
|
|
377
|
+
noExtensionPlugin: '尝试加载应用[{appId}]扩展插件,暂未找到扩展插件',
|
|
380
378
|
},
|
|
381
379
|
logicScheduler: {
|
|
382
380
|
executor: {
|
|
@@ -487,6 +485,23 @@ export const zhCn = {
|
|
|
487
485
|
'[自定义扩展界面行为] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
488
486
|
deMethodCustomRegistration:
|
|
489
487
|
'[自定义扩展实体方法] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
488
|
+
uiLogic: '找不到界面逻辑对应的适配器',
|
|
489
|
+
frontEndTypeNode: '找不到节点类型{logicNodeType}对应的适配器',
|
|
490
|
+
uiLogicCustomRegistration:
|
|
491
|
+
'[自定义扩展界面逻辑] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
492
|
+
uiLogicNodeCustomRegistration:
|
|
493
|
+
'[自定义扩展界面逻辑节点] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
494
|
+
menuItemCustomRegistration:
|
|
495
|
+
'[自定义扩展菜单项] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
496
|
+
deLogicCustomRegistration:
|
|
497
|
+
'[自定义扩展实体逻辑] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
498
|
+
deLogic: '找不到实体逻辑对应的适配器',
|
|
499
|
+
deLogicNodeCustomRegistration:
|
|
500
|
+
'[自定义扩展实体逻辑节点] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
501
|
+
portalCustomRegistration:
|
|
502
|
+
'[自定义扩展门户部件] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
503
|
+
toolbarItemCustomRegistration:
|
|
504
|
+
'[自定义扩展工具栏项] 找不到自定义注册标识为[{registerKey}]对应的适配器',
|
|
490
505
|
},
|
|
491
506
|
},
|
|
492
507
|
service: {
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import { IAppDEMethod,
|
|
1
|
+
import { IControl, IAppDEMethod, IAppDEUIAction } from '@ibiz/model-core';
|
|
2
2
|
import { IRegisterParams } from '../interface';
|
|
3
3
|
import {
|
|
4
|
+
VIEW_PROVIDER_PREFIX,
|
|
5
|
+
EDITOR_PROVIDER_PREFIX,
|
|
6
|
+
PORTLET_PROVIDER_PREFIX,
|
|
7
|
+
DELOGIC_PROVIDER_PREFIX,
|
|
8
|
+
UILOGIC_PROVIDER_PREFIX,
|
|
4
9
|
CONTROL_PROVIDER_PREFIX,
|
|
5
10
|
DEMETHOD_PROVIDER_PREFIX,
|
|
6
|
-
|
|
11
|
+
UIACTION_PROVIDER_PREFIX,
|
|
12
|
+
PANELITEM_PROVIDER_PREFIX,
|
|
7
13
|
FORMDETAIL_PROVIDER_PREFIX,
|
|
8
14
|
GRIDCOLUMN_PROVIDER_PREFIX,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
APPMENUITEM_PROVIDER_PREFIX,
|
|
16
|
+
UILOGICNODE_PROVIDER_PREFIX,
|
|
17
|
+
DELOGICNODE_PROVIDER_PREFIX,
|
|
18
|
+
TOOLBAR_ITEM_PROVIDER_PREFIX,
|
|
12
19
|
} from './helper';
|
|
13
20
|
import { calcDeCodeNameById } from '../model';
|
|
14
21
|
|
|
@@ -29,11 +36,14 @@ export class CustomRegister {
|
|
|
29
36
|
case VIEW_PROVIDER_PREFIX:
|
|
30
37
|
return this.calcExtensionViewKey(opts);
|
|
31
38
|
case CONTROL_PROVIDER_PREFIX:
|
|
39
|
+
case PORTLET_PROVIDER_PREFIX:
|
|
32
40
|
return this.calcExtensionControlKey(opts);
|
|
33
41
|
case PANELITEM_PROVIDER_PREFIX:
|
|
34
42
|
return this.calcExtensionPanelItemKey(opts);
|
|
35
43
|
case FORMDETAIL_PROVIDER_PREFIX:
|
|
36
44
|
case GRIDCOLUMN_PROVIDER_PREFIX:
|
|
45
|
+
case APPMENUITEM_PROVIDER_PREFIX:
|
|
46
|
+
case TOOLBAR_ITEM_PROVIDER_PREFIX:
|
|
37
47
|
return this.calcExtensionControlItemKey(opts);
|
|
38
48
|
case EDITOR_PROVIDER_PREFIX:
|
|
39
49
|
return this.calcExtensionEditorKey(opts);
|
|
@@ -41,7 +51,12 @@ export class CustomRegister {
|
|
|
41
51
|
return this.calcExtensionUIActionKey(opts);
|
|
42
52
|
case DEMETHOD_PROVIDER_PREFIX:
|
|
43
53
|
return this.calcExtensionMethodKey(opts);
|
|
44
|
-
|
|
54
|
+
case UILOGIC_PROVIDER_PREFIX:
|
|
55
|
+
case DELOGIC_PROVIDER_PREFIX:
|
|
56
|
+
return this.calcExtensionLogicKey(opts);
|
|
57
|
+
case UILOGICNODE_PROVIDER_PREFIX:
|
|
58
|
+
case DELOGICNODE_PROVIDER_PREFIX:
|
|
59
|
+
return this.calcExtensionLogicNodeKey(opts);
|
|
45
60
|
default:
|
|
46
61
|
return '';
|
|
47
62
|
}
|
|
@@ -120,7 +135,7 @@ export class CustomRegister {
|
|
|
120
135
|
}
|
|
121
136
|
|
|
122
137
|
/**
|
|
123
|
-
* @description 计算扩展部件项key,(appId/DEFAULT@实体codeName/APP@部件类型@部件codeName@部件项codeName)全大写
|
|
138
|
+
* @description 计算扩展部件项key,(appId/DEFAULT@实体codeName/APP@部件类型@部件codeName@部件项codeName/@部件项id)全大写
|
|
124
139
|
* @static
|
|
125
140
|
* @param {IRegisterParams} opts
|
|
126
141
|
* @returns {*} {string}
|
|
@@ -143,8 +158,9 @@ export class CustomRegister {
|
|
|
143
158
|
if (codeName) {
|
|
144
159
|
key += `@${codeName.toUpperCase()}`;
|
|
145
160
|
}
|
|
146
|
-
|
|
147
|
-
|
|
161
|
+
const _codeName = mainModel.codeName || mainModel.id;
|
|
162
|
+
if (_codeName) {
|
|
163
|
+
key += `@${_codeName.toUpperCase()}`;
|
|
148
164
|
}
|
|
149
165
|
}
|
|
150
166
|
return key;
|
|
@@ -177,7 +193,7 @@ export class CustomRegister {
|
|
|
177
193
|
}
|
|
178
194
|
|
|
179
195
|
/**
|
|
180
|
-
* @description 计算扩展界面行为key
|
|
196
|
+
* @description 计算扩展界面行为key,(appId/DEFAULT@实体codeName/APP@界面行为标记)全大写
|
|
181
197
|
* @author tony001
|
|
182
198
|
* @date 2026-08-11 17:08:45
|
|
183
199
|
* @static
|
|
@@ -189,7 +205,7 @@ export class CustomRegister {
|
|
|
189
205
|
const { mainModel } = opts;
|
|
190
206
|
let key: string = (mainModel.appId || 'DEFAULT').toUpperCase();
|
|
191
207
|
if (mainModel) {
|
|
192
|
-
const { appDataEntityId, uiactionTag } = mainModel as
|
|
208
|
+
const { appDataEntityId, uiactionTag } = mainModel as IAppDEUIAction;
|
|
193
209
|
if (appDataEntityId) {
|
|
194
210
|
key += `@${calcDeCodeNameById(appDataEntityId).toUpperCase()}`;
|
|
195
211
|
} else {
|
|
@@ -203,7 +219,7 @@ export class CustomRegister {
|
|
|
203
219
|
}
|
|
204
220
|
|
|
205
221
|
/**
|
|
206
|
-
* @description 计算扩展实体方法key
|
|
222
|
+
* @description 计算扩展实体方法key,(appId/DEFAULT@实体codeName/方法类型/方法codeName)全大写
|
|
207
223
|
* @static
|
|
208
224
|
* @param {IRegisterParams} opts
|
|
209
225
|
* @returns {*} {string}
|
|
@@ -223,4 +239,45 @@ export class CustomRegister {
|
|
|
223
239
|
}
|
|
224
240
|
return key;
|
|
225
241
|
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @description 计算逻辑key,(appId/DEFAULT@实体codeName@逻辑codeName)全大写
|
|
245
|
+
* @static
|
|
246
|
+
* @param {IRegisterParams} opts
|
|
247
|
+
* @returns {*} {string}
|
|
248
|
+
* @memberof CustomRegister
|
|
249
|
+
*/
|
|
250
|
+
static calcExtensionLogicKey(opts: IRegisterParams): string {
|
|
251
|
+
const { mainModel, entity } = opts;
|
|
252
|
+
let key: string = (mainModel.appId || 'DEFAULT').toUpperCase();
|
|
253
|
+
if (entity?.id) {
|
|
254
|
+
key += `@${calcDeCodeNameById(entity.id).toUpperCase()}`;
|
|
255
|
+
}
|
|
256
|
+
if (mainModel.codeName) {
|
|
257
|
+
key += `@${mainModel.codeName.toUpperCase()}`;
|
|
258
|
+
}
|
|
259
|
+
return key;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @description 计算实体界面逻辑节点key,(appId/DEFAULT@实体codeName@逻辑codeName@逻辑节点codeName)全大写
|
|
264
|
+
* @static
|
|
265
|
+
* @param {IRegisterParams} opts
|
|
266
|
+
* @returns {*} {string}
|
|
267
|
+
* @memberof CustomRegister
|
|
268
|
+
*/
|
|
269
|
+
static calcExtensionLogicNodeKey(opts: IRegisterParams): string {
|
|
270
|
+
const { mainModel, entity, logic } = opts;
|
|
271
|
+
let key: string = (mainModel.appId || 'DEFAULT').toUpperCase();
|
|
272
|
+
if (entity?.id) {
|
|
273
|
+
key += `@${calcDeCodeNameById(entity.id).toUpperCase()}`;
|
|
274
|
+
}
|
|
275
|
+
if (logic?.codeName) {
|
|
276
|
+
key += `@${logic.codeName.toUpperCase()}`;
|
|
277
|
+
}
|
|
278
|
+
if (mainModel.codeName) {
|
|
279
|
+
key += `@${mainModel.codeName.toUpperCase()}`;
|
|
280
|
+
}
|
|
281
|
+
return key;
|
|
282
|
+
}
|
|
226
283
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
import { IAppMenu, IAppMenuItem } from '@ibiz/model-core';
|
|
2
3
|
import { getPluginRegisterKey } from './common-register';
|
|
3
4
|
import { IAppMenuItemProvider } from '../../interface';
|
|
4
5
|
|
|
@@ -38,25 +39,37 @@ function getProvider(key: string): IAppMenuItemProvider | undefined {
|
|
|
38
39
|
*/
|
|
39
40
|
export async function getAppMenuItemProvider(
|
|
40
41
|
model: IAppMenuItem,
|
|
42
|
+
control: IAppMenu,
|
|
41
43
|
): Promise<IAppMenuItemProvider | undefined> {
|
|
42
44
|
let provider: IAppMenuItemProvider | undefined;
|
|
43
45
|
const { sysPFPluginId, appId, itemType } = model as Required<IAppMenuItem>;
|
|
44
46
|
|
|
47
|
+
// 找自定义注册的适配器
|
|
48
|
+
// const registerKey = CustomRegister.getRegisterKey(
|
|
49
|
+
// APPMENUITEM_PROVIDER_PREFIX,
|
|
50
|
+
// {
|
|
51
|
+
// mainModel: model,
|
|
52
|
+
// control,
|
|
53
|
+
// },
|
|
54
|
+
// );
|
|
55
|
+
// provider = getProvider(registerKey);
|
|
56
|
+
// if (provider) return provider;
|
|
57
|
+
// ibiz.log.debug(
|
|
58
|
+
// ibiz.i18n.t('runtime.register.helper.menuItemCustomRegistration', {
|
|
59
|
+
// registerKey,
|
|
60
|
+
// }),
|
|
61
|
+
// );
|
|
62
|
+
|
|
45
63
|
// 找插件适配器
|
|
46
64
|
if (sysPFPluginId) {
|
|
47
65
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
48
|
-
if (pluginKey)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}),
|
|
56
|
-
);
|
|
57
|
-
} else {
|
|
58
|
-
return provider;
|
|
59
|
-
}
|
|
66
|
+
if (pluginKey) provider = getProvider(pluginKey);
|
|
67
|
+
if (provider) return provider;
|
|
68
|
+
ibiz.log.warn(
|
|
69
|
+
ibiz.i18n.t('runtime.register.helper.applicationMenu', {
|
|
70
|
+
pluginKey,
|
|
71
|
+
}),
|
|
72
|
+
);
|
|
60
73
|
}
|
|
61
74
|
|
|
62
75
|
// 找应用菜单项类型
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { RuntimeError } from '@ibiz-template/core';
|
|
2
|
+
import { IAppDELogic, IDELogicNode, IAppDataEntity } from '@ibiz/model-core';
|
|
3
|
+
import { IDELogicNodeProvider } from '../../interface';
|
|
4
|
+
import { CustomRegister } from '../custom-register';
|
|
5
|
+
|
|
6
|
+
/** 实体逻辑节点适配器前缀 */
|
|
7
|
+
export const DELOGICNODE_PROVIDER_PREFIX = 'DE_LOGIC_NODE';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 注册实体逻辑节点适配器
|
|
11
|
+
*
|
|
12
|
+
* @author lxm
|
|
13
|
+
* @date 2023-05-06 09:14:16
|
|
14
|
+
* @export
|
|
15
|
+
* @param {string} key
|
|
16
|
+
* @param {() => IDELogicNodeProvider} callback 生成实体行为适配器的回调
|
|
17
|
+
*/
|
|
18
|
+
export function registerDELogicNodeProvider(
|
|
19
|
+
key: string,
|
|
20
|
+
callback: (node: IDELogicNode) => IDELogicNodeProvider,
|
|
21
|
+
): void {
|
|
22
|
+
ibiz.register.register(`${DELOGICNODE_PROVIDER_PREFIX}_${key}`, callback);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function getProvider(
|
|
26
|
+
key: string,
|
|
27
|
+
logic: IDELogicNode,
|
|
28
|
+
): IDELogicNodeProvider | undefined {
|
|
29
|
+
return ibiz.register.get(
|
|
30
|
+
`${DELOGICNODE_PROVIDER_PREFIX}_${key}`,
|
|
31
|
+
logic,
|
|
32
|
+
) as IDELogicNodeProvider;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @description 获取实体逻辑节点适配器
|
|
37
|
+
* @export
|
|
38
|
+
* @param {IDELogicNode} model
|
|
39
|
+
* @param {IAppDELogic} logic
|
|
40
|
+
* @param {IAppDataEntity} entity
|
|
41
|
+
* @returns {*} {Promise<IDELogicNodeProvider>}
|
|
42
|
+
*/
|
|
43
|
+
export async function getDELogicNodeProvider(
|
|
44
|
+
model: IDELogicNode,
|
|
45
|
+
logic: IAppDELogic,
|
|
46
|
+
entity: IAppDataEntity,
|
|
47
|
+
): Promise<IDELogicNodeProvider> {
|
|
48
|
+
let provider: IDELogicNodeProvider | undefined;
|
|
49
|
+
const { logicNodeType } = model as Required<IDELogicNode>;
|
|
50
|
+
|
|
51
|
+
// 自定义注册
|
|
52
|
+
const registerKey = CustomRegister.getRegisterKey(
|
|
53
|
+
DELOGICNODE_PROVIDER_PREFIX,
|
|
54
|
+
{
|
|
55
|
+
mainModel: model,
|
|
56
|
+
logic,
|
|
57
|
+
entity,
|
|
58
|
+
},
|
|
59
|
+
);
|
|
60
|
+
provider = getProvider(registerKey, model);
|
|
61
|
+
if (provider) return provider;
|
|
62
|
+
ibiz.log.debug(
|
|
63
|
+
ibiz.i18n.t('runtime.register.helper.uiLogicNodeCustomRegistration', {
|
|
64
|
+
registerKey,
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
// 找节点类型适配器
|
|
69
|
+
provider = getProvider(logicNodeType, model);
|
|
70
|
+
if (provider) return provider;
|
|
71
|
+
throw new RuntimeError(
|
|
72
|
+
ibiz.i18n.t('runtime.register.helper.frontEndTypeNode', {
|
|
73
|
+
logicNodeType,
|
|
74
|
+
}),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IAppDELogic, IAppDataEntity } from '@ibiz/model-core';
|
|
2
|
+
import { RuntimeError } from '@ibiz-template/core';
|
|
3
|
+
import { IDELogicProvider } from '../../interface';
|
|
4
|
+
import { CustomRegister } from '../custom-register';
|
|
5
|
+
|
|
6
|
+
/** 实体逻辑适配器前缀 */
|
|
7
|
+
export const DELOGIC_PROVIDER_PREFIX = 'DELOGIC';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @description 注册实体逻辑适配器
|
|
11
|
+
* @export
|
|
12
|
+
* @param {string} key
|
|
13
|
+
* @param {Callback} callback
|
|
14
|
+
*/
|
|
15
|
+
export function registerDELogicProvider(
|
|
16
|
+
key: string,
|
|
17
|
+
callback: (deLogic: IAppDELogic, entity: IAppDataEntity) => IDELogicProvider,
|
|
18
|
+
): void {
|
|
19
|
+
ibiz.register.register(`${DELOGIC_PROVIDER_PREFIX}_${key}`, callback);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function getProvider(
|
|
23
|
+
key: string,
|
|
24
|
+
logic: IAppDELogic,
|
|
25
|
+
entity: IAppDataEntity,
|
|
26
|
+
): IDELogicProvider | undefined {
|
|
27
|
+
return ibiz.register.get(
|
|
28
|
+
`${DELOGIC_PROVIDER_PREFIX}_${key}`,
|
|
29
|
+
logic,
|
|
30
|
+
entity,
|
|
31
|
+
) as IDELogicProvider;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description 获取实体逻辑适配器
|
|
36
|
+
* @export
|
|
37
|
+
* @param {IAppDELogic} model
|
|
38
|
+
* @param {IAppDataEntity} entity
|
|
39
|
+
* @returns {*} {IDELogicProvider}
|
|
40
|
+
*/
|
|
41
|
+
export function getDELogicProvider(
|
|
42
|
+
mainModel: IAppDELogic,
|
|
43
|
+
entity: IAppDataEntity,
|
|
44
|
+
): IDELogicProvider {
|
|
45
|
+
// 找自定义注册的适配器
|
|
46
|
+
const registerKey = CustomRegister.getRegisterKey(DELOGIC_PROVIDER_PREFIX, {
|
|
47
|
+
mainModel,
|
|
48
|
+
entity,
|
|
49
|
+
});
|
|
50
|
+
let provider = getProvider(registerKey, mainModel, entity);
|
|
51
|
+
if (provider) return provider;
|
|
52
|
+
ibiz.log.debug(
|
|
53
|
+
ibiz.i18n.t('runtime.register.helper.deLogicCustomRegistration', {
|
|
54
|
+
registerKey,
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
// 找默认适配器
|
|
59
|
+
provider = getProvider('DEFAULT', mainModel, entity);
|
|
60
|
+
if (!provider)
|
|
61
|
+
throw new RuntimeError(ibiz.i18n.t('runtime.register.helper.deLogic'));
|
|
62
|
+
return provider;
|
|
63
|
+
}
|
|
@@ -18,3 +18,6 @@ export * from './error-view-register';
|
|
|
18
18
|
export * from './toolbar-item-register';
|
|
19
19
|
export * from './ac-item-register';
|
|
20
20
|
export * from './app-func-block-register';
|
|
21
|
+
export * from './ui-logic-register';
|
|
22
|
+
export * from './de-logic-register';
|
|
23
|
+
export * from './de-logic-node-register';
|