@ibiz-template/runtime 0.7.7-dev.0 → 0.7.7
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 +61 -14
- 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/portlet/portlet-part/portlet-part.controller.d.ts +1 -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 +4 -3
- 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/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
|
}
|
|
@@ -22296,7 +22298,6 @@ var DashboardController = class extends ControlController {
|
|
|
22296
22298
|
};
|
|
22297
22299
|
|
|
22298
22300
|
// src/controller/control/dashboard/custom-dashboard.controller.ts
|
|
22299
|
-
import { merge } from "lodash-es";
|
|
22300
22301
|
var CustomDashboardController = class {
|
|
22301
22302
|
/**
|
|
22302
22303
|
* Creates an instance of BaseController.
|
|
@@ -22453,7 +22454,7 @@ var CustomDashboardController = class {
|
|
|
22453
22454
|
* @Date: 2023-09-20 16:22:49
|
|
22454
22455
|
*/
|
|
22455
22456
|
async saveCustomModelData(model, config = {}) {
|
|
22456
|
-
|
|
22457
|
+
Object.assign(this.portletConfig, config);
|
|
22457
22458
|
let res;
|
|
22458
22459
|
const data = {
|
|
22459
22460
|
model,
|
|
@@ -22485,7 +22486,7 @@ var CustomDashboardController = class {
|
|
|
22485
22486
|
};
|
|
22486
22487
|
|
|
22487
22488
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts
|
|
22488
|
-
import { merge
|
|
22489
|
+
import { merge } from "lodash-es";
|
|
22489
22490
|
import { IBizContext as IBizContext5, IBizParams as IBizParams2 } from "@ibiz-template/core";
|
|
22490
22491
|
|
|
22491
22492
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.state.ts
|
|
@@ -22627,10 +22628,11 @@ var PortletPartController = class {
|
|
|
22627
22628
|
* @memberof PortletPartController
|
|
22628
22629
|
*/
|
|
22629
22630
|
async setConfig(config) {
|
|
22630
|
-
|
|
22631
|
-
|
|
22632
|
-
|
|
22633
|
-
|
|
22631
|
+
this.config = config;
|
|
22632
|
+
if (config.srftitle) {
|
|
22633
|
+
this.state.title = config.srftitle;
|
|
22634
|
+
}
|
|
22635
|
+
merge(this.params, config);
|
|
22634
22636
|
this.dashboard.evt.emit("onConfigChange", {
|
|
22635
22637
|
name: this.model.id,
|
|
22636
22638
|
config: this.config
|
|
@@ -37728,6 +37730,15 @@ var AppHub = class {
|
|
|
37728
37730
|
* @type {Map<string, IAppView>}
|
|
37729
37731
|
*/
|
|
37730
37732
|
this.views = /* @__PURE__ */ new Map();
|
|
37733
|
+
/**
|
|
37734
|
+
* 子应用dr部件模型
|
|
37735
|
+
*
|
|
37736
|
+
* @author tony001
|
|
37737
|
+
* @date 2024-04-29 15:04:24
|
|
37738
|
+
* @protected
|
|
37739
|
+
* @type {Map<string, IModel[]>}
|
|
37740
|
+
*/
|
|
37741
|
+
this.drcontrols = /* @__PURE__ */ new Map();
|
|
37731
37742
|
/**
|
|
37732
37743
|
* 应用实体实例模型
|
|
37733
37744
|
*
|
|
@@ -37792,6 +37803,21 @@ var AppHub = class {
|
|
|
37792
37803
|
registerAppView(model) {
|
|
37793
37804
|
this.views.set(model.codeName.toLowerCase(), model);
|
|
37794
37805
|
}
|
|
37806
|
+
/**
|
|
37807
|
+
* 注册子应用dedrcontrols模型
|
|
37808
|
+
*
|
|
37809
|
+
* @author tony001
|
|
37810
|
+
* @date 2024-04-29 15:04:36
|
|
37811
|
+
* @param {string} appId
|
|
37812
|
+
* @param {IModel} model
|
|
37813
|
+
*/
|
|
37814
|
+
registerSubAppDrControls(appId2, model) {
|
|
37815
|
+
if (!this.drcontrols.has(appId2)) {
|
|
37816
|
+
this.drcontrols.set(appId2, []);
|
|
37817
|
+
}
|
|
37818
|
+
const targetAppDrControls = this.drcontrols.get(appId2);
|
|
37819
|
+
targetAppDrControls == null ? void 0 : targetAppDrControls.push(model);
|
|
37820
|
+
}
|
|
37795
37821
|
/**
|
|
37796
37822
|
* 注册应用实体
|
|
37797
37823
|
*
|
|
@@ -37814,9 +37840,12 @@ var AppHub = class {
|
|
|
37814
37840
|
* @date 2024-01-15 15:01:41
|
|
37815
37841
|
* @param {string} tag 视图 codeName 或者视图 id
|
|
37816
37842
|
* @param {string} [appId=ibiz.env.appId]
|
|
37817
|
-
* @param {number} [priority=-1] 视图的优先级,值越小优先级越高。
|
|
37843
|
+
* @param {number} [priority=-1] 视图的优先级,值越小优先级越高。10为最高优先级
|
|
37818
37844
|
*/
|
|
37819
37845
|
setAppView(tag, appId2 = ibiz.env.appId, priority = -1) {
|
|
37846
|
+
if (priority <= 0) {
|
|
37847
|
+
priority = 50;
|
|
37848
|
+
}
|
|
37820
37849
|
const id = this.calcAppViewId(tag);
|
|
37821
37850
|
if (this.view2appMap.has(id)) {
|
|
37822
37851
|
const _priority = this.view2appPriorityMap.get(id);
|
|
@@ -37879,6 +37908,24 @@ var AppHub = class {
|
|
|
37879
37908
|
}
|
|
37880
37909
|
throw new RuntimeError67("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
37881
37910
|
}
|
|
37911
|
+
/**
|
|
37912
|
+
* 根据DrControl的名称和子应用标识获取模型
|
|
37913
|
+
*
|
|
37914
|
+
* @author tony001
|
|
37915
|
+
* @date 2024-04-29 15:04:25
|
|
37916
|
+
* @param {string} tag
|
|
37917
|
+
* @param {string} appId
|
|
37918
|
+
* @return {*} {Promise<IModel | undefined>}
|
|
37919
|
+
*/
|
|
37920
|
+
getSubAppDrControl(tag, appId2) {
|
|
37921
|
+
if (!this.drcontrols.has(appId2)) {
|
|
37922
|
+
return void 0;
|
|
37923
|
+
}
|
|
37924
|
+
const targetAppDrControls = this.drcontrols.get(appId2);
|
|
37925
|
+
return targetAppDrControls.find((item) => {
|
|
37926
|
+
return item.uniqueTag === tag;
|
|
37927
|
+
});
|
|
37928
|
+
}
|
|
37882
37929
|
/**
|
|
37883
37930
|
* 根据视图模型路径,加参数重新计算视图模型
|
|
37884
37931
|
*
|