@ibiz-template/runtime 0.7.3 → 0.7.5
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 +228 -32
- package/dist/index.system.min.js +1 -1
- package/out/application.d.ts +19 -2
- package/out/application.d.ts.map +1 -1
- package/out/application.js +15 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +11 -7
- package/out/controller/control/grid/grid/grid.controller.d.ts +29 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +101 -1
- package/out/controller/utils/view-msg/view-msg-controller.d.ts +10 -1
- package/out/controller/utils/view-msg/view-msg-controller.d.ts.map +1 -1
- package/out/controller/utils/view-msg/view-msg-controller.js +17 -3
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +1 -4
- package/out/interface/common/i-app-service/i-app-service.d.ts +19 -2
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/controller/common/view-message/i-view-message.d.ts +8 -0
- package/out/interface/controller/common/view-message/i-view-message.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drtab.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-drtab.state.d.ts.map +1 -1
- package/out/service/service/control/control.service.js +1 -1
- package/out/service/service/index.d.ts +1 -0
- package/out/service/service/index.d.ts.map +1 -1
- package/out/service/service/index.js +1 -0
- package/out/service/service/util/util.service.d.ts +43 -0
- package/out/service/service/util/util.service.d.ts.map +1 -0
- package/out/service/service/util/util.service.js +46 -0
- package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +21 -9
- package/out/utils/nav-params/nav-params.d.ts +2 -0
- package/out/utils/nav-params/nav-params.d.ts.map +1 -1
- package/out/utils/nav-params/nav-params.js +25 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -628,17 +628,35 @@ function convertNavData(navParams, ...origins) {
|
|
|
628
628
|
return convertNavDataByArray(navParamsArr, ...origins);
|
|
629
629
|
}
|
|
630
630
|
function getVal(origins, key) {
|
|
631
|
+
const keys = key.split(".");
|
|
632
|
+
let currentVal;
|
|
631
633
|
const findOrigin = origins.find((item) => {
|
|
632
634
|
if (isNilOrEmpty(item)) {
|
|
633
635
|
return false;
|
|
634
636
|
}
|
|
637
|
+
if (keys.length > 1) {
|
|
638
|
+
currentVal = item;
|
|
639
|
+
for (let i = 0; i < keys.length; i++) {
|
|
640
|
+
const k = keys[i];
|
|
641
|
+
if (currentVal && (currentVal[k] || Object.prototype.hasOwnProperty.call(currentVal, k))) {
|
|
642
|
+
currentVal = currentVal[k];
|
|
643
|
+
} else {
|
|
644
|
+
currentVal = void 0;
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return currentVal !== void 0;
|
|
649
|
+
}
|
|
635
650
|
return (
|
|
636
651
|
// proxy数据判断是否能拿到值
|
|
637
652
|
item[key] || // 上下文等判断是否有这个属性,如果有且值为空,则赋该空值
|
|
638
653
|
Object.prototype.hasOwnProperty.call(item, key)
|
|
639
654
|
);
|
|
640
655
|
});
|
|
641
|
-
return {
|
|
656
|
+
return {
|
|
657
|
+
find: !!findOrigin,
|
|
658
|
+
value: keys.length > 1 ? currentVal : findOrigin == null ? void 0 : findOrigin[key]
|
|
659
|
+
};
|
|
642
660
|
}
|
|
643
661
|
function convertNavDataByArray(naviDatas, ...origins) {
|
|
644
662
|
const regex = /\$\{[^}]*\}/g;
|
|
@@ -9368,7 +9386,7 @@ var ControlService = class {
|
|
|
9368
9386
|
*/
|
|
9369
9387
|
async handleItemPrivilege(data, context) {
|
|
9370
9388
|
const { enableItemPrivilege, appDataEntityId } = this.model;
|
|
9371
|
-
if (enableItemPrivilege && appDataEntityId) {
|
|
9389
|
+
if (data && enableItemPrivilege && appDataEntityId) {
|
|
9372
9390
|
const deAuthority = await this.app.authority.getService(appDataEntityId);
|
|
9373
9391
|
const items = Array.isArray(data) ? data : [data];
|
|
9374
9392
|
items.forEach((item) => {
|
|
@@ -12409,6 +12427,46 @@ var MarkOpenDataService = class {
|
|
|
12409
12427
|
}
|
|
12410
12428
|
};
|
|
12411
12429
|
|
|
12430
|
+
// src/service/service/util/util.service.ts
|
|
12431
|
+
var UtilService = class {
|
|
12432
|
+
/**
|
|
12433
|
+
* Creates an instance of UtilService.
|
|
12434
|
+
* @author tony001
|
|
12435
|
+
* @date 2024-04-23 11:04:49
|
|
12436
|
+
* @param {IApplication} appModel
|
|
12437
|
+
*/
|
|
12438
|
+
constructor(appModel) {
|
|
12439
|
+
this.appModel = appModel;
|
|
12440
|
+
}
|
|
12441
|
+
/**
|
|
12442
|
+
* 加载指定数据
|
|
12443
|
+
*
|
|
12444
|
+
* @author tony001
|
|
12445
|
+
* @date 2024-04-23 11:04:22
|
|
12446
|
+
* @param {string} tag
|
|
12447
|
+
* @param {IContext} context
|
|
12448
|
+
* @param {IParams} params
|
|
12449
|
+
* @return {*} {Promise<IData>}
|
|
12450
|
+
*/
|
|
12451
|
+
async load(tag, context, params) {
|
|
12452
|
+
throw new Error("\u6682\u672A\u5B9E\u73B0");
|
|
12453
|
+
}
|
|
12454
|
+
/**
|
|
12455
|
+
* 保存指定数据
|
|
12456
|
+
*
|
|
12457
|
+
* @author tony001
|
|
12458
|
+
* @date 2024-04-23 12:04:36
|
|
12459
|
+
* @param {string} tag
|
|
12460
|
+
* @param {IContext} context
|
|
12461
|
+
* @param {IParams} params
|
|
12462
|
+
* @param {IData} data
|
|
12463
|
+
* @return {*} {Promise<IData>}
|
|
12464
|
+
*/
|
|
12465
|
+
async save(tag, context, params, data) {
|
|
12466
|
+
throw new Error("\u6682\u672A\u5B9E\u73B0");
|
|
12467
|
+
}
|
|
12468
|
+
};
|
|
12469
|
+
|
|
12412
12470
|
// src/service/vo/tree-node-data/tree-node-data.ts
|
|
12413
12471
|
import { createUUID as createUUID5 } from "qx-util";
|
|
12414
12472
|
var TreeNodeData = class {
|
|
@@ -13814,6 +13872,7 @@ var Application = class {
|
|
|
13814
13872
|
this.deService = new DEServiceUtil(model);
|
|
13815
13873
|
this.codeList = new CodeListService(model);
|
|
13816
13874
|
this.authority = new AuthorityService(model);
|
|
13875
|
+
this.utilservice = new UtilService(model);
|
|
13817
13876
|
}
|
|
13818
13877
|
/**
|
|
13819
13878
|
* 当前应用标识
|
|
@@ -13869,6 +13928,19 @@ var Application = class {
|
|
|
13869
13928
|
const item = items.find((func) => func.id === id);
|
|
13870
13929
|
return item || null;
|
|
13871
13930
|
}
|
|
13931
|
+
/**
|
|
13932
|
+
* 根据id获取应用功能组件
|
|
13933
|
+
*
|
|
13934
|
+
* @author tony001
|
|
13935
|
+
* @date 2024-04-23 11:04:27
|
|
13936
|
+
* @param {string} id
|
|
13937
|
+
* @return {*} {(IAppUtil | null)}
|
|
13938
|
+
*/
|
|
13939
|
+
getAppUtil(id) {
|
|
13940
|
+
const appUtils = this.model.appUtils || [];
|
|
13941
|
+
const appUtil = appUtils.find((item) => item.id === id);
|
|
13942
|
+
return appUtil || null;
|
|
13943
|
+
}
|
|
13872
13944
|
/**
|
|
13873
13945
|
* 获取界面行为模型
|
|
13874
13946
|
* @author lxm
|
|
@@ -15584,8 +15656,9 @@ var BaseController = class {
|
|
|
15584
15656
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
15585
15657
|
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
15586
15658
|
import { isNil as isNil21, mergeRight as mergeRight3 } from "ramda";
|
|
15659
|
+
var VIEW_MSG_PREFIX = "VIEW_MSG";
|
|
15587
15660
|
var ViewMsgController = class _ViewMsgController {
|
|
15588
|
-
constructor(msgGroupId) {
|
|
15661
|
+
constructor(msgGroupId, tag = "") {
|
|
15589
15662
|
this.msgGroupId = msgGroupId;
|
|
15590
15663
|
/**
|
|
15591
15664
|
* 视图消息map
|
|
@@ -15593,6 +15666,14 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
15593
15666
|
* @date 2023-09-22 05:38:03
|
|
15594
15667
|
*/
|
|
15595
15668
|
this.viewMsgMap = /* @__PURE__ */ new Map();
|
|
15669
|
+
/**
|
|
15670
|
+
* 视图消息tag
|
|
15671
|
+
*
|
|
15672
|
+
* @author zhanghengfeng
|
|
15673
|
+
* @date 2024-04-23 19:04:58
|
|
15674
|
+
*/
|
|
15675
|
+
this.tag = "";
|
|
15676
|
+
this.tag = "".concat(VIEW_MSG_PREFIX, "_").concat(tag);
|
|
15596
15677
|
}
|
|
15597
15678
|
/**
|
|
15598
15679
|
* 初始化方法,从全局获取视图消息组和视图消息的模型
|
|
@@ -15680,7 +15761,9 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
15680
15761
|
})
|
|
15681
15762
|
);
|
|
15682
15763
|
}
|
|
15683
|
-
return result
|
|
15764
|
+
return result.filter(
|
|
15765
|
+
(item) => !(item.removeMode === 1 && localStorage.getItem(item.key))
|
|
15766
|
+
);
|
|
15684
15767
|
}
|
|
15685
15768
|
/**
|
|
15686
15769
|
* 计算静态消息数据(或者动态的里面静态的配置)
|
|
@@ -15694,6 +15777,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
15694
15777
|
const { position: position1 } = detail;
|
|
15695
15778
|
const viewMsg = this.viewMsgMap.get(detail.appViewMsgId);
|
|
15696
15779
|
const {
|
|
15780
|
+
codeName,
|
|
15697
15781
|
title,
|
|
15698
15782
|
message,
|
|
15699
15783
|
removeMode,
|
|
@@ -15703,6 +15787,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
15703
15787
|
const { userTag, userTag2, userTag3, userTag4 } = viewMsg;
|
|
15704
15788
|
const position = position1 || position2;
|
|
15705
15789
|
return {
|
|
15790
|
+
key: "".concat(this.tag, "_").concat(codeName),
|
|
15706
15791
|
title,
|
|
15707
15792
|
message,
|
|
15708
15793
|
position,
|
|
@@ -15783,6 +15868,9 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
15783
15868
|
if (removeModeField && !isNil21(item[removeModeField])) {
|
|
15784
15869
|
message.removeMode = item[removeModeField];
|
|
15785
15870
|
}
|
|
15871
|
+
if (!isNil21(item.srfkey)) {
|
|
15872
|
+
message.key = "".concat(this.tag, "_").concat(item.srfkey);
|
|
15873
|
+
}
|
|
15786
15874
|
return mergeRight3(basicMsg, message);
|
|
15787
15875
|
});
|
|
15788
15876
|
return deViewMessages;
|
|
@@ -16106,10 +16194,13 @@ var ViewController = class extends BaseController {
|
|
|
16106
16194
|
* @date 2023-09-20 09:19:20
|
|
16107
16195
|
*/
|
|
16108
16196
|
async initViewMsg() {
|
|
16109
|
-
const { appViewMsgGroupId } = this.model;
|
|
16197
|
+
const { appViewMsgGroupId, codeName } = this.model;
|
|
16110
16198
|
if (appViewMsgGroupId) {
|
|
16111
16199
|
this.state.viewMessages = { TOP: [], BOTTOM: [], BODY: [], POPUP: [] };
|
|
16112
|
-
this.viewMsgController = new ViewMsgController(
|
|
16200
|
+
this.viewMsgController = new ViewMsgController(
|
|
16201
|
+
appViewMsgGroupId,
|
|
16202
|
+
"".concat(codeName, "_").concat(this.modal.mode)
|
|
16203
|
+
);
|
|
16113
16204
|
await this.viewMsgController.init(this.context);
|
|
16114
16205
|
const messages = await this.viewMsgController.calcViewMessages(
|
|
16115
16206
|
this.context,
|
|
@@ -16136,12 +16227,16 @@ var ViewController = class extends BaseController {
|
|
|
16136
16227
|
const [message, ...rest] = messages;
|
|
16137
16228
|
const modalParams = {
|
|
16138
16229
|
title: message.title,
|
|
16139
|
-
desc: message.message
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16230
|
+
desc: message.message,
|
|
16231
|
+
options: {
|
|
16232
|
+
showClose: message.removeMode !== 0,
|
|
16233
|
+
showConfirmButton: message.removeMode !== 0,
|
|
16234
|
+
callback: () => {
|
|
16235
|
+
if (message.removeMode === 1) {
|
|
16236
|
+
localStorage.setItem(message.key, "1");
|
|
16237
|
+
}
|
|
16238
|
+
}
|
|
16239
|
+
}
|
|
16145
16240
|
};
|
|
16146
16241
|
if (message.extraParams.userTag) {
|
|
16147
16242
|
Object.assign(modalParams, {
|
|
@@ -20573,6 +20668,9 @@ var UILogicParam = class {
|
|
|
20573
20668
|
} else if (m.appGlobalParam) {
|
|
20574
20669
|
let value = ibiz.util.getGlobalParam();
|
|
20575
20670
|
if (m.paramFieldName) {
|
|
20671
|
+
if (!value.hasOwnProperty(m.paramFieldName)) {
|
|
20672
|
+
value[m.paramFieldName] = {};
|
|
20673
|
+
}
|
|
20576
20674
|
value = value[m.paramFieldName];
|
|
20577
20675
|
}
|
|
20578
20676
|
ctx.params[tag] = value;
|
|
@@ -20593,6 +20691,9 @@ var UILogicParam = class {
|
|
|
20593
20691
|
} else if (m.routeViewSessionParam) {
|
|
20594
20692
|
let value = parameters.view.getTopView().state;
|
|
20595
20693
|
if (m.paramFieldName) {
|
|
20694
|
+
if (!value.hasOwnProperty(m.paramFieldName)) {
|
|
20695
|
+
value[m.paramFieldName] = {};
|
|
20696
|
+
}
|
|
20596
20697
|
value = value[m.paramFieldName];
|
|
20597
20698
|
}
|
|
20598
20699
|
ctx.params[tag] = value;
|
|
@@ -20605,6 +20706,9 @@ var UILogicParam = class {
|
|
|
20605
20706
|
} else if (m.viewSessionParam) {
|
|
20606
20707
|
let value = parameters.view.state;
|
|
20607
20708
|
if (m.paramFieldName) {
|
|
20709
|
+
if (!value.hasOwnProperty(m.paramFieldName)) {
|
|
20710
|
+
value[m.paramFieldName] = {};
|
|
20711
|
+
}
|
|
20608
20712
|
value = value[m.paramFieldName];
|
|
20609
20713
|
}
|
|
20610
20714
|
ctx.params[tag] = value;
|
|
@@ -27182,7 +27286,7 @@ import {
|
|
|
27182
27286
|
RuntimeError as RuntimeError56,
|
|
27183
27287
|
RuntimeModelError as RuntimeModelError63
|
|
27184
27288
|
} from "@ibiz-template/core";
|
|
27185
|
-
import { clone as clone27 } from "ramda";
|
|
27289
|
+
import { clone as clone27, isNil as isNil28 } from "ramda";
|
|
27186
27290
|
import dayjs5 from "dayjs";
|
|
27187
27291
|
|
|
27188
27292
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -27467,6 +27571,16 @@ var GridController = class extends MDControlController {
|
|
|
27467
27571
|
get allowRowEdit() {
|
|
27468
27572
|
return !!this.model.enableRowEdit && this.state.rowEditOpen;
|
|
27469
27573
|
}
|
|
27574
|
+
/**
|
|
27575
|
+
* 允许使用行编辑次序调整
|
|
27576
|
+
* @author zzq
|
|
27577
|
+
* @date 2024-04-22 17:52:07
|
|
27578
|
+
* @readonly
|
|
27579
|
+
* @type {boolean}
|
|
27580
|
+
*/
|
|
27581
|
+
get enableRowEditOrder() {
|
|
27582
|
+
return !!this.model.enableRowEditOrder;
|
|
27583
|
+
}
|
|
27470
27584
|
/**
|
|
27471
27585
|
* 单元格超出呈现模式
|
|
27472
27586
|
* @author lxm
|
|
@@ -27644,7 +27758,34 @@ var GridController = class extends MDControlController {
|
|
|
27644
27758
|
}
|
|
27645
27759
|
this.calcColumnFixed();
|
|
27646
27760
|
}
|
|
27761
|
+
/**
|
|
27762
|
+
* 本地排序items
|
|
27763
|
+
* @author zzq
|
|
27764
|
+
* @date 2024-04-22 19:30:55
|
|
27765
|
+
* @param {IData[]} items
|
|
27766
|
+
*/
|
|
27767
|
+
sortItems(items) {
|
|
27768
|
+
const sortField = this.model.orderValueAppDEFieldId;
|
|
27769
|
+
if (!sortField || !this.enableRowEditOrder) {
|
|
27770
|
+
return;
|
|
27771
|
+
}
|
|
27772
|
+
items.forEach((item) => {
|
|
27773
|
+
const sortValue = item[sortField];
|
|
27774
|
+
if (isNil28(sortValue)) {
|
|
27775
|
+
item[sortField] = 0;
|
|
27776
|
+
} else {
|
|
27777
|
+
const toNum = Number(sortValue);
|
|
27778
|
+
if (Number.isNaN(toNum)) {
|
|
27779
|
+
throw new RuntimeError56(
|
|
27780
|
+
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
27781
|
+
);
|
|
27782
|
+
}
|
|
27783
|
+
}
|
|
27784
|
+
});
|
|
27785
|
+
items.sort((a, b) => a[sortField] - b[sortField]);
|
|
27786
|
+
}
|
|
27647
27787
|
async afterLoad(args, items) {
|
|
27788
|
+
this.sortItems(this.state.items);
|
|
27648
27789
|
await super.afterLoad(args, items);
|
|
27649
27790
|
await handleAllSettled(
|
|
27650
27791
|
Object.values(this.fieldColumns).map(async (fieldColumn) => {
|
|
@@ -28523,13 +28664,70 @@ var GridController = class extends MDControlController {
|
|
|
28523
28664
|
}
|
|
28524
28665
|
super.actionNotification(tag, { ...opts || {} });
|
|
28525
28666
|
}
|
|
28667
|
+
/**
|
|
28668
|
+
* 拖拽变更事件处理回调
|
|
28669
|
+
* @author: zzq
|
|
28670
|
+
* @date 2024-04-22 18:12:58
|
|
28671
|
+
* @return {*} {Promise<void>}
|
|
28672
|
+
*/
|
|
28673
|
+
async onDragChange() {
|
|
28674
|
+
const sortField = this.model.orderValueAppDEFieldId;
|
|
28675
|
+
const getNextSort = (num) => {
|
|
28676
|
+
return num + (100 - num % 100);
|
|
28677
|
+
};
|
|
28678
|
+
const changedArr = this.state.rows.map((row) => row.data);
|
|
28679
|
+
let lastSort;
|
|
28680
|
+
const modifiedItems = [];
|
|
28681
|
+
changedArr.forEach((item) => {
|
|
28682
|
+
if (lastSort === void 0) {
|
|
28683
|
+
lastSort = item[sortField] || 100;
|
|
28684
|
+
if (!item[sortField]) {
|
|
28685
|
+
item[sortField] = lastSort;
|
|
28686
|
+
modifiedItems.push(item);
|
|
28687
|
+
}
|
|
28688
|
+
} else {
|
|
28689
|
+
if (!item[sortField] || lastSort >= item[sortField]) {
|
|
28690
|
+
item[sortField] = getNextSort(lastSort);
|
|
28691
|
+
modifiedItems.push(item);
|
|
28692
|
+
}
|
|
28693
|
+
lastSort = item[sortField];
|
|
28694
|
+
}
|
|
28695
|
+
});
|
|
28696
|
+
this.updateChangedItems(modifiedItems);
|
|
28697
|
+
}
|
|
28698
|
+
/**
|
|
28699
|
+
* 更新改变项数据
|
|
28700
|
+
* @author: zzq
|
|
28701
|
+
* @date 2024-04-22 17:12:58
|
|
28702
|
+
* @return {*} {Promise<void>}
|
|
28703
|
+
*/
|
|
28704
|
+
async updateChangedItems(changedItems) {
|
|
28705
|
+
try {
|
|
28706
|
+
await Promise.all(
|
|
28707
|
+
changedItems.map(async (item) => {
|
|
28708
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
28709
|
+
const tempContext = this.context.clone();
|
|
28710
|
+
tempContext[deName] = item.srfkey;
|
|
28711
|
+
const res = await this.service.update(tempContext, item);
|
|
28712
|
+
if (res.data) {
|
|
28713
|
+
const index = this.state.items.findIndex(
|
|
28714
|
+
(x) => x.srfkey === item.srfkey
|
|
28715
|
+
);
|
|
28716
|
+
this.state.items.splice(index, 1, res.data);
|
|
28717
|
+
}
|
|
28718
|
+
})
|
|
28719
|
+
);
|
|
28720
|
+
} finally {
|
|
28721
|
+
await this.afterLoad({}, this.state.items);
|
|
28722
|
+
}
|
|
28723
|
+
}
|
|
28526
28724
|
};
|
|
28527
28725
|
|
|
28528
28726
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
28529
28727
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
28530
28728
|
import dayjs6 from "dayjs";
|
|
28531
28729
|
import { debounce as debounce2 } from "lodash-es";
|
|
28532
|
-
import { clone as clone28, isNil as
|
|
28730
|
+
import { clone as clone28, isNil as isNil29 } from "ramda";
|
|
28533
28731
|
var GridFieldColumnController = class extends GridColumnController {
|
|
28534
28732
|
constructor() {
|
|
28535
28733
|
super(...arguments);
|
|
@@ -28741,11 +28939,11 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
28741
28939
|
*/
|
|
28742
28940
|
calcFieldAgg(items) {
|
|
28743
28941
|
const { aggField, aggMode, aggValueFormat, unitName } = this.model;
|
|
28744
|
-
if (
|
|
28942
|
+
if (isNil29(aggMode) || aggMode === "NONE") {
|
|
28745
28943
|
return;
|
|
28746
28944
|
}
|
|
28747
28945
|
const fieldName = aggField || this.model.id;
|
|
28748
|
-
items = items.filter((item) => !
|
|
28946
|
+
items = items.filter((item) => !isNil29(item[fieldName]));
|
|
28749
28947
|
let aggValue;
|
|
28750
28948
|
if (this.grid.model.aggMode === "PAGE") {
|
|
28751
28949
|
switch (aggMode) {
|
|
@@ -30706,7 +30904,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
30706
30904
|
|
|
30707
30905
|
// src/controller/control/search-bar/interface-util.ts
|
|
30708
30906
|
import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
30709
|
-
import { isNil as
|
|
30907
|
+
import { isNil as isNil30 } from "ramda";
|
|
30710
30908
|
function getOriginFilterNodes() {
|
|
30711
30909
|
return [
|
|
30712
30910
|
{
|
|
@@ -30728,7 +30926,7 @@ function validateFilterNodes(filterNodes) {
|
|
|
30728
30926
|
}
|
|
30729
30927
|
if (node.nodeType === "FIELD") {
|
|
30730
30928
|
hasFilter = true;
|
|
30731
|
-
hasError = !node.field || !node.valueOP ||
|
|
30929
|
+
hasError = !node.field || !node.valueOP || isNil30(node.value);
|
|
30732
30930
|
} else if (node.nodeType === "ITEMS") {
|
|
30733
30931
|
hasError = !node.field || !node.valueOP;
|
|
30734
30932
|
} else {
|
|
@@ -31753,7 +31951,7 @@ import {
|
|
|
31753
31951
|
RuntimeModelError as RuntimeModelError66,
|
|
31754
31952
|
recursiveIterate as recursiveIterate11
|
|
31755
31953
|
} from "@ibiz-template/core";
|
|
31756
|
-
import { isNil as
|
|
31954
|
+
import { isNil as isNil31 } from "ramda";
|
|
31757
31955
|
|
|
31758
31956
|
// src/controller/control/tree/tree.service.ts
|
|
31759
31957
|
import { ModelError as ModelError30 } from "@ibiz-template/core";
|
|
@@ -32831,7 +33029,7 @@ var TreeController = class extends MDControlController {
|
|
|
32831
33029
|
* @return {*} {void}
|
|
32832
33030
|
*/
|
|
32833
33031
|
onDEDataChange(msg) {
|
|
32834
|
-
if (!
|
|
33032
|
+
if (!isNil31(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
32835
33033
|
return;
|
|
32836
33034
|
}
|
|
32837
33035
|
if (msg.subtype === "OBJECTCREATED") {
|
|
@@ -33204,7 +33402,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
33204
33402
|
|
|
33205
33403
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
33206
33404
|
import { RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
33207
|
-
import { isNil as
|
|
33405
|
+
import { isNil as isNil32 } from "ramda";
|
|
33208
33406
|
|
|
33209
33407
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
33210
33408
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -33433,7 +33631,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
33433
33631
|
const groupMap = /* @__PURE__ */ new Map();
|
|
33434
33632
|
items.forEach((item) => {
|
|
33435
33633
|
const groupVal = item[groupAppDEFieldId];
|
|
33436
|
-
if (
|
|
33634
|
+
if (isNil32(groupVal)) {
|
|
33437
33635
|
return;
|
|
33438
33636
|
}
|
|
33439
33637
|
if (!groupMap.has(groupVal)) {
|
|
@@ -33510,7 +33708,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
33510
33708
|
|
|
33511
33709
|
// src/controller/control/kanban/kanban.controller.ts
|
|
33512
33710
|
import { RuntimeError as RuntimeError62, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
33513
|
-
import { isNil as
|
|
33711
|
+
import { isNil as isNil33 } from "ramda";
|
|
33514
33712
|
|
|
33515
33713
|
// src/controller/control/kanban/kanban.service.ts
|
|
33516
33714
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -33596,7 +33794,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
33596
33794
|
const isAsc = minorSortDir === "ASC";
|
|
33597
33795
|
items.forEach((item) => {
|
|
33598
33796
|
const sortValue = item[sortField];
|
|
33599
|
-
if (
|
|
33797
|
+
if (isNil33(sortValue)) {
|
|
33600
33798
|
item[sortField] = 0;
|
|
33601
33799
|
} else {
|
|
33602
33800
|
const toNum = Number(sortValue);
|
|
@@ -33739,7 +33937,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
33739
33937
|
const groupMap = /* @__PURE__ */ new Map();
|
|
33740
33938
|
items.forEach((item) => {
|
|
33741
33939
|
const groupVal = item[groupAppDEFieldId];
|
|
33742
|
-
if (
|
|
33940
|
+
if (isNil33(groupVal)) {
|
|
33743
33941
|
return;
|
|
33744
33942
|
}
|
|
33745
33943
|
if (!groupMap.has(groupVal)) {
|
|
@@ -36681,7 +36879,7 @@ import { QXEvent as QXEvent10 } from "qx-util";
|
|
|
36681
36879
|
// src/controller/notification/async-action.controller.ts
|
|
36682
36880
|
import { QXEvent as QXEvent8 } from "qx-util";
|
|
36683
36881
|
import { clone as clone33 } from "ramda";
|
|
36684
|
-
import { isNil as
|
|
36882
|
+
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
36685
36883
|
import dayjs8 from "dayjs";
|
|
36686
36884
|
var AsyncActionController = class {
|
|
36687
36885
|
constructor() {
|
|
@@ -36756,14 +36954,14 @@ var AsyncActionController = class {
|
|
|
36756
36954
|
data[key] = dayjs8(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
36757
36955
|
}
|
|
36758
36956
|
});
|
|
36759
|
-
if (!
|
|
36957
|
+
if (!isNil34(data.actionresult)) {
|
|
36760
36958
|
try {
|
|
36761
36959
|
const json = JSON.parse(data.actionresult);
|
|
36762
36960
|
data.actionresult = json;
|
|
36763
36961
|
} catch (error) {
|
|
36764
36962
|
}
|
|
36765
36963
|
}
|
|
36766
|
-
if (!
|
|
36964
|
+
if (!isNil34(data.completionrate)) {
|
|
36767
36965
|
const num = Number(data.completionrate);
|
|
36768
36966
|
if (Number.isNaN(num)) {
|
|
36769
36967
|
data.completionrate = void 0;
|
|
@@ -37882,10 +38080,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
37882
38080
|
* @return {*} {Promise<void>}
|
|
37883
38081
|
*/
|
|
37884
38082
|
async onXDataActive(event) {
|
|
37885
|
-
|
|
37886
|
-
if (!res.cancel) {
|
|
37887
|
-
this.refresh();
|
|
37888
|
-
}
|
|
38083
|
+
await this.openData(event);
|
|
37889
38084
|
}
|
|
37890
38085
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
37891
38086
|
async call(key, args) {
|
|
@@ -39681,6 +39876,7 @@ export {
|
|
|
39681
39876
|
UIDomainManager,
|
|
39682
39877
|
UILOGINNODE_PROVIDER_PREFIX,
|
|
39683
39878
|
UIMapField,
|
|
39879
|
+
UtilService,
|
|
39684
39880
|
V7AuthService,
|
|
39685
39881
|
VIEW_PROVIDER_PREFIX,
|
|
39686
39882
|
ValueExUtil,
|