super-page-runtime 2.3.9 → 2.3.10

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 (19) hide show
  1. package/dist/es/components/runtime/utils/common-util.d.ts +4 -0
  2. package/dist/es/components/runtime/utils/common-util.js +4 -0
  3. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  4. package/dist/es/components/runtime/utils/events/validator-util.js +121 -103
  5. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +22 -19
  6. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +34 -31
  7. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +31 -28
  8. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +35 -33
  9. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +50 -47
  10. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -30
  11. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +38 -35
  12. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +18 -15
  13. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +60 -57
  14. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
  15. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +56 -53
  16. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +59 -56
  17. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +25 -22
  18. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +16 -13
  19. package/package.json +2 -2
@@ -27,3 +27,7 @@ export declare function isNumber(numStr: any): boolean;
27
27
  export declare function isWorkflowPage(pageContext: PageContext): boolean;
28
28
  export declare function refreshMobileDialogType(jumpPageSetting: any, isMobile: boolean): void;
29
29
  export declare function isVariableInvalidValue(values: any, variable: string): boolean;
30
+ /**
31
+ * 给主表字段添加必填高亮样式
32
+ */
33
+ export declare function addRequiredClassUtil(): string;
@@ -99,7 +99,11 @@ function g(e2, t2) {
99
99
  function h(e2, t2) {
100
100
  return null === e2[t2] || void 0 === e2[t2] || "" === e2[t2];
101
101
  }
102
+ function y() {
103
+ return "required_bg";
104
+ }
102
105
  export {
106
+ y as addRequiredClassUtil,
103
107
  p as deepCopy,
104
108
  i as getBaseUrl,
105
109
  s as getListCode,
@@ -1,7 +1,7 @@
1
1
  import { PageContext } from '../interfaces/page-design-types';
2
2
 
3
3
  export declare function setObjectPropRule(prop: any, rules: any, leafRule: any): {};
4
- export declare function validator(entity: any, rules: any, columns: any, rowIndex: any, isSql: any): any;
4
+ export declare function validator(entity: any, rules: any, columns: any, rowIndex: any, isSql: any, pageContext: any): any;
5
5
  export declare function validateDataModelFunc(pageContext: any, configureObj: any, isEnableRequired: any): Promise<unknown>;
6
6
  /**
7
7
  * 封装自定义校验规则
@@ -1,119 +1,137 @@
1
1
  import e from "async-validator";
2
2
  import { ElMessage as t } from "element-plus";
3
- import { getComponentRefByCode as n, getComponentRef as s, getAllComponentRefs as r } from "../global-refs.js";
3
+ import { getComponentRefByCode as s, getComponentRef as n, getAllComponentRefs as r } from "../global-refs.js";
4
4
  import { getI18n as i } from "agilebuilder-ui/src/utils/util";
5
5
  import { getAdditionalParamMap as l } from "./standard-event.js";
6
6
  import { isPromise as o } from "agilebuilder-ui/src/utils/common-util";
7
7
  import { getListCode as a, isWorkflowPage as u } from "../common-util.js";
8
- function f(e2, t2, n2) {
9
- const s2 = {};
8
+ function f(e2, t2, s2) {
9
+ const n2 = {};
10
10
  t2 || (t2 = {});
11
11
  let r2 = 0;
12
12
  const i2 = e2.split(".");
13
13
  return i2.forEach((e3) => {
14
14
  let l2;
15
- if (r2 === i2.length - 1) l2 = function(e4, t3, n3) {
16
- let s3;
17
- for (let r3 = 0; r3 < t3.length; r3++) if (s3 = 0 === r3 ? e4[t3[r3]] : s3.fields[t3[r3]], r3 !== t3.length - 1) {
18
- if (t3[r3 + 1] === n3) break;
15
+ if (r2 === i2.length - 1) l2 = function(e4, t3, s3) {
16
+ let n3;
17
+ for (let r3 = 0; r3 < t3.length; r3++) if (n3 = 0 === r3 ? e4[t3[r3]] : n3.fields[t3[r3]], r3 !== t3.length - 1) {
18
+ if (t3[r3 + 1] === s3) break;
19
19
  }
20
- return s3;
21
- }(s2, i2, e3), l2.fields[e3] = n2;
20
+ return n3;
21
+ }(n2, i2, e3), l2.fields[e3] = s2;
22
22
  else {
23
- let n3;
24
- 0 === r2 ? l2 = t2 : (n3 = function(e4, t3, n4) {
25
- let s3;
23
+ let s3;
24
+ 0 === r2 ? l2 = t2 : (s3 = function(e4, t3, s4) {
25
+ let n3;
26
26
  for (let r3 = 0; r3 < t3.length; r3++) {
27
27
  const i3 = t3[r3];
28
- if (s3 = 0 === r3 ? e4[i3] : s3.fields[t3[r3]], i3 === n4) break;
28
+ if (n3 = 0 === r3 ? e4[i3] : n3.fields[t3[r3]], i3 === s4) break;
29
29
  }
30
- return s3;
31
- }(s2, i2, i2[r2 - 1]), l2 = n3.fields), l2[e3] || (l2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? s2[e3] = l2[e3] : n3.fields[e3] = l2[e3];
30
+ return n3;
31
+ }(n2, i2, i2[r2 - 1]), l2 = s3.fields), l2[e3] || (l2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? n2[e3] = l2[e3] : s3.fields[e3] = l2[e3];
32
32
  }
33
33
  r2++;
34
- }), s2;
34
+ }), n2;
35
35
  }
36
- function c(e2, t2, n2, s2, r2) {
37
- return d(e2, t2, n2, s2, true);
36
+ function c(e2, t2, s2, n2, r2, i2) {
37
+ return m(e2, t2, s2, n2, true, r2, i2);
38
38
  }
39
- function m(e2) {
39
+ function d(e2) {
40
40
  if (e2) return Object.keys(e2).forEach((t2) => {
41
41
  if (t2.indexOf(".") >= 0) {
42
- let n2 = [];
43
- n2 = t2.split("."), e2[n2[0]] ? e2[n2[0]].fields[n2[1]] = e2[t2][0] : (e2[n2[0]] = new Object(), e2[n2[0]].fields = new Object(), e2[n2[0]].fields[n2[1]] = e2[t2][0], e2[n2[0]].type = "object"), delete e2[t2];
42
+ let s2 = [];
43
+ s2 = t2.split("."), e2[s2[0]] ? e2[s2[0]].fields[s2[1]] = e2[t2][0] : (e2[s2[0]] = new Object(), e2[s2[0]].fields = new Object(), e2[s2[0]].fields[s2[1]] = e2[t2][0], e2[s2[0]].type = "object"), delete e2[t2];
44
44
  }
45
45
  }), e2;
46
46
  }
47
- function d(n2, s2, r2, i2, l2, o2) {
48
- let a2, u2 = m(s2);
49
- if (s2 && null !== s2 || !r2 || (u2 = {}), !u2 || 0 === Object.keys(u2).length) return n2.validateErrorField = "", true;
50
- return new e(u2).validate(n2, { first: true }, (e2, o3) => {
51
- let u3;
52
- if (e2 ? (a2 = e2[0].message, u3 = e2[0].field, t({ message: a2, showClose: true, type: "warning", duration: 3e3 })) : a2 = true, u3 && true === l2) {
53
- if (/[A-Z]+/.test(u3) && void 0 !== n2[u3.toLowerCase()]) {
47
+ function m(n2, r2, i2, l2, o2, a2, u2) {
48
+ let f2, c2 = d(r2);
49
+ if (r2 && null !== r2 || !i2 || (c2 = {}), !c2 || 0 === Object.keys(c2).length) return n2.validateErrorField = "", true;
50
+ return new e(c2).validate(n2, { first: true }, (e2, c3) => {
51
+ let d2;
52
+ if (e2) {
53
+ f2 = e2[0].message, d2 = e2[0].field, t({ message: f2, showClose: true, type: "warning", duration: 3e3 });
54
+ const n3 = s(u2, d2);
55
+ n3 && n3.addRequiredClass && n3.addRequiredClass();
56
+ } else f2 = true;
57
+ if (d2 && true === o2) {
58
+ if (/[A-Z]+/.test(d2) && void 0 !== n2[d2.toLowerCase()]) {
54
59
  const e3 = JSON.parse(JSON.stringify(n2));
55
- e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = d(e3, s2, r2, i2, false);
60
+ e3[d2.toUpperCase()] = n2[d2.toLowerCase()], delete e3[d2.toLowerCase()], f2 = m(e3, r2, i2, l2, false, a2, u2);
56
61
  }
57
62
  }
58
- }), a2;
63
+ }), f2;
59
64
  }
60
- function p(e2, n2, s2) {
61
- const r2 = e2.entity.data, o2 = { ...e2.entity.page, ...r2 }, a2 = e2.rules, f2 = n2.props.base ? n2.props.base.isEnableRequired : null;
62
- return null != f2 && (s2 = f2), null == s2 && (s2 = false), function(e3, n3, s3, r3) {
65
+ function p(e2, n2, r2) {
66
+ const o2 = e2.entity.data, a2 = { ...e2.entity.page, ...o2 }, f2 = e2.rules, c2 = n2.props.base ? n2.props.base.isEnableRequired : null;
67
+ return null != c2 && (r2 = c2), null == r2 && (r2 = false), function(e3, n3, r3, o3) {
63
68
  if (e3) {
64
- return u(r3) ? function(e4, n4, s4) {
65
- return new Promise((r4, o3) => {
66
- const a3 = l(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, m2 = n4.subTablePageInfo;
67
- b(e4, n4, s4).then((s5) => {
68
- if (s5) {
69
- let i2 = s5;
70
- const l2 = n4.workflowRules;
71
- i2 = !l2 || window.$vueApp.config.globalProperties.$formValidator(e4, l2, c2, a3, f3, u2, m2), true !== i2 ? (t({ showClose: true, message: i2 + "", type: "warning" }), r4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, r4(e4));
72
- } else o3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
69
+ return u(o3) ? function(e4, n4, r4) {
70
+ return new Promise((o4, a3) => {
71
+ const u2 = l(n4), f3 = n4.entity.context, c3 = n4.entity.task, d2 = true, m2 = n4.subTablePageInfo;
72
+ b(e4, n4, r4).then((r5) => {
73
+ if (r5) {
74
+ let i2, l2, a4, p2, g2 = r5;
75
+ const b2 = n4.workflowRules;
76
+ if (b2) {
77
+ const t2 = true, s2 = window.$vueApp.config.globalProperties.$formValidator(e4, b2, d2, u2, c3, f3, m2, t2);
78
+ g2 = s2.msg, i2 = s2.field, l2 = s2.listCode, a4 = s2.rowIndex, p2 = s2.pageNum;
79
+ } else g2 = true;
80
+ if (true !== g2) {
81
+ if (t({ showClose: true, message: g2 + "", type: "warning" }), l2) {
82
+ const e5 = s(n4, l2);
83
+ e5 && e5.addRequiredClass && e5.addRequiredClass(i2, a4, p2);
84
+ } else {
85
+ const e5 = s(n4, i2);
86
+ e5 && e5.addRequiredClass && e5.addRequiredClass();
87
+ }
88
+ o4(false);
89
+ } else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, o4(e4);
90
+ } else a3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
73
91
  }).catch((e5) => {
74
- o3(e5);
92
+ a3(e5);
75
93
  });
76
94
  });
77
- }(n3, r3, s3) : function(e4, t2, n4) {
78
- return new Promise((s4, r4) => {
79
- b(e4, t2, n4).then((t3) => {
95
+ }(n3, o3, r3) : function(e4, t2, s2) {
96
+ return new Promise((n4, r4) => {
97
+ b(e4, t2, s2).then((t3) => {
80
98
  if (t3) {
81
99
  const t4 = JSON.parse(JSON.stringify(e4));
82
- Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, s4(t4);
83
- } else s4(false);
100
+ Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, n4(t4);
101
+ } else n4(false);
84
102
  }).catch((e5) => {
85
103
  r4(e5);
86
104
  });
87
105
  });
88
- }(n3, r3, s3);
106
+ }(n3, o3, r3);
89
107
  }
90
108
  return new Promise((e4, t2) => {
91
109
  e4(true);
92
110
  });
93
- }(s2, o2, a2, e2);
111
+ }(r2, a2, f2, e2);
94
112
  }
95
113
  function g(e2) {
96
- return new Promise((t2, n2) => {
114
+ return new Promise((t2, s2) => {
97
115
  const r2 = [], i2 = e2.customValidatorUuids;
98
116
  i2 && i2.forEach((t3) => {
99
- const n3 = s(e2, t3);
100
- n3 && n3.validator && r2.push(n3.validator());
117
+ const s3 = n(e2, t3);
118
+ s3 && s3.validator && r2.push(s3.validator());
101
119
  }), r2 && r2.length > 0 ? Promise.all(r2).then((e3) => {
102
120
  e3.includes(false) ? t2(false) : t2(true);
103
121
  }) : t2(true);
104
122
  });
105
123
  }
106
- function b(e2, t2, n2) {
124
+ function b(e2, t2, s2) {
107
125
  return new Promise((r2, l2) => {
108
126
  const a2 = JSON.parse(JSON.stringify(e2));
109
- if (n2 && 0 !== Object.keys(n2).length) {
110
- if (true === c(a2, n2, null, null)) {
127
+ if (s2 && 0 !== Object.keys(s2).length) {
128
+ if (true === c(a2, s2, null, null, true, t2)) {
111
129
  const e3 = function(e4) {
112
130
  if (!e4) return true;
113
131
  const t3 = e4.tableUuids;
114
132
  if (!t3) return true;
115
- for (let n3 = 0; n3 < t3.length; n3++) {
116
- const r3 = t3[n3], i2 = s(e4, r3);
133
+ for (let s3 = 0; s3 < t3.length; s3++) {
134
+ const r3 = t3[s3], i2 = n(e4, r3);
117
135
  if (i2) {
118
136
  if (!i2.validatorSunTableListData()) return false;
119
137
  }
@@ -123,17 +141,17 @@ function b(e2, t2, n2) {
123
141
  if (true === e3) {
124
142
  const e4 = function(e5) {
125
143
  const t3 = [];
126
- e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((n3) => {
127
- n3.events.forEach((s2) => {
128
- const r3 = e5.customEvents[s2];
129
- t3.push(r3.apply(r3, [{ prop: n3.prop, pageContext: e5 }]));
144
+ e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((s3) => {
145
+ s3.events.forEach((n2) => {
146
+ const r3 = e5.customEvents[n2];
147
+ t3.push(r3.apply(r3, [{ prop: s3.prop, pageContext: e5 }]));
130
148
  });
131
149
  });
132
- if (t3 && t3.length > 0) return new Promise((e6, n3) => {
133
- const s2 = [], r3 = [];
150
+ if (t3 && t3.length > 0) return new Promise((e6, s3) => {
151
+ const n2 = [], r3 = [];
134
152
  t3.forEach((e7) => {
135
- o(e7) ? s2.push(e7) : r3.push(e7);
136
- }), r3.includes(false) && e6(false), s2.length > 0 ? Promise.all(s2).then((t4) => {
153
+ o(e7) ? n2.push(e7) : r3.push(e7);
154
+ }), r3.includes(false) && e6(false), n2.length > 0 ? Promise.all(n2).then((t4) => {
137
155
  t4.includes(false) ? e6(false) : e6(true);
138
156
  }).catch((t4) => {
139
157
  console.error(t4), e6(false);
@@ -156,21 +174,21 @@ function b(e2, t2, n2) {
156
174
  function h(e2, t2) {
157
175
  if (!e2) return t2;
158
176
  t2 || (t2 = {});
159
- const n2 = Object.keys(e2), s2 = e2;
160
- return n2.forEach((e3) => {
177
+ const s2 = Object.keys(e2), n2 = e2;
178
+ return s2.forEach((e3) => {
161
179
  if ("__subRules" === e3) {
162
- const e4 = s2.__subRules;
163
- Object.keys(e4).forEach((n3) => {
164
- t2.subRules || (t2.subRules = {}), t2.subRules[n3] ? Object.assign(t2.subRules[n3], e4[n3]) : t2.subRules[n3] = e4[n3];
180
+ const e4 = n2.__subRules;
181
+ Object.keys(e4).forEach((s3) => {
182
+ t2.subRules || (t2.subRules = {}), t2.subRules[s3] ? Object.assign(t2.subRules[s3], e4[s3]) : t2.subRules[s3] = e4[s3];
165
183
  });
166
- } else j(s2[e3]), t2[e3] = s2[e3];
167
- }), m(t2);
184
+ } else j(n2[e3]), t2[e3] = n2[e3];
185
+ }), d(t2);
168
186
  }
169
187
  function w(e2) {
170
188
  if (!e2 || 0 === Object.keys(e2).length) return;
171
- const t2 = {}, n2 = Object.keys(e2);
172
- for (let s2 = 0; s2 < n2.length; s2++) {
173
- const r2 = n2[s2], i2 = e2[r2];
189
+ const t2 = {}, s2 = Object.keys(e2);
190
+ for (let n2 = 0; n2 < s2.length; n2++) {
191
+ const r2 = s2[n2], i2 = e2[r2];
174
192
  y(i2), r2.indexOf(".") > 0 ? f(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
175
193
  }
176
194
  return t2;
@@ -178,55 +196,55 @@ function w(e2) {
178
196
  function y(e2, t2) {
179
197
  e2.forEach((e3) => {
180
198
  e3.message;
181
- const t3 = e3.label, n2 = i().t(t3);
182
- e3.required && (e3.message = i().t("superPageRuntimeMessage.required", { label: n2 })), e3.myType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: n2 })), e3.patternType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: n2 })), void 0 !== e3.max && null !== e3.max && (e3.message = i().t("superPageRuntimeMessage.overMaxLength", { label: n2, value: e3.max })), void 0 !== e3.min && null !== e3.min && (e3.message = i().t("superPageRuntimeMessage.limitMinLength", { label: n2, value: e3.min }));
199
+ const t3 = e3.label, s2 = i().t(t3);
200
+ e3.required && (e3.message = i().t("superPageRuntimeMessage.required", { label: s2 })), e3.myType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: s2 })), e3.patternType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: s2 })), void 0 !== e3.max && null !== e3.max && (e3.message = i().t("superPageRuntimeMessage.overMaxLength", { label: s2, value: e3.max })), void 0 !== e3.min && null !== e3.min && (e3.message = i().t("superPageRuntimeMessage.limitMinLength", { label: s2, value: e3.min }));
183
201
  });
184
202
  }
185
- function v(e2) {
186
- const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, s2 = l(e2), r2 = e2.entity.context, i2 = e2.entity.task;
203
+ function R(e2) {
204
+ const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 = l(e2), r2 = e2.entity.context, i2 = e2.entity.task;
187
205
  e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
188
206
  t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
189
207
  });
190
- let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, s2, i2, r2);
208
+ let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, i2, r2);
191
209
  return o2 = h(e2.customRules, o2), o2;
192
210
  }
193
- function P(e2, t2) {
211
+ function v(e2, t2) {
194
212
  if (!t2) return;
195
- const s2 = {};
213
+ const n2 = {};
196
214
  t2.forEach((e3) => {
197
- const { name: t3, rules: n2 } = e3;
198
- n2 && (s2[t3] = n2);
215
+ const { name: t3, rules: s2 } = e3;
216
+ s2 && (n2[t3] = s2);
199
217
  });
200
218
  let r2 = e2.rules ? e2.rules : {};
201
- r2 = h(s2, r2), e2.rules = r2;
219
+ r2 = h(n2, r2), e2.rules = r2;
202
220
  let i2 = e2.workflowRules ? e2.workflowRules : {};
203
- i2 = h(s2, i2), e2.workflowRules = i2;
221
+ i2 = h(n2, i2), e2.workflowRules = i2;
204
222
  const l2 = t2.filter((e3) => "_all_fields" === e3.name);
205
223
  l2 && l2.length > 0 && E(e2, l2[0]), t2.forEach((t3) => {
206
224
  if ("_all_fields" !== t3.name) {
207
- O(n(e2, t3.name), t3);
225
+ O(s(e2, t3.name), t3);
208
226
  }
209
227
  });
210
228
  }
211
- function R(e2) {
229
+ function P(e2) {
212
230
  E(e2, { disabled: true });
213
231
  }
214
232
  function E(e2, t2) {
215
- const n2 = r(e2);
216
- if (n2) for (const e3 in n2) {
217
- const s2 = n2[e3];
218
- O(s2 ? s2.value : s2, t2);
233
+ const s2 = r(e2);
234
+ if (s2) for (const e3 in s2) {
235
+ const n2 = s2[e3];
236
+ O(n2 ? n2.value : n2, t2);
219
237
  }
220
238
  }
221
239
  function k(e2, t2, r2) {
222
240
  var _a;
223
241
  let i2, l2;
224
- if (r2 ? (i2 = n(e2, r2), l2 = i2 ? i2.getTableUuid() : null) : (l2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = l2 ? s(e2, l2) : null), !i2) return;
242
+ if (r2 ? (i2 = s(e2, r2), l2 = i2 ? i2.getTableUuid() : null) : (l2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = l2 ? n(e2, l2) : null), !i2) return;
225
243
  const o2 = e2.code, u2 = e2.version, f2 = a(o2, u2, l2);
226
244
  if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[r2]) {
227
- const n2 = e2.workflowRules.subRules[r2];
245
+ const s2 = e2.workflowRules.subRules[r2];
228
246
  t2.forEach((e3) => {
229
- n2[e3.name] = e3;
247
+ s2[e3.name] = e3;
230
248
  });
231
249
  }
232
250
  i2.dynamicControlTableEdit(e2, t2, f2);
@@ -234,14 +252,14 @@ function k(e2, t2, r2) {
234
252
  function O(e2, t2) {
235
253
  var _a, _b, _c;
236
254
  if (e2) {
237
- const n2 = e2.getConfigure();
238
- void 0 !== t2.show && (t2.show ? e2.show() : e2.hide()), void 0 !== t2.required && ((_a = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _a.props) && (n2.runtime.props.required = t2.required), void 0 !== t2.readonly && ((_b = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _b.props) && (t2.readonly ? n2.runtime.props.state = "readonly" : n2.runtime.props.state = "enabled"), void 0 !== t2.disabled && n2 && (((_c = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _c.props) && (t2.disabled ? n2.runtime.props.state = "disabled" : n2.runtime.props.state = "enabled"), "table" === n2.name && e2.changeOperationAddState(false));
255
+ const s2 = e2.getConfigure();
256
+ void 0 !== t2.show && (t2.show ? e2.show() : e2.hide()), void 0 !== t2.required && ((_a = s2 == null ? void 0 : s2.runtime) == null ? void 0 : _a.props) && (s2.runtime.props.required = t2.required), void 0 !== t2.readonly && ((_b = s2 == null ? void 0 : s2.runtime) == null ? void 0 : _b.props) && (t2.readonly ? s2.runtime.props.state = "readonly" : s2.runtime.props.state = "enabled"), void 0 !== t2.disabled && s2 && (((_c = s2 == null ? void 0 : s2.runtime) == null ? void 0 : _c.props) && (t2.disabled ? s2.runtime.props.state = "disabled" : s2.runtime.props.state = "enabled"), "table" === s2.name && e2.changeOperationAddState(false));
239
257
  }
240
258
  }
241
259
  function j(e2) {
242
- e2 && e2.type && "boolean" === e2.type ? e2.validator = function(e3, t2, n2) {
260
+ e2 && e2.type && "boolean" === e2.type ? e2.validator = function(e3, t2, s2) {
243
261
  return null == t2 ? !e3.required : "number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2);
244
- } : e2 && e2.type && "date" === e2.type && (e2.validator = function(e3, t2, n2) {
262
+ } : e2 && e2.type && "date" === e2.type && (e2.validator = function(e3, t2, s2) {
245
263
  if (null == t2) return !e3.required;
246
264
  {
247
265
  const e4 = new Date(t2);
@@ -250,16 +268,16 @@ function j(e2) {
250
268
  });
251
269
  }
252
270
  export {
253
- R as disabledAllFields,
271
+ P as disabledAllFields,
254
272
  k as dynamicControlTableEdit,
255
- v as getWorkflowRules,
273
+ R as getWorkflowRules,
256
274
  y as i18nValidatePropRulesMessage,
257
275
  w as i18nValidateRulesMessage,
258
276
  h as packageCustomRules,
259
277
  j as packageCustomValidator,
260
278
  f as setObjectPropRule,
261
279
  O as updateComponentDisplayState,
262
- P as updateFormItemEditState,
280
+ v as updateFormItemEditState,
263
281
  p as validateDataModelFunc,
264
282
  c as validator
265
283
  };
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as a, createElementBlock as l, openBlock as i, createBlock as u, createCommentVNode as r, unref as s } from "vue";
2
- import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as f, gridSelectionChange as d, cellClick as v, cellDblClick as b, rowClick as g, rowDblClick as m, headerClick as h, getHandleEvent as S } from "../../../../utils/events/event-util.js";
2
+ import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as d, gridSelectionChange as f, cellClick as v, cellDblClick as b, rowClick as g, rowDblClick as m, headerClick as h, getHandleEvent as S } from "../../../../utils/events/event-util.js";
3
3
  import { caculateShowCondition as w, setVariableValue as T, getVariableValue as x, getSizeConfig as C } from "../../../../utils/page-helper-util.js";
4
4
  import { getModelFields as D, getDefaultValue as y } from "../../../../utils/page-init-util.js";
5
5
  import P from "../../../../utils/eventBus.js";
6
- import { popupToPage as I, getOperationButtons as R } from "../../../../utils/table-utils.js";
6
+ import { popupToPage as R, getOperationButtons as I } from "../../../../utils/table-utils.js";
7
7
  import { getListCode as O, getBaseUrl as _ } from "../../../../utils/common-util.js";
8
8
  import { getAdditionalParamMap as k } from "../../../../utils/events/standard-event.js";
9
9
  import { getRowStyleUtil as M, getCellStyleUtil as F, getHeaderCellStyleUtil as $ } from "../../chart/table/chart-table-util.js";
@@ -12,7 +12,7 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
12
12
  let N = L.configure;
13
13
  const E = L.configure.runtime ? L.configure.runtime : {};
14
14
  B.isTest ? E.value = L.configure.runtime ? L.configure.runtime : {} : B.tableRuntimes && B.tableRuntimes[N.uuid] && (N = JSON.parse(B.tableRuntimes[N.uuid].configure), E.value = N.runtime ? N.runtime : {});
15
- const G = O(B.code, B.version, N.uuid), H = B.entity.data, V = N.code ? N.code : G, U = k(B), z = E && E.events ? E.events : [], J = t([]), q = B.superGridItems, K = q ? q[N.uuid] : null, Q = E.style, W = E.class, X = L.pageContext.entity ? L.pageContext.entity : {};
15
+ const G = O(B.code, B.version, N.uuid), H = B.entity.data, V = N.code ? N.code : G, U = k(B), z = E && E.events ? E.events : [], q = t([]), J = B.superGridItems, K = J ? J[N.uuid] : null, Q = E.style, W = E.class, X = L.pageContext.entity ? L.pageContext.entity : {};
16
16
  let Y = D(L.configure, V), Z = _(B.backendUrl, B.isTest);
17
17
  Z || (Z = window.$vueApp.config.globalProperties.baseURL);
18
18
  const ee = t(false);
@@ -58,8 +58,8 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
58
58
  function ce() {
59
59
  return x(X, Y);
60
60
  }
61
- let pe, fe;
62
- function de(e3) {
61
+ let pe, de;
62
+ function fe(e3) {
63
63
  ue(e3), oe.value.subTableData = null, ve(), ee.value = false, pe = setTimeout(() => {
64
64
  ee.value = true, te.value = te.value + 1, be();
65
65
  }, 10);
@@ -90,7 +90,7 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
90
90
  const t4 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: De, isShow: xe };
91
91
  e5.push(t4);
92
92
  }
93
- return R(B, N, e5, me), e5;
93
+ return I(B, N, e5, me), e5;
94
94
  }();
95
95
  oe.value.operations.operation = n2, oe.value.subTableCanAdd = Se();
96
96
  }(), c(oe.value, z, B, N);
@@ -111,7 +111,7 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
111
111
  ie();
112
112
  }), P.$on("_refreshChildData_" + e3, (e4) => {
113
113
  !function(e5) {
114
- Ee(e5), fe = setTimeout(() => {
114
+ Ee(e5), de = setTimeout(() => {
115
115
  le.value && (le.value.refreshChildData(G, e5, N.props && N.props.base && true === N.props.base.subPaging), oe.value.extraParam.entityMap = B.entity.data);
116
116
  }, 10);
117
117
  }(e4);
@@ -121,7 +121,7 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
121
121
  le.value.scanDone(e4);
122
122
  }), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && ae("setSafeDeleteTableCode", oe.value.extraParam.tableName);
123
123
  }), o(() => {
124
- pe && clearTimeout(pe), fe && clearTimeout(fe);
124
+ pe && clearTimeout(pe), de && clearTimeout(de);
125
125
  const e3 = N.uuid;
126
126
  P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(G + "-pickFileDone"), P.$off(G + "-scanDone");
127
127
  });
@@ -188,11 +188,11 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
188
188
  function Pe(e3) {
189
189
  B.subTablePageInfo || (B.subTablePageInfo = {}), B.subTablePageInfo[V] || (B.subTablePageInfo[V] = {}), B.subTablePageInfo[V].pageSize = e3;
190
190
  }
191
- function Ie(e3) {
191
+ function Re(e3) {
192
192
  const t2 = e3.key, n2 = e3.value;
193
193
  B.selectOptions || (B.selectOptions = {}), B.selectOptions[t2] = n2;
194
194
  }
195
- function Re(e3) {
195
+ function Ie(e3) {
196
196
  const t2 = B.code + "_";
197
197
  P.$emit(t2 + "prohibit-edit", e3);
198
198
  }
@@ -202,16 +202,16 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
202
202
  }
203
203
  function _e(e3, t2) {
204
204
  if (void 0 !== t2) {
205
- J.value = e3;
205
+ q.value = e3;
206
206
  p(B, N, { selection: e3, row: t2 });
207
207
  }
208
208
  }
209
209
  function ke(e3) {
210
- J.value = e3;
211
- f(B, N, { selection: e3 });
210
+ q.value = e3;
211
+ d(B, N, { selection: e3 });
212
212
  }
213
213
  function Me(e3) {
214
- d(B, N, { newSelection: e3 });
214
+ f(B, N, { newSelection: e3 });
215
215
  }
216
216
  function Fe(e3, t2, n2, o2) {
217
217
  v(B, N, { row: e3, column: t2, cell: n2, event: o2 });
@@ -243,18 +243,18 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
243
243
  }
244
244
  return function() {
245
245
  const e3 = re();
246
- e3 ? de(e3) : (ue(e3), oe.value.isPageInfo = false, oe.value.subTableData = Ne(), ve());
246
+ e3 ? fe(e3) : (ue(e3), oe.value.isPageInfo = false, oe.value.subTableData = Ne(), ve());
247
247
  }(), j2({ createRow: function() {
248
248
  return le.value.createRow(G);
249
249
  }, getSelections: function() {
250
- return J.value;
250
+ return q.value;
251
251
  }, getSelectionIds: function() {
252
252
  const e3 = [];
253
- return J.value && J.value.forEach((t2) => {
253
+ return q.value && q.value.forEach((t2) => {
254
254
  e3.push(t2.id ? t2.id : t2.ID ? t2.ID : null);
255
255
  }), e3;
256
256
  }, clearSelections: function() {
257
- J.value = [];
257
+ q.value = [];
258
258
  }, getTableConfigure: function() {
259
259
  return N;
260
260
  }, validatorSunTableListData: function() {
@@ -286,9 +286,12 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
286
286
  }, getTableData: function() {
287
287
  var _a;
288
288
  return (_a = le.value) == null ? void 0 : _a.getTableData();
289
+ }, addRequiredClass: function(e3, t2, n2) {
290
+ var _a;
291
+ (_a = le.value) == null ? void 0 : _a.addRequiredClass(e3, G, t2, n2);
289
292
  } }), (e3, t2) => {
290
293
  const n2 = a("super-grid");
291
- return i(), l("div", null, [ee.value ? (i(), u(n2, { key: 0, ref_key: "gridRef", ref: le, url: s(Z) + "/dsc/commons/sub-table", options: oe.value, code: s(G), settings: s(K), onSelect: _e, onSelectAll: ke, onSelectionChange: Me, onCellClick: Fe, onCellDblclick: $e, onRowClick: je, onRowDblclick: Ae, onHeaderClick: Le, onFnProhibitToEdit: Re, onChangeGridData: ye, onReloadGrid: de, onRefresMainTableFields: Oe, onSetSelectOptions: Ie, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(I), onChangeFormData: Be }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : r("", true)]);
294
+ return i(), l("div", null, [ee.value ? (i(), u(n2, { key: 0, ref_key: "gridRef", ref: le, url: s(Z) + "/dsc/commons/sub-table", options: oe.value, code: s(G), settings: s(K), onSelect: _e, onSelectAll: ke, onSelectionChange: Me, onCellClick: Fe, onCellDblclick: $e, onRowClick: je, onRowDblclick: Ae, onHeaderClick: Le, onFnProhibitToEdit: Ie, onChangeGridData: ye, onReloadGrid: fe, onRefresMainTableFields: Oe, onSetSelectOptions: Re, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(R), onChangeFormData: Be }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : r("", true)]);
292
295
  };
293
296
  } });
294
297
  export {