@ibiz-template/runtime 0.7.41-alpha.53 → 0.7.41-alpha.55
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 +110 -81
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/form/form-detail/form-button/form-button.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-button/form-button.controller.js +31 -7
- package/out/interface/api/controller/control/i-api-grid.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-mob-md-ctrl.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-tree-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-edit-form.event.d.ts +1 -2
- package/out/interface/controller/event/control/i-edit-form.event.d.ts.map +1 -1
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +2 -1
- package/out/service/service/entity/method/de-action.js +2 -2
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +6 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -28220,6 +28220,7 @@ import {
|
|
|
28220
28220
|
RuntimeModelError as RuntimeModelError8
|
|
28221
28221
|
} from "@ibiz-template/core";
|
|
28222
28222
|
import { createUUID as createUUID9 } from "qx-util";
|
|
28223
|
+
import { isNil as isNil15, isUndefined } from "lodash-es";
|
|
28223
28224
|
|
|
28224
28225
|
// src/service/service/work-flow/work-flow.service.ts
|
|
28225
28226
|
import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
|
|
@@ -29299,7 +29300,7 @@ var DEService = class {
|
|
|
29299
29300
|
path2 = "".concat(path2, "/createdownloadticket/").concat(srfkey);
|
|
29300
29301
|
}
|
|
29301
29302
|
const res = await this.app.net.get(path2, params);
|
|
29302
|
-
if (
|
|
29303
|
+
if (isNil15(res.data) || isUndefined(res.data)) {
|
|
29303
29304
|
ibiz.log.error(ibiz.i18n.t("runtime.deAction.responseDataError"), res);
|
|
29304
29305
|
}
|
|
29305
29306
|
return res;
|
|
@@ -30437,7 +30438,7 @@ var V7AuthService = class {
|
|
|
30437
30438
|
};
|
|
30438
30439
|
|
|
30439
30440
|
// src/service/service/async-action/async-action.service.ts
|
|
30440
|
-
import { isNil as
|
|
30441
|
+
import { isNil as isNil16 } from "ramda";
|
|
30441
30442
|
var AsyncActionService = class {
|
|
30442
30443
|
/**
|
|
30443
30444
|
* 获取异步操作的集合
|
|
@@ -30448,7 +30449,7 @@ var AsyncActionService = class {
|
|
|
30448
30449
|
*/
|
|
30449
30450
|
async fetch(params = {}) {
|
|
30450
30451
|
const res = await ibiz.net.post("/portal/asyncaction/all", params);
|
|
30451
|
-
if (
|
|
30452
|
+
if (isNil16(res.data)) {
|
|
30452
30453
|
res.data = [];
|
|
30453
30454
|
}
|
|
30454
30455
|
return res;
|
|
@@ -30473,7 +30474,7 @@ import {
|
|
|
30473
30474
|
RuntimeError as RuntimeError21,
|
|
30474
30475
|
RuntimeModelError as RuntimeModelError21
|
|
30475
30476
|
} from "@ibiz-template/core";
|
|
30476
|
-
import { isArray as isArray7, isNil as
|
|
30477
|
+
import { isArray as isArray7, isNil as isNil17, isUndefined as isUndefined2 } from "lodash-es";
|
|
30477
30478
|
import { ascSort } from "qx-util";
|
|
30478
30479
|
import { clone as clone16 } from "ramda";
|
|
30479
30480
|
|
|
@@ -30602,7 +30603,10 @@ var MethodReturn = class {
|
|
|
30602
30603
|
const items = await this.dto.sets(context, [data]);
|
|
30603
30604
|
return items[0];
|
|
30604
30605
|
}
|
|
30605
|
-
|
|
30606
|
+
const output = this.method.appDEMethodReturn;
|
|
30607
|
+
if (output && output.type === "SIMPLE") {
|
|
30608
|
+
data = { srfresult: data };
|
|
30609
|
+
} else if (isNilOrEmpty5(data)) {
|
|
30606
30610
|
data = {};
|
|
30607
30611
|
}
|
|
30608
30612
|
return new AppDataEntity(this.entity, data);
|
|
@@ -32278,13 +32282,13 @@ var DEActionMethod = class extends Method {
|
|
|
32278
32282
|
let path2 = this.calcPath(context);
|
|
32279
32283
|
if (this.method.needResourceKey) {
|
|
32280
32284
|
let srfkey = context[this.entity.codeName.toLowerCase()];
|
|
32281
|
-
if (
|
|
32285
|
+
if (isNil17(srfkey)) {
|
|
32282
32286
|
srfkey = isArray7(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
32283
32287
|
}
|
|
32284
32288
|
path2 = "".concat(path2, "/").concat(srfkey);
|
|
32285
32289
|
}
|
|
32286
32290
|
const res = await this.request(path2, context, data, params, header);
|
|
32287
|
-
if (
|
|
32291
|
+
if (isNil17(res.data) || isUndefined2(res.data)) {
|
|
32288
32292
|
ibiz.log.error(
|
|
32289
32293
|
ibiz.i18n.t("runtime.deAction.responseDataError"),
|
|
32290
32294
|
res
|
|
@@ -32888,7 +32892,7 @@ import {
|
|
|
32888
32892
|
RuntimeModelError as RuntimeModelError22
|
|
32889
32893
|
} from "@ibiz-template/core";
|
|
32890
32894
|
import { isArray as isArray8 } from "lodash-es";
|
|
32891
|
-
import { clone as clone17, isEmpty as isEmpty8, isNil as
|
|
32895
|
+
import { clone as clone17, isEmpty as isEmpty8, isNil as isNil18 } from "ramda";
|
|
32892
32896
|
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
32893
32897
|
var FetchMethod = class extends Method {
|
|
32894
32898
|
async exec(context, params, params2, header) {
|
|
@@ -32981,14 +32985,14 @@ var FetchMethod = class extends Method {
|
|
|
32981
32985
|
}
|
|
32982
32986
|
}
|
|
32983
32987
|
}
|
|
32984
|
-
if (!
|
|
32988
|
+
if (!isNil18(filter.sortField) && !isEmpty8(filter.sortField)) {
|
|
32985
32989
|
if (filter.sortMode === "DESC") {
|
|
32986
32990
|
list = descSort(list, filter.sortField);
|
|
32987
32991
|
} else {
|
|
32988
32992
|
list = ascSort2(list, filter.sortField);
|
|
32989
32993
|
}
|
|
32990
32994
|
}
|
|
32991
|
-
if (!
|
|
32995
|
+
if (!isNil18(filter.srfDefaultCond) && !isEmpty8(filter.srfDefaultCond)) {
|
|
32992
32996
|
const defaultConds = filter.srfDefaultCond;
|
|
32993
32997
|
const defaultCondKeys = Object.keys(defaultConds);
|
|
32994
32998
|
list = list.filter((obj) => {
|
|
@@ -33064,7 +33068,7 @@ function presetDEMethodProvider() {
|
|
|
33064
33068
|
}
|
|
33065
33069
|
|
|
33066
33070
|
// src/service/service/internal-message/internal-message.service.ts
|
|
33067
|
-
import { isNil as
|
|
33071
|
+
import { isNil as isNil19 } from "ramda";
|
|
33068
33072
|
var InternalMessageService = class {
|
|
33069
33073
|
constructor() {
|
|
33070
33074
|
/**
|
|
@@ -33103,7 +33107,7 @@ var InternalMessageService = class {
|
|
|
33103
33107
|
res.total = Number(res.headers["x-total"]);
|
|
33104
33108
|
}
|
|
33105
33109
|
}
|
|
33106
|
-
if (
|
|
33110
|
+
if (isNil19(res.data)) {
|
|
33107
33111
|
res.data = [];
|
|
33108
33112
|
}
|
|
33109
33113
|
return res;
|
|
@@ -35174,7 +35178,7 @@ import {
|
|
|
35174
35178
|
Namespace,
|
|
35175
35179
|
RuntimeError as RuntimeError31
|
|
35176
35180
|
} from "@ibiz-template/core";
|
|
35177
|
-
import { isEmpty as isEmpty9, isNil as
|
|
35181
|
+
import { isEmpty as isEmpty9, isNil as isNil25, isNotNil as isNotNil2 } from "ramda";
|
|
35178
35182
|
|
|
35179
35183
|
// src/controller/utils/loading/loading.state.ts
|
|
35180
35184
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -35891,9 +35895,9 @@ function hasSubRoute(routeDepth) {
|
|
|
35891
35895
|
}
|
|
35892
35896
|
|
|
35893
35897
|
// src/controller/utils/util/util.ts
|
|
35894
|
-
import { isNil as
|
|
35898
|
+
import { isNil as isNil20 } from "ramda";
|
|
35895
35899
|
function isValueChange(value, value2) {
|
|
35896
|
-
if ((
|
|
35900
|
+
if ((isNil20(value) || value === "") && (isNil20(value2) || value2 === "")) {
|
|
35897
35901
|
return false;
|
|
35898
35902
|
}
|
|
35899
35903
|
return value !== value2;
|
|
@@ -36011,7 +36015,7 @@ function formatSeparator(type, items, state, opts) {
|
|
|
36011
36015
|
// src/controller/utils/value-rule/value-rule.ts
|
|
36012
36016
|
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
36013
36017
|
import { isNilOrEmpty as isNilOrEmpty6, isNumber as isNumber3 } from "qx-util";
|
|
36014
|
-
import { isNil as
|
|
36018
|
+
import { isNil as isNil21 } from "ramda";
|
|
36015
36019
|
function generateRules(itemVRs, name2, valueItemName) {
|
|
36016
36020
|
const rules = [];
|
|
36017
36021
|
itemVRs.forEach((item) => {
|
|
@@ -36076,7 +36080,7 @@ function generateEditorRules(editor) {
|
|
|
36076
36080
|
if (maxLength) {
|
|
36077
36081
|
rules.push({
|
|
36078
36082
|
validator: (rule, value, callback) => {
|
|
36079
|
-
if (!
|
|
36083
|
+
if (!isNil21(value) && value.length > maxLength) {
|
|
36080
36084
|
callback(
|
|
36081
36085
|
new Error(
|
|
36082
36086
|
ibiz.i18n.t("runtime.controller.utils.valueRule.maxLength", {
|
|
@@ -36094,7 +36098,7 @@ function generateEditorRules(editor) {
|
|
|
36094
36098
|
if (minLength) {
|
|
36095
36099
|
rules.push({
|
|
36096
36100
|
validator: (rule, value, callback) => {
|
|
36097
|
-
if (!
|
|
36101
|
+
if (!isNil21(value) && value.length < minLength) {
|
|
36098
36102
|
callback(
|
|
36099
36103
|
new Error(
|
|
36100
36104
|
ibiz.i18n.t("runtime.controller.utils.valueRule.minLength", {
|
|
@@ -36109,10 +36113,10 @@ function generateEditorRules(editor) {
|
|
|
36109
36113
|
}
|
|
36110
36114
|
});
|
|
36111
36115
|
}
|
|
36112
|
-
if (!
|
|
36116
|
+
if (!isNil21(maxValue)) {
|
|
36113
36117
|
rules.push({
|
|
36114
36118
|
validator: (rule, value, callback) => {
|
|
36115
|
-
if (!
|
|
36119
|
+
if (!isNil21(value) && isNumber3(value) && value > maxValue) {
|
|
36116
36120
|
callback(
|
|
36117
36121
|
new Error(
|
|
36118
36122
|
ibiz.i18n.t("runtime.controller.utils.valueRule.maxValue", {
|
|
@@ -36126,10 +36130,10 @@ function generateEditorRules(editor) {
|
|
|
36126
36130
|
}
|
|
36127
36131
|
});
|
|
36128
36132
|
}
|
|
36129
|
-
if (!
|
|
36133
|
+
if (!isNil21(minValue)) {
|
|
36130
36134
|
rules.push({
|
|
36131
36135
|
validator: (rule, value, callback) => {
|
|
36132
|
-
if (!
|
|
36136
|
+
if (!isNil21(value) && isNumber3(value) && value < minValue) {
|
|
36133
36137
|
callback(
|
|
36134
36138
|
new Error(
|
|
36135
36139
|
ibiz.i18n.t("runtime.controller.utils.valueRule.minValue", {
|
|
@@ -36148,7 +36152,7 @@ function generateEditorRules(editor) {
|
|
|
36148
36152
|
|
|
36149
36153
|
// src/controller/utils/value-ex/value-ex.ts
|
|
36150
36154
|
import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
36151
|
-
import { isNil as
|
|
36155
|
+
import { isNil as isNil22, mergeLeft } from "ramda";
|
|
36152
36156
|
var ValueExUtil = class {
|
|
36153
36157
|
/**
|
|
36154
36158
|
* 合并默认值
|
|
@@ -36173,7 +36177,7 @@ var ValueExUtil = class {
|
|
|
36173
36177
|
* @return {*} {string}
|
|
36174
36178
|
*/
|
|
36175
36179
|
static toText(options, value) {
|
|
36176
|
-
if (
|
|
36180
|
+
if (isNil22(value) || value === "") {
|
|
36177
36181
|
return "";
|
|
36178
36182
|
}
|
|
36179
36183
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
@@ -36200,12 +36204,12 @@ var ValueExUtil = class {
|
|
|
36200
36204
|
import { RuntimeError as RuntimeError28, ModelError as ModelError15 } from "@ibiz-template/core";
|
|
36201
36205
|
import dayjs from "dayjs";
|
|
36202
36206
|
import { createUUID as createUUID12 } from "qx-util";
|
|
36203
|
-
import { isNil as
|
|
36207
|
+
import { isNil as isNil23, isNotNil } from "ramda";
|
|
36204
36208
|
function getDefaultValue(opts, origins) {
|
|
36205
36209
|
var _a3;
|
|
36206
36210
|
const { name: name2, valueType, defaultValue, valueFormat } = opts;
|
|
36207
36211
|
const { data, context, params } = origins;
|
|
36208
|
-
if (
|
|
36212
|
+
if (isNil23(valueType) && isNil23(defaultValue)) {
|
|
36209
36213
|
return;
|
|
36210
36214
|
}
|
|
36211
36215
|
if (valueType === "RESET") {
|
|
@@ -36639,7 +36643,7 @@ async function getEntitySchema(entityId, context, params = {}) {
|
|
|
36639
36643
|
|
|
36640
36644
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
36641
36645
|
import { RuntimeError as RuntimeError30, RuntimeModelError as RuntimeModelError23 } from "@ibiz-template/core";
|
|
36642
|
-
import { isNil as
|
|
36646
|
+
import { isNil as isNil24, mergeRight as mergeRight3 } from "ramda";
|
|
36643
36647
|
var VIEW_MSG_PREFIX = "VIEW_MSG";
|
|
36644
36648
|
var ViewMsgController = class _ViewMsgController {
|
|
36645
36649
|
constructor(msgGroupId, tag = "") {
|
|
@@ -36972,22 +36976,22 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
36972
36976
|
const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
|
|
36973
36977
|
const deViewMessages = dataSet.map((item) => {
|
|
36974
36978
|
const message = {};
|
|
36975
|
-
if (positionField && !
|
|
36979
|
+
if (positionField && !isNil24(item[positionField])) {
|
|
36976
36980
|
message.position = item[positionField];
|
|
36977
36981
|
}
|
|
36978
|
-
if (titleField && !
|
|
36982
|
+
if (titleField && !isNil24(item[titleField])) {
|
|
36979
36983
|
message.title = item[titleField];
|
|
36980
36984
|
}
|
|
36981
|
-
if (messageField && !
|
|
36985
|
+
if (messageField && !isNil24(item[messageField])) {
|
|
36982
36986
|
message.message = item[messageField];
|
|
36983
36987
|
}
|
|
36984
|
-
if (typeField && !
|
|
36988
|
+
if (typeField && !isNil24(item[typeField])) {
|
|
36985
36989
|
message.messageType = item[typeField];
|
|
36986
36990
|
}
|
|
36987
|
-
if (removeModeField && !
|
|
36991
|
+
if (removeModeField && !isNil24(item[removeModeField])) {
|
|
36988
36992
|
message.removeMode = item[removeModeField];
|
|
36989
36993
|
}
|
|
36990
|
-
if (!
|
|
36994
|
+
if (!isNil24(item.srfkey)) {
|
|
36991
36995
|
message.key = "".concat(this.tag, "_").concat(item.srfkey);
|
|
36992
36996
|
}
|
|
36993
36997
|
if (layoutPanel) {
|
|
@@ -37662,7 +37666,7 @@ var ViewController = class extends BaseController {
|
|
|
37662
37666
|
const renewSessionValue = (_a3 = appViewParams == null ? void 0 : appViewParams.find(
|
|
37663
37667
|
(item) => item.id.toLowerCase() === "srfrenewsession"
|
|
37664
37668
|
)) == null ? void 0 : _a3.value;
|
|
37665
|
-
if (
|
|
37669
|
+
if (isNil25(this.context.srfsessionid) || isEmpty9(this.context.srfsessionid) || renewSessionValue === "true") {
|
|
37666
37670
|
const domain = ibiz.uiDomainManager.create(
|
|
37667
37671
|
this.id,
|
|
37668
37672
|
this.model.appDataEntityId
|
|
@@ -38474,7 +38478,7 @@ import {
|
|
|
38474
38478
|
NoticeError as NoticeError2,
|
|
38475
38479
|
RuntimeError as RuntimeError32
|
|
38476
38480
|
} from "@ibiz-template/core";
|
|
38477
|
-
import { clone as clone20, isNil as
|
|
38481
|
+
import { clone as clone20, isNil as isNil26 } from "ramda";
|
|
38478
38482
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
38479
38483
|
var ControlController = class extends BaseController {
|
|
38480
38484
|
/**
|
|
@@ -38857,7 +38861,7 @@ var ControlController = class extends BaseController {
|
|
|
38857
38861
|
}
|
|
38858
38862
|
const msgItem = this.findCtrlMsgByTag(tag);
|
|
38859
38863
|
if (msgItem && msgItem.content) {
|
|
38860
|
-
duration =
|
|
38864
|
+
duration = isNil26(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
|
|
38861
38865
|
const scriptParams = { ...this.getEventArgs() };
|
|
38862
38866
|
if (opts == null ? void 0 : opts.data) {
|
|
38863
38867
|
scriptParams.data = opts.data;
|
|
@@ -38959,7 +38963,7 @@ var ControlController = class extends BaseController {
|
|
|
38959
38963
|
* @param {{ key: string; delay?: number }} opts
|
|
38960
38964
|
*/
|
|
38961
38965
|
doNextActive(cb, opts) {
|
|
38962
|
-
if (
|
|
38966
|
+
if (isNil26(opts.delay)) {
|
|
38963
38967
|
opts.delay = 300;
|
|
38964
38968
|
}
|
|
38965
38969
|
if (this.state.activated === false) {
|
|
@@ -39017,7 +39021,7 @@ import {
|
|
|
39017
39021
|
isElementSame,
|
|
39018
39022
|
RuntimeModelError as RuntimeModelError25
|
|
39019
39023
|
} from "@ibiz-template/core";
|
|
39020
|
-
import { isNil as
|
|
39024
|
+
import { isNil as isNil27 } from "ramda";
|
|
39021
39025
|
import { isArray as isArray9 } from "lodash-es";
|
|
39022
39026
|
var MDControlController = class extends ControlController {
|
|
39023
39027
|
constructor() {
|
|
@@ -39723,7 +39727,7 @@ var MDControlController = class extends ControlController {
|
|
|
39723
39727
|
*/
|
|
39724
39728
|
onDEDataChange(msg) {
|
|
39725
39729
|
var _a3, _b2;
|
|
39726
|
-
if (!
|
|
39730
|
+
if (!isNil27(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
39727
39731
|
return;
|
|
39728
39732
|
}
|
|
39729
39733
|
let data;
|
|
@@ -44874,7 +44878,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
44874
44878
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
44875
44879
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
44876
44880
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
44877
|
-
import { clone as clone27, isNil as
|
|
44881
|
+
import { clone as clone27, isNil as isNil28, mergeDeepRight } from "ramda";
|
|
44878
44882
|
dayjs4.extend(minMax);
|
|
44879
44883
|
dayjs4.extend(isSameOrBefore);
|
|
44880
44884
|
dayjs4.extend(quarterOfYear);
|
|
@@ -45020,9 +45024,9 @@ var BaseSeriesGenerator = class {
|
|
|
45020
45024
|
* @return {*} {(string | undefined)}
|
|
45021
45025
|
*/
|
|
45022
45026
|
translateVal(codeListKey, val, isExclude = false) {
|
|
45023
|
-
if (
|
|
45027
|
+
if (isNil28(val))
|
|
45024
45028
|
return void 0;
|
|
45025
|
-
if (
|
|
45029
|
+
if (isNil28(codeListKey))
|
|
45026
45030
|
return val;
|
|
45027
45031
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
45028
45032
|
if (codeListItems == null ? void 0 : codeListItems.length) {
|
|
@@ -45214,7 +45218,7 @@ var BaseSeriesGenerator = class {
|
|
|
45214
45218
|
seriesCodeListId,
|
|
45215
45219
|
item[this.groupField]
|
|
45216
45220
|
);
|
|
45217
|
-
if (
|
|
45221
|
+
if (isNil28(groupVal)) {
|
|
45218
45222
|
return;
|
|
45219
45223
|
}
|
|
45220
45224
|
const tempOrigin = getOrigin(item.$origin);
|
|
@@ -45996,7 +46000,7 @@ var GaugeSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
45996
46000
|
};
|
|
45997
46001
|
|
|
45998
46002
|
// src/controller/control/chart/generator/candlestick-series-generator.ts
|
|
45999
|
-
import { isNil as
|
|
46003
|
+
import { isNil as isNil29 } from "ramda";
|
|
46000
46004
|
import { isArray as isArray11, isNumber as isNumber4 } from "qx-util";
|
|
46001
46005
|
import { plus as plus2, RuntimeModelError as RuntimeModelError55, toNumberOrNil as toNumberOrNil2 } from "@ibiz-template/core";
|
|
46002
46006
|
var CandlestickSeriesGenerator = class extends BaseSeriesGenerator {
|
|
@@ -46076,7 +46080,7 @@ var CandlestickSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
46076
46080
|
seriesCodeListId,
|
|
46077
46081
|
item[this.groupField]
|
|
46078
46082
|
);
|
|
46079
|
-
if (
|
|
46083
|
+
if (isNil29(groupVal)) {
|
|
46080
46084
|
return;
|
|
46081
46085
|
}
|
|
46082
46086
|
const tempOrigin = getOrigin(item.$origin);
|
|
@@ -49896,7 +49900,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
49896
49900
|
|
|
49897
49901
|
// src/controller/control/search-bar/interface-util.ts
|
|
49898
49902
|
import { recursiveIterate as recursiveIterate3 } from "@ibiz-template/core";
|
|
49899
|
-
import { isNil as
|
|
49903
|
+
import { isNil as isNil30 } from "ramda";
|
|
49900
49904
|
function getOriginFilterNodes() {
|
|
49901
49905
|
return [
|
|
49902
49906
|
{
|
|
@@ -49918,7 +49922,7 @@ function validateFilterNodes(filterNodes) {
|
|
|
49918
49922
|
}
|
|
49919
49923
|
if (node.nodeType === "FIELD") {
|
|
49920
49924
|
hasFilter = true;
|
|
49921
|
-
hasError = !node.field || !node.valueOP || !ExcludeOPs.includes(node.valueOP) &&
|
|
49925
|
+
hasError = !node.field || !node.valueOP || !ExcludeOPs.includes(node.valueOP) && isNil30(node.value);
|
|
49922
49926
|
} else if (node.nodeType === "ITEMS") {
|
|
49923
49927
|
hasError = !node.field || !node.valueOP;
|
|
49924
49928
|
} else if (node.nodeType === "CUSTOM") {
|
|
@@ -51429,7 +51433,7 @@ import {
|
|
|
51429
51433
|
isElementSame as isElementSame2,
|
|
51430
51434
|
RuntimeModelError as RuntimeModelError57
|
|
51431
51435
|
} from "@ibiz-template/core";
|
|
51432
|
-
import { isNil as
|
|
51436
|
+
import { isNil as isNil31, isNotNil as isNotNil3 } from "ramda";
|
|
51433
51437
|
import { createUUID as createUUID14, isBoolean } from "qx-util";
|
|
51434
51438
|
|
|
51435
51439
|
// src/controller/control/data-view/data-view.service.ts
|
|
@@ -51905,7 +51909,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
51905
51909
|
let groupVal = item[textDEFieldId];
|
|
51906
51910
|
if (dateFormat)
|
|
51907
51911
|
groupVal = formatDateByScale(groupVal, dateFormat);
|
|
51908
|
-
if (
|
|
51912
|
+
if (isNil31(groupVal)) {
|
|
51909
51913
|
unclassified.children.push(item);
|
|
51910
51914
|
return;
|
|
51911
51915
|
}
|
|
@@ -52137,7 +52141,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
52137
52141
|
const isAsc = minorSortDir === "ASC";
|
|
52138
52142
|
items.forEach((item) => {
|
|
52139
52143
|
const sortValue = item[minorSortAppDEFieldId];
|
|
52140
|
-
if (
|
|
52144
|
+
if (isNil31(sortValue))
|
|
52141
52145
|
item[minorSortAppDEFieldId] = 0;
|
|
52142
52146
|
});
|
|
52143
52147
|
items.sort(
|
|
@@ -53927,7 +53931,7 @@ import { recursiveIterate as recursiveIterate8 } from "@ibiz-template/core";
|
|
|
53927
53931
|
|
|
53928
53932
|
// src/controller/control/form/form/form.service.ts
|
|
53929
53933
|
import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
|
|
53930
|
-
import { clone as clone38, isNil as
|
|
53934
|
+
import { clone as clone38, isNil as isNil32, isNotNil as isNotNil4 } from "ramda";
|
|
53931
53935
|
var FormService = class extends ControlService {
|
|
53932
53936
|
constructor() {
|
|
53933
53937
|
super(...arguments);
|
|
@@ -53970,7 +53974,7 @@ var FormService = class extends ControlService {
|
|
|
53970
53974
|
if (defaultVal !== void 0) {
|
|
53971
53975
|
data[name2] = defaultVal;
|
|
53972
53976
|
}
|
|
53973
|
-
if (
|
|
53977
|
+
if (isNil32(data[name2]) && isNotNil4(defaultData[name2])) {
|
|
53974
53978
|
data[name2] = defaultData[name2];
|
|
53975
53979
|
}
|
|
53976
53980
|
}
|
|
@@ -55010,9 +55014,20 @@ var FormButtonController = class extends FormDetailController {
|
|
|
55010
55014
|
* @param {IData} data
|
|
55011
55015
|
*/
|
|
55012
55016
|
calcDetailDisabled(data) {
|
|
55013
|
-
|
|
55014
|
-
if (this.
|
|
55015
|
-
|
|
55017
|
+
let { disabled } = this.dynaLogicResult;
|
|
55018
|
+
if (disabled !== true && this.form.scheduler) {
|
|
55019
|
+
const itemEnable = this.form.scheduler.triggerItemEnable(this.model.id, {
|
|
55020
|
+
data: [data]
|
|
55021
|
+
});
|
|
55022
|
+
if (itemEnable !== void 0) {
|
|
55023
|
+
disabled = !itemEnable;
|
|
55024
|
+
}
|
|
55025
|
+
}
|
|
55026
|
+
if (disabled !== true && this.actionState) {
|
|
55027
|
+
disabled = this.actionState.disabled;
|
|
55028
|
+
}
|
|
55029
|
+
if (disabled !== void 0) {
|
|
55030
|
+
this.state.disabled = disabled;
|
|
55016
55031
|
}
|
|
55017
55032
|
}
|
|
55018
55033
|
/**
|
|
@@ -55021,9 +55036,23 @@ var FormButtonController = class extends FormDetailController {
|
|
|
55021
55036
|
* @param {IData} data
|
|
55022
55037
|
*/
|
|
55023
55038
|
calcDetailVisible(data) {
|
|
55024
|
-
|
|
55025
|
-
if (this.
|
|
55026
|
-
|
|
55039
|
+
let { visible } = this.dynaLogicResult;
|
|
55040
|
+
if (visible !== false && this.form.scheduler) {
|
|
55041
|
+
const itemVIsible = this.form.scheduler.triggerItemVisible(
|
|
55042
|
+
this.model.id,
|
|
55043
|
+
{
|
|
55044
|
+
data: [data]
|
|
55045
|
+
}
|
|
55046
|
+
);
|
|
55047
|
+
if (itemVIsible !== void 0) {
|
|
55048
|
+
visible = itemVIsible;
|
|
55049
|
+
}
|
|
55050
|
+
}
|
|
55051
|
+
if (visible !== false && this.actionState) {
|
|
55052
|
+
visible = this.actionState.visible;
|
|
55053
|
+
}
|
|
55054
|
+
if (visible !== void 0) {
|
|
55055
|
+
this.state.visible = visible;
|
|
55027
55056
|
}
|
|
55028
55057
|
}
|
|
55029
55058
|
/**
|
|
@@ -56721,7 +56750,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
56721
56750
|
|
|
56722
56751
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
56723
56752
|
import { ModelError as ModelError26, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
56724
|
-
import { clone as clone40, isNil as
|
|
56753
|
+
import { clone as clone40, isNil as isNil33 } from "ramda";
|
|
56725
56754
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
56726
56755
|
constructor() {
|
|
56727
56756
|
super(...arguments);
|
|
@@ -57014,7 +57043,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
57014
57043
|
},
|
|
57015
57044
|
{ data, context: this.context, params: this.params }
|
|
57016
57045
|
);
|
|
57017
|
-
if (
|
|
57046
|
+
if (isNil33(data[name2]) && defaultVal !== void 0)
|
|
57018
57047
|
data[name2] = defaultVal;
|
|
57019
57048
|
}
|
|
57020
57049
|
},
|
|
@@ -57465,7 +57494,7 @@ import {
|
|
|
57465
57494
|
} from "@ibiz-template/core";
|
|
57466
57495
|
import { debounce } from "lodash-es";
|
|
57467
57496
|
import { createUUID as createUUID17 } from "qx-util";
|
|
57468
|
-
import { clone as clone41, isNil as
|
|
57497
|
+
import { clone as clone41, isNil as isNil34 } from "ramda";
|
|
57469
57498
|
|
|
57470
57499
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
57471
57500
|
import {
|
|
@@ -58441,7 +58470,7 @@ var EditFormController = class extends FormController {
|
|
|
58441
58470
|
const { appDataEntityId } = this.model;
|
|
58442
58471
|
if (msg.subtype !== "OBJECTUPDATED" || !appDataEntityId)
|
|
58443
58472
|
return;
|
|
58444
|
-
if (!
|
|
58473
|
+
if (!isNil34(msg.triggerKey) && msg.triggerKey === this.triggerKey)
|
|
58445
58474
|
return;
|
|
58446
58475
|
let data;
|
|
58447
58476
|
try {
|
|
@@ -61142,7 +61171,7 @@ import {
|
|
|
61142
61171
|
} from "@ibiz-template/core";
|
|
61143
61172
|
import dayjs6 from "dayjs";
|
|
61144
61173
|
import { debounce as debounce2 } from "lodash-es";
|
|
61145
|
-
import { clone as clone44, isNil as
|
|
61174
|
+
import { clone as clone44, isNil as isNil35 } from "ramda";
|
|
61146
61175
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
61147
61176
|
var GridFieldColumnController = class extends GridColumnController {
|
|
61148
61177
|
constructor() {
|
|
@@ -61431,13 +61460,13 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
61431
61460
|
return;
|
|
61432
61461
|
}
|
|
61433
61462
|
aggValue = this.grid.state.remoteAggResult[fieldName];
|
|
61434
|
-
if (
|
|
61463
|
+
if (isNil35(aggValue))
|
|
61435
61464
|
aggValue = "";
|
|
61436
61465
|
} else {
|
|
61437
|
-
if (
|
|
61466
|
+
if (isNil35(aggMode) || aggMode === "NONE") {
|
|
61438
61467
|
return;
|
|
61439
61468
|
}
|
|
61440
|
-
items = items.filter((item) => !
|
|
61469
|
+
items = items.filter((item) => !isNil35(item[fieldName]));
|
|
61441
61470
|
if (this.grid.model.aggMode === "PAGE") {
|
|
61442
61471
|
switch (aggMode) {
|
|
61443
61472
|
case "SUM":
|
|
@@ -61897,7 +61926,7 @@ var GridGroupColumnController = class extends GridColumnController {
|
|
|
61897
61926
|
|
|
61898
61927
|
// src/controller/control/list/list.controller.ts
|
|
61899
61928
|
import { createUUID as createUUID18, isBoolean as isBoolean3 } from "qx-util";
|
|
61900
|
-
import { isNil as
|
|
61929
|
+
import { isNil as isNil36 } from "ramda";
|
|
61901
61930
|
import {
|
|
61902
61931
|
clone as clone46,
|
|
61903
61932
|
DataTypes as DataTypes7,
|
|
@@ -62306,7 +62335,7 @@ var ListController = class extends MDControlController {
|
|
|
62306
62335
|
if (dayjs7(groupVal).isSame(dayjs7(), "day"))
|
|
62307
62336
|
groupVal = ibiz.i18n.t("runtime.controller.common.md.today");
|
|
62308
62337
|
}
|
|
62309
|
-
if (
|
|
62338
|
+
if (isNil36(groupVal)) {
|
|
62310
62339
|
unclassified.children.push(item);
|
|
62311
62340
|
return;
|
|
62312
62341
|
}
|
|
@@ -62437,7 +62466,7 @@ var ListController = class extends MDControlController {
|
|
|
62437
62466
|
const isAsc = minorSortDir === "ASC";
|
|
62438
62467
|
items.forEach((item) => {
|
|
62439
62468
|
const sortValue = item[minorSortAppDEFieldId];
|
|
62440
|
-
if (
|
|
62469
|
+
if (isNil36(sortValue))
|
|
62441
62470
|
item[minorSortAppDEFieldId] = 0;
|
|
62442
62471
|
});
|
|
62443
62472
|
items.sort(
|
|
@@ -63973,7 +64002,7 @@ import {
|
|
|
63973
64002
|
recursiveIterate as recursiveIterate13,
|
|
63974
64003
|
RuntimeModelError as RuntimeModelError69
|
|
63975
64004
|
} from "@ibiz-template/core";
|
|
63976
|
-
import { isNil as
|
|
64005
|
+
import { isNil as isNil37 } from "ramda";
|
|
63977
64006
|
import { isBoolean as isBoolean4 } from "qx-util";
|
|
63978
64007
|
|
|
63979
64008
|
// src/controller/control/tree/tree.service.ts
|
|
@@ -65671,7 +65700,7 @@ var TreeController = class extends MDControlController {
|
|
|
65671
65700
|
* @return {*} {void}
|
|
65672
65701
|
*/
|
|
65673
65702
|
onDEDataChange(msg) {
|
|
65674
|
-
if (!
|
|
65703
|
+
if (!isNil37(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
65675
65704
|
return;
|
|
65676
65705
|
}
|
|
65677
65706
|
if (msg.subtype === "OBJECTCREATED") {
|
|
@@ -66435,7 +66464,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
66435
66464
|
|
|
66436
66465
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
66437
66466
|
import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
66438
|
-
import { clone as clone47, isNil as
|
|
66467
|
+
import { clone as clone47, isNil as isNil38, isNotNil as isNotNil5 } from "ramda";
|
|
66439
66468
|
import { createUUID as createUUID20 } from "qx-util";
|
|
66440
66469
|
|
|
66441
66470
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
@@ -66771,7 +66800,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
66771
66800
|
};
|
|
66772
66801
|
items.forEach((item) => {
|
|
66773
66802
|
const groupVal = item[groupAppDEFieldId];
|
|
66774
|
-
if (
|
|
66803
|
+
if (isNil38(groupVal)) {
|
|
66775
66804
|
unclassified.children.push(
|
|
66776
66805
|
new MobMDCtrlRowState(item, this)
|
|
66777
66806
|
);
|
|
@@ -83099,7 +83128,7 @@ var WeChatUtil = class {
|
|
|
83099
83128
|
};
|
|
83100
83129
|
|
|
83101
83130
|
// src/utils/json-util/json-util.ts
|
|
83102
|
-
import { isNil as
|
|
83131
|
+
import { isNil as isNil39 } from "ramda";
|
|
83103
83132
|
|
|
83104
83133
|
// src/utils/json-util/JsonContext.ts
|
|
83105
83134
|
var JsonContext = class {
|
|
@@ -83430,7 +83459,7 @@ var JsonUtil = class {
|
|
|
83430
83459
|
* @returns boolean
|
|
83431
83460
|
*/
|
|
83432
83461
|
isJsonObject(value) {
|
|
83433
|
-
if (typeof value !== "object" ||
|
|
83462
|
+
if (typeof value !== "object" || isNil39(value) || Array.isArray(value)) {
|
|
83434
83463
|
return false;
|
|
83435
83464
|
}
|
|
83436
83465
|
if (value.constructor && value.constructor !== Object) {
|
|
@@ -83444,7 +83473,7 @@ var JsonUtil = class {
|
|
|
83444
83473
|
* @returns boolean
|
|
83445
83474
|
*/
|
|
83446
83475
|
isJsonArray(value) {
|
|
83447
|
-
if (
|
|
83476
|
+
if (isNil39(value)) {
|
|
83448
83477
|
return false;
|
|
83449
83478
|
}
|
|
83450
83479
|
if (Array.isArray(value)) {
|
|
@@ -84328,7 +84357,7 @@ import { QXEvent as QXEvent14 } from "qx-util";
|
|
|
84328
84357
|
// src/controller/notification/async-action.controller.ts
|
|
84329
84358
|
import { QXEvent as QXEvent12 } from "qx-util";
|
|
84330
84359
|
import { clone as clone60 } from "ramda";
|
|
84331
|
-
import { isNil as
|
|
84360
|
+
import { isNil as isNil40, isNumber as isNumber5 } from "lodash-es";
|
|
84332
84361
|
import dayjs10 from "dayjs";
|
|
84333
84362
|
var AsyncActionController = class {
|
|
84334
84363
|
constructor() {
|
|
@@ -84406,14 +84435,14 @@ var AsyncActionController = class {
|
|
|
84406
84435
|
data[key] = dayjs10(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
84407
84436
|
}
|
|
84408
84437
|
});
|
|
84409
|
-
if (!
|
|
84438
|
+
if (!isNil40(data.actionresult)) {
|
|
84410
84439
|
try {
|
|
84411
84440
|
const json = JSON.parse(data.actionresult);
|
|
84412
84441
|
data.actionresult = json;
|
|
84413
84442
|
} catch (error) {
|
|
84414
84443
|
}
|
|
84415
84444
|
}
|
|
84416
|
-
if (!
|
|
84445
|
+
if (!isNil40(data.completionrate)) {
|
|
84417
84446
|
const num = Number(data.completionrate);
|
|
84418
84447
|
if (Number.isNaN(num)) {
|
|
84419
84448
|
data.completionrate = void 0;
|
|
@@ -85696,7 +85725,7 @@ import {
|
|
|
85696
85725
|
IBizContext as IBizContext10
|
|
85697
85726
|
} from "@ibiz-template/core";
|
|
85698
85727
|
import qs6 from "qs";
|
|
85699
|
-
import { isNil as
|
|
85728
|
+
import { isNil as isNil41 } from "ramda";
|
|
85700
85729
|
var ViewEngineBase = class {
|
|
85701
85730
|
/**
|
|
85702
85731
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -86184,7 +86213,7 @@ var ViewEngineBase = class {
|
|
|
86184
86213
|
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
86185
86214
|
if (data.srfreadonly) {
|
|
86186
86215
|
this.view.context.srfreadonly = true;
|
|
86187
|
-
} else if (
|
|
86216
|
+
} else if (isNil41(this.view.context.srfreadonly)) {
|
|
86188
86217
|
this.view.context.srfreadonly = false;
|
|
86189
86218
|
}
|
|
86190
86219
|
}
|