@ibiz-template/runtime 0.4.6-dev.0 → 0.4.8-dev.0
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 +153 -96
- package/dist/index.system.min.js +2 -2
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +1 -1
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +3 -3
- package/out/controller/control/form/form-detail/form-button/form-button.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-button/form-button.controller.js +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.js +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +1 -1
- package/out/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.js +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +2 -2
- package/out/controller/control/tree/tree.controller.d.ts +5 -3
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +6 -4
- package/out/controller/utils/button-state/ui-action-button.state.js +1 -1
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +3 -3
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +5 -3
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +8 -0
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-action-executor.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-action-executor.js +1 -1
- package/out/model/ui-action/ui-action.d.ts +1 -1
- package/out/model/ui-action/ui-action.d.ts.map +1 -1
- package/out/model/ui-action/ui-action.js +1 -2
- package/out/ui-action/provider/ui-action-provider-base.d.ts +1 -1
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +4 -4
- package/out/ui-action/uiaction-util.d.ts +2 -2
- package/out/ui-action/uiaction-util.d.ts.map +1 -1
- package/out/ui-action/uiaction-util.js +4 -4
- package/out/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.js +1 -1
- package/package.json +3 -3
- package/src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts +11 -7
- package/src/controller/control/data-view/data-view.controller.ts +33 -21
- package/src/controller/control/form/form-detail/form-button/form-button.controller.ts +12 -8
- package/src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts +11 -7
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +11 -7
- package/src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts +11 -7
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +11 -7
- package/src/controller/control/toolbar/toolbar.controllerr.ts +10 -6
- package/src/controller/control/tree/tree.controller.ts +14 -7
- package/src/controller/utils/button-state/ui-action-button.state.ts +1 -1
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +3 -3
- package/src/interface/controller/controller/control/i-tree.controller.ts +5 -2
- package/src/interface/logic-scheduler/i-scheduler-logic.ts +9 -0
- package/src/logic-scheduler/executor/app-ui-action-executor.ts +5 -1
- package/src/model/ui-action/ui-action.ts +1 -1
- package/src/ui-action/provider/ui-action-provider-base.ts +8 -3
- package/src/ui-action/uiaction-util.ts +4 -2
- package/src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts +10 -6
|
@@ -50,14 +50,18 @@ export class FormButtonController extends FormDetailController<IDEFormButton> {
|
|
|
50
50
|
*/
|
|
51
51
|
async doUIAction(event: MouseEvent): Promise<void> {
|
|
52
52
|
const actionId = this.model.uiactionId;
|
|
53
|
-
await UIActionUtil.execAndResolved(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
await UIActionUtil.execAndResolved(
|
|
54
|
+
actionId!,
|
|
55
|
+
{
|
|
56
|
+
context: this.form.context,
|
|
57
|
+
params: this.form.params,
|
|
58
|
+
data: [this.data],
|
|
59
|
+
view: this.form.view,
|
|
60
|
+
event,
|
|
61
|
+
noWaitRoute: true,
|
|
62
|
+
},
|
|
63
|
+
this.model.appId,
|
|
64
|
+
);
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
/**
|
package/src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts
CHANGED
|
@@ -108,12 +108,16 @@ export class FormGroupPanelController<
|
|
|
108
108
|
): Promise<void> {
|
|
109
109
|
const actionId = detail.uiactionId;
|
|
110
110
|
|
|
111
|
-
await UIActionUtil.execAndResolved(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
await UIActionUtil.execAndResolved(
|
|
112
|
+
actionId!,
|
|
113
|
+
{
|
|
114
|
+
context: this.form.context,
|
|
115
|
+
params: this.form.params,
|
|
116
|
+
data: [this.data],
|
|
117
|
+
view: this.form.view,
|
|
118
|
+
event,
|
|
119
|
+
},
|
|
120
|
+
detail.appId,
|
|
121
|
+
);
|
|
118
122
|
}
|
|
119
123
|
}
|
package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
CHANGED
|
@@ -174,13 +174,17 @@ export class GridFieldColumnController extends GridColumnController<IDEGridField
|
|
|
174
174
|
*/
|
|
175
175
|
async triggerAction(row: GridRowState, event: MouseEvent): Promise<void> {
|
|
176
176
|
const actionId = this.model.deuiactionId;
|
|
177
|
-
await UIActionUtil.execAndResolved(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
177
|
+
await UIActionUtil.execAndResolved(
|
|
178
|
+
actionId!,
|
|
179
|
+
{
|
|
180
|
+
context: this.context,
|
|
181
|
+
params: this.params,
|
|
182
|
+
data: [row.data],
|
|
183
|
+
view: this.grid.view,
|
|
184
|
+
event,
|
|
185
|
+
},
|
|
186
|
+
this.model.appId,
|
|
187
|
+
);
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
/**
|
|
@@ -59,12 +59,16 @@ export class GridUAColumnController extends GridColumnController<IDEGridUAColumn
|
|
|
59
59
|
event: MouseEvent,
|
|
60
60
|
): Promise<void> {
|
|
61
61
|
const actionId = detail.uiactionId;
|
|
62
|
-
await UIActionUtil.execAndResolved(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
await UIActionUtil.execAndResolved(
|
|
63
|
+
actionId!,
|
|
64
|
+
{
|
|
65
|
+
context: this.context,
|
|
66
|
+
params: this.params,
|
|
67
|
+
data: [row.data],
|
|
68
|
+
view: this.grid.view,
|
|
69
|
+
event,
|
|
70
|
+
},
|
|
71
|
+
detail.appId,
|
|
72
|
+
);
|
|
69
73
|
}
|
|
70
74
|
}
|
|
@@ -165,13 +165,17 @@ export class MDCtrlController
|
|
|
165
165
|
event: MouseEvent,
|
|
166
166
|
): Promise<void> {
|
|
167
167
|
const actionId = detail.uiactionId;
|
|
168
|
-
await UIActionUtil.execAndResolved(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
168
|
+
await UIActionUtil.execAndResolved(
|
|
169
|
+
actionId!,
|
|
170
|
+
{
|
|
171
|
+
context: this.context,
|
|
172
|
+
params: this.params,
|
|
173
|
+
data: [row.data],
|
|
174
|
+
view: this.view,
|
|
175
|
+
event,
|
|
176
|
+
},
|
|
177
|
+
detail.appId,
|
|
178
|
+
);
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
/**
|
|
@@ -70,7 +70,7 @@ export class ToolbarController<
|
|
|
70
70
|
// 执行界面行为
|
|
71
71
|
if (item.itemType === 'DEUIACTION') {
|
|
72
72
|
const actionId = (item as IDETBUIActionItem).uiactionId;
|
|
73
|
-
const uiAction = await getUIActionById(actionId
|
|
73
|
+
const uiAction = await getUIActionById(actionId!, item.appId);
|
|
74
74
|
if (!uiAction) {
|
|
75
75
|
throw new RuntimeError(`没有找到界面行为模型${actionId}`);
|
|
76
76
|
}
|
|
@@ -89,11 +89,15 @@ export class ToolbarController<
|
|
|
89
89
|
const data = res || [];
|
|
90
90
|
const args = this.getEventArgs();
|
|
91
91
|
args.params = Object.assign(param, args.params);
|
|
92
|
-
await UIActionUtil.execAndResolved(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
await UIActionUtil.execAndResolved(
|
|
93
|
+
actionId!,
|
|
94
|
+
{
|
|
95
|
+
...args,
|
|
96
|
+
data,
|
|
97
|
+
event,
|
|
98
|
+
},
|
|
99
|
+
item.appId,
|
|
100
|
+
);
|
|
97
101
|
} finally {
|
|
98
102
|
if (enableLoading) {
|
|
99
103
|
this.state.buttonsState.setLoading('');
|
|
@@ -292,25 +292,32 @@ export class TreeController
|
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
294
|
* 执行界面行为
|
|
295
|
-
*
|
|
296
|
-
* @
|
|
295
|
+
*
|
|
296
|
+
* @author chitanda
|
|
297
|
+
* @date 2023-12-07 15:12:26
|
|
297
298
|
* @param {string} uiActionId
|
|
298
299
|
* @param {ITreeNodeData} nodeData
|
|
299
300
|
* @param {MouseEvent} event
|
|
301
|
+
* @param {string} appId
|
|
300
302
|
* @return {*} {Promise<void>}
|
|
301
303
|
*/
|
|
302
304
|
async doUIAction(
|
|
303
305
|
uiActionId: string,
|
|
304
306
|
nodeData: ITreeNodeData,
|
|
305
307
|
event: MouseEvent,
|
|
308
|
+
appId: string,
|
|
306
309
|
): Promise<void> {
|
|
307
310
|
const eventArgs = this.getEventArgs();
|
|
308
311
|
const nodeParams = this.parseTreeNodeData(nodeData);
|
|
309
|
-
const result = await UIActionUtil.exec(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
const result = await UIActionUtil.exec(
|
|
313
|
+
uiActionId!,
|
|
314
|
+
{
|
|
315
|
+
...eventArgs,
|
|
316
|
+
...nodeParams,
|
|
317
|
+
event,
|
|
318
|
+
},
|
|
319
|
+
appId,
|
|
320
|
+
);
|
|
314
321
|
if (result.closeView) {
|
|
315
322
|
this.view.closeView();
|
|
316
323
|
} else if (result.refresh) {
|
|
@@ -93,7 +93,7 @@ export class UIActionButtonState implements IButtonState {
|
|
|
93
93
|
this.isInit = true;
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
const uiAction = await getUIActionById(this.uiActionId);
|
|
96
|
+
const uiAction = await getUIActionById(this.uiActionId, this.appId);
|
|
97
97
|
[, this.appDeName] = this.uiActionId.split('@');
|
|
98
98
|
if (!uiAction) {
|
|
99
99
|
return;
|
|
@@ -135,7 +135,7 @@ export interface IAppHubService {
|
|
|
135
135
|
* @param {string} [appId=ibiz.env.appId]
|
|
136
136
|
* @return {*} {Promise<IAppDataEntity>}
|
|
137
137
|
*/
|
|
138
|
-
getAppDataEntity(id: string, appId
|
|
138
|
+
getAppDataEntity(id: string, appId?: string): Promise<IAppDataEntity>;
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* 异步获取应用对象,用于不确定应用是否已经加载的情况
|
|
@@ -145,7 +145,7 @@ export interface IAppHubService {
|
|
|
145
145
|
* @param {string} [appId=ibiz.env.appId]
|
|
146
146
|
* @return {*} {Promise<IAppService>}
|
|
147
147
|
*/
|
|
148
|
-
getAppAsync(appId
|
|
148
|
+
getAppAsync(appId?: string): Promise<IAppService>;
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* 获取应用实例
|
|
@@ -155,5 +155,5 @@ export interface IAppHubService {
|
|
|
155
155
|
* @param {(string | IApplication)} [app]
|
|
156
156
|
* @return {*} {IAppService}
|
|
157
157
|
*/
|
|
158
|
-
getApp(app
|
|
158
|
+
getApp(app?: string | IApplication): IAppService;
|
|
159
159
|
}
|
|
@@ -32,17 +32,20 @@ export interface ITreeController
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* 执行界面行为
|
|
35
|
-
*
|
|
36
|
-
* @
|
|
35
|
+
*
|
|
36
|
+
* @author chitanda
|
|
37
|
+
* @date 2023-12-07 15:12:51
|
|
37
38
|
* @param {string} uiActionId
|
|
38
39
|
* @param {ITreeNodeData} nodeData
|
|
39
40
|
* @param {MouseEvent} event
|
|
41
|
+
* @param {string} appId
|
|
40
42
|
* @return {*} {Promise<void>}
|
|
41
43
|
*/
|
|
42
44
|
doUIAction(
|
|
43
45
|
uiActionId: string,
|
|
44
46
|
nodeData: ITreeNodeData,
|
|
45
47
|
event: MouseEvent,
|
|
48
|
+
appId: string,
|
|
46
49
|
): Promise<void>;
|
|
47
50
|
|
|
48
51
|
/**
|
|
@@ -22,6 +22,10 @@ export class AppDEUIActionExecutor extends LogicExecutor {
|
|
|
22
22
|
`逻辑中缺少触发应用实体界面行为id`,
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
|
-
UIActionUtil.execAndResolved(
|
|
25
|
+
UIActionUtil.execAndResolved(
|
|
26
|
+
this.logic.appDEUIActionId,
|
|
27
|
+
executeParams,
|
|
28
|
+
this.logic.appId,
|
|
29
|
+
);
|
|
26
30
|
}
|
|
27
31
|
}
|
|
@@ -10,8 +10,8 @@ import { IAppDEUIAction } from '@ibiz/model-core';
|
|
|
10
10
|
*/
|
|
11
11
|
export async function getUIActionById(
|
|
12
12
|
id: string,
|
|
13
|
+
appId: string,
|
|
13
14
|
): Promise<IAppDEUIAction | undefined> {
|
|
14
|
-
const [, , appId] = id.split('@');
|
|
15
15
|
const app = ibiz.hub.getApp(appId);
|
|
16
16
|
return app.getUIAction(id);
|
|
17
17
|
}
|
|
@@ -70,9 +70,13 @@ export abstract class UIActionProviderBase implements IUIActionProvider {
|
|
|
70
70
|
};
|
|
71
71
|
if (action.closeEditView) {
|
|
72
72
|
// 关闭视图的情况下,不等待后续界面行为
|
|
73
|
-
this.doNextAction(action, nextActionParams);
|
|
73
|
+
this.doNextAction(action, nextActionParams, action.appId);
|
|
74
74
|
} else {
|
|
75
|
-
const nextResult = await this.doNextAction(
|
|
75
|
+
const nextResult = await this.doNextAction(
|
|
76
|
+
action,
|
|
77
|
+
nextActionParams,
|
|
78
|
+
action.appId,
|
|
79
|
+
);
|
|
76
80
|
if (nextResult) {
|
|
77
81
|
Object.assign(result, nextResult);
|
|
78
82
|
if (nextResult.cancel === true) {
|
|
@@ -160,10 +164,11 @@ export abstract class UIActionProviderBase implements IUIActionProvider {
|
|
|
160
164
|
async doNextAction(
|
|
161
165
|
action: IAppDEUIAction,
|
|
162
166
|
params: IUILogicParams,
|
|
167
|
+
appId: string,
|
|
163
168
|
): Promise<IUIActionResult | undefined> {
|
|
164
169
|
const nextActionId = action.nextId;
|
|
165
170
|
if (nextActionId) {
|
|
166
|
-
return UIActionUtil.exec(nextActionId, params);
|
|
171
|
+
return UIActionUtil.exec(nextActionId, params, appId);
|
|
167
172
|
}
|
|
168
173
|
}
|
|
169
174
|
|
|
@@ -26,8 +26,9 @@ export class UIActionUtil {
|
|
|
26
26
|
static async exec(
|
|
27
27
|
actionId: string,
|
|
28
28
|
params: IUILogicParams,
|
|
29
|
+
appId: string,
|
|
29
30
|
): Promise<IUIActionResult> {
|
|
30
|
-
const action = await getUIActionById(actionId);
|
|
31
|
+
const action = await getUIActionById(actionId, appId);
|
|
31
32
|
if (!action) {
|
|
32
33
|
throw new RuntimeError(`没找到${actionId}的界面行为模型`);
|
|
33
34
|
}
|
|
@@ -53,8 +54,9 @@ export class UIActionUtil {
|
|
|
53
54
|
static async execAndResolved(
|
|
54
55
|
actionId: string,
|
|
55
56
|
params: IUILogicParams,
|
|
57
|
+
appId: string,
|
|
56
58
|
): Promise<void> {
|
|
57
|
-
const result = await this.exec(actionId, params);
|
|
59
|
+
const result = await this.exec(actionId, params, appId);
|
|
58
60
|
if (result.closeView) {
|
|
59
61
|
params.view.modal.ignoreDismissCheck = true;
|
|
60
62
|
params.view.closeView({ ok: true });
|
|
@@ -32,11 +32,15 @@ export class DEUIActionNode extends UILogicNode {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
await UIActionUtil.execAndResolved(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
await UIActionUtil.execAndResolved(
|
|
36
|
+
dstAppDEUIActionId!,
|
|
37
|
+
{
|
|
38
|
+
...parameters,
|
|
39
|
+
context: ctx.context,
|
|
40
|
+
params: ctx.viewParam,
|
|
41
|
+
data: actionData,
|
|
42
|
+
},
|
|
43
|
+
this.model.appId,
|
|
44
|
+
);
|
|
41
45
|
}
|
|
42
46
|
}
|