@skopon-cool/form-sdk 0.6.2 → 0.6.3
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/adapter/a2uiAdapter.d.ts.map +1 -1
- package/dist/adapter/formSchema.d.ts.map +1 -1
- package/dist/catalog/a2uiCustomCatalog.d.ts.map +1 -1
- package/dist/index.js +1242 -1226
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapter/a2uiAdapter.test.ts +12 -0
- package/src/adapter/a2uiAdapter.ts +8 -0
- package/src/adapter/formSchema.ts +6 -0
- package/src/catalog/a2uiCustomCatalog.tsx +19 -0
- package/src/catalog/fileUploadPreview.test.tsx +17 -0
- package/src/types/index.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import './form-sdk.css';
|
|
2
2
|
var fr = Object.defineProperty;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { jsx as u, jsxs as
|
|
6
|
-
import { useRef as
|
|
7
|
-
import { Spin as Rt, Button as qe, Typography as
|
|
8
|
-
import { ReloadOutlined as
|
|
9
|
-
import { createBinderlessComponentImplementation as
|
|
3
|
+
var hr = (e, t, n) => t in e ? fr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
+
var ae = (e, t, n) => hr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
|
+
import { jsx as u, jsxs as w } from "react/jsx-runtime";
|
|
6
|
+
import { useRef as _, useState as R, useCallback as V, useMemo as G, createContext as Ce, useContext as Ae, useEffect as z, useSyncExternalStore as gr, forwardRef as yr, useImperativeHandle as vr } from "react";
|
|
7
|
+
import { Spin as Rt, Button as qe, Typography as le, Avatar as Sr, Tag as Ee, Tooltip as Fe, Modal as br, Select as kt, Checkbox as Cr, Radio as Ar, Switch as kr, TimePicker as _r, DatePicker as Tr, Image as rn, Upload as pt, Input as ft, InputNumber as xr, ConfigProvider as Fr } from "antd";
|
|
8
|
+
import { ReloadOutlined as Cn, FileTextOutlined as An, UserOutlined as Ur, FileImageOutlined as Ir, CaretRightOutlined as Mr, FullscreenOutlined as Nr, FileExcelOutlined as Er, FileOutlined as kn, PictureOutlined as Rr, SoundOutlined as wr, VideoCameraOutlined as Pr } from "@ant-design/icons";
|
|
9
|
+
import { createBinderlessComponentImplementation as ce, basicCatalog as Ye, A2uiSurface as _n } from "@a2ui/react/v0_9";
|
|
10
10
|
import { z as g } from "zod";
|
|
11
|
-
import { Catalog as
|
|
12
|
-
import { injectBasicCatalogStyles as
|
|
13
|
-
import { injectStyles as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
11
|
+
import { Catalog as zr, MessageProcessor as Tn } from "@a2ui/web_core/v0_9";
|
|
12
|
+
import { injectBasicCatalogStyles as xn } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
13
|
+
import { injectStyles as Fn } from "@a2ui/react/styles";
|
|
14
|
+
import on from "dayjs";
|
|
15
|
+
const _a = "v0.9", Or = [
|
|
16
16
|
"huge",
|
|
17
17
|
"large",
|
|
18
18
|
"medium",
|
|
@@ -22,35 +22,35 @@ const ka = "v0.9", zr = [
|
|
|
22
22
|
function Re(e) {
|
|
23
23
|
return e === "image" || e === "video" || e === "audio";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function we(e) {
|
|
26
26
|
return e === "web";
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Un(e) {
|
|
29
29
|
return e === "heading" || e === "paragraph";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return !
|
|
33
|
-
}
|
|
34
|
-
function Un(e) {
|
|
35
|
-
return Fn(e) || Re(e) || Pe(e);
|
|
31
|
+
function ue(e) {
|
|
32
|
+
return !Un(e) && !Re(e) && !we(e);
|
|
36
33
|
}
|
|
37
34
|
function In(e) {
|
|
35
|
+
return Un(e) || Re(e) || we(e);
|
|
36
|
+
}
|
|
37
|
+
function Mn(e) {
|
|
38
38
|
return e === "select" || e === "multiselect" || e === "radio" || e === "checkbox";
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
40
|
+
function Ta(e) {
|
|
41
|
+
return ue(e) && e !== "file" && e !== "resume_multiselect" && e !== "case_multiselect";
|
|
42
42
|
}
|
|
43
|
-
const _t = 360,
|
|
43
|
+
const _t = 360, qr = 200, Lr = 1200;
|
|
44
44
|
function Le(e) {
|
|
45
45
|
if (e == null || e === "")
|
|
46
46
|
return _t;
|
|
47
47
|
const t = typeof e == "number" ? e : Number(e);
|
|
48
48
|
return Number.isFinite(t) ? Math.min(
|
|
49
|
-
|
|
50
|
-
Math.max(
|
|
49
|
+
Lr,
|
|
50
|
+
Math.max(qr, Math.floor(t))
|
|
51
51
|
) : _t;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Br(e) {
|
|
54
54
|
if (typeof e != "string") return !1;
|
|
55
55
|
const t = e.trim();
|
|
56
56
|
if (!t) return !1;
|
|
@@ -64,7 +64,7 @@ function Lr(e) {
|
|
|
64
64
|
return !1;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Dr() {
|
|
68
68
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
69
69
|
return crypto.randomUUID();
|
|
70
70
|
if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
|
|
@@ -78,11 +78,11 @@ function Br() {
|
|
|
78
78
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
const t =
|
|
81
|
+
function be(e) {
|
|
82
|
+
const t = Dr().replace(/-/g, "").slice(0, 8);
|
|
83
83
|
return `${e}${t}`;
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const Nn = [
|
|
86
86
|
{ value: "image/*", label: "图片" },
|
|
87
87
|
{ value: "video/*", label: "视频" },
|
|
88
88
|
{ value: "audio/*", label: "音频" },
|
|
@@ -93,7 +93,7 @@ const Mn = [
|
|
|
93
93
|
{ value: "text/plain", label: "纯文本" },
|
|
94
94
|
{ value: "application/zip", label: "ZIP 压缩包" },
|
|
95
95
|
{ value: "application/x-rar-compressed", label: "RAR 压缩包" }
|
|
96
|
-
],
|
|
96
|
+
], Vr = {
|
|
97
97
|
"image/*": ["image/*"],
|
|
98
98
|
"video/*": ["video/*"],
|
|
99
99
|
"audio/*": ["audio/*"],
|
|
@@ -113,7 +113,7 @@ const Mn = [
|
|
|
113
113
|
"text/plain": ["text/plain"],
|
|
114
114
|
"application/zip": ["application/zip"],
|
|
115
115
|
"application/x-rar-compressed": ["application/x-rar-compressed"]
|
|
116
|
-
},
|
|
116
|
+
}, $r = {
|
|
117
117
|
"image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
|
|
118
118
|
"video/*": [".mp4", ".mov", ".avi", ".webm"],
|
|
119
119
|
"audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
|
|
@@ -124,14 +124,14 @@ const Mn = [
|
|
|
124
124
|
"text/plain": [".txt"],
|
|
125
125
|
"application/zip": [".zip", ".7z"],
|
|
126
126
|
"application/x-rar-compressed": [".rar"]
|
|
127
|
-
},
|
|
127
|
+
}, jr = {
|
|
128
128
|
"application/msword": "office/word",
|
|
129
129
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
|
|
130
130
|
"application/vnd.ms-excel": "office/excel",
|
|
131
131
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "office/excel",
|
|
132
132
|
"application/vnd.ms-powerpoint": "office/ppt",
|
|
133
133
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "office/ppt"
|
|
134
|
-
},
|
|
134
|
+
}, wt = [
|
|
135
135
|
{ value: ".jpg", label: ".jpg" },
|
|
136
136
|
{ value: ".jpeg", label: ".jpeg" },
|
|
137
137
|
{ value: ".png", label: ".png" },
|
|
@@ -157,18 +157,18 @@ const Mn = [
|
|
|
157
157
|
{ value: ".zip", label: ".zip" },
|
|
158
158
|
{ value: ".rar", label: ".rar" },
|
|
159
159
|
{ value: ".7z", label: ".7z" }
|
|
160
|
-
],
|
|
161
|
-
|
|
162
|
-
),
|
|
163
|
-
|
|
164
|
-
),
|
|
165
|
-
|
|
160
|
+
], Hr = Object.fromEntries(
|
|
161
|
+
Nn.map((e) => [e.value, e.label])
|
|
162
|
+
), Kr = Object.fromEntries(
|
|
163
|
+
wt.map((e) => [e.value, e.label])
|
|
164
|
+
), Wr = new Set(Nn.map((e) => e.value)), Gr = new Set(
|
|
165
|
+
wt.map((e) => e.value)
|
|
166
166
|
);
|
|
167
|
-
function
|
|
167
|
+
function Jr(e) {
|
|
168
168
|
const t = e.trim();
|
|
169
|
-
return t ?
|
|
169
|
+
return t ? Wr.has(t) ? t : jr[t] ?? null : null;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Yr(e) {
|
|
172
172
|
return Array.isArray(e) ? e.map((t) => {
|
|
173
173
|
const n = t.trim().toLowerCase();
|
|
174
174
|
return n ? n.startsWith(".") ? n : `.${n}` : "";
|
|
@@ -178,80 +178,80 @@ function Be(e) {
|
|
|
178
178
|
if (!Array.isArray(e)) return [];
|
|
179
179
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
180
180
|
for (const r of e) {
|
|
181
|
-
const o =
|
|
181
|
+
const o = Jr(r);
|
|
182
182
|
o && !n.has(o) && (n.add(o), t.push(o));
|
|
183
183
|
}
|
|
184
184
|
return t;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function Qr(e) {
|
|
187
187
|
const t = Be(e), n = [];
|
|
188
188
|
for (const r of t)
|
|
189
|
-
n.push(...
|
|
189
|
+
n.push(...Vr[r] ?? [r]);
|
|
190
190
|
return n;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Xr(e) {
|
|
193
193
|
const t = Be(e);
|
|
194
194
|
if (t.length === 0) return [];
|
|
195
195
|
const n = /* @__PURE__ */ new Set();
|
|
196
196
|
for (const r of t)
|
|
197
|
-
for (const o of
|
|
197
|
+
for (const o of $r[r] ?? [])
|
|
198
198
|
n.add(o);
|
|
199
|
-
return
|
|
199
|
+
return wt.filter((r) => n.has(r.value));
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
const n =
|
|
201
|
+
function Pt(e, t) {
|
|
202
|
+
const n = Yr(t), r = Be(e);
|
|
203
203
|
if (r.length === 0)
|
|
204
|
-
return n.filter((i) =>
|
|
204
|
+
return n.filter((i) => Gr.has(i));
|
|
205
205
|
const o = new Set(
|
|
206
|
-
|
|
206
|
+
Xr(r).map((i) => i.value)
|
|
207
207
|
);
|
|
208
208
|
return n.filter((i) => o.has(i));
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
const n =
|
|
210
|
+
function Zr(e, t) {
|
|
211
|
+
const n = Qr(e), r = Pt(e, t), o = [...n, ...r];
|
|
212
212
|
return o.length > 0 ? o.join(",") : void 0;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const n = Be(e), r =
|
|
214
|
+
function eo(e, t) {
|
|
215
|
+
const n = Be(e), r = Pt(
|
|
216
216
|
n,
|
|
217
217
|
t
|
|
218
218
|
), o = [
|
|
219
|
-
...n.map((i) =>
|
|
220
|
-
...r.map((i) =>
|
|
219
|
+
...n.map((i) => Hr[i] ?? i),
|
|
220
|
+
...r.map((i) => Kr[i] ?? i)
|
|
221
221
|
];
|
|
222
222
|
return o.length === 0 ? null : o.join("、");
|
|
223
223
|
}
|
|
224
|
-
const
|
|
224
|
+
const to = [
|
|
225
225
|
"video",
|
|
226
226
|
"audio",
|
|
227
227
|
"image",
|
|
228
228
|
"file",
|
|
229
229
|
"spreadsheet",
|
|
230
230
|
"document"
|
|
231
|
-
],
|
|
232
|
-
function
|
|
233
|
-
return e &&
|
|
231
|
+
], no = new Set(to);
|
|
232
|
+
function ro(e) {
|
|
233
|
+
return e && no.has(e) ? e : "file";
|
|
234
234
|
}
|
|
235
235
|
function De(e) {
|
|
236
|
-
return typeof e == "string" &&
|
|
236
|
+
return typeof e == "string" && Or.includes(e) ? e : "medium";
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function oo(e, t) {
|
|
239
239
|
var o;
|
|
240
240
|
const n = Math.max(1, t);
|
|
241
241
|
let r = [];
|
|
242
242
|
return Array.isArray(e.mediaUrls) ? r = e.mediaUrls.map((i) => String(i).trim()) : (o = e.mediaUrl) != null && o.trim() && (r = [e.mediaUrl.trim()]), r.length === 0 ? [""] : r.slice(0, n);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function io(e) {
|
|
245
245
|
var t;
|
|
246
246
|
return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function so(e) {
|
|
249
249
|
return `form-media-size-${De(e)}`;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
return `form-media-preview form-media-list ${
|
|
251
|
+
function ao(e) {
|
|
252
|
+
return `form-media-preview form-media-list ${so(e)}`;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function sn(e) {
|
|
255
255
|
if (typeof e == "number")
|
|
256
256
|
return Number.isFinite(e) ? String(e) : void 0;
|
|
257
257
|
if (typeof e != "string") return;
|
|
@@ -264,16 +264,16 @@ function ye(e) {
|
|
|
264
264
|
const t = [];
|
|
265
265
|
for (const n of e) {
|
|
266
266
|
if (!n || typeof n != "object" || Array.isArray(n)) continue;
|
|
267
|
-
const r = n, o =
|
|
267
|
+
const r = n, o = sn(r.value), i = sn(r.label);
|
|
268
268
|
o === void 0 || i === void 0 || t.push({ value: o, label: i });
|
|
269
269
|
}
|
|
270
270
|
return t;
|
|
271
271
|
}
|
|
272
272
|
function ke(e) {
|
|
273
|
-
return !
|
|
273
|
+
return !Mn(e.type) || ye(e.options).length > 0;
|
|
274
274
|
}
|
|
275
|
-
const
|
|
276
|
-
function
|
|
275
|
+
const lo = 10;
|
|
276
|
+
function En(e) {
|
|
277
277
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
278
278
|
}
|
|
279
279
|
function Ve(e) {
|
|
@@ -287,10 +287,10 @@ function Te(e, t = 1) {
|
|
|
287
287
|
const n = typeof e == "number" ? e : Number(e);
|
|
288
288
|
return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Rn(e, t) {
|
|
291
291
|
return t == null ? void 0 : e === "toggle" ? Ve(t) : e === "multiselect" || e === "checkbox" || e === "file" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String).map((o) => o.trim()).filter(Boolean) : typeof t == "string" && t.trim() ? [t.trim()] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t).trim() || void 0;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function co(e) {
|
|
294
294
|
if (Array.isArray(e)) return e.map(String).filter(Boolean);
|
|
295
295
|
if (typeof e == "string" && e.trim())
|
|
296
296
|
try {
|
|
@@ -300,11 +300,11 @@ function lo(e) {
|
|
|
300
300
|
}
|
|
301
301
|
return [];
|
|
302
302
|
}
|
|
303
|
-
function
|
|
304
|
-
const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, s = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, a =
|
|
303
|
+
function uo(e) {
|
|
304
|
+
const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, s = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, a = co(e == null ? void 0 : e.flowUniqueIds);
|
|
305
305
|
return { agentKind: r, agentUniqueId: o, flowType: i, category: s, flowUniqueIds: a, pageSize: n };
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function mo(e) {
|
|
308
308
|
const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0;
|
|
309
309
|
return {
|
|
310
310
|
names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
|
|
@@ -315,14 +315,14 @@ function uo(e) {
|
|
|
315
315
|
pageSize: n
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
const
|
|
319
|
-
function
|
|
318
|
+
const wn = "content-production", Pn = 5;
|
|
319
|
+
function po(e) {
|
|
320
320
|
const t = typeof e == "number" ? e : Number(e);
|
|
321
321
|
return !Number.isFinite(t) || t < 1 ? Pn : Math.min(100, Math.floor(t));
|
|
322
322
|
}
|
|
323
323
|
function fo(e) {
|
|
324
324
|
var s, a;
|
|
325
|
-
const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = ((s = e == null ? void 0 : e.flowType) == null ? void 0 : s.trim()) ||
|
|
325
|
+
const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = ((s = e == null ? void 0 : e.flowType) == null ? void 0 : s.trim()) || wn, o = ((a = e == null ? void 0 : e.category) == null ? void 0 : a.trim()) || void 0, i = (e == null ? void 0 : e.tagMatch) === "any" ? "any" : "all";
|
|
326
326
|
return {
|
|
327
327
|
flowType: r,
|
|
328
328
|
...o ? { category: o } : {},
|
|
@@ -331,40 +331,44 @@ function fo(e) {
|
|
|
331
331
|
pageSize: n
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function ho(e) {
|
|
335
335
|
if (e.type !== "case_singleselect") return e;
|
|
336
336
|
const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
|
|
337
337
|
return { ...e, type: "case_multiselect", defaultValue: t };
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
var o, i, s, a, l;
|
|
341
|
-
const t =
|
|
339
|
+
function go(e) {
|
|
340
|
+
var o, i, s, a, l, c;
|
|
341
|
+
const t = ho(e), n = Be(t.fileAcceptTypes), r = t.type;
|
|
342
342
|
return {
|
|
343
|
-
id: ((o = t.id) == null ? void 0 : o.trim()) ||
|
|
343
|
+
id: ((o = t.id) == null ? void 0 : o.trim()) || be("block-"),
|
|
344
344
|
type: r,
|
|
345
345
|
name: ((i = t.name) == null ? void 0 : i.trim()) || void 0,
|
|
346
346
|
label: t.label ?? "",
|
|
347
347
|
placeholder: t.placeholder ?? "",
|
|
348
348
|
help: t.help ?? "",
|
|
349
349
|
required: t.required === !0,
|
|
350
|
-
mediaUrls: Re(r) ?
|
|
350
|
+
mediaUrls: Re(r) ? oo(t, lo) : void 0,
|
|
351
351
|
mediaSize: Re(r) ? De(t.mediaSize) : void 0,
|
|
352
|
-
webUrl:
|
|
353
|
-
webHeight:
|
|
352
|
+
webUrl: we(r) ? ((s = t.webUrl) == null ? void 0 : s.trim()) ?? "" : void 0,
|
|
353
|
+
webHeight: we(r) ? Le(t.webHeight) : void 0,
|
|
354
354
|
fileAcceptTypes: n,
|
|
355
|
-
fileAcceptExtensions:
|
|
355
|
+
fileAcceptExtensions: Pt(
|
|
356
356
|
n,
|
|
357
357
|
t.fileAcceptExtensions
|
|
358
358
|
),
|
|
359
|
-
filePlaceholderIcon:
|
|
359
|
+
filePlaceholderIcon: ro(t.filePlaceholderIcon),
|
|
360
360
|
fileMinCount: r === "file" ? Qe(t.fileMinCount, 1) : void 0,
|
|
361
361
|
fileMaxCount: r === "file" ? Qe(t.fileMaxCount, 1) : void 0,
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
fileExampleUrls: r === "file" && Array.isArray(t.fileExampleUrls) ? [...new Set(t.fileExampleUrls.filter(
|
|
363
|
+
(m) => typeof m == "string" && /^https?:\/\//i.test(m.trim())
|
|
364
|
+
).map((m) => m.trim()))] : void 0,
|
|
365
|
+
fileReviewCriteria: r === "file" ? ((a = t.fileReviewCriteria) == null ? void 0 : a.trim()) ?? "" : void 0,
|
|
366
|
+
defaultValue: Rn(r, t.defaultValue),
|
|
367
|
+
jsonSchemaDescription: ((l = t.jsonSchemaDescription) == null ? void 0 : l.trim()) ?? "",
|
|
364
368
|
hidden: r === "text" ? t.hidden === !0 : void 0,
|
|
365
369
|
needLLM: t.needLLM === !0 ? !0 : void 0,
|
|
366
370
|
options: Array.isArray(t.options) ? ye(t.options) : void 0,
|
|
367
|
-
condition: (
|
|
371
|
+
condition: (c = t.condition) != null && c.fieldName ? {
|
|
368
372
|
fieldName: t.condition.fieldName.trim(),
|
|
369
373
|
operator: t.condition.operator ?? "eq",
|
|
370
374
|
value: t.condition.value
|
|
@@ -373,29 +377,29 @@ function ho(e) {
|
|
|
373
377
|
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? Te(t.resumeMinCount, 1) : void 0,
|
|
374
378
|
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? Te(t.resumeMaxCount, 1) : void 0,
|
|
375
379
|
resumeDisplayMode: r === "resume_multiselect" ? t.resumeDisplayMode === "content-only" ? "content-only" : "profile-content" : void 0,
|
|
376
|
-
resumeDisplayCount: r === "resume_multiselect" ?
|
|
377
|
-
resumeFilter: r === "resume_multiselect" ?
|
|
380
|
+
resumeDisplayCount: r === "resume_multiselect" ? po(t.resumeDisplayCount) : void 0,
|
|
381
|
+
resumeFilter: r === "resume_multiselect" ? mo(t.resumeFilter) : void 0,
|
|
378
382
|
contentFilter: r === "resume_multiselect" ? fo(t.contentFilter) : void 0,
|
|
379
383
|
caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
|
|
380
384
|
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? Te(t.caseMinCount, 1) : void 0,
|
|
381
385
|
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? Te(t.caseMaxCount, 1) : void 0,
|
|
382
|
-
caseFilter: r === "case_multiselect" ?
|
|
386
|
+
caseFilter: r === "case_multiselect" ? uo(t.caseFilter) : void 0
|
|
383
387
|
};
|
|
384
388
|
}
|
|
385
|
-
function
|
|
389
|
+
function yo(e) {
|
|
386
390
|
return new Set(ye(e.options).map((t) => t.value));
|
|
387
391
|
}
|
|
388
|
-
function
|
|
392
|
+
function an(e, t) {
|
|
389
393
|
const n = {
|
|
390
394
|
type: "array",
|
|
391
395
|
items: { type: "string" }
|
|
392
396
|
};
|
|
393
397
|
return e !== void 0 && (n.minItems = Te(e, 1)), t !== void 0 && (n.maxItems = Te(t, 1)), n;
|
|
394
398
|
}
|
|
395
|
-
function
|
|
396
|
-
const t =
|
|
399
|
+
function vo(e) {
|
|
400
|
+
const t = Rn(e.type, e.defaultValue);
|
|
397
401
|
if (t === void 0) return;
|
|
398
|
-
const n =
|
|
402
|
+
const n = yo(e);
|
|
399
403
|
switch (e.type) {
|
|
400
404
|
case "toggle":
|
|
401
405
|
return t;
|
|
@@ -426,9 +430,9 @@ function yo(e) {
|
|
|
426
430
|
return t;
|
|
427
431
|
}
|
|
428
432
|
}
|
|
429
|
-
function
|
|
433
|
+
function So(e) {
|
|
430
434
|
var i, s;
|
|
431
|
-
if (!((i = e.name) == null ? void 0 : i.trim()) || !
|
|
435
|
+
if (!((i = e.name) == null ? void 0 : i.trim()) || !ue(e.type)) return null;
|
|
432
436
|
let n;
|
|
433
437
|
switch (e.type) {
|
|
434
438
|
case "number":
|
|
@@ -464,10 +468,10 @@ function vo(e) {
|
|
|
464
468
|
break;
|
|
465
469
|
}
|
|
466
470
|
case "resume_multiselect":
|
|
467
|
-
n =
|
|
471
|
+
n = an(e.resumeMinCount, e.resumeMaxCount);
|
|
468
472
|
break;
|
|
469
473
|
case "case_multiselect":
|
|
470
|
-
n =
|
|
474
|
+
n = an(e.caseMinCount, e.caseMaxCount);
|
|
471
475
|
break;
|
|
472
476
|
case "text":
|
|
473
477
|
n = { type: "string" }, e.hidden && (n["x-hidden"] = !0);
|
|
@@ -478,7 +482,7 @@ function vo(e) {
|
|
|
478
482
|
}
|
|
479
483
|
const r = (s = e.jsonSchemaDescription) == null ? void 0 : s.trim();
|
|
480
484
|
r && (n.$comment = r);
|
|
481
|
-
const o =
|
|
485
|
+
const o = vo(e);
|
|
482
486
|
return o !== void 0 && (n.default = o), n;
|
|
483
487
|
}
|
|
484
488
|
function bo(e, t, n) {
|
|
@@ -486,8 +490,8 @@ function bo(e, t, n) {
|
|
|
486
490
|
const r = {}, o = [];
|
|
487
491
|
for (const c of e) {
|
|
488
492
|
const m = (l = c.name) == null ? void 0 : l.trim();
|
|
489
|
-
if (!m || !
|
|
490
|
-
const d =
|
|
493
|
+
if (!m || !ue(c.type) || !ke(c)) continue;
|
|
494
|
+
const d = So(c);
|
|
491
495
|
d && (r[m] = d, c.required && o.push(m));
|
|
492
496
|
}
|
|
493
497
|
const i = {
|
|
@@ -498,7 +502,7 @@ function bo(e, t, n) {
|
|
|
498
502
|
}, s = t == null ? void 0 : t.trim(), a = n == null ? void 0 : n.trim();
|
|
499
503
|
return s && (i.title = s), a && (i.description = a), i;
|
|
500
504
|
}
|
|
501
|
-
function
|
|
505
|
+
function Pe(e) {
|
|
502
506
|
const t = e.title ?? "", n = e.description ?? "";
|
|
503
507
|
return {
|
|
504
508
|
title: t,
|
|
@@ -509,28 +513,28 @@ function we(e) {
|
|
|
509
513
|
}
|
|
510
514
|
function tt(e) {
|
|
511
515
|
if (!e || !Array.isArray(e.blocks))
|
|
512
|
-
return
|
|
513
|
-
const t = e.blocks.map(
|
|
514
|
-
return
|
|
516
|
+
return Pe({ title: "", description: "", blocks: [] });
|
|
517
|
+
const t = e.blocks.map(go);
|
|
518
|
+
return Pe({
|
|
515
519
|
title: typeof e.title == "string" ? e.title : "",
|
|
516
520
|
description: typeof e.description == "string" ? e.description : "",
|
|
517
521
|
blocks: t
|
|
518
522
|
});
|
|
519
523
|
}
|
|
520
|
-
function
|
|
521
|
-
return
|
|
524
|
+
function xa() {
|
|
525
|
+
return Pe({ title: "", description: "", blocks: [] });
|
|
522
526
|
}
|
|
523
|
-
function
|
|
527
|
+
function Fa(e) {
|
|
524
528
|
const t = {
|
|
525
|
-
id:
|
|
529
|
+
id: be("block-"),
|
|
526
530
|
type: e,
|
|
527
531
|
label: e
|
|
528
532
|
};
|
|
529
|
-
return
|
|
533
|
+
return ue(e) && (t.label = "", t.name = be("field_"), t.placeholder = "", t.required = !1), Re(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), we(e) && (t.label = "", t.help = "", t.webUrl = "", t.webHeight = _t), Mn(e) && (t.options = [
|
|
530
534
|
{ value: "option_1", label: "选项 1" },
|
|
531
535
|
{ value: "option_2", label: "选项 2" }
|
|
532
536
|
]), e === "file" && (t.fileAcceptTypes = [], t.fileAcceptExtensions = [], t.filePlaceholderIcon = "file", t.fileMinCount = 1, t.fileMaxCount = 1), e === "resume_multiselect" && (t.resumeEnableRefresh = !0, t.resumeMinCount = 1, t.resumeMaxCount = 1, t.resumeDisplayCount = Pn, t.contentFilter = {
|
|
533
|
-
flowType:
|
|
537
|
+
flowType: wn,
|
|
534
538
|
tagUniqueIds: [],
|
|
535
539
|
pageSize: 20
|
|
536
540
|
}, t.resumeFilter = {
|
|
@@ -541,7 +545,7 @@ function xa(e) {
|
|
|
541
545
|
pageSize: 20
|
|
542
546
|
}, t.defaultValue = []), e === "case_multiselect" && (t.caseEnableRefresh = !0, t.caseMinCount = 1, t.caseMaxCount = 1, t.caseFilter = { flowUniqueIds: [], pageSize: 20 }, t.defaultValue = []), t;
|
|
543
547
|
}
|
|
544
|
-
function
|
|
548
|
+
function Co(e) {
|
|
545
549
|
const t = typeof e.pageSize == "number" ? e.pageSize : Number(e.pageSize), n = typeof e.agentKind == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, r = typeof e.agentUniqueId == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, o = typeof e.flowType == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, i = typeof e.category == "string" && e.category.trim() ? e.category.trim() : void 0, s = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
|
|
546
550
|
return {
|
|
547
551
|
agentKind: n,
|
|
@@ -552,13 +556,13 @@ function So(e) {
|
|
|
552
556
|
pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
|
|
553
557
|
};
|
|
554
558
|
}
|
|
555
|
-
function
|
|
559
|
+
function ln(e) {
|
|
556
560
|
if (e == null) return;
|
|
557
561
|
const t = typeof e == "number" ? e : Number(e);
|
|
558
562
|
if (!(!Number.isFinite(t) || t < 1))
|
|
559
563
|
return Math.floor(t);
|
|
560
564
|
}
|
|
561
|
-
function
|
|
565
|
+
function Ao(e, t) {
|
|
562
566
|
var s, a, l, c, m, d;
|
|
563
567
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
564
568
|
return i({
|
|
@@ -581,7 +585,7 @@ function Co(e, t) {
|
|
|
581
585
|
value: { path: o }
|
|
582
586
|
});
|
|
583
587
|
}
|
|
584
|
-
function
|
|
588
|
+
function ko(e, t, n) {
|
|
585
589
|
const r = n.nameFromValue(e.value), o = {
|
|
586
590
|
...t("case_multiselect"),
|
|
587
591
|
name: r,
|
|
@@ -589,23 +593,23 @@ function Ao(e, t, n) {
|
|
|
589
593
|
}, i = n.asLiteral(e.placeholder);
|
|
590
594
|
i && (o.placeholder = i);
|
|
591
595
|
const s = n.asLiteral(e.help);
|
|
592
|
-
s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter =
|
|
593
|
-
const a =
|
|
596
|
+
s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = Co(e.caseFilter));
|
|
597
|
+
const a = ln(e.minCount);
|
|
594
598
|
a !== void 0 && (o.caseMinCount = a);
|
|
595
|
-
const l =
|
|
599
|
+
const l = ln(e.maxCount);
|
|
596
600
|
return l !== void 0 && (o.caseMaxCount = l), o;
|
|
597
601
|
}
|
|
598
|
-
const
|
|
602
|
+
const zn = Ce(
|
|
599
603
|
null
|
|
600
604
|
);
|
|
601
|
-
function
|
|
605
|
+
function _o(e) {
|
|
602
606
|
try {
|
|
603
607
|
return JSON.stringify(e);
|
|
604
608
|
} catch {
|
|
605
609
|
return String(e.length);
|
|
606
610
|
}
|
|
607
611
|
}
|
|
608
|
-
const
|
|
612
|
+
const To = {
|
|
609
613
|
publishLiveOptions: () => {
|
|
610
614
|
},
|
|
611
615
|
liveOptions: /* @__PURE__ */ new Map(),
|
|
@@ -614,23 +618,23 @@ const _o = {
|
|
|
614
618
|
clearPendingChangeFields: () => {
|
|
615
619
|
}
|
|
616
620
|
};
|
|
617
|
-
function
|
|
618
|
-
const t =
|
|
621
|
+
function xo({ children: e }) {
|
|
622
|
+
const t = _(/* @__PURE__ */ new Map()), n = _(/* @__PURE__ */ new Map()), r = _([]), [o, i] = R(0), [s, a] = R(() => /* @__PURE__ */ new Map()), [l, c] = R(
|
|
619
623
|
[]
|
|
620
624
|
), m = V(
|
|
621
|
-
(
|
|
622
|
-
const
|
|
623
|
-
if (!
|
|
624
|
-
const
|
|
625
|
-
value: String(
|
|
626
|
-
label: String(
|
|
627
|
-
})),
|
|
628
|
-
n.current.get(
|
|
625
|
+
(p, b) => {
|
|
626
|
+
const y = p.trim();
|
|
627
|
+
if (!y) return;
|
|
628
|
+
const C = b.map((f) => ({
|
|
629
|
+
value: String(f.value ?? ""),
|
|
630
|
+
label: String(f.label ?? f.value ?? "")
|
|
631
|
+
})), A = _o(C);
|
|
632
|
+
n.current.get(y) !== A && (n.current.set(y, A), t.current.set(y, C), r.current.includes(y) || (r.current = [...r.current, y]), a(new Map(t.current)), c(r.current), i((f) => f + 1));
|
|
629
633
|
},
|
|
630
634
|
[]
|
|
631
635
|
), d = V(() => {
|
|
632
636
|
r.current = [], c([]);
|
|
633
|
-
}, []),
|
|
637
|
+
}, []), v = G(
|
|
634
638
|
() => ({
|
|
635
639
|
publishLiveOptions: m,
|
|
636
640
|
liveOptions: s,
|
|
@@ -646,26 +650,26 @@ function To({ children: e }) {
|
|
|
646
650
|
d
|
|
647
651
|
]
|
|
648
652
|
);
|
|
649
|
-
return /* @__PURE__ */ u(
|
|
653
|
+
return /* @__PURE__ */ u(zn.Provider, { value: v, children: e });
|
|
650
654
|
}
|
|
651
655
|
function zt() {
|
|
652
|
-
return Ae(
|
|
656
|
+
return Ae(zn) ?? To;
|
|
653
657
|
}
|
|
654
|
-
const
|
|
658
|
+
const On = Ce({ interactive: !0 });
|
|
655
659
|
function Tt({
|
|
656
660
|
interactive: e,
|
|
657
661
|
children: t
|
|
658
662
|
}) {
|
|
659
|
-
return /* @__PURE__ */ u(
|
|
663
|
+
return /* @__PURE__ */ u(On.Provider, { value: { interactive: e }, children: t });
|
|
660
664
|
}
|
|
661
665
|
function ve() {
|
|
662
|
-
return Ae(
|
|
666
|
+
return Ae(On);
|
|
663
667
|
}
|
|
664
|
-
const
|
|
665
|
-
function
|
|
668
|
+
const qn = Ce(null);
|
|
669
|
+
function Fo(e) {
|
|
666
670
|
return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
|
|
667
671
|
}
|
|
668
|
-
const
|
|
672
|
+
const Uo = {
|
|
669
673
|
reportEvent: () => {
|
|
670
674
|
},
|
|
671
675
|
reportData: () => {
|
|
@@ -673,7 +677,7 @@ const Fo = {
|
|
|
673
677
|
runAutoControl: (e) => e(),
|
|
674
678
|
isAutoControl: () => !1
|
|
675
679
|
};
|
|
676
|
-
function
|
|
680
|
+
function Io(e) {
|
|
677
681
|
const t = {};
|
|
678
682
|
for (const [n, r] of Object.entries(e.form_values ?? {}))
|
|
679
683
|
r !== void 0 && (t[n] = r);
|
|
@@ -683,11 +687,11 @@ function Uo(e) {
|
|
|
683
687
|
form_change: Array.isArray(e.form_change) ? [...e.form_change] : []
|
|
684
688
|
};
|
|
685
689
|
}
|
|
686
|
-
function
|
|
690
|
+
function Mo({
|
|
687
691
|
client: e,
|
|
688
692
|
children: t
|
|
689
693
|
}) {
|
|
690
|
-
const n =
|
|
694
|
+
const n = _(0), r = _(e);
|
|
691
695
|
r.current = e;
|
|
692
696
|
const o = V((c) => {
|
|
693
697
|
const m = r.current;
|
|
@@ -697,11 +701,11 @@ function Io({
|
|
|
697
701
|
component: c.component
|
|
698
702
|
};
|
|
699
703
|
c.field !== void 0 && (d.field = c.field), c.value !== void 0 && (d.value = c.value);
|
|
700
|
-
const
|
|
701
|
-
m.send(
|
|
704
|
+
const v = n.current > 0 ? "form_auto_control_bac_event" : "form_runtime_event";
|
|
705
|
+
m.send(v, d);
|
|
702
706
|
}, []), i = V((c) => {
|
|
703
707
|
const m = r.current;
|
|
704
|
-
m && m.send("form_runtime_data",
|
|
708
|
+
m && m.send("form_runtime_data", Io(c));
|
|
705
709
|
}, []), s = V((c) => {
|
|
706
710
|
n.current += 1;
|
|
707
711
|
let m;
|
|
@@ -710,13 +714,13 @@ function Io({
|
|
|
710
714
|
} catch (d) {
|
|
711
715
|
throw n.current = Math.max(0, n.current - 1), d;
|
|
712
716
|
}
|
|
713
|
-
return
|
|
717
|
+
return Fo(m) ? Promise.resolve(m).finally(() => {
|
|
714
718
|
n.current = Math.max(0, n.current - 1);
|
|
715
719
|
}) : (n.current = Math.max(0, n.current - 1), m);
|
|
716
720
|
}, []), a = V(
|
|
717
721
|
() => n.current > 0,
|
|
718
722
|
[]
|
|
719
|
-
), l =
|
|
723
|
+
), l = G(
|
|
720
724
|
() => ({
|
|
721
725
|
reportEvent: o,
|
|
722
726
|
reportData: i,
|
|
@@ -725,83 +729,83 @@ function Io({
|
|
|
725
729
|
}),
|
|
726
730
|
[o, i, s, a]
|
|
727
731
|
);
|
|
728
|
-
return /* @__PURE__ */ u(
|
|
732
|
+
return /* @__PURE__ */ u(qn.Provider, { value: l, children: t });
|
|
729
733
|
}
|
|
730
|
-
function
|
|
731
|
-
return Ae(
|
|
734
|
+
function Ln() {
|
|
735
|
+
return Ae(qn) ?? Uo;
|
|
732
736
|
}
|
|
733
|
-
const
|
|
734
|
-
function
|
|
737
|
+
const No = 300;
|
|
738
|
+
function Eo(e) {
|
|
735
739
|
return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
|
|
736
740
|
}
|
|
737
|
-
function
|
|
741
|
+
function Ro(e) {
|
|
738
742
|
if (!e) return;
|
|
739
743
|
const t = e.trim();
|
|
740
744
|
if (t)
|
|
741
745
|
return t.startsWith("/") ? t.slice(1) : t;
|
|
742
746
|
}
|
|
743
|
-
function
|
|
744
|
-
const o = e.componentModel.properties[t], i =
|
|
747
|
+
function Se(e, t = "value", n = {}) {
|
|
748
|
+
const o = e.componentModel.properties[t], i = Eo(o), s = Ro(i), a = Ln(), {
|
|
745
749
|
component: l = "Unknown",
|
|
746
750
|
changeAction: c = "change",
|
|
747
751
|
debounceChange: m = !1
|
|
748
|
-
} = n, d =
|
|
752
|
+
} = n, d = _(null), v = _(void 0), p = _(!1), b = _(a);
|
|
749
753
|
b.current = a;
|
|
750
|
-
const
|
|
751
|
-
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
d.current != null && (clearTimeout(d.current), d.current = null),
|
|
757
|
-
action:
|
|
758
|
-
component:
|
|
759
|
-
field:
|
|
760
|
-
value:
|
|
754
|
+
const y = _(c);
|
|
755
|
+
y.current = c;
|
|
756
|
+
const C = _(l);
|
|
757
|
+
C.current = l;
|
|
758
|
+
const A = _(s);
|
|
759
|
+
A.current = s, z(() => () => {
|
|
760
|
+
d.current != null && (clearTimeout(d.current), d.current = null), p.current && A.current && (p.current = !1, b.current.reportEvent({
|
|
761
|
+
action: y.current,
|
|
762
|
+
component: C.current,
|
|
763
|
+
field: A.current,
|
|
764
|
+
value: v.current
|
|
761
765
|
}));
|
|
762
766
|
}, []);
|
|
763
|
-
const
|
|
764
|
-
(
|
|
767
|
+
const f = V(
|
|
768
|
+
(O) => {
|
|
765
769
|
if (!i || o === void 0) return () => {
|
|
766
770
|
};
|
|
767
|
-
const K = e.dataContext.subscribeDynamicValue(o, () =>
|
|
771
|
+
const K = e.dataContext.subscribeDynamicValue(o, () => O());
|
|
768
772
|
return () => K.unsubscribe();
|
|
769
773
|
},
|
|
770
774
|
[e, o, i]
|
|
771
|
-
),
|
|
775
|
+
), S = V(() => {
|
|
772
776
|
if (!(!i || o === void 0))
|
|
773
777
|
return e.dataContext.resolveDynamicValue(o);
|
|
774
|
-
}, [e, o, i]),
|
|
775
|
-
(
|
|
778
|
+
}, [e, o, i]), I = gr(f, S, S), E = V(
|
|
779
|
+
(O) => {
|
|
776
780
|
if (!s) return;
|
|
777
781
|
const K = () => {
|
|
778
|
-
|
|
782
|
+
p.current = !1, b.current.reportEvent({
|
|
779
783
|
action: c,
|
|
780
784
|
component: l,
|
|
781
785
|
field: s,
|
|
782
|
-
value:
|
|
786
|
+
value: O
|
|
783
787
|
});
|
|
784
788
|
};
|
|
785
789
|
if (!m) {
|
|
786
790
|
K();
|
|
787
791
|
return;
|
|
788
792
|
}
|
|
789
|
-
|
|
793
|
+
v.current = O, p.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
790
794
|
d.current = null, K();
|
|
791
|
-
},
|
|
795
|
+
}, No);
|
|
792
796
|
},
|
|
793
797
|
[s, c, l, m]
|
|
794
|
-
),
|
|
795
|
-
(
|
|
796
|
-
!i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path),
|
|
798
|
+
), F = V(
|
|
799
|
+
(O) => {
|
|
800
|
+
!i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), O);
|
|
797
801
|
},
|
|
798
802
|
[e, o, i]
|
|
799
|
-
),
|
|
800
|
-
(
|
|
801
|
-
|
|
803
|
+
), U = V(
|
|
804
|
+
(O) => {
|
|
805
|
+
F(O), E(O);
|
|
802
806
|
},
|
|
803
|
-
[
|
|
804
|
-
),
|
|
807
|
+
[F, E]
|
|
808
|
+
), B = V(() => {
|
|
805
809
|
s && b.current.reportEvent({
|
|
806
810
|
action: "focus",
|
|
807
811
|
component: l,
|
|
@@ -809,24 +813,24 @@ function be(e, t = "value", n = {}) {
|
|
|
809
813
|
});
|
|
810
814
|
}, [s, l]);
|
|
811
815
|
return {
|
|
812
|
-
value:
|
|
813
|
-
setValue:
|
|
816
|
+
value: I,
|
|
817
|
+
setValue: U,
|
|
814
818
|
/** 写入 dataModel 但不上报(用于模式切换规范化等内部同步) */
|
|
815
|
-
setValueSilent:
|
|
819
|
+
setValueSilent: F,
|
|
816
820
|
hasBinding: !!i,
|
|
817
821
|
fieldName: s,
|
|
818
|
-
reportFocus:
|
|
822
|
+
reportFocus: B
|
|
819
823
|
};
|
|
820
824
|
}
|
|
821
825
|
function ze(e) {
|
|
822
826
|
if (typeof e == "string") return e || void 0;
|
|
823
827
|
if (typeof e == "number") return String(e);
|
|
824
828
|
}
|
|
825
|
-
function
|
|
829
|
+
function me(e) {
|
|
826
830
|
return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
|
|
827
831
|
}
|
|
828
|
-
function
|
|
829
|
-
return t ? Array.isArray(e) ? null :
|
|
832
|
+
function Bn(e, t) {
|
|
833
|
+
return t ? Array.isArray(e) ? null : me(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
|
|
830
834
|
}
|
|
831
835
|
function Xe(e) {
|
|
832
836
|
if (e == null) return;
|
|
@@ -834,24 +838,24 @@ function Xe(e) {
|
|
|
834
838
|
if (!(!Number.isFinite(t) || t < 1))
|
|
835
839
|
return Math.floor(t);
|
|
836
840
|
}
|
|
837
|
-
function
|
|
841
|
+
function Dn(e, t, n, r) {
|
|
838
842
|
return e.includes(t) ? e.filter((i) => i !== t) : r === 1 ? [t] : r !== void 0 && e.length >= r ? null : [...e, t];
|
|
839
843
|
}
|
|
840
|
-
function
|
|
844
|
+
function Vn(e, t, n, r, o) {
|
|
841
845
|
return n ? e.includes(t) || o === 1 ? !1 : o !== void 0 && e.length >= o : !0;
|
|
842
846
|
}
|
|
843
|
-
function
|
|
847
|
+
function $n(e, t) {
|
|
844
848
|
return t === void 0 || e.length <= t ? null : e.slice(0, t);
|
|
845
849
|
}
|
|
846
|
-
const
|
|
850
|
+
const jn = Ce(null);
|
|
847
851
|
function xt({
|
|
848
852
|
caseSearch: e,
|
|
849
853
|
children: t
|
|
850
854
|
}) {
|
|
851
|
-
return /* @__PURE__ */ u(
|
|
855
|
+
return /* @__PURE__ */ u(jn.Provider, { value: e ?? null, children: t });
|
|
852
856
|
}
|
|
853
|
-
function
|
|
854
|
-
return Ae(
|
|
857
|
+
function wo() {
|
|
858
|
+
return Ae(jn);
|
|
855
859
|
}
|
|
856
860
|
function ht(e) {
|
|
857
861
|
return typeof e == "string" ? e : "";
|
|
@@ -877,10 +881,10 @@ function yt(e) {
|
|
|
877
881
|
const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
|
|
878
882
|
return t || n;
|
|
879
883
|
}
|
|
880
|
-
function
|
|
884
|
+
function zo(e) {
|
|
881
885
|
return JSON.stringify(e);
|
|
882
886
|
}
|
|
883
|
-
const
|
|
887
|
+
const Oo = {
|
|
884
888
|
name: "SkoponCaseSelect",
|
|
885
889
|
schema: g.object({
|
|
886
890
|
label: g.any().optional(),
|
|
@@ -893,13 +897,13 @@ const zo = {
|
|
|
893
897
|
value: g.any().optional()
|
|
894
898
|
}).passthrough()
|
|
895
899
|
};
|
|
896
|
-
function
|
|
900
|
+
function qo({
|
|
897
901
|
item: e,
|
|
898
902
|
selected: t,
|
|
899
903
|
disabled: n,
|
|
900
904
|
onToggle: r
|
|
901
905
|
}) {
|
|
902
|
-
return /* @__PURE__ */
|
|
906
|
+
return /* @__PURE__ */ w(
|
|
903
907
|
"button",
|
|
904
908
|
{
|
|
905
909
|
type: "button",
|
|
@@ -907,11 +911,11 @@ function Oo({
|
|
|
907
911
|
disabled: n,
|
|
908
912
|
onClick: r,
|
|
909
913
|
children: [
|
|
910
|
-
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(
|
|
911
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(An, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
|
|
915
|
+
/* @__PURE__ */ w("div", { className: "skopon-resume-select-card-body", children: [
|
|
912
916
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name }),
|
|
913
917
|
e.description ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
|
|
914
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ w("div", { className: "skopon-resume-select-card-meta", children: [
|
|
915
919
|
e.caseUniqueId,
|
|
916
920
|
e.platform ? ` · ${e.platform}` : "",
|
|
917
921
|
e.link ? ` · ${e.link}` : ""
|
|
@@ -921,112 +925,112 @@ function Oo({
|
|
|
921
925
|
}
|
|
922
926
|
);
|
|
923
927
|
}
|
|
924
|
-
function
|
|
925
|
-
const { interactive: t } = ve(), n =
|
|
928
|
+
function Lo({ context: e }) {
|
|
929
|
+
const { interactive: t } = ve(), n = wo(), { publishLiveOptions: r } = zt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = Se(e, "value", {
|
|
926
930
|
component: "SkoponCaseSelect",
|
|
927
931
|
changeAction: "click"
|
|
928
|
-
}), l = e.componentModel.properties, c = ht(l.label), m = ht(l.placeholder), d = ht(l.help),
|
|
929
|
-
|
|
930
|
-
const
|
|
931
|
-
|
|
932
|
-
}, [b,
|
|
933
|
-
const
|
|
934
|
-
async (
|
|
935
|
-
const
|
|
936
|
-
if (!n || !yt(
|
|
937
|
-
|
|
932
|
+
}), l = e.componentModel.properties, c = ht(l.label), m = ht(l.placeholder), d = ht(l.help), v = l.enableRefresh !== !1, p = Xe(l.minCount), b = Xe(l.maxCount), y = G(() => gt(l.caseFilter), [l.caseFilter]), C = zo(y), [A, f] = R(1), [S, I] = R(!1), [E, F] = R(""), [U, B] = R([]), [O, K] = R(0), [T, W] = R(y.pageSize ?? 20), Y = _(0), ne = me(o);
|
|
933
|
+
z(() => {
|
|
934
|
+
const $ = $n(ne, b);
|
|
935
|
+
$ !== null && s($);
|
|
936
|
+
}, [b, ne, s]);
|
|
937
|
+
const J = G(() => n ? yt(y) ? E || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, y, E, m]), Q = V(
|
|
938
|
+
async ($) => {
|
|
939
|
+
const x = gt(JSON.parse(C)), h = ++Y.current;
|
|
940
|
+
if (!n || !yt(x)) {
|
|
941
|
+
B([]), K(0), F(""), I(!1);
|
|
938
942
|
return;
|
|
939
943
|
}
|
|
940
|
-
|
|
944
|
+
I(!0), F("");
|
|
941
945
|
try {
|
|
942
|
-
const
|
|
943
|
-
if (
|
|
944
|
-
|
|
946
|
+
const M = await n({ filter: x, page: $ });
|
|
947
|
+
if (h !== Y.current) return;
|
|
948
|
+
B(M.list), K(M.total), f(M.page), W(M.pageSize), a && r(
|
|
945
949
|
a,
|
|
946
|
-
|
|
947
|
-
value:
|
|
948
|
-
label:
|
|
950
|
+
M.list.map((P) => ({
|
|
951
|
+
value: P.caseUniqueId,
|
|
952
|
+
label: P.name || P.caseUniqueId
|
|
949
953
|
}))
|
|
950
954
|
);
|
|
951
|
-
} catch (
|
|
952
|
-
if (
|
|
953
|
-
|
|
955
|
+
} catch (M) {
|
|
956
|
+
if (h !== Y.current) return;
|
|
957
|
+
B([]), K(0), F(M instanceof Error ? M.message : "加载案例列表失败");
|
|
954
958
|
} finally {
|
|
955
|
-
|
|
959
|
+
h === Y.current && I(!1);
|
|
956
960
|
}
|
|
957
961
|
},
|
|
958
|
-
[n,
|
|
962
|
+
[n, C, a, r]
|
|
959
963
|
);
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
}, [
|
|
963
|
-
const
|
|
964
|
+
z(() => {
|
|
965
|
+
f(1), Q(1);
|
|
966
|
+
}, [C, Q]);
|
|
967
|
+
const de = ($) => {
|
|
964
968
|
if (!t) return;
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
+
const x = Dn(
|
|
970
|
+
ne,
|
|
971
|
+
$,
|
|
972
|
+
p,
|
|
969
973
|
b
|
|
970
974
|
);
|
|
971
|
-
|
|
972
|
-
},
|
|
973
|
-
const
|
|
974
|
-
|
|
975
|
+
x !== null && i(x);
|
|
976
|
+
}, ee = () => {
|
|
977
|
+
const $ = gt(JSON.parse(C)), x = T || $.pageSize || 20, h = Math.max(1, Math.ceil(O / x)), M = A >= h ? 1 : A + 1;
|
|
978
|
+
Q(M);
|
|
975
979
|
};
|
|
976
|
-
return /* @__PURE__ */
|
|
980
|
+
return /* @__PURE__ */ w(
|
|
977
981
|
"div",
|
|
978
982
|
{
|
|
979
983
|
className: "form-block-preview skopon-resume-select",
|
|
980
984
|
"data-skopon-field": a || void 0,
|
|
981
985
|
children: [
|
|
982
986
|
c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
|
|
983
|
-
|
|
987
|
+
S && U.length === 0 ? /* @__PURE__ */ w("div", { className: "skopon-resume-select-status", children: [
|
|
984
988
|
/* @__PURE__ */ u(Rt, { size: "small" }),
|
|
985
989
|
" 加载案例…"
|
|
986
990
|
] }) : null,
|
|
987
|
-
!
|
|
988
|
-
|
|
989
|
-
|
|
991
|
+
!S && U.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: J }) : null,
|
|
992
|
+
U.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: U.map(($) => /* @__PURE__ */ u(
|
|
993
|
+
qo,
|
|
990
994
|
{
|
|
991
|
-
item:
|
|
992
|
-
selected:
|
|
993
|
-
disabled:
|
|
994
|
-
|
|
995
|
-
|
|
995
|
+
item: $,
|
|
996
|
+
selected: ne.includes($.caseUniqueId),
|
|
997
|
+
disabled: Vn(
|
|
998
|
+
ne,
|
|
999
|
+
$.caseUniqueId,
|
|
996
1000
|
t,
|
|
997
|
-
|
|
1001
|
+
p,
|
|
998
1002
|
b
|
|
999
1003
|
),
|
|
1000
|
-
onToggle: () =>
|
|
1004
|
+
onToggle: () => de($.caseUniqueId)
|
|
1001
1005
|
},
|
|
1002
|
-
|
|
1006
|
+
$.caseUniqueId
|
|
1003
1007
|
)) }) : null,
|
|
1004
|
-
|
|
1008
|
+
v && n && yt(y) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
|
|
1005
1009
|
qe,
|
|
1006
1010
|
{
|
|
1007
1011
|
type: "default",
|
|
1008
1012
|
size: "small",
|
|
1009
|
-
icon: /* @__PURE__ */ u(
|
|
1010
|
-
loading:
|
|
1013
|
+
icon: /* @__PURE__ */ u(Cn, {}),
|
|
1014
|
+
loading: S,
|
|
1011
1015
|
disabled: !t,
|
|
1012
|
-
onClick:
|
|
1016
|
+
onClick: ee,
|
|
1013
1017
|
children: "换一批"
|
|
1014
1018
|
}
|
|
1015
1019
|
) }) : null,
|
|
1016
|
-
d ? /* @__PURE__ */ u(
|
|
1020
|
+
d ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
|
|
1017
1021
|
]
|
|
1018
1022
|
}
|
|
1019
1023
|
);
|
|
1020
1024
|
}
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
),
|
|
1025
|
+
const Bo = ce(
|
|
1026
|
+
Oo,
|
|
1027
|
+
Lo
|
|
1028
|
+
), Do = {
|
|
1025
1029
|
type: "case_multiselect",
|
|
1026
1030
|
componentName: "SkoponCaseSelect",
|
|
1027
|
-
toComponent:
|
|
1028
|
-
fromComponent:
|
|
1029
|
-
catalogComponents: [
|
|
1031
|
+
toComponent: Ao,
|
|
1032
|
+
fromComponent: ko,
|
|
1033
|
+
catalogComponents: [Bo]
|
|
1030
1034
|
};
|
|
1031
1035
|
function vt(e) {
|
|
1032
1036
|
if (e == null) return;
|
|
@@ -1034,8 +1038,8 @@ function vt(e) {
|
|
|
1034
1038
|
if (!(!Number.isFinite(t) || t < 1))
|
|
1035
1039
|
return Math.floor(t);
|
|
1036
1040
|
}
|
|
1037
|
-
function
|
|
1038
|
-
var s, a, l, c, m, d,
|
|
1041
|
+
function Vo(e, t) {
|
|
1042
|
+
var s, a, l, c, m, d, v, p, b, y, C, A, f;
|
|
1039
1043
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
1040
1044
|
return i({
|
|
1041
1045
|
id: n,
|
|
@@ -1051,23 +1055,23 @@ function Do(e, t) {
|
|
|
1051
1055
|
...(c = (l = e.contentFilter) == null ? void 0 : l.category) != null && c.trim() ? { category: e.contentFilter.category.trim() } : {},
|
|
1052
1056
|
tagUniqueIds: ((m = e.contentFilter) == null ? void 0 : m.tagUniqueIds) ?? [],
|
|
1053
1057
|
tagMatch: ((d = e.contentFilter) == null ? void 0 : d.tagMatch) === "any" ? "any" : "all",
|
|
1054
|
-
pageSize: ((
|
|
1058
|
+
pageSize: ((v = e.contentFilter) == null ? void 0 : v.pageSize) ?? 20
|
|
1055
1059
|
},
|
|
1056
1060
|
resumeFilter: {
|
|
1057
|
-
names: ((
|
|
1061
|
+
names: ((p = e.resumeFilter) == null ? void 0 : p.names) ?? [],
|
|
1058
1062
|
...(b = e.resumeFilter) != null && b.agentKind ? { agentKind: e.resumeFilter.agentKind } : {},
|
|
1059
|
-
agentUniqueIds: ((
|
|
1060
|
-
tagUniqueIds: ((
|
|
1061
|
-
resumeUniqueIds: ((
|
|
1062
|
-
pageSize: ((
|
|
1063
|
+
agentUniqueIds: ((y = e.resumeFilter) == null ? void 0 : y.agentUniqueIds) ?? [],
|
|
1064
|
+
tagUniqueIds: ((C = e.resumeFilter) == null ? void 0 : C.tagUniqueIds) ?? [],
|
|
1065
|
+
resumeUniqueIds: ((A = e.resumeFilter) == null ? void 0 : A.resumeUniqueIds) ?? [],
|
|
1066
|
+
pageSize: ((f = e.resumeFilter) == null ? void 0 : f.pageSize) ?? 20
|
|
1063
1067
|
},
|
|
1064
1068
|
...e.resumeMinCount !== void 0 ? { minCount: e.resumeMinCount } : {},
|
|
1065
1069
|
...e.resumeMaxCount !== void 0 ? { maxCount: e.resumeMaxCount } : {},
|
|
1066
1070
|
value: { path: o }
|
|
1067
1071
|
});
|
|
1068
1072
|
}
|
|
1069
|
-
function
|
|
1070
|
-
var m, d,
|
|
1073
|
+
function $o(e, t, n) {
|
|
1074
|
+
var m, d, v;
|
|
1071
1075
|
const r = n.nameFromValue(e.value), o = {
|
|
1072
1076
|
...t("resume_multiselect"),
|
|
1073
1077
|
name: r,
|
|
@@ -1077,25 +1081,25 @@ function Vo(e, t, n) {
|
|
|
1077
1081
|
i && (o.placeholder = i);
|
|
1078
1082
|
const s = n.asLiteral(e.help);
|
|
1079
1083
|
if (s && (o.help = s), e.resumeFilter && typeof e.resumeFilter == "object") {
|
|
1080
|
-
const
|
|
1084
|
+
const p = e.resumeFilter, b = (m = n.asLiteral(p.agentKind)) == null ? void 0 : m.trim();
|
|
1081
1085
|
o.resumeFilter = {
|
|
1082
|
-
names: Array.isArray(
|
|
1086
|
+
names: Array.isArray(p.names) ? p.names.map(String) : [],
|
|
1083
1087
|
...b ? { agentKind: b } : {},
|
|
1084
|
-
agentUniqueIds: Array.isArray(
|
|
1085
|
-
tagUniqueIds: Array.isArray(
|
|
1086
|
-
resumeUniqueIds: Array.isArray(
|
|
1087
|
-
pageSize: typeof
|
|
1088
|
+
agentUniqueIds: Array.isArray(p.agentUniqueIds) ? p.agentUniqueIds.map(String) : [],
|
|
1089
|
+
tagUniqueIds: Array.isArray(p.tagUniqueIds) ? p.tagUniqueIds.map(String).filter(Boolean) : [],
|
|
1090
|
+
resumeUniqueIds: Array.isArray(p.resumeUniqueIds) ? p.resumeUniqueIds.map(String) : [],
|
|
1091
|
+
pageSize: typeof p.pageSize == "number" ? p.pageSize : 20
|
|
1088
1092
|
};
|
|
1089
1093
|
}
|
|
1090
1094
|
const a = vt(e.resumeDisplayCount);
|
|
1091
1095
|
if (a !== void 0 && (o.resumeDisplayCount = a), e.contentFilter && typeof e.contentFilter == "object") {
|
|
1092
|
-
const
|
|
1096
|
+
const p = e.contentFilter, b = (d = n.asLiteral(p.flowType)) == null ? void 0 : d.trim(), y = (v = n.asLiteral(p.category)) == null ? void 0 : v.trim();
|
|
1093
1097
|
o.contentFilter = {
|
|
1094
1098
|
flowType: b || "content-production",
|
|
1095
|
-
...
|
|
1096
|
-
tagUniqueIds: Array.isArray(
|
|
1097
|
-
tagMatch:
|
|
1098
|
-
pageSize: typeof
|
|
1099
|
+
...y ? { category: y } : {},
|
|
1100
|
+
tagUniqueIds: Array.isArray(p.tagUniqueIds) ? p.tagUniqueIds.map(String).filter(Boolean) : [],
|
|
1101
|
+
tagMatch: p.tagMatch === "any" ? "any" : "all",
|
|
1102
|
+
pageSize: typeof p.pageSize == "number" ? p.pageSize : 20
|
|
1099
1103
|
};
|
|
1100
1104
|
}
|
|
1101
1105
|
const l = vt(e.minCount);
|
|
@@ -1103,61 +1107,61 @@ function Vo(e, t, n) {
|
|
|
1103
1107
|
const c = vt(e.maxCount);
|
|
1104
1108
|
return c !== void 0 && (o.resumeMaxCount = c), o;
|
|
1105
1109
|
}
|
|
1106
|
-
const
|
|
1110
|
+
const Hn = Ce(null);
|
|
1107
1111
|
function Ft({
|
|
1108
1112
|
contentSearch: e,
|
|
1109
1113
|
children: t
|
|
1110
1114
|
}) {
|
|
1111
|
-
return /* @__PURE__ */ u(
|
|
1115
|
+
return /* @__PURE__ */ u(Hn.Provider, { value: e ?? null, children: t });
|
|
1112
1116
|
}
|
|
1113
|
-
function
|
|
1114
|
-
return Ae(
|
|
1117
|
+
function jo() {
|
|
1118
|
+
return Ae(Hn);
|
|
1115
1119
|
}
|
|
1116
|
-
const
|
|
1117
|
-
function
|
|
1120
|
+
const Ho = 5;
|
|
1121
|
+
function Ko(e, t = Ho) {
|
|
1118
1122
|
const n = typeof e == "number" ? e : Number(e);
|
|
1119
1123
|
return !Number.isFinite(n) || n < 1 ? t : Math.min(100, Math.floor(n));
|
|
1120
1124
|
}
|
|
1121
|
-
function
|
|
1125
|
+
function Wo(e, t) {
|
|
1122
1126
|
return `${e}|${t}`;
|
|
1123
1127
|
}
|
|
1124
|
-
function
|
|
1128
|
+
function Go(e) {
|
|
1125
1129
|
return e.total <= 0 || e.pageSize <= 0 ? !1 : e.fetchedPage * e.pageSize < e.total;
|
|
1126
1130
|
}
|
|
1127
|
-
function
|
|
1131
|
+
function cn(e, t, n) {
|
|
1128
1132
|
if (n <= 0) return 0;
|
|
1129
1133
|
const r = Math.max(1, t);
|
|
1130
1134
|
return ((e % n + n) % n + r) % n;
|
|
1131
1135
|
}
|
|
1132
|
-
function
|
|
1136
|
+
function Kn(e, t, n) {
|
|
1133
1137
|
if (n <= 0 || t <= 0) return [];
|
|
1134
1138
|
const r = Math.min(t, n), o = (e % n + n) % n;
|
|
1135
1139
|
return Array.from({ length: r }, (i, s) => (o + s) % n);
|
|
1136
1140
|
}
|
|
1137
|
-
function
|
|
1138
|
-
return t.length === 0 || !t.some((n) => n >= e.itemCount) || !
|
|
1141
|
+
function Jo(e, t) {
|
|
1142
|
+
return t.length === 0 || !t.some((n) => n >= e.itemCount) || !Go(e) ? null : e.fetchedPage + 1;
|
|
1139
1143
|
}
|
|
1140
|
-
function
|
|
1141
|
-
const o =
|
|
1144
|
+
function un(e, t, n, r) {
|
|
1145
|
+
const o = Kn(t, n, r);
|
|
1142
1146
|
return o.length === 0 ? [] : o.some((i) => i >= e.length) ? [] : o.map((i) => e[i]);
|
|
1143
1147
|
}
|
|
1144
|
-
const
|
|
1148
|
+
const Wn = Ce(null);
|
|
1145
1149
|
function Ut({
|
|
1146
1150
|
resumeSearch: e,
|
|
1147
1151
|
children: t
|
|
1148
1152
|
}) {
|
|
1149
|
-
return /* @__PURE__ */ u(
|
|
1153
|
+
return /* @__PURE__ */ u(Wn.Provider, { value: e ?? null, children: t });
|
|
1150
1154
|
}
|
|
1151
|
-
function
|
|
1152
|
-
return Ae(
|
|
1155
|
+
function Yo() {
|
|
1156
|
+
return Ae(Wn);
|
|
1153
1157
|
}
|
|
1154
|
-
function
|
|
1158
|
+
function St(e) {
|
|
1155
1159
|
return typeof e == "string" ? e : "";
|
|
1156
1160
|
}
|
|
1157
1161
|
function Ne(e) {
|
|
1158
1162
|
return Array.isArray(e) ? e.map(String).filter(Boolean) : [];
|
|
1159
1163
|
}
|
|
1160
|
-
function
|
|
1164
|
+
function mn(e) {
|
|
1161
1165
|
if (!e || typeof e != "object")
|
|
1162
1166
|
return { names: [], agentUniqueIds: [], tagUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
|
|
1163
1167
|
const t = e, n = typeof t.agentKind == "string" ? t.agentKind.trim() : "", r = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), o = Number.isFinite(r) && r >= 1 && r <= 100 ? Math.floor(r) : 20;
|
|
@@ -1170,10 +1174,10 @@ function un(e) {
|
|
|
1170
1174
|
pageSize: o
|
|
1171
1175
|
};
|
|
1172
1176
|
}
|
|
1173
|
-
function
|
|
1177
|
+
function dn(e) {
|
|
1174
1178
|
return JSON.stringify(e);
|
|
1175
1179
|
}
|
|
1176
|
-
const
|
|
1180
|
+
const Qo = {
|
|
1177
1181
|
name: "SkoponResumeSelect",
|
|
1178
1182
|
schema: g.object({
|
|
1179
1183
|
label: g.any().optional(),
|
|
@@ -1188,13 +1192,13 @@ const Yo = {
|
|
|
1188
1192
|
maxCount: g.any().optional(),
|
|
1189
1193
|
value: g.any().optional()
|
|
1190
1194
|
}).passthrough()
|
|
1191
|
-
},
|
|
1195
|
+
}, Xo = {
|
|
1192
1196
|
flowType: "content-production",
|
|
1193
1197
|
tagUniqueIds: [],
|
|
1194
1198
|
pageSize: 20
|
|
1195
1199
|
};
|
|
1196
|
-
function
|
|
1197
|
-
if (!e || typeof e != "object") return
|
|
1200
|
+
function pn(e) {
|
|
1201
|
+
if (!e || typeof e != "object") return Xo;
|
|
1198
1202
|
const t = e, n = typeof t.flowType == "string" ? t.flowType.trim() : "", r = typeof t.category == "string" ? t.category.trim() : "", o = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), i = Number.isFinite(o) && o >= 1 && o <= 100 ? Math.floor(o) : 20;
|
|
1199
1203
|
return {
|
|
1200
1204
|
flowType: n || "content-production",
|
|
@@ -1207,7 +1211,7 @@ function dn(e) {
|
|
|
1207
1211
|
function _e(e) {
|
|
1208
1212
|
return { items: [], total: 0, fetchedPage: 0, pageSize: e };
|
|
1209
1213
|
}
|
|
1210
|
-
function
|
|
1214
|
+
function Zo(e) {
|
|
1211
1215
|
return {
|
|
1212
1216
|
itemCount: e.items.length,
|
|
1213
1217
|
total: e.total,
|
|
@@ -1218,9 +1222,9 @@ function Xo(e) {
|
|
|
1218
1222
|
async function Ke(e, t, n, r) {
|
|
1219
1223
|
let o = e;
|
|
1220
1224
|
for (let i = 0; i < 20; i += 1) {
|
|
1221
|
-
const s =
|
|
1222
|
-
|
|
1223
|
-
|
|
1225
|
+
const s = Jo(
|
|
1226
|
+
Zo(o),
|
|
1227
|
+
Kn(t, n, o.total)
|
|
1224
1228
|
);
|
|
1225
1229
|
if (s == null) return o;
|
|
1226
1230
|
const a = await r(s), l = a.page || s;
|
|
@@ -1233,8 +1237,8 @@ async function Ke(e, t, n, r) {
|
|
|
1233
1237
|
}
|
|
1234
1238
|
return o;
|
|
1235
1239
|
}
|
|
1236
|
-
function
|
|
1237
|
-
const [t, n] =
|
|
1240
|
+
function ei({ content: e }) {
|
|
1241
|
+
const [t, n] = R(!1), r = !!(e.mediaUrl || e.link || e.coverUrl), o = (i) => {
|
|
1238
1242
|
if (i.stopPropagation(), i.preventDefault(), e.mediaKind === "video" && e.mediaUrl) {
|
|
1239
1243
|
n(!0);
|
|
1240
1244
|
return;
|
|
@@ -1253,7 +1257,7 @@ function Zo({ content: e }) {
|
|
|
1253
1257
|
playsInline: !0,
|
|
1254
1258
|
onClick: (i) => i.stopPropagation()
|
|
1255
1259
|
}
|
|
1256
|
-
) : /* @__PURE__ */
|
|
1260
|
+
) : /* @__PURE__ */ w(
|
|
1257
1261
|
"button",
|
|
1258
1262
|
{
|
|
1259
1263
|
type: "button",
|
|
@@ -1262,13 +1266,13 @@ function Zo({ content: e }) {
|
|
|
1262
1266
|
disabled: !r,
|
|
1263
1267
|
onClick: o,
|
|
1264
1268
|
children: [
|
|
1265
|
-
e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-cover-img" }) : /* @__PURE__ */ u(
|
|
1266
|
-
r ? /* @__PURE__ */ u(
|
|
1269
|
+
e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-cover-img" }) : /* @__PURE__ */ u(Ir, { className: "skopon-resume-select-card-cover-placeholder" }),
|
|
1270
|
+
r ? /* @__PURE__ */ u(Mr, { className: "skopon-resume-select-card-play" }) : null
|
|
1267
1271
|
]
|
|
1268
1272
|
}
|
|
1269
1273
|
) });
|
|
1270
1274
|
}
|
|
1271
|
-
function
|
|
1275
|
+
function ti({
|
|
1272
1276
|
item: e,
|
|
1273
1277
|
content: t,
|
|
1274
1278
|
selected: n,
|
|
@@ -1276,7 +1280,7 @@ function ei({
|
|
|
1276
1280
|
onToggle: o
|
|
1277
1281
|
}) {
|
|
1278
1282
|
const i = ((e == null ? void 0 : e.specialties) ?? []).filter(Boolean).slice(0, 3);
|
|
1279
|
-
return /* @__PURE__ */
|
|
1283
|
+
return /* @__PURE__ */ w(
|
|
1280
1284
|
"div",
|
|
1281
1285
|
{
|
|
1282
1286
|
role: "button",
|
|
@@ -1291,198 +1295,198 @@ function ei({
|
|
|
1291
1295
|
r || (s.key === "Enter" || s.key === " ") && (s.preventDefault(), o());
|
|
1292
1296
|
},
|
|
1293
1297
|
children: [
|
|
1294
|
-
e ? /* @__PURE__ */
|
|
1298
|
+
e ? /* @__PURE__ */ w("div", { className: "skopon-resume-select-card-person", children: [
|
|
1295
1299
|
/* @__PURE__ */ u(
|
|
1296
|
-
|
|
1300
|
+
Sr,
|
|
1297
1301
|
{
|
|
1298
1302
|
size: 36,
|
|
1299
1303
|
src: e.avatarUrl || void 0,
|
|
1300
|
-
icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(
|
|
1304
|
+
icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(Ur, {}),
|
|
1301
1305
|
className: "skopon-resume-select-card-avatar"
|
|
1302
1306
|
}
|
|
1303
1307
|
),
|
|
1304
|
-
/* @__PURE__ */
|
|
1308
|
+
/* @__PURE__ */ w("div", { className: "skopon-resume-select-card-person-text", children: [
|
|
1305
1309
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-person-name", children: e.name || "未命名简历" }),
|
|
1306
1310
|
i.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-specialties", children: i.map((s) => /* @__PURE__ */ u(Ee, { className: "skopon-resume-select-card-tag", children: s }, s)) }) : null
|
|
1307
1311
|
] })
|
|
1308
1312
|
] }) : null,
|
|
1309
1313
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-content-title", children: t.title || "未命名内容" }),
|
|
1310
|
-
(t.tagLabels ?? []).length > 0 ? /* @__PURE__ */
|
|
1314
|
+
(t.tagLabels ?? []).length > 0 ? /* @__PURE__ */ w("div", { className: "skopon-resume-select-card-content-tags", "aria-label": "内容标签", children: [
|
|
1311
1315
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-content-tags-label", children: "内容标签" }),
|
|
1312
1316
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-content-tags-list", children: (t.tagLabels ?? []).map((s) => /* @__PURE__ */ u(Ee, { className: "skopon-resume-select-card-content-tag", children: s }, s)) })
|
|
1313
1317
|
] }) : null,
|
|
1314
|
-
/* @__PURE__ */ u(
|
|
1318
|
+
/* @__PURE__ */ u(ei, { content: t })
|
|
1315
1319
|
]
|
|
1316
1320
|
}
|
|
1317
1321
|
);
|
|
1318
1322
|
}
|
|
1319
|
-
function
|
|
1320
|
-
const { interactive: t } = ve(), n =
|
|
1323
|
+
function ni({ context: e }) {
|
|
1324
|
+
const { interactive: t } = ve(), n = Yo(), r = jo(), { publishLiveOptions: o } = zt(), { value: i, setValue: s, setValueSilent: a, fieldName: l } = Se(e, "value", {
|
|
1321
1325
|
component: "SkoponResumeSelect",
|
|
1322
1326
|
changeAction: "click"
|
|
1323
|
-
}), c = e.componentModel.properties, m =
|
|
1324
|
-
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1329
|
-
}, [
|
|
1330
|
-
const
|
|
1331
|
-
(
|
|
1332
|
-
const D =
|
|
1333
|
-
return n ? n({ filter: D, page:
|
|
1327
|
+
}), c = e.componentModel.properties, m = St(c.label), d = St(c.placeholder), v = St(c.help), p = c.enableRefresh !== !1, b = Xe(c.minCount), y = Xe(c.maxCount), C = c.resumeDisplayMode === "content-only", A = Ko(c.resumeDisplayCount), f = G(() => mn(c.resumeFilter), [c.resumeFilter]), S = G(() => pn(c.contentFilter), [c.contentFilter]), I = dn(f), E = dn(S), [F, U] = R(() => _e(20)), [B, O] = R(() => _e(20)), [K, T] = R(0), [W, Y] = R(0), [ne, J] = R(!1), [Q, de] = R(""), ee = _(0), $ = _(!1), x = _(F), h = _(B);
|
|
1328
|
+
x.current = F, h.current = B;
|
|
1329
|
+
const M = me(i);
|
|
1330
|
+
z(() => {
|
|
1331
|
+
const k = $n(M, y);
|
|
1332
|
+
k !== null && a(k);
|
|
1333
|
+
}, [y, M, a]);
|
|
1334
|
+
const P = V(
|
|
1335
|
+
(k) => {
|
|
1336
|
+
const D = mn(JSON.parse(I));
|
|
1337
|
+
return n ? n({ filter: D, page: k }) : Promise.reject(new Error("未配置简历搜索服务"));
|
|
1334
1338
|
},
|
|
1335
|
-
[n,
|
|
1336
|
-
),
|
|
1337
|
-
(
|
|
1338
|
-
const D =
|
|
1339
|
-
return r ? r({ filter: D, page:
|
|
1339
|
+
[n, I]
|
|
1340
|
+
), N = V(
|
|
1341
|
+
(k) => {
|
|
1342
|
+
const D = pn(JSON.parse(E));
|
|
1343
|
+
return r ? r({ filter: D, page: k }) : Promise.reject(new Error("未配置内容搜索服务"));
|
|
1340
1344
|
},
|
|
1341
|
-
[r,
|
|
1345
|
+
[r, E]
|
|
1342
1346
|
);
|
|
1343
|
-
|
|
1344
|
-
const
|
|
1345
|
-
if (!
|
|
1346
|
-
|
|
1347
|
+
z(() => {
|
|
1348
|
+
const k = ++ee.current;
|
|
1349
|
+
if (!C && !n || !r) {
|
|
1350
|
+
U(_e(f.pageSize ?? 20)), O(_e(S.pageSize ?? 20)), T(0), Y(0), de(!C && !n ? "未配置简历搜索服务" : "未配置内容搜索服务"), J(!1);
|
|
1347
1351
|
return;
|
|
1348
1352
|
}
|
|
1349
|
-
|
|
1353
|
+
J(!0), de(""), T(0), Y(0), (async () => {
|
|
1350
1354
|
try {
|
|
1351
|
-
const [D,
|
|
1352
|
-
|
|
1353
|
-
|
|
1355
|
+
const [D, re] = await Promise.all([
|
|
1356
|
+
C ? Promise.resolve({ list: [], total: 0, page: 1, pageSize: 20 }) : P(1),
|
|
1357
|
+
N(1)
|
|
1354
1358
|
]);
|
|
1355
|
-
if (
|
|
1356
|
-
let
|
|
1359
|
+
if (k !== ee.current) return;
|
|
1360
|
+
let ie = {
|
|
1357
1361
|
items: D.list,
|
|
1358
1362
|
total: D.total,
|
|
1359
1363
|
fetchedPage: D.page || 1,
|
|
1360
1364
|
pageSize: D.pageSize
|
|
1361
|
-
},
|
|
1362
|
-
items:
|
|
1363
|
-
total:
|
|
1364
|
-
fetchedPage:
|
|
1365
|
-
pageSize:
|
|
1365
|
+
}, he = {
|
|
1366
|
+
items: re.list,
|
|
1367
|
+
total: re.total,
|
|
1368
|
+
fetchedPage: re.page || 1,
|
|
1369
|
+
pageSize: re.pageSize
|
|
1366
1370
|
};
|
|
1367
|
-
if (
|
|
1368
|
-
|
|
1371
|
+
if (C || (ie = await Ke(ie, 0, A, P)), he = await Ke(he, 0, A, N), k !== ee.current) return;
|
|
1372
|
+
U(ie), O(he);
|
|
1369
1373
|
} catch (D) {
|
|
1370
|
-
if (
|
|
1371
|
-
|
|
1374
|
+
if (k !== ee.current) return;
|
|
1375
|
+
U(_e(20)), O(_e(20)), de(D instanceof Error ? D.message : C ? "加载内容失败" : "加载简历和内容失败");
|
|
1372
1376
|
} finally {
|
|
1373
|
-
|
|
1377
|
+
k === ee.current && J(!1);
|
|
1374
1378
|
}
|
|
1375
1379
|
})();
|
|
1376
1380
|
}, [
|
|
1377
|
-
|
|
1378
|
-
|
|
1381
|
+
C,
|
|
1382
|
+
S.pageSize,
|
|
1379
1383
|
r,
|
|
1380
|
-
|
|
1384
|
+
A,
|
|
1385
|
+
N,
|
|
1381
1386
|
P,
|
|
1382
|
-
|
|
1383
|
-
h.pageSize,
|
|
1387
|
+
f.pageSize,
|
|
1384
1388
|
n
|
|
1385
1389
|
]);
|
|
1386
|
-
const
|
|
1387
|
-
const
|
|
1388
|
-
return
|
|
1389
|
-
}),
|
|
1390
|
+
const X = un(F.items, K, A, F.total), te = un(B.items, W, A, B.total), j = C ? te.map((k) => ({ content: k, key: k.flowUniqueId })) : X.flatMap((k, D) => {
|
|
1391
|
+
const re = te[D];
|
|
1392
|
+
return re ? [{ item: k, content: re, key: Wo(k.resumeUniqueId, re.flowUniqueId) }] : [];
|
|
1393
|
+
}), oe = j.map((k) => {
|
|
1390
1394
|
var D;
|
|
1391
|
-
return `${
|
|
1395
|
+
return `${k.key} ${((D = k.item) == null ? void 0 : D.name) ?? ""} ${k.content.title}`;
|
|
1392
1396
|
}).join(`
|
|
1393
1397
|
`);
|
|
1394
|
-
|
|
1398
|
+
z(() => {
|
|
1395
1399
|
l && o(
|
|
1396
1400
|
l,
|
|
1397
|
-
|
|
1398
|
-
value:
|
|
1399
|
-
label:
|
|
1401
|
+
j.map((k) => ({
|
|
1402
|
+
value: k.key,
|
|
1403
|
+
label: k.item ? `${k.item.name || k.item.resumeUniqueId} / ${k.content.title}` : k.content.title
|
|
1400
1404
|
}))
|
|
1401
1405
|
);
|
|
1402
|
-
}, [l,
|
|
1403
|
-
const
|
|
1406
|
+
}, [l, oe, o]);
|
|
1407
|
+
const pe = (k) => {
|
|
1404
1408
|
if (!t) return;
|
|
1405
|
-
const D =
|
|
1409
|
+
const D = Dn(M, k, b, y);
|
|
1406
1410
|
D !== null && s(D);
|
|
1407
1411
|
}, Ue = () => {
|
|
1408
|
-
if (
|
|
1409
|
-
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1412
|
+
if ($.current || !C && F.total <= 0 || B.total <= 0) return;
|
|
1413
|
+
$.current = !0;
|
|
1414
|
+
const k = ++ee.current, D = cn(K, A, F.total), re = cn(W, A, B.total);
|
|
1415
|
+
J(!0), de(""), (async () => {
|
|
1412
1416
|
try {
|
|
1413
|
-
const [
|
|
1414
|
-
|
|
1415
|
-
Ke(
|
|
1417
|
+
const [ie, he] = await Promise.all([
|
|
1418
|
+
C ? Promise.resolve(x.current) : Ke(x.current, D, A, P),
|
|
1419
|
+
Ke(h.current, re, A, N)
|
|
1416
1420
|
]);
|
|
1417
|
-
if (
|
|
1418
|
-
|
|
1419
|
-
} catch (
|
|
1420
|
-
if (
|
|
1421
|
-
|
|
1421
|
+
if (k !== ee.current) return;
|
|
1422
|
+
U(ie), O(he), T(D), Y(re);
|
|
1423
|
+
} catch (ie) {
|
|
1424
|
+
if (k !== ee.current) return;
|
|
1425
|
+
de(ie instanceof Error ? ie.message : "换一批失败");
|
|
1422
1426
|
} finally {
|
|
1423
|
-
|
|
1427
|
+
$.current = !1, k === ee.current && J(!1);
|
|
1424
1428
|
}
|
|
1425
1429
|
})();
|
|
1426
|
-
}, Ie = d || (
|
|
1427
|
-
return /* @__PURE__ */
|
|
1430
|
+
}, Ie = d || (C ? "暂无匹配的内容" : "暂无匹配的简历或内容"), fe = !ne && !Q && j.length === 0;
|
|
1431
|
+
return /* @__PURE__ */ w(
|
|
1428
1432
|
"div",
|
|
1429
1433
|
{
|
|
1430
1434
|
className: "form-block-preview skopon-resume-select",
|
|
1431
1435
|
"data-skopon-field": l || void 0,
|
|
1432
1436
|
children: [
|
|
1433
1437
|
m ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: m }) : null,
|
|
1434
|
-
|
|
1438
|
+
ne && j.length === 0 ? /* @__PURE__ */ w("div", { className: "skopon-resume-select-status", children: [
|
|
1435
1439
|
/* @__PURE__ */ u(Rt, { size: "small" }),
|
|
1436
1440
|
" ",
|
|
1437
|
-
|
|
1441
|
+
C ? "加载内容…" : "加载简历和内容…"
|
|
1438
1442
|
] }) : null,
|
|
1439
|
-
!
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
+
!ne && Q ? /* @__PURE__ */ u(le.Text, { type: "danger", className: "skopon-resume-select-status", children: Q }) : null,
|
|
1444
|
+
fe ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: Ie }) : null,
|
|
1445
|
+
j.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: j.map((k) => /* @__PURE__ */ u(
|
|
1446
|
+
ti,
|
|
1443
1447
|
{
|
|
1444
|
-
item:
|
|
1445
|
-
content:
|
|
1446
|
-
selected:
|
|
1447
|
-
disabled:
|
|
1448
|
-
|
|
1449
|
-
|
|
1448
|
+
item: k.item,
|
|
1449
|
+
content: k.content,
|
|
1450
|
+
selected: M.includes(k.key),
|
|
1451
|
+
disabled: Vn(
|
|
1452
|
+
M,
|
|
1453
|
+
k.key,
|
|
1450
1454
|
t,
|
|
1451
1455
|
b,
|
|
1452
|
-
|
|
1456
|
+
y
|
|
1453
1457
|
),
|
|
1454
|
-
onToggle: () =>
|
|
1458
|
+
onToggle: () => pe(k.key)
|
|
1455
1459
|
},
|
|
1456
|
-
|
|
1460
|
+
k.key
|
|
1457
1461
|
)) }) : null,
|
|
1458
|
-
|
|
1462
|
+
p && (C || n) && r ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
|
|
1459
1463
|
qe,
|
|
1460
1464
|
{
|
|
1461
1465
|
type: "default",
|
|
1462
1466
|
size: "small",
|
|
1463
|
-
icon: /* @__PURE__ */ u(
|
|
1464
|
-
loading:
|
|
1465
|
-
disabled: !t || !
|
|
1467
|
+
icon: /* @__PURE__ */ u(Cn, {}),
|
|
1468
|
+
loading: ne,
|
|
1469
|
+
disabled: !t || !C && F.total <= 0 || B.total <= 0,
|
|
1466
1470
|
onClick: Ue,
|
|
1467
1471
|
children: "换一批"
|
|
1468
1472
|
}
|
|
1469
1473
|
) }) : null,
|
|
1470
|
-
|
|
1474
|
+
v ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-help", children: v }) : null
|
|
1471
1475
|
]
|
|
1472
1476
|
}
|
|
1473
1477
|
);
|
|
1474
1478
|
}
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
),
|
|
1479
|
+
const ri = ce(
|
|
1480
|
+
Qo,
|
|
1481
|
+
ni
|
|
1482
|
+
), oi = {
|
|
1479
1483
|
type: "resume_multiselect",
|
|
1480
1484
|
componentName: "SkoponResumeSelect",
|
|
1481
|
-
toComponent:
|
|
1482
|
-
fromComponent:
|
|
1483
|
-
catalogComponents: [
|
|
1485
|
+
toComponent: Vo,
|
|
1486
|
+
fromComponent: $o,
|
|
1487
|
+
catalogComponents: [ri]
|
|
1484
1488
|
};
|
|
1485
|
-
function
|
|
1489
|
+
function ii(e, t) {
|
|
1486
1490
|
var n;
|
|
1487
1491
|
return {
|
|
1488
1492
|
node: {
|
|
@@ -1495,7 +1499,7 @@ function oi(e, t) {
|
|
|
1495
1499
|
}
|
|
1496
1500
|
};
|
|
1497
1501
|
}
|
|
1498
|
-
function
|
|
1502
|
+
function si(e, t, n) {
|
|
1499
1503
|
var o, i;
|
|
1500
1504
|
const r = (o = n.asLiteral(e.help)) == null ? void 0 : o.trim();
|
|
1501
1505
|
return {
|
|
@@ -1526,16 +1530,16 @@ function fn({
|
|
|
1526
1530
|
}
|
|
1527
1531
|
);
|
|
1528
1532
|
}
|
|
1529
|
-
function
|
|
1533
|
+
function ai({
|
|
1530
1534
|
url: e = "",
|
|
1531
1535
|
height: t,
|
|
1532
1536
|
label: n,
|
|
1533
1537
|
help: r
|
|
1534
1538
|
}) {
|
|
1535
|
-
const [o, i] =
|
|
1536
|
-
return /* @__PURE__ */
|
|
1539
|
+
const [o, i] = R(!1), [s, a] = R(!0), l = _(null), c = e.trim(), m = Br(c) ? c : null, d = Le(t), v = (n == null ? void 0 : n.trim()) || "网页展示", p = r == null ? void 0 : r.trim(), b = c ? "网页 URL 无效" : "未设置网页 URL";
|
|
1540
|
+
return /* @__PURE__ */ w("div", { className: "form-block-preview skopon-web-preview", children: [
|
|
1537
1541
|
n != null && n.trim() ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: n.trim() }) : null,
|
|
1538
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ w(
|
|
1539
1543
|
"div",
|
|
1540
1544
|
{
|
|
1541
1545
|
className: `skopon-web-frame-shell${m ? "" : " skopon-web-frame-shell--empty"}`,
|
|
@@ -1545,7 +1549,7 @@ function si({
|
|
|
1545
1549
|
fn,
|
|
1546
1550
|
{
|
|
1547
1551
|
url: m,
|
|
1548
|
-
title:
|
|
1552
|
+
title: v,
|
|
1549
1553
|
className: "skopon-web-frame skopon-web-frame--inline",
|
|
1550
1554
|
height: d
|
|
1551
1555
|
}
|
|
@@ -1557,7 +1561,7 @@ function si({
|
|
|
1557
1561
|
type: "default",
|
|
1558
1562
|
shape: "circle",
|
|
1559
1563
|
className: "skopon-web-expand-button",
|
|
1560
|
-
icon: /* @__PURE__ */ u(
|
|
1564
|
+
icon: /* @__PURE__ */ u(Nr, {}),
|
|
1561
1565
|
"aria-label": "扩展显示",
|
|
1562
1566
|
onClick: () => {
|
|
1563
1567
|
a(!1), i(!0);
|
|
@@ -1567,26 +1571,26 @@ function si({
|
|
|
1567
1571
|
]
|
|
1568
1572
|
}
|
|
1569
1573
|
),
|
|
1570
|
-
|
|
1574
|
+
p ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-help", children: p }) : null,
|
|
1571
1575
|
/* @__PURE__ */ u(
|
|
1572
1576
|
br,
|
|
1573
1577
|
{
|
|
1574
1578
|
open: o,
|
|
1575
|
-
title:
|
|
1579
|
+
title: v,
|
|
1576
1580
|
footer: null,
|
|
1577
1581
|
width: "min(1200px, calc(100vw - 32px))",
|
|
1578
1582
|
className: "skopon-web-modal",
|
|
1579
1583
|
destroyOnHidden: !0,
|
|
1580
1584
|
mask: { closable: !0 },
|
|
1581
1585
|
onCancel: () => {
|
|
1582
|
-
var
|
|
1583
|
-
(
|
|
1586
|
+
var y;
|
|
1587
|
+
(y = l.current) == null || y.removeAttribute("src"), i(!1), a(!0);
|
|
1584
1588
|
},
|
|
1585
1589
|
children: m && !s ? /* @__PURE__ */ u(
|
|
1586
1590
|
fn,
|
|
1587
1591
|
{
|
|
1588
1592
|
url: m,
|
|
1589
|
-
title: `${
|
|
1593
|
+
title: `${v}(扩展显示)`,
|
|
1590
1594
|
className: "skopon-web-frame skopon-web-frame--modal",
|
|
1591
1595
|
frameRef: l
|
|
1592
1596
|
}
|
|
@@ -1595,7 +1599,7 @@ function si({
|
|
|
1595
1599
|
)
|
|
1596
1600
|
] });
|
|
1597
1601
|
}
|
|
1598
|
-
const
|
|
1602
|
+
const li = {
|
|
1599
1603
|
name: "SkoponWeb",
|
|
1600
1604
|
schema: g.object({
|
|
1601
1605
|
url: g.any().optional(),
|
|
@@ -1603,12 +1607,12 @@ const ai = {
|
|
|
1603
1607
|
label: g.any().optional(),
|
|
1604
1608
|
help: g.any().optional()
|
|
1605
1609
|
}).passthrough()
|
|
1606
|
-
},
|
|
1607
|
-
|
|
1610
|
+
}, ci = ce(
|
|
1611
|
+
li,
|
|
1608
1612
|
({ context: e }) => {
|
|
1609
1613
|
const t = e.componentModel.properties;
|
|
1610
1614
|
return /* @__PURE__ */ u(
|
|
1611
|
-
|
|
1615
|
+
ai,
|
|
1612
1616
|
{
|
|
1613
1617
|
url: typeof t.url == "string" ? t.url : "",
|
|
1614
1618
|
height: Le(t.height),
|
|
@@ -1617,64 +1621,64 @@ const ai = {
|
|
|
1617
1621
|
}
|
|
1618
1622
|
);
|
|
1619
1623
|
}
|
|
1620
|
-
),
|
|
1624
|
+
), ui = {
|
|
1621
1625
|
type: "web",
|
|
1622
1626
|
componentName: "SkoponWeb",
|
|
1623
|
-
toComponent:
|
|
1624
|
-
fromComponent:
|
|
1625
|
-
catalogComponents: [
|
|
1627
|
+
toComponent: ii,
|
|
1628
|
+
fromComponent: si,
|
|
1629
|
+
catalogComponents: [ci]
|
|
1626
1630
|
}, nt = [
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
],
|
|
1631
|
+
oi,
|
|
1632
|
+
Do,
|
|
1633
|
+
ui
|
|
1634
|
+
], mi = new Map(
|
|
1631
1635
|
nt.map((e) => [e.type, e])
|
|
1632
|
-
),
|
|
1636
|
+
), di = new Map(
|
|
1633
1637
|
nt.map((e) => [e.componentName, e])
|
|
1634
1638
|
);
|
|
1635
|
-
function
|
|
1636
|
-
return
|
|
1639
|
+
function pi(e) {
|
|
1640
|
+
return mi.get(e);
|
|
1637
1641
|
}
|
|
1638
1642
|
function fi(e) {
|
|
1639
|
-
return
|
|
1643
|
+
return di.get(e);
|
|
1640
1644
|
}
|
|
1641
|
-
function
|
|
1645
|
+
function hi() {
|
|
1642
1646
|
return nt.flatMap((e) => e.catalogComponents);
|
|
1643
1647
|
}
|
|
1644
|
-
function
|
|
1648
|
+
function gi() {
|
|
1645
1649
|
return nt.map((e) => e.componentName);
|
|
1646
1650
|
}
|
|
1647
1651
|
const Ze = "root", It = "__title__", Mt = "__desc__", Ot = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
|
|
1648
|
-
function
|
|
1652
|
+
function yi(e) {
|
|
1649
1653
|
return `/${e}`;
|
|
1650
1654
|
}
|
|
1651
|
-
function
|
|
1655
|
+
function hn(e) {
|
|
1652
1656
|
return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
|
|
1653
1657
|
}
|
|
1654
|
-
function
|
|
1658
|
+
function Z(e) {
|
|
1655
1659
|
if (typeof e == "string") return e;
|
|
1656
1660
|
}
|
|
1657
|
-
function
|
|
1658
|
-
const t = e.id ||
|
|
1661
|
+
function vi(e) {
|
|
1662
|
+
const t = e.id || be("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
|
|
1659
1663
|
return {
|
|
1660
1664
|
id: t,
|
|
1661
1665
|
component: "SkoponMedia",
|
|
1662
1666
|
mediaType: n,
|
|
1663
|
-
urls:
|
|
1667
|
+
urls: io(e),
|
|
1664
1668
|
mediaSize: De(e.mediaSize),
|
|
1665
1669
|
label: e.label ?? "",
|
|
1666
1670
|
help: e.help ?? "",
|
|
1667
1671
|
placeholder: e.placeholder ?? ""
|
|
1668
1672
|
};
|
|
1669
1673
|
}
|
|
1670
|
-
function
|
|
1674
|
+
function Si(e) {
|
|
1671
1675
|
if (Array.isArray(e.urls))
|
|
1672
1676
|
return e.urls.map((n) => String(n).trim()).filter(Boolean);
|
|
1673
|
-
const t =
|
|
1677
|
+
const t = Z(e.url);
|
|
1674
1678
|
return t != null && t.trim() ? [t.trim()] : [];
|
|
1675
1679
|
}
|
|
1676
1680
|
function We(e, t, n) {
|
|
1677
|
-
const r = typeof e.id == "string" ? e.id :
|
|
1681
|
+
const r = typeof e.id == "string" ? e.id : be("block-"), o = Si(e), i = Z(e.label) ?? Z(e.description) ?? n, s = Z(e.help), a = Z(e.placeholder), l = De(e.mediaSize);
|
|
1678
1682
|
return {
|
|
1679
1683
|
id: r,
|
|
1680
1684
|
type: t,
|
|
@@ -1685,7 +1689,7 @@ function We(e, t, n) {
|
|
|
1685
1689
|
mediaUrls: o.length > 0 ? o : [""]
|
|
1686
1690
|
};
|
|
1687
1691
|
}
|
|
1688
|
-
function
|
|
1692
|
+
function gn(e) {
|
|
1689
1693
|
switch (e.type) {
|
|
1690
1694
|
case "toggle":
|
|
1691
1695
|
return Ve(e.defaultValue);
|
|
@@ -1705,7 +1709,7 @@ function hn(e) {
|
|
|
1705
1709
|
}
|
|
1706
1710
|
function bi(e) {
|
|
1707
1711
|
var c;
|
|
1708
|
-
const t = e.id ||
|
|
1712
|
+
const t = e.id || be("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? yi(r) : void 0, i = ye(e.options), s = (m) => r ? { node: m, dataKey: r, dataValue: gn(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = pi(e.type);
|
|
1709
1713
|
if (l)
|
|
1710
1714
|
return l.toComponent(e, a);
|
|
1711
1715
|
switch (e.type) {
|
|
@@ -1714,7 +1718,7 @@ function bi(e) {
|
|
|
1714
1718
|
case "paragraph":
|
|
1715
1719
|
return { node: { id: t, component: "Text", text: n, variant: "body" } };
|
|
1716
1720
|
case "text":
|
|
1717
|
-
return e.hidden ? r ? { node: null, dataKey: r, dataValue:
|
|
1721
|
+
return e.hidden ? r ? { node: null, dataKey: r, dataValue: gn(e) } : { node: null } : s({
|
|
1718
1722
|
id: t,
|
|
1719
1723
|
component: "TextField",
|
|
1720
1724
|
label: n,
|
|
@@ -1824,12 +1828,15 @@ function bi(e) {
|
|
|
1824
1828
|
case "image":
|
|
1825
1829
|
case "video":
|
|
1826
1830
|
case "audio":
|
|
1827
|
-
return { node:
|
|
1831
|
+
return { node: vi(e) };
|
|
1828
1832
|
case "file":
|
|
1829
1833
|
return s({
|
|
1830
1834
|
id: t,
|
|
1831
1835
|
component: "FileUpload",
|
|
1832
1836
|
label: n,
|
|
1837
|
+
help: e.help ?? "",
|
|
1838
|
+
fileExampleUrls: e.fileExampleUrls ?? [],
|
|
1839
|
+
fileReviewCriteria: e.fileReviewCriteria ?? "",
|
|
1833
1840
|
accept: (e.fileAcceptExtensions ?? []).join(","),
|
|
1834
1841
|
fileAcceptTypes: e.fileAcceptTypes ?? [],
|
|
1835
1842
|
filePlaceholderIcon: e.filePlaceholderIcon ?? "document",
|
|
@@ -1848,31 +1855,31 @@ function Nt(e) {
|
|
|
1848
1855
|
const n = t.children;
|
|
1849
1856
|
return !Array.isArray(n) || n.length === 0;
|
|
1850
1857
|
}
|
|
1851
|
-
function
|
|
1858
|
+
function Gn(e, t) {
|
|
1852
1859
|
const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, s = (e.title ?? "").trim(), a = (e.description ?? "").trim();
|
|
1853
1860
|
i && s && (n.push({ id: It, component: "Text", text: s, variant: "h2" }), r.push(It)), i && a && (n.push({ id: Mt, component: "Text", text: a, variant: "body" }), r.push(Mt));
|
|
1854
1861
|
for (const m of e.blocks ?? []) {
|
|
1855
1862
|
if (!ke(m)) continue;
|
|
1856
|
-
const { node: d, dataKey:
|
|
1857
|
-
|
|
1863
|
+
const { node: d, dataKey: v, dataValue: p } = bi(m);
|
|
1864
|
+
v && (o[v] = p), d && (n.push(d), r.push(d.id));
|
|
1858
1865
|
}
|
|
1859
1866
|
n.unshift({ id: Ze, component: "Column", children: r });
|
|
1860
1867
|
const l = { root: Ze, components: n, dataModel: o }, c = t == null ? void 0 : t.styleId;
|
|
1861
1868
|
return c !== void 0 && (l.surfaceProperties = { styleId: c ?? null }), l;
|
|
1862
1869
|
}
|
|
1863
|
-
function
|
|
1870
|
+
function Ci(e) {
|
|
1864
1871
|
const t = /* @__PURE__ */ new Map();
|
|
1865
1872
|
for (const n of e.components ?? [])
|
|
1866
1873
|
n && typeof n.id == "string" && t.set(n.id, n);
|
|
1867
1874
|
return t;
|
|
1868
1875
|
}
|
|
1869
|
-
function
|
|
1876
|
+
function bt(e) {
|
|
1870
1877
|
return ye(e.options);
|
|
1871
1878
|
}
|
|
1872
|
-
function
|
|
1873
|
-
const t = typeof e.id == "string" ? e.id :
|
|
1879
|
+
function Ai(e) {
|
|
1880
|
+
const t = typeof e.id == "string" ? e.id : be("block-"), n = String(e.component ?? ""), r = Z(e.label) ?? Z(e.text) ?? "", o = hn(e.value), i = (a) => ({ id: t, type: a, label: r }), s = fi(n);
|
|
1874
1881
|
if (s)
|
|
1875
|
-
return s.fromComponent(e, i, { asLiteral:
|
|
1882
|
+
return s.fromComponent(e, i, { asLiteral: Z, nameFromValue: hn });
|
|
1876
1883
|
switch (n) {
|
|
1877
1884
|
case "Text": {
|
|
1878
1885
|
const a = String(e.variant ?? "body"), l = /^h[1-6]$/i.test(a) || a === "title" || a === "subtitle";
|
|
@@ -1881,8 +1888,8 @@ function Ci(e) {
|
|
|
1881
1888
|
case "TextField": {
|
|
1882
1889
|
const a = String(e.variant ?? "shortText");
|
|
1883
1890
|
let l = "text";
|
|
1884
|
-
a === "longText" ? l = "textarea" : a === "number" ? l = "number" :
|
|
1885
|
-
const c = { ...i(l), name: o }, m =
|
|
1891
|
+
a === "longText" ? l = "textarea" : a === "number" ? l = "number" : Z(e.validationRegexp) === Ot && (l = "email");
|
|
1892
|
+
const c = { ...i(l), name: o }, m = Z(e.placeholder);
|
|
1886
1893
|
return m && (c.placeholder = m), c;
|
|
1887
1894
|
}
|
|
1888
1895
|
case "CheckBox":
|
|
@@ -1891,25 +1898,25 @@ function Ci(e) {
|
|
|
1891
1898
|
const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", c = {
|
|
1892
1899
|
...i(l),
|
|
1893
1900
|
name: o,
|
|
1894
|
-
options:
|
|
1895
|
-
}, m =
|
|
1901
|
+
options: bt(e)
|
|
1902
|
+
}, m = Z(e.placeholder);
|
|
1896
1903
|
return m && (c.placeholder = m), c;
|
|
1897
1904
|
}
|
|
1898
1905
|
case "ChoicePicker": {
|
|
1899
|
-
const a =
|
|
1906
|
+
const a = Z(e.skoponPickerType);
|
|
1900
1907
|
if (a === "select" || a === "multiselect" || a === "radio" || a === "checkbox") {
|
|
1901
1908
|
const m = {
|
|
1902
1909
|
...i(a),
|
|
1903
1910
|
name: o,
|
|
1904
|
-
options:
|
|
1905
|
-
}, d =
|
|
1911
|
+
options: bt(e)
|
|
1912
|
+
}, d = Z(e.placeholder);
|
|
1906
1913
|
return d && (m.placeholder = d), m;
|
|
1907
1914
|
}
|
|
1908
1915
|
const c = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
|
|
1909
|
-
return { ...i(c), name: o, options:
|
|
1916
|
+
return { ...i(c), name: o, options: bt(e) };
|
|
1910
1917
|
}
|
|
1911
1918
|
case "DateTimeInput": {
|
|
1912
|
-
const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d =
|
|
1919
|
+
const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d = Z(e.placeholder);
|
|
1913
1920
|
return d && (m.placeholder = d), m;
|
|
1914
1921
|
}
|
|
1915
1922
|
case "SkoponMedia": {
|
|
@@ -1923,14 +1930,14 @@ function Ci(e) {
|
|
|
1923
1930
|
case "AudioPlayer":
|
|
1924
1931
|
return We(e, "audio", r);
|
|
1925
1932
|
case "FileUpload": {
|
|
1926
|
-
const a =
|
|
1927
|
-
return a && (l.fileAcceptExtensions = a.split(",").map((c) => c.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (l.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (l.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (l.fileMinCount = e.minCount), typeof e.maxCount == "number" && (l.fileMaxCount = e.maxCount), l;
|
|
1933
|
+
const a = Z(e.accept) ?? "", l = { ...i("file"), name: o };
|
|
1934
|
+
return l.help = Z(e.help), l.fileReviewCriteria = Z(e.fileReviewCriteria), Array.isArray(e.fileExampleUrls) && (l.fileExampleUrls = e.fileExampleUrls.filter((c) => typeof c == "string")), a && (l.fileAcceptExtensions = a.split(",").map((c) => c.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (l.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (l.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (l.fileMinCount = e.minCount), typeof e.maxCount == "number" && (l.fileMaxCount = e.maxCount), l;
|
|
1928
1935
|
}
|
|
1929
1936
|
default:
|
|
1930
1937
|
return null;
|
|
1931
1938
|
}
|
|
1932
1939
|
}
|
|
1933
|
-
function
|
|
1940
|
+
function Jn(e, t, n, r) {
|
|
1934
1941
|
if (n.has(e)) return;
|
|
1935
1942
|
n.add(e);
|
|
1936
1943
|
const o = t.get(e);
|
|
@@ -1938,12 +1945,12 @@ function Gn(e, t, n, r) {
|
|
|
1938
1945
|
const i = String(o.component ?? "");
|
|
1939
1946
|
if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
|
|
1940
1947
|
for (const s of o.children)
|
|
1941
|
-
typeof s == "string" &&
|
|
1948
|
+
typeof s == "string" && Jn(s, t, n, r);
|
|
1942
1949
|
return;
|
|
1943
1950
|
}
|
|
1944
1951
|
r.push(o);
|
|
1945
1952
|
}
|
|
1946
|
-
function
|
|
1953
|
+
function ki(e, t) {
|
|
1947
1954
|
return t ? e.map((n) => {
|
|
1948
1955
|
var i;
|
|
1949
1956
|
const r = (i = n.name) == null ? void 0 : i.trim();
|
|
@@ -1952,32 +1959,32 @@ function Ai(e, t) {
|
|
|
1952
1959
|
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: Ve(o) } : { ...n, defaultValue: o };
|
|
1953
1960
|
}) : e;
|
|
1954
1961
|
}
|
|
1955
|
-
function
|
|
1962
|
+
function _i(e) {
|
|
1956
1963
|
if (!e || !Array.isArray(e.components))
|
|
1957
|
-
return
|
|
1958
|
-
const t =
|
|
1959
|
-
|
|
1964
|
+
return Pe({ title: "", description: "", blocks: [] });
|
|
1965
|
+
const t = Ci(e), n = [];
|
|
1966
|
+
Jn(e.root ?? Ze, t, /* @__PURE__ */ new Set(), n);
|
|
1960
1967
|
let r = "", o = "";
|
|
1961
1968
|
const i = [];
|
|
1962
1969
|
for (const s of n) {
|
|
1963
1970
|
if (s.id === It) {
|
|
1964
|
-
r =
|
|
1971
|
+
r = Z(s.text) ?? r;
|
|
1965
1972
|
continue;
|
|
1966
1973
|
}
|
|
1967
1974
|
if (s.id === Mt) {
|
|
1968
|
-
o =
|
|
1975
|
+
o = Z(s.text) ?? o;
|
|
1969
1976
|
continue;
|
|
1970
1977
|
}
|
|
1971
|
-
const a =
|
|
1978
|
+
const a = Ai(s);
|
|
1972
1979
|
a && i.push(a);
|
|
1973
1980
|
}
|
|
1974
|
-
return
|
|
1981
|
+
return Pe({
|
|
1975
1982
|
title: r,
|
|
1976
1983
|
description: o,
|
|
1977
|
-
blocks:
|
|
1984
|
+
blocks: ki(i, e.dataModel)
|
|
1978
1985
|
});
|
|
1979
1986
|
}
|
|
1980
|
-
function
|
|
1987
|
+
function Ti(e, t) {
|
|
1981
1988
|
const { surfaceId: n, catalogId: r } = t, o = [
|
|
1982
1989
|
{ version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
|
|
1983
1990
|
{
|
|
@@ -1990,12 +1997,12 @@ function _i(e, t) {
|
|
|
1990
1997
|
updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
|
|
1991
1998
|
}), o;
|
|
1992
1999
|
}
|
|
1993
|
-
function
|
|
2000
|
+
function Yn(e) {
|
|
1994
2001
|
return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
|
|
1995
2002
|
}
|
|
1996
|
-
function
|
|
2003
|
+
function xi(e, t) {
|
|
1997
2004
|
if (!e || typeof e != "object") return null;
|
|
1998
|
-
const n = e, r =
|
|
2005
|
+
const n = e, r = Yn(n.a2ui) ? n.a2ui : void 0;
|
|
1999
2006
|
if (r && !Nt(r)) return r;
|
|
2000
2007
|
const o = Array.isArray(n.blocks) ? n.blocks : [];
|
|
2001
2008
|
if (o.length === 0) return null;
|
|
@@ -2003,12 +2010,12 @@ function Ti(e, t) {
|
|
|
2003
2010
|
title: typeof n.title == "string" ? n.title : "",
|
|
2004
2011
|
description: typeof n.description == "string" ? n.description : "",
|
|
2005
2012
|
blocks: o,
|
|
2006
|
-
jsonSchema:
|
|
2007
|
-
}), s =
|
|
2013
|
+
jsonSchema: En(n.jsonSchema ?? n.json_schema)
|
|
2014
|
+
}), s = Gn(i, t);
|
|
2008
2015
|
return Nt(s) ? null : s;
|
|
2009
2016
|
}
|
|
2010
|
-
function
|
|
2011
|
-
return
|
|
2017
|
+
function Fi(e, t, n) {
|
|
2018
|
+
return Gn(
|
|
2012
2019
|
{
|
|
2013
2020
|
title: e.title,
|
|
2014
2021
|
description: e.description,
|
|
@@ -2017,18 +2024,18 @@ function xi(e, t, n) {
|
|
|
2017
2024
|
n
|
|
2018
2025
|
);
|
|
2019
2026
|
}
|
|
2020
|
-
function
|
|
2027
|
+
function Ui(e) {
|
|
2021
2028
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2022
2029
|
return;
|
|
2023
2030
|
const t = e;
|
|
2024
|
-
return !(Array.isArray(t.blocks) && t.blocks.length > 0) &&
|
|
2031
|
+
return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Yn(t.a2ui) ? _i(t.a2ui) : tt({
|
|
2025
2032
|
title: typeof t.title == "string" ? t.title : "",
|
|
2026
2033
|
description: typeof t.description == "string" ? t.description : "",
|
|
2027
2034
|
blocks: Array.isArray(t.blocks) ? t.blocks : [],
|
|
2028
|
-
jsonSchema:
|
|
2035
|
+
jsonSchema: En(t.jsonSchema ?? t.json_schema)
|
|
2029
2036
|
});
|
|
2030
2037
|
}
|
|
2031
|
-
function
|
|
2038
|
+
function Ii(e, t, n) {
|
|
2032
2039
|
const r = e.model.surfacesMap.get(t);
|
|
2033
2040
|
if (!r) return {};
|
|
2034
2041
|
const o = {};
|
|
@@ -2038,7 +2045,7 @@ function Ui(e, t, n) {
|
|
|
2038
2045
|
}
|
|
2039
2046
|
return o;
|
|
2040
2047
|
}
|
|
2041
|
-
const
|
|
2048
|
+
const Mi = /* @__PURE__ */ new Set(["type", "name", "id"]);
|
|
2042
2049
|
function qt(e) {
|
|
2043
2050
|
return e.type === "text" && e.hidden === !0;
|
|
2044
2051
|
}
|
|
@@ -2049,7 +2056,7 @@ function Lt(e) {
|
|
|
2049
2056
|
blocks: [e]
|
|
2050
2057
|
}).blocks[0];
|
|
2051
2058
|
}
|
|
2052
|
-
function
|
|
2059
|
+
function Ni(e, t) {
|
|
2053
2060
|
var o, i;
|
|
2054
2061
|
const n = /* @__PURE__ */ new Map();
|
|
2055
2062
|
for (const s of t) {
|
|
@@ -2058,11 +2065,11 @@ function Mi(e, t) {
|
|
|
2058
2065
|
}
|
|
2059
2066
|
const r = [];
|
|
2060
2067
|
for (const s of e.blocks) {
|
|
2061
|
-
if (
|
|
2068
|
+
if (In(s.type)) {
|
|
2062
2069
|
r.push(Lt(s));
|
|
2063
2070
|
continue;
|
|
2064
2071
|
}
|
|
2065
|
-
if (!
|
|
2072
|
+
if (!ue(s.type)) continue;
|
|
2066
2073
|
const a = (i = s.name) == null ? void 0 : i.trim();
|
|
2067
2074
|
if (!a) continue;
|
|
2068
2075
|
const l = n.get(a);
|
|
@@ -2070,7 +2077,7 @@ function Mi(e, t) {
|
|
|
2070
2077
|
}
|
|
2071
2078
|
return r;
|
|
2072
2079
|
}
|
|
2073
|
-
function
|
|
2080
|
+
function Ei(e, t, n) {
|
|
2074
2081
|
const r = e.rawBlocks;
|
|
2075
2082
|
if (!(r != null && r.length)) return n;
|
|
2076
2083
|
for (const o of r) {
|
|
@@ -2079,11 +2086,11 @@ function Ni(e, t, n) {
|
|
|
2079
2086
|
}
|
|
2080
2087
|
return n;
|
|
2081
2088
|
}
|
|
2082
|
-
function
|
|
2089
|
+
function Ri(e, t) {
|
|
2083
2090
|
var r;
|
|
2084
2091
|
const n = { ...e };
|
|
2085
2092
|
for (const o of Object.keys(t)) {
|
|
2086
|
-
if (
|
|
2093
|
+
if (Mi.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
|
|
2087
2094
|
const i = t[o];
|
|
2088
2095
|
i !== void 0 && Object.assign(n, { [o]: i });
|
|
2089
2096
|
}
|
|
@@ -2107,32 +2114,32 @@ function rt(e) {
|
|
|
2107
2114
|
rawBlocks: n
|
|
2108
2115
|
};
|
|
2109
2116
|
}
|
|
2110
|
-
function
|
|
2117
|
+
function wi(e, t) {
|
|
2111
2118
|
var i, s, a, l, c, m;
|
|
2112
2119
|
const n = /* @__PURE__ */ new Map();
|
|
2113
2120
|
for (const d of (t == null ? void 0 : t.blocks) ?? [])
|
|
2114
|
-
|
|
2121
|
+
ue(d.type) && ((i = d.name) != null && i.trim()) && n.set(d.name.trim(), d);
|
|
2115
2122
|
const r = [], o = [];
|
|
2116
2123
|
for (const d of e.blocks) {
|
|
2117
|
-
if (!
|
|
2118
|
-
const
|
|
2119
|
-
if (!
|
|
2120
|
-
const
|
|
2121
|
-
if (
|
|
2122
|
-
const b =
|
|
2123
|
-
r.push(
|
|
2124
|
+
if (!ue(d.type)) continue;
|
|
2125
|
+
const v = (s = d.name) == null ? void 0 : s.trim();
|
|
2126
|
+
if (!v) continue;
|
|
2127
|
+
const p = n.get(v);
|
|
2128
|
+
if (p) {
|
|
2129
|
+
const b = Ei(e, v, d);
|
|
2130
|
+
r.push(Ri(p, b));
|
|
2124
2131
|
} else
|
|
2125
2132
|
o.push(Lt(d));
|
|
2126
2133
|
}
|
|
2127
2134
|
return {
|
|
2128
2135
|
matchedBlocks: r,
|
|
2129
2136
|
extraBlocks: o,
|
|
2130
|
-
renderBlocks:
|
|
2137
|
+
renderBlocks: Ni(e, r),
|
|
2131
2138
|
title: ((a = e.title) == null ? void 0 : a.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
|
|
2132
2139
|
description: ((c = e.description) == null ? void 0 : c.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
|
|
2133
2140
|
};
|
|
2134
2141
|
}
|
|
2135
|
-
function
|
|
2142
|
+
function Qn(e) {
|
|
2136
2143
|
const { type: t, defaultValue: n } = e;
|
|
2137
2144
|
return n !== void 0 ? t === "toggle" ? n === !0 || n === "true" : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? Array.isArray(n) ? n.map(String) : typeof n == "string" && n ? [n] : [] : n : t === "toggle" ? !1 : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? [] : t === "number" ? null : "";
|
|
2138
2145
|
}
|
|
@@ -2140,9 +2147,9 @@ function et(e) {
|
|
|
2140
2147
|
var n;
|
|
2141
2148
|
const t = {};
|
|
2142
2149
|
for (const r of e) {
|
|
2143
|
-
if (!
|
|
2150
|
+
if (!ue(r.type) || !ke(r)) continue;
|
|
2144
2151
|
const o = (n = r.name) == null ? void 0 : n.trim();
|
|
2145
|
-
o && (t[o] =
|
|
2152
|
+
o && (t[o] = Qn(r));
|
|
2146
2153
|
}
|
|
2147
2154
|
return t;
|
|
2148
2155
|
}
|
|
@@ -2150,77 +2157,77 @@ function Pi(e) {
|
|
|
2150
2157
|
return e.blocks.some(
|
|
2151
2158
|
(t) => {
|
|
2152
2159
|
var n;
|
|
2153
|
-
return
|
|
2160
|
+
return ue(t.type) && !!((n = t.name) != null && n.trim()) && ke(t);
|
|
2154
2161
|
}
|
|
2155
2162
|
);
|
|
2156
2163
|
}
|
|
2157
|
-
function
|
|
2164
|
+
function zi(e) {
|
|
2158
2165
|
return e.blocks.filter((t) => {
|
|
2159
2166
|
var n;
|
|
2160
|
-
return
|
|
2167
|
+
return In(t.type) ? !0 : !ue(t.type) || !((n = t.name) != null && n.trim()) || !ke(t) ? !1 : !qt(t);
|
|
2161
2168
|
});
|
|
2162
2169
|
}
|
|
2163
|
-
function
|
|
2170
|
+
function Ua(e) {
|
|
2164
2171
|
return e.blocks.filter(
|
|
2165
2172
|
(t) => {
|
|
2166
2173
|
var n;
|
|
2167
|
-
return
|
|
2174
|
+
return ue(t.type) && ((n = t.name) == null ? void 0 : n.trim()) && ke(t);
|
|
2168
2175
|
}
|
|
2169
2176
|
).map((t) => t.name.trim());
|
|
2170
2177
|
}
|
|
2171
|
-
function
|
|
2178
|
+
function Oi(e) {
|
|
2172
2179
|
var n;
|
|
2173
2180
|
const t = {};
|
|
2174
2181
|
for (const r of e.blocks) {
|
|
2175
2182
|
if (!qt(r)) continue;
|
|
2176
2183
|
const o = (n = r.name) == null ? void 0 : n.trim();
|
|
2177
|
-
o && (t[o] =
|
|
2184
|
+
o && (t[o] = Qn(r));
|
|
2178
2185
|
}
|
|
2179
2186
|
return t;
|
|
2180
2187
|
}
|
|
2181
2188
|
function Bt(e) {
|
|
2182
2189
|
return e.replace(/'/g, "'\\''");
|
|
2183
2190
|
}
|
|
2184
|
-
function
|
|
2191
|
+
function Xn(e) {
|
|
2185
2192
|
var n;
|
|
2186
2193
|
const t = (n = e == null ? void 0 : e.Authorization) == null ? void 0 : n.trim();
|
|
2187
2194
|
return t ? ` -H 'Authorization: ${Bt(t)}' \\` : " -H 'Authorization: Bearer <token>' \\";
|
|
2188
2195
|
}
|
|
2189
|
-
function
|
|
2196
|
+
function Zn(e, t, n) {
|
|
2190
2197
|
const r = (t ?? "").trim() || "<callback_url>", o = JSON.stringify(e ?? {}, null, 2);
|
|
2191
2198
|
return [
|
|
2192
2199
|
`curl -X POST '${r}' \\`,
|
|
2193
2200
|
" -H 'Content-Type: application/json' \\",
|
|
2194
|
-
|
|
2201
|
+
Xn(n),
|
|
2195
2202
|
` -d '${Bt(o)}'`
|
|
2196
2203
|
].join(`
|
|
2197
2204
|
`);
|
|
2198
2205
|
}
|
|
2199
|
-
function
|
|
2206
|
+
function qi(e, t) {
|
|
2200
2207
|
return JSON.stringify({ ...e, ...t }, null, 2);
|
|
2201
2208
|
}
|
|
2202
|
-
function
|
|
2209
|
+
function Li({
|
|
2203
2210
|
cardValues: e,
|
|
2204
2211
|
extraValues: t = {},
|
|
2205
2212
|
callbackUrl: n,
|
|
2206
2213
|
headers: r
|
|
2207
2214
|
}) {
|
|
2208
|
-
const o = (n ?? "").trim() || "<callback_url>", i =
|
|
2215
|
+
const o = (n ?? "").trim() || "<callback_url>", i = qi(e, t);
|
|
2209
2216
|
return [
|
|
2210
2217
|
`curl -X POST '${o}' \\`,
|
|
2211
2218
|
" -H 'Content-Type: application/json' \\",
|
|
2212
|
-
|
|
2219
|
+
Xn(r),
|
|
2213
2220
|
` -d '${Bt(i)}'`
|
|
2214
2221
|
].join(`
|
|
2215
2222
|
`);
|
|
2216
2223
|
}
|
|
2217
|
-
function
|
|
2224
|
+
function Ia(e, t, n) {
|
|
2218
2225
|
const r = rt(e);
|
|
2219
|
-
if (!r) return
|
|
2226
|
+
if (!r) return Zn(e, t, n);
|
|
2220
2227
|
const o = et(r.blocks);
|
|
2221
|
-
return
|
|
2228
|
+
return Li({ cardValues: o, callbackUrl: t, headers: n });
|
|
2222
2229
|
}
|
|
2223
|
-
async function
|
|
2230
|
+
async function er(e, t, n) {
|
|
2224
2231
|
const r = e.trim();
|
|
2225
2232
|
if (!r)
|
|
2226
2233
|
throw new Error("callback_url 为空");
|
|
@@ -2247,7 +2254,7 @@ async function Zn(e, t, n) {
|
|
|
2247
2254
|
}
|
|
2248
2255
|
return { ok: i.ok, status: i.status, body: s };
|
|
2249
2256
|
}
|
|
2250
|
-
async function
|
|
2257
|
+
async function Ma(e) {
|
|
2251
2258
|
var n;
|
|
2252
2259
|
if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
|
|
2253
2260
|
await navigator.clipboard.writeText(e);
|
|
@@ -2276,7 +2283,7 @@ async function $e(e) {
|
|
|
2276
2283
|
throw new Error(t.message || `响应缺少 data (${e.status})`);
|
|
2277
2284
|
return t.data;
|
|
2278
2285
|
}
|
|
2279
|
-
const ot = "auth_user",
|
|
2286
|
+
const ot = "auth_user", Bi = "token", Di = "answer_agent_callback_url", Vi = "realtime_ws_url", $i = "skopon_api_base_url", ji = "/api/v1/mock/ask_user_answer_mock", Ge = "/api/v1";
|
|
2280
2287
|
function it(e) {
|
|
2281
2288
|
if (typeof window > "u") return null;
|
|
2282
2289
|
try {
|
|
@@ -2302,8 +2309,8 @@ function Ct() {
|
|
|
2302
2309
|
return Ge;
|
|
2303
2310
|
}
|
|
2304
2311
|
}
|
|
2305
|
-
function
|
|
2306
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.skoponApiBaseUrlField ??
|
|
2312
|
+
function Hi(e = {}) {
|
|
2313
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.skoponApiBaseUrlField ?? $i, o = it(t);
|
|
2307
2314
|
let i = null;
|
|
2308
2315
|
try {
|
|
2309
2316
|
i = (o == null ? void 0 : o.getItem(n)) ?? null;
|
|
@@ -2327,24 +2334,24 @@ function ji(e = {}) {
|
|
|
2327
2334
|
throw new Error("skopon_api_base_url 格式无效,无法上传文件");
|
|
2328
2335
|
}
|
|
2329
2336
|
}
|
|
2330
|
-
function
|
|
2337
|
+
function Ki(e, t) {
|
|
2331
2338
|
const n = st(e);
|
|
2332
2339
|
if (!n) return "";
|
|
2333
2340
|
const r = n[t];
|
|
2334
2341
|
return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
|
|
2335
2342
|
}
|
|
2336
|
-
function
|
|
2337
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.answerAgentCallbackUrlField ??
|
|
2343
|
+
function Wi(e = {}) {
|
|
2344
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.answerAgentCallbackUrlField ?? Di, o = it(t);
|
|
2338
2345
|
if (!o) return "";
|
|
2339
2346
|
const i = o.getItem(n);
|
|
2340
2347
|
if (!i) return "";
|
|
2341
2348
|
const s = st(i);
|
|
2342
2349
|
if (!s) return "";
|
|
2343
2350
|
const a = s[r];
|
|
2344
|
-
return (typeof a == "string" ? a.trim() : "") ||
|
|
2351
|
+
return (typeof a == "string" ? a.trim() : "") || ji;
|
|
2345
2352
|
}
|
|
2346
|
-
function
|
|
2347
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.realtimeWsUrlField ??
|
|
2353
|
+
function Gi(e = {}) {
|
|
2354
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.realtimeWsUrlField ?? Vi, o = it(t);
|
|
2348
2355
|
if (!o) return "";
|
|
2349
2356
|
const i = o.getItem(n);
|
|
2350
2357
|
if (!i) return "";
|
|
@@ -2360,17 +2367,17 @@ function Dt(e, t) {
|
|
|
2360
2367
|
};
|
|
2361
2368
|
}
|
|
2362
2369
|
function Vt(e = {}) {
|
|
2363
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.tokenField ??
|
|
2370
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.tokenField ?? Bi, o = it(t);
|
|
2364
2371
|
if (!o) return {};
|
|
2365
2372
|
const i = o.getItem(n);
|
|
2366
2373
|
if (!i) return {};
|
|
2367
|
-
const s =
|
|
2374
|
+
const s = Ki(i, r);
|
|
2368
2375
|
return s ? { Authorization: `Bearer ${s}` } : {};
|
|
2369
2376
|
}
|
|
2370
2377
|
async function at(e = {}) {
|
|
2371
2378
|
return e.getHeaders ? await e.getHeaders() ?? {} : Vt(e.authStorage);
|
|
2372
2379
|
}
|
|
2373
|
-
function
|
|
2380
|
+
function Ji(e = {}) {
|
|
2374
2381
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
|
|
2375
2382
|
async function o(i) {
|
|
2376
2383
|
const s = new URLSearchParams();
|
|
@@ -2383,18 +2390,18 @@ function Gi(e = {}) {
|
|
|
2383
2390
|
const a = await at(e), l = await r(`${t}${n}?${s.toString()}`, {
|
|
2384
2391
|
method: "GET",
|
|
2385
2392
|
headers: a
|
|
2386
|
-
}), c = await $e(l), m =
|
|
2393
|
+
}), c = await $e(l), m = Ui(c.form_definition);
|
|
2387
2394
|
return {
|
|
2388
2395
|
formUniqueId: c.form_unique_id,
|
|
2389
2396
|
formId: c.form_id,
|
|
2390
2397
|
disabled: c.disabled === 1,
|
|
2391
2398
|
formDefinition: m,
|
|
2392
|
-
a2ui:
|
|
2399
|
+
a2ui: xi(c.form_definition) ?? void 0
|
|
2393
2400
|
};
|
|
2394
2401
|
}
|
|
2395
2402
|
return { fetchDetail: o };
|
|
2396
2403
|
}
|
|
2397
|
-
function
|
|
2404
|
+
function Yi(e) {
|
|
2398
2405
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2399
2406
|
return e ?? null;
|
|
2400
2407
|
const t = e;
|
|
@@ -2410,7 +2417,7 @@ function $t({
|
|
|
2410
2417
|
form: n,
|
|
2411
2418
|
answer: r
|
|
2412
2419
|
}) {
|
|
2413
|
-
const o = rt(t) ?? t, i = n ?
|
|
2420
|
+
const o = rt(t) ?? t, i = n ? Yi(n) : o;
|
|
2414
2421
|
return {
|
|
2415
2422
|
mission_id: e.missionId ?? null,
|
|
2416
2423
|
tenant_id: e.tenantId ?? null,
|
|
@@ -2438,7 +2445,7 @@ function jt(e) {
|
|
|
2438
2445
|
const o = e.mission_id;
|
|
2439
2446
|
return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
|
|
2440
2447
|
}
|
|
2441
|
-
function
|
|
2448
|
+
function Na(e) {
|
|
2442
2449
|
return jt(
|
|
2443
2450
|
$t({
|
|
2444
2451
|
context: e,
|
|
@@ -2447,25 +2454,25 @@ function Ma(e) {
|
|
|
2447
2454
|
})
|
|
2448
2455
|
);
|
|
2449
2456
|
}
|
|
2450
|
-
const
|
|
2451
|
-
function
|
|
2457
|
+
const yn = "answer_agent_callback_url 未配置,无法提交";
|
|
2458
|
+
function Qi(e) {
|
|
2452
2459
|
if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
|
|
2453
2460
|
const n = e.answerAgentCallbackUrl.trim();
|
|
2454
2461
|
if (!n)
|
|
2455
|
-
throw new Error(
|
|
2462
|
+
throw new Error(yn);
|
|
2456
2463
|
return n;
|
|
2457
2464
|
}
|
|
2458
|
-
const t =
|
|
2465
|
+
const t = Wi(e == null ? void 0 : e.authStorage).trim();
|
|
2459
2466
|
if (!t)
|
|
2460
|
-
throw new Error(
|
|
2467
|
+
throw new Error(yn);
|
|
2461
2468
|
return t;
|
|
2462
2469
|
}
|
|
2463
|
-
function
|
|
2470
|
+
function tr(e) {
|
|
2464
2471
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
2465
2472
|
const n = e.data;
|
|
2466
2473
|
return !n || typeof n != "object" || Array.isArray(n) ? null : n;
|
|
2467
2474
|
}
|
|
2468
|
-
function
|
|
2475
|
+
function Xi(e, t) {
|
|
2469
2476
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
2470
2477
|
const n = t.message;
|
|
2471
2478
|
if (typeof n == "string" && n.trim())
|
|
@@ -2473,27 +2480,27 @@ function Qi(e, t) {
|
|
|
2473
2480
|
}
|
|
2474
2481
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
2475
2482
|
}
|
|
2476
|
-
function
|
|
2483
|
+
function Zi(e) {
|
|
2477
2484
|
return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
|
|
2478
2485
|
}
|
|
2479
|
-
function
|
|
2480
|
-
const t =
|
|
2481
|
-
return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message:
|
|
2486
|
+
function nr(e) {
|
|
2487
|
+
const t = tr(e.body);
|
|
2488
|
+
return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: Zi(t) } : e.ok ? { type: "success", message: "提交成功" } : {
|
|
2482
2489
|
type: "error",
|
|
2483
|
-
message:
|
|
2490
|
+
message: Xi(e.status, e.body)
|
|
2484
2491
|
};
|
|
2485
2492
|
}
|
|
2486
|
-
async function
|
|
2493
|
+
async function rr(e, t) {
|
|
2487
2494
|
const n = jt(e);
|
|
2488
2495
|
if (n)
|
|
2489
2496
|
throw new Error(n);
|
|
2490
|
-
const r =
|
|
2497
|
+
const r = Qi(t), o = await er(r, e, {
|
|
2491
2498
|
...t,
|
|
2492
2499
|
headers: Dt(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
|
|
2493
|
-
}), i =
|
|
2500
|
+
}), i = tr(o.body);
|
|
2494
2501
|
return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
|
|
2495
2502
|
}
|
|
2496
|
-
function
|
|
2503
|
+
function es(e) {
|
|
2497
2504
|
return {
|
|
2498
2505
|
resumeUniqueId: e.resume_unique_id,
|
|
2499
2506
|
resumeId: e.resume_id,
|
|
@@ -2514,7 +2521,7 @@ function Zi(e) {
|
|
|
2514
2521
|
}))
|
|
2515
2522
|
};
|
|
2516
2523
|
}
|
|
2517
|
-
function
|
|
2524
|
+
function ts(e, t, n) {
|
|
2518
2525
|
var i;
|
|
2519
2526
|
const r = new URLSearchParams();
|
|
2520
2527
|
r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20));
|
|
@@ -2532,41 +2539,41 @@ function es(e, t, n) {
|
|
|
2532
2539
|
r.append("published", String(s));
|
|
2533
2540
|
return r;
|
|
2534
2541
|
}
|
|
2535
|
-
function
|
|
2542
|
+
function ns(e = {}) {
|
|
2536
2543
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch, o = e.published ?? [1];
|
|
2537
2544
|
return async ({ filter: i, page: s }) => {
|
|
2538
|
-
const a = await at(e), l =
|
|
2545
|
+
const a = await at(e), l = ts(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
|
|
2539
2546
|
method: "GET",
|
|
2540
2547
|
headers: a
|
|
2541
2548
|
}), m = await $e(c);
|
|
2542
2549
|
return {
|
|
2543
|
-
list: (m.list ?? []).map(
|
|
2550
|
+
list: (m.list ?? []).map(es),
|
|
2544
2551
|
total: m.total ?? 0,
|
|
2545
2552
|
page: m.page ?? s,
|
|
2546
2553
|
pageSize: m.page_size ?? i.pageSize ?? 20
|
|
2547
2554
|
};
|
|
2548
2555
|
};
|
|
2549
2556
|
}
|
|
2550
|
-
const
|
|
2551
|
-
function
|
|
2557
|
+
const vn = "content-production";
|
|
2558
|
+
function rs(e) {
|
|
2552
2559
|
return (e ?? []).map((t) => {
|
|
2553
2560
|
const n = (t.mime_type ?? t.mimeType ?? "").trim().toLowerCase(), o = (t.type ?? "").trim().toLowerCase() || (n.startsWith("video/") ? "video" : n.startsWith("image/") ? "image" : ""), i = (t.url ?? t.dataUrl ?? t.data_url ?? "").trim();
|
|
2554
2561
|
return { type: o, mime: n, url: i };
|
|
2555
2562
|
}).filter((t) => t.url);
|
|
2556
2563
|
}
|
|
2557
|
-
function
|
|
2564
|
+
function os(e) {
|
|
2558
2565
|
return e.type === "video" || e.type === "视频" || e.mime.startsWith("video/");
|
|
2559
2566
|
}
|
|
2560
|
-
function
|
|
2567
|
+
function is(e) {
|
|
2561
2568
|
return e.type === "image" || e.type === "图片" || e.mime.startsWith("image/") || e.type === "";
|
|
2562
2569
|
}
|
|
2563
|
-
function
|
|
2564
|
-
const t =
|
|
2570
|
+
function ss(e) {
|
|
2571
|
+
const t = rs(e), n = t.find(os), r = t.find(is);
|
|
2565
2572
|
return n ? { coverUrl: (r == null ? void 0 : r.url) ?? null, mediaUrl: n.url, mediaKind: "video" } : r ? { coverUrl: r.url, mediaUrl: null, mediaKind: "image" } : { coverUrl: null, mediaUrl: null, mediaKind: null };
|
|
2566
2573
|
}
|
|
2567
|
-
function
|
|
2574
|
+
function as(e) {
|
|
2568
2575
|
var i, s, a;
|
|
2569
|
-
const t = ((i = e.name) == null ? void 0 : i.trim()) || "未命名内容", n = (s = e.cases) == null ? void 0 : s[0], r = (a = n == null ? void 0 : n.name) == null ? void 0 : a.trim(), o =
|
|
2576
|
+
const t = ((i = e.name) == null ? void 0 : i.trim()) || "未命名内容", n = (s = e.cases) == null ? void 0 : s[0], r = (a = n == null ? void 0 : n.name) == null ? void 0 : a.trim(), o = ss(n == null ? void 0 : n.attachments_json);
|
|
2570
2577
|
return {
|
|
2571
2578
|
flowUniqueId: e.flow_unique_id,
|
|
2572
2579
|
flowId: e.flow_id,
|
|
@@ -2581,38 +2588,38 @@ function ss(e) {
|
|
|
2581
2588
|
link: n == null ? void 0 : n.link
|
|
2582
2589
|
};
|
|
2583
2590
|
}
|
|
2584
|
-
function
|
|
2591
|
+
function ls(e, t, n) {
|
|
2585
2592
|
var o;
|
|
2586
2593
|
const r = new URLSearchParams();
|
|
2587
|
-
r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20)), r.set("owner_scope", "content"), r.set("published", String(n)), r.set("flow_type", (e.flowType ??
|
|
2594
|
+
r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20)), r.set("owner_scope", "content"), r.set("published", String(n)), r.set("flow_type", (e.flowType ?? vn).trim() || vn), (o = e.category) != null && o.trim() && r.set("category_unique_id", e.category.trim());
|
|
2588
2595
|
for (const i of e.tagUniqueIds ?? [])
|
|
2589
2596
|
i && r.append("tag_unique_ids", i);
|
|
2590
2597
|
return r.set("tag_match", e.tagMatch === "any" ? "any" : "all"), r;
|
|
2591
2598
|
}
|
|
2592
|
-
function
|
|
2599
|
+
function cs(e = {}) {
|
|
2593
2600
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/flow/list", r = e.fetch ?? fetch, o = e.published ?? 1;
|
|
2594
2601
|
return async ({ filter: i, page: s }) => {
|
|
2595
2602
|
const a = await at(e), c = await (async (m) => {
|
|
2596
|
-
const d =
|
|
2603
|
+
const d = ls(m, s, o), v = await r(`${t}${n}?${d.toString()}`, {
|
|
2597
2604
|
method: "GET",
|
|
2598
2605
|
headers: a
|
|
2599
2606
|
});
|
|
2600
|
-
return $e(
|
|
2607
|
+
return $e(v);
|
|
2601
2608
|
})(i);
|
|
2602
2609
|
return {
|
|
2603
|
-
list: (c.list ?? []).map(
|
|
2610
|
+
list: (c.list ?? []).map(as),
|
|
2604
2611
|
total: c.total ?? 0,
|
|
2605
2612
|
page: c.page ?? s,
|
|
2606
2613
|
pageSize: c.page_size ?? i.pageSize ?? 20
|
|
2607
2614
|
};
|
|
2608
2615
|
};
|
|
2609
2616
|
}
|
|
2610
|
-
function
|
|
2617
|
+
function us(e) {
|
|
2611
2618
|
var r, o, i, s;
|
|
2612
2619
|
const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!((o = e.agentUniqueId) != null && o.trim() && ((i = e.flowType) != null && i.trim()) && ((s = e.category) != null && s.trim()));
|
|
2613
2620
|
return t || n;
|
|
2614
2621
|
}
|
|
2615
|
-
function
|
|
2622
|
+
function ms(e) {
|
|
2616
2623
|
return {
|
|
2617
2624
|
caseUniqueId: e.case_unique_id,
|
|
2618
2625
|
caseId: e.case_id,
|
|
@@ -2623,7 +2630,7 @@ function us(e) {
|
|
|
2623
2630
|
description: e.description ?? void 0
|
|
2624
2631
|
};
|
|
2625
2632
|
}
|
|
2626
|
-
function
|
|
2633
|
+
function ds(e, t, n) {
|
|
2627
2634
|
var o, i, s;
|
|
2628
2635
|
const r = new URLSearchParams();
|
|
2629
2636
|
r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20)), r.set("published", String(n)), (o = e.agentUniqueId) != null && o.trim() && r.set("agent_unique_id", e.agentUniqueId.trim()), (i = e.flowType) != null && i.trim() && r.set("flow_type", e.flowType.trim()), (s = e.category) != null && s.trim() && r.set("category_unique_id", e.category.trim());
|
|
@@ -2631,24 +2638,24 @@ function ms(e, t, n) {
|
|
|
2631
2638
|
a && r.append("flow_unique_ids", a);
|
|
2632
2639
|
return r;
|
|
2633
2640
|
}
|
|
2634
|
-
function
|
|
2641
|
+
function ps(e = {}) {
|
|
2635
2642
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
|
|
2636
2643
|
return async ({ filter: i, page: s }) => {
|
|
2637
|
-
if (!
|
|
2644
|
+
if (!us(i))
|
|
2638
2645
|
return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
|
|
2639
|
-
const a = await at(e), l =
|
|
2646
|
+
const a = await at(e), l = ds(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
|
|
2640
2647
|
method: "GET",
|
|
2641
2648
|
headers: a
|
|
2642
2649
|
}), m = await $e(c);
|
|
2643
2650
|
return {
|
|
2644
|
-
list: (m.list ?? []).map(
|
|
2651
|
+
list: (m.list ?? []).map(ms),
|
|
2645
2652
|
total: m.total ?? 0,
|
|
2646
2653
|
page: m.page ?? s,
|
|
2647
2654
|
pageSize: m.page_size ?? i.pageSize ?? 20
|
|
2648
2655
|
};
|
|
2649
2656
|
};
|
|
2650
2657
|
}
|
|
2651
|
-
function
|
|
2658
|
+
function Ea(e = {}) {
|
|
2652
2659
|
var r, o, i, s, a, l, c;
|
|
2653
2660
|
const t = {
|
|
2654
2661
|
baseUrl: e.baseUrl,
|
|
@@ -2657,28 +2664,28 @@ function Na(e = {}) {
|
|
|
2657
2664
|
authStorage: e.authStorage
|
|
2658
2665
|
};
|
|
2659
2666
|
return {
|
|
2660
|
-
fetchDetail:
|
|
2667
|
+
fetchDetail: Ji({
|
|
2661
2668
|
...t,
|
|
2662
2669
|
detailPath: (r = e.form) == null ? void 0 : r.detailPath
|
|
2663
2670
|
}).fetchDetail,
|
|
2664
|
-
resumeSearch:
|
|
2671
|
+
resumeSearch: ns({
|
|
2665
2672
|
...t,
|
|
2666
2673
|
searchPath: (o = e.resume) == null ? void 0 : o.searchPath,
|
|
2667
2674
|
published: (i = e.resume) == null ? void 0 : i.published
|
|
2668
2675
|
}),
|
|
2669
|
-
contentSearch:
|
|
2676
|
+
contentSearch: cs({
|
|
2670
2677
|
...t,
|
|
2671
2678
|
listPath: (s = e.content) == null ? void 0 : s.listPath,
|
|
2672
2679
|
published: (a = e.content) == null ? void 0 : a.published
|
|
2673
2680
|
}),
|
|
2674
|
-
caseSearch:
|
|
2681
|
+
caseSearch: ps({
|
|
2675
2682
|
...t,
|
|
2676
2683
|
listPath: (l = e.case) == null ? void 0 : l.listPath,
|
|
2677
2684
|
published: (c = e.case) == null ? void 0 : c.published
|
|
2678
2685
|
})
|
|
2679
2686
|
};
|
|
2680
2687
|
}
|
|
2681
|
-
function
|
|
2688
|
+
function or(e, t) {
|
|
2682
2689
|
if (!t.trim()) return !0;
|
|
2683
2690
|
try {
|
|
2684
2691
|
return new RegExp(t).test(e);
|
|
@@ -2686,7 +2693,7 @@ function rr(e, t) {
|
|
|
2686
2693
|
return !0;
|
|
2687
2694
|
}
|
|
2688
2695
|
}
|
|
2689
|
-
function
|
|
2696
|
+
function ir(e) {
|
|
2690
2697
|
return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
|
|
2691
2698
|
}
|
|
2692
2699
|
function fs(e, t) {
|
|
@@ -2696,34 +2703,34 @@ function fs(e, t) {
|
|
|
2696
2703
|
case "file":
|
|
2697
2704
|
case "resume_multiselect":
|
|
2698
2705
|
case "case_multiselect":
|
|
2699
|
-
return
|
|
2706
|
+
return me(t).length === 0;
|
|
2700
2707
|
case "toggle":
|
|
2701
2708
|
return !Ve(t);
|
|
2702
2709
|
case "number":
|
|
2703
2710
|
return t == null || t === "";
|
|
2704
2711
|
default:
|
|
2705
|
-
return
|
|
2712
|
+
return ir(t);
|
|
2706
2713
|
}
|
|
2707
2714
|
}
|
|
2708
2715
|
function At(e, t) {
|
|
2709
2716
|
return e.required === !0 || t > 0;
|
|
2710
2717
|
}
|
|
2711
|
-
function
|
|
2718
|
+
function hs(e, t) {
|
|
2712
2719
|
var n, r;
|
|
2713
2720
|
for (const o of e) {
|
|
2714
|
-
if (!
|
|
2721
|
+
if (!ue(o.type)) continue;
|
|
2715
2722
|
const i = (n = o.name) == null ? void 0 : n.trim();
|
|
2716
2723
|
if (!i) continue;
|
|
2717
2724
|
const s = t[i], a = ((r = o.label) == null ? void 0 : r.trim()) || i;
|
|
2718
2725
|
if (o.required && fs(o, s))
|
|
2719
2726
|
return { fieldName: i, label: a, message: `请填写「${a}」` };
|
|
2720
|
-
if (o.type === "email" && !
|
|
2727
|
+
if (o.type === "email" && !ir(s)) {
|
|
2721
2728
|
const l = String(s).trim();
|
|
2722
|
-
if (!
|
|
2729
|
+
if (!or(l, Ot))
|
|
2723
2730
|
return { fieldName: i, label: a, message: `「${a}」格式不正确` };
|
|
2724
2731
|
}
|
|
2725
2732
|
if (o.type === "file") {
|
|
2726
|
-
const l = o.fileMinCount ?? 0, c =
|
|
2733
|
+
const l = o.fileMinCount ?? 0, c = me(s).length;
|
|
2727
2734
|
if (l > 0 && c < l && At(o, c))
|
|
2728
2735
|
return {
|
|
2729
2736
|
fieldName: i,
|
|
@@ -2732,7 +2739,7 @@ function ps(e, t) {
|
|
|
2732
2739
|
};
|
|
2733
2740
|
}
|
|
2734
2741
|
if (o.type === "resume_multiselect") {
|
|
2735
|
-
const l = o.resumeMinCount, c =
|
|
2742
|
+
const l = o.resumeMinCount, c = me(s).length;
|
|
2736
2743
|
if (l !== void 0 && c < l && At(o, c))
|
|
2737
2744
|
return {
|
|
2738
2745
|
fieldName: i,
|
|
@@ -2741,7 +2748,7 @@ function ps(e, t) {
|
|
|
2741
2748
|
};
|
|
2742
2749
|
}
|
|
2743
2750
|
if (o.type === "case_multiselect") {
|
|
2744
|
-
const l = o.caseMinCount, c =
|
|
2751
|
+
const l = o.caseMinCount, c = me(s).length;
|
|
2745
2752
|
if (l !== void 0 && c < l && At(o, c))
|
|
2746
2753
|
return {
|
|
2747
2754
|
fieldName: i,
|
|
@@ -2752,20 +2759,20 @@ function ps(e, t) {
|
|
|
2752
2759
|
}
|
|
2753
2760
|
return null;
|
|
2754
2761
|
}
|
|
2755
|
-
const
|
|
2762
|
+
const gs = {
|
|
2756
2763
|
video: Pr,
|
|
2757
|
-
audio:
|
|
2758
|
-
image:
|
|
2759
|
-
file:
|
|
2760
|
-
spreadsheet:
|
|
2761
|
-
document:
|
|
2764
|
+
audio: wr,
|
|
2765
|
+
image: Rr,
|
|
2766
|
+
file: kn,
|
|
2767
|
+
spreadsheet: Er,
|
|
2768
|
+
document: An
|
|
2762
2769
|
};
|
|
2763
|
-
function
|
|
2770
|
+
function ys({
|
|
2764
2771
|
type: e,
|
|
2765
2772
|
size: t = 40,
|
|
2766
2773
|
className: n
|
|
2767
2774
|
}) {
|
|
2768
|
-
const r =
|
|
2775
|
+
const r = gs[e] ?? kn;
|
|
2769
2776
|
return /* @__PURE__ */ u(
|
|
2770
2777
|
r,
|
|
2771
2778
|
{
|
|
@@ -2775,24 +2782,24 @@ function gs({
|
|
|
2775
2782
|
}
|
|
2776
2783
|
);
|
|
2777
2784
|
}
|
|
2778
|
-
const
|
|
2779
|
-
class
|
|
2785
|
+
const vs = "/univ/upload/cdn", Ss = 12e4;
|
|
2786
|
+
class sr extends Error {
|
|
2780
2787
|
constructor(t = "上传已取消") {
|
|
2781
2788
|
super(t), this.name = "UploadCancelledError";
|
|
2782
2789
|
}
|
|
2783
2790
|
}
|
|
2784
2791
|
function bs(e) {
|
|
2785
|
-
return e instanceof
|
|
2792
|
+
return e instanceof sr;
|
|
2786
2793
|
}
|
|
2787
|
-
async function
|
|
2794
|
+
async function Cs(e, t = {}) {
|
|
2788
2795
|
var a, l, c;
|
|
2789
|
-
const n = `${
|
|
2796
|
+
const n = `${Hi()}${vs}`, r = new AbortController();
|
|
2790
2797
|
let o = !1;
|
|
2791
2798
|
const i = () => r.abort();
|
|
2792
2799
|
(a = t.signal) != null && a.aborted ? r.abort() : (l = t.signal) == null || l.addEventListener("abort", i, { once: !0 });
|
|
2793
2800
|
const s = setTimeout(() => {
|
|
2794
2801
|
o = !0, r.abort();
|
|
2795
|
-
},
|
|
2802
|
+
}, Ss);
|
|
2796
2803
|
try {
|
|
2797
2804
|
const m = new FormData();
|
|
2798
2805
|
m.append("file", e);
|
|
@@ -2801,16 +2808,16 @@ async function Ss(e, t = {}) {
|
|
|
2801
2808
|
headers: Vt(),
|
|
2802
2809
|
body: m,
|
|
2803
2810
|
signal: r.signal
|
|
2804
|
-
}),
|
|
2805
|
-
if (!
|
|
2806
|
-
return { ...
|
|
2811
|
+
}), v = await $e(d), p = typeof v.url == "string" ? v.url.trim() : "";
|
|
2812
|
+
if (!p) throw new Error("上传成功但响应缺少文件地址");
|
|
2813
|
+
return { ...v, url: p };
|
|
2807
2814
|
} catch (m) {
|
|
2808
|
-
throw r.signal.aborted ? o ? new Error("上传超时,请稍后重试") : new
|
|
2815
|
+
throw r.signal.aborted ? o ? new Error("上传超时,请稍后重试") : new sr() : m;
|
|
2809
2816
|
} finally {
|
|
2810
2817
|
clearTimeout(s), (c = t.signal) == null || c.removeEventListener("abort", i);
|
|
2811
2818
|
}
|
|
2812
2819
|
}
|
|
2813
|
-
const
|
|
2820
|
+
const ar = Ce({
|
|
2814
2821
|
beginUpload: () => () => {
|
|
2815
2822
|
}
|
|
2816
2823
|
});
|
|
@@ -2818,11 +2825,11 @@ function Et({
|
|
|
2818
2825
|
children: e,
|
|
2819
2826
|
onUploadingChange: t
|
|
2820
2827
|
}) {
|
|
2821
|
-
const [n, r] =
|
|
2822
|
-
i.current = t,
|
|
2828
|
+
const [n, r] = R(0), o = _(!0), i = _(t);
|
|
2829
|
+
i.current = t, z(() => (o.current = !0, () => {
|
|
2823
2830
|
var a;
|
|
2824
2831
|
o.current = !1, (a = i.current) == null || a.call(i, !1);
|
|
2825
|
-
}), []),
|
|
2832
|
+
}), []), z(() => {
|
|
2826
2833
|
t == null || t(n > 0);
|
|
2827
2834
|
}, [n, t]);
|
|
2828
2835
|
const s = V(() => {
|
|
@@ -2832,12 +2839,12 @@ function Et({
|
|
|
2832
2839
|
a || (a = !0, o.current && r((l) => Math.max(0, l - 1)));
|
|
2833
2840
|
};
|
|
2834
2841
|
}, []);
|
|
2835
|
-
return /* @__PURE__ */ u(
|
|
2842
|
+
return /* @__PURE__ */ u(ar.Provider, { value: { beginUpload: s }, children: e });
|
|
2836
2843
|
}
|
|
2837
|
-
function
|
|
2838
|
-
return Ae(
|
|
2844
|
+
function As() {
|
|
2845
|
+
return Ae(ar);
|
|
2839
2846
|
}
|
|
2840
|
-
const
|
|
2847
|
+
const lr = "skopon-form-v0_9", ks = /* @__PURE__ */ new Set([
|
|
2841
2848
|
"SkoponMedia",
|
|
2842
2849
|
"SkoponSelect",
|
|
2843
2850
|
"Image",
|
|
@@ -2849,17 +2856,17 @@ const ar = "skopon-form-v0_9", As = /* @__PURE__ */ new Set([
|
|
|
2849
2856
|
"FileUpload",
|
|
2850
2857
|
"TextField",
|
|
2851
2858
|
"Text",
|
|
2852
|
-
...
|
|
2853
|
-
]),
|
|
2859
|
+
...gi()
|
|
2860
|
+
]), _s = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
|
|
2854
2861
|
function je(e) {
|
|
2855
2862
|
const t = [...Ye.components.values()].find((n) => n.name === e);
|
|
2856
2863
|
if (!t) throw new Error(`Missing basic catalog component: ${e}`);
|
|
2857
2864
|
return t.schema;
|
|
2858
2865
|
}
|
|
2859
|
-
function
|
|
2866
|
+
function L(e) {
|
|
2860
2867
|
return typeof e == "string" ? e : "";
|
|
2861
2868
|
}
|
|
2862
|
-
function
|
|
2869
|
+
function cr(e) {
|
|
2863
2870
|
return ye(e);
|
|
2864
2871
|
}
|
|
2865
2872
|
function lt({
|
|
@@ -2870,8 +2877,8 @@ function lt({
|
|
|
2870
2877
|
help: o,
|
|
2871
2878
|
placeholder: i
|
|
2872
2879
|
}) {
|
|
2873
|
-
const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l =
|
|
2874
|
-
return /* @__PURE__ */
|
|
2880
|
+
const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = ao(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
|
|
2881
|
+
return /* @__PURE__ */ w("div", { className: "form-block-preview", children: [
|
|
2875
2882
|
s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
|
|
2876
2883
|
t.length === 0 ? /* @__PURE__ */ u("div", { className: "form-media-preview form-media-preview--empty", children: c }) : /* @__PURE__ */ u("div", { className: l, children: t.map((m, d) => e === "image" ? /* @__PURE__ */ u(
|
|
2877
2884
|
"img",
|
|
@@ -2898,21 +2905,21 @@ function lt({
|
|
|
2898
2905
|
},
|
|
2899
2906
|
`media-${d}`
|
|
2900
2907
|
)) }),
|
|
2901
|
-
a ? /* @__PURE__ */ u(
|
|
2908
|
+
a ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-help", children: a }) : null
|
|
2902
2909
|
] });
|
|
2903
2910
|
}
|
|
2904
2911
|
function ct(e, t) {
|
|
2905
|
-
const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) :
|
|
2912
|
+
const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : L(e.url).trim() ? [L(e.url).trim()] : [];
|
|
2906
2913
|
return {
|
|
2907
2914
|
mediaType: t,
|
|
2908
2915
|
urls: n,
|
|
2909
2916
|
mediaSize: De(e.mediaSize),
|
|
2910
|
-
label:
|
|
2911
|
-
help:
|
|
2912
|
-
placeholder:
|
|
2917
|
+
label: L(e.label) || L(e.description),
|
|
2918
|
+
help: L(e.help),
|
|
2919
|
+
placeholder: L(e.placeholder)
|
|
2913
2920
|
};
|
|
2914
2921
|
}
|
|
2915
|
-
const
|
|
2922
|
+
const Ts = {
|
|
2916
2923
|
name: "SkoponMedia",
|
|
2917
2924
|
schema: g.object({
|
|
2918
2925
|
mediaType: g.any().optional(),
|
|
@@ -2922,19 +2929,19 @@ const _s = {
|
|
|
2922
2929
|
help: g.any().optional(),
|
|
2923
2930
|
placeholder: g.any().optional()
|
|
2924
2931
|
}).passthrough()
|
|
2925
|
-
},
|
|
2926
|
-
const t = e.componentModel.properties, n =
|
|
2932
|
+
}, xs = ce(Ts, ({ context: e }) => {
|
|
2933
|
+
const t = e.componentModel.properties, n = L(t.mediaType);
|
|
2927
2934
|
return /* @__PURE__ */ u(lt, { ...ct(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
|
|
2928
|
-
}),
|
|
2935
|
+
}), Fs = ce(
|
|
2929
2936
|
{ name: "Image", schema: je("Image") },
|
|
2930
2937
|
({ context: e }) => /* @__PURE__ */ u(lt, { ...ct(e.componentModel.properties, "image") })
|
|
2931
|
-
),
|
|
2938
|
+
), Us = ce(
|
|
2932
2939
|
{ name: "Video", schema: je("Video") },
|
|
2933
2940
|
({ context: e }) => /* @__PURE__ */ u(lt, { ...ct(e.componentModel.properties, "video") })
|
|
2934
|
-
),
|
|
2941
|
+
), Is = ce(
|
|
2935
2942
|
{ name: "AudioPlayer", schema: je("AudioPlayer") },
|
|
2936
2943
|
({ context: e }) => /* @__PURE__ */ u(lt, { ...ct(e.componentModel.properties, "audio") })
|
|
2937
|
-
),
|
|
2944
|
+
), Ms = {
|
|
2938
2945
|
name: "SkoponSelect",
|
|
2939
2946
|
schema: g.object({
|
|
2940
2947
|
label: g.any().optional(),
|
|
@@ -2944,15 +2951,15 @@ const _s = {
|
|
|
2944
2951
|
value: g.any().optional()
|
|
2945
2952
|
}).passthrough()
|
|
2946
2953
|
};
|
|
2947
|
-
function
|
|
2948
|
-
const { interactive: t } = ve(), { value: n, setValue: r, setValueSilent: o, fieldName: i } =
|
|
2954
|
+
function Ns({ context: e }) {
|
|
2955
|
+
const { interactive: t } = ve(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = Se(e, "value", {
|
|
2949
2956
|
component: "SkoponSelect",
|
|
2950
2957
|
changeAction: "select"
|
|
2951
|
-
}), s = e.componentModel.properties, a =
|
|
2952
|
-
return
|
|
2953
|
-
const d =
|
|
2958
|
+
}), s = e.componentModel.properties, a = L(s.label), l = L(s.placeholder), c = cr(s.options), m = L(s.mode) === "multiple";
|
|
2959
|
+
return z(() => {
|
|
2960
|
+
const d = Bn(n, m);
|
|
2954
2961
|
d !== null && o(d);
|
|
2955
|
-
}, [m, n, o]), c.length === 0 ? null : /* @__PURE__ */
|
|
2962
|
+
}, [m, n, o]), c.length === 0 ? null : /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
|
|
2956
2963
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2957
2964
|
/* @__PURE__ */ u(
|
|
2958
2965
|
kt,
|
|
@@ -2964,27 +2971,27 @@ function Ms({ context: e }) {
|
|
|
2964
2971
|
style: { width: "100%" },
|
|
2965
2972
|
placeholder: l || (m ? "请选择多项" : "请选择"),
|
|
2966
2973
|
options: c,
|
|
2967
|
-
value: m ?
|
|
2974
|
+
value: m ? me(n) : ze(n),
|
|
2968
2975
|
onChange: (d) => r(m ? d ?? [] : d ?? "")
|
|
2969
2976
|
}
|
|
2970
2977
|
)
|
|
2971
2978
|
] });
|
|
2972
2979
|
}
|
|
2973
|
-
const
|
|
2974
|
-
|
|
2975
|
-
|
|
2980
|
+
const Es = ce(
|
|
2981
|
+
Ms,
|
|
2982
|
+
Ns
|
|
2976
2983
|
);
|
|
2977
|
-
function
|
|
2978
|
-
const { interactive: t } = ve(), { value: n, setValue: r, setValueSilent: o, fieldName: i } =
|
|
2984
|
+
function Rs({ context: e }) {
|
|
2985
|
+
const { interactive: t } = ve(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = Se(e, "value", {
|
|
2979
2986
|
component: "ChoicePicker",
|
|
2980
2987
|
changeAction: "select"
|
|
2981
|
-
}), s = e.componentModel.properties, a =
|
|
2982
|
-
return
|
|
2983
|
-
const
|
|
2984
|
-
|
|
2985
|
-
}, [b, n, o]), d.length === 0 ? null : /* @__PURE__ */
|
|
2988
|
+
}), s = e.componentModel.properties, a = L(s.label), l = L(s.variant) || "mutuallyExclusive", c = L(s.skoponPickerType), m = L(s.placeholder), d = cr(s.options), p = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", b = p === "multiselect" || p === "checkbox";
|
|
2989
|
+
return z(() => {
|
|
2990
|
+
const y = Bn(n, b);
|
|
2991
|
+
y !== null && o(y);
|
|
2992
|
+
}, [b, n, o]), d.length === 0 ? null : /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
|
|
2986
2993
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2987
|
-
|
|
2994
|
+
p === "select" ? /* @__PURE__ */ u(
|
|
2988
2995
|
kt,
|
|
2989
2996
|
{
|
|
2990
2997
|
disabled: !t,
|
|
@@ -2994,9 +3001,9 @@ function Es({ context: e }) {
|
|
|
2994
3001
|
placeholder: m || "请选择",
|
|
2995
3002
|
options: d,
|
|
2996
3003
|
value: ze(n),
|
|
2997
|
-
onChange: (
|
|
3004
|
+
onChange: (y) => r(y ?? "")
|
|
2998
3005
|
}
|
|
2999
|
-
) :
|
|
3006
|
+
) : p === "multiselect" ? /* @__PURE__ */ u(
|
|
3000
3007
|
kt,
|
|
3001
3008
|
{
|
|
3002
3009
|
mode: "multiple",
|
|
@@ -3006,31 +3013,31 @@ function Es({ context: e }) {
|
|
|
3006
3013
|
style: { width: "100%" },
|
|
3007
3014
|
placeholder: m || "请选择多项",
|
|
3008
3015
|
options: d,
|
|
3009
|
-
value:
|
|
3010
|
-
onChange: (
|
|
3016
|
+
value: me(n),
|
|
3017
|
+
onChange: (y) => r(y ?? [])
|
|
3011
3018
|
}
|
|
3012
|
-
) :
|
|
3013
|
-
|
|
3019
|
+
) : p === "checkbox" ? /* @__PURE__ */ u(
|
|
3020
|
+
Cr.Group,
|
|
3014
3021
|
{
|
|
3015
3022
|
disabled: !t,
|
|
3016
3023
|
className: "form-block-preview-control",
|
|
3017
3024
|
options: d,
|
|
3018
|
-
value:
|
|
3019
|
-
onChange: (
|
|
3025
|
+
value: me(n),
|
|
3026
|
+
onChange: (y) => r(y)
|
|
3020
3027
|
}
|
|
3021
3028
|
) : /* @__PURE__ */ u(
|
|
3022
|
-
|
|
3029
|
+
Ar.Group,
|
|
3023
3030
|
{
|
|
3024
3031
|
disabled: !t,
|
|
3025
3032
|
className: "form-block-preview-control",
|
|
3026
3033
|
options: d,
|
|
3027
3034
|
value: ze(n),
|
|
3028
|
-
onChange: (
|
|
3035
|
+
onChange: (y) => r(y.target.value)
|
|
3029
3036
|
}
|
|
3030
3037
|
)
|
|
3031
3038
|
] });
|
|
3032
3039
|
}
|
|
3033
|
-
const
|
|
3040
|
+
const ws = ce(
|
|
3034
3041
|
{
|
|
3035
3042
|
name: "ChoicePicker",
|
|
3036
3043
|
schema: g.object({
|
|
@@ -3042,17 +3049,17 @@ const Rs = oe(
|
|
|
3042
3049
|
placeholder: g.any().optional()
|
|
3043
3050
|
}).passthrough()
|
|
3044
3051
|
},
|
|
3045
|
-
|
|
3052
|
+
Rs
|
|
3046
3053
|
);
|
|
3047
3054
|
function Ps({ context: e }) {
|
|
3048
|
-
const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o } =
|
|
3055
|
+
const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o } = Se(e, "value", {
|
|
3049
3056
|
component: "CheckBox",
|
|
3050
3057
|
changeAction: "change"
|
|
3051
|
-
}), i = e.componentModel.properties, s =
|
|
3052
|
-
return /* @__PURE__ */
|
|
3058
|
+
}), i = e.componentModel.properties, s = L(i.label);
|
|
3059
|
+
return /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
3053
3060
|
s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
|
|
3054
3061
|
/* @__PURE__ */ u(
|
|
3055
|
-
|
|
3062
|
+
kr,
|
|
3056
3063
|
{
|
|
3057
3064
|
disabled: !t,
|
|
3058
3065
|
className: "form-block-preview-control",
|
|
@@ -3062,54 +3069,54 @@ function Ps({ context: e }) {
|
|
|
3062
3069
|
)
|
|
3063
3070
|
] });
|
|
3064
3071
|
}
|
|
3065
|
-
const
|
|
3072
|
+
const zs = ce(
|
|
3066
3073
|
{ name: "CheckBox", schema: je("CheckBox") },
|
|
3067
3074
|
Ps
|
|
3068
3075
|
);
|
|
3069
|
-
function
|
|
3076
|
+
function Os(e, t, n) {
|
|
3070
3077
|
const r = ze(e);
|
|
3071
3078
|
if (!r) return;
|
|
3072
3079
|
if (!t && n) {
|
|
3073
|
-
const i =
|
|
3080
|
+
const i = on(r, "HH:mm", !0);
|
|
3074
3081
|
return i.isValid() ? i : void 0;
|
|
3075
3082
|
}
|
|
3076
|
-
const o =
|
|
3083
|
+
const o = on(r);
|
|
3077
3084
|
return o.isValid() ? o : void 0;
|
|
3078
3085
|
}
|
|
3079
|
-
function
|
|
3080
|
-
const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o, reportFocus: i } =
|
|
3086
|
+
function qs({ context: e }) {
|
|
3087
|
+
const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o, reportFocus: i } = Se(e, "value", {
|
|
3081
3088
|
component: "DateTimeInput",
|
|
3082
3089
|
changeAction: "change"
|
|
3083
|
-
}), s = e.componentModel.properties, a =
|
|
3084
|
-
if (!
|
|
3090
|
+
}), s = e.componentModel.properties, a = L(s.label), l = L(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = Os(n, c, m), v = (p) => {
|
|
3091
|
+
if (!p) {
|
|
3085
3092
|
r("");
|
|
3086
3093
|
return;
|
|
3087
3094
|
}
|
|
3088
3095
|
if (!c && m) {
|
|
3089
|
-
r(
|
|
3096
|
+
r(p.format("HH:mm"));
|
|
3090
3097
|
return;
|
|
3091
3098
|
}
|
|
3092
3099
|
if (c && m) {
|
|
3093
|
-
r(
|
|
3100
|
+
r(p.format("YYYY-MM-DDTHH:mm"));
|
|
3094
3101
|
return;
|
|
3095
3102
|
}
|
|
3096
|
-
r(
|
|
3103
|
+
r(p.format("YYYY-MM-DD"));
|
|
3097
3104
|
};
|
|
3098
|
-
return /* @__PURE__ */
|
|
3105
|
+
return /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
3099
3106
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
3100
3107
|
!c && m ? /* @__PURE__ */ u(
|
|
3101
|
-
|
|
3108
|
+
_r,
|
|
3102
3109
|
{
|
|
3103
3110
|
disabled: !t,
|
|
3104
3111
|
className: "form-block-preview-control",
|
|
3105
3112
|
style: { width: "100%" },
|
|
3106
3113
|
placeholder: l || "选择时间",
|
|
3107
3114
|
value: d,
|
|
3108
|
-
onChange:
|
|
3115
|
+
onChange: v,
|
|
3109
3116
|
onFocus: i
|
|
3110
3117
|
}
|
|
3111
3118
|
) : /* @__PURE__ */ u(
|
|
3112
|
-
|
|
3119
|
+
Tr,
|
|
3113
3120
|
{
|
|
3114
3121
|
showTime: c && m,
|
|
3115
3122
|
disabled: !t,
|
|
@@ -3117,13 +3124,13 @@ function Os({ context: e }) {
|
|
|
3117
3124
|
style: { width: "100%" },
|
|
3118
3125
|
placeholder: l || (c && m ? "选择日期时间" : "选择日期"),
|
|
3119
3126
|
value: d,
|
|
3120
|
-
onChange:
|
|
3127
|
+
onChange: v,
|
|
3121
3128
|
onFocus: i
|
|
3122
3129
|
}
|
|
3123
3130
|
)
|
|
3124
3131
|
] });
|
|
3125
3132
|
}
|
|
3126
|
-
const
|
|
3133
|
+
const Ls = ce(
|
|
3127
3134
|
{
|
|
3128
3135
|
name: "DateTimeInput",
|
|
3129
3136
|
schema: g.object({
|
|
@@ -3136,8 +3143,8 @@ const qs = oe(
|
|
|
3136
3143
|
max: g.any().optional()
|
|
3137
3144
|
}).passthrough()
|
|
3138
3145
|
},
|
|
3139
|
-
|
|
3140
|
-
),
|
|
3146
|
+
qs
|
|
3147
|
+
), Bs = {
|
|
3141
3148
|
name: "FileUpload",
|
|
3142
3149
|
schema: g.object({
|
|
3143
3150
|
label: g.any().optional(),
|
|
@@ -3149,10 +3156,10 @@ const qs = oe(
|
|
|
3149
3156
|
value: g.any().optional()
|
|
3150
3157
|
}).passthrough()
|
|
3151
3158
|
};
|
|
3152
|
-
function
|
|
3153
|
-
return
|
|
3159
|
+
function Sn(e) {
|
|
3160
|
+
return me(e).map((t) => t.trim()).filter(Boolean);
|
|
3154
3161
|
}
|
|
3155
|
-
function
|
|
3162
|
+
function Ds(e) {
|
|
3156
3163
|
const n = e.split(/[?#]/, 1)[0].split("/").filter(Boolean).pop() || e;
|
|
3157
3164
|
try {
|
|
3158
3165
|
return decodeURIComponent(n);
|
|
@@ -3161,212 +3168,221 @@ function Bs(e) {
|
|
|
3161
3168
|
}
|
|
3162
3169
|
}
|
|
3163
3170
|
function bn(e, t) {
|
|
3164
|
-
return { uid: t, name:
|
|
3171
|
+
return { uid: t, name: Ds(e), status: "done", url: e };
|
|
3165
3172
|
}
|
|
3166
|
-
function
|
|
3167
|
-
var
|
|
3168
|
-
const { interactive: t } = ve(), { beginUpload: n } =
|
|
3173
|
+
function Vs({ context: e }) {
|
|
3174
|
+
var x;
|
|
3175
|
+
const { interactive: t } = ve(), { beginUpload: n } = As(), { value: r, setValue: o, setValueSilent: i, fieldName: s } = Se(e, "value", {
|
|
3169
3176
|
component: "FileUpload",
|
|
3170
3177
|
changeAction: "change"
|
|
3171
|
-
}), a = e.componentModel.properties, l =
|
|
3178
|
+
}), a = e.componentModel.properties, l = L(a.label), c = L(a.accept), m = L(a.help), d = L(a.fileReviewCriteria), v = me(a.fileExampleUrls).filter((h) => /^https?:\/\//i.test(h)), p = Array.isArray(a.fileAcceptTypes) ? a.fileAcceptTypes.map(String) : void 0, b = c ? c.split(",").map((h) => h.trim()).filter(Boolean) : void 0, y = eo(p, b), C = typeof a.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
|
|
3172
3179
|
a.filePlaceholderIcon
|
|
3173
|
-
) ? a.filePlaceholderIcon : "document",
|
|
3174
|
-
|
|
3175
|
-
const [
|
|
3176
|
-
() =>
|
|
3177
|
-
),
|
|
3178
|
-
|
|
3179
|
-
const
|
|
3180
|
-
(
|
|
3181
|
-
const
|
|
3182
|
-
return
|
|
3183
|
-
|
|
3184
|
-
),
|
|
3180
|
+
) ? a.filePlaceholderIcon : "document", A = typeof a.minCount == "number" ? Math.max(0, a.minCount) : 0, f = typeof a.maxCount == "number" ? a.maxCount : 1, S = f > 0, I = Sn(r), E = _(0), F = _(!0), U = _(/* @__PURE__ */ new Map()), B = _(o);
|
|
3181
|
+
B.current = o;
|
|
3182
|
+
const [O, K] = R(
|
|
3183
|
+
() => I.map((h) => bn(h, `external-${E.current++}`))
|
|
3184
|
+
), T = _(O);
|
|
3185
|
+
T.current = O;
|
|
3186
|
+
const W = V(
|
|
3187
|
+
(h, M) => {
|
|
3188
|
+
const P = h(T.current);
|
|
3189
|
+
return T.current = P, F.current && K(P), M && B.current(
|
|
3190
|
+
P.filter((N) => N.status === "done" && N.url).map((N) => N.url)
|
|
3191
|
+
), P;
|
|
3185
3192
|
},
|
|
3186
3193
|
[]
|
|
3187
3194
|
);
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
for (const
|
|
3191
|
-
|
|
3192
|
-
}), []),
|
|
3193
|
-
const
|
|
3194
|
-
Array.isArray(r) && r.length ===
|
|
3195
|
-
const
|
|
3196
|
-
|
|
3197
|
-
(
|
|
3198
|
-
const
|
|
3199
|
-
if (
|
|
3200
|
-
const
|
|
3201
|
-
return
|
|
3195
|
+
z(() => (F.current = !0, () => {
|
|
3196
|
+
F.current = !1;
|
|
3197
|
+
for (const h of U.current.values()) h.abort();
|
|
3198
|
+
U.current.clear();
|
|
3199
|
+
}), []), z(() => {
|
|
3200
|
+
const h = Sn(r);
|
|
3201
|
+
Array.isArray(r) && r.length === h.length && r.every((N, X) => typeof N == "string" && N === h[X]) || i(h);
|
|
3202
|
+
const P = /* @__PURE__ */ new Set();
|
|
3203
|
+
W(
|
|
3204
|
+
(N) => {
|
|
3205
|
+
const X = N.filter((te) => {
|
|
3206
|
+
if (te.status !== "done" || !te.url) return !0;
|
|
3207
|
+
const j = h.findIndex((oe, pe) => !P.has(pe) && oe === te.url);
|
|
3208
|
+
return j < 0 ? !1 : (P.add(j), !0);
|
|
3202
3209
|
});
|
|
3203
|
-
return
|
|
3204
|
-
|
|
3205
|
-
}),
|
|
3210
|
+
return h.forEach((te, j) => {
|
|
3211
|
+
P.has(j) || X.push(bn(te, `external-${E.current++}`));
|
|
3212
|
+
}), X;
|
|
3206
3213
|
},
|
|
3207
3214
|
!1
|
|
3208
3215
|
);
|
|
3209
|
-
}, [r, i,
|
|
3210
|
-
const
|
|
3211
|
-
(
|
|
3212
|
-
if (!t || S &&
|
|
3213
|
-
const M = `${
|
|
3214
|
-
|
|
3215
|
-
(
|
|
3216
|
+
}, [r, i, W]);
|
|
3217
|
+
const Y = V(
|
|
3218
|
+
(h) => {
|
|
3219
|
+
if (!t || S && T.current.length >= f) return;
|
|
3220
|
+
const M = `${h.uid ?? "file"}-${E.current++}`, P = new AbortController();
|
|
3221
|
+
U.current.set(M, P), W(
|
|
3222
|
+
(X) => [...X, { uid: M, name: h.name, status: "uploading" }],
|
|
3216
3223
|
!1
|
|
3217
3224
|
);
|
|
3218
|
-
const
|
|
3219
|
-
|
|
3220
|
-
!
|
|
3221
|
-
(
|
|
3222
|
-
(
|
|
3225
|
+
const N = n();
|
|
3226
|
+
Cs(h, { signal: P.signal }).then((X) => {
|
|
3227
|
+
!F.current || P.signal.aborted || W(
|
|
3228
|
+
(te) => te.map(
|
|
3229
|
+
(j) => j.uid === M ? { ...j, status: "done", url: X.url, error: void 0 } : j
|
|
3223
3230
|
),
|
|
3224
3231
|
!0
|
|
3225
3232
|
);
|
|
3226
|
-
}).catch((
|
|
3227
|
-
if (!
|
|
3228
|
-
const
|
|
3229
|
-
|
|
3230
|
-
(
|
|
3231
|
-
(
|
|
3233
|
+
}).catch((X) => {
|
|
3234
|
+
if (!F.current || bs(X)) return;
|
|
3235
|
+
const te = X instanceof Error ? X.message : "上传失败";
|
|
3236
|
+
W(
|
|
3237
|
+
(j) => j.map(
|
|
3238
|
+
(oe) => oe.uid === M ? { ...oe, status: "error", error: te } : oe
|
|
3232
3239
|
),
|
|
3233
3240
|
!1
|
|
3234
3241
|
);
|
|
3235
3242
|
}).finally(() => {
|
|
3236
|
-
|
|
3243
|
+
U.current.delete(M), N();
|
|
3237
3244
|
});
|
|
3238
3245
|
},
|
|
3239
|
-
[n,
|
|
3240
|
-
),
|
|
3241
|
-
(
|
|
3246
|
+
[n, W, S, t, f]
|
|
3247
|
+
), ne = V(
|
|
3248
|
+
(h) => {
|
|
3242
3249
|
var M;
|
|
3243
|
-
(M =
|
|
3250
|
+
(M = U.current.get(h)) == null || M.abort(), U.current.delete(h), W((P) => P.filter((N) => N.uid !== h), !0);
|
|
3244
3251
|
},
|
|
3245
|
-
[
|
|
3246
|
-
),
|
|
3247
|
-
uid:
|
|
3248
|
-
name:
|
|
3249
|
-
status:
|
|
3250
|
-
url:
|
|
3251
|
-
response:
|
|
3252
|
+
[W]
|
|
3253
|
+
), J = O.filter((h) => h.status === "done").length, Q = S && O.length >= f, de = J < A, ee = (x = [...O].reverse().find((h) => h.error)) == null ? void 0 : x.error, $ = O.map((h) => ({
|
|
3254
|
+
uid: h.uid,
|
|
3255
|
+
name: h.name,
|
|
3256
|
+
status: h.status,
|
|
3257
|
+
url: h.url,
|
|
3258
|
+
response: h.error
|
|
3252
3259
|
}));
|
|
3253
|
-
return /* @__PURE__ */
|
|
3260
|
+
return /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": s || void 0, children: [
|
|
3254
3261
|
l ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: l }) : null,
|
|
3255
|
-
/* @__PURE__ */
|
|
3256
|
-
|
|
3262
|
+
m ? /* @__PURE__ */ u(le.Paragraph, { type: "secondary", children: m }) : null,
|
|
3263
|
+
d ? /* @__PURE__ */ w(le.Paragraph, { type: "secondary", children: [
|
|
3264
|
+
"素材要求:",
|
|
3265
|
+
d
|
|
3266
|
+
] }) : null,
|
|
3267
|
+
v.length ? /* @__PURE__ */ w("div", { className: "form-file-examples", children: [
|
|
3268
|
+
/* @__PURE__ */ u(le.Text, { type: "secondary", children: "参考示例(不作为上传素材提交)" }),
|
|
3269
|
+
/* @__PURE__ */ u("div", { style: { display: "flex", gap: 8, flexWrap: "wrap", margin: "8px 0" }, children: /* @__PURE__ */ u(rn.PreviewGroup, { children: v.map((h, M) => /* @__PURE__ */ u(rn, { src: h, alt: `${l || "素材"}示例 ${M + 1}`, width: 120, height: 120, style: { objectFit: "contain" } }, h)) }) })
|
|
3270
|
+
] }) : null,
|
|
3271
|
+
/* @__PURE__ */ w(
|
|
3272
|
+
pt.Dragger,
|
|
3257
3273
|
{
|
|
3258
3274
|
disabled: !t,
|
|
3259
|
-
openFileDialogOnClick: !
|
|
3260
|
-
accept:
|
|
3275
|
+
openFileDialogOnClick: !Q,
|
|
3276
|
+
accept: Zr(p, b),
|
|
3261
3277
|
className: "form-file-upload-preview",
|
|
3262
|
-
multiple: !S ||
|
|
3263
|
-
showUploadList: t &&
|
|
3264
|
-
fileList: t ?
|
|
3265
|
-
beforeUpload: (
|
|
3266
|
-
onRemove: (
|
|
3278
|
+
multiple: !S || f > 1,
|
|
3279
|
+
showUploadList: t && O.length > 0,
|
|
3280
|
+
fileList: t ? $ : [],
|
|
3281
|
+
beforeUpload: (h) => t ? (Y(h), pt.LIST_IGNORE) : pt.LIST_IGNORE,
|
|
3282
|
+
onRemove: (h) => (ne(h.uid), !0),
|
|
3267
3283
|
children: [
|
|
3268
|
-
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(
|
|
3284
|
+
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(ys, { type: C, size: 40 }) }),
|
|
3269
3285
|
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
|
|
3270
3286
|
]
|
|
3271
3287
|
}
|
|
3272
3288
|
),
|
|
3273
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ w(le.Text, { type: "secondary", className: "form-block-preview-help", children: [
|
|
3274
3290
|
"允许:",
|
|
3275
3291
|
y ?? "全部类型",
|
|
3276
|
-
|
|
3277
|
-
S ? `;最多 ${
|
|
3292
|
+
A > 0 ? `;至少 ${A} 个文件` : "",
|
|
3293
|
+
S ? `;最多 ${f} 个文件` : "",
|
|
3278
3294
|
";选择后自动上传至 CDN",
|
|
3279
|
-
|
|
3295
|
+
de && t ? `(当前 ${J} 个,未达下限)` : ""
|
|
3280
3296
|
] }),
|
|
3281
|
-
|
|
3297
|
+
ee ? /* @__PURE__ */ u(le.Text, { type: "danger", className: "form-block-preview-help", children: ee }) : null
|
|
3282
3298
|
] });
|
|
3283
3299
|
}
|
|
3284
|
-
const
|
|
3285
|
-
|
|
3286
|
-
|
|
3300
|
+
const $s = ce(
|
|
3301
|
+
Bs,
|
|
3302
|
+
Vs
|
|
3287
3303
|
);
|
|
3288
|
-
function
|
|
3289
|
-
const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o, reportFocus: i } =
|
|
3304
|
+
function js({ context: e }) {
|
|
3305
|
+
const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o, reportFocus: i } = Se(e, "value", {
|
|
3290
3306
|
component: "TextField",
|
|
3291
3307
|
changeAction: "change",
|
|
3292
3308
|
debounceChange: !0
|
|
3293
|
-
}), s = e.componentModel.properties, a =
|
|
3294
|
-
if (!m || !
|
|
3309
|
+
}), s = e.componentModel.properties, a = L(s.label), l = L(s.placeholder), c = L(s.variant) || "shortText", m = L(s.validationRegexp), d = ze(n) ?? "", v = !t, [p, b] = R(""), y = (f) => {
|
|
3310
|
+
if (!m || !f.trim()) {
|
|
3295
3311
|
b("");
|
|
3296
3312
|
return;
|
|
3297
3313
|
}
|
|
3298
|
-
b(
|
|
3314
|
+
b(or(f, m) ? "" : "格式不正确");
|
|
3299
3315
|
};
|
|
3300
|
-
|
|
3301
|
-
|
|
3316
|
+
z(() => {
|
|
3317
|
+
y(d);
|
|
3302
3318
|
}, [m, d]);
|
|
3303
|
-
const
|
|
3304
|
-
let
|
|
3319
|
+
const C = "form-block-preview-control";
|
|
3320
|
+
let A;
|
|
3305
3321
|
if (c === "longText")
|
|
3306
|
-
|
|
3307
|
-
|
|
3322
|
+
A = /* @__PURE__ */ u(
|
|
3323
|
+
ft.TextArea,
|
|
3308
3324
|
{
|
|
3309
|
-
disabled:
|
|
3310
|
-
className:
|
|
3325
|
+
disabled: v,
|
|
3326
|
+
className: C,
|
|
3311
3327
|
placeholder: l || "长文本回答...",
|
|
3312
3328
|
autoSize: { minRows: 2, maxRows: 6 },
|
|
3313
3329
|
value: d,
|
|
3314
|
-
status:
|
|
3315
|
-
onChange: (
|
|
3316
|
-
const
|
|
3317
|
-
r(
|
|
3330
|
+
status: p ? "error" : void 0,
|
|
3331
|
+
onChange: (f) => {
|
|
3332
|
+
const S = f.target.value;
|
|
3333
|
+
r(S), y(S);
|
|
3318
3334
|
},
|
|
3319
3335
|
onFocus: i,
|
|
3320
|
-
onBlur: (
|
|
3336
|
+
onBlur: (f) => y(f.target.value)
|
|
3321
3337
|
}
|
|
3322
3338
|
);
|
|
3323
3339
|
else if (c === "number") {
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3326
|
-
|
|
3340
|
+
const f = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
|
|
3341
|
+
A = /* @__PURE__ */ u(
|
|
3342
|
+
xr,
|
|
3327
3343
|
{
|
|
3328
|
-
disabled:
|
|
3329
|
-
className:
|
|
3344
|
+
disabled: v,
|
|
3345
|
+
className: C,
|
|
3330
3346
|
style: { width: "100%" },
|
|
3331
3347
|
placeholder: l || "数字",
|
|
3332
|
-
value:
|
|
3333
|
-
onChange: (
|
|
3348
|
+
value: f,
|
|
3349
|
+
onChange: (S) => r(S == null ? "" : String(S)),
|
|
3334
3350
|
onFocus: i
|
|
3335
3351
|
}
|
|
3336
3352
|
);
|
|
3337
|
-
} else c === "obscured" ?
|
|
3338
|
-
|
|
3353
|
+
} else c === "obscured" ? A = /* @__PURE__ */ u(
|
|
3354
|
+
ft.Password,
|
|
3339
3355
|
{
|
|
3340
|
-
disabled:
|
|
3341
|
-
className:
|
|
3356
|
+
disabled: v,
|
|
3357
|
+
className: C,
|
|
3342
3358
|
placeholder: l,
|
|
3343
3359
|
value: d,
|
|
3344
|
-
onChange: (
|
|
3360
|
+
onChange: (f) => r(f.target.value),
|
|
3345
3361
|
onFocus: i
|
|
3346
3362
|
}
|
|
3347
|
-
) :
|
|
3348
|
-
|
|
3363
|
+
) : A = /* @__PURE__ */ u(
|
|
3364
|
+
ft,
|
|
3349
3365
|
{
|
|
3350
|
-
disabled:
|
|
3351
|
-
className:
|
|
3366
|
+
disabled: v,
|
|
3367
|
+
className: C,
|
|
3352
3368
|
placeholder: l,
|
|
3353
3369
|
value: d,
|
|
3354
|
-
status:
|
|
3355
|
-
onChange: (
|
|
3356
|
-
const
|
|
3357
|
-
r(
|
|
3370
|
+
status: p ? "error" : void 0,
|
|
3371
|
+
onChange: (f) => {
|
|
3372
|
+
const S = f.target.value;
|
|
3373
|
+
r(S), y(S);
|
|
3358
3374
|
},
|
|
3359
3375
|
onFocus: i,
|
|
3360
|
-
onBlur: (
|
|
3376
|
+
onBlur: (f) => y(f.target.value)
|
|
3361
3377
|
}
|
|
3362
3378
|
);
|
|
3363
|
-
return /* @__PURE__ */
|
|
3379
|
+
return /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
3364
3380
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
3365
|
-
|
|
3366
|
-
|
|
3381
|
+
A,
|
|
3382
|
+
p ? /* @__PURE__ */ u(le.Text, { type: "danger", className: "form-block-preview-help", children: p }) : null
|
|
3367
3383
|
] });
|
|
3368
3384
|
}
|
|
3369
|
-
const
|
|
3385
|
+
const Hs = ce(
|
|
3370
3386
|
{
|
|
3371
3387
|
name: "TextField",
|
|
3372
3388
|
schema: g.object({
|
|
@@ -3377,35 +3393,35 @@ const js = oe(
|
|
|
3377
3393
|
value: g.any().optional()
|
|
3378
3394
|
}).passthrough()
|
|
3379
3395
|
},
|
|
3380
|
-
|
|
3396
|
+
js
|
|
3381
3397
|
);
|
|
3382
|
-
function
|
|
3383
|
-
const t = e.componentModel.properties, n =
|
|
3384
|
-
return
|
|
3398
|
+
function Ks({ context: e }) {
|
|
3399
|
+
const t = e.componentModel.properties, n = L(t.text), r = L(t.variant) || "body";
|
|
3400
|
+
return _s.has(r) ? r === "caption" ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ u("em", { children: n }) }) : /* @__PURE__ */ u(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ u(le.Paragraph, { className: "form-block-preview-paragraph", children: n });
|
|
3385
3401
|
}
|
|
3386
|
-
const
|
|
3402
|
+
const Ws = ce(
|
|
3387
3403
|
{ name: "Text", schema: je("Text") },
|
|
3388
|
-
|
|
3404
|
+
Ks
|
|
3389
3405
|
);
|
|
3390
|
-
function
|
|
3406
|
+
function ur() {
|
|
3391
3407
|
const t = [
|
|
3392
3408
|
...[...Ye.components.values()].filter(
|
|
3393
|
-
(r) => !
|
|
3409
|
+
(r) => !ks.has(r.name)
|
|
3394
3410
|
),
|
|
3395
|
-
Ts,
|
|
3396
|
-
Ns,
|
|
3397
3411
|
xs,
|
|
3412
|
+
Es,
|
|
3398
3413
|
Fs,
|
|
3399
3414
|
Us,
|
|
3400
|
-
|
|
3415
|
+
Is,
|
|
3401
3416
|
ws,
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3417
|
+
zs,
|
|
3418
|
+
Ls,
|
|
3419
|
+
$s,
|
|
3420
|
+
Hs,
|
|
3421
|
+
Ws,
|
|
3422
|
+
...hi()
|
|
3407
3423
|
], n = [...Ye.functions.values()];
|
|
3408
|
-
return new
|
|
3424
|
+
return new zr(lr, t, n, Ye.themeSchema);
|
|
3409
3425
|
}
|
|
3410
3426
|
const ge = {
|
|
3411
3427
|
jade9: "#29a383",
|
|
@@ -3419,7 +3435,7 @@ const ge = {
|
|
|
3419
3435
|
primaryHover: "#26997b",
|
|
3420
3436
|
primaryActive: "#1d3b31",
|
|
3421
3437
|
onPrimary: "#ffffff"
|
|
3422
|
-
},
|
|
3438
|
+
}, Gs = {
|
|
3423
3439
|
cssVar: { key: "vidtempl" },
|
|
3424
3440
|
token: {
|
|
3425
3441
|
colorPrimary: ge.primarySolid,
|
|
@@ -3509,9 +3525,9 @@ function Oe({
|
|
|
3509
3525
|
locale: t,
|
|
3510
3526
|
theme: n
|
|
3511
3527
|
}) {
|
|
3512
|
-
return /* @__PURE__ */ u(
|
|
3528
|
+
return /* @__PURE__ */ u(Fr, { theme: n ?? Gs, locale: t, children: e });
|
|
3513
3529
|
}
|
|
3514
|
-
const
|
|
3530
|
+
const Js = yr(
|
|
3515
3531
|
function({
|
|
3516
3532
|
doc: t,
|
|
3517
3533
|
surfaceId: n = "skopon-form",
|
|
@@ -3524,67 +3540,67 @@ const Gs = gr(
|
|
|
3524
3540
|
onUploadingChange: c,
|
|
3525
3541
|
wrapProvider: m = !0
|
|
3526
3542
|
}, d) {
|
|
3527
|
-
|
|
3528
|
-
|
|
3543
|
+
z(() => {
|
|
3544
|
+
Fn(), xn();
|
|
3529
3545
|
}, []);
|
|
3530
|
-
const
|
|
3531
|
-
|
|
3532
|
-
const b =
|
|
3546
|
+
const v = _(null), p = _(i);
|
|
3547
|
+
p.current = i;
|
|
3548
|
+
const b = G(() => {
|
|
3533
3549
|
if (Nt(t)) return "";
|
|
3534
3550
|
try {
|
|
3535
3551
|
return JSON.stringify(t);
|
|
3536
3552
|
} catch {
|
|
3537
3553
|
return String(t);
|
|
3538
3554
|
}
|
|
3539
|
-
}, [t]),
|
|
3555
|
+
}, [t]), y = G(() => {
|
|
3540
3556
|
if (!b)
|
|
3541
3557
|
return { surfaces: [], processor: null };
|
|
3542
3558
|
try {
|
|
3543
|
-
const
|
|
3559
|
+
const S = JSON.parse(b), I = new Tn([ur()]), E = Ti(S, {
|
|
3544
3560
|
surfaceId: n,
|
|
3545
|
-
catalogId:
|
|
3561
|
+
catalogId: lr
|
|
3546
3562
|
});
|
|
3547
|
-
return
|
|
3548
|
-
surfaces: Array.from(
|
|
3549
|
-
processor:
|
|
3563
|
+
return I.processMessages(E), {
|
|
3564
|
+
surfaces: Array.from(I.model.surfacesMap.values()),
|
|
3565
|
+
processor: I
|
|
3550
3566
|
};
|
|
3551
|
-
} catch (
|
|
3552
|
-
return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败",
|
|
3567
|
+
} catch (S) {
|
|
3568
|
+
return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", S), { surfaces: [], processor: null };
|
|
3553
3569
|
}
|
|
3554
|
-
}, [b, n]), { surfaces:
|
|
3555
|
-
if (
|
|
3570
|
+
}, [b, n]), { surfaces: C, processor: A } = y;
|
|
3571
|
+
if (v.current = A, vr(
|
|
3556
3572
|
d,
|
|
3557
3573
|
() => ({
|
|
3558
|
-
getValues(
|
|
3559
|
-
const
|
|
3560
|
-
if (!
|
|
3561
|
-
const
|
|
3562
|
-
return
|
|
3574
|
+
getValues(S) {
|
|
3575
|
+
const I = v.current;
|
|
3576
|
+
if (!I) return {};
|
|
3577
|
+
const E = (S ?? p.current).map((F) => F.trim()).filter(Boolean);
|
|
3578
|
+
return Ii(I, n, E);
|
|
3563
3579
|
},
|
|
3564
|
-
setValues(
|
|
3565
|
-
const
|
|
3566
|
-
if (!
|
|
3567
|
-
const
|
|
3568
|
-
if (
|
|
3569
|
-
for (const [
|
|
3570
|
-
const
|
|
3571
|
-
|
|
3580
|
+
setValues(S) {
|
|
3581
|
+
const I = v.current;
|
|
3582
|
+
if (!I) return;
|
|
3583
|
+
const E = I.model.surfacesMap.get(n);
|
|
3584
|
+
if (E)
|
|
3585
|
+
for (const [F, U] of Object.entries(S)) {
|
|
3586
|
+
const B = F.trim();
|
|
3587
|
+
B && E.dataModel.set(`/${B}`, U);
|
|
3572
3588
|
}
|
|
3573
3589
|
}
|
|
3574
3590
|
}),
|
|
3575
3591
|
[n]
|
|
3576
|
-
),
|
|
3577
|
-
const
|
|
3578
|
-
return m ? /* @__PURE__ */ u(Oe, { children:
|
|
3592
|
+
), C.length === 0) {
|
|
3593
|
+
const S = /* @__PURE__ */ u(Et, { onUploadingChange: c, children: /* @__PURE__ */ u(Ut, { resumeSearch: s, children: /* @__PURE__ */ u(Ft, { contentSearch: a, children: /* @__PURE__ */ u(xt, { caseSearch: l, children: /* @__PURE__ */ u(Tt, { interactive: o, children: r }) }) }) }) });
|
|
3594
|
+
return m ? /* @__PURE__ */ u(Oe, { children: S }) : S;
|
|
3579
3595
|
}
|
|
3580
|
-
const
|
|
3581
|
-
return m ? /* @__PURE__ */ u(Oe, { children:
|
|
3596
|
+
const f = /* @__PURE__ */ u(Et, { onUploadingChange: c, children: /* @__PURE__ */ u(Ut, { resumeSearch: s, children: /* @__PURE__ */ u(Ft, { contentSearch: a, children: /* @__PURE__ */ u(xt, { caseSearch: l, children: /* @__PURE__ */ u(Tt, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: C.map((S) => /* @__PURE__ */ u(_n, { surface: S }, S.id)) }) }) }) }) }) });
|
|
3597
|
+
return m ? /* @__PURE__ */ u(Oe, { children: f }) : f;
|
|
3582
3598
|
}
|
|
3583
3599
|
);
|
|
3584
3600
|
function Je() {
|
|
3585
|
-
return new
|
|
3601
|
+
return new Tn([ur()]);
|
|
3586
3602
|
}
|
|
3587
|
-
function
|
|
3603
|
+
function Ra({
|
|
3588
3604
|
messages: e,
|
|
3589
3605
|
surfaceId: t = "skopon-form-stream",
|
|
3590
3606
|
emptyHint: n = null,
|
|
@@ -3593,94 +3609,94 @@ function Ea({
|
|
|
3593
3609
|
contentSearch: i = null,
|
|
3594
3610
|
caseSearch: s = null
|
|
3595
3611
|
}) {
|
|
3596
|
-
|
|
3597
|
-
|
|
3612
|
+
z(() => {
|
|
3613
|
+
Fn(), xn();
|
|
3598
3614
|
}, []);
|
|
3599
|
-
const a =
|
|
3615
|
+
const a = _(null);
|
|
3600
3616
|
a.current === null && (a.current = Je());
|
|
3601
|
-
const l =
|
|
3602
|
-
function
|
|
3603
|
-
a.current =
|
|
3617
|
+
const l = _(0), c = _(""), m = _(!0), d = _(t);
|
|
3618
|
+
function v(f, S) {
|
|
3619
|
+
a.current = f, l.current = S.length, c.current = JSON.stringify(S), m.current && (y(f), A(Array.from(f.model.surfacesMap.values())));
|
|
3604
3620
|
}
|
|
3605
|
-
function f
|
|
3606
|
-
if (
|
|
3607
|
-
const
|
|
3608
|
-
if (!
|
|
3621
|
+
function p(f, S) {
|
|
3622
|
+
if (S <= 0) return !1;
|
|
3623
|
+
const I = JSON.stringify(f.slice(0, S)), E = c.current;
|
|
3624
|
+
if (!E) return !0;
|
|
3609
3625
|
try {
|
|
3610
|
-
const
|
|
3611
|
-
return JSON.stringify(
|
|
3626
|
+
const F = JSON.parse(E);
|
|
3627
|
+
return JSON.stringify(F.slice(0, S)) !== I;
|
|
3612
3628
|
} catch {
|
|
3613
3629
|
return !0;
|
|
3614
3630
|
}
|
|
3615
3631
|
}
|
|
3616
|
-
const [b,
|
|
3632
|
+
const [b, y] = R(
|
|
3617
3633
|
() => a.current
|
|
3618
|
-
), [
|
|
3634
|
+
), [C, A] = R(
|
|
3619
3635
|
() => Array.from(
|
|
3620
3636
|
a.current.model.surfacesMap.values()
|
|
3621
3637
|
)
|
|
3622
3638
|
);
|
|
3623
|
-
return
|
|
3639
|
+
return z(() => (m.current = !0, () => {
|
|
3624
3640
|
m.current = !1;
|
|
3625
|
-
}), []),
|
|
3641
|
+
}), []), z(() => {
|
|
3626
3642
|
a.current = b;
|
|
3627
|
-
}, [b]),
|
|
3628
|
-
const
|
|
3629
|
-
m.current &&
|
|
3630
|
-
},
|
|
3643
|
+
}, [b]), z(() => {
|
|
3644
|
+
const f = () => {
|
|
3645
|
+
m.current && A(Array.from(b.model.surfacesMap.values()));
|
|
3646
|
+
}, S = b.onSurfaceCreated(f), I = b.onSurfaceDeleted(f);
|
|
3631
3647
|
return () => {
|
|
3632
|
-
|
|
3648
|
+
S.unsubscribe(), I.unsubscribe();
|
|
3633
3649
|
};
|
|
3634
|
-
}, [b]),
|
|
3635
|
-
let
|
|
3636
|
-
const
|
|
3637
|
-
if (d.current = t,
|
|
3638
|
-
const
|
|
3639
|
-
return Array.isArray(e) && e.length > 0 ? (
|
|
3640
|
-
|
|
3650
|
+
}, [b]), z(() => {
|
|
3651
|
+
let f = !1;
|
|
3652
|
+
const S = d.current !== t;
|
|
3653
|
+
if (d.current = t, S) {
|
|
3654
|
+
const U = Je();
|
|
3655
|
+
return Array.isArray(e) && e.length > 0 ? (U.processMessages(e), f || v(U, e)) : (a.current = U, l.current = 0, c.current = "", f || (y(U), A([]))), () => {
|
|
3656
|
+
f = !0;
|
|
3641
3657
|
};
|
|
3642
3658
|
}
|
|
3643
3659
|
if (!Array.isArray(e) || e.length === 0) {
|
|
3644
3660
|
if (l.current > 0) {
|
|
3645
|
-
const
|
|
3646
|
-
a.current =
|
|
3661
|
+
const U = Je();
|
|
3662
|
+
a.current = U, l.current = 0, c.current = "", f || (y(U), A([]));
|
|
3647
3663
|
}
|
|
3648
3664
|
return () => {
|
|
3649
|
-
|
|
3665
|
+
f = !0;
|
|
3650
3666
|
};
|
|
3651
3667
|
}
|
|
3652
|
-
const
|
|
3653
|
-
if (e.length <
|
|
3654
|
-
const
|
|
3655
|
-
return
|
|
3656
|
-
|
|
3668
|
+
const I = a.current, E = l.current;
|
|
3669
|
+
if (e.length < E || p(e, E)) {
|
|
3670
|
+
const U = Je();
|
|
3671
|
+
return U.processMessages(e), f || v(U, e), () => {
|
|
3672
|
+
f = !0;
|
|
3657
3673
|
};
|
|
3658
3674
|
}
|
|
3659
|
-
const
|
|
3660
|
-
return
|
|
3661
|
-
|
|
3662
|
-
} : (
|
|
3663
|
-
|
|
3675
|
+
const F = e.slice(E);
|
|
3676
|
+
return F.length === 0 ? () => {
|
|
3677
|
+
f = !0;
|
|
3678
|
+
} : (I.processMessages(F), l.current = e.length, c.current = JSON.stringify(e), f || A(Array.from(I.model.surfacesMap.values())), () => {
|
|
3679
|
+
f = !0;
|
|
3664
3680
|
});
|
|
3665
|
-
}, [e, t]),
|
|
3681
|
+
}, [e, t]), C.length === 0 ? /* @__PURE__ */ u(Oe, { children: n }) : /* @__PURE__ */ u(Oe, { children: /* @__PURE__ */ u(Et, { children: /* @__PURE__ */ u(Ut, { resumeSearch: o, children: /* @__PURE__ */ u(Ft, { contentSearch: i, children: /* @__PURE__ */ u(xt, { caseSearch: s, children: /* @__PURE__ */ u(Tt, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: C.map((f) => /* @__PURE__ */ u(_n, { surface: f }, f.id)) }) }) }) }) }) }) });
|
|
3666
3682
|
}
|
|
3667
|
-
const
|
|
3668
|
-
function
|
|
3683
|
+
const Ys = 100, Qs = 3e4, Xs = 1500, xe = /* @__PURE__ */ new Map();
|
|
3684
|
+
function Zs(e) {
|
|
3669
3685
|
const t = e.trim();
|
|
3670
3686
|
let n = xe.get(t);
|
|
3671
|
-
return n || (n = new
|
|
3687
|
+
return n || (n = new ea(t), xe.set(t, n)), n.acquire(), n;
|
|
3672
3688
|
}
|
|
3673
|
-
class
|
|
3689
|
+
class ea {
|
|
3674
3690
|
constructor(t) {
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3691
|
+
ae(this, "url");
|
|
3692
|
+
ae(this, "ws", null);
|
|
3693
|
+
ae(this, "refCount", 0);
|
|
3694
|
+
ae(this, "connectRequested", !1);
|
|
3695
|
+
ae(this, "reconnectAttempt", 0);
|
|
3696
|
+
ae(this, "reconnectTimer", null);
|
|
3697
|
+
ae(this, "releaseTimer", null);
|
|
3698
|
+
ae(this, "sendQueue", []);
|
|
3699
|
+
ae(this, "handlers", /* @__PURE__ */ new Map());
|
|
3684
3700
|
this.url = t;
|
|
3685
3701
|
}
|
|
3686
3702
|
acquire() {
|
|
@@ -3689,7 +3705,7 @@ class Zs {
|
|
|
3689
3705
|
release() {
|
|
3690
3706
|
this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
|
|
3691
3707
|
this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), xe.get(this.url) === this && xe.delete(this.url));
|
|
3692
|
-
},
|
|
3708
|
+
}, Xs));
|
|
3693
3709
|
}
|
|
3694
3710
|
/** 强制关闭(测试用),跳过宽限期。 */
|
|
3695
3711
|
forceClose() {
|
|
@@ -3762,7 +3778,7 @@ class Zs {
|
|
|
3762
3778
|
}
|
|
3763
3779
|
}
|
|
3764
3780
|
enqueue(t) {
|
|
3765
|
-
for (this.sendQueue.push(t); this.sendQueue.length >
|
|
3781
|
+
for (this.sendQueue.push(t); this.sendQueue.length > Ys; )
|
|
3766
3782
|
this.sendQueue.shift();
|
|
3767
3783
|
}
|
|
3768
3784
|
flushQueue() {
|
|
@@ -3776,7 +3792,7 @@ class Zs {
|
|
|
3776
3792
|
if (!this.connectRequested || this.refCount <= 0) return;
|
|
3777
3793
|
this.clearReconnectTimer();
|
|
3778
3794
|
const t = Math.min(
|
|
3779
|
-
|
|
3795
|
+
Qs,
|
|
3780
3796
|
1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
|
|
3781
3797
|
);
|
|
3782
3798
|
this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
|
|
@@ -3814,13 +3830,13 @@ class Zs {
|
|
|
3814
3830
|
}
|
|
3815
3831
|
}
|
|
3816
3832
|
}
|
|
3817
|
-
class
|
|
3833
|
+
class ta {
|
|
3818
3834
|
constructor(t) {
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
this.askUserMessageId = t.askUserMessageId.trim(), this.connection =
|
|
3835
|
+
ae(this, "askUserMessageId");
|
|
3836
|
+
ae(this, "connection");
|
|
3837
|
+
ae(this, "unsubscribe");
|
|
3838
|
+
ae(this, "closed", !1);
|
|
3839
|
+
this.askUserMessageId = t.askUserMessageId.trim(), this.connection = Zs(t.url);
|
|
3824
3840
|
const n = t.onAutoControl;
|
|
3825
3841
|
this.unsubscribe = n ? this.connection.subscribe(this.askUserMessageId, n) : () => {
|
|
3826
3842
|
};
|
|
@@ -3835,24 +3851,24 @@ class ea {
|
|
|
3835
3851
|
this.closed || (this.closed = !0, this.unsubscribe(), this.connection.release());
|
|
3836
3852
|
}
|
|
3837
3853
|
}
|
|
3838
|
-
function
|
|
3854
|
+
function mr(e) {
|
|
3839
3855
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
3840
3856
|
}
|
|
3841
|
-
function
|
|
3857
|
+
function na(e, t) {
|
|
3842
3858
|
if (!e) return !1;
|
|
3843
|
-
const n = e.querySelector(`[data-skopon-field="${
|
|
3859
|
+
const n = e.querySelector(`[data-skopon-field="${mr(t)}"]`);
|
|
3844
3860
|
return n instanceof HTMLElement ? ((n.querySelector(
|
|
3845
3861
|
'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
|
|
3846
3862
|
) ?? n).focus(), !0) : !1;
|
|
3847
3863
|
}
|
|
3848
|
-
function
|
|
3864
|
+
function ra(e, t) {
|
|
3849
3865
|
if (!e) return !1;
|
|
3850
|
-
const n = e.querySelector(`[data-skopon-field="${
|
|
3866
|
+
const n = e.querySelector(`[data-skopon-field="${mr(t)}"]`);
|
|
3851
3867
|
return n instanceof HTMLElement ? ((n.querySelector(
|
|
3852
3868
|
'button, [role="button"], .skopon-resume-select-card, input, label'
|
|
3853
3869
|
) ?? n).click(), !0) : !1;
|
|
3854
3870
|
}
|
|
3855
|
-
function
|
|
3871
|
+
function oa(e, t, n) {
|
|
3856
3872
|
const r = e.action;
|
|
3857
3873
|
if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
|
|
3858
3874
|
console.warn("[FormAutoControl] unknown action", r);
|
|
@@ -3882,47 +3898,47 @@ function ra(e, t, n) {
|
|
|
3882
3898
|
return;
|
|
3883
3899
|
}
|
|
3884
3900
|
if (r === "focus") {
|
|
3885
|
-
|
|
3901
|
+
na(t.rootElement, o), n.reportEvent({
|
|
3886
3902
|
action: "focus",
|
|
3887
3903
|
component: i,
|
|
3888
3904
|
field: o
|
|
3889
3905
|
});
|
|
3890
3906
|
return;
|
|
3891
3907
|
}
|
|
3892
|
-
|
|
3908
|
+
ra(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
|
|
3893
3909
|
});
|
|
3894
3910
|
}
|
|
3895
|
-
function
|
|
3911
|
+
function ia(e) {
|
|
3896
3912
|
const t = {};
|
|
3897
3913
|
for (const [n, r] of Object.entries(e))
|
|
3898
3914
|
r !== void 0 && (t[n] = r);
|
|
3899
3915
|
return t;
|
|
3900
3916
|
}
|
|
3901
|
-
function
|
|
3917
|
+
function sa(e, t) {
|
|
3902
3918
|
var o;
|
|
3903
3919
|
const n = (o = e.name) == null ? void 0 : o.trim();
|
|
3904
3920
|
if (!n || !t) return { ...e };
|
|
3905
3921
|
const r = t.get(n);
|
|
3906
3922
|
return r ? e.type !== "resume_multiselect" && e.type !== "case_multiselect" ? { ...e } : { ...e, options: r.map((i) => ({ ...i })) } : { ...e };
|
|
3907
3923
|
}
|
|
3908
|
-
function
|
|
3924
|
+
function aa(e) {
|
|
3909
3925
|
var i, s;
|
|
3910
3926
|
const n = {
|
|
3911
3927
|
blocks: (e.blocks ?? []).map(
|
|
3912
|
-
(a) =>
|
|
3928
|
+
(a) => sa(a, e.liveOptions)
|
|
3913
3929
|
)
|
|
3914
3930
|
}, r = (i = e.title) == null ? void 0 : i.trim(), o = (s = e.description) == null ? void 0 : s.trim();
|
|
3915
3931
|
return r && (n.title = r), o && (n.description = o), {
|
|
3916
3932
|
form_schema: n,
|
|
3917
|
-
form_values:
|
|
3933
|
+
form_values: ia(e.values ?? {}),
|
|
3918
3934
|
form_change: [...e.formChange ?? []]
|
|
3919
3935
|
};
|
|
3920
3936
|
}
|
|
3921
|
-
function
|
|
3937
|
+
function la(e) {
|
|
3922
3938
|
const t = rt(e);
|
|
3923
3939
|
return t ? et(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
3924
3940
|
}
|
|
3925
|
-
function
|
|
3941
|
+
function ca({
|
|
3926
3942
|
payload: e,
|
|
3927
3943
|
callbackUrl: t,
|
|
3928
3944
|
title: n,
|
|
@@ -3932,17 +3948,17 @@ function la({
|
|
|
3932
3948
|
submitHeaders: s,
|
|
3933
3949
|
onNotify: a
|
|
3934
3950
|
}) {
|
|
3935
|
-
const [l, c] =
|
|
3936
|
-
|
|
3951
|
+
const [l, c] = R(!1), m = _(!0);
|
|
3952
|
+
z(() => (m.current = !0, () => {
|
|
3937
3953
|
m.current = !1;
|
|
3938
3954
|
}), []);
|
|
3939
|
-
const d =
|
|
3955
|
+
const d = G(
|
|
3940
3956
|
() => Dt(s),
|
|
3941
3957
|
[s]
|
|
3942
|
-
),
|
|
3943
|
-
() =>
|
|
3958
|
+
), v = G(
|
|
3959
|
+
() => Zn(e, t, d),
|
|
3944
3960
|
[e, t, d]
|
|
3945
|
-
),
|
|
3961
|
+
), p = G(
|
|
3946
3962
|
() => ({
|
|
3947
3963
|
...i,
|
|
3948
3964
|
callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? t ?? null
|
|
@@ -3953,29 +3969,29 @@ function la({
|
|
|
3953
3969
|
if (!l) {
|
|
3954
3970
|
c(!0);
|
|
3955
3971
|
try {
|
|
3956
|
-
const
|
|
3957
|
-
context:
|
|
3972
|
+
const y = la(e), C = $t({
|
|
3973
|
+
context: p,
|
|
3958
3974
|
payload: e,
|
|
3959
|
-
answer:
|
|
3960
|
-
}),
|
|
3975
|
+
answer: y
|
|
3976
|
+
}), A = await rr(C, {
|
|
3961
3977
|
headers: d
|
|
3962
3978
|
});
|
|
3963
3979
|
if (!m.current) return;
|
|
3964
|
-
const
|
|
3965
|
-
a == null || a(
|
|
3966
|
-
} catch (
|
|
3980
|
+
const f = nr(A);
|
|
3981
|
+
a == null || a(f.type, f.message);
|
|
3982
|
+
} catch (y) {
|
|
3967
3983
|
if (!m.current) return;
|
|
3968
|
-
const
|
|
3969
|
-
a == null || a("error",
|
|
3984
|
+
const C = y instanceof Error ? y.message : "提交失败";
|
|
3985
|
+
a == null || a("error", C);
|
|
3970
3986
|
} finally {
|
|
3971
3987
|
m.current && c(!1);
|
|
3972
3988
|
}
|
|
3973
3989
|
}
|
|
3974
3990
|
}
|
|
3975
|
-
return /* @__PURE__ */
|
|
3976
|
-
/* @__PURE__ */
|
|
3977
|
-
/* @__PURE__ */
|
|
3978
|
-
/* @__PURE__ */ u(
|
|
3991
|
+
return /* @__PURE__ */ w("div", { className: "ask-user-curl-card", children: [
|
|
3992
|
+
/* @__PURE__ */ w("div", { className: "ask-user-curl-card-header", children: [
|
|
3993
|
+
/* @__PURE__ */ w("div", { className: "ask-user-curl-card-header-title", children: [
|
|
3994
|
+
/* @__PURE__ */ u(le.Text, { type: "secondary", children: n ?? "curl 命令" }),
|
|
3979
3995
|
r ? /* @__PURE__ */ u(Fe, { title: r, children: /* @__PURE__ */ u(Ee, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
|
|
3980
3996
|
o ? /* @__PURE__ */ u(Fe, { title: o, children: /* @__PURE__ */ u(Ee, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
|
|
3981
3997
|
] }),
|
|
@@ -3991,11 +4007,11 @@ function la({
|
|
|
3991
4007
|
}
|
|
3992
4008
|
) })
|
|
3993
4009
|
] }),
|
|
3994
|
-
/* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children:
|
|
4010
|
+
/* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children: v })
|
|
3995
4011
|
] });
|
|
3996
4012
|
}
|
|
3997
|
-
const
|
|
3998
|
-
function
|
|
4013
|
+
const ua = 80;
|
|
4014
|
+
function ma(e, t) {
|
|
3999
4015
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
4000
4016
|
const n = t.message;
|
|
4001
4017
|
if (typeof n == "string" && n.trim())
|
|
@@ -4003,7 +4019,7 @@ function ua(e, t) {
|
|
|
4003
4019
|
}
|
|
4004
4020
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
4005
4021
|
}
|
|
4006
|
-
function
|
|
4022
|
+
function da({
|
|
4007
4023
|
payload: e,
|
|
4008
4024
|
formUniqueId: t,
|
|
4009
4025
|
askUserMessageId: n,
|
|
@@ -4016,254 +4032,254 @@ function ma({
|
|
|
4016
4032
|
resumeSearch: c = null,
|
|
4017
4033
|
contentSearch: m = null,
|
|
4018
4034
|
caseSearch: d = null,
|
|
4019
|
-
onSurfaceReadyChange:
|
|
4020
|
-
onAutoControlReady:
|
|
4035
|
+
onSurfaceReadyChange: v,
|
|
4036
|
+
onAutoControlReady: p
|
|
4021
4037
|
}) {
|
|
4022
|
-
const [b,
|
|
4023
|
-
|
|
4024
|
-
const
|
|
4038
|
+
const [b, y] = R(null), [C, A] = R(!1), [f, S] = R(!0), [I, E] = R(!1), [F, U] = R(!1), B = _(null), O = _(null), K = _(!0), T = _(l);
|
|
4039
|
+
T.current = l;
|
|
4040
|
+
const W = Ln(), Y = zt(), ne = _(""), J = _(null), Q = (t == null ? void 0 : t.trim()) ?? "", de = (n == null ? void 0 : n.trim()) ?? "", ee = G(
|
|
4025
4041
|
() => Dt(s),
|
|
4026
4042
|
[s]
|
|
4027
|
-
),
|
|
4043
|
+
), $ = G(
|
|
4028
4044
|
() => ({
|
|
4029
4045
|
...i,
|
|
4030
4046
|
callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? r ?? null
|
|
4031
4047
|
}),
|
|
4032
4048
|
[i, r]
|
|
4033
4049
|
);
|
|
4034
|
-
|
|
4035
|
-
K.current = !1,
|
|
4036
|
-
}), []),
|
|
4037
|
-
let
|
|
4038
|
-
return
|
|
4039
|
-
|
|
4050
|
+
z(() => (K.current = !0, () => {
|
|
4051
|
+
K.current = !1, J.current != null && (clearTimeout(J.current), J.current = null);
|
|
4052
|
+
}), []), z(() => {
|
|
4053
|
+
let q = !1;
|
|
4054
|
+
return Q ? (S(!0), A(!1), a({ formUniqueId: Q }).then((H) => {
|
|
4055
|
+
q || (A(!!H.disabled), y(H.formDefinition ?? null));
|
|
4040
4056
|
}).catch((H) => {
|
|
4041
|
-
var
|
|
4042
|
-
if (!
|
|
4043
|
-
|
|
4057
|
+
var se;
|
|
4058
|
+
if (!q) {
|
|
4059
|
+
A(!1), y(null);
|
|
4044
4060
|
const He = H instanceof Error ? H.message : "获取表单定义失败";
|
|
4045
|
-
(
|
|
4061
|
+
(se = T.current) == null || se.call(T, "error", He);
|
|
4046
4062
|
}
|
|
4047
4063
|
}).finally(() => {
|
|
4048
|
-
|
|
4064
|
+
q || S(!1);
|
|
4049
4065
|
}), () => {
|
|
4050
|
-
|
|
4051
|
-
}) : (
|
|
4052
|
-
|
|
4066
|
+
q = !0;
|
|
4067
|
+
}) : (S(!1), A(!1), y(null), () => {
|
|
4068
|
+
q = !0;
|
|
4053
4069
|
});
|
|
4054
|
-
}, [
|
|
4055
|
-
const
|
|
4056
|
-
if (
|
|
4057
|
-
return
|
|
4058
|
-
const
|
|
4070
|
+
}, [Q, a]);
|
|
4071
|
+
const x = G(() => rt(e), [e]), h = G(() => x ? wi(x, b ?? void 0) : null, [x, b]), M = (h == null ? void 0 : h.matchedBlocks) ?? [], P = !!(x && Pi(x) && M.length === 0), N = G(() => P && x ? zi(x) : h && h.renderBlocks.length > 0 ? h.renderBlocks : [], [h, P, x]), X = G(() => {
|
|
4072
|
+
if (P && x)
|
|
4073
|
+
return Oi(x);
|
|
4074
|
+
const q = et((h == null ? void 0 : h.extraBlocks) ?? []);
|
|
4059
4075
|
return { ...et(
|
|
4060
|
-
((
|
|
4061
|
-
(
|
|
4076
|
+
((h == null ? void 0 : h.matchedBlocks) ?? []).filter(
|
|
4077
|
+
(se) => se.type === "text" && se.hidden === !0
|
|
4062
4078
|
)
|
|
4063
|
-
), ...
|
|
4064
|
-
}, [
|
|
4065
|
-
() =>
|
|
4079
|
+
), ...q };
|
|
4080
|
+
}, [P, x, h]), te = G(
|
|
4081
|
+
() => N.filter((q) => {
|
|
4066
4082
|
var H;
|
|
4067
|
-
return
|
|
4068
|
-
}).map((
|
|
4069
|
-
[
|
|
4070
|
-
),
|
|
4071
|
-
{ title:
|
|
4072
|
-
|
|
4073
|
-
), [
|
|
4074
|
-
if (!
|
|
4083
|
+
return ue(q.type) && ((H = q.name) == null ? void 0 : H.trim());
|
|
4084
|
+
}).map((q) => q.name.trim()),
|
|
4085
|
+
[N]
|
|
4086
|
+
), j = (h == null ? void 0 : h.title) ?? (x == null ? void 0 : x.title) ?? "", oe = (h == null ? void 0 : h.description) ?? (x == null ? void 0 : x.description) ?? "", pe = G(() => N.length === 0 ? null : Fi(
|
|
4087
|
+
{ title: j, description: oe },
|
|
4088
|
+
N
|
|
4089
|
+
), [j, oe, N]), Ue = G(() => {
|
|
4090
|
+
if (!pe) return "";
|
|
4075
4091
|
try {
|
|
4076
|
-
return JSON.stringify(
|
|
4092
|
+
return JSON.stringify(pe);
|
|
4077
4093
|
} catch {
|
|
4078
|
-
return String(
|
|
4094
|
+
return String(pe);
|
|
4079
4095
|
}
|
|
4080
|
-
}, [
|
|
4081
|
-
|
|
4082
|
-
const
|
|
4096
|
+
}, [pe]), Ie = Q ? `ask-user-${Q}` : "ask-user-payload", fe = !!(!f && x && N.length > 0 && pe);
|
|
4097
|
+
z(() => (v(fe), () => v(!1)), [fe, v]);
|
|
4098
|
+
const k = V(() => {
|
|
4083
4099
|
var H;
|
|
4084
|
-
return { ...((H =
|
|
4085
|
-
}, [
|
|
4086
|
-
D.current =
|
|
4087
|
-
const
|
|
4088
|
-
|
|
4089
|
-
const
|
|
4090
|
-
(
|
|
4091
|
-
const H =
|
|
4092
|
-
title:
|
|
4093
|
-
description:
|
|
4094
|
-
blocks:
|
|
4095
|
-
values:
|
|
4100
|
+
return { ...((H = B.current) == null ? void 0 : H.getValues(te)) ?? {}, ...X };
|
|
4101
|
+
}, [te, X]), D = _(Y.liveOptions);
|
|
4102
|
+
D.current = Y.liveOptions;
|
|
4103
|
+
const re = _(Y.pendingChangeFields);
|
|
4104
|
+
re.current = Y.pendingChangeFields;
|
|
4105
|
+
const ie = V(
|
|
4106
|
+
(q) => {
|
|
4107
|
+
const H = aa({
|
|
4108
|
+
title: j,
|
|
4109
|
+
description: oe,
|
|
4110
|
+
blocks: N,
|
|
4111
|
+
values: k(),
|
|
4096
4112
|
liveOptions: D.current,
|
|
4097
|
-
formChange:
|
|
4113
|
+
formChange: q
|
|
4098
4114
|
});
|
|
4099
|
-
|
|
4115
|
+
W.reportData(H);
|
|
4100
4116
|
},
|
|
4101
|
-
[
|
|
4102
|
-
),
|
|
4103
|
-
|
|
4104
|
-
if (!
|
|
4105
|
-
|
|
4117
|
+
[j, oe, N, k, W]
|
|
4118
|
+
), he = _(ie);
|
|
4119
|
+
he.current = ie, z(() => {
|
|
4120
|
+
if (!fe) {
|
|
4121
|
+
ne.current = "";
|
|
4106
4122
|
return;
|
|
4107
4123
|
}
|
|
4108
4124
|
if (!Ue) return;
|
|
4109
|
-
const
|
|
4110
|
-
if (
|
|
4125
|
+
const q = `${Ie}::${Ue}`;
|
|
4126
|
+
if (ne.current === q) return;
|
|
4111
4127
|
const H = setTimeout(() => {
|
|
4112
|
-
K.current &&
|
|
4128
|
+
K.current && ne.current !== q && (ne.current = q, he.current([]));
|
|
4113
4129
|
}, 0);
|
|
4114
4130
|
return () => clearTimeout(H);
|
|
4115
|
-
}, [
|
|
4116
|
-
if (!(!
|
|
4117
|
-
return
|
|
4118
|
-
if (
|
|
4119
|
-
const
|
|
4120
|
-
|
|
4121
|
-
},
|
|
4122
|
-
|
|
4131
|
+
}, [fe, Ie, Ue]), z(() => {
|
|
4132
|
+
if (!(!fe || Y.version === 0) && re.current.length !== 0)
|
|
4133
|
+
return J.current != null && clearTimeout(J.current), J.current = setTimeout(() => {
|
|
4134
|
+
if (J.current = null, !K.current) return;
|
|
4135
|
+
const q = [...re.current];
|
|
4136
|
+
Y.clearPendingChangeFields(), q.length !== 0 && he.current(q);
|
|
4137
|
+
}, ua), () => {
|
|
4138
|
+
J.current != null && (clearTimeout(J.current), J.current = null);
|
|
4123
4139
|
};
|
|
4124
|
-
}, [
|
|
4140
|
+
}, [fe, Y.version, Y.clearPendingChangeFields]);
|
|
4125
4141
|
const ut = V(async () => {
|
|
4126
|
-
var
|
|
4127
|
-
if (!
|
|
4128
|
-
if (
|
|
4129
|
-
(
|
|
4142
|
+
var q, H, se, He, Wt, Gt, Jt, Yt, Qt;
|
|
4143
|
+
if (!I) {
|
|
4144
|
+
if (F) {
|
|
4145
|
+
(q = T.current) == null || q.call(T, "error", "文件正在上传,请稍候");
|
|
4130
4146
|
return;
|
|
4131
4147
|
}
|
|
4132
|
-
|
|
4148
|
+
E(!0);
|
|
4133
4149
|
try {
|
|
4134
|
-
const Me = { ...((H =
|
|
4150
|
+
const Me = { ...((H = B.current) == null ? void 0 : H.getValues(te)) ?? {}, ...X }, Xt = hs(N, Me);
|
|
4135
4151
|
if (Xt) {
|
|
4136
|
-
(
|
|
4152
|
+
(se = T.current) == null || se.call(T, "error", Xt.message);
|
|
4137
4153
|
return;
|
|
4138
4154
|
}
|
|
4139
4155
|
if (o === "post") {
|
|
4140
4156
|
const nn = (r ?? "").trim();
|
|
4141
4157
|
if (!nn) {
|
|
4142
|
-
(He =
|
|
4158
|
+
(He = T.current) == null || He.call(T, "error", "callback_url 为空,无法提交");
|
|
4143
4159
|
return;
|
|
4144
4160
|
}
|
|
4145
|
-
|
|
4161
|
+
ie([]), W.reportEvent({
|
|
4146
4162
|
action: "submit",
|
|
4147
4163
|
component: "SubmitButton"
|
|
4148
4164
|
});
|
|
4149
|
-
const dt = await
|
|
4150
|
-
headers:
|
|
4165
|
+
const dt = await er(nn, Me, {
|
|
4166
|
+
headers: ee
|
|
4151
4167
|
});
|
|
4152
4168
|
if (!K.current) return;
|
|
4153
|
-
dt.ok ? (Wt =
|
|
4169
|
+
dt.ok ? (Wt = T.current) == null || Wt.call(T, "success", "提交成功") : (Gt = T.current) == null || Gt.call(T, "error", ma(dt.status, dt.body));
|
|
4154
4170
|
return;
|
|
4155
4171
|
}
|
|
4156
|
-
const
|
|
4157
|
-
title:
|
|
4158
|
-
description:
|
|
4159
|
-
blocks:
|
|
4160
|
-
} :
|
|
4161
|
-
context:
|
|
4172
|
+
const dr = N.length > 0 ? {
|
|
4173
|
+
title: j,
|
|
4174
|
+
description: oe,
|
|
4175
|
+
blocks: N
|
|
4176
|
+
} : x ?? void 0, Zt = $t({
|
|
4177
|
+
context: $,
|
|
4162
4178
|
payload: e,
|
|
4163
|
-
form:
|
|
4179
|
+
form: dr,
|
|
4164
4180
|
answer: Me
|
|
4165
4181
|
}), en = jt(Zt);
|
|
4166
4182
|
if (en) {
|
|
4167
|
-
(Jt =
|
|
4183
|
+
(Jt = T.current) == null || Jt.call(T, "error", en);
|
|
4168
4184
|
return;
|
|
4169
4185
|
}
|
|
4170
|
-
|
|
4186
|
+
ie([]), W.reportEvent({
|
|
4171
4187
|
action: "submit",
|
|
4172
4188
|
component: "SubmitButton"
|
|
4173
4189
|
});
|
|
4174
|
-
const
|
|
4175
|
-
headers:
|
|
4190
|
+
const pr = await rr(Zt, {
|
|
4191
|
+
headers: ee
|
|
4176
4192
|
});
|
|
4177
4193
|
if (!K.current) return;
|
|
4178
|
-
const tn =
|
|
4179
|
-
(Yt =
|
|
4194
|
+
const tn = nr(pr);
|
|
4195
|
+
(Yt = T.current) == null || Yt.call(T, tn.type, tn.message);
|
|
4180
4196
|
} catch (mt) {
|
|
4181
4197
|
if (!K.current) return;
|
|
4182
4198
|
const Me = mt instanceof Error ? mt.message : "提交失败";
|
|
4183
|
-
(Qt =
|
|
4199
|
+
(Qt = T.current) == null || Qt.call(T, "error", Me);
|
|
4184
4200
|
} finally {
|
|
4185
|
-
K.current &&
|
|
4201
|
+
K.current && E(!1);
|
|
4186
4202
|
}
|
|
4187
4203
|
}
|
|
4188
4204
|
}, [
|
|
4205
|
+
I,
|
|
4189
4206
|
F,
|
|
4190
|
-
U,
|
|
4191
|
-
me,
|
|
4192
|
-
P,
|
|
4193
|
-
ie,
|
|
4194
|
-
pe,
|
|
4195
|
-
le,
|
|
4196
4207
|
te,
|
|
4197
|
-
|
|
4208
|
+
N,
|
|
4209
|
+
j,
|
|
4210
|
+
oe,
|
|
4211
|
+
X,
|
|
4212
|
+
ie,
|
|
4213
|
+
W,
|
|
4198
4214
|
o,
|
|
4199
4215
|
r,
|
|
4200
|
-
|
|
4201
|
-
|
|
4216
|
+
ee,
|
|
4217
|
+
$,
|
|
4202
4218
|
e,
|
|
4203
|
-
|
|
4204
|
-
]), Ht =
|
|
4219
|
+
x
|
|
4220
|
+
]), Ht = _(ut);
|
|
4205
4221
|
Ht.current = ut;
|
|
4206
4222
|
const Kt = V(
|
|
4207
|
-
(
|
|
4208
|
-
|
|
4209
|
-
|
|
4223
|
+
(q) => {
|
|
4224
|
+
oa(
|
|
4225
|
+
q,
|
|
4210
4226
|
{
|
|
4211
4227
|
setValues: (H) => {
|
|
4212
|
-
var
|
|
4213
|
-
return (
|
|
4228
|
+
var se;
|
|
4229
|
+
return (se = B.current) == null ? void 0 : se.setValues(H);
|
|
4214
4230
|
},
|
|
4215
4231
|
getValues: (H) => {
|
|
4216
|
-
var
|
|
4217
|
-
return ((
|
|
4232
|
+
var se;
|
|
4233
|
+
return ((se = B.current) == null ? void 0 : se.getValues(H)) ?? {};
|
|
4218
4234
|
},
|
|
4219
4235
|
submit: () => Ht.current(),
|
|
4220
|
-
rootElement:
|
|
4236
|
+
rootElement: O.current
|
|
4221
4237
|
},
|
|
4222
4238
|
{
|
|
4223
|
-
reportEvent:
|
|
4224
|
-
runAutoControl:
|
|
4239
|
+
reportEvent: W.reportEvent,
|
|
4240
|
+
runAutoControl: W.runAutoControl
|
|
4225
4241
|
}
|
|
4226
4242
|
);
|
|
4227
4243
|
},
|
|
4228
|
-
[
|
|
4244
|
+
[W]
|
|
4229
4245
|
);
|
|
4230
|
-
return
|
|
4231
|
-
if (!
|
|
4232
|
-
|
|
4246
|
+
return z(() => {
|
|
4247
|
+
if (!fe) {
|
|
4248
|
+
p(null);
|
|
4233
4249
|
return;
|
|
4234
4250
|
}
|
|
4235
|
-
return
|
|
4236
|
-
}, [
|
|
4237
|
-
|
|
4251
|
+
return p(Kt), () => p(null);
|
|
4252
|
+
}, [fe, Kt, p]), f ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(Rt, { size: "small" }) }) : !x || N.length === 0 ? /* @__PURE__ */ u(
|
|
4253
|
+
ca,
|
|
4238
4254
|
{
|
|
4239
4255
|
payload: e,
|
|
4240
4256
|
callbackUrl: r,
|
|
4241
|
-
answerAgentContext:
|
|
4257
|
+
answerAgentContext: $,
|
|
4242
4258
|
submitHeaders: s,
|
|
4243
|
-
unpublishedFormId:
|
|
4259
|
+
unpublishedFormId: C && Q ? Q : void 0,
|
|
4244
4260
|
onNotify: l
|
|
4245
4261
|
}
|
|
4246
|
-
) : /* @__PURE__ */
|
|
4262
|
+
) : /* @__PURE__ */ w(
|
|
4247
4263
|
"div",
|
|
4248
4264
|
{
|
|
4249
4265
|
className: "ask-user-form-card",
|
|
4250
|
-
ref:
|
|
4251
|
-
"data-ask-user-message-id":
|
|
4266
|
+
ref: O,
|
|
4267
|
+
"data-ask-user-message-id": de || void 0,
|
|
4252
4268
|
children: [
|
|
4253
|
-
|
|
4269
|
+
C && Q ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(Fe, { title: Q, children: /* @__PURE__ */ u(Ee, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
|
|
4254
4270
|
/* @__PURE__ */ u(
|
|
4255
|
-
|
|
4271
|
+
Js,
|
|
4256
4272
|
{
|
|
4257
|
-
ref:
|
|
4258
|
-
doc:
|
|
4273
|
+
ref: B,
|
|
4274
|
+
doc: pe,
|
|
4259
4275
|
surfaceId: Ie,
|
|
4260
|
-
fieldNames:
|
|
4276
|
+
fieldNames: te,
|
|
4261
4277
|
interactive: !0,
|
|
4262
4278
|
wrapProvider: !1,
|
|
4263
4279
|
resumeSearch: c,
|
|
4264
4280
|
contentSearch: m,
|
|
4265
4281
|
caseSearch: d,
|
|
4266
|
-
onUploadingChange:
|
|
4282
|
+
onUploadingChange: U
|
|
4267
4283
|
}
|
|
4268
4284
|
),
|
|
4269
4285
|
/* @__PURE__ */ u("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ u(
|
|
@@ -4275,8 +4291,8 @@ function ma({
|
|
|
4275
4291
|
{
|
|
4276
4292
|
type: "primary",
|
|
4277
4293
|
size: "small",
|
|
4278
|
-
loading:
|
|
4279
|
-
disabled:
|
|
4294
|
+
loading: I,
|
|
4295
|
+
disabled: I || F,
|
|
4280
4296
|
onClick: () => void ut(),
|
|
4281
4297
|
children: "提交"
|
|
4282
4298
|
}
|
|
@@ -4287,16 +4303,16 @@ function ma({
|
|
|
4287
4303
|
}
|
|
4288
4304
|
);
|
|
4289
4305
|
}
|
|
4290
|
-
function
|
|
4306
|
+
function wa(e) {
|
|
4291
4307
|
var c;
|
|
4292
|
-
const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n =
|
|
4308
|
+
const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = G(() => Gi(), []), [r, o] = R(!1), i = _(null), s = V((m) => {
|
|
4293
4309
|
o(m);
|
|
4294
4310
|
}, []), a = V(
|
|
4295
4311
|
(m) => {
|
|
4296
4312
|
i.current = m;
|
|
4297
4313
|
},
|
|
4298
4314
|
[]
|
|
4299
|
-
), l =
|
|
4315
|
+
), l = G(() => !n || !t ? null : new ta({
|
|
4300
4316
|
url: n,
|
|
4301
4317
|
askUserMessageId: t,
|
|
4302
4318
|
onAutoControl: (m) => {
|
|
@@ -4304,15 +4320,15 @@ function Ra(e) {
|
|
|
4304
4320
|
(d = i.current) == null || d.call(i, m);
|
|
4305
4321
|
}
|
|
4306
4322
|
}), [n, t]);
|
|
4307
|
-
return
|
|
4323
|
+
return z(() => {
|
|
4308
4324
|
if (l)
|
|
4309
4325
|
return () => {
|
|
4310
4326
|
l.close();
|
|
4311
4327
|
};
|
|
4312
|
-
}, [l]),
|
|
4328
|
+
}, [l]), z(() => {
|
|
4313
4329
|
!l || !r || l.connect();
|
|
4314
|
-
}, [l, r]), /* @__PURE__ */ u(Oe, { children: /* @__PURE__ */ u(
|
|
4315
|
-
|
|
4330
|
+
}, [l, r]), /* @__PURE__ */ u(Oe, { children: /* @__PURE__ */ u(Mo, { client: l, children: /* @__PURE__ */ u(xo, { children: /* @__PURE__ */ u(
|
|
4331
|
+
da,
|
|
4316
4332
|
{
|
|
4317
4333
|
...e,
|
|
4318
4334
|
onSurfaceReadyChange: s,
|
|
@@ -4321,84 +4337,84 @@ function Ra(e) {
|
|
|
4321
4337
|
) }) }) });
|
|
4322
4338
|
}
|
|
4323
4339
|
export {
|
|
4324
|
-
|
|
4325
|
-
|
|
4340
|
+
_a as A2UI_PROTOCOL_VERSION,
|
|
4341
|
+
wa as AskUserFormCard,
|
|
4326
4342
|
xt as CaseSearchProvider,
|
|
4327
4343
|
Ft as ContentSearchProvider,
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4344
|
+
ca as CurlSubmitBlock,
|
|
4345
|
+
ji as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
|
|
4346
|
+
Di as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
|
|
4347
|
+
Vi as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
|
|
4348
|
+
$i as DEFAULT_AUTH_SKOPON_API_BASE_URL_FIELD,
|
|
4333
4349
|
ot as DEFAULT_AUTH_STORAGE_KEY,
|
|
4334
|
-
|
|
4335
|
-
|
|
4350
|
+
Bi as DEFAULT_AUTH_TOKEN_FIELD,
|
|
4351
|
+
vn as DEFAULT_CONTENT_FLOW_TYPE,
|
|
4336
4352
|
Ge as DEFAULT_SKOPON_API_BASE_PATH,
|
|
4337
|
-
|
|
4353
|
+
Or as FORM_MEDIA_SIZES,
|
|
4338
4354
|
_t as FORM_WEB_DEFAULT_HEIGHT,
|
|
4339
|
-
|
|
4340
|
-
|
|
4355
|
+
Lr as FORM_WEB_MAX_HEIGHT,
|
|
4356
|
+
qr as FORM_WEB_MIN_HEIGHT,
|
|
4341
4357
|
Ut as ResumeSearchProvider,
|
|
4342
|
-
|
|
4358
|
+
Ra as SkoponA2uiStreamRenderer,
|
|
4343
4359
|
Oe as SkoponFormProvider,
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4360
|
+
Js as SkoponFormRenderer,
|
|
4361
|
+
_i as a2uiToBlocks,
|
|
4362
|
+
Gn as blocksToA2ui,
|
|
4347
4363
|
bo as blocksToJsonSchema,
|
|
4348
4364
|
$t as buildAnswerAgentBody,
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4365
|
+
qi as buildAskUserCurlBodyJson,
|
|
4366
|
+
Li as buildAskUserCurlStatement,
|
|
4367
|
+
Ia as buildAskUserSubmitCurlFromPayload,
|
|
4368
|
+
Fi as buildAskUserSurface,
|
|
4369
|
+
Zn as buildCurlStatement,
|
|
4354
4370
|
Ve as coerceToggleValue,
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4371
|
+
Ma as copyTextToClipboard,
|
|
4372
|
+
ps as createCaseSearchClient,
|
|
4373
|
+
cs as createContentSearchClient,
|
|
4374
|
+
Fa as createEmptyBlock,
|
|
4375
|
+
xa as createEmptyFormDefinition,
|
|
4376
|
+
Ji as createFormClient,
|
|
4377
|
+
ns as createResumeSearchClient,
|
|
4378
|
+
Ea as createSkoponSdkClients,
|
|
4363
4379
|
et as extractExtraBlockValues,
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4380
|
+
Ii as extractSurfaceValues,
|
|
4381
|
+
nr as formatAnswerAgentSubmitMessage,
|
|
4382
|
+
Oi as getPayloadHiddenBlockValues,
|
|
4383
|
+
Ua as getPayloadInputFieldNames,
|
|
4384
|
+
zi as getPayloadRenderableBlocks,
|
|
4385
|
+
wi as intersectPayloadBlocksWithForm,
|
|
4370
4386
|
Nt as isA2uiSurfaceEmpty,
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4387
|
+
In as isDisplayBlockType,
|
|
4388
|
+
ue as isInputBlockType,
|
|
4389
|
+
Un as isLayoutBlockType,
|
|
4374
4390
|
Re as isMediaBlockType,
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4391
|
+
Mn as isOptionsBlockType,
|
|
4392
|
+
Br as isSupportedWebUrl,
|
|
4393
|
+
we as isWebBlockType,
|
|
4394
|
+
Ui as mapFormDefinitionFromDto,
|
|
4379
4395
|
tt as normalizeFormDefinition,
|
|
4380
4396
|
Te as normalizeMultiselectCount,
|
|
4381
4397
|
Le as normalizeWebHeight,
|
|
4382
4398
|
rt as parsePayloadBlocksJson,
|
|
4383
4399
|
Pi as payloadHasInputBlocks,
|
|
4384
|
-
|
|
4400
|
+
Wi as resolveAnswerAgentCallbackUrl,
|
|
4385
4401
|
at as resolveClientHeaders,
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4402
|
+
Gi as resolveRealtimeWsUrl,
|
|
4403
|
+
vo as resolveSchemaDefaultValue,
|
|
4404
|
+
Hi as resolveSkoponApiBaseUrl,
|
|
4389
4405
|
Vt as resolveSkoponAuthHeaders,
|
|
4390
4406
|
Dt as resolveSubmitAuthHeaders,
|
|
4391
|
-
|
|
4392
|
-
|
|
4407
|
+
xi as resolveSurfaceFromFormDefinition,
|
|
4408
|
+
Gs as skoponAntdTheme,
|
|
4393
4409
|
ge as skoponBrandColors,
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4410
|
+
rr as submitAnswerAgent,
|
|
4411
|
+
er as submitFormJson,
|
|
4412
|
+
Ta as supportsDefaultValue,
|
|
4413
|
+
Ti as surfaceDocToMessages,
|
|
4414
|
+
Pe as syncFormDefinition,
|
|
4415
|
+
wo as useCaseSearch,
|
|
4416
|
+
jo as useContentSearch,
|
|
4417
|
+
Yo as useResumeSearch,
|
|
4402
4418
|
jt as validateAnswerAgentBody,
|
|
4403
|
-
|
|
4419
|
+
Na as validateAnswerAgentContext
|
|
4404
4420
|
};
|