@ibiz-template/runtime 0.1.14 → 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 +599 -132
- 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/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 +3 -2
- package/out/ui-action/provider/backend-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/backend-ui-action-provider.js +4 -2
- 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 +2 -2
- package/src/controller/common/base.controller.ts +2 -0
- 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 +9 -2
- package/src/ui-action/provider/backend-ui-action-provider.ts +4 -2
- 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,13 +11487,19 @@ 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
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
11505
|
res = await this.app.net.delete("".concat(path2, "/").concat(methodName), data);
|
|
@@ -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
|
}
|
|
@@ -15392,7 +15833,7 @@ var ControlController = class extends BaseController {
|
|
|
15392
15833
|
};
|
|
15393
15834
|
|
|
15394
15835
|
// src/controller/common/control/md-control.controller.ts
|
|
15395
|
-
import { isElementSame, RuntimeError as
|
|
15836
|
+
import { isElementSame, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
15396
15837
|
var MDControlController = class extends ControlController {
|
|
15397
15838
|
get _evt() {
|
|
15398
15839
|
return this.evt;
|
|
@@ -15528,7 +15969,7 @@ var MDControlController = class extends ControlController {
|
|
|
15528
15969
|
async remove(args) {
|
|
15529
15970
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
15530
15971
|
if (!(data == null ? void 0 : data.length)) {
|
|
15531
|
-
throw new
|
|
15972
|
+
throw new RuntimeError23("\u672A\u9009\u4E2D\u6570\u636E");
|
|
15532
15973
|
}
|
|
15533
15974
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
15534
15975
|
const del = await ibiz.confirm.error({
|
|
@@ -15665,7 +16106,7 @@ var MDControlController = class extends ControlController {
|
|
|
15665
16106
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
15666
16107
|
import {
|
|
15667
16108
|
findRecursiveChild,
|
|
15668
|
-
RuntimeError as
|
|
16109
|
+
RuntimeError as RuntimeError24,
|
|
15669
16110
|
RuntimeModelError as RuntimeModelError21
|
|
15670
16111
|
} from "@ibiz-template/core";
|
|
15671
16112
|
var AppMenuController = class extends ControlController {
|
|
@@ -15705,7 +16146,7 @@ var AppMenuController = class extends ControlController {
|
|
|
15705
16146
|
childrenFields: ["appMenuItems"]
|
|
15706
16147
|
});
|
|
15707
16148
|
if (!menuItem) {
|
|
15708
|
-
throw new
|
|
16149
|
+
throw new RuntimeError24("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
15709
16150
|
}
|
|
15710
16151
|
this.evt.emit("onClick", {
|
|
15711
16152
|
eventArg: id,
|
|
@@ -15795,7 +16236,7 @@ var AppMenuController = class extends ControlController {
|
|
|
15795
16236
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
15796
16237
|
import {
|
|
15797
16238
|
findRecursiveChild as findRecursiveChild2,
|
|
15798
|
-
RuntimeError as
|
|
16239
|
+
RuntimeError as RuntimeError25,
|
|
15799
16240
|
RuntimeModelError as RuntimeModelError22
|
|
15800
16241
|
} from "@ibiz-template/core";
|
|
15801
16242
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -15805,7 +16246,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
15805
16246
|
childrenFields: ["appMenuItems"]
|
|
15806
16247
|
});
|
|
15807
16248
|
if (!menuItem) {
|
|
15808
|
-
throw new
|
|
16249
|
+
throw new RuntimeError25("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
15809
16250
|
}
|
|
15810
16251
|
this.evt.emit("onClick", {
|
|
15811
16252
|
eventArg: id,
|
|
@@ -15833,7 +16274,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
15833
16274
|
import dayjs from "dayjs";
|
|
15834
16275
|
|
|
15835
16276
|
// src/controller/control/calendar/calendar.service.ts
|
|
15836
|
-
import { RuntimeError as
|
|
16277
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
15837
16278
|
var CalendarService = class extends MDControlService {
|
|
15838
16279
|
/**
|
|
15839
16280
|
* 执行查询多条数据的方法
|
|
@@ -15883,11 +16324,11 @@ var CalendarService = class extends MDControlService {
|
|
|
15883
16324
|
setCalendarConfigData(items, index) {
|
|
15884
16325
|
const { sysCalendarItems } = this.model;
|
|
15885
16326
|
if (!sysCalendarItems) {
|
|
15886
|
-
throw new
|
|
16327
|
+
throw new RuntimeError26("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
15887
16328
|
}
|
|
15888
16329
|
const calendarItem = sysCalendarItems[index];
|
|
15889
16330
|
if (!calendarItem) {
|
|
15890
|
-
throw new
|
|
16331
|
+
throw new RuntimeError26("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
15891
16332
|
}
|
|
15892
16333
|
return items.map((item) => {
|
|
15893
16334
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -16077,11 +16518,11 @@ var CalendarController = class extends MDControlController {
|
|
|
16077
16518
|
};
|
|
16078
16519
|
|
|
16079
16520
|
// src/controller/control/chart/chart.controller.ts
|
|
16080
|
-
import { RuntimeError as
|
|
16521
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
16081
16522
|
|
|
16082
16523
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
16083
16524
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
16084
|
-
import { RuntimeError as
|
|
16525
|
+
import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
16085
16526
|
|
|
16086
16527
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
16087
16528
|
import { RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
@@ -16094,7 +16535,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
16094
16535
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
16095
16536
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
16096
16537
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
16097
|
-
import { clone as clone11, isNil as
|
|
16538
|
+
import { clone as clone11, isNil as isNil13, mergeDeepRight } from "ramda";
|
|
16098
16539
|
dayjs2.extend(minMax);
|
|
16099
16540
|
dayjs2.extend(isSameOrBefore);
|
|
16100
16541
|
dayjs2.extend(quarterOfYear);
|
|
@@ -16183,10 +16624,10 @@ var BaseSeriesGenerator = class {
|
|
|
16183
16624
|
* @return {*} {(string | undefined)}
|
|
16184
16625
|
*/
|
|
16185
16626
|
translateVal(codeListKey, val, isExclude = false) {
|
|
16186
|
-
if (
|
|
16627
|
+
if (isNil13(val)) {
|
|
16187
16628
|
return void 0;
|
|
16188
16629
|
}
|
|
16189
|
-
if (
|
|
16630
|
+
if (isNil13(codeListKey)) {
|
|
16190
16631
|
return val;
|
|
16191
16632
|
}
|
|
16192
16633
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
@@ -16216,7 +16657,7 @@ var BaseSeriesGenerator = class {
|
|
|
16216
16657
|
seriesCodeListId,
|
|
16217
16658
|
item[this.groupField]
|
|
16218
16659
|
);
|
|
16219
|
-
if (
|
|
16660
|
+
if (isNil13(groupVal)) {
|
|
16220
16661
|
return;
|
|
16221
16662
|
}
|
|
16222
16663
|
group = groupVal;
|
|
@@ -17017,7 +17458,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
17017
17458
|
getSrfkeyByParams(params) {
|
|
17018
17459
|
const generator = this.seriesGenerators[params.seriesIndex];
|
|
17019
17460
|
if (!generator) {
|
|
17020
|
-
throw new
|
|
17461
|
+
throw new RuntimeError27("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
17021
17462
|
}
|
|
17022
17463
|
return generator.getSrfkeyByParams(params);
|
|
17023
17464
|
}
|
|
@@ -17129,10 +17570,10 @@ var ChartController = class extends MDControlController {
|
|
|
17129
17570
|
*/
|
|
17130
17571
|
updateChart() {
|
|
17131
17572
|
if (!this.chart) {
|
|
17132
|
-
throw new
|
|
17573
|
+
throw new RuntimeError28("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
17133
17574
|
}
|
|
17134
17575
|
if (!this.options) {
|
|
17135
|
-
throw new
|
|
17576
|
+
throw new RuntimeError28("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
17136
17577
|
}
|
|
17137
17578
|
this.chart.setOption(this.options);
|
|
17138
17579
|
this.resizeChart();
|
|
@@ -17171,7 +17612,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
17171
17612
|
async onCreated() {
|
|
17172
17613
|
await super.onCreated();
|
|
17173
17614
|
this.view.evt.on("onViewInfoChange", ({ caption: _caption, dataInfo }) => {
|
|
17174
|
-
this.state.caption = "".concat(this.
|
|
17615
|
+
this.state.caption = "".concat(this.view.model.caption).concat(dataInfo ? "-".concat(dataInfo) : "");
|
|
17175
17616
|
});
|
|
17176
17617
|
}
|
|
17177
17618
|
};
|
|
@@ -17181,13 +17622,13 @@ import { recursiveIterate } from "@ibiz-template/core";
|
|
|
17181
17622
|
|
|
17182
17623
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17183
17624
|
import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
17184
|
-
import { isArray as
|
|
17625
|
+
import { isArray as isArray3 } from "qx-util";
|
|
17185
17626
|
|
|
17186
17627
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
17187
17628
|
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
17188
17629
|
|
|
17189
17630
|
// src/ui-logic/index.ts
|
|
17190
|
-
import { RuntimeError as
|
|
17631
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
17191
17632
|
|
|
17192
17633
|
// src/ui-logic/ui-logic.ts
|
|
17193
17634
|
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
@@ -17699,7 +18140,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
17699
18140
|
};
|
|
17700
18141
|
|
|
17701
18142
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
17702
|
-
import { RuntimeError as
|
|
18143
|
+
import { RuntimeError as RuntimeError29, RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
17703
18144
|
import { isFunction } from "lodash-es";
|
|
17704
18145
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
17705
18146
|
async exec(ctx) {
|
|
@@ -17716,14 +18157,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
17716
18157
|
}
|
|
17717
18158
|
const invokeParam = ctx.params[invokeParamId];
|
|
17718
18159
|
if (!invokeParam) {
|
|
17719
|
-
throw new
|
|
18160
|
+
throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
17720
18161
|
}
|
|
17721
18162
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
17722
18163
|
if (!invokeCtrl) {
|
|
17723
|
-
throw new
|
|
18164
|
+
throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
17724
18165
|
}
|
|
17725
18166
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
17726
|
-
throw new
|
|
18167
|
+
throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
17727
18168
|
}
|
|
17728
18169
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
17729
18170
|
}
|
|
@@ -18004,7 +18445,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18004
18445
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
18005
18446
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
18006
18447
|
if (!deUILogic) {
|
|
18007
|
-
throw new
|
|
18448
|
+
throw new RuntimeError30(
|
|
18008
18449
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
18009
18450
|
);
|
|
18010
18451
|
}
|
|
@@ -18017,7 +18458,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18017
18458
|
}
|
|
18018
18459
|
|
|
18019
18460
|
// src/ui-action/uiaction-util.ts
|
|
18020
|
-
import { RuntimeError as
|
|
18461
|
+
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
18021
18462
|
var UIActionUtil = class {
|
|
18022
18463
|
/**
|
|
18023
18464
|
* 执行界面行为
|
|
@@ -18032,7 +18473,7 @@ var UIActionUtil = class {
|
|
|
18032
18473
|
static async exec(actionId, params) {
|
|
18033
18474
|
const action = await getUIActionById(actionId);
|
|
18034
18475
|
if (!action) {
|
|
18035
|
-
throw new
|
|
18476
|
+
throw new RuntimeError31("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
18036
18477
|
}
|
|
18037
18478
|
const provider = await getUIActionProvider(action);
|
|
18038
18479
|
return provider.exec(action, params);
|
|
@@ -18049,6 +18490,7 @@ var UIActionUtil = class {
|
|
|
18049
18490
|
var _a, _b;
|
|
18050
18491
|
const result = await this.exec(actionId, params);
|
|
18051
18492
|
if (result.closeView) {
|
|
18493
|
+
params.view.modal.ignoreDismissCheck = true;
|
|
18052
18494
|
params.view.closeView({ ok: true });
|
|
18053
18495
|
} else if (result.refresh) {
|
|
18054
18496
|
switch (result.refreshMode) {
|
|
@@ -18256,7 +18698,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18256
18698
|
data,
|
|
18257
18699
|
params
|
|
18258
18700
|
);
|
|
18259
|
-
const tempParams = { ...
|
|
18701
|
+
const tempParams = { ...resultParams };
|
|
18260
18702
|
const frontPSAppView = action.frontAppViewId;
|
|
18261
18703
|
if (frontPSAppView) {
|
|
18262
18704
|
const res2 = await ibiz.commands.execute(
|
|
@@ -18283,7 +18725,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18283
18725
|
const _data = resultData.map((item) => {
|
|
18284
18726
|
var _a;
|
|
18285
18727
|
return ((_a = item.getOrigin) == null ? void 0 : _a.call(item)) || item || {};
|
|
18286
|
-
});
|
|
18728
|
+
}).map((item) => Object.assign(item, tempParams));
|
|
18287
18729
|
const isMultiData = ["MULTIKEY", "MULTIDATA"].includes(
|
|
18288
18730
|
action.actionTarget
|
|
18289
18731
|
);
|
|
@@ -18298,7 +18740,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
18298
18740
|
ibiz.message.success(action.successMsg);
|
|
18299
18741
|
}
|
|
18300
18742
|
Object.assign(actionResult, {
|
|
18301
|
-
data:
|
|
18743
|
+
data: isArray3(res.data) ? res.data : [res.data],
|
|
18302
18744
|
nextContext: resultContext,
|
|
18303
18745
|
nextParams: tempParams
|
|
18304
18746
|
});
|
|
@@ -18619,7 +19061,7 @@ var ContextMenuController = class extends ToolbarController {
|
|
|
18619
19061
|
};
|
|
18620
19062
|
|
|
18621
19063
|
// src/controller/control/dashboard/dashboard.controller.ts
|
|
18622
|
-
import { RuntimeError as
|
|
19064
|
+
import { RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
18623
19065
|
var DashboardController = class extends ControlController {
|
|
18624
19066
|
constructor() {
|
|
18625
19067
|
super(...arguments);
|
|
@@ -18706,7 +19148,7 @@ var DashboardController = class extends ControlController {
|
|
|
18706
19148
|
);
|
|
18707
19149
|
if (values.find((item) => item.status === "rejected")) {
|
|
18708
19150
|
ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
|
|
18709
|
-
throw new
|
|
19151
|
+
throw new RuntimeError32("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
|
|
18710
19152
|
}
|
|
18711
19153
|
}
|
|
18712
19154
|
};
|
|
@@ -19159,7 +19601,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
19159
19601
|
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
19160
19602
|
|
|
19161
19603
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
19162
|
-
import { RuntimeError as
|
|
19604
|
+
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
19163
19605
|
var ExpBarControlController = class extends ControlController {
|
|
19164
19606
|
constructor() {
|
|
19165
19607
|
super(...arguments);
|
|
@@ -19439,7 +19881,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
19439
19881
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
19440
19882
|
return this.XDataModel.navAppViewId;
|
|
19441
19883
|
}
|
|
19442
|
-
throw new
|
|
19884
|
+
throw new RuntimeError33("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
19443
19885
|
}
|
|
19444
19886
|
/**
|
|
19445
19887
|
* 获取导航视图
|
|
@@ -19568,7 +20010,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
19568
20010
|
};
|
|
19569
20011
|
|
|
19570
20012
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
19571
|
-
import { RuntimeError as
|
|
20013
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
19572
20014
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
19573
20015
|
constructor() {
|
|
19574
20016
|
super(...arguments);
|
|
@@ -19643,7 +20085,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
19643
20085
|
const deData = node.deData || node;
|
|
19644
20086
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
19645
20087
|
if (!nodeModel) {
|
|
19646
|
-
throw new
|
|
20088
|
+
throw new RuntimeError34("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
19647
20089
|
}
|
|
19648
20090
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
19649
20091
|
result.context.currentSrfNav = nodeId;
|
|
@@ -19696,7 +20138,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
19696
20138
|
import { mergeDefaultInLeft } from "@ibiz-template/core";
|
|
19697
20139
|
|
|
19698
20140
|
// src/controller/control/form/form/form.controller.ts
|
|
19699
|
-
import { RuntimeError as
|
|
20141
|
+
import { RuntimeError as RuntimeError35, debounceAndAsyncMerge } from "@ibiz-template/core";
|
|
19700
20142
|
var FormController = class extends ControlController {
|
|
19701
20143
|
constructor() {
|
|
19702
20144
|
super(...arguments);
|
|
@@ -19761,7 +20203,7 @@ var FormController = class extends ControlController {
|
|
|
19761
20203
|
);
|
|
19762
20204
|
if (values.find((item) => item.status === "rejected")) {
|
|
19763
20205
|
ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
|
|
19764
|
-
throw new
|
|
20206
|
+
throw new RuntimeError35("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
|
|
19765
20207
|
}
|
|
19766
20208
|
}
|
|
19767
20209
|
/**
|
|
@@ -20368,7 +20810,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
20368
20810
|
|
|
20369
20811
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
20370
20812
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
20371
|
-
import { createUUID as createUUID3, notNilEmpty as
|
|
20813
|
+
import { createUUID as createUUID3, notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
20372
20814
|
|
|
20373
20815
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
20374
20816
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -20447,7 +20889,9 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
20447
20889
|
await super.formStateNotify(state);
|
|
20448
20890
|
this.isNewData = state === "DRAFT" /* DRAFT */;
|
|
20449
20891
|
this.state.showMask = this.isNewData;
|
|
20450
|
-
|
|
20892
|
+
if (state === "LOAD" /* LOAD */ || state === "DRAFT" /* DRAFT */) {
|
|
20893
|
+
this.calcViewParams();
|
|
20894
|
+
}
|
|
20451
20895
|
}
|
|
20452
20896
|
/**
|
|
20453
20897
|
* 计算视图上下文和视图参数,
|
|
@@ -20459,7 +20903,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
20459
20903
|
calcViewParams() {
|
|
20460
20904
|
let newContext = this.form.context.clone();
|
|
20461
20905
|
const navContexts = this.model.navigateContexts;
|
|
20462
|
-
if (
|
|
20906
|
+
if (notNilEmpty7(navContexts)) {
|
|
20463
20907
|
newContext = Object.assign(
|
|
20464
20908
|
newContext,
|
|
20465
20909
|
convertNavData(
|
|
@@ -20629,7 +21073,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
20629
21073
|
// src/controller/control/form/form-detail/form-item/form-item.controller.ts
|
|
20630
21074
|
import Schema from "async-validator";
|
|
20631
21075
|
import { createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
20632
|
-
import { ModelError as ModelError24, RuntimeError as
|
|
21076
|
+
import { ModelError as ModelError24, RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
20633
21077
|
import dayjs3 from "dayjs";
|
|
20634
21078
|
|
|
20635
21079
|
// src/controller/control/form/form-detail/form-item/form-item.state.ts
|
|
@@ -20934,7 +21378,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
20934
21378
|
case "SESSION":
|
|
20935
21379
|
case "APPLICATION":
|
|
20936
21380
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
20937
|
-
throw new
|
|
21381
|
+
throw new RuntimeError36("appdata.context\u4E0D\u5B58\u5728");
|
|
20938
21382
|
}
|
|
20939
21383
|
data[this.name] = ibiz.appData.context[defaultValue];
|
|
20940
21384
|
break;
|
|
@@ -21059,7 +21503,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
21059
21503
|
};
|
|
21060
21504
|
|
|
21061
21505
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
21062
|
-
import { RuntimeError as
|
|
21506
|
+
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
21063
21507
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
21064
21508
|
/**
|
|
21065
21509
|
* 初始化
|
|
@@ -21074,7 +21518,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
21074
21518
|
const { model } = this.parent;
|
|
21075
21519
|
const { contentControl } = model;
|
|
21076
21520
|
if (!contentControl) {
|
|
21077
|
-
throw new
|
|
21521
|
+
throw new RuntimeError37("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
21078
21522
|
}
|
|
21079
21523
|
this.controlModel = contentControl;
|
|
21080
21524
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -21178,13 +21622,13 @@ var FormMDCtrlDataViewController = class extends FormMDCtrlControlController {
|
|
|
21178
21622
|
|
|
21179
21623
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.controller.ts
|
|
21180
21624
|
import { mergeInLeft as mergeInLeft2 } from "@ibiz-template/core";
|
|
21181
|
-
import { isArray as
|
|
21625
|
+
import { isArray as isArray4 } from "lodash-es";
|
|
21182
21626
|
|
|
21183
21627
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
21184
21628
|
import {
|
|
21185
21629
|
awaitTimeout,
|
|
21186
21630
|
mergeInLeft,
|
|
21187
|
-
RuntimeError as
|
|
21631
|
+
RuntimeError as RuntimeError38,
|
|
21188
21632
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
21189
21633
|
} from "@ibiz-template/core";
|
|
21190
21634
|
import { debounce } from "lodash-es";
|
|
@@ -21554,7 +21998,7 @@ var EditFormController = class extends FormController {
|
|
|
21554
21998
|
}
|
|
21555
21999
|
const isValid = await this.validate();
|
|
21556
22000
|
if (!isValid) {
|
|
21557
|
-
throw new
|
|
22001
|
+
throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21558
22002
|
}
|
|
21559
22003
|
await this.startLoading();
|
|
21560
22004
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -21644,7 +22088,7 @@ var EditFormController = class extends FormController {
|
|
|
21644
22088
|
(item) => item.id === formItemUpdateId
|
|
21645
22089
|
);
|
|
21646
22090
|
if (!formItemUpdate) {
|
|
21647
|
-
throw new
|
|
22091
|
+
throw new RuntimeError38("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
21648
22092
|
}
|
|
21649
22093
|
const { appDEMethodId, defiupdateDetails } = formItemUpdate;
|
|
21650
22094
|
const updateItems = defiupdateDetails.map((item) => item.id);
|
|
@@ -21674,7 +22118,7 @@ var EditFormController = class extends FormController {
|
|
|
21674
22118
|
async wfStart(extraParams = {}) {
|
|
21675
22119
|
const isValid = await this.validate();
|
|
21676
22120
|
if (!isValid) {
|
|
21677
|
-
throw new
|
|
22121
|
+
throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21678
22122
|
}
|
|
21679
22123
|
await this.startLoading();
|
|
21680
22124
|
try {
|
|
@@ -21702,7 +22146,7 @@ var EditFormController = class extends FormController {
|
|
|
21702
22146
|
async wfSubmit(extraParams = {}) {
|
|
21703
22147
|
const isValid = await this.validate();
|
|
21704
22148
|
if (!isValid) {
|
|
21705
|
-
throw new
|
|
22149
|
+
throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
21706
22150
|
}
|
|
21707
22151
|
await this.startLoading();
|
|
21708
22152
|
try {
|
|
@@ -21816,7 +22260,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
21816
22260
|
handleResponse(response) {
|
|
21817
22261
|
const res = response;
|
|
21818
22262
|
if (res.ok) {
|
|
21819
|
-
if (
|
|
22263
|
+
if (isArray4(res.data)) {
|
|
21820
22264
|
res.data = res.data.map(
|
|
21821
22265
|
(item) => this.service.toUIData(item)
|
|
21822
22266
|
);
|
|
@@ -21928,7 +22372,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
21928
22372
|
};
|
|
21929
22373
|
|
|
21930
22374
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
21931
|
-
import { RuntimeError as
|
|
22375
|
+
import { RuntimeError as RuntimeError39, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
21932
22376
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
21933
22377
|
constructor() {
|
|
21934
22378
|
super(...arguments);
|
|
@@ -22033,7 +22477,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
22033
22477
|
const { model } = this.parent;
|
|
22034
22478
|
const { contentControl } = model;
|
|
22035
22479
|
if (!contentControl) {
|
|
22036
|
-
throw new
|
|
22480
|
+
throw new RuntimeError39("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
22037
22481
|
}
|
|
22038
22482
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
22039
22483
|
this.controlModel = contentControl;
|
|
@@ -22743,7 +23187,7 @@ import {
|
|
|
22743
23187
|
awaitTimeout as awaitTimeout2,
|
|
22744
23188
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
22745
23189
|
recursiveIterate as recursiveIterate4,
|
|
22746
|
-
RuntimeError as
|
|
23190
|
+
RuntimeError as RuntimeError40,
|
|
22747
23191
|
RuntimeModelError as RuntimeModelError43
|
|
22748
23192
|
} from "@ibiz-template/core";
|
|
22749
23193
|
import { clone as clone13 } from "ramda";
|
|
@@ -23088,11 +23532,11 @@ var GridController = class extends MDControlController {
|
|
|
23088
23532
|
this.state.rows.splice(index, 1);
|
|
23089
23533
|
this.state.groups.forEach((item) => {
|
|
23090
23534
|
if (item.children.length) {
|
|
23091
|
-
const
|
|
23535
|
+
const findIndex2 = item.children.findIndex(
|
|
23092
23536
|
(item2) => item2.srfkey === data.srfkey
|
|
23093
23537
|
);
|
|
23094
|
-
if (
|
|
23095
|
-
item.children.splice(
|
|
23538
|
+
if (findIndex2 !== -1) {
|
|
23539
|
+
item.children.splice(findIndex2, 1);
|
|
23096
23540
|
}
|
|
23097
23541
|
}
|
|
23098
23542
|
});
|
|
@@ -23111,7 +23555,7 @@ var GridController = class extends MDControlController {
|
|
|
23111
23555
|
}
|
|
23112
23556
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
23113
23557
|
if (editingRow) {
|
|
23114
|
-
throw new
|
|
23558
|
+
throw new RuntimeError40("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
23115
23559
|
}
|
|
23116
23560
|
const res = await this.service.getDraft(this.context, this.params);
|
|
23117
23561
|
this.state.items.unshift(res.data);
|
|
@@ -23136,7 +23580,7 @@ var GridController = class extends MDControlController {
|
|
|
23136
23580
|
(item) => item.data.srfkey === data.srfkey
|
|
23137
23581
|
);
|
|
23138
23582
|
if (!rowState) {
|
|
23139
|
-
throw new
|
|
23583
|
+
throw new RuntimeError40("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
23140
23584
|
}
|
|
23141
23585
|
if (!rowState.modified) {
|
|
23142
23586
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -23148,7 +23592,7 @@ var GridController = class extends MDControlController {
|
|
|
23148
23592
|
}
|
|
23149
23593
|
const isValid = await this.validate(rowState);
|
|
23150
23594
|
if (!isValid) {
|
|
23151
|
-
throw new
|
|
23595
|
+
throw new RuntimeError40("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
23152
23596
|
}
|
|
23153
23597
|
await this.startLoading();
|
|
23154
23598
|
let res;
|
|
@@ -23295,7 +23739,7 @@ var GridController = class extends MDControlController {
|
|
|
23295
23739
|
);
|
|
23296
23740
|
if (values.find((item) => item.status === "rejected")) {
|
|
23297
23741
|
ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
|
|
23298
|
-
throw new
|
|
23742
|
+
throw new RuntimeError40("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
|
|
23299
23743
|
}
|
|
23300
23744
|
}
|
|
23301
23745
|
/**
|
|
@@ -23325,7 +23769,7 @@ var GridController = class extends MDControlController {
|
|
|
23325
23769
|
}
|
|
23326
23770
|
async toggleRowEdit() {
|
|
23327
23771
|
if (!this.model.enableRowNew) {
|
|
23328
|
-
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");
|
|
23329
23773
|
}
|
|
23330
23774
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
23331
23775
|
}
|
|
@@ -23358,7 +23802,7 @@ var GridController = class extends MDControlController {
|
|
|
23358
23802
|
if (toState === true) {
|
|
23359
23803
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
23360
23804
|
if (editingRow) {
|
|
23361
|
-
throw new
|
|
23805
|
+
throw new RuntimeError40("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
23362
23806
|
}
|
|
23363
23807
|
}
|
|
23364
23808
|
row.showRowEdit = toState;
|
|
@@ -23401,7 +23845,7 @@ var GridController = class extends MDControlController {
|
|
|
23401
23845
|
(item) => item.id === updateId
|
|
23402
23846
|
);
|
|
23403
23847
|
if (!findUpdate) {
|
|
23404
|
-
throw new
|
|
23848
|
+
throw new RuntimeError40("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
23405
23849
|
}
|
|
23406
23850
|
const { appDEMethodId, degeiupdateDetails } = findUpdate;
|
|
23407
23851
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -23496,7 +23940,7 @@ var GridController = class extends MDControlController {
|
|
|
23496
23940
|
data2 = this.getData();
|
|
23497
23941
|
}
|
|
23498
23942
|
if (data2.length === 0) {
|
|
23499
|
-
throw new
|
|
23943
|
+
throw new RuntimeError40("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
23500
23944
|
}
|
|
23501
23945
|
return formatExcelData(data2);
|
|
23502
23946
|
};
|
|
@@ -23515,11 +23959,11 @@ var GridController = class extends MDControlController {
|
|
|
23515
23959
|
);
|
|
23516
23960
|
const data = formatArrayData(filterVal, await getExportData());
|
|
23517
23961
|
if (!ibiz.util.getExportExcel) {
|
|
23518
|
-
throw new
|
|
23962
|
+
throw new RuntimeError40("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
23519
23963
|
}
|
|
23520
23964
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
23521
23965
|
if (!exportExcel) {
|
|
23522
|
-
throw new
|
|
23966
|
+
throw new RuntimeError40("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
23523
23967
|
}
|
|
23524
23968
|
exportExcel.exportJsonToExcel({
|
|
23525
23969
|
header,
|
|
@@ -23659,7 +24103,15 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23659
24103
|
* @param {MouseEvent} event 鼠标事件
|
|
23660
24104
|
* @returns {*} {Promise<void>}
|
|
23661
24105
|
*/
|
|
23662
|
-
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
|
+
});
|
|
23663
24115
|
}
|
|
23664
24116
|
/**
|
|
23665
24117
|
* 加载代码表数据
|
|
@@ -23746,6 +24198,9 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23746
24198
|
* @return {*} {string}
|
|
23747
24199
|
*/
|
|
23748
24200
|
formatValue(value = "") {
|
|
24201
|
+
if (this.model.valueType) {
|
|
24202
|
+
return ValueExUtil.toText(this.model, value);
|
|
24203
|
+
}
|
|
23749
24204
|
const strVal = "".concat(value);
|
|
23750
24205
|
if (!this.valueFormat) {
|
|
23751
24206
|
return strVal;
|
|
@@ -23813,7 +24268,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
23813
24268
|
};
|
|
23814
24269
|
|
|
23815
24270
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
23816
|
-
import { RuntimeError as
|
|
24271
|
+
import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
23817
24272
|
import Schema2 from "async-validator";
|
|
23818
24273
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
23819
24274
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -23947,7 +24402,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
23947
24402
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
23948
24403
|
const result = await this.validate(row);
|
|
23949
24404
|
if (!result) {
|
|
23950
|
-
throw new
|
|
24405
|
+
throw new RuntimeError41(
|
|
23951
24406
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
23952
24407
|
);
|
|
23953
24408
|
}
|
|
@@ -24299,7 +24754,7 @@ var ListController = class extends MDControlController {
|
|
|
24299
24754
|
};
|
|
24300
24755
|
|
|
24301
24756
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
24302
|
-
import { RuntimeError as
|
|
24757
|
+
import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
24303
24758
|
var PanelController = class extends ControlController {
|
|
24304
24759
|
constructor() {
|
|
24305
24760
|
super(...arguments);
|
|
@@ -24397,7 +24852,7 @@ var PanelController = class extends ControlController {
|
|
|
24397
24852
|
async load() {
|
|
24398
24853
|
const data = await this.prepareData();
|
|
24399
24854
|
if (!data) {
|
|
24400
|
-
throw new
|
|
24855
|
+
throw new RuntimeError42("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
24401
24856
|
}
|
|
24402
24857
|
const panelData = this.convertData(data);
|
|
24403
24858
|
this.state.data = panelData;
|
|
@@ -24873,6 +25328,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24873
25328
|
initState() {
|
|
24874
25329
|
super.initState();
|
|
24875
25330
|
this.state.query = "";
|
|
25331
|
+
this.state.selectedGroupItem = null;
|
|
24876
25332
|
this.state.visible = !!(this.model.enableQuickSearch || this.model.enableGroup || this.model.enableFilter);
|
|
24877
25333
|
}
|
|
24878
25334
|
async onCreated() {
|
|
@@ -25613,7 +26069,7 @@ var TreeController = class extends MDControlController {
|
|
|
25613
26069
|
};
|
|
25614
26070
|
|
|
25615
26071
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
25616
|
-
import { RuntimeError as
|
|
26072
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
25617
26073
|
|
|
25618
26074
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
25619
26075
|
var WizardPanelService = class extends ControlService {
|
|
@@ -25772,7 +26228,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25772
26228
|
const { activeFormTag } = this.state;
|
|
25773
26229
|
const controller = this.formControllers.get(activeFormTag);
|
|
25774
26230
|
if (!controller) {
|
|
25775
|
-
throw new
|
|
26231
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
25776
26232
|
}
|
|
25777
26233
|
return controller;
|
|
25778
26234
|
}
|
|
@@ -25847,7 +26303,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25847
26303
|
this.tagHistory.pop();
|
|
25848
26304
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
25849
26305
|
if (!prevTag) {
|
|
25850
|
-
throw new
|
|
26306
|
+
throw new RuntimeError43("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
25851
26307
|
}
|
|
25852
26308
|
this.state.activeFormTag = prevTag;
|
|
25853
26309
|
}
|
|
@@ -25868,7 +26324,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25868
26324
|
}
|
|
25869
26325
|
);
|
|
25870
26326
|
if (!wizardForm) {
|
|
25871
|
-
throw new
|
|
26327
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
25872
26328
|
}
|
|
25873
26329
|
nextTag = data.srfnextform;
|
|
25874
26330
|
} else {
|
|
@@ -25880,7 +26336,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25880
26336
|
});
|
|
25881
26337
|
const nextWizardStep = wizardSteps[index + 1];
|
|
25882
26338
|
if (!nextWizardStep) {
|
|
25883
|
-
throw new
|
|
26339
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
25884
26340
|
}
|
|
25885
26341
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
25886
26342
|
(wizardForm) => {
|
|
@@ -25893,7 +26349,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
25893
26349
|
}
|
|
25894
26350
|
}
|
|
25895
26351
|
if (!nextTag) {
|
|
25896
|
-
throw new
|
|
26352
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
25897
26353
|
}
|
|
25898
26354
|
this.state.activeFormTag = nextTag;
|
|
25899
26355
|
this.tagHistory.push(nextTag);
|
|
@@ -26322,7 +26778,7 @@ var AppHub = class {
|
|
|
26322
26778
|
this.registerAppView(appView);
|
|
26323
26779
|
return appView;
|
|
26324
26780
|
}
|
|
26325
|
-
throw new
|
|
26781
|
+
throw new RuntimeError44("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
26326
26782
|
}
|
|
26327
26783
|
/**
|
|
26328
26784
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -26353,7 +26809,7 @@ var AppHub = class {
|
|
|
26353
26809
|
this.registerAppDataEntity(entity, appId);
|
|
26354
26810
|
return entity;
|
|
26355
26811
|
}
|
|
26356
|
-
throw new
|
|
26812
|
+
throw new RuntimeError44("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
26357
26813
|
}
|
|
26358
26814
|
/**
|
|
26359
26815
|
* 新建 hub 应用
|
|
@@ -26374,7 +26830,7 @@ var AppHub = class {
|
|
|
26374
26830
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
26375
26831
|
this.registerApp(appModel);
|
|
26376
26832
|
} else {
|
|
26377
|
-
throw new
|
|
26833
|
+
throw new RuntimeError44("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
26378
26834
|
}
|
|
26379
26835
|
const app = new Application(appModel);
|
|
26380
26836
|
this.appMap.set(id, app);
|
|
@@ -26465,7 +26921,7 @@ var EngineFactory = class {
|
|
|
26465
26921
|
};
|
|
26466
26922
|
|
|
26467
26923
|
// src/engine/view-base.engine.ts
|
|
26468
|
-
import { RuntimeError as
|
|
26924
|
+
import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
26469
26925
|
var ViewEngineBase = class {
|
|
26470
26926
|
/**
|
|
26471
26927
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -26653,7 +27109,7 @@ var ViewEngineBase = class {
|
|
|
26653
27109
|
const { appDataEntityId } = this.view.model;
|
|
26654
27110
|
const { evt, context, params } = this.view;
|
|
26655
27111
|
if (!appDataEntityId) {
|
|
26656
|
-
throw new
|
|
27112
|
+
throw new RuntimeError45("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
26657
27113
|
}
|
|
26658
27114
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
26659
27115
|
const res = await app.deService.exec(
|
|
@@ -26908,6 +27364,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26908
27364
|
* @return {*} {IParams}
|
|
26909
27365
|
*/
|
|
26910
27366
|
getSearchParams() {
|
|
27367
|
+
var _a;
|
|
26911
27368
|
const params = {};
|
|
26912
27369
|
if (this.searchForm) {
|
|
26913
27370
|
const addParams = this.searchForm.getData()[0];
|
|
@@ -26922,11 +27379,20 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
26922
27379
|
);
|
|
26923
27380
|
Object.assign(params, filteredParams);
|
|
26924
27381
|
}
|
|
26925
|
-
if (this.searchBar
|
|
26926
|
-
|
|
26927
|
-
|
|
26928
|
-
|
|
26929
|
-
|
|
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
|
+
}
|
|
26930
27396
|
}
|
|
26931
27397
|
return params;
|
|
26932
27398
|
}
|
|
@@ -27015,7 +27481,7 @@ var GlobalUtil = class {
|
|
|
27015
27481
|
};
|
|
27016
27482
|
|
|
27017
27483
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
27018
|
-
import { RuntimeError as
|
|
27484
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
27019
27485
|
var LogicExecutor = class {
|
|
27020
27486
|
/**
|
|
27021
27487
|
* @author lxm
|
|
@@ -27036,7 +27502,7 @@ var LogicExecutor = class {
|
|
|
27036
27502
|
*/
|
|
27037
27503
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27038
27504
|
execute(_executeParams) {
|
|
27039
|
-
throw new
|
|
27505
|
+
throw new RuntimeError46("Method not implemented.");
|
|
27040
27506
|
}
|
|
27041
27507
|
/**
|
|
27042
27508
|
* 销毁方法
|
|
@@ -27140,7 +27606,7 @@ var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
|
27140
27606
|
};
|
|
27141
27607
|
|
|
27142
27608
|
// src/logic-scheduler/scheduler/logic-scheduler.ts
|
|
27143
|
-
import { mergeLeft } from "ramda";
|
|
27609
|
+
import { mergeLeft as mergeLeft2 } from "ramda";
|
|
27144
27610
|
var LogicScheduler = class {
|
|
27145
27611
|
constructor(logics) {
|
|
27146
27612
|
this.triggers = /* @__PURE__ */ new Map();
|
|
@@ -27193,7 +27659,7 @@ var LogicScheduler = class {
|
|
|
27193
27659
|
if (this.defaultParamsCb) {
|
|
27194
27660
|
defaultParams = this.defaultParamsCb();
|
|
27195
27661
|
}
|
|
27196
|
-
return
|
|
27662
|
+
return mergeLeft2(executeParams, defaultParams);
|
|
27197
27663
|
}
|
|
27198
27664
|
/**
|
|
27199
27665
|
* 创建触发器实例
|
|
@@ -27468,7 +27934,7 @@ var LogicSchedulerCenter = class {
|
|
|
27468
27934
|
};
|
|
27469
27935
|
|
|
27470
27936
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
27471
|
-
import { RuntimeError as
|
|
27937
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
27472
27938
|
var LogicTrigger = class {
|
|
27473
27939
|
/**
|
|
27474
27940
|
* @author lxm
|
|
@@ -27528,7 +27994,7 @@ var LogicTrigger = class {
|
|
|
27528
27994
|
if (this.executor) {
|
|
27529
27995
|
return this.executor.execute(executeParams);
|
|
27530
27996
|
}
|
|
27531
|
-
throw new
|
|
27997
|
+
throw new RuntimeError47("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
27532
27998
|
}
|
|
27533
27999
|
/**
|
|
27534
28000
|
* 销毁方法
|
|
@@ -27545,12 +28011,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
27545
28011
|
};
|
|
27546
28012
|
|
|
27547
28013
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
27548
|
-
import { RuntimeError as
|
|
28014
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
27549
28015
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
27550
28016
|
bindExecutor(executor) {
|
|
27551
28017
|
super.bindExecutor(executor);
|
|
27552
28018
|
if (this.executor.type !== "SCRIPT") {
|
|
27553
|
-
throw new
|
|
28019
|
+
throw new RuntimeError48(
|
|
27554
28020
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
27555
28021
|
);
|
|
27556
28022
|
}
|
|
@@ -27582,12 +28048,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
27582
28048
|
if (typeof result === "boolean") {
|
|
27583
28049
|
return result;
|
|
27584
28050
|
}
|
|
27585
|
-
throw new
|
|
28051
|
+
throw new RuntimeError48("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
27586
28052
|
}
|
|
27587
28053
|
};
|
|
27588
28054
|
|
|
27589
28055
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
27590
|
-
import { RuntimeError as
|
|
28056
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
27591
28057
|
var TimerTrigger = class extends LogicTrigger {
|
|
27592
28058
|
constructor() {
|
|
27593
28059
|
super(...arguments);
|
|
@@ -27596,7 +28062,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
27596
28062
|
start() {
|
|
27597
28063
|
this.timer = setInterval(() => {
|
|
27598
28064
|
if (!this.scheduler.defaultParamsCb) {
|
|
27599
|
-
throw new
|
|
28065
|
+
throw new RuntimeError49("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
27600
28066
|
}
|
|
27601
28067
|
const params = this.scheduler.defaultParamsCb();
|
|
27602
28068
|
this.executor.execute(params);
|
|
@@ -27613,10 +28079,10 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
27613
28079
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
27614
28080
|
import {
|
|
27615
28081
|
ModelError as ModelError29,
|
|
27616
|
-
RuntimeError as
|
|
28082
|
+
RuntimeError as RuntimeError50,
|
|
27617
28083
|
RuntimeModelError as RuntimeModelError47
|
|
27618
28084
|
} from "@ibiz-template/core";
|
|
27619
|
-
import { notNilEmpty as
|
|
28085
|
+
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
27620
28086
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
27621
28087
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27622
28088
|
execute(executeParams) {
|
|
@@ -27649,7 +28115,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27649
28115
|
const { context, params, ...rest } = parameters;
|
|
27650
28116
|
const { data } = parameters;
|
|
27651
28117
|
if (!(data == null ? void 0 : data[0])) {
|
|
27652
|
-
throw new
|
|
28118
|
+
throw new RuntimeError50("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
27653
28119
|
}
|
|
27654
28120
|
const openViewRef = appUILogic.openDataAppView;
|
|
27655
28121
|
if (!openViewRef) {
|
|
@@ -27672,7 +28138,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27672
28138
|
);
|
|
27673
28139
|
let tempParams = {};
|
|
27674
28140
|
const navParams = openViewRef.navigateParams;
|
|
27675
|
-
if (
|
|
28141
|
+
if (notNilEmpty8(navParams)) {
|
|
27676
28142
|
tempParams = convertNavData(navParams, params, context, data[0]);
|
|
27677
28143
|
}
|
|
27678
28144
|
return ibiz.commands.execute(
|
|
@@ -27722,12 +28188,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27722
28188
|
let tempParams = {};
|
|
27723
28189
|
const _data = (data == null ? void 0 : data[0]) || {};
|
|
27724
28190
|
const navContexts = newViewRef.navigateContexts;
|
|
27725
|
-
if (
|
|
28191
|
+
if (notNilEmpty8(navContexts)) {
|
|
27726
28192
|
tempContext = convertNavData(navContexts, context, params, _data);
|
|
27727
28193
|
}
|
|
27728
28194
|
tempContext = Object.assign(context, tempContext);
|
|
27729
28195
|
const navParams = newViewRef.navigateParams;
|
|
27730
|
-
if (
|
|
28196
|
+
if (notNilEmpty8(navParams)) {
|
|
27731
28197
|
tempParams = convertNavData(navParams, params, context, _data);
|
|
27732
28198
|
}
|
|
27733
28199
|
if (context.srfcopymode) {
|
|
@@ -27772,12 +28238,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
27772
28238
|
}
|
|
27773
28239
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
27774
28240
|
if (!selectData) {
|
|
27775
|
-
throw new
|
|
28241
|
+
throw new RuntimeError50("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
27776
28242
|
}
|
|
27777
28243
|
const indexType = selectData.srfkey;
|
|
27778
28244
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
27779
28245
|
if (!findView) {
|
|
27780
|
-
throw new
|
|
28246
|
+
throw new RuntimeError50(
|
|
27781
28247
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
27782
28248
|
);
|
|
27783
28249
|
}
|
|
@@ -28137,6 +28603,7 @@ export {
|
|
|
28137
28603
|
UIMapField,
|
|
28138
28604
|
V7AuthService,
|
|
28139
28605
|
VIEW_PROVIDER_PREFIX,
|
|
28606
|
+
ValueExUtil,
|
|
28140
28607
|
ViewController,
|
|
28141
28608
|
ViewEngineBase,
|
|
28142
28609
|
ViewLayoutPanelController,
|