@ibiz-template/runtime 0.6.0-alpha.2 → 0.6.0-alpha.4
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 +207 -156
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +12 -0
- package/out/controller/control/caption-bar/caption-bar.controller.d.ts.map +1 -1
- package/out/controller/control/caption-bar/caption-bar.controller.js +3 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +9 -0
- package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.controller.js +5 -0
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +6 -1
- package/out/controller/control/tree/tree.controller.js +2 -2
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.js +1 -7
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +1 -8
- package/out/controller/utils/button-state/button-container.state.d.ts +1 -0
- package/out/controller/utils/button-state/button-container.state.d.ts.map +1 -1
- package/out/controller/utils/button-state/button-container.state.js +5 -0
- package/out/controller/utils/button-state/ui-action-button.state.d.ts +1 -1
- package/out/controller/utils/button-state/ui-action-button.state.d.ts.map +1 -1
- package/out/controller/utils/button-state/ui-action-button.state.js +4 -0
- package/out/engine/view-base.engine.d.ts +8 -0
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +11 -0
- package/out/interface/controller/common/button-state/i-button-container.state.d.ts +7 -0
- package/out/interface/controller/common/button-state/i-button-container.state.d.ts.map +1 -1
- package/out/interface/controller/common/button-state/i-button.state.d.ts +7 -0
- package/out/interface/controller/common/button-state/i-button.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-grid.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-toolbar.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-toolbar.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +1 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +1 -0
- package/out/ui-action/provider/backend-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/backend-ui-action-provider.js +3 -1
- package/out/ui-action/provider/front-ui-action-provider.d.ts +0 -10
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +0 -22
- package/out/ui-action/provider/ui-action-provider-base.d.ts +10 -0
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +22 -0
- package/out/utils/index.d.ts +1 -1
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -1
- package/out/utils/nav-params/nav-params.js +2 -2
- package/out/utils/open-redirect-view/open-redirect-view.d.ts +17 -0
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +51 -25
- package/package.json +9 -6
- package/src/controller/common/editor/editor.controller.ts +12 -0
- package/src/controller/control/caption-bar/caption-bar.controller.ts +3 -0
- package/src/controller/control/grid/grid/grid.controller.ts +9 -0
- package/src/controller/control/panel/panel/panel-item.controller.ts +6 -0
- package/src/controller/control/toolbar/toolbar.controllerr.ts +6 -1
- package/src/controller/control/tree/tree.controller.ts +2 -2
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts +1 -11
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +1 -12
- package/src/controller/utils/button-state/button-container.state.ts +8 -0
- package/src/controller/utils/button-state/ui-action-button.state.ts +6 -1
- package/src/engine/view-base.engine.ts +12 -0
- package/src/interface/controller/common/button-state/i-button-container.state.ts +8 -0
- package/src/interface/controller/common/button-state/i-button.state.ts +8 -0
- package/src/interface/controller/state/control/i-grid.state.ts +8 -0
- package/src/interface/controller/state/control/i-toolbar.state.ts +8 -0
- package/src/interface/controller/state/control/i-tree.state.ts +8 -0
- package/src/service/vo/tree-node-data/tree-node-data.ts +3 -0
- package/src/ui-action/provider/backend-ui-action-provider.ts +3 -1
- package/src/ui-action/provider/front-ui-action-provider.ts +0 -22
- package/src/ui-action/provider/ui-action-provider-base.ts +22 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/nav-params/nav-params.ts +2 -2
- package/src/utils/open-redirect-view/open-redirect-view.ts +55 -23
package/dist/index.esm.js
CHANGED
|
@@ -595,7 +595,7 @@ var HandlebarsUtil = class {
|
|
|
595
595
|
};
|
|
596
596
|
|
|
597
597
|
// src/utils/nav-params/nav-params.ts
|
|
598
|
-
import { isEmpty } from "lodash-es";
|
|
598
|
+
import { isEmpty, isNil } from "lodash-es";
|
|
599
599
|
import { isNilOrEmpty, notNilEmpty } from "qx-util";
|
|
600
600
|
function convertObjectToNavParams(navParams) {
|
|
601
601
|
const result = [];
|
|
@@ -650,7 +650,7 @@ function convertNavDataByArray(naviDatas, ...origins) {
|
|
|
650
650
|
key.slice(2, -1).toLowerCase()
|
|
651
651
|
);
|
|
652
652
|
if (find) {
|
|
653
|
-
valueStr = valueStr.replace(key, "".concat(value));
|
|
653
|
+
valueStr = valueStr.replace(key, "".concat(isNil(value) ? "" : value));
|
|
654
654
|
}
|
|
655
655
|
});
|
|
656
656
|
result[naviData.key.toLowerCase()] = valueStr;
|
|
@@ -1136,6 +1136,38 @@ function getUIActionItemsByActionLevel(toolbar, actionLevel) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
|
|
1138
1138
|
// src/utils/open-redirect-view/open-redirect-view.ts
|
|
1139
|
+
function parseViewProtocol(urlStr) {
|
|
1140
|
+
const url = new URL(urlStr);
|
|
1141
|
+
const context = {};
|
|
1142
|
+
const params = {};
|
|
1143
|
+
let viewId = "";
|
|
1144
|
+
if (url.searchParams.size > 0) {
|
|
1145
|
+
const navCtx = url.searchParams.get("srfnavctx");
|
|
1146
|
+
if (navCtx) {
|
|
1147
|
+
try {
|
|
1148
|
+
Object.assign(context, JSON.parse(navCtx));
|
|
1149
|
+
} catch (error) {
|
|
1150
|
+
ibiz.log.error("\u91CD\u5B9A\u5411[".concat(urlStr, "] \u4E2D srfnavctx \u53C2\u6570\u89E3\u6790\u5931\u8D25"), error);
|
|
1151
|
+
}
|
|
1152
|
+
url.searchParams.delete("srfnavctx");
|
|
1153
|
+
}
|
|
1154
|
+
url.searchParams.forEach((value, _key) => {
|
|
1155
|
+
params[_key] = value;
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
const rdTagItems = url.pathname.replace("//", "").split("/");
|
|
1159
|
+
const [appOrViewTag, viewTag] = rdTagItems;
|
|
1160
|
+
if (viewTag) {
|
|
1161
|
+
viewId = viewTag;
|
|
1162
|
+
} else {
|
|
1163
|
+
viewId = appOrViewTag;
|
|
1164
|
+
}
|
|
1165
|
+
return {
|
|
1166
|
+
context,
|
|
1167
|
+
params,
|
|
1168
|
+
viewId
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1139
1171
|
async function openRedirectView(appView, context, params = {}, opts = {}) {
|
|
1140
1172
|
return openDERedirectView(
|
|
1141
1173
|
appView,
|
|
@@ -1241,28 +1273,10 @@ async function getDERedirectToView(appView, context, params = {}, opts = {}) {
|
|
|
1241
1273
|
const rdTag = await calcDERdTag(entity, appView, params, curData);
|
|
1242
1274
|
let viewId = "";
|
|
1243
1275
|
if (rdTag.startsWith("view://")) {
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
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
|
-
}
|
|
1255
|
-
url.searchParams.forEach((value, _key) => {
|
|
1256
|
-
params[_key] = value;
|
|
1257
|
-
});
|
|
1258
|
-
}
|
|
1259
|
-
const rdTagItems = url.pathname.replace("//", "").split("/");
|
|
1260
|
-
const [appOrViewTag, viewTag] = rdTagItems;
|
|
1261
|
-
if (viewTag) {
|
|
1262
|
-
viewId = viewTag;
|
|
1263
|
-
} else {
|
|
1264
|
-
viewId = appOrViewTag;
|
|
1265
|
-
}
|
|
1276
|
+
const result = parseViewProtocol(rdTag);
|
|
1277
|
+
Object.assign(context, result.context);
|
|
1278
|
+
Object.assign(params, result.params);
|
|
1279
|
+
viewId = result.viewId;
|
|
1266
1280
|
} else {
|
|
1267
1281
|
const rdTagItems = rdTag.split(":");
|
|
1268
1282
|
const wfRdTag = rdTagItems.length === 2 ? rdTag : rdTagItems.slice(0, 2).join(":");
|
|
@@ -1391,7 +1405,7 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1391
1405
|
// src/utils/verify/verify.ts
|
|
1392
1406
|
import { RuntimeError as RuntimeError3 } from "@ibiz-template/core";
|
|
1393
1407
|
import { isNilOrEmpty as isNilOrEmpty3, notNilEmpty as notNilEmpty4 } from "qx-util";
|
|
1394
|
-
import { isNil } from "ramda";
|
|
1408
|
+
import { isNil as isNil2 } from "ramda";
|
|
1395
1409
|
function testCond(value, op, value2) {
|
|
1396
1410
|
if (Object.is(op, "IN")) {
|
|
1397
1411
|
return contains(value, value2);
|
|
@@ -1417,7 +1431,7 @@ function testCond(value, op, value2) {
|
|
|
1417
1431
|
case "ISNOTNULL":
|
|
1418
1432
|
return notNilEmpty4(value);
|
|
1419
1433
|
case "TESTNULL":
|
|
1420
|
-
return
|
|
1434
|
+
return isNil2(value);
|
|
1421
1435
|
case "IN":
|
|
1422
1436
|
return contains(value, value2);
|
|
1423
1437
|
case "NOTIN":
|
|
@@ -1490,7 +1504,7 @@ function strContain(value, value2, mode) {
|
|
|
1490
1504
|
// src/utils/verify/de-rule-verify.ts
|
|
1491
1505
|
import { RuntimeError as RuntimeError4 } from "@ibiz-template/core";
|
|
1492
1506
|
import { isNilOrEmpty as isNilOrEmpty4 } from "qx-util";
|
|
1493
|
-
import { isEmpty as isEmpty2, isNil as
|
|
1507
|
+
import { isEmpty as isEmpty2, isNil as isNil3 } from "ramda";
|
|
1494
1508
|
|
|
1495
1509
|
// src/utils/script/script-function.ts
|
|
1496
1510
|
import { mergeRight } from "ramda";
|
|
@@ -1844,7 +1858,7 @@ function checkFieldSimpleRule(value, op, value2, errorInfo, paramType, form, pri
|
|
|
1844
1858
|
const _value2Field = form[value2] ? form[value2] : value2;
|
|
1845
1859
|
value2 = _value2Field;
|
|
1846
1860
|
}
|
|
1847
|
-
if (
|
|
1861
|
+
if (isNil3(errorInfo) || isEmpty2(errorInfo)) {
|
|
1848
1862
|
errorInfo = "\u5185\u5BB9\u5FC5\u987B\u7B26\u5408\u503C\u89C4\u5219";
|
|
1849
1863
|
}
|
|
1850
1864
|
const result = testCond(value, op, value2);
|
|
@@ -6347,7 +6361,7 @@ DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
|
|
|
6347
6361
|
|
|
6348
6362
|
// src/service/utils/dynamic-code-list/dynamic-code-list.ts
|
|
6349
6363
|
import { ModelError as ModelError5, RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
6350
|
-
import { isNil as
|
|
6364
|
+
import { isNil as isNil4 } from "ramda";
|
|
6351
6365
|
var DynamicCodeListCache = class {
|
|
6352
6366
|
constructor(codeList) {
|
|
6353
6367
|
/**
|
|
@@ -6580,7 +6594,7 @@ var DynamicCodeListCache = class {
|
|
|
6580
6594
|
}
|
|
6581
6595
|
const promise = this.load(context, params);
|
|
6582
6596
|
const { cacheTimeout } = this.codeList;
|
|
6583
|
-
const waitTime = cacheTimeout === -1 ||
|
|
6597
|
+
const waitTime = cacheTimeout === -1 || isNil4(cacheTimeout) ? ibiz.config.codeList.timeout : this.codeList.cacheTimeout;
|
|
6584
6598
|
const cacheData = {
|
|
6585
6599
|
expirationTime: (/* @__PURE__ */ new Date()).getTime() + waitTime,
|
|
6586
6600
|
promise
|
|
@@ -6594,17 +6608,17 @@ var DynamicCodeListCache = class {
|
|
|
6594
6608
|
};
|
|
6595
6609
|
|
|
6596
6610
|
// src/service/utils/de-cache/de-cache.ts
|
|
6597
|
-
import { where, equals, clone as clone4, isNil as
|
|
6611
|
+
import { where, equals, clone as clone4, isNil as isNil6, isEmpty as isEmpty5 } from "ramda";
|
|
6598
6612
|
import { createUUID as createUUID2 } from "qx-util";
|
|
6599
6613
|
import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
6600
6614
|
|
|
6601
6615
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
6602
6616
|
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
6603
|
-
import { isEmpty as isEmpty4, isNil as
|
|
6617
|
+
import { isEmpty as isEmpty4, isNil as isNil5 } from "ramda";
|
|
6604
6618
|
function isExistSrfKey(funcName, entity) {
|
|
6605
6619
|
if (entity != null) {
|
|
6606
6620
|
const { srfkey } = entity;
|
|
6607
|
-
if (!
|
|
6621
|
+
if (!isNil5(srfkey) && !isEmpty4(srfkey)) {
|
|
6608
6622
|
return true;
|
|
6609
6623
|
}
|
|
6610
6624
|
}
|
|
@@ -6612,7 +6626,7 @@ function isExistSrfKey(funcName, entity) {
|
|
|
6612
6626
|
}
|
|
6613
6627
|
function isExistSessionId(funcName, context) {
|
|
6614
6628
|
const { srfsessionid } = context;
|
|
6615
|
-
if (!
|
|
6629
|
+
if (!isNil5(srfsessionid) && !isEmpty4(srfsessionid)) {
|
|
6616
6630
|
return true;
|
|
6617
6631
|
}
|
|
6618
6632
|
throw new RuntimeError15("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
|
|
@@ -6708,7 +6722,7 @@ var DECache = class {
|
|
|
6708
6722
|
}
|
|
6709
6723
|
try {
|
|
6710
6724
|
isExistSessionId("add", context);
|
|
6711
|
-
if (
|
|
6725
|
+
if (isNil6(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
6712
6726
|
entity.srfkey = createUUID2();
|
|
6713
6727
|
}
|
|
6714
6728
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -6852,7 +6866,7 @@ var DECache = class {
|
|
|
6852
6866
|
const t = this.getTransaction(context);
|
|
6853
6867
|
for (let i = 0; i < entities.length; i++) {
|
|
6854
6868
|
const entity = entities[i];
|
|
6855
|
-
if (
|
|
6869
|
+
if (isNil6(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
6856
6870
|
entity.srfkey = createUUID2();
|
|
6857
6871
|
}
|
|
6858
6872
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -7043,7 +7057,7 @@ var DECache = class {
|
|
|
7043
7057
|
}
|
|
7044
7058
|
);
|
|
7045
7059
|
const unionValues = unionKeys.map((key) => {
|
|
7046
|
-
if (
|
|
7060
|
+
if (isNil6(data[key])) {
|
|
7047
7061
|
return "__empty__";
|
|
7048
7062
|
}
|
|
7049
7063
|
return data[key];
|
|
@@ -7117,7 +7131,7 @@ function calcResPath(context, entity) {
|
|
|
7117
7131
|
}
|
|
7118
7132
|
|
|
7119
7133
|
// src/service/utils/search-filter/search-filter.ts
|
|
7120
|
-
import { isEmpty as isEmpty6, isNil as
|
|
7134
|
+
import { isEmpty as isEmpty6, isNil as isNil7 } from "ramda";
|
|
7121
7135
|
var SearchFilter = class {
|
|
7122
7136
|
/**
|
|
7123
7137
|
* Creates an instance of SearchFilter.
|
|
@@ -7165,16 +7179,16 @@ var SearchFilter = class {
|
|
|
7165
7179
|
this.sortMode = "ASC";
|
|
7166
7180
|
this.context = context;
|
|
7167
7181
|
if (data) {
|
|
7168
|
-
if (!
|
|
7182
|
+
if (!isNil7(data.page) && !isEmpty6(data.page)) {
|
|
7169
7183
|
this.page = data.page;
|
|
7170
7184
|
}
|
|
7171
|
-
if (!
|
|
7185
|
+
if (!isNil7(data.size) && !isEmpty6(data.size)) {
|
|
7172
7186
|
this.size = data.size;
|
|
7173
7187
|
}
|
|
7174
|
-
if (!
|
|
7188
|
+
if (!isNil7(data.query) && !isEmpty6(data.query)) {
|
|
7175
7189
|
this.query = data.query;
|
|
7176
7190
|
}
|
|
7177
|
-
if (!
|
|
7191
|
+
if (!isNil7(data.sort) && !isEmpty6(data.sort)) {
|
|
7178
7192
|
const arr = data.sort.split(",");
|
|
7179
7193
|
if (arr.length >= 1) {
|
|
7180
7194
|
[this.sortField] = arr;
|
|
@@ -7895,7 +7909,7 @@ var FileService = class {
|
|
|
7895
7909
|
};
|
|
7896
7910
|
|
|
7897
7911
|
// src/service/app-data-entity/app-data-entity.ts
|
|
7898
|
-
import { clone as clone5, isNil as
|
|
7912
|
+
import { clone as clone5, isNil as isNil8 } from "ramda";
|
|
7899
7913
|
import { DataTypes } from "@ibiz-template/core";
|
|
7900
7914
|
import { createUUID as createUUID3 } from "qx-util";
|
|
7901
7915
|
|
|
@@ -7988,7 +8002,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
7988
8002
|
enumerable: false,
|
|
7989
8003
|
configurable: true,
|
|
7990
8004
|
writable: true,
|
|
7991
|
-
value:
|
|
8005
|
+
value: isNil8(this.srfkey) ? createUUID3() : this.srfkey
|
|
7992
8006
|
});
|
|
7993
8007
|
this.defineProperties();
|
|
7994
8008
|
}
|
|
@@ -8078,11 +8092,11 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
8078
8092
|
if (value == null) {
|
|
8079
8093
|
return value;
|
|
8080
8094
|
}
|
|
8081
|
-
if (
|
|
8095
|
+
if (isNil8(dataType)) {
|
|
8082
8096
|
return value;
|
|
8083
8097
|
}
|
|
8084
8098
|
if (DataTypes.isNumber(dataType)) {
|
|
8085
|
-
const numVal = !
|
|
8099
|
+
const numVal = !isNil8(value) && value !== "" ? Number(value) : value;
|
|
8086
8100
|
if (Number.isNaN(numVal)) {
|
|
8087
8101
|
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
8088
8102
|
return value;
|
|
@@ -8601,7 +8615,7 @@ import { clone as clone8 } from "@ibiz-template/core";
|
|
|
8601
8615
|
|
|
8602
8616
|
// src/service/vo/control.vo.ts
|
|
8603
8617
|
import { createUUID as createUUID4 } from "qx-util";
|
|
8604
|
-
import { clone as clone7, isNil as
|
|
8618
|
+
import { clone as clone7, isNil as isNil9 } from "ramda";
|
|
8605
8619
|
var BuildInKeys = [
|
|
8606
8620
|
"srfkey",
|
|
8607
8621
|
"srfmajortext",
|
|
@@ -8690,7 +8704,7 @@ var ControlVO = class _ControlVO {
|
|
|
8690
8704
|
enumerable: false,
|
|
8691
8705
|
configurable: true,
|
|
8692
8706
|
writable: true,
|
|
8693
|
-
value:
|
|
8707
|
+
value: isNil9(this.srfkey) ? createUUID4() : this.srfkey
|
|
8694
8708
|
});
|
|
8695
8709
|
}
|
|
8696
8710
|
Object.defineProperty(this, "srfuf", {
|
|
@@ -9414,7 +9428,7 @@ var V7AuthService = class {
|
|
|
9414
9428
|
};
|
|
9415
9429
|
|
|
9416
9430
|
// src/service/service/async-action/async-action.service.ts
|
|
9417
|
-
import { isNil as
|
|
9431
|
+
import { isNil as isNil10 } from "ramda";
|
|
9418
9432
|
var AsyncActionService = class {
|
|
9419
9433
|
/**
|
|
9420
9434
|
* 获取异步操作的集合
|
|
@@ -9425,7 +9439,7 @@ var AsyncActionService = class {
|
|
|
9425
9439
|
*/
|
|
9426
9440
|
async fetch(params = {}) {
|
|
9427
9441
|
const res = await ibiz.net.post("/portal/asyncaction/all", params);
|
|
9428
|
-
if (
|
|
9442
|
+
if (isNil10(res.data)) {
|
|
9429
9443
|
res.data = [];
|
|
9430
9444
|
}
|
|
9431
9445
|
return res;
|
|
@@ -9450,7 +9464,7 @@ import {
|
|
|
9450
9464
|
RuntimeError as RuntimeError23,
|
|
9451
9465
|
RuntimeModelError as RuntimeModelError22
|
|
9452
9466
|
} from "@ibiz-template/core";
|
|
9453
|
-
import { isArray as isArray6, isNil as
|
|
9467
|
+
import { isArray as isArray6, isNil as isNil11 } from "lodash-es";
|
|
9454
9468
|
import { ascSort } from "qx-util";
|
|
9455
9469
|
import { clone as clone14 } from "ramda";
|
|
9456
9470
|
|
|
@@ -10855,7 +10869,7 @@ var DEActionMethod = class extends Method {
|
|
|
10855
10869
|
let path2 = this.calcPath(context);
|
|
10856
10870
|
if (this.method.needResourceKey) {
|
|
10857
10871
|
let srfkey = context[this.entity.codeName.toLowerCase()];
|
|
10858
|
-
if (
|
|
10872
|
+
if (isNil11(srfkey)) {
|
|
10859
10873
|
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
10860
10874
|
}
|
|
10861
10875
|
path2 = "".concat(path2, "/").concat(srfkey);
|
|
@@ -11280,7 +11294,7 @@ import {
|
|
|
11280
11294
|
RuntimeModelError as RuntimeModelError23
|
|
11281
11295
|
} from "@ibiz-template/core";
|
|
11282
11296
|
import { isArray as isArray7 } from "lodash-es";
|
|
11283
|
-
import { clone as clone15, isEmpty as isEmpty7, isNil as
|
|
11297
|
+
import { clone as clone15, isEmpty as isEmpty7, isNil as isNil12 } from "ramda";
|
|
11284
11298
|
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
11285
11299
|
var FetchMethod = class extends Method {
|
|
11286
11300
|
async exec(context, params, params2, header) {
|
|
@@ -11357,7 +11371,7 @@ var FetchMethod = class extends Method {
|
|
|
11357
11371
|
}
|
|
11358
11372
|
}
|
|
11359
11373
|
}
|
|
11360
|
-
if (!
|
|
11374
|
+
if (!isNil12(filter.sortField) && !isEmpty7(filter.sortField)) {
|
|
11361
11375
|
if (filter.sortMode === "DESC") {
|
|
11362
11376
|
list = descSort(list, filter.sortField);
|
|
11363
11377
|
} else {
|
|
@@ -11424,7 +11438,7 @@ function presetDEMethodProvider() {
|
|
|
11424
11438
|
}
|
|
11425
11439
|
|
|
11426
11440
|
// src/service/service/internal-message/internal-message.service.ts
|
|
11427
|
-
import { isNil as
|
|
11441
|
+
import { isNil as isNil13 } from "ramda";
|
|
11428
11442
|
var InternalMessageService = class {
|
|
11429
11443
|
constructor() {
|
|
11430
11444
|
/**
|
|
@@ -11463,7 +11477,7 @@ var InternalMessageService = class {
|
|
|
11463
11477
|
res.total = Number(res.headers["x-total"]);
|
|
11464
11478
|
}
|
|
11465
11479
|
}
|
|
11466
|
-
if (
|
|
11480
|
+
if (isNil13(res.data)) {
|
|
11467
11481
|
res.data = [];
|
|
11468
11482
|
}
|
|
11469
11483
|
return res;
|
|
@@ -11595,6 +11609,7 @@ var TreeNodeData = class {
|
|
|
11595
11609
|
this._leaf = opts.leaf === true;
|
|
11596
11610
|
this._parent = parentNodeData;
|
|
11597
11611
|
this._nodeType = model.treeNodeType;
|
|
11612
|
+
this._disableSelect = model.disableSelect === true;
|
|
11598
11613
|
if (this._parent) {
|
|
11599
11614
|
this._context = { ...this._parent._context };
|
|
11600
11615
|
}
|
|
@@ -11661,7 +11676,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
11661
11676
|
|
|
11662
11677
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
11663
11678
|
import { updateKeyDefine } from "@ibiz-template/core";
|
|
11664
|
-
import { clone as clone16, isNil as
|
|
11679
|
+
import { clone as clone16, isNil as isNil14 } from "ramda";
|
|
11665
11680
|
var CloneExcludeKeys = ["_id", "_value", "_text", "_deData", "clone"];
|
|
11666
11681
|
var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
11667
11682
|
constructor(model, parentNodeData, opts) {
|
|
@@ -11778,7 +11793,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11778
11793
|
});
|
|
11779
11794
|
Object.keys(this).forEach((key) => {
|
|
11780
11795
|
const deKey = getDeKey(key);
|
|
11781
|
-
if (
|
|
11796
|
+
if (isNil14(deKey) && !CloneExcludeKeys.includes(key)) {
|
|
11782
11797
|
cloneNodeData[key] = this[key];
|
|
11783
11798
|
}
|
|
11784
11799
|
});
|
|
@@ -11787,7 +11802,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11787
11802
|
return new Proxy(this, {
|
|
11788
11803
|
set(target, p, value) {
|
|
11789
11804
|
const deKey = getDeKey(p);
|
|
11790
|
-
if (!
|
|
11805
|
+
if (!isNil14(deKey)) {
|
|
11791
11806
|
target._deData[deKey] = value;
|
|
11792
11807
|
} else {
|
|
11793
11808
|
target[p] = value;
|
|
@@ -11796,8 +11811,8 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11796
11811
|
},
|
|
11797
11812
|
get(target, p, _receiver) {
|
|
11798
11813
|
const deKey = getDeKey(p);
|
|
11799
|
-
if (!
|
|
11800
|
-
return
|
|
11814
|
+
if (!isNil14(deKey)) {
|
|
11815
|
+
return isNil14(target._deData[deKey]) ? getKeyDefault(p) : target._deData[deKey];
|
|
11801
11816
|
}
|
|
11802
11817
|
return target[p];
|
|
11803
11818
|
},
|
|
@@ -11901,7 +11916,7 @@ var TreeStaticNodeData = class extends TreeNodeData {
|
|
|
11901
11916
|
|
|
11902
11917
|
// src/service/vo/ui-map-field.ts
|
|
11903
11918
|
import { DataTypes as DataTypes2 } from "@ibiz-template/core";
|
|
11904
|
-
import { isNil as
|
|
11919
|
+
import { isNil as isNil15 } from "ramda";
|
|
11905
11920
|
var UIMapField = class {
|
|
11906
11921
|
constructor(uiKey, dataKey, opts = {}) {
|
|
11907
11922
|
/**
|
|
@@ -11922,10 +11937,10 @@ var UIMapField = class {
|
|
|
11922
11937
|
this.isRequestNeed = true;
|
|
11923
11938
|
this.uiKey = uiKey;
|
|
11924
11939
|
this.dataKey = dataKey;
|
|
11925
|
-
if (!
|
|
11940
|
+
if (!isNil15(opts.isOriginField)) {
|
|
11926
11941
|
this.isOriginField = opts.isOriginField;
|
|
11927
11942
|
}
|
|
11928
|
-
if (!
|
|
11943
|
+
if (!isNil15(opts.dataType)) {
|
|
11929
11944
|
this.dataType = opts.dataType;
|
|
11930
11945
|
}
|
|
11931
11946
|
}
|
|
@@ -11940,7 +11955,7 @@ var UIMapField = class {
|
|
|
11940
11955
|
return value;
|
|
11941
11956
|
}
|
|
11942
11957
|
if (DataTypes2.isNumber(this.dataType)) {
|
|
11943
|
-
const numVal = !
|
|
11958
|
+
const numVal = !isNil15(value) && value !== "" ? Number(value) : value;
|
|
11944
11959
|
if (Number.isNaN(numVal)) {
|
|
11945
11960
|
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
11946
11961
|
return value;
|
|
@@ -13250,7 +13265,7 @@ var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
|
|
|
13250
13265
|
// src/controller/common/view/view.controller.ts
|
|
13251
13266
|
import { notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
13252
13267
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
13253
|
-
import { isEmpty as isEmpty8, isNil as
|
|
13268
|
+
import { isEmpty as isEmpty8, isNil as isNil21, isNotNil as isNotNil2 } from "ramda";
|
|
13254
13269
|
|
|
13255
13270
|
// src/controller/utils/loading/loading.state.ts
|
|
13256
13271
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -13640,6 +13655,9 @@ var UIActionButtonState = class {
|
|
|
13640
13655
|
} else if (noPrivDisplayMode === 6) {
|
|
13641
13656
|
this.visible = false;
|
|
13642
13657
|
}
|
|
13658
|
+
if ([2, 6].includes(noPrivDisplayMode) && this.dataAccessAction) {
|
|
13659
|
+
this.visible = false;
|
|
13660
|
+
}
|
|
13643
13661
|
if (actionTarget && actionTarget !== "NONE" || uiactionMode === "SYS" && [
|
|
13644
13662
|
"Save",
|
|
13645
13663
|
"SaveAndExit",
|
|
@@ -13740,6 +13758,13 @@ var ButtonContainerState = class {
|
|
|
13740
13758
|
})
|
|
13741
13759
|
);
|
|
13742
13760
|
}
|
|
13761
|
+
async init() {
|
|
13762
|
+
await Promise.all(
|
|
13763
|
+
this.children.map((child) => {
|
|
13764
|
+
return child.init();
|
|
13765
|
+
})
|
|
13766
|
+
);
|
|
13767
|
+
}
|
|
13743
13768
|
};
|
|
13744
13769
|
|
|
13745
13770
|
// src/controller/utils/event/qx-event-ex.ts
|
|
@@ -13882,9 +13907,9 @@ function hasSubRoute(routeDepth) {
|
|
|
13882
13907
|
}
|
|
13883
13908
|
|
|
13884
13909
|
// src/controller/utils/util/util.ts
|
|
13885
|
-
import { isNil as
|
|
13910
|
+
import { isNil as isNil16 } from "ramda";
|
|
13886
13911
|
function isValueChange(value, value2) {
|
|
13887
|
-
if ((
|
|
13912
|
+
if ((isNil16(value) || value === "") && (isNil16(value2) || value2 === "")) {
|
|
13888
13913
|
return false;
|
|
13889
13914
|
}
|
|
13890
13915
|
return value !== value2;
|
|
@@ -13900,7 +13925,7 @@ function getOriginData(data) {
|
|
|
13900
13925
|
// src/controller/utils/value-rule/value-rule.ts
|
|
13901
13926
|
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
13902
13927
|
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
13903
|
-
import { isNil as
|
|
13928
|
+
import { isNil as isNil17 } from "ramda";
|
|
13904
13929
|
function generateRules(itemVRs, name, valueItemName) {
|
|
13905
13930
|
const rules = [];
|
|
13906
13931
|
itemVRs.forEach((item) => {
|
|
@@ -13965,7 +13990,7 @@ function generateEditorRules(editor) {
|
|
|
13965
13990
|
if (maxLength) {
|
|
13966
13991
|
rules.push({
|
|
13967
13992
|
validator: (rule, value, callback) => {
|
|
13968
|
-
if (!
|
|
13993
|
+
if (!isNil17(value) && value.length > maxLength) {
|
|
13969
13994
|
callback(
|
|
13970
13995
|
new Error(
|
|
13971
13996
|
"\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
|
|
@@ -13980,7 +14005,7 @@ function generateEditorRules(editor) {
|
|
|
13980
14005
|
if (minLength) {
|
|
13981
14006
|
rules.push({
|
|
13982
14007
|
validator: (rule, value, callback) => {
|
|
13983
|
-
if (!
|
|
14008
|
+
if (!isNil17(value) && value.length < minLength) {
|
|
13984
14009
|
callback(
|
|
13985
14010
|
new Error(
|
|
13986
14011
|
"\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
|
|
@@ -13992,10 +14017,10 @@ function generateEditorRules(editor) {
|
|
|
13992
14017
|
}
|
|
13993
14018
|
});
|
|
13994
14019
|
}
|
|
13995
|
-
if (!
|
|
14020
|
+
if (!isNil17(maxValue)) {
|
|
13996
14021
|
rules.push({
|
|
13997
14022
|
validator: (rule, value, callback) => {
|
|
13998
|
-
if (!
|
|
14023
|
+
if (!isNil17(value) && isNumber(value) && value > maxValue) {
|
|
13999
14024
|
callback(new Error("\u503C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxValue)));
|
|
14000
14025
|
} else {
|
|
14001
14026
|
return true;
|
|
@@ -14003,10 +14028,10 @@ function generateEditorRules(editor) {
|
|
|
14003
14028
|
}
|
|
14004
14029
|
});
|
|
14005
14030
|
}
|
|
14006
|
-
if (!
|
|
14031
|
+
if (!isNil17(minValue)) {
|
|
14007
14032
|
rules.push({
|
|
14008
14033
|
validator: (rule, value, callback) => {
|
|
14009
|
-
if (!
|
|
14034
|
+
if (!isNil17(value) && isNumber(value) && value < minValue) {
|
|
14010
14035
|
callback(new Error("\u503C\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minValue)));
|
|
14011
14036
|
} else {
|
|
14012
14037
|
return true;
|
|
@@ -14019,7 +14044,7 @@ function generateEditorRules(editor) {
|
|
|
14019
14044
|
|
|
14020
14045
|
// src/controller/utils/value-ex/value-ex.ts
|
|
14021
14046
|
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
14022
|
-
import { isNil as
|
|
14047
|
+
import { isNil as isNil18, mergeLeft } from "ramda";
|
|
14023
14048
|
var ValueExUtil = class {
|
|
14024
14049
|
/**
|
|
14025
14050
|
* 合并默认值
|
|
@@ -14044,7 +14069,7 @@ var ValueExUtil = class {
|
|
|
14044
14069
|
* @return {*} {string}
|
|
14045
14070
|
*/
|
|
14046
14071
|
static toText(options, value) {
|
|
14047
|
-
if (
|
|
14072
|
+
if (isNil18(value) || value === "") {
|
|
14048
14073
|
return "";
|
|
14049
14074
|
}
|
|
14050
14075
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
@@ -14069,12 +14094,12 @@ var ValueExUtil = class {
|
|
|
14069
14094
|
import { RuntimeError as RuntimeError31, ModelError as ModelError17 } from "@ibiz-template/core";
|
|
14070
14095
|
import dayjs from "dayjs";
|
|
14071
14096
|
import { createUUID as createUUID8 } from "qx-util";
|
|
14072
|
-
import { isNil as
|
|
14097
|
+
import { isNil as isNil19, isNotNil } from "ramda";
|
|
14073
14098
|
function getDefaultValue(opts, origins) {
|
|
14074
14099
|
var _a;
|
|
14075
14100
|
const { name, valueType, defaultValue, valueFormat } = opts;
|
|
14076
14101
|
const { data, context, params } = origins;
|
|
14077
|
-
if (
|
|
14102
|
+
if (isNil19(valueType) && isNil19(defaultValue)) {
|
|
14078
14103
|
return;
|
|
14079
14104
|
}
|
|
14080
14105
|
if (valueType === "RESET") {
|
|
@@ -14428,7 +14453,7 @@ var BaseController = class {
|
|
|
14428
14453
|
|
|
14429
14454
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
14430
14455
|
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
14431
|
-
import { isNil as
|
|
14456
|
+
import { isNil as isNil20, mergeRight as mergeRight2 } from "ramda";
|
|
14432
14457
|
var ViewMsgController = class _ViewMsgController {
|
|
14433
14458
|
constructor(msgGroupId) {
|
|
14434
14459
|
this.msgGroupId = msgGroupId;
|
|
@@ -14613,19 +14638,19 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
14613
14638
|
const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
|
|
14614
14639
|
const deViewMessages = dataSet.map((item) => {
|
|
14615
14640
|
const message = {};
|
|
14616
|
-
if (positionField && !
|
|
14641
|
+
if (positionField && !isNil20(item[positionField])) {
|
|
14617
14642
|
message.position = item[positionField];
|
|
14618
14643
|
}
|
|
14619
|
-
if (titleField && !
|
|
14644
|
+
if (titleField && !isNil20(item[titleField])) {
|
|
14620
14645
|
message.title = item[titleField];
|
|
14621
14646
|
}
|
|
14622
|
-
if (messageField && !
|
|
14647
|
+
if (messageField && !isNil20(item[messageField])) {
|
|
14623
14648
|
message.message = item[messageField];
|
|
14624
14649
|
}
|
|
14625
|
-
if (typeField && !
|
|
14650
|
+
if (typeField && !isNil20(item[typeField])) {
|
|
14626
14651
|
message.messageType = item[typeField];
|
|
14627
14652
|
}
|
|
14628
|
-
if (removeModeField && !
|
|
14653
|
+
if (removeModeField && !isNil20(item[removeModeField])) {
|
|
14629
14654
|
message.removeMode = item[removeModeField];
|
|
14630
14655
|
}
|
|
14631
14656
|
return mergeRight2(basicMsg, message);
|
|
@@ -14864,7 +14889,7 @@ var ViewController = class extends BaseController {
|
|
|
14864
14889
|
*/
|
|
14865
14890
|
handleContextParams() {
|
|
14866
14891
|
this.context.srfappid = this.model.appId;
|
|
14867
|
-
if (
|
|
14892
|
+
if (isNil21(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
14868
14893
|
const domain = ibiz.uiDomainManager.create(this.id);
|
|
14869
14894
|
this.context.srfsessionid = domain.id;
|
|
14870
14895
|
}
|
|
@@ -15140,6 +15165,17 @@ var EditorController = class {
|
|
|
15140
15165
|
this.style.height = "".concat(height, "px");
|
|
15141
15166
|
}
|
|
15142
15167
|
}
|
|
15168
|
+
if (this.model.cssStyle) {
|
|
15169
|
+
const stylesObject = {};
|
|
15170
|
+
const stylesArray = this.model.cssStyle.split(";").filter(Boolean);
|
|
15171
|
+
stylesArray.forEach((style) => {
|
|
15172
|
+
const [key, value] = style.split(":");
|
|
15173
|
+
if (key && value) {
|
|
15174
|
+
stylesObject[key.trim()] = value.trim();
|
|
15175
|
+
}
|
|
15176
|
+
Object.assign(this.style, stylesObject);
|
|
15177
|
+
});
|
|
15178
|
+
}
|
|
15143
15179
|
if (this.model.editorItems) {
|
|
15144
15180
|
this.model.editorItems = this.model.editorItems.filter(
|
|
15145
15181
|
(item) => item.id !== this.model.id
|
|
@@ -15253,7 +15289,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
15253
15289
|
|
|
15254
15290
|
// src/controller/common/control/control.controller.ts
|
|
15255
15291
|
import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
|
|
15256
|
-
import { clone as clone18, isNil as
|
|
15292
|
+
import { clone as clone18, isNil as isNil22 } from "ramda";
|
|
15257
15293
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
15258
15294
|
var ControlController = class extends BaseController {
|
|
15259
15295
|
/**
|
|
@@ -15541,7 +15577,7 @@ var ControlController = class extends BaseController {
|
|
|
15541
15577
|
let message;
|
|
15542
15578
|
let duration;
|
|
15543
15579
|
if (msgItem && msgItem.content) {
|
|
15544
|
-
duration =
|
|
15580
|
+
duration = isNil22(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
|
|
15545
15581
|
const scriptParams = { ...this.getEventArgs() };
|
|
15546
15582
|
if (opts == null ? void 0 : opts.data) {
|
|
15547
15583
|
scriptParams.data = opts.data;
|
|
@@ -16573,7 +16609,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
16573
16609
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
16574
16610
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
16575
16611
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
16576
|
-
import { clone as clone20, isNil as
|
|
16612
|
+
import { clone as clone20, isNil as isNil23, mergeDeepRight } from "ramda";
|
|
16577
16613
|
dayjs4.extend(minMax2);
|
|
16578
16614
|
dayjs4.extend(isSameOrBefore);
|
|
16579
16615
|
dayjs4.extend(quarterOfYear);
|
|
@@ -16669,10 +16705,10 @@ var BaseSeriesGenerator = class {
|
|
|
16669
16705
|
* @return {*} {(string | undefined)}
|
|
16670
16706
|
*/
|
|
16671
16707
|
translateVal(codeListKey, val, isExclude = false) {
|
|
16672
|
-
if (
|
|
16708
|
+
if (isNil23(val)) {
|
|
16673
16709
|
return void 0;
|
|
16674
16710
|
}
|
|
16675
|
-
if (
|
|
16711
|
+
if (isNil23(codeListKey)) {
|
|
16676
16712
|
return val;
|
|
16677
16713
|
}
|
|
16678
16714
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
@@ -16721,7 +16757,7 @@ var BaseSeriesGenerator = class {
|
|
|
16721
16757
|
seriesCodeListId,
|
|
16722
16758
|
item[this.groupField]
|
|
16723
16759
|
);
|
|
16724
|
-
if (
|
|
16760
|
+
if (isNil23(groupVal)) {
|
|
16725
16761
|
return;
|
|
16726
16762
|
}
|
|
16727
16763
|
group = groupVal;
|
|
@@ -17718,6 +17754,9 @@ var CaptionBarController = class extends ControlController {
|
|
|
17718
17754
|
await super.onCreated();
|
|
17719
17755
|
this.view.evt.on("onViewInfoChange", ({ caption: _caption, dataInfo }) => {
|
|
17720
17756
|
this.state.caption = "".concat(this.view.model.caption).concat(dataInfo ? "-".concat(dataInfo) : "");
|
|
17757
|
+
if (this.view.modal.mode === "ROUTE") {
|
|
17758
|
+
ibiz.util.setBrowserTitle(this.state.caption);
|
|
17759
|
+
}
|
|
17721
17760
|
});
|
|
17722
17761
|
}
|
|
17723
17762
|
};
|
|
@@ -19435,6 +19474,27 @@ var UIActionProviderBase = class {
|
|
|
19435
19474
|
});
|
|
19436
19475
|
}
|
|
19437
19476
|
}
|
|
19477
|
+
/**
|
|
19478
|
+
* 处理打开视图配置自定义参数 modalOption
|
|
19479
|
+
*
|
|
19480
|
+
* @author zk
|
|
19481
|
+
* @date 2024-02-01 01:02:28
|
|
19482
|
+
* @param {IData} param
|
|
19483
|
+
* @return {*} {IData}
|
|
19484
|
+
* @memberof FrontUIActionProvider
|
|
19485
|
+
*/
|
|
19486
|
+
handleViewOptionParams(param) {
|
|
19487
|
+
if (param.modaloption) {
|
|
19488
|
+
try {
|
|
19489
|
+
const modalOption = JSON.parse(param.modaloption);
|
|
19490
|
+
delete param.modaloption;
|
|
19491
|
+
return { modalOption };
|
|
19492
|
+
} catch (error) {
|
|
19493
|
+
ibiz.log.error("\u89C6\u56FE\u53C2\u6570modalOption \u89E3\u6790\u5931\u8D25\uFF1A".concat(error));
|
|
19494
|
+
}
|
|
19495
|
+
}
|
|
19496
|
+
return {};
|
|
19497
|
+
}
|
|
19438
19498
|
};
|
|
19439
19499
|
|
|
19440
19500
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
@@ -19456,12 +19516,13 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
19456
19516
|
const tempParams = { ...resultParams };
|
|
19457
19517
|
const frontPSAppView = action.frontAppViewId;
|
|
19458
19518
|
if (frontPSAppView) {
|
|
19519
|
+
const options = this.handleViewOptionParams(resultParams);
|
|
19459
19520
|
const res2 = await ibiz.commands.execute(
|
|
19460
19521
|
OpenAppViewCommand.TAG,
|
|
19461
19522
|
frontPSAppView,
|
|
19462
19523
|
resultContext,
|
|
19463
19524
|
resultParams,
|
|
19464
|
-
{ event }
|
|
19525
|
+
{ event, ...options }
|
|
19465
19526
|
);
|
|
19466
19527
|
if (!(res2 == null ? void 0 : res2.ok)) {
|
|
19467
19528
|
actionResult.cancel = true;
|
|
@@ -19634,27 +19695,6 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19634
19695
|
}
|
|
19635
19696
|
return actionResult;
|
|
19636
19697
|
}
|
|
19637
|
-
/**
|
|
19638
|
-
* 处理打开视图配置自定义参数 modalOption
|
|
19639
|
-
*
|
|
19640
|
-
* @author zk
|
|
19641
|
-
* @date 2024-02-01 01:02:28
|
|
19642
|
-
* @param {IData} param
|
|
19643
|
-
* @return {*} {IData}
|
|
19644
|
-
* @memberof FrontUIActionProvider
|
|
19645
|
-
*/
|
|
19646
|
-
handleViewOptionParams(param) {
|
|
19647
|
-
if (param.modaloption) {
|
|
19648
|
-
try {
|
|
19649
|
-
const modalOption = JSON.parse(param.modaloption);
|
|
19650
|
-
delete param.modaloption;
|
|
19651
|
-
return { modalOption };
|
|
19652
|
-
} catch (error) {
|
|
19653
|
-
ibiz.log.error("\u89C6\u56FE\u53C2\u6570modalOption \u89E3\u6790\u5931\u8D25\uFF1A".concat(error));
|
|
19654
|
-
}
|
|
19655
|
-
}
|
|
19656
|
-
return {};
|
|
19657
|
-
}
|
|
19658
19698
|
/**
|
|
19659
19699
|
* 处理模式:用户自定义
|
|
19660
19700
|
* @author lxm
|
|
@@ -19971,7 +20011,11 @@ var ToolbarController = class extends ControlController {
|
|
|
19971
20011
|
},
|
|
19972
20012
|
{ childrenFields: ["detoolbarItems"] }
|
|
19973
20013
|
);
|
|
19974
|
-
|
|
20014
|
+
if (!this.state.manualCalcButtonState) {
|
|
20015
|
+
await this.calcButtonState();
|
|
20016
|
+
} else {
|
|
20017
|
+
await this.state.buttonsState.init();
|
|
20018
|
+
}
|
|
19975
20019
|
}
|
|
19976
20020
|
/**
|
|
19977
20021
|
* 工具栏按钮点击事件
|
|
@@ -20525,7 +20569,7 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
20525
20569
|
|
|
20526
20570
|
// src/controller/control/data-view/data-view.controller.ts
|
|
20527
20571
|
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
20528
|
-
import { isNil as
|
|
20572
|
+
import { isNil as isNil24 } from "ramda";
|
|
20529
20573
|
|
|
20530
20574
|
// src/controller/control/data-view/data-view.service.ts
|
|
20531
20575
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -20813,7 +20857,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20813
20857
|
const groupMap = /* @__PURE__ */ new Map();
|
|
20814
20858
|
items.forEach((item) => {
|
|
20815
20859
|
const groupVal = item[groupAppDEFieldId];
|
|
20816
|
-
if (
|
|
20860
|
+
if (isNil24(groupVal)) {
|
|
20817
20861
|
return;
|
|
20818
20862
|
}
|
|
20819
20863
|
if (!groupMap.has(groupVal)) {
|
|
@@ -25404,6 +25448,7 @@ var GridController = class extends MDControlController {
|
|
|
25404
25448
|
);
|
|
25405
25449
|
}
|
|
25406
25450
|
}
|
|
25451
|
+
this.calcColumnFixed();
|
|
25407
25452
|
}
|
|
25408
25453
|
async afterLoad(args, items) {
|
|
25409
25454
|
await super.afterLoad(args, items);
|
|
@@ -25709,7 +25754,8 @@ var GridController = class extends MDControlController {
|
|
|
25709
25754
|
key: column.codeName,
|
|
25710
25755
|
caption: column.caption,
|
|
25711
25756
|
hidden: !!column.hideDefault || !!column.hiddenDataItem,
|
|
25712
|
-
uaColumn: column.columnType === "UAGRIDCOLUMN"
|
|
25757
|
+
uaColumn: column.columnType === "UAGRIDCOLUMN",
|
|
25758
|
+
adaptive: column.widthUnit === "STAR"
|
|
25713
25759
|
});
|
|
25714
25760
|
}
|
|
25715
25761
|
},
|
|
@@ -25730,7 +25776,11 @@ var GridController = class extends MDControlController {
|
|
|
25730
25776
|
);
|
|
25731
25777
|
const allNum = showColumns.length;
|
|
25732
25778
|
const { frozenFirstColumn, frozenLastColumn } = this.model;
|
|
25779
|
+
this.hasAdaptiveColumn = false;
|
|
25733
25780
|
showColumns.forEach((column, index) => {
|
|
25781
|
+
if (column.adaptive) {
|
|
25782
|
+
this.hasAdaptiveColumn = true;
|
|
25783
|
+
}
|
|
25734
25784
|
if (column.uaColumn) {
|
|
25735
25785
|
column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
|
|
25736
25786
|
} else if (frozenFirstColumn && index < frozenFirstColumn) {
|
|
@@ -26199,6 +26249,7 @@ var GridController = class extends MDControlController {
|
|
|
26199
26249
|
*/
|
|
26200
26250
|
setColumnVisible(columnState) {
|
|
26201
26251
|
columnState.hidden = !columnState.hidden;
|
|
26252
|
+
this.calcColumnFixed();
|
|
26202
26253
|
this.saveColumnStates();
|
|
26203
26254
|
}
|
|
26204
26255
|
/**
|
|
@@ -26216,6 +26267,7 @@ var GridController = class extends MDControlController {
|
|
|
26216
26267
|
}
|
|
26217
26268
|
if (data.columnstates) {
|
|
26218
26269
|
this.state.columnStates = data.columnstates;
|
|
26270
|
+
this.calcColumnFixed();
|
|
26219
26271
|
} else {
|
|
26220
26272
|
this.initColumnStates();
|
|
26221
26273
|
}
|
|
@@ -26233,6 +26285,7 @@ var GridController = class extends MDControlController {
|
|
|
26233
26285
|
if (columnState) {
|
|
26234
26286
|
this.state.columnStates.splice(oldIndex, 1);
|
|
26235
26287
|
this.state.columnStates.splice(newIndex, 0, columnState);
|
|
26288
|
+
this.calcColumnFixed();
|
|
26236
26289
|
this.saveColumnStates();
|
|
26237
26290
|
}
|
|
26238
26291
|
}
|
|
@@ -26266,7 +26319,7 @@ var GridController = class extends MDControlController {
|
|
|
26266
26319
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
26267
26320
|
import dayjs5 from "dayjs";
|
|
26268
26321
|
import { debounce as debounce3 } from "lodash-es";
|
|
26269
|
-
import { clone as clone27, isNil as
|
|
26322
|
+
import { clone as clone27, isNil as isNil25 } from "ramda";
|
|
26270
26323
|
var GridFieldColumnController = class extends GridColumnController {
|
|
26271
26324
|
constructor() {
|
|
26272
26325
|
super(...arguments);
|
|
@@ -26478,11 +26531,11 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26478
26531
|
*/
|
|
26479
26532
|
calcFieldAgg(items) {
|
|
26480
26533
|
const { aggField, aggMode, aggValueFormat, unitName } = this.model;
|
|
26481
|
-
if (
|
|
26534
|
+
if (isNil25(aggMode) || aggMode === "NONE") {
|
|
26482
26535
|
return;
|
|
26483
26536
|
}
|
|
26484
26537
|
const fieldName = aggField || this.model.id;
|
|
26485
|
-
items = items.filter((item) => !
|
|
26538
|
+
items = items.filter((item) => !isNil25(item[fieldName]));
|
|
26486
26539
|
let aggValue;
|
|
26487
26540
|
if (this.grid.model.aggMode === "PAGE") {
|
|
26488
26541
|
switch (aggMode) {
|
|
@@ -27483,6 +27536,13 @@ var PanelItemController = class {
|
|
|
27483
27536
|
* @returns {*} {Promise<void>}
|
|
27484
27537
|
*/
|
|
27485
27538
|
async init() {
|
|
27539
|
+
var _a;
|
|
27540
|
+
const hasVisibleLogic = !!((_a = this.model.panelItemGroupLogics) == null ? void 0 : _a.find(
|
|
27541
|
+
(logic) => logic.logicCat === "PANELVISIBLE"
|
|
27542
|
+
));
|
|
27543
|
+
if (hasVisibleLogic) {
|
|
27544
|
+
this.state.visible = false;
|
|
27545
|
+
}
|
|
27486
27546
|
await this.onInit();
|
|
27487
27547
|
}
|
|
27488
27548
|
async onInit() {
|
|
@@ -27791,7 +27851,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
27791
27851
|
|
|
27792
27852
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
27793
27853
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
27794
|
-
import { clone as clone28, isNil as
|
|
27854
|
+
import { clone as clone28, isNil as isNil27 } from "ramda";
|
|
27795
27855
|
import { isString as isString2 } from "lodash-es";
|
|
27796
27856
|
|
|
27797
27857
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -28233,7 +28293,7 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
28233
28293
|
|
|
28234
28294
|
// src/controller/control/search-bar/use-searchcond.ts
|
|
28235
28295
|
import { RuntimeError as RuntimeError58, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
28236
|
-
import { isNil as
|
|
28296
|
+
import { isNil as isNil26 } from "ramda";
|
|
28237
28297
|
function getOriginFilterNodes() {
|
|
28238
28298
|
return [
|
|
28239
28299
|
{
|
|
@@ -28290,7 +28350,7 @@ function calcSearchConds(filterNodes) {
|
|
|
28290
28350
|
let hasError = false;
|
|
28291
28351
|
recursiveIterate9(filterNodes[0], (node) => {
|
|
28292
28352
|
if (node.leaf) {
|
|
28293
|
-
if (node.field && node.valueOP && !
|
|
28353
|
+
if (node.field && node.valueOP && !isNil26(node.value)) {
|
|
28294
28354
|
hasFilter = true;
|
|
28295
28355
|
} else {
|
|
28296
28356
|
hasError = true;
|
|
@@ -28589,7 +28649,7 @@ var SearchBarController = class extends ControlController {
|
|
|
28589
28649
|
recursiveIterate10(
|
|
28590
28650
|
searchconds[0],
|
|
28591
28651
|
(node) => {
|
|
28592
|
-
if (node.condtype === "DEFIELD" && !
|
|
28652
|
+
if (node.condtype === "DEFIELD" && !isNil27(node.value)) {
|
|
28593
28653
|
const controller = this.findFilterController(
|
|
28594
28654
|
node.fieldname,
|
|
28595
28655
|
node.condop
|
|
@@ -29616,7 +29676,7 @@ var TreeController = class extends MDControlController {
|
|
|
29616
29676
|
return;
|
|
29617
29677
|
}
|
|
29618
29678
|
}
|
|
29619
|
-
if (this.state.singleSelect) {
|
|
29679
|
+
if (this.state.singleSelect && !nodeData._disableSelect) {
|
|
29620
29680
|
const { selectedData } = this.state;
|
|
29621
29681
|
const filterArr = selectedData.filter((item) => item._id !== nodeData._id);
|
|
29622
29682
|
if (filterArr.length === selectedData.length) {
|
|
@@ -30385,7 +30445,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
30385
30445
|
|
|
30386
30446
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
30387
30447
|
import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
30388
|
-
import { isNil as
|
|
30448
|
+
import { isNil as isNil28 } from "ramda";
|
|
30389
30449
|
|
|
30390
30450
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
30391
30451
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -30612,7 +30672,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30612
30672
|
const groupMap = /* @__PURE__ */ new Map();
|
|
30613
30673
|
items.forEach((item) => {
|
|
30614
30674
|
const groupVal = item[groupAppDEFieldId];
|
|
30615
|
-
if (
|
|
30675
|
+
if (isNil28(groupVal)) {
|
|
30616
30676
|
return;
|
|
30617
30677
|
}
|
|
30618
30678
|
if (!groupMap.has(groupVal)) {
|
|
@@ -30689,7 +30749,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30689
30749
|
|
|
30690
30750
|
// src/controller/control/kanban/kanban.controller.ts
|
|
30691
30751
|
import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
30692
|
-
import { isNil as
|
|
30752
|
+
import { isNil as isNil29 } from "ramda";
|
|
30693
30753
|
|
|
30694
30754
|
// src/controller/control/kanban/kanban.service.ts
|
|
30695
30755
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -30774,7 +30834,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30774
30834
|
const isAsc = minorSortDir === "ASC";
|
|
30775
30835
|
items.forEach((item) => {
|
|
30776
30836
|
const sortValue = item[sortField];
|
|
30777
|
-
if (
|
|
30837
|
+
if (isNil29(sortValue)) {
|
|
30778
30838
|
item[sortField] = 0;
|
|
30779
30839
|
} else {
|
|
30780
30840
|
const toNum = Number(sortValue);
|
|
@@ -30881,7 +30941,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30881
30941
|
const groupMap = /* @__PURE__ */ new Map();
|
|
30882
30942
|
items.forEach((item) => {
|
|
30883
30943
|
const groupVal = item[groupAppDEFieldId];
|
|
30884
|
-
if (
|
|
30944
|
+
if (isNil29(groupVal)) {
|
|
30885
30945
|
return;
|
|
30886
30946
|
}
|
|
30887
30947
|
if (!groupMap.has(groupVal)) {
|
|
@@ -32042,17 +32102,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
32042
32102
|
*/
|
|
32043
32103
|
async onActionClick(detail, row, event) {
|
|
32044
32104
|
const actionId = detail.uiactionId;
|
|
32045
|
-
await
|
|
32046
|
-
actionId,
|
|
32047
|
-
{
|
|
32048
|
-
context: this.context,
|
|
32049
|
-
params: this.params,
|
|
32050
|
-
data: [row.data],
|
|
32051
|
-
view: this.treeGrid.view,
|
|
32052
|
-
event
|
|
32053
|
-
},
|
|
32054
|
-
detail.appId
|
|
32055
|
-
);
|
|
32105
|
+
await this.treeGrid.doUIAction(actionId, row.data, event, detail.appId);
|
|
32056
32106
|
}
|
|
32057
32107
|
/**
|
|
32058
32108
|
* 值格式化
|
|
@@ -32301,17 +32351,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
32301
32351
|
*/
|
|
32302
32352
|
async onActionClick(detail, row, event) {
|
|
32303
32353
|
const actionId = detail.uiactionId;
|
|
32304
|
-
await
|
|
32305
|
-
actionId,
|
|
32306
|
-
{
|
|
32307
|
-
context: this.context,
|
|
32308
|
-
params: this.params,
|
|
32309
|
-
data: [row.data],
|
|
32310
|
-
view: this.treeGrid.view,
|
|
32311
|
-
event
|
|
32312
|
-
},
|
|
32313
|
-
detail.appId
|
|
32314
|
-
);
|
|
32354
|
+
await this.treeGrid.doUIAction(actionId, row.data, event, detail.appId);
|
|
32315
32355
|
}
|
|
32316
32356
|
gridStateNotify(row, state) {
|
|
32317
32357
|
super.gridStateNotify(row, state);
|
|
@@ -33495,7 +33535,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
|
|
|
33495
33535
|
// src/controller/notification/async-action.controller.ts
|
|
33496
33536
|
import { QXEvent as QXEvent7 } from "qx-util";
|
|
33497
33537
|
import { clone as clone31 } from "ramda";
|
|
33498
|
-
import { isNil as
|
|
33538
|
+
import { isNil as isNil30, isNumber as isNumber2 } from "lodash-es";
|
|
33499
33539
|
import dayjs7 from "dayjs";
|
|
33500
33540
|
var AsyncActionController = class {
|
|
33501
33541
|
constructor() {
|
|
@@ -33570,14 +33610,14 @@ var AsyncActionController = class {
|
|
|
33570
33610
|
data[key] = dayjs7(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
33571
33611
|
}
|
|
33572
33612
|
});
|
|
33573
|
-
if (!
|
|
33613
|
+
if (!isNil30(data.actionresult)) {
|
|
33574
33614
|
try {
|
|
33575
33615
|
const json = JSON.parse(data.actionresult);
|
|
33576
33616
|
data.actionresult = json;
|
|
33577
33617
|
} catch (error) {
|
|
33578
33618
|
}
|
|
33579
33619
|
}
|
|
33580
|
-
if (!
|
|
33620
|
+
if (!isNil30(data.completionrate)) {
|
|
33581
33621
|
const num = Number(data.completionrate);
|
|
33582
33622
|
if (Number.isNaN(num)) {
|
|
33583
33623
|
data.completionrate = void 0;
|
|
@@ -34207,6 +34247,7 @@ var ViewEngineBase = class {
|
|
|
34207
34247
|
*/
|
|
34208
34248
|
constructor(view) {
|
|
34209
34249
|
this.view = view;
|
|
34250
|
+
this.init();
|
|
34210
34251
|
this.initViewState();
|
|
34211
34252
|
}
|
|
34212
34253
|
/**
|
|
@@ -34264,6 +34305,15 @@ var ViewEngineBase = class {
|
|
|
34264
34305
|
get viewLayoutPanel() {
|
|
34265
34306
|
return this.view.layoutPanel;
|
|
34266
34307
|
}
|
|
34308
|
+
/**
|
|
34309
|
+
* 引擎内部初始化
|
|
34310
|
+
*
|
|
34311
|
+
* @author chitanda
|
|
34312
|
+
* @date 2024-02-05 22:02:12
|
|
34313
|
+
* @protected
|
|
34314
|
+
*/
|
|
34315
|
+
init() {
|
|
34316
|
+
}
|
|
34267
34317
|
async onCreated() {
|
|
34268
34318
|
const { childNames } = this.view;
|
|
34269
34319
|
childNames.push("captionbar", "toolbar");
|
|
@@ -36418,6 +36468,7 @@ export {
|
|
|
36418
36468
|
openRedirectView,
|
|
36419
36469
|
parseFilters,
|
|
36420
36470
|
parseUserParams,
|
|
36471
|
+
parseViewProtocol,
|
|
36421
36472
|
presetAppCounterProvider,
|
|
36422
36473
|
presetDEMethodProvider,
|
|
36423
36474
|
presetUIActionProvider,
|