@skopon-cool/form-sdk 0.6.5 → 0.6.7
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/components/AskUserFormCard.d.ts.map +1 -1
- package/dist/components/CurlSubmitBlock.d.ts.map +1 -1
- package/dist/form-sdk.css +1 -1
- package/dist/index.js +209 -215
- package/package.json +1 -1
- package/src/catalog/a2uiCustomCatalog.tsx +2 -2
- package/src/components/AskUserFormCard.tsx +8 -16
- package/src/components/CurlSubmitBlock.tsx +9 -11
- package/src/styles/index.css +69 -0
package/dist/index.js
CHANGED
|
@@ -4,35 +4,35 @@ var Tr = (e, t, n) => t in e ? Ar(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
4
4
|
var me = (e, t, n) => Tr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
5
|
import { jsx as c, jsxs as x, Fragment as Ir } from "react/jsx-runtime";
|
|
6
6
|
import { useRef as U, useState as O, useCallback as j, useMemo as Q, createContext as ke, useContext as Ae, useEffect as B, useSyncExternalStore as Ur, forwardRef as xr, useImperativeHandle as Mr } from "react";
|
|
7
|
-
import { Spin as $t, Button as Se, Typography as X, Avatar as Fr, Tag as
|
|
8
|
-
import { ReloadOutlined as Mn, FileTextOutlined as Fn, UserOutlined as Or, FileImageOutlined as Nn, CaretRightOutlined as Lr, FullscreenOutlined as Br, FileExcelOutlined as $r, FileOutlined as
|
|
9
|
-
import { createBinderlessComponentImplementation as ce, basicCatalog as
|
|
7
|
+
import { Spin as $t, Button as Se, Typography as X, Avatar as Fr, Tag as Oe, Tooltip as tt, Modal as xn, Image as qe, Select as Nt, Checkbox as Nr, Radio as wr, Switch as Rr, TimePicker as Er, DatePicker as Pr, Upload as Pe, Input as bt, InputNumber as zr, ConfigProvider as qr } from "antd";
|
|
8
|
+
import { ReloadOutlined as Mn, FileTextOutlined as Fn, UserOutlined as Or, FileImageOutlined as Nn, CaretRightOutlined as Lr, FullscreenOutlined as Br, FileExcelOutlined as $r, FileOutlined as wn, SoundOutlined as jr, VideoCameraOutlined as Vr } from "@ant-design/icons";
|
|
9
|
+
import { createBinderlessComponentImplementation as ce, basicCatalog as et, A2uiSurface as Rn } from "@a2ui/react/v0_9";
|
|
10
10
|
import { z as y } from "zod";
|
|
11
11
|
import { Catalog as Dr, MessageProcessor as En } from "@a2ui/web_core/v0_9";
|
|
12
12
|
import { injectBasicCatalogStyles as Pn } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
13
13
|
import { injectStyles as zn } from "@a2ui/react/styles";
|
|
14
14
|
import mn from "dayjs";
|
|
15
|
-
const
|
|
15
|
+
const Ra = "v0.9", Kr = [
|
|
16
16
|
"huge",
|
|
17
17
|
"large",
|
|
18
18
|
"medium",
|
|
19
19
|
"small",
|
|
20
20
|
"icon"
|
|
21
21
|
];
|
|
22
|
-
function
|
|
22
|
+
function Le(e) {
|
|
23
23
|
return e === "image" || e === "video" || e === "audio";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Be(e) {
|
|
26
26
|
return e === "web";
|
|
27
27
|
}
|
|
28
28
|
function qn(e) {
|
|
29
29
|
return e === "heading" || e === "paragraph";
|
|
30
30
|
}
|
|
31
31
|
function pe(e) {
|
|
32
|
-
return !qn(e) && !
|
|
32
|
+
return !qn(e) && !Le(e) && !Be(e);
|
|
33
33
|
}
|
|
34
34
|
function On(e) {
|
|
35
|
-
return qn(e) ||
|
|
35
|
+
return qn(e) || Le(e) || Be(e);
|
|
36
36
|
}
|
|
37
37
|
function Ln(e) {
|
|
38
38
|
return e === "select" || e === "multiselect" || e === "radio" || e === "checkbox";
|
|
@@ -40,15 +40,15 @@ function Ln(e) {
|
|
|
40
40
|
function Ea(e) {
|
|
41
41
|
return pe(e) && e !== "file" && e !== "resume_multiselect" && e !== "case_multiselect";
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
function
|
|
43
|
+
const wt = 360, Hr = 200, Wr = 1200;
|
|
44
|
+
function De(e) {
|
|
45
45
|
if (e == null || e === "")
|
|
46
|
-
return
|
|
46
|
+
return wt;
|
|
47
47
|
const t = typeof e == "number" ? e : Number(e);
|
|
48
48
|
return Number.isFinite(t) ? Math.min(
|
|
49
49
|
Wr,
|
|
50
50
|
Math.max(Hr, Math.floor(t))
|
|
51
|
-
) :
|
|
51
|
+
) : wt;
|
|
52
52
|
}
|
|
53
53
|
function Gr(e) {
|
|
54
54
|
if (typeof e != "string") return !1;
|
|
@@ -189,7 +189,7 @@ function oo(e) {
|
|
|
189
189
|
return n ? n.startsWith(".") ? n : `.${n}` : "";
|
|
190
190
|
}).filter(Boolean) : [];
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ke(e) {
|
|
193
193
|
if (!Array.isArray(e)) return [];
|
|
194
194
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
195
195
|
for (const r of e) {
|
|
@@ -199,13 +199,13 @@ function He(e) {
|
|
|
199
199
|
return t;
|
|
200
200
|
}
|
|
201
201
|
function io(e) {
|
|
202
|
-
const t =
|
|
202
|
+
const t = Ke(e), n = [];
|
|
203
203
|
for (const r of t)
|
|
204
204
|
n.push(...Yr[r] ?? [r]);
|
|
205
205
|
return n;
|
|
206
206
|
}
|
|
207
207
|
function so(e) {
|
|
208
|
-
const t =
|
|
208
|
+
const t = Ke(e);
|
|
209
209
|
if (t.length === 0) return [];
|
|
210
210
|
const n = /* @__PURE__ */ new Set();
|
|
211
211
|
for (const r of t)
|
|
@@ -214,7 +214,7 @@ function so(e) {
|
|
|
214
214
|
return Vt.filter((r) => n.has(r.value));
|
|
215
215
|
}
|
|
216
216
|
function Dt(e, t) {
|
|
217
|
-
const n = oo(t), r =
|
|
217
|
+
const n = oo(t), r = Ke(e);
|
|
218
218
|
if (r.length === 0)
|
|
219
219
|
return n.filter((i) => no.has(i));
|
|
220
220
|
const o = new Set(
|
|
@@ -227,7 +227,7 @@ function pn(e, t) {
|
|
|
227
227
|
return o.length > 0 ? o.join(",") : void 0;
|
|
228
228
|
}
|
|
229
229
|
function ao(e, t) {
|
|
230
|
-
const n =
|
|
230
|
+
const n = Ke(e), r = Dt(
|
|
231
231
|
n,
|
|
232
232
|
t
|
|
233
233
|
), o = [
|
|
@@ -247,7 +247,7 @@ const lo = [
|
|
|
247
247
|
function uo(e) {
|
|
248
248
|
return e && co.has(e) ? e : "file";
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function He(e) {
|
|
251
251
|
return typeof e == "string" && Kr.includes(e) ? e : "medium";
|
|
252
252
|
}
|
|
253
253
|
function mo(e, t) {
|
|
@@ -261,7 +261,7 @@ function po(e) {
|
|
|
261
261
|
return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
|
|
262
262
|
}
|
|
263
263
|
function fo(e) {
|
|
264
|
-
return `form-media-size-${
|
|
264
|
+
return `form-media-size-${He(e)}`;
|
|
265
265
|
}
|
|
266
266
|
function ho(e) {
|
|
267
267
|
return `form-media-preview form-media-list ${fo(e)}`;
|
|
@@ -291,19 +291,19 @@ const go = 10;
|
|
|
291
291
|
function $n(e) {
|
|
292
292
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function We(e) {
|
|
295
295
|
return e === !0 || e === "true" || e === 1 || e === "1";
|
|
296
296
|
}
|
|
297
297
|
function nt(e, t = 1) {
|
|
298
298
|
const n = typeof e == "number" ? e : Number(e);
|
|
299
299
|
return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function we(e, t = 1) {
|
|
302
302
|
const n = typeof e == "number" ? e : Number(e);
|
|
303
303
|
return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
|
|
304
304
|
}
|
|
305
305
|
function jn(e, t) {
|
|
306
|
-
return t == null ? void 0 : e === "toggle" ?
|
|
306
|
+
return t == null ? void 0 : e === "toggle" ? We(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;
|
|
307
307
|
}
|
|
308
308
|
function yo(e) {
|
|
309
309
|
if (Array.isArray(e)) return e.map(String).filter(Boolean);
|
|
@@ -353,7 +353,7 @@ function Co(e) {
|
|
|
353
353
|
}
|
|
354
354
|
function ko(e) {
|
|
355
355
|
var o, i, s, l, a, u, d, m, k;
|
|
356
|
-
const t = Co(e), n =
|
|
356
|
+
const t = Co(e), n = Ke(t.fileAcceptTypes), r = t.type;
|
|
357
357
|
return {
|
|
358
358
|
id: ((o = t.id) == null ? void 0 : o.trim()) || xe("block-"),
|
|
359
359
|
type: r,
|
|
@@ -363,10 +363,10 @@ function ko(e) {
|
|
|
363
363
|
placeholder: t.placeholder ?? "",
|
|
364
364
|
help: t.help ?? "",
|
|
365
365
|
required: t.required === !0,
|
|
366
|
-
mediaUrls:
|
|
367
|
-
mediaSize:
|
|
368
|
-
webUrl:
|
|
369
|
-
webHeight:
|
|
366
|
+
mediaUrls: Le(r) ? mo(t, go) : void 0,
|
|
367
|
+
mediaSize: Le(r) ? He(t.mediaSize) : void 0,
|
|
368
|
+
webUrl: Be(r) ? ((l = t.webUrl) == null ? void 0 : l.trim()) ?? "" : void 0,
|
|
369
|
+
webHeight: Be(r) ? De(t.webHeight) : void 0,
|
|
370
370
|
fileAcceptTypes: n,
|
|
371
371
|
fileAcceptExtensions: Dt(
|
|
372
372
|
n,
|
|
@@ -400,15 +400,15 @@ function ko(e) {
|
|
|
400
400
|
value: t.condition.value
|
|
401
401
|
} : void 0,
|
|
402
402
|
resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
|
|
403
|
-
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ?
|
|
404
|
-
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ?
|
|
403
|
+
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? we(t.resumeMinCount, 1) : void 0,
|
|
404
|
+
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? we(t.resumeMaxCount, 1) : void 0,
|
|
405
405
|
resumeDisplayMode: r === "resume_multiselect" ? t.resumeDisplayMode === "content-only" ? "content-only" : "profile-content" : void 0,
|
|
406
406
|
resumeDisplayCount: r === "resume_multiselect" ? bo(t.resumeDisplayCount) : void 0,
|
|
407
407
|
resumeFilter: r === "resume_multiselect" ? So(t.resumeFilter) : void 0,
|
|
408
408
|
contentFilter: r === "resume_multiselect" ? _o(t.contentFilter) : void 0,
|
|
409
409
|
caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
|
|
410
|
-
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ?
|
|
411
|
-
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ?
|
|
410
|
+
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? we(t.caseMinCount, 1) : void 0,
|
|
411
|
+
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? we(t.caseMaxCount, 1) : void 0,
|
|
412
412
|
caseFilter: r === "case_multiselect" ? vo(t.caseFilter) : void 0
|
|
413
413
|
};
|
|
414
414
|
}
|
|
@@ -420,7 +420,7 @@ function hn(e, t) {
|
|
|
420
420
|
type: "array",
|
|
421
421
|
items: { type: "string" }
|
|
422
422
|
};
|
|
423
|
-
return e !== void 0 && (n.minItems =
|
|
423
|
+
return e !== void 0 && (n.minItems = we(e, 1)), t !== void 0 && (n.maxItems = we(t, 1)), n;
|
|
424
424
|
}
|
|
425
425
|
function To(e) {
|
|
426
426
|
const t = jn(e.type, e.defaultValue);
|
|
@@ -528,7 +528,7 @@ function Uo(e, t, n) {
|
|
|
528
528
|
}, s = t == null ? void 0 : t.trim(), l = n == null ? void 0 : n.trim();
|
|
529
529
|
return s && (i.title = s), l && (i.description = l), i;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function $e(e) {
|
|
532
532
|
const t = e.title ?? "", n = e.description ?? "";
|
|
533
533
|
return {
|
|
534
534
|
title: t,
|
|
@@ -560,11 +560,11 @@ function xo(e) {
|
|
|
560
560
|
}
|
|
561
561
|
function st(e) {
|
|
562
562
|
if (!e || !Array.isArray(e.blocks))
|
|
563
|
-
return
|
|
563
|
+
return $e({ title: "", description: "", blocks: [] });
|
|
564
564
|
const t = e.blocks.map(ko), n = xo(e.modules), r = new Set((n == null ? void 0 : n.map((o) => o.id)) ?? []);
|
|
565
565
|
for (const o of t)
|
|
566
566
|
o.moduleId && !r.has(o.moduleId) && (o.moduleId = void 0);
|
|
567
|
-
return
|
|
567
|
+
return $e({
|
|
568
568
|
title: typeof e.title == "string" ? e.title : "",
|
|
569
569
|
description: typeof e.description == "string" ? e.description : "",
|
|
570
570
|
modules: n,
|
|
@@ -572,7 +572,7 @@ function st(e) {
|
|
|
572
572
|
});
|
|
573
573
|
}
|
|
574
574
|
function Pa() {
|
|
575
|
-
return
|
|
575
|
+
return $e({ title: "", description: "", blocks: [] });
|
|
576
576
|
}
|
|
577
577
|
function za(e) {
|
|
578
578
|
const t = {
|
|
@@ -580,7 +580,7 @@ function za(e) {
|
|
|
580
580
|
type: e,
|
|
581
581
|
label: e
|
|
582
582
|
};
|
|
583
|
-
return pe(e) && (t.label = "", t.name = xe("field_"), t.placeholder = "", t.required = !1),
|
|
583
|
+
return pe(e) && (t.label = "", t.name = xe("field_"), t.placeholder = "", t.required = !1), Le(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), Be(e) && (t.label = "", t.help = "", t.webUrl = "", t.webHeight = wt), Ln(e) && (t.options = [
|
|
584
584
|
{ value: "option_1", label: "选项 1" },
|
|
585
585
|
{ value: "option_2", label: "选项 2" }
|
|
586
586
|
]), 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 = Dn, t.contentFilter = {
|
|
@@ -652,14 +652,14 @@ function No(e, t, n) {
|
|
|
652
652
|
const Kn = ke(
|
|
653
653
|
null
|
|
654
654
|
);
|
|
655
|
-
function
|
|
655
|
+
function wo(e) {
|
|
656
656
|
try {
|
|
657
657
|
return JSON.stringify(e);
|
|
658
658
|
} catch {
|
|
659
659
|
return String(e.length);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
const
|
|
662
|
+
const Ro = {
|
|
663
663
|
publishLiveOptions: () => {
|
|
664
664
|
},
|
|
665
665
|
liveOptions: /* @__PURE__ */ new Map(),
|
|
@@ -678,7 +678,7 @@ function Eo({ children: e }) {
|
|
|
678
678
|
const _ = A.map((v) => ({
|
|
679
679
|
value: String(v.value ?? ""),
|
|
680
680
|
label: String(v.label ?? v.value ?? "")
|
|
681
|
-
})), S =
|
|
681
|
+
})), S = wo(_);
|
|
682
682
|
n.current.get(f) !== S && (n.current.set(f, S), t.current.set(f, _), r.current.includes(f) || (r.current = [...r.current, f]), l(new Map(t.current)), u(r.current), i((v) => v + 1));
|
|
683
683
|
},
|
|
684
684
|
[]
|
|
@@ -703,10 +703,10 @@ function Eo({ children: e }) {
|
|
|
703
703
|
return /* @__PURE__ */ c(Kn.Provider, { value: k, children: e });
|
|
704
704
|
}
|
|
705
705
|
function Kt() {
|
|
706
|
-
return Ae(Kn) ??
|
|
706
|
+
return Ae(Kn) ?? Ro;
|
|
707
707
|
}
|
|
708
708
|
const Hn = ke({ interactive: !0 });
|
|
709
|
-
function
|
|
709
|
+
function Rt({
|
|
710
710
|
interactive: e,
|
|
711
711
|
children: t
|
|
712
712
|
}) {
|
|
@@ -825,7 +825,7 @@ function Ie(e, t = "value", n = {}) {
|
|
|
825
825
|
), I = j(() => {
|
|
826
826
|
if (!(!i || o === void 0))
|
|
827
827
|
return e.dataContext.resolveDynamicValue(o);
|
|
828
|
-
}, [e, o, i]),
|
|
828
|
+
}, [e, o, i]), w = Ur(v, I, I), F = j(
|
|
829
829
|
(W) => {
|
|
830
830
|
if (!s) return;
|
|
831
831
|
const Z = () => {
|
|
@@ -863,7 +863,7 @@ function Ie(e, t = "value", n = {}) {
|
|
|
863
863
|
});
|
|
864
864
|
}, [s, a]);
|
|
865
865
|
return {
|
|
866
|
-
value:
|
|
866
|
+
value: w,
|
|
867
867
|
setValue: P,
|
|
868
868
|
/** 写入 dataModel 但不上报(用于模式切换规范化等内部同步) */
|
|
869
869
|
setValueSilent: N,
|
|
@@ -872,7 +872,7 @@ function Ie(e, t = "value", n = {}) {
|
|
|
872
872
|
reportFocus: H
|
|
873
873
|
};
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function je(e) {
|
|
876
876
|
if (typeof e == "string") return e || void 0;
|
|
877
877
|
if (typeof e == "number") return String(e);
|
|
878
878
|
}
|
|
@@ -979,7 +979,7 @@ function Wo({ context: e }) {
|
|
|
979
979
|
const { interactive: t } = Te(), n = jo(), { publishLiveOptions: r } = Kt(), { value: o, setValue: i, setValueSilent: s, fieldName: l } = Ie(e, "value", {
|
|
980
980
|
component: "SkoponCaseSelect",
|
|
981
981
|
changeAction: "click"
|
|
982
|
-
}), a = e.componentModel.properties, u = _t(a.label), d = _t(a.placeholder), m = _t(a.help), k = a.enableRefresh !== !1, h = rt(a.minCount), A = rt(a.maxCount), f = Q(() => Ct(a.caseFilter), [a.caseFilter]), _ = Do(f), [S, v] = O(1), [I,
|
|
982
|
+
}), a = e.componentModel.properties, u = _t(a.label), d = _t(a.placeholder), m = _t(a.help), k = a.enableRefresh !== !1, h = rt(a.minCount), A = rt(a.maxCount), f = Q(() => Ct(a.caseFilter), [a.caseFilter]), _ = Do(f), [S, v] = O(1), [I, w] = O(!1), [F, N] = O(""), [P, H] = O([]), [W, Z] = O(0), [G, ee] = O(f.pageSize ?? 20), M = U(0), te = fe(o);
|
|
983
983
|
B(() => {
|
|
984
984
|
const q = Xn(te, A);
|
|
985
985
|
q !== null && s(q);
|
|
@@ -988,10 +988,10 @@ function Wo({ context: e }) {
|
|
|
988
988
|
async (q) => {
|
|
989
989
|
const se = Ct(JSON.parse(_)), ae = ++M.current;
|
|
990
990
|
if (!n || !kt(se)) {
|
|
991
|
-
H([]), Z(0), N(""),
|
|
991
|
+
H([]), Z(0), N(""), w(!1);
|
|
992
992
|
return;
|
|
993
993
|
}
|
|
994
|
-
|
|
994
|
+
w(!0), N("");
|
|
995
995
|
try {
|
|
996
996
|
const b = await n({ filter: se, page: q });
|
|
997
997
|
if (ae !== M.current) return;
|
|
@@ -1006,7 +1006,7 @@ function Wo({ context: e }) {
|
|
|
1006
1006
|
if (ae !== M.current) return;
|
|
1007
1007
|
H([]), Z(0), N(b instanceof Error ? b.message : "加载案例列表失败");
|
|
1008
1008
|
} finally {
|
|
1009
|
-
ae === M.current &&
|
|
1009
|
+
ae === M.current && w(!1);
|
|
1010
1010
|
}
|
|
1011
1011
|
},
|
|
1012
1012
|
[n, _, l, r]
|
|
@@ -1208,7 +1208,7 @@ function oi() {
|
|
|
1208
1208
|
function Tt(e) {
|
|
1209
1209
|
return typeof e == "string" ? e : "";
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function ze(e) {
|
|
1212
1212
|
return Array.isArray(e) ? e.map(String).filter(Boolean) : [];
|
|
1213
1213
|
}
|
|
1214
1214
|
function Sn(e) {
|
|
@@ -1216,11 +1216,11 @@ function Sn(e) {
|
|
|
1216
1216
|
return { names: [], agentUniqueIds: [], tagUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
|
|
1217
1217
|
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;
|
|
1218
1218
|
return {
|
|
1219
|
-
names:
|
|
1219
|
+
names: ze(t.names),
|
|
1220
1220
|
...n ? { agentKind: n } : {},
|
|
1221
|
-
agentUniqueIds:
|
|
1222
|
-
tagUniqueIds:
|
|
1223
|
-
resumeUniqueIds:
|
|
1221
|
+
agentUniqueIds: ze(t.agentUniqueIds),
|
|
1222
|
+
tagUniqueIds: ze(t.tagUniqueIds),
|
|
1223
|
+
resumeUniqueIds: ze(t.resumeUniqueIds),
|
|
1224
1224
|
pageSize: o
|
|
1225
1225
|
};
|
|
1226
1226
|
}
|
|
@@ -1253,7 +1253,7 @@ function _n(e) {
|
|
|
1253
1253
|
return {
|
|
1254
1254
|
flowType: n || "content-production",
|
|
1255
1255
|
...r ? { category: r } : {},
|
|
1256
|
-
tagUniqueIds:
|
|
1256
|
+
tagUniqueIds: ze(t.tagUniqueIds),
|
|
1257
1257
|
tagMatch: t.tagMatch === "any" ? "any" : "all",
|
|
1258
1258
|
pageSize: i
|
|
1259
1259
|
};
|
|
@@ -1269,7 +1269,7 @@ function ai(e) {
|
|
|
1269
1269
|
pageSize: e.pageSize
|
|
1270
1270
|
};
|
|
1271
1271
|
}
|
|
1272
|
-
async function
|
|
1272
|
+
async function Ye(e, t, n, r) {
|
|
1273
1273
|
let o = e;
|
|
1274
1274
|
for (let i = 0; i < 20; i += 1) {
|
|
1275
1275
|
const s = ri(
|
|
@@ -1357,13 +1357,13 @@ function ci({
|
|
|
1357
1357
|
),
|
|
1358
1358
|
/* @__PURE__ */ x("div", { className: "skopon-resume-select-card-person-text", children: [
|
|
1359
1359
|
/* @__PURE__ */ c("div", { className: "skopon-resume-select-card-person-name", children: e.name || "未命名简历" }),
|
|
1360
|
-
i.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-specialties", children: i.map((s) => /* @__PURE__ */ c(
|
|
1360
|
+
i.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-specialties", children: i.map((s) => /* @__PURE__ */ c(Oe, { className: "skopon-resume-select-card-tag", children: s }, s)) }) : null
|
|
1361
1361
|
] })
|
|
1362
1362
|
] }) : null,
|
|
1363
1363
|
/* @__PURE__ */ c("div", { className: "skopon-resume-select-card-content-title", children: t.title || "未命名内容" }),
|
|
1364
1364
|
(t.tagLabels ?? []).length > 0 ? /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-content-tags", "aria-label": "内容标签", children: [
|
|
1365
1365
|
/* @__PURE__ */ c("span", { className: "skopon-resume-select-card-content-tags-label", children: "内容标签" }),
|
|
1366
|
-
/* @__PURE__ */ c("div", { className: "skopon-resume-select-card-content-tags-list", children: (t.tagLabels ?? []).map((s) => /* @__PURE__ */ c(
|
|
1366
|
+
/* @__PURE__ */ c("div", { className: "skopon-resume-select-card-content-tags-list", children: (t.tagLabels ?? []).map((s) => /* @__PURE__ */ c(Oe, { className: "skopon-resume-select-card-content-tag", children: s }, s)) })
|
|
1367
1367
|
] }) : null,
|
|
1368
1368
|
/* @__PURE__ */ c(li, { content: t })
|
|
1369
1369
|
]
|
|
@@ -1374,7 +1374,7 @@ function ui({ context: e }) {
|
|
|
1374
1374
|
const { interactive: t } = Te(), n = oi(), r = Xo(), { publishLiveOptions: o } = Kt(), { value: i, setValue: s, setValueSilent: l, fieldName: a } = Ie(e, "value", {
|
|
1375
1375
|
component: "SkoponResumeSelect",
|
|
1376
1376
|
changeAction: "click"
|
|
1377
|
-
}), u = e.componentModel.properties, d = Tt(u.label), m = Tt(u.placeholder), k = Tt(u.help), h = u.enableRefresh !== !1, A = rt(u.minCount), f = rt(u.maxCount), _ = u.resumeDisplayMode === "content-only", S = ei(u.resumeDisplayCount), v = Q(() => Sn(u.resumeFilter), [u.resumeFilter]), I = Q(() => _n(u.contentFilter), [u.contentFilter]),
|
|
1377
|
+
}), u = e.componentModel.properties, d = Tt(u.label), m = Tt(u.placeholder), k = Tt(u.help), h = u.enableRefresh !== !1, A = rt(u.minCount), f = rt(u.maxCount), _ = u.resumeDisplayMode === "content-only", S = ei(u.resumeDisplayCount), v = Q(() => Sn(u.resumeFilter), [u.resumeFilter]), I = Q(() => _n(u.contentFilter), [u.contentFilter]), w = bn(v), F = bn(I), [N, P] = O(() => Ne(20)), [H, W] = O(() => Ne(20)), [Z, G] = O(0), [ee, M] = O(0), [te, V] = O(!1), [ie, $] = O(""), D = U(0), q = U(!1), se = U(N), ae = U(H);
|
|
1378
1378
|
se.current = N, ae.current = H;
|
|
1379
1379
|
const b = fe(i);
|
|
1380
1380
|
B(() => {
|
|
@@ -1383,10 +1383,10 @@ function ui({ context: e }) {
|
|
|
1383
1383
|
}, [f, b, l]);
|
|
1384
1384
|
const le = j(
|
|
1385
1385
|
(g) => {
|
|
1386
|
-
const C = Sn(JSON.parse(
|
|
1386
|
+
const C = Sn(JSON.parse(w));
|
|
1387
1387
|
return n ? n({ filter: C, page: g }) : Promise.reject(new Error("未配置简历搜索服务"));
|
|
1388
1388
|
},
|
|
1389
|
-
[n,
|
|
1389
|
+
[n, w]
|
|
1390
1390
|
), z = j(
|
|
1391
1391
|
(g) => {
|
|
1392
1392
|
const C = _n(JSON.parse(F));
|
|
@@ -1412,14 +1412,14 @@ function ui({ context: e }) {
|
|
|
1412
1412
|
total: C.total,
|
|
1413
1413
|
fetchedPage: C.page || 1,
|
|
1414
1414
|
pageSize: C.pageSize
|
|
1415
|
-
},
|
|
1415
|
+
}, R = {
|
|
1416
1416
|
items: T.list,
|
|
1417
1417
|
total: T.total,
|
|
1418
1418
|
fetchedPage: T.page || 1,
|
|
1419
1419
|
pageSize: T.pageSize
|
|
1420
1420
|
};
|
|
1421
|
-
if (_ || (K = await
|
|
1422
|
-
P(K), W(
|
|
1421
|
+
if (_ || (K = await Ye(K, 0, S, le)), R = await Ye(R, 0, S, z), g !== D.current) return;
|
|
1422
|
+
P(K), W(R);
|
|
1423
1423
|
} catch (C) {
|
|
1424
1424
|
if (g !== D.current) return;
|
|
1425
1425
|
P(Ne(20)), W(Ne(20)), $(C instanceof Error ? C.message : _ ? "加载内容失败" : "加载简历和内容失败");
|
|
@@ -1464,12 +1464,12 @@ function ui({ context: e }) {
|
|
|
1464
1464
|
const g = ++D.current, C = yn(Z, S, N.total), T = yn(ee, S, H.total);
|
|
1465
1465
|
V(!0), $(""), (async () => {
|
|
1466
1466
|
try {
|
|
1467
|
-
const [K,
|
|
1468
|
-
_ ? Promise.resolve(se.current) :
|
|
1469
|
-
|
|
1467
|
+
const [K, R] = await Promise.all([
|
|
1468
|
+
_ ? Promise.resolve(se.current) : Ye(se.current, C, S, le),
|
|
1469
|
+
Ye(ae.current, T, S, z)
|
|
1470
1470
|
]);
|
|
1471
1471
|
if (g !== D.current) return;
|
|
1472
|
-
P(K), W(
|
|
1472
|
+
P(K), W(R), G(C), M(T);
|
|
1473
1473
|
} catch (K) {
|
|
1474
1474
|
if (g !== D.current) return;
|
|
1475
1475
|
$(K instanceof Error ? K.message : "换一批失败");
|
|
@@ -1543,7 +1543,7 @@ function pi(e, t) {
|
|
|
1543
1543
|
id: t.id,
|
|
1544
1544
|
component: "SkoponWeb",
|
|
1545
1545
|
url: ((n = e.webUrl) == null ? void 0 : n.trim()) ?? "",
|
|
1546
|
-
height:
|
|
1546
|
+
height: De(e.webHeight),
|
|
1547
1547
|
label: t.label,
|
|
1548
1548
|
help: e.help ?? ""
|
|
1549
1549
|
}
|
|
@@ -1555,7 +1555,7 @@ function fi(e, t, n) {
|
|
|
1555
1555
|
return {
|
|
1556
1556
|
...t("web"),
|
|
1557
1557
|
webUrl: ((i = n.asLiteral(e.url)) == null ? void 0 : i.trim()) ?? "",
|
|
1558
|
-
webHeight:
|
|
1558
|
+
webHeight: De(e.height),
|
|
1559
1559
|
...r ? { help: r } : {}
|
|
1560
1560
|
};
|
|
1561
1561
|
}
|
|
@@ -1586,7 +1586,7 @@ function hi({
|
|
|
1586
1586
|
label: n,
|
|
1587
1587
|
help: r
|
|
1588
1588
|
}) {
|
|
1589
|
-
const [o, i] = O(!1), [s, l] = O(!0), a = U(null), u = e.trim(), d = Gr(u) ? u : null, m =
|
|
1589
|
+
const [o, i] = O(!1), [s, l] = O(!0), a = U(null), u = e.trim(), d = Gr(u) ? u : null, m = De(t), k = (n == null ? void 0 : n.trim()) || "网页展示", h = r == null ? void 0 : r.trim(), A = u ? "网页 URL 无效" : "未设置网页 URL";
|
|
1590
1590
|
return /* @__PURE__ */ x("div", { className: "form-block-preview skopon-web-preview", children: [
|
|
1591
1591
|
n != null && n.trim() ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: n.trim() }) : null,
|
|
1592
1592
|
/* @__PURE__ */ x(
|
|
@@ -1605,7 +1605,7 @@ function hi({
|
|
|
1605
1605
|
}
|
|
1606
1606
|
) : null,
|
|
1607
1607
|
d ? null : /* @__PURE__ */ c("div", { className: "skopon-web-empty", role: "status", children: A }),
|
|
1608
|
-
d ? /* @__PURE__ */ c(
|
|
1608
|
+
d ? /* @__PURE__ */ c(tt, { title: "扩展显示", children: /* @__PURE__ */ c(
|
|
1609
1609
|
Se,
|
|
1610
1610
|
{
|
|
1611
1611
|
type: "default",
|
|
@@ -1665,7 +1665,7 @@ const gi = {
|
|
|
1665
1665
|
hi,
|
|
1666
1666
|
{
|
|
1667
1667
|
url: typeof t.url == "string" ? t.url : "",
|
|
1668
|
-
height:
|
|
1668
|
+
height: De(t.height),
|
|
1669
1669
|
label: typeof t.label == "string" ? t.label : "",
|
|
1670
1670
|
help: typeof t.help == "string" ? t.help : ""
|
|
1671
1671
|
}
|
|
@@ -1715,7 +1715,7 @@ function Ii(e) {
|
|
|
1715
1715
|
component: "SkoponMedia",
|
|
1716
1716
|
mediaType: n,
|
|
1717
1717
|
urls: po(e),
|
|
1718
|
-
mediaSize:
|
|
1718
|
+
mediaSize: He(e.mediaSize),
|
|
1719
1719
|
label: e.label ?? "",
|
|
1720
1720
|
help: e.help ?? "",
|
|
1721
1721
|
placeholder: e.placeholder ?? ""
|
|
@@ -1727,8 +1727,8 @@ function Ui(e) {
|
|
|
1727
1727
|
const t = re(e.url);
|
|
1728
1728
|
return t != null && t.trim() ? [t.trim()] : [];
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const r = typeof e.id == "string" ? e.id : xe("block-"), o = Ui(e), i = re(e.label) ?? re(e.description) ?? n, s = re(e.help), l = re(e.placeholder), a =
|
|
1730
|
+
function Qe(e, t, n) {
|
|
1731
|
+
const r = typeof e.id == "string" ? e.id : xe("block-"), o = Ui(e), i = re(e.label) ?? re(e.description) ?? n, s = re(e.help), l = re(e.placeholder), a = He(e.mediaSize);
|
|
1732
1732
|
return {
|
|
1733
1733
|
id: r,
|
|
1734
1734
|
type: t,
|
|
@@ -1742,7 +1742,7 @@ function Xe(e, t, n) {
|
|
|
1742
1742
|
function An(e) {
|
|
1743
1743
|
switch (e.type) {
|
|
1744
1744
|
case "toggle":
|
|
1745
|
-
return
|
|
1745
|
+
return We(e.defaultValue);
|
|
1746
1746
|
case "multiselect":
|
|
1747
1747
|
case "checkbox":
|
|
1748
1748
|
case "file":
|
|
@@ -1997,14 +1997,14 @@ function Fi(e) {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
case "SkoponMedia": {
|
|
1999
1999
|
const l = String(e.mediaType ?? "image");
|
|
2000
|
-
return
|
|
2000
|
+
return Qe(e, l === "video" ? "video" : l === "audio" ? "audio" : "image", r);
|
|
2001
2001
|
}
|
|
2002
2002
|
case "Image":
|
|
2003
|
-
return
|
|
2003
|
+
return Qe(e, "image", r);
|
|
2004
2004
|
case "Video":
|
|
2005
|
-
return
|
|
2005
|
+
return Qe(e, "video", r);
|
|
2006
2006
|
case "AudioPlayer":
|
|
2007
|
-
return
|
|
2007
|
+
return Qe(e, "audio", r);
|
|
2008
2008
|
case "FileUpload": {
|
|
2009
2009
|
const l = re(e.accept) ?? "", a = { ...i("file"), name: o };
|
|
2010
2010
|
return a.help = re(e.help), a.fileReviewCriteria = re(e.fileReviewCriteria), a.fileReviewRequired = e.fileReviewRequired !== !1, (e.fileSourceMode === "upload_required" || e.fileSourceMode === "upload_or_asset" || e.fileSourceMode === "asset_only") && (a.fileSourceMode = e.fileSourceMode), a.fileAssetOptions = jt(e.fileAssetOptions), a.assetSlotKey = re(e.assetSlotKey), (e.assetType === "image" || e.assetType === "video" || e.assetType === "audio" || e.assetType === "text") && (a.assetType = e.assetType), (e.fileReviewStatus === "passed" || e.fileReviewStatus === "failed") && (a.fileReviewStatus = e.fileReviewStatus), a.fileReviewMessage = re(e.fileReviewMessage), Array.isArray(e.fileRejectedUrls) && (a.fileRejectedUrls = e.fileRejectedUrls.filter((u) => typeof u == "string")), Array.isArray(e.fileExampleUrls) && (a.fileExampleUrls = e.fileExampleUrls.filter((u) => typeof u == "string")), l && (a.fileAcceptExtensions = l.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (a.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (a.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (a.fileMinCount = e.minCount), typeof e.maxCount == "number" && (a.fileMaxCount = e.maxCount), a;
|
|
@@ -2032,12 +2032,12 @@ function Ni(e, t) {
|
|
|
2032
2032
|
const r = (i = n.name) == null ? void 0 : i.trim();
|
|
2033
2033
|
if (!r || !(r in t)) return n;
|
|
2034
2034
|
const o = t[r];
|
|
2035
|
-
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue:
|
|
2035
|
+
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: We(o) } : { ...n, defaultValue: o };
|
|
2036
2036
|
}) : e;
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function wi(e) {
|
|
2039
2039
|
if (!e || !Array.isArray(e.components))
|
|
2040
|
-
return
|
|
2040
|
+
return $e({ title: "", description: "", blocks: [] });
|
|
2041
2041
|
const t = Mi(e), n = [];
|
|
2042
2042
|
or(e.root ?? ot, t, /* @__PURE__ */ new Set(), n);
|
|
2043
2043
|
let r = "", o = "";
|
|
@@ -2054,13 +2054,13 @@ function Ri(e) {
|
|
|
2054
2054
|
const l = Fi(s);
|
|
2055
2055
|
l && i.push(l);
|
|
2056
2056
|
}
|
|
2057
|
-
return
|
|
2057
|
+
return $e({
|
|
2058
2058
|
title: r,
|
|
2059
2059
|
description: o,
|
|
2060
2060
|
blocks: Ni(i, e.dataModel)
|
|
2061
2061
|
});
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2063
|
+
function Ri(e, t) {
|
|
2064
2064
|
const { surfaceId: n, catalogId: r } = t, o = [
|
|
2065
2065
|
{ version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
|
|
2066
2066
|
{
|
|
@@ -2106,7 +2106,7 @@ function zi(e) {
|
|
|
2106
2106
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2107
2107
|
return;
|
|
2108
2108
|
const t = e;
|
|
2109
|
-
return !(Array.isArray(t.blocks) && t.blocks.length > 0) && ir(t.a2ui) ?
|
|
2109
|
+
return !(Array.isArray(t.blocks) && t.blocks.length > 0) && ir(t.a2ui) ? wi(t.a2ui) : st({
|
|
2110
2110
|
title: typeof t.title == "string" ? t.title : "",
|
|
2111
2111
|
description: typeof t.description == "string" ? t.description : "",
|
|
2112
2112
|
modules: Array.isArray(t.modules) ? t.modules : void 0,
|
|
@@ -2385,7 +2385,7 @@ async function ut(e) {
|
|
|
2385
2385
|
throw new Error(t.message || `响应缺少 data (${e.status})`);
|
|
2386
2386
|
return t.data;
|
|
2387
2387
|
}
|
|
2388
|
-
const dt = "auth_user", Yi = "token", Qi = "answer_agent_callback_url", Xi = "realtime_ws_url", Zi = "skopon_api_base_url", es = "/api/v1/mock/ask_user_answer_mock",
|
|
2388
|
+
const dt = "auth_user", Yi = "token", Qi = "answer_agent_callback_url", Xi = "realtime_ws_url", Zi = "skopon_api_base_url", es = "/api/v1/mock/ask_user_answer_mock", Xe = "/api/v1";
|
|
2389
2389
|
function mt(e) {
|
|
2390
2390
|
if (typeof window > "u") return null;
|
|
2391
2391
|
try {
|
|
@@ -2403,12 +2403,12 @@ function pt(e) {
|
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
2405
|
function Ut() {
|
|
2406
|
-
if (typeof window > "u") return
|
|
2406
|
+
if (typeof window > "u") return Xe;
|
|
2407
2407
|
try {
|
|
2408
2408
|
const e = window.location.origin, t = new URL(e);
|
|
2409
|
-
return t.protocol !== "http:" && t.protocol !== "https:" ?
|
|
2409
|
+
return t.protocol !== "http:" && t.protocol !== "https:" ? Xe : `${t.origin}${Xe}`;
|
|
2410
2410
|
} catch {
|
|
2411
|
-
return
|
|
2411
|
+
return Xe;
|
|
2412
2412
|
}
|
|
2413
2413
|
}
|
|
2414
2414
|
function Ba(e = {}) {
|
|
@@ -2809,7 +2809,7 @@ function ks(e, t) {
|
|
|
2809
2809
|
case "case_multiselect":
|
|
2810
2810
|
return fe(t).length === 0;
|
|
2811
2811
|
case "toggle":
|
|
2812
|
-
return !
|
|
2812
|
+
return !We(t);
|
|
2813
2813
|
case "number":
|
|
2814
2814
|
return t == null || t === "";
|
|
2815
2815
|
default:
|
|
@@ -2867,7 +2867,7 @@ const Ts = {
|
|
|
2867
2867
|
video: Vr,
|
|
2868
2868
|
audio: jr,
|
|
2869
2869
|
image: Nn,
|
|
2870
|
-
file:
|
|
2870
|
+
file: wn,
|
|
2871
2871
|
spreadsheet: $r,
|
|
2872
2872
|
document: Fn
|
|
2873
2873
|
};
|
|
@@ -2876,7 +2876,7 @@ function Mt({
|
|
|
2876
2876
|
size: t = 40,
|
|
2877
2877
|
className: n
|
|
2878
2878
|
}) {
|
|
2879
|
-
const r = Ts[e] ??
|
|
2879
|
+
const r = Ts[e] ?? wn;
|
|
2880
2880
|
return /* @__PURE__ */ c(
|
|
2881
2881
|
r,
|
|
2882
2882
|
{
|
|
@@ -2945,9 +2945,9 @@ const vr = "skopon-form-v0_9", Ns = /* @__PURE__ */ new Set([
|
|
|
2945
2945
|
"TextField",
|
|
2946
2946
|
"Text",
|
|
2947
2947
|
...Ai()
|
|
2948
|
-
]),
|
|
2949
|
-
function
|
|
2950
|
-
const t = [...
|
|
2948
|
+
]), ws = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
|
|
2949
|
+
function Ge(e) {
|
|
2950
|
+
const t = [...et.components.values()].find((n) => n.name === e);
|
|
2951
2951
|
if (!t) throw new Error(`Missing basic catalog component: ${e}`);
|
|
2952
2952
|
return t.schema;
|
|
2953
2953
|
}
|
|
@@ -3001,13 +3001,13 @@ function gt(e, t) {
|
|
|
3001
3001
|
return {
|
|
3002
3002
|
mediaType: t,
|
|
3003
3003
|
urls: n,
|
|
3004
|
-
mediaSize:
|
|
3004
|
+
mediaSize: He(e.mediaSize),
|
|
3005
3005
|
label: E(e.label) || E(e.description),
|
|
3006
3006
|
help: E(e.help),
|
|
3007
3007
|
placeholder: E(e.placeholder)
|
|
3008
3008
|
};
|
|
3009
3009
|
}
|
|
3010
|
-
const
|
|
3010
|
+
const Rs = {
|
|
3011
3011
|
name: "SkoponMedia",
|
|
3012
3012
|
schema: y.object({
|
|
3013
3013
|
mediaType: y.any().optional(),
|
|
@@ -3017,17 +3017,17 @@ const ws = {
|
|
|
3017
3017
|
help: y.any().optional(),
|
|
3018
3018
|
placeholder: y.any().optional()
|
|
3019
3019
|
}).passthrough()
|
|
3020
|
-
}, Es = ce(
|
|
3020
|
+
}, Es = ce(Rs, ({ context: e }) => {
|
|
3021
3021
|
const t = e.componentModel.properties, n = E(t.mediaType);
|
|
3022
3022
|
return /* @__PURE__ */ c(ht, { ...gt(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
|
|
3023
3023
|
}), Ps = ce(
|
|
3024
|
-
{ name: "Image", schema:
|
|
3024
|
+
{ name: "Image", schema: Ge("Image") },
|
|
3025
3025
|
({ context: e }) => /* @__PURE__ */ c(ht, { ...gt(e.componentModel.properties, "image") })
|
|
3026
3026
|
), zs = ce(
|
|
3027
|
-
{ name: "Video", schema:
|
|
3027
|
+
{ name: "Video", schema: Ge("Video") },
|
|
3028
3028
|
({ context: e }) => /* @__PURE__ */ c(ht, { ...gt(e.componentModel.properties, "video") })
|
|
3029
3029
|
), qs = ce(
|
|
3030
|
-
{ name: "AudioPlayer", schema:
|
|
3030
|
+
{ name: "AudioPlayer", schema: Ge("AudioPlayer") },
|
|
3031
3031
|
({ context: e }) => /* @__PURE__ */ c(ht, { ...gt(e.componentModel.properties, "audio") })
|
|
3032
3032
|
), Os = {
|
|
3033
3033
|
name: "SkoponSelect",
|
|
@@ -3059,7 +3059,7 @@ function Ls({ context: e }) {
|
|
|
3059
3059
|
style: { width: "100%" },
|
|
3060
3060
|
placeholder: a || (d ? "请选择多项" : "请选择"),
|
|
3061
3061
|
options: u,
|
|
3062
|
-
value: d ? fe(n) :
|
|
3062
|
+
value: d ? fe(n) : je(n),
|
|
3063
3063
|
onChange: (m) => r(d ? m ?? [] : m ?? "")
|
|
3064
3064
|
}
|
|
3065
3065
|
)
|
|
@@ -3090,7 +3090,7 @@ const Bs = ce(
|
|
|
3090
3090
|
] }) : null,
|
|
3091
3091
|
l.length > 0 ? /* @__PURE__ */ x("div", { className: "skopon-module-panel__examples", children: [
|
|
3092
3092
|
/* @__PURE__ */ c(X.Text, { strong: !0, children: "参考示例" }),
|
|
3093
|
-
/* @__PURE__ */ c("div", { className: "skopon-module-panel__example-list", children: /* @__PURE__ */ c(
|
|
3093
|
+
/* @__PURE__ */ c("div", { className: "skopon-module-panel__example-list", children: /* @__PURE__ */ c(qe.PreviewGroup, { children: l.map((a, u) => /* @__PURE__ */ c(qe, { src: a, alt: `参考示例 ${u + 1}`, width: 88, height: 88, style: { objectFit: "cover" } }, `${a}-${u}`)) }) })
|
|
3094
3094
|
] }) : null
|
|
3095
3095
|
] }) : null
|
|
3096
3096
|
] });
|
|
@@ -3115,7 +3115,7 @@ function js({ context: e }) {
|
|
|
3115
3115
|
style: { width: "100%" },
|
|
3116
3116
|
placeholder: d || "请选择",
|
|
3117
3117
|
options: m,
|
|
3118
|
-
value:
|
|
3118
|
+
value: je(n),
|
|
3119
3119
|
onChange: (f) => r(f ?? "")
|
|
3120
3120
|
}
|
|
3121
3121
|
) : h === "multiselect" ? /* @__PURE__ */ c(
|
|
@@ -3141,12 +3141,12 @@ function js({ context: e }) {
|
|
|
3141
3141
|
onChange: (f) => r(f)
|
|
3142
3142
|
}
|
|
3143
3143
|
) : /* @__PURE__ */ c(
|
|
3144
|
-
|
|
3144
|
+
wr.Group,
|
|
3145
3145
|
{
|
|
3146
3146
|
disabled: !t,
|
|
3147
3147
|
className: "form-block-preview-control",
|
|
3148
3148
|
options: m,
|
|
3149
|
-
value:
|
|
3149
|
+
value: je(n),
|
|
3150
3150
|
onChange: (f) => r(f.target.value)
|
|
3151
3151
|
}
|
|
3152
3152
|
)
|
|
@@ -3174,22 +3174,22 @@ function Ds({ context: e }) {
|
|
|
3174
3174
|
return /* @__PURE__ */ x("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
3175
3175
|
s ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: s }) : null,
|
|
3176
3176
|
/* @__PURE__ */ c(
|
|
3177
|
-
|
|
3177
|
+
Rr,
|
|
3178
3178
|
{
|
|
3179
3179
|
disabled: !t,
|
|
3180
3180
|
className: "form-block-preview-control",
|
|
3181
|
-
checked:
|
|
3181
|
+
checked: We(n),
|
|
3182
3182
|
onChange: (l) => r(l)
|
|
3183
3183
|
}
|
|
3184
3184
|
)
|
|
3185
3185
|
] });
|
|
3186
3186
|
}
|
|
3187
3187
|
const Ks = ce(
|
|
3188
|
-
{ name: "CheckBox", schema:
|
|
3188
|
+
{ name: "CheckBox", schema: Ge("CheckBox") },
|
|
3189
3189
|
Ds
|
|
3190
3190
|
);
|
|
3191
3191
|
function Hs(e, t, n) {
|
|
3192
|
-
const r =
|
|
3192
|
+
const r = je(e);
|
|
3193
3193
|
if (!r) return;
|
|
3194
3194
|
if (!t && n) {
|
|
3195
3195
|
const i = mn(r, "HH:mm", !0);
|
|
@@ -3299,7 +3299,7 @@ function Qs({ context: e }) {
|
|
|
3299
3299
|
const { interactive: t } = Te(), { beginUpload: n } = xs(), r = Fs(), { value: o, setValue: i, setValueSilent: s, fieldName: l } = Ie(e, "value", {
|
|
3300
3300
|
component: "FileUpload",
|
|
3301
3301
|
changeAction: "change"
|
|
3302
|
-
}), a = e.componentModel.properties, u = a.fileSourceMode === "asset_only" || a.fileSourceMode === "upload_or_asset" ? a.fileSourceMode : "upload_required", d = jt(a.fileAssetOptions), [m, k] = O(!1), h = E(a.label), A = E(a.accept), f = E(a.help), _ = E(a.fileReviewCriteria), S = a.fileReviewStatus === "passed" || a.fileReviewStatus === "failed" ? a.fileReviewStatus : void 0, v = E(a.fileReviewMessage), I = fe(a.fileRejectedUrls).filter((p) => /^https?:\/\//i.test(p)),
|
|
3302
|
+
}), a = e.componentModel.properties, u = a.fileSourceMode === "asset_only" || a.fileSourceMode === "upload_or_asset" ? a.fileSourceMode : "upload_required", d = jt(a.fileAssetOptions), [m, k] = O(!1), h = E(a.label), A = E(a.accept), f = E(a.help), _ = E(a.fileReviewCriteria), S = a.fileReviewStatus === "passed" || a.fileReviewStatus === "failed" ? a.fileReviewStatus : void 0, v = E(a.fileReviewMessage), I = fe(a.fileRejectedUrls).filter((p) => /^https?:\/\//i.test(p)), w = fe(a.fileExampleUrls).filter((p) => /^https?:\/\//i.test(p)), F = Array.isArray(a.fileAcceptTypes) ? a.fileAcceptTypes.map(String) : void 0, N = A ? A.split(",").map((p) => p.trim()).filter(Boolean) : void 0, P = ao(F, N), H = typeof a.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
|
|
3303
3303
|
a.filePlaceholderIcon
|
|
3304
3304
|
) ? a.filePlaceholderIcon : "document", W = a.compact === !0, Z = typeof a.minCount == "number" ? Math.max(0, a.minCount) : 0, G = typeof a.maxCount == "number" ? a.maxCount : 1, ee = G > 0, M = u === "asset_only" ? "素材 · 仅选择" : u === "upload_or_asset" ? "物料或素材" : "物料 · 仅上传", te = Un(o), V = U(0), ie = U(!0), $ = U(/* @__PURE__ */ new Map()), D = U(i);
|
|
3305
3305
|
D.current = i;
|
|
@@ -3342,22 +3342,22 @@ function Qs({ context: e }) {
|
|
|
3342
3342
|
const g = new Set(p.map((C) => C.assetId ? `asset:${C.assetId}` : `url:${C.url}`));
|
|
3343
3343
|
b(
|
|
3344
3344
|
(C) => {
|
|
3345
|
-
const T = C.filter((
|
|
3346
|
-
return p.forEach((
|
|
3347
|
-
const ne =
|
|
3345
|
+
const T = C.filter((R) => R.status !== "done" || g.has(R.assetId ? `asset:${R.assetId}` : `url:${R.url}`)), K = new Set(T.map((R) => R.assetId ? `asset:${R.assetId}` : `url:${R.url}`));
|
|
3346
|
+
return p.forEach((R) => {
|
|
3347
|
+
const ne = R.assetId ? `asset:${R.assetId}` : `url:${R.url}`;
|
|
3348
3348
|
if (K.has(ne)) return;
|
|
3349
|
-
if (
|
|
3350
|
-
T.push(Ft(
|
|
3349
|
+
if (R.url) {
|
|
3350
|
+
T.push(Ft(R.url, `external-${V.current++}`));
|
|
3351
3351
|
return;
|
|
3352
3352
|
}
|
|
3353
|
-
const oe = d.find((ue) => ue.assetId ===
|
|
3353
|
+
const oe = d.find((ue) => ue.assetId === R.assetId);
|
|
3354
3354
|
T.push({
|
|
3355
|
-
uid: `asset-${
|
|
3356
|
-
name: (oe == null ? void 0 : oe.label) || `素材 ${
|
|
3355
|
+
uid: `asset-${R.assetId}-${V.current++}`,
|
|
3356
|
+
name: (oe == null ? void 0 : oe.label) || `素材 ${R.assetId}`,
|
|
3357
3357
|
status: "done",
|
|
3358
3358
|
url: (oe == null ? void 0 : oe.previewUrl) || (oe == null ? void 0 : oe.url),
|
|
3359
|
-
assetId:
|
|
3360
|
-
source:
|
|
3359
|
+
assetId: R.assetId,
|
|
3360
|
+
source: R.source
|
|
3361
3361
|
});
|
|
3362
3362
|
}), T;
|
|
3363
3363
|
},
|
|
@@ -3429,7 +3429,7 @@ function Qs({ context: e }) {
|
|
|
3429
3429
|
for (const T of $.current.values()) T.abort();
|
|
3430
3430
|
$.current.clear();
|
|
3431
3431
|
}
|
|
3432
|
-
b((T) => [...G === 1 ? [] : T.filter((
|
|
3432
|
+
b((T) => [...G === 1 ? [] : T.filter((R) => R.status !== "error" && R.url !== p.url), {
|
|
3433
3433
|
uid: `asset-${p.assetId}-${V.current++}`,
|
|
3434
3434
|
name: p.label,
|
|
3435
3435
|
status: "done",
|
|
@@ -3440,13 +3440,13 @@ function Qs({ context: e }) {
|
|
|
3440
3440
|
}
|
|
3441
3441
|
};
|
|
3442
3442
|
return /* @__PURE__ */ x("article", { className: "skopon-asset-picker__card", children: [
|
|
3443
|
-
/* @__PURE__ */ c("div", { className: "skopon-asset-picker__media", children: g ? /* @__PURE__ */ c(
|
|
3443
|
+
/* @__PURE__ */ c("div", { className: "skopon-asset-picker__media", children: g ? /* @__PURE__ */ c(qe, { src: p.previewUrl || p.url, alt: p.label, preview: { mask: "放大预览" } }) : /* @__PURE__ */ c("div", { className: "skopon-asset-picker__placeholder", children: /* @__PURE__ */ c(Mt, { type: p.assetType === "video" ? "video" : p.assetType === "audio" ? "audio" : "document", size: 36 }) }) }),
|
|
3444
3444
|
/* @__PURE__ */ c(X.Text, { className: "skopon-asset-picker__name", title: p.label, children: p.label }),
|
|
3445
3445
|
/* @__PURE__ */ c(Se, { type: "primary", size: "small", block: !0, "aria-label": `选择素材 ${p.label}`, disabled: !t || S === "passed" || ee && G > 1 && he, onClick: C, children: "使用此素材" })
|
|
3446
3446
|
] }, p.assetId);
|
|
3447
3447
|
}) }) : /* @__PURE__ */ c(X.Paragraph, { type: "secondary", children: "此位置暂无可选素材,请先在素材库为该位置打标。" }) });
|
|
3448
3448
|
if (W) {
|
|
3449
|
-
const p = q.find((ne) => ne.status === "error") ?? q[0], g = p == null ? void 0 : p.url, C = (F == null ? void 0 : F.includes("image/*")) ?? H === "image", T = S === "passed" ? "passed" : S === "failed" ? "failed" : (p == null ? void 0 : p.status) === "uploading" ? "uploading" : (p == null ? void 0 : p.status) === "done" ? "pending" : "empty", K = T === "passed" ? "审核通过" : T === "failed" ? v || "审核不合格,请替换" : T === "uploading" ? "正在上传…" : T === "pending" ? "等待审核" : `${P ?? "文件"}${G > 1 ? `,最多 ${G} 个` : ""}`,
|
|
3449
|
+
const p = q.find((ne) => ne.status === "error") ?? q[0], g = p == null ? void 0 : p.url, C = (F == null ? void 0 : F.includes("image/*")) ?? H === "image", T = S === "passed" ? "passed" : S === "failed" ? "failed" : (p == null ? void 0 : p.status) === "uploading" ? "uploading" : (p == null ? void 0 : p.status) === "done" ? "pending" : "empty", K = T === "passed" ? "审核通过" : T === "failed" ? v || "审核不合格,请替换" : T === "uploading" ? "正在上传…" : T === "pending" ? "等待审核" : `${P ?? "文件"}${G > 1 ? `,最多 ${G} 个` : ""}`, R = t && T !== "passed" && T !== "uploading";
|
|
3450
3450
|
return /* @__PURE__ */ x(Ir, { children: [
|
|
3451
3451
|
/* @__PURE__ */ x("article", { className: `skopon-compact-upload skopon-compact-upload--${T}`, "data-skopon-field": l || void 0, children: [
|
|
3452
3452
|
/* @__PURE__ */ x("div", { className: "skopon-compact-upload__thumb", children: [
|
|
@@ -3458,17 +3458,17 @@ function Qs({ context: e }) {
|
|
|
3458
3458
|
/* @__PURE__ */ c("span", { className: `skopon-compact-upload__source skopon-compact-upload__source--${u}`, children: M }),
|
|
3459
3459
|
/* @__PURE__ */ c("span", { className: "skopon-compact-upload__status", children: K }),
|
|
3460
3460
|
/* @__PURE__ */ x("div", { className: "skopon-file-source-actions", children: [
|
|
3461
|
-
|
|
3462
|
-
|
|
3461
|
+
R && u !== "asset_only" ? /* @__PURE__ */ c(
|
|
3462
|
+
Pe,
|
|
3463
3463
|
{
|
|
3464
3464
|
accept: pn(F, N),
|
|
3465
3465
|
multiple: !ee || G > 1,
|
|
3466
3466
|
showUploadList: !1,
|
|
3467
|
-
beforeUpload: (ne) => ((p == null ? void 0 : p.status) === "done" && z(p.uid), le(ne),
|
|
3467
|
+
beforeUpload: (ne) => ((p == null ? void 0 : p.status) === "done" && z(p.uid), le(ne), Pe.LIST_IGNORE),
|
|
3468
3468
|
children: /* @__PURE__ */ c(Se, { size: "small", children: "上传" })
|
|
3469
3469
|
}
|
|
3470
3470
|
) : null,
|
|
3471
|
-
|
|
3471
|
+
R && u !== "upload_required" ? /* @__PURE__ */ c(Se, { size: "small", onClick: () => k(!0), children: "选择素材" }) : null
|
|
3472
3472
|
] }),
|
|
3473
3473
|
ge && T !== "failed" ? /* @__PURE__ */ c("span", { className: "skopon-compact-upload__error", children: ge }) : null
|
|
3474
3474
|
] })
|
|
@@ -3488,13 +3488,13 @@ function Qs({ context: e }) {
|
|
|
3488
3488
|
"素材要求:",
|
|
3489
3489
|
_
|
|
3490
3490
|
] }) : null,
|
|
3491
|
-
|
|
3491
|
+
w.length ? /* @__PURE__ */ x("div", { className: "form-file-examples", children: [
|
|
3492
3492
|
/* @__PURE__ */ c(X.Text, { type: "secondary", children: "参考示例(不作为上传素材提交)" }),
|
|
3493
|
-
/* @__PURE__ */ c("div", { style: { display: "flex", gap: 8, flexWrap: "wrap", margin: "8px 0" }, children: /* @__PURE__ */ c(
|
|
3493
|
+
/* @__PURE__ */ c("div", { style: { display: "flex", gap: 8, flexWrap: "wrap", margin: "8px 0" }, children: /* @__PURE__ */ c(qe.PreviewGroup, { children: w.map((p, g) => /* @__PURE__ */ c(qe, { src: p, alt: `${h || "素材"}示例 ${g + 1}`, width: 120, height: 120, style: { objectFit: "contain" } }, p)) }) })
|
|
3494
3494
|
] }) : null,
|
|
3495
3495
|
u !== "upload_required" ? /* @__PURE__ */ c("div", { className: "skopon-file-source-actions", children: /* @__PURE__ */ c(Se, { disabled: !t || S === "passed", onClick: () => k(!0), children: "选择素材" }) }) : null,
|
|
3496
3496
|
u !== "asset_only" ? /* @__PURE__ */ x(
|
|
3497
|
-
|
|
3497
|
+
Pe.Dragger,
|
|
3498
3498
|
{
|
|
3499
3499
|
disabled: !t || S === "passed",
|
|
3500
3500
|
openFileDialogOnClick: S !== "passed" && !he,
|
|
@@ -3503,7 +3503,7 @@ function Qs({ context: e }) {
|
|
|
3503
3503
|
multiple: !ee || G > 1,
|
|
3504
3504
|
showUploadList: t && q.length > 0 ? { showRemoveIcon: S !== "passed" } : !1,
|
|
3505
3505
|
fileList: t ? be : [],
|
|
3506
|
-
beforeUpload: (p) => t ? (le(p),
|
|
3506
|
+
beforeUpload: (p) => t ? (le(p), Pe.LIST_IGNORE) : Pe.LIST_IGNORE,
|
|
3507
3507
|
onRemove: (p) => S === "passed" ? !1 : (z(p.uid), !0),
|
|
3508
3508
|
children: [
|
|
3509
3509
|
/* @__PURE__ */ c("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ c(Mt, { type: H, size: 40 }) }),
|
|
@@ -3535,7 +3535,7 @@ function Zs({ context: e }) {
|
|
|
3535
3535
|
component: "TextField",
|
|
3536
3536
|
changeAction: "change",
|
|
3537
3537
|
debounceChange: !0
|
|
3538
|
-
}), s = e.componentModel.properties, l = E(s.label), a = E(s.placeholder), u = E(s.variant) || "shortText", d = E(s.validationRegexp), m =
|
|
3538
|
+
}), s = e.componentModel.properties, l = E(s.label), a = E(s.placeholder), u = E(s.variant) || "shortText", d = E(s.validationRegexp), m = je(n) ?? "", k = !t, [h, A] = O(""), f = (v) => {
|
|
3539
3539
|
if (!d || !v.trim()) {
|
|
3540
3540
|
A("");
|
|
3541
3541
|
return;
|
|
@@ -3626,15 +3626,15 @@ const ea = ce(
|
|
|
3626
3626
|
);
|
|
3627
3627
|
function ta({ context: e }) {
|
|
3628
3628
|
const t = e.componentModel.properties, n = E(t.text), r = E(t.variant) || "body";
|
|
3629
|
-
return
|
|
3629
|
+
return ws.has(r) ? r === "caption" ? /* @__PURE__ */ c(X.Text, { type: "secondary", className: "form-block-preview-paragraph", style: { whiteSpace: "pre-wrap" }, children: /* @__PURE__ */ c("em", { children: n }) }) : /* @__PURE__ */ c(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ c(X.Paragraph, { className: "form-block-preview-paragraph", style: { whiteSpace: "pre-wrap" }, children: n });
|
|
3630
3630
|
}
|
|
3631
3631
|
const na = ce(
|
|
3632
|
-
{ name: "Text", schema:
|
|
3632
|
+
{ name: "Text", schema: Ge("Text") },
|
|
3633
3633
|
ta
|
|
3634
3634
|
);
|
|
3635
3635
|
function br() {
|
|
3636
3636
|
const t = [
|
|
3637
|
-
...[...
|
|
3637
|
+
...[...et.components.values()].filter(
|
|
3638
3638
|
(r) => !Ns.has(r.name)
|
|
3639
3639
|
),
|
|
3640
3640
|
Es,
|
|
@@ -3650,8 +3650,8 @@ function br() {
|
|
|
3650
3650
|
ea,
|
|
3651
3651
|
na,
|
|
3652
3652
|
...ki()
|
|
3653
|
-
], n = [...
|
|
3654
|
-
return new Dr(vr, t, n,
|
|
3653
|
+
], n = [...et.functions.values()];
|
|
3654
|
+
return new Dr(vr, t, n, et.themeSchema);
|
|
3655
3655
|
}
|
|
3656
3656
|
const _e = {
|
|
3657
3657
|
jade9: "#29a383",
|
|
@@ -3750,7 +3750,7 @@ const _e = {
|
|
|
3750
3750
|
}
|
|
3751
3751
|
}
|
|
3752
3752
|
};
|
|
3753
|
-
function
|
|
3753
|
+
function Ve({
|
|
3754
3754
|
children: e,
|
|
3755
3755
|
locale: t,
|
|
3756
3756
|
theme: n
|
|
@@ -3787,7 +3787,7 @@ const oa = xr(
|
|
|
3787
3787
|
if (!f)
|
|
3788
3788
|
return { surfaces: [], processor: null };
|
|
3789
3789
|
try {
|
|
3790
|
-
const
|
|
3790
|
+
const w = JSON.parse(f), F = new En([br()]), N = Ri(w, {
|
|
3791
3791
|
surfaceId: n,
|
|
3792
3792
|
catalogId: vr
|
|
3793
3793
|
});
|
|
@@ -3795,25 +3795,25 @@ const oa = xr(
|
|
|
3795
3795
|
surfaces: Array.from(F.model.surfacesMap.values()),
|
|
3796
3796
|
processor: F
|
|
3797
3797
|
};
|
|
3798
|
-
} catch (
|
|
3799
|
-
return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败",
|
|
3798
|
+
} catch (w) {
|
|
3799
|
+
return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", w), { surfaces: [], processor: null };
|
|
3800
3800
|
}
|
|
3801
3801
|
}, [f, n]), { surfaces: S, processor: v } = _;
|
|
3802
3802
|
if (h.current = v, Mr(
|
|
3803
3803
|
k,
|
|
3804
3804
|
() => ({
|
|
3805
|
-
getValues(
|
|
3805
|
+
getValues(w) {
|
|
3806
3806
|
const F = h.current;
|
|
3807
3807
|
if (!F) return {};
|
|
3808
|
-
const N = (
|
|
3808
|
+
const N = (w ?? A.current).map((P) => P.trim()).filter(Boolean);
|
|
3809
3809
|
return qi(F, n, N);
|
|
3810
3810
|
},
|
|
3811
|
-
setValues(
|
|
3811
|
+
setValues(w) {
|
|
3812
3812
|
const F = h.current;
|
|
3813
3813
|
if (!F) return;
|
|
3814
3814
|
const N = F.model.surfacesMap.get(n);
|
|
3815
3815
|
if (N)
|
|
3816
|
-
for (const [P, H] of Object.entries(
|
|
3816
|
+
for (const [P, H] of Object.entries(w)) {
|
|
3817
3817
|
const W = P.trim();
|
|
3818
3818
|
W && N.dataModel.set(`/${W}`, H);
|
|
3819
3819
|
}
|
|
@@ -3821,14 +3821,14 @@ const oa = xr(
|
|
|
3821
3821
|
}),
|
|
3822
3822
|
[n]
|
|
3823
3823
|
), S.length === 0) {
|
|
3824
|
-
const
|
|
3825
|
-
return m ? /* @__PURE__ */ c(
|
|
3824
|
+
const w = /* @__PURE__ */ c(Bt, { onUploadingChange: u, children: /* @__PURE__ */ c(zt, { resumeSearch: s, children: /* @__PURE__ */ c(Pt, { contentSearch: l, children: /* @__PURE__ */ c(Et, { caseSearch: a, children: /* @__PURE__ */ c(Rt, { interactive: o, children: r }) }) }) }) });
|
|
3825
|
+
return m ? /* @__PURE__ */ c(Ve, { children: w }) : w;
|
|
3826
3826
|
}
|
|
3827
|
-
const I = /* @__PURE__ */ c(Ms, { uploadMaterial: d, children: /* @__PURE__ */ c(Bt, { onUploadingChange: u, children: /* @__PURE__ */ c(zt, { resumeSearch: s, children: /* @__PURE__ */ c(Pt, { contentSearch: l, children: /* @__PURE__ */ c(Et, { caseSearch: a, children: /* @__PURE__ */ c(
|
|
3828
|
-
return m ? /* @__PURE__ */ c(
|
|
3827
|
+
const I = /* @__PURE__ */ c(Ms, { uploadMaterial: d, children: /* @__PURE__ */ c(Bt, { onUploadingChange: u, children: /* @__PURE__ */ c(zt, { resumeSearch: s, children: /* @__PURE__ */ c(Pt, { contentSearch: l, children: /* @__PURE__ */ c(Et, { caseSearch: a, children: /* @__PURE__ */ c(Rt, { interactive: o, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: S.map((w) => /* @__PURE__ */ c(Rn, { surface: w }, w.id)) }) }) }) }) }) }) });
|
|
3828
|
+
return m ? /* @__PURE__ */ c(Ve, { children: I }) : I;
|
|
3829
3829
|
}
|
|
3830
3830
|
);
|
|
3831
|
-
function
|
|
3831
|
+
function Ze() {
|
|
3832
3832
|
return new En([br()]);
|
|
3833
3833
|
}
|
|
3834
3834
|
function Va({
|
|
@@ -3844,18 +3844,18 @@ function Va({
|
|
|
3844
3844
|
zn(), Pn();
|
|
3845
3845
|
}, []);
|
|
3846
3846
|
const l = U(null);
|
|
3847
|
-
l.current === null && (l.current =
|
|
3847
|
+
l.current === null && (l.current = Ze());
|
|
3848
3848
|
const a = U(0), u = U(""), d = U(!0), m = U(t);
|
|
3849
3849
|
function k(v, I) {
|
|
3850
3850
|
l.current = v, a.current = I.length, u.current = JSON.stringify(I), d.current && (f(v), S(Array.from(v.model.surfacesMap.values())));
|
|
3851
3851
|
}
|
|
3852
3852
|
function h(v, I) {
|
|
3853
3853
|
if (I <= 0) return !1;
|
|
3854
|
-
const
|
|
3854
|
+
const w = JSON.stringify(v.slice(0, I)), F = u.current;
|
|
3855
3855
|
if (!F) return !0;
|
|
3856
3856
|
try {
|
|
3857
3857
|
const N = JSON.parse(F);
|
|
3858
|
-
return JSON.stringify(N.slice(0, I)) !==
|
|
3858
|
+
return JSON.stringify(N.slice(0, I)) !== w;
|
|
3859
3859
|
} catch {
|
|
3860
3860
|
return !0;
|
|
3861
3861
|
}
|
|
@@ -3874,31 +3874,31 @@ function Va({
|
|
|
3874
3874
|
}, [A]), B(() => {
|
|
3875
3875
|
const v = () => {
|
|
3876
3876
|
d.current && S(Array.from(A.model.surfacesMap.values()));
|
|
3877
|
-
}, I = A.onSurfaceCreated(v),
|
|
3877
|
+
}, I = A.onSurfaceCreated(v), w = A.onSurfaceDeleted(v);
|
|
3878
3878
|
return () => {
|
|
3879
|
-
I.unsubscribe(),
|
|
3879
|
+
I.unsubscribe(), w.unsubscribe();
|
|
3880
3880
|
};
|
|
3881
3881
|
}, [A]), B(() => {
|
|
3882
3882
|
let v = !1;
|
|
3883
3883
|
const I = m.current !== t;
|
|
3884
3884
|
if (m.current = t, I) {
|
|
3885
|
-
const P =
|
|
3885
|
+
const P = Ze();
|
|
3886
3886
|
return Array.isArray(e) && e.length > 0 ? (P.processMessages(e), v || k(P, e)) : (l.current = P, a.current = 0, u.current = "", v || (f(P), S([]))), () => {
|
|
3887
3887
|
v = !0;
|
|
3888
3888
|
};
|
|
3889
3889
|
}
|
|
3890
3890
|
if (!Array.isArray(e) || e.length === 0) {
|
|
3891
3891
|
if (a.current > 0) {
|
|
3892
|
-
const P =
|
|
3892
|
+
const P = Ze();
|
|
3893
3893
|
l.current = P, a.current = 0, u.current = "", v || (f(P), S([]));
|
|
3894
3894
|
}
|
|
3895
3895
|
return () => {
|
|
3896
3896
|
v = !0;
|
|
3897
3897
|
};
|
|
3898
3898
|
}
|
|
3899
|
-
const
|
|
3899
|
+
const w = l.current, F = a.current;
|
|
3900
3900
|
if (e.length < F || h(e, F)) {
|
|
3901
|
-
const P =
|
|
3901
|
+
const P = Ze();
|
|
3902
3902
|
return P.processMessages(e), v || k(P, e), () => {
|
|
3903
3903
|
v = !0;
|
|
3904
3904
|
};
|
|
@@ -3906,16 +3906,16 @@ function Va({
|
|
|
3906
3906
|
const N = e.slice(F);
|
|
3907
3907
|
return N.length === 0 ? () => {
|
|
3908
3908
|
v = !0;
|
|
3909
|
-
} : (
|
|
3909
|
+
} : (w.processMessages(N), a.current = e.length, u.current = JSON.stringify(e), v || S(Array.from(w.model.surfacesMap.values())), () => {
|
|
3910
3910
|
v = !0;
|
|
3911
3911
|
});
|
|
3912
|
-
}, [e, t]), _.length === 0 ? /* @__PURE__ */ c(
|
|
3912
|
+
}, [e, t]), _.length === 0 ? /* @__PURE__ */ c(Ve, { children: n }) : /* @__PURE__ */ c(Ve, { children: /* @__PURE__ */ c(Bt, { children: /* @__PURE__ */ c(zt, { resumeSearch: o, children: /* @__PURE__ */ c(Pt, { contentSearch: i, children: /* @__PURE__ */ c(Et, { caseSearch: s, children: /* @__PURE__ */ c(Rt, { interactive: r, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: _.map((v) => /* @__PURE__ */ c(Rn, { surface: v }, v.id)) }) }) }) }) }) }) });
|
|
3913
3913
|
}
|
|
3914
|
-
const ia = 100, sa = 3e4, aa = 1500,
|
|
3914
|
+
const ia = 100, sa = 3e4, aa = 1500, Re = /* @__PURE__ */ new Map();
|
|
3915
3915
|
function la(e) {
|
|
3916
3916
|
const t = e.trim();
|
|
3917
|
-
let n =
|
|
3918
|
-
return n || (n = new ca(t),
|
|
3917
|
+
let n = Re.get(t);
|
|
3918
|
+
return n || (n = new ca(t), Re.set(t, n)), n.acquire(), n;
|
|
3919
3919
|
}
|
|
3920
3920
|
class ca {
|
|
3921
3921
|
constructor(t) {
|
|
@@ -3935,12 +3935,12 @@ class ca {
|
|
|
3935
3935
|
}
|
|
3936
3936
|
release() {
|
|
3937
3937
|
this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
|
|
3938
|
-
this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(),
|
|
3938
|
+
this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), Re.get(this.url) === this && Re.delete(this.url));
|
|
3939
3939
|
}, aa));
|
|
3940
3940
|
}
|
|
3941
3941
|
/** 强制关闭(测试用),跳过宽限期。 */
|
|
3942
3942
|
forceClose() {
|
|
3943
|
-
this.refCount = 0, this.teardown(),
|
|
3943
|
+
this.refCount = 0, this.teardown(), Re.get(this.url) === this && Re.delete(this.url);
|
|
3944
3944
|
}
|
|
3945
3945
|
subscribe(t, n) {
|
|
3946
3946
|
const r = t.trim();
|
|
@@ -4223,10 +4223,10 @@ function va({
|
|
|
4223
4223
|
/* @__PURE__ */ x("div", { className: "ask-user-curl-card-header", children: [
|
|
4224
4224
|
/* @__PURE__ */ x("div", { className: "ask-user-curl-card-header-title", children: [
|
|
4225
4225
|
/* @__PURE__ */ c(X.Text, { type: "secondary", children: n ?? "curl 命令" }),
|
|
4226
|
-
r ? /* @__PURE__ */ c(
|
|
4227
|
-
o ? /* @__PURE__ */ c(
|
|
4226
|
+
r ? /* @__PURE__ */ c(tt, { title: r, children: /* @__PURE__ */ c(Oe, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
|
|
4227
|
+
o ? /* @__PURE__ */ c(tt, { title: o, children: /* @__PURE__ */ c(Oe, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
|
|
4228
4228
|
] }),
|
|
4229
|
-
/* @__PURE__ */ c(
|
|
4229
|
+
/* @__PURE__ */ c(
|
|
4230
4230
|
Se,
|
|
4231
4231
|
{
|
|
4232
4232
|
size: "small",
|
|
@@ -4236,7 +4236,7 @@ function va({
|
|
|
4236
4236
|
onClick: () => void A(),
|
|
4237
4237
|
children: "提交"
|
|
4238
4238
|
}
|
|
4239
|
-
)
|
|
4239
|
+
)
|
|
4240
4240
|
] }),
|
|
4241
4241
|
/* @__PURE__ */ c("pre", { className: "skopon-form-curl-json", children: k })
|
|
4242
4242
|
] });
|
|
@@ -4269,7 +4269,7 @@ function _a({
|
|
|
4269
4269
|
onAutoControlReady: f
|
|
4270
4270
|
}) {
|
|
4271
4271
|
var en;
|
|
4272
|
-
const [_, S] = O(null), [v, I] = O(!1), [
|
|
4272
|
+
const [_, S] = O(null), [v, I] = O(!1), [w, F] = O(!0), [N, P] = O(!1), [H, W] = O(!1), Z = U(null), G = U(null), ee = U(!0), M = U(u);
|
|
4273
4273
|
M.current = u;
|
|
4274
4274
|
const te = Gn(), V = Kt(), ie = U(""), $ = U(null), D = (t == null ? void 0 : t.trim()) ?? "", q = (r == null ? void 0 : r.trim()) ?? "", se = Q(
|
|
4275
4275
|
() => Jt(l),
|
|
@@ -4293,8 +4293,8 @@ function _a({
|
|
|
4293
4293
|
var de;
|
|
4294
4294
|
if (!L) {
|
|
4295
4295
|
I(!1), S(null);
|
|
4296
|
-
const
|
|
4297
|
-
(de = M.current) == null || de.call(M, "error",
|
|
4296
|
+
const Je = J instanceof Error ? J.message : "获取表单定义失败";
|
|
4297
|
+
(de = M.current) == null || de.call(M, "error", Je);
|
|
4298
4298
|
}
|
|
4299
4299
|
}).finally(() => {
|
|
4300
4300
|
L || F(!1);
|
|
@@ -4331,9 +4331,9 @@ function _a({
|
|
|
4331
4331
|
} catch {
|
|
4332
4332
|
return String(g);
|
|
4333
4333
|
}
|
|
4334
|
-
}, [g]), T = D ? `ask-user-${D}` : "ask-user-payload", K = !!(!
|
|
4334
|
+
}, [g]), T = D ? `ask-user-${D}` : "ask-user-payload", K = !!(!w && b && Y.length > 0 && g);
|
|
4335
4335
|
B(() => (A(K), () => A(!1)), [K, A]);
|
|
4336
|
-
const
|
|
4336
|
+
const R = j(() => {
|
|
4337
4337
|
var J;
|
|
4338
4338
|
return { ...((J = Z.current) == null ? void 0 : J.getValues(be)) ?? {}, ...ge };
|
|
4339
4339
|
}, [be, ge]), ne = U(V.liveOptions);
|
|
@@ -4346,13 +4346,13 @@ function _a({
|
|
|
4346
4346
|
title: ye,
|
|
4347
4347
|
description: ve,
|
|
4348
4348
|
blocks: Y,
|
|
4349
|
-
values:
|
|
4349
|
+
values: R(),
|
|
4350
4350
|
liveOptions: ne.current,
|
|
4351
4351
|
formChange: L
|
|
4352
4352
|
});
|
|
4353
4353
|
te.reportData(J);
|
|
4354
4354
|
},
|
|
4355
|
-
[ye, ve, Y,
|
|
4355
|
+
[ye, ve, Y, R, te]
|
|
4356
4356
|
), Ue = U(ue);
|
|
4357
4357
|
Ue.current = ue, B(() => {
|
|
4358
4358
|
if (!K) {
|
|
@@ -4377,7 +4377,7 @@ function _a({
|
|
|
4377
4377
|
};
|
|
4378
4378
|
}, [K, V.version, V.clearPendingChangeFields]);
|
|
4379
4379
|
const yt = j(async () => {
|
|
4380
|
-
var L, J, de,
|
|
4380
|
+
var L, J, de, Je, tn, nn, rn, on, sn;
|
|
4381
4381
|
if (!N) {
|
|
4382
4382
|
if (H) {
|
|
4383
4383
|
(L = M.current) == null || L.call(M, "error", "文件正在上传,请稍候");
|
|
@@ -4385,7 +4385,7 @@ function _a({
|
|
|
4385
4385
|
}
|
|
4386
4386
|
P(!0);
|
|
4387
4387
|
try {
|
|
4388
|
-
const
|
|
4388
|
+
const Ee = { ...((J = Z.current) == null ? void 0 : J.getValues(be)) ?? {}, ...ge }, an = As(Y, Ee);
|
|
4389
4389
|
if (an) {
|
|
4390
4390
|
(de = M.current) == null || de.call(M, "error", an.message);
|
|
4391
4391
|
return;
|
|
@@ -4393,14 +4393,14 @@ function _a({
|
|
|
4393
4393
|
if (i === "post") {
|
|
4394
4394
|
const dn = (o ?? "").trim();
|
|
4395
4395
|
if (!dn) {
|
|
4396
|
-
(
|
|
4396
|
+
(Je = M.current) == null || Je.call(M, "error", "callback_url 为空,无法提交");
|
|
4397
4397
|
return;
|
|
4398
4398
|
}
|
|
4399
4399
|
ue([]), te.reportEvent({
|
|
4400
4400
|
action: "submit",
|
|
4401
4401
|
component: "SubmitButton"
|
|
4402
4402
|
});
|
|
4403
|
-
const St = await cr(dn,
|
|
4403
|
+
const St = await cr(dn, Ee, {
|
|
4404
4404
|
headers: se
|
|
4405
4405
|
});
|
|
4406
4406
|
if (!ee.current) return;
|
|
@@ -4417,7 +4417,7 @@ function _a({
|
|
|
4417
4417
|
context: ae,
|
|
4418
4418
|
payload: e,
|
|
4419
4419
|
form: Cr,
|
|
4420
|
-
answer:
|
|
4420
|
+
answer: Ee
|
|
4421
4421
|
}), cn = Qt(ln);
|
|
4422
4422
|
if (cn) {
|
|
4423
4423
|
(rn = M.current) == null || rn.call(M, "error", cn);
|
|
@@ -4435,8 +4435,8 @@ function _a({
|
|
|
4435
4435
|
(on = M.current) == null || on.call(M, un.type, un.message);
|
|
4436
4436
|
} catch (vt) {
|
|
4437
4437
|
if (!ee.current) return;
|
|
4438
|
-
const
|
|
4439
|
-
(sn = M.current) == null || sn.call(M, "error",
|
|
4438
|
+
const Ee = vt instanceof Error ? vt.message : "提交失败";
|
|
4439
|
+
(sn = M.current) == null || sn.call(M, "error", Ee);
|
|
4440
4440
|
} finally {
|
|
4441
4441
|
ee.current && P(!1);
|
|
4442
4442
|
}
|
|
@@ -4490,7 +4490,7 @@ function _a({
|
|
|
4490
4490
|
return;
|
|
4491
4491
|
}
|
|
4492
4492
|
return f(Zt), () => f(null);
|
|
4493
|
-
}, [K, Zt, f]),
|
|
4493
|
+
}, [K, Zt, f]), w ? /* @__PURE__ */ c("div", { className: "ask-user-form-card", children: /* @__PURE__ */ c($t, { size: "small" }) }) : !b || Y.length === 0 ? /* @__PURE__ */ c(
|
|
4494
4494
|
va,
|
|
4495
4495
|
{
|
|
4496
4496
|
payload: e,
|
|
@@ -4507,7 +4507,7 @@ function _a({
|
|
|
4507
4507
|
ref: G,
|
|
4508
4508
|
"data-ask-user-message-id": q || void 0,
|
|
4509
4509
|
children: [
|
|
4510
|
-
v && D ? /* @__PURE__ */ c("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ c(
|
|
4510
|
+
v && D ? /* @__PURE__ */ c("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ c(tt, { title: D, children: /* @__PURE__ */ c(Oe, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
|
|
4511
4511
|
/* @__PURE__ */ c(
|
|
4512
4512
|
oa,
|
|
4513
4513
|
{
|
|
@@ -4525,20 +4525,14 @@ function _a({
|
|
|
4525
4525
|
}
|
|
4526
4526
|
),
|
|
4527
4527
|
/* @__PURE__ */ c("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ c(
|
|
4528
|
-
|
|
4528
|
+
Se,
|
|
4529
4529
|
{
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
loading: N,
|
|
4537
|
-
disabled: N || H,
|
|
4538
|
-
onClick: () => void yt(),
|
|
4539
|
-
children: "提交"
|
|
4540
|
-
}
|
|
4541
|
-
)
|
|
4530
|
+
type: "primary",
|
|
4531
|
+
size: "small",
|
|
4532
|
+
loading: N,
|
|
4533
|
+
disabled: N || H,
|
|
4534
|
+
onClick: () => void yt(),
|
|
4535
|
+
children: "提交"
|
|
4542
4536
|
}
|
|
4543
4537
|
) })
|
|
4544
4538
|
]
|
|
@@ -4569,7 +4563,7 @@ function Da(e) {
|
|
|
4569
4563
|
};
|
|
4570
4564
|
}, [a]), B(() => {
|
|
4571
4565
|
!a || !r || a.connect();
|
|
4572
|
-
}, [a, r]), /* @__PURE__ */ c(
|
|
4566
|
+
}, [a, r]), /* @__PURE__ */ c(Ve, { children: /* @__PURE__ */ c(Oo, { client: a, children: /* @__PURE__ */ c(Eo, { children: /* @__PURE__ */ c(
|
|
4573
4567
|
_a,
|
|
4574
4568
|
{
|
|
4575
4569
|
...e,
|
|
@@ -4579,7 +4573,7 @@ function Da(e) {
|
|
|
4579
4573
|
) }) }) });
|
|
4580
4574
|
}
|
|
4581
4575
|
export {
|
|
4582
|
-
|
|
4576
|
+
Ra as A2UI_PROTOCOL_VERSION,
|
|
4583
4577
|
Da as AskUserFormCard,
|
|
4584
4578
|
Et as CaseSearchProvider,
|
|
4585
4579
|
Pt as ContentSearchProvider,
|
|
@@ -4591,16 +4585,16 @@ export {
|
|
|
4591
4585
|
dt as DEFAULT_AUTH_STORAGE_KEY,
|
|
4592
4586
|
Yi as DEFAULT_AUTH_TOKEN_FIELD,
|
|
4593
4587
|
In as DEFAULT_CONTENT_FLOW_TYPE,
|
|
4594
|
-
|
|
4588
|
+
Xe as DEFAULT_SKOPON_API_BASE_PATH,
|
|
4595
4589
|
Kr as FORM_MEDIA_SIZES,
|
|
4596
|
-
|
|
4590
|
+
wt as FORM_WEB_DEFAULT_HEIGHT,
|
|
4597
4591
|
Wr as FORM_WEB_MAX_HEIGHT,
|
|
4598
4592
|
Hr as FORM_WEB_MIN_HEIGHT,
|
|
4599
4593
|
zt as ResumeSearchProvider,
|
|
4600
4594
|
Va as SkoponA2uiStreamRenderer,
|
|
4601
|
-
|
|
4595
|
+
Ve as SkoponFormProvider,
|
|
4602
4596
|
oa as SkoponFormRenderer,
|
|
4603
|
-
|
|
4597
|
+
wi as a2uiToBlocks,
|
|
4604
4598
|
rr as blocksToA2ui,
|
|
4605
4599
|
Uo as blocksToJsonSchema,
|
|
4606
4600
|
Yt as buildAnswerAgentBody,
|
|
@@ -4609,7 +4603,7 @@ export {
|
|
|
4609
4603
|
Oa as buildAskUserSubmitCurlFromPayload,
|
|
4610
4604
|
Pi as buildAskUserSurface,
|
|
4611
4605
|
lr as buildCurlStatement,
|
|
4612
|
-
|
|
4606
|
+
We as coerceToggleValue,
|
|
4613
4607
|
La as copyTextToClipboard,
|
|
4614
4608
|
Cs as createCaseSearchClient,
|
|
4615
4609
|
vs as createContentSearchClient,
|
|
@@ -4629,14 +4623,14 @@ export {
|
|
|
4629
4623
|
On as isDisplayBlockType,
|
|
4630
4624
|
pe as isInputBlockType,
|
|
4631
4625
|
qn as isLayoutBlockType,
|
|
4632
|
-
|
|
4626
|
+
Le as isMediaBlockType,
|
|
4633
4627
|
Ln as isOptionsBlockType,
|
|
4634
4628
|
Gr as isSupportedWebUrl,
|
|
4635
|
-
|
|
4629
|
+
Be as isWebBlockType,
|
|
4636
4630
|
zi as mapFormDefinitionFromDto,
|
|
4637
4631
|
st as normalizeFormDefinition,
|
|
4638
|
-
|
|
4639
|
-
|
|
4632
|
+
we as normalizeMultiselectCount,
|
|
4633
|
+
De as normalizeWebHeight,
|
|
4640
4634
|
ct as parsePayloadBlocksJson,
|
|
4641
4635
|
Ki as payloadHasInputBlocks,
|
|
4642
4636
|
ns as resolveAnswerAgentCallbackUrl,
|
|
@@ -4652,8 +4646,8 @@ export {
|
|
|
4652
4646
|
pr as submitAnswerAgent,
|
|
4653
4647
|
cr as submitFormJson,
|
|
4654
4648
|
Ea as supportsDefaultValue,
|
|
4655
|
-
|
|
4656
|
-
|
|
4649
|
+
Ri as surfaceDocToMessages,
|
|
4650
|
+
$e as syncFormDefinition,
|
|
4657
4651
|
jo as useCaseSearch,
|
|
4658
4652
|
Xo as useContentSearch,
|
|
4659
4653
|
oi as useResumeSearch,
|