@ibiz-template/runtime 0.7.7-dev.0 → 0.7.8
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 +94 -17
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +29 -1
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +46 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +1 -2
- package/out/controller/control/dashboard/dashboard.controller.d.ts +7 -0
- package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/dashboard.controller.js +13 -0
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts +7 -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 +23 -3
- package/out/controller/control/form/form/form.controller.js +1 -1
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +19 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts +13 -0
- package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-dashboard.event.d.ts +9 -0
- package/out/interface/controller/event/control/i-dashboard.event.d.ts.map +1 -1
- package/out/service/service/counter/counter.service.js +2 -2
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +8 -6
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -6695,10 +6695,12 @@ var DynamicCodeListCache = class {
|
|
|
6695
6695
|
*/
|
|
6696
6696
|
this.commonKeys = ["query", "queryconds"];
|
|
6697
6697
|
this.codeList = codeList;
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6698
|
+
if (this.codeList.enableCache) {
|
|
6699
|
+
this.codelistChange = this.codelistChange.bind(this);
|
|
6700
|
+
const { appDataEntityId, appDEDataSetId } = this.codeList;
|
|
6701
|
+
if (appDataEntityId && appDEDataSetId) {
|
|
6702
|
+
ibiz.mc.command.change.on(this.codelistChange);
|
|
6703
|
+
}
|
|
6702
6704
|
}
|
|
6703
6705
|
}
|
|
6704
6706
|
/**
|
|
@@ -6712,7 +6714,7 @@ var DynamicCodeListCache = class {
|
|
|
6712
6714
|
*/
|
|
6713
6715
|
setParams(context, params) {
|
|
6714
6716
|
if (context) {
|
|
6715
|
-
this.context =
|
|
6717
|
+
this.context = IBizContext2.create({}, { ...context });
|
|
6716
6718
|
}
|
|
6717
6719
|
if (params) {
|
|
6718
6720
|
this.params = clone4(params);
|
|
@@ -7038,7 +7040,7 @@ var DynamicCodeListCache = class {
|
|
|
7038
7040
|
*/
|
|
7039
7041
|
destroy() {
|
|
7040
7042
|
const { appDataEntityId, appDEDataSetId } = this.codeList;
|
|
7041
|
-
if (appDataEntityId && appDEDataSetId) {
|
|
7043
|
+
if (appDataEntityId && appDEDataSetId && this.codeList.enableCache) {
|
|
7042
7044
|
ibiz.mc.command.change.off(this.codelistChange);
|
|
7043
7045
|
}
|
|
7044
7046
|
}
|
|
@@ -7986,8 +7988,8 @@ var CounterService = class {
|
|
|
7986
7988
|
*/
|
|
7987
7989
|
static async getCounter(model, context, params) {
|
|
7988
7990
|
let id = model.id;
|
|
7989
|
-
if (params && params.
|
|
7990
|
-
id = params.
|
|
7991
|
+
if (params && params.srfcustomtag) {
|
|
7992
|
+
id = params.srfcustomtag;
|
|
7991
7993
|
}
|
|
7992
7994
|
if (this.counterMap.has(id)) {
|
|
7993
7995
|
const counter2 = this.counterMap.get(id);
|
|
@@ -22279,6 +22281,19 @@ var DashboardController = class extends ControlController {
|
|
|
22279
22281
|
}
|
|
22280
22282
|
});
|
|
22281
22283
|
}
|
|
22284
|
+
/**
|
|
22285
|
+
* 重置门户
|
|
22286
|
+
*
|
|
22287
|
+
* @return {*} {Promise<void>}
|
|
22288
|
+
* @memberof DashboardController
|
|
22289
|
+
*/
|
|
22290
|
+
async resetPortlets() {
|
|
22291
|
+
Object.keys(this.portlets).forEach((key) => {
|
|
22292
|
+
const portlet = this.portlets[key];
|
|
22293
|
+
portlet.resetConfig();
|
|
22294
|
+
});
|
|
22295
|
+
this.evt.emit("onResetPortlet", void 0);
|
|
22296
|
+
}
|
|
22282
22297
|
/**
|
|
22283
22298
|
* 通知所有表单成员表单操作过程中的数据变更
|
|
22284
22299
|
*
|
|
@@ -22296,7 +22311,6 @@ var DashboardController = class extends ControlController {
|
|
|
22296
22311
|
};
|
|
22297
22312
|
|
|
22298
22313
|
// src/controller/control/dashboard/custom-dashboard.controller.ts
|
|
22299
|
-
import { merge } from "lodash-es";
|
|
22300
22314
|
var CustomDashboardController = class {
|
|
22301
22315
|
/**
|
|
22302
22316
|
* Creates an instance of BaseController.
|
|
@@ -22453,7 +22467,7 @@ var CustomDashboardController = class {
|
|
|
22453
22467
|
* @Date: 2023-09-20 16:22:49
|
|
22454
22468
|
*/
|
|
22455
22469
|
async saveCustomModelData(model, config = {}) {
|
|
22456
|
-
|
|
22470
|
+
Object.assign(this.portletConfig, config);
|
|
22457
22471
|
let res;
|
|
22458
22472
|
const data = {
|
|
22459
22473
|
model,
|
|
@@ -22485,7 +22499,7 @@ var CustomDashboardController = class {
|
|
|
22485
22499
|
};
|
|
22486
22500
|
|
|
22487
22501
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts
|
|
22488
|
-
import { merge
|
|
22502
|
+
import { merge } from "lodash-es";
|
|
22489
22503
|
import { IBizContext as IBizContext5, IBizParams as IBizParams2 } from "@ibiz-template/core";
|
|
22490
22504
|
|
|
22491
22505
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.state.ts
|
|
@@ -22600,6 +22614,7 @@ var PortletPartController = class {
|
|
|
22600
22614
|
this.state.title = title;
|
|
22601
22615
|
}
|
|
22602
22616
|
this.config = { srftitle: this.state.title };
|
|
22617
|
+
Object.assign(this.params, this.config);
|
|
22603
22618
|
await this.initActionStates();
|
|
22604
22619
|
}
|
|
22605
22620
|
/**
|
|
@@ -22627,15 +22642,32 @@ var PortletPartController = class {
|
|
|
22627
22642
|
* @memberof PortletPartController
|
|
22628
22643
|
*/
|
|
22629
22644
|
async setConfig(config) {
|
|
22630
|
-
|
|
22631
|
-
|
|
22632
|
-
|
|
22633
|
-
|
|
22645
|
+
this.config = config;
|
|
22646
|
+
if (config.srftitle) {
|
|
22647
|
+
this.state.title = config.srftitle;
|
|
22648
|
+
}
|
|
22649
|
+
merge(this.params, config);
|
|
22634
22650
|
this.dashboard.evt.emit("onConfigChange", {
|
|
22635
22651
|
name: this.model.id,
|
|
22636
22652
|
config: this.config
|
|
22637
22653
|
});
|
|
22638
22654
|
}
|
|
22655
|
+
/**
|
|
22656
|
+
* 重置自定义配置
|
|
22657
|
+
*
|
|
22658
|
+
* @memberof PortletPartController
|
|
22659
|
+
*/
|
|
22660
|
+
resetConfig() {
|
|
22661
|
+
const { title, titleLanguageRes } = this.model;
|
|
22662
|
+
this.params = new IBizParams2({}, this.dashboard.params);
|
|
22663
|
+
if (titleLanguageRes) {
|
|
22664
|
+
this.state.title = ibiz.i18n.t(titleLanguageRes.lanResTag, title);
|
|
22665
|
+
} else {
|
|
22666
|
+
this.state.title = title;
|
|
22667
|
+
}
|
|
22668
|
+
this.config = { srftitle: this.state.title };
|
|
22669
|
+
Object.assign(this.params, this.config);
|
|
22670
|
+
}
|
|
22639
22671
|
/**
|
|
22640
22672
|
* 数据改变方法
|
|
22641
22673
|
* @param {DataChangeEvent} event
|
|
@@ -24320,7 +24352,7 @@ var FormController = class extends ControlController {
|
|
|
24320
24352
|
const counter = await CounterService.getCounterByRef(
|
|
24321
24353
|
counterRef,
|
|
24322
24354
|
this.context,
|
|
24323
|
-
dataKey ? {
|
|
24355
|
+
dataKey ? { srfcustomtag: dataKey, ...this.params } : { ...this.params }
|
|
24324
24356
|
);
|
|
24325
24357
|
this.counters[counterRef.id] = counter;
|
|
24326
24358
|
})
|
|
@@ -37728,6 +37760,15 @@ var AppHub = class {
|
|
|
37728
37760
|
* @type {Map<string, IAppView>}
|
|
37729
37761
|
*/
|
|
37730
37762
|
this.views = /* @__PURE__ */ new Map();
|
|
37763
|
+
/**
|
|
37764
|
+
* 子应用dr部件模型
|
|
37765
|
+
*
|
|
37766
|
+
* @author tony001
|
|
37767
|
+
* @date 2024-04-29 15:04:24
|
|
37768
|
+
* @protected
|
|
37769
|
+
* @type {Map<string, IModel[]>}
|
|
37770
|
+
*/
|
|
37771
|
+
this.drcontrols = /* @__PURE__ */ new Map();
|
|
37731
37772
|
/**
|
|
37732
37773
|
* 应用实体实例模型
|
|
37733
37774
|
*
|
|
@@ -37792,6 +37833,21 @@ var AppHub = class {
|
|
|
37792
37833
|
registerAppView(model) {
|
|
37793
37834
|
this.views.set(model.codeName.toLowerCase(), model);
|
|
37794
37835
|
}
|
|
37836
|
+
/**
|
|
37837
|
+
* 注册子应用dedrcontrols模型
|
|
37838
|
+
*
|
|
37839
|
+
* @author tony001
|
|
37840
|
+
* @date 2024-04-29 15:04:36
|
|
37841
|
+
* @param {string} appId
|
|
37842
|
+
* @param {IModel} model
|
|
37843
|
+
*/
|
|
37844
|
+
registerSubAppDrControls(appId2, model) {
|
|
37845
|
+
if (!this.drcontrols.has(appId2)) {
|
|
37846
|
+
this.drcontrols.set(appId2, []);
|
|
37847
|
+
}
|
|
37848
|
+
const targetAppDrControls = this.drcontrols.get(appId2);
|
|
37849
|
+
targetAppDrControls == null ? void 0 : targetAppDrControls.push(model);
|
|
37850
|
+
}
|
|
37795
37851
|
/**
|
|
37796
37852
|
* 注册应用实体
|
|
37797
37853
|
*
|
|
@@ -37814,9 +37870,12 @@ var AppHub = class {
|
|
|
37814
37870
|
* @date 2024-01-15 15:01:41
|
|
37815
37871
|
* @param {string} tag 视图 codeName 或者视图 id
|
|
37816
37872
|
* @param {string} [appId=ibiz.env.appId]
|
|
37817
|
-
* @param {number} [priority=-1] 视图的优先级,值越小优先级越高。
|
|
37873
|
+
* @param {number} [priority=-1] 视图的优先级,值越小优先级越高。10为最高优先级
|
|
37818
37874
|
*/
|
|
37819
37875
|
setAppView(tag, appId2 = ibiz.env.appId, priority = -1) {
|
|
37876
|
+
if (priority <= 0) {
|
|
37877
|
+
priority = 50;
|
|
37878
|
+
}
|
|
37820
37879
|
const id = this.calcAppViewId(tag);
|
|
37821
37880
|
if (this.view2appMap.has(id)) {
|
|
37822
37881
|
const _priority = this.view2appPriorityMap.get(id);
|
|
@@ -37879,6 +37938,24 @@ var AppHub = class {
|
|
|
37879
37938
|
}
|
|
37880
37939
|
throw new RuntimeError67("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
37881
37940
|
}
|
|
37941
|
+
/**
|
|
37942
|
+
* 根据DrControl的名称和子应用标识获取模型
|
|
37943
|
+
*
|
|
37944
|
+
* @author tony001
|
|
37945
|
+
* @date 2024-04-29 15:04:25
|
|
37946
|
+
* @param {string} tag
|
|
37947
|
+
* @param {string} appId
|
|
37948
|
+
* @return {*} {Promise<IModel | undefined>}
|
|
37949
|
+
*/
|
|
37950
|
+
getSubAppDrControl(tag, appId2) {
|
|
37951
|
+
if (!this.drcontrols.has(appId2)) {
|
|
37952
|
+
return void 0;
|
|
37953
|
+
}
|
|
37954
|
+
const targetAppDrControls = this.drcontrols.get(appId2);
|
|
37955
|
+
return targetAppDrControls.find((item) => {
|
|
37956
|
+
return item.uniqueTag === tag;
|
|
37957
|
+
});
|
|
37958
|
+
}
|
|
37882
37959
|
/**
|
|
37883
37960
|
* 根据视图模型路径,加参数重新计算视图模型
|
|
37884
37961
|
*
|