@baishuyun/ai-feat-utils 2.0.44 → 2.0.46
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 +487 -437
- 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 +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/shadow-styles.d.ts +8 -0
- package/dist/shadow-styles.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
|
+
}, j = (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
|
+
}, Oe = (e) => {
|
|
19
19
|
const t = y(e);
|
|
20
20
|
return (t == null ? void 0 : t.type) === "agent-fake-msg";
|
|
21
|
-
},
|
|
21
|
+
}, Ie = (e) => (e == null ? void 0 : e.type) === "file", Pe = (e) => {
|
|
22
22
|
const t = y(e);
|
|
23
23
|
return (t == null ? void 0 : t.type) === "query-stream-parsed-info";
|
|
24
|
-
},
|
|
24
|
+
}, Le = (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
|
+
}, We = (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
|
+
}, Be = (e) => {
|
|
43
43
|
const t = y(e);
|
|
44
44
|
return (t == null ? void 0 : t.type) === "agent-loading";
|
|
45
|
-
},
|
|
45
|
+
}, je = (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
|
+
}, Ue = (e) => {
|
|
49
|
+
if (!j(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
|
+
}, He = (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", U = (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
|
+
}, Ge = (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(U(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
|
+
}, E = "data-bs-host-style", N = /* @__PURE__ */ new WeakMap(), A = (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
|
+
), H = (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 H(r.selectorText) + A(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) + "}" : A(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(E) || 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: A(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
|
-
},
|
|
146
|
-
const t =
|
|
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
|
+
const t = N.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,86 @@ ${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[${E}],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), N.delete(e));
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
-
return
|
|
177
|
-
},
|
|
178
|
-
const
|
|
179
|
-
let
|
|
180
|
-
for (;
|
|
181
|
-
const d =
|
|
182
|
-
d.host.getAttribute("data-bs-style-mode") !== "sdk" &&
|
|
176
|
+
return N.set(e, d), d;
|
|
177
|
+
}, ze = (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
187
|
var x;
|
|
188
|
-
const d = l.reduce((
|
|
188
|
+
const d = l.reduce((p, f) => p.concat(f.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((x = t.ownerDocument.body) == null ? void 0 : x.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
|
|
198
|
-
|
|
199
|
-
} else
|
|
200
|
-
h.nextSibling !==
|
|
193
|
+
for (const p of d) {
|
|
194
|
+
let f = i.get(p.source);
|
|
195
|
+
const B = p.href ? "LINK" : "STYLE";
|
|
196
|
+
if (f && f.tagName !== B && (f.remove(), i.delete(p.source), f = void 0), f || (f = t.ownerDocument.createElement(p.href ? "link" : "style"), f.setAttribute(E, ""), i.set(p.source, f)), f.media = p.media, f.nonce = p.nonce, p.href) {
|
|
197
|
+
const k = f;
|
|
198
|
+
k.rel = "stylesheet", k.href !== p.href && (k.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
|
+
}, F = "data-bs-font-faces", z = 5, Qe = (e, t) => {
|
|
214
|
+
if (e.querySelector(`[${F}]`)) return;
|
|
215
|
+
const n = t.ownerDocument, r = [];
|
|
216
|
+
for (const a of Array.from(n.styleSheets)) {
|
|
217
|
+
let i;
|
|
218
|
+
try {
|
|
219
|
+
i = a.cssRules;
|
|
220
|
+
} catch (s) {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
const o = a.href || n.baseURI;
|
|
224
|
+
for (const s of Array.from(i))
|
|
225
|
+
s.type === z && r.push(A(s.cssText, o));
|
|
226
|
+
}
|
|
227
|
+
if (!r.length) return;
|
|
228
|
+
const l = n.createElement("style");
|
|
229
|
+
l.setAttribute(F, ""), l.textContent = r.join(`
|
|
230
|
+
`), e.prepend(l);
|
|
213
231
|
};
|
|
214
|
-
function
|
|
232
|
+
function Q(e) {
|
|
215
233
|
return Array.isArray(e) ? e.every((t) => typeof t == "string") : !1;
|
|
216
234
|
}
|
|
217
|
-
function
|
|
235
|
+
function Y(e) {
|
|
218
236
|
return Array.isArray(e) ? e.every(
|
|
219
237
|
(t) => typeof t == "object" && t !== null && "label" in t && "value" in t && typeof t.label == "string" && typeof t.value == "string"
|
|
220
238
|
) : !1;
|
|
221
239
|
}
|
|
222
|
-
const
|
|
240
|
+
const Ye = (e) => Q(e) ? e.join(", ") : Y(e) ? e.map((n) => n.value).join(", ") : e, K = /* @__PURE__ */ new Set([
|
|
223
241
|
"password",
|
|
224
242
|
"textarea",
|
|
225
243
|
"datetime",
|
|
@@ -230,16 +248,16 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
230
248
|
"combocheck",
|
|
231
249
|
"checkboxgroup",
|
|
232
250
|
"number"
|
|
233
|
-
]),
|
|
234
|
-
const
|
|
235
|
-
return (
|
|
236
|
-
},
|
|
237
|
-
const
|
|
238
|
-
return
|
|
239
|
-
},
|
|
240
|
-
const
|
|
241
|
-
return (
|
|
242
|
-
},
|
|
251
|
+
]), Ke = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? K.has(t.widget.type) : !1) : [], V = (e) => (t) => {
|
|
252
|
+
const n = y(t);
|
|
253
|
+
return (n == null ? void 0 : n.type) === e;
|
|
254
|
+
}, Ve = (e) => (t) => {
|
|
255
|
+
const n = t, r = n == null ? void 0 : n.part;
|
|
256
|
+
return V(e)(r);
|
|
257
|
+
}, Xe = (e) => (t) => {
|
|
258
|
+
const n = y(t);
|
|
259
|
+
return (n == null ? void 0 : n.type) !== e ? null : (n == null ? void 0 : n.field) || null;
|
|
260
|
+
}, Ze = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Je = (e) => {
|
|
243
261
|
if (typeof e != "string")
|
|
244
262
|
return e;
|
|
245
263
|
try {
|
|
@@ -247,14 +265,14 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
247
265
|
} catch (t) {
|
|
248
266
|
return console.info("[safeParseJson] Failed to parse JSON:", t), null;
|
|
249
267
|
}
|
|
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(),
|
|
268
|
+
}, R = (e) => !!(e && typeof e == "object" && e.qnKey), et = (e) => {
|
|
269
|
+
var r, l;
|
|
270
|
+
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;
|
|
271
|
+
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" ? R(t) : n === "upload" || n === "image" ? Array.isArray(t) && t.length > 0 && t.every(R) : !0;
|
|
272
|
+
}, X = (e = "_widget_") => {
|
|
273
|
+
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
274
|
return `${e}${l}${a}`;
|
|
257
|
-
},
|
|
275
|
+
}, tt = (e, t) => ({
|
|
258
276
|
field: e,
|
|
259
277
|
onLoaded: () => {
|
|
260
278
|
t.fillWidget({
|
|
@@ -262,22 +280,22 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
262
280
|
field: e
|
|
263
281
|
});
|
|
264
282
|
},
|
|
265
|
-
onChange: (
|
|
283
|
+
onChange: (n, r, l, a) => {
|
|
266
284
|
const i = {
|
|
267
|
-
field:
|
|
268
|
-
checked:
|
|
285
|
+
field: r,
|
|
286
|
+
checked: n,
|
|
269
287
|
parentFieldName: l,
|
|
270
288
|
rowIndex: a
|
|
271
289
|
};
|
|
272
290
|
t.fillWidget(i);
|
|
273
291
|
}
|
|
274
|
-
}),
|
|
275
|
-
const
|
|
276
|
-
|
|
292
|
+
}), nt = 10, rt = (e, t = "image/png") => new Promise((n) => {
|
|
293
|
+
const r = new Image();
|
|
294
|
+
r.crossOrigin = "anonymous", r.onload = () => {
|
|
277
295
|
const l = document.createElement("canvas");
|
|
278
|
-
l.width =
|
|
279
|
-
},
|
|
280
|
-
}),
|
|
296
|
+
l.width = r.naturalWidth, l.height = r.naturalHeight, l.getContext("2d").drawImage(r, 0, 0), n(l.toDataURL(t));
|
|
297
|
+
}, r.onerror = () => n(e), r.src = e;
|
|
298
|
+
}), Z = {
|
|
281
299
|
eq: "等于",
|
|
282
300
|
neq: "不等于",
|
|
283
301
|
gt: "大于",
|
|
@@ -294,7 +312,7 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
294
312
|
range: "选择范围",
|
|
295
313
|
like: "模糊匹配",
|
|
296
314
|
unlike: "模糊不匹配"
|
|
297
|
-
},
|
|
315
|
+
}, J = {
|
|
298
316
|
usergroup: { in: "包含任意一个" },
|
|
299
317
|
deptgroup: { in: "包含任意一个" },
|
|
300
318
|
checkboxgroup: { in: "包含任意一个" },
|
|
@@ -302,12 +320,12 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
|
|
|
302
320
|
address: { in: "属于", nin: "不属于" },
|
|
303
321
|
location: { in: "包含", nin: "不包含" }
|
|
304
322
|
};
|
|
305
|
-
function
|
|
306
|
-
var
|
|
307
|
-
const
|
|
308
|
-
return (l = (
|
|
323
|
+
function at(e, t) {
|
|
324
|
+
var r, l;
|
|
325
|
+
const n = t ? J[t] : void 0;
|
|
326
|
+
return (l = (r = n == null ? void 0 : n[e]) != null ? r : Z[e]) != null ? l : e;
|
|
309
327
|
}
|
|
310
|
-
const
|
|
328
|
+
const ee = {
|
|
311
329
|
// Text-like: equality, fuzzy, empty checks
|
|
312
330
|
text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
|
|
313
331
|
password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
|
|
@@ -351,7 +369,7 @@ const V = {
|
|
|
351
369
|
button: [],
|
|
352
370
|
subform: [],
|
|
353
371
|
unknown: []
|
|
354
|
-
},
|
|
372
|
+
}, te = {
|
|
355
373
|
text: "eq",
|
|
356
374
|
password: "eq",
|
|
357
375
|
radiogroup: "eq",
|
|
@@ -379,106 +397,136 @@ const V = {
|
|
|
379
397
|
dataload: "eq",
|
|
380
398
|
formula: "eq"
|
|
381
399
|
};
|
|
382
|
-
function
|
|
400
|
+
function lt(e) {
|
|
383
401
|
var t;
|
|
384
|
-
return e ? (t =
|
|
402
|
+
return e ? (t = ee[e]) != null ? t : [] : [];
|
|
385
403
|
}
|
|
386
|
-
function
|
|
404
|
+
function it(e) {
|
|
387
405
|
var t;
|
|
388
|
-
return e && (t =
|
|
406
|
+
return e && (t = te[e]) != null ? t : "eq";
|
|
389
407
|
}
|
|
390
408
|
function S(e) {
|
|
391
409
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
392
410
|
}
|
|
393
|
-
function
|
|
411
|
+
function L(e) {
|
|
394
412
|
return S(e) ? e : null;
|
|
395
413
|
}
|
|
396
|
-
function
|
|
397
|
-
return !!(e == null || e === "" || Array.isArray(e) && e.length === 0);
|
|
414
|
+
function D(e) {
|
|
415
|
+
return !!(e == null || e === "" || e === "{}" || Array.isArray(e) && e.length === 0);
|
|
398
416
|
}
|
|
399
|
-
function
|
|
417
|
+
function _(e, t) {
|
|
400
418
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
401
419
|
if (e.length !== t.length) return !1;
|
|
402
|
-
const
|
|
403
|
-
return
|
|
420
|
+
const n = e.map(String).sort(), r = t.map(String).sort();
|
|
421
|
+
return n.every((l, a) => l === r[a]);
|
|
404
422
|
}
|
|
405
423
|
if (S(e) && S(t)) {
|
|
406
|
-
const
|
|
407
|
-
return
|
|
424
|
+
const n = Object.keys(e), r = Object.keys(t);
|
|
425
|
+
return n.length !== r.length ? !1 : n.every((l) => String(e[l]) === String(t[l]));
|
|
408
426
|
}
|
|
409
427
|
return String(e) === String(t);
|
|
410
428
|
}
|
|
411
|
-
function
|
|
429
|
+
function T(e) {
|
|
430
|
+
if (e == null) return null;
|
|
431
|
+
let t = null;
|
|
432
|
+
if (e instanceof Date)
|
|
433
|
+
t = e.toISOString();
|
|
434
|
+
else if (typeof e == "number" && Number.isFinite(e)) {
|
|
435
|
+
const r = new Date(e), l = r.getFullYear(), a = String(r.getMonth() + 1).padStart(2, "0"), i = String(r.getDate()).padStart(2, "0");
|
|
436
|
+
return `${l}-${a}-${i}`;
|
|
437
|
+
} else
|
|
438
|
+
t = String(e).trim();
|
|
439
|
+
const n = /^(\d{4})-(\d{1,2})-(\d{1,2})/.exec(t);
|
|
440
|
+
return n ? `${n[1]}-${n[2].padStart(2, "0")}-${n[3].padStart(2, "0")}` : null;
|
|
441
|
+
}
|
|
442
|
+
function $(e, t) {
|
|
443
|
+
const n = T(e), r = T(t);
|
|
444
|
+
return n !== null && r !== null ? n === r : _(e, t);
|
|
445
|
+
}
|
|
446
|
+
function O(e, t) {
|
|
412
447
|
if (S(t)) {
|
|
413
|
-
const
|
|
414
|
-
return !(!
|
|
448
|
+
const r = L(e);
|
|
449
|
+
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
450
|
}
|
|
416
|
-
const
|
|
417
|
-
return Array.isArray(e) ? e.some((
|
|
451
|
+
const n = Array.isArray(t) ? t.map(String) : [];
|
|
452
|
+
return Array.isArray(e) ? e.some((r) => n.includes(String(r))) : n.includes(String(e));
|
|
418
453
|
}
|
|
419
|
-
function
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
const
|
|
423
|
-
return
|
|
454
|
+
function ne(e, t) {
|
|
455
|
+
const n = Array.isArray(t) ? t.map(String) : [];
|
|
456
|
+
if (n.length === 0) return !1;
|
|
457
|
+
const r = Array.isArray(e) ? e.map(String) : [];
|
|
458
|
+
return n.every((l) => r.includes(l));
|
|
424
459
|
}
|
|
425
|
-
function
|
|
426
|
-
const
|
|
427
|
-
if (!
|
|
428
|
-
const
|
|
429
|
-
return !(isNaN(
|
|
460
|
+
function re(e, t) {
|
|
461
|
+
const n = L(t);
|
|
462
|
+
if (!n) return !1;
|
|
463
|
+
const r = Number(e);
|
|
464
|
+
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
465
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
466
|
+
const ae = (e, t) => t === "user" ? e._id : e;
|
|
467
|
+
function le(e, t) {
|
|
468
|
+
var m, d, u;
|
|
469
|
+
const n = (m = e.field.widget) == null ? void 0 : m.widgetName;
|
|
470
|
+
if (!n) return !1;
|
|
471
|
+
const r = (d = e.field.widget) == null ? void 0 : d.type, l = t[n], a = ae(l, r), { operator: i, value: o } = e, s = ((u = e.field.widget) == null ? void 0 : u.type) === "datetime";
|
|
472
|
+
switch (i) {
|
|
437
473
|
case "empty":
|
|
438
|
-
return
|
|
474
|
+
return D(a);
|
|
439
475
|
case "not_empty":
|
|
440
|
-
return !
|
|
476
|
+
return !D(a);
|
|
441
477
|
case "eq":
|
|
442
|
-
return
|
|
478
|
+
return s ? $(a, o) : _(a, o);
|
|
443
479
|
case "neq":
|
|
444
|
-
return !
|
|
480
|
+
return s ? !$(a, o) : !_(a, o);
|
|
445
481
|
case "contains":
|
|
446
482
|
case "like":
|
|
447
|
-
return String(
|
|
483
|
+
return String(a).includes(String(o));
|
|
448
484
|
case "not_contains":
|
|
449
485
|
case "unlike":
|
|
450
|
-
return !String(
|
|
486
|
+
return !String(a).includes(String(o));
|
|
451
487
|
case "gt":
|
|
452
|
-
return Number(
|
|
488
|
+
return Number(a) > Number(o);
|
|
453
489
|
case "gte":
|
|
454
|
-
return Number(
|
|
490
|
+
return Number(a) >= Number(o);
|
|
455
491
|
case "lt":
|
|
456
|
-
return Number(
|
|
492
|
+
return Number(a) < Number(o);
|
|
457
493
|
case "lte":
|
|
458
|
-
return Number(
|
|
494
|
+
return Number(a) <= Number(o);
|
|
459
495
|
case "in":
|
|
460
|
-
return
|
|
496
|
+
return O(a, o);
|
|
461
497
|
case "nin":
|
|
462
|
-
return !
|
|
498
|
+
return !O(a, o);
|
|
463
499
|
case "all":
|
|
464
|
-
return
|
|
500
|
+
return ne(a, o);
|
|
465
501
|
case "range":
|
|
466
|
-
return
|
|
502
|
+
return re(a, o);
|
|
467
503
|
default:
|
|
468
504
|
return !1;
|
|
469
505
|
}
|
|
470
506
|
}
|
|
471
|
-
function
|
|
507
|
+
function ot(e, t) {
|
|
508
|
+
if (!t || !(t != null && t.length))
|
|
509
|
+
return !1;
|
|
510
|
+
const n = e.formFieldEditPreference;
|
|
511
|
+
if (n === "edit_any_field")
|
|
512
|
+
return !!(t != null && t.length);
|
|
513
|
+
const r = new Set(t);
|
|
514
|
+
return n == null ? void 0 : n.fields.some((l) => {
|
|
515
|
+
var a;
|
|
516
|
+
return r.has((a = l == null ? void 0 : l.widget) == null ? void 0 : a.widgetName);
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
function st(e, t) {
|
|
472
520
|
if (!e.enabled)
|
|
473
521
|
return !1;
|
|
474
|
-
const
|
|
475
|
-
if (!
|
|
476
|
-
const { items:
|
|
477
|
-
if (!
|
|
478
|
-
const a =
|
|
522
|
+
const n = e.triggerCondition;
|
|
523
|
+
if (!n) return !0;
|
|
524
|
+
const { items: r, quantifier: l } = n;
|
|
525
|
+
if (!r || r.length === 0) return !0;
|
|
526
|
+
const a = r.map((i) => le(i, t));
|
|
479
527
|
return l === "any" ? a.some((i) => i) : a.every((i) => i);
|
|
480
528
|
}
|
|
481
|
-
const
|
|
529
|
+
const ut = (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", ie = {
|
|
482
530
|
eq: "eq",
|
|
483
531
|
neq: "ne",
|
|
484
532
|
gt: "gt",
|
|
@@ -495,7 +543,7 @@ const rt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
|
|
|
495
543
|
empty: "empty",
|
|
496
544
|
not_empty: "not_empty",
|
|
497
545
|
range: "range"
|
|
498
|
-
},
|
|
546
|
+
}, oe = {
|
|
499
547
|
eq: "eq",
|
|
500
548
|
ne: "neq",
|
|
501
549
|
gt: "gt",
|
|
@@ -513,24 +561,24 @@ const rt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
|
|
|
513
561
|
not_empty: "not_empty",
|
|
514
562
|
range: "range"
|
|
515
563
|
};
|
|
516
|
-
function
|
|
517
|
-
const t = e.quantifier === "any" ? "or" : "and",
|
|
518
|
-
var i, o, s,
|
|
519
|
-
const l = (i =
|
|
564
|
+
function dt(e) {
|
|
565
|
+
const t = e.quantifier === "any" ? "or" : "and", n = e.items.map((r) => {
|
|
566
|
+
var i, o, s, m, d, u;
|
|
567
|
+
const l = (i = ie[r.operator]) != null ? i : "eq";
|
|
520
568
|
let a;
|
|
521
|
-
return
|
|
522
|
-
field: (
|
|
569
|
+
return r.operator === "range" && S(r.value) ? a = [r.value.min, r.value.max] : Array.isArray(r.value) ? a = r.value : a = [r.value], {
|
|
570
|
+
field: (m = (s = (o = r.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? m : "",
|
|
523
571
|
method: l,
|
|
524
572
|
value: a,
|
|
525
|
-
type: (u = (d =
|
|
573
|
+
type: (u = (d = r.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
|
|
526
574
|
};
|
|
527
575
|
});
|
|
528
|
-
return JSON.stringify({ rel: t, cond:
|
|
576
|
+
return JSON.stringify({ rel: t, cond: n });
|
|
529
577
|
}
|
|
530
|
-
function
|
|
531
|
-
const t = JSON.parse(e),
|
|
532
|
-
var s,
|
|
533
|
-
const i = (s =
|
|
578
|
+
function ct(e) {
|
|
579
|
+
const t = JSON.parse(e), n = t.rel === "or" ? "any" : "all", r = t.cond.map((l, a) => {
|
|
580
|
+
var s, m;
|
|
581
|
+
const i = (s = oe[l.method]) != null ? s : "eq";
|
|
534
582
|
let o = l.value;
|
|
535
583
|
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
584
|
id: `${l.field}_${a}`,
|
|
@@ -538,7 +586,7 @@ function at(e) {
|
|
|
538
586
|
label: l.field,
|
|
539
587
|
widget: {
|
|
540
588
|
widgetName: l.field,
|
|
541
|
-
type: (
|
|
589
|
+
type: (m = l.type) != null ? m : "unknown",
|
|
542
590
|
value: void 0
|
|
543
591
|
}
|
|
544
592
|
},
|
|
@@ -546,25 +594,25 @@ function at(e) {
|
|
|
546
594
|
value: o
|
|
547
595
|
};
|
|
548
596
|
});
|
|
549
|
-
return { targetName: "", quantifier:
|
|
597
|
+
return { targetName: "", quantifier: n, items: r };
|
|
550
598
|
}
|
|
551
|
-
function
|
|
552
|
-
const t = (
|
|
599
|
+
function gt(e) {
|
|
600
|
+
const t = (n) => String(n).padStart(2, "0");
|
|
553
601
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
|
|
554
602
|
}
|
|
555
|
-
function
|
|
556
|
-
const
|
|
603
|
+
function mt(e, t, n = 1) {
|
|
604
|
+
const r = [], l = [];
|
|
557
605
|
for (const a of e)
|
|
558
|
-
t(a) ? l.push(a) : (l.length > 0 && (
|
|
559
|
-
return l.length > 0 &&
|
|
606
|
+
t(a) ? l.push(a) : (l.length > 0 && (r.push(l.length >= n ? [...l] : l[0]), l.length = 0), r.push(a));
|
|
607
|
+
return l.length > 0 && r.push(l.length >= 2 ? [...l] : l[0]), r;
|
|
560
608
|
}
|
|
561
|
-
function
|
|
609
|
+
function W(e) {
|
|
562
610
|
const t = [];
|
|
563
|
-
for (const
|
|
564
|
-
Array.isArray(
|
|
611
|
+
for (const n of e)
|
|
612
|
+
Array.isArray(n) ? t.push(...W(n)) : t.push(n);
|
|
565
613
|
return t;
|
|
566
614
|
}
|
|
567
|
-
const
|
|
615
|
+
const se = {
|
|
568
616
|
projectdevelopment: "e914",
|
|
569
617
|
resourcelibrary: "e915",
|
|
570
618
|
Plugin2: "e90e",
|
|
@@ -971,36 +1019,36 @@ const ne = {
|
|
|
971
1019
|
Automation1: "ea95",
|
|
972
1020
|
Avatar: "ea96"
|
|
973
1021
|
};
|
|
974
|
-
function
|
|
975
|
-
const t =
|
|
1022
|
+
function ft(e) {
|
|
1023
|
+
const t = se[e];
|
|
976
1024
|
return t ? `&#x${t};` : void 0;
|
|
977
1025
|
}
|
|
978
|
-
const
|
|
979
|
-
if (!
|
|
1026
|
+
const pt = { 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" }, bt = (e, t, n) => {
|
|
1027
|
+
if (!n)
|
|
980
1028
|
return {
|
|
981
1029
|
translated: ""
|
|
982
1030
|
};
|
|
983
|
-
const
|
|
1031
|
+
const r = new Map(t.map((i) => [i.widget.widgetName, i.label]));
|
|
984
1032
|
for (const i of t)
|
|
985
1033
|
if (i.widget.type === "subform" && i.widget.items) {
|
|
986
1034
|
for (const o of i.widget.items)
|
|
987
1035
|
if ("widget" in o && !("options" in o)) {
|
|
988
1036
|
const s = `${i.widget.widgetName}.${o.widget.widgetName}`;
|
|
989
|
-
|
|
1037
|
+
r.set(s, o.label);
|
|
990
1038
|
}
|
|
991
1039
|
}
|
|
992
1040
|
const l = [], a = e.replace(
|
|
993
1041
|
/\$\{(virtual\.)?(_widget_\d+(?:\._widget_\d+)?)\}/g,
|
|
994
1042
|
(i, o, s) => {
|
|
995
|
-
const
|
|
1043
|
+
const m = !!o, { translated: d, meta: u } = n(s, m);
|
|
996
1044
|
return u && l.push(u), d;
|
|
997
1045
|
}
|
|
998
1046
|
);
|
|
999
1047
|
return {
|
|
1000
|
-
meta: l.length ?
|
|
1048
|
+
meta: l.length ? W(l) : null,
|
|
1001
1049
|
translated: (a != null ? a : "").trim()
|
|
1002
1050
|
};
|
|
1003
|
-
},
|
|
1051
|
+
}, ue = {
|
|
1004
1052
|
手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
|
|
1005
1053
|
电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
|
|
1006
1054
|
邮政编码: "^\\d{6}$",
|
|
@@ -1012,8 +1060,8 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1012
1060
|
二维码图片: "qrcode",
|
|
1013
1061
|
条形码图片: "barcode",
|
|
1014
1062
|
自定义: "custom"
|
|
1015
|
-
},
|
|
1016
|
-
const { widget: t, labelStyle:
|
|
1063
|
+
}, I = (e) => {
|
|
1064
|
+
const { widget: t, labelStyle: n, label: r, ...l } = e || {}, a = ue[n] || "";
|
|
1017
1065
|
return {
|
|
1018
1066
|
widget: {
|
|
1019
1067
|
widgetName: `_widget_${Date.now()}`,
|
|
@@ -1053,26 +1101,26 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1053
1101
|
...t,
|
|
1054
1102
|
regex: a,
|
|
1055
1103
|
type: "text",
|
|
1056
|
-
labelStyle:
|
|
1104
|
+
labelStyle: r
|
|
1057
1105
|
},
|
|
1058
1106
|
// description,
|
|
1059
|
-
label:
|
|
1107
|
+
label: r,
|
|
1060
1108
|
lineWidth: 6,
|
|
1061
1109
|
tab: null,
|
|
1062
1110
|
...l
|
|
1063
1111
|
};
|
|
1064
|
-
},
|
|
1065
|
-
const
|
|
1112
|
+
}, g = (e = "_widget", t) => {
|
|
1113
|
+
const n = `${e}_${Date.now()}`;
|
|
1066
1114
|
if (t === void 0)
|
|
1067
|
-
return
|
|
1068
|
-
const
|
|
1069
|
-
return `${
|
|
1070
|
-
},
|
|
1071
|
-
const { widget: t, label:
|
|
1115
|
+
return n;
|
|
1116
|
+
const r = t.toString().length;
|
|
1117
|
+
return `${n.slice(0, -r)}${t}`;
|
|
1118
|
+
}, de = (e) => {
|
|
1119
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1072
1120
|
return {
|
|
1073
1121
|
widget: {
|
|
1074
1122
|
type: "number",
|
|
1075
|
-
widgetName:
|
|
1123
|
+
widgetName: g(),
|
|
1076
1124
|
widgetNameAlias: "",
|
|
1077
1125
|
triggerEvent: !1,
|
|
1078
1126
|
customCls: null,
|
|
@@ -1124,16 +1172,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1124
1172
|
//繁体的
|
|
1125
1173
|
},
|
|
1126
1174
|
...t,
|
|
1127
|
-
labelStyle:
|
|
1175
|
+
labelStyle: n
|
|
1128
1176
|
},
|
|
1129
1177
|
// description,
|
|
1130
|
-
label:
|
|
1178
|
+
label: n,
|
|
1131
1179
|
lineWidth: 6,
|
|
1132
1180
|
tab: null,
|
|
1133
|
-
...
|
|
1181
|
+
...r
|
|
1134
1182
|
};
|
|
1135
|
-
},
|
|
1136
|
-
const { widget: t, label:
|
|
1183
|
+
}, ce = (e) => {
|
|
1184
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1137
1185
|
return {
|
|
1138
1186
|
widget: {
|
|
1139
1187
|
type: "combo",
|
|
@@ -1161,16 +1209,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1161
1209
|
colorEnable: !0,
|
|
1162
1210
|
//颜色 是否开启颜色
|
|
1163
1211
|
...t,
|
|
1164
|
-
labelStyle:
|
|
1212
|
+
labelStyle: n
|
|
1165
1213
|
},
|
|
1166
1214
|
// description,
|
|
1167
|
-
label:
|
|
1215
|
+
label: n,
|
|
1168
1216
|
lineWidth: 6,
|
|
1169
1217
|
tab: null,
|
|
1170
|
-
...
|
|
1218
|
+
...r
|
|
1171
1219
|
};
|
|
1172
|
-
},
|
|
1173
|
-
const { widget: t, label:
|
|
1220
|
+
}, P = (e) => {
|
|
1221
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1174
1222
|
return {
|
|
1175
1223
|
widget: {
|
|
1176
1224
|
enable: !0,
|
|
@@ -1199,14 +1247,14 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1199
1247
|
type: "radiogroup"
|
|
1200
1248
|
},
|
|
1201
1249
|
// description,
|
|
1202
|
-
label:
|
|
1250
|
+
label: n,
|
|
1203
1251
|
lineWidth: 6,
|
|
1204
1252
|
tab: null,
|
|
1205
|
-
...
|
|
1206
|
-
labelStyle:
|
|
1253
|
+
...r,
|
|
1254
|
+
labelStyle: n
|
|
1207
1255
|
};
|
|
1208
|
-
},
|
|
1209
|
-
const { widget: t, label:
|
|
1256
|
+
}, ge = (e) => {
|
|
1257
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1210
1258
|
return {
|
|
1211
1259
|
widget: {
|
|
1212
1260
|
type: "datetime",
|
|
@@ -1265,19 +1313,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1265
1313
|
}
|
|
1266
1314
|
},
|
|
1267
1315
|
...t,
|
|
1268
|
-
labelStyle:
|
|
1316
|
+
labelStyle: n
|
|
1269
1317
|
},
|
|
1270
|
-
label:
|
|
1318
|
+
label: n,
|
|
1271
1319
|
lineWidth: 6,
|
|
1272
1320
|
tab: null,
|
|
1273
|
-
...
|
|
1321
|
+
...r
|
|
1274
1322
|
};
|
|
1275
|
-
}, w = (e) => e,
|
|
1276
|
-
const { widget: t, label:
|
|
1323
|
+
}, w = (e) => e, me = (e) => {
|
|
1324
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1277
1325
|
return {
|
|
1278
1326
|
widget: {
|
|
1279
1327
|
type: "deptgroup",
|
|
1280
|
-
widgetName:
|
|
1328
|
+
widgetName: g(),
|
|
1281
1329
|
widgetNameAlias: "",
|
|
1282
1330
|
customCls: null,
|
|
1283
1331
|
height: "34",
|
|
@@ -1299,19 +1347,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1299
1347
|
limit: {},
|
|
1300
1348
|
valueOption: 0,
|
|
1301
1349
|
...t,
|
|
1302
|
-
labelStyle:
|
|
1350
|
+
labelStyle: n
|
|
1303
1351
|
},
|
|
1304
|
-
label:
|
|
1352
|
+
label: n,
|
|
1305
1353
|
lineWidth: 6,
|
|
1306
1354
|
tab: null,
|
|
1307
|
-
...
|
|
1355
|
+
...r
|
|
1308
1356
|
};
|
|
1309
|
-
},
|
|
1310
|
-
const { widget: t, label:
|
|
1357
|
+
}, fe = (e) => {
|
|
1358
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1311
1359
|
return {
|
|
1312
1360
|
widget: {
|
|
1313
1361
|
type: "sn",
|
|
1314
|
-
widgetName:
|
|
1362
|
+
widgetName: g(),
|
|
1315
1363
|
widgetNameAlias: "",
|
|
1316
1364
|
triggerEvent: 0,
|
|
1317
1365
|
customCls: null,
|
|
@@ -1335,20 +1383,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1335
1383
|
type: "incNumber"
|
|
1336
1384
|
}
|
|
1337
1385
|
],
|
|
1338
|
-
labelStyle:
|
|
1386
|
+
labelStyle: n
|
|
1339
1387
|
},
|
|
1340
1388
|
// description,
|
|
1341
|
-
label:
|
|
1389
|
+
label: n,
|
|
1342
1390
|
lineWidth: 6,
|
|
1343
1391
|
tab: null,
|
|
1344
|
-
...
|
|
1392
|
+
...r
|
|
1345
1393
|
};
|
|
1346
|
-
},
|
|
1347
|
-
const { widget: t, label:
|
|
1394
|
+
}, pe = (e) => {
|
|
1395
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1348
1396
|
return {
|
|
1349
1397
|
widget: {
|
|
1350
1398
|
type: "dept",
|
|
1351
|
-
widgetName:
|
|
1399
|
+
widgetName: g(),
|
|
1352
1400
|
widgetNameAlias: "",
|
|
1353
1401
|
customCls: null,
|
|
1354
1402
|
height: "34",
|
|
@@ -1370,19 +1418,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1370
1418
|
limit: {},
|
|
1371
1419
|
valueOption: 0,
|
|
1372
1420
|
...t,
|
|
1373
|
-
labelStyle:
|
|
1421
|
+
labelStyle: n
|
|
1374
1422
|
},
|
|
1375
|
-
label:
|
|
1423
|
+
label: n,
|
|
1376
1424
|
lineWidth: 6,
|
|
1377
1425
|
tab: null,
|
|
1378
|
-
...
|
|
1426
|
+
...r
|
|
1379
1427
|
};
|
|
1380
|
-
},
|
|
1381
|
-
const { widget: t, label:
|
|
1428
|
+
}, be = (e) => {
|
|
1429
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1382
1430
|
return {
|
|
1383
1431
|
widget: {
|
|
1384
1432
|
type: "usergroup",
|
|
1385
|
-
widgetName:
|
|
1433
|
+
widgetName: g(),
|
|
1386
1434
|
widgetNameAlias: "",
|
|
1387
1435
|
customCls: null,
|
|
1388
1436
|
height: "34",
|
|
@@ -1406,19 +1454,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1406
1454
|
//可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
|
|
1407
1455
|
valueOption: 0,
|
|
1408
1456
|
...t,
|
|
1409
|
-
labelStyle:
|
|
1457
|
+
labelStyle: n
|
|
1410
1458
|
},
|
|
1411
1459
|
// description,
|
|
1412
|
-
label:
|
|
1460
|
+
label: n,
|
|
1413
1461
|
lineWidth: 6,
|
|
1414
1462
|
tab: null,
|
|
1415
|
-
...
|
|
1463
|
+
...r
|
|
1416
1464
|
};
|
|
1417
|
-
},
|
|
1418
|
-
const { widget: t, label:
|
|
1465
|
+
}, ye = (e) => {
|
|
1466
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1419
1467
|
return {
|
|
1420
1468
|
widget: {
|
|
1421
|
-
widgetName:
|
|
1469
|
+
widgetName: g(),
|
|
1422
1470
|
widgetNameAlias: "",
|
|
1423
1471
|
customCls: null,
|
|
1424
1472
|
enable: !0,
|
|
@@ -1434,16 +1482,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1434
1482
|
//关联表的类型,只能是form
|
|
1435
1483
|
...t,
|
|
1436
1484
|
linkFields: [],
|
|
1437
|
-
labelStyle:
|
|
1485
|
+
labelStyle: n,
|
|
1438
1486
|
type: "linkdata"
|
|
1439
1487
|
},
|
|
1440
|
-
label:
|
|
1488
|
+
label: n,
|
|
1441
1489
|
lineWidth: 6,
|
|
1442
1490
|
tab: null,
|
|
1443
|
-
...
|
|
1491
|
+
...r
|
|
1444
1492
|
};
|
|
1445
|
-
},
|
|
1446
|
-
id:
|
|
1493
|
+
}, he = (e) => !e || !e.length ? e : e.map((t, n) => ({
|
|
1494
|
+
id: n,
|
|
1447
1495
|
// name: "_widget_1761976674767",
|
|
1448
1496
|
// form: "a2f34ef882158a3e97da4ef7",
|
|
1449
1497
|
// tag: buildWidgetName("f_", index),
|
|
@@ -1454,20 +1502,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1454
1502
|
isEditable: !0,
|
|
1455
1503
|
group: "dimension,filter,select",
|
|
1456
1504
|
formula: ""
|
|
1457
|
-
})),
|
|
1505
|
+
})), we = (e) => !e || !e.length ? e : e.map((t) => ({
|
|
1458
1506
|
mode: "depend",
|
|
1459
1507
|
...t
|
|
1460
|
-
})),
|
|
1508
|
+
})), Se = (e) => {
|
|
1461
1509
|
var l, a, i;
|
|
1462
|
-
const { widget: t, label:
|
|
1510
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1463
1511
|
return {
|
|
1464
1512
|
widget: {
|
|
1465
1513
|
type: "dataload",
|
|
1466
|
-
widgetName:
|
|
1514
|
+
widgetName: g(),
|
|
1467
1515
|
widgetNameAlias: "",
|
|
1468
1516
|
customCls: null,
|
|
1469
1517
|
width: 350,
|
|
1470
|
-
text:
|
|
1518
|
+
text: n,
|
|
1471
1519
|
enable: !0,
|
|
1472
1520
|
visible: !0,
|
|
1473
1521
|
allowBlank: !0,
|
|
@@ -1499,22 +1547,22 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1499
1547
|
forms: (l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.forms,
|
|
1500
1548
|
selectArg: [],
|
|
1501
1549
|
selectRel: "and",
|
|
1502
|
-
fields:
|
|
1503
|
-
mapFields:
|
|
1550
|
+
fields: he((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
|
|
1551
|
+
mapFields: we((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
|
|
1504
1552
|
},
|
|
1505
|
-
labelStyle:
|
|
1553
|
+
labelStyle: n
|
|
1506
1554
|
},
|
|
1507
|
-
label:
|
|
1555
|
+
label: n,
|
|
1508
1556
|
lineWidth: 6,
|
|
1509
1557
|
tab: null,
|
|
1510
|
-
...
|
|
1558
|
+
...r
|
|
1511
1559
|
};
|
|
1512
|
-
},
|
|
1513
|
-
const { widget: t, label:
|
|
1560
|
+
}, ve = (e) => {
|
|
1561
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1514
1562
|
return {
|
|
1515
1563
|
widget: {
|
|
1516
1564
|
type: "user",
|
|
1517
|
-
widgetName:
|
|
1565
|
+
widgetName: g(),
|
|
1518
1566
|
widgetNameAlias: "",
|
|
1519
1567
|
customCls: null,
|
|
1520
1568
|
height: "34",
|
|
@@ -1538,20 +1586,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1538
1586
|
//可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
|
|
1539
1587
|
valueOption: 0,
|
|
1540
1588
|
...t,
|
|
1541
|
-
labelStyle:
|
|
1589
|
+
labelStyle: n
|
|
1542
1590
|
},
|
|
1543
1591
|
// description,
|
|
1544
|
-
label:
|
|
1592
|
+
label: n,
|
|
1545
1593
|
lineWidth: 6,
|
|
1546
1594
|
tab: null,
|
|
1547
|
-
...
|
|
1595
|
+
...r
|
|
1548
1596
|
};
|
|
1549
|
-
},
|
|
1550
|
-
const { widget: t, label:
|
|
1597
|
+
}, Ae = (e) => {
|
|
1598
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1551
1599
|
return {
|
|
1552
1600
|
widget: {
|
|
1553
1601
|
type: "signature",
|
|
1554
|
-
widgetName:
|
|
1602
|
+
widgetName: g(),
|
|
1555
1603
|
widgetNameAlias: "",
|
|
1556
1604
|
customCls: null,
|
|
1557
1605
|
height: 34,
|
|
@@ -1561,20 +1609,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1561
1609
|
allowBlank: !0,
|
|
1562
1610
|
rely: null,
|
|
1563
1611
|
...t,
|
|
1564
|
-
labelStyle:
|
|
1612
|
+
labelStyle: n
|
|
1565
1613
|
},
|
|
1566
1614
|
description: null,
|
|
1567
|
-
label:
|
|
1615
|
+
label: n,
|
|
1568
1616
|
lineWidth: 6,
|
|
1569
1617
|
tab: null,
|
|
1570
|
-
...
|
|
1618
|
+
...r
|
|
1571
1619
|
};
|
|
1572
|
-
},
|
|
1573
|
-
const { widget: t, label:
|
|
1620
|
+
}, ke = (e) => {
|
|
1621
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1574
1622
|
return {
|
|
1575
1623
|
widget: {
|
|
1576
1624
|
type: "image",
|
|
1577
|
-
widgetName:
|
|
1625
|
+
widgetName: g(),
|
|
1578
1626
|
widgetNameAlias: "",
|
|
1579
1627
|
customCls: null,
|
|
1580
1628
|
height: 100,
|
|
@@ -1634,19 +1682,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1634
1682
|
quality: 0.7,
|
|
1635
1683
|
//压缩图片比例,开启 浏览器图片压缩 后才能设置
|
|
1636
1684
|
...t,
|
|
1637
|
-
labelStyle:
|
|
1685
|
+
labelStyle: n
|
|
1638
1686
|
},
|
|
1639
|
-
label:
|
|
1687
|
+
label: n,
|
|
1640
1688
|
lineWidth: 6,
|
|
1641
1689
|
tab: null,
|
|
1642
|
-
...
|
|
1690
|
+
...r
|
|
1643
1691
|
};
|
|
1644
|
-
},
|
|
1645
|
-
const { widget: t, label:
|
|
1692
|
+
}, Ne = (e) => {
|
|
1693
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1646
1694
|
return {
|
|
1647
1695
|
widget: {
|
|
1648
1696
|
type: "upload",
|
|
1649
|
-
widgetName:
|
|
1697
|
+
widgetName: g(),
|
|
1650
1698
|
widgetNameAlias: "",
|
|
1651
1699
|
customCls: null,
|
|
1652
1700
|
enable: !0,
|
|
@@ -1668,20 +1716,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1668
1716
|
//设置单个文件大小上限,单位是字节,范围 1M-20M
|
|
1669
1717
|
// fileType,
|
|
1670
1718
|
...t,
|
|
1671
|
-
labelStyle:
|
|
1719
|
+
labelStyle: n
|
|
1672
1720
|
},
|
|
1673
1721
|
// description,
|
|
1674
|
-
label:
|
|
1722
|
+
label: n,
|
|
1675
1723
|
lineWidth: 6,
|
|
1676
1724
|
tab: null,
|
|
1677
|
-
...
|
|
1725
|
+
...r
|
|
1678
1726
|
};
|
|
1679
|
-
},
|
|
1680
|
-
const { widget: t, label:
|
|
1727
|
+
}, Ce = (e) => {
|
|
1728
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1681
1729
|
return {
|
|
1682
1730
|
widget: {
|
|
1683
1731
|
type: "checkboxgroup",
|
|
1684
|
-
widgetName:
|
|
1732
|
+
widgetName: g(),
|
|
1685
1733
|
widgetNameAlias: "",
|
|
1686
1734
|
customCls: null,
|
|
1687
1735
|
enable: !0,
|
|
@@ -1703,38 +1751,38 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1703
1751
|
allowAddOptions: !1,
|
|
1704
1752
|
//允许成员填写时添加新选项
|
|
1705
1753
|
...t,
|
|
1706
|
-
labelStyle:
|
|
1754
|
+
labelStyle: n
|
|
1707
1755
|
},
|
|
1708
|
-
label:
|
|
1756
|
+
label: n,
|
|
1709
1757
|
lineWidth: 6,
|
|
1710
1758
|
tab: null,
|
|
1711
|
-
...
|
|
1759
|
+
...r
|
|
1712
1760
|
};
|
|
1713
|
-
},
|
|
1714
|
-
const { widget: t, label:
|
|
1761
|
+
}, _e = (e) => {
|
|
1762
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1715
1763
|
return {
|
|
1716
1764
|
widget: {
|
|
1717
1765
|
type: "separator",
|
|
1718
|
-
widgetName:
|
|
1766
|
+
widgetName: g(),
|
|
1719
1767
|
widgetNameAlias: "",
|
|
1720
1768
|
customCls: null,
|
|
1721
1769
|
enable: !0,
|
|
1722
1770
|
visible: !0,
|
|
1723
1771
|
allowBlank: !0,
|
|
1724
1772
|
...t,
|
|
1725
|
-
labelStyle:
|
|
1773
|
+
labelStyle: n
|
|
1726
1774
|
},
|
|
1727
|
-
label:
|
|
1775
|
+
label: n,
|
|
1728
1776
|
lineWidth: 12,
|
|
1729
1777
|
tab: null,
|
|
1730
|
-
...
|
|
1778
|
+
...r
|
|
1731
1779
|
};
|
|
1732
|
-
},
|
|
1733
|
-
const { widget: t, label:
|
|
1780
|
+
}, Ee = (e) => {
|
|
1781
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1734
1782
|
return {
|
|
1735
1783
|
widget: {
|
|
1736
1784
|
type: "combocheck",
|
|
1737
|
-
widgetName:
|
|
1785
|
+
widgetName: g(),
|
|
1738
1786
|
widgetNameAlias: "",
|
|
1739
1787
|
customCls: null,
|
|
1740
1788
|
height: 34,
|
|
@@ -1759,19 +1807,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1759
1807
|
//允许成员填写时添加新选项
|
|
1760
1808
|
allowAddLinkData: !1,
|
|
1761
1809
|
...t,
|
|
1762
|
-
labelStyle:
|
|
1810
|
+
labelStyle: n
|
|
1763
1811
|
},
|
|
1764
|
-
label:
|
|
1812
|
+
label: n,
|
|
1765
1813
|
lineWidth: 6,
|
|
1766
1814
|
tab: null,
|
|
1767
|
-
...
|
|
1815
|
+
...r
|
|
1768
1816
|
};
|
|
1769
|
-
},
|
|
1770
|
-
const { widget: t, label:
|
|
1817
|
+
}, xe = (e) => {
|
|
1818
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1771
1819
|
return {
|
|
1772
1820
|
widget: {
|
|
1773
1821
|
type: "location",
|
|
1774
|
-
widgetName:
|
|
1822
|
+
widgetName: g(),
|
|
1775
1823
|
widgetNameAlias: "",
|
|
1776
1824
|
customCls: null,
|
|
1777
1825
|
enable: !0,
|
|
@@ -1796,19 +1844,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1796
1844
|
enablePcLocation: !0,
|
|
1797
1845
|
//允许PC端定位并选择位置
|
|
1798
1846
|
...t,
|
|
1799
|
-
labelStyle:
|
|
1847
|
+
labelStyle: n
|
|
1800
1848
|
},
|
|
1801
|
-
label:
|
|
1849
|
+
label: n,
|
|
1802
1850
|
lineWidth: 6,
|
|
1803
1851
|
tab: null,
|
|
1804
|
-
...
|
|
1852
|
+
...r
|
|
1805
1853
|
};
|
|
1806
|
-
},
|
|
1807
|
-
const { widget: t, label:
|
|
1854
|
+
}, Me = (e) => {
|
|
1855
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
1808
1856
|
return {
|
|
1809
1857
|
widget: {
|
|
1810
1858
|
type: "textarea",
|
|
1811
|
-
widgetName:
|
|
1859
|
+
widgetName: g(),
|
|
1812
1860
|
widgetNameAlias: "",
|
|
1813
1861
|
triggerEvent: !1,
|
|
1814
1862
|
customCls: null,
|
|
@@ -1838,20 +1886,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1838
1886
|
maxLength: 5e3,
|
|
1839
1887
|
//限制输入最大字符数 不限制的话,整个maxLength不存在
|
|
1840
1888
|
...t,
|
|
1841
|
-
labelStyle:
|
|
1889
|
+
labelStyle: n
|
|
1842
1890
|
},
|
|
1843
1891
|
// description,
|
|
1844
|
-
label:
|
|
1892
|
+
label: n,
|
|
1845
1893
|
lineWidth: 6,
|
|
1846
1894
|
tab: null,
|
|
1847
|
-
...
|
|
1895
|
+
...r
|
|
1848
1896
|
};
|
|
1849
|
-
},
|
|
1850
|
-
const { widget: t, label:
|
|
1897
|
+
}, qe = (e = {}) => {
|
|
1898
|
+
const { widget: t, label: n, ...r } = e;
|
|
1851
1899
|
return {
|
|
1852
1900
|
widget: {
|
|
1853
1901
|
type: "button",
|
|
1854
|
-
widgetName:
|
|
1902
|
+
widgetName: g(),
|
|
1855
1903
|
widgetNameAlias: "",
|
|
1856
1904
|
triggerEvent: 0,
|
|
1857
1905
|
customCls: null,
|
|
@@ -1883,19 +1931,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1883
1931
|
tip: "请设置提示内容"
|
|
1884
1932
|
},
|
|
1885
1933
|
...t,
|
|
1886
|
-
labelStyle:
|
|
1934
|
+
labelStyle: n
|
|
1887
1935
|
},
|
|
1888
|
-
label:
|
|
1936
|
+
label: n,
|
|
1889
1937
|
lineWidth: 6,
|
|
1890
1938
|
tab: null,
|
|
1891
|
-
...
|
|
1939
|
+
...r
|
|
1892
1940
|
};
|
|
1893
|
-
},
|
|
1894
|
-
const { widget: t, label:
|
|
1941
|
+
}, Fe = (e = {}) => {
|
|
1942
|
+
const { widget: t, label: n, ...r } = e;
|
|
1895
1943
|
return {
|
|
1896
1944
|
widget: {
|
|
1897
1945
|
type: "address",
|
|
1898
|
-
widgetName:
|
|
1946
|
+
widgetName: g(),
|
|
1899
1947
|
widgetNameAlias: "",
|
|
1900
1948
|
customCls: null,
|
|
1901
1949
|
width: 720,
|
|
@@ -1917,25 +1965,25 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1917
1965
|
seleceMapAddress: !0,
|
|
1918
1966
|
//开启经纬度定位
|
|
1919
1967
|
...t,
|
|
1920
|
-
labelStyle:
|
|
1968
|
+
labelStyle: n
|
|
1921
1969
|
},
|
|
1922
|
-
label:
|
|
1970
|
+
label: n,
|
|
1923
1971
|
lineWidth: 6,
|
|
1924
1972
|
tab: null,
|
|
1925
|
-
...
|
|
1973
|
+
...r
|
|
1926
1974
|
};
|
|
1927
|
-
},
|
|
1928
|
-
const { widget: t, label:
|
|
1975
|
+
}, Re = (e = {}) => {
|
|
1976
|
+
const { widget: t, label: n, ...r } = e;
|
|
1929
1977
|
return {
|
|
1930
1978
|
widget: {
|
|
1931
1979
|
type: "subform",
|
|
1932
|
-
widgetName:
|
|
1980
|
+
widgetName: g(),
|
|
1933
1981
|
widgetNameAlias: "",
|
|
1934
1982
|
customCls: null,
|
|
1935
1983
|
enable: !0,
|
|
1936
1984
|
visible: !0,
|
|
1937
1985
|
allowBlank: !0,
|
|
1938
|
-
labelStyle:
|
|
1986
|
+
labelStyle: n,
|
|
1939
1987
|
extendSet: {
|
|
1940
1988
|
sort: ["datahelp", "module", "formEvent"],
|
|
1941
1989
|
status: !0,
|
|
@@ -1944,8 +1992,8 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
1944
1992
|
version: 1
|
|
1945
1993
|
},
|
|
1946
1994
|
items: (t.items || []).map((l, a) => {
|
|
1947
|
-
const i =
|
|
1948
|
-
return i.widget.widgetName =
|
|
1995
|
+
const i = $e(l, !0);
|
|
1996
|
+
return i.widget.widgetName = g("_widget", a), i;
|
|
1949
1997
|
}),
|
|
1950
1998
|
sortable: !0,
|
|
1951
1999
|
//启用子表单数据排序
|
|
@@ -2003,15 +2051,15 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
2003
2051
|
//从excel填报数据
|
|
2004
2052
|
},
|
|
2005
2053
|
description: null,
|
|
2006
|
-
label:
|
|
2054
|
+
label: n,
|
|
2007
2055
|
lineWidth: 12,
|
|
2008
2056
|
tab: null
|
|
2009
2057
|
};
|
|
2010
|
-
},
|
|
2011
|
-
const { widget: t, label:
|
|
2058
|
+
}, De = (e) => {
|
|
2059
|
+
const { widget: t, label: n, ...r } = e || {};
|
|
2012
2060
|
return {
|
|
2013
2061
|
widget: {
|
|
2014
|
-
widgetName:
|
|
2062
|
+
widgetName: g(),
|
|
2015
2063
|
widgetNameAlias: "",
|
|
2016
2064
|
customCls: null,
|
|
2017
2065
|
enable: !0,
|
|
@@ -2032,61 +2080,61 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
2032
2080
|
addExtendSet: [],
|
|
2033
2081
|
...t,
|
|
2034
2082
|
linkFields: [],
|
|
2035
|
-
labelStyle:
|
|
2083
|
+
labelStyle: n,
|
|
2036
2084
|
type: "linkquery"
|
|
2037
2085
|
},
|
|
2038
2086
|
description: null,
|
|
2039
|
-
label:
|
|
2087
|
+
label: n,
|
|
2040
2088
|
lineWidth: 6,
|
|
2041
2089
|
tab: null,
|
|
2042
|
-
...
|
|
2090
|
+
...r
|
|
2043
2091
|
};
|
|
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:
|
|
2092
|
+
}, Te = {
|
|
2093
|
+
address: Fe,
|
|
2094
|
+
button: qe,
|
|
2095
|
+
textarea: Me,
|
|
2096
|
+
datetime: ge,
|
|
2097
|
+
text: I,
|
|
2098
|
+
password: I,
|
|
2099
|
+
location: xe,
|
|
2100
|
+
radiogroup: P,
|
|
2101
|
+
radio: P,
|
|
2102
|
+
combo: ce,
|
|
2103
|
+
combocheck: Ee,
|
|
2104
|
+
separator: _e,
|
|
2105
|
+
checkboxgroup: Ce,
|
|
2106
|
+
upload: Ne,
|
|
2107
|
+
number: de,
|
|
2108
|
+
image: ke,
|
|
2109
|
+
signature: Ae,
|
|
2110
|
+
user: ve,
|
|
2111
|
+
dataload: Se,
|
|
2112
|
+
linkdata: ye,
|
|
2113
|
+
linkquery: De,
|
|
2114
|
+
usergroup: be,
|
|
2115
|
+
subform: Re,
|
|
2116
|
+
dept: pe,
|
|
2117
|
+
sn: fe,
|
|
2118
|
+
deptgroup: me,
|
|
2071
2119
|
flowState: w,
|
|
2072
2120
|
flowstate: w,
|
|
2073
2121
|
formula: w,
|
|
2074
2122
|
unknown: w
|
|
2075
|
-
},
|
|
2123
|
+
}, $e = (e, t = !1) => {
|
|
2076
2124
|
var a, i;
|
|
2077
2125
|
if (!e || !e.widget || !e.widget.type)
|
|
2078
2126
|
return e;
|
|
2079
|
-
const
|
|
2080
|
-
return t &&
|
|
2081
|
-
},
|
|
2082
|
-
var t,
|
|
2083
|
-
return !e || !((t = e.corp) != null && t.name) || !((
|
|
2084
|
-
},
|
|
2085
|
-
var
|
|
2127
|
+
const n = e.widget.type || "unknown";
|
|
2128
|
+
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 = X()), (Te[n] || w)(e));
|
|
2129
|
+
}, yt = (e) => {
|
|
2130
|
+
var t, n, r, l, a, i, o, s;
|
|
2131
|
+
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 : ""}`;
|
|
2132
|
+
}, ht = (e) => {
|
|
2133
|
+
var n;
|
|
2086
2134
|
if (!e)
|
|
2087
2135
|
return "";
|
|
2088
2136
|
const t = {
|
|
2089
|
-
corpId: (
|
|
2137
|
+
corpId: (n = e.corp) == null ? void 0 : n.id,
|
|
2090
2138
|
userId: e.user._id,
|
|
2091
2139
|
appName: e.appName,
|
|
2092
2140
|
appId: e.appId,
|
|
@@ -2096,55 +2144,57 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
|
|
|
2096
2144
|
};
|
|
2097
2145
|
try {
|
|
2098
2146
|
return JSON.stringify(t);
|
|
2099
|
-
} catch (
|
|
2100
|
-
return console.warn("getChatCtxForMcp error",
|
|
2147
|
+
} catch (r) {
|
|
2148
|
+
return console.warn("getChatCtxForMcp error", r), "";
|
|
2101
2149
|
}
|
|
2102
2150
|
};
|
|
2103
2151
|
export {
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2152
|
+
nt as DATA_COUNT_PER_BATCH,
|
|
2153
|
+
J as FIELD_TYPE_OPERATOR_LABEL_OVERRIDES,
|
|
2154
|
+
ee as FIELD_TYPE_OPERATOR_MAP,
|
|
2155
|
+
pt as FORM_ICON_UNICODE_MAP,
|
|
2156
|
+
je as GetLoadingMsg,
|
|
2157
|
+
Ue as GetPartErrMsg,
|
|
2158
|
+
Le as GetQueryResult,
|
|
2159
|
+
Ke as GetSafeFormStructure,
|
|
2160
|
+
se as ICON_UNICODE_MAP,
|
|
2161
|
+
j as IsErrorPart,
|
|
2162
|
+
Oe as IsFakeMsgPart,
|
|
2163
|
+
We as IsFileGroupPart,
|
|
2164
|
+
Ie as IsFilePart,
|
|
2165
|
+
Be as IsLoadingPart,
|
|
2166
|
+
Pe as IsQueryResultPart,
|
|
2167
|
+
Z as OPERATOR_LABEL_MAP,
|
|
2168
|
+
K as WHITE_LIST_FIELDS_SET,
|
|
2169
|
+
ct as bsConditionParse2Condition,
|
|
2170
|
+
dt as conditionStringify2bsCondition,
|
|
2171
|
+
Ze as createFieldPartsExtractor,
|
|
2172
|
+
Xe as createGetFieldJsonInfo,
|
|
2173
|
+
V as createPartTypeChecker,
|
|
2174
|
+
Ve as createPayloadTypeChecker,
|
|
2127
2175
|
y as extractTextPartMeta,
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2176
|
+
tt as field2config,
|
|
2177
|
+
W as flatArr,
|
|
2178
|
+
gt as formatLocalDate,
|
|
2179
|
+
lt as getAvailableOperators,
|
|
2180
|
+
yt as getChatCtxForHuman,
|
|
2181
|
+
ht as getChatCtxForMcp,
|
|
2182
|
+
it as getDefaultOperator,
|
|
2183
|
+
ft as getIconUnicode,
|
|
2184
|
+
He as getMetaErrorMsg,
|
|
2185
|
+
at as getOperatorLabel,
|
|
2186
|
+
et as hasValidFieldValue,
|
|
2187
|
+
rt as imageUrlToBase64,
|
|
2188
|
+
Qe as injectHostFontFacesIntoShadow,
|
|
2189
|
+
Ge as injectHostStylesIntoShadow,
|
|
2190
|
+
ut as isCtxMatch,
|
|
2191
|
+
st as isHelperCondMet,
|
|
2192
|
+
ot as isHelperPrefMet,
|
|
2193
|
+
mt as mergeConsecutiveTargets,
|
|
2194
|
+
bt as promptParser,
|
|
2195
|
+
$e as rebuildFieldsJsonStructure,
|
|
2196
|
+
Je as safeParseJson,
|
|
2197
|
+
ze as syncHostStylesIntoShadow,
|
|
2198
|
+
Ye as valueNormalizer
|
|
2149
2199
|
};
|
|
2150
2200
|
//# sourceMappingURL=ai-feat-utils.js.map
|