@ibiz-template/runtime 0.1.13 → 0.1.15
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 +606 -136
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/base.controller.d.ts.map +1 -1
- package/out/controller/common/base.controller.js +2 -0
- package/out/controller/common/editor/editor.controller.d.ts +1 -1
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +3 -1
- package/out/controller/control/caption-bar/caption-bar.controller.js +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +4 -2
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +16 -14
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +1 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +0 -1
- package/out/controller/utils/event/controller-event.d.ts +7 -0
- package/out/controller/utils/event/controller-event.d.ts.map +1 -1
- package/out/controller/utils/event/controller-event.js +17 -0
- package/out/controller/utils/index.d.ts +1 -0
- package/out/controller/utils/index.d.ts.map +1 -1
- package/out/controller/utils/index.js +1 -0
- package/out/controller/utils/value-ex/value-ex.d.ts +47 -0
- package/out/controller/utils/value-ex/value-ex.d.ts.map +1 -0
- package/out/controller/utils/value-ex/value-ex.js +48 -0
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +16 -5
- package/out/interface/common/i-modal/i-modal.d.ts +8 -0
- package/out/interface/common/i-modal/i-modal.d.ts.map +1 -1
- package/out/interface/controller/state/common/i-controller.state.d.ts +8 -0
- package/out/interface/controller/state/common/i-controller.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +3 -1
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +5 -4
- package/out/ui-action/provider/backend-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/backend-ui-action-provider.js +6 -3
- package/out/ui-action/uiaction-util.d.ts.map +1 -1
- package/out/ui-action/uiaction-util.js +1 -0
- package/out/utils/handlebars/handlebars.d.ts +11 -2
- package/out/utils/handlebars/handlebars.d.ts.map +1 -1
- package/out/utils/handlebars/handlebars.js +24 -2
- package/out/utils/handlebars/helpers/and/and.d.ts +16 -0
- package/out/utils/handlebars/helpers/and/and.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/and/and.js +24 -0
- package/out/utils/handlebars/helpers/camel-case/camel-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/camel-case/camel-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/camel-case/camel-case.js +23 -0
- package/out/utils/handlebars/helpers/concat/concat.d.ts +16 -0
- package/out/utils/handlebars/helpers/concat/concat.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/concat/concat.js +20 -0
- package/out/utils/handlebars/helpers/eq/eq.d.ts +16 -0
- package/out/utils/handlebars/helpers/eq/eq.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/eq/eq.js +22 -0
- package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.d.ts +15 -0
- package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.js +32 -0
- package/out/utils/handlebars/helpers/gt/gt.d.ts +16 -0
- package/out/utils/handlebars/helpers/gt/gt.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/gt/gt.js +22 -0
- package/out/utils/handlebars/helpers/gte/gte.d.ts +16 -0
- package/out/utils/handlebars/helpers/gte/gte.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/gte/gte.js +22 -0
- package/out/utils/handlebars/helpers/helper-base.d.ts +29 -0
- package/out/utils/handlebars/helpers/helper-base.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/helper-base.js +20 -0
- package/out/utils/handlebars/helpers/index.d.ts +9 -0
- package/out/utils/handlebars/helpers/index.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/index.js +45 -0
- package/out/utils/handlebars/helpers/json/json.d.ts +16 -0
- package/out/utils/handlebars/helpers/json/json.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/json/json.js +19 -0
- package/out/utils/handlebars/helpers/lower-case/lower-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/lower-case/lower-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/lower-case/lower-case.js +22 -0
- package/out/utils/handlebars/helpers/lt/lt.d.ts +16 -0
- package/out/utils/handlebars/helpers/lt/lt.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/lt/lt.js +22 -0
- package/out/utils/handlebars/helpers/lte/lte.d.ts +16 -0
- package/out/utils/handlebars/helpers/lte/lte.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/lte/lte.js +22 -0
- package/out/utils/handlebars/helpers/neq/neq.d.ts +16 -0
- package/out/utils/handlebars/helpers/neq/neq.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/neq/neq.js +22 -0
- package/out/utils/handlebars/helpers/not/not.d.ts +16 -0
- package/out/utils/handlebars/helpers/not/not.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/not/not.js +21 -0
- package/out/utils/handlebars/helpers/or/or.d.ts +16 -0
- package/out/utils/handlebars/helpers/or/or.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/or/or.js +27 -0
- package/out/utils/handlebars/helpers/pascal-case/pascal-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/pascal-case/pascal-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/pascal-case/pascal-case.js +23 -0
- package/out/utils/handlebars/helpers/snake-case/snake-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/snake-case/snake-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/snake-case/snake-case.js +23 -0
- package/out/utils/handlebars/helpers/spinal-case/spinal-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/spinal-case/spinal-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/spinal-case/spinal-case.js +23 -0
- package/out/utils/handlebars/helpers/upper-case/upper-case.d.ts +16 -0
- package/out/utils/handlebars/helpers/upper-case/upper-case.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/upper-case/upper-case.js +22 -0
- package/out/utils/handlebars/utils/helper/helper.d.ts +42 -0
- package/out/utils/handlebars/utils/helper/helper.d.ts.map +1 -0
- package/out/utils/handlebars/utils/helper/helper.js +69 -0
- package/out/utils/handlebars/utils/index.d.ts +2 -0
- package/out/utils/handlebars/utils/index.d.ts.map +1 -0
- package/out/utils/handlebars/utils/index.js +1 -0
- package/out/utils/modal/modal.d.ts +1 -0
- package/out/utils/modal/modal.d.ts.map +1 -1
- package/out/utils/modal/modal.js +5 -2
- package/package.json +3 -3
- package/src/controller/common/base.controller.ts +2 -0
- package/src/controller/common/editor/editor.controller.ts +5 -2
- package/src/controller/control/caption-bar/caption-bar.controller.ts +1 -1
- package/src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts +4 -2
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +17 -14
- package/src/controller/control/search-bar/search-bar.controller.ts +1 -0
- package/src/controller/control/tree/tree.controller.ts +0 -1
- package/src/controller/utils/event/controller-event.ts +18 -0
- package/src/controller/utils/index.ts +1 -0
- package/src/controller/utils/value-ex/value-ex.ts +83 -0
- package/src/engine/md-view.engine.ts +17 -5
- package/src/interface/common/i-modal/i-modal.ts +9 -0
- package/src/interface/controller/state/common/i-controller.state.ts +9 -0
- package/src/interface/controller/state/control/i-search-bar.state.ts +9 -0
- package/src/service/dto/method.dto.ts +3 -1
- package/src/service/service/entity/method/method.ts +11 -4
- package/src/ui-action/provider/backend-ui-action-provider.ts +6 -3
- package/src/ui-action/uiaction-util.ts +1 -0
- package/src/utils/handlebars/handlebars.ts +25 -3
- package/src/utils/handlebars/helpers/and/and.ts +26 -0
- package/src/utils/handlebars/helpers/camel-case/camel-case.ts +25 -0
- package/src/utils/handlebars/helpers/concat/concat.ts +22 -0
- package/src/utils/handlebars/helpers/eq/eq.ts +28 -0
- package/src/utils/handlebars/helpers/eq-property-value/eq-property-value.ts +41 -0
- package/src/utils/handlebars/helpers/gt/gt.ts +28 -0
- package/src/utils/handlebars/helpers/gte/gte.ts +28 -0
- package/src/utils/handlebars/helpers/helper-base.ts +31 -0
- package/src/utils/handlebars/helpers/index.ts +46 -0
- package/src/utils/handlebars/helpers/json/json.ts +25 -0
- package/src/utils/handlebars/helpers/lower-case/lower-case.ts +24 -0
- package/src/utils/handlebars/helpers/lt/lt.ts +28 -0
- package/src/utils/handlebars/helpers/lte/lte.ts +28 -0
- package/src/utils/handlebars/helpers/neq/neq.ts +28 -0
- package/src/utils/handlebars/helpers/not/not.ts +26 -0
- package/src/utils/handlebars/helpers/or/or.ts +28 -0
- package/src/utils/handlebars/helpers/pascal-case/pascal-case.ts +25 -0
- package/src/utils/handlebars/helpers/snake-case/snake-case.ts +25 -0
- package/src/utils/handlebars/helpers/spinal-case/spinal-case.ts +25 -0
- package/src/utils/handlebars/helpers/upper-case/upper-case.ts +24 -0
- package/src/utils/handlebars/utils/helper/helper.ts +75 -0
- package/src/utils/handlebars/utils/index.ts +1 -0
- package/src/utils/modal/modal.ts +6 -2
package/dist/index.esm.js
CHANGED
|
@@ -71,10 +71,10 @@ var require_utils = __commonJS({
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
exports.isFunction = isFunction2;
|
|
74
|
-
var
|
|
74
|
+
var isArray5 = Array.isArray || function(value) {
|
|
75
75
|
return value && typeof value === "object" ? toString.call(value) === "[object Array]" : false;
|
|
76
76
|
};
|
|
77
|
-
exports.isArray =
|
|
77
|
+
exports.isArray = isArray5;
|
|
78
78
|
function indexOf(array, value) {
|
|
79
79
|
for (var i = 0, len = array.length; i < len; i++) {
|
|
80
80
|
if (array[i] === value) {
|
|
@@ -102,7 +102,7 @@ var require_utils = __commonJS({
|
|
|
102
102
|
function isEmpty9(value) {
|
|
103
103
|
if (!value && value !== 0) {
|
|
104
104
|
return true;
|
|
105
|
-
} else if (
|
|
105
|
+
} else if (isArray5(value) && value.length === 0) {
|
|
106
106
|
return true;
|
|
107
107
|
} else {
|
|
108
108
|
return false;
|
|
@@ -1098,7 +1098,7 @@ var require_no_conflict = __commonJS({
|
|
|
1098
1098
|
"../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js"(exports, module) {
|
|
1099
1099
|
"use strict";
|
|
1100
1100
|
exports.__esModule = true;
|
|
1101
|
-
exports["default"] = function(
|
|
1101
|
+
exports["default"] = function(Handlebars2) {
|
|
1102
1102
|
(function() {
|
|
1103
1103
|
if (typeof globalThis === "object")
|
|
1104
1104
|
return;
|
|
@@ -1109,11 +1109,11 @@ var require_no_conflict = __commonJS({
|
|
|
1109
1109
|
delete Object.prototype.__magic__;
|
|
1110
1110
|
})();
|
|
1111
1111
|
var $Handlebars = globalThis.Handlebars;
|
|
1112
|
-
|
|
1113
|
-
if (globalThis.Handlebars ===
|
|
1112
|
+
Handlebars2.noConflict = function() {
|
|
1113
|
+
if (globalThis.Handlebars === Handlebars2) {
|
|
1114
1114
|
globalThis.Handlebars = $Handlebars;
|
|
1115
1115
|
}
|
|
1116
|
-
return
|
|
1116
|
+
return Handlebars2;
|
|
1117
1117
|
};
|
|
1118
1118
|
};
|
|
1119
1119
|
module.exports = exports["default"];
|
|
@@ -6226,8 +6226,360 @@ var RegisterCenter = class {
|
|
|
6226
6226
|
// src/command/app/app-func/app-func.ts
|
|
6227
6227
|
import { ModelError as ModelError4, RuntimeError as RuntimeError5 } from "@ibiz-template/core";
|
|
6228
6228
|
|
|
6229
|
+
// src/utils/handlebars/utils/helper/helper.ts
|
|
6230
|
+
var HelperUtil = class {
|
|
6231
|
+
/**
|
|
6232
|
+
* 判断字符串是否为助手
|
|
6233
|
+
*
|
|
6234
|
+
* @author chitanda
|
|
6235
|
+
* @date 2021-12-30 10:12:26
|
|
6236
|
+
* @static
|
|
6237
|
+
* @param {string} name
|
|
6238
|
+
* @return {*} {boolean}
|
|
6239
|
+
*/
|
|
6240
|
+
static isHelperName(name) {
|
|
6241
|
+
return this.helperNames.includes(name);
|
|
6242
|
+
}
|
|
6243
|
+
/**
|
|
6244
|
+
* 判断类助手统一结果调用处理
|
|
6245
|
+
*
|
|
6246
|
+
* @author chitanda
|
|
6247
|
+
* @date 2021-12-29 17:12:23
|
|
6248
|
+
* @static
|
|
6249
|
+
* @param {unknown} context 执行上下文
|
|
6250
|
+
* @param {boolean} bol 判断结果
|
|
6251
|
+
* @param {Handlebars.HelperOptions} options
|
|
6252
|
+
* @return {*} {(string | boolean)}
|
|
6253
|
+
*/
|
|
6254
|
+
static handleJudgmentExecute(context, bol, options) {
|
|
6255
|
+
if (options.fn) {
|
|
6256
|
+
return bol ? options.fn(context) : options.inverse(context);
|
|
6257
|
+
}
|
|
6258
|
+
return bol ? options.hash.yes = true : options.hash.no = false;
|
|
6259
|
+
}
|
|
6260
|
+
};
|
|
6261
|
+
/**
|
|
6262
|
+
* 当前所有助手 tag 名称
|
|
6263
|
+
*
|
|
6264
|
+
* @author chitanda
|
|
6265
|
+
* @date 2021-12-30 10:12:39
|
|
6266
|
+
* @protected
|
|
6267
|
+
* @type {string[]}
|
|
6268
|
+
*/
|
|
6269
|
+
HelperUtil.helperNames = [
|
|
6270
|
+
"lookup",
|
|
6271
|
+
"log",
|
|
6272
|
+
"and",
|
|
6273
|
+
"camelCase",
|
|
6274
|
+
"concat",
|
|
6275
|
+
"eq",
|
|
6276
|
+
"gt",
|
|
6277
|
+
"get",
|
|
6278
|
+
"lowerCase",
|
|
6279
|
+
"lt",
|
|
6280
|
+
"lte",
|
|
6281
|
+
"neq",
|
|
6282
|
+
"not",
|
|
6283
|
+
"or",
|
|
6284
|
+
"pascalCase",
|
|
6285
|
+
"pluralize",
|
|
6286
|
+
"snakeCase",
|
|
6287
|
+
"spinalCase",
|
|
6288
|
+
"upperCase"
|
|
6289
|
+
];
|
|
6290
|
+
|
|
6291
|
+
// src/utils/handlebars/helpers/helper-base.ts
|
|
6292
|
+
var HelperBase = class {
|
|
6293
|
+
/**
|
|
6294
|
+
* Creates an instance of HelperBase.
|
|
6295
|
+
*
|
|
6296
|
+
* @author chitanda
|
|
6297
|
+
* @date 2021-12-29 14:12:47
|
|
6298
|
+
* @param {string} tag 助手标识
|
|
6299
|
+
*/
|
|
6300
|
+
constructor(Handlebars2, tag) {
|
|
6301
|
+
Handlebars2.registerHelper(tag, this.onExecute);
|
|
6302
|
+
}
|
|
6303
|
+
};
|
|
6304
|
+
|
|
6305
|
+
// src/utils/handlebars/helpers/and/and.ts
|
|
6306
|
+
var HelperAnd = class extends HelperBase {
|
|
6307
|
+
constructor(hbs) {
|
|
6308
|
+
super(hbs, "and");
|
|
6309
|
+
}
|
|
6310
|
+
onExecute(...args) {
|
|
6311
|
+
const options = args[args.length - 1];
|
|
6312
|
+
args.pop();
|
|
6313
|
+
const arr = args.filter((item) => !!item);
|
|
6314
|
+
const bol = arr.length === args.length;
|
|
6315
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6316
|
+
}
|
|
6317
|
+
};
|
|
6318
|
+
|
|
6319
|
+
// src/utils/handlebars/helpers/camel-case/camel-case.ts
|
|
6320
|
+
import { camelCase } from "lodash-es";
|
|
6321
|
+
var HelperCamelCase = class extends HelperBase {
|
|
6322
|
+
constructor(hbs) {
|
|
6323
|
+
super(hbs, "camelCase");
|
|
6324
|
+
}
|
|
6325
|
+
onExecute(param) {
|
|
6326
|
+
if (!param) {
|
|
6327
|
+
return "";
|
|
6328
|
+
}
|
|
6329
|
+
return camelCase(param);
|
|
6330
|
+
}
|
|
6331
|
+
};
|
|
6332
|
+
|
|
6333
|
+
// src/utils/handlebars/helpers/concat/concat.ts
|
|
6334
|
+
var HelperConcat = class extends HelperBase {
|
|
6335
|
+
constructor(hbs) {
|
|
6336
|
+
super(hbs, "concat");
|
|
6337
|
+
}
|
|
6338
|
+
onExecute(...args) {
|
|
6339
|
+
args.pop();
|
|
6340
|
+
return args.join("");
|
|
6341
|
+
}
|
|
6342
|
+
};
|
|
6343
|
+
|
|
6344
|
+
// src/utils/handlebars/helpers/eq/eq.ts
|
|
6345
|
+
import { eq } from "lodash-es";
|
|
6346
|
+
var HelperEq = class extends HelperBase {
|
|
6347
|
+
constructor(hbs) {
|
|
6348
|
+
super(hbs, "eq");
|
|
6349
|
+
}
|
|
6350
|
+
onExecute(param, param2, options) {
|
|
6351
|
+
const bol = eq(param, param2);
|
|
6352
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6353
|
+
}
|
|
6354
|
+
};
|
|
6355
|
+
|
|
6356
|
+
// src/utils/handlebars/helpers/gt/gt.ts
|
|
6357
|
+
import { gt } from "lodash-es";
|
|
6358
|
+
var HelperGt = class extends HelperBase {
|
|
6359
|
+
constructor(hbs) {
|
|
6360
|
+
super(hbs, "gt");
|
|
6361
|
+
}
|
|
6362
|
+
onExecute(param, param2, options) {
|
|
6363
|
+
const bol = gt(param, param2);
|
|
6364
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6365
|
+
}
|
|
6366
|
+
};
|
|
6367
|
+
|
|
6368
|
+
// src/utils/handlebars/helpers/gte/gte.ts
|
|
6369
|
+
import { gte } from "lodash-es";
|
|
6370
|
+
var HelperGte = class extends HelperBase {
|
|
6371
|
+
constructor(hbs) {
|
|
6372
|
+
super(hbs, "gte");
|
|
6373
|
+
}
|
|
6374
|
+
onExecute(param, param2, options) {
|
|
6375
|
+
const bol = gte(param, param2);
|
|
6376
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6377
|
+
}
|
|
6378
|
+
};
|
|
6379
|
+
|
|
6380
|
+
// src/utils/handlebars/helpers/eq-property-value/eq-property-value.ts
|
|
6381
|
+
import { eq as eq2, findIndex, isArray } from "lodash-es";
|
|
6382
|
+
var HelperEqPropertyValue = class extends HelperBase {
|
|
6383
|
+
constructor(hbs) {
|
|
6384
|
+
super(hbs, "eqPropertyValue");
|
|
6385
|
+
}
|
|
6386
|
+
onExecute(obj, key, val, options) {
|
|
6387
|
+
let bol = false;
|
|
6388
|
+
if (isArray(obj)) {
|
|
6389
|
+
bol = !eq2(
|
|
6390
|
+
findIndex(obj, (o) => eq2(o[key], val)),
|
|
6391
|
+
-1
|
|
6392
|
+
);
|
|
6393
|
+
} else {
|
|
6394
|
+
bol = // eslint-disable-next-line no-prototype-builtins
|
|
6395
|
+
obj.hasOwnProperty(key) && (bol = eq2(obj[key], val));
|
|
6396
|
+
}
|
|
6397
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6398
|
+
}
|
|
6399
|
+
};
|
|
6400
|
+
|
|
6401
|
+
// src/utils/handlebars/helpers/json/json.ts
|
|
6402
|
+
var HelperJson = class extends HelperBase {
|
|
6403
|
+
constructor(hbs) {
|
|
6404
|
+
super(hbs, "jsonStringify");
|
|
6405
|
+
}
|
|
6406
|
+
onExecute(obj, space) {
|
|
6407
|
+
return JSON.stringify(
|
|
6408
|
+
obj,
|
|
6409
|
+
null,
|
|
6410
|
+
typeof space === "number" ? space : void 0
|
|
6411
|
+
);
|
|
6412
|
+
}
|
|
6413
|
+
};
|
|
6414
|
+
|
|
6415
|
+
// src/utils/handlebars/helpers/lower-case/lower-case.ts
|
|
6416
|
+
var HelperLowerCase = class extends HelperBase {
|
|
6417
|
+
constructor(hbs) {
|
|
6418
|
+
super(hbs, "lowerCase");
|
|
6419
|
+
}
|
|
6420
|
+
onExecute(param) {
|
|
6421
|
+
if (!param) {
|
|
6422
|
+
return "";
|
|
6423
|
+
}
|
|
6424
|
+
return param.toLowerCase();
|
|
6425
|
+
}
|
|
6426
|
+
};
|
|
6427
|
+
|
|
6428
|
+
// src/utils/handlebars/helpers/lt/lt.ts
|
|
6429
|
+
import { lt } from "lodash-es";
|
|
6430
|
+
var HelperLt = class extends HelperBase {
|
|
6431
|
+
constructor(hbs) {
|
|
6432
|
+
super(hbs, "lt");
|
|
6433
|
+
}
|
|
6434
|
+
onExecute(param, param2, options) {
|
|
6435
|
+
const bol = lt(param, param2);
|
|
6436
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6437
|
+
}
|
|
6438
|
+
};
|
|
6439
|
+
|
|
6440
|
+
// src/utils/handlebars/helpers/lte/lte.ts
|
|
6441
|
+
import { lte } from "lodash-es";
|
|
6442
|
+
var HelperLte = class extends HelperBase {
|
|
6443
|
+
constructor(hbs) {
|
|
6444
|
+
super(hbs, "lte");
|
|
6445
|
+
}
|
|
6446
|
+
onExecute(param, param2, options) {
|
|
6447
|
+
const bol = lte(param, param2);
|
|
6448
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6449
|
+
}
|
|
6450
|
+
};
|
|
6451
|
+
|
|
6452
|
+
// src/utils/handlebars/helpers/neq/neq.ts
|
|
6453
|
+
import { eq as eq3 } from "lodash-es";
|
|
6454
|
+
var HelperNeq = class extends HelperBase {
|
|
6455
|
+
constructor(hbs) {
|
|
6456
|
+
super(hbs, "neq");
|
|
6457
|
+
}
|
|
6458
|
+
onExecute(param, param2, options) {
|
|
6459
|
+
const bol = !eq3(param, param2);
|
|
6460
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6461
|
+
}
|
|
6462
|
+
};
|
|
6463
|
+
|
|
6464
|
+
// src/utils/handlebars/helpers/not/not.ts
|
|
6465
|
+
var HelperNot = class extends HelperBase {
|
|
6466
|
+
constructor(hbs) {
|
|
6467
|
+
super(hbs, "not");
|
|
6468
|
+
}
|
|
6469
|
+
onExecute(param, options) {
|
|
6470
|
+
const bol = Handlebars.Utils.isEmpty(param);
|
|
6471
|
+
return HelperUtil.handleJudgmentExecute(this, bol, options);
|
|
6472
|
+
}
|
|
6473
|
+
};
|
|
6474
|
+
|
|
6475
|
+
// src/utils/handlebars/helpers/or/or.ts
|
|
6476
|
+
var HelperOr = class extends HelperBase {
|
|
6477
|
+
constructor(hbs) {
|
|
6478
|
+
super(hbs, "or");
|
|
6479
|
+
}
|
|
6480
|
+
onExecute(...args) {
|
|
6481
|
+
var _a;
|
|
6482
|
+
const options = args[args.length - 1];
|
|
6483
|
+
args.pop();
|
|
6484
|
+
const item = args.find((itemArg) => !!itemArg);
|
|
6485
|
+
if (options.fn) {
|
|
6486
|
+
const data = ((_a = options.data) == null ? void 0 : _a.root) || {};
|
|
6487
|
+
return item ? options.fn(data) : options.inverse(data);
|
|
6488
|
+
}
|
|
6489
|
+
return item || "";
|
|
6490
|
+
}
|
|
6491
|
+
};
|
|
6492
|
+
|
|
6493
|
+
// src/utils/handlebars/helpers/pascal-case/pascal-case.ts
|
|
6494
|
+
import { upperFirst } from "lodash-es";
|
|
6495
|
+
var HelperPascalCase = class extends HelperBase {
|
|
6496
|
+
constructor(hbs) {
|
|
6497
|
+
super(hbs, "pascalCase");
|
|
6498
|
+
}
|
|
6499
|
+
onExecute(param) {
|
|
6500
|
+
if (!param) {
|
|
6501
|
+
return "";
|
|
6502
|
+
}
|
|
6503
|
+
return upperFirst(param);
|
|
6504
|
+
}
|
|
6505
|
+
};
|
|
6506
|
+
|
|
6507
|
+
// src/utils/handlebars/helpers/snake-case/snake-case.ts
|
|
6508
|
+
import { snakeCase } from "lodash-es";
|
|
6509
|
+
var HelperSnakeCase = class extends HelperBase {
|
|
6510
|
+
constructor(hbs) {
|
|
6511
|
+
super(hbs, "snakeCase");
|
|
6512
|
+
}
|
|
6513
|
+
onExecute(param) {
|
|
6514
|
+
if (!param) {
|
|
6515
|
+
return "";
|
|
6516
|
+
}
|
|
6517
|
+
return snakeCase(param);
|
|
6518
|
+
}
|
|
6519
|
+
};
|
|
6520
|
+
|
|
6521
|
+
// src/utils/handlebars/helpers/spinal-case/spinal-case.ts
|
|
6522
|
+
import { kebabCase } from "lodash-es";
|
|
6523
|
+
var HelperSpinalCase = class extends HelperBase {
|
|
6524
|
+
constructor(hbs) {
|
|
6525
|
+
super(hbs, "spinalCase");
|
|
6526
|
+
}
|
|
6527
|
+
onExecute(param) {
|
|
6528
|
+
if (!param) {
|
|
6529
|
+
return "";
|
|
6530
|
+
}
|
|
6531
|
+
return kebabCase(param);
|
|
6532
|
+
}
|
|
6533
|
+
};
|
|
6534
|
+
|
|
6535
|
+
// src/utils/handlebars/helpers/upper-case/upper-case.ts
|
|
6536
|
+
var HelperUpperCase = class extends HelperBase {
|
|
6537
|
+
constructor(hbs) {
|
|
6538
|
+
super(hbs, "upperCase");
|
|
6539
|
+
}
|
|
6540
|
+
onExecute(param) {
|
|
6541
|
+
if (!param) {
|
|
6542
|
+
return "";
|
|
6543
|
+
}
|
|
6544
|
+
return param.toUpperCase();
|
|
6545
|
+
}
|
|
6546
|
+
};
|
|
6547
|
+
|
|
6548
|
+
// src/utils/handlebars/helpers/index.ts
|
|
6549
|
+
function installHelpers(hsb) {
|
|
6550
|
+
new HelperAnd(hsb);
|
|
6551
|
+
new HelperCamelCase(hsb);
|
|
6552
|
+
new HelperConcat(hsb);
|
|
6553
|
+
new HelperEq(hsb);
|
|
6554
|
+
new HelperGt(hsb);
|
|
6555
|
+
new HelperGte(hsb);
|
|
6556
|
+
new HelperJson(hsb);
|
|
6557
|
+
new HelperLowerCase(hsb);
|
|
6558
|
+
new HelperLt(hsb);
|
|
6559
|
+
new HelperLte(hsb);
|
|
6560
|
+
new HelperNeq(hsb);
|
|
6561
|
+
new HelperNot(hsb);
|
|
6562
|
+
new HelperOr(hsb);
|
|
6563
|
+
new HelperPascalCase(hsb);
|
|
6564
|
+
new HelperSnakeCase(hsb);
|
|
6565
|
+
new HelperSpinalCase(hsb);
|
|
6566
|
+
new HelperUpperCase(hsb);
|
|
6567
|
+
new HelperEqPropertyValue(hsb);
|
|
6568
|
+
}
|
|
6569
|
+
|
|
6229
6570
|
// src/utils/handlebars/handlebars.ts
|
|
6230
6571
|
var HandlebarsUtil = class {
|
|
6572
|
+
constructor() {
|
|
6573
|
+
/**
|
|
6574
|
+
* 如果已经在请求中,则不再重复请求
|
|
6575
|
+
*
|
|
6576
|
+
* @author chitanda
|
|
6577
|
+
* @date 2023-08-30 11:08:58
|
|
6578
|
+
* @protected
|
|
6579
|
+
* @type {(Promise<unknown> | null)}
|
|
6580
|
+
*/
|
|
6581
|
+
this.p = null;
|
|
6582
|
+
}
|
|
6231
6583
|
/**
|
|
6232
6584
|
* handlebars 是否已经初始化
|
|
6233
6585
|
*
|
|
@@ -6244,10 +6596,20 @@ var HandlebarsUtil = class {
|
|
|
6244
6596
|
*
|
|
6245
6597
|
* @author chitanda
|
|
6246
6598
|
* @date 2023-08-28 17:08:24
|
|
6247
|
-
* @return {*} {Promise<
|
|
6599
|
+
* @return {*} {Promise<unknown>}
|
|
6248
6600
|
*/
|
|
6249
6601
|
async init() {
|
|
6250
|
-
|
|
6602
|
+
if (this.isInit) {
|
|
6603
|
+
return;
|
|
6604
|
+
}
|
|
6605
|
+
if (this.p) {
|
|
6606
|
+
return this.p;
|
|
6607
|
+
}
|
|
6608
|
+
this.p = Promise.resolve().then(() => __toESM(require_handlebars(), 1));
|
|
6609
|
+
this.hsb = await this.p;
|
|
6610
|
+
this.p = null;
|
|
6611
|
+
installHelpers(this.hsb);
|
|
6612
|
+
return this.hsb;
|
|
6251
6613
|
}
|
|
6252
6614
|
/**
|
|
6253
6615
|
* 异步绘制模板,返回渲染后的字符串
|
|
@@ -8076,6 +8438,7 @@ var Modal = class {
|
|
|
8076
8438
|
constructor(opts) {
|
|
8077
8439
|
this.mode = "EMBED" /* EMBED */;
|
|
8078
8440
|
this.viewUsage = 4;
|
|
8441
|
+
this.ignoreDismissCheck = false;
|
|
8079
8442
|
this.hooks = {
|
|
8080
8443
|
shouldDismiss: new AsyncSeriesHook(),
|
|
8081
8444
|
beforeDismiss: new AsyncSeriesHook()
|
|
@@ -8112,7 +8475,9 @@ var Modal = class {
|
|
|
8112
8475
|
}
|
|
8113
8476
|
async dismiss(data = { ok: false, data: [] }) {
|
|
8114
8477
|
const context = { allowClose: true };
|
|
8115
|
-
|
|
8478
|
+
if (this.ignoreDismissCheck !== true) {
|
|
8479
|
+
await this.hooks.shouldDismiss.call(context);
|
|
8480
|
+
}
|
|
8116
8481
|
if (!context.allowClose) {
|
|
8117
8482
|
ibiz.log.debug("shouldDismiss\u7ED3\u679C\u4E3Afalse,\u5173\u95ED\u4E2D\u65AD\u3002");
|
|
8118
8483
|
return false;
|
|
@@ -10705,6 +11070,7 @@ import {
|
|
|
10705
11070
|
|
|
10706
11071
|
// src/service/service/entity/method/method.ts
|
|
10707
11072
|
import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
11073
|
+
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
10708
11074
|
|
|
10709
11075
|
// src/service/app-data-entity/app-data-entity.ts
|
|
10710
11076
|
import { clone as clone4 } from "ramda";
|
|
@@ -10913,7 +11279,9 @@ var MethodDto = class _MethodDto {
|
|
|
10913
11279
|
for (let j = 0; j < items.length; j++) {
|
|
10914
11280
|
arr.push(await dto.get(context, items[j]));
|
|
10915
11281
|
}
|
|
10916
|
-
|
|
11282
|
+
if (arr.length > 0) {
|
|
11283
|
+
params[key] = arr;
|
|
11284
|
+
}
|
|
10917
11285
|
}
|
|
10918
11286
|
break;
|
|
10919
11287
|
}
|
|
@@ -11119,16 +11487,22 @@ var Method = class {
|
|
|
11119
11487
|
let res = null;
|
|
11120
11488
|
switch (requestMethod) {
|
|
11121
11489
|
case "POST":
|
|
11122
|
-
res = await this.app.net.post(
|
|
11490
|
+
res = await this.app.net.post(
|
|
11491
|
+
"".concat(path2, "/").concat(methodName),
|
|
11492
|
+
notNilEmpty5(data) ? data : params
|
|
11493
|
+
);
|
|
11123
11494
|
break;
|
|
11124
11495
|
case "GET":
|
|
11125
|
-
res = await this.app.net.get("".concat(path2, "/").concat(methodName),
|
|
11496
|
+
res = await this.app.net.get("".concat(path2, "/").concat(methodName), data);
|
|
11126
11497
|
break;
|
|
11127
11498
|
case "PUT":
|
|
11128
|
-
res = await this.app.net.put(
|
|
11499
|
+
res = await this.app.net.put(
|
|
11500
|
+
"".concat(path2, "/").concat(methodName),
|
|
11501
|
+
notNilEmpty5(data) ? data : params
|
|
11502
|
+
);
|
|
11129
11503
|
break;
|
|
11130
11504
|
case "DELETE":
|
|
11131
|
-
res = await this.app.net.delete("".concat(path2, "/").concat(methodName),
|
|
11505
|
+
res = await this.app.net.delete("".concat(path2, "/").concat(methodName), data);
|
|
11132
11506
|
break;
|
|
11133
11507
|
default:
|
|
11134
11508
|
if (requestMethod) {
|
|
@@ -12972,7 +13346,7 @@ var ControlService = class {
|
|
|
12972
13346
|
|
|
12973
13347
|
// src/service/service/control/md-control.service.ts
|
|
12974
13348
|
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
12975
|
-
import { isArray } from "qx-util";
|
|
13349
|
+
import { isArray as isArray2 } from "qx-util";
|
|
12976
13350
|
var MDControlService = class extends ControlService {
|
|
12977
13351
|
/**
|
|
12978
13352
|
* 执行查询多条数据的方法
|
|
@@ -13104,7 +13478,7 @@ var MDControlService = class extends ControlService {
|
|
|
13104
13478
|
}
|
|
13105
13479
|
}
|
|
13106
13480
|
if (res.ok) {
|
|
13107
|
-
if (
|
|
13481
|
+
if (isArray2(res.data)) {
|
|
13108
13482
|
res.data = res.data.map((item) => this.toUIData(item));
|
|
13109
13483
|
} else {
|
|
13110
13484
|
res.data = this.toUIData(res.data);
|
|
@@ -13711,7 +14085,7 @@ var DEServiceUtil = class {
|
|
|
13711
14085
|
};
|
|
13712
14086
|
|
|
13713
14087
|
// src/app-hub.ts
|
|
13714
|
-
import { RuntimeError as
|
|
14088
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
13715
14089
|
|
|
13716
14090
|
// src/application.ts
|
|
13717
14091
|
import { Net } from "@ibiz-template/core";
|
|
@@ -13959,9 +14333,9 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
13959
14333
|
})(PanelNotifyState || {});
|
|
13960
14334
|
|
|
13961
14335
|
// src/controller/common/view/view.controller.ts
|
|
13962
|
-
import { createUUID as createUUID2, notNilEmpty as
|
|
13963
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
13964
|
-
import { isEmpty as isEmpty8, isNil as
|
|
14336
|
+
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
14337
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
14338
|
+
import { isEmpty as isEmpty8, isNil as isNil12 } from "ramda";
|
|
13965
14339
|
|
|
13966
14340
|
// src/controller/utils/loading/loading.state.ts
|
|
13967
14341
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -14470,6 +14844,13 @@ var ControllerEvent = class {
|
|
|
14470
14844
|
*/
|
|
14471
14845
|
constructor(getBaseArgs) {
|
|
14472
14846
|
this.getBaseArgs = getBaseArgs;
|
|
14847
|
+
/**
|
|
14848
|
+
* 是否已经销毁
|
|
14849
|
+
* @author lxm
|
|
14850
|
+
* @date 2023-08-30 02:54:14
|
|
14851
|
+
* @type {boolean}
|
|
14852
|
+
*/
|
|
14853
|
+
this.isDestroyed = false;
|
|
14473
14854
|
/**
|
|
14474
14855
|
* 事件对象
|
|
14475
14856
|
*
|
|
@@ -14488,6 +14869,9 @@ var ControllerEvent = class {
|
|
|
14488
14869
|
* @return {*} {Promise<void>}
|
|
14489
14870
|
*/
|
|
14490
14871
|
async emit(name, args) {
|
|
14872
|
+
if (this.isDestroyed) {
|
|
14873
|
+
return;
|
|
14874
|
+
}
|
|
14491
14875
|
await this.evt.asyncEmit(name, {
|
|
14492
14876
|
...this.getBaseArgs(),
|
|
14493
14877
|
eventName: name,
|
|
@@ -14503,6 +14887,9 @@ var ControllerEvent = class {
|
|
|
14503
14887
|
* @param fn 事件回调
|
|
14504
14888
|
*/
|
|
14505
14889
|
on(name, fn) {
|
|
14890
|
+
if (this.isDestroyed) {
|
|
14891
|
+
return;
|
|
14892
|
+
}
|
|
14506
14893
|
this.evt.on(name, fn);
|
|
14507
14894
|
}
|
|
14508
14895
|
/**
|
|
@@ -14512,6 +14899,9 @@ var ControllerEvent = class {
|
|
|
14512
14899
|
* @param fn 事件回调
|
|
14513
14900
|
*/
|
|
14514
14901
|
onAll(fn) {
|
|
14902
|
+
if (this.isDestroyed) {
|
|
14903
|
+
return;
|
|
14904
|
+
}
|
|
14515
14905
|
this.evt.onAll(fn);
|
|
14516
14906
|
}
|
|
14517
14907
|
/**
|
|
@@ -14523,6 +14913,7 @@ var ControllerEvent = class {
|
|
|
14523
14913
|
destroy() {
|
|
14524
14914
|
this.getBaseArgs = void 0;
|
|
14525
14915
|
this.evt.reset();
|
|
14916
|
+
this.isDestroyed = true;
|
|
14526
14917
|
}
|
|
14527
14918
|
};
|
|
14528
14919
|
|
|
@@ -14603,6 +14994,54 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
14603
14994
|
return rules;
|
|
14604
14995
|
}
|
|
14605
14996
|
|
|
14997
|
+
// src/controller/utils/value-ex/value-ex.ts
|
|
14998
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
14999
|
+
import { isNil as isNil11, mergeLeft } from "ramda";
|
|
15000
|
+
var ValueExUtil = class {
|
|
15001
|
+
/**
|
|
15002
|
+
* 合并默认值
|
|
15003
|
+
* @author lxm
|
|
15004
|
+
* @date 2023-08-30 02:06:58
|
|
15005
|
+
* @static
|
|
15006
|
+
* @param {ValueExOptions} options
|
|
15007
|
+
* @return {*} {ValueExOptions}
|
|
15008
|
+
*/
|
|
15009
|
+
static mergeDefault(options) {
|
|
15010
|
+
return mergeLeft(options, {
|
|
15011
|
+
textSeparator: ",",
|
|
15012
|
+
valueSeparator: ","
|
|
15013
|
+
});
|
|
15014
|
+
}
|
|
15015
|
+
/**
|
|
15016
|
+
* 转成显示用的文本
|
|
15017
|
+
* @author lxm
|
|
15018
|
+
* @date 2023-08-30 01:55:38
|
|
15019
|
+
* @param {ValueExOptions} options
|
|
15020
|
+
* @param {unknown} value
|
|
15021
|
+
* @return {*} {string}
|
|
15022
|
+
*/
|
|
15023
|
+
static toText(options, value) {
|
|
15024
|
+
if (isNil11(value) || value === "") {
|
|
15025
|
+
return "";
|
|
15026
|
+
}
|
|
15027
|
+
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
15028
|
+
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
15029
|
+
if (!objectNameField) {
|
|
15030
|
+
throw new RuntimeError21("\u7F3A\u5C11objectNameField");
|
|
15031
|
+
}
|
|
15032
|
+
const textKey = objectNameField.toLowerCase();
|
|
15033
|
+
if (valueType === "OBJECTS") {
|
|
15034
|
+
return value.map((item) => item[textKey] || "---").join(textSeparator);
|
|
15035
|
+
}
|
|
15036
|
+
return value[textKey];
|
|
15037
|
+
}
|
|
15038
|
+
if (valueType === "SIMPLES") {
|
|
15039
|
+
return value.join(textSeparator);
|
|
15040
|
+
}
|
|
15041
|
+
return "".concat(value);
|
|
15042
|
+
}
|
|
15043
|
+
};
|
|
15044
|
+
|
|
14606
15045
|
// src/controller/common/base.controller.ts
|
|
14607
15046
|
var SELF_KEY = "__self";
|
|
14608
15047
|
var BaseController = class {
|
|
@@ -14672,6 +15111,7 @@ var BaseController = class {
|
|
|
14672
15111
|
initState() {
|
|
14673
15112
|
this.state.isCreated = false;
|
|
14674
15113
|
this.state.isMounted = false;
|
|
15114
|
+
this.state.isDestroyed = false;
|
|
14675
15115
|
}
|
|
14676
15116
|
/**
|
|
14677
15117
|
* 获取事件的基础参数
|
|
@@ -14762,6 +15202,7 @@ var BaseController = class {
|
|
|
14762
15202
|
*/
|
|
14763
15203
|
async destroyed() {
|
|
14764
15204
|
await this.onDestroyed();
|
|
15205
|
+
this.state.isDestroyed = true;
|
|
14765
15206
|
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onDestroyed"));
|
|
14766
15207
|
await this._evt.emit("onDestroyed", void 0);
|
|
14767
15208
|
this.evt.destroy();
|
|
@@ -15013,18 +15454,18 @@ var ViewController = class extends BaseController {
|
|
|
15013
15454
|
*/
|
|
15014
15455
|
handleContextParams() {
|
|
15015
15456
|
this.context.srfappid = this.model.appId;
|
|
15016
|
-
if (
|
|
15457
|
+
if (isNil12(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
15017
15458
|
this.context.srfsessionid = createUUID2();
|
|
15018
15459
|
}
|
|
15019
15460
|
const navContexts = this.model.appViewNavContexts;
|
|
15020
15461
|
let context = {};
|
|
15021
|
-
if (
|
|
15462
|
+
if (notNilEmpty6(navContexts)) {
|
|
15022
15463
|
context = convertNavData(navContexts, this.context, this.params);
|
|
15023
15464
|
}
|
|
15024
15465
|
Object.assign(this.context, context);
|
|
15025
15466
|
const navParams = this.model.appViewNavParams;
|
|
15026
15467
|
let params = {};
|
|
15027
|
-
if (
|
|
15468
|
+
if (notNilEmpty6(navParams)) {
|
|
15028
15469
|
params = convertNavData(navParams, this.context, this.params);
|
|
15029
15470
|
}
|
|
15030
15471
|
Object.assign(this.params, params);
|
|
@@ -15045,7 +15486,7 @@ var ViewController = class extends BaseController {
|
|
|
15045
15486
|
async callUIAction(key, args) {
|
|
15046
15487
|
const result = this.call(key, args);
|
|
15047
15488
|
if (result === void 0) {
|
|
15048
|
-
throw new
|
|
15489
|
+
throw new RuntimeError22("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
15049
15490
|
}
|
|
15050
15491
|
return result;
|
|
15051
15492
|
}
|
|
@@ -15162,11 +15603,13 @@ var EditorController = class {
|
|
|
15162
15603
|
if (navigateContexts && data) {
|
|
15163
15604
|
selfContext = convertNavData(navigateContexts, context, params, data);
|
|
15164
15605
|
}
|
|
15606
|
+
const _context = Object.assign(context.clone(), selfContext);
|
|
15165
15607
|
let selfParams = {};
|
|
15166
15608
|
if (navigateParams && data) {
|
|
15167
15609
|
selfParams = convertNavData(navigateParams, context, params, data);
|
|
15168
15610
|
}
|
|
15169
|
-
|
|
15611
|
+
const _params = { ...params, ...selfParams };
|
|
15612
|
+
return { context: _context, params: _params };
|
|
15170
15613
|
}
|
|
15171
15614
|
/**
|
|
15172
15615
|
* 字符串转对象、数组对象
|
|
@@ -15390,7 +15833,7 @@ var ControlController = class extends BaseController {
|
|
|
15390
15833
|
};
|
|
15391
15834
|
|
|
15392
15835
|
// src/controller/common/control/md-control.controller.ts
|
|
15393
|
-
import { isElementSame, RuntimeError as
|
|
15836
|
+
import { isElementSame, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
15394
15837
|
var MDControlController = class extends ControlController {
|
|
15395
15838
|
get _evt() {
|
|
15396
15839
|
return this.evt;
|
|
@@ -15526,7 +15969,7 @@ var MDControlController = class extends ControlController {
|
|
|
15526
15969
|
async remove(args) {
|
|
15527
15970
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
15528
15971
|
if (!(data == null ? void 0 : data.length)) {
|
|
15529
|
-
throw new
|
|
15972
|
+
throw new RuntimeError23("\u672A\u9009\u4E2D\u6570\u636E");
|
|
15530
15973
|
}
|
|
15531
15974
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
15532
15975
|
const del = await ibiz.confirm.error({
|
|
@@ -15663,7 +16106,7 @@ var MDControlController = class extends ControlController {
|
|
|
15663
16106
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
15664
16107
|
import {
|
|
15665
16108
|
findRecursiveChild,
|
|
15666
|
-
RuntimeError as
|
|
16109
|
+
RuntimeError as RuntimeError24,
|
|
15667
16110
|
RuntimeModelError as RuntimeModelError21
|
|
15668
16111
|
} from "@ibiz-template/core";
|
|
15669
16112
|
var AppMenuController = class extends ControlController {
|
|
@@ -15703,7 +16146,7 @@ var AppMenuController = class extends ControlController {
|
|
|
15703
16146
|
childrenFields: ["appMenuItems"]
|
|
15704
16147
|
});
|
|
15705
16148
|
if (!menuItem) {
|
|
15706
|
-
throw new
|
|
16149
|
+
throw new RuntimeError24("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
15707
16150
|
}
|
|
15708
16151
|
this.evt.emit("onClick", {
|
|
15709
16152
|
eventArg: id,
|
|
@@ -15793,7 +16236,7 @@ var AppMenuController = class extends ControlController {
|
|
|
15793
16236
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
15794
16237
|
import {
|
|
15795
16238
|
findRecursiveChild as findRecursiveChild2,
|
|
15796
|
-
RuntimeError as
|
|
16239
|
+
RuntimeError as RuntimeError25,
|
|
15797
16240
|
RuntimeModelError as RuntimeModelError22
|
|
15798
16241
|
} from "@ibiz-template/core";
|
|
15799
16242
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -15803,7 +16246,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
15803
16246
|
childrenFields: ["appMenuItems"]
|
|
15804
16247
|
});
|
|
15805
16248
|
if (!menuItem) {
|
|
15806
|
-
throw new
|
|
16249
|
+
throw new RuntimeError25("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
15807
16250
|
}
|
|
15808
16251
|
this.evt.emit("onClick", {
|
|
15809
16252
|
eventArg: id,
|
|
@@ -15831,7 +16274,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
15831
16274
|
import dayjs from "dayjs";
|
|
15832
16275
|
|
|
15833
16276
|
// src/controller/control/calendar/calendar.service.ts
|
|
15834
|
-
import { RuntimeError as
|
|
16277
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
15835
16278
|
var CalendarService = class extends MDControlService {
|
|
15836
16279
|
/**
|
|
15837
16280
|
* 执行查询多条数据的方法
|
|
@@ -15881,11 +16324,11 @@ var CalendarService = class extends MDControlService {
|
|
|
15881
16324
|
setCalendarConfigData(items, index) {
|
|
15882
16325
|
const { sysCalendarItems } = this.model;
|
|
15883
16326
|
if (!sysCalendarItems) {
|
|
15884
|
-
throw new
|
|
16327
|
+
throw new RuntimeError26("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
15885
16328
|
}
|
|
15886
16329
|
const calendarItem = sysCalendarItems[index];
|
|
15887
16330
|
if (!calendarItem) {
|
|
15888
|
-
throw new
|
|
16331
|
+
throw new RuntimeError26("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
15889
16332
|
}
|
|
15890
16333
|
return items.map((item) => {
|
|
15891
16334
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -16075,11 +16518,11 @@ var CalendarController = class extends MDControlController {
|
|
|
16075
16518
|
};
|
|
16076
16519
|
|
|
16077
16520
|
// src/controller/control/chart/chart.controller.ts
|
|
16078
|
-
import { RuntimeError as
|
|
16521
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
16079
16522
|
|
|
16080
16523
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
16081
16524
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
16082
|
-
import { RuntimeError as
|
|
16525
|
+
import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
16083
16526
|
|
|
16084
16527
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
16085
16528
|
import { RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
@@ -16092,7 +16535,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
16092
16535
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
16093
16536
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
16094
16537
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
16095
|
-
import { clone as clone11, isNil as
|
|
16538
|
+
import { clone as clone11, isNil as isNil13, mergeDeepRight } from "ramda";
|
|
16096
16539
|
dayjs2.extend(minMax);
|
|
16097
16540
|
dayjs2.extend(isSameOrBefore);
|
|
16098
16541
|
dayjs2.extend(quarterOfYear);
|
|
@@ -16181,10 +16624,10 @@ var BaseSeriesGenerator = class {
|
|
|
16181
16624
|
* @return {*} {(string | undefined)}
|
|
16182
16625
|
*/
|
|
16183
16626
|
translateVal(codeListKey, val, isExclude = false) {
|
|
16184
|
-
if (
|
|
16627
|
+
if (isNil13(val)) {
|
|
16185
16628
|
return void 0;
|
|
16186
16629
|
}
|
|
16187
|
-
if (
|
|
16630
|
+
if (isNil13(codeListKey)) {
|
|
16188
16631
|
return val;
|
|
16189
16632
|
}
|
|
16190
16633
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
@@ -16214,7 +16657,7 @@ var BaseSeriesGenerator = class {
|
|
|
16214
16657
|
seriesCodeListId,
|
|
16215
16658
|
item[this.groupField]
|
|
16216
16659
|
);
|
|
16217
|
-
if (
|
|
16660
|
+
if (isNil13(groupVal)) {
|
|
16218
16661
|
return;
|
|
16219
16662
|
}
|
|
16220
16663
|
group = groupVal;
|
|
@@ -17015,7 +17458,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
17015
17458
|
getSrfkeyByParams(params) {
|
|
17016
17459
|
const generator = this.seriesGenerators[params.seriesIndex];
|
|
17017
17460
|
if (!generator) {
|
|
17018
|
-
throw new
|
|
17461
|
+
throw new RuntimeError27("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
17019
17462
|
}
|
|
17020
17463
|
return generator.getSrfkeyByParams(params);
|
|
17021
17464
|
}
|
|
@@ -17127,10 +17570,10 @@ var ChartController = class extends MDControlController {
|
|
|
17127
17570
|
*/
|
|
17128
17571
|
updateChart() {
|
|
17129
17572
|
if (!this.chart) {
|
|
17130
|
-
throw new
|
|
17573
|
+
throw new RuntimeError28("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
17131
17574
|
}
|
|
17132
17575
|
if (!this.options) {
|
|
17133
|
-
throw new
|
|
17576
|
+
throw new RuntimeError28("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
17134
17577
|
}
|
|
17135
17578
|
this.chart.setOption(this.options);
|
|
17136
17579
|
this.resizeChart();
|
|
@@ -17169,7 +17612,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
17169
17612
|
async onCreated() {
|
|
17170
17613
|
await super.onCreated();
|
|
17171
17614
|
this.view.evt.on("onViewInfoChange", ({ caption: _caption, dataInfo }) => {
|
|
17172
|
-
this.state.caption = "".concat(this.
|
|
17615
|
+
this.state.caption = "".concat(this.view.model.caption).concat(dataInfo ? "-".concat(dataInfo) : "");
|
|
17173
17616
|
});
|
|
17174
17617
|
}
|
|
17175
17618
|
};
|
|
@@ -17179,13 +17622,13 @@ import { recursiveIterate } from "@ibiz-template/core";
|
|
|
17179
17622
|
|
|
17180
17623
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17181
17624
|
import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
17182
|
-
import { isArray as
|
|
17625
|
+
import { isArray as isArray3 } from "qx-util";
|
|
17183
17626
|
|
|
17184
17627
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
17185
17628
|
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
17186
17629
|
|
|
17187
17630
|
// src/ui-logic/index.ts
|
|
17188
|
-
import { RuntimeError as
|
|
17631
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
17189
17632
|
|
|
17190
17633
|
// src/ui-logic/ui-logic.ts
|
|
17191
17634
|
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
@@ -17697,7 +18140,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
17697
18140
|
};
|
|
17698
18141
|
|
|
17699
18142
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
17700
|
-
import { RuntimeError as
|
|
18143
|
+
import { RuntimeError as RuntimeError29, RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
17701
18144
|
import { isFunction } from "lodash-es";
|
|
17702
18145
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
17703
18146
|
async exec(ctx) {
|
|
@@ -17714,14 +18157,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
17714
18157
|
}
|
|
17715
18158
|
const invokeParam = ctx.params[invokeParamId];
|
|
17716
18159
|
if (!invokeParam) {
|
|
17717
|
-
throw new
|
|
18160
|
+
throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
17718
18161
|
}
|
|
17719
18162
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
17720
18163
|
if (!invokeCtrl) {
|
|
17721
|
-
throw new
|
|
18164
|
+
throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
17722
18165
|
}
|
|
17723
18166
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
17724
|
-
throw new
|
|
18167
|
+
throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
17725
18168
|
}
|
|
17726
18169
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
17727
18170
|
}
|
|
@@ -18002,7 +18445,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18002
18445
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
18003
18446
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
18004
18447
|
if (!deUILogic) {
|
|
18005
|
-
throw new
|
|
18448
|
+
throw new RuntimeError30(
|
|
18006
18449
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
18007
18450
|
);
|
|
18008
18451
|
}
|
|
@@ -18015,7 +18458,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18015
18458
|
}
|
|
18016
18459
|
|
|
18017
18460
|
// src/ui-action/uiaction-util.ts
|
|
18018
|
-
import { RuntimeError as
|
|
18461
|
+
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
18019
18462
|
var UIActionUtil = class {
|
|
18020
18463
|
/**
|
|
18021
18464
|
* 执行界面行为
|
|
@@ -18030,7 +18473,7 @@ var UIActionUtil = class {
|
|
|
18030
18473
|
static async exec(actionId, params) {
|
|
18031
18474
|
const action = await getUIActionById(actionId);
|
|
18032
18475
|
if (!action) {
|
|
18033
|
-
throw new
|
|
18476
|
+
throw new RuntimeError31("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
18034
18477
|
}
|
|
18035
18478
|
const provider = await getUIActionProvider(action);
|
|
18036
18479
|
return provider.exec(action, params);
|
|
@@ -18047,6 +18490,7 @@ var UIActionUtil = class {
|
|
|
18047
18490
|
var _a, _b;
|
|
18048
18491
|
const result = await this.exec(actionId, params);
|
|
18049
18492
|
if (result.closeView) {
|
|
18493
|
+
params.view.modal.ignoreDismissCheck = true;
|
|
18050
18494
|
params.view.closeView({ ok: true });
|
|
18051
18495
|
} else if (result.refresh) {
|
|
18052
18496
|
switch (result.refreshMode) {
|
|
@@ -18254,6 +18698,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18254
18698
|
data,
|
|
18255
18699
|
params
|
|
18256
18700
|
);
|
|
18701
|
+
const tempParams = { ...resultParams };
|
|
18257
18702
|
const frontPSAppView = action.frontAppViewId;
|
|
18258
18703
|
if (frontPSAppView) {
|
|
18259
18704
|
const res2 = await ibiz.commands.execute(
|
|
@@ -18280,7 +18725,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18280
18725
|
const _data = resultData.map((item) => {
|
|
18281
18726
|
var _a;
|
|
18282
18727
|
return ((_a = item.getOrigin) == null ? void 0 : _a.call(item)) || item || {};
|
|
18283
|
-
});
|
|
18728
|
+
}).map((item) => Object.assign(item, tempParams));
|
|
18284
18729
|
const isMultiData = ["MULTIKEY", "MULTIDATA"].includes(
|
|
18285
18730
|
action.actionTarget
|
|
18286
18731
|
);
|
|
@@ -18289,15 +18734,15 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18289
18734
|
methodName,
|
|
18290
18735
|
resultContext,
|
|
18291
18736
|
isMultiData ? _data : _data[0],
|
|
18292
|
-
|
|
18737
|
+
tempParams
|
|
18293
18738
|
);
|
|
18294
18739
|
if (res.ok && action.successMsg) {
|
|
18295
18740
|
ibiz.message.success(action.successMsg);
|
|
18296
18741
|
}
|
|
18297
18742
|
Object.assign(actionResult, {
|
|
18298
|
-
data:
|
|
18743
|
+
data: isArray3(res.data) ? res.data : [res.data],
|
|
18299
18744
|
nextContext: resultContext,
|
|
18300
|
-
nextParams:
|
|
18745
|
+
nextParams: tempParams
|
|
18301
18746
|
});
|
|
18302
18747
|
return actionResult;
|
|
18303
18748
|
}
|
|
@@ -18616,7 +19061,7 @@ var ContextMenuController = class extends ToolbarController {
|
|
|
18616
19061
|
};
|
|
18617
19062
|
|
|
18618
19063
|
// src/controller/control/dashboard/dashboard.controller.ts
|
|
18619
|
-
import { RuntimeError as
|
|
19064
|
+
import { RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
18620
19065
|
var DashboardController = class extends ControlController {
|
|
18621
19066
|
constructor() {
|
|
18622
19067
|
super(...arguments);
|
|
@@ -18703,7 +19148,7 @@ var DashboardController = class extends ControlController {
|
|
|
18703
19148
|
);
|
|
18704
19149
|
if (values.find((item) => item.status === "rejected")) {
|
|
18705
19150
|
ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
|
|
18706
|
-
throw new
|
|
19151
|
+
throw new RuntimeError32("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
|
|
18707
19152
|
}
|
|
18708
19153
|
}
|
|
18709
19154
|
};
|
|
@@ -19156,7 +19601,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19156
19601
|
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
19157
19602
|
|
|
19158
19603
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
19159
|
-
import { RuntimeError as
|
|
19604
|
+
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
19160
19605
|
var ExpBarControlController = class extends ControlController {
|
|
19161
19606
|
constructor() {
|
|
19162
19607
|
super(...arguments);
|
|
@@ -19436,7 +19881,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
19436
19881
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
19437
19882
|
return this.XDataModel.navAppViewId;
|
|
19438
19883
|
}
|
|
19439
|
-
throw new
|
|
19884
|
+
throw new RuntimeError33("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
19440
19885
|
}
|
|
19441
19886
|
/**
|
|
19442
19887
|
* 获取导航视图
|
|
@@ -19565,7 +20010,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
19565
20010
|
};
|
|
19566
20011
|
|
|
19567
20012
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
19568
|
-
import { RuntimeError as
|
|
20013
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19569
20014
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
19570
20015
|
constructor() {
|
|
19571
20016
|
super(...arguments);
|
|
@@ -19640,7 +20085,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
19640
20085
|
const deData = node.deData || node;
|
|
19641
20086
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
19642
20087
|
if (!nodeModel) {
|
|
19643
|
-
throw new
|
|
20088
|
+
throw new RuntimeError34("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
19644
20089
|
}
|
|
19645
20090
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
19646
20091
|
result.context.currentSrfNav = nodeId;
|
|
@@ -19693,7 +20138,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
19693
20138
|
import { mergeDefaultInLeft } from "@ibiz-template/core";
|
|
19694
20139
|
|
|
19695
20140
|
// src/controller/control/form/form/form.controller.ts
|
|
19696
|
-
import { RuntimeError as
|
|
20141
|
+
import { RuntimeError as RuntimeError35, debounceAndAsyncMerge } from "@ibiz-template/core";
|
|
19697
20142
|
var FormController = class extends ControlController {
|
|
19698
20143
|
constructor() {
|
|
19699
20144
|
super(...arguments);
|
|
@@ -19758,7 +20203,7 @@ var FormController = class extends ControlController {
|
|
|
19758
20203
|
);
|
|
19759
20204
|
if (values.find((item) => item.status === "rejected")) {
|
|
19760
20205
|
ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
|
|
19761
|
-
throw new
|
|
20206
|
+
throw new RuntimeError35("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
|
|
19762
20207
|
}
|
|
19763
20208
|
}
|
|
19764
20209
|
/**
|
|
@@ -20365,7 +20810,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
20365
20810
|
|
|
20366
20811
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
20367
20812
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
20368
|
-
import { createUUID as createUUID3, notNilEmpty as
|
|
20813
|
+
import { createUUID as createUUID3, notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
20369
20814
|
|
|
20370
20815
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
20371
20816
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -20444,7 +20889,9 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
20444
20889
|
await super.formStateNotify(state);
|
|
20445
20890
|
this.isNewData = state === "DRAFT" /* DRAFT */;
|
|
20446
20891
|
this.state.showMask = this.isNewData;
|
|
20447
|
-
|
|
20892
|
+
if (state === "LOAD" /* LOAD */ || state === "DRAFT" /* DRAFT */) {
|
|
20893
|
+
this.calcViewParams();
|
|
20894
|
+
}
|
|
20448
20895
|
}
|
|
20449
20896
|
/**
|
|
20450
20897
|
* 计算视图上下文和视图参数,
|
|
@@ -20456,7 +20903,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
20456
20903
|
calcViewParams() {
|
|
20457
20904
|
let newContext = this.form.context.clone();
|
|
20458
20905
|
const navContexts = this.model.navigateContexts;
|
|
20459
|
-
if (
|
|
20906
|
+
if (notNilEmpty7(navContexts)) {
|
|
20460
20907
|
newContext = Object.assign(
|
|
20461
20908
|
newContext,
|
|
20462
20909
|
convertNavData(
|
|
@@ -20626,7 +21073,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
20626
21073
|
// src/controller/control/form/form-detail/form-item/form-item.controller.ts
|
|
20627
21074
|
import Schema from "async-validator";
|
|
20628
21075
|
import { createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
20629
|
-
import { ModelError as ModelError24, RuntimeError as
|
|
21076
|
+
import { ModelError as ModelError24, RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
20630
21077
|
import dayjs3 from "dayjs";
|
|
20631
21078
|
|
|
20632
21079
|
// src/controller/control/form/form-detail/form-item/form-item.state.ts
|
|
@@ -20931,7 +21378,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
20931
21378
|
case "SESSION":
|
|
20932
21379
|
case "APPLICATION":
|
|
20933
21380
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
20934
|
-
throw new
|
|
21381
|
+
throw new RuntimeError36("appdata.context\u4E0D\u5B58\u5728");
|
|
20935
21382
|
}
|
|
20936
21383
|
data[this.name] = ibiz.appData.context[defaultValue];
|
|
20937
21384
|
break;
|
|
@@ -21056,7 +21503,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
21056
21503
|
};
|
|
21057
21504
|
|
|
21058
21505
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
21059
|
-
import { RuntimeError as
|
|
21506
|
+
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
21060
21507
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
21061
21508
|
/**
|
|
21062
21509
|
* 初始化
|
|
@@ -21071,7 +21518,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
21071
21518
|
const { model } = this.parent;
|
|
21072
21519
|
const { contentControl } = model;
|
|
21073
21520
|
if (!contentControl) {
|
|
21074
|
-
throw new
|
|
21521
|
+
throw new RuntimeError37("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
21075
21522
|
}
|
|
21076
21523
|
this.controlModel = contentControl;
|
|
21077
21524
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -21175,13 +21622,13 @@ var FormMDCtrlDataViewController = class extends FormMDCtrlControlController {
|
|
|
21175
21622
|
|
|
21176
21623
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.controller.ts
|
|
21177
21624
|
import { mergeInLeft as mergeInLeft2 } from "@ibiz-template/core";
|
|
21178
|
-
import { isArray as
|
|
21625
|
+
import { isArray as isArray4 } from "lodash-es";
|
|
21179
21626
|
|
|
21180
21627
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
21181
21628
|
import {
|
|
21182
21629
|
awaitTimeout,
|
|
21183
21630
|
mergeInLeft,
|
|
21184
|
-
RuntimeError as
|
|
21631
|
+
RuntimeError as RuntimeError38,
|
|
21185
21632
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
21186
21633
|
} from "@ibiz-template/core";
|
|
21187
21634
|
import { debounce } from "lodash-es";
|
|
@@ -21551,7 +21998,7 @@ var EditFormController = class extends FormController {
|
|
|
21551
21998
|
}
|
|
21552
21999
|
const isValid = await this.validate();
|
|
21553
22000
|
if (!isValid) {
|
|
21554
|
-
throw new
|
|
22001
|
+
throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21555
22002
|
}
|
|
21556
22003
|
await this.startLoading();
|
|
21557
22004
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -21641,7 +22088,7 @@ var EditFormController = class extends FormController {
|
|
|
21641
22088
|
(item) => item.id === formItemUpdateId
|
|
21642
22089
|
);
|
|
21643
22090
|
if (!formItemUpdate) {
|
|
21644
|
-
throw new
|
|
22091
|
+
throw new RuntimeError38("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
21645
22092
|
}
|
|
21646
22093
|
const { appDEMethodId, defiupdateDetails } = formItemUpdate;
|
|
21647
22094
|
const updateItems = defiupdateDetails.map((item) => item.id);
|
|
@@ -21671,7 +22118,7 @@ var EditFormController = class extends FormController {
|
|
|
21671
22118
|
async wfStart(extraParams = {}) {
|
|
21672
22119
|
const isValid = await this.validate();
|
|
21673
22120
|
if (!isValid) {
|
|
21674
|
-
throw new
|
|
22121
|
+
throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21675
22122
|
}
|
|
21676
22123
|
await this.startLoading();
|
|
21677
22124
|
try {
|
|
@@ -21699,7 +22146,7 @@ var EditFormController = class extends FormController {
|
|
|
21699
22146
|
async wfSubmit(extraParams = {}) {
|
|
21700
22147
|
const isValid = await this.validate();
|
|
21701
22148
|
if (!isValid) {
|
|
21702
|
-
throw new
|
|
22149
|
+
throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21703
22150
|
}
|
|
21704
22151
|
await this.startLoading();
|
|
21705
22152
|
try {
|
|
@@ -21813,7 +22260,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
21813
22260
|
handleResponse(response) {
|
|
21814
22261
|
const res = response;
|
|
21815
22262
|
if (res.ok) {
|
|
21816
|
-
if (
|
|
22263
|
+
if (isArray4(res.data)) {
|
|
21817
22264
|
res.data = res.data.map(
|
|
21818
22265
|
(item) => this.service.toUIData(item)
|
|
21819
22266
|
);
|
|
@@ -21925,7 +22372,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
21925
22372
|
};
|
|
21926
22373
|
|
|
21927
22374
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
21928
|
-
import { RuntimeError as
|
|
22375
|
+
import { RuntimeError as RuntimeError39, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
21929
22376
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
21930
22377
|
constructor() {
|
|
21931
22378
|
super(...arguments);
|
|
@@ -22030,7 +22477,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
22030
22477
|
const { model } = this.parent;
|
|
22031
22478
|
const { contentControl } = model;
|
|
22032
22479
|
if (!contentControl) {
|
|
22033
|
-
throw new
|
|
22480
|
+
throw new RuntimeError39("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
22034
22481
|
}
|
|
22035
22482
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
22036
22483
|
this.controlModel = contentControl;
|
|
@@ -22740,7 +23187,7 @@ import {
|
|
|
22740
23187
|
awaitTimeout as awaitTimeout2,
|
|
22741
23188
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
22742
23189
|
recursiveIterate as recursiveIterate4,
|
|
22743
|
-
RuntimeError as
|
|
23190
|
+
RuntimeError as RuntimeError40,
|
|
22744
23191
|
RuntimeModelError as RuntimeModelError43
|
|
22745
23192
|
} from "@ibiz-template/core";
|
|
22746
23193
|
import { clone as clone13 } from "ramda";
|
|
@@ -23085,11 +23532,11 @@ var GridController = class extends MDControlController {
|
|
|
23085
23532
|
this.state.rows.splice(index, 1);
|
|
23086
23533
|
this.state.groups.forEach((item) => {
|
|
23087
23534
|
if (item.children.length) {
|
|
23088
|
-
const
|
|
23535
|
+
const findIndex2 = item.children.findIndex(
|
|
23089
23536
|
(item2) => item2.srfkey === data.srfkey
|
|
23090
23537
|
);
|
|
23091
|
-
if (
|
|
23092
|
-
item.children.splice(
|
|
23538
|
+
if (findIndex2 !== -1) {
|
|
23539
|
+
item.children.splice(findIndex2, 1);
|
|
23093
23540
|
}
|
|
23094
23541
|
}
|
|
23095
23542
|
});
|
|
@@ -23108,7 +23555,7 @@ var GridController = class extends MDControlController {
|
|
|
23108
23555
|
}
|
|
23109
23556
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
23110
23557
|
if (editingRow) {
|
|
23111
|
-
throw new
|
|
23558
|
+
throw new RuntimeError40("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
23112
23559
|
}
|
|
23113
23560
|
const res = await this.service.getDraft(this.context, this.params);
|
|
23114
23561
|
this.state.items.unshift(res.data);
|
|
@@ -23133,7 +23580,7 @@ var GridController = class extends MDControlController {
|
|
|
23133
23580
|
(item) => item.data.srfkey === data.srfkey
|
|
23134
23581
|
);
|
|
23135
23582
|
if (!rowState) {
|
|
23136
|
-
throw new
|
|
23583
|
+
throw new RuntimeError40("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
23137
23584
|
}
|
|
23138
23585
|
if (!rowState.modified) {
|
|
23139
23586
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -23145,7 +23592,7 @@ var GridController = class extends MDControlController {
|
|
|
23145
23592
|
}
|
|
23146
23593
|
const isValid = await this.validate(rowState);
|
|
23147
23594
|
if (!isValid) {
|
|
23148
|
-
throw new
|
|
23595
|
+
throw new RuntimeError40("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
23149
23596
|
}
|
|
23150
23597
|
await this.startLoading();
|
|
23151
23598
|
let res;
|
|
@@ -23292,7 +23739,7 @@ var GridController = class extends MDControlController {
|
|
|
23292
23739
|
);
|
|
23293
23740
|
if (values.find((item) => item.status === "rejected")) {
|
|
23294
23741
|
ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
|
|
23295
|
-
throw new
|
|
23742
|
+
throw new RuntimeError40("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
|
|
23296
23743
|
}
|
|
23297
23744
|
}
|
|
23298
23745
|
/**
|
|
@@ -23322,7 +23769,7 @@ var GridController = class extends MDControlController {
|
|
|
23322
23769
|
}
|
|
23323
23770
|
async toggleRowEdit() {
|
|
23324
23771
|
if (!this.model.enableRowNew) {
|
|
23325
|
-
throw new
|
|
23772
|
+
throw new RuntimeError40("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
23326
23773
|
}
|
|
23327
23774
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
23328
23775
|
}
|
|
@@ -23355,7 +23802,7 @@ var GridController = class extends MDControlController {
|
|
|
23355
23802
|
if (toState === true) {
|
|
23356
23803
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
23357
23804
|
if (editingRow) {
|
|
23358
|
-
throw new
|
|
23805
|
+
throw new RuntimeError40("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
23359
23806
|
}
|
|
23360
23807
|
}
|
|
23361
23808
|
row.showRowEdit = toState;
|
|
@@ -23398,7 +23845,7 @@ var GridController = class extends MDControlController {
|
|
|
23398
23845
|
(item) => item.id === updateId
|
|
23399
23846
|
);
|
|
23400
23847
|
if (!findUpdate) {
|
|
23401
|
-
throw new
|
|
23848
|
+
throw new RuntimeError40("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
23402
23849
|
}
|
|
23403
23850
|
const { appDEMethodId, degeiupdateDetails } = findUpdate;
|
|
23404
23851
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -23493,7 +23940,7 @@ var GridController = class extends MDControlController {
|
|
|
23493
23940
|
data2 = this.getData();
|
|
23494
23941
|
}
|
|
23495
23942
|
if (data2.length === 0) {
|
|
23496
|
-
throw new
|
|
23943
|
+
throw new RuntimeError40("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
23497
23944
|
}
|
|
23498
23945
|
return formatExcelData(data2);
|
|
23499
23946
|
};
|
|
@@ -23512,11 +23959,11 @@ var GridController = class extends MDControlController {
|
|
|
23512
23959
|
);
|
|
23513
23960
|
const data = formatArrayData(filterVal, await getExportData());
|
|
23514
23961
|
if (!ibiz.util.getExportExcel) {
|
|
23515
|
-
throw new
|
|
23962
|
+
throw new RuntimeError40("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
23516
23963
|
}
|
|
23517
23964
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
23518
23965
|
if (!exportExcel) {
|
|
23519
|
-
throw new
|
|
23966
|
+
throw new RuntimeError40("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
23520
23967
|
}
|
|
23521
23968
|
exportExcel.exportJsonToExcel({
|
|
23522
23969
|
header,
|
|
@@ -23656,7 +24103,15 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23656
24103
|
* @param {MouseEvent} event 鼠标事件
|
|
23657
24104
|
* @returns {*} {Promise<void>}
|
|
23658
24105
|
*/
|
|
23659
|
-
async triggerAction(
|
|
24106
|
+
async triggerAction(row, event) {
|
|
24107
|
+
const actionId = this.model.deuiactionId;
|
|
24108
|
+
await UIActionUtil.execAndResolved(actionId, {
|
|
24109
|
+
context: this.context,
|
|
24110
|
+
params: this.params,
|
|
24111
|
+
data: [row.data],
|
|
24112
|
+
view: this.grid.view,
|
|
24113
|
+
event
|
|
24114
|
+
});
|
|
23660
24115
|
}
|
|
23661
24116
|
/**
|
|
23662
24117
|
* 加载代码表数据
|
|
@@ -23743,6 +24198,9 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23743
24198
|
* @return {*} {string}
|
|
23744
24199
|
*/
|
|
23745
24200
|
formatValue(value = "") {
|
|
24201
|
+
if (this.model.valueType) {
|
|
24202
|
+
return ValueExUtil.toText(this.model, value);
|
|
24203
|
+
}
|
|
23746
24204
|
const strVal = "".concat(value);
|
|
23747
24205
|
if (!this.valueFormat) {
|
|
23748
24206
|
return strVal;
|
|
@@ -23810,7 +24268,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
23810
24268
|
};
|
|
23811
24269
|
|
|
23812
24270
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
23813
|
-
import { RuntimeError as
|
|
24271
|
+
import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
23814
24272
|
import Schema2 from "async-validator";
|
|
23815
24273
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
23816
24274
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -23944,7 +24402,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
23944
24402
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
23945
24403
|
const result = await this.validate(row);
|
|
23946
24404
|
if (!result) {
|
|
23947
|
-
throw new
|
|
24405
|
+
throw new RuntimeError41(
|
|
23948
24406
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
23949
24407
|
);
|
|
23950
24408
|
}
|
|
@@ -24296,7 +24754,7 @@ var ListController = class extends MDControlController {
|
|
|
24296
24754
|
};
|
|
24297
24755
|
|
|
24298
24756
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
24299
|
-
import { RuntimeError as
|
|
24757
|
+
import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
24300
24758
|
var PanelController = class extends ControlController {
|
|
24301
24759
|
constructor() {
|
|
24302
24760
|
super(...arguments);
|
|
@@ -24394,7 +24852,7 @@ var PanelController = class extends ControlController {
|
|
|
24394
24852
|
async load() {
|
|
24395
24853
|
const data = await this.prepareData();
|
|
24396
24854
|
if (!data) {
|
|
24397
|
-
throw new
|
|
24855
|
+
throw new RuntimeError42("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
24398
24856
|
}
|
|
24399
24857
|
const panelData = this.convertData(data);
|
|
24400
24858
|
this.state.data = panelData;
|
|
@@ -24870,6 +25328,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24870
25328
|
initState() {
|
|
24871
25329
|
super.initState();
|
|
24872
25330
|
this.state.query = "";
|
|
25331
|
+
this.state.selectedGroupItem = null;
|
|
24873
25332
|
this.state.visible = !!(this.model.enableQuickSearch || this.model.enableGroup || this.model.enableFilter);
|
|
24874
25333
|
}
|
|
24875
25334
|
async onCreated() {
|
|
@@ -25610,7 +26069,7 @@ var TreeController = class extends MDControlController {
|
|
|
25610
26069
|
};
|
|
25611
26070
|
|
|
25612
26071
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
25613
|
-
import { RuntimeError as
|
|
26072
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
25614
26073
|
|
|
25615
26074
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
25616
26075
|
var WizardPanelService = class extends ControlService {
|
|
@@ -25769,7 +26228,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25769
26228
|
const { activeFormTag } = this.state;
|
|
25770
26229
|
const controller = this.formControllers.get(activeFormTag);
|
|
25771
26230
|
if (!controller) {
|
|
25772
|
-
throw new
|
|
26231
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
25773
26232
|
}
|
|
25774
26233
|
return controller;
|
|
25775
26234
|
}
|
|
@@ -25844,7 +26303,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25844
26303
|
this.tagHistory.pop();
|
|
25845
26304
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
25846
26305
|
if (!prevTag) {
|
|
25847
|
-
throw new
|
|
26306
|
+
throw new RuntimeError43("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
25848
26307
|
}
|
|
25849
26308
|
this.state.activeFormTag = prevTag;
|
|
25850
26309
|
}
|
|
@@ -25865,7 +26324,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25865
26324
|
}
|
|
25866
26325
|
);
|
|
25867
26326
|
if (!wizardForm) {
|
|
25868
|
-
throw new
|
|
26327
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
25869
26328
|
}
|
|
25870
26329
|
nextTag = data.srfnextform;
|
|
25871
26330
|
} else {
|
|
@@ -25877,7 +26336,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25877
26336
|
});
|
|
25878
26337
|
const nextWizardStep = wizardSteps[index + 1];
|
|
25879
26338
|
if (!nextWizardStep) {
|
|
25880
|
-
throw new
|
|
26339
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
25881
26340
|
}
|
|
25882
26341
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
25883
26342
|
(wizardForm) => {
|
|
@@ -25890,7 +26349,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25890
26349
|
}
|
|
25891
26350
|
}
|
|
25892
26351
|
if (!nextTag) {
|
|
25893
|
-
throw new
|
|
26352
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
25894
26353
|
}
|
|
25895
26354
|
this.state.activeFormTag = nextTag;
|
|
25896
26355
|
this.tagHistory.push(nextTag);
|
|
@@ -26319,7 +26778,7 @@ var AppHub = class {
|
|
|
26319
26778
|
this.registerAppView(appView);
|
|
26320
26779
|
return appView;
|
|
26321
26780
|
}
|
|
26322
|
-
throw new
|
|
26781
|
+
throw new RuntimeError44("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
26323
26782
|
}
|
|
26324
26783
|
/**
|
|
26325
26784
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -26350,7 +26809,7 @@ var AppHub = class {
|
|
|
26350
26809
|
this.registerAppDataEntity(entity, appId);
|
|
26351
26810
|
return entity;
|
|
26352
26811
|
}
|
|
26353
|
-
throw new
|
|
26812
|
+
throw new RuntimeError44("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
26354
26813
|
}
|
|
26355
26814
|
/**
|
|
26356
26815
|
* 新建 hub 应用
|
|
@@ -26371,7 +26830,7 @@ var AppHub = class {
|
|
|
26371
26830
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
26372
26831
|
this.registerApp(appModel);
|
|
26373
26832
|
} else {
|
|
26374
|
-
throw new
|
|
26833
|
+
throw new RuntimeError44("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
26375
26834
|
}
|
|
26376
26835
|
const app = new Application(appModel);
|
|
26377
26836
|
this.appMap.set(id, app);
|
|
@@ -26462,7 +26921,7 @@ var EngineFactory = class {
|
|
|
26462
26921
|
};
|
|
26463
26922
|
|
|
26464
26923
|
// src/engine/view-base.engine.ts
|
|
26465
|
-
import { RuntimeError as
|
|
26924
|
+
import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
26466
26925
|
var ViewEngineBase = class {
|
|
26467
26926
|
/**
|
|
26468
26927
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -26650,7 +27109,7 @@ var ViewEngineBase = class {
|
|
|
26650
27109
|
const { appDataEntityId } = this.view.model;
|
|
26651
27110
|
const { evt, context, params } = this.view;
|
|
26652
27111
|
if (!appDataEntityId) {
|
|
26653
|
-
throw new
|
|
27112
|
+
throw new RuntimeError45("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
26654
27113
|
}
|
|
26655
27114
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
26656
27115
|
const res = await app.deService.exec(
|
|
@@ -26905,6 +27364,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26905
27364
|
* @return {*} {IParams}
|
|
26906
27365
|
*/
|
|
26907
27366
|
getSearchParams() {
|
|
27367
|
+
var _a;
|
|
26908
27368
|
const params = {};
|
|
26909
27369
|
if (this.searchForm) {
|
|
26910
27370
|
const addParams = this.searchForm.getData()[0];
|
|
@@ -26919,11 +27379,20 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26919
27379
|
);
|
|
26920
27380
|
Object.assign(params, filteredParams);
|
|
26921
27381
|
}
|
|
26922
|
-
if (this.searchBar
|
|
26923
|
-
|
|
26924
|
-
|
|
26925
|
-
|
|
26926
|
-
|
|
27382
|
+
if (this.searchBar) {
|
|
27383
|
+
if (this.searchBar.state.query) {
|
|
27384
|
+
const addParams = {
|
|
27385
|
+
query: this.searchBar.state.query
|
|
27386
|
+
};
|
|
27387
|
+
Object.assign(params, addParams);
|
|
27388
|
+
}
|
|
27389
|
+
if ((_a = this.searchBar.state.selectedGroupItem) == null ? void 0 : _a.data) {
|
|
27390
|
+
const func = new Function(
|
|
27391
|
+
"return (".concat(this.searchBar.state.selectedGroupItem.data, ");")
|
|
27392
|
+
);
|
|
27393
|
+
const addParams = func();
|
|
27394
|
+
Object.assign(params, addParams);
|
|
27395
|
+
}
|
|
26927
27396
|
}
|
|
26928
27397
|
return params;
|
|
26929
27398
|
}
|
|
@@ -27012,7 +27481,7 @@ var GlobalUtil = class {
|
|
|
27012
27481
|
};
|
|
27013
27482
|
|
|
27014
27483
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
27015
|
-
import { RuntimeError as
|
|
27484
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
27016
27485
|
var LogicExecutor = class {
|
|
27017
27486
|
/**
|
|
27018
27487
|
* @author lxm
|
|
@@ -27033,7 +27502,7 @@ var LogicExecutor = class {
|
|
|
27033
27502
|
*/
|
|
27034
27503
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27035
27504
|
execute(_executeParams) {
|
|
27036
|
-
throw new
|
|
27505
|
+
throw new RuntimeError46("Method not implemented.");
|
|
27037
27506
|
}
|
|
27038
27507
|
/**
|
|
27039
27508
|
* 销毁方法
|
|
@@ -27137,7 +27606,7 @@ var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
|
27137
27606
|
};
|
|
27138
27607
|
|
|
27139
27608
|
// src/logic-scheduler/scheduler/logic-scheduler.ts
|
|
27140
|
-
import { mergeLeft } from "ramda";
|
|
27609
|
+
import { mergeLeft as mergeLeft2 } from "ramda";
|
|
27141
27610
|
var LogicScheduler = class {
|
|
27142
27611
|
constructor(logics) {
|
|
27143
27612
|
this.triggers = /* @__PURE__ */ new Map();
|
|
@@ -27190,7 +27659,7 @@ var LogicScheduler = class {
|
|
|
27190
27659
|
if (this.defaultParamsCb) {
|
|
27191
27660
|
defaultParams = this.defaultParamsCb();
|
|
27192
27661
|
}
|
|
27193
|
-
return
|
|
27662
|
+
return mergeLeft2(executeParams, defaultParams);
|
|
27194
27663
|
}
|
|
27195
27664
|
/**
|
|
27196
27665
|
* 创建触发器实例
|
|
@@ -27465,7 +27934,7 @@ var LogicSchedulerCenter = class {
|
|
|
27465
27934
|
};
|
|
27466
27935
|
|
|
27467
27936
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
27468
|
-
import { RuntimeError as
|
|
27937
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
27469
27938
|
var LogicTrigger = class {
|
|
27470
27939
|
/**
|
|
27471
27940
|
* @author lxm
|
|
@@ -27525,7 +27994,7 @@ var LogicTrigger = class {
|
|
|
27525
27994
|
if (this.executor) {
|
|
27526
27995
|
return this.executor.execute(executeParams);
|
|
27527
27996
|
}
|
|
27528
|
-
throw new
|
|
27997
|
+
throw new RuntimeError47("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
27529
27998
|
}
|
|
27530
27999
|
/**
|
|
27531
28000
|
* 销毁方法
|
|
@@ -27542,12 +28011,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
27542
28011
|
};
|
|
27543
28012
|
|
|
27544
28013
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
27545
|
-
import { RuntimeError as
|
|
28014
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
27546
28015
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
27547
28016
|
bindExecutor(executor) {
|
|
27548
28017
|
super.bindExecutor(executor);
|
|
27549
28018
|
if (this.executor.type !== "SCRIPT") {
|
|
27550
|
-
throw new
|
|
28019
|
+
throw new RuntimeError48(
|
|
27551
28020
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
27552
28021
|
);
|
|
27553
28022
|
}
|
|
@@ -27579,12 +28048,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
27579
28048
|
if (typeof result === "boolean") {
|
|
27580
28049
|
return result;
|
|
27581
28050
|
}
|
|
27582
|
-
throw new
|
|
28051
|
+
throw new RuntimeError48("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
27583
28052
|
}
|
|
27584
28053
|
};
|
|
27585
28054
|
|
|
27586
28055
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
27587
|
-
import { RuntimeError as
|
|
28056
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
27588
28057
|
var TimerTrigger = class extends LogicTrigger {
|
|
27589
28058
|
constructor() {
|
|
27590
28059
|
super(...arguments);
|
|
@@ -27593,7 +28062,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
27593
28062
|
start() {
|
|
27594
28063
|
this.timer = setInterval(() => {
|
|
27595
28064
|
if (!this.scheduler.defaultParamsCb) {
|
|
27596
|
-
throw new
|
|
28065
|
+
throw new RuntimeError49("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
27597
28066
|
}
|
|
27598
28067
|
const params = this.scheduler.defaultParamsCb();
|
|
27599
28068
|
this.executor.execute(params);
|
|
@@ -27610,10 +28079,10 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
27610
28079
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
27611
28080
|
import {
|
|
27612
28081
|
ModelError as ModelError29,
|
|
27613
|
-
RuntimeError as
|
|
28082
|
+
RuntimeError as RuntimeError50,
|
|
27614
28083
|
RuntimeModelError as RuntimeModelError47
|
|
27615
28084
|
} from "@ibiz-template/core";
|
|
27616
|
-
import { notNilEmpty as
|
|
28085
|
+
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
27617
28086
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
27618
28087
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27619
28088
|
execute(executeParams) {
|
|
@@ -27646,7 +28115,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27646
28115
|
const { context, params, ...rest } = parameters;
|
|
27647
28116
|
const { data } = parameters;
|
|
27648
28117
|
if (!(data == null ? void 0 : data[0])) {
|
|
27649
|
-
throw new
|
|
28118
|
+
throw new RuntimeError50("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
27650
28119
|
}
|
|
27651
28120
|
const openViewRef = appUILogic.openDataAppView;
|
|
27652
28121
|
if (!openViewRef) {
|
|
@@ -27669,7 +28138,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27669
28138
|
);
|
|
27670
28139
|
let tempParams = {};
|
|
27671
28140
|
const navParams = openViewRef.navigateParams;
|
|
27672
|
-
if (
|
|
28141
|
+
if (notNilEmpty8(navParams)) {
|
|
27673
28142
|
tempParams = convertNavData(navParams, params, context, data[0]);
|
|
27674
28143
|
}
|
|
27675
28144
|
return ibiz.commands.execute(
|
|
@@ -27719,12 +28188,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27719
28188
|
let tempParams = {};
|
|
27720
28189
|
const _data = (data == null ? void 0 : data[0]) || {};
|
|
27721
28190
|
const navContexts = newViewRef.navigateContexts;
|
|
27722
|
-
if (
|
|
28191
|
+
if (notNilEmpty8(navContexts)) {
|
|
27723
28192
|
tempContext = convertNavData(navContexts, context, params, _data);
|
|
27724
28193
|
}
|
|
27725
28194
|
tempContext = Object.assign(context, tempContext);
|
|
27726
28195
|
const navParams = newViewRef.navigateParams;
|
|
27727
|
-
if (
|
|
28196
|
+
if (notNilEmpty8(navParams)) {
|
|
27728
28197
|
tempParams = convertNavData(navParams, params, context, _data);
|
|
27729
28198
|
}
|
|
27730
28199
|
if (context.srfcopymode) {
|
|
@@ -27769,12 +28238,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27769
28238
|
}
|
|
27770
28239
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
27771
28240
|
if (!selectData) {
|
|
27772
|
-
throw new
|
|
28241
|
+
throw new RuntimeError50("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
27773
28242
|
}
|
|
27774
28243
|
const indexType = selectData.srfkey;
|
|
27775
28244
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
27776
28245
|
if (!findView) {
|
|
27777
|
-
throw new
|
|
28246
|
+
throw new RuntimeError50(
|
|
27778
28247
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
27779
28248
|
);
|
|
27780
28249
|
}
|
|
@@ -28134,6 +28603,7 @@ export {
|
|
|
28134
28603
|
UIMapField,
|
|
28135
28604
|
V7AuthService,
|
|
28136
28605
|
VIEW_PROVIDER_PREFIX,
|
|
28606
|
+
ValueExUtil,
|
|
28137
28607
|
ViewController,
|
|
28138
28608
|
ViewEngineBase,
|
|
28139
28609
|
ViewLayoutPanelController,
|