@ibiz-template/runtime 0.7.41-alpha.144 → 0.7.41-alpha.146
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 +87 -16
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +1 -0
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +9 -0
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +0 -1
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +0 -1
- package/out/locale/zh-CN/index.d.ts +0 -1
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +0 -1
- package/out/logic-scheduler/executor/app-ui-logic-executor.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-logic-executor.js +24 -6
- package/out/service/service/util/ai-util.service.d.ts.map +1 -1
- package/out/service/service/util/ai-util.service.js +8 -2
- package/out/utils/layout-panel-util/layout-panel-util.d.ts +17 -1
- package/out/utils/layout-panel-util/layout-panel-util.d.ts.map +1 -1
- package/out/utils/layout-panel-util/layout-panel-util.js +49 -0
- package/package.json +2 -2
- package/src/config/global-config.ts +1 -0
- package/src/interface/api/common/global-config/i-api-global-common-config.ts +10 -0
- package/src/locale/en/index.ts +0 -1
- package/src/locale/zh-CN/index.ts +0 -1
- package/src/logic-scheduler/executor/app-ui-logic-executor.ts +27 -12
- package/src/service/service/util/ai-util.service.ts +8 -2
- package/src/utils/layout-panel-util/layout-panel-util.ts +66 -0
package/dist/index.esm.js
CHANGED
|
@@ -20017,7 +20017,8 @@ var GlobalConfig = class {
|
|
|
20017
20017
|
aiTopicStorageMode: "DEFAULT",
|
|
20018
20018
|
aiInputPlaceholder: "",
|
|
20019
20019
|
aiMinimizeContainerId: void 0,
|
|
20020
|
-
showScrollTo: "none"
|
|
20020
|
+
showScrollTo: "none",
|
|
20021
|
+
aiChatMessagePageSize: 100
|
|
20021
20022
|
};
|
|
20022
20023
|
// 全局分页流布局配置
|
|
20023
20024
|
this.drtab = {
|
|
@@ -23317,6 +23318,11 @@ var LayoutPanelUtil = class {
|
|
|
23317
23318
|
layout.controls = viewModel.controls;
|
|
23318
23319
|
delete viewModel.controls;
|
|
23319
23320
|
}
|
|
23321
|
+
if (["DEMPICKUPVIEW", "DEMPICKUPVIEW2", "DEMOBMPICKUPVIEW"].includes(
|
|
23322
|
+
viewModel.viewType
|
|
23323
|
+
)) {
|
|
23324
|
+
this.replaceSimpleList(viewModel);
|
|
23325
|
+
}
|
|
23320
23326
|
}
|
|
23321
23327
|
}
|
|
23322
23328
|
return viewModel;
|
|
@@ -23410,6 +23416,56 @@ var LayoutPanelUtil = class {
|
|
|
23410
23416
|
}
|
|
23411
23417
|
return "".concat(viewType, "_").concat(viewStyle);
|
|
23412
23418
|
}
|
|
23419
|
+
/**
|
|
23420
|
+
* @description 递归查找指定标识的面板项
|
|
23421
|
+
* @protected
|
|
23422
|
+
* @param {IPanelItem[]} items
|
|
23423
|
+
* @param {string} id
|
|
23424
|
+
* @returns {*} {(IPanelItem | undefined)}
|
|
23425
|
+
* @memberof LayoutPanelUtil
|
|
23426
|
+
*/
|
|
23427
|
+
findPanelItem(items, id) {
|
|
23428
|
+
for (let i = 0; i < items.length; i++) {
|
|
23429
|
+
const item = items[i];
|
|
23430
|
+
if (item.id === id) {
|
|
23431
|
+
return item;
|
|
23432
|
+
}
|
|
23433
|
+
const children = item.panelItems;
|
|
23434
|
+
if (children == null ? void 0 : children.length) {
|
|
23435
|
+
const result = this.findPanelItem(children, id);
|
|
23436
|
+
if (result) {
|
|
23437
|
+
return result;
|
|
23438
|
+
}
|
|
23439
|
+
}
|
|
23440
|
+
}
|
|
23441
|
+
return void 0;
|
|
23442
|
+
}
|
|
23443
|
+
/**
|
|
23444
|
+
* @description 替换简单列表部件占位
|
|
23445
|
+
* @protected
|
|
23446
|
+
* @param {IAppView} viewModel
|
|
23447
|
+
* @memberof LayoutPanelUtil
|
|
23448
|
+
*/
|
|
23449
|
+
replaceSimpleList(viewModel) {
|
|
23450
|
+
const layout = viewModel.viewLayoutPanel;
|
|
23451
|
+
const { controls = [] } = layout;
|
|
23452
|
+
const simpleListControl = controls.find(
|
|
23453
|
+
(control) => control.name === "simplelist"
|
|
23454
|
+
);
|
|
23455
|
+
if (!simpleListControl) {
|
|
23456
|
+
const simpleListItem = this.findPanelItem(
|
|
23457
|
+
layout.rootPanelItems,
|
|
23458
|
+
"simplelist"
|
|
23459
|
+
);
|
|
23460
|
+
if (simpleListItem) {
|
|
23461
|
+
simpleListItem.itemType = "RAWITEM";
|
|
23462
|
+
simpleListItem.rawItem = {
|
|
23463
|
+
predefinedType: "SIMPLELIST",
|
|
23464
|
+
appId: simpleListItem.appId
|
|
23465
|
+
};
|
|
23466
|
+
}
|
|
23467
|
+
}
|
|
23468
|
+
}
|
|
23413
23469
|
};
|
|
23414
23470
|
|
|
23415
23471
|
// src/utils/wf-helper/wf-helper.ts
|
|
@@ -76058,17 +76114,22 @@ var AIUtilService = class {
|
|
|
76058
76114
|
...params
|
|
76059
76115
|
}
|
|
76060
76116
|
);
|
|
76061
|
-
|
|
76117
|
+
let result = this.handleUserResponse(
|
|
76062
76118
|
response,
|
|
76063
76119
|
"messagemodelMapping"
|
|
76064
76120
|
);
|
|
76121
|
+
if (result && result.length > 0) {
|
|
76122
|
+
result = result.sort((a, b) => {
|
|
76123
|
+
return a.sequence - b.sequence;
|
|
76124
|
+
});
|
|
76125
|
+
}
|
|
76065
76126
|
let total = response.headers["x-total"];
|
|
76066
76127
|
if (total) {
|
|
76067
76128
|
total = Number(total);
|
|
76068
76129
|
} else {
|
|
76069
76130
|
total = result.length;
|
|
76070
76131
|
}
|
|
76071
|
-
return { total, data: result
|
|
76132
|
+
return { total, data: result };
|
|
76072
76133
|
}
|
|
76073
76134
|
/**
|
|
76074
76135
|
* 删除消息(多个以逗号分割)
|
|
@@ -91653,11 +91714,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
91653
91714
|
};
|
|
91654
91715
|
|
|
91655
91716
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
91656
|
-
import {
|
|
91657
|
-
ModelError as ModelError32,
|
|
91658
|
-
RuntimeError as RuntimeError85,
|
|
91659
|
-
RuntimeModelError as RuntimeModelError73
|
|
91660
|
-
} from "@ibiz-template/core";
|
|
91717
|
+
import { RuntimeError as RuntimeError85, RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
91661
91718
|
import { notNilEmpty as notNilEmpty11 } from "qx-util";
|
|
91662
91719
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
91663
91720
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -91795,12 +91852,32 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
91795
91852
|
const { data, view } = parameters;
|
|
91796
91853
|
const { enableWizardAdd, enableBatchAdd, batchAddOnly, newDataAppView } = appUILogic;
|
|
91797
91854
|
let newViewRef;
|
|
91855
|
+
let isBatchAdd = false;
|
|
91798
91856
|
if (enableWizardAdd) {
|
|
91799
91857
|
newViewRef = await this.getWizardNewViewRef(appUILogic, parameters);
|
|
91800
91858
|
if (!newViewRef) {
|
|
91801
91859
|
return { ok: false };
|
|
91802
91860
|
}
|
|
91803
91861
|
} else if (enableBatchAdd) {
|
|
91862
|
+
const parentDeName = calcDeCodeNameById(
|
|
91863
|
+
view.parentView.model.appDataEntityId
|
|
91864
|
+
);
|
|
91865
|
+
const batchViews = appUILogic.batchAddAppViews;
|
|
91866
|
+
newViewRef = batchViews == null ? void 0 : batchViews.find((viewRef) => {
|
|
91867
|
+
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
91868
|
+
});
|
|
91869
|
+
if (newViewRef) {
|
|
91870
|
+
isBatchAdd = true;
|
|
91871
|
+
} else {
|
|
91872
|
+
newViewRef = newDataAppView;
|
|
91873
|
+
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
91874
|
+
throw new RuntimeModelError73(
|
|
91875
|
+
appUILogic,
|
|
91876
|
+
ibiz.i18n.t("runtime.logicScheduler.executor.newdataViewLogic")
|
|
91877
|
+
);
|
|
91878
|
+
}
|
|
91879
|
+
}
|
|
91880
|
+
} else if (batchAddOnly) {
|
|
91804
91881
|
const parentDeName = calcDeCodeNameById(
|
|
91805
91882
|
view.parentView.model.appDataEntityId
|
|
91806
91883
|
);
|
|
@@ -91814,11 +91891,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
91814
91891
|
ibiz.i18n.t("runtime.logicScheduler.executor.selectionView")
|
|
91815
91892
|
);
|
|
91816
91893
|
}
|
|
91817
|
-
|
|
91818
|
-
throw new ModelError32(
|
|
91819
|
-
appUILogic,
|
|
91820
|
-
ibiz.i18n.t("runtime.logicScheduler.executor.noSupportedBatchAddOnly")
|
|
91821
|
-
);
|
|
91894
|
+
isBatchAdd = true;
|
|
91822
91895
|
} else {
|
|
91823
91896
|
newViewRef = newDataAppView;
|
|
91824
91897
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
@@ -91867,7 +91940,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
91867
91940
|
tempParams,
|
|
91868
91941
|
{ ctx: view.getCtx(), ...rest, openMode: newViewRef.openMode }
|
|
91869
91942
|
);
|
|
91870
|
-
if (
|
|
91943
|
+
if (isBatchAdd && result.data) {
|
|
91871
91944
|
await this.doBatchAdd(
|
|
91872
91945
|
appUILogic,
|
|
91873
91946
|
result.data,
|
|
@@ -92778,7 +92851,6 @@ var en = {
|
|
|
92778
92851
|
entityAttributeValues: "Data Source No Form Type Applied Entity Attribute Values",
|
|
92779
92852
|
editViews: "No edit views were found for the entity associated with the form type {formTypeValue}.",
|
|
92780
92853
|
selectionView: "Selection view that needs to be opened for batch add was not found",
|
|
92781
|
-
noSupportedBatchAddOnly: "batchAddOnly is not supported yet.",
|
|
92782
92854
|
newdataViewLogic: "The newdata view logic is not configured to default to a new data view",
|
|
92783
92855
|
indexEntity: "Missing Default Index Entity Selection View",
|
|
92784
92856
|
checkOne: "Please check one piece of data",
|
|
@@ -93492,7 +93564,6 @@ var zhCn = {
|
|
|
93492
93564
|
entityAttributeValues: "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C",
|
|
93493
93565
|
editViews: "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B{formTypeValue}\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE",
|
|
93494
93566
|
selectionView: "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE",
|
|
93495
|
-
noSupportedBatchAddOnly: "batchAddOnly\u6682\u672A\u652F\u6301",
|
|
93496
93567
|
newdataViewLogic: "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE",
|
|
93497
93568
|
indexEntity: "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE",
|
|
93498
93569
|
checkOne: "\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E",
|