super-page-runtime 2.3.36-sit2 → 2.3.37-sit1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/events/validator-util.js +125 -87
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +3 -1
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -11
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +69 -66
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +36 -33
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +35 -35
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +41 -41
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +59 -59
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +36 -36
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +57 -57
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +19 -19
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +59 -59
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +24 -24
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +25 -25
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +48 -48
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +106 -106
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +87 -87
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +19 -19
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +94 -90
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +30 -18
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +26 -18
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +9 -3
- package/dist/es/style.css +166 -158
- package/package.json +2 -2
|
@@ -6,7 +6,8 @@ import { getAdditionalParamMap as l } from "./standard-event.js";
|
|
|
6
6
|
import { isPromise as o } from "agilebuilder-ui/src/utils/common-util";
|
|
7
7
|
import { parseSubTablePermissionCondition as a } from "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
8
8
|
import { isWorkflowPage as u, getListCode as f } from "../common-util.js";
|
|
9
|
-
|
|
9
|
+
import { scrollIntoComponentWithCode as c, scrollIntoComponentWithUuid as d } from "../anchor-util.js";
|
|
10
|
+
function m(e2, t2, s2) {
|
|
10
11
|
const n2 = {};
|
|
11
12
|
t2 || (t2 = {});
|
|
12
13
|
let r2 = 0;
|
|
@@ -34,10 +35,10 @@ function c(e2, t2, s2) {
|
|
|
34
35
|
r2++;
|
|
35
36
|
}), n2;
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
return
|
|
38
|
+
function p(e2, t2, s2, n2, r2, i2) {
|
|
39
|
+
return b(e2, t2, s2, n2, true, r2, i2);
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function g(e2) {
|
|
41
42
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
42
43
|
if (t2.indexOf(".") >= 0) {
|
|
43
44
|
let s2 = [];
|
|
@@ -45,50 +46,57 @@ function m(e2) {
|
|
|
45
46
|
}
|
|
46
47
|
}), e2;
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
let f2,
|
|
50
|
-
if (r2 && null !== r2 || !i2 || (
|
|
51
|
-
return new e(
|
|
52
|
-
let
|
|
49
|
+
function b(n2, r2, i2, l2, o2, a2, u2) {
|
|
50
|
+
let f2, d2 = g(r2);
|
|
51
|
+
if (r2 && null !== r2 || !i2 || (d2 = {}), !d2 || 0 === Object.keys(d2).length) return n2.validateErrorField = "", true;
|
|
52
|
+
return new e(d2).validate(n2, { first: true }, (e2, d3) => {
|
|
53
|
+
let m2;
|
|
53
54
|
if (e2) {
|
|
54
|
-
f2 = e2[0].message,
|
|
55
|
-
const n3 = s(u2,
|
|
56
|
-
|
|
55
|
+
f2 = e2[0].message, m2 = e2[0].field, t({ message: f2, showClose: true, type: "warning", duration: 3e3 });
|
|
56
|
+
const n3 = s(u2, m2);
|
|
57
|
+
if (n3 && n3.addRequiredClass) {
|
|
58
|
+
n3.addRequiredClass();
|
|
59
|
+
try {
|
|
60
|
+
c(u2, m2);
|
|
61
|
+
} catch (e3) {
|
|
62
|
+
}
|
|
63
|
+
}
|
|
57
64
|
} else f2 = true;
|
|
58
|
-
if (
|
|
59
|
-
if (/[A-Z]+/.test(
|
|
65
|
+
if (m2 && true === o2) {
|
|
66
|
+
if (/[A-Z]+/.test(m2) && void 0 !== n2[m2.toLowerCase()]) {
|
|
60
67
|
const e3 = JSON.parse(JSON.stringify(n2));
|
|
61
|
-
e3[
|
|
68
|
+
e3[m2.toUpperCase()] = n2[m2.toLowerCase()], delete e3[m2.toLowerCase()], f2 = b(e3, r2, i2, l2, false, a2, u2);
|
|
62
69
|
}
|
|
63
70
|
}
|
|
64
71
|
}), f2;
|
|
65
72
|
}
|
|
66
|
-
function
|
|
67
|
-
const o2 = e2.entity.data, f2 = { ...e2.entity.page, ...o2 },
|
|
68
|
-
return null !=
|
|
73
|
+
function h(e2, n2, r2) {
|
|
74
|
+
const o2 = e2.entity.data, f2 = { ...e2.entity.page, ...o2 }, d2 = e2.rules, m2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
75
|
+
return null != m2 && (r2 = m2), null == r2 && (r2 = false), function(e3, n3, r3, o3) {
|
|
69
76
|
if (e3) {
|
|
70
77
|
return u(o3) ? function(e4, n4, r4) {
|
|
71
78
|
return new Promise((o4, u2) => {
|
|
72
|
-
const f3 = l(n4),
|
|
73
|
-
|
|
79
|
+
const f3 = l(n4), d3 = n4.entity.context, m3 = n4.entity.task, p2 = true, g2 = n4.subTablePageInfo;
|
|
80
|
+
w(e4, n4, r4).then((r5) => {
|
|
74
81
|
if (r5) {
|
|
75
|
-
let l2, u3,
|
|
82
|
+
let l2, u3, b2, h2, y2 = r5;
|
|
76
83
|
const w2 = n4.workflowRules;
|
|
77
84
|
if (w2) {
|
|
78
85
|
if (!function(e5, n5) {
|
|
79
|
-
var _a, _b, _c;
|
|
86
|
+
var _a, _b, _c, _d;
|
|
80
87
|
if (!e5.actionPermissions) return true;
|
|
81
88
|
const r7 = Object.keys(e5.actionPermissions);
|
|
82
89
|
for (let l3 = 0; l3 < r7.length; l3++) {
|
|
83
90
|
const o5 = r7[l3], u4 = e5.actionPermissions[o5];
|
|
84
91
|
if (u4 && u4.notEmpty) {
|
|
92
|
+
if ((_a = e5.hiddenNotValidatorCodes) == null ? void 0 : _a.has(o5)) continue;
|
|
85
93
|
let r8 = false;
|
|
86
94
|
if (n5[o5] ? Array.isArray(n5[o5]) && 0 === n5[o5].length && (r8 = true) : r8 = true, r8) {
|
|
87
95
|
const r9 = s(e5, o5);
|
|
88
96
|
if (!r9) return true;
|
|
89
97
|
const l4 = r9.getConfigure();
|
|
90
|
-
if ((
|
|
91
|
-
if (false === a(u4.notEmptyCondition.parentCondition.replaceAll("${field[", "${parent["), e5.dataTypeMaps, n5, {}, (
|
|
98
|
+
if ((_b = u4.notEmptyCondition) == null ? void 0 : _b.parentCondition) {
|
|
99
|
+
if (false === a(u4.notEmptyCondition.parentCondition.replaceAll("${field[", "${parent["), e5.dataTypeMaps, n5, {}, (_c = e5.entity) == null ? void 0 : _c.request, (_d = e5.entity) == null ? void 0 : _d.task, e5.contextParam)) return true;
|
|
92
100
|
}
|
|
93
101
|
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: l4.title ? l4.title : o5 }), type: "warning" }), false;
|
|
94
102
|
}
|
|
@@ -96,18 +104,32 @@ function g(e2, n2, r2) {
|
|
|
96
104
|
}
|
|
97
105
|
return true;
|
|
98
106
|
}(n4, e4)) return void o4(false);
|
|
99
|
-
const r6 = true,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
const r6 = true, c2 = Object.assign({}, w2), R2 = n4.hiddenNotValidatorCodes;
|
|
108
|
+
R2 && R2.size > 0 && R2.forEach((e5) => {
|
|
109
|
+
c2.subRules && delete c2.subRules[e5], c2.rules && delete c2.rules[e5];
|
|
110
|
+
}), c2.subRules && (Object.keys(c2.subRules).length > 0 ? c2.totalSubRules || (c2.totalSubRules = {}) : delete c2.subRules);
|
|
111
|
+
const v2 = window.$vueApp.config.globalProperties.$formValidator(e4, c2, p2, f3, m3, d3, g2, r6);
|
|
112
|
+
y2 = v2.msg, l2 = v2.field, u3 = v2.listCode, b2 = v2.rowIndex, h2 = v2.pageNum;
|
|
113
|
+
} else y2 = true;
|
|
114
|
+
if (true !== y2) {
|
|
115
|
+
if (t({ showClose: true, message: y2 + "", type: "warning" }), u3) {
|
|
106
116
|
const e5 = s(n4, u3);
|
|
107
|
-
|
|
117
|
+
if (e5 && e5.addRequiredClass) {
|
|
118
|
+
e5.addRequiredClass(l2, b2, h2);
|
|
119
|
+
try {
|
|
120
|
+
c(n4, u3), e5.scrollToCell({ fieldName: l2, rowIndex: b2, pageNum: h2 });
|
|
121
|
+
} catch (e6) {
|
|
122
|
+
}
|
|
123
|
+
}
|
|
108
124
|
} else {
|
|
109
125
|
const e5 = s(n4, l2);
|
|
110
|
-
|
|
126
|
+
if (e5 && e5.addRequiredClass) {
|
|
127
|
+
e5.addRequiredClass();
|
|
128
|
+
try {
|
|
129
|
+
c(n4, l2);
|
|
130
|
+
} catch (e6) {
|
|
131
|
+
}
|
|
132
|
+
}
|
|
111
133
|
}
|
|
112
134
|
o4(false);
|
|
113
135
|
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, o4(e4);
|
|
@@ -118,7 +140,7 @@ function g(e2, n2, r2) {
|
|
|
118
140
|
});
|
|
119
141
|
}(n3, o3, r3) : function(e4, t2, s2) {
|
|
120
142
|
return new Promise((n4, r4) => {
|
|
121
|
-
|
|
143
|
+
w(e4, t2, s2).then((t3) => {
|
|
122
144
|
if (t3) {
|
|
123
145
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
124
146
|
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, n4(t4);
|
|
@@ -132,9 +154,9 @@ function g(e2, n2, r2) {
|
|
|
132
154
|
return new Promise((e4, t2) => {
|
|
133
155
|
e4(true);
|
|
134
156
|
});
|
|
135
|
-
}(r2, f2,
|
|
157
|
+
}(r2, f2, d2, e2);
|
|
136
158
|
}
|
|
137
|
-
function
|
|
159
|
+
function y(e2) {
|
|
138
160
|
return new Promise((t2, s2) => {
|
|
139
161
|
const r2 = [], i2 = e2.customValidatorUuids;
|
|
140
162
|
i2 && i2.forEach((t3) => {
|
|
@@ -145,11 +167,13 @@ function b(e2) {
|
|
|
145
167
|
}) : t2(true);
|
|
146
168
|
});
|
|
147
169
|
}
|
|
148
|
-
function
|
|
170
|
+
function w(e2, s2, r2) {
|
|
149
171
|
return new Promise((l2, a2) => {
|
|
150
|
-
const f2 = JSON.parse(JSON.stringify(e2));
|
|
151
|
-
if (
|
|
152
|
-
|
|
172
|
+
const f2 = JSON.parse(JSON.stringify(e2)), c2 = { ...r2 }, m2 = s2.hiddenNotValidatorCodes;
|
|
173
|
+
if (c2 && m2 && m2.size > 0 && m2.forEach((e3) => {
|
|
174
|
+
delete c2[e3];
|
|
175
|
+
}), c2 && 0 !== Object.keys(c2).length) {
|
|
176
|
+
if (true === p(f2, c2, null, null, true, s2)) {
|
|
153
177
|
const e3 = function(e4) {
|
|
154
178
|
var _a;
|
|
155
179
|
if (!e4) return true;
|
|
@@ -157,16 +181,30 @@ function h(e2, s2, r2) {
|
|
|
157
181
|
const s3 = e4.tableUuids;
|
|
158
182
|
if (!s3) return true;
|
|
159
183
|
for (let r3 = 0; r3 < s3.length; r3++) {
|
|
160
|
-
const l3 = s3[r3], o2 =
|
|
161
|
-
if (o2)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
184
|
+
const l3 = s3[r3], o2 = e4.hiddenNotValidatorCodes;
|
|
185
|
+
if (o2 && o2.size > 0 && o2.has(l3)) continue;
|
|
186
|
+
const a3 = n(e4, l3);
|
|
187
|
+
if (a3) {
|
|
188
|
+
if (a3.getConfigure()) {
|
|
189
|
+
const s4 = a3.getConfigure();
|
|
190
|
+
if ((_a = s4 == null ? void 0 : s4.verification) == null ? void 0 : _a.notEmpty) {
|
|
191
|
+
const n2 = a3.getTableData();
|
|
192
|
+
if (!n2 || !Array.isArray(n2) || 0 === n2.length) {
|
|
193
|
+
try {
|
|
194
|
+
d(e4, l3);
|
|
195
|
+
} catch (e5) {
|
|
196
|
+
}
|
|
197
|
+
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: s4.title ? s4.title : s4.code }), type: "warning" }), false;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (!a3.validatorSunTableListData()) {
|
|
202
|
+
try {
|
|
203
|
+
d(e4, l3);
|
|
204
|
+
} catch (e5) {
|
|
167
205
|
}
|
|
206
|
+
return false;
|
|
168
207
|
}
|
|
169
|
-
if (!o2.validatorSunTableListData()) return false;
|
|
170
208
|
}
|
|
171
209
|
}
|
|
172
210
|
return true;
|
|
@@ -193,10 +231,10 @@ function h(e2, s2, r2) {
|
|
|
193
231
|
return null;
|
|
194
232
|
}(s2);
|
|
195
233
|
e4 && o(e4) ? e4.then((e5) => {
|
|
196
|
-
e5 ?
|
|
234
|
+
e5 ? y(s2).then((e6) => {
|
|
197
235
|
l2(e6);
|
|
198
236
|
}) : l2(false);
|
|
199
|
-
}) :
|
|
237
|
+
}) : y(s2).then((e5) => {
|
|
200
238
|
l2(e5);
|
|
201
239
|
});
|
|
202
240
|
} else a2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
@@ -204,7 +242,7 @@ function h(e2, s2, r2) {
|
|
|
204
242
|
} else l2(true);
|
|
205
243
|
});
|
|
206
244
|
}
|
|
207
|
-
function
|
|
245
|
+
function R(e2, t2, s2) {
|
|
208
246
|
if (!t2) return s2;
|
|
209
247
|
s2 || (s2 = {});
|
|
210
248
|
const n2 = u(e2), r2 = Object.keys(t2), i2 = t2;
|
|
@@ -214,35 +252,35 @@ function w(e2, t2, s2) {
|
|
|
214
252
|
Object.keys(e4).forEach((t3) => {
|
|
215
253
|
s2.subRules || (s2.subRules = {}), s2.subRules[t3] ? Object.assign(s2.subRules[t3], e4[t3]) : s2.subRules[t3] = e4[t3];
|
|
216
254
|
});
|
|
217
|
-
} else
|
|
218
|
-
}),
|
|
255
|
+
} else T(i2[e3]), n2 ? (s2.rules[e3] = i2[e3], s2[e3] && (s2[e3] = i2[e3])) : s2[e3] = i2[e3];
|
|
256
|
+
}), g(s2);
|
|
219
257
|
}
|
|
220
|
-
function
|
|
258
|
+
function v(e2) {
|
|
221
259
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
222
260
|
const t2 = {}, s2 = Object.keys(e2);
|
|
223
261
|
for (let n2 = 0; n2 < s2.length; n2++) {
|
|
224
262
|
const r2 = s2[n2], i2 = e2[r2];
|
|
225
|
-
|
|
263
|
+
P(i2), r2.indexOf(".") > 0 ? m(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
226
264
|
}
|
|
227
265
|
return t2;
|
|
228
266
|
}
|
|
229
|
-
function
|
|
267
|
+
function P(e2, t2) {
|
|
230
268
|
e2.forEach((e3) => {
|
|
231
269
|
e3.message;
|
|
232
270
|
const t3 = e3.label, s2 = i().t(t3);
|
|
233
271
|
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 }));
|
|
234
272
|
});
|
|
235
273
|
}
|
|
236
|
-
function
|
|
274
|
+
function E(e2) {
|
|
237
275
|
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 = l(e2), r2 = e2.entity.context, i2 = e2.entity.task;
|
|
238
276
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
239
277
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
240
278
|
});
|
|
241
279
|
let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, i2, r2);
|
|
242
280
|
const a2 = e2.customRules;
|
|
243
|
-
return o2 =
|
|
281
|
+
return o2 = R(e2, a2, o2), o2 && (o2.rules || (o2.rules = {}), o2.subRules || (o2.subRules = {})), o2;
|
|
244
282
|
}
|
|
245
|
-
function
|
|
283
|
+
function k(e2, t2) {
|
|
246
284
|
if (!t2) return;
|
|
247
285
|
const n2 = {};
|
|
248
286
|
if (t2.forEach((e3) => {
|
|
@@ -250,30 +288,30 @@ function P(e2, t2) {
|
|
|
250
288
|
s2 ? n2[t3] = s2 : false === e3.required && (n2[t3] = []);
|
|
251
289
|
}), u(e2)) {
|
|
252
290
|
let t3 = e2.workflowRules ? e2.workflowRules : { rules: {}, subRules: {} };
|
|
253
|
-
t3 =
|
|
291
|
+
t3 = R(e2, n2, t3), e2.workflowRules = t3;
|
|
254
292
|
} else {
|
|
255
293
|
let t3 = e2.rules ? e2.rules : {};
|
|
256
|
-
t3 =
|
|
294
|
+
t3 = R(e2, n2, t3), e2.rules = t3;
|
|
257
295
|
}
|
|
258
296
|
const r2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
259
|
-
r2 && r2.length > 0 &&
|
|
297
|
+
r2 && r2.length > 0 && O(e2, r2[0]), t2.forEach((t3) => {
|
|
260
298
|
if ("_all_fields" !== t3.name) {
|
|
261
299
|
const n3 = s(e2, t3.name);
|
|
262
|
-
|
|
300
|
+
x(e2, n3, t3);
|
|
263
301
|
}
|
|
264
302
|
});
|
|
265
303
|
}
|
|
266
|
-
function
|
|
267
|
-
|
|
304
|
+
function C(e2) {
|
|
305
|
+
O(e2, { disabled: true });
|
|
268
306
|
}
|
|
269
|
-
function
|
|
307
|
+
function O(e2, t2) {
|
|
270
308
|
const s2 = r(e2);
|
|
271
309
|
if (s2) for (const n2 in s2) {
|
|
272
310
|
const r2 = s2[n2];
|
|
273
|
-
|
|
311
|
+
x(e2, r2 ? r2.value : r2, t2);
|
|
274
312
|
}
|
|
275
313
|
}
|
|
276
|
-
function
|
|
314
|
+
function j(e2, t2, r2) {
|
|
277
315
|
var _a;
|
|
278
316
|
let i2, l2;
|
|
279
317
|
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;
|
|
@@ -286,7 +324,7 @@ function O(e2, t2, r2) {
|
|
|
286
324
|
}
|
|
287
325
|
i2.dynamicControlTableEdit(e2, t2, u2);
|
|
288
326
|
}
|
|
289
|
-
function
|
|
327
|
+
function x(e2, t2, s2) {
|
|
290
328
|
var _a, _b, _c;
|
|
291
329
|
if (t2) {
|
|
292
330
|
const n2 = t2.getConfigure();
|
|
@@ -297,30 +335,30 @@ function C(e2, t2, s2) {
|
|
|
297
335
|
}
|
|
298
336
|
}
|
|
299
337
|
}
|
|
300
|
-
function
|
|
338
|
+
function T(e2) {
|
|
301
339
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
302
|
-
const t2 =
|
|
340
|
+
const t2 = N[e2.type];
|
|
303
341
|
t2 && (e2.validator = t2.validator);
|
|
304
342
|
}
|
|
305
|
-
const
|
|
306
|
-
return true ===
|
|
343
|
+
const N = { boolean: { validator: function(e2, t2, s2) {
|
|
344
|
+
return true === M(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
307
345
|
} }, date: { validator: function(e2, t2, s2) {
|
|
308
|
-
if (true !==
|
|
346
|
+
if (true !== M(e2, t2)) return false;
|
|
309
347
|
const n2 = new Date(t2);
|
|
310
348
|
return !isNaN(n2.getTime());
|
|
311
349
|
} }, number: { validator: function(e2, t2, s2) {
|
|
312
|
-
return true ===
|
|
313
|
-
} } },
|
|
350
|
+
return true === M(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
351
|
+
} } }, M = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
314
352
|
export {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
353
|
+
C as disabledAllFields,
|
|
354
|
+
j as dynamicControlTableEdit,
|
|
355
|
+
E as getWorkflowRules,
|
|
356
|
+
P as i18nValidatePropRulesMessage,
|
|
357
|
+
v as i18nValidateRulesMessage,
|
|
358
|
+
R as packageCustomRules,
|
|
359
|
+
T as packageCustomValidator,
|
|
360
|
+
m as setObjectPropRule,
|
|
361
|
+
k as updateFormItemEditState,
|
|
362
|
+
h as validateDataModelFunc,
|
|
363
|
+
p as validator
|
|
326
364
|
};
|
|
@@ -241,7 +241,9 @@ function rowDataToColumn(e, t, r) {
|
|
|
241
241
|
});
|
|
242
242
|
n2 && (o2.$GroupColumn = n2.props.base.name), e.forEach((e2) => {
|
|
243
243
|
a.forEach((r2) => {
|
|
244
|
-
const a2 = e2[r2]
|
|
244
|
+
const a2 = e2[r2];
|
|
245
|
+
if (!a2) return;
|
|
246
|
+
const n3 = e2[t3];
|
|
245
247
|
o2[a2] = n3;
|
|
246
248
|
});
|
|
247
249
|
}), s.push(o2);
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as i, nextTick as o, resolveComponent as s, createElementBlock as n, openBlock as l, createVNode as r, normalizeClass as a, normalizeStyle as u, unref as p, withCtx as f, createCommentVNode as m, toDisplayString as g, Fragment as c, renderList as d, createBlock as y } from "vue";
|
|
2
2
|
import v from "../../object-render.vue.js";
|
|
3
3
|
import { PageDimensions as x } from "../../../../utils/interfaces/page-design-types.js";
|
|
4
4
|
import { handleFormEvent as C } from "../../../../utils/events/event-util.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
import { getClobalComponentSettingByType as b, globalComponentCacheKeyMap as k } from "agilebuilder-ui/src/utils/global-component-setting.ts";
|
|
6
|
+
const P = e({ __name: "form-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
7
|
+
const P2 = e2, h = t("left"), j = b(k.FORM);
|
|
8
|
+
if (j) {
|
|
9
|
+
const e3 = JSON.parse(j);
|
|
10
|
+
e3.requireAsteriskPosition && (h.value = e3.requireAsteriskPosition);
|
|
11
|
+
}
|
|
12
|
+
P2.configure.items || (P2.configure.items = []);
|
|
13
|
+
const q = P2.configure.runtime ? P2.configure.runtime : {}, S = q.props ? q.props : {}, _ = t(q.style ? q.style : {}), w = q.class, z = t(q.titleStyle ? q.titleStyle : {}), O = t(S.labelPosition), R = t(null), A = P2.pageContext && P2.pageContext.dimensions ? P2.pageContext.dimensions : x.PC;
|
|
14
|
+
return A && A === x.PHONE && (O.value = "top"), i(() => {
|
|
15
|
+
o(() => {
|
|
16
|
+
C(null, P2.pageContext, P2.configure, "afterFormLoad", { componentRef: R.value, entity: P2.pageContext.entity.data, pageData: P2.pageContext.entity.page });
|
|
12
17
|
});
|
|
13
18
|
}), (e3, t2) => {
|
|
14
|
-
const
|
|
15
|
-
return
|
|
19
|
+
const i2 = s("el-form");
|
|
20
|
+
return l(), n("div", null, [r(i2, { ref_key: "thisRef", ref: R, "label-width": p(S).labelWidth, "label-position": O.value, size: p(S).componentSize, "require-asterisk-position": h.value, style: u(_.value), class: a(p(w)) }, { default: f(() => [p(S).formTitle ? (l(), n("div", { key: 0, class: "amb-widget-form-title", style: u(z.value) }, g(p(S).formTitle), 5)) : m("", true), (l(true), n(c, null, d(e3.configure.items, (t3, i3) => (l(), y(v, { key: t3.uuid, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"]))), 128))]), _: 1 }, 8, ["label-width", "label-position", "size", "require-asterisk-position", "style", "class"])]);
|
|
16
21
|
};
|
|
17
22
|
} });
|
|
18
23
|
export {
|
|
19
|
-
|
|
24
|
+
P as default
|
|
20
25
|
};
|