@ibiz-template/runtime 0.7.41-alpha.158 → 0.7.41-alpha.160
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 +79 -10
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +2 -0
- package/out/controller/common/control/md-control.controller.d.ts +7 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +24 -7
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +4 -2
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +2 -0
- package/out/controller/control/list/list.controller.d.ts.map +1 -1
- package/out/controller/control/list/list.controller.js +4 -2
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +17 -4
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
- package/out/interface/api/common/i-api-export-params.d.ts +5 -4
- package/out/interface/api/common/i-api-export-params.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-drbar.controller.d.ts +1 -1
- package/out/interface/api/controller/control/i-api-drtab.controller.d.ts +1 -1
- package/out/interface/api/state/common/i-api-button-container.state.d.ts +2 -2
- package/out/interface/api/state/common/i-api-button-container.state.d.ts.map +1 -1
- package/out/interface/api/state/common/i-api-button.state.d.ts +2 -2
- package/out/interface/api/state/common/i-api-button.state.d.ts.map +1 -1
- package/out/interface/api/util/i-api-modal-util.d.ts +7 -0
- package/out/interface/api/util/i-api-modal-util.d.ts.map +1 -1
- package/out/service/service/util/ai-util.service.d.ts +11 -0
- package/out/service/service/util/ai-util.service.d.ts.map +1 -1
- package/out/service/service/util/ai-util.service.js +26 -0
- package/package.json +2 -2
- package/src/config/global-config.ts +2 -0
- package/src/controller/common/control/md-control.controller.ts +34 -7
- package/src/controller/control/data-view/data-view.controller.ts +6 -2
- package/src/controller/control/grid/grid/grid.controller.ts +2 -0
- package/src/controller/control/list/list.controller.ts +6 -2
- package/src/interface/api/common/global-config/i-api-global-common-config.ts +19 -4
- package/src/interface/api/common/i-api-export-params.ts +6 -4
- package/src/interface/api/controller/control/i-api-drbar.controller.ts +1 -1
- package/src/interface/api/controller/control/i-api-drtab.controller.ts +1 -1
- package/src/interface/api/state/common/i-api-button-container.state.ts +2 -2
- package/src/interface/api/state/common/i-api-button.state.ts +2 -2
- package/src/interface/api/util/i-api-modal-util.ts +7 -0
- package/src/service/service/util/ai-util.service.ts +41 -0
package/dist/index.esm.js
CHANGED
|
@@ -20029,7 +20029,9 @@ var GlobalConfig = class {
|
|
|
20029
20029
|
aiEnableBasicGroup: true,
|
|
20030
20030
|
aiNewTopicParamMode: "ACTIVATED",
|
|
20031
20031
|
aiProjectSelectPlaceholder: void 0,
|
|
20032
|
-
aiKnowledgeBaseView: void 0
|
|
20032
|
+
aiKnowledgeBaseView: void 0,
|
|
20033
|
+
ignoreSortCache: void 0,
|
|
20034
|
+
aiSessionShareUIActionTag: void 0
|
|
20033
20035
|
};
|
|
20034
20036
|
// 全局分页流布局配置
|
|
20035
20037
|
this.drtab = {
|
|
@@ -30783,6 +30785,18 @@ var MDControlController = class extends ControlController {
|
|
|
30783
30785
|
}
|
|
30784
30786
|
return "default";
|
|
30785
30787
|
}
|
|
30788
|
+
/**
|
|
30789
|
+
* @description 忽略排序缓存
|
|
30790
|
+
* @readonly
|
|
30791
|
+
* @type {boolean}
|
|
30792
|
+
* @memberof MDControlController
|
|
30793
|
+
*/
|
|
30794
|
+
get ignoreSortCache() {
|
|
30795
|
+
var _a3, _b2;
|
|
30796
|
+
if (this.controlParams.ignoresortcache)
|
|
30797
|
+
return this.controlParams.ignoresortcache === "true" || this.controlParams.ignoresortcache === true;
|
|
30798
|
+
return (_b2 = (_a3 = ibiz.config.common.ignoreSortCache) == null ? void 0 : _a3.includes(this.model.controlType)) != null ? _b2 : false;
|
|
30799
|
+
}
|
|
30786
30800
|
get _evt() {
|
|
30787
30801
|
return this.evt;
|
|
30788
30802
|
}
|
|
@@ -30955,7 +30969,7 @@ var MDControlController = class extends ControlController {
|
|
|
30955
30969
|
this.state.sortQuery = "".concat(key, ",").concat(order);
|
|
30956
30970
|
} else if (!key && !order) {
|
|
30957
30971
|
const { minorSortAppDEFieldId, minorSortDir } = this.getSortModel();
|
|
30958
|
-
if (this.view && localStorage.getItem("".concat(this.view.model.id, ".").concat(this.model.name, ".sort"))) {
|
|
30972
|
+
if (!this.ignoreSortCache && this.view && localStorage.getItem("".concat(this.view.model.id, ".").concat(this.model.name, ".sort"))) {
|
|
30959
30973
|
this.state.sortQuery = localStorage.getItem(
|
|
30960
30974
|
"".concat(this.view.model.id, ".").concat(this.model.name, ".sort")
|
|
30961
30975
|
);
|
|
@@ -30968,7 +30982,7 @@ var MDControlController = class extends ControlController {
|
|
|
30968
30982
|
} else {
|
|
30969
30983
|
this.state.sortQuery = "";
|
|
30970
30984
|
}
|
|
30971
|
-
if (this.view) {
|
|
30985
|
+
if (!this.ignoreSortCache && this.view) {
|
|
30972
30986
|
if (this.state.sortQuery) {
|
|
30973
30987
|
localStorage.setItem(
|
|
30974
30988
|
"".concat(this.view.model.id, ".").concat(this.model.name, ".sort"),
|
|
@@ -31353,12 +31367,17 @@ var MDControlController = class extends ControlController {
|
|
|
31353
31367
|
* @param {MouseEvent} event
|
|
31354
31368
|
*/
|
|
31355
31369
|
async onRowClick(_data, event) {
|
|
31356
|
-
const
|
|
31357
|
-
|
|
31370
|
+
const isCreate = _data.srfuf === 0 /* CREATE */;
|
|
31371
|
+
const compareKey = isCreate ? "tempsrfkey" : "srfkey";
|
|
31372
|
+
const data = this.state.items.find(
|
|
31373
|
+
(item) => item[compareKey] === _data[compareKey]
|
|
31374
|
+
);
|
|
31375
|
+
if (!data)
|
|
31358
31376
|
return;
|
|
31359
|
-
}
|
|
31360
31377
|
const { selectedData } = this.state;
|
|
31361
|
-
const filterArr = selectedData.filter(
|
|
31378
|
+
const filterArr = selectedData.filter(
|
|
31379
|
+
(item) => item[compareKey] !== data[compareKey]
|
|
31380
|
+
);
|
|
31362
31381
|
if (filterArr.length === selectedData.length) {
|
|
31363
31382
|
this.setSelection(
|
|
31364
31383
|
this.state.singleSelect ? [data] : selectedData.concat([data])
|
|
@@ -31379,7 +31398,11 @@ var MDControlController = class extends ControlController {
|
|
|
31379
31398
|
* @param {IData} data 选中的单条数据
|
|
31380
31399
|
*/
|
|
31381
31400
|
async onDbRowClick(_data) {
|
|
31382
|
-
const
|
|
31401
|
+
const isCreate = _data.srfuf === 0 /* CREATE */;
|
|
31402
|
+
const compareKey = isCreate ? "tempsrfkey" : "srfkey";
|
|
31403
|
+
const data = this.state.items.find(
|
|
31404
|
+
(item) => item[compareKey] === _data[compareKey]
|
|
31405
|
+
);
|
|
31383
31406
|
if (this.state.mdctrlActiveMode === 2 && data) {
|
|
31384
31407
|
await this.setActive(data);
|
|
31385
31408
|
}
|
|
@@ -44284,7 +44307,11 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44284
44307
|
*/
|
|
44285
44308
|
async onRowClick(_data) {
|
|
44286
44309
|
var _a3;
|
|
44287
|
-
const
|
|
44310
|
+
const isCreate = _data.srfuf === 0 /* CREATE */;
|
|
44311
|
+
const compareKey = isCreate ? "tempsrfkey" : "srfkey";
|
|
44312
|
+
const data = this.state.items.find(
|
|
44313
|
+
(item) => item[compareKey] === _data[compareKey]
|
|
44314
|
+
);
|
|
44288
44315
|
if (!data)
|
|
44289
44316
|
return;
|
|
44290
44317
|
super.onRowClick(data);
|
|
@@ -53199,6 +53226,7 @@ var GridController = class extends MDControlController {
|
|
|
53199
53226
|
super.afterRemove(data);
|
|
53200
53227
|
const index = this.findRowStateIndex(data);
|
|
53201
53228
|
this.state.rows.splice(index, 1);
|
|
53229
|
+
this.rowStateIndexMap.clear();
|
|
53202
53230
|
this.state.groups.forEach((item) => {
|
|
53203
53231
|
if (item.children.length) {
|
|
53204
53232
|
const findIndex2 = item.children.findIndex(
|
|
@@ -53251,6 +53279,7 @@ var GridController = class extends MDControlController {
|
|
|
53251
53279
|
this.state.items.unshift(draftData);
|
|
53252
53280
|
const newRow = new GridRowState(draftData, this);
|
|
53253
53281
|
this.state.rows.unshift(newRow);
|
|
53282
|
+
this.rowStateIndexMap.clear();
|
|
53254
53283
|
this.gridStateNotify(newRow, "DRAFT" /* DRAFT */);
|
|
53255
53284
|
if (this.editShowMode === "row") {
|
|
53256
53285
|
this.switchRowEdit(this.state.rows[0], true);
|
|
@@ -55956,7 +55985,11 @@ var ListController = class extends MDControlController {
|
|
|
55956
55985
|
*/
|
|
55957
55986
|
async onRowClick(_data) {
|
|
55958
55987
|
var _a3;
|
|
55959
|
-
const
|
|
55988
|
+
const isCreate = _data.srfuf === 0 /* CREATE */;
|
|
55989
|
+
const compareKey = isCreate ? "tempsrfkey" : "srfkey";
|
|
55990
|
+
const data = this.state.items.find(
|
|
55991
|
+
(item) => item[compareKey] === _data[compareKey]
|
|
55992
|
+
);
|
|
55960
55993
|
if (!data)
|
|
55961
55994
|
return;
|
|
55962
55995
|
super.onRowClick(data);
|
|
@@ -76723,6 +76756,42 @@ var AIUtilService = class {
|
|
|
76723
76756
|
);
|
|
76724
76757
|
return true;
|
|
76725
76758
|
}
|
|
76759
|
+
/**
|
|
76760
|
+
* @description 拷贝会话
|
|
76761
|
+
* @param {IContext} context
|
|
76762
|
+
* @param {IParams} params
|
|
76763
|
+
* @param {string} realID
|
|
76764
|
+
* @param {IData} data
|
|
76765
|
+
* @returns {*} {Promise<IData>}
|
|
76766
|
+
* @memberof AIUtilService
|
|
76767
|
+
*/
|
|
76768
|
+
async copySession(context, params, realID, data) {
|
|
76769
|
+
var _a3;
|
|
76770
|
+
const copySessionAppDEActionId = (_a3 = this.utilParams) == null ? void 0 : _a3.copySessionAppDEActionId;
|
|
76771
|
+
if (!copySessionAppDEActionId)
|
|
76772
|
+
throw new RuntimeError68("copySessionAppDEActionId is null");
|
|
76773
|
+
if (!data || Object.keys(data).length === 0)
|
|
76774
|
+
throw new RuntimeError68("data is null");
|
|
76775
|
+
const sessionService = await this.getSessionService(context);
|
|
76776
|
+
if (!sessionService)
|
|
76777
|
+
throw new RuntimeError68("sessionService is null");
|
|
76778
|
+
const tempContext = context.clone();
|
|
76779
|
+
tempContext[this.sessionAppEntityName.toLowerCase()] = realID;
|
|
76780
|
+
const tempData = this.handleUserRequestData(data, "sessionmodelMapping");
|
|
76781
|
+
const response = await sessionService.exec(
|
|
76782
|
+
copySessionAppDEActionId,
|
|
76783
|
+
tempContext,
|
|
76784
|
+
{ ...tempData },
|
|
76785
|
+
{
|
|
76786
|
+
...params
|
|
76787
|
+
}
|
|
76788
|
+
);
|
|
76789
|
+
const result = this.handleUserResponse(
|
|
76790
|
+
response,
|
|
76791
|
+
"sessionmodelMapping"
|
|
76792
|
+
);
|
|
76793
|
+
return result;
|
|
76794
|
+
}
|
|
76726
76795
|
};
|
|
76727
76796
|
|
|
76728
76797
|
// src/service/mqtt/mqtt.service.ts
|