@baishuyun/ai-feat-utils 2.0.44 → 2.0.45
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 +467 -436
- package/dist/ai-feat-utils.js.map +1 -1
- package/dist/condition.d.ts +4 -0
- package/dist/condition.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/ai-feat-utils.js
CHANGED
|
@@ -6,62 +6,62 @@ const y = (e) => {
|
|
|
6
6
|
let t;
|
|
7
7
|
try {
|
|
8
8
|
t = JSON.parse(e.providerMetadata.raw.data);
|
|
9
|
-
} catch (
|
|
9
|
+
} catch (n) {
|
|
10
10
|
console.error("invalid raw data");
|
|
11
11
|
}
|
|
12
12
|
return t || e.providerMetadata.raw.data;
|
|
13
|
-
},
|
|
13
|
+
}, B = (e) => {
|
|
14
14
|
if ((e == null ? void 0 : e.type) === "error")
|
|
15
15
|
return !0;
|
|
16
16
|
const t = y(e);
|
|
17
17
|
return (t == null ? void 0 : t.type) === "agent-error";
|
|
18
|
-
},
|
|
18
|
+
}, $e = (e) => {
|
|
19
19
|
const t = y(e);
|
|
20
20
|
return (t == null ? void 0 : t.type) === "agent-fake-msg";
|
|
21
|
-
},
|
|
21
|
+
}, Te = (e) => (e == null ? void 0 : e.type) === "file", Oe = (e) => {
|
|
22
22
|
const t = y(e);
|
|
23
23
|
return (t == null ? void 0 : t.type) === "query-stream-parsed-info";
|
|
24
|
-
},
|
|
24
|
+
}, Pe = (e) => {
|
|
25
25
|
const t = y(e);
|
|
26
26
|
if ((t == null ? void 0 : t.type) !== "query-stream-parsed-info")
|
|
27
27
|
return null;
|
|
28
|
-
const
|
|
29
|
-
console.log("query result raw data:",
|
|
28
|
+
const n = t.result;
|
|
29
|
+
console.log("query result raw data:", n);
|
|
30
30
|
try {
|
|
31
|
-
return JSON.parse(
|
|
32
|
-
} catch (
|
|
31
|
+
return JSON.parse(n);
|
|
32
|
+
} catch (r) {
|
|
33
33
|
return console.error("invalid query result data"), null;
|
|
34
34
|
}
|
|
35
|
-
},
|
|
35
|
+
}, Ie = (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
|
-
},
|
|
42
|
+
}, Le = (e) => {
|
|
43
43
|
const t = y(e);
|
|
44
44
|
return (t == null ? void 0 : t.type) === "agent-loading";
|
|
45
|
-
},
|
|
45
|
+
}, We = (e) => {
|
|
46
46
|
const t = y(e);
|
|
47
47
|
return (t == null ? void 0 : t.type) !== "agent-loading" ? "" : (t == null ? void 0 : t.label) || "加载中";
|
|
48
|
-
},
|
|
49
|
-
if (!
|
|
48
|
+
}, Be = (e) => {
|
|
49
|
+
if (!B(e))
|
|
50
50
|
return "";
|
|
51
51
|
if (e != null && e.errorText)
|
|
52
52
|
return e.errorText;
|
|
53
53
|
const t = y(e);
|
|
54
54
|
return (t == null ? void 0 : t.error) || "未知错误";
|
|
55
|
-
},
|
|
55
|
+
}, je = (e) => {
|
|
56
56
|
if (e != null && e.errorText)
|
|
57
57
|
return e.errorText;
|
|
58
58
|
const t = y(e);
|
|
59
59
|
return (t == null ? void 0 : t.error) || "未知错误";
|
|
60
|
-
},
|
|
60
|
+
}, M = "data-shadow-slot-injected", v = "host-clone", j = (e) => {
|
|
61
61
|
try {
|
|
62
62
|
const t = new CSSStyleSheet();
|
|
63
63
|
t.replaceSync(e);
|
|
64
|
-
const
|
|
64
|
+
const n = [], r = [], l = [];
|
|
65
65
|
let a = [];
|
|
66
66
|
const i = () => {
|
|
67
67
|
a.length && (l.push(`@layer ${v} {
|
|
@@ -70,87 +70,87 @@ ${a.join(`
|
|
|
70
70
|
}`), a = []);
|
|
71
71
|
};
|
|
72
72
|
for (const o of Array.from(t.cssRules))
|
|
73
|
-
o instanceof CSSImportRule ?
|
|
74
|
-
return i(), [...
|
|
73
|
+
o instanceof CSSImportRule ? n.push(o.cssText) : o instanceof CSSFontFaceRule || o instanceof CSSKeyframesRule || typeof CSSPropertyRule != "undefined" && o instanceof CSSPropertyRule ? r.push(o.cssText) : o instanceof CSSLayerBlockRule ? (i(), l.push(o.cssText)) : a.push(o.cssText);
|
|
74
|
+
return i(), [...n, ...r, ...l].join(`
|
|
75
75
|
`);
|
|
76
76
|
} catch (t) {
|
|
77
77
|
return `@layer ${v} {
|
|
78
78
|
${e}
|
|
79
79
|
}`;
|
|
80
80
|
}
|
|
81
|
-
},
|
|
82
|
-
if (e.querySelector(`[${
|
|
83
|
-
const
|
|
81
|
+
}, Ue = (e, t) => {
|
|
82
|
+
if (e.querySelector(`[${M}]`)) return;
|
|
83
|
+
const n = [], r = [], l = (o) => {
|
|
84
84
|
if (o instanceof HTMLLinkElement) {
|
|
85
85
|
const s = `@import url("${o.href}") layer(${v})`;
|
|
86
|
-
|
|
87
|
-
} else o instanceof HTMLStyleElement &&
|
|
86
|
+
n.push(o.media ? `${s} ${o.media};` : `${s};`);
|
|
87
|
+
} else o instanceof HTMLStyleElement && r.push(j(o.textContent || ""));
|
|
88
88
|
};
|
|
89
89
|
document.head.querySelectorAll("style").forEach(l), document.head.querySelectorAll('link[rel="stylesheet"]').forEach(l);
|
|
90
90
|
let a = t.parentNode;
|
|
91
91
|
for (; a; )
|
|
92
92
|
a instanceof ShadowRoot && (a.querySelectorAll("style").forEach(l), a.querySelectorAll('link[rel="stylesheet"]').forEach(l)), a = a.parentNode;
|
|
93
93
|
const i = document.createElement("style");
|
|
94
|
-
i.setAttribute(
|
|
94
|
+
i.setAttribute(M, ""), i.textContent = [
|
|
95
95
|
`@layer ${v};`,
|
|
96
|
-
...
|
|
97
|
-
...
|
|
96
|
+
...n,
|
|
97
|
+
...r
|
|
98
98
|
].join(`
|
|
99
99
|
`), e.appendChild(i);
|
|
100
|
-
},
|
|
100
|
+
}, x = "data-bs-host-style", k = /* @__PURE__ */ new WeakMap(), N = (e, t) => e.replace(
|
|
101
101
|
/url\(\s*(?:"([^"\n]*)"|'([^'\n]*)'|([^\s)]*))\s*\)/gi,
|
|
102
|
-
(
|
|
102
|
+
(n, r, l, a) => {
|
|
103
103
|
var o;
|
|
104
|
-
const i = (o =
|
|
105
|
-
if (!i || /^(?:data:|blob:|#|var\()/i.test(i)) return
|
|
104
|
+
const i = (o = r != null ? r : l) != null ? o : a;
|
|
105
|
+
if (!i || /^(?:data:|blob:|#|var\()/i.test(i)) return n;
|
|
106
106
|
try {
|
|
107
107
|
return `url(${JSON.stringify(new URL(i, t).href)})`;
|
|
108
108
|
} catch (s) {
|
|
109
|
-
return
|
|
109
|
+
return n;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
),
|
|
113
|
-
if (
|
|
114
|
-
const
|
|
115
|
-
return
|
|
112
|
+
), U = (e) => e.replace(/(^|,\s*)(?::root|html)(?=$|[\s>.:#\[])/g, "$1:host").replace(/:host\s+(?:>\s*)?body(?=$|[\s>.:#\[])/g, ":host > [data-bs-shadow-content]").replace(/(^|,\s*)body(?=$|[\s>.:#\[])/g, "$1[data-bs-shadow-content]"), C = (e, t) => Array.from(e).map((n) => {
|
|
113
|
+
if (n.type === 1) {
|
|
114
|
+
const r = n, l = n.cssText.slice(n.cssText.indexOf("{"));
|
|
115
|
+
return U(r.selectorText) + N(l, t);
|
|
116
116
|
}
|
|
117
|
-
return "cssRules" in
|
|
117
|
+
return "cssRules" in n && n.type !== 7 ? n.cssText.slice(0, n.cssText.indexOf("{") + 1) + C(n.cssRules, t) + "}" : N(n.cssText, t);
|
|
118
118
|
}).join(`
|
|
119
|
-
`),
|
|
120
|
-
var
|
|
121
|
-
const t = e.nodeType === 9 ? e : e.ownerDocument,
|
|
119
|
+
`), q = (e) => {
|
|
120
|
+
var r, l;
|
|
121
|
+
const t = e.nodeType === 9 ? e : e.ownerDocument, n = [];
|
|
122
122
|
if (e.nodeType === 9 && t.body) {
|
|
123
|
-
const a = t.defaultView.getComputedStyle(t.body), i = ["font", "color", "line-height", "letter-spacing", "text-align", "text-transform", "direction", "color-scheme"], o = Array.from(a).filter((
|
|
124
|
-
|
|
123
|
+
const a = t.defaultView.getComputedStyle(t.body), i = ["font", "color", "line-height", "letter-spacing", "text-align", "text-transform", "direction", "color-scheme"], o = Array.from(a).filter((m) => m.startsWith("--")), s = [...i, ...o].map((m) => `${m}:${a.getPropertyValue(m)};`).join("");
|
|
124
|
+
n.push({ source: t, css: `:host {display:contents;${s}}`, media: "", nonce: "", classes: `${t.documentElement.className} ${t.body.className}` });
|
|
125
125
|
}
|
|
126
126
|
for (const a of Array.from(e.querySelectorAll('style,link[rel~="stylesheet"]'))) {
|
|
127
|
-
if (a.hasAttribute(
|
|
127
|
+
if (a.hasAttribute(x) || a.hasAttribute("data-bs-sdk-styles") || a.hasAttribute("data-shadow-slot-injected") || a.disabled || (r = a.sheet) != null && r.disabled) continue;
|
|
128
128
|
const i = a.media || "", o = a.nonce || "";
|
|
129
129
|
try {
|
|
130
130
|
if (a.sheet) {
|
|
131
|
-
|
|
131
|
+
n.push({ source: a, css: C(a.sheet.cssRules, a.sheet.href || a.baseURI), media: i, nonce: o });
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
134
|
} catch (s) {
|
|
135
135
|
if (a.tagName === "LINK") {
|
|
136
|
-
|
|
136
|
+
n.push({ source: a, href: a.href, media: i, nonce: o });
|
|
137
137
|
continue;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
a.tagName === "LINK" ?
|
|
140
|
+
a.tagName === "LINK" ? n.push({ source: a, href: a.href, media: i, nonce: o }) : n.push({ source: a, css: N(a.textContent || "", a.baseURI), media: i, nonce: o });
|
|
141
141
|
}
|
|
142
142
|
for (const a of Array.from(e.adoptedStyleSheets || []))
|
|
143
|
-
a.disabled ||
|
|
144
|
-
return ((l =
|
|
145
|
-
},
|
|
143
|
+
a.disabled || n.push({ source: a, css: C(a.cssRules, t.baseURI), media: a.media.mediaText, nonce: "" });
|
|
144
|
+
return ((l = n[0]) == null ? void 0 : l.source) === t && n.push(n.shift()), n;
|
|
145
|
+
}, G = (e) => {
|
|
146
146
|
const t = k.get(e);
|
|
147
147
|
if (t) return t;
|
|
148
|
-
const
|
|
149
|
-
let
|
|
148
|
+
const n = e.nodeType === 9 ? e : e.ownerDocument;
|
|
149
|
+
let r = q(e), l = !1;
|
|
150
150
|
const a = /* @__PURE__ */ new Set(), i = () => {
|
|
151
151
|
l = !1;
|
|
152
|
-
const u =
|
|
153
|
-
u.length ===
|
|
152
|
+
const u = q(e);
|
|
153
|
+
u.length === r.length && u.every((c, b) => c.source === r[b].source && c.css === r[b].css && c.href === r[b].href && c.media === r[b].media && c.nonce === r[b].nonce && c.classes === r[b].classes) || (r = u, a.forEach((c) => c()));
|
|
154
154
|
}, o = () => {
|
|
155
155
|
l || (l = !0, queueMicrotask(() => {
|
|
156
156
|
a.size && i();
|
|
@@ -158,68 +158,68 @@ ${e}
|
|
|
158
158
|
}, s = new MutationObserver((u) => {
|
|
159
159
|
u.some((c) => {
|
|
160
160
|
const b = c.target.nodeType === 1 ? c.target : c.target.parentElement;
|
|
161
|
-
return b != null && b.closest(`style[${
|
|
161
|
+
return b != null && b.closest(`style[${x}],style[data-bs-sdk-styles]`) ? !1 : (b === n.documentElement || b === n.body) && c.type === "attributes" || b != null && b.matches('style,link[rel~="stylesheet"]') ? !0 : [...Array.from(c.addedNodes), ...Array.from(c.removedNodes)].some(
|
|
162
162
|
(h) => h.nodeType === 1 && (h.matches('style,link[rel~="stylesheet"]') || h.querySelector('style,link[rel~="stylesheet"]'))
|
|
163
163
|
);
|
|
164
164
|
}) && o();
|
|
165
165
|
});
|
|
166
166
|
s.observe(e, { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["href", "rel", "media", "disabled", "class", "style"] }), e.addEventListener("load", o, !0);
|
|
167
|
-
const
|
|
168
|
-
read: () =>
|
|
167
|
+
const m = n.defaultView.setInterval(i, 1e3), d = {
|
|
168
|
+
read: () => r,
|
|
169
169
|
refresh: o,
|
|
170
170
|
subscribe(u) {
|
|
171
171
|
return a.add(u), () => {
|
|
172
|
-
a.delete(u), !a.size && (s.disconnect(), e.removeEventListener("load", o, !0),
|
|
172
|
+
a.delete(u), !a.size && (s.disconnect(), e.removeEventListener("load", o, !0), n.defaultView.clearInterval(m), k.delete(e));
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
return k.set(e, d), d;
|
|
177
|
-
},
|
|
178
|
-
const
|
|
179
|
-
let
|
|
180
|
-
for (;
|
|
181
|
-
const d =
|
|
182
|
-
d.host.getAttribute("data-bs-style-mode") !== "sdk" &&
|
|
177
|
+
}, Ge = (e, t) => {
|
|
178
|
+
const n = [t.ownerDocument];
|
|
179
|
+
let r = t.getRootNode();
|
|
180
|
+
for (; r.nodeType === 11 && "host" in r; ) {
|
|
181
|
+
const d = r;
|
|
182
|
+
d.host.getAttribute("data-bs-style-mode") !== "sdk" && n.splice(1, 0, d), r = d.host.getRootNode();
|
|
183
183
|
}
|
|
184
|
-
const l =
|
|
184
|
+
const l = n.map(G), a = t.ownerDocument.createComment("host styles");
|
|
185
185
|
e.prepend(a);
|
|
186
186
|
const i = /* @__PURE__ */ new Map(), o = () => {
|
|
187
|
-
var
|
|
188
|
-
const d = l.reduce((
|
|
187
|
+
var E;
|
|
188
|
+
const d = l.reduce((p, f) => p.concat(f.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((E = t.ownerDocument.body) == null ? void 0 : E.className) || ""}`;
|
|
189
189
|
u && u.className !== c && (u.className = c);
|
|
190
|
-
const b = new Set(d.map((
|
|
191
|
-
for (const [
|
|
190
|
+
const b = new Set(d.map((p) => p.source));
|
|
191
|
+
for (const [p, f] of i) b.has(p) || (f.remove(), i.delete(p));
|
|
192
192
|
let h = a;
|
|
193
|
-
for (const
|
|
194
|
-
let
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
const A =
|
|
198
|
-
A.rel = "stylesheet", A.href !==
|
|
199
|
-
} else
|
|
200
|
-
h.nextSibling !==
|
|
193
|
+
for (const p of d) {
|
|
194
|
+
let f = i.get(p.source);
|
|
195
|
+
const W = p.href ? "LINK" : "STYLE";
|
|
196
|
+
if (f && f.tagName !== W && (f.remove(), i.delete(p.source), f = void 0), f || (f = t.ownerDocument.createElement(p.href ? "link" : "style"), f.setAttribute(x, ""), i.set(p.source, f)), f.media = p.media, f.nonce = p.nonce, p.href) {
|
|
197
|
+
const A = f;
|
|
198
|
+
A.rel = "stylesheet", A.href !== p.href && (A.href = p.href);
|
|
199
|
+
} else f.textContent !== p.css && (f.textContent = p.css || "");
|
|
200
|
+
h.nextSibling !== f && h.after(f), h = f;
|
|
201
201
|
}
|
|
202
202
|
}, s = l.map((d) => d.subscribe(o));
|
|
203
203
|
o();
|
|
204
|
-
const
|
|
204
|
+
const m = new MutationObserver((d) => {
|
|
205
205
|
d.some((u) => {
|
|
206
206
|
const c = u.target.nodeType === 1 ? u.target : u.target.parentElement;
|
|
207
207
|
return c && !c.closest("style,link");
|
|
208
208
|
}) && l.forEach((u) => u.refresh());
|
|
209
209
|
});
|
|
210
|
-
return
|
|
211
|
-
|
|
210
|
+
return m.observe(e, { subtree: !0, childList: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] }), () => {
|
|
211
|
+
m.disconnect(), s.forEach((d) => d()), i.forEach((d) => d.remove()), a.remove();
|
|
212
212
|
};
|
|
213
213
|
};
|
|
214
|
-
function
|
|
214
|
+
function H(e) {
|
|
215
215
|
return Array.isArray(e) ? e.every((t) => typeof t == "string") : !1;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function z(e) {
|
|
218
218
|
return Array.isArray(e) ? e.every(
|
|
219
219
|
(t) => typeof t == "object" && t !== null && "label" in t && "value" in t && typeof t.label == "string" && typeof t.value == "string"
|
|
220
220
|
) : !1;
|
|
221
221
|
}
|
|
222
|
-
const
|
|
222
|
+
const He = (e) => H(e) ? e.join(", ") : z(e) ? e.map((n) => n.value).join(", ") : e, Q = /* @__PURE__ */ new Set([
|
|
223
223
|
"password",
|
|
224
224
|
"textarea",
|
|
225
225
|
"datetime",
|
|
@@ -230,16 +230,16 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
230
230
|
"combocheck",
|
|
231
231
|
"checkboxgroup",
|
|
232
232
|
"number"
|
|
233
|
-
]),
|
|
234
|
-
const
|
|
235
|
-
return (
|
|
236
|
-
},
|
|
237
|
-
const
|
|
238
|
-
return
|
|
239
|
-
},
|
|
240
|
-
const
|
|
241
|
-
return (
|
|
242
|
-
},
|
|
233
|
+
]), ze = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? Q.has(t.widget.type) : !1) : [], Y = (e) => (t) => {
|
|
234
|
+
const n = y(t);
|
|
235
|
+
return (n == null ? void 0 : n.type) === e;
|
|
236
|
+
}, Qe = (e) => (t) => {
|
|
237
|
+
const n = t, r = n == null ? void 0 : n.part;
|
|
238
|
+
return Y(e)(r);
|
|
239
|
+
}, Ye = (e) => (t) => {
|
|
240
|
+
const n = y(t);
|
|
241
|
+
return (n == null ? void 0 : n.type) !== e ? null : (n == null ? void 0 : n.field) || null;
|
|
242
|
+
}, Ke = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Ve = (e) => {
|
|
243
243
|
if (typeof e != "string")
|
|
244
244
|
return e;
|
|
245
245
|
try {
|
|
@@ -247,14 +247,14 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
247
247
|
} catch (t) {
|
|
248
248
|
return console.info("[safeParseJson] Failed to parse JSON:", t), null;
|
|
249
249
|
}
|
|
250
|
-
},
|
|
251
|
-
var
|
|
252
|
-
const t = (
|
|
253
|
-
return t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "number" && Number.isNaN(t) || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0 ? !1 :
|
|
254
|
-
},
|
|
255
|
-
const t = Date.now(),
|
|
250
|
+
}, F = (e) => !!(e && typeof e == "object" && e.qnKey), Xe = (e) => {
|
|
251
|
+
var r, l;
|
|
252
|
+
const t = (r = e == null ? void 0 : e.widget) == null ? void 0 : r.value, n = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.type;
|
|
253
|
+
return t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "number" && Number.isNaN(t) || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0 ? !1 : n === "signature" ? F(t) : n === "upload" || n === "image" ? Array.isArray(t) && t.length > 0 && t.every(F) : !0;
|
|
254
|
+
}, K = (e = "_widget_") => {
|
|
255
|
+
const t = Date.now(), n = String(t), r = n.length, l = n.slice(0, r - 5), a = String(Math.floor(Math.random() * 1e5)).padStart(5, "0");
|
|
256
256
|
return `${e}${l}${a}`;
|
|
257
|
-
},
|
|
257
|
+
}, Ze = (e, t) => ({
|
|
258
258
|
field: e,
|
|
259
259
|
onLoaded: () => {
|
|
260
260
|
t.fillWidget({
|
|
@@ -262,22 +262,22 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
262
262
|
field: e
|
|
263
263
|
});
|
|
264
264
|
},
|
|
265
|
-
onChange: (
|
|
265
|
+
onChange: (n, r, l, a) => {
|
|
266
266
|
const i = {
|
|
267
|
-
field:
|
|
268
|
-
checked:
|
|
267
|
+
field: r,
|
|
268
|
+
checked: n,
|
|
269
269
|
parentFieldName: l,
|
|
270
270
|
rowIndex: a
|
|
271
271
|
};
|
|
272
272
|
t.fillWidget(i);
|
|
273
273
|
}
|
|
274
|
-
}),
|
|
275
|
-
const
|
|
276
|
-
|
|
274
|
+
}), Je = 10, et = (e, t = "image/png") => new Promise((n) => {
|
|
275
|
+
const r = new Image();
|
|
276
|
+
r.crossOrigin = "anonymous", r.onload = () => {
|
|
277
277
|
const l = document.createElement("canvas");
|
|
278
|
-
l.width =
|
|
279
|
-
},
|
|
280
|
-
}),
|
|
278
|
+
l.width = r.naturalWidth, l.height = r.naturalHeight, l.getContext("2d").drawImage(r, 0, 0), n(l.toDataURL(t));
|
|
279
|
+
}, r.onerror = () => n(e), r.src = e;
|
|
280
|
+
}), V = {
|
|
281
281
|
eq: "等于",
|
|
282
282
|
neq: "不等于",
|
|
283
283
|
gt: "大于",
|
|
@@ -294,7 +294,7 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
294
294
|
range: "选择范围",
|
|
295
295
|
like: "模糊匹配",
|
|
296
296
|
unlike: "模糊不匹配"
|
|
297
|
-
},
|
|
297
|
+
}, X = {
|
|
298
298
|
usergroup: { in: "包含任意一个" },
|
|
299
299
|
deptgroup: { in: "包含任意一个" },
|
|
300
300
|
checkboxgroup: { in: "包含任意一个" },
|
|
@@ -302,12 +302,12 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
302
302
|
address: { in: "属于", nin: "不属于" },
|
|
303
303
|
location: { in: "包含", nin: "不包含" }
|
|
304
304
|
};
|
|
305
|
-
function
|
|
306
|
-
var
|
|
307
|
-
const
|
|
308
|
-
return (l = (
|
|
305
|
+
function tt(e, t) {
|
|
306
|
+
var r, l;
|
|
307
|
+
const n = t ? X[t] : void 0;
|
|
308
|
+
return (l = (r = n == null ? void 0 : n[e]) != null ? r : V[e]) != null ? l : e;
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const Z = {
|
|
311
311
|
// Text-like: equality, fuzzy, empty checks
|
|
312
312
|
text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
|
|
313
313
|
password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
|
|
@@ -351,7 +351,7 @@ const V = {
|
|
|
351
351
|
button: [],
|
|
352
352
|
subform: [],
|
|
353
353
|
unknown: []
|
|
354
|
-
},
|
|
354
|
+
}, J = {
|
|
355
355
|
text: "eq",
|
|
356
356
|
password: "eq",
|
|
357
357
|
radiogroup: "eq",
|
|
@@ -379,106 +379,136 @@ const V = {
|
|
|
379
379
|
dataload: "eq",
|
|
380
380
|
formula: "eq"
|
|
381
381
|
};
|
|
382
|
-
function
|
|
382
|
+
function nt(e) {
|
|
383
383
|
var t;
|
|
384
|
-
return e ? (t =
|
|
384
|
+
return e ? (t = Z[e]) != null ? t : [] : [];
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function rt(e) {
|
|
387
387
|
var t;
|
|
388
|
-
return e && (t =
|
|
388
|
+
return e && (t = J[e]) != null ? t : "eq";
|
|
389
389
|
}
|
|
390
390
|
function S(e) {
|
|
391
391
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function I(e) {
|
|
394
394
|
return S(e) ? e : null;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
return !!(e == null || e === "" || Array.isArray(e) && e.length === 0);
|
|
396
|
+
function R(e) {
|
|
397
|
+
return !!(e == null || e === "" || e === "{}" || Array.isArray(e) && e.length === 0);
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function _(e, t) {
|
|
400
400
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
401
401
|
if (e.length !== t.length) return !1;
|
|
402
|
-
const
|
|
403
|
-
return
|
|
402
|
+
const n = e.map(String).sort(), r = t.map(String).sort();
|
|
403
|
+
return n.every((l, a) => l === r[a]);
|
|
404
404
|
}
|
|
405
405
|
if (S(e) && S(t)) {
|
|
406
|
-
const
|
|
407
|
-
return
|
|
406
|
+
const n = Object.keys(e), r = Object.keys(t);
|
|
407
|
+
return n.length !== r.length ? !1 : n.every((l) => String(e[l]) === String(t[l]));
|
|
408
408
|
}
|
|
409
409
|
return String(e) === String(t);
|
|
410
410
|
}
|
|
411
|
-
function D(e
|
|
411
|
+
function D(e) {
|
|
412
|
+
if (e == null) return null;
|
|
413
|
+
let t = null;
|
|
414
|
+
if (e instanceof Date)
|
|
415
|
+
t = e.toISOString();
|
|
416
|
+
else if (typeof e == "number" && Number.isFinite(e)) {
|
|
417
|
+
const r = new Date(e), l = r.getFullYear(), a = String(r.getMonth() + 1).padStart(2, "0"), i = String(r.getDate()).padStart(2, "0");
|
|
418
|
+
return `${l}-${a}-${i}`;
|
|
419
|
+
} else
|
|
420
|
+
t = String(e).trim();
|
|
421
|
+
const n = /^(\d{4})-(\d{1,2})-(\d{1,2})/.exec(t);
|
|
422
|
+
return n ? `${n[1]}-${n[2].padStart(2, "0")}-${n[3].padStart(2, "0")}` : null;
|
|
423
|
+
}
|
|
424
|
+
function $(e, t) {
|
|
425
|
+
const n = D(e), r = D(t);
|
|
426
|
+
return n !== null && r !== null ? n === r : _(e, t);
|
|
427
|
+
}
|
|
428
|
+
function T(e, t) {
|
|
412
429
|
if (S(t)) {
|
|
413
|
-
const
|
|
414
|
-
return !(!
|
|
430
|
+
const r = I(e);
|
|
431
|
+
return !(!r || t.province !== void 0 && String(r.province) !== String(t.province) || t.city !== void 0 && String(r.city) !== String(t.city) || t.district !== void 0 && String(r.district) !== String(t.district));
|
|
415
432
|
}
|
|
416
|
-
const
|
|
417
|
-
return Array.isArray(e) ? e.some((
|
|
433
|
+
const n = Array.isArray(t) ? t.map(String) : [];
|
|
434
|
+
return Array.isArray(e) ? e.some((r) => n.includes(String(r))) : n.includes(String(e));
|
|
418
435
|
}
|
|
419
|
-
function
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
const
|
|
423
|
-
return
|
|
436
|
+
function ee(e, t) {
|
|
437
|
+
const n = Array.isArray(t) ? t.map(String) : [];
|
|
438
|
+
if (n.length === 0) return !1;
|
|
439
|
+
const r = Array.isArray(e) ? e.map(String) : [];
|
|
440
|
+
return n.every((l) => r.includes(l));
|
|
424
441
|
}
|
|
425
|
-
function
|
|
426
|
-
const
|
|
427
|
-
if (!
|
|
428
|
-
const
|
|
429
|
-
return !(isNaN(
|
|
442
|
+
function te(e, t) {
|
|
443
|
+
const n = I(t);
|
|
444
|
+
if (!n) return !1;
|
|
445
|
+
const r = Number(e);
|
|
446
|
+
return !(isNaN(r) || n.min !== void 0 && n.min !== null && r < Number(n.min) || n.max !== void 0 && n.max !== null && r > Number(n.max));
|
|
430
447
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
448
|
+
const ne = (e, t) => t === "user" ? e._id : e;
|
|
449
|
+
function re(e, t) {
|
|
450
|
+
var m, d, u;
|
|
451
|
+
const n = (m = e.field.widget) == null ? void 0 : m.widgetName;
|
|
452
|
+
if (!n) return !1;
|
|
453
|
+
const r = (d = e.field.widget) == null ? void 0 : d.type, l = t[n], a = ne(l, r), { operator: i, value: o } = e, s = ((u = e.field.widget) == null ? void 0 : u.type) === "datetime";
|
|
454
|
+
switch (i) {
|
|
437
455
|
case "empty":
|
|
438
|
-
return
|
|
456
|
+
return R(a);
|
|
439
457
|
case "not_empty":
|
|
440
|
-
return !
|
|
458
|
+
return !R(a);
|
|
441
459
|
case "eq":
|
|
442
|
-
return
|
|
460
|
+
return s ? $(a, o) : _(a, o);
|
|
443
461
|
case "neq":
|
|
444
|
-
return !
|
|
462
|
+
return s ? !$(a, o) : !_(a, o);
|
|
445
463
|
case "contains":
|
|
446
464
|
case "like":
|
|
447
|
-
return String(
|
|
465
|
+
return String(a).includes(String(o));
|
|
448
466
|
case "not_contains":
|
|
449
467
|
case "unlike":
|
|
450
|
-
return !String(
|
|
468
|
+
return !String(a).includes(String(o));
|
|
451
469
|
case "gt":
|
|
452
|
-
return Number(
|
|
470
|
+
return Number(a) > Number(o);
|
|
453
471
|
case "gte":
|
|
454
|
-
return Number(
|
|
472
|
+
return Number(a) >= Number(o);
|
|
455
473
|
case "lt":
|
|
456
|
-
return Number(
|
|
474
|
+
return Number(a) < Number(o);
|
|
457
475
|
case "lte":
|
|
458
|
-
return Number(
|
|
476
|
+
return Number(a) <= Number(o);
|
|
459
477
|
case "in":
|
|
460
|
-
return
|
|
478
|
+
return T(a, o);
|
|
461
479
|
case "nin":
|
|
462
|
-
return !
|
|
480
|
+
return !T(a, o);
|
|
463
481
|
case "all":
|
|
464
|
-
return
|
|
482
|
+
return ee(a, o);
|
|
465
483
|
case "range":
|
|
466
|
-
return
|
|
484
|
+
return te(a, o);
|
|
467
485
|
default:
|
|
468
486
|
return !1;
|
|
469
487
|
}
|
|
470
488
|
}
|
|
471
|
-
function
|
|
489
|
+
function at(e, t) {
|
|
490
|
+
if (!t || !(t != null && t.length))
|
|
491
|
+
return !1;
|
|
492
|
+
const n = e.formFieldEditPreference;
|
|
493
|
+
if (n === "edit_any_field")
|
|
494
|
+
return !!(t != null && t.length);
|
|
495
|
+
const r = new Set(t);
|
|
496
|
+
return n == null ? void 0 : n.fields.some((l) => {
|
|
497
|
+
var a;
|
|
498
|
+
return r.has((a = l == null ? void 0 : l.widget) == null ? void 0 : a.widgetName);
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function lt(e, t) {
|
|
472
502
|
if (!e.enabled)
|
|
473
503
|
return !1;
|
|
474
|
-
const
|
|
475
|
-
if (!
|
|
476
|
-
const { items:
|
|
477
|
-
if (!
|
|
478
|
-
const a =
|
|
504
|
+
const n = e.triggerCondition;
|
|
505
|
+
if (!n) return !0;
|
|
506
|
+
const { items: r, quantifier: l } = n;
|
|
507
|
+
if (!r || r.length === 0) return !0;
|
|
508
|
+
const a = r.map((i) => re(i, t));
|
|
479
509
|
return l === "any" ? a.some((i) => i) : a.every((i) => i);
|
|
480
510
|
}
|
|
481
|
-
const
|
|
511
|
+
const it = (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" || t.type === "app" || t.type === "form", ae = {
|
|
482
512
|
eq: "eq",
|
|
483
513
|
neq: "ne",
|
|
484
514
|
gt: "gt",
|
|
@@ -495,7 +525,7 @@ const rt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
|
|
|
495
525
|
empty: "empty",
|
|
496
526
|
not_empty: "not_empty",
|
|
497
527
|
range: "range"
|
|
498
|
-
},
|
|
528
|
+
}, le = {
|
|
499
529
|
eq: "eq",
|
|
500
530
|
ne: "neq",
|
|
501
531
|
gt: "gt",
|
|
@@ -513,24 +543,24 @@ const rt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
|
|
|
513
543
|
not_empty: "not_empty",
|
|
514
544
|
range: "range"
|
|
515
545
|
};
|
|
516
|
-
function
|
|
517
|
-
const t = e.quantifier === "any" ? "or" : "and",
|
|
518
|
-
var i, o, s,
|
|
519
|
-
const l = (i =
|
|
546
|
+
function ot(e) {
|
|
547
|
+
const t = e.quantifier === "any" ? "or" : "and", n = e.items.map((r) => {
|
|
548
|
+
var i, o, s, m, d, u;
|
|
549
|
+
const l = (i = ae[r.operator]) != null ? i : "eq";
|
|
520
550
|
let a;
|
|
521
|
-
return
|
|
522
|
-
field: (
|
|
551
|
+
return r.operator === "range" && S(r.value) ? a = [r.value.min, r.value.max] : Array.isArray(r.value) ? a = r.value : a = [r.value], {
|
|
552
|
+
field: (m = (s = (o = r.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? m : "",
|
|
523
553
|
method: l,
|
|
524
554
|
value: a,
|
|
525
|
-
type: (u = (d =
|
|
555
|
+
type: (u = (d = r.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
|
|
526
556
|
};
|
|
527
557
|
});
|
|
528
|
-
return JSON.stringify({ rel: t, cond:
|
|
558
|
+
return JSON.stringify({ rel: t, cond: n });
|
|
529
559
|
}
|
|
530
|
-
function
|
|
531
|
-
const t = JSON.parse(e),
|
|
532
|
-
var s,
|
|
533
|
-
const i = (s =
|
|
560
|
+
function st(e) {
|
|
561
|
+
const t = JSON.parse(e), n = t.rel === "or" ? "any" : "all", r = t.cond.map((l, a) => {
|
|
562
|
+
var s, m;
|
|
563
|
+
const i = (s = le[l.method]) != null ? s : "eq";
|
|
534
564
|
let o = l.value;
|
|
535
565
|
return i === "range" ? o = { min: l.value[0], max: l.value[1] } : ["eq", "neq", "contains", "not_contains", "gt", "gte", "lt", "lte"].includes(i) && (o = l.value[0]), {
|
|
536
566
|
id: `${l.field}_${a}`,
|
|
@@ -538,7 +568,7 @@ function at(e) {
|
|
|
538
568
|
label: l.field,
|
|
539
569
|
widget: {
|
|
540
570
|
widgetName: l.field,
|
|
541
|
-
type: (
|
|
571
|
+
type: (m = l.type) != null ? m : "unknown",
|
|
542
572
|
value: void 0
|
|
543
573
|
}
|
|
544
574
|
},
|
|
@@ -546,25 +576,25 @@ function at(e) {
|
|
|
546
576
|
value: o
|
|
547
577
|
};
|
|
548
578
|
});
|
|
549
|
-
return { targetName: "", quantifier:
|
|
579
|
+
return { targetName: "", quantifier: n, items: r };
|
|
550
580
|
}
|
|
551
|
-
function
|
|
552
|
-
const t = (
|
|
581
|
+
function ut(e) {
|
|
582
|
+
const t = (n) => String(n).padStart(2, "0");
|
|
553
583
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
|
|
554
584
|
}
|
|
555
|
-
function
|
|
556
|
-
const
|
|
585
|
+
function dt(e, t, n = 1) {
|
|
586
|
+
const r = [], l = [];
|
|
557
587
|
for (const a of e)
|
|
558
|
-
t(a) ? l.push(a) : (l.length > 0 && (
|
|
559
|
-
return l.length > 0 &&
|
|
588
|
+
t(a) ? l.push(a) : (l.length > 0 && (r.push(l.length >= n ? [...l] : l[0]), l.length = 0), r.push(a));
|
|
589
|
+
return l.length > 0 && r.push(l.length >= 2 ? [...l] : l[0]), r;
|
|
560
590
|
}
|
|
561
|
-
function
|
|
591
|
+
function L(e) {
|
|
562
592
|
const t = [];
|
|
563
|
-
for (const
|
|
564
|
-
Array.isArray(
|
|
593
|
+
for (const n of e)
|
|
594
|
+
Array.isArray(n) ? t.push(...L(n)) : t.push(n);
|
|
565
595
|
return t;
|
|
566
596
|
}
|
|
567
|
-
const
|
|
597
|
+
const ie = {
|
|
568
598
|
projectdevelopment: "e914",
|
|
569
599
|
resourcelibrary: "e915",
|
|
570
600
|
Plugin2: "e90e",
|
|
@@ -971,36 +1001,36 @@ const ne = {
|
|
|
971
1001
|
Automation1: "ea95",
|
|
972
1002
|
Avatar: "ea96"
|
|
973
1003
|
};
|
|
974
|
-
function
|
|
975
|
-
const t =
|
|
1004
|
+
function ct(e) {
|
|
1005
|
+
const t = ie[e];
|
|
976
1006
|
return t ? `&#x${t};` : void 0;
|
|
977
1007
|
}
|
|
978
|
-
const
|
|
979
|
-
if (!
|
|
1008
|
+
const gt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6: "e7b8", 7: "e7c8", 8: "e7c1", 9: "e7bb", 10: "e7ca", 11: "e7c4", 12: "e7b4", 13: "e7ba", 14: "e7b6", 15: "e7c5", 16: "e7bf", 17: "e7c3", 18: "e7c2", 19: "e7c6", 20: "e7bd", 21: "e7c0", 22: "e7cb", 23: "e7b7", 24: "e7b9", 25: "e814", 26: "e81d", 27: "e81c", 28: "e81a", 29: "e813", 30: "e81b", 31: "e818", 32: "e819", 33: "e817", 34: "e816", 35: "e810", 36: "e815", 37: "e812", 38: "e811", 39: "e80e", 40: "e80f", 41: "e80d", 42: "e807", 43: "e80b", 44: "e80a", 45: "e81d", 46: "e809", 47: "e808", 48: "e805", 49: "e7ff", 50: "e803", 51: "e806", 52: "e802", 53: "e800", 54: "e804", 55: "e801", 56: "e7fe", 57: "e7fc", 58: "e7fd", 59: "e7fb", 60: "e7fa" }, mt = (e, t, n) => {
|
|
1009
|
+
if (!n)
|
|
980
1010
|
return {
|
|
981
1011
|
translated: ""
|
|
982
1012
|
};
|
|
983
|
-
const
|
|
1013
|
+
const r = new Map(t.map((i) => [i.widget.widgetName, i.label]));
|
|
984
1014
|
for (const i of t)
|
|
985
1015
|
if (i.widget.type === "subform" && i.widget.items) {
|
|
986
1016
|
for (const o of i.widget.items)
|
|
987
1017
|
if ("widget" in o && !("options" in o)) {
|
|
988
1018
|
const s = `${i.widget.widgetName}.${o.widget.widgetName}`;
|
|
989
|
-
|
|
1019
|
+
r.set(s, o.label);
|
|
990
1020
|
}
|
|
991
1021
|
}
|
|
992
1022
|
const l = [], a = e.replace(
|
|
993
1023
|
/\$\{(virtual\.)?(_widget_\d+(?:\._widget_\d+)?)\}/g,
|
|
994
1024
|
(i, o, s) => {
|
|
995
|
-
const
|
|
1025
|
+
const m = !!o, { translated: d, meta: u } = n(s, m);
|
|
996
1026
|
return u && l.push(u), d;
|
|
997
1027
|
}
|
|
998
1028
|
);
|
|
999
1029
|
return {
|
|
1000
|
-
meta: l.length ?
|
|
1030
|
+
meta: l.length ? L(l) : null,
|
|
1001
1031
|
translated: (a != null ? a : "").trim()
|
|
1002
1032
|
};
|
|
1003
|
-
},
|
|
1033
|
+
}, oe = {
|
|
1004
1034
|
手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
|
|
1005
1035
|
电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
|
|
1006
1036
|
邮政编码: "^\\d{6}$",
|
|
@@ -1012,8 +1042,8 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1012
1042
|
二维码图片: "qrcode",
|
|
1013
1043
|
条形码图片: "barcode",
|
|
1014
1044
|
自定义: "custom"
|
|
1015
|
-
},
|
|
1016
|
-
const { widget: t, labelStyle:
|
|
1045
|
+
}, O = (e) => {
|
|
1046
|
+
const { widget: t, labelStyle: n, label: r, ...l } = e || {}, a = oe[n] || "";
|
|
1017
1047
|
return {
|
|
1018
1048
|
widget: {
|
|
1019
1049
|
widgetName: `_widget_${Date.now()}`,
|
|
@@ -1053,26 +1083,26 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1053
1083
|
...t,
|
|
1054
1084
|
regex: a,
|
|
1055
1085
|
type: "text",
|
|
1056
|
-
labelStyle:
|
|
1086
|
+
labelStyle: r
|
|
1057
1087
|
},
|
|
1058
1088
|
// description,
|
|
1059
|
-
label:
|
|
1089
|
+
label: r,
|
|
1060
1090
|
lineWidth: 6,
|
|
1061
1091
|
tab: null,
|
|
1062
1092
|
...l
|
|
1063
1093
|
};
|
|
1064
|
-
},
|
|
1065
|
-
const
|
|
1094
|
+
}, g = (e = "_widget", t) => {
|
|
1095
|
+
const n = `${e}_${Date.now()}`;
|
|
1066
1096
|
if (t === void 0)
|
|
1067
|
-
return
|
|
1068
|
-
const
|
|
1069
|
-
return `${
|
|
1070
|
-
},
|
|
1071
|
-
const { widget: t, label:
|
|
1097
|
+
return n;
|
|
1098
|
+
const r = t.toString().length;
|
|
1099
|
+
return `${n.slice(0, -r)}${t}`;
|
|
1100
|
+
}, se = (e) => {
|
|
1101
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1072
1102
|
return {
|
|
1073
1103
|
widget: {
|
|
1074
1104
|
type: "number",
|
|
1075
|
-
widgetName:
|
|
1105
|
+
widgetName: g(),
|
|
1076
1106
|
widgetNameAlias: "",
|
|
1077
1107
|
triggerEvent: !1,
|
|
1078
1108
|
customCls: null,
|
|
@@ -1124,16 +1154,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1124
1154
|
//繁体的
|
|
1125
1155
|
},
|
|
1126
1156
|
...t,
|
|
1127
|
-
labelStyle:
|
|
1157
|
+
labelStyle: n
|
|
1128
1158
|
},
|
|
1129
1159
|
// description,
|
|
1130
|
-
label:
|
|
1160
|
+
label: n,
|
|
1131
1161
|
lineWidth: 6,
|
|
1132
1162
|
tab: null,
|
|
1133
|
-
...
|
|
1163
|
+
...r
|
|
1134
1164
|
};
|
|
1135
|
-
},
|
|
1136
|
-
const { widget: t, label:
|
|
1165
|
+
}, ue = (e) => {
|
|
1166
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1137
1167
|
return {
|
|
1138
1168
|
widget: {
|
|
1139
1169
|
type: "combo",
|
|
@@ -1161,16 +1191,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1161
1191
|
colorEnable: !0,
|
|
1162
1192
|
//颜色 是否开启颜色
|
|
1163
1193
|
...t,
|
|
1164
|
-
labelStyle:
|
|
1194
|
+
labelStyle: n
|
|
1165
1195
|
},
|
|
1166
1196
|
// description,
|
|
1167
|
-
label:
|
|
1197
|
+
label: n,
|
|
1168
1198
|
lineWidth: 6,
|
|
1169
1199
|
tab: null,
|
|
1170
|
-
...
|
|
1200
|
+
...r
|
|
1171
1201
|
};
|
|
1172
|
-
},
|
|
1173
|
-
const { widget: t, label:
|
|
1202
|
+
}, P = (e) => {
|
|
1203
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1174
1204
|
return {
|
|
1175
1205
|
widget: {
|
|
1176
1206
|
enable: !0,
|
|
@@ -1199,14 +1229,14 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1199
1229
|
type: "radiogroup"
|
|
1200
1230
|
},
|
|
1201
1231
|
// description,
|
|
1202
|
-
label:
|
|
1232
|
+
label: n,
|
|
1203
1233
|
lineWidth: 6,
|
|
1204
1234
|
tab: null,
|
|
1205
|
-
...
|
|
1206
|
-
labelStyle:
|
|
1235
|
+
...r,
|
|
1236
|
+
labelStyle: n
|
|
1207
1237
|
};
|
|
1208
|
-
},
|
|
1209
|
-
const { widget: t, label:
|
|
1238
|
+
}, de = (e) => {
|
|
1239
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1210
1240
|
return {
|
|
1211
1241
|
widget: {
|
|
1212
1242
|
type: "datetime",
|
|
@@ -1265,19 +1295,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1265
1295
|
}
|
|
1266
1296
|
},
|
|
1267
1297
|
...t,
|
|
1268
|
-
labelStyle:
|
|
1298
|
+
labelStyle: n
|
|
1269
1299
|
},
|
|
1270
|
-
label:
|
|
1300
|
+
label: n,
|
|
1271
1301
|
lineWidth: 6,
|
|
1272
1302
|
tab: null,
|
|
1273
|
-
...
|
|
1303
|
+
...r
|
|
1274
1304
|
};
|
|
1275
|
-
}, w = (e) => e,
|
|
1276
|
-
const { widget: t, label:
|
|
1305
|
+
}, w = (e) => e, ce = (e) => {
|
|
1306
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1277
1307
|
return {
|
|
1278
1308
|
widget: {
|
|
1279
1309
|
type: "deptgroup",
|
|
1280
|
-
widgetName:
|
|
1310
|
+
widgetName: g(),
|
|
1281
1311
|
widgetNameAlias: "",
|
|
1282
1312
|
customCls: null,
|
|
1283
1313
|
height: "34",
|
|
@@ -1299,19 +1329,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1299
1329
|
limit: {},
|
|
1300
1330
|
valueOption: 0,
|
|
1301
1331
|
...t,
|
|
1302
|
-
labelStyle:
|
|
1332
|
+
labelStyle: n
|
|
1303
1333
|
},
|
|
1304
|
-
label:
|
|
1334
|
+
label: n,
|
|
1305
1335
|
lineWidth: 6,
|
|
1306
1336
|
tab: null,
|
|
1307
|
-
...
|
|
1337
|
+
...r
|
|
1308
1338
|
};
|
|
1309
|
-
},
|
|
1310
|
-
const { widget: t, label:
|
|
1339
|
+
}, ge = (e) => {
|
|
1340
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1311
1341
|
return {
|
|
1312
1342
|
widget: {
|
|
1313
1343
|
type: "sn",
|
|
1314
|
-
widgetName:
|
|
1344
|
+
widgetName: g(),
|
|
1315
1345
|
widgetNameAlias: "",
|
|
1316
1346
|
triggerEvent: 0,
|
|
1317
1347
|
customCls: null,
|
|
@@ -1335,20 +1365,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1335
1365
|
type: "incNumber"
|
|
1336
1366
|
}
|
|
1337
1367
|
],
|
|
1338
|
-
labelStyle:
|
|
1368
|
+
labelStyle: n
|
|
1339
1369
|
},
|
|
1340
1370
|
// description,
|
|
1341
|
-
label:
|
|
1371
|
+
label: n,
|
|
1342
1372
|
lineWidth: 6,
|
|
1343
1373
|
tab: null,
|
|
1344
|
-
...
|
|
1374
|
+
...r
|
|
1345
1375
|
};
|
|
1346
|
-
},
|
|
1347
|
-
const { widget: t, label:
|
|
1376
|
+
}, me = (e) => {
|
|
1377
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1348
1378
|
return {
|
|
1349
1379
|
widget: {
|
|
1350
1380
|
type: "dept",
|
|
1351
|
-
widgetName:
|
|
1381
|
+
widgetName: g(),
|
|
1352
1382
|
widgetNameAlias: "",
|
|
1353
1383
|
customCls: null,
|
|
1354
1384
|
height: "34",
|
|
@@ -1370,19 +1400,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1370
1400
|
limit: {},
|
|
1371
1401
|
valueOption: 0,
|
|
1372
1402
|
...t,
|
|
1373
|
-
labelStyle:
|
|
1403
|
+
labelStyle: n
|
|
1374
1404
|
},
|
|
1375
|
-
label:
|
|
1405
|
+
label: n,
|
|
1376
1406
|
lineWidth: 6,
|
|
1377
1407
|
tab: null,
|
|
1378
|
-
...
|
|
1408
|
+
...r
|
|
1379
1409
|
};
|
|
1380
|
-
},
|
|
1381
|
-
const { widget: t, label:
|
|
1410
|
+
}, fe = (e) => {
|
|
1411
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1382
1412
|
return {
|
|
1383
1413
|
widget: {
|
|
1384
1414
|
type: "usergroup",
|
|
1385
|
-
widgetName:
|
|
1415
|
+
widgetName: g(),
|
|
1386
1416
|
widgetNameAlias: "",
|
|
1387
1417
|
customCls: null,
|
|
1388
1418
|
height: "34",
|
|
@@ -1406,19 +1436,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1406
1436
|
//可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
|
|
1407
1437
|
valueOption: 0,
|
|
1408
1438
|
...t,
|
|
1409
|
-
labelStyle:
|
|
1439
|
+
labelStyle: n
|
|
1410
1440
|
},
|
|
1411
1441
|
// description,
|
|
1412
|
-
label:
|
|
1442
|
+
label: n,
|
|
1413
1443
|
lineWidth: 6,
|
|
1414
1444
|
tab: null,
|
|
1415
|
-
...
|
|
1445
|
+
...r
|
|
1416
1446
|
};
|
|
1417
|
-
},
|
|
1418
|
-
const { widget: t, label:
|
|
1447
|
+
}, pe = (e) => {
|
|
1448
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1419
1449
|
return {
|
|
1420
1450
|
widget: {
|
|
1421
|
-
widgetName:
|
|
1451
|
+
widgetName: g(),
|
|
1422
1452
|
widgetNameAlias: "",
|
|
1423
1453
|
customCls: null,
|
|
1424
1454
|
enable: !0,
|
|
@@ -1434,16 +1464,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1434
1464
|
//关联表的类型,只能是form
|
|
1435
1465
|
...t,
|
|
1436
1466
|
linkFields: [],
|
|
1437
|
-
labelStyle:
|
|
1467
|
+
labelStyle: n,
|
|
1438
1468
|
type: "linkdata"
|
|
1439
1469
|
},
|
|
1440
|
-
label:
|
|
1470
|
+
label: n,
|
|
1441
1471
|
lineWidth: 6,
|
|
1442
1472
|
tab: null,
|
|
1443
|
-
...
|
|
1473
|
+
...r
|
|
1444
1474
|
};
|
|
1445
|
-
},
|
|
1446
|
-
id:
|
|
1475
|
+
}, be = (e) => !e || !e.length ? e : e.map((t, n) => ({
|
|
1476
|
+
id: n,
|
|
1447
1477
|
// name: "_widget_1761976674767",
|
|
1448
1478
|
// form: "a2f34ef882158a3e97da4ef7",
|
|
1449
1479
|
// tag: buildWidgetName("f_", index),
|
|
@@ -1454,20 +1484,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1454
1484
|
isEditable: !0,
|
|
1455
1485
|
group: "dimension,filter,select",
|
|
1456
1486
|
formula: ""
|
|
1457
|
-
})),
|
|
1487
|
+
})), ye = (e) => !e || !e.length ? e : e.map((t) => ({
|
|
1458
1488
|
mode: "depend",
|
|
1459
1489
|
...t
|
|
1460
|
-
})),
|
|
1490
|
+
})), he = (e) => {
|
|
1461
1491
|
var l, a, i;
|
|
1462
|
-
const { widget: t, label:
|
|
1492
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1463
1493
|
return {
|
|
1464
1494
|
widget: {
|
|
1465
1495
|
type: "dataload",
|
|
1466
|
-
widgetName:
|
|
1496
|
+
widgetName: g(),
|
|
1467
1497
|
widgetNameAlias: "",
|
|
1468
1498
|
customCls: null,
|
|
1469
1499
|
width: 350,
|
|
1470
|
-
text:
|
|
1500
|
+
text: n,
|
|
1471
1501
|
enable: !0,
|
|
1472
1502
|
visible: !0,
|
|
1473
1503
|
allowBlank: !0,
|
|
@@ -1499,22 +1529,22 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1499
1529
|
forms: (l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.forms,
|
|
1500
1530
|
selectArg: [],
|
|
1501
1531
|
selectRel: "and",
|
|
1502
|
-
fields:
|
|
1503
|
-
mapFields:
|
|
1532
|
+
fields: be((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
|
|
1533
|
+
mapFields: ye((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
|
|
1504
1534
|
},
|
|
1505
|
-
labelStyle:
|
|
1535
|
+
labelStyle: n
|
|
1506
1536
|
},
|
|
1507
|
-
label:
|
|
1537
|
+
label: n,
|
|
1508
1538
|
lineWidth: 6,
|
|
1509
1539
|
tab: null,
|
|
1510
|
-
...
|
|
1540
|
+
...r
|
|
1511
1541
|
};
|
|
1512
|
-
},
|
|
1513
|
-
const { widget: t, label:
|
|
1542
|
+
}, we = (e) => {
|
|
1543
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1514
1544
|
return {
|
|
1515
1545
|
widget: {
|
|
1516
1546
|
type: "user",
|
|
1517
|
-
widgetName:
|
|
1547
|
+
widgetName: g(),
|
|
1518
1548
|
widgetNameAlias: "",
|
|
1519
1549
|
customCls: null,
|
|
1520
1550
|
height: "34",
|
|
@@ -1538,20 +1568,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1538
1568
|
//可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
|
|
1539
1569
|
valueOption: 0,
|
|
1540
1570
|
...t,
|
|
1541
|
-
labelStyle:
|
|
1571
|
+
labelStyle: n
|
|
1542
1572
|
},
|
|
1543
1573
|
// description,
|
|
1544
|
-
label:
|
|
1574
|
+
label: n,
|
|
1545
1575
|
lineWidth: 6,
|
|
1546
1576
|
tab: null,
|
|
1547
|
-
...
|
|
1577
|
+
...r
|
|
1548
1578
|
};
|
|
1549
|
-
},
|
|
1550
|
-
const { widget: t, label:
|
|
1579
|
+
}, Se = (e) => {
|
|
1580
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1551
1581
|
return {
|
|
1552
1582
|
widget: {
|
|
1553
1583
|
type: "signature",
|
|
1554
|
-
widgetName:
|
|
1584
|
+
widgetName: g(),
|
|
1555
1585
|
widgetNameAlias: "",
|
|
1556
1586
|
customCls: null,
|
|
1557
1587
|
height: 34,
|
|
@@ -1561,20 +1591,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1561
1591
|
allowBlank: !0,
|
|
1562
1592
|
rely: null,
|
|
1563
1593
|
...t,
|
|
1564
|
-
labelStyle:
|
|
1594
|
+
labelStyle: n
|
|
1565
1595
|
},
|
|
1566
1596
|
description: null,
|
|
1567
|
-
label:
|
|
1597
|
+
label: n,
|
|
1568
1598
|
lineWidth: 6,
|
|
1569
1599
|
tab: null,
|
|
1570
|
-
...
|
|
1600
|
+
...r
|
|
1571
1601
|
};
|
|
1572
|
-
},
|
|
1573
|
-
const { widget: t, label:
|
|
1602
|
+
}, ve = (e) => {
|
|
1603
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1574
1604
|
return {
|
|
1575
1605
|
widget: {
|
|
1576
1606
|
type: "image",
|
|
1577
|
-
widgetName:
|
|
1607
|
+
widgetName: g(),
|
|
1578
1608
|
widgetNameAlias: "",
|
|
1579
1609
|
customCls: null,
|
|
1580
1610
|
height: 100,
|
|
@@ -1634,19 +1664,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1634
1664
|
quality: 0.7,
|
|
1635
1665
|
//压缩图片比例,开启 浏览器图片压缩 后才能设置
|
|
1636
1666
|
...t,
|
|
1637
|
-
labelStyle:
|
|
1667
|
+
labelStyle: n
|
|
1638
1668
|
},
|
|
1639
|
-
label:
|
|
1669
|
+
label: n,
|
|
1640
1670
|
lineWidth: 6,
|
|
1641
1671
|
tab: null,
|
|
1642
|
-
...
|
|
1672
|
+
...r
|
|
1643
1673
|
};
|
|
1644
|
-
},
|
|
1645
|
-
const { widget: t, label:
|
|
1674
|
+
}, Ae = (e) => {
|
|
1675
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1646
1676
|
return {
|
|
1647
1677
|
widget: {
|
|
1648
1678
|
type: "upload",
|
|
1649
|
-
widgetName:
|
|
1679
|
+
widgetName: g(),
|
|
1650
1680
|
widgetNameAlias: "",
|
|
1651
1681
|
customCls: null,
|
|
1652
1682
|
enable: !0,
|
|
@@ -1668,20 +1698,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1668
1698
|
//设置单个文件大小上限,单位是字节,范围 1M-20M
|
|
1669
1699
|
// fileType,
|
|
1670
1700
|
...t,
|
|
1671
|
-
labelStyle:
|
|
1701
|
+
labelStyle: n
|
|
1672
1702
|
},
|
|
1673
1703
|
// description,
|
|
1674
|
-
label:
|
|
1704
|
+
label: n,
|
|
1675
1705
|
lineWidth: 6,
|
|
1676
1706
|
tab: null,
|
|
1677
|
-
...
|
|
1707
|
+
...r
|
|
1678
1708
|
};
|
|
1679
|
-
},
|
|
1680
|
-
const { widget: t, label:
|
|
1709
|
+
}, ke = (e) => {
|
|
1710
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1681
1711
|
return {
|
|
1682
1712
|
widget: {
|
|
1683
1713
|
type: "checkboxgroup",
|
|
1684
|
-
widgetName:
|
|
1714
|
+
widgetName: g(),
|
|
1685
1715
|
widgetNameAlias: "",
|
|
1686
1716
|
customCls: null,
|
|
1687
1717
|
enable: !0,
|
|
@@ -1703,38 +1733,38 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1703
1733
|
allowAddOptions: !1,
|
|
1704
1734
|
//允许成员填写时添加新选项
|
|
1705
1735
|
...t,
|
|
1706
|
-
labelStyle:
|
|
1736
|
+
labelStyle: n
|
|
1707
1737
|
},
|
|
1708
|
-
label:
|
|
1738
|
+
label: n,
|
|
1709
1739
|
lineWidth: 6,
|
|
1710
1740
|
tab: null,
|
|
1711
|
-
...
|
|
1741
|
+
...r
|
|
1712
1742
|
};
|
|
1713
|
-
},
|
|
1714
|
-
const { widget: t, label:
|
|
1743
|
+
}, Ne = (e) => {
|
|
1744
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1715
1745
|
return {
|
|
1716
1746
|
widget: {
|
|
1717
1747
|
type: "separator",
|
|
1718
|
-
widgetName:
|
|
1748
|
+
widgetName: g(),
|
|
1719
1749
|
widgetNameAlias: "",
|
|
1720
1750
|
customCls: null,
|
|
1721
1751
|
enable: !0,
|
|
1722
1752
|
visible: !0,
|
|
1723
1753
|
allowBlank: !0,
|
|
1724
1754
|
...t,
|
|
1725
|
-
labelStyle:
|
|
1755
|
+
labelStyle: n
|
|
1726
1756
|
},
|
|
1727
|
-
label:
|
|
1757
|
+
label: n,
|
|
1728
1758
|
lineWidth: 12,
|
|
1729
1759
|
tab: null,
|
|
1730
|
-
...
|
|
1760
|
+
...r
|
|
1731
1761
|
};
|
|
1732
|
-
},
|
|
1733
|
-
const { widget: t, label:
|
|
1762
|
+
}, Ce = (e) => {
|
|
1763
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1734
1764
|
return {
|
|
1735
1765
|
widget: {
|
|
1736
1766
|
type: "combocheck",
|
|
1737
|
-
widgetName:
|
|
1767
|
+
widgetName: g(),
|
|
1738
1768
|
widgetNameAlias: "",
|
|
1739
1769
|
customCls: null,
|
|
1740
1770
|
height: 34,
|
|
@@ -1759,19 +1789,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1759
1789
|
//允许成员填写时添加新选项
|
|
1760
1790
|
allowAddLinkData: !1,
|
|
1761
1791
|
...t,
|
|
1762
|
-
labelStyle:
|
|
1792
|
+
labelStyle: n
|
|
1763
1793
|
},
|
|
1764
|
-
label:
|
|
1794
|
+
label: n,
|
|
1765
1795
|
lineWidth: 6,
|
|
1766
1796
|
tab: null,
|
|
1767
|
-
...
|
|
1797
|
+
...r
|
|
1768
1798
|
};
|
|
1769
|
-
},
|
|
1770
|
-
const { widget: t, label:
|
|
1799
|
+
}, _e = (e) => {
|
|
1800
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1771
1801
|
return {
|
|
1772
1802
|
widget: {
|
|
1773
1803
|
type: "location",
|
|
1774
|
-
widgetName:
|
|
1804
|
+
widgetName: g(),
|
|
1775
1805
|
widgetNameAlias: "",
|
|
1776
1806
|
customCls: null,
|
|
1777
1807
|
enable: !0,
|
|
@@ -1796,19 +1826,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1796
1826
|
enablePcLocation: !0,
|
|
1797
1827
|
//允许PC端定位并选择位置
|
|
1798
1828
|
...t,
|
|
1799
|
-
labelStyle:
|
|
1829
|
+
labelStyle: n
|
|
1800
1830
|
},
|
|
1801
|
-
label:
|
|
1831
|
+
label: n,
|
|
1802
1832
|
lineWidth: 6,
|
|
1803
1833
|
tab: null,
|
|
1804
|
-
...
|
|
1834
|
+
...r
|
|
1805
1835
|
};
|
|
1806
|
-
},
|
|
1807
|
-
const { widget: t, label:
|
|
1836
|
+
}, xe = (e) => {
|
|
1837
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1808
1838
|
return {
|
|
1809
1839
|
widget: {
|
|
1810
1840
|
type: "textarea",
|
|
1811
|
-
widgetName:
|
|
1841
|
+
widgetName: g(),
|
|
1812
1842
|
widgetNameAlias: "",
|
|
1813
1843
|
triggerEvent: !1,
|
|
1814
1844
|
customCls: null,
|
|
@@ -1838,20 +1868,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1838
1868
|
maxLength: 5e3,
|
|
1839
1869
|
//限制输入最大字符数 不限制的话,整个maxLength不存在
|
|
1840
1870
|
...t,
|
|
1841
|
-
labelStyle:
|
|
1871
|
+
labelStyle: n
|
|
1842
1872
|
},
|
|
1843
1873
|
// description,
|
|
1844
|
-
label:
|
|
1874
|
+
label: n,
|
|
1845
1875
|
lineWidth: 6,
|
|
1846
1876
|
tab: null,
|
|
1847
|
-
...
|
|
1877
|
+
...r
|
|
1848
1878
|
};
|
|
1849
|
-
},
|
|
1850
|
-
const { widget: t, label:
|
|
1879
|
+
}, Ee = (e = {}) => {
|
|
1880
|
+
const { widget: t, label: n, ...r } = e;
|
|
1851
1881
|
return {
|
|
1852
1882
|
widget: {
|
|
1853
1883
|
type: "button",
|
|
1854
|
-
widgetName:
|
|
1884
|
+
widgetName: g(),
|
|
1855
1885
|
widgetNameAlias: "",
|
|
1856
1886
|
triggerEvent: 0,
|
|
1857
1887
|
customCls: null,
|
|
@@ -1883,19 +1913,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1883
1913
|
tip: "请设置提示内容"
|
|
1884
1914
|
},
|
|
1885
1915
|
...t,
|
|
1886
|
-
labelStyle:
|
|
1916
|
+
labelStyle: n
|
|
1887
1917
|
},
|
|
1888
|
-
label:
|
|
1918
|
+
label: n,
|
|
1889
1919
|
lineWidth: 6,
|
|
1890
1920
|
tab: null,
|
|
1891
|
-
...
|
|
1921
|
+
...r
|
|
1892
1922
|
};
|
|
1893
|
-
},
|
|
1894
|
-
const { widget: t, label:
|
|
1923
|
+
}, Me = (e = {}) => {
|
|
1924
|
+
const { widget: t, label: n, ...r } = e;
|
|
1895
1925
|
return {
|
|
1896
1926
|
widget: {
|
|
1897
1927
|
type: "address",
|
|
1898
|
-
widgetName:
|
|
1928
|
+
widgetName: g(),
|
|
1899
1929
|
widgetNameAlias: "",
|
|
1900
1930
|
customCls: null,
|
|
1901
1931
|
width: 720,
|
|
@@ -1917,25 +1947,25 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1917
1947
|
seleceMapAddress: !0,
|
|
1918
1948
|
//开启经纬度定位
|
|
1919
1949
|
...t,
|
|
1920
|
-
labelStyle:
|
|
1950
|
+
labelStyle: n
|
|
1921
1951
|
},
|
|
1922
|
-
label:
|
|
1952
|
+
label: n,
|
|
1923
1953
|
lineWidth: 6,
|
|
1924
1954
|
tab: null,
|
|
1925
|
-
...
|
|
1955
|
+
...r
|
|
1926
1956
|
};
|
|
1927
|
-
},
|
|
1928
|
-
const { widget: t, label:
|
|
1957
|
+
}, qe = (e = {}) => {
|
|
1958
|
+
const { widget: t, label: n, ...r } = e;
|
|
1929
1959
|
return {
|
|
1930
1960
|
widget: {
|
|
1931
1961
|
type: "subform",
|
|
1932
|
-
widgetName:
|
|
1962
|
+
widgetName: g(),
|
|
1933
1963
|
widgetNameAlias: "",
|
|
1934
1964
|
customCls: null,
|
|
1935
1965
|
enable: !0,
|
|
1936
1966
|
visible: !0,
|
|
1937
1967
|
allowBlank: !0,
|
|
1938
|
-
labelStyle:
|
|
1968
|
+
labelStyle: n,
|
|
1939
1969
|
extendSet: {
|
|
1940
1970
|
sort: ["datahelp", "module", "formEvent"],
|
|
1941
1971
|
status: !0,
|
|
@@ -1944,8 +1974,8 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1944
1974
|
version: 1
|
|
1945
1975
|
},
|
|
1946
1976
|
items: (t.items || []).map((l, a) => {
|
|
1947
|
-
const i =
|
|
1948
|
-
return i.widget.widgetName =
|
|
1977
|
+
const i = De(l, !0);
|
|
1978
|
+
return i.widget.widgetName = g("_widget", a), i;
|
|
1949
1979
|
}),
|
|
1950
1980
|
sortable: !0,
|
|
1951
1981
|
//启用子表单数据排序
|
|
@@ -2003,15 +2033,15 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
2003
2033
|
//从excel填报数据
|
|
2004
2034
|
},
|
|
2005
2035
|
description: null,
|
|
2006
|
-
label:
|
|
2036
|
+
label: n,
|
|
2007
2037
|
lineWidth: 12,
|
|
2008
2038
|
tab: null
|
|
2009
2039
|
};
|
|
2010
|
-
},
|
|
2011
|
-
const { widget: t, label:
|
|
2040
|
+
}, Fe = (e) => {
|
|
2041
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
2012
2042
|
return {
|
|
2013
2043
|
widget: {
|
|
2014
|
-
widgetName:
|
|
2044
|
+
widgetName: g(),
|
|
2015
2045
|
widgetNameAlias: "",
|
|
2016
2046
|
customCls: null,
|
|
2017
2047
|
enable: !0,
|
|
@@ -2032,61 +2062,61 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
2032
2062
|
addExtendSet: [],
|
|
2033
2063
|
...t,
|
|
2034
2064
|
linkFields: [],
|
|
2035
|
-
labelStyle:
|
|
2065
|
+
labelStyle: n,
|
|
2036
2066
|
type: "linkquery"
|
|
2037
2067
|
},
|
|
2038
2068
|
description: null,
|
|
2039
|
-
label:
|
|
2069
|
+
label: n,
|
|
2040
2070
|
lineWidth: 6,
|
|
2041
2071
|
tab: null,
|
|
2042
|
-
...
|
|
2072
|
+
...r
|
|
2043
2073
|
};
|
|
2044
|
-
},
|
|
2045
|
-
address:
|
|
2046
|
-
button:
|
|
2047
|
-
textarea:
|
|
2048
|
-
datetime:
|
|
2049
|
-
text:
|
|
2050
|
-
password:
|
|
2051
|
-
location:
|
|
2052
|
-
radiogroup:
|
|
2053
|
-
radio:
|
|
2054
|
-
combo:
|
|
2055
|
-
combocheck:
|
|
2056
|
-
separator:
|
|
2057
|
-
checkboxgroup:
|
|
2058
|
-
upload:
|
|
2059
|
-
number:
|
|
2060
|
-
image:
|
|
2061
|
-
signature:
|
|
2062
|
-
user:
|
|
2063
|
-
dataload:
|
|
2064
|
-
linkdata:
|
|
2065
|
-
linkquery:
|
|
2066
|
-
usergroup:
|
|
2067
|
-
subform:
|
|
2068
|
-
dept:
|
|
2069
|
-
sn:
|
|
2070
|
-
deptgroup:
|
|
2074
|
+
}, Re = {
|
|
2075
|
+
address: Me,
|
|
2076
|
+
button: Ee,
|
|
2077
|
+
textarea: xe,
|
|
2078
|
+
datetime: de,
|
|
2079
|
+
text: O,
|
|
2080
|
+
password: O,
|
|
2081
|
+
location: _e,
|
|
2082
|
+
radiogroup: P,
|
|
2083
|
+
radio: P,
|
|
2084
|
+
combo: ue,
|
|
2085
|
+
combocheck: Ce,
|
|
2086
|
+
separator: Ne,
|
|
2087
|
+
checkboxgroup: ke,
|
|
2088
|
+
upload: Ae,
|
|
2089
|
+
number: se,
|
|
2090
|
+
image: ve,
|
|
2091
|
+
signature: Se,
|
|
2092
|
+
user: we,
|
|
2093
|
+
dataload: he,
|
|
2094
|
+
linkdata: pe,
|
|
2095
|
+
linkquery: Fe,
|
|
2096
|
+
usergroup: fe,
|
|
2097
|
+
subform: qe,
|
|
2098
|
+
dept: me,
|
|
2099
|
+
sn: ge,
|
|
2100
|
+
deptgroup: ce,
|
|
2071
2101
|
flowState: w,
|
|
2072
2102
|
flowstate: w,
|
|
2073
2103
|
formula: w,
|
|
2074
2104
|
unknown: w
|
|
2075
|
-
},
|
|
2105
|
+
}, De = (e, t = !1) => {
|
|
2076
2106
|
var a, i;
|
|
2077
2107
|
if (!e || !e.widget || !e.widget.type)
|
|
2078
2108
|
return e;
|
|
2079
|
-
const
|
|
2080
|
-
return t &&
|
|
2081
|
-
},
|
|
2082
|
-
var t,
|
|
2083
|
-
return !e || !((t = e.corp) != null && t.name) || !((
|
|
2084
|
-
},
|
|
2085
|
-
var
|
|
2109
|
+
const n = e.widget.type || "unknown";
|
|
2110
|
+
return t && n === "subform" ? w(e) : (((i = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = K()), (Re[n] || w)(e));
|
|
2111
|
+
}, ft = (e) => {
|
|
2112
|
+
var t, n, r, l, a, i, o, s;
|
|
2113
|
+
return !e || !((t = e.corp) != null && t.name) || !((n = e.user) != null && n.nickname) ? "" : `${(r = e.corp) == null ? void 0 : r.name} ${(l = e.user) == null ? void 0 : l.nickname}(${(a = e.user) == null ? void 0 : a.username}) ${(i = e.appName) != null ? i : ""} ${(o = e.entryName) != null ? o : ""} ${(s = e.agentName) != null ? s : ""}`;
|
|
2114
|
+
}, pt = (e) => {
|
|
2115
|
+
var n;
|
|
2086
2116
|
if (!e)
|
|
2087
2117
|
return "";
|
|
2088
2118
|
const t = {
|
|
2089
|
-
corpId: (
|
|
2119
|
+
corpId: (n = e.corp) == null ? void 0 : n.id,
|
|
2090
2120
|
userId: e.user._id,
|
|
2091
2121
|
appName: e.appName,
|
|
2092
2122
|
appId: e.appId,
|
|
@@ -2096,55 +2126,56 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
2096
2126
|
};
|
|
2097
2127
|
try {
|
|
2098
2128
|
return JSON.stringify(t);
|
|
2099
|
-
} catch (
|
|
2100
|
-
return console.warn("getChatCtxForMcp error",
|
|
2129
|
+
} catch (r) {
|
|
2130
|
+
return console.warn("getChatCtxForMcp error", r), "";
|
|
2101
2131
|
}
|
|
2102
2132
|
};
|
|
2103
2133
|
export {
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2134
|
+
Je as DATA_COUNT_PER_BATCH,
|
|
2135
|
+
X as FIELD_TYPE_OPERATOR_LABEL_OVERRIDES,
|
|
2136
|
+
Z as FIELD_TYPE_OPERATOR_MAP,
|
|
2137
|
+
gt as FORM_ICON_UNICODE_MAP,
|
|
2138
|
+
We as GetLoadingMsg,
|
|
2139
|
+
Be as GetPartErrMsg,
|
|
2140
|
+
Pe as GetQueryResult,
|
|
2141
|
+
ze as GetSafeFormStructure,
|
|
2142
|
+
ie as ICON_UNICODE_MAP,
|
|
2143
|
+
B as IsErrorPart,
|
|
2144
|
+
$e as IsFakeMsgPart,
|
|
2145
|
+
Ie as IsFileGroupPart,
|
|
2146
|
+
Te as IsFilePart,
|
|
2147
|
+
Le as IsLoadingPart,
|
|
2148
|
+
Oe as IsQueryResultPart,
|
|
2149
|
+
V as OPERATOR_LABEL_MAP,
|
|
2150
|
+
Q as WHITE_LIST_FIELDS_SET,
|
|
2151
|
+
st as bsConditionParse2Condition,
|
|
2152
|
+
ot as conditionStringify2bsCondition,
|
|
2153
|
+
Ke as createFieldPartsExtractor,
|
|
2154
|
+
Ye as createGetFieldJsonInfo,
|
|
2155
|
+
Y as createPartTypeChecker,
|
|
2156
|
+
Qe as createPayloadTypeChecker,
|
|
2127
2157
|
y as extractTextPartMeta,
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2158
|
+
Ze as field2config,
|
|
2159
|
+
L as flatArr,
|
|
2160
|
+
ut as formatLocalDate,
|
|
2161
|
+
nt as getAvailableOperators,
|
|
2162
|
+
ft as getChatCtxForHuman,
|
|
2163
|
+
pt as getChatCtxForMcp,
|
|
2164
|
+
rt as getDefaultOperator,
|
|
2165
|
+
ct as getIconUnicode,
|
|
2166
|
+
je as getMetaErrorMsg,
|
|
2167
|
+
tt as getOperatorLabel,
|
|
2168
|
+
Xe as hasValidFieldValue,
|
|
2169
|
+
et as imageUrlToBase64,
|
|
2170
|
+
Ue as injectHostStylesIntoShadow,
|
|
2171
|
+
it as isCtxMatch,
|
|
2172
|
+
lt as isHelperCondMet,
|
|
2173
|
+
at as isHelperPrefMet,
|
|
2174
|
+
dt as mergeConsecutiveTargets,
|
|
2175
|
+
mt as promptParser,
|
|
2176
|
+
De as rebuildFieldsJsonStructure,
|
|
2177
|
+
Ve as safeParseJson,
|
|
2178
|
+
Ge as syncHostStylesIntoShadow,
|
|
2179
|
+
He as valueNormalizer
|
|
2149
2180
|
};
|
|
2150
2181
|
//# sourceMappingURL=ai-feat-utils.js.map
|