@ibiz-template/runtime 0.1.35 → 0.1.37

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 (117) hide show
  1. package/dist/index.esm.js +799 -130
  2. package/dist/index.system.min.js +1 -1
  3. package/dist/index.system.min.js.map +1 -1
  4. package/out/constant/index.d.ts +1 -0
  5. package/out/constant/index.d.ts.map +1 -1
  6. package/out/constant/index.js +1 -0
  7. package/out/constant/value-op.d.ts +82 -0
  8. package/out/constant/value-op.d.ts.map +1 -0
  9. package/out/constant/value-op.js +83 -0
  10. package/out/constant/view-call-tag.d.ts +5 -1
  11. package/out/constant/view-call-tag.d.ts.map +1 -1
  12. package/out/constant/view-call-tag.js +4 -0
  13. package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
  14. package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +1 -0
  15. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +3 -3
  16. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
  17. package/out/controller/control/form/form-detail/form-item/form-item.controller.js +13 -8
  18. package/out/controller/control/form/search-form/search-form.controller.d.ts +2 -2
  19. package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
  20. package/out/controller/control/form/search-form/search-form.controller.js +11 -3
  21. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts +3 -3
  22. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
  23. package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +13 -8
  24. package/out/controller/control/index.d.ts +1 -0
  25. package/out/controller/control/index.d.ts.map +1 -1
  26. package/out/controller/control/index.js +1 -0
  27. package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts +38 -3
  28. package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
  29. package/out/controller/control/md-ctrl/md-ctrl.controller.js +110 -3
  30. package/out/controller/control/medit-view-panel/index.d.ts +3 -0
  31. package/out/controller/control/medit-view-panel/index.d.ts.map +1 -0
  32. package/out/controller/control/medit-view-panel/index.js +2 -0
  33. package/out/controller/control/medit-view-panel/medit-view-panel.controller.d.ts +119 -0
  34. package/out/controller/control/medit-view-panel/medit-view-panel.controller.d.ts.map +1 -0
  35. package/out/controller/control/medit-view-panel/medit-view-panel.controller.js +320 -0
  36. package/out/controller/control/medit-view-panel/medit-view-panel.service.d.ts +11 -0
  37. package/out/controller/control/medit-view-panel/medit-view-panel.service.d.ts.map +1 -0
  38. package/out/controller/control/medit-view-panel/medit-view-panel.service.js +9 -0
  39. package/out/controller/control/search-bar/search-bar-filter.controller.d.ts +65 -0
  40. package/out/controller/control/search-bar/search-bar-filter.controller.d.ts.map +1 -0
  41. package/out/controller/control/search-bar/search-bar-filter.controller.js +48 -0
  42. package/out/controller/control/search-bar/search-bar.controller.d.ts +63 -4
  43. package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
  44. package/out/controller/control/search-bar/search-bar.controller.js +143 -9
  45. package/out/controller/utils/value-rule/value-rule.d.ts +10 -1
  46. package/out/controller/utils/value-rule/value-rule.d.ts.map +1 -1
  47. package/out/controller/utils/value-rule/value-rule.js +64 -1
  48. package/out/engine/md-view.engine.d.ts.map +1 -1
  49. package/out/engine/md-view.engine.js +2 -23
  50. package/out/interface/controller/controller/control/i-medit-view-panel.controller.d.ts +14 -0
  51. package/out/interface/controller/controller/control/i-medit-view-panel.controller.d.ts.map +1 -0
  52. package/out/interface/controller/controller/control/i-medit-view-panel.controller.js +1 -0
  53. package/out/interface/controller/controller/control/i-search-bar.controller.d.ts +8 -0
  54. package/out/interface/controller/controller/control/i-search-bar.controller.d.ts.map +1 -1
  55. package/out/interface/controller/controller/control/i-search-form.controller.d.ts +2 -2
  56. package/out/interface/controller/controller/control/i-search-form.controller.d.ts.map +1 -1
  57. package/out/interface/controller/controller/control/index.d.ts +1 -0
  58. package/out/interface/controller/controller/control/index.d.ts.map +1 -1
  59. package/out/interface/controller/controller/control/index.js +1 -0
  60. package/out/interface/controller/event/control/i-medit-view-panel.event.d.ts +9 -0
  61. package/out/interface/controller/event/control/i-medit-view-panel.event.d.ts.map +1 -0
  62. package/out/interface/controller/event/control/i-medit-view-panel.event.js +1 -0
  63. package/out/interface/controller/event/control/index.d.ts +1 -0
  64. package/out/interface/controller/event/control/index.d.ts.map +1 -1
  65. package/out/interface/controller/event/control/index.js +1 -0
  66. package/out/interface/controller/event/view/i-medit-view9.event.d.ts +10 -0
  67. package/out/interface/controller/event/view/i-medit-view9.event.d.ts.map +1 -0
  68. package/out/interface/controller/event/view/i-medit-view9.event.js +1 -0
  69. package/out/interface/controller/event/view/index.d.ts +1 -0
  70. package/out/interface/controller/event/view/index.d.ts.map +1 -1
  71. package/out/interface/controller/event/view/index.js +1 -0
  72. package/out/interface/controller/state/control/i-medit-view-panel.state.d.ts +29 -0
  73. package/out/interface/controller/state/control/i-medit-view-panel.state.d.ts.map +1 -0
  74. package/out/interface/controller/state/control/i-medit-view-panel.state.js +1 -0
  75. package/out/interface/controller/state/control/i-search-bar.state.d.ts +75 -0
  76. package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
  77. package/out/interface/controller/state/control/index.d.ts +1 -0
  78. package/out/interface/controller/state/control/index.d.ts.map +1 -1
  79. package/out/interface/controller/state/control/index.js +1 -0
  80. package/out/interface/controller/state/view/i-medit-view9.state.d.ts +11 -0
  81. package/out/interface/controller/state/view/i-medit-view9.state.d.ts.map +1 -0
  82. package/out/interface/controller/state/view/i-medit-view9.state.js +1 -0
  83. package/out/interface/controller/state/view/index.d.ts +1 -0
  84. package/out/interface/controller/state/view/index.d.ts.map +1 -1
  85. package/out/interface/controller/state/view/index.js +1 -0
  86. package/out/service/service/entity/method/method.js +2 -2
  87. package/package.json +3 -3
  88. package/src/constant/index.ts +1 -0
  89. package/src/constant/value-op.ts +82 -0
  90. package/src/constant/view-call-tag.ts +4 -0
  91. package/src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts +2 -0
  92. package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +22 -9
  93. package/src/controller/control/form/search-form/search-form.controller.ts +11 -3
  94. package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +18 -13
  95. package/src/controller/control/index.ts +1 -0
  96. package/src/controller/control/md-ctrl/md-ctrl.controller.ts +136 -3
  97. package/src/controller/control/medit-view-panel/index.ts +2 -0
  98. package/src/controller/control/medit-view-panel/medit-view-panel.controller.ts +375 -0
  99. package/src/controller/control/medit-view-panel/medit-view-panel.service.ts +10 -0
  100. package/src/controller/control/search-bar/search-bar-filter.controller.ts +112 -0
  101. package/src/controller/control/search-bar/search-bar.controller.ts +165 -9
  102. package/src/controller/utils/value-rule/value-rule.ts +97 -2
  103. package/src/engine/md-view.engine.ts +2 -27
  104. package/src/interface/controller/controller/control/i-medit-view-panel.controller.ts +17 -0
  105. package/src/interface/controller/controller/control/i-search-bar.controller.ts +10 -1
  106. package/src/interface/controller/controller/control/i-search-form.controller.ts +2 -2
  107. package/src/interface/controller/controller/control/index.ts +1 -0
  108. package/src/interface/controller/event/control/i-medit-view-panel.event.ts +9 -0
  109. package/src/interface/controller/event/control/index.ts +1 -0
  110. package/src/interface/controller/event/view/i-medit-view9.event.ts +10 -0
  111. package/src/interface/controller/event/view/index.ts +1 -0
  112. package/src/interface/controller/state/control/i-medit-view-panel.state.ts +36 -0
  113. package/src/interface/controller/state/control/i-search-bar.state.ts +86 -0
  114. package/src/interface/controller/state/control/index.ts +1 -0
  115. package/src/interface/controller/state/view/i-medit-view9.state.ts +10 -0
  116. package/src/interface/controller/state/view/index.ts +1 -0
  117. package/src/service/service/entity/method/method.ts +2 -2
package/dist/index.esm.js CHANGED
@@ -8386,9 +8386,33 @@ var ViewCallTag = /* @__PURE__ */ ((ViewCallTag2) => {
8386
8386
  ViewCallTag2["GET_DATA"] = "GetData";
8387
8387
  ViewCallTag2["GET_ALL_DATA"] = "GetAllData";
8388
8388
  ViewCallTag2["VALIDATE"] = "Validate";
8389
+ ViewCallTag2["TOGGLE_COLLAPSE"] = "ToggleCollapse";
8389
8390
  return ViewCallTag2;
8390
8391
  })(ViewCallTag || {});
8391
8392
 
