@skopon-cool/form-sdk 0.4.3 → 0.4.5
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/formSchema.d.ts.map +1 -1
- package/dist/index.js +298 -288
- package/package.json +1 -1
- package/src/adapter/formSchema.test.ts +59 -0
- package/src/adapter/formSchema.ts +15 -3
- package/src/submit/submit.test.ts +37 -0
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Catalog as Yn, MessageProcessor as Xt } from "@a2ui/web_core/v0_9";
|
|
|
12
12
|
import { injectBasicCatalogStyles as Zt } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
13
13
|
import { injectStyles as en } from "@a2ui/react/styles";
|
|
14
14
|
import Vt from "dayjs";
|
|
15
|
-
const
|
|
15
|
+
const is = "v0.9", Qn = [
|
|
16
16
|
"huge",
|
|
17
17
|
"large",
|
|
18
18
|
"medium",
|
|
@@ -235,10 +235,20 @@ function br(e, t) {
|
|
|
235
235
|
return e === "toggle" ? ke(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String) : typeof t == "string" && t ? [t] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t);
|
|
236
236
|
}
|
|
237
237
|
function kr(e) {
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
if (Array.isArray(e)) return e.map(String).filter(Boolean);
|
|
239
|
+
if (typeof e == "string" && e.trim())
|
|
240
|
+
try {
|
|
241
|
+
const t = JSON.parse(e);
|
|
242
|
+
if (Array.isArray(t)) return t.map(String).filter(Boolean);
|
|
243
|
+
} catch {
|
|
244
|
+
}
|
|
245
|
+
return [];
|
|
240
246
|
}
|
|
241
247
|
function Cr(e) {
|
|
248
|
+
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 = kr(e == null ? void 0 : e.flowUniqueIds);
|
|
249
|
+
return { agentKind: r, agentUniqueId: o, flowType: i, category: s, flowUniqueIds: a, pageSize: n };
|
|
250
|
+
}
|
|
251
|
+
function Ar(e) {
|
|
242
252
|
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;
|
|
243
253
|
return {
|
|
244
254
|
names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
|
|
@@ -247,14 +257,14 @@ function Cr(e) {
|
|
|
247
257
|
pageSize: n
|
|
248
258
|
};
|
|
249
259
|
}
|
|
250
|
-
function
|
|
260
|
+
function _r(e) {
|
|
251
261
|
if (e.type !== "case_singleselect") return e;
|
|
252
262
|
const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
|
|
253
263
|
return { ...e, type: "case_multiselect", defaultValue: t };
|
|
254
264
|
}
|
|
255
|
-
function
|
|
265
|
+
function Tr(e) {
|
|
256
266
|
var o, i;
|
|
257
|
-
const t =
|
|
267
|
+
const t = _r(e), n = Se(t.fileAcceptTypes), r = t.type;
|
|
258
268
|
return {
|
|
259
269
|
id: ((o = t.id) == null ? void 0 : o.trim()) || ve("block-"),
|
|
260
270
|
type: r,
|
|
@@ -284,11 +294,11 @@ function _r(e) {
|
|
|
284
294
|
resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
|
|
285
295
|
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? Ne(t.resumeMinCount, 1) : void 0,
|
|
286
296
|
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? Ne(t.resumeMaxCount, 1) : void 0,
|
|
287
|
-
resumeFilter: r === "resume_multiselect" ?
|
|
297
|
+
resumeFilter: r === "resume_multiselect" ? Ar(t.resumeFilter) : void 0,
|
|
288
298
|
caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
|
|
289
299
|
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? Ne(t.caseMinCount, 1) : void 0,
|
|
290
300
|
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? Ne(t.caseMaxCount, 1) : void 0,
|
|
291
|
-
caseFilter: r === "case_multiselect" ?
|
|
301
|
+
caseFilter: r === "case_multiselect" ? Cr(t.caseFilter) : void 0
|
|
292
302
|
};
|
|
293
303
|
}
|
|
294
304
|
function Re(e) {
|
|
@@ -302,7 +312,7 @@ function Re(e) {
|
|
|
302
312
|
function Oe(e) {
|
|
303
313
|
if (!e || !Array.isArray(e.blocks))
|
|
304
314
|
return Re({ title: "", description: "", blocks: [], jsonSchema: {} });
|
|
305
|
-
const t = e.blocks.map(
|
|
315
|
+
const t = e.blocks.map(Tr);
|
|
306
316
|
return Re({
|
|
307
317
|
title: typeof e.title == "string" ? e.title : "",
|
|
308
318
|
description: typeof e.description == "string" ? e.description : "",
|
|
@@ -310,7 +320,7 @@ function Oe(e) {
|
|
|
310
320
|
jsonSchema: ft(e.jsonSchema)
|
|
311
321
|
});
|
|
312
322
|
}
|
|
313
|
-
function
|
|
323
|
+
function xr(e) {
|
|
314
324
|
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) : [];
|
|
315
325
|
return {
|
|
316
326
|
agentKind: n,
|
|
@@ -327,7 +337,7 @@ function $t(e) {
|
|
|
327
337
|
if (!(!Number.isFinite(t) || t < 1))
|
|
328
338
|
return Math.floor(t);
|
|
329
339
|
}
|
|
330
|
-
function
|
|
340
|
+
function Nr(e, t) {
|
|
331
341
|
var s, a, l, u, m, d;
|
|
332
342
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
333
343
|
return i({
|
|
@@ -350,7 +360,7 @@ function xr(e, t) {
|
|
|
350
360
|
value: { path: o }
|
|
351
361
|
});
|
|
352
362
|
}
|
|
353
|
-
function
|
|
363
|
+
function Ir(e, t, n) {
|
|
354
364
|
const r = n.nameFromValue(e.value), o = {
|
|
355
365
|
...t("case_multiselect"),
|
|
356
366
|
name: r,
|
|
@@ -358,7 +368,7 @@ function Nr(e, t, n) {
|
|
|
358
368
|
}, i = n.asLiteral(e.placeholder);
|
|
359
369
|
i && (o.placeholder = i);
|
|
360
370
|
const s = n.asLiteral(e.help);
|
|
361
|
-
s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter =
|
|
371
|
+
s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = xr(e.caseFilter));
|
|
362
372
|
const a = $t(e.minCount);
|
|
363
373
|
a !== void 0 && (o.caseMinCount = a);
|
|
364
374
|
const l = $t(e.maxCount);
|
|
@@ -367,14 +377,14 @@ function Nr(e, t, n) {
|
|
|
367
377
|
const nn = ge(
|
|
368
378
|
null
|
|
369
379
|
);
|
|
370
|
-
function
|
|
380
|
+
function Mr(e) {
|
|
371
381
|
try {
|
|
372
382
|
return JSON.stringify(e);
|
|
373
383
|
} catch {
|
|
374
384
|
return String(e.length);
|
|
375
385
|
}
|
|
376
386
|
}
|
|
377
|
-
const
|
|
387
|
+
const Fr = {
|
|
378
388
|
publishLiveOptions: () => {
|
|
379
389
|
},
|
|
380
390
|
liveOptions: /* @__PURE__ */ new Map(),
|
|
@@ -383,7 +393,7 @@ const Mr = {
|
|
|
383
393
|
clearPendingChangeFields: () => {
|
|
384
394
|
}
|
|
385
395
|
};
|
|
386
|
-
function
|
|
396
|
+
function Er({ children: e }) {
|
|
387
397
|
const t = A(/* @__PURE__ */ new Map()), n = A(/* @__PURE__ */ new Map()), r = A([]), [o, i] = U(0), [s, a] = U(() => /* @__PURE__ */ new Map()), [l, u] = U(
|
|
388
398
|
[]
|
|
389
399
|
), m = $(
|
|
@@ -393,7 +403,7 @@ function Fr({ children: e }) {
|
|
|
393
403
|
const k = b.map((p) => ({
|
|
394
404
|
value: String(p.value ?? ""),
|
|
395
405
|
label: String(p.label ?? p.value ?? "")
|
|
396
|
-
})), f =
|
|
406
|
+
})), f = Mr(k);
|
|
397
407
|
n.current.get(y) !== f && (n.current.set(y, f), t.current.set(y, k), r.current.includes(y) || (r.current = [...r.current, y]), a(new Map(t.current)), u(r.current), i((p) => p + 1));
|
|
398
408
|
},
|
|
399
409
|
[]
|
|
@@ -418,7 +428,7 @@ function Fr({ children: e }) {
|
|
|
418
428
|
return /* @__PURE__ */ c(nn.Provider, { value: S, children: e });
|
|
419
429
|
}
|
|
420
430
|
function ht() {
|
|
421
|
-
return ye(nn) ??
|
|
431
|
+
return ye(nn) ?? Fr;
|
|
422
432
|
}
|
|
423
433
|
const rn = ge({ interactive: !0 });
|
|
424
434
|
function it({
|
|
@@ -431,10 +441,10 @@ function ie() {
|
|
|
431
441
|
return ye(rn);
|
|
432
442
|
}
|
|
433
443
|
const on = ge(null);
|
|
434
|
-
function
|
|
444
|
+
function Rr(e) {
|
|
435
445
|
return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
|
|
436
446
|
}
|
|
437
|
-
const
|
|
447
|
+
const Ur = {
|
|
438
448
|
reportEvent: () => {
|
|
439
449
|
},
|
|
440
450
|
reportData: () => {
|
|
@@ -442,7 +452,7 @@ const Rr = {
|
|
|
442
452
|
runAutoControl: (e) => e(),
|
|
443
453
|
isAutoControl: () => !1
|
|
444
454
|
};
|
|
445
|
-
function
|
|
455
|
+
function wr(e) {
|
|
446
456
|
const t = {};
|
|
447
457
|
for (const [n, r] of Object.entries(e.form_values ?? {}))
|
|
448
458
|
r !== void 0 && (t[n] = r);
|
|
@@ -452,7 +462,7 @@ function Ur(e) {
|
|
|
452
462
|
form_change: Array.isArray(e.form_change) ? [...e.form_change] : []
|
|
453
463
|
};
|
|
454
464
|
}
|
|
455
|
-
function
|
|
465
|
+
function Pr({
|
|
456
466
|
client: e,
|
|
457
467
|
children: t
|
|
458
468
|
}) {
|
|
@@ -470,7 +480,7 @@ function wr({
|
|
|
470
480
|
m.send(S, d);
|
|
471
481
|
}, []), i = $((u) => {
|
|
472
482
|
const m = r.current;
|
|
473
|
-
m && m.send("form_runtime_data",
|
|
483
|
+
m && m.send("form_runtime_data", wr(u));
|
|
474
484
|
}, []), s = $((u) => {
|
|
475
485
|
n.current += 1;
|
|
476
486
|
let m;
|
|
@@ -479,7 +489,7 @@ function wr({
|
|
|
479
489
|
} catch (d) {
|
|
480
490
|
throw n.current = Math.max(0, n.current - 1), d;
|
|
481
491
|
}
|
|
482
|
-
return
|
|
492
|
+
return Rr(m) ? Promise.resolve(m).finally(() => {
|
|
483
493
|
n.current = Math.max(0, n.current - 1);
|
|
484
494
|
}) : (n.current = Math.max(0, n.current - 1), m);
|
|
485
495
|
}, []), a = $(
|
|
@@ -497,13 +507,13 @@ function wr({
|
|
|
497
507
|
return /* @__PURE__ */ c(on.Provider, { value: l, children: t });
|
|
498
508
|
}
|
|
499
509
|
function sn() {
|
|
500
|
-
return ye(on) ??
|
|
510
|
+
return ye(on) ?? Ur;
|
|
501
511
|
}
|
|
502
|
-
const
|
|
512
|
+
const zr = 300;
|
|
503
513
|
function an(e) {
|
|
504
514
|
return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
|
|
505
515
|
}
|
|
506
|
-
function
|
|
516
|
+
function Or(e) {
|
|
507
517
|
if (!e) return;
|
|
508
518
|
const t = e.trim();
|
|
509
519
|
if (t)
|
|
@@ -515,7 +525,7 @@ function Dt(e, t = "value") {
|
|
|
515
525
|
return e.dataContext.resolveDynamicValue(r);
|
|
516
526
|
}
|
|
517
527
|
function se(e, t = "value", n = {}) {
|
|
518
|
-
const o = e.componentModel.properties[t], i = an(o), s =
|
|
528
|
+
const o = e.componentModel.properties[t], i = an(o), s = Or(i), a = sn(), {
|
|
519
529
|
component: l = "Unknown",
|
|
520
530
|
changeAction: u = "change",
|
|
521
531
|
debounceChange: m = !1
|
|
@@ -562,7 +572,7 @@ function se(e, t = "value", n = {}) {
|
|
|
562
572
|
}
|
|
563
573
|
S.current = O, g.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
564
574
|
d.current = null, B();
|
|
565
|
-
},
|
|
575
|
+
}, zr);
|
|
566
576
|
},
|
|
567
577
|
[s, u, l, m]
|
|
568
578
|
), _ = $(
|
|
@@ -624,7 +634,7 @@ function st({
|
|
|
624
634
|
}) {
|
|
625
635
|
return /* @__PURE__ */ c(dn.Provider, { value: e ?? null, children: t });
|
|
626
636
|
}
|
|
627
|
-
function
|
|
637
|
+
function qr() {
|
|
628
638
|
return ye(dn);
|
|
629
639
|
}
|
|
630
640
|
function Ye(e) {
|
|
@@ -641,10 +651,10 @@ function Xe(e) {
|
|
|
641
651
|
const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
|
|
642
652
|
return t || n;
|
|
643
653
|
}
|
|
644
|
-
function
|
|
654
|
+
function Br(e) {
|
|
645
655
|
return JSON.stringify(e);
|
|
646
656
|
}
|
|
647
|
-
const
|
|
657
|
+
const Lr = {
|
|
648
658
|
name: "SkoponCaseSelect",
|
|
649
659
|
schema: h.object({
|
|
650
660
|
label: h.any().optional(),
|
|
@@ -657,7 +667,7 @@ const Br = {
|
|
|
657
667
|
value: h.any().optional()
|
|
658
668
|
}).passthrough()
|
|
659
669
|
};
|
|
660
|
-
function
|
|
670
|
+
function Vr({
|
|
661
671
|
item: e,
|
|
662
672
|
selected: t,
|
|
663
673
|
disabled: n,
|
|
@@ -685,11 +695,11 @@ function Lr({
|
|
|
685
695
|
}
|
|
686
696
|
);
|
|
687
697
|
}
|
|
688
|
-
function
|
|
689
|
-
const { interactive: t } = ie(), n =
|
|
698
|
+
function jr({ context: e }) {
|
|
699
|
+
const { interactive: t } = ie(), n = qr(), { publishLiveOptions: r } = ht(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = se(e, "value", {
|
|
690
700
|
component: "SkoponCaseSelect",
|
|
691
701
|
changeAction: "click"
|
|
692
|
-
}), l = e.componentModel.properties, u = Ye(l.label), m = Ye(l.placeholder), d = Ye(l.help), S = l.enableRefresh !== !1, g = Ue(l.minCount), b = Ue(l.maxCount), y = j(() => Qe(l.caseFilter), [l.caseFilter]), k =
|
|
702
|
+
}), l = e.componentModel.properties, u = Ye(l.label), m = Ye(l.placeholder), d = Ye(l.help), S = l.enableRefresh !== !1, g = Ue(l.minCount), b = Ue(l.maxCount), y = j(() => Qe(l.caseFilter), [l.caseFilter]), k = Br(y), [f, p] = U(1), [v, x] = U(!1), [I, _] = U(""), [w, C] = U([]), [O, B] = U(0), [ne, K] = U(y.pageSize ?? 20), D = A(0), J = Y(o);
|
|
693
703
|
z(() => {
|
|
694
704
|
const T = mn(J, b);
|
|
695
705
|
T !== null && s(T);
|
|
@@ -750,7 +760,7 @@ function Vr({ context: e }) {
|
|
|
750
760
|
] }) : null,
|
|
751
761
|
!v && w.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: Z }) : null,
|
|
752
762
|
w.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ c(
|
|
753
|
-
|
|
763
|
+
Vr,
|
|
754
764
|
{
|
|
755
765
|
item: T,
|
|
756
766
|
selected: J.includes(T.caseUniqueId),
|
|
@@ -782,15 +792,15 @@ function Vr({ context: e }) {
|
|
|
782
792
|
}
|
|
783
793
|
);
|
|
784
794
|
}
|
|
785
|
-
const
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
),
|
|
795
|
+
const $r = Q(
|
|
796
|
+
Lr,
|
|
797
|
+
jr
|
|
798
|
+
), Dr = {
|
|
789
799
|
type: "case_multiselect",
|
|
790
800
|
componentName: "SkoponCaseSelect",
|
|
791
|
-
toComponent:
|
|
792
|
-
fromComponent:
|
|
793
|
-
catalogComponents: [
|
|
801
|
+
toComponent: Nr,
|
|
802
|
+
fromComponent: Ir,
|
|
803
|
+
catalogComponents: [$r]
|
|
794
804
|
};
|
|
795
805
|
function Ht(e) {
|
|
796
806
|
if (e == null) return;
|
|
@@ -798,7 +808,7 @@ function Ht(e) {
|
|
|
798
808
|
if (!(!Number.isFinite(t) || t < 1))
|
|
799
809
|
return Math.floor(t);
|
|
800
810
|
}
|
|
801
|
-
function
|
|
811
|
+
function Hr(e, t) {
|
|
802
812
|
var s, a, l, u;
|
|
803
813
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
804
814
|
return i({
|
|
@@ -819,7 +829,7 @@ function Dr(e, t) {
|
|
|
819
829
|
value: { path: o }
|
|
820
830
|
});
|
|
821
831
|
}
|
|
822
|
-
function
|
|
832
|
+
function Kr(e, t, n) {
|
|
823
833
|
const r = n.nameFromValue(e.value), o = {
|
|
824
834
|
...t("resume_multiselect"),
|
|
825
835
|
name: r,
|
|
@@ -848,7 +858,7 @@ function at({
|
|
|
848
858
|
}) {
|
|
849
859
|
return /* @__PURE__ */ c(pn.Provider, { value: e ?? null, children: t });
|
|
850
860
|
}
|
|
851
|
-
function
|
|
861
|
+
function Gr() {
|
|
852
862
|
return ye(pn);
|
|
853
863
|
}
|
|
854
864
|
function Ze(e) {
|
|
@@ -860,10 +870,10 @@ function et(e) {
|
|
|
860
870
|
const t = e, n = Array.isArray(t.names) ? t.names.map(String).filter(Boolean) : [], r = Array.isArray(t.agentUniqueIds) ? t.agentUniqueIds.map(String).filter(Boolean) : [], o = Array.isArray(t.resumeUniqueIds) ? t.resumeUniqueIds.map(String).filter(Boolean) : [], i = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), s = Number.isFinite(i) && i >= 1 && i <= 100 ? Math.floor(i) : 20;
|
|
861
871
|
return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: s };
|
|
862
872
|
}
|
|
863
|
-
function
|
|
873
|
+
function Jr(e) {
|
|
864
874
|
return JSON.stringify(e);
|
|
865
875
|
}
|
|
866
|
-
const
|
|
876
|
+
const Wr = {
|
|
867
877
|
name: "SkoponResumeSelect",
|
|
868
878
|
schema: h.object({
|
|
869
879
|
label: h.any().optional(),
|
|
@@ -875,9 +885,9 @@ const Jr = {
|
|
|
875
885
|
maxCount: h.any().optional(),
|
|
876
886
|
value: h.any().optional()
|
|
877
887
|
}).passthrough()
|
|
878
|
-
},
|
|
888
|
+
}, Yr = 3, Qr = 2;
|
|
879
889
|
function tt(e, t) {
|
|
880
|
-
const n = (t ?? []).filter(Boolean), r = n.slice(0,
|
|
890
|
+
const n = (t ?? []).filter(Boolean), r = n.slice(0, Yr), o = n.length - r.length;
|
|
881
891
|
return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-tags", children: [
|
|
882
892
|
/* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-label", children: e }),
|
|
883
893
|
n.length > 0 ? /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-tags-list", children: [
|
|
@@ -889,25 +899,25 @@ function tt(e, t) {
|
|
|
889
899
|
] }) : /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
|
|
890
900
|
] });
|
|
891
901
|
}
|
|
892
|
-
function
|
|
902
|
+
function Xr(e) {
|
|
893
903
|
return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-field", children: [
|
|
894
904
|
/* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
|
|
895
905
|
/* @__PURE__ */ c("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
|
|
896
906
|
] });
|
|
897
907
|
}
|
|
898
|
-
function
|
|
908
|
+
function Zr({ work: e }) {
|
|
899
909
|
return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-work", children: [
|
|
900
910
|
/* @__PURE__ */ c("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ c("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ c(Hn, { className: "skopon-resume-select-card-work-placeholder" }) }),
|
|
901
911
|
/* @__PURE__ */ c("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
|
|
902
912
|
] });
|
|
903
913
|
}
|
|
904
|
-
function
|
|
914
|
+
function eo({
|
|
905
915
|
item: e,
|
|
906
916
|
selected: t,
|
|
907
917
|
disabled: n,
|
|
908
918
|
onToggle: r
|
|
909
919
|
}) {
|
|
910
|
-
const o = (e.works ?? []).slice(0,
|
|
920
|
+
const o = (e.works ?? []).slice(0, Qr);
|
|
911
921
|
return /* @__PURE__ */ N(
|
|
912
922
|
"button",
|
|
913
923
|
{
|
|
@@ -927,24 +937,24 @@ function Zr({
|
|
|
927
937
|
),
|
|
928
938
|
/* @__PURE__ */ c("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
|
|
929
939
|
/* @__PURE__ */ N("div", { className: "skopon-resume-select-card-body", children: [
|
|
930
|
-
|
|
940
|
+
Xr(e.satisfaction),
|
|
931
941
|
tt("性格", e.personality),
|
|
932
942
|
tt("专长", e.specialties),
|
|
933
943
|
tt("擅长领域", e.traits),
|
|
934
944
|
/* @__PURE__ */ N("div", { className: "skopon-resume-select-card-works", children: [
|
|
935
945
|
/* @__PURE__ */ c("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
|
|
936
|
-
o.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ c(
|
|
946
|
+
o.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ c(Zr, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
|
|
937
947
|
] })
|
|
938
948
|
] })
|
|
939
949
|
]
|
|
940
950
|
}
|
|
941
951
|
);
|
|
942
952
|
}
|
|
943
|
-
function
|
|
944
|
-
const { interactive: t } = ie(), n =
|
|
953
|
+
function to({ context: e }) {
|
|
954
|
+
const { interactive: t } = ie(), n = Gr(), { publishLiveOptions: r } = ht(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = se(e, "value", {
|
|
945
955
|
component: "SkoponResumeSelect",
|
|
946
956
|
changeAction: "click"
|
|
947
|
-
}), l = e.componentModel.properties, u = Ze(l.label), m = Ze(l.placeholder), d = Ze(l.help), S = l.enableRefresh !== !1, g = Ue(l.minCount), b = Ue(l.maxCount), y = j(() => et(l.resumeFilter), [l.resumeFilter]), k =
|
|
957
|
+
}), l = e.componentModel.properties, u = Ze(l.label), m = Ze(l.placeholder), d = Ze(l.help), S = l.enableRefresh !== !1, g = Ue(l.minCount), b = Ue(l.maxCount), y = j(() => et(l.resumeFilter), [l.resumeFilter]), k = Jr(y), [f, p] = U(1), [v, x] = U(!1), [I, _] = U(""), [w, C] = U([]), [O, B] = U(0), [ne, K] = U(y.pageSize ?? 20), D = A(0), J = Y(o);
|
|
948
958
|
z(() => {
|
|
949
959
|
const T = mn(J, b);
|
|
950
960
|
T !== null && s(T);
|
|
@@ -1006,7 +1016,7 @@ function eo({ context: e }) {
|
|
|
1006
1016
|
!v && I ? /* @__PURE__ */ c(te.Text, { type: "danger", className: "skopon-resume-select-status", children: I }) : null,
|
|
1007
1017
|
!v && !I && w.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: L }) : null,
|
|
1008
1018
|
w.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ c(
|
|
1009
|
-
|
|
1019
|
+
eo,
|
|
1010
1020
|
{
|
|
1011
1021
|
item: T,
|
|
1012
1022
|
selected: J.includes(T.resumeUniqueId),
|
|
@@ -1038,34 +1048,34 @@ function eo({ context: e }) {
|
|
|
1038
1048
|
}
|
|
1039
1049
|
);
|
|
1040
1050
|
}
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
),
|
|
1051
|
+
const no = Q(
|
|
1052
|
+
Wr,
|
|
1053
|
+
to
|
|
1054
|
+
), ro = {
|
|
1045
1055
|
type: "resume_multiselect",
|
|
1046
1056
|
componentName: "SkoponResumeSelect",
|
|
1047
|
-
toComponent:
|
|
1048
|
-
fromComponent:
|
|
1049
|
-
catalogComponents: [
|
|
1050
|
-
}, qe = [
|
|
1057
|
+
toComponent: Hr,
|
|
1058
|
+
fromComponent: Kr,
|
|
1059
|
+
catalogComponents: [no]
|
|
1060
|
+
}, qe = [ro, Dr], oo = new Map(
|
|
1051
1061
|
qe.map((e) => [e.type, e])
|
|
1052
|
-
),
|
|
1062
|
+
), io = new Map(
|
|
1053
1063
|
qe.map((e) => [e.componentName, e])
|
|
1054
1064
|
);
|
|
1055
|
-
function io(e) {
|
|
1056
|
-
return ro.get(e);
|
|
1057
|
-
}
|
|
1058
1065
|
function so(e) {
|
|
1059
1066
|
return oo.get(e);
|
|
1060
1067
|
}
|
|
1061
|
-
function ao() {
|
|
1062
|
-
return
|
|
1068
|
+
function ao(e) {
|
|
1069
|
+
return io.get(e);
|
|
1063
1070
|
}
|
|
1064
1071
|
function lo() {
|
|
1072
|
+
return qe.flatMap((e) => e.catalogComponents);
|
|
1073
|
+
}
|
|
1074
|
+
function co() {
|
|
1065
1075
|
return qe.map((e) => e.componentName);
|
|
1066
1076
|
}
|
|
1067
1077
|
const we = "root", lt = "__title__", ct = "__desc__", gt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
|
|
1068
|
-
function
|
|
1078
|
+
function uo(e) {
|
|
1069
1079
|
return `/${e}`;
|
|
1070
1080
|
}
|
|
1071
1081
|
function Kt(e) {
|
|
@@ -1074,7 +1084,7 @@ function Kt(e) {
|
|
|
1074
1084
|
function H(e) {
|
|
1075
1085
|
if (typeof e == "string") return e;
|
|
1076
1086
|
}
|
|
1077
|
-
function
|
|
1087
|
+
function mo(e) {
|
|
1078
1088
|
const t = e.id || ve("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
|
|
1079
1089
|
return {
|
|
1080
1090
|
id: t,
|
|
@@ -1087,14 +1097,14 @@ function uo(e) {
|
|
|
1087
1097
|
placeholder: e.placeholder ?? ""
|
|
1088
1098
|
};
|
|
1089
1099
|
}
|
|
1090
|
-
function
|
|
1100
|
+
function po(e) {
|
|
1091
1101
|
if (Array.isArray(e.urls))
|
|
1092
1102
|
return e.urls.map((n) => String(n).trim()).filter(Boolean);
|
|
1093
1103
|
const t = H(e.url);
|
|
1094
1104
|
return t != null && t.trim() ? [t.trim()] : [];
|
|
1095
1105
|
}
|
|
1096
1106
|
function Ie(e, t, n) {
|
|
1097
|
-
const r = typeof e.id == "string" ? e.id : ve("block-"), o =
|
|
1107
|
+
const r = typeof e.id == "string" ? e.id : ve("block-"), o = po(e), i = H(e.label) ?? H(e.description) ?? n, s = H(e.help), a = H(e.placeholder), l = be(e.mediaSize);
|
|
1098
1108
|
return {
|
|
1099
1109
|
id: r,
|
|
1100
1110
|
type: t,
|
|
@@ -1105,7 +1115,7 @@ function Ie(e, t, n) {
|
|
|
1105
1115
|
mediaUrls: o.length > 0 ? o : [""]
|
|
1106
1116
|
};
|
|
1107
1117
|
}
|
|
1108
|
-
function
|
|
1118
|
+
function fo(e) {
|
|
1109
1119
|
switch (e.type) {
|
|
1110
1120
|
case "toggle":
|
|
1111
1121
|
return ke(e.defaultValue);
|
|
@@ -1122,9 +1132,9 @@ function po(e) {
|
|
|
1122
1132
|
return typeof e.defaultValue == "string" ? e.defaultValue : "";
|
|
1123
1133
|
}
|
|
1124
1134
|
}
|
|
1125
|
-
function
|
|
1135
|
+
function ho(e) {
|
|
1126
1136
|
var u;
|
|
1127
|
-
const t = e.id || ve("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ?
|
|
1137
|
+
const t = e.id || ve("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? uo(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), s = (m) => r ? { node: m, dataKey: r, dataValue: fo(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = so(e.type);
|
|
1128
1138
|
if (l)
|
|
1129
1139
|
return l.toComponent(e, a);
|
|
1130
1140
|
switch (e.type) {
|
|
@@ -1235,7 +1245,7 @@ function fo(e) {
|
|
|
1235
1245
|
case "image":
|
|
1236
1246
|
case "video":
|
|
1237
1247
|
case "audio":
|
|
1238
|
-
return { node:
|
|
1248
|
+
return { node: mo(e) };
|
|
1239
1249
|
case "file":
|
|
1240
1250
|
return s({
|
|
1241
1251
|
id: t,
|
|
@@ -1263,14 +1273,14 @@ function fn(e, t) {
|
|
|
1263
1273
|
const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, s = (e.title ?? "").trim(), a = (e.description ?? "").trim();
|
|
1264
1274
|
i && s && (n.push({ id: lt, component: "Text", text: s, variant: "h2" }), r.push(lt)), i && a && (n.push({ id: ct, component: "Text", text: a, variant: "body" }), r.push(ct));
|
|
1265
1275
|
for (const m of e.blocks ?? []) {
|
|
1266
|
-
const { node: d, dataKey: S, dataValue: g } =
|
|
1276
|
+
const { node: d, dataKey: S, dataValue: g } = ho(m);
|
|
1267
1277
|
d && (n.push(d), r.push(d.id), S && (o[S] = g));
|
|
1268
1278
|
}
|
|
1269
1279
|
n.unshift({ id: we, component: "Column", children: r });
|
|
1270
1280
|
const l = { root: we, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
|
|
1271
1281
|
return u !== void 0 && (l.surfaceProperties = { styleId: u ?? null }), l;
|
|
1272
1282
|
}
|
|
1273
|
-
function
|
|
1283
|
+
function go(e) {
|
|
1274
1284
|
const t = /* @__PURE__ */ new Map();
|
|
1275
1285
|
for (const n of e.components ?? [])
|
|
1276
1286
|
n && typeof n.id == "string" && t.set(n.id, n);
|
|
@@ -1287,8 +1297,8 @@ function nt(e) {
|
|
|
1287
1297
|
};
|
|
1288
1298
|
}).filter((n) => !!n) : [];
|
|
1289
1299
|
}
|
|
1290
|
-
function
|
|
1291
|
-
const t = typeof e.id == "string" ? e.id : ve("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o = Kt(e.value), i = (a) => ({ id: t, type: a, label: r }), s =
|
|
1300
|
+
function yo(e) {
|
|
1301
|
+
const t = typeof e.id == "string" ? e.id : ve("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o = Kt(e.value), i = (a) => ({ id: t, type: a, label: r }), s = ao(n);
|
|
1292
1302
|
if (s)
|
|
1293
1303
|
return s.fromComponent(e, i, { asLiteral: H, nameFromValue: Kt });
|
|
1294
1304
|
switch (n) {
|
|
@@ -1361,7 +1371,7 @@ function hn(e, t, n, r) {
|
|
|
1361
1371
|
}
|
|
1362
1372
|
r.push(o);
|
|
1363
1373
|
}
|
|
1364
|
-
function
|
|
1374
|
+
function vo(e, t) {
|
|
1365
1375
|
return t ? e.map((n) => {
|
|
1366
1376
|
var i;
|
|
1367
1377
|
const r = (i = n.name) == null ? void 0 : i.trim();
|
|
@@ -1370,10 +1380,10 @@ function yo(e, t) {
|
|
|
1370
1380
|
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: ke(o) } : { ...n, defaultValue: o };
|
|
1371
1381
|
}) : e;
|
|
1372
1382
|
}
|
|
1373
|
-
function
|
|
1383
|
+
function So(e) {
|
|
1374
1384
|
if (!e || !Array.isArray(e.components))
|
|
1375
1385
|
return Re({ title: "", description: "", blocks: [], jsonSchema: {} });
|
|
1376
|
-
const t =
|
|
1386
|
+
const t = go(e), n = [];
|
|
1377
1387
|
hn(e.root ?? we, t, /* @__PURE__ */ new Set(), n);
|
|
1378
1388
|
let r = "", o = "";
|
|
1379
1389
|
const i = [];
|
|
@@ -1386,17 +1396,17 @@ function vo(e) {
|
|
|
1386
1396
|
o = H(s.text) ?? o;
|
|
1387
1397
|
continue;
|
|
1388
1398
|
}
|
|
1389
|
-
const a =
|
|
1399
|
+
const a = yo(s);
|
|
1390
1400
|
a && i.push(a);
|
|
1391
1401
|
}
|
|
1392
1402
|
return Re({
|
|
1393
1403
|
title: r,
|
|
1394
1404
|
description: o,
|
|
1395
|
-
blocks:
|
|
1405
|
+
blocks: vo(i, e.dataModel),
|
|
1396
1406
|
jsonSchema: {}
|
|
1397
1407
|
});
|
|
1398
1408
|
}
|
|
1399
|
-
function
|
|
1409
|
+
function bo(e, t) {
|
|
1400
1410
|
const { surfaceId: n, catalogId: r } = t, o = [
|
|
1401
1411
|
{ version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
|
|
1402
1412
|
{
|
|
@@ -1412,7 +1422,7 @@ function So(e, t) {
|
|
|
1412
1422
|
function gn(e) {
|
|
1413
1423
|
return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
|
|
1414
1424
|
}
|
|
1415
|
-
function
|
|
1425
|
+
function ko(e, t) {
|
|
1416
1426
|
if (!e || typeof e != "object") return null;
|
|
1417
1427
|
const n = e, r = gn(n.a2ui) ? n.a2ui : void 0;
|
|
1418
1428
|
if (r && !ut(r)) return r;
|
|
@@ -1426,7 +1436,7 @@ function bo(e, t) {
|
|
|
1426
1436
|
}), s = fn(i, t);
|
|
1427
1437
|
return ut(s) ? null : s;
|
|
1428
1438
|
}
|
|
1429
|
-
function
|
|
1439
|
+
function Co(e, t, n) {
|
|
1430
1440
|
return fn(
|
|
1431
1441
|
{
|
|
1432
1442
|
title: e.title,
|
|
@@ -1436,18 +1446,18 @@ function ko(e, t, n) {
|
|
|
1436
1446
|
n
|
|
1437
1447
|
);
|
|
1438
1448
|
}
|
|
1439
|
-
function
|
|
1449
|
+
function Ao(e) {
|
|
1440
1450
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1441
1451
|
return;
|
|
1442
1452
|
const t = e;
|
|
1443
|
-
return !(Array.isArray(t.blocks) && t.blocks.length > 0) && gn(t.a2ui) ?
|
|
1453
|
+
return !(Array.isArray(t.blocks) && t.blocks.length > 0) && gn(t.a2ui) ? So(t.a2ui) : Oe({
|
|
1444
1454
|
title: typeof t.title == "string" ? t.title : "",
|
|
1445
1455
|
description: typeof t.description == "string" ? t.description : "",
|
|
1446
1456
|
blocks: Array.isArray(t.blocks) ? t.blocks : [],
|
|
1447
1457
|
jsonSchema: ft(t.jsonSchema ?? t.json_schema)
|
|
1448
1458
|
});
|
|
1449
1459
|
}
|
|
1450
|
-
function
|
|
1460
|
+
function _o(e, t, n) {
|
|
1451
1461
|
const r = e.model.surfacesMap.get(t);
|
|
1452
1462
|
if (!r) return {};
|
|
1453
1463
|
const o = {};
|
|
@@ -1457,7 +1467,7 @@ function Ao(e, t, n) {
|
|
|
1457
1467
|
}
|
|
1458
1468
|
return o;
|
|
1459
1469
|
}
|
|
1460
|
-
const
|
|
1470
|
+
const To = /* @__PURE__ */ new Set(["type", "name", "id"]);
|
|
1461
1471
|
function yt(e) {
|
|
1462
1472
|
return Oe({
|
|
1463
1473
|
title: "",
|
|
@@ -1466,7 +1476,7 @@ function yt(e) {
|
|
|
1466
1476
|
jsonSchema: {}
|
|
1467
1477
|
}).blocks[0];
|
|
1468
1478
|
}
|
|
1469
|
-
function
|
|
1479
|
+
function xo(e, t) {
|
|
1470
1480
|
var o, i;
|
|
1471
1481
|
const n = /* @__PURE__ */ new Map();
|
|
1472
1482
|
for (const s of t) {
|
|
@@ -1487,7 +1497,7 @@ function To(e, t) {
|
|
|
1487
1497
|
}
|
|
1488
1498
|
return r;
|
|
1489
1499
|
}
|
|
1490
|
-
function
|
|
1500
|
+
function No(e, t, n) {
|
|
1491
1501
|
const r = e.rawBlocks;
|
|
1492
1502
|
if (!(r != null && r.length)) return n;
|
|
1493
1503
|
for (const o of r) {
|
|
@@ -1496,11 +1506,11 @@ function xo(e, t, n) {
|
|
|
1496
1506
|
}
|
|
1497
1507
|
return n;
|
|
1498
1508
|
}
|
|
1499
|
-
function
|
|
1509
|
+
function Io(e, t) {
|
|
1500
1510
|
var r;
|
|
1501
1511
|
const n = { ...e };
|
|
1502
1512
|
for (const o of Object.keys(t)) {
|
|
1503
|
-
if (
|
|
1513
|
+
if (To.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
|
|
1504
1514
|
const i = t[o];
|
|
1505
1515
|
i !== void 0 && Object.assign(n, { [o]: i });
|
|
1506
1516
|
}
|
|
@@ -1525,7 +1535,7 @@ function Be(e) {
|
|
|
1525
1535
|
rawBlocks: n
|
|
1526
1536
|
};
|
|
1527
1537
|
}
|
|
1528
|
-
function
|
|
1538
|
+
function Mo(e, t) {
|
|
1529
1539
|
var i, s, a, l, u, m;
|
|
1530
1540
|
const n = /* @__PURE__ */ new Map();
|
|
1531
1541
|
for (const d of (t == null ? void 0 : t.blocks) ?? [])
|
|
@@ -1537,20 +1547,20 @@ function Io(e, t) {
|
|
|
1537
1547
|
if (!S) continue;
|
|
1538
1548
|
const g = n.get(S);
|
|
1539
1549
|
if (g) {
|
|
1540
|
-
const b =
|
|
1541
|
-
r.push(
|
|
1550
|
+
const b = No(e, S, d);
|
|
1551
|
+
r.push(Io(g, b));
|
|
1542
1552
|
} else
|
|
1543
1553
|
o.push(yt(d));
|
|
1544
1554
|
}
|
|
1545
1555
|
return {
|
|
1546
1556
|
matchedBlocks: r,
|
|
1547
1557
|
extraBlocks: o,
|
|
1548
|
-
renderBlocks:
|
|
1558
|
+
renderBlocks: xo(e, r),
|
|
1549
1559
|
title: ((a = e.title) == null ? void 0 : a.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
|
|
1550
1560
|
description: ((u = e.description) == null ? void 0 : u.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
|
|
1551
1561
|
};
|
|
1552
1562
|
}
|
|
1553
|
-
function
|
|
1563
|
+
function Fo(e) {
|
|
1554
1564
|
const { type: t, defaultValue: n } = e;
|
|
1555
1565
|
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 : "";
|
|
1556
1566
|
}
|
|
@@ -1560,11 +1570,11 @@ function vt(e) {
|
|
|
1560
1570
|
for (const r of e) {
|
|
1561
1571
|
if (!ae(r.type)) continue;
|
|
1562
1572
|
const o = (n = r.name) == null ? void 0 : n.trim();
|
|
1563
|
-
o && (t[o] =
|
|
1573
|
+
o && (t[o] = Fo(r));
|
|
1564
1574
|
}
|
|
1565
1575
|
return t;
|
|
1566
1576
|
}
|
|
1567
|
-
function
|
|
1577
|
+
function Eo(e) {
|
|
1568
1578
|
return e.blocks.some(
|
|
1569
1579
|
(t) => {
|
|
1570
1580
|
var n;
|
|
@@ -1572,13 +1582,13 @@ function Fo(e) {
|
|
|
1572
1582
|
}
|
|
1573
1583
|
);
|
|
1574
1584
|
}
|
|
1575
|
-
function
|
|
1585
|
+
function Ro(e) {
|
|
1576
1586
|
return e.blocks.filter((t) => {
|
|
1577
1587
|
var n;
|
|
1578
1588
|
return ze(t.type) ? !0 : ae(t.type) && !!((n = t.name) != null && n.trim());
|
|
1579
1589
|
});
|
|
1580
1590
|
}
|
|
1581
|
-
function
|
|
1591
|
+
function Uo(e) {
|
|
1582
1592
|
return e.blocks.filter((t) => {
|
|
1583
1593
|
var n;
|
|
1584
1594
|
return ae(t.type) && ((n = t.name) == null ? void 0 : n.trim());
|
|
@@ -1602,16 +1612,16 @@ function vn(e, t, n) {
|
|
|
1602
1612
|
].join(`
|
|
1603
1613
|
`);
|
|
1604
1614
|
}
|
|
1605
|
-
function
|
|
1615
|
+
function wo(e, t) {
|
|
1606
1616
|
return JSON.stringify({ ...e, ...t }, null, 2);
|
|
1607
1617
|
}
|
|
1608
|
-
function
|
|
1618
|
+
function Po({
|
|
1609
1619
|
cardValues: e,
|
|
1610
1620
|
extraValues: t = {},
|
|
1611
1621
|
callbackUrl: n,
|
|
1612
1622
|
headers: r
|
|
1613
1623
|
}) {
|
|
1614
|
-
const o = (n ?? "").trim() || "<callback_url>", i =
|
|
1624
|
+
const o = (n ?? "").trim() || "<callback_url>", i = wo(e, t);
|
|
1615
1625
|
return [
|
|
1616
1626
|
`curl -X POST '${o}' \\`,
|
|
1617
1627
|
" -H 'Content-Type: application/json' \\",
|
|
@@ -1620,11 +1630,11 @@ function wo({
|
|
|
1620
1630
|
].join(`
|
|
1621
1631
|
`);
|
|
1622
1632
|
}
|
|
1623
|
-
function
|
|
1633
|
+
function ss(e, t, n) {
|
|
1624
1634
|
const r = Be(e);
|
|
1625
1635
|
if (!r) return vn(e, t, n);
|
|
1626
1636
|
const o = vt(r.blocks);
|
|
1627
|
-
return
|
|
1637
|
+
return Po({ cardValues: o, callbackUrl: t, headers: n });
|
|
1628
1638
|
}
|
|
1629
1639
|
async function Sn(e, t, n) {
|
|
1630
1640
|
const r = e.trim();
|
|
@@ -1653,7 +1663,7 @@ async function Sn(e, t, n) {
|
|
|
1653
1663
|
}
|
|
1654
1664
|
return { ok: i.ok, status: i.status, body: s };
|
|
1655
1665
|
}
|
|
1656
|
-
async function
|
|
1666
|
+
async function as(e) {
|
|
1657
1667
|
var n;
|
|
1658
1668
|
if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
|
|
1659
1669
|
await navigator.clipboard.writeText(e);
|
|
@@ -1682,7 +1692,7 @@ async function bt(e) {
|
|
|
1682
1692
|
throw new Error(t.message || `响应缺少 data (${e.status})`);
|
|
1683
1693
|
return t.data;
|
|
1684
1694
|
}
|
|
1685
|
-
const kt = "auth_user",
|
|
1695
|
+
const kt = "auth_user", zo = "token", Oo = "answer_agent_callback_url", qo = "realtime_ws_url", Bo = "/api/v1/mock/ask_user_answer_mock";
|
|
1686
1696
|
function Ct(e) {
|
|
1687
1697
|
if (typeof window > "u") return null;
|
|
1688
1698
|
try {
|
|
@@ -1699,24 +1709,24 @@ function At(e) {
|
|
|
1699
1709
|
return null;
|
|
1700
1710
|
}
|
|
1701
1711
|
}
|
|
1702
|
-
function
|
|
1712
|
+
function Lo(e, t) {
|
|
1703
1713
|
const n = At(e);
|
|
1704
1714
|
if (!n) return "";
|
|
1705
1715
|
const r = n[t];
|
|
1706
1716
|
return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
|
|
1707
1717
|
}
|
|
1708
|
-
function
|
|
1709
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.answerAgentCallbackUrlField ??
|
|
1718
|
+
function Vo(e = {}) {
|
|
1719
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.answerAgentCallbackUrlField ?? Oo, o = Ct(t);
|
|
1710
1720
|
if (!o) return "";
|
|
1711
1721
|
const i = o.getItem(n);
|
|
1712
1722
|
if (!i) return "";
|
|
1713
1723
|
const s = At(i);
|
|
1714
1724
|
if (!s) return "";
|
|
1715
1725
|
const a = s[r];
|
|
1716
|
-
return (typeof a == "string" ? a.trim() : "") ||
|
|
1726
|
+
return (typeof a == "string" ? a.trim() : "") || Bo;
|
|
1717
1727
|
}
|
|
1718
|
-
function
|
|
1719
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.realtimeWsUrlField ??
|
|
1728
|
+
function jo(e = {}) {
|
|
1729
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.realtimeWsUrlField ?? qo, o = Ct(t);
|
|
1720
1730
|
if (!o) return "";
|
|
1721
1731
|
const i = o.getItem(n);
|
|
1722
1732
|
if (!i) return "";
|
|
@@ -1732,17 +1742,17 @@ function _t(e, t) {
|
|
|
1732
1742
|
};
|
|
1733
1743
|
}
|
|
1734
1744
|
function bn(e = {}) {
|
|
1735
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.tokenField ??
|
|
1745
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.tokenField ?? zo, o = Ct(t);
|
|
1736
1746
|
if (!o) return {};
|
|
1737
1747
|
const i = o.getItem(n);
|
|
1738
1748
|
if (!i) return {};
|
|
1739
|
-
const s =
|
|
1749
|
+
const s = Lo(i, r);
|
|
1740
1750
|
return s ? { Authorization: `Bearer ${s}` } : {};
|
|
1741
1751
|
}
|
|
1742
1752
|
async function Tt(e = {}) {
|
|
1743
1753
|
return e.getHeaders ? await e.getHeaders() ?? {} : bn(e.authStorage);
|
|
1744
1754
|
}
|
|
1745
|
-
function
|
|
1755
|
+
function $o(e = {}) {
|
|
1746
1756
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
|
|
1747
1757
|
async function o(i) {
|
|
1748
1758
|
const s = new URLSearchParams();
|
|
@@ -1755,18 +1765,18 @@ function jo(e = {}) {
|
|
|
1755
1765
|
const a = await Tt(e), l = await r(`${t}${n}?${s.toString()}`, {
|
|
1756
1766
|
method: "GET",
|
|
1757
1767
|
headers: a
|
|
1758
|
-
}), u = await bt(l), m =
|
|
1768
|
+
}), u = await bt(l), m = Ao(u.form_definition);
|
|
1759
1769
|
return {
|
|
1760
1770
|
formUniqueId: u.form_unique_id,
|
|
1761
1771
|
formId: u.form_id,
|
|
1762
1772
|
disabled: u.disabled === 1,
|
|
1763
1773
|
formDefinition: m,
|
|
1764
|
-
a2ui:
|
|
1774
|
+
a2ui: ko(u.form_definition) ?? void 0
|
|
1765
1775
|
};
|
|
1766
1776
|
}
|
|
1767
1777
|
return { fetchDetail: o };
|
|
1768
1778
|
}
|
|
1769
|
-
function
|
|
1779
|
+
function Do(e) {
|
|
1770
1780
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1771
1781
|
return e ?? null;
|
|
1772
1782
|
const t = e;
|
|
@@ -1782,7 +1792,7 @@ function xt({
|
|
|
1782
1792
|
form: n,
|
|
1783
1793
|
answer: r
|
|
1784
1794
|
}) {
|
|
1785
|
-
const o = Be(t) ?? t, i = n ?
|
|
1795
|
+
const o = Be(t) ?? t, i = n ? Do(n) : o;
|
|
1786
1796
|
return {
|
|
1787
1797
|
mission_id: e.missionId ?? null,
|
|
1788
1798
|
tenant_id: e.tenantId ?? null,
|
|
@@ -1810,7 +1820,7 @@ function Nt(e) {
|
|
|
1810
1820
|
const o = e.mission_id;
|
|
1811
1821
|
return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
|
|
1812
1822
|
}
|
|
1813
|
-
function
|
|
1823
|
+
function ls(e) {
|
|
1814
1824
|
return Nt(
|
|
1815
1825
|
xt({
|
|
1816
1826
|
context: e,
|
|
@@ -1820,14 +1830,14 @@ function as(e) {
|
|
|
1820
1830
|
);
|
|
1821
1831
|
}
|
|
1822
1832
|
const Gt = "answer_agent_callback_url 未配置,无法提交";
|
|
1823
|
-
function
|
|
1833
|
+
function Ho(e) {
|
|
1824
1834
|
if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
|
|
1825
1835
|
const n = e.answerAgentCallbackUrl.trim();
|
|
1826
1836
|
if (!n)
|
|
1827
1837
|
throw new Error(Gt);
|
|
1828
1838
|
return n;
|
|
1829
1839
|
}
|
|
1830
|
-
const t =
|
|
1840
|
+
const t = Vo(e == null ? void 0 : e.authStorage).trim();
|
|
1831
1841
|
if (!t)
|
|
1832
1842
|
throw new Error(Gt);
|
|
1833
1843
|
return t;
|
|
@@ -1837,7 +1847,7 @@ function kn(e) {
|
|
|
1837
1847
|
const n = e.data;
|
|
1838
1848
|
return !n || typeof n != "object" || Array.isArray(n) ? null : n;
|
|
1839
1849
|
}
|
|
1840
|
-
function
|
|
1850
|
+
function Ko(e, t) {
|
|
1841
1851
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
1842
1852
|
const n = t.message;
|
|
1843
1853
|
if (typeof n == "string" && n.trim())
|
|
@@ -1845,27 +1855,27 @@ function Ho(e, t) {
|
|
|
1845
1855
|
}
|
|
1846
1856
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
1847
1857
|
}
|
|
1848
|
-
function
|
|
1858
|
+
function Go(e) {
|
|
1849
1859
|
return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
|
|
1850
1860
|
}
|
|
1851
1861
|
function Cn(e) {
|
|
1852
1862
|
const t = kn(e.body);
|
|
1853
|
-
return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message:
|
|
1863
|
+
return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: Go(t) } : e.ok ? { type: "success", message: "提交成功" } : {
|
|
1854
1864
|
type: "error",
|
|
1855
|
-
message:
|
|
1865
|
+
message: Ko(e.status, e.body)
|
|
1856
1866
|
};
|
|
1857
1867
|
}
|
|
1858
1868
|
async function An(e, t) {
|
|
1859
1869
|
const n = Nt(e);
|
|
1860
1870
|
if (n)
|
|
1861
1871
|
throw new Error(n);
|
|
1862
|
-
const r =
|
|
1872
|
+
const r = Ho(t), o = await Sn(r, e, {
|
|
1863
1873
|
...t,
|
|
1864
1874
|
headers: _t(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
|
|
1865
1875
|
}), i = kn(o.body);
|
|
1866
1876
|
return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
|
|
1867
1877
|
}
|
|
1868
|
-
function
|
|
1878
|
+
function Jo(e) {
|
|
1869
1879
|
return {
|
|
1870
1880
|
resumeUniqueId: e.resume_unique_id,
|
|
1871
1881
|
resumeId: e.resume_id,
|
|
@@ -1886,7 +1896,7 @@ function Go(e) {
|
|
|
1886
1896
|
}))
|
|
1887
1897
|
};
|
|
1888
1898
|
}
|
|
1889
|
-
function
|
|
1899
|
+
function Wo(e, t, n) {
|
|
1890
1900
|
const r = new URLSearchParams();
|
|
1891
1901
|
r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20));
|
|
1892
1902
|
for (const o of e.names ?? [])
|
|
@@ -1899,27 +1909,27 @@ function Jo(e, t, n) {
|
|
|
1899
1909
|
r.append("published", String(o));
|
|
1900
1910
|
return r;
|
|
1901
1911
|
}
|
|
1902
|
-
function
|
|
1912
|
+
function Yo(e = {}) {
|
|
1903
1913
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch, o = e.published ?? [1];
|
|
1904
1914
|
return async ({ filter: i, page: s }) => {
|
|
1905
|
-
const a = await Tt(e), l =
|
|
1915
|
+
const a = await Tt(e), l = Wo(i, s, o), u = await r(`${t}${n}?${l.toString()}`, {
|
|
1906
1916
|
method: "GET",
|
|
1907
1917
|
headers: a
|
|
1908
1918
|
}), m = await bt(u);
|
|
1909
1919
|
return {
|
|
1910
|
-
list: (m.list ?? []).map(
|
|
1920
|
+
list: (m.list ?? []).map(Jo),
|
|
1911
1921
|
total: m.total ?? 0,
|
|
1912
1922
|
page: m.page ?? s,
|
|
1913
1923
|
pageSize: m.page_size ?? i.pageSize ?? 20
|
|
1914
1924
|
};
|
|
1915
1925
|
};
|
|
1916
1926
|
}
|
|
1917
|
-
function
|
|
1927
|
+
function Qo(e) {
|
|
1918
1928
|
var r, o, i, s;
|
|
1919
1929
|
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()));
|
|
1920
1930
|
return t || n;
|
|
1921
1931
|
}
|
|
1922
|
-
function
|
|
1932
|
+
function Xo(e) {
|
|
1923
1933
|
return {
|
|
1924
1934
|
caseUniqueId: e.case_unique_id,
|
|
1925
1935
|
caseId: e.case_id,
|
|
@@ -1930,7 +1940,7 @@ function Qo(e) {
|
|
|
1930
1940
|
description: e.description ?? void 0
|
|
1931
1941
|
};
|
|
1932
1942
|
}
|
|
1933
|
-
function
|
|
1943
|
+
function Zo(e, t, n) {
|
|
1934
1944
|
var o, i, s;
|
|
1935
1945
|
const r = new URLSearchParams();
|
|
1936
1946
|
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());
|
|
@@ -1938,24 +1948,24 @@ function Xo(e, t, n) {
|
|
|
1938
1948
|
a && r.append("flow_unique_ids", a);
|
|
1939
1949
|
return r;
|
|
1940
1950
|
}
|
|
1941
|
-
function
|
|
1951
|
+
function ei(e = {}) {
|
|
1942
1952
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
|
|
1943
1953
|
return async ({ filter: i, page: s }) => {
|
|
1944
|
-
if (!
|
|
1954
|
+
if (!Qo(i))
|
|
1945
1955
|
return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
|
|
1946
|
-
const a = await Tt(e), l =
|
|
1956
|
+
const a = await Tt(e), l = Zo(i, s, o), u = await r(`${t}${n}?${l.toString()}`, {
|
|
1947
1957
|
method: "GET",
|
|
1948
1958
|
headers: a
|
|
1949
1959
|
}), m = await bt(u);
|
|
1950
1960
|
return {
|
|
1951
|
-
list: (m.list ?? []).map(
|
|
1961
|
+
list: (m.list ?? []).map(Xo),
|
|
1952
1962
|
total: m.total ?? 0,
|
|
1953
1963
|
page: m.page ?? s,
|
|
1954
1964
|
pageSize: m.page_size ?? i.pageSize ?? 20
|
|
1955
1965
|
};
|
|
1956
1966
|
};
|
|
1957
1967
|
}
|
|
1958
|
-
function
|
|
1968
|
+
function cs(e = {}) {
|
|
1959
1969
|
var r, o, i, s, a;
|
|
1960
1970
|
const t = {
|
|
1961
1971
|
baseUrl: e.baseUrl,
|
|
@@ -1964,16 +1974,16 @@ function ls(e = {}) {
|
|
|
1964
1974
|
authStorage: e.authStorage
|
|
1965
1975
|
};
|
|
1966
1976
|
return {
|
|
1967
|
-
fetchDetail:
|
|
1977
|
+
fetchDetail: $o({
|
|
1968
1978
|
...t,
|
|
1969
1979
|
detailPath: (r = e.form) == null ? void 0 : r.detailPath
|
|
1970
1980
|
}).fetchDetail,
|
|
1971
|
-
resumeSearch:
|
|
1981
|
+
resumeSearch: Yo({
|
|
1972
1982
|
...t,
|
|
1973
1983
|
searchPath: (o = e.resume) == null ? void 0 : o.searchPath,
|
|
1974
1984
|
published: (i = e.resume) == null ? void 0 : i.published
|
|
1975
1985
|
}),
|
|
1976
|
-
caseSearch:
|
|
1986
|
+
caseSearch: ei({
|
|
1977
1987
|
...t,
|
|
1978
1988
|
listPath: (s = e.case) == null ? void 0 : s.listPath,
|
|
1979
1989
|
published: (a = e.case) == null ? void 0 : a.published
|
|
@@ -1991,7 +2001,7 @@ function _n(e, t) {
|
|
|
1991
2001
|
function Tn(e) {
|
|
1992
2002
|
return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
|
|
1993
2003
|
}
|
|
1994
|
-
function
|
|
2004
|
+
function ti(e, t) {
|
|
1995
2005
|
switch (e.type) {
|
|
1996
2006
|
case "multiselect":
|
|
1997
2007
|
case "checkbox":
|
|
@@ -2010,13 +2020,13 @@ function ei(e, t) {
|
|
|
2010
2020
|
function rt(e, t) {
|
|
2011
2021
|
return e.required === !0 || t > 0;
|
|
2012
2022
|
}
|
|
2013
|
-
function
|
|
2023
|
+
function ni(e, t) {
|
|
2014
2024
|
var n, r;
|
|
2015
2025
|
for (const o of e) {
|
|
2016
2026
|
const i = (n = o.name) == null ? void 0 : n.trim();
|
|
2017
2027
|
if (!i || ze(o.type) || Ee(o.type)) continue;
|
|
2018
2028
|
const s = t[i], a = ((r = o.label) == null ? void 0 : r.trim()) || i;
|
|
2019
|
-
if (o.required &&
|
|
2029
|
+
if (o.required && ti(o, s))
|
|
2020
2030
|
return { fieldName: i, label: a, message: `请填写「${a}」` };
|
|
2021
2031
|
if (o.type === "email" && !Tn(s)) {
|
|
2022
2032
|
const l = String(s).trim();
|
|
@@ -2053,7 +2063,7 @@ function ti(e, t) {
|
|
|
2053
2063
|
}
|
|
2054
2064
|
return null;
|
|
2055
2065
|
}
|
|
2056
|
-
const
|
|
2066
|
+
const ri = {
|
|
2057
2067
|
video: Wn,
|
|
2058
2068
|
audio: Jn,
|
|
2059
2069
|
image: Gn,
|
|
@@ -2061,12 +2071,12 @@ const ni = {
|
|
|
2061
2071
|
spreadsheet: Kn,
|
|
2062
2072
|
document: Wt
|
|
2063
2073
|
};
|
|
2064
|
-
function
|
|
2074
|
+
function oi({
|
|
2065
2075
|
type: e,
|
|
2066
2076
|
size: t = 40,
|
|
2067
2077
|
className: n
|
|
2068
2078
|
}) {
|
|
2069
|
-
const r =
|
|
2079
|
+
const r = ri[e] ?? Yt;
|
|
2070
2080
|
return /* @__PURE__ */ c(
|
|
2071
2081
|
r,
|
|
2072
2082
|
{
|
|
@@ -2076,7 +2086,7 @@ function ri({
|
|
|
2076
2086
|
}
|
|
2077
2087
|
);
|
|
2078
2088
|
}
|
|
2079
|
-
const xn = "skopon-form-v0_9",
|
|
2089
|
+
const xn = "skopon-form-v0_9", ii = /* @__PURE__ */ new Set([
|
|
2080
2090
|
"SkoponMedia",
|
|
2081
2091
|
"SkoponSelect",
|
|
2082
2092
|
"Image",
|
|
@@ -2088,8 +2098,8 @@ const xn = "skopon-form-v0_9", oi = /* @__PURE__ */ new Set([
|
|
|
2088
2098
|
"FileUpload",
|
|
2089
2099
|
"TextField",
|
|
2090
2100
|
"Text",
|
|
2091
|
-
...
|
|
2092
|
-
]),
|
|
2101
|
+
...co()
|
|
2102
|
+
]), si = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
|
|
2093
2103
|
function Ce(e) {
|
|
2094
2104
|
const t = [...Fe.components.values()].find((n) => n.name === e);
|
|
2095
2105
|
if (!t) throw new Error(`Missing basic catalog component: ${e}`);
|
|
@@ -2155,7 +2165,7 @@ function Ve(e, t) {
|
|
|
2155
2165
|
placeholder: E(e.placeholder)
|
|
2156
2166
|
};
|
|
2157
2167
|
}
|
|
2158
|
-
const
|
|
2168
|
+
const ai = {
|
|
2159
2169
|
name: "SkoponMedia",
|
|
2160
2170
|
schema: h.object({
|
|
2161
2171
|
mediaType: h.any().optional(),
|
|
@@ -2165,19 +2175,19 @@ const si = {
|
|
|
2165
2175
|
help: h.any().optional(),
|
|
2166
2176
|
placeholder: h.any().optional()
|
|
2167
2177
|
}).passthrough()
|
|
2168
|
-
},
|
|
2178
|
+
}, li = Q(ai, ({ context: e }) => {
|
|
2169
2179
|
const t = e.componentModel.properties, n = E(t.mediaType);
|
|
2170
2180
|
return /* @__PURE__ */ c(Le, { ...Ve(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
|
|
2171
|
-
}),
|
|
2181
|
+
}), ci = Q(
|
|
2172
2182
|
{ name: "Image", schema: Ce("Image") },
|
|
2173
2183
|
({ context: e }) => /* @__PURE__ */ c(Le, { ...Ve(e.componentModel.properties, "image") })
|
|
2174
|
-
),
|
|
2184
|
+
), ui = Q(
|
|
2175
2185
|
{ name: "Video", schema: Ce("Video") },
|
|
2176
2186
|
({ context: e }) => /* @__PURE__ */ c(Le, { ...Ve(e.componentModel.properties, "video") })
|
|
2177
|
-
),
|
|
2187
|
+
), mi = Q(
|
|
2178
2188
|
{ name: "AudioPlayer", schema: Ce("AudioPlayer") },
|
|
2179
2189
|
({ context: e }) => /* @__PURE__ */ c(Le, { ...Ve(e.componentModel.properties, "audio") })
|
|
2180
|
-
),
|
|
2190
|
+
), di = {
|
|
2181
2191
|
name: "SkoponSelect",
|
|
2182
2192
|
schema: h.object({
|
|
2183
2193
|
label: h.any().optional(),
|
|
@@ -2187,7 +2197,7 @@ const si = {
|
|
|
2187
2197
|
value: h.any().optional()
|
|
2188
2198
|
}).passthrough()
|
|
2189
2199
|
};
|
|
2190
|
-
function
|
|
2200
|
+
function pi({ context: e }) {
|
|
2191
2201
|
const { interactive: t } = ie(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = se(e, "value", {
|
|
2192
2202
|
component: "SkoponSelect",
|
|
2193
2203
|
changeAction: "select"
|
|
@@ -2213,11 +2223,11 @@ function di({ context: e }) {
|
|
|
2213
2223
|
)
|
|
2214
2224
|
] });
|
|
2215
2225
|
}
|
|
2216
|
-
const
|
|
2217
|
-
|
|
2218
|
-
|
|
2226
|
+
const fi = Q(
|
|
2227
|
+
di,
|
|
2228
|
+
pi
|
|
2219
2229
|
);
|
|
2220
|
-
function
|
|
2230
|
+
function hi({ context: e }) {
|
|
2221
2231
|
const { interactive: t } = ie(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = se(e, "value", {
|
|
2222
2232
|
component: "ChoicePicker",
|
|
2223
2233
|
changeAction: "select"
|
|
@@ -2273,7 +2283,7 @@ function fi({ context: e }) {
|
|
|
2273
2283
|
)
|
|
2274
2284
|
] });
|
|
2275
2285
|
}
|
|
2276
|
-
const
|
|
2286
|
+
const gi = Q(
|
|
2277
2287
|
{
|
|
2278
2288
|
name: "ChoicePicker",
|
|
2279
2289
|
schema: h.object({
|
|
@@ -2285,9 +2295,9 @@ const hi = Q(
|
|
|
2285
2295
|
placeholder: h.any().optional()
|
|
2286
2296
|
}).passthrough()
|
|
2287
2297
|
},
|
|
2288
|
-
|
|
2298
|
+
hi
|
|
2289
2299
|
);
|
|
2290
|
-
function
|
|
2300
|
+
function yi({ context: e }) {
|
|
2291
2301
|
const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o } = se(e, "value", {
|
|
2292
2302
|
component: "CheckBox",
|
|
2293
2303
|
changeAction: "change"
|
|
@@ -2305,11 +2315,11 @@ function gi({ context: e }) {
|
|
|
2305
2315
|
)
|
|
2306
2316
|
] });
|
|
2307
2317
|
}
|
|
2308
|
-
const
|
|
2318
|
+
const vi = Q(
|
|
2309
2319
|
{ name: "CheckBox", schema: Ce("CheckBox") },
|
|
2310
|
-
|
|
2320
|
+
yi
|
|
2311
2321
|
);
|
|
2312
|
-
function
|
|
2322
|
+
function Si(e, t, n) {
|
|
2313
2323
|
const r = fe(e);
|
|
2314
2324
|
if (!r) return;
|
|
2315
2325
|
if (!t && n) {
|
|
@@ -2319,11 +2329,11 @@ function vi(e, t, n) {
|
|
|
2319
2329
|
const o = Vt(r);
|
|
2320
2330
|
return o.isValid() ? o : void 0;
|
|
2321
2331
|
}
|
|
2322
|
-
function
|
|
2332
|
+
function bi({ context: e }) {
|
|
2323
2333
|
const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o, reportFocus: i } = se(e, "value", {
|
|
2324
2334
|
component: "DateTimeInput",
|
|
2325
2335
|
changeAction: "change"
|
|
2326
|
-
}), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), u = s.enableDate === !0, m = s.enableTime === !0, d =
|
|
2336
|
+
}), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), u = s.enableDate === !0, m = s.enableTime === !0, d = Si(n, u, m), S = (g) => {
|
|
2327
2337
|
if (!g) {
|
|
2328
2338
|
r("");
|
|
2329
2339
|
return;
|
|
@@ -2366,7 +2376,7 @@ function Si({ context: e }) {
|
|
|
2366
2376
|
)
|
|
2367
2377
|
] });
|
|
2368
2378
|
}
|
|
2369
|
-
const
|
|
2379
|
+
const ki = Q(
|
|
2370
2380
|
{
|
|
2371
2381
|
name: "DateTimeInput",
|
|
2372
2382
|
schema: h.object({
|
|
@@ -2379,8 +2389,8 @@ const bi = Q(
|
|
|
2379
2389
|
max: h.any().optional()
|
|
2380
2390
|
}).passthrough()
|
|
2381
2391
|
},
|
|
2382
|
-
|
|
2383
|
-
),
|
|
2392
|
+
bi
|
|
2393
|
+
), Ci = {
|
|
2384
2394
|
name: "FileUpload",
|
|
2385
2395
|
schema: h.object({
|
|
2386
2396
|
label: h.any().optional(),
|
|
@@ -2392,7 +2402,7 @@ const bi = Q(
|
|
|
2392
2402
|
value: h.any().optional()
|
|
2393
2403
|
}).passthrough()
|
|
2394
2404
|
};
|
|
2395
|
-
function
|
|
2405
|
+
function Ai({ context: e }) {
|
|
2396
2406
|
const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o } = se(e, "value", {
|
|
2397
2407
|
component: "FileUpload",
|
|
2398
2408
|
changeAction: "change"
|
|
@@ -2426,7 +2436,7 @@ function Ci({ context: e }) {
|
|
|
2426
2436
|
r(_);
|
|
2427
2437
|
},
|
|
2428
2438
|
children: [
|
|
2429
|
-
/* @__PURE__ */ c("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ c(
|
|
2439
|
+
/* @__PURE__ */ c("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ c(oi, { type: d, size: 40 }) }),
|
|
2430
2440
|
/* @__PURE__ */ c("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
|
|
2431
2441
|
]
|
|
2432
2442
|
}
|
|
@@ -2441,11 +2451,11 @@ function Ci({ context: e }) {
|
|
|
2441
2451
|
] })
|
|
2442
2452
|
] });
|
|
2443
2453
|
}
|
|
2444
|
-
const
|
|
2445
|
-
|
|
2446
|
-
|
|
2454
|
+
const _i = Q(
|
|
2455
|
+
Ci,
|
|
2456
|
+
Ai
|
|
2447
2457
|
);
|
|
2448
|
-
function
|
|
2458
|
+
function Ti({ context: e }) {
|
|
2449
2459
|
const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o, reportFocus: i } = se(e, "value", {
|
|
2450
2460
|
component: "TextField",
|
|
2451
2461
|
changeAction: "change",
|
|
@@ -2526,7 +2536,7 @@ function _i({ context: e }) {
|
|
|
2526
2536
|
g ? /* @__PURE__ */ c(te.Text, { type: "danger", className: "form-block-preview-help", children: g }) : null
|
|
2527
2537
|
] });
|
|
2528
2538
|
}
|
|
2529
|
-
const
|
|
2539
|
+
const xi = Q(
|
|
2530
2540
|
{
|
|
2531
2541
|
name: "TextField",
|
|
2532
2542
|
schema: h.object({
|
|
@@ -2537,33 +2547,33 @@ const Ti = Q(
|
|
|
2537
2547
|
value: h.any().optional()
|
|
2538
2548
|
}).passthrough()
|
|
2539
2549
|
},
|
|
2540
|
-
|
|
2550
|
+
Ti
|
|
2541
2551
|
);
|
|
2542
|
-
function
|
|
2552
|
+
function Ni({ context: e }) {
|
|
2543
2553
|
const t = e.componentModel.properties, n = E(t.text), r = E(t.variant) || "body";
|
|
2544
|
-
return
|
|
2554
|
+
return si.has(r) ? r === "caption" ? /* @__PURE__ */ c(te.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ c("em", { children: n }) }) : /* @__PURE__ */ c(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ c(te.Paragraph, { className: "form-block-preview-paragraph", children: n });
|
|
2545
2555
|
}
|
|
2546
|
-
const
|
|
2556
|
+
const Ii = Q(
|
|
2547
2557
|
{ name: "Text", schema: Ce("Text") },
|
|
2548
|
-
|
|
2558
|
+
Ni
|
|
2549
2559
|
);
|
|
2550
2560
|
function In() {
|
|
2551
2561
|
const t = [
|
|
2552
2562
|
...[...Fe.components.values()].filter(
|
|
2553
|
-
(r) => !
|
|
2563
|
+
(r) => !ii.has(r.name)
|
|
2554
2564
|
),
|
|
2555
|
-
ai,
|
|
2556
|
-
pi,
|
|
2557
2565
|
li,
|
|
2566
|
+
fi,
|
|
2558
2567
|
ci,
|
|
2559
2568
|
ui,
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2569
|
+
mi,
|
|
2570
|
+
gi,
|
|
2571
|
+
vi,
|
|
2572
|
+
ki,
|
|
2573
|
+
_i,
|
|
2574
|
+
xi,
|
|
2575
|
+
Ii,
|
|
2576
|
+
...lo()
|
|
2567
2577
|
], n = [...Fe.functions.values()];
|
|
2568
2578
|
return new Yn(xn, t, n, Fe.themeSchema);
|
|
2569
2579
|
}
|
|
@@ -2579,7 +2589,7 @@ const oe = {
|
|
|
2579
2589
|
primaryHover: "#26997b",
|
|
2580
2590
|
primaryActive: "#1d3b31",
|
|
2581
2591
|
onPrimary: "#ffffff"
|
|
2582
|
-
},
|
|
2592
|
+
}, Mi = {
|
|
2583
2593
|
cssVar: { key: "vidtempl" },
|
|
2584
2594
|
token: {
|
|
2585
2595
|
colorPrimary: oe.primarySolid,
|
|
@@ -2669,9 +2679,9 @@ function he({
|
|
|
2669
2679
|
locale: t,
|
|
2670
2680
|
theme: n
|
|
2671
2681
|
}) {
|
|
2672
|
-
return /* @__PURE__ */ c($n, { theme: n ??
|
|
2682
|
+
return /* @__PURE__ */ c($n, { theme: n ?? Mi, locale: t, children: e });
|
|
2673
2683
|
}
|
|
2674
|
-
const
|
|
2684
|
+
const Fi = wn(
|
|
2675
2685
|
function({
|
|
2676
2686
|
doc: t,
|
|
2677
2687
|
surfaceId: n = "skopon-form",
|
|
@@ -2698,7 +2708,7 @@ const Mi = wn(
|
|
|
2698
2708
|
if (!S)
|
|
2699
2709
|
return { surfaces: [], processor: null };
|
|
2700
2710
|
try {
|
|
2701
|
-
const f = JSON.parse(S), p = new Xt([In()]), v =
|
|
2711
|
+
const f = JSON.parse(S), p = new Xt([In()]), v = bo(f, {
|
|
2702
2712
|
surfaceId: n,
|
|
2703
2713
|
catalogId: xn
|
|
2704
2714
|
});
|
|
@@ -2717,7 +2727,7 @@ const Mi = wn(
|
|
|
2717
2727
|
const p = m.current;
|
|
2718
2728
|
if (!p) return {};
|
|
2719
2729
|
const v = (f ?? d.current).map((x) => x.trim()).filter(Boolean);
|
|
2720
|
-
return
|
|
2730
|
+
return _o(p, n, v);
|
|
2721
2731
|
},
|
|
2722
2732
|
setValues(f) {
|
|
2723
2733
|
const p = m.current;
|
|
@@ -2742,7 +2752,7 @@ const Mi = wn(
|
|
|
2742
2752
|
function Me() {
|
|
2743
2753
|
return new Xt([In()]);
|
|
2744
2754
|
}
|
|
2745
|
-
function
|
|
2755
|
+
function us({
|
|
2746
2756
|
messages: e,
|
|
2747
2757
|
surfaceId: t = "skopon-form-stream",
|
|
2748
2758
|
emptyHint: n = null,
|
|
@@ -2821,13 +2831,13 @@ function cs({
|
|
|
2821
2831
|
});
|
|
2822
2832
|
}, [e, t]), y.length === 0 ? /* @__PURE__ */ c(he, { children: n }) : /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(at, { resumeSearch: o, children: /* @__PURE__ */ c(st, { caseSearch: i, children: /* @__PURE__ */ c(it, { interactive: r, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: y.map((f) => /* @__PURE__ */ c(Qt, { surface: f }, f.id)) }) }) }) }) });
|
|
2823
2833
|
}
|
|
2824
|
-
const
|
|
2825
|
-
function
|
|
2834
|
+
const Ei = 100, Ri = 3e4, Ui = 1500, ce = /* @__PURE__ */ new Map();
|
|
2835
|
+
function wi(e) {
|
|
2826
2836
|
const t = e.trim();
|
|
2827
2837
|
let n = ce.get(t);
|
|
2828
|
-
return n || (n = new
|
|
2838
|
+
return n || (n = new Pi(t), ce.set(t, n)), n.acquire(), n;
|
|
2829
2839
|
}
|
|
2830
|
-
class
|
|
2840
|
+
class Pi {
|
|
2831
2841
|
constructor(t) {
|
|
2832
2842
|
G(this, "url");
|
|
2833
2843
|
G(this, "ws", null);
|
|
@@ -2846,7 +2856,7 @@ class wi {
|
|
|
2846
2856
|
release() {
|
|
2847
2857
|
this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
|
|
2848
2858
|
this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), ce.get(this.url) === this && ce.delete(this.url));
|
|
2849
|
-
},
|
|
2859
|
+
}, Ui));
|
|
2850
2860
|
}
|
|
2851
2861
|
/** 强制关闭(测试用),跳过宽限期。 */
|
|
2852
2862
|
forceClose() {
|
|
@@ -2919,7 +2929,7 @@ class wi {
|
|
|
2919
2929
|
}
|
|
2920
2930
|
}
|
|
2921
2931
|
enqueue(t) {
|
|
2922
|
-
for (this.sendQueue.push(t); this.sendQueue.length >
|
|
2932
|
+
for (this.sendQueue.push(t); this.sendQueue.length > Ei; )
|
|
2923
2933
|
this.sendQueue.shift();
|
|
2924
2934
|
}
|
|
2925
2935
|
flushQueue() {
|
|
@@ -2933,7 +2943,7 @@ class wi {
|
|
|
2933
2943
|
if (!this.connectRequested || this.refCount <= 0) return;
|
|
2934
2944
|
this.clearReconnectTimer();
|
|
2935
2945
|
const t = Math.min(
|
|
2936
|
-
|
|
2946
|
+
Ri,
|
|
2937
2947
|
1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
|
|
2938
2948
|
);
|
|
2939
2949
|
this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
|
|
@@ -2971,13 +2981,13 @@ class wi {
|
|
|
2971
2981
|
}
|
|
2972
2982
|
}
|
|
2973
2983
|
}
|
|
2974
|
-
class
|
|
2984
|
+
class zi {
|
|
2975
2985
|
constructor(t) {
|
|
2976
2986
|
G(this, "askUserMessageId");
|
|
2977
2987
|
G(this, "connection");
|
|
2978
2988
|
G(this, "unsubscribe");
|
|
2979
2989
|
G(this, "closed", !1);
|
|
2980
|
-
this.askUserMessageId = t.askUserMessageId.trim(), this.connection =
|
|
2990
|
+
this.askUserMessageId = t.askUserMessageId.trim(), this.connection = wi(t.url);
|
|
2981
2991
|
const n = t.onAutoControl;
|
|
2982
2992
|
this.unsubscribe = n ? this.connection.subscribe(this.askUserMessageId, n) : () => {
|
|
2983
2993
|
};
|
|
@@ -2995,21 +3005,21 @@ class Pi {
|
|
|
2995
3005
|
function Mn(e) {
|
|
2996
3006
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
2997
3007
|
}
|
|
2998
|
-
function
|
|
3008
|
+
function Oi(e, t) {
|
|
2999
3009
|
if (!e) return !1;
|
|
3000
3010
|
const n = e.querySelector(`[data-skopon-field="${Mn(t)}"]`);
|
|
3001
3011
|
return n instanceof HTMLElement ? ((n.querySelector(
|
|
3002
3012
|
'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
|
|
3003
3013
|
) ?? n).focus(), !0) : !1;
|
|
3004
3014
|
}
|
|
3005
|
-
function
|
|
3015
|
+
function qi(e, t) {
|
|
3006
3016
|
if (!e) return !1;
|
|
3007
3017
|
const n = e.querySelector(`[data-skopon-field="${Mn(t)}"]`);
|
|
3008
3018
|
return n instanceof HTMLElement ? ((n.querySelector(
|
|
3009
3019
|
'button, [role="button"], .skopon-resume-select-card, input, label'
|
|
3010
3020
|
) ?? n).click(), !0) : !1;
|
|
3011
3021
|
}
|
|
3012
|
-
function
|
|
3022
|
+
function Bi(e, t, n) {
|
|
3013
3023
|
const r = e.action;
|
|
3014
3024
|
if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
|
|
3015
3025
|
console.warn("[FormAutoControl] unknown action", r);
|
|
@@ -3039,47 +3049,47 @@ function qi(e, t, n) {
|
|
|
3039
3049
|
return;
|
|
3040
3050
|
}
|
|
3041
3051
|
if (r === "focus") {
|
|
3042
|
-
|
|
3052
|
+
Oi(t.rootElement, o), n.reportEvent({
|
|
3043
3053
|
action: "focus",
|
|
3044
3054
|
component: i,
|
|
3045
3055
|
field: o
|
|
3046
3056
|
});
|
|
3047
3057
|
return;
|
|
3048
3058
|
}
|
|
3049
|
-
|
|
3059
|
+
qi(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
|
|
3050
3060
|
});
|
|
3051
3061
|
}
|
|
3052
|
-
function
|
|
3062
|
+
function Li(e) {
|
|
3053
3063
|
const t = {};
|
|
3054
3064
|
for (const [n, r] of Object.entries(e))
|
|
3055
3065
|
r !== void 0 && (t[n] = r);
|
|
3056
3066
|
return t;
|
|
3057
3067
|
}
|
|
3058
|
-
function
|
|
3068
|
+
function Vi(e, t) {
|
|
3059
3069
|
var o;
|
|
3060
3070
|
const n = (o = e.name) == null ? void 0 : o.trim();
|
|
3061
3071
|
if (!n || !t) return { ...e };
|
|
3062
3072
|
const r = t.get(n);
|
|
3063
3073
|
return r ? e.type !== "resume_multiselect" && e.type !== "case_multiselect" ? { ...e } : { ...e, options: r.map((i) => ({ ...i })) } : { ...e };
|
|
3064
3074
|
}
|
|
3065
|
-
function
|
|
3075
|
+
function ji(e) {
|
|
3066
3076
|
var i, s;
|
|
3067
3077
|
const n = {
|
|
3068
3078
|
blocks: (e.blocks ?? []).map(
|
|
3069
|
-
(a) =>
|
|
3079
|
+
(a) => Vi(a, e.liveOptions)
|
|
3070
3080
|
)
|
|
3071
3081
|
}, r = (i = e.title) == null ? void 0 : i.trim(), o = (s = e.description) == null ? void 0 : s.trim();
|
|
3072
3082
|
return r && (n.title = r), o && (n.description = o), {
|
|
3073
3083
|
form_schema: n,
|
|
3074
|
-
form_values:
|
|
3084
|
+
form_values: Li(e.values ?? {}),
|
|
3075
3085
|
form_change: [...e.formChange ?? []]
|
|
3076
3086
|
};
|
|
3077
3087
|
}
|
|
3078
|
-
function
|
|
3088
|
+
function $i(e) {
|
|
3079
3089
|
const t = Be(e);
|
|
3080
3090
|
return t ? vt(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
3081
3091
|
}
|
|
3082
|
-
function
|
|
3092
|
+
function Di({
|
|
3083
3093
|
payload: e,
|
|
3084
3094
|
callbackUrl: t,
|
|
3085
3095
|
title: n,
|
|
@@ -3110,7 +3120,7 @@ function $i({
|
|
|
3110
3120
|
if (!l) {
|
|
3111
3121
|
u(!0);
|
|
3112
3122
|
try {
|
|
3113
|
-
const y =
|
|
3123
|
+
const y = $i(e), k = xt({
|
|
3114
3124
|
context: g,
|
|
3115
3125
|
payload: e,
|
|
3116
3126
|
answer: y
|
|
@@ -3151,8 +3161,8 @@ function $i({
|
|
|
3151
3161
|
/* @__PURE__ */ c("pre", { className: "skopon-form-curl-json", children: S })
|
|
3152
3162
|
] });
|
|
3153
3163
|
}
|
|
3154
|
-
const
|
|
3155
|
-
function
|
|
3164
|
+
const Hi = 80;
|
|
3165
|
+
function Ki(e, t) {
|
|
3156
3166
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
3157
3167
|
const n = t.message;
|
|
3158
3168
|
if (typeof n == "string" && n.trim())
|
|
@@ -3160,7 +3170,7 @@ function Hi(e, t) {
|
|
|
3160
3170
|
}
|
|
3161
3171
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
3162
3172
|
}
|
|
3163
|
-
function
|
|
3173
|
+
function Gi({
|
|
3164
3174
|
payload: e,
|
|
3165
3175
|
formUniqueId: t,
|
|
3166
3176
|
askUserMessageId: n,
|
|
@@ -3208,13 +3218,13 @@ function Ki({
|
|
|
3208
3218
|
R = !0;
|
|
3209
3219
|
});
|
|
3210
3220
|
}, [D, a]);
|
|
3211
|
-
const F = j(() => Be(e), [e]), L = j(() => F ?
|
|
3221
|
+
const F = j(() => Be(e), [e]), L = j(() => F ? Mo(F, g ?? void 0) : null, [F, g]), T = (L == null ? void 0 : L.matchedBlocks) ?? [], V = !!(F && Eo(F) && T.length === 0), P = j(() => V && F ? Ro(F) : L && L.renderBlocks.length > 0 ? L.renderBlocks : [], [L, V, F]), M = j(
|
|
3212
3222
|
() => V ? {} : vt((L == null ? void 0 : L.extraBlocks) ?? []),
|
|
3213
3223
|
[V, L]
|
|
3214
|
-
), W = j(() => V && F ?
|
|
3224
|
+
), W = j(() => V && F ? Uo(F) : P.filter((R) => {
|
|
3215
3225
|
var q;
|
|
3216
3226
|
return (q = R.name) == null ? void 0 : q.trim();
|
|
3217
|
-
}).map((R) => R.name.trim()), [V, F, P]), Ae = (L == null ? void 0 : L.title) ?? (F == null ? void 0 : F.title) ?? "", _e = (L == null ? void 0 : L.description) ?? (F == null ? void 0 : F.description) ?? "", le = j(() => P.length === 0 ? null :
|
|
3227
|
+
}).map((R) => R.name.trim()), [V, F, P]), Ae = (L == null ? void 0 : L.title) ?? (F == null ? void 0 : F.title) ?? "", _e = (L == null ? void 0 : L.description) ?? (F == null ? void 0 : F.description) ?? "", le = j(() => P.length === 0 ? null : Co(
|
|
3218
3228
|
{ title: Ae, description: _e },
|
|
3219
3229
|
P
|
|
3220
3230
|
), [Ae, _e, P]), je = j(() => {
|
|
@@ -3235,7 +3245,7 @@ function Ki({
|
|
|
3235
3245
|
De.current = B.pendingChangeFields;
|
|
3236
3246
|
const ue = $(
|
|
3237
3247
|
(R) => {
|
|
3238
|
-
const q =
|
|
3248
|
+
const q = ji({
|
|
3239
3249
|
title: Ae,
|
|
3240
3250
|
description: _e,
|
|
3241
3251
|
blocks: P,
|
|
@@ -3265,7 +3275,7 @@ function Ki({
|
|
|
3265
3275
|
if (K.current = null, !w.current) return;
|
|
3266
3276
|
const R = [...De.current];
|
|
3267
3277
|
B.clearPendingChangeFields(), R.length !== 0 && He.current(R);
|
|
3268
|
-
},
|
|
3278
|
+
}, Hi), () => {
|
|
3269
3279
|
K.current != null && (clearTimeout(K.current), K.current = null);
|
|
3270
3280
|
};
|
|
3271
3281
|
}, [re, B.version, B.clearPendingChangeFields]);
|
|
@@ -3274,7 +3284,7 @@ function Ki({
|
|
|
3274
3284
|
if (!v) {
|
|
3275
3285
|
x(!0);
|
|
3276
3286
|
try {
|
|
3277
|
-
const me = ((R = I.current) == null ? void 0 : R.getValues(W)) ?? {}, xe =
|
|
3287
|
+
const me = ((R = I.current) == null ? void 0 : R.getValues(W)) ?? {}, xe = ni(P, me);
|
|
3278
3288
|
if (xe) {
|
|
3279
3289
|
(q = C.current) == null || q.call(C, "error", xe.message);
|
|
3280
3290
|
return;
|
|
@@ -3294,7 +3304,7 @@ function Ki({
|
|
|
3294
3304
|
headers: Z
|
|
3295
3305
|
});
|
|
3296
3306
|
if (!w.current) return;
|
|
3297
|
-
Ge.ok ? (Te = C.current) == null || Te.call(C, "success", "提交成功") : (Rt = C.current) == null || Rt.call(C, "error",
|
|
3307
|
+
Ge.ok ? (Te = C.current) == null || Te.call(C, "success", "提交成功") : (Rt = C.current) == null || Rt.call(C, "error", Ki(Ge.status, Ge.body));
|
|
3298
3308
|
return;
|
|
3299
3309
|
}
|
|
3300
3310
|
const Ot = xt({
|
|
@@ -3343,7 +3353,7 @@ function Ki({
|
|
|
3343
3353
|
Ft.current = Ke;
|
|
3344
3354
|
const Et = $(
|
|
3345
3355
|
(R) => {
|
|
3346
|
-
|
|
3356
|
+
Bi(
|
|
3347
3357
|
R,
|
|
3348
3358
|
{
|
|
3349
3359
|
setValues: (q) => {
|
|
@@ -3372,7 +3382,7 @@ function Ki({
|
|
|
3372
3382
|
}
|
|
3373
3383
|
return S(Et), () => S(null);
|
|
3374
3384
|
}, [re, Et, S]), f ? /* @__PURE__ */ c("div", { className: "ask-user-form-card", children: /* @__PURE__ */ c(mt, { size: "small" }) }) : !F || P.length === 0 ? /* @__PURE__ */ c(
|
|
3375
|
-
|
|
3385
|
+
Di,
|
|
3376
3386
|
{
|
|
3377
3387
|
payload: e,
|
|
3378
3388
|
callbackUrl: r,
|
|
@@ -3390,7 +3400,7 @@ function Ki({
|
|
|
3390
3400
|
children: [
|
|
3391
3401
|
y && D ? /* @__PURE__ */ c("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ c(de, { title: D, children: /* @__PURE__ */ c(pe, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
|
|
3392
3402
|
/* @__PURE__ */ c(
|
|
3393
|
-
|
|
3403
|
+
Fi,
|
|
3394
3404
|
{
|
|
3395
3405
|
ref: I,
|
|
3396
3406
|
doc: le,
|
|
@@ -3423,16 +3433,16 @@ function Ki({
|
|
|
3423
3433
|
}
|
|
3424
3434
|
);
|
|
3425
3435
|
}
|
|
3426
|
-
function
|
|
3436
|
+
function ms(e) {
|
|
3427
3437
|
var u;
|
|
3428
|
-
const t = ((u = e.askUserMessageId) == null ? void 0 : u.trim()) ?? "", n = j(() =>
|
|
3438
|
+
const t = ((u = e.askUserMessageId) == null ? void 0 : u.trim()) ?? "", n = j(() => jo(), []), [r, o] = U(!1), i = A(null), s = $((m) => {
|
|
3429
3439
|
o(m);
|
|
3430
3440
|
}, []), a = $(
|
|
3431
3441
|
(m) => {
|
|
3432
3442
|
i.current = m;
|
|
3433
3443
|
},
|
|
3434
3444
|
[]
|
|
3435
|
-
), l = j(() => !n || !t ? null : new
|
|
3445
|
+
), l = j(() => !n || !t ? null : new zi({
|
|
3436
3446
|
url: n,
|
|
3437
3447
|
askUserMessageId: t,
|
|
3438
3448
|
onAutoControl: (m) => {
|
|
@@ -3447,8 +3457,8 @@ function us(e) {
|
|
|
3447
3457
|
};
|
|
3448
3458
|
}, [l]), z(() => {
|
|
3449
3459
|
!l || !r || l.connect();
|
|
3450
|
-
}, [l, r]), /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(
|
|
3451
|
-
|
|
3460
|
+
}, [l, r]), /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(Pr, { client: l, children: /* @__PURE__ */ c(Er, { children: /* @__PURE__ */ c(
|
|
3461
|
+
Gi,
|
|
3452
3462
|
{
|
|
3453
3463
|
...e,
|
|
3454
3464
|
onSurfaceReadyChange: s,
|
|
@@ -3457,61 +3467,61 @@ function us(e) {
|
|
|
3457
3467
|
) }) }) });
|
|
3458
3468
|
}
|
|
3459
3469
|
export {
|
|
3460
|
-
|
|
3461
|
-
|
|
3470
|
+
is as A2UI_PROTOCOL_VERSION,
|
|
3471
|
+
ms as AskUserFormCard,
|
|
3462
3472
|
st as CaseSearchProvider,
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3473
|
+
Di as CurlSubmitBlock,
|
|
3474
|
+
Bo as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
|
|
3475
|
+
Oo as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
|
|
3476
|
+
qo as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
|
|
3467
3477
|
kt as DEFAULT_AUTH_STORAGE_KEY,
|
|
3468
|
-
|
|
3478
|
+
zo as DEFAULT_AUTH_TOKEN_FIELD,
|
|
3469
3479
|
Qn as FORM_MEDIA_SIZES,
|
|
3470
3480
|
at as ResumeSearchProvider,
|
|
3471
|
-
|
|
3481
|
+
us as SkoponA2uiStreamRenderer,
|
|
3472
3482
|
he as SkoponFormProvider,
|
|
3473
|
-
|
|
3474
|
-
|
|
3483
|
+
Fi as SkoponFormRenderer,
|
|
3484
|
+
So as a2uiToBlocks,
|
|
3475
3485
|
fn as blocksToA2ui,
|
|
3476
3486
|
xt as buildAnswerAgentBody,
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3487
|
+
wo as buildAskUserCurlBodyJson,
|
|
3488
|
+
Po as buildAskUserCurlStatement,
|
|
3489
|
+
ss as buildAskUserSubmitCurlFromPayload,
|
|
3490
|
+
Co as buildAskUserSurface,
|
|
3481
3491
|
vn as buildCurlStatement,
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3492
|
+
as as copyTextToClipboard,
|
|
3493
|
+
ei as createCaseSearchClient,
|
|
3494
|
+
$o as createFormClient,
|
|
3495
|
+
Yo as createResumeSearchClient,
|
|
3496
|
+
cs as createSkoponSdkClients,
|
|
3487
3497
|
vt as extractExtraBlockValues,
|
|
3488
|
-
|
|
3498
|
+
_o as extractSurfaceValues,
|
|
3489
3499
|
Cn as formatAnswerAgentSubmitMessage,
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3500
|
+
Uo as getPayloadInputFieldNames,
|
|
3501
|
+
Ro as getPayloadRenderableBlocks,
|
|
3502
|
+
Mo as intersectPayloadBlocksWithForm,
|
|
3493
3503
|
ut as isA2uiSurfaceEmpty,
|
|
3494
3504
|
ae as isInputBlockType,
|
|
3495
3505
|
ze as isLayoutBlockType,
|
|
3496
3506
|
Ee as isMediaBlockType,
|
|
3497
|
-
|
|
3507
|
+
Ao as mapFormDefinitionFromDto,
|
|
3498
3508
|
Oe as normalizeFormDefinition,
|
|
3499
3509
|
Be as parsePayloadBlocksJson,
|
|
3500
|
-
|
|
3501
|
-
|
|
3510
|
+
Eo as payloadHasInputBlocks,
|
|
3511
|
+
Vo as resolveAnswerAgentCallbackUrl,
|
|
3502
3512
|
Tt as resolveClientHeaders,
|
|
3503
|
-
|
|
3513
|
+
jo as resolveRealtimeWsUrl,
|
|
3504
3514
|
bn as resolveSkoponAuthHeaders,
|
|
3505
3515
|
_t as resolveSubmitAuthHeaders,
|
|
3506
|
-
|
|
3507
|
-
|
|
3516
|
+
ko as resolveSurfaceFromFormDefinition,
|
|
3517
|
+
Mi as skoponAntdTheme,
|
|
3508
3518
|
oe as skoponBrandColors,
|
|
3509
3519
|
An as submitAnswerAgent,
|
|
3510
3520
|
Sn as submitFormJson,
|
|
3511
|
-
|
|
3521
|
+
bo as surfaceDocToMessages,
|
|
3512
3522
|
Re as syncFormDefinition,
|
|
3513
|
-
|
|
3514
|
-
|
|
3523
|
+
qr as useCaseSearch,
|
|
3524
|
+
Gr as useResumeSearch,
|
|
3515
3525
|
Nt as validateAnswerAgentBody,
|
|
3516
|
-
|
|
3526
|
+
ls as validateAnswerAgentContext
|
|
3517
3527
|
};
|