@ibiz-template/runtime 0.7.41-alpha.140 → 0.7.41-alpha.142
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 +120 -35
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +47 -11
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +2 -0
- package/out/controller/common/control/control.controller.d.ts +1 -1
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +3 -3
- package/out/controller/common/control/md-control.controller.d.ts +1 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +10 -1
- package/out/controller/common/view/view.controller.js +2 -2
- package/out/controller/control/data-view/data-view.controller.d.ts +7 -0
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +11 -0
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +10 -1
- package/out/controller/control/form/form/form.controller.js +1 -1
- package/out/controller/control/gantt/gantt.controller.d.ts +1 -1
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +1 -1
- package/out/controller/control/list/list.controller.d.ts +7 -0
- package/out/controller/control/list/list.controller.d.ts.map +1 -1
- package/out/controller/control/list/list.controller.js +11 -0
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.d.ts +1 -1
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.d.ts.map +1 -1
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.js +1 -1
- package/out/controller/control/panel/view-layout-panel/view-layout-panel.controller.js +2 -2
- package/out/controller/control/tree/tree.controller.d.ts +1 -1
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +10 -1
- package/out/engine/view-base.engine.d.ts +1 -1
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +1 -1
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +17 -2
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-data-view-control.controller.d.ts +1 -0
- package/out/interface/api/controller/control/i-api-data-view-control.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-list.controller.d.ts +1 -0
- package/out/interface/api/controller/control/i-api-list.controller.d.ts.map +1 -1
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/notify-refresh.event.d.ts +13 -0
- package/out/interface/controller/event/argument/notify-refresh.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/notify-refresh.event.js +1 -0
- package/out/interface/controller/event/control/i-form.event.d.ts +20 -2
- package/out/interface/controller/event/control/i-form.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-md-control.event.d.ts +20 -2
- package/out/interface/controller/event/control/i-md-control.event.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +3 -3
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.js +4 -4
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +7 -3
- package/out/types.d.ts +6 -0
- package/out/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/app-hub.ts +51 -11
- package/src/config/global-config.ts +2 -0
- package/src/controller/common/control/control.controller.ts +3 -3
- package/src/controller/common/control/md-control.controller.ts +11 -1
- package/src/controller/common/view/view.controller.ts +2 -2
- package/src/controller/control/data-view/data-view.controller.ts +11 -0
- package/src/controller/control/form/edit-form/edit-form.controller.ts +11 -1
- package/src/controller/control/form/form/form.controller.ts +1 -1
- package/src/controller/control/gantt/gantt.controller.ts +1 -1
- package/src/controller/control/list/list.controller.ts +11 -0
- package/src/controller/control/medit-view-panel/medit-view-panel.controller.ts +1 -1
- package/src/controller/control/panel/view-layout-panel/view-layout-panel.controller.ts +2 -2
- package/src/controller/control/tree/tree.controller.ts +12 -1
- package/src/engine/view-base.engine.ts +1 -1
- package/src/interface/api/common/global-config/i-api-global-common-config.ts +19 -2
- package/src/interface/api/controller/control/i-api-data-view-control.controller.ts +1 -0
- package/src/interface/api/controller/control/i-api-list.controller.ts +1 -0
- package/src/interface/controller/event/argument/index.ts +1 -0
- package/src/interface/controller/event/argument/notify-refresh.event.ts +12 -0
- package/src/interface/controller/event/control/i-form.event.ts +20 -2
- package/src/interface/controller/event/control/i-md-control.event.ts +15 -2
- package/src/logic-scheduler/scheduler/logic-scheduler.ts +5 -5
- package/src/service/de-service-util.ts +13 -3
- package/src/types.ts +7 -0
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
MDCtrlLoadParams,
|
|
30
30
|
IApiNewTreeNodeParams,
|
|
31
31
|
ITreeNodeProvider,
|
|
32
|
+
NotifyRefreshEventCtx,
|
|
32
33
|
} from '../../../interface';
|
|
33
34
|
import { UIActionUtil } from '../../../ui-action';
|
|
34
35
|
import { MDControlController } from '../../common';
|
|
@@ -1300,7 +1301,7 @@ export class TreeController<
|
|
|
1300
1301
|
* @param {IPortalMessage} msg
|
|
1301
1302
|
* @return {*} {void}
|
|
1302
1303
|
*/
|
|
1303
|
-
protected onDEDataChange(msg: IPortalMessage): void {
|
|
1304
|
+
protected async onDEDataChange(msg: IPortalMessage): Promise<void> {
|
|
1304
1305
|
// msg.triggerKey 不为空,且与当前控制器的triggerKey一致时,则不处理
|
|
1305
1306
|
if (!isNil(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
1306
1307
|
return;
|
|
@@ -1325,6 +1326,16 @@ export class TreeController<
|
|
|
1325
1326
|
return;
|
|
1326
1327
|
}
|
|
1327
1328
|
|
|
1329
|
+
// 触发onNotifyRefresh事件,基于eventCtx.allowNext进行拦截
|
|
1330
|
+
const eventCtx: NotifyRefreshEventCtx = {};
|
|
1331
|
+
await this._evt.emit('onNotifyRefresh', {
|
|
1332
|
+
data: msg,
|
|
1333
|
+
args: eventCtx,
|
|
1334
|
+
});
|
|
1335
|
+
if (eventCtx.allowNext === false) {
|
|
1336
|
+
return;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1328
1339
|
this.doNextActive(
|
|
1329
1340
|
() => !this.ctx.isDestroyed && this.refreshNodeChildren(findNode, true),
|
|
1330
1341
|
{
|
|
@@ -550,7 +550,7 @@ export class ViewEngineBase implements IViewEngine {
|
|
|
550
550
|
* @protected
|
|
551
551
|
* @param {IPortalMessage} msg
|
|
552
552
|
*/
|
|
553
|
-
protected onDEDataChange(msg: IPortalMessage): void {
|
|
553
|
+
protected async onDEDataChange(msg: IPortalMessage): Promise<void> {
|
|
554
554
|
ibiz.log.debug('onDEDataChange', msg);
|
|
555
555
|
}
|
|
556
556
|
|
|
@@ -319,8 +319,25 @@ export interface IApiGlobalCommonConfig {
|
|
|
319
319
|
|
|
320
320
|
/**
|
|
321
321
|
* @description AI输入框空白占位
|
|
322
|
-
* @type {
|
|
322
|
+
* @type {string}
|
|
323
|
+
* @memberof IApiGlobalCommonConfig
|
|
324
|
+
*/
|
|
325
|
+
aiInputPlaceholder: string;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @description ai最小化容器ID
|
|
329
|
+
* @type {string | undefined}
|
|
330
|
+
* @platform web
|
|
331
|
+
* @memberof IApiGlobalCommonConfig
|
|
332
|
+
*/
|
|
333
|
+
aiMinimizeContainerId: string | undefined;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* @description 显示滚动到组件,目前仅pc端列表和卡片部件支持
|
|
337
|
+
* @default none
|
|
338
|
+
* @platform web
|
|
339
|
+
* @type {('top' | 'bottom' | 'auto' | 'none')}
|
|
323
340
|
* @memberof IApiGlobalCommonConfig
|
|
324
341
|
*/
|
|
325
|
-
|
|
342
|
+
showScrollTo: 'top' | 'bottom' | 'auto' | 'none';
|
|
326
343
|
}
|
|
@@ -14,6 +14,7 @@ import { IApiMDControlController } from './i-api-md-control.controller';
|
|
|
14
14
|
* @ctrlparams {"name":"mdctrlrefreshmode","title":"刷新模式","defaultvalue":"'cache'","parameterType":"'nocache' | 'cache'","description":"多数据部件刷新模式,当值为 'cache',部件刷新时保留选中数据;当值为 'nocache',部件刷新时清空选中数据","effectPlatform":"web"}
|
|
15
15
|
* @ctrlparams {"name":"batchtoolbarmode","title":"批操作工具栏显示模式","parameterType":"'default' | 'multiple'","defaultvalue":"'default'","description":"批操作工具栏显示模式,值为 'default' 时表示存在选择数据就显示批操作工具栏,值为 'multiple' 时表示选择至少2条数据才显示批操作工具栏","effectPlatform":"web"}
|
|
16
16
|
* @ctrlparams {"name":"paginationmode","title":"分页显示模式","defaultvalue":"'default'","parameterType":"'default'|'simple'","description":"表格分页显示模式,当值为 default 时,显示完整的分页组件,值为 simple 时,显示简略版的分页组件,仅包含总条数,当前页,上一页和下一页","effectPlatform":"web"}
|
|
17
|
+
* @ctrlparams {"name":"showscrollto","title":"显示滚动到组件","defaultvalue":"'none'","parameterType":"'top' | 'bottom' | 'auto' | 'none'","description":"显示滚动组件,top:回到顶部,bottom:回到底部,auto:自动处理回到顶部/底部,none:无滚动组件","effectPlatform":"web"}
|
|
17
18
|
* @template T
|
|
18
19
|
* @template S
|
|
19
20
|
*/
|
|
@@ -15,6 +15,7 @@ import { IApiMDControlController } from './i-api-md-control.controller';
|
|
|
15
15
|
* @ctrlparams {"name":"mdctrlrefreshmode","title":"刷新模式","defaultvalue":"'cache'","parameterType":"'nocache' | 'cache'","description":"多数据部件刷新模式,当值为 'cache',部件刷新时保留选中数据;当值为 'nocache',部件刷新时清空选中数据","effectPlatform":"web"}
|
|
16
16
|
* @ctrlparams {"name":"batchtoolbarmode","title":"批操作工具栏显示模式","parameterType":"'default' | 'multiple'","defaultvalue":"'default'","description":"批操作工具栏显示模式,值为 'default' 时表示存在选择数据就显示批操作工具栏,值为 'multiple' 时表示选择至少2条数据才显示批操作工具栏","effectPlatform":"web"}
|
|
17
17
|
* @ctrlparams {"name":"paginationmode","title":"分页显示模式","defaultvalue":"'default'","parameterType":"'default'|'simple'","description":"表格分页显示模式,当值为 default 时,显示完整的分页组件,值为 simple 时,显示简略版的分页组件,仅包含总条数,当前页,上一页和下一页","effectPlatform":"web"}
|
|
18
|
+
* @ctrlparams {"name":"showscrollto","title":"显示滚动组件","defaultvalue":"'none'","parameterType":"'top' | 'bottom' | 'auto' | 'none'","description":"显示滚动组件,top:回到顶部,bottom:回到底部,auto:自动处理回到顶部/底部,none:无滚动组件","effectPlatform":"web"}
|
|
18
19
|
* @template T
|
|
19
20
|
* @template S
|
|
20
21
|
*/
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { PartialWithObject } from '@ibiz-template/core';
|
|
2
|
-
import {
|
|
1
|
+
import { IPortalMessage, PartialWithObject } from '@ibiz-template/core';
|
|
2
|
+
import {
|
|
3
|
+
EventBase,
|
|
4
|
+
FormDataChangeEvent,
|
|
5
|
+
FormDetailEvent,
|
|
6
|
+
NotifyRefreshEventCtx,
|
|
7
|
+
} from '../argument';
|
|
3
8
|
import { IControlEvent } from './i-control.event';
|
|
4
9
|
|
|
5
10
|
/**
|
|
@@ -74,4 +79,17 @@ export interface IFormEvent extends IControlEvent {
|
|
|
74
79
|
event: FormDetailEvent;
|
|
75
80
|
emitArgs: PartialWithObject<FormDetailEvent, EventBase>;
|
|
76
81
|
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @description 通知刷新
|
|
85
|
+
* @type {({
|
|
86
|
+
* event: EventBase & { data: IPortalMessage; args: NotifyRefreshEventCtx };
|
|
87
|
+
* emitArgs: { data: IPortalMessage; args: NotifyRefreshEventCtx };
|
|
88
|
+
* })}
|
|
89
|
+
* @memberof IFormEvent
|
|
90
|
+
*/
|
|
91
|
+
onNotifyRefresh: {
|
|
92
|
+
event: EventBase & { data: IPortalMessage; args: NotifyRefreshEventCtx };
|
|
93
|
+
emitArgs: { data: IPortalMessage; args: NotifyRefreshEventCtx };
|
|
94
|
+
};
|
|
77
95
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PartialWithObject } from '@ibiz-template/core';
|
|
2
|
-
import { EventBase, LoadEvent } from '../argument';
|
|
1
|
+
import { IPortalMessage, PartialWithObject } from '@ibiz-template/core';
|
|
2
|
+
import { EventBase, LoadEvent, NotifyRefreshEventCtx } from '../argument';
|
|
3
3
|
import { IControlEvent } from './i-control.event';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -178,4 +178,17 @@ export interface IMDControlEvent extends IControlEvent {
|
|
|
178
178
|
event: EventBase & { navData: IData };
|
|
179
179
|
emitArgs: { navData: IData };
|
|
180
180
|
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @description 通知刷新
|
|
184
|
+
* @type {({
|
|
185
|
+
* event: EventBase & { data: IPortalMessage; args: NotifyRefreshEventCtx };
|
|
186
|
+
* emitArgs: { data: IPortalMessage; args: NotifyRefreshEventCtx };
|
|
187
|
+
* })}
|
|
188
|
+
* @memberof IMDControlEvent
|
|
189
|
+
*/
|
|
190
|
+
onNotifyRefresh: {
|
|
191
|
+
event: EventBase & { data: IPortalMessage; args: NotifyRefreshEventCtx };
|
|
192
|
+
emitArgs: { data: IPortalMessage; args: NotifyRefreshEventCtx };
|
|
193
|
+
};
|
|
181
194
|
}
|
|
@@ -298,20 +298,20 @@ export class LogicScheduler {
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
/**
|
|
301
|
-
* @description
|
|
302
|
-
* @param {string}
|
|
301
|
+
* @description 触发部件事件
|
|
302
|
+
* @param {string} ctrlName 部件名称
|
|
303
303
|
* @param {string} eventName 事件名称
|
|
304
304
|
* @param {Partial<IUILogicParams>} [executeParams] 执行参数
|
|
305
305
|
* @memberof LogicScheduler
|
|
306
306
|
*/
|
|
307
|
-
async
|
|
308
|
-
|
|
307
|
+
async asyncTriggerControlEvent(
|
|
308
|
+
ctrlName: string,
|
|
309
309
|
eventName: string,
|
|
310
310
|
executeParams?: Partial<IUILogicParams>,
|
|
311
311
|
): Promise<void> {
|
|
312
312
|
const matchParams = {
|
|
313
|
+
ctrlName,
|
|
313
314
|
eventName,
|
|
314
|
-
ctrlName: ctrlItemName,
|
|
315
315
|
triggerType: 'CTRLEVENT',
|
|
316
316
|
} as const;
|
|
317
317
|
const result = this.triggerAndExecute(matchParams, executeParams);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAppDataEntity, IApplication } from '@ibiz/model-core';
|
|
2
|
-
import { IHttpResponse, RuntimeError } from '@ibiz-template/core';
|
|
2
|
+
import { IBizContext, IHttpResponse, RuntimeError } from '@ibiz-template/core';
|
|
3
3
|
import {
|
|
4
4
|
IApiDEServiceUtil,
|
|
5
5
|
IAppDEService,
|
|
@@ -132,8 +132,13 @@ export class DEServiceUtil implements IApiDEServiceUtil {
|
|
|
132
132
|
const { targetApp, targetAppDataEntityId } =
|
|
133
133
|
await this.computeAppDEMappingParam(context, id);
|
|
134
134
|
if (targetApp && targetAppDataEntityId) {
|
|
135
|
+
// 映射场景下需将 srfappid 切换为目标应用,否则 createServiceInstance 会用源应用 appId 查找实体模型
|
|
136
|
+
const tempContext = IBizContext.create(
|
|
137
|
+
{ srfappid: targetApp.appId },
|
|
138
|
+
{ ...context },
|
|
139
|
+
);
|
|
135
140
|
const targetService = await targetApp.deService.getService(
|
|
136
|
-
|
|
141
|
+
tempContext,
|
|
137
142
|
targetAppDataEntityId,
|
|
138
143
|
);
|
|
139
144
|
// 订阅服务方法处理状态
|
|
@@ -327,10 +332,15 @@ export class DEServiceUtil implements IApiDEServiceUtil {
|
|
|
327
332
|
const { targetApp, targetAppDataEntityId } =
|
|
328
333
|
await this.computeAppDEMappingParam(context, appDataEntityId);
|
|
329
334
|
if (targetApp && targetAppDataEntityId) {
|
|
335
|
+
// 映射场景下需将 srfappid 切换为目标应用,否则 createServiceInstance 会用源应用 appId 查找实体模型
|
|
336
|
+
const tempContext = IBizContext.create(
|
|
337
|
+
{ srfappid: targetApp.appId },
|
|
338
|
+
{ ...context },
|
|
339
|
+
);
|
|
330
340
|
const result = await targetApp.deService.exec(
|
|
331
341
|
targetAppDataEntityId,
|
|
332
342
|
methodName,
|
|
333
|
-
|
|
343
|
+
tempContext,
|
|
334
344
|
params,
|
|
335
345
|
params2,
|
|
336
346
|
header,
|
package/src/types.ts
CHANGED
|
@@ -279,6 +279,13 @@ declare module '@ibiz-template/core' {
|
|
|
279
279
|
* @memberof IBizSys
|
|
280
280
|
*/
|
|
281
281
|
screenShotUtil: IScreenShotUtil;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @description 扩展插件临时应用ID(仅用于加载扩展插件存储临时应用数据,方便注册模型处理器附加应用标识)
|
|
285
|
+
* @type {string}
|
|
286
|
+
* @memberof IBizSys
|
|
287
|
+
*/
|
|
288
|
+
__TEMPAPPID__: string;
|
|
282
289
|
}
|
|
283
290
|
|
|
284
291
|
interface IEnvironment {
|