@baishuyun/ai-feat-utils 2.0.8 → 2.0.9
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/ai-feat-utils.js +1232 -146
- package/dist/ai-feat-utils.js.map +1 -1
- package/dist/field-json.d.ts +2 -0
- package/dist/field-json.d.ts.map +1 -1
- package/dist/fields-json-rebuild/build-widget-name.d.ts +2 -0
- package/dist/fields-json-rebuild/build-widget-name.d.ts.map +1 -0
- package/dist/fields-json-rebuild/default-builder.d.ts +2 -0
- package/dist/fields-json-rebuild/default-builder.d.ts.map +1 -0
- package/dist/fields-json-rebuild/index.d.ts +6 -0
- package/dist/fields-json-rebuild/index.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-address.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-address.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-button.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-button.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-checkbox-group.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-checkbox-group.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-combo-checker.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-combo-checker.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-data-linker.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-data-linker.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-data-loader.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-data-loader.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-data-query.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-data-query.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-date-time.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-date-time.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-dept-group.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-dept-group.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-dept.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-dept.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-image.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-image.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-line.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-line.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-location.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-location.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-number.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-number.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-radio-group.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-radio-group.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-select.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-select.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-signature.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-signature.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-sn.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-sn.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-subform.d.ts +57 -0
- package/dist/fields-json-rebuild/rebuild-subform.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-text.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-text.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-textarea.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-textarea.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-upload.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-upload.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-user-group.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-user-group.d.ts.map +1 -0
- package/dist/fields-json-rebuild/rebuild-user.d.ts +2 -0
- package/dist/fields-json-rebuild/rebuild-user.d.ts.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/ai-feat-utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const d = (e) => {
|
|
2
2
|
if ((e == null ? void 0 : e.type) !== "text" || !e.providerMetadata || !e.providerMetadata.raw || !e.providerMetadata.raw.data)
|
|
3
3
|
return null;
|
|
4
4
|
if (typeof e.providerMetadata.raw.data != "string")
|
|
@@ -10,19 +10,19 @@ const s = (e) => {
|
|
|
10
10
|
console.error("invalid raw data");
|
|
11
11
|
}
|
|
12
12
|
return t || e.providerMetadata.raw.data;
|
|
13
|
-
},
|
|
13
|
+
}, k = (e) => {
|
|
14
14
|
if ((e == null ? void 0 : e.type) === "error")
|
|
15
15
|
return !0;
|
|
16
|
-
const t =
|
|
16
|
+
const t = d(e);
|
|
17
17
|
return (t == null ? void 0 : t.type) === "agent-error";
|
|
18
|
-
},
|
|
19
|
-
const t =
|
|
18
|
+
}, ce = (e) => {
|
|
19
|
+
const t = d(e);
|
|
20
20
|
return (t == null ? void 0 : t.type) === "agent-fake-msg";
|
|
21
|
-
},
|
|
22
|
-
const t =
|
|
21
|
+
}, ge = (e) => (e == null ? void 0 : e.type) === "file", me = (e) => {
|
|
22
|
+
const t = d(e);
|
|
23
23
|
return (t == null ? void 0 : t.type) === "query-stream-parsed-info";
|
|
24
|
-
},
|
|
25
|
-
const t =
|
|
24
|
+
}, pe = (e) => {
|
|
25
|
+
const t = d(e);
|
|
26
26
|
if ((t == null ? void 0 : t.type) !== "query-stream-parsed-info")
|
|
27
27
|
return null;
|
|
28
28
|
const r = t.result;
|
|
@@ -32,51 +32,51 @@ const s = (e) => {
|
|
|
32
32
|
} catch (n) {
|
|
33
33
|
return console.error("invalid query result data"), null;
|
|
34
34
|
}
|
|
35
|
-
},
|
|
35
|
+
}, fe = (e) => {
|
|
36
36
|
if (!Array.isArray(e))
|
|
37
37
|
return !1;
|
|
38
38
|
for (const t of e)
|
|
39
39
|
if ((t == null ? void 0 : t.type) === "file")
|
|
40
40
|
return !0;
|
|
41
41
|
return !1;
|
|
42
|
-
},
|
|
43
|
-
const t =
|
|
42
|
+
}, be = (e) => {
|
|
43
|
+
const t = d(e);
|
|
44
44
|
return (t == null ? void 0 : t.type) === "agent-loading";
|
|
45
|
-
},
|
|
46
|
-
const t =
|
|
45
|
+
}, we = (e) => {
|
|
46
|
+
const t = d(e);
|
|
47
47
|
return (t == null ? void 0 : t.type) !== "agent-loading" ? "" : (t == null ? void 0 : t.label) || "加载中";
|
|
48
|
-
},
|
|
49
|
-
if (!
|
|
48
|
+
}, ye = (e) => {
|
|
49
|
+
if (!k(e))
|
|
50
50
|
return "";
|
|
51
51
|
if (e != null && e.errorText)
|
|
52
52
|
return e.errorText;
|
|
53
|
-
const t =
|
|
53
|
+
const t = d(e);
|
|
54
54
|
return (t == null ? void 0 : t.error) || "未知错误";
|
|
55
|
-
},
|
|
55
|
+
}, he = (e) => {
|
|
56
56
|
if (e != null && e.errorText)
|
|
57
57
|
return e.errorText;
|
|
58
|
-
const t =
|
|
58
|
+
const t = d(e);
|
|
59
59
|
return (t == null ? void 0 : t.error) || "未知错误";
|
|
60
|
-
},
|
|
61
|
-
if (e.querySelector(`[${
|
|
60
|
+
}, b = "data-shadow-slot-injected", ve = (e, t) => {
|
|
61
|
+
if (e.querySelector(`[${b}]`)) return;
|
|
62
62
|
const r = (a) => {
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
const l = a.cloneNode(!0);
|
|
64
|
+
l.setAttribute(b, ""), e.appendChild(l);
|
|
65
65
|
};
|
|
66
66
|
document.head.querySelectorAll("style").forEach(r), document.head.querySelectorAll('link[rel="stylesheet"]').forEach(r);
|
|
67
67
|
let n = t.parentNode;
|
|
68
68
|
for (; n; )
|
|
69
69
|
n instanceof ShadowRoot && (n.querySelectorAll("style").forEach(r), n.querySelectorAll('link[rel="stylesheet"]').forEach(r)), n = n.parentNode;
|
|
70
70
|
};
|
|
71
|
-
function
|
|
71
|
+
function C(e) {
|
|
72
72
|
return Array.isArray(e) ? e.every((t) => typeof t == "string") : !1;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function N(e) {
|
|
75
75
|
return Array.isArray(e) ? e.every(
|
|
76
76
|
(t) => typeof t == "object" && t !== null && "label" in t && "value" in t && typeof t.label == "string" && typeof t.value == "string"
|
|
77
77
|
) : !1;
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const Se = (e) => C(e) ? e.join(", ") : N(e) ? e.map((r) => r.value).join(", ") : e, x = /* @__PURE__ */ new Set([
|
|
80
80
|
"password",
|
|
81
81
|
"textarea",
|
|
82
82
|
"datetime",
|
|
@@ -87,25 +87,31 @@ const G = (e) => w(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ") :
|
|
|
87
87
|
"combocheck",
|
|
88
88
|
"checkboxgroup",
|
|
89
89
|
"number"
|
|
90
|
-
]),
|
|
91
|
-
const r =
|
|
90
|
+
]), Ae = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? x.has(t.widget.type) : !1) : [], M = (e) => (t) => {
|
|
91
|
+
const r = d(t);
|
|
92
92
|
return (r == null ? void 0 : r.type) === e;
|
|
93
|
-
},
|
|
94
|
-
const r =
|
|
93
|
+
}, _e = (e) => (t) => {
|
|
94
|
+
const r = t, n = r == null ? void 0 : r.part;
|
|
95
|
+
return M(e)(n);
|
|
96
|
+
}, ke = (e) => (t) => {
|
|
97
|
+
const r = d(t);
|
|
95
98
|
return (r == null ? void 0 : r.type) !== e ? null : (r == null ? void 0 : r.field) || null;
|
|
96
|
-
},
|
|
99
|
+
}, Ce = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Ne = (e) => {
|
|
97
100
|
try {
|
|
98
101
|
return JSON.parse(e);
|
|
99
102
|
} catch (t) {
|
|
100
|
-
return console.
|
|
103
|
+
return console.info("[safeParseJson] Failed to parse JSON:", t), null;
|
|
101
104
|
}
|
|
102
|
-
},
|
|
105
|
+
}, q = (e = "_widget_") => {
|
|
106
|
+
const t = Date.now(), r = String(t), n = r.length, a = r.slice(0, n - 5), l = String(Math.floor(Math.random() * 1e5)).padStart(5, "0");
|
|
107
|
+
return `${e}${a}${l}`;
|
|
108
|
+
}, xe = 10, Me = (e, t = "image/png") => new Promise((r) => {
|
|
103
109
|
const n = new Image();
|
|
104
110
|
n.crossOrigin = "anonymous", n.onload = () => {
|
|
105
111
|
const a = document.createElement("canvas");
|
|
106
112
|
a.width = n.naturalWidth, a.height = n.naturalHeight, a.getContext("2d").drawImage(n, 0, 0), r(a.toDataURL(t));
|
|
107
113
|
}, n.onerror = () => r(e), n.src = e;
|
|
108
|
-
}),
|
|
114
|
+
}), qe = {
|
|
109
115
|
eq: "等于",
|
|
110
116
|
neq: "不等于",
|
|
111
117
|
gt: "大于",
|
|
@@ -120,7 +126,7 @@ const G = (e) => w(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ") :
|
|
|
120
126
|
empty: "为空",
|
|
121
127
|
not_empty: "不为空",
|
|
122
128
|
range: "范围"
|
|
123
|
-
},
|
|
129
|
+
}, F = {
|
|
124
130
|
// Text-like: equality, fuzzy, empty checks
|
|
125
131
|
text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
|
|
126
132
|
password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
|
|
@@ -164,7 +170,7 @@ const G = (e) => w(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ") :
|
|
|
164
170
|
button: [],
|
|
165
171
|
subform: [],
|
|
166
172
|
unknown: []
|
|
167
|
-
},
|
|
173
|
+
}, E = {
|
|
168
174
|
text: "eq",
|
|
169
175
|
password: "eq",
|
|
170
176
|
radiogroup: "eq",
|
|
@@ -192,104 +198,104 @@ const G = (e) => w(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ") :
|
|
|
192
198
|
dataload: "eq",
|
|
193
199
|
formula: "eq"
|
|
194
200
|
};
|
|
195
|
-
function
|
|
201
|
+
function Fe(e) {
|
|
196
202
|
var t;
|
|
197
|
-
return e ? (t =
|
|
203
|
+
return e ? (t = F[e]) != null ? t : [] : [];
|
|
198
204
|
}
|
|
199
|
-
function
|
|
205
|
+
function Ee(e) {
|
|
200
206
|
var t;
|
|
201
|
-
return e && (t =
|
|
207
|
+
return e && (t = E[e]) != null ? t : "eq";
|
|
202
208
|
}
|
|
203
|
-
function
|
|
209
|
+
function m(e) {
|
|
204
210
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
205
211
|
}
|
|
206
|
-
function
|
|
207
|
-
return
|
|
212
|
+
function A(e) {
|
|
213
|
+
return m(e) ? e : null;
|
|
208
214
|
}
|
|
209
|
-
function
|
|
215
|
+
function w(e) {
|
|
210
216
|
return !!(e == null || e === "" || Array.isArray(e) && e.length === 0);
|
|
211
217
|
}
|
|
212
218
|
function y(e, t) {
|
|
213
219
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
214
220
|
if (e.length !== t.length) return !1;
|
|
215
221
|
const r = e.map(String).sort(), n = t.map(String).sort();
|
|
216
|
-
return r.every((a,
|
|
222
|
+
return r.every((a, l) => a === n[l]);
|
|
217
223
|
}
|
|
218
|
-
if (
|
|
224
|
+
if (m(e) && m(t)) {
|
|
219
225
|
const r = Object.keys(e), n = Object.keys(t);
|
|
220
226
|
return r.length !== n.length ? !1 : r.every((a) => String(e[a]) === String(t[a]));
|
|
221
227
|
}
|
|
222
228
|
return String(e) === String(t);
|
|
223
229
|
}
|
|
224
230
|
function h(e, t) {
|
|
225
|
-
if (
|
|
226
|
-
const n =
|
|
231
|
+
if (m(t)) {
|
|
232
|
+
const n = A(e);
|
|
227
233
|
return !(!n || t.province !== void 0 && String(n.province) !== String(t.province) || t.city !== void 0 && String(n.city) !== String(t.city) || t.district !== void 0 && String(n.district) !== String(t.district));
|
|
228
234
|
}
|
|
229
235
|
const r = Array.isArray(t) ? t.map(String) : [];
|
|
230
236
|
return Array.isArray(e) ? e.some((n) => r.includes(String(n))) : r.includes(String(e));
|
|
231
237
|
}
|
|
232
|
-
function
|
|
238
|
+
function D(e, t) {
|
|
233
239
|
const r = Array.isArray(t) ? t.map(String) : [];
|
|
234
240
|
if (r.length === 0) return !1;
|
|
235
241
|
const n = Array.isArray(e) ? e.map(String) : [];
|
|
236
242
|
return r.every((a) => n.includes(a));
|
|
237
243
|
}
|
|
238
244
|
function P(e, t) {
|
|
239
|
-
const r =
|
|
245
|
+
const r = A(t);
|
|
240
246
|
if (!r) return !1;
|
|
241
247
|
const n = Number(e);
|
|
242
248
|
return !(isNaN(n) || r.min !== void 0 && r.min !== null && n < Number(r.min) || r.max !== void 0 && r.max !== null && n > Number(r.max));
|
|
243
249
|
}
|
|
244
|
-
function
|
|
245
|
-
var
|
|
246
|
-
const r = (
|
|
250
|
+
function R(e, t) {
|
|
251
|
+
var i;
|
|
252
|
+
const r = (i = e.field.widget) == null ? void 0 : i.widgetName;
|
|
247
253
|
if (!r) return !1;
|
|
248
|
-
const n = t[r], { operator: a, value:
|
|
254
|
+
const n = t[r], { operator: a, value: l } = e;
|
|
249
255
|
switch (a) {
|
|
250
256
|
case "empty":
|
|
251
|
-
return
|
|
257
|
+
return w(n);
|
|
252
258
|
case "not_empty":
|
|
253
|
-
return !
|
|
259
|
+
return !w(n);
|
|
254
260
|
case "eq":
|
|
255
|
-
return y(n,
|
|
261
|
+
return y(n, l);
|
|
256
262
|
case "neq":
|
|
257
|
-
return !y(n,
|
|
263
|
+
return !y(n, l);
|
|
258
264
|
case "contains":
|
|
259
|
-
return String(n).includes(String(
|
|
265
|
+
return String(n).includes(String(l));
|
|
260
266
|
case "not_contains":
|
|
261
|
-
return !String(n).includes(String(
|
|
267
|
+
return !String(n).includes(String(l));
|
|
262
268
|
case "gt":
|
|
263
|
-
return Number(n) > Number(
|
|
269
|
+
return Number(n) > Number(l);
|
|
264
270
|
case "gte":
|
|
265
|
-
return Number(n) >= Number(
|
|
271
|
+
return Number(n) >= Number(l);
|
|
266
272
|
case "lt":
|
|
267
|
-
return Number(n) < Number(
|
|
273
|
+
return Number(n) < Number(l);
|
|
268
274
|
case "lte":
|
|
269
|
-
return Number(n) <= Number(
|
|
275
|
+
return Number(n) <= Number(l);
|
|
270
276
|
case "in":
|
|
271
|
-
return h(n,
|
|
277
|
+
return h(n, l);
|
|
272
278
|
case "nin":
|
|
273
|
-
return !h(n,
|
|
279
|
+
return !h(n, l);
|
|
274
280
|
case "all":
|
|
275
|
-
return
|
|
281
|
+
return D(n, l);
|
|
276
282
|
case "range":
|
|
277
|
-
return P(n,
|
|
283
|
+
return P(n, l);
|
|
278
284
|
default:
|
|
279
285
|
return !1;
|
|
280
286
|
}
|
|
281
287
|
}
|
|
282
|
-
function
|
|
288
|
+
function De(e, t) {
|
|
283
289
|
if (!e.enabled)
|
|
284
290
|
return !1;
|
|
285
291
|
const r = e.triggerCondition;
|
|
286
292
|
if (!r) return !0;
|
|
287
293
|
const { items: n, quantifier: a } = r;
|
|
288
294
|
if (!n || n.length === 0) return !0;
|
|
289
|
-
const
|
|
290
|
-
return a === "any" ?
|
|
295
|
+
const l = n.map((i) => R(i, t));
|
|
296
|
+
return a === "any" ? l.some((i) => i) : l.every((i) => i);
|
|
291
297
|
}
|
|
292
|
-
const
|
|
298
|
+
const Pe = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form" && t.params.formId === e.formId : e.appId ? (t.type === "app" || t.type === "form") && t.params.appId === e.appId : t.type === "global", W = {
|
|
293
299
|
eq: "eq",
|
|
294
300
|
neq: "ne",
|
|
295
301
|
gt: "gt",
|
|
@@ -304,7 +310,7 @@ const ee = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
|
|
|
304
310
|
empty: "empty",
|
|
305
311
|
not_empty: "not_empty",
|
|
306
312
|
range: "range"
|
|
307
|
-
},
|
|
313
|
+
}, T = {
|
|
308
314
|
eq: "eq",
|
|
309
315
|
ne: "neq",
|
|
310
316
|
gt: "gt",
|
|
@@ -320,54 +326,54 @@ const ee = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
|
|
|
320
326
|
not_empty: "not_empty",
|
|
321
327
|
range: "range"
|
|
322
328
|
};
|
|
323
|
-
function
|
|
329
|
+
function Re(e) {
|
|
324
330
|
const t = e.quantifier === "any" ? "or" : "and", r = e.items.map((n) => {
|
|
325
|
-
var
|
|
326
|
-
const a = (
|
|
327
|
-
let
|
|
328
|
-
return n.operator === "range" &&
|
|
329
|
-
field: (
|
|
331
|
+
var i, s, u, c, p, f;
|
|
332
|
+
const a = (i = W[n.operator]) != null ? i : "eq";
|
|
333
|
+
let l;
|
|
334
|
+
return n.operator === "range" && m(n.value) ? l = [n.value.min, n.value.max] : Array.isArray(n.value) ? l = n.value : l = [n.value], {
|
|
335
|
+
field: (c = (u = (s = n.field) == null ? void 0 : s.widget) == null ? void 0 : u.widgetName) != null ? c : "",
|
|
330
336
|
method: a,
|
|
331
|
-
value:
|
|
332
|
-
type: (
|
|
337
|
+
value: l,
|
|
338
|
+
type: (f = (p = n.field) == null ? void 0 : p.widget) == null ? void 0 : f.type
|
|
333
339
|
};
|
|
334
340
|
});
|
|
335
341
|
return JSON.stringify({ rel: t, cond: r });
|
|
336
342
|
}
|
|
337
|
-
function
|
|
338
|
-
const t = JSON.parse(e), r = t.rel === "or" ? "any" : "all", n = t.cond.map((a,
|
|
339
|
-
var
|
|
340
|
-
const
|
|
341
|
-
let
|
|
342
|
-
return
|
|
343
|
-
id: `${a.field}_${
|
|
343
|
+
function We(e) {
|
|
344
|
+
const t = JSON.parse(e), r = t.rel === "or" ? "any" : "all", n = t.cond.map((a, l) => {
|
|
345
|
+
var u, c;
|
|
346
|
+
const i = (u = T[a.method]) != null ? u : "eq";
|
|
347
|
+
let s = a.value;
|
|
348
|
+
return i === "range" ? s = { min: a.value[0], max: a.value[1] } : ["eq", "neq", "contains", "not_contains", "gt", "gte", "lt", "lte"].includes(i) && (s = a.value[0]), {
|
|
349
|
+
id: `${a.field}_${l}`,
|
|
344
350
|
field: {
|
|
345
351
|
label: a.field,
|
|
346
352
|
widget: {
|
|
347
353
|
widgetName: a.field,
|
|
348
|
-
type: (
|
|
354
|
+
type: (c = a.type) != null ? c : "unknown",
|
|
349
355
|
value: void 0
|
|
350
356
|
}
|
|
351
357
|
},
|
|
352
|
-
operator:
|
|
353
|
-
value:
|
|
358
|
+
operator: i,
|
|
359
|
+
value: s
|
|
354
360
|
};
|
|
355
361
|
});
|
|
356
362
|
return { targetName: "", quantifier: r, items: n };
|
|
357
363
|
}
|
|
358
|
-
function
|
|
364
|
+
function Te(e, t, r = 1) {
|
|
359
365
|
const n = [], a = [];
|
|
360
|
-
for (const
|
|
361
|
-
t(
|
|
366
|
+
for (const l of e)
|
|
367
|
+
t(l) ? a.push(l) : (a.length > 0 && (n.push(a.length >= r ? [...a] : a[0]), a.length = 0), n.push(l));
|
|
362
368
|
return a.length > 0 && n.push(a.length >= 2 ? [...a] : a[0]), n;
|
|
363
369
|
}
|
|
364
|
-
function
|
|
370
|
+
function _(e) {
|
|
365
371
|
const t = [];
|
|
366
372
|
for (const r of e)
|
|
367
|
-
Array.isArray(r) ? t.push(...
|
|
373
|
+
Array.isArray(r) ? t.push(..._(r)) : t.push(r);
|
|
368
374
|
return t;
|
|
369
375
|
}
|
|
370
|
-
const
|
|
376
|
+
const B = {
|
|
371
377
|
projectdevelopment: "e914",
|
|
372
378
|
resourcelibrary: "e915",
|
|
373
379
|
Plugin2: "e90e",
|
|
@@ -761,69 +767,1149 @@ const M = {
|
|
|
761
767
|
Automation1: "ea95",
|
|
762
768
|
Avatar: "ea96"
|
|
763
769
|
};
|
|
764
|
-
function
|
|
765
|
-
const t =
|
|
770
|
+
function Be(e) {
|
|
771
|
+
const t = B[e];
|
|
766
772
|
return t ? `&#x${t};` : void 0;
|
|
767
773
|
}
|
|
768
|
-
const
|
|
774
|
+
const Oe = (e, t, r) => {
|
|
769
775
|
if (!r)
|
|
770
776
|
return {
|
|
771
777
|
translated: ""
|
|
772
778
|
};
|
|
773
|
-
const n = new Map(t.map((
|
|
774
|
-
for (const
|
|
775
|
-
if (
|
|
776
|
-
for (const
|
|
777
|
-
if ("widget" in
|
|
778
|
-
const
|
|
779
|
-
n.set(
|
|
779
|
+
const n = new Map(t.map((i) => [i.widget.widgetName, i.label]));
|
|
780
|
+
for (const i of t)
|
|
781
|
+
if (i.widget.type === "subform" && i.widget.items) {
|
|
782
|
+
for (const s of i.widget.items)
|
|
783
|
+
if ("widget" in s && !("options" in s)) {
|
|
784
|
+
const u = `${i.widget.widgetName}.${s.widget.widgetName}`;
|
|
785
|
+
n.set(u, s.label);
|
|
780
786
|
}
|
|
781
787
|
}
|
|
782
|
-
const a = [],
|
|
788
|
+
const a = [], l = e.replace(
|
|
783
789
|
/\$\{(_widget_\d+(?:\._widget_\d+)?)\}/g,
|
|
784
|
-
(
|
|
785
|
-
const { translated:
|
|
786
|
-
return
|
|
790
|
+
(i, s) => {
|
|
791
|
+
const { translated: u, meta: c } = r(s);
|
|
792
|
+
return c && a.push(c), u;
|
|
787
793
|
}
|
|
788
794
|
);
|
|
789
795
|
return {
|
|
790
|
-
meta: a.length ?
|
|
791
|
-
translated: (
|
|
796
|
+
meta: a.length ? _(a) : null,
|
|
797
|
+
translated: (l != null ? l : "").trim()
|
|
798
|
+
};
|
|
799
|
+
}, O = {
|
|
800
|
+
手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
|
|
801
|
+
电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
|
|
802
|
+
邮政编码: "^\\d{6}$",
|
|
803
|
+
身份证号码: "(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)",
|
|
804
|
+
邮箱: "^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$",
|
|
805
|
+
时分: "(^[0-1]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$|^[2]{1}[0-3]{1}:[0-5]{1}[0-9]{1}$|^[0-9]{1}:[0-5]{1}[0-9]{1}$)",
|
|
806
|
+
时分秒: "(^[0-1]{1}[0-9]{1}:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$|^[2]{1}[0-3]{1}:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$|^[0-9]{1}:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$)",
|
|
807
|
+
图片链接: "imageurl",
|
|
808
|
+
二维码图片: "qrcode",
|
|
809
|
+
条形码图片: "barcode",
|
|
810
|
+
自定义: "custom"
|
|
811
|
+
}, v = (e) => {
|
|
812
|
+
const { widget: t, labelStyle: r, label: n, ...a } = e || {}, l = O[r] || "";
|
|
813
|
+
return {
|
|
814
|
+
widget: {
|
|
815
|
+
widgetName: `_widget_${Date.now()}`,
|
|
816
|
+
widgetNameAlias: "",
|
|
817
|
+
// triggerEvent: 0,
|
|
818
|
+
customCls: null,
|
|
819
|
+
height: 34,
|
|
820
|
+
width: 350,
|
|
821
|
+
text: null,
|
|
822
|
+
value: "",
|
|
823
|
+
//默认值 没有默认值的话 整个value不存在
|
|
824
|
+
enable: !0,
|
|
825
|
+
visible: !0,
|
|
826
|
+
// hint: placeholder,
|
|
827
|
+
allowBlank: !0,
|
|
828
|
+
rely: null,
|
|
829
|
+
libs: [],
|
|
830
|
+
extendSet: {
|
|
831
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
832
|
+
status: !0,
|
|
833
|
+
triggerField: "",
|
|
834
|
+
triggerFieldMode: "none",
|
|
835
|
+
version: 1
|
|
836
|
+
},
|
|
837
|
+
// regex, //格式 ^((\(\d{2,3}\))|(\d{3}\-))?1\d{10}$ 手机号码 ^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$ 电话号码 ^\d{6}$ 邮政编码 (^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$) 身份证号码 ^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$ 邮箱 (^[0-1]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$|^[2]{1}[0-3]{1}:[0-5]{1}[0-9]{1}$|^[0-9]{1}:[0-5]{1}[0-9]{1}$) 时分 (^[0-1]{1}[0-9]{1}:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$|^[2]{1}[0-3]{1}:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$|^[0-9]{1}:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$) 时分秒 imageurl 图片链接 qrcode 二维码图片 barcode 条形码图片 custom 自定义
|
|
838
|
+
noRepeat: !0,
|
|
839
|
+
scan: null,
|
|
840
|
+
// textMode,
|
|
841
|
+
generateQR: !1,
|
|
842
|
+
eventAlert: !0,
|
|
843
|
+
alertinfo: {
|
|
844
|
+
icon: "error"
|
|
845
|
+
// tip: placeholder,
|
|
846
|
+
// msg: placeholder,
|
|
847
|
+
},
|
|
848
|
+
enterClearText: !0,
|
|
849
|
+
...t,
|
|
850
|
+
regex: l,
|
|
851
|
+
type: "text",
|
|
852
|
+
labelStyle: n
|
|
853
|
+
},
|
|
854
|
+
// description,
|
|
855
|
+
label: n,
|
|
856
|
+
lineWidth: 6,
|
|
857
|
+
tab: null,
|
|
858
|
+
...a
|
|
859
|
+
};
|
|
860
|
+
}, o = (e = "_widget", t) => {
|
|
861
|
+
const r = `${e}_${Date.now()}`;
|
|
862
|
+
if (t === void 0)
|
|
863
|
+
return r;
|
|
864
|
+
const n = t.toString().length;
|
|
865
|
+
return `${r.slice(0, -n)}${t}`;
|
|
866
|
+
}, I = (e) => {
|
|
867
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
868
|
+
return {
|
|
869
|
+
widget: {
|
|
870
|
+
type: "number",
|
|
871
|
+
widgetName: o(),
|
|
872
|
+
widgetNameAlias: "",
|
|
873
|
+
triggerEvent: !1,
|
|
874
|
+
customCls: null,
|
|
875
|
+
height: 34,
|
|
876
|
+
width: 350,
|
|
877
|
+
enable: !0,
|
|
878
|
+
visible: !0,
|
|
879
|
+
allowBlank: !0,
|
|
880
|
+
funMode: "module",
|
|
881
|
+
module: null,
|
|
882
|
+
libs: [],
|
|
883
|
+
extendSet: {
|
|
884
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
885
|
+
status: !0,
|
|
886
|
+
triggerField: "",
|
|
887
|
+
triggerFieldMode: "none",
|
|
888
|
+
version: 1
|
|
889
|
+
},
|
|
890
|
+
// regex,
|
|
891
|
+
// hint: placeholder,
|
|
892
|
+
noRepeat: !1,
|
|
893
|
+
alertinfo: {
|
|
894
|
+
icon: "success",
|
|
895
|
+
tip: "请设置提示内容"
|
|
896
|
+
},
|
|
897
|
+
allowDecimals: !0,
|
|
898
|
+
//允许小数,默认值 true,已废弃
|
|
899
|
+
allowNegative: !0,
|
|
900
|
+
//允许负数,默认值 true ,已废弃
|
|
901
|
+
// maxNumber: max, //限定数值范围 最大值
|
|
902
|
+
// minNumber: min, //限定数值范围 最小值
|
|
903
|
+
displayMode: "percent",
|
|
904
|
+
// 新的格式, percent 百分比 number 数值
|
|
905
|
+
precision: null,
|
|
906
|
+
//保留小数位数
|
|
907
|
+
thousandsSeparator: !1,
|
|
908
|
+
//显示千分符
|
|
909
|
+
notround: !0,
|
|
910
|
+
//不四舍五入
|
|
911
|
+
format: "",
|
|
912
|
+
//旧的格式,新的由多个属性来控制,前端代码会用其他几个参数拼接出正确的这个值。 其中结尾有% 代表百分比 ,没有%代表数字 ,然后小数点后面的0的个数代表 保留的小数位数,如果小数点后面没有0代表(如0.%),代表没有设置 保留小数位数,保留用户输入的所有小数
|
|
913
|
+
afterSuffix: {
|
|
914
|
+
//单位
|
|
915
|
+
zh_cn: "",
|
|
916
|
+
//中文的
|
|
917
|
+
en_us: "",
|
|
918
|
+
//英文的
|
|
919
|
+
zh_tw: ""
|
|
920
|
+
//繁体的
|
|
921
|
+
},
|
|
922
|
+
...t,
|
|
923
|
+
labelStyle: r
|
|
924
|
+
},
|
|
925
|
+
// description,
|
|
926
|
+
label: r,
|
|
927
|
+
lineWidth: 6,
|
|
928
|
+
tab: null,
|
|
929
|
+
...n
|
|
930
|
+
};
|
|
931
|
+
}, L = (e) => {
|
|
932
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
933
|
+
return {
|
|
934
|
+
widget: {
|
|
935
|
+
type: "combo",
|
|
936
|
+
height: 34,
|
|
937
|
+
width: 350,
|
|
938
|
+
enable: !0,
|
|
939
|
+
visible: !0,
|
|
940
|
+
allowBlank: !0,
|
|
941
|
+
mode: 1,
|
|
942
|
+
allowAddLinkData: !1,
|
|
943
|
+
// items: options,
|
|
944
|
+
widgetName: `_widget_${Date.now()}`,
|
|
945
|
+
widgetNameAlias: "",
|
|
946
|
+
customCls: null,
|
|
947
|
+
funMode: "module",
|
|
948
|
+
module: null,
|
|
949
|
+
libs: [],
|
|
950
|
+
extendSet: {
|
|
951
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
952
|
+
status: !0,
|
|
953
|
+
triggerField: "",
|
|
954
|
+
triggerFieldMode: "none",
|
|
955
|
+
version: 1
|
|
956
|
+
},
|
|
957
|
+
colorEnable: !0,
|
|
958
|
+
//颜色 是否开启颜色
|
|
959
|
+
...t,
|
|
960
|
+
labelStyle: r
|
|
961
|
+
},
|
|
962
|
+
// description,
|
|
963
|
+
label: r,
|
|
964
|
+
lineWidth: 6,
|
|
965
|
+
tab: null,
|
|
966
|
+
...n
|
|
967
|
+
};
|
|
968
|
+
}, S = (e) => {
|
|
969
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
970
|
+
return {
|
|
971
|
+
widget: {
|
|
972
|
+
enable: !0,
|
|
973
|
+
visible: !0,
|
|
974
|
+
allowBlank: !0,
|
|
975
|
+
funMode: "module",
|
|
976
|
+
module: null,
|
|
977
|
+
libs: [],
|
|
978
|
+
// items: options,
|
|
979
|
+
layout: "vertical",
|
|
980
|
+
stopCancel: !1,
|
|
981
|
+
widgetName: `_widget_${Date.now()}`,
|
|
982
|
+
widgetNameAlias: "",
|
|
983
|
+
customCls: null,
|
|
984
|
+
value: null,
|
|
985
|
+
extendSet: {
|
|
986
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
987
|
+
status: !0,
|
|
988
|
+
triggerField: "",
|
|
989
|
+
triggerFieldMode: "none",
|
|
990
|
+
version: 1
|
|
991
|
+
},
|
|
992
|
+
colorEnable: !0,
|
|
993
|
+
//颜色 是否开启颜色
|
|
994
|
+
...t,
|
|
995
|
+
type: "radiogroup"
|
|
996
|
+
},
|
|
997
|
+
// description,
|
|
998
|
+
label: r,
|
|
999
|
+
lineWidth: 6,
|
|
1000
|
+
tab: null,
|
|
1001
|
+
...n,
|
|
1002
|
+
labelStyle: r
|
|
1003
|
+
};
|
|
1004
|
+
}, $ = (e) => {
|
|
1005
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1006
|
+
return {
|
|
1007
|
+
widget: {
|
|
1008
|
+
type: "datetime",
|
|
1009
|
+
height: 34,
|
|
1010
|
+
width: 350,
|
|
1011
|
+
enable: !0,
|
|
1012
|
+
visible: !0,
|
|
1013
|
+
allowBlank: !0,
|
|
1014
|
+
funMode: "module",
|
|
1015
|
+
widgetName: `_widget_${Date.now()}`,
|
|
1016
|
+
widgetNameAlias: "",
|
|
1017
|
+
customCls: null,
|
|
1018
|
+
value: "today",
|
|
1019
|
+
//默认值, today 填写当前时间 ,如果是数字,如 1762957800000 ,是自定义的时间,为所选时间的时间戳的毫秒级,
|
|
1020
|
+
rely: null,
|
|
1021
|
+
module: null,
|
|
1022
|
+
libs: [],
|
|
1023
|
+
extendSet: {
|
|
1024
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1025
|
+
status: !0,
|
|
1026
|
+
triggerField: "",
|
|
1027
|
+
triggerFieldMode: "none",
|
|
1028
|
+
version: 1
|
|
1029
|
+
},
|
|
1030
|
+
hint: "",
|
|
1031
|
+
dateLimit: {
|
|
1032
|
+
//日期范围
|
|
1033
|
+
week: {
|
|
1034
|
+
//可选择星期
|
|
1035
|
+
enable: !1,
|
|
1036
|
+
//是否开启可选择星期
|
|
1037
|
+
value: [
|
|
1038
|
+
//星期 星期一到天,用1-7代表
|
|
1039
|
+
1,
|
|
1040
|
+
2,
|
|
1041
|
+
6
|
|
1042
|
+
]
|
|
1043
|
+
},
|
|
1044
|
+
start: {
|
|
1045
|
+
//最早可选时间
|
|
1046
|
+
enable: !1,
|
|
1047
|
+
//是否开启最早可选时间
|
|
1048
|
+
mode: "dynamic",
|
|
1049
|
+
//模式: dynamic 动态 static 固定值 fieldValue 字段值
|
|
1050
|
+
value: "yesterday"
|
|
1051
|
+
//限定的值: today 今天 yesterday 昨天 tomorrow 明天 7day_before 七天前 7day_after 七天后 30day_before 30天前 30day_after 30天后
|
|
1052
|
+
},
|
|
1053
|
+
end: {
|
|
1054
|
+
//最晚可选时间
|
|
1055
|
+
enable: !1,
|
|
1056
|
+
//是否开启最晚可选时间
|
|
1057
|
+
mode: "static",
|
|
1058
|
+
//模式: dynamic 动态 static 固定值 fieldValue 字段值
|
|
1059
|
+
value: 17620938e5
|
|
1060
|
+
//限定的值:这种数字的为 选择的固定值,时间的时间戳,毫秒级别 ,如果为 _widget_1762154537014 这种,为字段的值,这个字段需要也是日期字段,和当前这个字段是同一个 format的
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
...t,
|
|
1064
|
+
labelStyle: r
|
|
1065
|
+
},
|
|
1066
|
+
label: r,
|
|
1067
|
+
lineWidth: 6,
|
|
1068
|
+
tab: null,
|
|
1069
|
+
...n
|
|
1070
|
+
};
|
|
1071
|
+
}, g = (e) => e, G = (e) => {
|
|
1072
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1073
|
+
return {
|
|
1074
|
+
widget: {
|
|
1075
|
+
type: "deptgroup",
|
|
1076
|
+
widgetName: o(),
|
|
1077
|
+
widgetNameAlias: "",
|
|
1078
|
+
customCls: null,
|
|
1079
|
+
height: "34",
|
|
1080
|
+
width: 350,
|
|
1081
|
+
enable: !0,
|
|
1082
|
+
visible: !0,
|
|
1083
|
+
allowBlank: !0,
|
|
1084
|
+
funMode: "module",
|
|
1085
|
+
module: null,
|
|
1086
|
+
libs: [],
|
|
1087
|
+
extendSet: {
|
|
1088
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1089
|
+
status: !0,
|
|
1090
|
+
triggerField: "",
|
|
1091
|
+
triggerFieldMode: "none",
|
|
1092
|
+
version: 1
|
|
1093
|
+
},
|
|
1094
|
+
noRepeat: !1,
|
|
1095
|
+
limit: {},
|
|
1096
|
+
valueOption: 0,
|
|
1097
|
+
...t,
|
|
1098
|
+
labelStyle: r
|
|
1099
|
+
},
|
|
1100
|
+
label: r,
|
|
1101
|
+
lineWidth: 6,
|
|
1102
|
+
tab: null,
|
|
1103
|
+
...n
|
|
1104
|
+
};
|
|
1105
|
+
}, U = (e) => {
|
|
1106
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1107
|
+
return {
|
|
1108
|
+
widget: {
|
|
1109
|
+
type: "sn",
|
|
1110
|
+
widgetName: o(),
|
|
1111
|
+
widgetNameAlias: "",
|
|
1112
|
+
triggerEvent: 0,
|
|
1113
|
+
customCls: null,
|
|
1114
|
+
width: 350,
|
|
1115
|
+
enable: !0,
|
|
1116
|
+
visible: !0,
|
|
1117
|
+
// rules: rules,
|
|
1118
|
+
importMode: 1,
|
|
1119
|
+
//导入模式 1 excel末尾递增 2 excel最大值递增 3 excel/表单最大值比较递增
|
|
1120
|
+
...t,
|
|
1121
|
+
rules: [
|
|
1122
|
+
{
|
|
1123
|
+
chars: "sn-",
|
|
1124
|
+
type: "fixedChars"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
digitsNum: 5,
|
|
1128
|
+
fixedLength: !0,
|
|
1129
|
+
resetDuration: "none",
|
|
1130
|
+
startValue: 1,
|
|
1131
|
+
type: "incNumber"
|
|
1132
|
+
}
|
|
1133
|
+
],
|
|
1134
|
+
labelStyle: r
|
|
1135
|
+
},
|
|
1136
|
+
// description,
|
|
1137
|
+
label: r,
|
|
1138
|
+
lineWidth: 6,
|
|
1139
|
+
tab: null,
|
|
1140
|
+
...n
|
|
1141
|
+
};
|
|
1142
|
+
}, j = (e) => {
|
|
1143
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1144
|
+
return {
|
|
1145
|
+
widget: {
|
|
1146
|
+
type: "dept",
|
|
1147
|
+
widgetName: o(),
|
|
1148
|
+
widgetNameAlias: "",
|
|
1149
|
+
customCls: null,
|
|
1150
|
+
height: "34",
|
|
1151
|
+
width: 350,
|
|
1152
|
+
enable: !0,
|
|
1153
|
+
visible: !0,
|
|
1154
|
+
allowBlank: !0,
|
|
1155
|
+
funMode: "module",
|
|
1156
|
+
module: null,
|
|
1157
|
+
libs: [],
|
|
1158
|
+
extendSet: {
|
|
1159
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1160
|
+
status: !0,
|
|
1161
|
+
triggerField: "",
|
|
1162
|
+
triggerFieldMode: "none",
|
|
1163
|
+
version: 1
|
|
1164
|
+
},
|
|
1165
|
+
noRepeat: !1,
|
|
1166
|
+
limit: {},
|
|
1167
|
+
valueOption: 0,
|
|
1168
|
+
...t,
|
|
1169
|
+
labelStyle: r
|
|
1170
|
+
},
|
|
1171
|
+
label: r,
|
|
1172
|
+
lineWidth: 6,
|
|
1173
|
+
tab: null,
|
|
1174
|
+
...n
|
|
1175
|
+
};
|
|
1176
|
+
}, H = (e) => {
|
|
1177
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1178
|
+
return {
|
|
1179
|
+
widget: {
|
|
1180
|
+
type: "usergroup",
|
|
1181
|
+
widgetName: o(),
|
|
1182
|
+
widgetNameAlias: "",
|
|
1183
|
+
customCls: null,
|
|
1184
|
+
height: "34",
|
|
1185
|
+
width: 350,
|
|
1186
|
+
enable: !0,
|
|
1187
|
+
visible: !0,
|
|
1188
|
+
allowBlank: !0,
|
|
1189
|
+
funMode: "module",
|
|
1190
|
+
module: null,
|
|
1191
|
+
libs: [],
|
|
1192
|
+
extendSet: {
|
|
1193
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1194
|
+
status: !0,
|
|
1195
|
+
triggerField: "",
|
|
1196
|
+
triggerFieldMode: "none",
|
|
1197
|
+
version: 1
|
|
1198
|
+
},
|
|
1199
|
+
noRepeat: !1,
|
|
1200
|
+
limit: {},
|
|
1201
|
+
limitWidget: null,
|
|
1202
|
+
//可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
|
|
1203
|
+
valueOption: 0,
|
|
1204
|
+
...t,
|
|
1205
|
+
labelStyle: r
|
|
1206
|
+
},
|
|
1207
|
+
// description,
|
|
1208
|
+
label: r,
|
|
1209
|
+
lineWidth: 6,
|
|
1210
|
+
tab: null,
|
|
1211
|
+
...n
|
|
1212
|
+
};
|
|
1213
|
+
}, Q = (e) => {
|
|
1214
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1215
|
+
return {
|
|
1216
|
+
widget: {
|
|
1217
|
+
widgetName: o(),
|
|
1218
|
+
widgetNameAlias: "",
|
|
1219
|
+
customCls: null,
|
|
1220
|
+
enable: !0,
|
|
1221
|
+
visible: !0,
|
|
1222
|
+
allowBlank: !0,
|
|
1223
|
+
rely: {
|
|
1224
|
+
widgets: []
|
|
1225
|
+
},
|
|
1226
|
+
linkFilter: {},
|
|
1227
|
+
allowAdd: !0,
|
|
1228
|
+
//允许新增关联表数据
|
|
1229
|
+
refType: "form",
|
|
1230
|
+
//关联表的类型,只能是form
|
|
1231
|
+
...t,
|
|
1232
|
+
linkFields: [],
|
|
1233
|
+
labelStyle: r,
|
|
1234
|
+
type: "linkdata"
|
|
1235
|
+
},
|
|
1236
|
+
label: r,
|
|
1237
|
+
lineWidth: 6,
|
|
1238
|
+
tab: null,
|
|
1239
|
+
...n
|
|
1240
|
+
};
|
|
1241
|
+
}, z = (e) => !e || !e.length ? e : e.map((t, r) => ({
|
|
1242
|
+
id: r,
|
|
1243
|
+
// name: "_widget_1761976674767",
|
|
1244
|
+
// form: "a2f34ef882158a3e97da4ef7",
|
|
1245
|
+
// tag: buildWidgetName("f_", index),
|
|
1246
|
+
title: t.field,
|
|
1247
|
+
text: t.field,
|
|
1248
|
+
icon: `icon-widget-${t.type}`,
|
|
1249
|
+
type: t.type,
|
|
1250
|
+
isEditable: !0,
|
|
1251
|
+
group: "dimension,filter,select",
|
|
1252
|
+
formula: ""
|
|
1253
|
+
})), Z = (e) => !e || !e.length ? e : e.map((t) => ({
|
|
1254
|
+
mode: "depend",
|
|
1255
|
+
...t
|
|
1256
|
+
})), X = (e) => {
|
|
1257
|
+
var a, l, i;
|
|
1258
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1259
|
+
return {
|
|
1260
|
+
widget: {
|
|
1261
|
+
type: "dataload",
|
|
1262
|
+
widgetName: o(),
|
|
1263
|
+
widgetNameAlias: "",
|
|
1264
|
+
customCls: null,
|
|
1265
|
+
width: 350,
|
|
1266
|
+
text: r,
|
|
1267
|
+
enable: !0,
|
|
1268
|
+
visible: !0,
|
|
1269
|
+
allowBlank: !0,
|
|
1270
|
+
allowAddData: !0,
|
|
1271
|
+
// 允许新增数据源数据
|
|
1272
|
+
...t,
|
|
1273
|
+
mode: "list",
|
|
1274
|
+
//一直是 list 应该是废弃的
|
|
1275
|
+
loaddataconfig: {
|
|
1276
|
+
extendSet: {
|
|
1277
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1278
|
+
status: !0,
|
|
1279
|
+
triggerField: "",
|
|
1280
|
+
triggerFieldMode: "none"
|
|
1281
|
+
},
|
|
1282
|
+
dataloadmode: ["add", "cover"],
|
|
1283
|
+
filter: {
|
|
1284
|
+
cond: [],
|
|
1285
|
+
rel: "and"
|
|
1286
|
+
},
|
|
1287
|
+
defaultSort: [],
|
|
1288
|
+
treeFields: {},
|
|
1289
|
+
mode: "list",
|
|
1290
|
+
selectFields: [],
|
|
1291
|
+
triggerControl: null,
|
|
1292
|
+
triggerWidget: null,
|
|
1293
|
+
triggerFieldMode: "none",
|
|
1294
|
+
triggerField: null,
|
|
1295
|
+
forms: (a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.forms,
|
|
1296
|
+
selectArg: [],
|
|
1297
|
+
selectRel: "and",
|
|
1298
|
+
fields: z((l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.mapFields),
|
|
1299
|
+
mapFields: Z((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
|
|
1300
|
+
},
|
|
1301
|
+
labelStyle: r
|
|
1302
|
+
},
|
|
1303
|
+
label: r,
|
|
1304
|
+
lineWidth: 6,
|
|
1305
|
+
tab: null,
|
|
1306
|
+
...n
|
|
1307
|
+
};
|
|
1308
|
+
}, Y = (e) => {
|
|
1309
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1310
|
+
return {
|
|
1311
|
+
widget: {
|
|
1312
|
+
type: "user",
|
|
1313
|
+
widgetName: o(),
|
|
1314
|
+
widgetNameAlias: "",
|
|
1315
|
+
customCls: null,
|
|
1316
|
+
height: "34",
|
|
1317
|
+
width: 350,
|
|
1318
|
+
enable: !0,
|
|
1319
|
+
visible: !0,
|
|
1320
|
+
allowBlank: !0,
|
|
1321
|
+
funMode: "module",
|
|
1322
|
+
module: null,
|
|
1323
|
+
libs: [],
|
|
1324
|
+
extendSet: {
|
|
1325
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1326
|
+
status: !0,
|
|
1327
|
+
triggerField: "",
|
|
1328
|
+
triggerFieldMode: "none",
|
|
1329
|
+
version: 1
|
|
1330
|
+
},
|
|
1331
|
+
noRepeat: !1,
|
|
1332
|
+
limit: {},
|
|
1333
|
+
limitWidget: null,
|
|
1334
|
+
//可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
|
|
1335
|
+
valueOption: 0,
|
|
1336
|
+
...t,
|
|
1337
|
+
labelStyle: r
|
|
1338
|
+
},
|
|
1339
|
+
// description,
|
|
1340
|
+
label: r,
|
|
1341
|
+
lineWidth: 6,
|
|
1342
|
+
tab: null,
|
|
1343
|
+
...n
|
|
1344
|
+
};
|
|
1345
|
+
}, K = (e) => {
|
|
1346
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1347
|
+
return {
|
|
1348
|
+
widget: {
|
|
1349
|
+
type: "signature",
|
|
1350
|
+
widgetName: o(),
|
|
1351
|
+
widgetNameAlias: "",
|
|
1352
|
+
customCls: null,
|
|
1353
|
+
height: 34,
|
|
1354
|
+
width: 350,
|
|
1355
|
+
enable: !0,
|
|
1356
|
+
visible: !0,
|
|
1357
|
+
allowBlank: !0,
|
|
1358
|
+
rely: null,
|
|
1359
|
+
...t,
|
|
1360
|
+
labelStyle: r
|
|
1361
|
+
},
|
|
1362
|
+
description: null,
|
|
1363
|
+
label: r,
|
|
1364
|
+
lineWidth: 6,
|
|
1365
|
+
tab: null,
|
|
1366
|
+
...n
|
|
1367
|
+
};
|
|
1368
|
+
}, V = (e) => {
|
|
1369
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1370
|
+
return {
|
|
1371
|
+
widget: {
|
|
1372
|
+
type: "image",
|
|
1373
|
+
widgetName: o(),
|
|
1374
|
+
widgetNameAlias: "",
|
|
1375
|
+
customCls: null,
|
|
1376
|
+
height: 100,
|
|
1377
|
+
enable: !0,
|
|
1378
|
+
visible: !0,
|
|
1379
|
+
allowBlank: !0,
|
|
1380
|
+
funMode: "module",
|
|
1381
|
+
module: null,
|
|
1382
|
+
libs: [],
|
|
1383
|
+
extendSet: {
|
|
1384
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1385
|
+
status: !0,
|
|
1386
|
+
triggerField: "",
|
|
1387
|
+
triggerFieldMode: "none",
|
|
1388
|
+
version: 1
|
|
1389
|
+
},
|
|
1390
|
+
download: !0,
|
|
1391
|
+
//打包下载
|
|
1392
|
+
is_file_down: !0,
|
|
1393
|
+
//操作权限 可下载
|
|
1394
|
+
check_image_exif: !0,
|
|
1395
|
+
//照片支持查看EXIF扩展信息
|
|
1396
|
+
online_edit: !1,
|
|
1397
|
+
online_edit_record: !1,
|
|
1398
|
+
fileType: [
|
|
1399
|
+
//支持上传的类型,默认,不可以设置
|
|
1400
|
+
"jpg",
|
|
1401
|
+
"jpeg",
|
|
1402
|
+
"png",
|
|
1403
|
+
"gif",
|
|
1404
|
+
"bmp",
|
|
1405
|
+
"tif"
|
|
1406
|
+
],
|
|
1407
|
+
compressed: !0,
|
|
1408
|
+
//三方图片压缩
|
|
1409
|
+
wxOriginalComponent: !0,
|
|
1410
|
+
//微信/企业微信原生拍照模式
|
|
1411
|
+
onlyCamera: !1,
|
|
1412
|
+
//仅允许拍照上传
|
|
1413
|
+
preview: !0,
|
|
1414
|
+
//是否可以预览 默认 不可以设置
|
|
1415
|
+
watermarkSwitch: !0,
|
|
1416
|
+
//水印属性
|
|
1417
|
+
watermarkPosition: "center",
|
|
1418
|
+
//水印位置
|
|
1419
|
+
watermarkFieldTitle: !0,
|
|
1420
|
+
//是否显示水印字段标题
|
|
1421
|
+
watermarkSize: "14",
|
|
1422
|
+
//水印字体大小 不可以设置
|
|
1423
|
+
watermarkFixedField: {},
|
|
1424
|
+
previewWidth: 450,
|
|
1425
|
+
//预览的宽 默认 不可以设置
|
|
1426
|
+
previewHeight: 450,
|
|
1427
|
+
//预览的高 默认 不可以设置
|
|
1428
|
+
browserCompress: !0,
|
|
1429
|
+
//浏览器图片压缩
|
|
1430
|
+
quality: 0.7,
|
|
1431
|
+
//压缩图片比例,开启 浏览器图片压缩 后才能设置
|
|
1432
|
+
...t,
|
|
1433
|
+
labelStyle: r
|
|
1434
|
+
},
|
|
1435
|
+
label: r,
|
|
1436
|
+
lineWidth: 6,
|
|
1437
|
+
tab: null,
|
|
1438
|
+
...n
|
|
1439
|
+
};
|
|
1440
|
+
}, J = (e) => {
|
|
1441
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1442
|
+
return {
|
|
1443
|
+
widget: {
|
|
1444
|
+
type: "upload",
|
|
1445
|
+
widgetName: o(),
|
|
1446
|
+
widgetNameAlias: "",
|
|
1447
|
+
customCls: null,
|
|
1448
|
+
enable: !0,
|
|
1449
|
+
visible: !0,
|
|
1450
|
+
allowBlank: !0,
|
|
1451
|
+
maxFileCount: 50,
|
|
1452
|
+
//允许多文件上传 1为不可以 50为可以
|
|
1453
|
+
download: !0,
|
|
1454
|
+
//打包下载
|
|
1455
|
+
is_file_down: !0,
|
|
1456
|
+
//操作权限 可下载
|
|
1457
|
+
check_image_exif: !0,
|
|
1458
|
+
//照片支持查看EXIF扩展信息
|
|
1459
|
+
online_edit: !0,
|
|
1460
|
+
//允许文档在线编辑
|
|
1461
|
+
online_edit_record: !0,
|
|
1462
|
+
//是否查看协作记录
|
|
1463
|
+
fileSizeLimit: 10485760,
|
|
1464
|
+
//设置单个文件大小上限,单位是字节,范围 1M-20M
|
|
1465
|
+
// fileType,
|
|
1466
|
+
...t,
|
|
1467
|
+
labelStyle: r
|
|
1468
|
+
},
|
|
1469
|
+
// description,
|
|
1470
|
+
label: r,
|
|
1471
|
+
lineWidth: 6,
|
|
1472
|
+
tab: null,
|
|
1473
|
+
...n
|
|
1474
|
+
};
|
|
1475
|
+
}, ee = (e) => {
|
|
1476
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1477
|
+
return {
|
|
1478
|
+
widget: {
|
|
1479
|
+
type: "checkboxgroup",
|
|
1480
|
+
widgetName: o(),
|
|
1481
|
+
widgetNameAlias: "",
|
|
1482
|
+
customCls: null,
|
|
1483
|
+
enable: !0,
|
|
1484
|
+
visible: !0,
|
|
1485
|
+
allowBlank: !0,
|
|
1486
|
+
funMode: "module",
|
|
1487
|
+
module: null,
|
|
1488
|
+
libs: [],
|
|
1489
|
+
extendSet: {
|
|
1490
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1491
|
+
status: !0,
|
|
1492
|
+
triggerField: "",
|
|
1493
|
+
triggerFieldMode: "none",
|
|
1494
|
+
version: 1
|
|
1495
|
+
},
|
|
1496
|
+
colorEnable: !0,
|
|
1497
|
+
//颜色 是否开启颜色
|
|
1498
|
+
layout: "vertical",
|
|
1499
|
+
allowAddOptions: !1,
|
|
1500
|
+
//允许成员填写时添加新选项
|
|
1501
|
+
...t,
|
|
1502
|
+
labelStyle: r
|
|
1503
|
+
},
|
|
1504
|
+
label: r,
|
|
1505
|
+
lineWidth: 6,
|
|
1506
|
+
tab: null,
|
|
1507
|
+
...n
|
|
1508
|
+
};
|
|
1509
|
+
}, te = (e) => {
|
|
1510
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1511
|
+
return {
|
|
1512
|
+
widget: {
|
|
1513
|
+
type: "separator",
|
|
1514
|
+
widgetName: o(),
|
|
1515
|
+
widgetNameAlias: "",
|
|
1516
|
+
customCls: null,
|
|
1517
|
+
enable: !0,
|
|
1518
|
+
visible: !0,
|
|
1519
|
+
allowBlank: !0,
|
|
1520
|
+
...t,
|
|
1521
|
+
labelStyle: r
|
|
1522
|
+
},
|
|
1523
|
+
label: r,
|
|
1524
|
+
lineWidth: 12,
|
|
1525
|
+
tab: null,
|
|
1526
|
+
...n
|
|
1527
|
+
};
|
|
1528
|
+
}, re = (e) => {
|
|
1529
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1530
|
+
return {
|
|
1531
|
+
widget: {
|
|
1532
|
+
type: "combocheck",
|
|
1533
|
+
widgetName: o(),
|
|
1534
|
+
widgetNameAlias: "",
|
|
1535
|
+
customCls: null,
|
|
1536
|
+
height: 34,
|
|
1537
|
+
width: 350,
|
|
1538
|
+
enable: !0,
|
|
1539
|
+
visible: !0,
|
|
1540
|
+
allowBlank: !0,
|
|
1541
|
+
funMode: "module",
|
|
1542
|
+
module: null,
|
|
1543
|
+
libs: [],
|
|
1544
|
+
extendSet: {
|
|
1545
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1546
|
+
status: !0,
|
|
1547
|
+
triggerField: "",
|
|
1548
|
+
triggerFieldMode: "none",
|
|
1549
|
+
version: 1
|
|
1550
|
+
},
|
|
1551
|
+
colorEnable: !0,
|
|
1552
|
+
//颜色 是否开启颜色
|
|
1553
|
+
mode: "",
|
|
1554
|
+
allowAddOptions: !1,
|
|
1555
|
+
//允许成员填写时添加新选项
|
|
1556
|
+
allowAddLinkData: !1,
|
|
1557
|
+
...t,
|
|
1558
|
+
labelStyle: r
|
|
1559
|
+
},
|
|
1560
|
+
label: r,
|
|
1561
|
+
lineWidth: 6,
|
|
1562
|
+
tab: null,
|
|
1563
|
+
...n
|
|
1564
|
+
};
|
|
1565
|
+
}, ne = (e) => {
|
|
1566
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1567
|
+
return {
|
|
1568
|
+
widget: {
|
|
1569
|
+
type: "location",
|
|
1570
|
+
widgetName: o(),
|
|
1571
|
+
widgetNameAlias: "",
|
|
1572
|
+
customCls: null,
|
|
1573
|
+
enable: !0,
|
|
1574
|
+
visible: !0,
|
|
1575
|
+
allowBlank: !0,
|
|
1576
|
+
funMode: "module",
|
|
1577
|
+
module: null,
|
|
1578
|
+
libs: [],
|
|
1579
|
+
extendSet: {
|
|
1580
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1581
|
+
status: !0,
|
|
1582
|
+
triggerField: "",
|
|
1583
|
+
triggerFieldMode: "none",
|
|
1584
|
+
version: 1
|
|
1585
|
+
},
|
|
1586
|
+
adjustable: !0,
|
|
1587
|
+
//允许移动端微调
|
|
1588
|
+
lnglatVisible: !0,
|
|
1589
|
+
//显示经纬度坐标
|
|
1590
|
+
autoLocation: !0,
|
|
1591
|
+
//移动端自动触发定位
|
|
1592
|
+
enablePcLocation: !0,
|
|
1593
|
+
//允许PC端定位并选择位置
|
|
1594
|
+
...t,
|
|
1595
|
+
labelStyle: r
|
|
1596
|
+
},
|
|
1597
|
+
label: r,
|
|
1598
|
+
lineWidth: 6,
|
|
1599
|
+
tab: null,
|
|
1600
|
+
...n
|
|
1601
|
+
};
|
|
1602
|
+
}, ae = (e) => {
|
|
1603
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1604
|
+
return {
|
|
1605
|
+
widget: {
|
|
1606
|
+
type: "textarea",
|
|
1607
|
+
widgetName: o(),
|
|
1608
|
+
widgetNameAlias: "",
|
|
1609
|
+
triggerEvent: !1,
|
|
1610
|
+
customCls: null,
|
|
1611
|
+
height: 140,
|
|
1612
|
+
width: 734,
|
|
1613
|
+
value: "",
|
|
1614
|
+
enable: !0,
|
|
1615
|
+
visible: !0,
|
|
1616
|
+
allowBlank: !0,
|
|
1617
|
+
funMode: "module",
|
|
1618
|
+
module: null,
|
|
1619
|
+
libs: [],
|
|
1620
|
+
extendSet: {
|
|
1621
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1622
|
+
status: !0,
|
|
1623
|
+
triggerField: "",
|
|
1624
|
+
triggerFieldMode: "none",
|
|
1625
|
+
version: 1
|
|
1626
|
+
},
|
|
1627
|
+
noRepeat: !1,
|
|
1628
|
+
alertinfo: {
|
|
1629
|
+
icon: "success",
|
|
1630
|
+
tip: "请设置提示内容"
|
|
1631
|
+
},
|
|
1632
|
+
autoHeight: !0,
|
|
1633
|
+
//根据内容自适应高度
|
|
1634
|
+
maxLength: 5e3,
|
|
1635
|
+
//限制输入最大字符数 不限制的话,整个maxLength不存在
|
|
1636
|
+
...t,
|
|
1637
|
+
labelStyle: r
|
|
1638
|
+
},
|
|
1639
|
+
// description,
|
|
1640
|
+
label: r,
|
|
1641
|
+
lineWidth: 6,
|
|
1642
|
+
tab: null,
|
|
1643
|
+
...n
|
|
1644
|
+
};
|
|
1645
|
+
}, le = (e = {}) => {
|
|
1646
|
+
const { widget: t, label: r, ...n } = e;
|
|
1647
|
+
return {
|
|
1648
|
+
widget: {
|
|
1649
|
+
type: "button",
|
|
1650
|
+
widgetName: o(),
|
|
1651
|
+
widgetNameAlias: "",
|
|
1652
|
+
triggerEvent: 0,
|
|
1653
|
+
customCls: null,
|
|
1654
|
+
height: 36,
|
|
1655
|
+
width: 350,
|
|
1656
|
+
enable: !0,
|
|
1657
|
+
visible: !0,
|
|
1658
|
+
allowBlank: !1,
|
|
1659
|
+
extendSet: {
|
|
1660
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1661
|
+
status: !0,
|
|
1662
|
+
triggerField: "",
|
|
1663
|
+
triggerFieldMode: "none",
|
|
1664
|
+
funMode: "popupreport"
|
|
1665
|
+
},
|
|
1666
|
+
background: {
|
|
1667
|
+
//颜色
|
|
1668
|
+
mode: "color",
|
|
1669
|
+
position: "center"
|
|
1670
|
+
},
|
|
1671
|
+
mode: "all",
|
|
1672
|
+
//模式 all 扩展 popupreport 弹出报表 popupform 弹出表单 print 页面打印 popuppage 弹出外部网页
|
|
1673
|
+
theme: "default",
|
|
1674
|
+
//风格 default 默认,有边框有底色 style1 有边框无底色 none 无边框无底色
|
|
1675
|
+
eventAlert: !1,
|
|
1676
|
+
//是否显示提醒框
|
|
1677
|
+
alertinfo: {
|
|
1678
|
+
icon: "success",
|
|
1679
|
+
tip: "请设置提示内容"
|
|
1680
|
+
},
|
|
1681
|
+
...t,
|
|
1682
|
+
labelStyle: r
|
|
1683
|
+
},
|
|
1684
|
+
label: r,
|
|
1685
|
+
lineWidth: 6,
|
|
1686
|
+
tab: null,
|
|
1687
|
+
...n
|
|
1688
|
+
};
|
|
1689
|
+
}, ie = (e = {}) => {
|
|
1690
|
+
const { widget: t, label: r, ...n } = e;
|
|
1691
|
+
return {
|
|
1692
|
+
widget: {
|
|
1693
|
+
type: "address",
|
|
1694
|
+
widgetName: o(),
|
|
1695
|
+
widgetNameAlias: "",
|
|
1696
|
+
customCls: null,
|
|
1697
|
+
width: 720,
|
|
1698
|
+
enable: !0,
|
|
1699
|
+
visible: !0,
|
|
1700
|
+
funMode: "module",
|
|
1701
|
+
module: null,
|
|
1702
|
+
libs: [],
|
|
1703
|
+
extendSet: {
|
|
1704
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1705
|
+
status: !0,
|
|
1706
|
+
triggerField: "",
|
|
1707
|
+
triggerFieldMode: "none",
|
|
1708
|
+
version: 1
|
|
1709
|
+
},
|
|
1710
|
+
needDetail: !0,
|
|
1711
|
+
eventMode: 1,
|
|
1712
|
+
//公式联动触发模式 1 默认,省市县/详细地址内容改变都触发 2 只有省市县改变才触发 3 只有详细地址改变才触发
|
|
1713
|
+
seleceMapAddress: !0,
|
|
1714
|
+
//开启经纬度定位
|
|
1715
|
+
...t,
|
|
1716
|
+
labelStyle: r
|
|
1717
|
+
},
|
|
1718
|
+
label: r,
|
|
1719
|
+
lineWidth: 6,
|
|
1720
|
+
tab: null,
|
|
1721
|
+
...n
|
|
1722
|
+
};
|
|
1723
|
+
}, oe = (e = {}) => {
|
|
1724
|
+
const { widget: t, label: r, ...n } = e;
|
|
1725
|
+
return {
|
|
1726
|
+
widget: {
|
|
1727
|
+
type: "subform",
|
|
1728
|
+
widgetName: o(),
|
|
1729
|
+
widgetNameAlias: "",
|
|
1730
|
+
customCls: null,
|
|
1731
|
+
enable: !0,
|
|
1732
|
+
visible: !0,
|
|
1733
|
+
allowBlank: !0,
|
|
1734
|
+
labelStyle: r,
|
|
1735
|
+
extendSet: {
|
|
1736
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1737
|
+
status: !0,
|
|
1738
|
+
triggerField: "",
|
|
1739
|
+
triggerFieldMode: "none",
|
|
1740
|
+
version: 1
|
|
1741
|
+
},
|
|
1742
|
+
items: (t.items || []).map((a, l) => {
|
|
1743
|
+
const i = ue(a, !0);
|
|
1744
|
+
return i.widget.widgetName = o("_widget", l), i;
|
|
1745
|
+
}),
|
|
1746
|
+
sortable: !0,
|
|
1747
|
+
//启用子表单数据排序
|
|
1748
|
+
allowImportV2: !1,
|
|
1749
|
+
//从excel导入数据
|
|
1750
|
+
sticky_column: {
|
|
1751
|
+
//PC端冻结前 n 列
|
|
1752
|
+
limit: 2,
|
|
1753
|
+
//多少列 范围 1-3
|
|
1754
|
+
enable: !0
|
|
1755
|
+
//是否开启
|
|
1756
|
+
},
|
|
1757
|
+
sticky_column_mobile: {
|
|
1758
|
+
//移动端冻结前 n 列
|
|
1759
|
+
limit: 1,
|
|
1760
|
+
//多少列 范围 1-3
|
|
1761
|
+
enable: !0
|
|
1762
|
+
//是否开启
|
|
1763
|
+
},
|
|
1764
|
+
mobileStyle: "table",
|
|
1765
|
+
//移动端显示样式 list 纵向展开 table 横向表格
|
|
1766
|
+
subform_create: !0,
|
|
1767
|
+
//可新增记录
|
|
1768
|
+
subform_insert: !0,
|
|
1769
|
+
//可插入记录
|
|
1770
|
+
subform_edit: !0,
|
|
1771
|
+
//可编辑已有记录
|
|
1772
|
+
subform_delete: !0,
|
|
1773
|
+
//可删除已有记录
|
|
1774
|
+
subform_fill: !0,
|
|
1775
|
+
//允许填报数据
|
|
1776
|
+
subform_import: !0,
|
|
1777
|
+
//允许导入数据
|
|
1778
|
+
subform_dataload: !0,
|
|
1779
|
+
//允许数据加载
|
|
1780
|
+
loaddataconfig: {
|
|
1781
|
+
//数据加载设置
|
|
1782
|
+
mode: "tree",
|
|
1783
|
+
extendSet: {
|
|
1784
|
+
sort: ["datahelp", "module", "formEvent"],
|
|
1785
|
+
status: !0,
|
|
1786
|
+
triggerField: "",
|
|
1787
|
+
triggerFieldMode: "none"
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
allowLoadData: !1,
|
|
1791
|
+
//是否开启数据加载
|
|
1792
|
+
allowAddData: !0,
|
|
1793
|
+
//允许新增数据源数据
|
|
1794
|
+
subformloaddataTitle: "数据加载",
|
|
1795
|
+
//数据加载显示的标题
|
|
1796
|
+
subFieldShowRules: [],
|
|
1797
|
+
//子字段显隐规则
|
|
1798
|
+
quick_fill: !0
|
|
1799
|
+
//从excel填报数据
|
|
1800
|
+
},
|
|
1801
|
+
description: null,
|
|
1802
|
+
label: r,
|
|
1803
|
+
lineWidth: 12,
|
|
1804
|
+
tab: null
|
|
1805
|
+
};
|
|
1806
|
+
}, se = (e) => {
|
|
1807
|
+
const { widget: t, label: r, ...n } = e || {};
|
|
1808
|
+
return {
|
|
1809
|
+
widget: {
|
|
1810
|
+
widgetName: o(),
|
|
1811
|
+
widgetNameAlias: "",
|
|
1812
|
+
customCls: null,
|
|
1813
|
+
enable: !0,
|
|
1814
|
+
visible: !0,
|
|
1815
|
+
allowBlank: !0,
|
|
1816
|
+
linkFilter: {},
|
|
1817
|
+
rely: {
|
|
1818
|
+
widgets: []
|
|
1819
|
+
},
|
|
1820
|
+
showMode: "one",
|
|
1821
|
+
//显示数据条数 one 一条 many 多条
|
|
1822
|
+
allowAdd: !0,
|
|
1823
|
+
//允许新增关联表数据,只有 refType 为 form才可以选择true
|
|
1824
|
+
refType: "form",
|
|
1825
|
+
//关联表的类型,根据 linkForm 表的类型决定的。 form 表单 etl_table 视图 aggregate_table 聚合表
|
|
1826
|
+
showType: "none",
|
|
1827
|
+
//数据显示模式 none 默认 label 标题
|
|
1828
|
+
addExtendSet: [],
|
|
1829
|
+
...t,
|
|
1830
|
+
linkFields: [],
|
|
1831
|
+
labelStyle: r,
|
|
1832
|
+
type: "linkquery"
|
|
1833
|
+
},
|
|
1834
|
+
description: null,
|
|
1835
|
+
label: r,
|
|
1836
|
+
lineWidth: 6,
|
|
1837
|
+
tab: null,
|
|
1838
|
+
...n
|
|
792
1839
|
};
|
|
1840
|
+
}, de = {
|
|
1841
|
+
address: ie,
|
|
1842
|
+
button: le,
|
|
1843
|
+
textarea: ae,
|
|
1844
|
+
datetime: $,
|
|
1845
|
+
text: v,
|
|
1846
|
+
password: v,
|
|
1847
|
+
location: ne,
|
|
1848
|
+
radiogroup: S,
|
|
1849
|
+
radio: S,
|
|
1850
|
+
combo: L,
|
|
1851
|
+
combocheck: re,
|
|
1852
|
+
separator: te,
|
|
1853
|
+
checkboxgroup: ee,
|
|
1854
|
+
upload: J,
|
|
1855
|
+
number: I,
|
|
1856
|
+
image: V,
|
|
1857
|
+
signature: K,
|
|
1858
|
+
user: Y,
|
|
1859
|
+
dataload: X,
|
|
1860
|
+
linkdata: Q,
|
|
1861
|
+
linkquery: se,
|
|
1862
|
+
usergroup: H,
|
|
1863
|
+
subform: oe,
|
|
1864
|
+
dept: j,
|
|
1865
|
+
sn: U,
|
|
1866
|
+
deptgroup: G,
|
|
1867
|
+
flowState: g,
|
|
1868
|
+
flowstate: g,
|
|
1869
|
+
formula: g,
|
|
1870
|
+
unknown: g
|
|
1871
|
+
}, ue = (e, t = !1) => {
|
|
1872
|
+
var l, i;
|
|
1873
|
+
if (!e || !e.widget || !e.widget.type)
|
|
1874
|
+
return e;
|
|
1875
|
+
const r = e.widget.type || "unknown";
|
|
1876
|
+
return t && r === "subform" ? g(e) : (((i = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = q()), (de[r] || g)(e));
|
|
793
1877
|
};
|
|
794
1878
|
export {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
1879
|
+
xe as DATA_COUNT_PER_BATCH,
|
|
1880
|
+
F as FIELD_TYPE_OPERATOR_MAP,
|
|
1881
|
+
we as GetLoadingMsg,
|
|
1882
|
+
ye as GetPartErrMsg,
|
|
1883
|
+
pe as GetQueryResult,
|
|
1884
|
+
Ae as GetSafeFormStructure,
|
|
1885
|
+
k as IsErrorPart,
|
|
1886
|
+
ce as IsFakeMsgPart,
|
|
1887
|
+
fe as IsFileGroupPart,
|
|
1888
|
+
ge as IsFilePart,
|
|
1889
|
+
be as IsLoadingPart,
|
|
1890
|
+
me as IsQueryResultPart,
|
|
1891
|
+
qe as OPERATOR_LABEL_MAP,
|
|
1892
|
+
x as WHITE_LIST_FIELDS_SET,
|
|
1893
|
+
We as bsConditionParse2Condition,
|
|
1894
|
+
Re as conditionStringify2bsCondition,
|
|
1895
|
+
Ce as createFieldPartsExtractor,
|
|
1896
|
+
ke as createGetFieldJsonInfo,
|
|
1897
|
+
M as createPartTypeChecker,
|
|
1898
|
+
_e as createPayloadTypeChecker,
|
|
1899
|
+
d as extractTextPartMeta,
|
|
1900
|
+
_ as flatArr,
|
|
1901
|
+
Fe as getAvailableOperators,
|
|
1902
|
+
Ee as getDefaultOperator,
|
|
1903
|
+
Be as getIconUnicode,
|
|
1904
|
+
he as getMetaErrorMsg,
|
|
1905
|
+
Me as imageUrlToBase64,
|
|
1906
|
+
ve as injectHostStylesIntoShadow,
|
|
1907
|
+
Pe as isCtxMatch,
|
|
1908
|
+
De as isHelperCondMet,
|
|
1909
|
+
Te as mergeConsecutiveTargets,
|
|
1910
|
+
Oe as promptParser,
|
|
1911
|
+
ue as rebuildFieldsJsonStructure,
|
|
1912
|
+
Ne as safeParseJson,
|
|
1913
|
+
Se as valueNormalizer
|
|
828
1914
|
};
|
|
829
1915
|
//# sourceMappingURL=ai-feat-utils.js.map
|