8393
+ // src/constant/value-op.ts
8394
+ var ValueOP = /* @__PURE__ */ ((ValueOP2) => {
8395
+ ValueOP2["EQ"] = "EQ";
8396
+ ValueOP2["NOT_EQ"] = "NOTEQ";
8397
+ ValueOP2["GT"] = "GT";
8398
+ ValueOP2["GT_AND_EQ"] = "GTANDEQ";
8399
+ ValueOP2["LT"] = "LT";
8400
+ ValueOP2["LT_AND_EQ"] = "LTANDEQ";
8401
+ ValueOP2["IS_NULL"] = "ISNULL";
8402
+ ValueOP2["IS_NOT_NULL"] = "ISNOTNULL";
8403
+ ValueOP2["IN"] = "IN";
8404
+ ValueOP2["NOT_IN"] = "NOTIN";
8405
+ ValueOP2["LIKE"] = "LIKE";
8406
+ ValueOP2["LIFT_LIKE"] = "LIFTLIKE";
8407
+ ValueOP2["RIGHT_LIKE"] = "RIGHT_LIKE";
8408
+ ValueOP2["CHILD_OF"] = "CHILDOF";
8409
+ ValueOP2["USER_LIKE"] = "USERLIKE";
8410
+ ValueOP2["BIT_AND"] = "BITAND";
8411
+ ValueOP2["EXISTS"] = "EXISTS";
8412
+ ValueOP2["NOT_EXISTS"] = "NOTEXISTS";
8413
+ return ValueOP2;
8414
+ })(ValueOP || {});
8415
+
8392
8416
  // src/constant/studio-event.ts
8393
8417
  var StudioViewEvents = class {
8394
8418
  };
