@ibiz-template/runtime 0.6.0-alpha.2 → 0.6.0-alpha.3
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 +155 -111
- package/dist/index.system.min.js +1 -1
- 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/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/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/nav-params/nav-params.js +2 -2
- package/package.json +2 -2
- 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/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/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/nav-params/nav-params.ts +2 -2
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;
|
|
@@ -1391,7 +1391,7 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1391
1391
|
// src/utils/verify/verify.ts
|
|
1392
1392
|
import { RuntimeError as RuntimeError3 } from "@ibiz-template/core";
|
|
1393
1393
|
import { isNilOrEmpty as isNilOrEmpty3, notNilEmpty as notNilEmpty4 } from "qx-util";
|
|
1394
|
-
import { isNil } from "ramda";
|
|
1394
|
+
import { isNil as isNil2 } from "ramda";
|
|
1395
1395
|
function testCond(value, op, value2) {
|
|
1396
1396
|
if (Object.is(op, "IN")) {
|
|
1397
1397
|
return contains(value, value2);
|
|
@@ -1417,7 +1417,7 @@ function testCond(value, op, value2) {
|
|
|
1417
1417
|
case "ISNOTNULL":
|
|
1418
1418
|
return notNilEmpty4(value);
|
|
1419
1419
|
case "TESTNULL":
|
|
1420
|
-
return
|
|
1420
|
+
return isNil2(value);
|
|
1421
1421
|
case "IN":
|
|
1422
1422
|
return contains(value, value2);
|
|
1423
1423
|
case "NOTIN":
|
|
@@ -1490,7 +1490,7 @@ function strContain(value, value2, mode) {
|
|
|
1490
1490
|
// src/utils/verify/de-rule-verify.ts
|
|
1491
1491
|
import { RuntimeError as RuntimeError4 } from "@ibiz-template/core";
|
|
1492
1492
|
import { isNilOrEmpty as isNilOrEmpty4 } from "qx-util";
|
|
1493
|
-
import { isEmpty as isEmpty2, isNil as
|
|
1493
|
+
import { isEmpty as isEmpty2, isNil as isNil3 } from "ramda";
|
|
1494
1494
|
|
|
1495
1495
|
// src/utils/script/script-function.ts
|
|
1496
1496
|
import { mergeRight } from "ramda";
|
|
@@ -1844,7 +1844,7 @@ function checkFieldSimpleRule(value, op, value2, errorInfo, paramType, form, pri
|
|
|
1844
1844
|
const _value2Field = form[value2] ? form[value2] : value2;
|
|
1845
1845
|
value2 = _value2Field;
|
|
1846
1846
|
}
|
|
1847
|
-
if (
|
|
1847
|
+
if (isNil3(errorInfo) || isEmpty2(errorInfo)) {
|
|
1848
1848
|
errorInfo = "\u5185\u5BB9\u5FC5\u987B\u7B26\u5408\u503C\u89C4\u5219";
|
|
1849
1849
|
}
|
|
1850
1850
|
const result = testCond(value, op, value2);
|
|
@@ -6347,7 +6347,7 @@ DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
|
|
|
6347
6347
|
|
|
6348
6348
|
// src/service/utils/dynamic-code-list/dynamic-code-list.ts
|
|
6349
6349
|
import { ModelError as ModelError5, RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
6350
|
-
import { isNil as
|
|
6350
|
+
import { isNil as isNil4 } from "ramda";
|
|
6351
6351
|
var DynamicCodeListCache = class {
|
|
6352
6352
|
constructor(codeList) {
|
|
6353
6353
|
/**
|
|
@@ -6580,7 +6580,7 @@ var DynamicCodeListCache = class {
|
|
|
6580
6580
|
}
|
|
6581
6581
|
const promise = this.load(context, params);
|
|
6582
6582
|
const { cacheTimeout } = this.codeList;
|
|
6583
|
-
const waitTime = cacheTimeout === -1 ||
|
|
6583
|
+
const waitTime = cacheTimeout === -1 || isNil4(cacheTimeout) ? ibiz.config.codeList.timeout : this.codeList.cacheTimeout;
|
|
6584
6584
|
const cacheData = {
|
|
6585
6585
|
expirationTime: (/* @__PURE__ */ new Date()).getTime() + waitTime,
|
|
6586
6586
|
promise
|
|
@@ -6594,17 +6594,17 @@ var DynamicCodeListCache = class {
|
|
|
6594
6594
|
};
|
|
6595
6595
|
|
|
6596
6596
|
// src/service/utils/de-cache/de-cache.ts
|
|
6597
|
-
import { where, equals, clone as clone4, isNil as
|
|
6597
|
+
import { where, equals, clone as clone4, isNil as isNil6, isEmpty as isEmpty5 } from "ramda";
|
|
6598
6598
|
import { createUUID as createUUID2 } from "qx-util";
|
|
6599
6599
|
import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
6600
6600
|
|
|
6601
6601
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
6602
6602
|
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
6603
|
-
import { isEmpty as isEmpty4, isNil as
|
|
6603
|
+
import { isEmpty as isEmpty4, isNil as isNil5 } from "ramda";
|
|
6604
6604
|
function isExistSrfKey(funcName, entity) {
|
|
6605
6605
|
if (entity != null) {
|
|
6606
6606
|
const { srfkey } = entity;
|
|
6607
|
-
if (!
|
|
6607
|
+
if (!isNil5(srfkey) && !isEmpty4(srfkey)) {
|
|
6608
6608
|
return true;
|
|
6609
6609
|
}
|
|
6610
6610
|
}
|
|
@@ -6612,7 +6612,7 @@ function isExistSrfKey(funcName, entity) {
|
|
|
6612
6612
|
}
|
|
6613
6613
|
function isExistSessionId(funcName, context) {
|
|
6614
6614
|
const { srfsessionid } = context;
|
|
6615
|
-
if (!
|
|
6615
|
+
if (!isNil5(srfsessionid) && !isEmpty4(srfsessionid)) {
|
|
6616
6616
|
return true;
|
|
6617
6617
|
}
|
|
6618
6618
|
throw new RuntimeError15("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
|
|
@@ -6708,7 +6708,7 @@ var DECache = class {
|
|
|
6708
6708
|
}
|
|
6709
6709
|
try {
|
|
6710
6710
|
isExistSessionId("add", context);
|
|
6711
|
-
if (
|
|
6711
|
+
if (isNil6(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
6712
6712
|
entity.srfkey = createUUID2();
|
|
6713
6713
|
}
|
|
6714
6714
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -6852,7 +6852,7 @@ var DECache = class {
|
|
|
6852
6852
|
const t = this.getTransaction(context);
|
|
6853
6853
|
for (let i = 0; i < entities.length; i++) {
|
|
6854
6854
|
const entity = entities[i];
|
|
6855
|
-
if (
|
|
6855
|
+
if (isNil6(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
6856
6856
|
entity.srfkey = createUUID2();
|
|
6857
6857
|
}
|
|
6858
6858
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -7043,7 +7043,7 @@ var DECache = class {
|
|
|
7043
7043
|
}
|
|
7044
7044
|
);
|
|
7045
7045
|
const unionValues = unionKeys.map((key) => {
|
|
7046
|
-
if (
|
|
7046
|
+
if (isNil6(data[key])) {
|
|
7047
7047
|
return "__empty__";
|
|
7048
7048
|
}
|
|
7049
7049
|
return data[key];
|
|
@@ -7117,7 +7117,7 @@ function calcResPath(context, entity) {
|
|
|
7117
7117
|
}
|
|
7118
7118
|
|
|
7119
7119
|
// src/service/utils/search-filter/search-filter.ts
|
|
7120
|
-
import { isEmpty as isEmpty6, isNil as
|
|
7120
|
+
import { isEmpty as isEmpty6, isNil as isNil7 } from "ramda";
|
|
7121
7121
|
var SearchFilter = class {
|
|
7122
7122
|
/**
|
|
7123
7123
|
* Creates an instance of SearchFilter.
|
|
@@ -7165,16 +7165,16 @@ var SearchFilter = class {
|
|
|
7165
7165
|
this.sortMode = "ASC";
|
|
7166
7166
|
this.context = context;
|
|
7167
7167
|
if (data) {
|
|
7168
|
-
if (!
|
|
7168
|
+
if (!isNil7(data.page) && !isEmpty6(data.page)) {
|
|
7169
7169
|
this.page = data.page;
|
|
7170
7170
|
}
|
|
7171
|
-
if (!
|
|
7171
|
+
if (!isNil7(data.size) && !isEmpty6(data.size)) {
|
|
7172
7172
|
this.size = data.size;
|
|
7173
7173
|
}
|
|
7174
|
-
if (!
|
|
7174
|
+
if (!isNil7(data.query) && !isEmpty6(data.query)) {
|
|
7175
7175
|
this.query = data.query;
|
|
7176
7176
|
}
|
|
7177
|
-
if (!
|
|
7177
|
+
if (!isNil7(data.sort) && !isEmpty6(data.sort)) {
|
|
7178
7178
|
const arr = data.sort.split(",");
|
|
7179
7179
|
if (arr.length >= 1) {
|
|
7180
7180
|
[this.sortField] = arr;
|
|
@@ -7895,7 +7895,7 @@ var FileService = class {
|
|
|
7895
7895
|
};
|
|
7896
7896
|
|
|
7897
7897
|
// src/service/app-data-entity/app-data-entity.ts
|
|
7898
|
-
import { clone as clone5, isNil as
|
|
7898
|
+
import { clone as clone5, isNil as isNil8 } from "ramda";
|
|
7899
7899
|
import { DataTypes } from "@ibiz-template/core";
|
|
7900
7900
|
import { createUUID as createUUID3 } from "qx-util";
|
|
7901
7901
|
|
|
@@ -7988,7 +7988,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
7988
7988
|
enumerable: false,
|
|
7989
7989
|
configurable: true,
|
|
7990
7990
|
writable: true,
|
|
7991
|
-
value:
|
|
7991
|
+
value: isNil8(this.srfkey) ? createUUID3() : this.srfkey
|
|
7992
7992
|
});
|
|
7993
7993
|
this.defineProperties();
|
|
7994
7994
|
}
|
|
@@ -8078,11 +8078,11 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
8078
8078
|
if (value == null) {
|
|
8079
8079
|
return value;
|
|
8080
8080
|
}
|
|
8081
|
-
if (
|
|
8081
|
+
if (isNil8(dataType)) {
|
|
8082
8082
|
return value;
|
|
8083
8083
|
}
|
|
8084
8084
|
if (DataTypes.isNumber(dataType)) {
|
|
8085
|
-
const numVal = !
|
|
8085
|
+
const numVal = !isNil8(value) && value !== "" ? Number(value) : value;
|
|
8086
8086
|
if (Number.isNaN(numVal)) {
|
|
8087
8087
|
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
8088
8088
|
return value;
|
|
@@ -8601,7 +8601,7 @@ import { clone as clone8 } from "@ibiz-template/core";
|
|
|
8601
8601
|
|
|
8602
8602
|
// src/service/vo/control.vo.ts
|
|
8603
8603
|
import { createUUID as createUUID4 } from "qx-util";
|
|
8604
|
-
import { clone as clone7, isNil as
|
|
8604
|
+
import { clone as clone7, isNil as isNil9 } from "ramda";
|
|
8605
8605
|
var BuildInKeys = [
|
|
8606
8606
|
"srfkey",
|
|
8607
8607
|
"srfmajortext",
|
|
@@ -8690,7 +8690,7 @@ var ControlVO = class _ControlVO {
|
|
|
8690
8690
|
enumerable: false,
|
|
8691
8691
|
configurable: true,
|
|
8692
8692
|
writable: true,
|
|
8693
|
-
value:
|
|
8693
|
+
value: isNil9(this.srfkey) ? createUUID4() : this.srfkey
|
|
8694
8694
|
});
|
|
8695
8695
|
}
|
|
8696
8696
|
Object.defineProperty(this, "srfuf", {
|
|
@@ -9414,7 +9414,7 @@ var V7AuthService = class {
|
|
|
9414
9414
|
};
|
|
9415
9415
|
|
|
9416
9416
|
// src/service/service/async-action/async-action.service.ts
|
|
9417
|
-
import { isNil as
|
|
9417
|
+
import { isNil as isNil10 } from "ramda";
|
|
9418
9418
|
var AsyncActionService = class {
|
|
9419
9419
|
/**
|
|
9420
9420
|
* 获取异步操作的集合
|
|
@@ -9425,7 +9425,7 @@ var AsyncActionService = class {
|
|
|
9425
9425
|
*/
|
|
9426
9426
|
async fetch(params = {}) {
|
|
9427
9427
|
const res = await ibiz.net.post("/portal/asyncaction/all", params);
|
|
9428
|
-
if (
|
|
9428
|
+
if (isNil10(res.data)) {
|
|
9429
9429
|
res.data = [];
|
|
9430
9430
|
}
|
|
9431
9431
|
return res;
|
|
@@ -9450,7 +9450,7 @@ import {
|
|
|
9450
9450
|
RuntimeError as RuntimeError23,
|
|
9451
9451
|
RuntimeModelError as RuntimeModelError22
|
|
9452
9452
|
} from "@ibiz-template/core";
|
|
9453
|
-
import { isArray as isArray6, isNil as
|
|
9453
|
+
import { isArray as isArray6, isNil as isNil11 } from "lodash-es";
|
|
9454
9454
|
import { ascSort } from "qx-util";
|
|
9455
9455
|
import { clone as clone14 } from "ramda";
|
|
9456
9456
|
|
|
@@ -10855,7 +10855,7 @@ var DEActionMethod = class extends Method {
|
|
|
10855
10855
|
let path2 = this.calcPath(context);
|
|
10856
10856
|
if (this.method.needResourceKey) {
|
|
10857
10857
|
let srfkey = context[this.entity.codeName.toLowerCase()];
|
|
10858
|
-
if (
|
|
10858
|
+
if (isNil11(srfkey)) {
|
|
10859
10859
|
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
10860
10860
|
}
|
|
10861
10861
|
path2 = "".concat(path2, "/").concat(srfkey);
|
|
@@ -11280,7 +11280,7 @@ import {
|
|
|
11280
11280
|
RuntimeModelError as RuntimeModelError23
|
|
11281
11281
|
} from "@ibiz-template/core";
|
|
11282
11282
|
import { isArray as isArray7 } from "lodash-es";
|
|
11283
|
-
import { clone as clone15, isEmpty as isEmpty7, isNil as
|
|
11283
|
+
import { clone as clone15, isEmpty as isEmpty7, isNil as isNil12 } from "ramda";
|
|
11284
11284
|
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
11285
11285
|
var FetchMethod = class extends Method {
|
|
11286
11286
|
async exec(context, params, params2, header) {
|
|
@@ -11357,7 +11357,7 @@ var FetchMethod = class extends Method {
|
|
|
11357
11357
|
}
|
|
11358
11358
|
}
|
|
11359
11359
|
}
|
|
11360
|
-
if (!
|
|
11360
|
+
if (!isNil12(filter.sortField) && !isEmpty7(filter.sortField)) {
|
|
11361
11361
|
if (filter.sortMode === "DESC") {
|
|
11362
11362
|
list = descSort(list, filter.sortField);
|
|
11363
11363
|
} else {
|
|
@@ -11424,7 +11424,7 @@ function presetDEMethodProvider() {
|
|
|
11424
11424
|
}
|
|
11425
11425
|
|
|
11426
11426
|
// src/service/service/internal-message/internal-message.service.ts
|
|
11427
|
-
import { isNil as
|
|
11427
|
+
import { isNil as isNil13 } from "ramda";
|
|
11428
11428
|
var InternalMessageService = class {
|
|
11429
11429
|
constructor() {
|
|
11430
11430
|
/**
|
|
@@ -11463,7 +11463,7 @@ var InternalMessageService = class {
|
|
|
11463
11463
|
res.total = Number(res.headers["x-total"]);
|
|
11464
11464
|
}
|
|
11465
11465
|
}
|
|
11466
|
-
if (
|
|
11466
|
+
if (isNil13(res.data)) {
|
|
11467
11467
|
res.data = [];
|
|
11468
11468
|
}
|
|
11469
11469
|
return res;
|
|
@@ -11661,7 +11661,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
11661
11661
|
|
|
11662
11662
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
11663
11663
|
import { updateKeyDefine } from "@ibiz-template/core";
|
|
11664
|
-
import { clone as clone16, isNil as
|
|
11664
|
+
import { clone as clone16, isNil as isNil14 } from "ramda";
|
|
11665
11665
|
var CloneExcludeKeys = ["_id", "_value", "_text", "_deData", "clone"];
|
|
11666
11666
|
var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
11667
11667
|
constructor(model, parentNodeData, opts) {
|
|
@@ -11778,7 +11778,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11778
11778
|
});
|
|
11779
11779
|
Object.keys(this).forEach((key) => {
|
|
11780
11780
|
const deKey = getDeKey(key);
|
|
11781
|
-
if (
|
|
11781
|
+
if (isNil14(deKey) && !CloneExcludeKeys.includes(key)) {
|
|
11782
11782
|
cloneNodeData[key] = this[key];
|
|
11783
11783
|
}
|
|
11784
11784
|
});
|
|
@@ -11787,7 +11787,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11787
11787
|
return new Proxy(this, {
|
|
11788
11788
|
set(target, p, value) {
|
|
11789
11789
|
const deKey = getDeKey(p);
|
|
11790
|
-
if (!
|
|
11790
|
+
if (!isNil14(deKey)) {
|
|
11791
11791
|
target._deData[deKey] = value;
|
|
11792
11792
|
} else {
|
|
11793
11793
|
target[p] = value;
|
|
@@ -11796,8 +11796,8 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
11796
11796
|
},
|
|
11797
11797
|
get(target, p, _receiver) {
|
|
11798
11798
|
const deKey = getDeKey(p);
|
|
11799
|
-
if (!
|
|
11800
|
-
return
|
|
11799
|
+
if (!isNil14(deKey)) {
|
|
11800
|
+
return isNil14(target._deData[deKey]) ? getKeyDefault(p) : target._deData[deKey];
|
|
11801
11801
|
}
|
|
11802
11802
|
return target[p];
|
|
11803
11803
|
},
|
|
@@ -11901,7 +11901,7 @@ var TreeStaticNodeData = class extends TreeNodeData {
|
|
|
11901
11901
|
|
|
11902
11902
|
// src/service/vo/ui-map-field.ts
|
|
11903
11903
|
import { DataTypes as DataTypes2 } from "@ibiz-template/core";
|
|
11904
|
-
import { isNil as
|
|
11904
|
+
import { isNil as isNil15 } from "ramda";
|
|
11905
11905
|
var UIMapField = class {
|
|
11906
11906
|
constructor(uiKey, dataKey, opts = {}) {
|
|
11907
11907
|
/**
|
|
@@ -11922,10 +11922,10 @@ var UIMapField = class {
|
|
|
11922
11922
|
this.isRequestNeed = true;
|
|
11923
11923
|
this.uiKey = uiKey;
|
|
11924
11924
|
this.dataKey = dataKey;
|
|
11925
|
-
if (!
|
|
11925
|
+
if (!isNil15(opts.isOriginField)) {
|
|
11926
11926
|
this.isOriginField = opts.isOriginField;
|
|
11927
11927
|
}
|
|
11928
|
-
if (!
|
|
11928
|
+
if (!isNil15(opts.dataType)) {
|
|
11929
11929
|
this.dataType = opts.dataType;
|
|
11930
11930
|
}
|
|
11931
11931
|
}
|
|
@@ -11940,7 +11940,7 @@ var UIMapField = class {
|
|
|
11940
11940
|
return value;
|
|
11941
11941
|
}
|
|
11942
11942
|
if (DataTypes2.isNumber(this.dataType)) {
|
|
11943
|
-
const numVal = !
|
|
11943
|
+
const numVal = !isNil15(value) && value !== "" ? Number(value) : value;
|
|
11944
11944
|
if (Number.isNaN(numVal)) {
|
|
11945
11945
|
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
11946
11946
|
return value;
|
|
@@ -13250,7 +13250,7 @@ var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
|
|
|
13250
13250
|
// src/controller/common/view/view.controller.ts
|
|
13251
13251
|
import { notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
13252
13252
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
13253
|
-
import { isEmpty as isEmpty8, isNil as
|
|
13253
|
+
import { isEmpty as isEmpty8, isNil as isNil21, isNotNil as isNotNil2 } from "ramda";
|
|
13254
13254
|
|
|
13255
13255
|
// src/controller/utils/loading/loading.state.ts
|
|
13256
13256
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -13640,6 +13640,9 @@ var UIActionButtonState = class {
|
|
|
13640
13640
|
} else if (noPrivDisplayMode === 6) {
|
|
13641
13641
|
this.visible = false;
|
|
13642
13642
|
}
|
|
13643
|
+
if ([2, 6].includes(noPrivDisplayMode) && this.dataAccessAction) {
|
|
13644
|
+
this.visible = false;
|
|
13645
|
+
}
|
|
13643
13646
|
if (actionTarget && actionTarget !== "NONE" || uiactionMode === "SYS" && [
|
|
13644
13647
|
"Save",
|
|
13645
13648
|
"SaveAndExit",
|
|
@@ -13740,6 +13743,13 @@ var ButtonContainerState = class {
|
|
|
13740
13743
|
})
|
|
13741
13744
|
);
|
|
13742
13745
|
}
|
|
13746
|
+
async init() {
|
|
13747
|
+
await Promise.all(
|
|
13748
|
+
this.children.map((child) => {
|
|
13749
|
+
return child.init();
|
|
13750
|
+
})
|
|
13751
|
+
);
|
|
13752
|
+
}
|
|
13743
13753
|
};
|
|
13744
13754
|
|
|
13745
13755
|
// src/controller/utils/event/qx-event-ex.ts
|
|
@@ -13882,9 +13892,9 @@ function hasSubRoute(routeDepth) {
|
|
|
13882
13892
|
}
|
|
13883
13893
|
|
|
13884
13894
|
// src/controller/utils/util/util.ts
|
|
13885
|
-
import { isNil as
|
|
13895
|
+
import { isNil as isNil16 } from "ramda";
|
|
13886
13896
|
function isValueChange(value, value2) {
|
|
13887
|
-
if ((
|
|
13897
|
+
if ((isNil16(value) || value === "") && (isNil16(value2) || value2 === "")) {
|
|
13888
13898
|
return false;
|
|
13889
13899
|
}
|
|
13890
13900
|
return value !== value2;
|
|
@@ -13900,7 +13910,7 @@ function getOriginData(data) {
|
|
|
13900
13910
|
// src/controller/utils/value-rule/value-rule.ts
|
|
13901
13911
|
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
13902
13912
|
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
13903
|
-
import { isNil as
|
|
13913
|
+
import { isNil as isNil17 } from "ramda";
|
|
13904
13914
|
function generateRules(itemVRs, name, valueItemName) {
|
|
13905
13915
|
const rules = [];
|
|
13906
13916
|
itemVRs.forEach((item) => {
|
|
@@ -13965,7 +13975,7 @@ function generateEditorRules(editor) {
|
|
|
13965
13975
|
if (maxLength) {
|
|
13966
13976
|
rules.push({
|
|
13967
13977
|
validator: (rule, value, callback) => {
|
|
13968
|
-
if (!
|
|
13978
|
+
if (!isNil17(value) && value.length > maxLength) {
|
|
13969
13979
|
callback(
|
|
13970
13980
|
new Error(
|
|
13971
13981
|
"\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
|
|
@@ -13980,7 +13990,7 @@ function generateEditorRules(editor) {
|
|
|
13980
13990
|
if (minLength) {
|
|
13981
13991
|
rules.push({
|
|
13982
13992
|
validator: (rule, value, callback) => {
|
|
13983
|
-
if (!
|
|
13993
|
+
if (!isNil17(value) && value.length < minLength) {
|
|
13984
13994
|
callback(
|
|
13985
13995
|
new Error(
|
|
13986
13996
|
"\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
|
|
@@ -13992,10 +14002,10 @@ function generateEditorRules(editor) {
|
|
|
13992
14002
|
}
|
|
13993
14003
|
});
|
|
13994
14004
|
}
|
|
13995
|
-
if (!
|
|
14005
|
+
if (!isNil17(maxValue)) {
|
|
13996
14006
|
rules.push({
|
|
13997
14007
|
validator: (rule, value, callback) => {
|
|
13998
|
-
if (!
|
|
14008
|
+
if (!isNil17(value) && isNumber(value) && value > maxValue) {
|
|
13999
14009
|
callback(new Error("\u503C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxValue)));
|
|
14000
14010
|
} else {
|
|
14001
14011
|
return true;
|
|
@@ -14003,10 +14013,10 @@ function generateEditorRules(editor) {
|
|
|
14003
14013
|
}
|
|
14004
14014
|
});
|
|
14005
14015
|
}
|
|
14006
|
-
if (!
|
|
14016
|
+
if (!isNil17(minValue)) {
|
|
14007
14017
|
rules.push({
|
|
14008
14018
|
validator: (rule, value, callback) => {
|
|
14009
|
-
if (!
|
|
14019
|
+
if (!isNil17(value) && isNumber(value) && value < minValue) {
|
|
14010
14020
|
callback(new Error("\u503C\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minValue)));
|
|
14011
14021
|
} else {
|
|
14012
14022
|
return true;
|
|
@@ -14019,7 +14029,7 @@ function generateEditorRules(editor) {
|
|
|
14019
14029
|
|
|
14020
14030
|
// src/controller/utils/value-ex/value-ex.ts
|
|
14021
14031
|
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
14022
|
-
import { isNil as
|
|
14032
|
+
import { isNil as isNil18, mergeLeft } from "ramda";
|
|
14023
14033
|
var ValueExUtil = class {
|
|
14024
14034
|
/**
|
|
14025
14035
|
* 合并默认值
|
|
@@ -14044,7 +14054,7 @@ var ValueExUtil = class {
|
|
|
14044
14054
|
* @return {*} {string}
|
|
14045
14055
|
*/
|
|
14046
14056
|
static toText(options, value) {
|
|
14047
|
-
if (
|
|
14057
|
+
if (isNil18(value) || value === "") {
|
|
14048
14058
|
return "";
|
|
14049
14059
|
}
|
|
14050
14060
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
@@ -14069,12 +14079,12 @@ var ValueExUtil = class {
|
|
|
14069
14079
|
import { RuntimeError as RuntimeError31, ModelError as ModelError17 } from "@ibiz-template/core";
|
|
14070
14080
|
import dayjs from "dayjs";
|
|
14071
14081
|
import { createUUID as createUUID8 } from "qx-util";
|
|
14072
|
-
import { isNil as
|
|
14082
|
+
import { isNil as isNil19, isNotNil } from "ramda";
|
|
14073
14083
|
function getDefaultValue(opts, origins) {
|
|
14074
14084
|
var _a;
|
|
14075
14085
|
const { name, valueType, defaultValue, valueFormat } = opts;
|
|
14076
14086
|
const { data, context, params } = origins;
|
|
14077
|
-
if (
|
|
14087
|
+
if (isNil19(valueType) && isNil19(defaultValue)) {
|
|
14078
14088
|
return;
|
|
14079
14089
|
}
|
|
14080
14090
|
if (valueType === "RESET") {
|
|
@@ -14428,7 +14438,7 @@ var BaseController = class {
|
|
|
14428
14438
|
|
|
14429
14439
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
14430
14440
|
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
14431
|
-
import { isNil as
|
|
14441
|
+
import { isNil as isNil20, mergeRight as mergeRight2 } from "ramda";
|
|
14432
14442
|
var ViewMsgController = class _ViewMsgController {
|
|
14433
14443
|
constructor(msgGroupId) {
|
|
14434
14444
|
this.msgGroupId = msgGroupId;
|
|
@@ -14613,19 +14623,19 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
14613
14623
|
const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
|
|
14614
14624
|
const deViewMessages = dataSet.map((item) => {
|
|
14615
14625
|
const message = {};
|
|
14616
|
-
if (positionField && !
|
|
14626
|
+
if (positionField && !isNil20(item[positionField])) {
|
|
14617
14627
|
message.position = item[positionField];
|
|
14618
14628
|
}
|
|
14619
|
-
if (titleField && !
|
|
14629
|
+
if (titleField && !isNil20(item[titleField])) {
|
|
14620
14630
|
message.title = item[titleField];
|
|
14621
14631
|
}
|
|
14622
|
-
if (messageField && !
|
|
14632
|
+
if (messageField && !isNil20(item[messageField])) {
|
|
14623
14633
|
message.message = item[messageField];
|
|
14624
14634
|
}
|
|
14625
|
-
if (typeField && !
|
|
14635
|
+
if (typeField && !isNil20(item[typeField])) {
|
|
14626
14636
|
message.messageType = item[typeField];
|
|
14627
14637
|
}
|
|
14628
|
-
if (removeModeField && !
|
|
14638
|
+
if (removeModeField && !isNil20(item[removeModeField])) {
|
|
14629
14639
|
message.removeMode = item[removeModeField];
|
|
14630
14640
|
}
|
|
14631
14641
|
return mergeRight2(basicMsg, message);
|
|
@@ -14864,7 +14874,7 @@ var ViewController = class extends BaseController {
|
|
|
14864
14874
|
*/
|
|
14865
14875
|
handleContextParams() {
|
|
14866
14876
|
this.context.srfappid = this.model.appId;
|
|
14867
|
-
if (
|
|
14877
|
+
if (isNil21(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
14868
14878
|
const domain = ibiz.uiDomainManager.create(this.id);
|
|
14869
14879
|
this.context.srfsessionid = domain.id;
|
|
14870
14880
|
}
|
|
@@ -15253,7 +15263,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
15253
15263
|
|
|
15254
15264
|
// src/controller/common/control/control.controller.ts
|
|
15255
15265
|
import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
|
|
15256
|
-
import { clone as clone18, isNil as
|
|
15266
|
+
import { clone as clone18, isNil as isNil22 } from "ramda";
|
|
15257
15267
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
15258
15268
|
var ControlController = class extends BaseController {
|
|
15259
15269
|
/**
|
|
@@ -15541,7 +15551,7 @@ var ControlController = class extends BaseController {
|
|
|
15541
15551
|
let message;
|
|
15542
15552
|
let duration;
|
|
15543
15553
|
if (msgItem && msgItem.content) {
|
|
15544
|
-
duration =
|
|
15554
|
+
duration = isNil22(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
|
|
15545
15555
|
const scriptParams = { ...this.getEventArgs() };
|
|
15546
15556
|
if (opts == null ? void 0 : opts.data) {
|
|
15547
15557
|
scriptParams.data = opts.data;
|
|
@@ -16573,7 +16583,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
16573
16583
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
16574
16584
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
16575
16585
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
16576
|
-
import { clone as clone20, isNil as
|
|
16586
|
+
import { clone as clone20, isNil as isNil23, mergeDeepRight } from "ramda";
|
|
16577
16587
|
dayjs4.extend(minMax2);
|
|
16578
16588
|
dayjs4.extend(isSameOrBefore);
|
|
16579
16589
|
dayjs4.extend(quarterOfYear);
|
|
@@ -16669,10 +16679,10 @@ var BaseSeriesGenerator = class {
|
|
|
16669
16679
|
* @return {*} {(string | undefined)}
|
|
16670
16680
|
*/
|
|
16671
16681
|
translateVal(codeListKey, val, isExclude = false) {
|
|
16672
|
-
if (
|
|
16682
|
+
if (isNil23(val)) {
|
|
16673
16683
|
return void 0;
|
|
16674
16684
|
}
|
|
16675
|
-
if (
|
|
16685
|
+
if (isNil23(codeListKey)) {
|
|
16676
16686
|
return val;
|
|
16677
16687
|
}
|
|
16678
16688
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
@@ -16721,7 +16731,7 @@ var BaseSeriesGenerator = class {
|
|
|
16721
16731
|
seriesCodeListId,
|
|
16722
16732
|
item[this.groupField]
|
|
16723
16733
|
);
|
|
16724
|
-
if (
|
|
16734
|
+
if (isNil23(groupVal)) {
|
|
16725
16735
|
return;
|
|
16726
16736
|
}
|
|
16727
16737
|
group = groupVal;
|
|
@@ -17718,6 +17728,9 @@ var CaptionBarController = class extends ControlController {
|
|
|
17718
17728
|
await super.onCreated();
|
|
17719
17729
|
this.view.evt.on("onViewInfoChange", ({ caption: _caption, dataInfo }) => {
|
|
17720
17730
|
this.state.caption = "".concat(this.view.model.caption).concat(dataInfo ? "-".concat(dataInfo) : "");
|
|
17731
|
+
if (this.view.modal.mode === "ROUTE") {
|
|
17732
|
+
ibiz.util.setBrowserTitle(this.state.caption);
|
|
17733
|
+
}
|
|
17721
17734
|
});
|
|
17722
17735
|
}
|
|
17723
17736
|
};
|
|
@@ -19435,6 +19448,27 @@ var UIActionProviderBase = class {
|
|
|
19435
19448
|
});
|
|
19436
19449
|
}
|
|
19437
19450
|
}
|
|
19451
|
+
/**
|
|
19452
|
+
* 处理打开视图配置自定义参数 modalOption
|
|
19453
|
+
*
|
|
19454
|
+
* @author zk
|
|
19455
|
+
* @date 2024-02-01 01:02:28
|
|
19456
|
+
* @param {IData} param
|
|
19457
|
+
* @return {*} {IData}
|
|
19458
|
+
* @memberof FrontUIActionProvider
|
|
19459
|
+
*/
|
|
19460
|
+
handleViewOptionParams(param) {
|
|
19461
|
+
if (param.modaloption) {
|
|
19462
|
+
try {
|
|
19463
|
+
const modalOption = JSON.parse(param.modaloption);
|
|
19464
|
+
delete param.modaloption;
|
|
19465
|
+
return { modalOption };
|
|
19466
|
+
} catch (error) {
|
|
19467
|
+
ibiz.log.error("\u89C6\u56FE\u53C2\u6570modalOption \u89E3\u6790\u5931\u8D25\uFF1A".concat(error));
|
|
19468
|
+
}
|
|
19469
|
+
}
|
|
19470
|
+
return {};
|
|
19471
|
+
}
|
|
19438
19472
|
};
|
|
19439
19473
|
|
|
19440
19474
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
@@ -19456,12 +19490,13 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
19456
19490
|
const tempParams = { ...resultParams };
|
|
19457
19491
|
const frontPSAppView = action.frontAppViewId;
|
|
19458
19492
|
if (frontPSAppView) {
|
|
19493
|
+
const options = this.handleViewOptionParams(resultParams);
|
|
19459
19494
|
const res2 = await ibiz.commands.execute(
|
|
19460
19495
|
OpenAppViewCommand.TAG,
|
|
19461
19496
|
frontPSAppView,
|
|
19462
19497
|
resultContext,
|
|
19463
19498
|
resultParams,
|
|
19464
|
-
{ event }
|
|
19499
|
+
{ event, ...options }
|
|
19465
19500
|
);
|
|
19466
19501
|
if (!(res2 == null ? void 0 : res2.ok)) {
|
|
19467
19502
|
actionResult.cancel = true;
|
|
@@ -19634,27 +19669,6 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19634
19669
|
}
|
|
19635
19670
|
return actionResult;
|
|
19636
19671
|
}
|
|
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
19672
|
/**
|
|
19659
19673
|
* 处理模式:用户自定义
|
|
19660
19674
|
* @author lxm
|
|
@@ -19971,7 +19985,11 @@ var ToolbarController = class extends ControlController {
|
|
|
19971
19985
|
},
|
|
19972
19986
|
{ childrenFields: ["detoolbarItems"] }
|
|
19973
19987
|
);
|
|
19974
|
-
|
|
19988
|
+
if (!this.state.manualCalcButtonState) {
|
|
19989
|
+
await this.calcButtonState();
|
|
19990
|
+
} else {
|
|
19991
|
+
await this.state.buttonsState.init();
|
|
19992
|
+
}
|
|
19975
19993
|
}
|
|
19976
19994
|
/**
|
|
19977
19995
|
* 工具栏按钮点击事件
|
|
@@ -20525,7 +20543,7 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
20525
20543
|
|
|
20526
20544
|
// src/controller/control/data-view/data-view.controller.ts
|
|
20527
20545
|
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
20528
|
-
import { isNil as
|
|
20546
|
+
import { isNil as isNil24 } from "ramda";
|
|
20529
20547
|
|
|
20530
20548
|
// src/controller/control/data-view/data-view.service.ts
|
|
20531
20549
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -20813,7 +20831,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20813
20831
|
const groupMap = /* @__PURE__ */ new Map();
|
|
20814
20832
|
items.forEach((item) => {
|
|
20815
20833
|
const groupVal = item[groupAppDEFieldId];
|
|
20816
|
-
if (
|
|
20834
|
+
if (isNil24(groupVal)) {
|
|
20817
20835
|
return;
|
|
20818
20836
|
}
|
|
20819
20837
|
if (!groupMap.has(groupVal)) {
|
|
@@ -25404,6 +25422,7 @@ var GridController = class extends MDControlController {
|
|
|
25404
25422
|
);
|
|
25405
25423
|
}
|
|
25406
25424
|
}
|
|
25425
|
+
this.calcColumnFixed();
|
|
25407
25426
|
}
|
|
25408
25427
|
async afterLoad(args, items) {
|
|
25409
25428
|
await super.afterLoad(args, items);
|
|
@@ -25709,7 +25728,8 @@ var GridController = class extends MDControlController {
|
|
|
25709
25728
|
key: column.codeName,
|
|
25710
25729
|
caption: column.caption,
|
|
25711
25730
|
hidden: !!column.hideDefault || !!column.hiddenDataItem,
|
|
25712
|
-
uaColumn: column.columnType === "UAGRIDCOLUMN"
|
|
25731
|
+
uaColumn: column.columnType === "UAGRIDCOLUMN",
|
|
25732
|
+
adaptive: column.widthUnit === "STAR"
|
|
25713
25733
|
});
|
|
25714
25734
|
}
|
|
25715
25735
|
},
|
|
@@ -25730,7 +25750,11 @@ var GridController = class extends MDControlController {
|
|
|
25730
25750
|
);
|
|
25731
25751
|
const allNum = showColumns.length;
|
|
25732
25752
|
const { frozenFirstColumn, frozenLastColumn } = this.model;
|
|
25753
|
+
this.hasAdaptiveColumn = false;
|
|
25733
25754
|
showColumns.forEach((column, index) => {
|
|
25755
|
+
if (column.adaptive) {
|
|
25756
|
+
this.hasAdaptiveColumn = true;
|
|
25757
|
+
}
|
|
25734
25758
|
if (column.uaColumn) {
|
|
25735
25759
|
column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
|
|
25736
25760
|
} else if (frozenFirstColumn && index < frozenFirstColumn) {
|
|
@@ -26199,6 +26223,7 @@ var GridController = class extends MDControlController {
|
|
|
26199
26223
|
*/
|
|
26200
26224
|
setColumnVisible(columnState) {
|
|
26201
26225
|
columnState.hidden = !columnState.hidden;
|
|
26226
|
+
this.calcColumnFixed();
|
|
26202
26227
|
this.saveColumnStates();
|
|
26203
26228
|
}
|
|
26204
26229
|
/**
|
|
@@ -26216,6 +26241,7 @@ var GridController = class extends MDControlController {
|
|
|
26216
26241
|
}
|
|
26217
26242
|
if (data.columnstates) {
|
|
26218
26243
|
this.state.columnStates = data.columnstates;
|
|
26244
|
+
this.calcColumnFixed();
|
|
26219
26245
|
} else {
|
|
26220
26246
|
this.initColumnStates();
|
|
26221
26247
|
}
|
|
@@ -26233,6 +26259,7 @@ var GridController = class extends MDControlController {
|
|
|
26233
26259
|
if (columnState) {
|
|
26234
26260
|
this.state.columnStates.splice(oldIndex, 1);
|
|
26235
26261
|
this.state.columnStates.splice(newIndex, 0, columnState);
|
|
26262
|
+
this.calcColumnFixed();
|
|
26236
26263
|
this.saveColumnStates();
|
|
26237
26264
|
}
|
|
26238
26265
|
}
|
|
@@ -26266,7 +26293,7 @@ var GridController = class extends MDControlController {
|
|
|
26266
26293
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
26267
26294
|
import dayjs5 from "dayjs";
|
|
26268
26295
|
import { debounce as debounce3 } from "lodash-es";
|
|
26269
|
-
import { clone as clone27, isNil as
|
|
26296
|
+
import { clone as clone27, isNil as isNil25 } from "ramda";
|
|
26270
26297
|
var GridFieldColumnController = class extends GridColumnController {
|
|
26271
26298
|
constructor() {
|
|
26272
26299
|
super(...arguments);
|
|
@@ -26478,11 +26505,11 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26478
26505
|
*/
|
|
26479
26506
|
calcFieldAgg(items) {
|
|
26480
26507
|
const { aggField, aggMode, aggValueFormat, unitName } = this.model;
|
|
26481
|
-
if (
|
|
26508
|
+
if (isNil25(aggMode) || aggMode === "NONE") {
|
|
26482
26509
|
return;
|
|
26483
26510
|
}
|
|
26484
26511
|
const fieldName = aggField || this.model.id;
|
|
26485
|
-
items = items.filter((item) => !
|
|
26512
|
+
items = items.filter((item) => !isNil25(item[fieldName]));
|
|
26486
26513
|
let aggValue;
|
|
26487
26514
|
if (this.grid.model.aggMode === "PAGE") {
|
|
26488
26515
|
switch (aggMode) {
|
|
@@ -27483,6 +27510,13 @@ var PanelItemController = class {
|
|
|
27483
27510
|
* @returns {*} {Promise<void>}
|
|
27484
27511
|
*/
|
|
27485
27512
|
async init() {
|
|
27513
|
+
var _a;
|
|
27514
|
+
const hasVisibleLogic = !!((_a = this.model.panelItemGroupLogics) == null ? void 0 : _a.find(
|
|
27515
|
+
(logic) => logic.logicCat === "PANELVISIBLE"
|
|
27516
|
+
));
|
|
27517
|
+
if (hasVisibleLogic) {
|
|
27518
|
+
this.state.visible = false;
|
|
27519
|
+
}
|
|
27486
27520
|
await this.onInit();
|
|
27487
27521
|
}
|
|
27488
27522
|
async onInit() {
|
|
@@ -27791,7 +27825,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
27791
27825
|
|
|
27792
27826
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
27793
27827
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
27794
|
-
import { clone as clone28, isNil as
|
|
27828
|
+
import { clone as clone28, isNil as isNil27 } from "ramda";
|
|
27795
27829
|
import { isString as isString2 } from "lodash-es";
|
|
27796
27830
|
|
|
27797
27831
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -28233,7 +28267,7 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
28233
28267
|
|
|
28234
28268
|
// src/controller/control/search-bar/use-searchcond.ts
|
|
28235
28269
|
import { RuntimeError as RuntimeError58, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
28236
|
-
import { isNil as
|
|
28270
|
+
import { isNil as isNil26 } from "ramda";
|
|
28237
28271
|
function getOriginFilterNodes() {
|
|
28238
28272
|
return [
|
|
28239
28273
|
{
|
|
@@ -28290,7 +28324,7 @@ function calcSearchConds(filterNodes) {
|
|
|
28290
28324
|
let hasError = false;
|
|
28291
28325
|
recursiveIterate9(filterNodes[0], (node) => {
|
|
28292
28326
|
if (node.leaf) {
|
|
28293
|
-
if (node.field && node.valueOP && !
|
|
28327
|
+
if (node.field && node.valueOP && !isNil26(node.value)) {
|
|
28294
28328
|
hasFilter = true;
|
|
28295
28329
|
} else {
|
|
28296
28330
|
hasError = true;
|
|
@@ -28589,7 +28623,7 @@ var SearchBarController = class extends ControlController {
|
|
|
28589
28623
|
recursiveIterate10(
|
|
28590
28624
|
searchconds[0],
|
|
28591
28625
|
(node) => {
|
|
28592
|
-
if (node.condtype === "DEFIELD" && !
|
|
28626
|
+
if (node.condtype === "DEFIELD" && !isNil27(node.value)) {
|
|
28593
28627
|
const controller = this.findFilterController(
|
|
28594
28628
|
node.fieldname,
|
|
28595
28629
|
node.condop
|
|
@@ -30385,7 +30419,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
30385
30419
|
|
|
30386
30420
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
30387
30421
|
import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
30388
|
-
import { isNil as
|
|
30422
|
+
import { isNil as isNil28 } from "ramda";
|
|
30389
30423
|
|
|
30390
30424
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
30391
30425
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -30612,7 +30646,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30612
30646
|
const groupMap = /* @__PURE__ */ new Map();
|
|
30613
30647
|
items.forEach((item) => {
|
|
30614
30648
|
const groupVal = item[groupAppDEFieldId];
|
|
30615
|
-
if (
|
|
30649
|
+
if (isNil28(groupVal)) {
|
|
30616
30650
|
return;
|
|
30617
30651
|
}
|
|
30618
30652
|
if (!groupMap.has(groupVal)) {
|
|
@@ -30689,7 +30723,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30689
30723
|
|
|
30690
30724
|
// src/controller/control/kanban/kanban.controller.ts
|
|
30691
30725
|
import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
30692
|
-
import { isNil as
|
|
30726
|
+
import { isNil as isNil29 } from "ramda";
|
|
30693
30727
|
|
|
30694
30728
|
// src/controller/control/kanban/kanban.service.ts
|
|
30695
30729
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -30774,7 +30808,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30774
30808
|
const isAsc = minorSortDir === "ASC";
|
|
30775
30809
|
items.forEach((item) => {
|
|
30776
30810
|
const sortValue = item[sortField];
|
|
30777
|
-
if (
|
|
30811
|
+
if (isNil29(sortValue)) {
|
|
30778
30812
|
item[sortField] = 0;
|
|
30779
30813
|
} else {
|
|
30780
30814
|
const toNum = Number(sortValue);
|
|
@@ -30881,7 +30915,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30881
30915
|
const groupMap = /* @__PURE__ */ new Map();
|
|
30882
30916
|
items.forEach((item) => {
|
|
30883
30917
|
const groupVal = item[groupAppDEFieldId];
|
|
30884
|
-
if (
|
|
30918
|
+
if (isNil29(groupVal)) {
|
|
30885
30919
|
return;
|
|
30886
30920
|
}
|
|
30887
30921
|
if (!groupMap.has(groupVal)) {
|
|
@@ -33495,7 +33529,7 @@ import { QXEvent as QXEvent9 } from "qx-util";
|
|
|
33495
33529
|
// src/controller/notification/async-action.controller.ts
|
|
33496
33530
|
import { QXEvent as QXEvent7 } from "qx-util";
|
|
33497
33531
|
import { clone as clone31 } from "ramda";
|
|
33498
|
-
import { isNil as
|
|
33532
|
+
import { isNil as isNil30, isNumber as isNumber2 } from "lodash-es";
|
|
33499
33533
|
import dayjs7 from "dayjs";
|
|
33500
33534
|
var AsyncActionController = class {
|
|
33501
33535
|
constructor() {
|
|
@@ -33570,14 +33604,14 @@ var AsyncActionController = class {
|
|
|
33570
33604
|
data[key] = dayjs7(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
33571
33605
|
}
|
|
33572
33606
|
});
|
|
33573
|
-
if (!
|
|
33607
|
+
if (!isNil30(data.actionresult)) {
|
|
33574
33608
|
try {
|
|
33575
33609
|
const json = JSON.parse(data.actionresult);
|
|
33576
33610
|
data.actionresult = json;
|
|
33577
33611
|
} catch (error) {
|
|
33578
33612
|
}
|
|
33579
33613
|
}
|
|
33580
|
-
if (!
|
|
33614
|
+
if (!isNil30(data.completionrate)) {
|
|
33581
33615
|
const num = Number(data.completionrate);
|
|
33582
33616
|
if (Number.isNaN(num)) {
|
|
33583
33617
|
data.completionrate = void 0;
|
|
@@ -34207,6 +34241,7 @@ var ViewEngineBase = class {
|
|
|
34207
34241
|
*/
|
|
34208
34242
|
constructor(view) {
|
|
34209
34243
|
this.view = view;
|
|
34244
|
+
this.init();
|
|
34210
34245
|
this.initViewState();
|
|
34211
34246
|
}
|
|
34212
34247
|
/**
|
|
@@ -34264,6 +34299,15 @@ var ViewEngineBase = class {
|
|
|
34264
34299
|
get viewLayoutPanel() {
|
|
34265
34300
|
return this.view.layoutPanel;
|
|
34266
34301
|
}
|
|
34302
|
+
/**
|
|
34303
|
+
* 引擎内部初始化
|
|
34304
|
+
*
|
|
34305
|
+
* @author chitanda
|
|
34306
|
+
* @date 2024-02-05 22:02:12
|
|
34307
|
+
* @protected
|
|
34308
|
+
*/
|
|
34309
|
+
init() {
|
|
34310
|
+
}
|
|
34267
34311
|
async onCreated() {
|
|
34268
34312
|
const { childNames } = this.view;
|
|
34269
34313
|
childNames.push("captionbar", "toolbar");
|