@ibiz-template/runtime 0.1.14 → 0.1.16

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.
Files changed (177) hide show
  1. package/dist/index.esm.js +675 -159
  2. package/dist/index.system.min.js +1 -1
  3. package/dist/index.system.min.js.map +1 -1
  4. package/out/command/app/open-app-view/open-app-view.js +1 -1
  5. package/out/controller/common/base.controller.d.ts.map +1 -1
  6. package/out/controller/common/base.controller.js +2 -0
  7. package/out/controller/control/caption-bar/caption-bar.controller.js +1 -1
  8. package/out/controller/control/exp-bar/exp-bar.controller.d.ts.map +1 -1
  9. package/out/controller/control/exp-bar/exp-bar.controller.js +2 -6
  10. package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts.map +1 -1
  11. package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +4 -2
  12. package/out/controller/control/grid/grid/grid.controller.d.ts +7 -0
  13. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  14. package/out/controller/control/grid/grid/grid.controller.js +24 -0
  15. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts +1 -1
  16. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
  17. package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +30 -23
  18. package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
  19. package/out/controller/control/search-bar/search-bar.controller.js +1 -0
  20. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  21. package/out/controller/control/tree/tree.controller.js +0 -1
  22. package/out/controller/utils/event/controller-event.d.ts +7 -0
  23. package/out/controller/utils/event/controller-event.d.ts.map +1 -1
  24. package/out/controller/utils/event/controller-event.js +17 -0
  25. package/out/controller/utils/index.d.ts +1 -0
  26. package/out/controller/utils/index.d.ts.map +1 -1
  27. package/out/controller/utils/index.js +1 -0
  28. package/out/controller/utils/value-ex/value-ex.d.ts +47 -0
  29. package/out/controller/utils/value-ex/value-ex.d.ts.map +1 -0
  30. package/out/controller/utils/value-ex/value-ex.js +48 -0
  31. package/out/engine/md-view.engine.d.ts +10 -1
  32. package/out/engine/md-view.engine.d.ts.map +1 -1
  33. package/out/engine/md-view.engine.js +28 -8
  34. package/out/interface/common/i-modal/i-modal.d.ts +8 -0
  35. package/out/interface/common/i-modal/i-modal.d.ts.map +1 -1
  36. package/out/interface/controller/state/common/i-controller.state.d.ts +8 -0
  37. package/out/interface/controller/state/common/i-controller.state.d.ts.map +1 -1
  38. package/out/interface/controller/state/control/i-grid.state.d.ts +14 -0
  39. package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
  40. package/out/interface/controller/state/control/i-search-bar.state.d.ts +8 -0
  41. package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
  42. package/out/interface/service/code-list-item/code-list-item.d.ts +5 -0
  43. package/out/interface/service/code-list-item/code-list-item.d.ts.map +1 -1
  44. package/out/service/dto/method.dto.d.ts.map +1 -1
  45. package/out/service/dto/method.dto.js +3 -1
  46. package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
  47. package/out/service/service/code-list/code-list.service.js +1 -0
  48. package/out/service/service/entity/method/method.d.ts.map +1 -1
  49. package/out/service/service/entity/method/method.js +3 -2
  50. package/out/ui-action/provider/backend-ui-action-provider.d.ts.map +1 -1
  51. package/out/ui-action/provider/backend-ui-action-provider.js +4 -2
  52. package/out/ui-action/uiaction-util.d.ts.map +1 -1
  53. package/out/ui-action/uiaction-util.js +1 -0
  54. package/out/utils/handlebars/handlebars.d.ts +11 -2
  55. package/out/utils/handlebars/handlebars.d.ts.map +1 -1
  56. package/out/utils/handlebars/handlebars.js +24 -2
  57. package/out/utils/handlebars/helpers/and/and.d.ts +16 -0
  58. package/out/utils/handlebars/helpers/and/and.d.ts.map +1 -0
  59. package/out/utils/handlebars/helpers/and/and.js +24 -0
  60. package/out/utils/handlebars/helpers/camel-case/camel-case.d.ts +16 -0
  61. package/out/utils/handlebars/helpers/camel-case/camel-case.d.ts.map +1 -0
  62. package/out/utils/handlebars/helpers/camel-case/camel-case.js +23 -0
  63. package/out/utils/handlebars/helpers/concat/concat.d.ts +16 -0
  64. package/out/utils/handlebars/helpers/concat/concat.d.ts.map +1 -0
  65. package/out/utils/handlebars/helpers/concat/concat.js +20 -0
  66. package/out/utils/handlebars/helpers/eq/eq.d.ts +16 -0
  67. package/out/utils/handlebars/helpers/eq/eq.d.ts.map +1 -0
  68. package/out/utils/handlebars/helpers/eq/eq.js +22 -0
  69. package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.d.ts +15 -0
  70. package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.d.ts.map +1 -0
  71. package/out/utils/handlebars/helpers/eq-property-value/eq-property-value.js +32 -0
  72. package/out/utils/handlebars/helpers/gt/gt.d.ts +16 -0
  73. package/out/utils/handlebars/helpers/gt/gt.d.ts.map +1 -0
  74. package/out/utils/handlebars/helpers/gt/gt.js +22 -0
  75. package/out/utils/handlebars/helpers/gte/gte.d.ts +16 -0
  76. package/out/utils/handlebars/helpers/gte/gte.d.ts.map +1 -0
  77. package/out/utils/handlebars/helpers/gte/gte.js +22 -0
  78. package/out/utils/handlebars/helpers/helper-base.d.ts +29 -0
  79. package/out/utils/handlebars/helpers/helper-base.d.ts.map +1 -0
  80. package/out/utils/handlebars/helpers/helper-base.js +20 -0
  81. package/out/utils/handlebars/helpers/index.d.ts +9 -0
  82. package/out/utils/handlebars/helpers/index.d.ts.map +1 -0
  83. package/out/utils/handlebars/helpers/index.js +45 -0
  84. package/out/utils/handlebars/helpers/json/json.d.ts +16 -0
  85. package/out/utils/handlebars/helpers/json/json.d.ts.map +1 -0
  86. package/out/utils/handlebars/helpers/json/json.js +19 -0
  87. package/out/utils/handlebars/helpers/lower-case/lower-case.d.ts +16 -0
  88. package/out/utils/handlebars/helpers/lower-case/lower-case.d.ts.map +1 -0
  89. package/out/utils/handlebars/helpers/lower-case/lower-case.js +22 -0
  90. package/out/utils/handlebars/helpers/lt/lt.d.ts +16 -0
  91. package/out/utils/handlebars/helpers/lt/lt.d.ts.map +1 -0
  92. package/out/utils/handlebars/helpers/lt/lt.js +22 -0
  93. package/out/utils/handlebars/helpers/lte/lte.d.ts +16 -0
  94. package/out/utils/handlebars/helpers/lte/lte.d.ts.map +1 -0
  95. package/out/utils/handlebars/helpers/lte/lte.js +22 -0
  96. package/out/utils/handlebars/helpers/neq/neq.d.ts +16 -0
  97. package/out/utils/handlebars/helpers/neq/neq.d.ts.map +1 -0
  98. package/out/utils/handlebars/helpers/neq/neq.js +22 -0
  99. package/out/utils/handlebars/helpers/not/not.d.ts +16 -0
  100. package/out/utils/handlebars/helpers/not/not.d.ts.map +1 -0
  101. package/out/utils/handlebars/helpers/not/not.js +21 -0
  102. package/out/utils/handlebars/helpers/or/or.d.ts +16 -0
  103. package/out/utils/handlebars/helpers/or/or.d.ts.map +1 -0
  104. package/out/utils/handlebars/helpers/or/or.js +27 -0
  105. package/out/utils/handlebars/helpers/pascal-case/pascal-case.d.ts +16 -0
  106. package/out/utils/handlebars/helpers/pascal-case/pascal-case.d.ts.map +1 -0
  107. package/out/utils/handlebars/helpers/pascal-case/pascal-case.js +23 -0
  108. package/out/utils/handlebars/helpers/snake-case/snake-case.d.ts +16 -0
  109. package/out/utils/handlebars/helpers/snake-case/snake-case.d.ts.map +1 -0
  110. package/out/utils/handlebars/helpers/snake-case/snake-case.js +23 -0
  111. package/out/utils/handlebars/helpers/spinal-case/spinal-case.d.ts +16 -0
  112. package/out/utils/handlebars/helpers/spinal-case/spinal-case.d.ts.map +1 -0
  113. package/out/utils/handlebars/helpers/spinal-case/spinal-case.js +23 -0
  114. package/out/utils/handlebars/helpers/upper-case/upper-case.d.ts +16 -0
  115. package/out/utils/handlebars/helpers/upper-case/upper-case.d.ts.map +1 -0
  116. package/out/utils/handlebars/helpers/upper-case/upper-case.js +22 -0
  117. package/out/utils/handlebars/utils/helper/helper.d.ts +42 -0
  118. package/out/utils/handlebars/utils/helper/helper.d.ts.map +1 -0
  119. package/out/utils/handlebars/utils/helper/helper.js +69 -0
  120. package/out/utils/handlebars/utils/index.d.ts +2 -0
  121. package/out/utils/handlebars/utils/index.d.ts.map +1 -0
  122. package/out/utils/handlebars/utils/index.js +1 -0
  123. package/out/utils/modal/modal.d.ts +1 -0
  124. package/out/utils/modal/modal.d.ts.map +1 -1
  125. package/out/utils/modal/modal.js +5 -2
  126. package/out/utils/text-util/text-util.d.ts +12 -3
  127. package/out/utils/text-util/text-util.d.ts.map +1 -1
  128. package/out/utils/text-util/text-util.js +23 -4
  129. package/package.json +2 -2
  130. package/src/command/app/open-app-view/open-app-view.ts +1 -1
  131. package/src/controller/common/base.controller.ts +2 -0
  132. package/src/controller/control/caption-bar/caption-bar.controller.ts +1 -1
  133. package/src/controller/control/exp-bar/exp-bar.controller.ts +2 -6
  134. package/src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts +4 -2
  135. package/src/controller/control/grid/grid/grid.controller.ts +25 -0
  136. package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +33 -26
  137. package/src/controller/control/search-bar/search-bar.controller.ts +1 -0
  138. package/src/controller/control/tree/tree.controller.ts +0 -1
  139. package/src/controller/utils/event/controller-event.ts +18 -0
  140. package/src/controller/utils/index.ts +1 -0
  141. package/src/controller/utils/value-ex/value-ex.ts +83 -0
  142. package/src/engine/md-view.engine.ts +31 -8
  143. package/src/interface/common/i-modal/i-modal.ts +9 -0
  144. package/src/interface/controller/state/common/i-controller.state.ts +9 -0
  145. package/src/interface/controller/state/control/i-grid.state.ts +16 -0
  146. package/src/interface/controller/state/control/i-search-bar.state.ts +9 -0
  147. package/src/interface/service/code-list-item/code-list-item.ts +6 -0
  148. package/src/service/dto/method.dto.ts +3 -1
  149. package/src/service/service/code-list/code-list.service.ts +1 -0
  150. package/src/service/service/entity/method/method.ts +9 -2
  151. package/src/ui-action/provider/backend-ui-action-provider.ts +4 -2
  152. package/src/ui-action/uiaction-util.ts +1 -0
  153. package/src/utils/handlebars/handlebars.ts +25 -3
  154. package/src/utils/handlebars/helpers/and/and.ts +26 -0
  155. package/src/utils/handlebars/helpers/camel-case/camel-case.ts +25 -0
  156. package/src/utils/handlebars/helpers/concat/concat.ts +22 -0
  157. package/src/utils/handlebars/helpers/eq/eq.ts +28 -0
  158. package/src/utils/handlebars/helpers/eq-property-value/eq-property-value.ts +41 -0
  159. package/src/utils/handlebars/helpers/gt/gt.ts +28 -0
  160. package/src/utils/handlebars/helpers/gte/gte.ts +28 -0
  161. package/src/utils/handlebars/helpers/helper-base.ts +31 -0
  162. package/src/utils/handlebars/helpers/index.ts +46 -0
  163. package/src/utils/handlebars/helpers/json/json.ts +25 -0
  164. package/src/utils/handlebars/helpers/lower-case/lower-case.ts +24 -0
  165. package/src/utils/handlebars/helpers/lt/lt.ts +28 -0
  166. package/src/utils/handlebars/helpers/lte/lte.ts +28 -0
  167. package/src/utils/handlebars/helpers/neq/neq.ts +28 -0
  168. package/src/utils/handlebars/helpers/not/not.ts +26 -0
  169. package/src/utils/handlebars/helpers/or/or.ts +28 -0
  170. package/src/utils/handlebars/helpers/pascal-case/pascal-case.ts +25 -0
  171. package/src/utils/handlebars/helpers/snake-case/snake-case.ts +25 -0
  172. package/src/utils/handlebars/helpers/spinal-case/spinal-case.ts +25 -0
  173. package/src/utils/handlebars/helpers/upper-case/upper-case.ts +24 -0
  174. package/src/utils/handlebars/utils/helper/helper.ts +75 -0
  175. package/src/utils/handlebars/utils/index.ts +1 -0
  176. package/src/utils/modal/modal.ts +6 -2
  177. package/src/utils/text-util/text-util.ts +22 -4
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 isArray4 = Array.isArray || function(value) {
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 = isArray4;
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 (isArray4(value) && value.length === 0) {
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(Handlebars) {
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
- Handlebars.noConflict = function() {
1113
- if (globalThis.Handlebars === Handlebars) {
1112
+ Handlebars2.noConflict = function() {
1113
+ if (globalThis.Handlebars === Handlebars2) {
1114
1114
  globalThis.Handlebars = $Handlebars;
1115
1115
  }
1116
- return Handlebars;
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<void>}
6599
+ * @return {*} {Promise<unknown>}
6248
6600
  */
6249
6601
  async init() {
6250
- this.hsb = await Promise.resolve().then(() => __toESM(require_handlebars(), 1));
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
- await this.hooks.shouldDismiss.call(context);
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;
@@ -8145,6 +8510,17 @@ function filterValueRules(vrs, name) {
8145
8510
 
8146
8511
  // src/utils/text-util/text-util.ts
8147
8512
  var TextUtil = class {
8513
+ constructor() {
8514
+ /**
8515
+ * input元素,用于存储拷贝的文本
8516
+ *
8517
+ * @author zhanghengfeng
8518
+ * @date 2023-08-31 20:08:06
8519
+ * @private
8520
+ * @type {(HTMLInputElement | null)}
8521
+ */
8522
+ this.inputElement = null;
8523
+ }
8148
8524
  /**
8149
8525
  * 值格式化
8150
8526
  *
@@ -8161,12 +8537,20 @@ var TextUtil = class {
8161
8537
  * 拷贝文本
8162
8538
  *
8163
8539
  * @author zhanghengfeng
8164
- * @date 2023-08-28 14:08:57
8540
+ * @date 2023-08-31 11:08:51
8165
8541
  * @param {string} value
8166
- * @return {*} {Promise<void>}
8542
+ * @return {*} {boolean}
8167
8543
  */
8168
- async copy(value) {
8169
- return navigator.clipboard.writeText(value);
8544
+ copy(value) {
8545
+ if (!this.inputElement) {
8546
+ this.inputElement = document.createElement("input");
8547
+ this.inputElement.style.position = "absolute";
8548
+ this.inputElement.style.left = "-9999px";
8549
+ document.body.appendChild(this.inputElement);
8550
+ }
8551
+ this.inputElement.value = value;
8552
+ this.inputElement.select();
8553
+ return document.execCommand("copy");
8170
8554
  }
8171
8555
  };
8172
8556
 
@@ -8211,7 +8595,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
8211
8595
  case "INDEXVIEWTAB":
8212
8596
  if (opts.noWaitRoute) {
8213
8597
  this.openIndexViewTab(appView, context, params);
8214
- return;
8598
+ return { ok: true };
8215
8599
  }
8216
8600
  return this.openIndexViewTab(appView, context, params);
8217
8601
  case "POPUP":
@@ -10259,7 +10643,8 @@ var CodeListService = class {
10259
10643
  text,
10260
10644
  value: isValueNumber ? Number(codeItem.value) : codeItem.value,
10261
10645
  color: codeItem.color,
10262
- id: codeItem.codeName
10646
+ id: codeItem.codeName,
10647
+ textCls: codeItem.textCls
10263
10648
  };
10264
10649
  if ((_a = codeItem.codeItems) == null ? void 0 : _a.length) {
10265
10650
  _codeItem.children = this.formatStaticItems(
@@ -10705,6 +11090,7 @@ import {
10705
11090
 
10706
11091
  // src/service/service/entity/method/method.ts
10707
11092
  import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
11093
+ import { notNilEmpty as notNilEmpty5 } from "qx-util";
10708
11094
 
10709
11095
  // src/service/app-data-entity/app-data-entity.ts
10710
11096
  import { clone as clone4 } from "ramda";
@@ -10913,7 +11299,9 @@ var MethodDto = class _MethodDto {
10913
11299
  for (let j = 0; j < items.length; j++) {
10914
11300
  arr.push(await dto.get(context, items[j]));
10915
11301
  }
10916
- params[key] = arr;
11302
+ if (arr.length > 0) {
11303
+ params[key] = arr;
11304
+ }
10917
11305
  }
10918
11306
  break;
10919
11307
  }
@@ -11119,13 +11507,19 @@ var Method = class {
11119
11507
  let res = null;
11120
11508
  switch (requestMethod) {
11121
11509
  case "POST":
11122
- res = await this.app.net.post("".concat(path2, "/").concat(methodName), data, params);
11510
+ res = await this.app.net.post(
11511
+ "".concat(path2, "/").concat(methodName),
11512
+ notNilEmpty5(data) ? data : params
11513
+ );
11123
11514
  break;
11124
11515
  case "GET":
11125
11516
  res = await this.app.net.get("".concat(path2, "/").concat(methodName), data);
11126
11517
  break;
11127
11518
  case "PUT":
11128
- res = await this.app.net.put("".concat(path2, "/").concat(methodName), data, params);
11519
+ res = await this.app.net.put(
11520
+ "".concat(path2, "/").concat(methodName),
11521
+ notNilEmpty5(data) ? data : params
11522
+ );
11129
11523
  break;
11130
11524
  case "DELETE":
11131
11525
  res = await this.app.net.delete("".concat(path2, "/").concat(methodName), data);
@@ -12972,7 +13366,7 @@ var ControlService = class {
12972
13366
 
12973
13367
  // src/service/service/control/md-control.service.ts
12974
13368
  import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
12975
- import { isArray } from "qx-util";
13369
+ import { isArray as isArray2 } from "qx-util";
12976
13370
  var MDControlService = class extends ControlService {
12977
13371
  /**
12978
13372
  * 执行查询多条数据的方法
@@ -13104,7 +13498,7 @@ var MDControlService = class extends ControlService {
13104
13498
  }
13105
13499
  }
13106
13500
  if (res.ok) {
13107
- if (isArray(res.data)) {
13501
+ if (isArray2(res.data)) {
13108
13502
  res.data = res.data.map((item) => this.toUIData(item));
13109
13503
  } else {
13110
13504
  res.data = this.toUIData(res.data);
@@ -13711,7 +14105,7 @@ var DEServiceUtil = class {
13711
14105
  };
13712
14106
 
13713
14107
  // src/app-hub.ts
13714
- import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
14108
+ import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
13715
14109
 
13716
14110
  // src/application.ts
13717
14111
  import { Net } from "@ibiz-template/core";
@@ -13959,9 +14353,9 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
13959
14353
  })(PanelNotifyState || {});
13960
14354
 
13961
14355
  // src/controller/common/view/view.controller.ts
13962
- import { createUUID as createUUID2, notNilEmpty as notNilEmpty5 } from "qx-util";
13963
- import { IBizContext as IBizContext2, RuntimeError as RuntimeError21 } from "@ibiz-template/core";
13964
- import { isEmpty as isEmpty8, isNil as isNil11 } from "ramda";
14356
+ import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
14357
+ import { IBizContext as IBizContext2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
14358
+ import { isEmpty as isEmpty8, isNil as isNil12 } from "ramda";
13965
14359
 
13966
14360
  // src/controller/utils/loading/loading.state.ts
13967
14361
  import { NOOP } from "@ibiz-template/core";
@@ -14470,6 +14864,13 @@ var ControllerEvent = class {
14470
14864
  */
14471
14865
  constructor(getBaseArgs) {
14472
14866
  this.getBaseArgs = getBaseArgs;
14867
+ /**
14868
+ * 是否已经销毁
14869
+ * @author lxm
14870
+ * @date 2023-08-30 02:54:14
14871
+ * @type {boolean}
14872
+ */
14873
+ this.isDestroyed = false;
14473
14874
  /**
14474
14875
  * 事件对象
14475
14876
  *
@@ -14488,6 +14889,9 @@ var ControllerEvent = class {
14488
14889
  * @return {*} {Promise<void>}
14489
14890
  */
14490
14891
  async emit(name, args) {
14892
+ if (this.isDestroyed) {
14893
+ return;
14894
+ }
14491
14895
  await this.evt.asyncEmit(name, {
14492
14896
  ...this.getBaseArgs(),
14493
14897
  eventName: name,
@@ -14503,6 +14907,9 @@ var ControllerEvent = class {
14503
14907
  * @param fn 事件回调
14504
14908
  */
14505
14909
  on(name, fn) {
14910
+ if (this.isDestroyed) {
14911
+ return;
14912
+ }
14506
14913
  this.evt.on(name, fn);
14507
14914
  }
14508
14915
  /**
@@ -14512,6 +14919,9 @@ var ControllerEvent = class {
14512
14919
  * @param fn 事件回调
14513
14920
  */
14514
14921
  onAll(fn) {
14922
+ if (this.isDestroyed) {
14923
+ return;
14924
+ }
14515
14925
  this.evt.onAll(fn);
14516
14926
  }
14517
14927
  /**
@@ -14523,6 +14933,7 @@ var ControllerEvent = class {
14523
14933
  destroy() {
14524
14934
  this.getBaseArgs = void 0;
14525
14935
  this.evt.reset();
14936
+ this.isDestroyed = true;
14526
14937
  }
14527
14938
  };
14528
14939
 
@@ -14603,6 +15014,54 @@ function generateRules(itemVRs, name, valueItemName) {
14603
15014
  return rules;
14604
15015
  }
14605
15016
 
15017
+ // src/controller/utils/value-ex/value-ex.ts
15018
+ import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
15019
+ import { isNil as isNil11, mergeLeft } from "ramda";
15020
+ var ValueExUtil = class {
15021
+ /**
15022
+ * 合并默认值
15023
+ * @author lxm
15024
+ * @date 2023-08-30 02:06:58
15025
+ * @static
15026
+ * @param {ValueExOptions} options
15027
+ * @return {*} {ValueExOptions}
15028
+ */
15029
+ static mergeDefault(options) {
15030
+ return mergeLeft(options, {
15031
+ textSeparator: ",",
15032
+ valueSeparator: ","
15033
+ });
15034
+ }
15035
+ /**
15036
+ * 转成显示用的文本
15037
+ * @author lxm
15038
+ * @date 2023-08-30 01:55:38
15039
+ * @param {ValueExOptions} options
15040
+ * @param {unknown} value
15041
+ * @return {*} {string}
15042
+ */
15043
+ static toText(options, value) {
15044
+ if (isNil11(value) || value === "") {
15045
+ return "";
15046
+ }
15047
+ const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
15048
+ if (["OBJECTS", "OBJECT"].includes(valueType)) {
15049
+ if (!objectNameField) {
15050
+ throw new RuntimeError21("\u7F3A\u5C11objectNameField");
15051
+ }
15052
+ const textKey = objectNameField.toLowerCase();
15053
+ if (valueType === "OBJECTS") {
15054
+ return value.map((item) => item[textKey] || "---").join(textSeparator);
15055
+ }
15056
+ return value[textKey];
15057
+ }
15058
+ if (valueType === "SIMPLES") {
15059
+ return value.join(textSeparator);
15060
+ }
15061
+ return "".concat(value);
15062
+ }
15063
+ };
15064
+
14606
15065
  // src/controller/common/base.controller.ts
14607
15066
  var SELF_KEY = "__self";
14608
15067
  var BaseController = class {
@@ -14672,6 +15131,7 @@ var BaseController = class {
14672
15131
  initState() {
14673
15132
  this.state.isCreated = false;
14674
15133
  this.state.isMounted = false;
15134
+ this.state.isDestroyed = false;
14675
15135
  }
14676
15136
  /**
14677
15137
  * 获取事件的基础参数
@@ -14762,6 +15222,7 @@ var BaseController = class {
14762
15222
  */
14763
15223
  async destroyed() {
14764
15224
  await this.onDestroyed();
15225
+ this.state.isDestroyed = true;
14765
15226
  ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onDestroyed"));
14766
15227
  await this._evt.emit("onDestroyed", void 0);
14767
15228
  this.evt.destroy();
@@ -15013,18 +15474,18 @@ var ViewController = class extends BaseController {
15013
15474
  */
15014
15475
  handleContextParams() {
15015
15476
  this.context.srfappid = this.model.appId;
15016
- if (isNil11(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
15477
+ if (isNil12(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
15017
15478
  this.context.srfsessionid = createUUID2();
15018
15479
  }
15019
15480
  const navContexts = this.model.appViewNavContexts;
15020
15481
  let context = {};
15021
- if (notNilEmpty5(navContexts)) {
15482
+ if (notNilEmpty6(navContexts)) {
15022
15483
  context = convertNavData(navContexts, this.context, this.params);
15023
15484
  }
15024
15485
  Object.assign(this.context, context);
15025
15486
  const navParams = this.model.appViewNavParams;
15026
15487
  let params = {};
15027
- if (notNilEmpty5(navParams)) {
15488
+ if (notNilEmpty6(navParams)) {
15028
15489
  params = convertNavData(navParams, this.context, this.params);
15029
15490
  }
15030
15491
  Object.assign(this.params, params);
@@ -15045,7 +15506,7 @@ var ViewController = class extends BaseController {
15045
15506
  async callUIAction(key, args) {
15046
15507
  const result = this.call(key, args);
15047
15508
  if (result === void 0) {
15048
- throw new RuntimeError21("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
15509
+ throw new RuntimeError22("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
15049
15510
  }
15050
15511
  return result;
15051
15512
  }
@@ -15392,7 +15853,7 @@ var ControlController = class extends BaseController {
15392
15853
  };
15393
15854
 
15394
15855
  // src/controller/common/control/md-control.controller.ts
15395
- import { isElementSame, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
15856
+ import { isElementSame, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
15396
15857
  var MDControlController = class extends ControlController {
15397
15858
  get _evt() {
15398
15859
  return this.evt;
@@ -15528,7 +15989,7 @@ var MDControlController = class extends ControlController {
15528
15989
  async remove(args) {
15529
15990
  const { context, params, data } = this.handlerAbilityParams(args);
15530
15991
  if (!(data == null ? void 0 : data.length)) {
15531
- throw new RuntimeError22("\u672A\u9009\u4E2D\u6570\u636E");
15992
+ throw new RuntimeError23("\u672A\u9009\u4E2D\u6570\u636E");
15532
15993
  }
15533
15994
  if ((args == null ? void 0 : args.silent) !== true) {
15534
15995
  const del = await ibiz.confirm.error({
@@ -15665,7 +16126,7 @@ var MDControlController = class extends ControlController {
15665
16126
  // src/controller/control/app-menu/app-menu.controller.ts
15666
16127
  import {
15667
16128
  findRecursiveChild,
15668
- RuntimeError as RuntimeError23,
16129
+ RuntimeError as RuntimeError24,
15669
16130
  RuntimeModelError as RuntimeModelError21
15670
16131
  } from "@ibiz-template/core";
15671
16132
  var AppMenuController = class extends ControlController {
@@ -15705,7 +16166,7 @@ var AppMenuController = class extends ControlController {
15705
16166
  childrenFields: ["appMenuItems"]
15706
16167
  });
15707
16168
  if (!menuItem) {
15708
- throw new RuntimeError23("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16169
+ throw new RuntimeError24("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
15709
16170
  }
15710
16171
  this.evt.emit("onClick", {
15711
16172
  eventArg: id,
@@ -15795,7 +16256,7 @@ var AppMenuController = class extends ControlController {
15795
16256
  // src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
15796
16257
  import {
15797
16258
  findRecursiveChild as findRecursiveChild2,
15798
- RuntimeError as RuntimeError24,
16259
+ RuntimeError as RuntimeError25,
15799
16260
  RuntimeModelError as RuntimeModelError22
15800
16261
  } from "@ibiz-template/core";
15801
16262
  var AppMenuIconViewController = class extends AppMenuController {
@@ -15805,7 +16266,7 @@ var AppMenuIconViewController = class extends AppMenuController {
15805
16266
  childrenFields: ["appMenuItems"]
15806
16267
  });
15807
16268
  if (!menuItem) {
15808
- throw new RuntimeError24("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
16269
+ throw new RuntimeError25("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
15809
16270
  }
15810
16271
  this.evt.emit("onClick", {
15811
16272
  eventArg: id,
@@ -15833,7 +16294,7 @@ var AppMenuIconViewController = class extends AppMenuController {
15833
16294
  import dayjs from "dayjs";
15834
16295
 
15835
16296
  // src/controller/control/calendar/calendar.service.ts
15836
- import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
16297
+ import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
15837
16298
  var CalendarService = class extends MDControlService {
15838
16299
  /**
15839
16300
  * 执行查询多条数据的方法
@@ -15883,11 +16344,11 @@ var CalendarService = class extends MDControlService {
15883
16344
  setCalendarConfigData(items, index) {
15884
16345
  const { sysCalendarItems } = this.model;
15885
16346
  if (!sysCalendarItems) {
15886
- throw new RuntimeError25("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16347
+ throw new RuntimeError26("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
15887
16348
  }
15888
16349
  const calendarItem = sysCalendarItems[index];
15889
16350
  if (!calendarItem) {
15890
- throw new RuntimeError25("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
16351
+ throw new RuntimeError26("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
15891
16352
  }
15892
16353
  return items.map((item) => {
15893
16354
  return new CalendarItemData(calendarItem, item);
@@ -16077,11 +16538,11 @@ var CalendarController = class extends MDControlController {
16077
16538
  };
16078
16539
 
16079
16540
  // src/controller/control/chart/chart.controller.ts
16080
- import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
16541
+ import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
16081
16542
 
16082
16543
  // src/controller/control/chart/generator/chart-options-generator.ts
16083
16544
  import { mergeDeepRight as mergeDeepRight3 } from "ramda";
16084
- import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
16545
+ import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
16085
16546
 
16086
16547
  // src/controller/control/chart/generator/line-series-generator.ts
16087
16548
  import { RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
@@ -16094,7 +16555,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
16094
16555
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
16095
16556
  import weekOfYear from "dayjs/plugin/weekOfYear";
16096
16557
  import isoWeek from "dayjs/plugin/isoWeek";
16097
- import { clone as clone11, isNil as isNil12, mergeDeepRight } from "ramda";
16558
+ import { clone as clone11, isNil as isNil13, mergeDeepRight } from "ramda";
16098
16559
  dayjs2.extend(minMax);
16099
16560
  dayjs2.extend(isSameOrBefore);
16100
16561
  dayjs2.extend(quarterOfYear);
@@ -16183,10 +16644,10 @@ var BaseSeriesGenerator = class {
16183
16644
  * @return {*} {(string | undefined)}
16184
16645
  */
16185
16646
  translateVal(codeListKey, val, isExclude = false) {
16186
- if (isNil12(val)) {
16647
+ if (isNil13(val)) {
16187
16648
  return void 0;
16188
16649
  }
16189
- if (isNil12(codeListKey)) {
16650
+ if (isNil13(codeListKey)) {
16190
16651
  return val;
16191
16652
  }
16192
16653
  const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
@@ -16216,7 +16677,7 @@ var BaseSeriesGenerator = class {
16216
16677
  seriesCodeListId,
16217
16678
  item[this.groupField]
16218
16679
  );
16219
- if (isNil12(groupVal)) {
16680
+ if (isNil13(groupVal)) {
16220
16681
  return;
16221
16682
  }
16222
16683
  group = groupVal;
@@ -17017,7 +17478,7 @@ var ChartOptionsGenerator2 = class {
17017
17478
  getSrfkeyByParams(params) {
17018
17479
  const generator = this.seriesGenerators[params.seriesIndex];
17019
17480
  if (!generator) {
17020
- throw new RuntimeError26("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
17481
+ throw new RuntimeError27("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
17021
17482
  }
17022
17483
  return generator.getSrfkeyByParams(params);
17023
17484
  }
@@ -17129,10 +17590,10 @@ var ChartController = class extends MDControlController {
17129
17590
  */
17130
17591
  updateChart() {
17131
17592
  if (!this.chart) {
17132
- throw new RuntimeError27("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
17593
+ throw new RuntimeError28("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
17133
17594
  }
17134
17595
  if (!this.options) {
17135
- throw new RuntimeError27("options\u8FD8\u6CA1\u8BA1\u7B97");
17596
+ throw new RuntimeError28("options\u8FD8\u6CA1\u8BA1\u7B97");
17136
17597
  }
17137
17598
  this.chart.setOption(this.options);
17138
17599
  this.resizeChart();
@@ -17171,7 +17632,7 @@ var CaptionBarController = class extends ControlController {
17171
17632
  async onCreated() {
17172
17633
  await super.onCreated();
17173
17634
  this.view.evt.on("onViewInfoChange", ({ caption: _caption, dataInfo }) => {
17174
- this.state.caption = "".concat(this.state.caption).concat(dataInfo ? "-".concat(dataInfo) : "");
17635
+ this.state.caption = "".concat(this.view.model.caption).concat(dataInfo ? "-".concat(dataInfo) : "");
17175
17636
  });
17176
17637
  }
17177
17638
  };
@@ -17181,13 +17642,13 @@ import { recursiveIterate } from "@ibiz-template/core";
17181
17642
 
17182
17643
  // src/ui-action/provider/backend-ui-action-provider.ts
17183
17644
  import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
17184
- import { isArray as isArray2 } from "qx-util";
17645
+ import { isArray as isArray3 } from "qx-util";
17185
17646
 
17186
17647
  // src/ui-action/provider/ui-action-provider-base.ts
17187
17648
  import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
17188
17649
 
17189
17650
  // src/ui-logic/index.ts
17190
- import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
17651
+ import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
17191
17652
 
17192
17653
  // src/ui-logic/ui-logic.ts
17193
17654
  import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
@@ -17699,7 +18160,7 @@ var PrepareJSParamNode = class extends UILogicNode {
17699
18160
  };
17700
18161
 
17701
18162
  // src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
17702
- import { RuntimeError as RuntimeError28, RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
18163
+ import { RuntimeError as RuntimeError29, RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
17703
18164
  import { isFunction } from "lodash-es";
17704
18165
  var ViewCtrlInvokeNode = class extends UILogicNode {
17705
18166
  async exec(ctx) {
@@ -17716,14 +18177,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
17716
18177
  }
17717
18178
  const invokeParam = ctx.params[invokeParamId];
17718
18179
  if (!invokeParam) {
17719
- throw new RuntimeError28("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
18180
+ throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
17720
18181
  }
17721
18182
  const invokeCtrl = ctx.params[invokeCtrlId];
17722
18183
  if (!invokeCtrl) {
17723
- throw new RuntimeError28("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
18184
+ throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
17724
18185
  }
17725
18186
  if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
17726
- throw new RuntimeError28("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
18187
+ throw new RuntimeError29("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
17727
18188
  }
17728
18189
  await invokeCtrl[invokeMethod](invokeParam);
17729
18190
  }
@@ -18004,7 +18465,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
18004
18465
  const app = ibiz.hub.getApp(parameters.context.srfappid);
18005
18466
  const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
18006
18467
  if (!deUILogic) {
18007
- throw new RuntimeError29(
18468
+ throw new RuntimeError30(
18008
18469
  "\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
18009
18470
  );
18010
18471
  }
@@ -18017,7 +18478,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
18017
18478
  }
18018
18479
 
18019
18480
  // src/ui-action/uiaction-util.ts
18020
- import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
18481
+ import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
18021
18482
  var UIActionUtil = class {
18022
18483
  /**
18023
18484
  * 执行界面行为
@@ -18032,7 +18493,7 @@ var UIActionUtil = class {
18032
18493
  static async exec(actionId, params) {
18033
18494
  const action = await getUIActionById(actionId);
18034
18495
  if (!action) {
18035
- throw new RuntimeError30("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
18496
+ throw new RuntimeError31("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
18036
18497
  }
18037
18498
  const provider = await getUIActionProvider(action);
18038
18499
  return provider.exec(action, params);
@@ -18049,6 +18510,7 @@ var UIActionUtil = class {
18049
18510
  var _a, _b;
18050
18511
  const result = await this.exec(actionId, params);
18051
18512
  if (result.closeView) {
18513
+ params.view.modal.ignoreDismissCheck = true;
18052
18514
  params.view.closeView({ ok: true });
18053
18515
  } else if (result.refresh) {
18054
18516
  switch (result.refreshMode) {
@@ -18256,7 +18718,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
18256
18718
  data,
18257
18719
  params
18258
18720
  );
18259
- const tempParams = { ...params, ...resultParams };
18721
+ const tempParams = { ...resultParams };
18260
18722
  const frontPSAppView = action.frontAppViewId;
18261
18723
  if (frontPSAppView) {
18262
18724
  const res2 = await ibiz.commands.execute(
@@ -18283,7 +18745,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
18283
18745
  const _data = resultData.map((item) => {
18284
18746
  var _a;
18285
18747
  return ((_a = item.getOrigin) == null ? void 0 : _a.call(item)) || item || {};
18286
- });
18748
+ }).map((item) => Object.assign(item, tempParams));
18287
18749
  const isMultiData = ["MULTIKEY", "MULTIDATA"].includes(
18288
18750
  action.actionTarget
18289
18751
  );
@@ -18298,7 +18760,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
18298
18760
  ibiz.message.success(action.successMsg);
18299
18761
  }
18300
18762
  Object.assign(actionResult, {
18301
- data: isArray2(res.data) ? res.data : [res.data],
18763
+ data: isArray3(res.data) ? res.data : [res.data],
18302
18764
  nextContext: resultContext,
18303
18765
  nextParams: tempParams
18304
18766
  });
@@ -18619,7 +19081,7 @@ var ContextMenuController = class extends ToolbarController {
18619
19081
  };
18620
19082
 
18621
19083
  // src/controller/control/dashboard/dashboard.controller.ts
18622
- import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
19084
+ import { RuntimeError as RuntimeError32 } from "@ibiz-template/core";
18623
19085
  var DashboardController = class extends ControlController {
18624
19086
  constructor() {
18625
19087
  super(...arguments);
@@ -18706,7 +19168,7 @@ var DashboardController = class extends ControlController {
18706
19168
  );
18707
19169
  if (values.find((item) => item.status === "rejected")) {
18708
19170
  ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
18709
- throw new RuntimeError31("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
19171
+ throw new RuntimeError32("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
18710
19172
  }
18711
19173
  }
18712
19174
  };
@@ -19159,7 +19621,7 @@ var DataViewControlController = class extends MDControlController {
19159
19621
  import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
19160
19622
 
19161
19623
  // src/controller/control/exp-bar/exp-bar.controller.ts
19162
- import { RuntimeError as RuntimeError32, RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
19624
+ import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
19163
19625
  var ExpBarControlController = class extends ControlController {
19164
19626
  constructor() {
19165
19627
  super(...arguments);
@@ -19309,12 +19771,8 @@ var ExpBarControlController = class extends ControlController {
19309
19771
  this.xDataController.evt.on("onLoadSuccess", (event) => {
19310
19772
  this.xDataLoadSuccess(event);
19311
19773
  });
19312
- this.xDataController.evt.on("onBeforeLoad", () => {
19313
- const searchParams = {};
19314
- if (this.state.query) {
19315
- searchParams.query = this.state.query;
19316
- }
19317
- this.xDataController.state.searchParams = searchParams;
19774
+ this.xDataController.evt.on("onRemoveSuccess", () => {
19775
+ this.defaultNavByFirstItem();
19318
19776
  });
19319
19777
  }
19320
19778
  if (this.toolbarController) {
@@ -19439,7 +19897,7 @@ var ExpBarControlController = class extends ControlController {
19439
19897
  if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
19440
19898
  return this.XDataModel.navAppViewId;
19441
19899
  }
19442
- throw new RuntimeError32("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
19900
+ throw new RuntimeError33("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
19443
19901
  }
19444
19902
  /**
19445
19903
  * 获取导航视图
@@ -19568,7 +20026,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
19568
20026
  };
19569
20027
 
19570
20028
  // src/controller/control/exp-bar/tree-exp-bar.controller.ts
19571
- import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
20029
+ import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
19572
20030
  var TreeExpBarController = class extends ExpBarControlController {
19573
20031
  constructor() {
19574
20032
  super(...arguments);
@@ -19643,7 +20101,7 @@ var TreeExpBarController = class extends ExpBarControlController {
19643
20101
  const deData = node.deData || node;
19644
20102
  const nodeModel = this.getNodeModel(node.nodeId);
19645
20103
  if (!nodeModel) {
19646
- throw new RuntimeError33("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
20104
+ throw new RuntimeError34("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
19647
20105
  }
19648
20106
  const result = this.prepareParams(nodeModel, deData, context, params);
19649
20107
  result.context.currentSrfNav = nodeId;
@@ -19696,7 +20154,7 @@ var TreeExpBarController = class extends ExpBarControlController {
19696
20154
  import { mergeDefaultInLeft } from "@ibiz-template/core";
19697
20155
 
19698
20156
  // src/controller/control/form/form/form.controller.ts
19699
- import { RuntimeError as RuntimeError34, debounceAndAsyncMerge } from "@ibiz-template/core";
20157
+ import { RuntimeError as RuntimeError35, debounceAndAsyncMerge } from "@ibiz-template/core";
19700
20158
  var FormController = class extends ControlController {
19701
20159
  constructor() {
19702
20160
  super(...arguments);
@@ -19761,7 +20219,7 @@ var FormController = class extends ControlController {
19761
20219
  );
19762
20220
  if (values.find((item) => item.status === "rejected")) {
19763
20221
  ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
19764
- throw new RuntimeError34("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
20222
+ throw new RuntimeError35("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
19765
20223
  }
19766
20224
  }
19767
20225
  /**
@@ -20368,7 +20826,7 @@ var FormButtonController = class extends FormDetailController {
20368
20826
 
20369
20827
  // src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
20370
20828
  import { isOverlap as isOverlap2 } from "@ibiz-template/core";
20371
- import { createUUID as createUUID3, notNilEmpty as notNilEmpty6 } from "qx-util";
20829
+ import { createUUID as createUUID3, notNilEmpty as notNilEmpty7 } from "qx-util";
20372
20830
 
20373
20831
  // src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
20374
20832
  var FormDruipartState = class extends FormDetailState {
@@ -20447,7 +20905,9 @@ var FormDRUIPartController = class extends FormDetailController {
20447
20905
  await super.formStateNotify(state);
20448
20906
  this.isNewData = state === "DRAFT" /* DRAFT */;
20449
20907
  this.state.showMask = this.isNewData;
20450
- this.calcViewParams();
20908
+ if (state === "LOAD" /* LOAD */ || state === "DRAFT" /* DRAFT */) {
20909
+ this.calcViewParams();
20910
+ }
20451
20911
  }
20452
20912
  /**
20453
20913
  * 计算视图上下文和视图参数,
@@ -20459,7 +20919,7 @@ var FormDRUIPartController = class extends FormDetailController {
20459
20919
  calcViewParams() {
20460
20920
  let newContext = this.form.context.clone();
20461
20921
  const navContexts = this.model.navigateContexts;
20462
- if (notNilEmpty6(navContexts)) {
20922
+ if (notNilEmpty7(navContexts)) {
20463
20923
  newContext = Object.assign(
20464
20924
  newContext,
20465
20925
  convertNavData(
@@ -20629,7 +21089,7 @@ var FormGroupPanelController = class extends FormDetailController {
20629
21089
  // src/controller/control/form/form-detail/form-item/form-item.controller.ts
20630
21090
  import Schema from "async-validator";
20631
21091
  import { createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
20632
- import { ModelError as ModelError24, RuntimeError as RuntimeError35 } from "@ibiz-template/core";
21092
+ import { ModelError as ModelError24, RuntimeError as RuntimeError36 } from "@ibiz-template/core";
20633
21093
  import dayjs3 from "dayjs";
20634
21094
 
20635
21095
  // src/controller/control/form/form-detail/form-item/form-item.state.ts
@@ -20934,7 +21394,7 @@ var FormItemController = class extends FormDetailController {
20934
21394
  case "SESSION":
20935
21395
  case "APPLICATION":
20936
21396
  if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
20937
- throw new RuntimeError35("appdata.context\u4E0D\u5B58\u5728");
21397
+ throw new RuntimeError36("appdata.context\u4E0D\u5B58\u5728");
20938
21398
  }
20939
21399
  data[this.name] = ibiz.appData.context[defaultValue];
20940
21400
  break;
@@ -21059,7 +21519,7 @@ var FormMDCtrlContentTypeController = class {
21059
21519
  };
21060
21520
 
21061
21521
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
21062
- import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
21522
+ import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
21063
21523
  var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
21064
21524
  /**
21065
21525
  * 初始化
@@ -21074,7 +21534,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
21074
21534
  const { model } = this.parent;
21075
21535
  const { contentControl } = model;
21076
21536
  if (!contentControl) {
21077
- throw new RuntimeError36("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
21537
+ throw new RuntimeError37("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
21078
21538
  }
21079
21539
  this.controlModel = contentControl;
21080
21540
  const controlProvider = await getControlProvider(this.controlModel);
@@ -21178,13 +21638,13 @@ var FormMDCtrlDataViewController = class extends FormMDCtrlControlController {
21178
21638
 
21179
21639
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.controller.ts
21180
21640
  import { mergeInLeft as mergeInLeft2 } from "@ibiz-template/core";
21181
- import { isArray as isArray3 } from "lodash-es";
21641
+ import { isArray as isArray4 } from "lodash-es";
21182
21642
 
21183
21643
  // src/controller/control/form/edit-form/edit-form.controller.ts
21184
21644
  import {
21185
21645
  awaitTimeout,
21186
21646
  mergeInLeft,
21187
- RuntimeError as RuntimeError37,
21647
+ RuntimeError as RuntimeError38,
21188
21648
  mergeDefaultInLeft as mergeDefaultInLeft2
21189
21649
  } from "@ibiz-template/core";
21190
21650
  import { debounce } from "lodash-es";
@@ -21554,7 +22014,7 @@ var EditFormController = class extends FormController {
21554
22014
  }
21555
22015
  const isValid = await this.validate();
21556
22016
  if (!isValid) {
21557
- throw new RuntimeError37("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
22017
+ throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21558
22018
  }
21559
22019
  await this.startLoading();
21560
22020
  await this.evt.emit("onBeforeSave", void 0);
@@ -21644,7 +22104,7 @@ var EditFormController = class extends FormController {
21644
22104
  (item) => item.id === formItemUpdateId
21645
22105
  );
21646
22106
  if (!formItemUpdate) {
21647
- throw new RuntimeError37("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
22107
+ throw new RuntimeError38("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
21648
22108
  }
21649
22109
  const { appDEMethodId, defiupdateDetails } = formItemUpdate;
21650
22110
  const updateItems = defiupdateDetails.map((item) => item.id);
@@ -21674,7 +22134,7 @@ var EditFormController = class extends FormController {
21674
22134
  async wfStart(extraParams = {}) {
21675
22135
  const isValid = await this.validate();
21676
22136
  if (!isValid) {
21677
- throw new RuntimeError37("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
22137
+ throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21678
22138
  }
21679
22139
  await this.startLoading();
21680
22140
  try {
@@ -21702,7 +22162,7 @@ var EditFormController = class extends FormController {
21702
22162
  async wfSubmit(extraParams = {}) {
21703
22163
  const isValid = await this.validate();
21704
22164
  if (!isValid) {
21705
- throw new RuntimeError37("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
22165
+ throw new RuntimeError38("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
21706
22166
  }
21707
22167
  await this.startLoading();
21708
22168
  try {
@@ -21816,7 +22276,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
21816
22276
  handleResponse(response) {
21817
22277
  const res = response;
21818
22278
  if (res.ok) {
21819
- if (isArray3(res.data)) {
22279
+ if (isArray4(res.data)) {
21820
22280
  res.data = res.data.map(
21821
22281
  (item) => this.service.toUIData(item)
21822
22282
  );
@@ -21928,7 +22388,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
21928
22388
  };
21929
22389
 
21930
22390
  // src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
21931
- import { RuntimeError as RuntimeError38, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
22391
+ import { RuntimeError as RuntimeError39, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
21932
22392
  var FormMDCtrlGridController = class extends FormMDCtrlControlController {
21933
22393
  constructor() {
21934
22394
  super(...arguments);
@@ -22033,7 +22493,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
22033
22493
  const { model } = this.parent;
22034
22494
  const { contentControl } = model;
22035
22495
  if (!contentControl) {
22036
- throw new RuntimeError38("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
22496
+ throw new RuntimeError39("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
22037
22497
  }
22038
22498
  mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
22039
22499
  this.controlModel = contentControl;
@@ -22743,7 +23203,7 @@ import {
22743
23203
  awaitTimeout as awaitTimeout2,
22744
23204
  debounceAndAsyncMerge as debounceAndAsyncMerge2,
22745
23205
  recursiveIterate as recursiveIterate4,
22746
- RuntimeError as RuntimeError39,
23206
+ RuntimeError as RuntimeError40,
22747
23207
  RuntimeModelError as RuntimeModelError43
22748
23208
  } from "@ibiz-template/core";
22749
23209
  import { clone as clone13 } from "ramda";
@@ -23088,11 +23548,11 @@ var GridController = class extends MDControlController {
23088
23548
  this.state.rows.splice(index, 1);
23089
23549
  this.state.groups.forEach((item) => {
23090
23550
  if (item.children.length) {
23091
- const findIndex = item.children.findIndex(
23551
+ const findIndex2 = item.children.findIndex(
23092
23552
  (item2) => item2.srfkey === data.srfkey
23093
23553
  );
23094
- if (findIndex !== -1) {
23095
- item.children.splice(findIndex, 1);
23554
+ if (findIndex2 !== -1) {
23555
+ item.children.splice(findIndex2, 1);
23096
23556
  }
23097
23557
  }
23098
23558
  });
@@ -23111,7 +23571,7 @@ var GridController = class extends MDControlController {
23111
23571
  }
23112
23572
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
23113
23573
  if (editingRow) {
23114
- throw new RuntimeError39("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
23574
+ throw new RuntimeError40("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
23115
23575
  }
23116
23576
  const res = await this.service.getDraft(this.context, this.params);
23117
23577
  this.state.items.unshift(res.data);
@@ -23136,7 +23596,7 @@ var GridController = class extends MDControlController {
23136
23596
  (item) => item.data.srfkey === data.srfkey
23137
23597
  );
23138
23598
  if (!rowState) {
23139
- throw new RuntimeError39("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
23599
+ throw new RuntimeError40("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
23140
23600
  }
23141
23601
  if (!rowState.modified) {
23142
23602
  ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
@@ -23148,7 +23608,7 @@ var GridController = class extends MDControlController {
23148
23608
  }
23149
23609
  const isValid = await this.validate(rowState);
23150
23610
  if (!isValid) {
23151
- throw new RuntimeError39("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
23611
+ throw new RuntimeError40("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
23152
23612
  }
23153
23613
  await this.startLoading();
23154
23614
  let res;
@@ -23229,12 +23689,36 @@ var GridController = class extends MDControlController {
23229
23689
  this.state.columnStates.push({
23230
23690
  key: column.codeName,
23231
23691
  caption: column.caption,
23232
- hidden: !!column.hideDefault
23692
+ hidden: !!column.hideDefault,
23693
+ uaColumn: column.columnType === "UAGRIDCOLUMN"
23233
23694
  });
23234
23695
  }
23235
23696
  },
23236
23697
  { childrenFields: ["degridColumns"] }
23237
23698
  );
23699
+ this.calcColumnFixed();
23700
+ }
23701
+ /**
23702
+ * 计算列的固定状态
23703
+ * @author lxm
23704
+ * @date 2023-08-31 05:12:27
23705
+ * @protected
23706
+ */
23707
+ calcColumnFixed() {
23708
+ const showColumns = this.state.columnStates.filter(
23709
+ (column) => !column.hidden
23710
+ );
23711
+ const allNum = showColumns.length;
23712
+ const { frozenFirstColumn, frozenLastColumn } = this.model;
23713
+ showColumns.forEach((column, index) => {
23714
+ if (column.uaColumn) {
23715
+ column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
23716
+ } else if (frozenFirstColumn && index < frozenFirstColumn) {
23717
+ column.fixed = "left";
23718
+ } else if (frozenLastColumn && index >= allNum - frozenLastColumn) {
23719
+ column.fixed = "right";
23720
+ }
23721
+ });
23238
23722
  }
23239
23723
  /**
23240
23724
  * 初始化表格属性列,操作列,编辑项控制器
@@ -23295,7 +23779,7 @@ var GridController = class extends MDControlController {
23295
23779
  );
23296
23780
  if (values.find((item) => item.status === "rejected")) {
23297
23781
  ibiz.log.error("dataChangeNotify\u62A5\u9519", values);
23298
- throw new RuntimeError39("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
23782
+ throw new RuntimeError40("\u6570\u636E\u53D8\u66F4\u540E\u6709\u9519\u8BEF");
23299
23783
  }
23300
23784
  }
23301
23785
  /**
@@ -23325,7 +23809,7 @@ var GridController = class extends MDControlController {
23325
23809
  }
23326
23810
  async toggleRowEdit() {
23327
23811
  if (!this.model.enableRowNew) {
23328
- throw new RuntimeError39("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
23812
+ throw new RuntimeError40("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
23329
23813
  }
23330
23814
  this.state.rowEditOpen = !this.state.rowEditOpen;
23331
23815
  }
@@ -23358,7 +23842,7 @@ var GridController = class extends MDControlController {
23358
23842
  if (toState === true) {
23359
23843
  const editingRow = this.state.rows.find((item) => item.showRowEdit);
23360
23844
  if (editingRow) {
23361
- throw new RuntimeError39("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
23845
+ throw new RuntimeError40("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
23362
23846
  }
23363
23847
  }
23364
23848
  row.showRowEdit = toState;
@@ -23401,7 +23885,7 @@ var GridController = class extends MDControlController {
23401
23885
  (item) => item.id === updateId
23402
23886
  );
23403
23887
  if (!findUpdate) {
23404
- throw new RuntimeError39("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
23888
+ throw new RuntimeError40("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
23405
23889
  }
23406
23890
  const { appDEMethodId, degeiupdateDetails } = findUpdate;
23407
23891
  const updateItems = degeiupdateDetails.map((item) => item.id);
@@ -23496,7 +23980,7 @@ var GridController = class extends MDControlController {
23496
23980
  data2 = this.getData();
23497
23981
  }
23498
23982
  if (data2.length === 0) {
23499
- throw new RuntimeError39("\u65E0\u5BFC\u51FA\u6570\u636E");
23983
+ throw new RuntimeError40("\u65E0\u5BFC\u51FA\u6570\u636E");
23500
23984
  }
23501
23985
  return formatExcelData(data2);
23502
23986
  };
@@ -23515,11 +23999,11 @@ var GridController = class extends MDControlController {
23515
23999
  );
23516
24000
  const data = formatArrayData(filterVal, await getExportData());
23517
24001
  if (!ibiz.util.getExportExcel) {
23518
- throw new RuntimeError39("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
24002
+ throw new RuntimeError40("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
23519
24003
  }
23520
24004
  const exportExcel = await ibiz.util.getExportExcel();
23521
24005
  if (!exportExcel) {
23522
- throw new RuntimeError39("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
24006
+ throw new RuntimeError40("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
23523
24007
  }
23524
24008
  exportExcel.exportJsonToExcel({
23525
24009
  header,
@@ -23659,7 +24143,15 @@ var GridFieldColumnController = class extends GridColumnController {
23659
24143
  * @param {MouseEvent} event 鼠标事件
23660
24144
  * @returns {*} {Promise<void>}
23661
24145
  */
23662
- async triggerAction(_row, _event) {
24146
+ async triggerAction(row, event) {
24147
+ const actionId = this.model.deuiactionId;
24148
+ await UIActionUtil.execAndResolved(actionId, {
24149
+ context: this.context,
24150
+ params: this.params,
24151
+ data: [row.data],
24152
+ view: this.grid.view,
24153
+ event
24154
+ });
23663
24155
  }
23664
24156
  /**
23665
24157
  * 加载代码表数据
@@ -23694,7 +24186,7 @@ var GridFieldColumnController = class extends GridColumnController {
23694
24186
  * @return {*} {(string | undefined)}
23695
24187
  */
23696
24188
  calcFieldAgg(items) {
23697
- const { aggField, aggMode, aggValueFormat } = this.model;
24189
+ const { aggField, aggMode, aggValueFormat, unitName } = this.model;
23698
24190
  if (aggMode === "NONE") {
23699
24191
  return;
23700
24192
  }
@@ -23725,18 +24217,18 @@ var GridFieldColumnController = class extends GridColumnController {
23725
24217
  "\u6682\u672A\u652F\u6301\u805A\u5408\u6A21\u5F0F".concat(this.grid.model.aggMode)
23726
24218
  );
23727
24219
  }
23728
- if (!aggValueFormat) {
23729
- return "".concat(aggValue);
24220
+ let value = "".concat(aggValue);
24221
+ if (aggValueFormat) {
24222
+ try {
24223
+ value = ibiz.util.text.format("".concat(aggValue), aggValueFormat);
24224
+ } catch (error) {
24225
+ ibiz.log.error("".concat(aggValue, " \u503C\u683C\u5F0F\u5316\u9519\u8BEF"));
24226
+ }
23730
24227
  }
23731
- const formatValue = "";
23732
- switch (aggValueFormat) {
23733
- default:
23734
- throw new ModelError25(
23735
- this.model,
23736
- "\u6682\u672A\u652F\u6301".concat(aggValueFormat, "\u7684\u805A\u5408\u503C\u683C\u5F0F\u5316")
23737
- );
24228
+ if (value && unitName) {
24229
+ value += unitName;
23738
24230
  }
23739
- return formatValue;
24231
+ return value;
23740
24232
  }
23741
24233
  /**
23742
24234
  * 值格式化
@@ -23746,6 +24238,9 @@ var GridFieldColumnController = class extends GridColumnController {
23746
24238
  * @return {*} {string}
23747
24239
  */
23748
24240
  formatValue(value = "") {
24241
+ if (this.model.valueType) {
24242
+ return ValueExUtil.toText(this.model, value);
24243
+ }
23749
24244
  const strVal = "".concat(value);
23750
24245
  if (!this.valueFormat) {
23751
24246
  return strVal;
@@ -23813,7 +24308,7 @@ var GridUAColumnController = class extends GridColumnController {
23813
24308
  };
23814
24309
 
23815
24310
  // src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
23816
- import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
24311
+ import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
23817
24312
  import Schema2 from "async-validator";
23818
24313
  import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
23819
24314
  var GridFieldEditColumnController = class extends GridFieldColumnController {
@@ -23947,7 +24442,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
23947
24442
  if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
23948
24443
  const result = await this.validate(row);
23949
24444
  if (!result) {
23950
- throw new RuntimeError40(
24445
+ throw new RuntimeError41(
23951
24446
  "".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
23952
24447
  );
23953
24448
  }
@@ -24299,7 +24794,7 @@ var ListController = class extends MDControlController {
24299
24794
  };
24300
24795
 
24301
24796
  // src/controller/control/panel/panel/panel.controller.ts
24302
- import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
24797
+ import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
24303
24798
  var PanelController = class extends ControlController {
24304
24799
  constructor() {
24305
24800
  super(...arguments);
@@ -24397,7 +24892,7 @@ var PanelController = class extends ControlController {
24397
24892
  async load() {
24398
24893
  const data = await this.prepareData();
24399
24894
  if (!data) {
24400
- throw new RuntimeError41("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
24895
+ throw new RuntimeError42("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
24401
24896
  }
24402
24897
  const panelData = this.convertData(data);
24403
24898
  this.state.data = panelData;
@@ -24873,6 +25368,7 @@ var SearchBarController = class extends ControlController {
24873
25368
  initState() {
24874
25369
  super.initState();
24875
25370
  this.state.query = "";
25371
+ this.state.selectedGroupItem = null;
24876
25372
  this.state.visible = !!(this.model.enableQuickSearch || this.model.enableGroup || this.model.enableFilter);
24877
25373
  }
24878
25374
  async onCreated() {
@@ -25613,7 +26109,7 @@ var TreeController = class extends MDControlController {
25613
26109
  };
25614
26110
 
25615
26111
  // src/controller/control/wizard-panel/wizard-panel.controller.ts
25616
- import { RuntimeError as RuntimeError42 } from "@ibiz-template/core";
26112
+ import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
25617
26113
 
25618
26114
  // src/controller/control/wizard-panel/wizard-panel.service.ts
25619
26115
  var WizardPanelService = class extends ControlService {
@@ -25772,7 +26268,7 @@ var WizardPanelController = class extends ControlController {
25772
26268
  const { activeFormTag } = this.state;
25773
26269
  const controller = this.formControllers.get(activeFormTag);
25774
26270
  if (!controller) {
25775
- throw new RuntimeError42("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
26271
+ throw new RuntimeError43("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
25776
26272
  }
25777
26273
  return controller;
25778
26274
  }
@@ -25847,7 +26343,7 @@ var WizardPanelController = class extends ControlController {
25847
26343
  this.tagHistory.pop();
25848
26344
  const prevTag = this.tagHistory[this.tagHistory.length - 1];
25849
26345
  if (!prevTag) {
25850
- throw new RuntimeError42("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
26346
+ throw new RuntimeError43("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
25851
26347
  }
25852
26348
  this.state.activeFormTag = prevTag;
25853
26349
  }
@@ -25868,7 +26364,7 @@ var WizardPanelController = class extends ControlController {
25868
26364
  }
25869
26365
  );
25870
26366
  if (!wizardForm) {
25871
- throw new RuntimeError42("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
26367
+ throw new RuntimeError43("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
25872
26368
  }
25873
26369
  nextTag = data.srfnextform;
25874
26370
  } else {
@@ -25880,7 +26376,7 @@ var WizardPanelController = class extends ControlController {
25880
26376
  });
25881
26377
  const nextWizardStep = wizardSteps[index + 1];
25882
26378
  if (!nextWizardStep) {
25883
- throw new RuntimeError42("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
26379
+ throw new RuntimeError43("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
25884
26380
  }
25885
26381
  const nextWizardForm = this.model.dewizard.dewizardForms.find(
25886
26382
  (wizardForm) => {
@@ -25893,7 +26389,7 @@ var WizardPanelController = class extends ControlController {
25893
26389
  }
25894
26390
  }
25895
26391
  if (!nextTag) {
25896
- throw new RuntimeError42("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
26392
+ throw new RuntimeError43("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
25897
26393
  }
25898
26394
  this.state.activeFormTag = nextTag;
25899
26395
  this.tagHistory.push(nextTag);
@@ -26322,7 +26818,7 @@ var AppHub = class {
26322
26818
  this.registerAppView(appView);
26323
26819
  return appView;
26324
26820
  }
26325
- throw new RuntimeError43("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
26821
+ throw new RuntimeError44("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
26326
26822
  }
26327
26823
  /**
26328
26824
  * 根据应用实体代码名称查找应用视图
@@ -26353,7 +26849,7 @@ var AppHub = class {
26353
26849
  this.registerAppDataEntity(entity, appId);
26354
26850
  return entity;
26355
26851
  }
26356
- throw new RuntimeError43("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
26852
+ throw new RuntimeError44("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
26357
26853
  }
26358
26854
  /**
26359
26855
  * 新建 hub 应用
@@ -26374,7 +26870,7 @@ var AppHub = class {
26374
26870
  appModel = await this.modelLoaderProvider.getApp(id);
26375
26871
  this.registerApp(appModel);
26376
26872
  } else {
26377
- throw new RuntimeError43("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
26873
+ throw new RuntimeError44("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
26378
26874
  }
26379
26875
  const app = new Application(appModel);
26380
26876
  this.appMap.set(id, app);
@@ -26465,7 +26961,7 @@ var EngineFactory = class {
26465
26961
  };
26466
26962
 
26467
26963
  // src/engine/view-base.engine.ts
26468
- import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
26964
+ import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
26469
26965
  var ViewEngineBase = class {
26470
26966
  /**
26471
26967
  * 构造函数在视图控制器的构造函数逻辑内部执行
@@ -26653,7 +27149,7 @@ var ViewEngineBase = class {
26653
27149
  const { appDataEntityId } = this.view.model;
26654
27150
  const { evt, context, params } = this.view;
26655
27151
  if (!appDataEntityId) {
26656
- throw new RuntimeError44("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
27152
+ throw new RuntimeError45("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
26657
27153
  }
26658
27154
  const app = ibiz.hub.getApp(context.srfappid);
26659
27155
  const res = await app.deService.exec(
@@ -26724,9 +27220,7 @@ var MDViewEngine = class extends ViewEngineBase {
26724
27220
  async onMounted() {
26725
27221
  await super.onMounted();
26726
27222
  const { model } = this.view;
26727
- this.xdataControl.evt.on("onActive", async (event) => {
26728
- await this.openData(event);
26729
- });
27223
+ this.xdataControl.evt.on("onActive", this.onXDataActive.bind(this));
26730
27224
  this.xdataControl.evt.on("onSelectionChange", async (event) => {
26731
27225
  var _a;
26732
27226
  (_a = this.toolbar) == null ? void 0 : _a.calcButtonState(
@@ -26766,6 +27260,17 @@ var MDViewEngine = class extends ViewEngineBase {
26766
27260
  this.load();
26767
27261
  }
26768
27262
  }
27263
+ /**
27264
+ * 多数据部件激活事件处理
27265
+ * @author lxm
27266
+ * @date 2023-08-31 02:53:37
27267
+ * @protected
27268
+ * @param {EventBase} event
27269
+ * @return {*} {Promise<void>}
27270
+ */
27271
+ async onXDataActive(event) {
27272
+ await this.openData(event);
27273
+ }
26769
27274
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
26770
27275
  async call(key, args) {
26771
27276
  if (key === "ToggleFilter" /* TOGGLE_FILTER */) {
@@ -26908,6 +27413,7 @@ var MDViewEngine = class extends ViewEngineBase {
26908
27413
  * @return {*} {IParams}
26909
27414
  */
26910
27415
  getSearchParams() {
27416
+ var _a;
26911
27417
  const params = {};
26912
27418
  if (this.searchForm) {
26913
27419
  const addParams = this.searchForm.getData()[0];
@@ -26922,11 +27428,20 @@ var MDViewEngine = class extends ViewEngineBase {
26922
27428
  );
26923
27429
  Object.assign(params, filteredParams);
26924
27430
  }
26925
- if (this.searchBar && this.searchBar.state.query) {
26926
- const addParams = {
26927
- query: this.searchBar.state.query
26928
- };
26929
- Object.assign(params, addParams);
27431
+ if (this.searchBar) {
27432
+ if (this.searchBar.state.query) {
27433
+ const addParams = {
27434
+ query: this.searchBar.state.query
27435
+ };
27436
+ Object.assign(params, addParams);
27437
+ }
27438
+ if ((_a = this.searchBar.state.selectedGroupItem) == null ? void 0 : _a.data) {
27439
+ const func = new Function(
27440
+ "return (".concat(this.searchBar.state.selectedGroupItem.data, ");")
27441
+ );
27442
+ const addParams = func();
27443
+ Object.assign(params, addParams);
27444
+ }
26930
27445
  }
26931
27446
  return params;
26932
27447
  }
@@ -27015,7 +27530,7 @@ var GlobalUtil = class {
27015
27530
  };
27016
27531
 
27017
27532
  // src/logic-scheduler/executor/logic-executor.ts
27018
- import { RuntimeError as RuntimeError45 } from "@ibiz-template/core";
27533
+ import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
27019
27534
  var LogicExecutor = class {
27020
27535
  /**
27021
27536
  * @author lxm
@@ -27036,7 +27551,7 @@ var LogicExecutor = class {
27036
27551
  */
27037
27552
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27038
27553
  execute(_executeParams) {
27039
- throw new RuntimeError45("Method not implemented.");
27554
+ throw new RuntimeError46("Method not implemented.");
27040
27555
  }
27041
27556
  /**
27042
27557
  * 销毁方法
@@ -27140,7 +27655,7 @@ var AppDEUILogicExecutor = class extends LogicExecutor {
27140
27655
  };
27141
27656
 
27142
27657
  // src/logic-scheduler/scheduler/logic-scheduler.ts
27143
- import { mergeLeft } from "ramda";
27658
+ import { mergeLeft as mergeLeft2 } from "ramda";
27144
27659
  var LogicScheduler = class {
27145
27660
  constructor(logics) {
27146
27661
  this.triggers = /* @__PURE__ */ new Map();
@@ -27193,7 +27708,7 @@ var LogicScheduler = class {
27193
27708
  if (this.defaultParamsCb) {
27194
27709
  defaultParams = this.defaultParamsCb();
27195
27710
  }
27196
- return mergeLeft(executeParams, defaultParams);
27711
+ return mergeLeft2(executeParams, defaultParams);
27197
27712
  }
27198
27713
  /**
27199
27714
  * 创建触发器实例
@@ -27468,7 +27983,7 @@ var LogicSchedulerCenter = class {
27468
27983
  };
27469
27984
 
27470
27985
  // src/logic-scheduler/trigger/logic-trigger.ts
27471
- import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
27986
+ import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
27472
27987
  var LogicTrigger = class {
27473
27988
  /**
27474
27989
  * @author lxm
@@ -27528,7 +28043,7 @@ var LogicTrigger = class {
27528
28043
  if (this.executor) {
27529
28044
  return this.executor.execute(executeParams);
27530
28045
  }
27531
- throw new RuntimeError46("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
28046
+ throw new RuntimeError47("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
27532
28047
  }
27533
28048
  /**
27534
28049
  * 销毁方法
@@ -27545,12 +28060,12 @@ var CustomTrigger = class extends LogicTrigger {
27545
28060
  };
27546
28061
 
27547
28062
  // src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
27548
- import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
28063
+ import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
27549
28064
  var ItemDynaLogicTrigger = class extends LogicTrigger {
27550
28065
  bindExecutor(executor) {
27551
28066
  super.bindExecutor(executor);
27552
28067
  if (this.executor.type !== "SCRIPT") {
27553
- throw new RuntimeError47(
28068
+ throw new RuntimeError48(
27554
28069
  "\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
27555
28070
  );
27556
28071
  }
@@ -27582,12 +28097,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
27582
28097
  if (typeof result === "boolean") {
27583
28098
  return result;
27584
28099
  }
27585
- throw new RuntimeError47("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
28100
+ throw new RuntimeError48("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
27586
28101
  }
27587
28102
  };
27588
28103
 
27589
28104
  // src/logic-scheduler/trigger/timer-trigger.ts
27590
- import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
28105
+ import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
27591
28106
  var TimerTrigger = class extends LogicTrigger {
27592
28107
  constructor() {
27593
28108
  super(...arguments);
@@ -27596,7 +28111,7 @@ var TimerTrigger = class extends LogicTrigger {
27596
28111
  start() {
27597
28112
  this.timer = setInterval(() => {
27598
28113
  if (!this.scheduler.defaultParamsCb) {
27599
- throw new RuntimeError48("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
28114
+ throw new RuntimeError49("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
27600
28115
  }
27601
28116
  const params = this.scheduler.defaultParamsCb();
27602
28117
  this.executor.execute(params);
@@ -27613,10 +28128,10 @@ var TimerTrigger = class extends LogicTrigger {
27613
28128
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
27614
28129
  import {
27615
28130
  ModelError as ModelError29,
27616
- RuntimeError as RuntimeError49,
28131
+ RuntimeError as RuntimeError50,
27617
28132
  RuntimeModelError as RuntimeModelError47
27618
28133
  } from "@ibiz-template/core";
27619
- import { notNilEmpty as notNilEmpty7 } from "qx-util";
28134
+ import { notNilEmpty as notNilEmpty8 } from "qx-util";
27620
28135
  var AppUILogicExecutor = class extends LogicExecutor {
27621
28136
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27622
28137
  execute(executeParams) {
@@ -27649,7 +28164,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27649
28164
  const { context, params, ...rest } = parameters;
27650
28165
  const { data } = parameters;
27651
28166
  if (!(data == null ? void 0 : data[0])) {
27652
- throw new RuntimeError49("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
28167
+ throw new RuntimeError50("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
27653
28168
  }
27654
28169
  const openViewRef = appUILogic.openDataAppView;
27655
28170
  if (!openViewRef) {
@@ -27672,7 +28187,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
27672
28187
  );
27673
28188
  let tempParams = {};
27674
28189
  const navParams = openViewRef.navigateParams;
27675
- if (notNilEmpty7(navParams)) {
28190
+ if (notNilEmpty8(navParams)) {
27676
28191
  tempParams = convertNavData(navParams, params, context, data[0]);
27677
28192
  }
27678
28193
  return ibiz.commands.execute(
@@ -27722,12 +28237,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
27722
28237
  let tempParams = {};
27723
28238
  const _data = (data == null ? void 0 : data[0]) || {};
27724
28239
  const navContexts = newViewRef.navigateContexts;
27725
- if (notNilEmpty7(navContexts)) {
28240
+ if (notNilEmpty8(navContexts)) {
27726
28241
  tempContext = convertNavData(navContexts, context, params, _data);
27727
28242
  }
27728
28243
  tempContext = Object.assign(context, tempContext);
27729
28244
  const navParams = newViewRef.navigateParams;
27730
- if (notNilEmpty7(navParams)) {
28245
+ if (notNilEmpty8(navParams)) {
27731
28246
  tempParams = convertNavData(navParams, params, context, _data);
27732
28247
  }
27733
28248
  if (context.srfcopymode) {
@@ -27772,12 +28287,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
27772
28287
  }
27773
28288
  const selectData = (_a = result.data) == null ? void 0 : _a[0];
27774
28289
  if (!selectData) {
27775
- throw new RuntimeError49("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
28290
+ throw new RuntimeError50("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
27776
28291
  }
27777
28292
  const indexType = selectData.srfkey;
27778
28293
  const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
27779
28294
  if (!findView) {
27780
- throw new RuntimeError49(
28295
+ throw new RuntimeError50(
27781
28296
  "\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
27782
28297
  );
27783
28298
  }
@@ -28137,6 +28652,7 @@ export {
28137
28652
  UIMapField,
28138
28653
  V7AuthService,
28139
28654
  VIEW_PROVIDER_PREFIX,
28655
+ ValueExUtil,
28140
28656
  ViewController,
28141
28657
  ViewEngineBase,
28142
28658
  ViewLayoutPanelController,