@baishuyun/ai-feat-utils 2.0.43 → 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 +459 -405
- package/dist/ai-feat-utils.js.map +1 -1
- package/dist/chat.d.ts.map +1 -1
- package/dist/condition.d.ts +17 -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
|
-
}, M = "data-shadow-slot-injected", v = "host-clone",
|
|
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,21 +70,21 @@ ${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
|
-
},
|
|
81
|
+
}, Ue = (e, t) => {
|
|
82
82
|
if (e.querySelector(`[${M}]`)) return;
|
|
83
|
-
const
|
|
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;
|
|
@@ -93,64 +93,64 @@ ${e}
|
|
|
93
93
|
const i = document.createElement("style");
|
|
94
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 Be = (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 Be = (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 Be = (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,20 @@ const Be = (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
|
+
usergroup: { in: "包含任意一个" },
|
|
299
|
+
deptgroup: { in: "包含任意一个" },
|
|
300
|
+
checkboxgroup: { in: "包含任意一个" },
|
|
301
|
+
combocheck: { in: "包含任意一个" },
|
|
302
|
+
address: { in: "属于", nin: "不属于" },
|
|
303
|
+
location: { in: "包含", nin: "不包含" }
|
|
304
|
+
};
|
|
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
|
+
}
|
|
310
|
+
const Z = {
|
|
298
311
|
// Text-like: equality, fuzzy, empty checks
|
|
299
312
|
text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
|
|
300
313
|
password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
|
|
@@ -338,7 +351,7 @@ const Be = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
338
351
|
button: [],
|
|
339
352
|
subform: [],
|
|
340
353
|
unknown: []
|
|
341
|
-
},
|
|
354
|
+
}, J = {
|
|
342
355
|
text: "eq",
|
|
343
356
|
password: "eq",
|
|
344
357
|
radiogroup: "eq",
|
|
@@ -366,106 +379,136 @@ const Be = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
366
379
|
dataload: "eq",
|
|
367
380
|
formula: "eq"
|
|
368
381
|
};
|
|
369
|
-
function
|
|
382
|
+
function nt(e) {
|
|
370
383
|
var t;
|
|
371
|
-
return e ? (t =
|
|
384
|
+
return e ? (t = Z[e]) != null ? t : [] : [];
|
|
372
385
|
}
|
|
373
|
-
function
|
|
386
|
+
function rt(e) {
|
|
374
387
|
var t;
|
|
375
|
-
return e && (t =
|
|
388
|
+
return e && (t = J[e]) != null ? t : "eq";
|
|
376
389
|
}
|
|
377
390
|
function S(e) {
|
|
378
391
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
379
392
|
}
|
|
380
|
-
function
|
|
393
|
+
function I(e) {
|
|
381
394
|
return S(e) ? e : null;
|
|
382
395
|
}
|
|
383
|
-
function
|
|
384
|
-
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);
|
|
385
398
|
}
|
|
386
|
-
function
|
|
399
|
+
function _(e, t) {
|
|
387
400
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
388
401
|
if (e.length !== t.length) return !1;
|
|
389
|
-
const
|
|
390
|
-
return
|
|
402
|
+
const n = e.map(String).sort(), r = t.map(String).sort();
|
|
403
|
+
return n.every((l, a) => l === r[a]);
|
|
391
404
|
}
|
|
392
405
|
if (S(e) && S(t)) {
|
|
393
|
-
const
|
|
394
|
-
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]));
|
|
395
408
|
}
|
|
396
409
|
return String(e) === String(t);
|
|
397
410
|
}
|
|
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
|
+
}
|
|
398
428
|
function T(e, t) {
|
|
399
429
|
if (S(t)) {
|
|
400
|
-
const
|
|
401
|
-
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));
|
|
402
432
|
}
|
|
403
|
-
const
|
|
404
|
-
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));
|
|
405
435
|
}
|
|
406
|
-
function
|
|
407
|
-
const
|
|
408
|
-
if (
|
|
409
|
-
const
|
|
410
|
-
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));
|
|
411
441
|
}
|
|
412
|
-
function
|
|
413
|
-
const
|
|
414
|
-
if (!
|
|
415
|
-
const
|
|
416
|
-
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));
|
|
417
447
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
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) {
|
|
424
455
|
case "empty":
|
|
425
|
-
return
|
|
456
|
+
return R(a);
|
|
426
457
|
case "not_empty":
|
|
427
|
-
return !
|
|
458
|
+
return !R(a);
|
|
428
459
|
case "eq":
|
|
429
|
-
return
|
|
460
|
+
return s ? $(a, o) : _(a, o);
|
|
430
461
|
case "neq":
|
|
431
|
-
return !
|
|
462
|
+
return s ? !$(a, o) : !_(a, o);
|
|
432
463
|
case "contains":
|
|
433
464
|
case "like":
|
|
434
|
-
return String(
|
|
465
|
+
return String(a).includes(String(o));
|
|
435
466
|
case "not_contains":
|
|
436
467
|
case "unlike":
|
|
437
|
-
return !String(
|
|
468
|
+
return !String(a).includes(String(o));
|
|
438
469
|
case "gt":
|
|
439
|
-
return Number(
|
|
470
|
+
return Number(a) > Number(o);
|
|
440
471
|
case "gte":
|
|
441
|
-
return Number(
|
|
472
|
+
return Number(a) >= Number(o);
|
|
442
473
|
case "lt":
|
|
443
|
-
return Number(
|
|
474
|
+
return Number(a) < Number(o);
|
|
444
475
|
case "lte":
|
|
445
|
-
return Number(
|
|
476
|
+
return Number(a) <= Number(o);
|
|
446
477
|
case "in":
|
|
447
|
-
return T(
|
|
478
|
+
return T(a, o);
|
|
448
479
|
case "nin":
|
|
449
|
-
return !T(
|
|
480
|
+
return !T(a, o);
|
|
450
481
|
case "all":
|
|
451
|
-
return
|
|
482
|
+
return ee(a, o);
|
|
452
483
|
case "range":
|
|
453
|
-
return
|
|
484
|
+
return te(a, o);
|
|
454
485
|
default:
|
|
455
486
|
return !1;
|
|
456
487
|
}
|
|
457
488
|
}
|
|
458
|
-
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) {
|
|
459
502
|
if (!e.enabled)
|
|
460
503
|
return !1;
|
|
461
|
-
const
|
|
462
|
-
if (!
|
|
463
|
-
const { items:
|
|
464
|
-
if (!
|
|
465
|
-
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));
|
|
466
509
|
return l === "any" ? a.some((i) => i) : a.every((i) => i);
|
|
467
510
|
}
|
|
468
|
-
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 = {
|
|
469
512
|
eq: "eq",
|
|
470
513
|
neq: "ne",
|
|
471
514
|
gt: "gt",
|
|
@@ -482,7 +525,7 @@ const et = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
|
|
|
482
525
|
empty: "empty",
|
|
483
526
|
not_empty: "not_empty",
|
|
484
527
|
range: "range"
|
|
485
|
-
},
|
|
528
|
+
}, le = {
|
|
486
529
|
eq: "eq",
|
|
487
530
|
ne: "neq",
|
|
488
531
|
gt: "gt",
|
|
@@ -500,24 +543,24 @@ const et = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
|
|
|
500
543
|
not_empty: "not_empty",
|
|
501
544
|
range: "range"
|
|
502
545
|
};
|
|
503
|
-
function
|
|
504
|
-
const t = e.quantifier === "any" ? "or" : "and",
|
|
505
|
-
var i, o, s,
|
|
506
|
-
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";
|
|
507
550
|
let a;
|
|
508
|
-
return
|
|
509
|
-
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 : "",
|
|
510
553
|
method: l,
|
|
511
554
|
value: a,
|
|
512
|
-
type: (u = (d =
|
|
555
|
+
type: (u = (d = r.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
|
|
513
556
|
};
|
|
514
557
|
});
|
|
515
|
-
return JSON.stringify({ rel: t, cond:
|
|
558
|
+
return JSON.stringify({ rel: t, cond: n });
|
|
516
559
|
}
|
|
517
|
-
function
|
|
518
|
-
const t = JSON.parse(e),
|
|
519
|
-
var s,
|
|
520
|
-
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";
|
|
521
564
|
let o = l.value;
|
|
522
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]), {
|
|
523
566
|
id: `${l.field}_${a}`,
|
|
@@ -525,7 +568,7 @@ function rt(e) {
|
|
|
525
568
|
label: l.field,
|
|
526
569
|
widget: {
|
|
527
570
|
widgetName: l.field,
|
|
528
|
-
type: (
|
|
571
|
+
type: (m = l.type) != null ? m : "unknown",
|
|
529
572
|
value: void 0
|
|
530
573
|
}
|
|
531
574
|
},
|
|
@@ -533,25 +576,25 @@ function rt(e) {
|
|
|
533
576
|
value: o
|
|
534
577
|
};
|
|
535
578
|
});
|
|
536
|
-
return { targetName: "", quantifier:
|
|
579
|
+
return { targetName: "", quantifier: n, items: r };
|
|
537
580
|
}
|
|
538
|
-
function
|
|
539
|
-
const t = (
|
|
581
|
+
function ut(e) {
|
|
582
|
+
const t = (n) => String(n).padStart(2, "0");
|
|
540
583
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
|
|
541
584
|
}
|
|
542
|
-
function
|
|
543
|
-
const
|
|
585
|
+
function dt(e, t, n = 1) {
|
|
586
|
+
const r = [], l = [];
|
|
544
587
|
for (const a of e)
|
|
545
|
-
t(a) ? l.push(a) : (l.length > 0 && (
|
|
546
|
-
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;
|
|
547
590
|
}
|
|
548
|
-
function
|
|
591
|
+
function L(e) {
|
|
549
592
|
const t = [];
|
|
550
|
-
for (const
|
|
551
|
-
Array.isArray(
|
|
593
|
+
for (const n of e)
|
|
594
|
+
Array.isArray(n) ? t.push(...L(n)) : t.push(n);
|
|
552
595
|
return t;
|
|
553
596
|
}
|
|
554
|
-
const
|
|
597
|
+
const ie = {
|
|
555
598
|
projectdevelopment: "e914",
|
|
556
599
|
resourcelibrary: "e915",
|
|
557
600
|
Plugin2: "e90e",
|
|
@@ -958,36 +1001,36 @@ const te = {
|
|
|
958
1001
|
Automation1: "ea95",
|
|
959
1002
|
Avatar: "ea96"
|
|
960
1003
|
};
|
|
961
|
-
function
|
|
962
|
-
const t =
|
|
1004
|
+
function ct(e) {
|
|
1005
|
+
const t = ie[e];
|
|
963
1006
|
return t ? `&#x${t};` : void 0;
|
|
964
1007
|
}
|
|
965
|
-
const
|
|
966
|
-
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)
|
|
967
1010
|
return {
|
|
968
1011
|
translated: ""
|
|
969
1012
|
};
|
|
970
|
-
const
|
|
1013
|
+
const r = new Map(t.map((i) => [i.widget.widgetName, i.label]));
|
|
971
1014
|
for (const i of t)
|
|
972
1015
|
if (i.widget.type === "subform" && i.widget.items) {
|
|
973
1016
|
for (const o of i.widget.items)
|
|
974
1017
|
if ("widget" in o && !("options" in o)) {
|
|
975
1018
|
const s = `${i.widget.widgetName}.${o.widget.widgetName}`;
|
|
976
|
-
|
|
1019
|
+
r.set(s, o.label);
|
|
977
1020
|
}
|
|
978
1021
|
}
|
|
979
1022
|
const l = [], a = e.replace(
|
|
980
1023
|
/\$\{(virtual\.)?(_widget_\d+(?:\._widget_\d+)?)\}/g,
|
|
981
1024
|
(i, o, s) => {
|
|
982
|
-
const
|
|
1025
|
+
const m = !!o, { translated: d, meta: u } = n(s, m);
|
|
983
1026
|
return u && l.push(u), d;
|
|
984
1027
|
}
|
|
985
1028
|
);
|
|
986
1029
|
return {
|
|
987
|
-
meta: l.length ?
|
|
1030
|
+
meta: l.length ? L(l) : null,
|
|
988
1031
|
translated: (a != null ? a : "").trim()
|
|
989
1032
|
};
|
|
990
|
-
},
|
|
1033
|
+
}, oe = {
|
|
991
1034
|
手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
|
|
992
1035
|
电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
|
|
993
1036
|
邮政编码: "^\\d{6}$",
|
|
@@ -999,8 +1042,8 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
999
1042
|
二维码图片: "qrcode",
|
|
1000
1043
|
条形码图片: "barcode",
|
|
1001
1044
|
自定义: "custom"
|
|
1002
|
-
},
|
|
1003
|
-
const { widget: t, labelStyle:
|
|
1045
|
+
}, O = (e) => {
|
|
1046
|
+
const { widget: t, labelStyle: n, label: r, ...l } = e || {}, a = oe[n] || "";
|
|
1004
1047
|
return {
|
|
1005
1048
|
widget: {
|
|
1006
1049
|
widgetName: `_widget_${Date.now()}`,
|
|
@@ -1040,22 +1083,22 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1040
1083
|
...t,
|
|
1041
1084
|
regex: a,
|
|
1042
1085
|
type: "text",
|
|
1043
|
-
labelStyle:
|
|
1086
|
+
labelStyle: r
|
|
1044
1087
|
},
|
|
1045
1088
|
// description,
|
|
1046
|
-
label:
|
|
1089
|
+
label: r,
|
|
1047
1090
|
lineWidth: 6,
|
|
1048
1091
|
tab: null,
|
|
1049
1092
|
...l
|
|
1050
1093
|
};
|
|
1051
1094
|
}, g = (e = "_widget", t) => {
|
|
1052
|
-
const
|
|
1095
|
+
const n = `${e}_${Date.now()}`;
|
|
1053
1096
|
if (t === void 0)
|
|
1054
|
-
return
|
|
1055
|
-
const
|
|
1056
|
-
return `${
|
|
1057
|
-
},
|
|
1058
|
-
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 || {};
|
|
1059
1102
|
return {
|
|
1060
1103
|
widget: {
|
|
1061
1104
|
type: "number",
|
|
@@ -1111,16 +1154,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1111
1154
|
//繁体的
|
|
1112
1155
|
},
|
|
1113
1156
|
...t,
|
|
1114
|
-
labelStyle:
|
|
1157
|
+
labelStyle: n
|
|
1115
1158
|
},
|
|
1116
1159
|
// description,
|
|
1117
|
-
label:
|
|
1160
|
+
label: n,
|
|
1118
1161
|
lineWidth: 6,
|
|
1119
1162
|
tab: null,
|
|
1120
|
-
...
|
|
1163
|
+
...r
|
|
1121
1164
|
};
|
|
1122
|
-
},
|
|
1123
|
-
const { widget: t, label:
|
|
1165
|
+
}, ue = (e) => {
|
|
1166
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1124
1167
|
return {
|
|
1125
1168
|
widget: {
|
|
1126
1169
|
type: "combo",
|
|
@@ -1148,16 +1191,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1148
1191
|
colorEnable: !0,
|
|
1149
1192
|
//颜色 是否开启颜色
|
|
1150
1193
|
...t,
|
|
1151
|
-
labelStyle:
|
|
1194
|
+
labelStyle: n
|
|
1152
1195
|
},
|
|
1153
1196
|
// description,
|
|
1154
|
-
label:
|
|
1197
|
+
label: n,
|
|
1155
1198
|
lineWidth: 6,
|
|
1156
1199
|
tab: null,
|
|
1157
|
-
...
|
|
1200
|
+
...r
|
|
1158
1201
|
};
|
|
1159
|
-
},
|
|
1160
|
-
const { widget: t, label:
|
|
1202
|
+
}, P = (e) => {
|
|
1203
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1161
1204
|
return {
|
|
1162
1205
|
widget: {
|
|
1163
1206
|
enable: !0,
|
|
@@ -1186,14 +1229,14 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1186
1229
|
type: "radiogroup"
|
|
1187
1230
|
},
|
|
1188
1231
|
// description,
|
|
1189
|
-
label:
|
|
1232
|
+
label: n,
|
|
1190
1233
|
lineWidth: 6,
|
|
1191
1234
|
tab: null,
|
|
1192
|
-
...
|
|
1193
|
-
labelStyle:
|
|
1235
|
+
...r,
|
|
1236
|
+
labelStyle: n
|
|
1194
1237
|
};
|
|
1195
|
-
},
|
|
1196
|
-
const { widget: t, label:
|
|
1238
|
+
}, de = (e) => {
|
|
1239
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1197
1240
|
return {
|
|
1198
1241
|
widget: {
|
|
1199
1242
|
type: "datetime",
|
|
@@ -1252,15 +1295,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1252
1295
|
}
|
|
1253
1296
|
},
|
|
1254
1297
|
...t,
|
|
1255
|
-
labelStyle:
|
|
1298
|
+
labelStyle: n
|
|
1256
1299
|
},
|
|
1257
|
-
label:
|
|
1300
|
+
label: n,
|
|
1258
1301
|
lineWidth: 6,
|
|
1259
1302
|
tab: null,
|
|
1260
|
-
...
|
|
1303
|
+
...r
|
|
1261
1304
|
};
|
|
1262
|
-
}, w = (e) => e,
|
|
1263
|
-
const { widget: t, label:
|
|
1305
|
+
}, w = (e) => e, ce = (e) => {
|
|
1306
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1264
1307
|
return {
|
|
1265
1308
|
widget: {
|
|
1266
1309
|
type: "deptgroup",
|
|
@@ -1286,15 +1329,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1286
1329
|
limit: {},
|
|
1287
1330
|
valueOption: 0,
|
|
1288
1331
|
...t,
|
|
1289
|
-
labelStyle:
|
|
1332
|
+
labelStyle: n
|
|
1290
1333
|
},
|
|
1291
|
-
label:
|
|
1334
|
+
label: n,
|
|
1292
1335
|
lineWidth: 6,
|
|
1293
1336
|
tab: null,
|
|
1294
|
-
...
|
|
1337
|
+
...r
|
|
1295
1338
|
};
|
|
1296
|
-
},
|
|
1297
|
-
const { widget: t, label:
|
|
1339
|
+
}, ge = (e) => {
|
|
1340
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1298
1341
|
return {
|
|
1299
1342
|
widget: {
|
|
1300
1343
|
type: "sn",
|
|
@@ -1322,16 +1365,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1322
1365
|
type: "incNumber"
|
|
1323
1366
|
}
|
|
1324
1367
|
],
|
|
1325
|
-
labelStyle:
|
|
1368
|
+
labelStyle: n
|
|
1326
1369
|
},
|
|
1327
1370
|
// description,
|
|
1328
|
-
label:
|
|
1371
|
+
label: n,
|
|
1329
1372
|
lineWidth: 6,
|
|
1330
1373
|
tab: null,
|
|
1331
|
-
...
|
|
1374
|
+
...r
|
|
1332
1375
|
};
|
|
1333
|
-
},
|
|
1334
|
-
const { widget: t, label:
|
|
1376
|
+
}, me = (e) => {
|
|
1377
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1335
1378
|
return {
|
|
1336
1379
|
widget: {
|
|
1337
1380
|
type: "dept",
|
|
@@ -1357,15 +1400,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1357
1400
|
limit: {},
|
|
1358
1401
|
valueOption: 0,
|
|
1359
1402
|
...t,
|
|
1360
|
-
labelStyle:
|
|
1403
|
+
labelStyle: n
|
|
1361
1404
|
},
|
|
1362
|
-
label:
|
|
1405
|
+
label: n,
|
|
1363
1406
|
lineWidth: 6,
|
|
1364
1407
|
tab: null,
|
|
1365
|
-
...
|
|
1408
|
+
...r
|
|
1366
1409
|
};
|
|
1367
|
-
},
|
|
1368
|
-
const { widget: t, label:
|
|
1410
|
+
}, fe = (e) => {
|
|
1411
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1369
1412
|
return {
|
|
1370
1413
|
widget: {
|
|
1371
1414
|
type: "usergroup",
|
|
@@ -1393,16 +1436,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1393
1436
|
//可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
|
|
1394
1437
|
valueOption: 0,
|
|
1395
1438
|
...t,
|
|
1396
|
-
labelStyle:
|
|
1439
|
+
labelStyle: n
|
|
1397
1440
|
},
|
|
1398
1441
|
// description,
|
|
1399
|
-
label:
|
|
1442
|
+
label: n,
|
|
1400
1443
|
lineWidth: 6,
|
|
1401
1444
|
tab: null,
|
|
1402
|
-
...
|
|
1445
|
+
...r
|
|
1403
1446
|
};
|
|
1404
|
-
},
|
|
1405
|
-
const { widget: t, label:
|
|
1447
|
+
}, pe = (e) => {
|
|
1448
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1406
1449
|
return {
|
|
1407
1450
|
widget: {
|
|
1408
1451
|
widgetName: g(),
|
|
@@ -1421,16 +1464,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1421
1464
|
//关联表的类型,只能是form
|
|
1422
1465
|
...t,
|
|
1423
1466
|
linkFields: [],
|
|
1424
|
-
labelStyle:
|
|
1467
|
+
labelStyle: n,
|
|
1425
1468
|
type: "linkdata"
|
|
1426
1469
|
},
|
|
1427
|
-
label:
|
|
1470
|
+
label: n,
|
|
1428
1471
|
lineWidth: 6,
|
|
1429
1472
|
tab: null,
|
|
1430
|
-
...
|
|
1473
|
+
...r
|
|
1431
1474
|
};
|
|
1432
|
-
},
|
|
1433
|
-
id:
|
|
1475
|
+
}, be = (e) => !e || !e.length ? e : e.map((t, n) => ({
|
|
1476
|
+
id: n,
|
|
1434
1477
|
// name: "_widget_1761976674767",
|
|
1435
1478
|
// form: "a2f34ef882158a3e97da4ef7",
|
|
1436
1479
|
// tag: buildWidgetName("f_", index),
|
|
@@ -1441,12 +1484,12 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1441
1484
|
isEditable: !0,
|
|
1442
1485
|
group: "dimension,filter,select",
|
|
1443
1486
|
formula: ""
|
|
1444
|
-
})),
|
|
1487
|
+
})), ye = (e) => !e || !e.length ? e : e.map((t) => ({
|
|
1445
1488
|
mode: "depend",
|
|
1446
1489
|
...t
|
|
1447
|
-
})),
|
|
1490
|
+
})), he = (e) => {
|
|
1448
1491
|
var l, a, i;
|
|
1449
|
-
const { widget: t, label:
|
|
1492
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1450
1493
|
return {
|
|
1451
1494
|
widget: {
|
|
1452
1495
|
type: "dataload",
|
|
@@ -1454,7 +1497,7 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1454
1497
|
widgetNameAlias: "",
|
|
1455
1498
|
customCls: null,
|
|
1456
1499
|
width: 350,
|
|
1457
|
-
text:
|
|
1500
|
+
text: n,
|
|
1458
1501
|
enable: !0,
|
|
1459
1502
|
visible: !0,
|
|
1460
1503
|
allowBlank: !0,
|
|
@@ -1486,18 +1529,18 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1486
1529
|
forms: (l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.forms,
|
|
1487
1530
|
selectArg: [],
|
|
1488
1531
|
selectRel: "and",
|
|
1489
|
-
fields:
|
|
1490
|
-
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)
|
|
1491
1534
|
},
|
|
1492
|
-
labelStyle:
|
|
1535
|
+
labelStyle: n
|
|
1493
1536
|
},
|
|
1494
|
-
label:
|
|
1537
|
+
label: n,
|
|
1495
1538
|
lineWidth: 6,
|
|
1496
1539
|
tab: null,
|
|
1497
|
-
...
|
|
1540
|
+
...r
|
|
1498
1541
|
};
|
|
1499
|
-
},
|
|
1500
|
-
const { widget: t, label:
|
|
1542
|
+
}, we = (e) => {
|
|
1543
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1501
1544
|
return {
|
|
1502
1545
|
widget: {
|
|
1503
1546
|
type: "user",
|
|
@@ -1525,16 +1568,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1525
1568
|
//可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
|
|
1526
1569
|
valueOption: 0,
|
|
1527
1570
|
...t,
|
|
1528
|
-
labelStyle:
|
|
1571
|
+
labelStyle: n
|
|
1529
1572
|
},
|
|
1530
1573
|
// description,
|
|
1531
|
-
label:
|
|
1574
|
+
label: n,
|
|
1532
1575
|
lineWidth: 6,
|
|
1533
1576
|
tab: null,
|
|
1534
|
-
...
|
|
1577
|
+
...r
|
|
1535
1578
|
};
|
|
1536
|
-
},
|
|
1537
|
-
const { widget: t, label:
|
|
1579
|
+
}, Se = (e) => {
|
|
1580
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1538
1581
|
return {
|
|
1539
1582
|
widget: {
|
|
1540
1583
|
type: "signature",
|
|
@@ -1548,16 +1591,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1548
1591
|
allowBlank: !0,
|
|
1549
1592
|
rely: null,
|
|
1550
1593
|
...t,
|
|
1551
|
-
labelStyle:
|
|
1594
|
+
labelStyle: n
|
|
1552
1595
|
},
|
|
1553
1596
|
description: null,
|
|
1554
|
-
label:
|
|
1597
|
+
label: n,
|
|
1555
1598
|
lineWidth: 6,
|
|
1556
1599
|
tab: null,
|
|
1557
|
-
...
|
|
1600
|
+
...r
|
|
1558
1601
|
};
|
|
1559
|
-
},
|
|
1560
|
-
const { widget: t, label:
|
|
1602
|
+
}, ve = (e) => {
|
|
1603
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1561
1604
|
return {
|
|
1562
1605
|
widget: {
|
|
1563
1606
|
type: "image",
|
|
@@ -1621,15 +1664,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1621
1664
|
quality: 0.7,
|
|
1622
1665
|
//压缩图片比例,开启 浏览器图片压缩 后才能设置
|
|
1623
1666
|
...t,
|
|
1624
|
-
labelStyle:
|
|
1667
|
+
labelStyle: n
|
|
1625
1668
|
},
|
|
1626
|
-
label:
|
|
1669
|
+
label: n,
|
|
1627
1670
|
lineWidth: 6,
|
|
1628
1671
|
tab: null,
|
|
1629
|
-
...
|
|
1672
|
+
...r
|
|
1630
1673
|
};
|
|
1631
|
-
},
|
|
1632
|
-
const { widget: t, label:
|
|
1674
|
+
}, Ae = (e) => {
|
|
1675
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1633
1676
|
return {
|
|
1634
1677
|
widget: {
|
|
1635
1678
|
type: "upload",
|
|
@@ -1655,16 +1698,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1655
1698
|
//设置单个文件大小上限,单位是字节,范围 1M-20M
|
|
1656
1699
|
// fileType,
|
|
1657
1700
|
...t,
|
|
1658
|
-
labelStyle:
|
|
1701
|
+
labelStyle: n
|
|
1659
1702
|
},
|
|
1660
1703
|
// description,
|
|
1661
|
-
label:
|
|
1704
|
+
label: n,
|
|
1662
1705
|
lineWidth: 6,
|
|
1663
1706
|
tab: null,
|
|
1664
|
-
...
|
|
1707
|
+
...r
|
|
1665
1708
|
};
|
|
1666
|
-
},
|
|
1667
|
-
const { widget: t, label:
|
|
1709
|
+
}, ke = (e) => {
|
|
1710
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1668
1711
|
return {
|
|
1669
1712
|
widget: {
|
|
1670
1713
|
type: "checkboxgroup",
|
|
@@ -1690,15 +1733,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1690
1733
|
allowAddOptions: !1,
|
|
1691
1734
|
//允许成员填写时添加新选项
|
|
1692
1735
|
...t,
|
|
1693
|
-
labelStyle:
|
|
1736
|
+
labelStyle: n
|
|
1694
1737
|
},
|
|
1695
|
-
label:
|
|
1738
|
+
label: n,
|
|
1696
1739
|
lineWidth: 6,
|
|
1697
1740
|
tab: null,
|
|
1698
|
-
...
|
|
1741
|
+
...r
|
|
1699
1742
|
};
|
|
1700
|
-
},
|
|
1701
|
-
const { widget: t, label:
|
|
1743
|
+
}, Ne = (e) => {
|
|
1744
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1702
1745
|
return {
|
|
1703
1746
|
widget: {
|
|
1704
1747
|
type: "separator",
|
|
@@ -1709,15 +1752,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1709
1752
|
visible: !0,
|
|
1710
1753
|
allowBlank: !0,
|
|
1711
1754
|
...t,
|
|
1712
|
-
labelStyle:
|
|
1755
|
+
labelStyle: n
|
|
1713
1756
|
},
|
|
1714
|
-
label:
|
|
1757
|
+
label: n,
|
|
1715
1758
|
lineWidth: 12,
|
|
1716
1759
|
tab: null,
|
|
1717
|
-
...
|
|
1760
|
+
...r
|
|
1718
1761
|
};
|
|
1719
|
-
},
|
|
1720
|
-
const { widget: t, label:
|
|
1762
|
+
}, Ce = (e) => {
|
|
1763
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1721
1764
|
return {
|
|
1722
1765
|
widget: {
|
|
1723
1766
|
type: "combocheck",
|
|
@@ -1746,15 +1789,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1746
1789
|
//允许成员填写时添加新选项
|
|
1747
1790
|
allowAddLinkData: !1,
|
|
1748
1791
|
...t,
|
|
1749
|
-
labelStyle:
|
|
1792
|
+
labelStyle: n
|
|
1750
1793
|
},
|
|
1751
|
-
label:
|
|
1794
|
+
label: n,
|
|
1752
1795
|
lineWidth: 6,
|
|
1753
1796
|
tab: null,
|
|
1754
|
-
...
|
|
1797
|
+
...r
|
|
1755
1798
|
};
|
|
1756
|
-
},
|
|
1757
|
-
const { widget: t, label:
|
|
1799
|
+
}, _e = (e) => {
|
|
1800
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1758
1801
|
return {
|
|
1759
1802
|
widget: {
|
|
1760
1803
|
type: "location",
|
|
@@ -1783,15 +1826,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1783
1826
|
enablePcLocation: !0,
|
|
1784
1827
|
//允许PC端定位并选择位置
|
|
1785
1828
|
...t,
|
|
1786
|
-
labelStyle:
|
|
1829
|
+
labelStyle: n
|
|
1787
1830
|
},
|
|
1788
|
-
label:
|
|
1831
|
+
label: n,
|
|
1789
1832
|
lineWidth: 6,
|
|
1790
1833
|
tab: null,
|
|
1791
|
-
...
|
|
1834
|
+
...r
|
|
1792
1835
|
};
|
|
1793
|
-
},
|
|
1794
|
-
const { widget: t, label:
|
|
1836
|
+
}, xe = (e) => {
|
|
1837
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1795
1838
|
return {
|
|
1796
1839
|
widget: {
|
|
1797
1840
|
type: "textarea",
|
|
@@ -1825,16 +1868,16 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1825
1868
|
maxLength: 5e3,
|
|
1826
1869
|
//限制输入最大字符数 不限制的话,整个maxLength不存在
|
|
1827
1870
|
...t,
|
|
1828
|
-
labelStyle:
|
|
1871
|
+
labelStyle: n
|
|
1829
1872
|
},
|
|
1830
1873
|
// description,
|
|
1831
|
-
label:
|
|
1874
|
+
label: n,
|
|
1832
1875
|
lineWidth: 6,
|
|
1833
1876
|
tab: null,
|
|
1834
|
-
...
|
|
1877
|
+
...r
|
|
1835
1878
|
};
|
|
1836
|
-
},
|
|
1837
|
-
const { widget: t, label:
|
|
1879
|
+
}, Ee = (e = {}) => {
|
|
1880
|
+
const { widget: t, label: n, ...r } = e;
|
|
1838
1881
|
return {
|
|
1839
1882
|
widget: {
|
|
1840
1883
|
type: "button",
|
|
@@ -1870,15 +1913,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1870
1913
|
tip: "请设置提示内容"
|
|
1871
1914
|
},
|
|
1872
1915
|
...t,
|
|
1873
|
-
labelStyle:
|
|
1916
|
+
labelStyle: n
|
|
1874
1917
|
},
|
|
1875
|
-
label:
|
|
1918
|
+
label: n,
|
|
1876
1919
|
lineWidth: 6,
|
|
1877
1920
|
tab: null,
|
|
1878
|
-
...
|
|
1921
|
+
...r
|
|
1879
1922
|
};
|
|
1880
|
-
},
|
|
1881
|
-
const { widget: t, label:
|
|
1923
|
+
}, Me = (e = {}) => {
|
|
1924
|
+
const { widget: t, label: n, ...r } = e;
|
|
1882
1925
|
return {
|
|
1883
1926
|
widget: {
|
|
1884
1927
|
type: "address",
|
|
@@ -1904,15 +1947,15 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1904
1947
|
seleceMapAddress: !0,
|
|
1905
1948
|
//开启经纬度定位
|
|
1906
1949
|
...t,
|
|
1907
|
-
labelStyle:
|
|
1950
|
+
labelStyle: n
|
|
1908
1951
|
},
|
|
1909
|
-
label:
|
|
1952
|
+
label: n,
|
|
1910
1953
|
lineWidth: 6,
|
|
1911
1954
|
tab: null,
|
|
1912
|
-
...
|
|
1955
|
+
...r
|
|
1913
1956
|
};
|
|
1914
|
-
},
|
|
1915
|
-
const { widget: t, label:
|
|
1957
|
+
}, qe = (e = {}) => {
|
|
1958
|
+
const { widget: t, label: n, ...r } = e;
|
|
1916
1959
|
return {
|
|
1917
1960
|
widget: {
|
|
1918
1961
|
type: "subform",
|
|
@@ -1922,7 +1965,7 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1922
1965
|
enable: !0,
|
|
1923
1966
|
visible: !0,
|
|
1924
1967
|
allowBlank: !0,
|
|
1925
|
-
labelStyle:
|
|
1968
|
+
labelStyle: n,
|
|
1926
1969
|
extendSet: {
|
|
1927
1970
|
sort: ["datahelp", "module", "formEvent"],
|
|
1928
1971
|
status: !0,
|
|
@@ -1931,7 +1974,7 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1931
1974
|
version: 1
|
|
1932
1975
|
},
|
|
1933
1976
|
items: (t.items || []).map((l, a) => {
|
|
1934
|
-
const i =
|
|
1977
|
+
const i = De(l, !0);
|
|
1935
1978
|
return i.widget.widgetName = g("_widget", a), i;
|
|
1936
1979
|
}),
|
|
1937
1980
|
sortable: !0,
|
|
@@ -1990,12 +2033,12 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1990
2033
|
//从excel填报数据
|
|
1991
2034
|
},
|
|
1992
2035
|
description: null,
|
|
1993
|
-
label:
|
|
2036
|
+
label: n,
|
|
1994
2037
|
lineWidth: 12,
|
|
1995
2038
|
tab: null
|
|
1996
2039
|
};
|
|
1997
|
-
},
|
|
1998
|
-
const { widget: t, label:
|
|
2040
|
+
}, Fe = (e) => {
|
|
2041
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1999
2042
|
return {
|
|
2000
2043
|
widget: {
|
|
2001
2044
|
widgetName: g(),
|
|
@@ -2019,109 +2062,120 @@ const it = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
2019
2062
|
addExtendSet: [],
|
|
2020
2063
|
...t,
|
|
2021
2064
|
linkFields: [],
|
|
2022
|
-
labelStyle:
|
|
2065
|
+
labelStyle: n,
|
|
2023
2066
|
type: "linkquery"
|
|
2024
2067
|
},
|
|
2025
2068
|
description: null,
|
|
2026
|
-
label:
|
|
2069
|
+
label: n,
|
|
2027
2070
|
lineWidth: 6,
|
|
2028
2071
|
tab: null,
|
|
2029
|
-
...
|
|
2072
|
+
...r
|
|
2030
2073
|
};
|
|
2031
|
-
},
|
|
2032
|
-
address:
|
|
2033
|
-
button:
|
|
2034
|
-
textarea:
|
|
2035
|
-
datetime:
|
|
2036
|
-
text:
|
|
2037
|
-
password:
|
|
2038
|
-
location:
|
|
2039
|
-
radiogroup:
|
|
2040
|
-
radio:
|
|
2041
|
-
combo:
|
|
2042
|
-
combocheck:
|
|
2043
|
-
separator:
|
|
2044
|
-
checkboxgroup:
|
|
2045
|
-
upload:
|
|
2046
|
-
number:
|
|
2047
|
-
image:
|
|
2048
|
-
signature:
|
|
2049
|
-
user:
|
|
2050
|
-
dataload:
|
|
2051
|
-
linkdata:
|
|
2052
|
-
linkquery:
|
|
2053
|
-
usergroup:
|
|
2054
|
-
subform:
|
|
2055
|
-
dept:
|
|
2056
|
-
sn:
|
|
2057
|
-
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,
|
|
2058
2101
|
flowState: w,
|
|
2059
2102
|
flowstate: w,
|
|
2060
2103
|
formula: w,
|
|
2061
2104
|
unknown: w
|
|
2062
|
-
},
|
|
2105
|
+
}, De = (e, t = !1) => {
|
|
2063
2106
|
var a, i;
|
|
2064
2107
|
if (!e || !e.widget || !e.widget.type)
|
|
2065
2108
|
return e;
|
|
2066
|
-
const
|
|
2067
|
-
return t &&
|
|
2068
|
-
},
|
|
2069
|
-
var t,
|
|
2070
|
-
return !e || !((t = e.corp) != null && t.name) || !((
|
|
2071
|
-
},
|
|
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;
|
|
2072
2116
|
if (!e)
|
|
2073
2117
|
return "";
|
|
2118
|
+
const t = {
|
|
2119
|
+
corpId: (n = e.corp) == null ? void 0 : n.id,
|
|
2120
|
+
userId: e.user._id,
|
|
2121
|
+
appName: e.appName,
|
|
2122
|
+
appId: e.appId,
|
|
2123
|
+
entryName: e.entryName,
|
|
2124
|
+
entryId: e.entryId,
|
|
2125
|
+
agentName: e.agentName
|
|
2126
|
+
};
|
|
2074
2127
|
try {
|
|
2075
|
-
return JSON.stringify(
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
} catch (t) {
|
|
2079
|
-
return console.warn("getChatCtxForMcp error", t), "";
|
|
2128
|
+
return JSON.stringify(t);
|
|
2129
|
+
} catch (r) {
|
|
2130
|
+
return console.warn("getChatCtxForMcp error", r), "";
|
|
2080
2131
|
}
|
|
2081
2132
|
};
|
|
2082
2133
|
export {
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
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,
|
|
2105
2157
|
y as extractTextPartMeta,
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
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
|
|
2126
2180
|
};
|
|
2127
2181
|
//# sourceMappingURL=ai-feat-utils.js.map
|