@ibiz-template/runtime 0.5.7-alpha.8 → 0.5.7-alpha.9
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 +156 -31
- package/dist/index.system.min.js +1 -1
- package/out/application.d.ts.map +1 -1
- package/out/application.js +0 -1
- package/out/command/app/open-app-view/open-app-view.d.ts +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +4 -3
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +4 -3
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +27 -3
- package/out/hub/config/app-view-config-service.d.ts +14 -0
- package/out/hub/config/app-view-config-service.d.ts.map +1 -1
- package/out/hub/config/app-view-config-service.js +27 -11
- package/out/interface/common/i-app-view-config-service/i-app-view-config-service.d.ts +4 -0
- package/out/interface/common/i-app-view-config-service/i-app-view-config-service.d.ts.map +1 -1
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts +9 -0
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
- package/out/interface/service/service/i-mark-open-data.service.d.ts +20 -1
- package/out/interface/service/service/i-mark-open-data.service.d.ts.map +1 -1
- package/out/interface/service/service/index.d.ts +1 -1
- package/out/interface/service/service/index.d.ts.map +1 -1
- package/out/service/service/mark-open-data/mark-open-data.service.d.ts +26 -1
- package/out/service/service/mark-open-data/mark-open-data.service.d.ts.map +1 -1
- package/out/service/service/mark-open-data/mark-open-data.service.js +45 -0
- package/out/service/utils/dyna-sys-params/dyna-sys-params.d.ts +1 -1
- package/out/service/utils/dyna-sys-params/dyna-sys-params.js +4 -4
- package/out/ui-action/provider/front-ui-action-provider.d.ts +10 -0
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +25 -1
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +11 -1
- package/package.json +3 -3
- package/src/application.ts +0 -2
- package/src/command/app/open-app-view/open-app-view.ts +6 -3
- package/src/controller/control/grid/grid/grid.controller.ts +4 -5
- package/src/controller/control/search-bar/search-bar.controller.ts +44 -3
- package/src/hub/config/app-view-config-service.ts +29 -0
- package/src/interface/common/i-app-view-config-service/i-app-view-config-service.ts +4 -0
- package/src/interface/common/i-open-view-options/i-open-view-options.ts +10 -0
- package/src/interface/controller/state/control/i-search-bar.state.ts +8 -0
- package/src/interface/service/service/i-mark-open-data.service.ts +31 -1
- package/src/interface/service/service/index.ts +1 -0
- package/src/service/service/mark-open-data/mark-open-data.service.ts +61 -1
- package/src/service/utils/dyna-sys-params/dyna-sys-params.ts +6 -6
- package/src/ui-action/provider/front-ui-action-provider.ts +25 -1
- package/src/utils/open-redirect-view/open-redirect-view.ts +10 -1
package/dist/index.esm.js
CHANGED
|
@@ -1243,6 +1243,15 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
|
|
|
1243
1243
|
if (rdTag.startsWith("view://")) {
|
|
1244
1244
|
const url = new URL(rdTag);
|
|
1245
1245
|
if (url.searchParams.size > 0) {
|
|
1246
|
+
const navCtx = url.searchParams.get("srfnavctx");
|
|
1247
|
+
if (navCtx) {
|
|
1248
|
+
try {
|
|
1249
|
+
Object.assign(context, JSON.parse(navCtx));
|
|
1250
|
+
} catch (error) {
|
|
1251
|
+
ibiz.log.error("\u91CD\u5B9A\u5411[".concat(rdTag, "] \u4E2D srfnavctx \u53C2\u6570\u89E3\u6790\u5931\u8D25"), error);
|
|
1252
|
+
}
|
|
1253
|
+
url.searchParams.delete("srfnavctx");
|
|
1254
|
+
}
|
|
1246
1255
|
url.searchParams.forEach((value, _key) => {
|
|
1247
1256
|
params[_key] = value;
|
|
1248
1257
|
});
|
|
@@ -7216,15 +7225,15 @@ async function calcDynaSysParams(appDataEntityId, context, opts = {}) {
|
|
|
7216
7225
|
loadModelParams.srfkey = srfkey;
|
|
7217
7226
|
}
|
|
7218
7227
|
}
|
|
7219
|
-
if (viewParams.srfparentkey && viewParams.
|
|
7228
|
+
if (viewParams.srfparentkey && viewParams.srfparentdename) {
|
|
7220
7229
|
loadModelParams.srfparentkey = viewParams.srfparentkey;
|
|
7221
|
-
loadModelParams.
|
|
7230
|
+
loadModelParams.srfparentdename = viewParams.srfparentdename;
|
|
7222
7231
|
} else {
|
|
7223
7232
|
const match = getMatchResPath(context, appDe);
|
|
7224
7233
|
if (match && match.keys.length > 1) {
|
|
7225
7234
|
const parentDeKey = match.keys[match.keys.length - 2];
|
|
7226
7235
|
loadModelParams.srfparentkey = viewParams.srfparentkey || context[parentDeKey];
|
|
7227
|
-
loadModelParams.
|
|
7236
|
+
loadModelParams.srfparentdename = viewParams.srfparentdename || parentDeKey;
|
|
7228
7237
|
}
|
|
7229
7238
|
}
|
|
7230
7239
|
return loadModelParams;
|
|
@@ -11433,12 +11442,26 @@ var InternalMessageService = class {
|
|
|
11433
11442
|
// src/service/service/mark-open-data/mark-open-data.service.ts
|
|
11434
11443
|
var MarkOpenDataService = class {
|
|
11435
11444
|
constructor() {
|
|
11445
|
+
/**
|
|
11446
|
+
* 回调集合
|
|
11447
|
+
* @author lxm
|
|
11448
|
+
* @date 2024-02-01 04:41:45
|
|
11449
|
+
*/
|
|
11450
|
+
this.callbackMap = /* @__PURE__ */ new Map();
|
|
11436
11451
|
/**
|
|
11437
11452
|
* 基础路径
|
|
11438
11453
|
* @author lxm
|
|
11439
11454
|
* @date 2024-01-23 02:06:47
|
|
11440
11455
|
*/
|
|
11441
11456
|
this.baseUrl = "/portal/markopendata";
|
|
11457
|
+
ibiz.mc.command.markOpenData.on((msg) => {
|
|
11458
|
+
const data = msg.data;
|
|
11459
|
+
const { entity, key } = data;
|
|
11460
|
+
const tag = "".concat(entity, "_").concat(key);
|
|
11461
|
+
if (this.callbackMap.has(tag)) {
|
|
11462
|
+
this.callbackMap.get(tag).forEach((cb) => cb(data));
|
|
11463
|
+
}
|
|
11464
|
+
});
|
|
11442
11465
|
}
|
|
11443
11466
|
async action(deName, key, action) {
|
|
11444
11467
|
const res = await ibiz.net.get(
|
|
@@ -11446,6 +11469,37 @@ var MarkOpenDataService = class {
|
|
|
11446
11469
|
);
|
|
11447
11470
|
return res;
|
|
11448
11471
|
}
|
|
11472
|
+
/**
|
|
11473
|
+
* 监听指定实体指定主键的消息
|
|
11474
|
+
* @author lxm
|
|
11475
|
+
* @date 2024-02-01 04:45:31
|
|
11476
|
+
* @param {string} deName
|
|
11477
|
+
* @param {string} key
|
|
11478
|
+
* @param {MarkOpenDataCallbackFun} callback
|
|
11479
|
+
*/
|
|
11480
|
+
subscribe(deName, key, callback) {
|
|
11481
|
+
const tag = "".concat(deName, "_").concat(key);
|
|
11482
|
+
const callbacks = this.callbackMap.get(tag) || [];
|
|
11483
|
+
callbacks.push(callback);
|
|
11484
|
+
this.callbackMap.set(tag, callbacks);
|
|
11485
|
+
}
|
|
11486
|
+
/**
|
|
11487
|
+
* 取消监听指定实体指定主键的消息
|
|
11488
|
+
* @author lxm
|
|
11489
|
+
* @date 2024-02-01 04:48:19
|
|
11490
|
+
* @param {string} deName
|
|
11491
|
+
* @param {string} key
|
|
11492
|
+
* @param {MarkOpenDataCallbackFun} callback
|
|
11493
|
+
*/
|
|
11494
|
+
unsubscribe(deName, key, callback) {
|
|
11495
|
+
const tag = "".concat(deName, "_").concat(key);
|
|
11496
|
+
const callbacks = this.callbackMap.get(tag) || [];
|
|
11497
|
+
const index = callbacks.indexOf(callback);
|
|
11498
|
+
if (index > -1) {
|
|
11499
|
+
callbacks.splice(index, 1);
|
|
11500
|
+
this.callbackMap.set(tag, callbacks);
|
|
11501
|
+
}
|
|
11502
|
+
}
|
|
11449
11503
|
};
|
|
11450
11504
|
|
|
11451
11505
|
// src/service/vo/tree-node-data/tree-node-data.ts
|
|
@@ -12530,7 +12584,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
12530
12584
|
case "POPUPAPP":
|
|
12531
12585
|
throw new ModelError15(appView, "\u672A\u652F\u6301\u7684\u89C6\u56FE\u6253\u5F00\u6A21\u5F0F: POPUPAPP");
|
|
12532
12586
|
case "POPOVER":
|
|
12533
|
-
return this.openPopover(appView,
|
|
12587
|
+
return this.openPopover(appView, context, params, opts);
|
|
12534
12588
|
case "DRAWER_LEFT":
|
|
12535
12589
|
case "DRAWER_RIGHT":
|
|
12536
12590
|
case "DRAWER_TOP":
|
|
@@ -12594,11 +12648,14 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
12594
12648
|
* @param {IParams} [params={}]
|
|
12595
12649
|
* @return {*} {Promise<IModalData>}
|
|
12596
12650
|
*/
|
|
12597
|
-
async openPopover(appView,
|
|
12651
|
+
async openPopover(appView, context, params = {}, opts = {}) {
|
|
12652
|
+
const { event, modalOption } = opts;
|
|
12598
12653
|
if (!event) {
|
|
12599
12654
|
throw new RuntimeError25("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
|
|
12600
12655
|
}
|
|
12601
|
-
return ibiz.openView.popover(appView.id, event, context, params
|
|
12656
|
+
return ibiz.openView.popover(appView.id, event, context, params, {
|
|
12657
|
+
...modalOption
|
|
12658
|
+
});
|
|
12602
12659
|
}
|
|
12603
12660
|
/**
|
|
12604
12661
|
* 抽屉模式打开
|
|
@@ -12937,7 +12994,6 @@ var Application = class {
|
|
|
12937
12994
|
this.model.appId
|
|
12938
12995
|
);
|
|
12939
12996
|
this.mqtt.evt.on("message", (message) => {
|
|
12940
|
-
console.log("message", message);
|
|
12941
12997
|
ibiz.mc.command.next(message);
|
|
12942
12998
|
});
|
|
12943
12999
|
await this.mqtt.connect();
|
|
@@ -13003,6 +13059,32 @@ var AppViewConfigService = class {
|
|
|
13003
13059
|
}
|
|
13004
13060
|
return id;
|
|
13005
13061
|
}
|
|
13062
|
+
/**
|
|
13063
|
+
* 获取视图自定义Option
|
|
13064
|
+
*
|
|
13065
|
+
* @author zk
|
|
13066
|
+
* @date 2024-01-31 11:01:20
|
|
13067
|
+
* @protected
|
|
13068
|
+
* @param {IAppView} model
|
|
13069
|
+
* @return {*} {IData}
|
|
13070
|
+
* @memberof AppViewConfigService
|
|
13071
|
+
*/
|
|
13072
|
+
getCustomOption(model) {
|
|
13073
|
+
var _a;
|
|
13074
|
+
const { appViewParams } = model;
|
|
13075
|
+
const optionProperty = (_a = appViewParams == null ? void 0 : appViewParams.find(
|
|
13076
|
+
(item) => item.id === "modaloption"
|
|
13077
|
+
)) == null ? void 0 : _a.value;
|
|
13078
|
+
let modalOption = {};
|
|
13079
|
+
if (optionProperty) {
|
|
13080
|
+
try {
|
|
13081
|
+
modalOption = JSON.parse(optionProperty);
|
|
13082
|
+
} catch (error) {
|
|
13083
|
+
ibiz.log.error("\u89C6\u56FE\u53C2\u6570modalOption \u89E3\u6790\u5931\u8D25\uFF1A".concat(error));
|
|
13084
|
+
}
|
|
13085
|
+
}
|
|
13086
|
+
return { modalOption };
|
|
13087
|
+
}
|
|
13006
13088
|
has(key) {
|
|
13007
13089
|
const id = this.calcAppViewId(key);
|
|
13008
13090
|
return this.viewConfigs.has(id);
|
|
@@ -13027,7 +13109,8 @@ var AppViewConfigService = class {
|
|
|
13027
13109
|
width: model.width,
|
|
13028
13110
|
height: model.height,
|
|
13029
13111
|
appDataEntityId: model.appDataEntityId,
|
|
13030
|
-
redirectView: model.redirectView
|
|
13112
|
+
redirectView: model.redirectView,
|
|
13113
|
+
...this.getCustomOption(model)
|
|
13031
13114
|
});
|
|
13032
13115
|
}
|
|
13033
13116
|
return this.viewConfigs.get(id);
|
|
@@ -19428,12 +19511,13 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19428
19511
|
data,
|
|
19429
19512
|
params
|
|
19430
19513
|
);
|
|
19514
|
+
const options = this.handleViewOptionParams(resultParams);
|
|
19431
19515
|
const res = await ibiz.commands.execute(
|
|
19432
19516
|
OpenAppViewCommand.TAG,
|
|
19433
19517
|
frontPSAppView,
|
|
19434
19518
|
resultContext,
|
|
19435
19519
|
resultParams,
|
|
19436
|
-
{ event, noWaitRoute }
|
|
19520
|
+
{ event, noWaitRoute, ...options }
|
|
19437
19521
|
);
|
|
19438
19522
|
if (!(res == null ? void 0 : res.ok)) {
|
|
19439
19523
|
actionResult.cancel = true;
|
|
@@ -19465,6 +19549,27 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19465
19549
|
}
|
|
19466
19550
|
return actionResult;
|
|
19467
19551
|
}
|
|
19552
|
+
/**
|
|
19553
|
+
* 处理打开视图配置自定义参数 modalOption
|
|
19554
|
+
*
|
|
19555
|
+
* @author zk
|
|
19556
|
+
* @date 2024-02-01 01:02:28
|
|
19557
|
+
* @param {IData} param
|
|
19558
|
+
* @return {*} {IData}
|
|
19559
|
+
* @memberof FrontUIActionProvider
|
|
19560
|
+
*/
|
|
19561
|
+
handleViewOptionParams(param) {
|
|
19562
|
+
if (param.modaloption) {
|
|
19563
|
+
try {
|
|
19564
|
+
const modalOption = JSON.parse(param.modaloption);
|
|
19565
|
+
delete param.modaloption;
|
|
19566
|
+
return { modalOption };
|
|
19567
|
+
} catch (error) {
|
|
19568
|
+
ibiz.log.error("\u89C6\u56FE\u53C2\u6570modalOption \u89E3\u6790\u5931\u8D25\uFF1A".concat(error));
|
|
19569
|
+
}
|
|
19570
|
+
}
|
|
19571
|
+
return {};
|
|
19572
|
+
}
|
|
19468
19573
|
/**
|
|
19469
19574
|
* 处理模式:用户自定义
|
|
19470
19575
|
* @author lxm
|
|
@@ -25862,10 +25967,9 @@ var GridController = class extends MDControlController {
|
|
|
25862
25967
|
var _a2;
|
|
25863
25968
|
const type = (_a2 = _args.params) == null ? void 0 : _a2.type;
|
|
25864
25969
|
let data2 = [];
|
|
25865
|
-
if (type === "activatedPage") {
|
|
25970
|
+
if (!type || type === "activatedPage") {
|
|
25866
25971
|
data2 = this.state.rows.map((row) => row.data);
|
|
25867
|
-
}
|
|
25868
|
-
if (type === "maxRowCount" || type === "customPage") {
|
|
25972
|
+
} else if (type === "maxRowCount" || type === "customPage") {
|
|
25869
25973
|
const { size } = this.state;
|
|
25870
25974
|
const { startPage, endPage } = _args.params;
|
|
25871
25975
|
const params = type === "customPage" ? {
|
|
@@ -25874,8 +25978,7 @@ var GridController = class extends MDControlController {
|
|
|
25874
25978
|
size: (endPage - startPage + 1) * size
|
|
25875
25979
|
} : { size: 1e3, page: 0 };
|
|
25876
25980
|
data2 = await this.loadData({ viewParam: params });
|
|
25877
|
-
}
|
|
25878
|
-
if (type === "selectedRows") {
|
|
25981
|
+
} else if (type === "selectedRows") {
|
|
25879
25982
|
data2 = this.getData();
|
|
25880
25983
|
}
|
|
25881
25984
|
if (data2.length === 0) {
|
|
@@ -27602,8 +27705,9 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
27602
27705
|
};
|
|
27603
27706
|
|
|
27604
27707
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
27605
|
-
import { mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
27606
|
-
import { clone as clone28 } from "ramda";
|
|
27708
|
+
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
27709
|
+
import { clone as clone28, isNil as isNil26 } from "ramda";
|
|
27710
|
+
import { isString as isString2 } from "lodash-es";
|
|
27607
27711
|
|
|
27608
27712
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
27609
27713
|
import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
@@ -28064,6 +28168,7 @@ function calcSearchConds(filterNodes) {
|
|
|
28064
28168
|
}
|
|
28065
28169
|
|
|
28066
28170
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
28171
|
+
var ScriptValueRegex = /\$\{[^}]*\}/;
|
|
28067
28172
|
var SearchBarController = class extends ControlController {
|
|
28068
28173
|
constructor() {
|
|
28069
28174
|
super(...arguments);
|
|
@@ -28134,7 +28239,7 @@ var SearchBarController = class extends ControlController {
|
|
|
28134
28239
|
* @Date: 2023-12-22 13:50:16
|
|
28135
28240
|
*/
|
|
28136
28241
|
get grid() {
|
|
28137
|
-
return this.ctx.getController("grid");
|
|
28242
|
+
return this.ctx.getController("grid") || this.ctx.getController("treegrid");
|
|
28138
28243
|
}
|
|
28139
28244
|
initState() {
|
|
28140
28245
|
super.initState();
|
|
@@ -28328,6 +28433,19 @@ var SearchBarController = class extends ControlController {
|
|
|
28328
28433
|
return;
|
|
28329
28434
|
}
|
|
28330
28435
|
const searchconds = calcSearchConds(this.state.filterNodes);
|
|
28436
|
+
if (searchconds) {
|
|
28437
|
+
recursiveIterate10(
|
|
28438
|
+
searchconds[0],
|
|
28439
|
+
(node) => {
|
|
28440
|
+
if (node.condtype === "DEFIELD" && !isNil26(node.value) && ScriptValueRegex.test(node.value)) {
|
|
28441
|
+
node.value = ScriptFactory.execSingleLine("`".concat(node.value, "`"), {
|
|
28442
|
+
...this.getEventArgs()
|
|
28443
|
+
});
|
|
28444
|
+
}
|
|
28445
|
+
},
|
|
28446
|
+
{ childrenFields: ["searchconds"] }
|
|
28447
|
+
);
|
|
28448
|
+
}
|
|
28331
28449
|
return searchconds;
|
|
28332
28450
|
}
|
|
28333
28451
|
/**
|
|
@@ -28497,6 +28615,13 @@ var SearchBarController = class extends ControlController {
|
|
|
28497
28615
|
} else {
|
|
28498
28616
|
this.state.filterNodes = getOriginFilterNodes();
|
|
28499
28617
|
}
|
|
28618
|
+
recursiveIterate10(this.state.filterNodes[0], (node) => {
|
|
28619
|
+
if (node.leaf) {
|
|
28620
|
+
if (node.field && node.valueOP && isString2(node.value) && ScriptValueRegex.test(node.value)) {
|
|
28621
|
+
node.disabled = true;
|
|
28622
|
+
}
|
|
28623
|
+
}
|
|
28624
|
+
});
|
|
28500
28625
|
if (this.grid && groupItem && groupItem.searchGroupData) {
|
|
28501
28626
|
this.grid.setGroupParams(groupItem.searchGroupData);
|
|
28502
28627
|
await this.grid.load({ isInitialLoad: true });
|
|
@@ -28744,7 +28869,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
28744
28869
|
import {
|
|
28745
28870
|
RuntimeError as RuntimeError59,
|
|
28746
28871
|
RuntimeModelError as RuntimeModelError64,
|
|
28747
|
-
recursiveIterate as
|
|
28872
|
+
recursiveIterate as recursiveIterate11
|
|
28748
28873
|
} from "@ibiz-template/core";
|
|
28749
28874
|
|
|
28750
28875
|
// src/controller/control/tree/tree.service.ts
|
|
@@ -29203,7 +29328,7 @@ var TreeController = class extends MDControlController {
|
|
|
29203
29328
|
if ((_a2 = contextMenu == null ? void 0 : contextMenu.detoolbarItems) == null ? void 0 : _a2.length) {
|
|
29204
29329
|
let itemNum = 0;
|
|
29205
29330
|
const items = [];
|
|
29206
|
-
|
|
29331
|
+
recursiveIterate11(
|
|
29207
29332
|
contextMenu,
|
|
29208
29333
|
(item) => {
|
|
29209
29334
|
if (item.itemType === "DEUIACTION") {
|
|
@@ -29295,7 +29420,7 @@ var TreeController = class extends MDControlController {
|
|
|
29295
29420
|
*/
|
|
29296
29421
|
async afterLoadNodes(nodes) {
|
|
29297
29422
|
this.state.items = [];
|
|
29298
|
-
|
|
29423
|
+
recursiveIterate11(
|
|
29299
29424
|
{ _children: this.state.rootNodes },
|
|
29300
29425
|
(node) => {
|
|
29301
29426
|
this.state.items.push(node);
|
|
@@ -29479,7 +29604,7 @@ var TreeController = class extends MDControlController {
|
|
|
29479
29604
|
*/
|
|
29480
29605
|
calcExpandedKeys(nodes) {
|
|
29481
29606
|
let expandedKeys = [...this.state.expandedKeys];
|
|
29482
|
-
|
|
29607
|
+
recursiveIterate11(
|
|
29483
29608
|
{ _children: nodes },
|
|
29484
29609
|
(node) => {
|
|
29485
29610
|
var _a;
|
|
@@ -30097,7 +30222,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
30097
30222
|
|
|
30098
30223
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
30099
30224
|
import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
30100
|
-
import { isNil as
|
|
30225
|
+
import { isNil as isNil27 } from "ramda";
|
|
30101
30226
|
|
|
30102
30227
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
30103
30228
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -30324,7 +30449,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30324
30449
|
const groupMap = /* @__PURE__ */ new Map();
|
|
30325
30450
|
items.forEach((item) => {
|
|
30326
30451
|
const groupVal = item[groupAppDEFieldId];
|
|
30327
|
-
if (
|
|
30452
|
+
if (isNil27(groupVal)) {
|
|
30328
30453
|
return;
|
|
30329
30454
|
}
|
|
30330
30455
|
if (!groupMap.has(groupVal)) {
|
|
@@ -30401,7 +30526,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30401
30526
|
|
|
30402
30527
|
// src/controller/control/kanban/kanban.controller.ts
|
|
30403
30528
|
import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
30404
|
-
import { isNil as
|
|
30529
|
+
import { isNil as isNil28 } from "ramda";
|
|
30405
30530
|
|
|
30406
30531
|
// src/controller/control/kanban/kanban.service.ts
|
|
30407
30532
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -30486,7 +30611,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30486
30611
|
const isAsc = minorSortDir === "ASC";
|
|
30487
30612
|
items.forEach((item) => {
|
|
30488
30613
|
const sortValue = item[sortField];
|
|
30489
|
-
if (
|
|
30614
|
+
if (isNil28(sortValue)) {
|
|
30490
30615
|
item[sortField] = 0;
|
|
30491
30616
|
} else {
|
|
30492
30617
|
const toNum = Number(sortValue);
|
|
@@ -30593,7 +30718,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30593
30718
|
const groupMap = /* @__PURE__ */ new Map();
|
|
30594
30719
|
items.forEach((item) => {
|
|
30595
30720
|
const groupVal = item[groupAppDEFieldId];
|
|
30596
|
-
if (
|
|
30721
|
+
if (isNil28(groupVal)) {
|
|
30597
30722
|
return;
|
|
30598
30723
|
}
|
|
30599
30724
|
if (!groupMap.has(groupVal)) {
|
|
@@ -30923,7 +31048,7 @@ import {
|
|
|
30923
31048
|
RuntimeError as RuntimeError62,
|
|
30924
31049
|
RuntimeModelError as RuntimeModelError67,
|
|
30925
31050
|
awaitTimeout as awaitTimeout3,
|
|
30926
|
-
recursiveIterate as
|
|
31051
|
+
recursiveIterate as recursiveIterate12
|
|
30927
31052
|
} from "@ibiz-template/core";
|
|
30928
31053
|
import { clone as clone29 } from "ramda";
|
|
30929
31054
|
|
|
@@ -31145,7 +31270,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
31145
31270
|
}
|
|
31146
31271
|
async afterLoadNodes(nodes) {
|
|
31147
31272
|
await super.afterLoadNodes(nodes);
|
|
31148
|
-
|
|
31273
|
+
recursiveIterate12(
|
|
31149
31274
|
{ _children: nodes },
|
|
31150
31275
|
(node) => {
|
|
31151
31276
|
this.state.rows[node._uuid] = new TreeGridExRowState(node, this);
|
|
@@ -33204,7 +33329,7 @@ var HubController = class {
|
|
|
33204
33329
|
// src/controller/notification/async-action.controller.ts
|
|
33205
33330
|
import { QXEvent as QXEvent7 } from "qx-util";
|
|
33206
33331
|
import { clone as clone31 } from "ramda";
|
|
33207
|
-
import { isNil as
|
|
33332
|
+
import { isNil as isNil29, isNumber as isNumber2 } from "lodash-es";
|
|
33208
33333
|
import dayjs7 from "dayjs";
|
|
33209
33334
|
var AsyncActionController = class {
|
|
33210
33335
|
constructor() {
|
|
@@ -33279,14 +33404,14 @@ var AsyncActionController = class {
|
|
|
33279
33404
|
data[key] = dayjs7(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
33280
33405
|
}
|
|
33281
33406
|
});
|
|
33282
|
-
if (!
|
|
33407
|
+
if (!isNil29(data.actionresult)) {
|
|
33283
33408
|
try {
|
|
33284
33409
|
const json = JSON.parse(data.actionresult);
|
|
33285
33410
|
data.actionresult = json;
|
|
33286
33411
|
} catch (error) {
|
|
33287
33412
|
}
|
|
33288
33413
|
}
|
|
33289
|
-
if (!
|
|
33414
|
+
if (!isNil29(data.completionrate)) {
|
|
33290
33415
|
const num = Number(data.completionrate);
|
|
33291
33416
|
if (Number.isNaN(num)) {
|
|
33292
33417
|
data.completionrate = void 0;
|