@@ -11457,7 +11481,7 @@ var Method = class {
11457
11481
  case "POST":
11458
11482
  res = await this.app.net.post(
11459
11483
  this.mergeRequestPath(path2, methodName),
11460
- notNilEmpty6(data) ? data : params
11484
+ notNilEmpty6(data) ? data : params || {}
11461
11485
  );
11462
11486
  break;
11463
11487
  case "GET":
@@ -11469,7 +11493,7 @@ var Method = class {
11469
11493
  case "PUT": {
11470
11494
  res = await this.app.net.put(
11471
11495
  this.mergeRequestPath(path2, methodName),
11472
- notNilEmpty6(data) ? data : params
11496
+ notNilEmpty6(data) ? data : params || {}
11473
11497
  );
11474
11498
  break;
11475
11499
  }
@@ -14578,7 +14602,7 @@ function installCommand() {
14578
14602
  }
14579
14603
 
14580
14604
  // src/app-hub.ts
14581
- import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
14605
+ import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
14582
14606
 
14583
14607
  // src/application.ts
14584
14608
  import { Net } from "@ibiz-template/core";
@@ -14827,7 +14851,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
14827
14851
  // src/controller/common/view/view.controller.ts
14828
14852
  import { createUUID as createUUID3, notNilEmpty as notNilEmpty7 } from "qx-util";
14829
14853
  import { IBizContext as IBizContext2, RuntimeError as RuntimeError24 } from "@ibiz-template/core";
14830
- import { isEmpty as isEmpty8, isNil as isNil15, isNotNil as isNotNil2 } from "ramda";
14854
+ import { isEmpty as isEmpty8, isNil as isNil16, isNotNil as isNotNil2 } from "ramda";
14831
14855
 
14832
14856
  // src/controller/utils/loading/loading.state.ts
14833
14857
  import { NOOP } from "@ibiz-template/core";
@@ -15451,7 +15475,8 @@ function getOriginData(data) {
15451
15475
 
15452
15476
  // src/controller/utils/value-rule/value-rule.ts
15453
15477
  import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
15454
- import { isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
15478
+ import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
15479
+ import { isNil as isNil12 } from "ramda";
15455
15480
  function generateRules(itemVRs, name, valueItemName) {
15456
15481
  const rules = [];
15457
15482
  itemVRs.forEach((item) => {
@@ -15509,10 +15534,68 @@ function generateRules(itemVRs, name, valueItemName) {
15509
15534
  });
15510
15535
  return rules;
15511
15536
  }
15537
+ function generateEditorRules(editor) {
15538
+ const rules = [];
15539
+ const { maxLength, minLength } = editor;
15540
+ const { maxValue, minValue } = editor;
15541
+ if (maxLength) {
15542
+ rules.push({
15543
+ validator: (rule, value, callback) => {
15544
+ if (!isNil12(value) && value.length > maxLength) {
15545
+ callback(
15546
+ new Error(
15547
+ "\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
15548
+ )
15549
+ );
15550
+ } else {
15551
+ return true;
15552
+ }
15553
+ }
15554
+ });
15555
+ }
15556
+ if (minLength) {
15557
+ rules.push({
15558
+ validator: (rule, value, callback) => {
15559
+ if (!isNil12(value) && value.length < minLength) {
15560
+ callback(
15561
+ new Error(
15562
+ "\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
15563
+ )
15564
+ );
15565
+ } else {
15566
+ return true;
15567
+ }
15568
+ }
15569
+ });
15570
+ }
15571
+ if (!isNil12(maxValue)) {
15572
+ rules.push({
15573
+ validator: (rule, value, callback) => {
15574
+ if (!isNil12(value) && isNumber(value) && value > maxValue) {
15575
+ callback(new Error("\u503C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxValue)));
15576
+ } else {
15577
+ return true;
15578
+ }
15579
+ }
15580
+ });
15581
+ }
15582
+ if (!isNil12(minValue)) {
15583
+ rules.push({
15584
+ validator: (rule, value, callback) => {
15585
+ if (!isNil12(value) && isNumber(value) && value < minValue) {
15586
+ callback(new Error("\u503C\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minValue)));
15587
+ } else {
15588
+ return true;
15589
+ }
15590
+ }
15591
+ });
15592
+ }
15593
+ return rules;
15594
+ }
15512
15595
 
15513
15596
  // src/controller/utils/value-ex/value-ex.ts
15514
15597
  import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
15515
- import { isNil as isNil12, mergeLeft } from "ramda";
15598
+ import { isNil as isNil13, mergeLeft } from "ramda";
15516
15599
  var ValueExUtil = class {
15517
15600
  /**
15518
15601
  * 合并默认值
@@ -15537,7 +15620,7 @@ var ValueExUtil = class {
15537
15620
  * @return {*} {string}
15538
15621
  */
15539
15622
  static toText(options, value) {
15540
- if (isNil12(value) || value === "") {
15623
+ if (isNil13(value) || value === "") {
15541
15624
  return "";
15542
15625
  }
15543
15626
  const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
@@ -15562,12 +15645,12 @@ var ValueExUtil = class {
15562
15645
  import { RuntimeError as RuntimeError22, ModelError as ModelError16 } from "@ibiz-template/core";
15563
15646
  import dayjs from "dayjs";
15564
15647
  import { createUUID as createUUID2 } from "qx-util";
15565
- import { isNil as isNil13, isNotNil } from "ramda";
15648
+ import { isNil as isNil14, isNotNil } from "ramda";
15566
15649
  function getDefaultValue(opts, origins) {
15567
15650
  var _a;
15568
15651
  const { name, valueType, defaultValue, valueFormat } = opts;
15569
15652
  const { data, context, params } = origins;
15570
- if (isNil13(valueType) && isNil13(defaultValue)) {
15653
+ if (isNil14(valueType) && isNil14(defaultValue)) {
15571
15654
  return;
15572
15655
  }
15573
15656
  if (valueType === "RESET") {
@@ -15820,7 +15903,7 @@ var BaseController = class {
15820
15903
 
15821
15904
  // src/controller/utils/view-msg/view-msg-controller.ts
15822
15905
  import { RuntimeError as RuntimeError23, RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
15823
- import { isNil as isNil14, mergeRight as mergeRight2 } from "ramda";
15906
+ import { isNil as isNil15, mergeRight as mergeRight2 } from "ramda";
15824
15907
  var ViewMsgController = class _ViewMsgController {
15825
15908
  constructor(msgGroupId) {
15826
15909
  this.msgGroupId = msgGroupId;
@@ -15996,19 +16079,19 @@ var ViewMsgController = class _ViewMsgController {
15996
16079
  const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
15997
16080
  const deViewMessages = dataSet.map((item) => {
15998
16081
  const message = {};
15999
- if (positionField && !isNil14(item[positionField])) {
16082
+ if (positionField && !isNil15(item[positionField])) {
16000
16083
  message.position = item[positionField];
16001
16084
  }
16002
- if (titleField && !isNil14(item[titleField])) {
16085
+ if (titleField && !isNil15(item[titleField])) {
16003
16086
  message.title = item[titleField];
16004
16087
  }
16005
- if (messageField && !isNil14(item[messageField])) {
16088
+ if (messageField && !isNil15(item[messageField])) {
16006
16089
  message.message = item[messageField];
16007
16090
  }
16008
- if (typeField && !isNil14(item[typeField])) {
16091
+ if (typeField && !isNil15(item[typeField])) {
16009
16092
  message.messageType = item[typeField];
16010
16093
  }
16011
- if (removeModeField && !isNil14(item[removeModeField])) {
16094
+ if (removeModeField && !isNil15(item[removeModeField])) {
16012
16095
  message.removeMode = item[removeModeField];
16013
16096
  }
16014
16097
  return mergeRight2(basicMsg, message);
@@ -16228,7 +16311,7 @@ var ViewController = class extends BaseController {
16228
16311
  */
16229
16312
  handleContextParams() {
16230
16313
  this.context.srfappid = this.model.appId;
16231
- if (isNil15(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
16314
+ if (isNil16(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
16232
16315
  this.context.srfsessionid = createUUID3();
16233
16316
  }
16234
16317
  const navContexts = this.model.appViewNavContexts;
@@ -16543,7 +16626,7 @@ var CodeListEditorController = class extends EditorController {
16543
16626
 
16544
16627
  // src/controller/common/control/control.controller.ts
16545
16628
  import { NoticeError } from "@ibiz-template/core";
16546
- import { isNil as isNil16 } from "ramda";
16629
+ import { isNil as isNil17 } from "ramda";
16547
16630
  import { notNilEmpty as notNilEmpty8 } from "qx-util";
16548
16631
  var ControlController = class extends BaseController {
16549
16632
  /**
@@ -16764,7 +16847,7 @@ var ControlController = class extends BaseController {
16764
16847
  let message;
16765
16848
  let duration;
16766
16849
  if (msgItem && msgItem.content) {
16767
- duration = isNil16(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
16850
+ duration = isNil17(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
16768
16851
  const scriptParams = { ...this.getEventArgs() };
16769
16852
  if (opts == null ? void 0 : opts.data) {
16770
16853
  scriptParams.data = opts.data;
@@ -17561,7 +17644,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
17561
17644
  import quarterOfYear from "dayjs/plugin/quarterOfYear";
17562
17645
  import weekOfYear from "dayjs/plugin/weekOfYear";
17563
17646
  import isoWeek from "dayjs/plugin/isoWeek";
17564
- import { clone as clone13, isNil as isNil17, mergeDeepRight } from "ramda";
17647
+ import { clone as clone13, isNil as isNil18, mergeDeepRight } from "ramda";
17565
17648
  dayjs3.extend(minMax);
17566
17649
  dayjs3.extend(isSameOrBefore);
17567
17650
  dayjs3.extend(quarterOfYear);
@@ -17650,10 +17733,10 @@ var BaseSeriesGenerator = class {
17650
17733
  * @return {*} {(string | undefined)}
17651
17734
  */
17652
17735
  translateVal(codeListKey, val, isExclude = false) {
17653
- if (isNil17(val)) {
17736
+ if (isNil18(val)) {
17654
17737
  return void 0;
17655
17738
  }
17656
- if (isNil17(codeListKey)) {
17739
+ if (isNil18(codeListKey)) {
17657
17740
  return val;
17658
17741
  }
17659
17742
  const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
@@ -17683,7 +17766,7 @@ var BaseSeriesGenerator = class {
17683
17766
  seriesCodeListId,
17684
17767
  item[this.groupField]
17685
17768
  );
17686
- if (isNil17(groupVal)) {
17769
+ if (isNil18(groupVal)) {
17687
17770
  return;
17688
17771
  }
17689
17772
  group = groupVal;
@@ -20886,6 +20969,7 @@ var PortletPartController = class {
20886
20969
  await this.onInit();
20887
20970
  }
20888
20971
  async onInit() {
20972
+ this.onDataChange = this.onDataChange.bind(this);
20889
20973
  const { layoutPos, sysCss } = this.model;
20890
20974
  if (layoutPos) {
20891
20975
  const { width, height } = calcLayoutHeightWidth(this.model);
@@ -21029,7 +21113,7 @@ var MenuPortletController = class extends PortletPartController {
21029
21113
 
21030
21114
  // src/controller/control/data-view/data-view.controller.ts
21031
21115
  import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
21032
- import { isNil as isNil18 } from "ramda";
21116
+ import { isNil as isNil19 } from "ramda";
21033
21117
 
21034
21118
  // src/controller/control/data-view/data-view.service.ts
21035
21119
  var DataViewControlService = class extends MDControlService {
@@ -21311,7 +21395,7 @@ var DataViewControlController = class extends MDControlController {
21311
21395
  const groupMap = /* @__PURE__ */ new Map();
21312
21396
  items.forEach((item) => {
21313
21397
  const groupVal = item[groupAppDEFieldId];
21314
- if (isNil18(groupVal)) {
21398
+ if (isNil19(groupVal)) {
21315
21399
  return;
21316
21400
  }
21317
21401
  if (!groupMap.has(groupVal)) {
@@ -22340,14 +22424,21 @@ var SearchFormController = class extends FormController {
22340
22424
  return this.data;
22341
22425
  }
22342
22426
  /**
22343
- * 获取搜索表单的视图过滤参数
22427
+ * 获取搜索表单的过滤参数
22344
22428
  *
22345
22429
  * @author lxm
22346
22430
  * @date 2022-09-22 17:09:21
22347
22431
  * @returns {*} {IParams}
22348
22432
  */
22349
- getParams() {
22350
- return { ...this.data.getOrigin() };
22433
+ getFilterParams() {
22434
+ const filterParams = {};
22435
+ Object.keys(this.state.data).forEach((key) => {
22436
+ const value = this.state.data[key];
22437
+ if (value !== null && value !== void 0 && value !== "") {
22438
+ filterParams[key] = value;
22439
+ }
22440
+ });
22441
+ return filterParams;
22351
22442
  }
22352
22443
  /**
22353
22444
  * 执行搜索行为
@@ -23058,8 +23149,8 @@ var FormItemController = class extends FormDetailController {
23058
23149
  * 值规则
23059
23150
  *
23060
23151
  * @author lxm
23061
- * @date 2022-09-01 22:09:49
23062
- * @type {IData}
23152
+ * @date 2023-10-18 03:39:23
23153
+ * @type {IData[]}
23063
23154
  */
23064
23155
  this.rules = [];
23065
23156
  this.context = form.context;
@@ -23165,15 +23256,22 @@ var FormItemController = class extends FormDetailController {
23165
23256
  * @returns {*}
23166
23257
  */
23167
23258
  async initRules() {
23259
+ this.rules = [];
23168
23260
  const formItemsVRs = filterValueRules(
23169
23261
  this.form.model.deformItemVRs || [],
23170
23262
  this.name
23171
23263
  );
23172
- if (!formItemsVRs) {
23173
- return;
23264
+ if (formItemsVRs) {
23265
+ this.rules.push(
23266
+ ...generateRules(formItemsVRs, this.name, this.valueItemName)
23267
+ );
23268
+ }
23269
+ if (this.model.editor) {
23270
+ this.rules.push(...generateEditorRules(this.model.editor));
23271
+ }
23272
+ if (this.rules.length > 0) {
23273
+ this.validator = new Schema({ [this.name]: this.rules });
23174
23274
  }
23175
- this.rules = generateRules(formItemsVRs, this.name, this.valueItemName);
23176
- this.validator = new Schema({ [this.name]: this.rules });
23177
23275
  }
23178
23276
  /**
23179
23277
  * 计算启用条件的禁用
@@ -26089,7 +26187,7 @@ var GridController = class extends MDControlController {
26089
26187
  // src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
26090
26188
  import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
26091
26189
  import dayjs4 from "dayjs";
26092
- import { clone as clone19, isNil as isNil19 } from "ramda";
26190
+ import { clone as clone19, isNil as isNil20 } from "ramda";
26093
26191
  var GridFieldColumnController = class extends GridColumnController {
26094
26192
  constructor() {
26095
26193
  super(...arguments);
@@ -26259,7 +26357,7 @@ var GridFieldColumnController = class extends GridColumnController {
26259
26357
  return;
26260
26358
  }
26261
26359
  const fieldName = aggField || this.model.id;
26262
- items = items.filter((item) => !isNil19(item[fieldName]));
26360
+ items = items.filter((item) => !isNil20(item[fieldName]));
26263
26361
  let aggValue;
26264
26362
  if (this.grid.model.aggMode === "PAGE") {
26265
26363
  switch (aggMode) {
@@ -26387,8 +26485,8 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
26387
26485
  * 值规则
26388
26486
  *
26389
26487
  * @author lxm
26390
- * @date 2022-09-01 22:09:49
26391
- * @type {IData}
26488
+ * @date 2023-10-18 03:39:40
26489
+ * @type {IData[]}
26392
26490
  */
26393
26491
  this.rules = [];
26394
26492
  }
@@ -26468,19 +26566,22 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
26468
26566
  * @returns {*}
26469
26567
  */
26470
26568
  async initRules() {
26569
+ this.rules = [];
26471
26570
  const editItemsVRs = filterValueRules(
26472
26571
  this.grid.model.degridEditItemVRs || [],
26473
26572
  this.fieldName
26474
26573
  );
26475
- if (!editItemsVRs) {
26476
- return;
26574
+ if (editItemsVRs) {
26575
+ this.rules.push(
26576
+ ...generateRules(editItemsVRs, this.fieldName, this.valueItemName)
26577
+ );
26578
+ }
26579
+ if (this.editItem.editor) {
26580
+ this.rules.push(...generateEditorRules(this.editItem.editor));
26581
+ }
26582
+ if (this.rules.length > 0) {
26583
+ this.validator = new Schema2({ [this.fieldName]: this.rules });
26477
26584
  }
26478
- this.rules = generateRules(
26479
- editItemsVRs,
26480
- this.fieldName,
26481
- this.valueItemName
26482
- );
26483
- this.validator = new Schema2({ [this.fieldName]: this.rules });
26484
26585
  }
26485
26586
  /**
26486
26587
  * 设置行属性的值
@@ -27558,45 +27659,116 @@ var PickupViewPanelController = class extends ControlController {
27558
27659
  }
27559
27660
  };
27560
27661
 
27662
+ // src/controller/control/search-bar/search-bar.controller.ts
27663
+ import { recursiveIterate as recursiveIterate6 } from "@ibiz-template/core";
27664
+ import { isNil as isNil21 } from "ramda";
27665
+
27666
+ // src/controller/control/search-bar/search-bar-filter.controller.ts
27667
+ import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
27668
+ var SearchBarFilterController = class {
27669
+ constructor(model, searchBar) {
27670
+ this.model = model;
27671
+ this.searchBar = searchBar;
27672
+ var _a;
27673
+ let field;
27674
+ if (model.appDEFieldId) {
27675
+ field = findFieldById(searchBar.appDataEntity, model.appDEFieldId);
27676
+ }
27677
+ this.fieldName = field ? field.codeName.toLowerCase() : model.id;
27678
+ this.label = model.caption || (field == null ? void 0 : field.logicName) || model.id;
27679
+ this.valueOP = (_a = model.defsearchMode) == null ? void 0 : _a.valueOP;
27680
+ }
27681
+ get context() {
27682
+ return this.searchBar.context;
27683
+ }
27684
+ get params() {
27685
+ return this.searchBar.params;
27686
+ }
27687
+ /**
27688
+ * 初始化
27689
+ * @author lxm
27690
+ * @date 2023-10-12 05:47:19
27691
+ * @return {*} {Promise<void>}
27692
+ */
27693
+ async init() {
27694
+ if (!this.model.editor) {
27695
+ throw new RuntimeModelError55(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
27696
+ }
27697
+ this.editorProvider = await getEditorProvider(this.model.editor);
27698
+ if (this.editorProvider) {
27699
+ this.editor = await this.editorProvider.createController(
27700
+ this.model.editor,
27701
+ this
27702
+ );
27703
+ }
27704
+ }
27705
+ };
27706
+
27561
27707
  // src/controller/control/search-bar/search-bar.controller.ts
27562
27708
  var SearchBarController = class extends ControlController {
27563
27709
  constructor() {
27564
27710
  super(...arguments);
27565
27711
  /**
27566
- * 占位符
27712
+ * 快速搜索占位符
27567
27713
  * @return {*}
27568
27714
  * @author: zhujiamin
27569
27715
  * @Date: 2023-08-11 14:13:10
27570
27716
  */
27571
27717
  this.placeHolder = "";
27718
+ /**
27719
+ * 过滤项控制器集合
27720
+ * @author lxm
27721
+ * @date 2023-10-13 03:31:26
27722
+ * @type {SearchBarFilterController[]}
27723
+ */
27724
+ this.filterControllers = [];
27572
27725
  }
27573
27726
  initState() {
27574
27727
  super.initState();
27575
27728
  this.state.query = "";
27576
27729
  this.state.selectedGroupItem = null;
27577
27730
  this.state.visible = !!(this.model.enableQuickSearch || this.model.enableGroup || this.model.enableFilter);
27731
+ if (this.model.enableFilter) {
27732
+ this.resetFilter();
27733
+ }
27578
27734
  }
27579
27735
  async onCreated() {
27580
- var _a;
27581
27736
  await super.onCreated();
27582
27737
  const appDataEntity = await ibiz.hub.getAppDataEntity(
27583
27738
  this.model.appDataEntityId,
27584
27739
  this.context.srfappid
27585
27740
  );
27586
27741
  if (appDataEntity) {
27587
- const searchFields = (_a = appDataEntity.appDEFields) == null ? void 0 : _a.filter((field) => {
27588
- return field.enableQuickSearch;
27589
- });
27742
+ this.appDataEntity = appDataEntity;
27743
+ this.calcQuickSearchPlaceholder();
27744
+ }
27745
+ await this.initSearchBarFilters();
27746
+ }
27747
+ /**
27748
+ * 计算快速搜索的占位
27749
+ * @author lxm
27750
+ * @date 2023-10-16 03:49:47
27751
+ * @protected
27752
+ * @return {*} {void}
27753
+ */
27754
+ calcQuickSearchPlaceholder() {
27755
+ if (!this.appDataEntity) {
27756
+ return;
27757
+ }
27758
+ const searchFields = this.appDataEntity.appDEFields.filter((field) => {
27759
+ return field.enableQuickSearch;
27760
+ });
27761
+ if (searchFields.length) {
27590
27762
  const placeHolders = [];
27591
- searchFields == null ? void 0 : searchFields.forEach((searchField) => {
27592
- if ((searchField == null ? void 0 : searchField.lnlanguageRes) && searchField.lnlanguageRes.lanResTag) {
27763
+ searchFields.forEach((searchField) => {
27764
+ if (searchField.lnlanguageRes && searchField.lnlanguageRes.lanResTag) {
27593
27765
  placeHolders.push(
27594
27766
  ibiz.i18n.t(
27595
27767
  searchField.lnlanguageRes.lanResTag,
27596
27768
  searchField.logicName
27597
27769
  )
27598
27770
  );
27599
- } else if (searchField == null ? void 0 : searchField.logicName) {
27771
+ } else if (searchField.logicName) {
27600
27772
  placeHolders.push(searchField.logicName);
27601
27773
  }
27602
27774
  });
@@ -27621,9 +27793,114 @@ var SearchBarController = class extends ControlController {
27621
27793
  * @author: zhujiamin
27622
27794
  * @Date: 2023-06-01 18:08:18
27623
27795
  */
27624
- handleSearch() {
27796
+ onSearch() {
27625
27797
  this.evt.emit("onSearch", void 0);
27626
27798
  }
27799
+ /**
27800
+ * 获取搜索栏的过滤参数(包括快速搜索,快速分组和过滤器的参数)
27801
+ * @author lxm
27802
+ * @date 2023-10-16 03:54:07
27803
+ * @return {*} {IParams}
27804
+ */
27805
+ getFilterParams() {
27806
+ var _a;
27807
+ const params = {};
27808
+ if (this.state.query) {
27809
+ params.query = this.state.query;
27810
+ }
27811
+ if ((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) {
27812
+ const func = new Function(
27813
+ "return (".concat(this.state.selectedGroupItem.data, ");")
27814
+ );
27815
+ const addParams = func();
27816
+ Object.assign(params, addParams);
27817
+ }
27818
+ const filters = this.calcFilters();
27819
+ if (filters) {
27820
+ params.filters = filters;
27821
+ }
27822
+ return params;
27823
+ }
27824
+ /**
27825
+ * 重置过滤器
27826
+ * @author lxm
27827
+ * @date 2023-10-16 03:52:44
27828
+ */
27829
+ resetFilter() {
27830
+ this.state.filterNodes = [
27831
+ {
27832
+ leaf: false,
27833
+ logicType: "AND",
27834
+ children: [{ leaf: true, field: null, valueOP: null, value: null }]
27835
+ }
27836
+ ];
27837
+ }
27838
+ /**
27839
+ * 初始化过滤项控制器
27840
+ * @author lxm
27841
+ * @date 2023-10-13 03:33:17
27842
+ * @protected
27843
+ * @return {*} {Promise<void>}
27844
+ */
27845
+ async initSearchBarFilters() {
27846
+ var _a;
27847
+ if ((_a = this.model.searchBarFilters) == null ? void 0 : _a.length) {
27848
+ this.model.searchBarFilters.forEach((item) => {
27849
+ const filterController = new SearchBarFilterController(item, this);
27850
+ this.filterControllers.push(filterController);
27851
+ });
27852
+ await Promise.all(
27853
+ this.filterControllers.map((controller) => controller.init())
27854
+ );
27855
+ }
27856
+ }
27857
+ /**
27858
+ * 计算过滤项参数
27859
+ * @author lxm
27860
+ * @date 2023-10-13 05:53:35
27861
+ * @return {*} {IData}
27862
+ */
27863
+ calcFilters() {
27864
+ if (!this.model.enableFilter) {
27865
+ return;
27866
+ }
27867
+ let hasFilter = false;
27868
+ let hasError = false;
27869
+ recursiveIterate6(this.state.filterNodes[0], (node) => {
27870
+ if (node.leaf) {
27871
+ if (node.field && node.valueOP && !isNil21(node.value)) {
27872
+ hasFilter = true;
27873
+ } else {
27874
+ hasError = true;
27875
+ }
27876
+ }
27877
+ });
27878
+ if (hasFilter && !hasError) {
27879
+ const filter = this.formatFilters(this.state.filterNodes[0]);
27880
+ return filter;
27881
+ }
27882
+ }
27883
+ /**
27884
+ * 格式化过滤项
27885
+ * @author lxm
27886
+ * @date 2023-10-16 03:45:41
27887
+ * @param {IFilterNode} node
27888
+ * @return {*} {IData}
27889
+ */
27890
+ formatFilters(node) {
27891
+ if (!node.leaf) {
27892
+ return {
27893
+ ["$".concat(node.logicType.toLowerCase())]: node.children.map(
27894
+ (item) => this.formatFilters(item)
27895
+ )
27896
+ };
27897
+ }
27898
+ return {
27899
+ ["".concat(node.field)]: {
27900
+ ["$".concat(node.valueOP.toLowerCase())]: node.value
27901
+ }
27902
+ };
27903
+ }
27627
27904
  };
27628
27905
 
27629
27906
  // src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
@@ -27849,7 +28126,7 @@ var TabExpPanelController = class extends ControlController {
27849
28126
  };
27850
28127
 
27851
28128
  // src/controller/control/tree/tree.controller.ts
27852
- import { recursiveIterate as recursiveIterate6 } from "@ibiz-template/core";
28129
+ import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
27853
28130
 
27854
28131
  // src/controller/control/tree/tree.service.ts
27855
28132
  import { ModelError as ModelError27 } from "@ibiz-template/core";
@@ -28219,7 +28496,7 @@ var TreeController = class extends MDControlController {
28219
28496
  this.state.rootNodes = nodes;
28220
28497
  }
28221
28498
  this.state.items = [];
28222
- recursiveIterate6(
28499
+ recursiveIterate7(
28223
28500
  { children: this.state.rootNodes },
28224
28501
  (node) => {
28225
28502
  this.state.items.push(node);
@@ -28361,7 +28638,7 @@ var TreeController = class extends MDControlController {
28361
28638
  */
28362
28639
  calcExpandedKeys(nodes) {
28363
28640
  let expandedKeys = [...this.state.expandedKeys];
28364
- recursiveIterate6({ children: nodes }, (node) => {
28641
+ recursiveIterate7({ children: nodes }, (node) => {
28365
28642
  var _a;
28366
28643
  if ((_a = node.children) == null ? void 0 : _a.length) {
28367
28644
  expandedKeys.push(node.id);
@@ -28702,6 +28979,10 @@ var WizardPanelController = class extends ControlController {
28702
28979
  }
28703
28980
  };
28704
28981
 
28982
+ // src/controller/control/md-ctrl/md-ctrl.controller.ts
28983
+ import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
28984
+ import { isNil as isNil22 } from "ramda";
28985
+
28705
28986
  // src/controller/control/md-ctrl/md-ctrl.service.ts
28706
28987
  var MDCtrlService = class extends MDControlService {
28707
28988
  /**
@@ -28812,7 +29093,7 @@ var MDCtrlController = class extends MDControlController {
28812
29093
  async refresh() {
28813
29094
  await this.load({ isInitialLoad: true });
28814
29095
  }
28815
- afterLoad(args, items) {
29096
+ async afterLoad(args, items) {
28816
29097
  if (args.isInitialLoad) {
28817
29098
  this.state.rows = [];
28818
29099
  }
@@ -28825,6 +29106,8 @@ var MDCtrlController = class extends MDControlController {
28825
29106
  })
28826
29107
  );
28827
29108
  }
29109
+ await this.initGroupCodeListItems();
29110
+ await this.handleDataGroup();
28828
29111
  return super.afterLoad(args, items);
28829
29112
  }
28830
29113
  /**
@@ -28833,7 +29116,7 @@ var MDCtrlController = class extends MDControlController {
28833
29116
  * @author zk
28834
29117
  * @date 2023-05-26 02:05:46
28835
29118
  * @param {IData[]} items
28836
- * @memberof ListController
29119
+ * @memberof MDCtrlController
28837
29120
  */
28838
29121
  setData(items) {
28839
29122
  const rows = items.map((item) => {
@@ -28848,7 +29131,7 @@ var MDCtrlController = class extends MDControlController {
28848
29131
  * @author zk
28849
29132
  * @date 2023-05-26 02:05:35
28850
29133
  * @return {*} {IData[]}
28851
- * @memberof ListController
29134
+ * @memberof MDCtrlController
28852
29135
  */
28853
29136
  getAllData() {
28854
29137
  return this.state.rows.map((row) => row.data);
@@ -28911,11 +29194,114 @@ var MDCtrlController = class extends MDControlController {
28911
29194
  containerState.update(row.data.getOrigin());
28912
29195
  row.uaColStates[group.id] = containerState;
28913
29196
  }
29197
+ /**
29198
+ * 处理数据分组
29199
+ *
29200
+ * @memberof MDCtrlController
29201
+ */
29202
+ async handleDataGroup() {
29203
+ const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
29204
+ if (enableGroup && groupMode) {
29205
+ if (!groupAppDEFieldId) {
29206
+ throw new RuntimeModelError56(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
29207
+ }
29208
+ if (groupMode === "AUTO") {
29209
+ this.handleAutoGroup();
29210
+ } else if (groupMode === "CODELIST") {
29211
+ await this.handleCodeListGroup();
29212
+ }
29213
+ }
29214
+ }
29215
+ /**
29216
+ * 处理自动分组
29217
+ *
29218
+ * @memberof MDCtrlController
29219
+ */
29220
+ handleAutoGroup() {
29221
+ const { groupAppDEFieldId } = this.model;
29222
+ if (groupAppDEFieldId) {
29223
+ const { items } = this.state;
29224
+ const groupMap = /* @__PURE__ */ new Map();
29225
+ items.forEach((item) => {
29226
+ const groupVal = item[groupAppDEFieldId];
29227
+ if (isNil22(groupVal)) {
29228
+ return;
29229
+ }
29230
+ if (!groupMap.has(groupVal)) {
29231
+ groupMap.set(groupVal, []);
29232
+ }
29233
+ groupMap.get(groupVal).push(new MobMDCtrlRowState(item, this));
29234
+ });
29235
+ const groups = [];
29236
+ groupMap.forEach((value, key) => {
29237
+ groups.push({
29238
+ caption: key,
29239
+ key,
29240
+ children: [...value]
29241
+ });
29242
+ });
29243
+ this.state.groups = groups;
29244
+ }
29245
+ }
29246
+ /**
29247
+ * 加载并初始化分组代码表项集合
29248
+ * @author lxm
29249
+ * @date 2023-08-29 05:11:39
29250
+ * @protected
29251
+ * @return {*} {Promise<void>}
29252
+ */
29253
+ async initGroupCodeListItems() {
29254
+ const { groupCodeListId } = this.model;
29255
+ if (!groupCodeListId) {
29256
+ return;
29257
+ }
29258
+ const app = ibiz.hub.getApp(this.context.srfappid);
29259
+ this.groupCodeListItems = await app.codeList.get(
29260
+ groupCodeListId,
29261
+ this.context,
29262
+ this.params
29263
+ );
29264
+ }
29265
+ /**
29266
+ * 处理代码表分组
29267
+ *
29268
+ * @memberof MDCtrlController
29269
+ */
29270
+ async handleCodeListGroup() {
29271
+ const { groupAppDEFieldId, groupCodeListId } = this.model;
29272
+ if (!groupCodeListId) {
29273
+ throw new RuntimeModelError56(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
29274
+ }
29275
+ const { items } = this.state;
29276
+ const groupMap = /* @__PURE__ */ new Map();
29277
+ this.groupCodeListItems.forEach((item) => {
29278
+ groupMap.set(item.value, []);
29279
+ });
29280
+ items.forEach((item) => {
29281
+ const groupVal = item[groupAppDEFieldId];
29282
+ const groupArr = groupMap.get(groupVal);
29283
+ if (groupArr) {
29284
+ groupArr.push(new MobMDCtrlRowState(item, this));
29285
+ }
29286
+ });
29287
+ const groups = [];
29288
+ groupMap.forEach((arr, key) => {
29289
+ const codeListItem = this.groupCodeListItems.find(
29290
+ (item) => item.value === key
29291
+ );
29292
+ groups.push({
29293
+ caption: codeListItem.text,
29294
+ key: codeListItem.value,
29295
+ children: arr
29296
+ });
29297
+ });
29298
+ this.state.groups = groups;
29299
+ }
28914
29300
  };
28915
29301
 
28916
29302
  // src/controller/control/kanban/kanban.controller.ts
28917
- import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
28918
- import { isNil as isNil20 } from "ramda";
29303
+ import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
29304
+ import { isNil as isNil23 } from "ramda";
28919
29305
 
28920
29306
  // src/controller/control/kanban/kanban.service.ts
28921
29307
  var KanbanService = class extends DataViewControlService {
@@ -28989,15 +29375,15 @@ var KanbanController = class extends DataViewControlController {
28989
29375
  const sortField = this.model.minorSortAppDEFieldId;
28990
29376
  const { minorSortDir } = this.model;
28991
29377
  if (!sortField) {
28992
- throw new RuntimeModelError55(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
29378
+ throw new RuntimeModelError57(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
28993
29379
  }
28994
29380
  if (!minorSortDir) {
28995
- throw new RuntimeModelError55(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
29381
+ throw new RuntimeModelError57(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
28996
29382
  }
28997
29383
  const isAsc = minorSortDir === "ASC";
28998
29384
  items.forEach((item) => {
28999
29385
  const sortValue = item[sortField];
29000
- if (isNil20(sortValue)) {
29386
+ if (isNil23(sortValue)) {
29001
29387
  item[sortField] = 0;
29002
29388
  } else {
29003
29389
  const toNum = Number(sortValue);
@@ -29142,7 +29528,7 @@ var KanbanController = class extends DataViewControlController {
29142
29528
  };
29143
29529
 
29144
29530
  // src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
29145
- import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
29531
+ import { recursiveIterate as recursiveIterate8 } from "@ibiz-template/core";
29146
29532
 
29147
29533
  // src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
29148
29534
  import { isArray as isArray6 } from "qx-util";
@@ -29382,7 +29768,7 @@ var TreeGridExController = class extends MDControlController {
29382
29768
  * @memberof TreeGridExController
29383
29769
  */
29384
29770
  initColumnStates() {
29385
- recursiveIterate7(
29771
+ recursiveIterate8(
29386
29772
  this.model,
29387
29773
  (column) => {
29388
29774
  if (column.columnType !== "GROUPGRIDCOLUMN") {
@@ -29470,7 +29856,7 @@ var TreeGridExController = class extends MDControlController {
29470
29856
  this.state.rootNodes = nodes;
29471
29857
  }
29472
29858
  this.state.items = [];
29473
- recursiveIterate7(
29859
+ recursiveIterate8(
29474
29860
  { children: this.state.rootNodes },
29475
29861
  (node) => {
29476
29862
  this.state.items.push(node);
@@ -29489,7 +29875,7 @@ var TreeGridExController = class extends MDControlController {
29489
29875
  */
29490
29876
  calcExpandedKeys(nodes) {
29491
29877
  let expandedKeys = [];
29492
- recursiveIterate7({ children: nodes }, (node) => {
29878
+ recursiveIterate8({ children: nodes }, (node) => {
29493
29879
  var _a;
29494
29880
  if ((_a = node.children) == null ? void 0 : _a.length) {
29495
29881
  expandedKeys.push(node.id);
@@ -29511,6 +29897,308 @@ var TreeGridController = class extends GridController {
29511
29897
  var TreeGridService = class extends GridService {
29512
29898
  };
29513
29899
 
29900
+ // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
29901
+ import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
29902
+ import { createUUID as createUUID5 } from "qx-util";
29903
+
29904
+ // src/controller/control/medit-view-panel/medit-view-panel.service.ts
29905
+ var MEditViewPanelService = class extends MDControlService {
29906
+ };
29907
+
29908
+ // src/controller/control/medit-view-panel/medit-view-panel.controller.ts
29909
+ var MEditViewPanelController = class extends MDControlController {
29910
+ constructor() {
29911
+ super(...arguments);
29912
+ /**
29913
+ * 是否显示底部按钮
29914
+ *
29915
+ */
29916
+ this.showButton = true;
29917
+ /**
29918
+ * 关系实体参数对象
29919
+ *
29920
+ */
29921
+ this.deResParameters = [];
29922
+ /**
29923
+ * 当前应用视图参数对象
29924
+ *
29925
+ */
29926
+ this.parameters = [];
29927
+ }
29928
+ async onCreated() {
29929
+ await super.onCreated();
29930
+ this.service = new MEditViewPanelService(this.model);
29931
+ await this.service.init(this.context);
29932
+ await this.initParameters();
29933
+ }
29934
+ initState() {
29935
+ super.initState();
29936
+ this.state.panelUiItems = [];
29937
+ this.state.activeTab = "";
29938
+ this.state.size = 1e3;
29939
+ }
29940
+ /**
29941
+ * 格式化视图关系参数
29942
+ *
29943
+ * @param {IContext} context 应用上下文数据
29944
+ * @param {IAppDERS[][]} appDERSPaths 关系路径数据
29945
+ */
29946
+ async formatAppDERSPath(context, appDERSPaths) {
29947
+ var _a, _b;
29948
+ if (!appDERSPaths || appDERSPaths.length === 0) {
29949
+ return [];
29950
+ }
29951
+ let counter = 0;
29952
+ for (const appDERSPath of appDERSPaths) {
29953
+ const tempData = { isInclude: true, data: [] };
29954
+ for (const singleAppDERSPath of appDERSPath) {
29955
+ const majorPSAppDataEntity = await ibiz.hub.getAppDataEntity(
29956
+ singleAppDERSPath.majorAppDataEntityId
29957
+ );
29958
+ if (majorPSAppDataEntity && majorPSAppDataEntity.codeName) {
29959
+ tempData.isInclude = context[majorPSAppDataEntity.codeName.toLowerCase()] && tempData.isInclude;
29960
+ tempData.data.push({
29961
+ parameterName: (_a = majorPSAppDataEntity.keyAppDEFieldId) == null ? void 0 : _a.toLowerCase(),
29962
+ pathName: (_b = majorPSAppDataEntity.codeName) == null ? void 0 : _b.toLowerCase()
29963
+ });
29964
+ }
29965
+ }
29966
+ counter++;
29967
+ if (tempData.isInclude) {
29968
+ return tempData.data;
29969
+ }
29970
+ if (counter === appDERSPaths.length) {
29971
+ return [];
29972
+ }
29973
+ }
29974
+ return [];
29975
+ }
29976
+ /**
29977
+ * 初始化嵌入应用视图及实体参数对象
29978
+ * @return {*}
29979
+ * @author: zhujiamin
29980
+ * @Date: 2023-10-16 13:56:56
29981
+ */
29982
+ async initParameters() {
29983
+ var _a, _b;
29984
+ if (this.controlParams.SHOWBUTTON) {
29985
+ this.showButton = !Object.is(this.controlParams.SHOWBUTTON, "false");
29986
+ }
29987
+ if (this.model.embeddedAppViewId) {
29988
+ const embedView = await ibiz.hub.getAppView(this.model.embeddedAppViewId);
29989
+ if (embedView.appDataEntityId) {
29990
+ const embedViewEntity = await ibiz.hub.getAppDataEntity(
29991
+ embedView.appDataEntityId
29992
+ );
29993
+ if (embedView && embedViewEntity) {
29994
+ this.deResParameters = await this.formatAppDERSPath(
29995
+ this.context,
29996
+ embedView.appDERSPaths
29997
+ );
29998
+ this.parameters = [
29999
+ {
30000
+ parameterName: (_a = embedViewEntity.keyAppDEFieldId) == null ? void 0 : _a.toLowerCase(),
30001
+ pathName: (_b = embedViewEntity.codeName) == null ? void 0 : _b.toLowerCase()
30002
+ }
30003
+ ];
30004
+ } else {
30005
+ this.deResParameters = [];
30006
+ this.parameters = [];
30007
+ }
30008
+ }
30009
+ }
30010
+ }
30011
+ /**
30012
+ * 部件加载后处理
30013
+ *
30014
+ * @author chitanda
30015
+ * @date 2023-06-21 15:06:44
30016
+ * @param {MDCtrlLoadParams} args 本次请求参数
30017
+ * @param {IData[]} items 上游处理的数据(默认是后台数据)
30018
+ * @return {*} {Promise<IData[]>} 返回给后续处理的数据
30019
+ */
30020
+ async afterLoad(args, items) {
30021
+ await super.afterLoad(args, items);
30022
+ this.state.panelUiItems = [];
30023
+ this.doItems(items);
30024
+ if (this.model.panelStyle === "TAB_TOP" && this.state.panelUiItems.length > 0) {
30025
+ this.state.activeTab = this.state.panelUiItems[0].id;
30026
+ }
30027
+ return items;
30028
+ }
30029
+ /**
30030
+ * 处理UI所需数据
30031
+ * @param {ControlVO} arg
30032
+ * @return {*}
30033
+ * @author: zhujiamin
30034
+ * @Date: 2023-10-16 17:55:31
30035
+ */
30036
+ handlePanelItemParams(arg) {
30037
+ const [{ parameterName }] = this.parameters;
30038
+ const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID5());
30039
+ const item = { id, context: {}, params: {}, data: arg, srfmajortext: "" };
30040
+ Object.assign(item.context, this.context);
30041
+ this.deResParameters.forEach((deResParameter) => {
30042
+ const { parameterName: parameterName2, pathName } = deResParameter;
30043
+ if (this.context[parameterName2] && !Object.is(this.context[parameterName2], "")) {
30044
+ Object.assign(item.context, {
30045
+ [pathName]: this.context[parameterName2]
30046
+ });
30047
+ } else if (arg[parameterName2] && !Object.is(arg[parameterName2], "")) {
30048
+ Object.assign(item.context, {
30049
+ [pathName]: arg[parameterName2]
30050
+ });
30051
+ }
30052
+ });
30053
+ this.parameters.forEach((parameter) => {
30054
+ const { parameterName: parameterName2, pathName } = parameter;
30055
+ if (arg[parameterName2] && !Object.is(arg[parameterName2], "")) {
30056
+ Object.assign(item.context, {
30057
+ [pathName]: arg[parameterName2]
30058
+ });
30059
+ }
30060
+ if (arg.srfmajortext && !Object.is(arg.srfmajortext, "")) {
30061
+ Object.assign(item, { srfmajortext: arg.srfmajortext });
30062
+ } else if (arg.srfuf === 0) {
30063
+ Object.assign(item, { srfmajortext: "\u8349\u7A3F--\u65B0\u5EFA" });
30064
+ }
30065
+ });
30066
+ Object.assign(item.params, this.params);
30067
+ return item;
30068
+ }
30069
+ /**
30070
+ * 处理数据
30071
+ * @param {ControlVO} datas
30072
+ * @return {*}
30073
+ * @author: zhujiamin
30074
+ * @Date: 2023-10-16 15:00:02
30075
+ */
30076
+ doItems(datas) {
30077
+ datas.forEach((arg) => {
30078
+ const item = this.handlePanelItemParams(arg);
30079
+ this.state.panelUiItems.push(item);
30080
+ });
30081
+ }
30082
+ /**
30083
+ * 处理添加
30084
+ * @return {*}
30085
+ * @author: zhujiamin
30086
+ * @Date: 2023-10-16 15:18:01
30087
+ */
30088
+ async handleAdd() {
30089
+ this.doItems([{ srfuf: 0 }]);
30090
+ if (this.model.panelStyle === "TAB_TOP") {
30091
+ this.state.activeTab = this.state.panelUiItems[this.state.panelUiItems.length - 1].id;
30092
+ }
30093
+ }
30094
+ /**
30095
+ * 处理删除
30096
+ * @param {IPanelUiItem} item
30097
+ * @return {*}
30098
+ * @author: zhujiamin
30099
+ * @Date: 2023-10-16 15:23:59
30100
+ */
30101
+ async handleDelete(item) {
30102
+ if (item.data.srfuf === 0) {
30103
+ const index = this.state.panelUiItems.findIndex((value) => {
30104
+ return value === item;
30105
+ });
30106
+ this.state.panelUiItems.splice(index, 1);
30107
+ } else {
30108
+ await this.remove({ data: [item.data] });
30109
+ }
30110
+ }
30111
+ /**
30112
+ * 处理tab删除
30113
+ * @param {IPanelUiItem} item
30114
+ * @return {*}
30115
+ * @author: zhujiamin
30116
+ * @Date: 2023-10-17 14:21:57
30117
+ */
30118
+ async handleTabDelete(item, index) {
30119
+ let isBackToEnd = false;
30120
+ if (item.id === this.state.activeTab && index === this.state.panelUiItems.length - 1) {
30121
+ if (index > 0) {
30122
+ isBackToEnd = true;
30123
+ }
30124
+ }
30125
+ await this.handleDelete(item);
30126
+ if (isBackToEnd) {
30127
+ this.state.activeTab = this.state.panelUiItems[this.state.panelUiItems.length - 1].id;
30128
+ }
30129
+ }
30130
+ /**
30131
+ * 后台删除结束后界面删除逻辑
30132
+ *
30133
+ * @author lxm
30134
+ * @date 2022-09-06 19:09:10
30135
+ * @param {IData} data
30136
+ */
30137
+ afterRemove(data) {
30138
+ super.afterRemove(data);
30139
+ const index = this.state.panelUiItems.findIndex(
30140
+ (item) => item.data.srfkey === data.srfkey
30141
+ );
30142
+ if (index !== -1) {
30143
+ this.state.panelUiItems.splice(index, 1);
30144
+ }
30145
+ }
30146
+ /**
30147
+ * 视图数据变化
30148
+ * @param {DataChangeEvent} args
30149
+ * @return {*}
30150
+ * @author: zhujiamin
30151
+ * @Date: 2023-10-16 17:20:45
30152
+ */
30153
+ onViewDataChange(args, id) {
30154
+ if (args.eventName === "onSaveSuccess") {
30155
+ this.save(args.data[0], id);
30156
+ }
30157
+ }
30158
+ /**
30159
+ * 保存
30160
+ *
30161
+ * @param {ControlVO} data
30162
+ * @returns {*} {Promise<void>}
30163
+ */
30164
+ async save(data, id) {
30165
+ const panelUiItemIndex = this.state.panelUiItems.findIndex(
30166
+ (item) => item.id === id
30167
+ );
30168
+ if (!panelUiItemIndex) {
30169
+ throw new RuntimeError49("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
30170
+ }
30171
+ await this.startLoading();
30172
+ let res;
30173
+ const isCreate = data.srfuf === 0 /* CREATE */;
30174
+ const deName = calcDeCodeNameById(this.model.appDataEntityId);
30175
+ const tempContext = this.context.clone();
30176
+ tempContext[deName] = data.srfkey;
30177
+ try {
30178
+ res = isCreate ? await this.service.create(tempContext, data) : await this.service.update(tempContext, data);
30179
+ } catch (error) {
30180
+ await this.evt.emit("onSaveError", void 0);
30181
+ this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "ERROR"), {
30182
+ error,
30183
+ data: this.state.panelUiItems[panelUiItemIndex].data
30184
+ });
30185
+ throw error;
30186
+ } finally {
30187
+ await this.endLoading();
30188
+ }
30189
+ const index = this.state.items.findIndex(
30190
+ (item) => item.srfkey === data.srfkey
30191
+ );
30192
+ this.state.items.splice(index, 1, res.data);
30193
+ this.state.panelUiItems.splice(
30194
+ panelUiItemIndex,
30195
+ 1,
30196
+ this.handlePanelItemParams(res.data)
30197
+ );
30198
+ await this.evt.emit("onSaveSuccess", void 0);
30199
+ }
30200
+ };
30201
+
29514
30202
  // src/controller/hub.controller.ts
29515
30203
  var HubController = class {
29516
30204
  constructor() {
@@ -29726,7 +30414,7 @@ var AppHub = class {
29726
30414
  this.registerAppView(appView);
29727
30415
  return appView;
29728
30416
  }
29729
- throw new RuntimeError49("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
30417
+ throw new RuntimeError50("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
29730
30418
  }
29731
30419
  /**
29732
30420
  * 根据应用实体代码名称查找应用视图
@@ -29757,7 +30445,7 @@ var AppHub = class {
29757
30445
  this.registerAppDataEntity(entity, appId);
29758
30446
  return entity;
29759
30447
  }
29760
- throw new RuntimeError49("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
30448
+ throw new RuntimeError50("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
29761
30449
  }
29762
30450
  /**
29763
30451
  * 新建 hub 应用
@@ -29778,7 +30466,7 @@ var AppHub = class {
29778
30466
  appModel = await this.modelLoaderProvider.getApp(id);
29779
30467
  this.registerApp(appModel);
29780
30468
  } else {
29781
- throw new RuntimeError49("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
30469
+ throw new RuntimeError50("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
29782
30470
  }
29783
30471
  const app = new Application(appModel);
29784
30472
  this.appMap.set(id, app);
@@ -29876,7 +30564,7 @@ var EngineFactory = class {
29876
30564
  };
29877
30565
 
29878
30566
  // src/engine/view-base.engine.ts
29879
- import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
30567
+ import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
29880
30568
  var ViewEngineBase = class {
29881
30569
  /**
29882
30570
  * 构造函数在视图控制器的构造函数逻辑内部执行
@@ -30064,7 +30752,7 @@ var ViewEngineBase = class {
30064
30752
  const { appDataEntityId } = this.view.model;
30065
30753
  const { evt, context, params } = this.view;
30066
30754
  if (!appDataEntityId) {
30067
- throw new RuntimeError50("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
30755
+ throw new RuntimeError51("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
30068
30756
  }
30069
30757
  const app = ibiz.hub.getApp(context.srfappid);
30070
30758
  const res = await app.deService.exec(
@@ -30085,7 +30773,7 @@ var ViewEngineBase = class {
30085
30773
  };
30086
30774
 
30087
30775
  // src/engine/md-view.engine.ts
30088
- import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
30776
+ import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
30089
30777
  import { clone as clone20 } from "ramda";
30090
30778
  var MDViewEngine = class extends ViewEngineBase {
30091
30779
  /**
@@ -30281,7 +30969,7 @@ var MDViewEngine = class extends ViewEngineBase {
30281
30969
  (item) => item.id === "newdata"
30282
30970
  );
30283
30971
  if (!openAppViewLogic) {
30284
- throw new RuntimeModelError56(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30972
+ throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30285
30973
  }
30286
30974
  const params = clone20(this.view.params);
30287
30975
  if (copyMode) {
@@ -30297,7 +30985,7 @@ var MDViewEngine = class extends ViewEngineBase {
30297
30985
  if (result instanceof Object && result.ok) {
30298
30986
  this.refresh();
30299
30987
  } else if (result === -1) {
30300
- throw new RuntimeModelError56(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30988
+ throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
30301
30989
  }
30302
30990
  }
30303
30991
  /**
@@ -30344,35 +31032,12 @@ var MDViewEngine = class extends ViewEngineBase {
30344
31032
  * @return {*} {IParams}
30345
31033
  */
30346
31034
  getSearchParams() {
30347
- var _a;
30348
31035
  const params = {};
30349
31036
  if (this.searchForm) {
30350
- const addParams = this.searchForm.getData()[0];
30351
- const filteredParams = Object.entries(addParams).reduce(
30352
- (result, [key, value]) => {
30353
- if (value !== null && value !== void 0 && value !== "") {
30354
- result[key] = value;
30355
- }
30356
- return result;
30357
- },
30358
- {}
30359
- );
30360
- Object.assign(params, filteredParams);
31037
+ Object.assign(params, this.searchForm.getFilterParams());
30361
31038
  }
30362
31039
  if (this.searchBar) {
30363
- if (this.searchBar.state.query) {
30364
- const addParams = {
30365
- query: this.searchBar.state.query
30366
- };
30367
- Object.assign(params, addParams);
30368
- }
30369
- if ((_a = this.searchBar.state.selectedGroupItem) == null ? void 0 : _a.data) {
30370
- const func = new Function(
30371
- "return (".concat(this.searchBar.state.selectedGroupItem.data, ");")
30372
- );
30373
- const addParams = func();
30374
- Object.assign(params, addParams);
30375
- }
31040
+ Object.assign(params, this.searchBar.getFilterParams());
30376
31041
  }
30377
31042
  return params;
30378
31043
  }
@@ -30435,15 +31100,15 @@ var MDViewEngine = class extends ViewEngineBase {
30435
31100
 
30436
31101
  // src/utils/error-handler/default-error-handler.ts
30437
31102
  import {
30438
- RuntimeModelError as RuntimeModelError57,
31103
+ RuntimeModelError as RuntimeModelError59,
30439
31104
  ModelError as ModelError28,
30440
31105
  HttpError as HttpError4,
30441
31106
  NoticeError as NoticeError2,
30442
- RuntimeError as RuntimeError51
31107
+ RuntimeError as RuntimeError52
30443
31108
  } from "@ibiz-template/core";
30444
31109
  var DefaultErrorHandler = class {
30445
31110
  handle(error) {
30446
- if (error instanceof RuntimeModelError57 || error instanceof ModelError28) {
31111
+ if (error instanceof RuntimeModelError59 || error instanceof ModelError28) {
30447
31112
  ibiz.message.error(error.message, 10, true);
30448
31113
  } else if (error instanceof HttpError4) {
30449
31114
  if (error.status === 401) {
@@ -30457,7 +31122,7 @@ var DefaultErrorHandler = class {
30457
31122
  }
30458
31123
  } else if (error instanceof NoticeError2) {
30459
31124
  ibiz.message.error(error.message, error.duration, error.duration === 0);
30460
- } else if (error instanceof RuntimeError51) {
31125
+ } else if (error instanceof RuntimeError52) {
30461
31126
  ibiz.message.error(error.message, 10, true);
30462
31127
  }
30463
31128
  ibiz.log.error(error);
@@ -30585,7 +31250,7 @@ var GlobalUtil = class {
30585
31250
  };
30586
31251
 
30587
31252
  // src/logic-scheduler/executor/logic-executor.ts
30588
- import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
31253
+ import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
30589
31254
  var LogicExecutor = class {
30590
31255
  /**
30591
31256
  * @author lxm
@@ -30606,7 +31271,7 @@ var LogicExecutor = class {
30606
31271
  */
30607
31272
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30608
31273
  execute(_executeParams) {
30609
- throw new RuntimeError52("Method not implemented.");
31274
+ throw new RuntimeError53("Method not implemented.");
30610
31275
  }
30611
31276
  /**
30612
31277
  * 销毁方法
@@ -30697,13 +31362,13 @@ var ScriptExecutor = class extends LogicExecutor {
30697
31362
  };
30698
31363
 
30699
31364
  // src/logic-scheduler/executor/app-de-ui-logic-executor.ts
30700
- import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
31365
+ import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
30701
31366
  var AppDEUILogicExecutor = class extends LogicExecutor {
30702
31367
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30703
31368
  execute(executeParams) {
30704
31369
  const { appDEUILogicId, appDataEntityId } = this.logic;
30705
31370
  if (!appDEUILogicId) {
30706
- throw new RuntimeModelError58(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
31371
+ throw new RuntimeModelError60(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
30707
31372
  }
30708
31373
  execUILogic(appDEUILogicId, appDataEntityId, executeParams);
30709
31374
  }
@@ -31043,7 +31708,7 @@ var LogicSchedulerCenter = class {
31043
31708
  };
31044
31709
 
31045
31710
  // src/logic-scheduler/trigger/logic-trigger.ts
31046
- import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
31711
+ import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
31047
31712
  var LogicTrigger = class {
31048
31713
  /**
31049
31714
  * @author lxm
@@ -31103,7 +31768,7 @@ var LogicTrigger = class {
31103
31768
  if (this.executor) {
31104
31769
  return this.executor.execute(executeParams);
31105
31770
  }
31106
- throw new RuntimeError53("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
31771
+ throw new RuntimeError54("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
31107
31772
  }
31108
31773
  /**
31109
31774
  * 销毁方法
@@ -31120,12 +31785,12 @@ var CustomTrigger = class extends LogicTrigger {
31120
31785
  };
31121
31786
 
31122
31787
  // src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
31123
- import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
31788
+ import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
31124
31789
  var ItemDynaLogicTrigger = class extends LogicTrigger {
31125
31790
  bindExecutor(executor) {
31126
31791
  super.bindExecutor(executor);
31127
31792
  if (this.executor.type !== "SCRIPT") {
31128
- throw new RuntimeError54(
31793
+ throw new RuntimeError55(
31129
31794
  "\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
31130
31795
  );
31131
31796
  }
@@ -31161,7 +31826,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
31161
31826
  };
31162
31827
 
31163
31828
  // src/logic-scheduler/trigger/timer-trigger.ts
31164
- import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
31829
+ import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
31165
31830
  var TimerTrigger = class extends LogicTrigger {
31166
31831
  constructor() {
31167
31832
  super(...arguments);
@@ -31170,7 +31835,7 @@ var TimerTrigger = class extends LogicTrigger {
31170
31835
  start() {
31171
31836
  this.timer = setInterval(() => {
31172
31837
  if (!this.scheduler.defaultParamsCb) {
31173
- throw new RuntimeError55("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
31838
+ throw new RuntimeError56("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
31174
31839
  }
31175
31840
  const params = this.scheduler.defaultParamsCb();
31176
31841
  this.executor.execute(params);
@@ -31187,8 +31852,8 @@ var TimerTrigger = class extends LogicTrigger {
31187
31852
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
31188
31853
  import {
31189
31854
  ModelError as ModelError31,
31190
- RuntimeError as RuntimeError56,
31191
- RuntimeModelError as RuntimeModelError59
31855
+ RuntimeError as RuntimeError57,
31856
+ RuntimeModelError as RuntimeModelError61
31192
31857
  } from "@ibiz-template/core";
31193
31858
  import { notNilEmpty as notNilEmpty10 } from "qx-util";
31194
31859
  var AppUILogicExecutor = class extends LogicExecutor {
@@ -31223,7 +31888,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31223
31888
  const { context, params, ...rest } = parameters;
31224
31889
  const { data } = parameters;
31225
31890
  if (!(data == null ? void 0 : data[0])) {
31226
- throw new RuntimeError56("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
31891
+ throw new RuntimeError57("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
31227
31892
  }
31228
31893
  const openViewRefs = appUILogic.openDataAppViews;
31229
31894
  let openViewRef;
@@ -31232,7 +31897,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31232
31897
  } else {
31233
31898
  openViewRef = appUILogic.openDataAppView;
31234
31899
  if (!openViewRef) {
31235
- throw new RuntimeModelError59(
31900
+ throw new RuntimeModelError61(
31236
31901
  appUILogic,
31237
31902
  "opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
31238
31903
  );
@@ -31240,7 +31905,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31240
31905
  }
31241
31906
  const openView = openViewRef.refAppViewId;
31242
31907
  if (!openView) {
31243
- throw new RuntimeModelError59(
31908
+ throw new RuntimeModelError61(
31244
31909
  appUILogic,
31245
31910
  "opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
31246
31911
  );
@@ -31267,7 +31932,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31267
31932
  const appDataEntityId = parameters.view.model.appDataEntityId;
31268
31933
  const formTypeName = await getFormTypeFieldName(appDataEntityId);
31269
31934
  if (!formTypeName) {
31270
- throw new RuntimeModelError59(
31935
+ throw new RuntimeModelError61(
31271
31936
  appUILogic,
31272
31937
  "".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
31273
31938
  );
@@ -31275,12 +31940,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
31275
31940
  const { data } = parameters;
31276
31941
  const formTypeValue = data[0][formTypeName];
31277
31942
  if (!formTypeValue) {
31278
- throw new RuntimeModelError59(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
31943
+ throw new RuntimeModelError61(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
31279
31944
  }
31280
31945
  const openViewRefs = appUILogic.openDataAppViews;
31281
31946
  const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
31282
31947
  if (!findView) {
31283
- throw new RuntimeError56(
31948
+ throw new RuntimeError57(
31284
31949
  "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
31285
31950
  );
31286
31951
  }
@@ -31317,7 +31982,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31317
31982
  return viewRef.refMode.toLowerCase() !== parentDeName;
31318
31983
  });
31319
31984
  if (!newViewRef) {
31320
- throw new RuntimeModelError59(
31985
+ throw new RuntimeModelError61(
31321
31986
  appUILogic,
31322
31987
  "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
31323
31988
  );
@@ -31327,7 +31992,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31327
31992
  } else {
31328
31993
  newViewRef = newDataAppView;
31329
31994
  if (!newViewRef || !newViewRef.refAppViewId) {
31330
- throw new RuntimeModelError59(
31995
+ throw new RuntimeModelError61(
31331
31996
  appUILogic,
31332
31997
  "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
31333
31998
  );
@@ -31384,7 +32049,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31384
32049
  const { wizardAppView, newDataAppViews } = appUILogic;
31385
32050
  const { context, params, ...rest } = parameters;
31386
32051
  if (!wizardAppView || !wizardAppView.refAppViewId) {
31387
- throw new RuntimeModelError59(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
32052
+ throw new RuntimeModelError61(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
31388
32053
  }
31389
32054
  const result = await ibiz.commands.execute(
31390
32055
  OpenAppViewCommand.TAG,
@@ -31398,12 +32063,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
31398
32063
  }
31399
32064
  const selectData = (_a = result.data) == null ? void 0 : _a[0];
31400
32065
  if (!selectData) {
31401
- throw new RuntimeError56("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
32066
+ throw new RuntimeError57("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
31402
32067
  }
31403
32068
  const indexType = selectData.srfkey;
31404
32069
  const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
31405
32070
  if (!findView) {
31406
- throw new RuntimeError56(
32071
+ throw new RuntimeError57(
31407
32072
  "\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
31408
32073
  );
31409
32074
  }
@@ -31430,7 +32095,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
31430
32095
  const minorDERs = selfDe.minorAppDERSs;
31431
32096
  const pickParentDeName = newViewRef.refMode.toLowerCase();
31432
32097
  if (!minorDERs) {
31433
- throw new RuntimeModelError59(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
32098
+ throw new RuntimeModelError61(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
31434
32099
  }
31435
32100
  let pickParentFieldName;
31436
32101
  minorDERs == null ? void 0 : minorDERs.forEach((item) => {
@@ -31799,6 +32464,8 @@ export {
31799
32464
  MDCtrlController,
31800
32465
  MDCtrlService,
31801
32466
  MDViewEngine,
32467
+ MEditViewPanelController,
32468
+ MEditViewPanelService,
31802
32469
  MenuPortletController,
31803
32470
  MethodDto,
31804
32471
  MobMDCtrlRowState,
@@ -31853,6 +32520,7 @@ export {
31853
32520
  V7AuthService,
31854
32521
  VIEW_PROVIDER_PREFIX,
31855
32522
  ValueExUtil,
32523
+ ValueOP,
31856
32524
  ViewCallTag,
31857
32525
  ViewController,
31858
32526
  ViewEngineBase,
@@ -31892,6 +32560,7 @@ export {
31892
32560
  findFieldById,
31893
32561
  findModelChild,
31894
32562
  formatMultiData,
32563
+ generateEditorRules,
31895
32564
  generateRules,
31896
32565
  getAppCounterProvider,
31897
32566
  getAppViewRef,