@skopon-cool/form-sdk 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/a2uiAdapter.d.ts.map +1 -1
- package/dist/catalog/skoponCaseSelect.d.ts.map +1 -1
- package/dist/components/AskUserFormCard.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1019 -974
- package/dist/submit/intersectPayloadBlocksWithForm.d.ts +4 -2
- package/dist/submit/intersectPayloadBlocksWithForm.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapter/a2uiAdapter.test.ts +25 -0
- package/src/adapter/a2uiAdapter.ts +16 -1
- package/src/catalog/skoponCaseSelect.tsx +15 -3
- package/src/components/AskUserFormCard.tsx +38 -15
- package/src/index.ts +1 -0
- package/src/submit/intersectPayloadBlocksWithForm.ts +27 -4
- package/src/submit/submit.test.ts +54 -0
package/dist/index.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import './form-sdk.css';
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
2
|
+
var On = Object.defineProperty;
|
|
3
|
+
var qn = (e, t, n) => t in e ? On(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
+
var G = (e, t, n) => qn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
5
|
import { jsx as u, jsxs as M } from "react/jsx-runtime";
|
|
6
|
-
import { useRef as A, useState as
|
|
7
|
-
import { Spin as
|
|
8
|
-
import { ReloadOutlined as
|
|
9
|
-
import { createBinderlessComponentImplementation as
|
|
6
|
+
import { useRef as A, useState as w, useCallback as j, useMemo as L, createContext as Ce, useContext as Ae, useEffect as q, useSyncExternalStore as Bn, forwardRef as Vn, useImperativeHandle as Ln } from "react";
|
|
7
|
+
import { Spin as ft, Button as Oe, Typography as ne, Avatar as jn, Tag as ve, Select as st, Checkbox as $n, Radio as Dn, Switch as Hn, TimePicker as Kn, DatePicker as Jn, Upload as Ye, Input as Qe, InputNumber as Gn, ConfigProvider as Wn, Tooltip as ye } from "antd";
|
|
8
|
+
import { ReloadOutlined as Yt, FileTextOutlined as Qt, UserOutlined as Yn, FileImageOutlined as Qn, FileExcelOutlined as Xn, FileOutlined as Xt, PictureOutlined as Zn, SoundOutlined as er, VideoCameraOutlined as tr } from "@ant-design/icons";
|
|
9
|
+
import { createBinderlessComponentImplementation as X, basicCatalog as Ue, A2uiSurface as Zt } from "@a2ui/react/v0_9";
|
|
10
10
|
import { z as h } from "zod";
|
|
11
|
-
import { Catalog as
|
|
12
|
-
import { injectBasicCatalogStyles as
|
|
13
|
-
import { injectStyles as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
11
|
+
import { Catalog as nr, MessageProcessor as en } from "@a2ui/web_core/v0_9";
|
|
12
|
+
import { injectBasicCatalogStyles as tn } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
13
|
+
import { injectStyles as nn } from "@a2ui/react/styles";
|
|
14
|
+
import jt from "dayjs";
|
|
15
|
+
const ps = "v0.9", rr = [
|
|
16
16
|
"huge",
|
|
17
17
|
"large",
|
|
18
18
|
"medium",
|
|
19
19
|
"small",
|
|
20
20
|
"icon"
|
|
21
21
|
];
|
|
22
|
-
function
|
|
22
|
+
function pe(e) {
|
|
23
23
|
return e === "image" || e === "video" || e === "audio";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function _e(e) {
|
|
26
26
|
return e === "heading" || e === "paragraph";
|
|
27
27
|
}
|
|
28
28
|
function Z(e) {
|
|
29
|
-
return !
|
|
29
|
+
return !_e(e) && !pe(e);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
31
|
+
function hs(e) {
|
|
32
|
+
return _e(e) || pe(e);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function or(e) {
|
|
35
35
|
return e === "select" || e === "multiselect" || e === "radio" || e === "checkbox";
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function gs(e) {
|
|
38
38
|
return Z(e) && e !== "file" && e !== "resume_multiselect" && e !== "case_multiselect";
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ir() {
|
|
41
41
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
42
42
|
return crypto.randomUUID();
|
|
43
43
|
if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
|
|
@@ -52,10 +52,10 @@ function tr() {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
function le(e) {
|
|
55
|
-
const t =
|
|
55
|
+
const t = ir().replace(/-/g, "").slice(0, 8);
|
|
56
56
|
return `${e}${t}`;
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const rn = [
|
|
59
59
|
{ value: "image/*", label: "图片" },
|
|
60
60
|
{ value: "video/*", label: "视频" },
|
|
61
61
|
{ value: "audio/*", label: "音频" },
|
|
@@ -66,7 +66,7 @@ const tn = [
|
|
|
66
66
|
{ value: "text/plain", label: "纯文本" },
|
|
67
67
|
{ value: "application/zip", label: "ZIP 压缩包" },
|
|
68
68
|
{ value: "application/x-rar-compressed", label: "RAR 压缩包" }
|
|
69
|
-
],
|
|
69
|
+
], sr = {
|
|
70
70
|
"image/*": ["image/*"],
|
|
71
71
|
"video/*": ["video/*"],
|
|
72
72
|
"audio/*": ["audio/*"],
|
|
@@ -86,7 +86,7 @@ const tn = [
|
|
|
86
86
|
"text/plain": ["text/plain"],
|
|
87
87
|
"application/zip": ["application/zip"],
|
|
88
88
|
"application/x-rar-compressed": ["application/x-rar-compressed"]
|
|
89
|
-
},
|
|
89
|
+
}, ar = {
|
|
90
90
|
"image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
|
|
91
91
|
"video/*": [".mp4", ".mov", ".avi", ".webm"],
|
|
92
92
|
"audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
|
|
@@ -97,14 +97,14 @@ const tn = [
|
|
|
97
97
|
"text/plain": [".txt"],
|
|
98
98
|
"application/zip": [".zip", ".7z"],
|
|
99
99
|
"application/x-rar-compressed": [".rar"]
|
|
100
|
-
},
|
|
100
|
+
}, lr = {
|
|
101
101
|
"application/msword": "office/word",
|
|
102
102
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
|
|
103
103
|
"application/vnd.ms-excel": "office/excel",
|
|
104
104
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "office/excel",
|
|
105
105
|
"application/vnd.ms-powerpoint": "office/ppt",
|
|
106
106
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "office/ppt"
|
|
107
|
-
},
|
|
107
|
+
}, pt = [
|
|
108
108
|
{ value: ".jpg", label: ".jpg" },
|
|
109
109
|
{ value: ".jpeg", label: ".jpeg" },
|
|
110
110
|
{ value: ".png", label: ".png" },
|
|
@@ -130,119 +130,119 @@ const tn = [
|
|
|
130
130
|
{ value: ".zip", label: ".zip" },
|
|
131
131
|
{ value: ".rar", label: ".rar" },
|
|
132
132
|
{ value: ".7z", label: ".7z" }
|
|
133
|
-
],
|
|
134
|
-
|
|
135
|
-
),
|
|
136
|
-
|
|
137
|
-
),
|
|
138
|
-
|
|
133
|
+
], cr = Object.fromEntries(
|
|
134
|
+
rn.map((e) => [e.value, e.label])
|
|
135
|
+
), ur = Object.fromEntries(
|
|
136
|
+
pt.map((e) => [e.value, e.label])
|
|
137
|
+
), mr = new Set(rn.map((e) => e.value)), dr = new Set(
|
|
138
|
+
pt.map((e) => e.value)
|
|
139
139
|
);
|
|
140
|
-
function
|
|
140
|
+
function fr(e) {
|
|
141
141
|
const t = e.trim();
|
|
142
|
-
return t ?
|
|
142
|
+
return t ? mr.has(t) ? t : lr[t] ?? null : null;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function pr(e) {
|
|
145
145
|
return Array.isArray(e) ? e.map((t) => {
|
|
146
146
|
const n = t.trim().toLowerCase();
|
|
147
147
|
return n ? n.startsWith(".") ? n : `.${n}` : "";
|
|
148
148
|
}).filter(Boolean) : [];
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Te(e) {
|
|
151
151
|
if (!Array.isArray(e)) return [];
|
|
152
152
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
153
153
|
for (const r of e) {
|
|
154
|
-
const o =
|
|
154
|
+
const o = fr(r);
|
|
155
155
|
o && !n.has(o) && (n.add(o), t.push(o));
|
|
156
156
|
}
|
|
157
157
|
return t;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
const t =
|
|
159
|
+
function hr(e) {
|
|
160
|
+
const t = Te(e), n = [];
|
|
161
161
|
for (const r of t)
|
|
162
|
-
n.push(...
|
|
162
|
+
n.push(...sr[r] ?? [r]);
|
|
163
163
|
return n;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
const t =
|
|
165
|
+
function gr(e) {
|
|
166
|
+
const t = Te(e);
|
|
167
167
|
if (t.length === 0) return [];
|
|
168
168
|
const n = /* @__PURE__ */ new Set();
|
|
169
169
|
for (const r of t)
|
|
170
|
-
for (const o of
|
|
170
|
+
for (const o of ar[r] ?? [])
|
|
171
171
|
n.add(o);
|
|
172
|
-
return
|
|
172
|
+
return pt.filter((r) => n.has(r.value));
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const n =
|
|
174
|
+
function ht(e, t) {
|
|
175
|
+
const n = pr(t), r = Te(e);
|
|
176
176
|
if (r.length === 0)
|
|
177
|
-
return n.filter((i) =>
|
|
177
|
+
return n.filter((i) => dr.has(i));
|
|
178
178
|
const o = new Set(
|
|
179
|
-
|
|
179
|
+
gr(r).map((i) => i.value)
|
|
180
180
|
);
|
|
181
181
|
return n.filter((i) => o.has(i));
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
const n =
|
|
183
|
+
function yr(e, t) {
|
|
184
|
+
const n = hr(e), r = ht(e, t), o = [...n, ...r];
|
|
185
185
|
return o.length > 0 ? o.join(",") : void 0;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
const n =
|
|
187
|
+
function vr(e, t) {
|
|
188
|
+
const n = Te(e), r = ht(
|
|
189
189
|
n,
|
|
190
190
|
t
|
|
191
191
|
), o = [
|
|
192
|
-
...n.map((i) =>
|
|
193
|
-
...r.map((i) =>
|
|
192
|
+
...n.map((i) => cr[i] ?? i),
|
|
193
|
+
...r.map((i) => ur[i] ?? i)
|
|
194
194
|
];
|
|
195
195
|
return o.length === 0 ? null : o.join("、");
|
|
196
196
|
}
|
|
197
|
-
const
|
|
197
|
+
const br = [
|
|
198
198
|
"video",
|
|
199
199
|
"audio",
|
|
200
200
|
"image",
|
|
201
201
|
"file",
|
|
202
202
|
"spreadsheet",
|
|
203
203
|
"document"
|
|
204
|
-
],
|
|
205
|
-
function
|
|
206
|
-
return e &&
|
|
204
|
+
], Sr = new Set(br);
|
|
205
|
+
function kr(e) {
|
|
206
|
+
return e && Sr.has(e) ? e : "file";
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
return typeof e == "string" &&
|
|
208
|
+
function xe(e) {
|
|
209
|
+
return typeof e == "string" && rr.includes(e) ? e : "medium";
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function Cr(e, t) {
|
|
212
212
|
var o;
|
|
213
213
|
const n = Math.max(1, t);
|
|
214
214
|
let r = [];
|
|
215
215
|
return Array.isArray(e.mediaUrls) ? r = e.mediaUrls.map((i) => String(i).trim()) : (o = e.mediaUrl) != null && o.trim() && (r = [e.mediaUrl.trim()]), r.length === 0 ? [""] : r.slice(0, n);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Ar(e) {
|
|
218
218
|
var t;
|
|
219
219
|
return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
return `form-media-size-${
|
|
221
|
+
function _r(e) {
|
|
222
|
+
return `form-media-size-${xe(e)}`;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
return `form-media-preview form-media-list ${
|
|
224
|
+
function Tr(e) {
|
|
225
|
+
return `form-media-preview form-media-list ${_r(e)}`;
|
|
226
226
|
}
|
|
227
|
-
const
|
|
228
|
-
function
|
|
227
|
+
const xr = 10;
|
|
228
|
+
function on(e) {
|
|
229
229
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Me(e) {
|
|
232
232
|
return e === !0 || e === "true" || e === 1 || e === "1";
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Re(e, t = 1) {
|
|
235
235
|
const n = typeof e == "number" ? e : Number(e);
|
|
236
236
|
return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function de(e, t = 1) {
|
|
239
239
|
const n = typeof e == "number" ? e : Number(e);
|
|
240
240
|
return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
return t == null ? void 0 : e === "toggle" ?
|
|
242
|
+
function sn(e, t) {
|
|
243
|
+
return t == null ? void 0 : e === "toggle" ? Me(t) : e === "multiselect" || e === "checkbox" || 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;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function Mr(e) {
|
|
246
246
|
if (Array.isArray(e)) return e.map(String).filter(Boolean);
|
|
247
247
|
if (typeof e == "string" && e.trim())
|
|
248
248
|
try {
|
|
@@ -252,11 +252,11 @@ function Ar(e) {
|
|
|
252
252
|
}
|
|
253
253
|
return [];
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
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 =
|
|
255
|
+
function Nr(e) {
|
|
256
|
+
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 = Mr(e == null ? void 0 : e.flowUniqueIds);
|
|
257
257
|
return { agentKind: r, agentUniqueId: o, flowType: i, category: s, flowUniqueIds: a, pageSize: n };
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Ir(e) {
|
|
260
260
|
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;
|
|
261
261
|
return {
|
|
262
262
|
names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
|
|
@@ -266,14 +266,14 @@ function Tr(e) {
|
|
|
266
266
|
pageSize: n
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Fr(e) {
|
|
270
270
|
if (e.type !== "case_singleselect") return e;
|
|
271
271
|
const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
|
|
272
272
|
return { ...e, type: "case_multiselect", defaultValue: t };
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function Er(e) {
|
|
275
275
|
var o, i, s, a;
|
|
276
|
-
const t =
|
|
276
|
+
const t = Fr(e), n = Te(t.fileAcceptTypes), r = t.type;
|
|
277
277
|
return {
|
|
278
278
|
id: ((o = t.id) == null ? void 0 : o.trim()) || le("block-"),
|
|
279
279
|
type: r,
|
|
@@ -282,17 +282,17 @@ function Mr(e) {
|
|
|
282
282
|
placeholder: t.placeholder ?? "",
|
|
283
283
|
help: t.help ?? "",
|
|
284
284
|
required: t.required === !0,
|
|
285
|
-
mediaUrls:
|
|
286
|
-
mediaSize:
|
|
285
|
+
mediaUrls: pe(r) ? Cr(t, xr) : void 0,
|
|
286
|
+
mediaSize: pe(r) ? xe(t.mediaSize) : void 0,
|
|
287
287
|
fileAcceptTypes: n,
|
|
288
|
-
fileAcceptExtensions:
|
|
288
|
+
fileAcceptExtensions: ht(
|
|
289
289
|
n,
|
|
290
290
|
t.fileAcceptExtensions
|
|
291
291
|
),
|
|
292
|
-
filePlaceholderIcon:
|
|
293
|
-
fileMinCount: r === "file" ?
|
|
294
|
-
fileMaxCount: r === "file" ?
|
|
295
|
-
defaultValue:
|
|
292
|
+
filePlaceholderIcon: kr(t.filePlaceholderIcon),
|
|
293
|
+
fileMinCount: r === "file" ? Re(t.fileMinCount, 1) : void 0,
|
|
294
|
+
fileMaxCount: r === "file" ? Re(t.fileMaxCount, 1) : void 0,
|
|
295
|
+
defaultValue: sn(r, t.defaultValue),
|
|
296
296
|
jsonSchemaDescription: ((s = t.jsonSchemaDescription) == null ? void 0 : s.trim()) ?? "",
|
|
297
297
|
hidden: r === "text" ? t.hidden === !0 : void 0,
|
|
298
298
|
needLLM: t.needLLM === !0 ? !0 : void 0,
|
|
@@ -309,29 +309,29 @@ function Mr(e) {
|
|
|
309
309
|
value: t.condition.value
|
|
310
310
|
} : void 0,
|
|
311
311
|
resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
|
|
312
|
-
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ?
|
|
313
|
-
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ?
|
|
314
|
-
resumeFilter: r === "resume_multiselect" ?
|
|
312
|
+
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? de(t.resumeMinCount, 1) : void 0,
|
|
313
|
+
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? de(t.resumeMaxCount, 1) : void 0,
|
|
314
|
+
resumeFilter: r === "resume_multiselect" ? Ir(t.resumeFilter) : void 0,
|
|
315
315
|
caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
|
|
316
|
-
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ?
|
|
317
|
-
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ?
|
|
318
|
-
caseFilter: r === "case_multiselect" ?
|
|
316
|
+
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? de(t.caseMinCount, 1) : void 0,
|
|
317
|
+
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? de(t.caseMaxCount, 1) : void 0,
|
|
318
|
+
caseFilter: r === "case_multiselect" ? Nr(t.caseFilter) : void 0
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Ur(e) {
|
|
322
322
|
return new Set((e.options ?? []).map((t) => t.value));
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function $t(e, t) {
|
|
325
325
|
const n = {
|
|
326
326
|
type: "array",
|
|
327
327
|
items: { type: "string" }
|
|
328
328
|
};
|
|
329
|
-
return e !== void 0 && (n.minItems =
|
|
329
|
+
return e !== void 0 && (n.minItems = de(e, 1)), t !== void 0 && (n.maxItems = de(t, 1)), n;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
const t =
|
|
331
|
+
function Rr(e) {
|
|
332
|
+
const t = sn(e.type, e.defaultValue);
|
|
333
333
|
if (t === void 0) return;
|
|
334
|
-
const n =
|
|
334
|
+
const n = Ur(e);
|
|
335
335
|
switch (e.type) {
|
|
336
336
|
case "toggle":
|
|
337
337
|
return t;
|
|
@@ -358,7 +358,7 @@ function Ir(e) {
|
|
|
358
358
|
return t;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Pr(e) {
|
|
362
362
|
var i, s;
|
|
363
363
|
if (!((i = e.name) == null ? void 0 : i.trim()) || !Z(e.type)) return null;
|
|
364
364
|
let n;
|
|
@@ -386,7 +386,7 @@ function Fr(e) {
|
|
|
386
386
|
break;
|
|
387
387
|
}
|
|
388
388
|
case "file": {
|
|
389
|
-
const a =
|
|
389
|
+
const a = Re(e.fileMinCount, 1), l = Re(e.fileMaxCount, 1);
|
|
390
390
|
l <= 1 ? n = { type: "string" } : n = {
|
|
391
391
|
type: "array",
|
|
392
392
|
items: { type: "string" },
|
|
@@ -396,10 +396,10 @@ function Fr(e) {
|
|
|
396
396
|
break;
|
|
397
397
|
}
|
|
398
398
|
case "resume_multiselect":
|
|
399
|
-
n =
|
|
399
|
+
n = $t(e.resumeMinCount, e.resumeMaxCount);
|
|
400
400
|
break;
|
|
401
401
|
case "case_multiselect":
|
|
402
|
-
n =
|
|
402
|
+
n = $t(e.caseMinCount, e.caseMaxCount);
|
|
403
403
|
break;
|
|
404
404
|
case "text":
|
|
405
405
|
n = { type: "string" }, e.hidden && (n["x-hidden"] = !0);
|
|
@@ -410,16 +410,16 @@ function Fr(e) {
|
|
|
410
410
|
}
|
|
411
411
|
const r = (s = e.jsonSchemaDescription) == null ? void 0 : s.trim();
|
|
412
412
|
r && (n.$comment = r);
|
|
413
|
-
const o =
|
|
413
|
+
const o = Rr(e);
|
|
414
414
|
return o !== void 0 && (n.default = o), n;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function wr(e, t, n) {
|
|
417
417
|
var l;
|
|
418
418
|
const r = {}, o = [];
|
|
419
419
|
for (const c of e) {
|
|
420
420
|
const m = (l = c.name) == null ? void 0 : l.trim();
|
|
421
421
|
if (!m || !Z(c.type)) continue;
|
|
422
|
-
const d =
|
|
422
|
+
const d = Pr(c);
|
|
423
423
|
d && (r[m] = d, c.required && o.push(m));
|
|
424
424
|
}
|
|
425
425
|
const i = {
|
|
@@ -430,35 +430,35 @@ function Er(e, t, n) {
|
|
|
430
430
|
}, s = t == null ? void 0 : t.trim(), a = n == null ? void 0 : n.trim();
|
|
431
431
|
return s && (i.title = s), a && (i.description = a), i;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function be(e) {
|
|
434
434
|
const t = e.title ?? "", n = e.description ?? "";
|
|
435
435
|
return {
|
|
436
436
|
title: t,
|
|
437
437
|
description: n,
|
|
438
438
|
blocks: e.blocks,
|
|
439
|
-
jsonSchema:
|
|
439
|
+
jsonSchema: wr(e.blocks, t, n)
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
function qe(e) {
|
|
443
443
|
if (!e || !Array.isArray(e.blocks))
|
|
444
|
-
return
|
|
445
|
-
const t = e.blocks.map(
|
|
446
|
-
return
|
|
444
|
+
return be({ title: "", description: "", blocks: [] });
|
|
445
|
+
const t = e.blocks.map(Er);
|
|
446
|
+
return be({
|
|
447
447
|
title: typeof e.title == "string" ? e.title : "",
|
|
448
448
|
description: typeof e.description == "string" ? e.description : "",
|
|
449
449
|
blocks: t
|
|
450
450
|
});
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
return
|
|
452
|
+
function ys() {
|
|
453
|
+
return be({ title: "", description: "", blocks: [] });
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function vs(e) {
|
|
456
456
|
const t = {
|
|
457
457
|
id: le("block-"),
|
|
458
458
|
type: e,
|
|
459
459
|
label: e
|
|
460
460
|
};
|
|
461
|
-
return Z(e) && (t.label = "", t.name = le("field_"), t.placeholder = "", t.required = !1),
|
|
461
|
+
return Z(e) && (t.label = "", t.name = le("field_"), t.placeholder = "", t.required = !1), pe(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), or(e) && (t.options = [
|
|
462
462
|
{ value: "option_1", label: "选项 1" },
|
|
463
463
|
{ value: "option_2", label: "选项 2" }
|
|
464
464
|
]), 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.resumeFilter = {
|
|
@@ -468,7 +468,7 @@ function hs(e) {
|
|
|
468
468
|
pageSize: 20
|
|
469
469
|
}, t.defaultValue = []), e === "case_multiselect" && (t.caseEnableRefresh = !0, t.caseMinCount = 1, t.caseMaxCount = 1, t.caseFilter = { flowUniqueIds: [], pageSize: 20 }, t.defaultValue = []), t;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function zr(e) {
|
|
472
472
|
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) : [];
|
|
473
473
|
return {
|
|
474
474
|
agentKind: n,
|
|
@@ -479,13 +479,13 @@ function Ur(e) {
|
|
|
479
479
|
pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Dt(e) {
|
|
483
483
|
if (e == null) return;
|
|
484
484
|
const t = typeof e == "number" ? e : Number(e);
|
|
485
485
|
if (!(!Number.isFinite(t) || t < 1))
|
|
486
486
|
return Math.floor(t);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Or(e, t) {
|
|
489
489
|
var s, a, l, c, m, d;
|
|
490
490
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
491
491
|
return i({
|
|
@@ -508,7 +508,7 @@ function Rr(e, t) {
|
|
|
508
508
|
value: { path: o }
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function qr(e, t, n) {
|
|
512
512
|
const r = n.nameFromValue(e.value), o = {
|
|
513
513
|
...t("case_multiselect"),
|
|
514
514
|
name: r,
|
|
@@ -516,23 +516,23 @@ function Pr(e, t, n) {
|
|
|
516
516
|
}, i = n.asLiteral(e.placeholder);
|
|
517
517
|
i && (o.placeholder = i);
|
|
518
518
|
const s = n.asLiteral(e.help);
|
|
519
|
-
s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter =
|
|
520
|
-
const a =
|
|
519
|
+
s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = zr(e.caseFilter));
|
|
520
|
+
const a = Dt(e.minCount);
|
|
521
521
|
a !== void 0 && (o.caseMinCount = a);
|
|
522
|
-
const l =
|
|
522
|
+
const l = Dt(e.maxCount);
|
|
523
523
|
return l !== void 0 && (o.caseMaxCount = l), o;
|
|
524
524
|
}
|
|
525
|
-
const
|
|
525
|
+
const an = Ce(
|
|
526
526
|
null
|
|
527
527
|
);
|
|
528
|
-
function
|
|
528
|
+
function Br(e) {
|
|
529
529
|
try {
|
|
530
530
|
return JSON.stringify(e);
|
|
531
531
|
} catch {
|
|
532
532
|
return String(e.length);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
const
|
|
535
|
+
const Vr = {
|
|
536
536
|
publishLiveOptions: () => {
|
|
537
537
|
},
|
|
538
538
|
liveOptions: /* @__PURE__ */ new Map(),
|
|
@@ -541,23 +541,23 @@ const zr = {
|
|
|
541
541
|
clearPendingChangeFields: () => {
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
|
-
function
|
|
545
|
-
const t = A(/* @__PURE__ */ new Map()), n = A(/* @__PURE__ */ new Map()), r = A([]), [o, i] =
|
|
544
|
+
function Lr({ children: e }) {
|
|
545
|
+
const t = A(/* @__PURE__ */ new Map()), n = A(/* @__PURE__ */ new Map()), r = A([]), [o, i] = w(0), [s, a] = w(() => /* @__PURE__ */ new Map()), [l, c] = w(
|
|
546
546
|
[]
|
|
547
|
-
), m =
|
|
548
|
-
(
|
|
549
|
-
const
|
|
550
|
-
if (!
|
|
547
|
+
), m = j(
|
|
548
|
+
(y, S) => {
|
|
549
|
+
const g = y.trim();
|
|
550
|
+
if (!g) return;
|
|
551
551
|
const k = S.map((f) => ({
|
|
552
552
|
value: String(f.value ?? ""),
|
|
553
553
|
label: String(f.label ?? f.value ?? "")
|
|
554
|
-
})), p =
|
|
555
|
-
n.current.get(
|
|
554
|
+
})), p = Br(k);
|
|
555
|
+
n.current.get(g) !== p && (n.current.set(g, p), t.current.set(g, k), r.current.includes(g) || (r.current = [...r.current, g]), a(new Map(t.current)), c(r.current), i((f) => f + 1));
|
|
556
556
|
},
|
|
557
557
|
[]
|
|
558
|
-
), d =
|
|
558
|
+
), d = j(() => {
|
|
559
559
|
r.current = [], c([]);
|
|
560
|
-
}, []), b =
|
|
560
|
+
}, []), b = L(
|
|
561
561
|
() => ({
|
|
562
562
|
publishLiveOptions: m,
|
|
563
563
|
liveOptions: s,
|
|
@@ -573,26 +573,26 @@ function Or({ children: e }) {
|
|
|
573
573
|
d
|
|
574
574
|
]
|
|
575
575
|
);
|
|
576
|
-
return /* @__PURE__ */ u(
|
|
576
|
+
return /* @__PURE__ */ u(an.Provider, { value: b, children: e });
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
return
|
|
578
|
+
function gt() {
|
|
579
|
+
return Ae(an) ?? Vr;
|
|
580
580
|
}
|
|
581
|
-
const
|
|
582
|
-
function
|
|
581
|
+
const ln = Ce({ interactive: !0 });
|
|
582
|
+
function at({
|
|
583
583
|
interactive: e,
|
|
584
584
|
children: t
|
|
585
585
|
}) {
|
|
586
|
-
return /* @__PURE__ */ u(
|
|
586
|
+
return /* @__PURE__ */ u(ln.Provider, { value: { interactive: e }, children: t });
|
|
587
587
|
}
|
|
588
588
|
function se() {
|
|
589
|
-
return
|
|
589
|
+
return Ae(ln);
|
|
590
590
|
}
|
|
591
|
-
const
|
|
592
|
-
function
|
|
591
|
+
const cn = Ce(null);
|
|
592
|
+
function jr(e) {
|
|
593
593
|
return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
|
|
594
594
|
}
|
|
595
|
-
const
|
|
595
|
+
const $r = {
|
|
596
596
|
reportEvent: () => {
|
|
597
597
|
},
|
|
598
598
|
reportData: () => {
|
|
@@ -600,7 +600,7 @@ const Br = {
|
|
|
600
600
|
runAutoControl: (e) => e(),
|
|
601
601
|
isAutoControl: () => !1
|
|
602
602
|
};
|
|
603
|
-
function
|
|
603
|
+
function Dr(e) {
|
|
604
604
|
const t = {};
|
|
605
605
|
for (const [n, r] of Object.entries(e.form_values ?? {}))
|
|
606
606
|
r !== void 0 && (t[n] = r);
|
|
@@ -610,13 +610,13 @@ function Lr(e) {
|
|
|
610
610
|
form_change: Array.isArray(e.form_change) ? [...e.form_change] : []
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Hr({
|
|
614
614
|
client: e,
|
|
615
615
|
children: t
|
|
616
616
|
}) {
|
|
617
617
|
const n = A(0), r = A(e);
|
|
618
618
|
r.current = e;
|
|
619
|
-
const o =
|
|
619
|
+
const o = j((c) => {
|
|
620
620
|
const m = r.current;
|
|
621
621
|
if (!m) return;
|
|
622
622
|
const d = {
|
|
@@ -626,10 +626,10 @@ function Vr({
|
|
|
626
626
|
c.field !== void 0 && (d.field = c.field), c.value !== void 0 && (d.value = c.value);
|
|
627
627
|
const b = n.current > 0 ? "form_auto_control_bac_event" : "form_runtime_event";
|
|
628
628
|
m.send(b, d);
|
|
629
|
-
}, []), i =
|
|
629
|
+
}, []), i = j((c) => {
|
|
630
630
|
const m = r.current;
|
|
631
|
-
m && m.send("form_runtime_data",
|
|
632
|
-
}, []), s =
|
|
631
|
+
m && m.send("form_runtime_data", Dr(c));
|
|
632
|
+
}, []), s = j((c) => {
|
|
633
633
|
n.current += 1;
|
|
634
634
|
let m;
|
|
635
635
|
try {
|
|
@@ -637,13 +637,13 @@ function Vr({
|
|
|
637
637
|
} catch (d) {
|
|
638
638
|
throw n.current = Math.max(0, n.current - 1), d;
|
|
639
639
|
}
|
|
640
|
-
return
|
|
640
|
+
return jr(m) ? Promise.resolve(m).finally(() => {
|
|
641
641
|
n.current = Math.max(0, n.current - 1);
|
|
642
642
|
}) : (n.current = Math.max(0, n.current - 1), m);
|
|
643
|
-
}, []), a =
|
|
643
|
+
}, []), a = j(
|
|
644
644
|
() => n.current > 0,
|
|
645
645
|
[]
|
|
646
|
-
), l =
|
|
646
|
+
), l = L(
|
|
647
647
|
() => ({
|
|
648
648
|
reportEvent: o,
|
|
649
649
|
reportData: i,
|
|
@@ -652,88 +652,88 @@ function Vr({
|
|
|
652
652
|
}),
|
|
653
653
|
[o, i, s, a]
|
|
654
654
|
);
|
|
655
|
-
return /* @__PURE__ */ u(
|
|
655
|
+
return /* @__PURE__ */ u(cn.Provider, { value: l, children: t });
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
return
|
|
657
|
+
function un() {
|
|
658
|
+
return Ae(cn) ?? $r;
|
|
659
659
|
}
|
|
660
|
-
const
|
|
661
|
-
function
|
|
660
|
+
const Kr = 300;
|
|
661
|
+
function mn(e) {
|
|
662
662
|
return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function Jr(e) {
|
|
665
665
|
if (!e) return;
|
|
666
666
|
const t = e.trim();
|
|
667
667
|
if (t)
|
|
668
668
|
return t.startsWith("/") ? t.slice(1) : t;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function Ht(e, t = "value") {
|
|
671
671
|
const r = e.componentModel.properties[t];
|
|
672
|
-
if (!(!
|
|
672
|
+
if (!(!mn(r) || r === void 0))
|
|
673
673
|
return e.dataContext.resolveDynamicValue(r);
|
|
674
674
|
}
|
|
675
675
|
function ae(e, t = "value", n = {}) {
|
|
676
|
-
const o = e.componentModel.properties[t], i =
|
|
676
|
+
const o = e.componentModel.properties[t], i = mn(o), s = Jr(i), a = un(), {
|
|
677
677
|
component: l = "Unknown",
|
|
678
678
|
changeAction: c = "change",
|
|
679
679
|
debounceChange: m = !1
|
|
680
|
-
} = n, d = A(null), b = A(void 0),
|
|
680
|
+
} = n, d = A(null), b = A(void 0), y = A(!1), S = A(a);
|
|
681
681
|
S.current = a;
|
|
682
|
-
const
|
|
683
|
-
|
|
682
|
+
const g = A(c);
|
|
683
|
+
g.current = c;
|
|
684
684
|
const k = A(l);
|
|
685
685
|
k.current = l;
|
|
686
686
|
const p = A(s);
|
|
687
|
-
p.current = s,
|
|
688
|
-
d.current != null && (clearTimeout(d.current), d.current = null),
|
|
689
|
-
action:
|
|
687
|
+
p.current = s, q(() => () => {
|
|
688
|
+
d.current != null && (clearTimeout(d.current), d.current = null), y.current && p.current && (y.current = !1, S.current.reportEvent({
|
|
689
|
+
action: g.current,
|
|
690
690
|
component: k.current,
|
|
691
691
|
field: p.current,
|
|
692
692
|
value: b.current
|
|
693
693
|
}));
|
|
694
694
|
}, []);
|
|
695
|
-
const f =
|
|
696
|
-
(
|
|
695
|
+
const f = j(
|
|
696
|
+
(B) => {
|
|
697
697
|
if (!i || o === void 0) return () => {
|
|
698
698
|
};
|
|
699
|
-
const
|
|
700
|
-
return () =>
|
|
699
|
+
const V = e.dataContext.subscribeDynamicValue(o, () => B());
|
|
700
|
+
return () => V.unsubscribe();
|
|
701
701
|
},
|
|
702
702
|
[e, o, i]
|
|
703
|
-
), v =
|
|
703
|
+
), v = j(() => {
|
|
704
704
|
if (!(!i || o === void 0))
|
|
705
705
|
return e.dataContext.resolveDynamicValue(o);
|
|
706
|
-
}, [e, o, i]), x =
|
|
707
|
-
(
|
|
706
|
+
}, [e, o, i]), x = Bn(f, v, v), N = j(
|
|
707
|
+
(B) => {
|
|
708
708
|
if (!s) return;
|
|
709
|
-
const
|
|
710
|
-
|
|
709
|
+
const V = () => {
|
|
710
|
+
y.current = !1, S.current.reportEvent({
|
|
711
711
|
action: c,
|
|
712
712
|
component: l,
|
|
713
713
|
field: s,
|
|
714
|
-
value:
|
|
714
|
+
value: B
|
|
715
715
|
});
|
|
716
716
|
};
|
|
717
717
|
if (!m) {
|
|
718
|
-
|
|
718
|
+
V();
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
721
|
-
b.current =
|
|
722
|
-
d.current = null,
|
|
723
|
-
},
|
|
721
|
+
b.current = B, y.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
722
|
+
d.current = null, V();
|
|
723
|
+
}, Kr);
|
|
724
724
|
},
|
|
725
725
|
[s, c, l, m]
|
|
726
|
-
), _ =
|
|
727
|
-
(
|
|
728
|
-
!i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path),
|
|
726
|
+
), _ = j(
|
|
727
|
+
(B) => {
|
|
728
|
+
!i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), B);
|
|
729
729
|
},
|
|
730
730
|
[e, o, i]
|
|
731
|
-
),
|
|
732
|
-
(
|
|
733
|
-
_(
|
|
731
|
+
), z = j(
|
|
732
|
+
(B) => {
|
|
733
|
+
_(B), N(B);
|
|
734
734
|
},
|
|
735
735
|
[_, N]
|
|
736
|
-
), C =
|
|
736
|
+
), C = j(() => {
|
|
737
737
|
s && S.current.reportEvent({
|
|
738
738
|
action: "focus",
|
|
739
739
|
component: l,
|
|
@@ -742,7 +742,7 @@ function ae(e, t = "value", n = {}) {
|
|
|
742
742
|
}, [s, l]);
|
|
743
743
|
return {
|
|
744
744
|
value: x,
|
|
745
|
-
setValue:
|
|
745
|
+
setValue: z,
|
|
746
746
|
/** 写入 dataModel 但不上报(用于模式切换规范化等内部同步) */
|
|
747
747
|
setValueSilent: _,
|
|
748
748
|
hasBinding: !!i,
|
|
@@ -750,59 +750,69 @@ function ae(e, t = "value", n = {}) {
|
|
|
750
750
|
reportFocus: C
|
|
751
751
|
};
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function Se(e) {
|
|
754
754
|
if (typeof e == "string") return e || void 0;
|
|
755
755
|
if (typeof e == "number") return String(e);
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function Q(e) {
|
|
758
758
|
return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
return t ? Array.isArray(e) ? null :
|
|
760
|
+
function dn(e, t) {
|
|
761
|
+
return t ? Array.isArray(e) ? null : Q(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function Pe(e) {
|
|
764
764
|
if (e == null) return;
|
|
765
765
|
const t = typeof e == "number" ? e : Number(e);
|
|
766
766
|
if (!(!Number.isFinite(t) || t < 1))
|
|
767
767
|
return Math.floor(t);
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function fn(e, t, n, r) {
|
|
770
770
|
return e.includes(t) ? e.filter((i) => i !== t) : r === 1 ? [t] : r !== void 0 && e.length >= r ? null : [...e, t];
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function pn(e, t, n, r, o) {
|
|
773
773
|
return n ? e.includes(t) || o === 1 ? !1 : o !== void 0 && e.length >= o : !0;
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function hn(e, t) {
|
|
776
776
|
return t === void 0 || e.length <= t ? null : e.slice(0, t);
|
|
777
777
|
}
|
|
778
|
-
const
|
|
779
|
-
function
|
|
778
|
+
const gn = Ce(null);
|
|
779
|
+
function lt({
|
|
780
780
|
caseSearch: e,
|
|
781
781
|
children: t
|
|
782
782
|
}) {
|
|
783
|
-
return /* @__PURE__ */ u(
|
|
783
|
+
return /* @__PURE__ */ u(gn.Provider, { value: e ?? null, children: t });
|
|
784
784
|
}
|
|
785
|
-
function
|
|
786
|
-
return
|
|
785
|
+
function Gr() {
|
|
786
|
+
return Ae(gn);
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function Xe(e) {
|
|
789
789
|
return typeof e == "string" ? e : "";
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Wr(e) {
|
|
792
|
+
if (Array.isArray(e)) return e.map(String).filter(Boolean);
|
|
793
|
+
if (typeof e == "string" && e.trim())
|
|
794
|
+
try {
|
|
795
|
+
const t = JSON.parse(e);
|
|
796
|
+
if (Array.isArray(t)) return t.map(String).filter(Boolean);
|
|
797
|
+
} catch {
|
|
798
|
+
}
|
|
799
|
+
return [];
|
|
800
|
+
}
|
|
801
|
+
function Ze(e) {
|
|
792
802
|
if (!e || typeof e != "object")
|
|
793
803
|
return { flowUniqueIds: [], pageSize: 20 };
|
|
794
|
-
const t = e, n = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), r = Number.isFinite(n) && n >= 1 && n <= 100 ? Math.floor(n) : 20, o = typeof t.agentKind == "string" && t.agentKind.trim() ? t.agentKind.trim() : void 0, i = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, s = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, a = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, l =
|
|
804
|
+
const t = e, n = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), r = Number.isFinite(n) && n >= 1 && n <= 100 ? Math.floor(n) : 20, o = typeof t.agentKind == "string" && t.agentKind.trim() ? t.agentKind.trim() : void 0, i = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, s = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, a = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, l = Wr(t.flowUniqueIds);
|
|
795
805
|
return { agentKind: o, agentUniqueId: i, flowType: s, category: a, flowUniqueIds: l, pageSize: r };
|
|
796
806
|
}
|
|
797
|
-
function
|
|
807
|
+
function et(e) {
|
|
798
808
|
var r;
|
|
799
809
|
const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
|
|
800
810
|
return t || n;
|
|
801
811
|
}
|
|
802
|
-
function
|
|
812
|
+
function Yr(e) {
|
|
803
813
|
return JSON.stringify(e);
|
|
804
814
|
}
|
|
805
|
-
const
|
|
815
|
+
const Qr = {
|
|
806
816
|
name: "SkoponCaseSelect",
|
|
807
817
|
schema: h.object({
|
|
808
818
|
label: h.any().optional(),
|
|
@@ -815,7 +825,7 @@ const Kr = {
|
|
|
815
825
|
value: h.any().optional()
|
|
816
826
|
}).passthrough()
|
|
817
827
|
};
|
|
818
|
-
function
|
|
828
|
+
function Xr({
|
|
819
829
|
item: e,
|
|
820
830
|
selected: t,
|
|
821
831
|
disabled: n,
|
|
@@ -829,7 +839,7 @@ function Jr({
|
|
|
829
839
|
disabled: n,
|
|
830
840
|
onClick: r,
|
|
831
841
|
children: [
|
|
832
|
-
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(
|
|
842
|
+
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(Qt, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
|
|
833
843
|
/* @__PURE__ */ M("div", { className: "skopon-resume-select-card-body", children: [
|
|
834
844
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name }),
|
|
835
845
|
e.description ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
|
|
@@ -843,56 +853,56 @@ function Jr({
|
|
|
843
853
|
}
|
|
844
854
|
);
|
|
845
855
|
}
|
|
846
|
-
function
|
|
847
|
-
const { interactive: t } = se(), n =
|
|
856
|
+
function Zr({ context: e }) {
|
|
857
|
+
const { interactive: t } = se(), n = Gr(), { publishLiveOptions: r } = gt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = ae(e, "value", {
|
|
848
858
|
component: "SkoponCaseSelect",
|
|
849
859
|
changeAction: "click"
|
|
850
|
-
}), l = e.componentModel.properties, c =
|
|
851
|
-
|
|
852
|
-
const T =
|
|
860
|
+
}), l = e.componentModel.properties, c = Xe(l.label), m = Xe(l.placeholder), d = Xe(l.help), b = l.enableRefresh !== !1, y = Pe(l.minCount), S = Pe(l.maxCount), g = L(() => Ze(l.caseFilter), [l.caseFilter]), k = Yr(g), [p, f] = w(1), [v, x] = w(!1), [N, _] = w(""), [z, C] = w([]), [B, V] = w(0), [re, K] = w(g.pageSize ?? 20), $ = A(0), W = Q(o);
|
|
861
|
+
q(() => {
|
|
862
|
+
const T = hn(W, S);
|
|
853
863
|
T !== null && s(T);
|
|
854
|
-
}, [S,
|
|
855
|
-
const ee =
|
|
864
|
+
}, [S, W, s]);
|
|
865
|
+
const ee = L(() => n ? et(g) ? N || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, g, N, m]), te = j(
|
|
856
866
|
async (T) => {
|
|
857
|
-
const
|
|
858
|
-
if (!n || !
|
|
859
|
-
C([]),
|
|
867
|
+
const D = Ze(JSON.parse(k)), U = ++$.current;
|
|
868
|
+
if (!n || !et(D)) {
|
|
869
|
+
C([]), V(0), _(""), x(!1);
|
|
860
870
|
return;
|
|
861
871
|
}
|
|
862
872
|
x(!0), _("");
|
|
863
873
|
try {
|
|
864
|
-
const I = await n({ filter:
|
|
865
|
-
if (
|
|
866
|
-
C(I.list),
|
|
874
|
+
const I = await n({ filter: D, page: T });
|
|
875
|
+
if (U !== $.current) return;
|
|
876
|
+
C(I.list), V(I.total), f(I.page), K(I.pageSize), a && r(
|
|
867
877
|
a,
|
|
868
|
-
I.list.map((
|
|
869
|
-
value:
|
|
870
|
-
label:
|
|
878
|
+
I.list.map((Y) => ({
|
|
879
|
+
value: Y.caseUniqueId,
|
|
880
|
+
label: Y.name || Y.caseUniqueId
|
|
871
881
|
}))
|
|
872
882
|
);
|
|
873
883
|
} catch (I) {
|
|
874
|
-
if (
|
|
875
|
-
C([]),
|
|
884
|
+
if (U !== $.current) return;
|
|
885
|
+
C([]), V(0), _(I instanceof Error ? I.message : "加载案例列表失败");
|
|
876
886
|
} finally {
|
|
877
|
-
|
|
887
|
+
U === $.current && x(!1);
|
|
878
888
|
}
|
|
879
889
|
},
|
|
880
890
|
[n, k, a, r]
|
|
881
891
|
);
|
|
882
|
-
|
|
892
|
+
q(() => {
|
|
883
893
|
f(1), te(1);
|
|
884
894
|
}, [k, te]);
|
|
885
|
-
const
|
|
895
|
+
const E = (T) => {
|
|
886
896
|
if (!t) return;
|
|
887
|
-
const
|
|
888
|
-
|
|
897
|
+
const D = fn(
|
|
898
|
+
W,
|
|
889
899
|
T,
|
|
890
|
-
|
|
900
|
+
y,
|
|
891
901
|
S
|
|
892
902
|
);
|
|
893
|
-
|
|
894
|
-
},
|
|
895
|
-
const T =
|
|
903
|
+
D !== null && i(D);
|
|
904
|
+
}, P = () => {
|
|
905
|
+
const T = Ze(JSON.parse(k)), D = re || T.pageSize || 20, U = Math.max(1, Math.ceil(B / D)), I = p >= U ? 1 : p + 1;
|
|
896
906
|
te(I);
|
|
897
907
|
};
|
|
898
908
|
return /* @__PURE__ */ M(
|
|
@@ -902,36 +912,36 @@ function Gr({ context: e }) {
|
|
|
902
912
|
"data-skopon-field": a || void 0,
|
|
903
913
|
children: [
|
|
904
914
|
c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
|
|
905
|
-
v &&
|
|
906
|
-
/* @__PURE__ */ u(
|
|
915
|
+
v && z.length === 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-status", children: [
|
|
916
|
+
/* @__PURE__ */ u(ft, { size: "small" }),
|
|
907
917
|
" 加载案例…"
|
|
908
918
|
] }) : null,
|
|
909
|
-
!v &&
|
|
910
|
-
|
|
911
|
-
|
|
919
|
+
!v && z.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: ee }) : null,
|
|
920
|
+
z.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: z.map((T) => /* @__PURE__ */ u(
|
|
921
|
+
Xr,
|
|
912
922
|
{
|
|
913
923
|
item: T,
|
|
914
|
-
selected:
|
|
915
|
-
disabled:
|
|
916
|
-
|
|
924
|
+
selected: W.includes(T.caseUniqueId),
|
|
925
|
+
disabled: pn(
|
|
926
|
+
W,
|
|
917
927
|
T.caseUniqueId,
|
|
918
928
|
t,
|
|
919
|
-
|
|
929
|
+
y,
|
|
920
930
|
S
|
|
921
931
|
),
|
|
922
|
-
onToggle: () =>
|
|
932
|
+
onToggle: () => E(T.caseUniqueId)
|
|
923
933
|
},
|
|
924
934
|
T.caseUniqueId
|
|
925
935
|
)) }) : null,
|
|
926
|
-
b && n &&
|
|
936
|
+
b && n && et(g) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
|
|
927
937
|
Oe,
|
|
928
938
|
{
|
|
929
939
|
type: "default",
|
|
930
940
|
size: "small",
|
|
931
|
-
icon: /* @__PURE__ */ u(
|
|
941
|
+
icon: /* @__PURE__ */ u(Yt, {}),
|
|
932
942
|
loading: v,
|
|
933
943
|
disabled: !t,
|
|
934
|
-
onClick:
|
|
944
|
+
onClick: P,
|
|
935
945
|
children: "换一批"
|
|
936
946
|
}
|
|
937
947
|
) }) : null,
|
|
@@ -940,23 +950,23 @@ function Gr({ context: e }) {
|
|
|
940
950
|
}
|
|
941
951
|
);
|
|
942
952
|
}
|
|
943
|
-
const
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
),
|
|
953
|
+
const eo = X(
|
|
954
|
+
Qr,
|
|
955
|
+
Zr
|
|
956
|
+
), to = {
|
|
947
957
|
type: "case_multiselect",
|
|
948
958
|
componentName: "SkoponCaseSelect",
|
|
949
|
-
toComponent:
|
|
950
|
-
fromComponent:
|
|
951
|
-
catalogComponents: [
|
|
959
|
+
toComponent: Or,
|
|
960
|
+
fromComponent: qr,
|
|
961
|
+
catalogComponents: [eo]
|
|
952
962
|
};
|
|
953
|
-
function
|
|
963
|
+
function Kt(e) {
|
|
954
964
|
if (e == null) return;
|
|
955
965
|
const t = typeof e == "number" ? e : Number(e);
|
|
956
966
|
if (!(!Number.isFinite(t) || t < 1))
|
|
957
967
|
return Math.floor(t);
|
|
958
968
|
}
|
|
959
|
-
function
|
|
969
|
+
function no(e, t) {
|
|
960
970
|
var s, a, l, c;
|
|
961
971
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
962
972
|
return i({
|
|
@@ -977,7 +987,7 @@ function Qr(e, t) {
|
|
|
977
987
|
value: { path: o }
|
|
978
988
|
});
|
|
979
989
|
}
|
|
980
|
-
function
|
|
990
|
+
function ro(e, t, n) {
|
|
981
991
|
const r = n.nameFromValue(e.value), o = {
|
|
982
992
|
...t("resume_multiselect"),
|
|
983
993
|
name: r,
|
|
@@ -994,34 +1004,34 @@ function Xr(e, t, n) {
|
|
|
994
1004
|
pageSize: typeof c.pageSize == "number" ? c.pageSize : 20
|
|
995
1005
|
};
|
|
996
1006
|
}
|
|
997
|
-
const a =
|
|
1007
|
+
const a = Kt(e.minCount);
|
|
998
1008
|
a !== void 0 && (o.resumeMinCount = a);
|
|
999
|
-
const l =
|
|
1009
|
+
const l = Kt(e.maxCount);
|
|
1000
1010
|
return l !== void 0 && (o.resumeMaxCount = l), o;
|
|
1001
1011
|
}
|
|
1002
|
-
const
|
|
1003
|
-
function
|
|
1012
|
+
const yn = Ce(null);
|
|
1013
|
+
function ct({
|
|
1004
1014
|
resumeSearch: e,
|
|
1005
1015
|
children: t
|
|
1006
1016
|
}) {
|
|
1007
|
-
return /* @__PURE__ */ u(
|
|
1017
|
+
return /* @__PURE__ */ u(yn.Provider, { value: e ?? null, children: t });
|
|
1008
1018
|
}
|
|
1009
|
-
function
|
|
1010
|
-
return
|
|
1019
|
+
function oo() {
|
|
1020
|
+
return Ae(yn);
|
|
1011
1021
|
}
|
|
1012
|
-
function
|
|
1022
|
+
function tt(e) {
|
|
1013
1023
|
return typeof e == "string" ? e : "";
|
|
1014
1024
|
}
|
|
1015
|
-
function
|
|
1025
|
+
function nt(e) {
|
|
1016
1026
|
if (!e || typeof e != "object")
|
|
1017
1027
|
return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
|
|
1018
1028
|
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;
|
|
1019
1029
|
return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: s };
|
|
1020
1030
|
}
|
|
1021
|
-
function
|
|
1031
|
+
function io(e) {
|
|
1022
1032
|
return JSON.stringify(e);
|
|
1023
1033
|
}
|
|
1024
|
-
const
|
|
1034
|
+
const so = {
|
|
1025
1035
|
name: "SkoponResumeSelect",
|
|
1026
1036
|
schema: h.object({
|
|
1027
1037
|
label: h.any().optional(),
|
|
@@ -1033,39 +1043,39 @@ const to = {
|
|
|
1033
1043
|
maxCount: h.any().optional(),
|
|
1034
1044
|
value: h.any().optional()
|
|
1035
1045
|
}).passthrough()
|
|
1036
|
-
},
|
|
1037
|
-
function
|
|
1038
|
-
const n = (t ?? []).filter(Boolean), r = n.slice(0,
|
|
1046
|
+
}, ao = 3, lo = 2;
|
|
1047
|
+
function rt(e, t) {
|
|
1048
|
+
const n = (t ?? []).filter(Boolean), r = n.slice(0, ao), o = n.length - r.length;
|
|
1039
1049
|
return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-tags", children: [
|
|
1040
1050
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: e }),
|
|
1041
1051
|
n.length > 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-tags-list", children: [
|
|
1042
|
-
r.map((i) => /* @__PURE__ */ u(
|
|
1043
|
-
o > 0 ? /* @__PURE__ */ M(
|
|
1052
|
+
r.map((i) => /* @__PURE__ */ u(ve, { className: "skopon-resume-select-card-tag", children: i }, i)),
|
|
1053
|
+
o > 0 ? /* @__PURE__ */ M(ve, { className: "skopon-resume-select-card-tag", children: [
|
|
1044
1054
|
"+",
|
|
1045
1055
|
o
|
|
1046
1056
|
] }) : null
|
|
1047
1057
|
] }) : /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
|
|
1048
1058
|
] });
|
|
1049
1059
|
}
|
|
1050
|
-
function
|
|
1060
|
+
function co(e) {
|
|
1051
1061
|
return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-field", children: [
|
|
1052
1062
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
|
|
1053
1063
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
|
|
1054
1064
|
] });
|
|
1055
1065
|
}
|
|
1056
|
-
function
|
|
1066
|
+
function uo({ work: e }) {
|
|
1057
1067
|
return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-work", children: [
|
|
1058
|
-
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ u(
|
|
1068
|
+
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ u(Qn, { className: "skopon-resume-select-card-work-placeholder" }) }),
|
|
1059
1069
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
|
|
1060
1070
|
] });
|
|
1061
1071
|
}
|
|
1062
|
-
function
|
|
1072
|
+
function mo({
|
|
1063
1073
|
item: e,
|
|
1064
1074
|
selected: t,
|
|
1065
1075
|
disabled: n,
|
|
1066
1076
|
onToggle: r
|
|
1067
1077
|
}) {
|
|
1068
|
-
const o = (e.works ?? []).slice(0,
|
|
1078
|
+
const o = (e.works ?? []).slice(0, lo);
|
|
1069
1079
|
return /* @__PURE__ */ M(
|
|
1070
1080
|
"button",
|
|
1071
1081
|
{
|
|
@@ -1075,81 +1085,81 @@ function so({
|
|
|
1075
1085
|
onClick: r,
|
|
1076
1086
|
children: [
|
|
1077
1087
|
/* @__PURE__ */ u(
|
|
1078
|
-
|
|
1088
|
+
jn,
|
|
1079
1089
|
{
|
|
1080
1090
|
size: 48,
|
|
1081
1091
|
src: e.avatarUrl || void 0,
|
|
1082
|
-
icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(
|
|
1092
|
+
icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(Yn, {}),
|
|
1083
1093
|
className: "skopon-resume-select-card-avatar"
|
|
1084
1094
|
}
|
|
1085
1095
|
),
|
|
1086
1096
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
|
|
1087
1097
|
/* @__PURE__ */ M("div", { className: "skopon-resume-select-card-body", children: [
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1098
|
+
co(e.satisfaction),
|
|
1099
|
+
rt("性格", e.personality),
|
|
1100
|
+
rt("专长", e.specialties),
|
|
1101
|
+
rt("擅长领域", e.traits),
|
|
1092
1102
|
/* @__PURE__ */ M("div", { className: "skopon-resume-select-card-works", children: [
|
|
1093
1103
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
|
|
1094
|
-
o.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ u(
|
|
1104
|
+
o.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ u(uo, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
|
|
1095
1105
|
] })
|
|
1096
1106
|
] })
|
|
1097
1107
|
]
|
|
1098
1108
|
}
|
|
1099
1109
|
);
|
|
1100
1110
|
}
|
|
1101
|
-
function
|
|
1102
|
-
const { interactive: t } = se(), n =
|
|
1111
|
+
function fo({ context: e }) {
|
|
1112
|
+
const { interactive: t } = se(), n = oo(), { publishLiveOptions: r } = gt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = ae(e, "value", {
|
|
1103
1113
|
component: "SkoponResumeSelect",
|
|
1104
1114
|
changeAction: "click"
|
|
1105
|
-
}), l = e.componentModel.properties, c =
|
|
1106
|
-
|
|
1107
|
-
const T =
|
|
1115
|
+
}), l = e.componentModel.properties, c = tt(l.label), m = tt(l.placeholder), d = tt(l.help), b = l.enableRefresh !== !1, y = Pe(l.minCount), S = Pe(l.maxCount), g = L(() => nt(l.resumeFilter), [l.resumeFilter]), k = io(g), [p, f] = w(1), [v, x] = w(!1), [N, _] = w(""), [z, C] = w([]), [B, V] = w(0), [re, K] = w(g.pageSize ?? 20), $ = A(0), W = Q(o);
|
|
1116
|
+
q(() => {
|
|
1117
|
+
const T = hn(W, S);
|
|
1108
1118
|
T !== null && s(T);
|
|
1109
|
-
}, [S,
|
|
1110
|
-
const ee =
|
|
1119
|
+
}, [S, W, s]);
|
|
1120
|
+
const ee = j(
|
|
1111
1121
|
async (T) => {
|
|
1112
|
-
const
|
|
1122
|
+
const D = nt(JSON.parse(k)), U = ++$.current;
|
|
1113
1123
|
if (!n) {
|
|
1114
|
-
C([]),
|
|
1124
|
+
C([]), V(0), _("未配置简历搜索服务"), x(!1);
|
|
1115
1125
|
return;
|
|
1116
1126
|
}
|
|
1117
1127
|
x(!0), _("");
|
|
1118
1128
|
try {
|
|
1119
|
-
const I = await n({ filter:
|
|
1120
|
-
if (
|
|
1121
|
-
C(I.list),
|
|
1129
|
+
const I = await n({ filter: D, page: T });
|
|
1130
|
+
if (U !== $.current) return;
|
|
1131
|
+
C(I.list), V(I.total), f(I.page), K(I.pageSize), a && r(
|
|
1122
1132
|
a,
|
|
1123
|
-
I.list.map((
|
|
1124
|
-
value:
|
|
1125
|
-
label:
|
|
1133
|
+
I.list.map((Y) => ({
|
|
1134
|
+
value: Y.resumeUniqueId,
|
|
1135
|
+
label: Y.name || Y.resumeUniqueId
|
|
1126
1136
|
}))
|
|
1127
1137
|
);
|
|
1128
1138
|
} catch (I) {
|
|
1129
|
-
if (
|
|
1130
|
-
C([]),
|
|
1139
|
+
if (U !== $.current) return;
|
|
1140
|
+
C([]), V(0), _(I instanceof Error ? I.message : "加载简历列表失败");
|
|
1131
1141
|
} finally {
|
|
1132
|
-
|
|
1142
|
+
U === $.current && x(!1);
|
|
1133
1143
|
}
|
|
1134
1144
|
},
|
|
1135
1145
|
[n, k, a, r]
|
|
1136
1146
|
);
|
|
1137
|
-
|
|
1147
|
+
q(() => {
|
|
1138
1148
|
f(1), ee(1);
|
|
1139
1149
|
}, [k, ee]);
|
|
1140
1150
|
const te = (T) => {
|
|
1141
1151
|
if (!t) return;
|
|
1142
|
-
const
|
|
1143
|
-
|
|
1152
|
+
const D = fn(
|
|
1153
|
+
W,
|
|
1144
1154
|
T,
|
|
1145
|
-
|
|
1155
|
+
y,
|
|
1146
1156
|
S
|
|
1147
1157
|
);
|
|
1148
|
-
|
|
1149
|
-
},
|
|
1150
|
-
const T =
|
|
1158
|
+
D !== null && i(D);
|
|
1159
|
+
}, E = () => {
|
|
1160
|
+
const T = nt(JSON.parse(k)), D = re || T.pageSize || 20, U = Math.max(1, Math.ceil(B / D)), I = p >= U ? 1 : p + 1;
|
|
1151
1161
|
ee(I);
|
|
1152
|
-
},
|
|
1162
|
+
}, P = m || "暂无匹配的简历";
|
|
1153
1163
|
return /* @__PURE__ */ M(
|
|
1154
1164
|
"div",
|
|
1155
1165
|
{
|
|
@@ -1157,22 +1167,22 @@ function ao({ context: e }) {
|
|
|
1157
1167
|
"data-skopon-field": a || void 0,
|
|
1158
1168
|
children: [
|
|
1159
1169
|
c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
|
|
1160
|
-
v &&
|
|
1161
|
-
/* @__PURE__ */ u(
|
|
1170
|
+
v && z.length === 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-status", children: [
|
|
1171
|
+
/* @__PURE__ */ u(ft, { size: "small" }),
|
|
1162
1172
|
" 加载简历…"
|
|
1163
1173
|
] }) : null,
|
|
1164
1174
|
!v && N ? /* @__PURE__ */ u(ne.Text, { type: "danger", className: "skopon-resume-select-status", children: N }) : null,
|
|
1165
|
-
!v && !N &&
|
|
1166
|
-
|
|
1167
|
-
|
|
1175
|
+
!v && !N && z.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: P }) : null,
|
|
1176
|
+
z.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: z.map((T) => /* @__PURE__ */ u(
|
|
1177
|
+
mo,
|
|
1168
1178
|
{
|
|
1169
1179
|
item: T,
|
|
1170
|
-
selected:
|
|
1171
|
-
disabled:
|
|
1172
|
-
|
|
1180
|
+
selected: W.includes(T.resumeUniqueId),
|
|
1181
|
+
disabled: pn(
|
|
1182
|
+
W,
|
|
1173
1183
|
T.resumeUniqueId,
|
|
1174
1184
|
t,
|
|
1175
|
-
|
|
1185
|
+
y,
|
|
1176
1186
|
S
|
|
1177
1187
|
),
|
|
1178
1188
|
onToggle: () => te(T.resumeUniqueId)
|
|
@@ -1184,10 +1194,10 @@ function ao({ context: e }) {
|
|
|
1184
1194
|
{
|
|
1185
1195
|
type: "default",
|
|
1186
1196
|
size: "small",
|
|
1187
|
-
icon: /* @__PURE__ */ u(
|
|
1197
|
+
icon: /* @__PURE__ */ u(Yt, {}),
|
|
1188
1198
|
loading: v,
|
|
1189
1199
|
disabled: !t,
|
|
1190
|
-
onClick:
|
|
1200
|
+
onClick: E,
|
|
1191
1201
|
children: "换一批"
|
|
1192
1202
|
}
|
|
1193
1203
|
) }) : null,
|
|
@@ -1196,63 +1206,63 @@ function ao({ context: e }) {
|
|
|
1196
1206
|
}
|
|
1197
1207
|
);
|
|
1198
1208
|
}
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
),
|
|
1209
|
+
const po = X(
|
|
1210
|
+
so,
|
|
1211
|
+
fo
|
|
1212
|
+
), ho = {
|
|
1203
1213
|
type: "resume_multiselect",
|
|
1204
1214
|
componentName: "SkoponResumeSelect",
|
|
1205
|
-
toComponent:
|
|
1206
|
-
fromComponent:
|
|
1207
|
-
catalogComponents: [
|
|
1208
|
-
}, Be = [
|
|
1215
|
+
toComponent: no,
|
|
1216
|
+
fromComponent: ro,
|
|
1217
|
+
catalogComponents: [po]
|
|
1218
|
+
}, Be = [ho, to], go = new Map(
|
|
1209
1219
|
Be.map((e) => [e.type, e])
|
|
1210
|
-
),
|
|
1220
|
+
), yo = new Map(
|
|
1211
1221
|
Be.map((e) => [e.componentName, e])
|
|
1212
1222
|
);
|
|
1213
|
-
function
|
|
1214
|
-
return
|
|
1223
|
+
function vo(e) {
|
|
1224
|
+
return go.get(e);
|
|
1215
1225
|
}
|
|
1216
|
-
function
|
|
1217
|
-
return
|
|
1226
|
+
function bo(e) {
|
|
1227
|
+
return yo.get(e);
|
|
1218
1228
|
}
|
|
1219
|
-
function
|
|
1229
|
+
function So() {
|
|
1220
1230
|
return Be.flatMap((e) => e.catalogComponents);
|
|
1221
1231
|
}
|
|
1222
|
-
function
|
|
1232
|
+
function ko() {
|
|
1223
1233
|
return Be.map((e) => e.componentName);
|
|
1224
1234
|
}
|
|
1225
|
-
const
|
|
1226
|
-
function
|
|
1235
|
+
const we = "root", ut = "__title__", mt = "__desc__", yt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
|
|
1236
|
+
function Co(e) {
|
|
1227
1237
|
return `/${e}`;
|
|
1228
1238
|
}
|
|
1229
|
-
function
|
|
1239
|
+
function Jt(e) {
|
|
1230
1240
|
return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
|
|
1231
1241
|
}
|
|
1232
1242
|
function H(e) {
|
|
1233
1243
|
if (typeof e == "string") return e;
|
|
1234
1244
|
}
|
|
1235
|
-
function
|
|
1245
|
+
function Ao(e) {
|
|
1236
1246
|
const t = e.id || le("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
|
|
1237
1247
|
return {
|
|
1238
1248
|
id: t,
|
|
1239
1249
|
component: "SkoponMedia",
|
|
1240
1250
|
mediaType: n,
|
|
1241
|
-
urls:
|
|
1242
|
-
mediaSize:
|
|
1251
|
+
urls: Ar(e),
|
|
1252
|
+
mediaSize: xe(e.mediaSize),
|
|
1243
1253
|
label: e.label ?? "",
|
|
1244
1254
|
help: e.help ?? "",
|
|
1245
1255
|
placeholder: e.placeholder ?? ""
|
|
1246
1256
|
};
|
|
1247
1257
|
}
|
|
1248
|
-
function
|
|
1258
|
+
function _o(e) {
|
|
1249
1259
|
if (Array.isArray(e.urls))
|
|
1250
1260
|
return e.urls.map((n) => String(n).trim()).filter(Boolean);
|
|
1251
1261
|
const t = H(e.url);
|
|
1252
1262
|
return t != null && t.trim() ? [t.trim()] : [];
|
|
1253
1263
|
}
|
|
1254
|
-
function
|
|
1255
|
-
const r = typeof e.id == "string" ? e.id : le("block-"), o =
|
|
1264
|
+
function Fe(e, t, n) {
|
|
1265
|
+
const r = typeof e.id == "string" ? e.id : le("block-"), o = _o(e), i = H(e.label) ?? H(e.description) ?? n, s = H(e.help), a = H(e.placeholder), l = xe(e.mediaSize);
|
|
1256
1266
|
return {
|
|
1257
1267
|
id: r,
|
|
1258
1268
|
type: t,
|
|
@@ -1263,10 +1273,10 @@ function Ee(e, t, n) {
|
|
|
1263
1273
|
mediaUrls: o.length > 0 ? o : [""]
|
|
1264
1274
|
};
|
|
1265
1275
|
}
|
|
1266
|
-
function
|
|
1276
|
+
function Gt(e) {
|
|
1267
1277
|
switch (e.type) {
|
|
1268
1278
|
case "toggle":
|
|
1269
|
-
return
|
|
1279
|
+
return Me(e.defaultValue);
|
|
1270
1280
|
case "multiselect":
|
|
1271
1281
|
case "checkbox":
|
|
1272
1282
|
case "resume_multiselect":
|
|
@@ -1280,9 +1290,9 @@ function So(e) {
|
|
|
1280
1290
|
return typeof e.defaultValue == "string" ? e.defaultValue : "";
|
|
1281
1291
|
}
|
|
1282
1292
|
}
|
|
1283
|
-
function
|
|
1293
|
+
function To(e) {
|
|
1284
1294
|
var c;
|
|
1285
|
-
const t = e.id || le("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ?
|
|
1295
|
+
const t = e.id || le("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? Co(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), s = (m) => r ? { node: m, dataKey: r, dataValue: Gt(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = vo(e.type);
|
|
1286
1296
|
if (l)
|
|
1287
1297
|
return l.toComponent(e, a);
|
|
1288
1298
|
switch (e.type) {
|
|
@@ -1291,6 +1301,14 @@ function ko(e) {
|
|
|
1291
1301
|
case "paragraph":
|
|
1292
1302
|
return { node: { id: t, component: "Text", text: n, variant: "body" } };
|
|
1293
1303
|
case "text":
|
|
1304
|
+
return e.hidden ? r ? { node: null, dataKey: r, dataValue: Gt(e) } : { node: null } : s({
|
|
1305
|
+
id: t,
|
|
1306
|
+
component: "TextField",
|
|
1307
|
+
label: n,
|
|
1308
|
+
variant: "shortText",
|
|
1309
|
+
...e.placeholder ? { placeholder: e.placeholder } : {},
|
|
1310
|
+
value: { path: o }
|
|
1311
|
+
});
|
|
1294
1312
|
case "tel":
|
|
1295
1313
|
case "url":
|
|
1296
1314
|
return s({
|
|
@@ -1307,7 +1325,7 @@ function ko(e) {
|
|
|
1307
1325
|
component: "TextField",
|
|
1308
1326
|
label: n,
|
|
1309
1327
|
variant: "shortText",
|
|
1310
|
-
validationRegexp:
|
|
1328
|
+
validationRegexp: yt,
|
|
1311
1329
|
...e.placeholder ? { placeholder: e.placeholder } : {},
|
|
1312
1330
|
value: { path: o }
|
|
1313
1331
|
});
|
|
@@ -1393,7 +1411,7 @@ function ko(e) {
|
|
|
1393
1411
|
case "image":
|
|
1394
1412
|
case "video":
|
|
1395
1413
|
case "audio":
|
|
1396
|
-
return { node:
|
|
1414
|
+
return { node: Ao(e) };
|
|
1397
1415
|
case "file":
|
|
1398
1416
|
return s({
|
|
1399
1417
|
id: t,
|
|
@@ -1410,31 +1428,31 @@ function ko(e) {
|
|
|
1410
1428
|
return { node: null };
|
|
1411
1429
|
}
|
|
1412
1430
|
}
|
|
1413
|
-
function
|
|
1431
|
+
function dt(e) {
|
|
1414
1432
|
if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
|
|
1415
|
-
const t = e.components.find((r) => r.id ===
|
|
1433
|
+
const t = e.components.find((r) => r.id === we);
|
|
1416
1434
|
if (!t) return e.components.length === 0;
|
|
1417
1435
|
const n = t.children;
|
|
1418
1436
|
return !Array.isArray(n) || n.length === 0;
|
|
1419
1437
|
}
|
|
1420
|
-
function
|
|
1438
|
+
function vn(e, t) {
|
|
1421
1439
|
const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, s = (e.title ?? "").trim(), a = (e.description ?? "").trim();
|
|
1422
|
-
i && s && (n.push({ id:
|
|
1440
|
+
i && s && (n.push({ id: ut, component: "Text", text: s, variant: "h2" }), r.push(ut)), i && a && (n.push({ id: mt, component: "Text", text: a, variant: "body" }), r.push(mt));
|
|
1423
1441
|
for (const m of e.blocks ?? []) {
|
|
1424
|
-
const { node: d, dataKey: b, dataValue:
|
|
1425
|
-
d && (n.push(d), r.push(d.id)
|
|
1442
|
+
const { node: d, dataKey: b, dataValue: y } = To(m);
|
|
1443
|
+
b && (o[b] = y), d && (n.push(d), r.push(d.id));
|
|
1426
1444
|
}
|
|
1427
|
-
n.unshift({ id:
|
|
1428
|
-
const l = { root:
|
|
1445
|
+
n.unshift({ id: we, component: "Column", children: r });
|
|
1446
|
+
const l = { root: we, components: n, dataModel: o }, c = t == null ? void 0 : t.styleId;
|
|
1429
1447
|
return c !== void 0 && (l.surfaceProperties = { styleId: c ?? null }), l;
|
|
1430
1448
|
}
|
|
1431
|
-
function
|
|
1449
|
+
function xo(e) {
|
|
1432
1450
|
const t = /* @__PURE__ */ new Map();
|
|
1433
1451
|
for (const n of e.components ?? [])
|
|
1434
1452
|
n && typeof n.id == "string" && t.set(n.id, n);
|
|
1435
1453
|
return t;
|
|
1436
1454
|
}
|
|
1437
|
-
function
|
|
1455
|
+
function ot(e) {
|
|
1438
1456
|
const t = e.options;
|
|
1439
1457
|
return Array.isArray(t) ? t.map((n) => {
|
|
1440
1458
|
if (!n || typeof n != "object") return null;
|
|
@@ -1445,10 +1463,10 @@ function rt(e) {
|
|
|
1445
1463
|
};
|
|
1446
1464
|
}).filter((n) => !!n) : [];
|
|
1447
1465
|
}
|
|
1448
|
-
function
|
|
1449
|
-
const t = typeof e.id == "string" ? e.id : le("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o =
|
|
1466
|
+
function Mo(e) {
|
|
1467
|
+
const t = typeof e.id == "string" ? e.id : le("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o = Jt(e.value), i = (a) => ({ id: t, type: a, label: r }), s = bo(n);
|
|
1450
1468
|
if (s)
|
|
1451
|
-
return s.fromComponent(e, i, { asLiteral: H, nameFromValue:
|
|
1469
|
+
return s.fromComponent(e, i, { asLiteral: H, nameFromValue: Jt });
|
|
1452
1470
|
switch (n) {
|
|
1453
1471
|
case "Text": {
|
|
1454
1472
|
const a = String(e.variant ?? "body"), l = /^h[1-6]$/i.test(a) || a === "title" || a === "subtitle";
|
|
@@ -1457,7 +1475,7 @@ function Ao(e) {
|
|
|
1457
1475
|
case "TextField": {
|
|
1458
1476
|
const a = String(e.variant ?? "shortText");
|
|
1459
1477
|
let l = "text";
|
|
1460
|
-
a === "longText" ? l = "textarea" : a === "number" ? l = "number" : H(e.validationRegexp) ===
|
|
1478
|
+
a === "longText" ? l = "textarea" : a === "number" ? l = "number" : H(e.validationRegexp) === yt && (l = "email");
|
|
1461
1479
|
const c = { ...i(l), name: o }, m = H(e.placeholder);
|
|
1462
1480
|
return m && (c.placeholder = m), c;
|
|
1463
1481
|
}
|
|
@@ -1467,7 +1485,7 @@ function Ao(e) {
|
|
|
1467
1485
|
const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", c = {
|
|
1468
1486
|
...i(l),
|
|
1469
1487
|
name: o,
|
|
1470
|
-
options:
|
|
1488
|
+
options: ot(e)
|
|
1471
1489
|
}, m = H(e.placeholder);
|
|
1472
1490
|
return m && (c.placeholder = m), c;
|
|
1473
1491
|
}
|
|
@@ -1477,12 +1495,12 @@ function Ao(e) {
|
|
|
1477
1495
|
const m = {
|
|
1478
1496
|
...i(a),
|
|
1479
1497
|
name: o,
|
|
1480
|
-
options:
|
|
1498
|
+
options: ot(e)
|
|
1481
1499
|
}, d = H(e.placeholder);
|
|
1482
1500
|
return d && (m.placeholder = d), m;
|
|
1483
1501
|
}
|
|
1484
1502
|
const c = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
|
|
1485
|
-
return { ...i(c), name: o, options:
|
|
1503
|
+
return { ...i(c), name: o, options: ot(e) };
|
|
1486
1504
|
}
|
|
1487
1505
|
case "DateTimeInput": {
|
|
1488
1506
|
const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d = H(e.placeholder);
|
|
@@ -1490,14 +1508,14 @@ function Ao(e) {
|
|
|
1490
1508
|
}
|
|
1491
1509
|
case "SkoponMedia": {
|
|
1492
1510
|
const a = String(e.mediaType ?? "image");
|
|
1493
|
-
return
|
|
1511
|
+
return Fe(e, a === "video" ? "video" : a === "audio" ? "audio" : "image", r);
|
|
1494
1512
|
}
|
|
1495
1513
|
case "Image":
|
|
1496
|
-
return
|
|
1514
|
+
return Fe(e, "image", r);
|
|
1497
1515
|
case "Video":
|
|
1498
|
-
return
|
|
1516
|
+
return Fe(e, "video", r);
|
|
1499
1517
|
case "AudioPlayer":
|
|
1500
|
-
return
|
|
1518
|
+
return Fe(e, "audio", r);
|
|
1501
1519
|
case "FileUpload": {
|
|
1502
1520
|
const a = H(e.accept) ?? "", l = { ...i("file"), name: o };
|
|
1503
1521
|
return a && (l.fileAcceptExtensions = a.split(",").map((c) => c.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (l.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (l.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (l.fileMinCount = e.minCount), typeof e.maxCount == "number" && (l.fileMaxCount = e.maxCount), l;
|
|
@@ -1506,7 +1524,7 @@ function Ao(e) {
|
|
|
1506
1524
|
return null;
|
|
1507
1525
|
}
|
|
1508
1526
|
}
|
|
1509
|
-
function
|
|
1527
|
+
function bn(e, t, n, r) {
|
|
1510
1528
|
if (n.has(e)) return;
|
|
1511
1529
|
n.add(e);
|
|
1512
1530
|
const o = t.get(e);
|
|
@@ -1514,46 +1532,46 @@ function yn(e, t, n, r) {
|
|
|
1514
1532
|
const i = String(o.component ?? "");
|
|
1515
1533
|
if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
|
|
1516
1534
|
for (const s of o.children)
|
|
1517
|
-
typeof s == "string" &&
|
|
1535
|
+
typeof s == "string" && bn(s, t, n, r);
|
|
1518
1536
|
return;
|
|
1519
1537
|
}
|
|
1520
1538
|
r.push(o);
|
|
1521
1539
|
}
|
|
1522
|
-
function
|
|
1540
|
+
function No(e, t) {
|
|
1523
1541
|
return t ? e.map((n) => {
|
|
1524
1542
|
var i;
|
|
1525
1543
|
const r = (i = n.name) == null ? void 0 : i.trim();
|
|
1526
1544
|
if (!r || !(r in t)) return n;
|
|
1527
1545
|
const o = t[r];
|
|
1528
|
-
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue:
|
|
1546
|
+
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: Me(o) } : { ...n, defaultValue: o };
|
|
1529
1547
|
}) : e;
|
|
1530
1548
|
}
|
|
1531
|
-
function
|
|
1549
|
+
function Io(e) {
|
|
1532
1550
|
if (!e || !Array.isArray(e.components))
|
|
1533
|
-
return
|
|
1534
|
-
const t =
|
|
1535
|
-
|
|
1551
|
+
return be({ title: "", description: "", blocks: [] });
|
|
1552
|
+
const t = xo(e), n = [];
|
|
1553
|
+
bn(e.root ?? we, t, /* @__PURE__ */ new Set(), n);
|
|
1536
1554
|
let r = "", o = "";
|
|
1537
1555
|
const i = [];
|
|
1538
1556
|
for (const s of n) {
|
|
1539
|
-
if (s.id ===
|
|
1557
|
+
if (s.id === ut) {
|
|
1540
1558
|
r = H(s.text) ?? r;
|
|
1541
1559
|
continue;
|
|
1542
1560
|
}
|
|
1543
|
-
if (s.id ===
|
|
1561
|
+
if (s.id === mt) {
|
|
1544
1562
|
o = H(s.text) ?? o;
|
|
1545
1563
|
continue;
|
|
1546
1564
|
}
|
|
1547
|
-
const a =
|
|
1565
|
+
const a = Mo(s);
|
|
1548
1566
|
a && i.push(a);
|
|
1549
1567
|
}
|
|
1550
|
-
return
|
|
1568
|
+
return be({
|
|
1551
1569
|
title: r,
|
|
1552
1570
|
description: o,
|
|
1553
|
-
blocks:
|
|
1571
|
+
blocks: No(i, e.dataModel)
|
|
1554
1572
|
});
|
|
1555
1573
|
}
|
|
1556
|
-
function
|
|
1574
|
+
function Fo(e, t) {
|
|
1557
1575
|
const { surfaceId: n, catalogId: r } = t, o = [
|
|
1558
1576
|
{ version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
|
|
1559
1577
|
{
|
|
@@ -1566,25 +1584,25 @@ function xo(e, t) {
|
|
|
1566
1584
|
updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
|
|
1567
1585
|
}), o;
|
|
1568
1586
|
}
|
|
1569
|
-
function
|
|
1587
|
+
function Sn(e) {
|
|
1570
1588
|
return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
|
|
1571
1589
|
}
|
|
1572
|
-
function
|
|
1590
|
+
function Eo(e, t) {
|
|
1573
1591
|
if (!e || typeof e != "object") return null;
|
|
1574
|
-
const n = e, r =
|
|
1575
|
-
if (r && !
|
|
1592
|
+
const n = e, r = Sn(n.a2ui) ? n.a2ui : void 0;
|
|
1593
|
+
if (r && !dt(r)) return r;
|
|
1576
1594
|
const o = Array.isArray(n.blocks) ? n.blocks : [];
|
|
1577
1595
|
if (o.length === 0) return null;
|
|
1578
1596
|
const i = qe({
|
|
1579
1597
|
title: typeof n.title == "string" ? n.title : "",
|
|
1580
1598
|
description: typeof n.description == "string" ? n.description : "",
|
|
1581
1599
|
blocks: o,
|
|
1582
|
-
jsonSchema:
|
|
1583
|
-
}), s =
|
|
1584
|
-
return
|
|
1600
|
+
jsonSchema: on(n.jsonSchema ?? n.json_schema)
|
|
1601
|
+
}), s = vn(i, t);
|
|
1602
|
+
return dt(s) ? null : s;
|
|
1585
1603
|
}
|
|
1586
|
-
function
|
|
1587
|
-
return
|
|
1604
|
+
function Uo(e, t, n) {
|
|
1605
|
+
return vn(
|
|
1588
1606
|
{
|
|
1589
1607
|
title: e.title,
|
|
1590
1608
|
description: e.description,
|
|
@@ -1593,18 +1611,18 @@ function No(e, t, n) {
|
|
|
1593
1611
|
n
|
|
1594
1612
|
);
|
|
1595
1613
|
}
|
|
1596
|
-
function
|
|
1614
|
+
function Ro(e) {
|
|
1597
1615
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1598
1616
|
return;
|
|
1599
1617
|
const t = e;
|
|
1600
|
-
return !(Array.isArray(t.blocks) && t.blocks.length > 0) &&
|
|
1618
|
+
return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Sn(t.a2ui) ? Io(t.a2ui) : qe({
|
|
1601
1619
|
title: typeof t.title == "string" ? t.title : "",
|
|
1602
1620
|
description: typeof t.description == "string" ? t.description : "",
|
|
1603
1621
|
blocks: Array.isArray(t.blocks) ? t.blocks : [],
|
|
1604
|
-
jsonSchema:
|
|
1622
|
+
jsonSchema: on(t.jsonSchema ?? t.json_schema)
|
|
1605
1623
|
});
|
|
1606
1624
|
}
|
|
1607
|
-
function
|
|
1625
|
+
function Po(e, t, n) {
|
|
1608
1626
|
const r = e.model.surfacesMap.get(t);
|
|
1609
1627
|
if (!r) return {};
|
|
1610
1628
|
const o = {};
|
|
@@ -1614,15 +1632,18 @@ function Fo(e, t, n) {
|
|
|
1614
1632
|
}
|
|
1615
1633
|
return o;
|
|
1616
1634
|
}
|
|
1617
|
-
const
|
|
1618
|
-
function
|
|
1635
|
+
const wo = /* @__PURE__ */ new Set(["type", "name", "id"]);
|
|
1636
|
+
function vt(e) {
|
|
1637
|
+
return e.type === "text" && e.hidden === !0;
|
|
1638
|
+
}
|
|
1639
|
+
function bt(e) {
|
|
1619
1640
|
return qe({
|
|
1620
1641
|
title: "",
|
|
1621
1642
|
description: "",
|
|
1622
1643
|
blocks: [e]
|
|
1623
1644
|
}).blocks[0];
|
|
1624
1645
|
}
|
|
1625
|
-
function
|
|
1646
|
+
function zo(e, t) {
|
|
1626
1647
|
var o, i;
|
|
1627
1648
|
const n = /* @__PURE__ */ new Map();
|
|
1628
1649
|
for (const s of t) {
|
|
@@ -1631,19 +1652,19 @@ function Uo(e, t) {
|
|
|
1631
1652
|
}
|
|
1632
1653
|
const r = [];
|
|
1633
1654
|
for (const s of e.blocks) {
|
|
1634
|
-
if (
|
|
1635
|
-
r.push(
|
|
1655
|
+
if (_e(s.type)) {
|
|
1656
|
+
r.push(bt(s));
|
|
1636
1657
|
continue;
|
|
1637
1658
|
}
|
|
1638
1659
|
if (!Z(s.type)) continue;
|
|
1639
1660
|
const a = (i = s.name) == null ? void 0 : i.trim();
|
|
1640
1661
|
if (!a) continue;
|
|
1641
1662
|
const l = n.get(a);
|
|
1642
|
-
l && r.push(l);
|
|
1663
|
+
l && (vt(l) || r.push(l));
|
|
1643
1664
|
}
|
|
1644
1665
|
return r;
|
|
1645
1666
|
}
|
|
1646
|
-
function
|
|
1667
|
+
function Oo(e, t, n) {
|
|
1647
1668
|
const r = e.rawBlocks;
|
|
1648
1669
|
if (!(r != null && r.length)) return n;
|
|
1649
1670
|
for (const o of r) {
|
|
@@ -1652,17 +1673,17 @@ function Ro(e, t, n) {
|
|
|
1652
1673
|
}
|
|
1653
1674
|
return n;
|
|
1654
1675
|
}
|
|
1655
|
-
function
|
|
1676
|
+
function qo(e, t) {
|
|
1656
1677
|
var r;
|
|
1657
1678
|
const n = { ...e };
|
|
1658
1679
|
for (const o of Object.keys(t)) {
|
|
1659
|
-
if (
|
|
1680
|
+
if (wo.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
|
|
1660
1681
|
const i = t[o];
|
|
1661
1682
|
i !== void 0 && Object.assign(n, { [o]: i });
|
|
1662
1683
|
}
|
|
1663
|
-
return n.type = e.type, n.name = ((r = e.name) == null ? void 0 : r.trim()) || t.name, n.id = e.id,
|
|
1684
|
+
return n.type = e.type, n.name = ((r = e.name) == null ? void 0 : r.trim()) || t.name, n.id = e.id, bt(n);
|
|
1664
1685
|
}
|
|
1665
|
-
function
|
|
1686
|
+
function Ve(e) {
|
|
1666
1687
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1667
1688
|
const t = e;
|
|
1668
1689
|
if (!Array.isArray(t.blocks)) return null;
|
|
@@ -1680,7 +1701,7 @@ function Le(e) {
|
|
|
1680
1701
|
rawBlocks: n
|
|
1681
1702
|
};
|
|
1682
1703
|
}
|
|
1683
|
-
function
|
|
1704
|
+
function Bo(e, t) {
|
|
1684
1705
|
var i, s, a, l, c, m;
|
|
1685
1706
|
const n = /* @__PURE__ */ new Map();
|
|
1686
1707
|
for (const d of (t == null ? void 0 : t.blocks) ?? [])
|
|
@@ -1690,36 +1711,36 @@ function wo(e, t) {
|
|
|
1690
1711
|
if (!Z(d.type)) continue;
|
|
1691
1712
|
const b = (s = d.name) == null ? void 0 : s.trim();
|
|
1692
1713
|
if (!b) continue;
|
|
1693
|
-
const
|
|
1694
|
-
if (
|
|
1695
|
-
const S =
|
|
1696
|
-
r.push(
|
|
1714
|
+
const y = n.get(b);
|
|
1715
|
+
if (y) {
|
|
1716
|
+
const S = Oo(e, b, d);
|
|
1717
|
+
r.push(qo(y, S));
|
|
1697
1718
|
} else
|
|
1698
|
-
o.push(
|
|
1719
|
+
o.push(bt(d));
|
|
1699
1720
|
}
|
|
1700
1721
|
return {
|
|
1701
1722
|
matchedBlocks: r,
|
|
1702
1723
|
extraBlocks: o,
|
|
1703
|
-
renderBlocks:
|
|
1724
|
+
renderBlocks: zo(e, r),
|
|
1704
1725
|
title: ((a = e.title) == null ? void 0 : a.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
|
|
1705
1726
|
description: ((c = e.description) == null ? void 0 : c.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
|
|
1706
1727
|
};
|
|
1707
1728
|
}
|
|
1708
|
-
function
|
|
1729
|
+
function kn(e) {
|
|
1709
1730
|
const { type: t, defaultValue: n } = e;
|
|
1710
1731
|
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 : "";
|
|
1711
1732
|
}
|
|
1712
|
-
function
|
|
1733
|
+
function ze(e) {
|
|
1713
1734
|
var n;
|
|
1714
1735
|
const t = {};
|
|
1715
1736
|
for (const r of e) {
|
|
1716
1737
|
if (!Z(r.type)) continue;
|
|
1717
1738
|
const o = (n = r.name) == null ? void 0 : n.trim();
|
|
1718
|
-
o && (t[o] =
|
|
1739
|
+
o && (t[o] = kn(r));
|
|
1719
1740
|
}
|
|
1720
1741
|
return t;
|
|
1721
1742
|
}
|
|
1722
|
-
function
|
|
1743
|
+
function Vo(e) {
|
|
1723
1744
|
return e.blocks.some(
|
|
1724
1745
|
(t) => {
|
|
1725
1746
|
var n;
|
|
@@ -1727,61 +1748,71 @@ function Oo(e) {
|
|
|
1727
1748
|
}
|
|
1728
1749
|
);
|
|
1729
1750
|
}
|
|
1730
|
-
function
|
|
1751
|
+
function Lo(e) {
|
|
1731
1752
|
return e.blocks.filter((t) => {
|
|
1732
1753
|
var n;
|
|
1733
|
-
return
|
|
1754
|
+
return _e(t.type) ? !0 : !Z(t.type) || !((n = t.name) != null && n.trim()) ? !1 : !vt(t);
|
|
1734
1755
|
});
|
|
1735
1756
|
}
|
|
1736
|
-
function
|
|
1757
|
+
function bs(e) {
|
|
1737
1758
|
return e.blocks.filter((t) => {
|
|
1738
1759
|
var n;
|
|
1739
1760
|
return Z(t.type) && ((n = t.name) == null ? void 0 : n.trim());
|
|
1740
1761
|
}).map((t) => t.name.trim());
|
|
1741
1762
|
}
|
|
1742
|
-
function
|
|
1763
|
+
function jo(e) {
|
|
1764
|
+
var n;
|
|
1765
|
+
const t = {};
|
|
1766
|
+
for (const r of e.blocks) {
|
|
1767
|
+
if (!vt(r)) continue;
|
|
1768
|
+
const o = (n = r.name) == null ? void 0 : n.trim();
|
|
1769
|
+
o && (t[o] = kn(r));
|
|
1770
|
+
}
|
|
1771
|
+
return t;
|
|
1772
|
+
}
|
|
1773
|
+
function St(e) {
|
|
1743
1774
|
return e.replace(/'/g, "'\\''");
|
|
1744
1775
|
}
|
|
1745
|
-
function
|
|
1776
|
+
function Cn(e) {
|
|
1746
1777
|
var n;
|
|
1747
1778
|
const t = (n = e == null ? void 0 : e.Authorization) == null ? void 0 : n.trim();
|
|
1748
|
-
return t ? ` -H 'Authorization: ${
|
|
1779
|
+
return t ? ` -H 'Authorization: ${St(t)}' \\` : " -H 'Authorization: Bearer <token>' \\";
|
|
1749
1780
|
}
|
|
1750
|
-
function
|
|
1781
|
+
function An(e, t, n) {
|
|
1751
1782
|
const r = (t ?? "").trim() || "<callback_url>", o = JSON.stringify(e ?? {}, null, 2);
|
|
1752
1783
|
return [
|
|
1753
1784
|
`curl -X POST '${r}' \\`,
|
|
1754
1785
|
" -H 'Content-Type: application/json' \\",
|
|
1755
|
-
|
|
1756
|
-
` -d '${
|
|
1786
|
+
Cn(n),
|
|
1787
|
+
` -d '${St(o)}'`
|
|
1757
1788
|
].join(`
|
|
1758
1789
|
`);
|
|
1759
1790
|
}
|
|
1760
|
-
function
|
|
1791
|
+
function $o(e, t) {
|
|
1761
1792
|
return JSON.stringify({ ...e, ...t }, null, 2);
|
|
1762
1793
|
}
|
|
1763
|
-
function
|
|
1794
|
+
function Do({
|
|
1764
1795
|
cardValues: e,
|
|
1765
1796
|
extraValues: t = {},
|
|
1766
1797
|
callbackUrl: n,
|
|
1767
1798
|
headers: r
|
|
1768
1799
|
}) {
|
|
1769
|
-
const o = (n ?? "").trim() || "<callback_url>", i =
|
|
1800
|
+
const o = (n ?? "").trim() || "<callback_url>", i = $o(e, t);
|
|
1770
1801
|
return [
|
|
1771
1802
|
`curl -X POST '${o}' \\`,
|
|
1772
1803
|
" -H 'Content-Type: application/json' \\",
|
|
1773
|
-
|
|
1774
|
-
` -d '${
|
|
1804
|
+
Cn(r),
|
|
1805
|
+
` -d '${St(i)}'`
|
|
1775
1806
|
].join(`
|
|
1776
1807
|
`);
|
|
1777
1808
|
}
|
|
1778
|
-
function
|
|
1779
|
-
const r =
|
|
1780
|
-
if (!r) return
|
|
1781
|
-
const o =
|
|
1782
|
-
return
|
|
1809
|
+
function Ss(e, t, n) {
|
|
1810
|
+
const r = Ve(e);
|
|
1811
|
+
if (!r) return An(e, t, n);
|
|
1812
|
+
const o = ze(r.blocks);
|
|
1813
|
+
return Do({ cardValues: o, callbackUrl: t, headers: n });
|
|
1783
1814
|
}
|
|
1784
|
-
async function
|
|
1815
|
+
async function _n(e, t, n) {
|
|
1785
1816
|
const r = e.trim();
|
|
1786
1817
|
if (!r)
|
|
1787
1818
|
throw new Error("callback_url 为空");
|
|
@@ -1808,7 +1839,7 @@ async function kn(e, t, n) {
|
|
|
1808
1839
|
}
|
|
1809
1840
|
return { ok: i.ok, status: i.status, body: s };
|
|
1810
1841
|
}
|
|
1811
|
-
async function
|
|
1842
|
+
async function ks(e) {
|
|
1812
1843
|
var n;
|
|
1813
1844
|
if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
|
|
1814
1845
|
await navigator.clipboard.writeText(e);
|
|
@@ -1824,7 +1855,7 @@ async function ys(e) {
|
|
|
1824
1855
|
document.body.removeChild(t);
|
|
1825
1856
|
}
|
|
1826
1857
|
}
|
|
1827
|
-
async function
|
|
1858
|
+
async function kt(e) {
|
|
1828
1859
|
let t;
|
|
1829
1860
|
try {
|
|
1830
1861
|
t = await e.json();
|
|
@@ -1837,8 +1868,8 @@ async function St(e) {
|
|
|
1837
1868
|
throw new Error(t.message || `响应缺少 data (${e.status})`);
|
|
1838
1869
|
return t.data;
|
|
1839
1870
|
}
|
|
1840
|
-
const
|
|
1841
|
-
function
|
|
1871
|
+
const Ct = "auth_user", Ho = "token", Ko = "answer_agent_callback_url", Jo = "realtime_ws_url", Go = "/api/v1/mock/ask_user_answer_mock";
|
|
1872
|
+
function At(e) {
|
|
1842
1873
|
if (typeof window > "u") return null;
|
|
1843
1874
|
try {
|
|
1844
1875
|
return e === "localStorage" ? window.localStorage : window.sessionStorage;
|
|
@@ -1846,7 +1877,7 @@ function Ct(e) {
|
|
|
1846
1877
|
return null;
|
|
1847
1878
|
}
|
|
1848
1879
|
}
|
|
1849
|
-
function
|
|
1880
|
+
function _t(e) {
|
|
1850
1881
|
try {
|
|
1851
1882
|
const t = JSON.parse(e);
|
|
1852
1883
|
return !t || typeof t != "object" || Array.isArray(t) ? null : t;
|
|
@@ -1854,50 +1885,50 @@ function At(e) {
|
|
|
1854
1885
|
return null;
|
|
1855
1886
|
}
|
|
1856
1887
|
}
|
|
1857
|
-
function
|
|
1858
|
-
const n =
|
|
1888
|
+
function Wo(e, t) {
|
|
1889
|
+
const n = _t(e);
|
|
1859
1890
|
if (!n) return "";
|
|
1860
1891
|
const r = n[t];
|
|
1861
1892
|
return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
|
|
1862
1893
|
}
|
|
1863
|
-
function
|
|
1864
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ??
|
|
1894
|
+
function Yo(e = {}) {
|
|
1895
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.answerAgentCallbackUrlField ?? Ko, o = At(t);
|
|
1865
1896
|
if (!o) return "";
|
|
1866
1897
|
const i = o.getItem(n);
|
|
1867
1898
|
if (!i) return "";
|
|
1868
|
-
const s =
|
|
1899
|
+
const s = _t(i);
|
|
1869
1900
|
if (!s) return "";
|
|
1870
1901
|
const a = s[r];
|
|
1871
|
-
return (typeof a == "string" ? a.trim() : "") ||
|
|
1902
|
+
return (typeof a == "string" ? a.trim() : "") || Go;
|
|
1872
1903
|
}
|
|
1873
|
-
function
|
|
1874
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ??
|
|
1904
|
+
function Qo(e = {}) {
|
|
1905
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.realtimeWsUrlField ?? Jo, o = At(t);
|
|
1875
1906
|
if (!o) return "";
|
|
1876
1907
|
const i = o.getItem(n);
|
|
1877
1908
|
if (!i) return "";
|
|
1878
|
-
const s =
|
|
1909
|
+
const s = _t(i);
|
|
1879
1910
|
if (!s) return "";
|
|
1880
1911
|
const a = s[r];
|
|
1881
1912
|
return typeof a == "string" ? a.trim() : "";
|
|
1882
1913
|
}
|
|
1883
|
-
function
|
|
1914
|
+
function Tt(e, t) {
|
|
1884
1915
|
return {
|
|
1885
|
-
...
|
|
1916
|
+
...Tn(t),
|
|
1886
1917
|
...e ?? {}
|
|
1887
1918
|
};
|
|
1888
1919
|
}
|
|
1889
|
-
function
|
|
1890
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ??
|
|
1920
|
+
function Tn(e = {}) {
|
|
1921
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.tokenField ?? Ho, o = At(t);
|
|
1891
1922
|
if (!o) return {};
|
|
1892
1923
|
const i = o.getItem(n);
|
|
1893
1924
|
if (!i) return {};
|
|
1894
|
-
const s =
|
|
1925
|
+
const s = Wo(i, r);
|
|
1895
1926
|
return s ? { Authorization: `Bearer ${s}` } : {};
|
|
1896
1927
|
}
|
|
1897
|
-
async function
|
|
1898
|
-
return e.getHeaders ? await e.getHeaders() ?? {} :
|
|
1928
|
+
async function xt(e = {}) {
|
|
1929
|
+
return e.getHeaders ? await e.getHeaders() ?? {} : Tn(e.authStorage);
|
|
1899
1930
|
}
|
|
1900
|
-
function
|
|
1931
|
+
function Xo(e = {}) {
|
|
1901
1932
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
|
|
1902
1933
|
async function o(i) {
|
|
1903
1934
|
const s = new URLSearchParams();
|
|
@@ -1907,21 +1938,21 @@ function Wo(e = {}) {
|
|
|
1907
1938
|
s.set("form_unique_id", i.formUniqueId);
|
|
1908
1939
|
else
|
|
1909
1940
|
throw new Error("form_id 或 form_unique_id 至少传一个");
|
|
1910
|
-
const a = await
|
|
1941
|
+
const a = await xt(e), l = await r(`${t}${n}?${s.toString()}`, {
|
|
1911
1942
|
method: "GET",
|
|
1912
1943
|
headers: a
|
|
1913
|
-
}), c = await
|
|
1944
|
+
}), c = await kt(l), m = Ro(c.form_definition);
|
|
1914
1945
|
return {
|
|
1915
1946
|
formUniqueId: c.form_unique_id,
|
|
1916
1947
|
formId: c.form_id,
|
|
1917
1948
|
disabled: c.disabled === 1,
|
|
1918
1949
|
formDefinition: m,
|
|
1919
|
-
a2ui:
|
|
1950
|
+
a2ui: Eo(c.form_definition) ?? void 0
|
|
1920
1951
|
};
|
|
1921
1952
|
}
|
|
1922
1953
|
return { fetchDetail: o };
|
|
1923
1954
|
}
|
|
1924
|
-
function
|
|
1955
|
+
function Zo(e) {
|
|
1925
1956
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1926
1957
|
return e ?? null;
|
|
1927
1958
|
const t = e;
|
|
@@ -1931,13 +1962,13 @@ function Yo(e) {
|
|
|
1931
1962
|
blocks: t.blocks
|
|
1932
1963
|
} : e;
|
|
1933
1964
|
}
|
|
1934
|
-
function
|
|
1965
|
+
function Mt({
|
|
1935
1966
|
context: e,
|
|
1936
1967
|
payload: t,
|
|
1937
1968
|
form: n,
|
|
1938
1969
|
answer: r
|
|
1939
1970
|
}) {
|
|
1940
|
-
const o =
|
|
1971
|
+
const o = Ve(t) ?? t, i = n ? Zo(n) : o;
|
|
1941
1972
|
return {
|
|
1942
1973
|
mission_id: e.missionId ?? null,
|
|
1943
1974
|
tenant_id: e.tenantId ?? null,
|
|
@@ -1950,7 +1981,7 @@ function xt({
|
|
|
1950
1981
|
answer: r
|
|
1951
1982
|
};
|
|
1952
1983
|
}
|
|
1953
|
-
function
|
|
1984
|
+
function Nt(e) {
|
|
1954
1985
|
const t = e.callback_url;
|
|
1955
1986
|
if (typeof t != "string" || !t.trim())
|
|
1956
1987
|
return "callback_url 为空,无法提交";
|
|
@@ -1965,34 +1996,34 @@ function Mt(e) {
|
|
|
1965
1996
|
const o = e.mission_id;
|
|
1966
1997
|
return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
|
|
1967
1998
|
}
|
|
1968
|
-
function
|
|
1969
|
-
return
|
|
1970
|
-
|
|
1999
|
+
function Cs(e) {
|
|
2000
|
+
return Nt(
|
|
2001
|
+
Mt({
|
|
1971
2002
|
context: e,
|
|
1972
2003
|
payload: {},
|
|
1973
2004
|
answer: {}
|
|
1974
2005
|
})
|
|
1975
2006
|
);
|
|
1976
2007
|
}
|
|
1977
|
-
const
|
|
1978
|
-
function
|
|
2008
|
+
const Wt = "answer_agent_callback_url 未配置,无法提交";
|
|
2009
|
+
function ei(e) {
|
|
1979
2010
|
if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
|
|
1980
2011
|
const n = e.answerAgentCallbackUrl.trim();
|
|
1981
2012
|
if (!n)
|
|
1982
|
-
throw new Error(
|
|
2013
|
+
throw new Error(Wt);
|
|
1983
2014
|
return n;
|
|
1984
2015
|
}
|
|
1985
|
-
const t =
|
|
2016
|
+
const t = Yo(e == null ? void 0 : e.authStorage).trim();
|
|
1986
2017
|
if (!t)
|
|
1987
|
-
throw new Error(
|
|
2018
|
+
throw new Error(Wt);
|
|
1988
2019
|
return t;
|
|
1989
2020
|
}
|
|
1990
|
-
function
|
|
2021
|
+
function xn(e) {
|
|
1991
2022
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1992
2023
|
const n = e.data;
|
|
1993
2024
|
return !n || typeof n != "object" || Array.isArray(n) ? null : n;
|
|
1994
2025
|
}
|
|
1995
|
-
function
|
|
2026
|
+
function ti(e, t) {
|
|
1996
2027
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
1997
2028
|
const n = t.message;
|
|
1998
2029
|
if (typeof n == "string" && n.trim())
|
|
@@ -2000,27 +2031,27 @@ function Xo(e, t) {
|
|
|
2000
2031
|
}
|
|
2001
2032
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
2002
2033
|
}
|
|
2003
|
-
function
|
|
2034
|
+
function ni(e) {
|
|
2004
2035
|
return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
|
|
2005
2036
|
}
|
|
2006
|
-
function
|
|
2007
|
-
const t =
|
|
2008
|
-
return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message:
|
|
2037
|
+
function Mn(e) {
|
|
2038
|
+
const t = xn(e.body);
|
|
2039
|
+
return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: ni(t) } : e.ok ? { type: "success", message: "提交成功" } : {
|
|
2009
2040
|
type: "error",
|
|
2010
|
-
message:
|
|
2041
|
+
message: ti(e.status, e.body)
|
|
2011
2042
|
};
|
|
2012
2043
|
}
|
|
2013
|
-
async function
|
|
2014
|
-
const n =
|
|
2044
|
+
async function Nn(e, t) {
|
|
2045
|
+
const n = Nt(e);
|
|
2015
2046
|
if (n)
|
|
2016
2047
|
throw new Error(n);
|
|
2017
|
-
const r =
|
|
2048
|
+
const r = ei(t), o = await _n(r, e, {
|
|
2018
2049
|
...t,
|
|
2019
|
-
headers:
|
|
2020
|
-
}), i =
|
|
2050
|
+
headers: Tt(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
|
|
2051
|
+
}), i = xn(o.body);
|
|
2021
2052
|
return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
|
|
2022
2053
|
}
|
|
2023
|
-
function
|
|
2054
|
+
function ri(e) {
|
|
2024
2055
|
return {
|
|
2025
2056
|
resumeUniqueId: e.resume_unique_id,
|
|
2026
2057
|
resumeId: e.resume_id,
|
|
@@ -2041,7 +2072,7 @@ function ei(e) {
|
|
|
2041
2072
|
}))
|
|
2042
2073
|
};
|
|
2043
2074
|
}
|
|
2044
|
-
function
|
|
2075
|
+
function oi(e, t, n) {
|
|
2045
2076
|
const r = new URLSearchParams();
|
|
2046
2077
|
r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20));
|
|
2047
2078
|
for (const o of e.names ?? [])
|
|
@@ -2054,27 +2085,27 @@ function ti(e, t, n) {
|
|
|
2054
2085
|
r.append("published", String(o));
|
|
2055
2086
|
return r;
|
|
2056
2087
|
}
|
|
2057
|
-
function
|
|
2088
|
+
function ii(e = {}) {
|
|
2058
2089
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch, o = e.published ?? [1];
|
|
2059
2090
|
return async ({ filter: i, page: s }) => {
|
|
2060
|
-
const a = await
|
|
2091
|
+
const a = await xt(e), l = oi(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
|
|
2061
2092
|
method: "GET",
|
|
2062
2093
|
headers: a
|
|
2063
|
-
}), m = await
|
|
2094
|
+
}), m = await kt(c);
|
|
2064
2095
|
return {
|
|
2065
|
-
list: (m.list ?? []).map(
|
|
2096
|
+
list: (m.list ?? []).map(ri),
|
|
2066
2097
|
total: m.total ?? 0,
|
|
2067
2098
|
page: m.page ?? s,
|
|
2068
2099
|
pageSize: m.page_size ?? i.pageSize ?? 20
|
|
2069
2100
|
};
|
|
2070
2101
|
};
|
|
2071
2102
|
}
|
|
2072
|
-
function
|
|
2103
|
+
function si(e) {
|
|
2073
2104
|
var r, o, i, s;
|
|
2074
2105
|
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()));
|
|
2075
2106
|
return t || n;
|
|
2076
2107
|
}
|
|
2077
|
-
function
|
|
2108
|
+
function ai(e) {
|
|
2078
2109
|
return {
|
|
2079
2110
|
caseUniqueId: e.case_unique_id,
|
|
2080
2111
|
caseId: e.case_id,
|
|
@@ -2085,7 +2116,7 @@ function oi(e) {
|
|
|
2085
2116
|
description: e.description ?? void 0
|
|
2086
2117
|
};
|
|
2087
2118
|
}
|
|
2088
|
-
function
|
|
2119
|
+
function li(e, t, n) {
|
|
2089
2120
|
var o, i, s;
|
|
2090
2121
|
const r = new URLSearchParams();
|
|
2091
2122
|
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());
|
|
@@ -2093,24 +2124,24 @@ function ii(e, t, n) {
|
|
|
2093
2124
|
a && r.append("flow_unique_ids", a);
|
|
2094
2125
|
return r;
|
|
2095
2126
|
}
|
|
2096
|
-
function
|
|
2127
|
+
function ci(e = {}) {
|
|
2097
2128
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
|
|
2098
2129
|
return async ({ filter: i, page: s }) => {
|
|
2099
|
-
if (!
|
|
2130
|
+
if (!si(i))
|
|
2100
2131
|
return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
|
|
2101
|
-
const a = await
|
|
2132
|
+
const a = await xt(e), l = li(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
|
|
2102
2133
|
method: "GET",
|
|
2103
2134
|
headers: a
|
|
2104
|
-
}), m = await
|
|
2135
|
+
}), m = await kt(c);
|
|
2105
2136
|
return {
|
|
2106
|
-
list: (m.list ?? []).map(
|
|
2137
|
+
list: (m.list ?? []).map(ai),
|
|
2107
2138
|
total: m.total ?? 0,
|
|
2108
2139
|
page: m.page ?? s,
|
|
2109
2140
|
pageSize: m.page_size ?? i.pageSize ?? 20
|
|
2110
2141
|
};
|
|
2111
2142
|
};
|
|
2112
2143
|
}
|
|
2113
|
-
function
|
|
2144
|
+
function As(e = {}) {
|
|
2114
2145
|
var r, o, i, s, a;
|
|
2115
2146
|
const t = {
|
|
2116
2147
|
baseUrl: e.baseUrl,
|
|
@@ -2119,23 +2150,23 @@ function bs(e = {}) {
|
|
|
2119
2150
|
authStorage: e.authStorage
|
|
2120
2151
|
};
|
|
2121
2152
|
return {
|
|
2122
|
-
fetchDetail:
|
|
2153
|
+
fetchDetail: Xo({
|
|
2123
2154
|
...t,
|
|
2124
2155
|
detailPath: (r = e.form) == null ? void 0 : r.detailPath
|
|
2125
2156
|
}).fetchDetail,
|
|
2126
|
-
resumeSearch:
|
|
2157
|
+
resumeSearch: ii({
|
|
2127
2158
|
...t,
|
|
2128
2159
|
searchPath: (o = e.resume) == null ? void 0 : o.searchPath,
|
|
2129
2160
|
published: (i = e.resume) == null ? void 0 : i.published
|
|
2130
2161
|
}),
|
|
2131
|
-
caseSearch:
|
|
2162
|
+
caseSearch: ci({
|
|
2132
2163
|
...t,
|
|
2133
2164
|
listPath: (s = e.case) == null ? void 0 : s.listPath,
|
|
2134
2165
|
published: (a = e.case) == null ? void 0 : a.published
|
|
2135
2166
|
})
|
|
2136
2167
|
};
|
|
2137
2168
|
}
|
|
2138
|
-
function
|
|
2169
|
+
function In(e, t) {
|
|
2139
2170
|
if (!t.trim()) return !0;
|
|
2140
2171
|
try {
|
|
2141
2172
|
return new RegExp(t).test(e);
|
|
@@ -2143,44 +2174,44 @@ function xn(e, t) {
|
|
|
2143
2174
|
return !0;
|
|
2144
2175
|
}
|
|
2145
2176
|
}
|
|
2146
|
-
function
|
|
2177
|
+
function Fn(e) {
|
|
2147
2178
|
return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
|
|
2148
2179
|
}
|
|
2149
|
-
function
|
|
2180
|
+
function ui(e, t) {
|
|
2150
2181
|
switch (e.type) {
|
|
2151
2182
|
case "multiselect":
|
|
2152
2183
|
case "checkbox":
|
|
2153
2184
|
case "file":
|
|
2154
2185
|
case "resume_multiselect":
|
|
2155
2186
|
case "case_multiselect":
|
|
2156
|
-
return
|
|
2187
|
+
return Q(t).length === 0;
|
|
2157
2188
|
case "toggle":
|
|
2158
|
-
return !
|
|
2189
|
+
return !Me(t);
|
|
2159
2190
|
case "number":
|
|
2160
2191
|
return t == null || t === "";
|
|
2161
2192
|
default:
|
|
2162
|
-
return
|
|
2193
|
+
return Fn(t);
|
|
2163
2194
|
}
|
|
2164
2195
|
}
|
|
2165
|
-
function
|
|
2196
|
+
function it(e, t) {
|
|
2166
2197
|
return e.required === !0 || t > 0;
|
|
2167
2198
|
}
|
|
2168
|
-
function
|
|
2199
|
+
function mi(e, t) {
|
|
2169
2200
|
var n, r;
|
|
2170
2201
|
for (const o of e) {
|
|
2171
2202
|
const i = (n = o.name) == null ? void 0 : n.trim();
|
|
2172
|
-
if (!i ||
|
|
2203
|
+
if (!i || _e(o.type) || pe(o.type)) continue;
|
|
2173
2204
|
const s = t[i], a = ((r = o.label) == null ? void 0 : r.trim()) || i;
|
|
2174
|
-
if (o.required &&
|
|
2205
|
+
if (o.required && ui(o, s))
|
|
2175
2206
|
return { fieldName: i, label: a, message: `请填写「${a}」` };
|
|
2176
|
-
if (o.type === "email" && !
|
|
2207
|
+
if (o.type === "email" && !Fn(s)) {
|
|
2177
2208
|
const l = String(s).trim();
|
|
2178
|
-
if (!
|
|
2209
|
+
if (!In(l, yt))
|
|
2179
2210
|
return { fieldName: i, label: a, message: `「${a}」格式不正确` };
|
|
2180
2211
|
}
|
|
2181
2212
|
if (o.type === "file") {
|
|
2182
|
-
const l = o.fileMinCount ?? 0, c =
|
|
2183
|
-
if (l > 0 && c < l &&
|
|
2213
|
+
const l = o.fileMinCount ?? 0, c = Q(s).length;
|
|
2214
|
+
if (l > 0 && c < l && it(o, c))
|
|
2184
2215
|
return {
|
|
2185
2216
|
fieldName: i,
|
|
2186
2217
|
label: a,
|
|
@@ -2188,8 +2219,8 @@ function li(e, t) {
|
|
|
2188
2219
|
};
|
|
2189
2220
|
}
|
|
2190
2221
|
if (o.type === "resume_multiselect") {
|
|
2191
|
-
const l = o.resumeMinCount, c =
|
|
2192
|
-
if (l !== void 0 && c < l &&
|
|
2222
|
+
const l = o.resumeMinCount, c = Q(s).length;
|
|
2223
|
+
if (l !== void 0 && c < l && it(o, c))
|
|
2193
2224
|
return {
|
|
2194
2225
|
fieldName: i,
|
|
2195
2226
|
label: a,
|
|
@@ -2197,8 +2228,8 @@ function li(e, t) {
|
|
|
2197
2228
|
};
|
|
2198
2229
|
}
|
|
2199
2230
|
if (o.type === "case_multiselect") {
|
|
2200
|
-
const l = o.caseMinCount, c =
|
|
2201
|
-
if (l !== void 0 && c < l &&
|
|
2231
|
+
const l = o.caseMinCount, c = Q(s).length;
|
|
2232
|
+
if (l !== void 0 && c < l && it(o, c))
|
|
2202
2233
|
return {
|
|
2203
2234
|
fieldName: i,
|
|
2204
2235
|
label: a,
|
|
@@ -2208,20 +2239,20 @@ function li(e, t) {
|
|
|
2208
2239
|
}
|
|
2209
2240
|
return null;
|
|
2210
2241
|
}
|
|
2211
|
-
const
|
|
2212
|
-
video:
|
|
2213
|
-
audio:
|
|
2214
|
-
image:
|
|
2215
|
-
file:
|
|
2216
|
-
spreadsheet:
|
|
2217
|
-
document:
|
|
2242
|
+
const di = {
|
|
2243
|
+
video: tr,
|
|
2244
|
+
audio: er,
|
|
2245
|
+
image: Zn,
|
|
2246
|
+
file: Xt,
|
|
2247
|
+
spreadsheet: Xn,
|
|
2248
|
+
document: Qt
|
|
2218
2249
|
};
|
|
2219
|
-
function
|
|
2250
|
+
function fi({
|
|
2220
2251
|
type: e,
|
|
2221
2252
|
size: t = 40,
|
|
2222
2253
|
className: n
|
|
2223
2254
|
}) {
|
|
2224
|
-
const r =
|
|
2255
|
+
const r = di[e] ?? Xt;
|
|
2225
2256
|
return /* @__PURE__ */ u(
|
|
2226
2257
|
r,
|
|
2227
2258
|
{
|
|
@@ -2231,7 +2262,7 @@ function ui({
|
|
|
2231
2262
|
}
|
|
2232
2263
|
);
|
|
2233
2264
|
}
|
|
2234
|
-
const
|
|
2265
|
+
const En = "skopon-form-v0_9", pi = /* @__PURE__ */ new Set([
|
|
2235
2266
|
"SkoponMedia",
|
|
2236
2267
|
"SkoponSelect",
|
|
2237
2268
|
"Image",
|
|
@@ -2243,24 +2274,24 @@ const Nn = "skopon-form-v0_9", mi = /* @__PURE__ */ new Set([
|
|
|
2243
2274
|
"FileUpload",
|
|
2244
2275
|
"TextField",
|
|
2245
2276
|
"Text",
|
|
2246
|
-
...
|
|
2247
|
-
]),
|
|
2248
|
-
function
|
|
2249
|
-
const t = [...
|
|
2277
|
+
...ko()
|
|
2278
|
+
]), hi = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
|
|
2279
|
+
function Ne(e) {
|
|
2280
|
+
const t = [...Ue.components.values()].find((n) => n.name === e);
|
|
2250
2281
|
if (!t) throw new Error(`Missing basic catalog component: ${e}`);
|
|
2251
2282
|
return t.schema;
|
|
2252
2283
|
}
|
|
2253
|
-
function
|
|
2284
|
+
function R(e) {
|
|
2254
2285
|
return typeof e == "string" ? e : "";
|
|
2255
2286
|
}
|
|
2256
|
-
function
|
|
2287
|
+
function Un(e) {
|
|
2257
2288
|
return Array.isArray(e) ? e.map((t) => {
|
|
2258
2289
|
if (!t || typeof t != "object") return null;
|
|
2259
2290
|
const n = t, r = String(n.value ?? n.label ?? ""), o = String(n.label ?? n.value ?? "");
|
|
2260
2291
|
return { value: r, label: o };
|
|
2261
2292
|
}).filter((t) => !!t) : [];
|
|
2262
2293
|
}
|
|
2263
|
-
function
|
|
2294
|
+
function Le({
|
|
2264
2295
|
mediaType: e,
|
|
2265
2296
|
urls: t,
|
|
2266
2297
|
mediaSize: n,
|
|
@@ -2268,7 +2299,7 @@ function Ve({
|
|
|
2268
2299
|
help: o,
|
|
2269
2300
|
placeholder: i
|
|
2270
2301
|
}) {
|
|
2271
|
-
const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l =
|
|
2302
|
+
const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = Tr(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
|
|
2272
2303
|
return /* @__PURE__ */ M("div", { className: "form-block-preview", children: [
|
|
2273
2304
|
s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
|
|
2274
2305
|
t.length === 0 ? /* @__PURE__ */ u("div", { className: "form-media-preview form-media-preview--empty", children: c }) : /* @__PURE__ */ u("div", { className: l, children: t.map((m, d) => e === "image" ? /* @__PURE__ */ u(
|
|
@@ -2300,17 +2331,17 @@ function Ve({
|
|
|
2300
2331
|
] });
|
|
2301
2332
|
}
|
|
2302
2333
|
function je(e, t) {
|
|
2303
|
-
const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) :
|
|
2334
|
+
const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : R(e.url).trim() ? [R(e.url).trim()] : [];
|
|
2304
2335
|
return {
|
|
2305
2336
|
mediaType: t,
|
|
2306
2337
|
urls: n,
|
|
2307
|
-
mediaSize:
|
|
2308
|
-
label:
|
|
2309
|
-
help:
|
|
2310
|
-
placeholder:
|
|
2338
|
+
mediaSize: xe(e.mediaSize),
|
|
2339
|
+
label: R(e.label) || R(e.description),
|
|
2340
|
+
help: R(e.help),
|
|
2341
|
+
placeholder: R(e.placeholder)
|
|
2311
2342
|
};
|
|
2312
2343
|
}
|
|
2313
|
-
const
|
|
2344
|
+
const gi = {
|
|
2314
2345
|
name: "SkoponMedia",
|
|
2315
2346
|
schema: h.object({
|
|
2316
2347
|
mediaType: h.any().optional(),
|
|
@@ -2320,19 +2351,19 @@ const fi = {
|
|
|
2320
2351
|
help: h.any().optional(),
|
|
2321
2352
|
placeholder: h.any().optional()
|
|
2322
2353
|
}).passthrough()
|
|
2323
|
-
},
|
|
2324
|
-
const t = e.componentModel.properties, n =
|
|
2325
|
-
return /* @__PURE__ */ u(
|
|
2326
|
-
}),
|
|
2327
|
-
{ name: "Image", schema:
|
|
2328
|
-
({ context: e }) => /* @__PURE__ */ u(
|
|
2329
|
-
),
|
|
2330
|
-
{ name: "Video", schema:
|
|
2331
|
-
({ context: e }) => /* @__PURE__ */ u(
|
|
2332
|
-
),
|
|
2333
|
-
{ name: "AudioPlayer", schema:
|
|
2334
|
-
({ context: e }) => /* @__PURE__ */ u(
|
|
2335
|
-
),
|
|
2354
|
+
}, yi = X(gi, ({ context: e }) => {
|
|
2355
|
+
const t = e.componentModel.properties, n = R(t.mediaType);
|
|
2356
|
+
return /* @__PURE__ */ u(Le, { ...je(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
|
|
2357
|
+
}), vi = X(
|
|
2358
|
+
{ name: "Image", schema: Ne("Image") },
|
|
2359
|
+
({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "image") })
|
|
2360
|
+
), bi = X(
|
|
2361
|
+
{ name: "Video", schema: Ne("Video") },
|
|
2362
|
+
({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "video") })
|
|
2363
|
+
), Si = X(
|
|
2364
|
+
{ name: "AudioPlayer", schema: Ne("AudioPlayer") },
|
|
2365
|
+
({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "audio") })
|
|
2366
|
+
), ki = {
|
|
2336
2367
|
name: "SkoponSelect",
|
|
2337
2368
|
schema: h.object({
|
|
2338
2369
|
label: h.any().optional(),
|
|
@@ -2342,18 +2373,18 @@ const fi = {
|
|
|
2342
2373
|
value: h.any().optional()
|
|
2343
2374
|
}).passthrough()
|
|
2344
2375
|
};
|
|
2345
|
-
function
|
|
2376
|
+
function Ci({ context: e }) {
|
|
2346
2377
|
const { interactive: t } = se(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = ae(e, "value", {
|
|
2347
2378
|
component: "SkoponSelect",
|
|
2348
2379
|
changeAction: "select"
|
|
2349
|
-
}), s = e.componentModel.properties, a =
|
|
2350
|
-
return
|
|
2351
|
-
const d =
|
|
2380
|
+
}), s = e.componentModel.properties, a = R(s.label), l = R(s.placeholder), c = Un(s.options), m = R(s.mode) === "multiple";
|
|
2381
|
+
return q(() => {
|
|
2382
|
+
const d = dn(n, m);
|
|
2352
2383
|
d !== null && o(d);
|
|
2353
2384
|
}, [m, n, o]), /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
|
|
2354
2385
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2355
2386
|
/* @__PURE__ */ u(
|
|
2356
|
-
|
|
2387
|
+
st,
|
|
2357
2388
|
{
|
|
2358
2389
|
mode: m ? "multiple" : void 0,
|
|
2359
2390
|
disabled: !t,
|
|
@@ -2362,28 +2393,28 @@ function bi({ context: e }) {
|
|
|
2362
2393
|
style: { width: "100%" },
|
|
2363
2394
|
placeholder: l || (m ? "请选择多项" : "请选择"),
|
|
2364
2395
|
options: c,
|
|
2365
|
-
value: m ?
|
|
2396
|
+
value: m ? Q(n) : Se(n),
|
|
2366
2397
|
onChange: (d) => r(m ? d ?? [] : d ?? "")
|
|
2367
2398
|
}
|
|
2368
2399
|
)
|
|
2369
2400
|
] });
|
|
2370
2401
|
}
|
|
2371
|
-
const
|
|
2372
|
-
|
|
2373
|
-
|
|
2402
|
+
const Ai = X(
|
|
2403
|
+
ki,
|
|
2404
|
+
Ci
|
|
2374
2405
|
);
|
|
2375
|
-
function
|
|
2406
|
+
function _i({ context: e }) {
|
|
2376
2407
|
const { interactive: t } = se(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = ae(e, "value", {
|
|
2377
2408
|
component: "ChoicePicker",
|
|
2378
2409
|
changeAction: "select"
|
|
2379
|
-
}), s = e.componentModel.properties, a =
|
|
2380
|
-
return
|
|
2381
|
-
const
|
|
2382
|
-
|
|
2410
|
+
}), s = e.componentModel.properties, a = R(s.label), l = R(s.variant) || "mutuallyExclusive", c = R(s.skoponPickerType), m = R(s.placeholder), d = Un(s.options), y = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", S = y === "multiselect" || y === "checkbox";
|
|
2411
|
+
return q(() => {
|
|
2412
|
+
const g = dn(n, S);
|
|
2413
|
+
g !== null && o(g);
|
|
2383
2414
|
}, [S, n, o]), /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
|
|
2384
2415
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2385
|
-
|
|
2386
|
-
|
|
2416
|
+
y === "select" ? /* @__PURE__ */ u(
|
|
2417
|
+
st,
|
|
2387
2418
|
{
|
|
2388
2419
|
disabled: !t,
|
|
2389
2420
|
allowClear: !0,
|
|
@@ -2391,11 +2422,11 @@ function ki({ context: e }) {
|
|
|
2391
2422
|
style: { width: "100%" },
|
|
2392
2423
|
placeholder: m || "请选择",
|
|
2393
2424
|
options: d,
|
|
2394
|
-
value:
|
|
2395
|
-
onChange: (
|
|
2425
|
+
value: Se(n),
|
|
2426
|
+
onChange: (g) => r(g ?? "")
|
|
2396
2427
|
}
|
|
2397
|
-
) :
|
|
2398
|
-
|
|
2428
|
+
) : y === "multiselect" ? /* @__PURE__ */ u(
|
|
2429
|
+
st,
|
|
2399
2430
|
{
|
|
2400
2431
|
mode: "multiple",
|
|
2401
2432
|
disabled: !t,
|
|
@@ -2404,31 +2435,31 @@ function ki({ context: e }) {
|
|
|
2404
2435
|
style: { width: "100%" },
|
|
2405
2436
|
placeholder: m || "请选择多项",
|
|
2406
2437
|
options: d,
|
|
2407
|
-
value:
|
|
2408
|
-
onChange: (
|
|
2438
|
+
value: Q(n),
|
|
2439
|
+
onChange: (g) => r(g ?? [])
|
|
2409
2440
|
}
|
|
2410
|
-
) :
|
|
2411
|
-
|
|
2441
|
+
) : y === "checkbox" ? /* @__PURE__ */ u(
|
|
2442
|
+
$n.Group,
|
|
2412
2443
|
{
|
|
2413
2444
|
disabled: !t,
|
|
2414
2445
|
className: "form-block-preview-control",
|
|
2415
2446
|
options: d,
|
|
2416
|
-
value:
|
|
2417
|
-
onChange: (
|
|
2447
|
+
value: Q(n),
|
|
2448
|
+
onChange: (g) => r(g)
|
|
2418
2449
|
}
|
|
2419
2450
|
) : /* @__PURE__ */ u(
|
|
2420
|
-
|
|
2451
|
+
Dn.Group,
|
|
2421
2452
|
{
|
|
2422
2453
|
disabled: !t,
|
|
2423
2454
|
className: "form-block-preview-control",
|
|
2424
2455
|
options: d,
|
|
2425
|
-
value:
|
|
2426
|
-
onChange: (
|
|
2456
|
+
value: Se(n),
|
|
2457
|
+
onChange: (g) => r(g.target.value)
|
|
2427
2458
|
}
|
|
2428
2459
|
)
|
|
2429
2460
|
] });
|
|
2430
2461
|
}
|
|
2431
|
-
const
|
|
2462
|
+
const Ti = X(
|
|
2432
2463
|
{
|
|
2433
2464
|
name: "ChoicePicker",
|
|
2434
2465
|
schema: h.object({
|
|
@@ -2440,63 +2471,63 @@ const Ci = Q(
|
|
|
2440
2471
|
placeholder: h.any().optional()
|
|
2441
2472
|
}).passthrough()
|
|
2442
2473
|
},
|
|
2443
|
-
|
|
2474
|
+
_i
|
|
2444
2475
|
);
|
|
2445
|
-
function
|
|
2476
|
+
function xi({ context: e }) {
|
|
2446
2477
|
const { interactive: t } = se(), { value: n, setValue: r, fieldName: o } = ae(e, "value", {
|
|
2447
2478
|
component: "CheckBox",
|
|
2448
2479
|
changeAction: "change"
|
|
2449
|
-
}), i = e.componentModel.properties, s =
|
|
2480
|
+
}), i = e.componentModel.properties, s = R(i.label);
|
|
2450
2481
|
return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
2451
2482
|
s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
|
|
2452
2483
|
/* @__PURE__ */ u(
|
|
2453
|
-
|
|
2484
|
+
Hn,
|
|
2454
2485
|
{
|
|
2455
2486
|
disabled: !t,
|
|
2456
2487
|
className: "form-block-preview-control",
|
|
2457
|
-
checked:
|
|
2488
|
+
checked: Me(n),
|
|
2458
2489
|
onChange: (a) => r(a)
|
|
2459
2490
|
}
|
|
2460
2491
|
)
|
|
2461
2492
|
] });
|
|
2462
2493
|
}
|
|
2463
|
-
const
|
|
2464
|
-
{ name: "CheckBox", schema:
|
|
2465
|
-
|
|
2494
|
+
const Mi = X(
|
|
2495
|
+
{ name: "CheckBox", schema: Ne("CheckBox") },
|
|
2496
|
+
xi
|
|
2466
2497
|
);
|
|
2467
|
-
function
|
|
2468
|
-
const r =
|
|
2498
|
+
function Ni(e, t, n) {
|
|
2499
|
+
const r = Se(e);
|
|
2469
2500
|
if (!r) return;
|
|
2470
2501
|
if (!t && n) {
|
|
2471
|
-
const i =
|
|
2502
|
+
const i = jt(r, "HH:mm", !0);
|
|
2472
2503
|
return i.isValid() ? i : void 0;
|
|
2473
2504
|
}
|
|
2474
|
-
const o =
|
|
2505
|
+
const o = jt(r);
|
|
2475
2506
|
return o.isValid() ? o : void 0;
|
|
2476
2507
|
}
|
|
2477
|
-
function
|
|
2508
|
+
function Ii({ context: e }) {
|
|
2478
2509
|
const { interactive: t } = se(), { value: n, setValue: r, fieldName: o, reportFocus: i } = ae(e, "value", {
|
|
2479
2510
|
component: "DateTimeInput",
|
|
2480
2511
|
changeAction: "change"
|
|
2481
|
-
}), s = e.componentModel.properties, a =
|
|
2482
|
-
if (!
|
|
2512
|
+
}), s = e.componentModel.properties, a = R(s.label), l = R(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = Ni(n, c, m), b = (y) => {
|
|
2513
|
+
if (!y) {
|
|
2483
2514
|
r("");
|
|
2484
2515
|
return;
|
|
2485
2516
|
}
|
|
2486
2517
|
if (!c && m) {
|
|
2487
|
-
r(
|
|
2518
|
+
r(y.format("HH:mm"));
|
|
2488
2519
|
return;
|
|
2489
2520
|
}
|
|
2490
2521
|
if (c && m) {
|
|
2491
|
-
r(
|
|
2522
|
+
r(y.format("YYYY-MM-DDTHH:mm"));
|
|
2492
2523
|
return;
|
|
2493
2524
|
}
|
|
2494
|
-
r(
|
|
2525
|
+
r(y.format("YYYY-MM-DD"));
|
|
2495
2526
|
};
|
|
2496
2527
|
return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
2497
2528
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2498
2529
|
!c && m ? /* @__PURE__ */ u(
|
|
2499
|
-
|
|
2530
|
+
Kn,
|
|
2500
2531
|
{
|
|
2501
2532
|
disabled: !t,
|
|
2502
2533
|
className: "form-block-preview-control",
|
|
@@ -2507,7 +2538,7 @@ function xi({ context: e }) {
|
|
|
2507
2538
|
onFocus: i
|
|
2508
2539
|
}
|
|
2509
2540
|
) : /* @__PURE__ */ u(
|
|
2510
|
-
|
|
2541
|
+
Jn,
|
|
2511
2542
|
{
|
|
2512
2543
|
showTime: c && m,
|
|
2513
2544
|
disabled: !t,
|
|
@@ -2521,7 +2552,7 @@ function xi({ context: e }) {
|
|
|
2521
2552
|
)
|
|
2522
2553
|
] });
|
|
2523
2554
|
}
|
|
2524
|
-
const
|
|
2555
|
+
const Fi = X(
|
|
2525
2556
|
{
|
|
2526
2557
|
name: "DateTimeInput",
|
|
2527
2558
|
schema: h.object({
|
|
@@ -2534,8 +2565,8 @@ const Mi = Q(
|
|
|
2534
2565
|
max: h.any().optional()
|
|
2535
2566
|
}).passthrough()
|
|
2536
2567
|
},
|
|
2537
|
-
|
|
2538
|
-
),
|
|
2568
|
+
Ii
|
|
2569
|
+
), Ei = {
|
|
2539
2570
|
name: "FileUpload",
|
|
2540
2571
|
schema: h.object({
|
|
2541
2572
|
label: h.any().optional(),
|
|
@@ -2547,41 +2578,41 @@ const Mi = Q(
|
|
|
2547
2578
|
value: h.any().optional()
|
|
2548
2579
|
}).passthrough()
|
|
2549
2580
|
};
|
|
2550
|
-
function
|
|
2581
|
+
function Ui({ context: e }) {
|
|
2551
2582
|
const { interactive: t } = se(), { value: n, setValue: r, fieldName: o } = ae(e, "value", {
|
|
2552
2583
|
component: "FileUpload",
|
|
2553
2584
|
changeAction: "change"
|
|
2554
|
-
}), i = e.componentModel.properties, s =
|
|
2585
|
+
}), i = e.componentModel.properties, s = R(i.label), a = R(i.accept), l = Array.isArray(i.fileAcceptTypes) ? i.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((f) => f.trim()).filter(Boolean) : void 0, m = vr(l, c), d = typeof i.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
|
|
2555
2586
|
i.filePlaceholderIcon
|
|
2556
|
-
) ? i.filePlaceholderIcon : "document", b = typeof i.minCount == "number" ? Math.max(0, i.minCount) : 0,
|
|
2587
|
+
) ? i.filePlaceholderIcon : "document", b = typeof i.minCount == "number" ? Math.max(0, i.minCount) : 0, y = typeof i.maxCount == "number" ? i.maxCount : 1, S = y > 0, g = Q(n), k = S && g.length >= y, p = g.length < b;
|
|
2557
2588
|
return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
2558
2589
|
s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
|
|
2559
2590
|
/* @__PURE__ */ M(
|
|
2560
|
-
|
|
2591
|
+
Ye.Dragger,
|
|
2561
2592
|
{
|
|
2562
2593
|
disabled: !t || k,
|
|
2563
|
-
accept:
|
|
2594
|
+
accept: yr(l, c),
|
|
2564
2595
|
className: "form-file-upload-preview",
|
|
2565
|
-
showUploadList: t &&
|
|
2566
|
-
fileList: t ?
|
|
2596
|
+
showUploadList: t && g.length > 0,
|
|
2597
|
+
fileList: t ? g.map((f, v) => ({
|
|
2567
2598
|
uid: `${v}-${f}`,
|
|
2568
2599
|
name: f,
|
|
2569
2600
|
status: "done"
|
|
2570
2601
|
})) : [],
|
|
2571
2602
|
beforeUpload: (f) => {
|
|
2572
|
-
if (!t) return
|
|
2573
|
-
const v =
|
|
2574
|
-
if (S && v.length >=
|
|
2575
|
-
const x = S ? [...v, f.name].slice(0,
|
|
2603
|
+
if (!t) return Ye.LIST_IGNORE;
|
|
2604
|
+
const v = Q(Ht(e));
|
|
2605
|
+
if (S && v.length >= y) return Ye.LIST_IGNORE;
|
|
2606
|
+
const x = S ? [...v, f.name].slice(0, y) : [...v, f.name];
|
|
2576
2607
|
return r(x), !1;
|
|
2577
2608
|
},
|
|
2578
2609
|
onRemove: (f) => {
|
|
2579
|
-
const v =
|
|
2610
|
+
const v = Q(Ht(e)), x = /^(\d+)-/.exec(f.uid ?? ""), N = x ? Number(x[1]) : -1, _ = N >= 0 && N < v.length ? v.filter((z, C) => C !== N) : v.filter((z) => z !== f.name);
|
|
2580
2611
|
if (_.length < b) return !1;
|
|
2581
2612
|
r(_);
|
|
2582
2613
|
},
|
|
2583
2614
|
children: [
|
|
2584
|
-
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(
|
|
2615
|
+
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(fi, { type: d, size: 40 }) }),
|
|
2585
2616
|
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
|
|
2586
2617
|
]
|
|
2587
2618
|
}
|
|
@@ -2590,55 +2621,55 @@ function Ii({ context: e }) {
|
|
|
2590
2621
|
"允许:",
|
|
2591
2622
|
m ?? "全部类型",
|
|
2592
2623
|
b > 0 ? `;至少 ${b} 个文件` : "",
|
|
2593
|
-
S ? `;最多 ${
|
|
2624
|
+
S ? `;最多 ${y} 个文件` : "",
|
|
2594
2625
|
";当前仅收集文件名(不含文件内容,需宿主另行上传)",
|
|
2595
|
-
p && t ? `(当前 ${
|
|
2626
|
+
p && t ? `(当前 ${g.length} 个,未达下限)` : ""
|
|
2596
2627
|
] })
|
|
2597
2628
|
] });
|
|
2598
2629
|
}
|
|
2599
|
-
const
|
|
2600
|
-
|
|
2601
|
-
|
|
2630
|
+
const Ri = X(
|
|
2631
|
+
Ei,
|
|
2632
|
+
Ui
|
|
2602
2633
|
);
|
|
2603
|
-
function
|
|
2634
|
+
function Pi({ context: e }) {
|
|
2604
2635
|
const { interactive: t } = se(), { value: n, setValue: r, fieldName: o, reportFocus: i } = ae(e, "value", {
|
|
2605
2636
|
component: "TextField",
|
|
2606
2637
|
changeAction: "change",
|
|
2607
2638
|
debounceChange: !0
|
|
2608
|
-
}), s = e.componentModel.properties, a =
|
|
2639
|
+
}), s = e.componentModel.properties, a = R(s.label), l = R(s.placeholder), c = R(s.variant) || "shortText", m = R(s.validationRegexp), d = Se(n) ?? "", b = !t, [y, S] = w(""), g = (f) => {
|
|
2609
2640
|
if (!m || !f.trim()) {
|
|
2610
2641
|
S("");
|
|
2611
2642
|
return;
|
|
2612
2643
|
}
|
|
2613
|
-
S(
|
|
2644
|
+
S(In(f, m) ? "" : "格式不正确");
|
|
2614
2645
|
};
|
|
2615
|
-
|
|
2616
|
-
|
|
2646
|
+
q(() => {
|
|
2647
|
+
g(d);
|
|
2617
2648
|
}, [m, d]);
|
|
2618
2649
|
const k = "form-block-preview-control";
|
|
2619
2650
|
let p;
|
|
2620
2651
|
if (c === "longText")
|
|
2621
2652
|
p = /* @__PURE__ */ u(
|
|
2622
|
-
|
|
2653
|
+
Qe.TextArea,
|
|
2623
2654
|
{
|
|
2624
2655
|
disabled: b,
|
|
2625
2656
|
className: k,
|
|
2626
2657
|
placeholder: l || "长文本回答...",
|
|
2627
2658
|
autoSize: { minRows: 2, maxRows: 6 },
|
|
2628
2659
|
value: d,
|
|
2629
|
-
status:
|
|
2660
|
+
status: y ? "error" : void 0,
|
|
2630
2661
|
onChange: (f) => {
|
|
2631
2662
|
const v = f.target.value;
|
|
2632
|
-
r(v),
|
|
2663
|
+
r(v), g(v);
|
|
2633
2664
|
},
|
|
2634
2665
|
onFocus: i,
|
|
2635
|
-
onBlur: (f) =>
|
|
2666
|
+
onBlur: (f) => g(f.target.value)
|
|
2636
2667
|
}
|
|
2637
2668
|
);
|
|
2638
2669
|
else if (c === "number") {
|
|
2639
2670
|
const f = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
|
|
2640
2671
|
p = /* @__PURE__ */ u(
|
|
2641
|
-
|
|
2672
|
+
Gn,
|
|
2642
2673
|
{
|
|
2643
2674
|
disabled: b,
|
|
2644
2675
|
className: k,
|
|
@@ -2650,7 +2681,7 @@ function Ei({ context: e }) {
|
|
|
2650
2681
|
}
|
|
2651
2682
|
);
|
|
2652
2683
|
} else c === "obscured" ? p = /* @__PURE__ */ u(
|
|
2653
|
-
|
|
2684
|
+
Qe.Password,
|
|
2654
2685
|
{
|
|
2655
2686
|
disabled: b,
|
|
2656
2687
|
className: k,
|
|
@@ -2660,28 +2691,28 @@ function Ei({ context: e }) {
|
|
|
2660
2691
|
onFocus: i
|
|
2661
2692
|
}
|
|
2662
2693
|
) : p = /* @__PURE__ */ u(
|
|
2663
|
-
|
|
2694
|
+
Qe,
|
|
2664
2695
|
{
|
|
2665
2696
|
disabled: b,
|
|
2666
2697
|
className: k,
|
|
2667
2698
|
placeholder: l,
|
|
2668
2699
|
value: d,
|
|
2669
|
-
status:
|
|
2700
|
+
status: y ? "error" : void 0,
|
|
2670
2701
|
onChange: (f) => {
|
|
2671
2702
|
const v = f.target.value;
|
|
2672
|
-
r(v),
|
|
2703
|
+
r(v), g(v);
|
|
2673
2704
|
},
|
|
2674
2705
|
onFocus: i,
|
|
2675
|
-
onBlur: (f) =>
|
|
2706
|
+
onBlur: (f) => g(f.target.value)
|
|
2676
2707
|
}
|
|
2677
2708
|
);
|
|
2678
2709
|
return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
2679
2710
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2680
2711
|
p,
|
|
2681
|
-
|
|
2712
|
+
y ? /* @__PURE__ */ u(ne.Text, { type: "danger", className: "form-block-preview-help", children: y }) : null
|
|
2682
2713
|
] });
|
|
2683
2714
|
}
|
|
2684
|
-
const
|
|
2715
|
+
const wi = X(
|
|
2685
2716
|
{
|
|
2686
2717
|
name: "TextField",
|
|
2687
2718
|
schema: h.object({
|
|
@@ -2692,35 +2723,35 @@ const Ui = Q(
|
|
|
2692
2723
|
value: h.any().optional()
|
|
2693
2724
|
}).passthrough()
|
|
2694
2725
|
},
|
|
2695
|
-
|
|
2726
|
+
Pi
|
|
2696
2727
|
);
|
|
2697
|
-
function
|
|
2698
|
-
const t = e.componentModel.properties, n =
|
|
2699
|
-
return
|
|
2728
|
+
function zi({ context: e }) {
|
|
2729
|
+
const t = e.componentModel.properties, n = R(t.text), r = R(t.variant) || "body";
|
|
2730
|
+
return hi.has(r) ? r === "caption" ? /* @__PURE__ */ u(ne.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ u("em", { children: n }) }) : /* @__PURE__ */ u(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ u(ne.Paragraph, { className: "form-block-preview-paragraph", children: n });
|
|
2700
2731
|
}
|
|
2701
|
-
const
|
|
2702
|
-
{ name: "Text", schema:
|
|
2703
|
-
|
|
2732
|
+
const Oi = X(
|
|
2733
|
+
{ name: "Text", schema: Ne("Text") },
|
|
2734
|
+
zi
|
|
2704
2735
|
);
|
|
2705
|
-
function
|
|
2736
|
+
function Rn() {
|
|
2706
2737
|
const t = [
|
|
2707
|
-
...[...
|
|
2708
|
-
(r) => !
|
|
2738
|
+
...[...Ue.components.values()].filter(
|
|
2739
|
+
(r) => !pi.has(r.name)
|
|
2709
2740
|
),
|
|
2710
|
-
pi,
|
|
2711
|
-
Si,
|
|
2712
|
-
hi,
|
|
2713
|
-
gi,
|
|
2714
2741
|
yi,
|
|
2715
|
-
|
|
2716
|
-
|
|
2742
|
+
Ai,
|
|
2743
|
+
vi,
|
|
2744
|
+
bi,
|
|
2745
|
+
Si,
|
|
2746
|
+
Ti,
|
|
2717
2747
|
Mi,
|
|
2718
2748
|
Fi,
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2749
|
+
Ri,
|
|
2750
|
+
wi,
|
|
2751
|
+
Oi,
|
|
2752
|
+
...So()
|
|
2753
|
+
], n = [...Ue.functions.values()];
|
|
2754
|
+
return new nr(En, t, n, Ue.themeSchema);
|
|
2724
2755
|
}
|
|
2725
2756
|
const ie = {
|
|
2726
2757
|
jade9: "#29a383",
|
|
@@ -2734,7 +2765,7 @@ const ie = {
|
|
|
2734
2765
|
primaryHover: "#26997b",
|
|
2735
2766
|
primaryActive: "#1d3b31",
|
|
2736
2767
|
onPrimary: "#ffffff"
|
|
2737
|
-
},
|
|
2768
|
+
}, qi = {
|
|
2738
2769
|
cssVar: { key: "vidtempl" },
|
|
2739
2770
|
token: {
|
|
2740
2771
|
colorPrimary: ie.primarySolid,
|
|
@@ -2819,14 +2850,14 @@ const ie = {
|
|
|
2819
2850
|
}
|
|
2820
2851
|
}
|
|
2821
2852
|
};
|
|
2822
|
-
function
|
|
2853
|
+
function ke({
|
|
2823
2854
|
children: e,
|
|
2824
2855
|
locale: t,
|
|
2825
2856
|
theme: n
|
|
2826
2857
|
}) {
|
|
2827
|
-
return /* @__PURE__ */ u(
|
|
2858
|
+
return /* @__PURE__ */ u(Wn, { theme: n ?? qi, locale: t, children: e });
|
|
2828
2859
|
}
|
|
2829
|
-
const
|
|
2860
|
+
const Bi = Vn(
|
|
2830
2861
|
function({
|
|
2831
2862
|
doc: t,
|
|
2832
2863
|
surfaceId: n = "skopon-form",
|
|
@@ -2837,25 +2868,25 @@ const zi = zn(
|
|
|
2837
2868
|
caseSearch: a = null,
|
|
2838
2869
|
wrapProvider: l = !0
|
|
2839
2870
|
}, c) {
|
|
2840
|
-
|
|
2841
|
-
|
|
2871
|
+
q(() => {
|
|
2872
|
+
nn(), tn();
|
|
2842
2873
|
}, []);
|
|
2843
2874
|
const m = A(null), d = A(i);
|
|
2844
2875
|
d.current = i;
|
|
2845
|
-
const b =
|
|
2846
|
-
if (
|
|
2876
|
+
const b = L(() => {
|
|
2877
|
+
if (dt(t)) return "";
|
|
2847
2878
|
try {
|
|
2848
2879
|
return JSON.stringify(t);
|
|
2849
2880
|
} catch {
|
|
2850
2881
|
return String(t);
|
|
2851
2882
|
}
|
|
2852
|
-
}, [t]),
|
|
2883
|
+
}, [t]), y = L(() => {
|
|
2853
2884
|
if (!b)
|
|
2854
2885
|
return { surfaces: [], processor: null };
|
|
2855
2886
|
try {
|
|
2856
|
-
const p = JSON.parse(b), f = new
|
|
2887
|
+
const p = JSON.parse(b), f = new en([Rn()]), v = Fo(p, {
|
|
2857
2888
|
surfaceId: n,
|
|
2858
|
-
catalogId:
|
|
2889
|
+
catalogId: En
|
|
2859
2890
|
});
|
|
2860
2891
|
return f.processMessages(v), {
|
|
2861
2892
|
surfaces: Array.from(f.model.surfacesMap.values()),
|
|
@@ -2864,15 +2895,15 @@ const zi = zn(
|
|
|
2864
2895
|
} catch (p) {
|
|
2865
2896
|
return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", p), { surfaces: [], processor: null };
|
|
2866
2897
|
}
|
|
2867
|
-
}, [b, n]), { surfaces: S, processor:
|
|
2868
|
-
if (m.current =
|
|
2898
|
+
}, [b, n]), { surfaces: S, processor: g } = y;
|
|
2899
|
+
if (m.current = g, Ln(
|
|
2869
2900
|
c,
|
|
2870
2901
|
() => ({
|
|
2871
2902
|
getValues(p) {
|
|
2872
2903
|
const f = m.current;
|
|
2873
2904
|
if (!f) return {};
|
|
2874
2905
|
const v = (p ?? d.current).map((x) => x.trim()).filter(Boolean);
|
|
2875
|
-
return
|
|
2906
|
+
return Po(f, n, v);
|
|
2876
2907
|
},
|
|
2877
2908
|
setValues(p) {
|
|
2878
2909
|
const f = m.current;
|
|
@@ -2887,17 +2918,17 @@ const zi = zn(
|
|
|
2887
2918
|
}),
|
|
2888
2919
|
[n]
|
|
2889
2920
|
), S.length === 0) {
|
|
2890
|
-
const p = /* @__PURE__ */ u(
|
|
2891
|
-
return l ? /* @__PURE__ */ u(
|
|
2921
|
+
const p = /* @__PURE__ */ u(ct, { resumeSearch: s, children: /* @__PURE__ */ u(lt, { caseSearch: a, children: /* @__PURE__ */ u(at, { interactive: o, children: r }) }) });
|
|
2922
|
+
return l ? /* @__PURE__ */ u(ke, { children: p }) : p;
|
|
2892
2923
|
}
|
|
2893
|
-
const k = /* @__PURE__ */ u(
|
|
2894
|
-
return l ? /* @__PURE__ */ u(
|
|
2924
|
+
const k = /* @__PURE__ */ u(ct, { resumeSearch: s, children: /* @__PURE__ */ u(lt, { caseSearch: a, children: /* @__PURE__ */ u(at, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: S.map((p) => /* @__PURE__ */ u(Zt, { surface: p }, p.id)) }) }) }) });
|
|
2925
|
+
return l ? /* @__PURE__ */ u(ke, { children: k }) : k;
|
|
2895
2926
|
}
|
|
2896
2927
|
);
|
|
2897
|
-
function
|
|
2898
|
-
return new
|
|
2928
|
+
function Ee() {
|
|
2929
|
+
return new en([Rn()]);
|
|
2899
2930
|
}
|
|
2900
|
-
function
|
|
2931
|
+
function _s({
|
|
2901
2932
|
messages: e,
|
|
2902
2933
|
surfaceId: t = "skopon-form-stream",
|
|
2903
2934
|
emptyHint: n = null,
|
|
@@ -2905,11 +2936,11 @@ function Ss({
|
|
|
2905
2936
|
resumeSearch: o = null,
|
|
2906
2937
|
caseSearch: i = null
|
|
2907
2938
|
}) {
|
|
2908
|
-
|
|
2909
|
-
|
|
2939
|
+
q(() => {
|
|
2940
|
+
nn(), tn();
|
|
2910
2941
|
}, []);
|
|
2911
2942
|
const s = A(null);
|
|
2912
|
-
s.current === null && (s.current =
|
|
2943
|
+
s.current === null && (s.current = Ee());
|
|
2913
2944
|
const a = A(0), l = A(""), c = A(!0), m = A(t);
|
|
2914
2945
|
function d(p, f) {
|
|
2915
2946
|
s.current = p, a.current = f.length, l.current = JSON.stringify(f), c.current && (S(p), k(Array.from(p.model.surfacesMap.values())));
|
|
@@ -2925,36 +2956,36 @@ function Ss({
|
|
|
2925
2956
|
return !0;
|
|
2926
2957
|
}
|
|
2927
2958
|
}
|
|
2928
|
-
const [
|
|
2959
|
+
const [y, S] = w(
|
|
2929
2960
|
() => s.current
|
|
2930
|
-
), [
|
|
2961
|
+
), [g, k] = w(
|
|
2931
2962
|
() => Array.from(
|
|
2932
2963
|
s.current.model.surfacesMap.values()
|
|
2933
2964
|
)
|
|
2934
2965
|
);
|
|
2935
|
-
return
|
|
2966
|
+
return q(() => (c.current = !0, () => {
|
|
2936
2967
|
c.current = !1;
|
|
2937
|
-
}), []),
|
|
2938
|
-
s.current =
|
|
2939
|
-
}, [
|
|
2968
|
+
}), []), q(() => {
|
|
2969
|
+
s.current = y;
|
|
2970
|
+
}, [y]), q(() => {
|
|
2940
2971
|
const p = () => {
|
|
2941
|
-
c.current && k(Array.from(
|
|
2942
|
-
}, f =
|
|
2972
|
+
c.current && k(Array.from(y.model.surfacesMap.values()));
|
|
2973
|
+
}, f = y.onSurfaceCreated(p), v = y.onSurfaceDeleted(p);
|
|
2943
2974
|
return () => {
|
|
2944
2975
|
f.unsubscribe(), v.unsubscribe();
|
|
2945
2976
|
};
|
|
2946
|
-
}, [
|
|
2977
|
+
}, [y]), q(() => {
|
|
2947
2978
|
let p = !1;
|
|
2948
2979
|
const f = m.current !== t;
|
|
2949
2980
|
if (m.current = t, f) {
|
|
2950
|
-
const _ =
|
|
2981
|
+
const _ = Ee();
|
|
2951
2982
|
return Array.isArray(e) && e.length > 0 ? (_.processMessages(e), p || d(_, e)) : (s.current = _, a.current = 0, l.current = "", p || (S(_), k([]))), () => {
|
|
2952
2983
|
p = !0;
|
|
2953
2984
|
};
|
|
2954
2985
|
}
|
|
2955
2986
|
if (!Array.isArray(e) || e.length === 0) {
|
|
2956
2987
|
if (a.current > 0) {
|
|
2957
|
-
const _ =
|
|
2988
|
+
const _ = Ee();
|
|
2958
2989
|
s.current = _, a.current = 0, l.current = "", p || (S(_), k([]));
|
|
2959
2990
|
}
|
|
2960
2991
|
return () => {
|
|
@@ -2963,7 +2994,7 @@ function Ss({
|
|
|
2963
2994
|
}
|
|
2964
2995
|
const v = s.current, x = a.current;
|
|
2965
2996
|
if (e.length < x || b(e, x)) {
|
|
2966
|
-
const _ =
|
|
2997
|
+
const _ = Ee();
|
|
2967
2998
|
return _.processMessages(e), p || d(_, e), () => {
|
|
2968
2999
|
p = !0;
|
|
2969
3000
|
};
|
|
@@ -2974,25 +3005,25 @@ function Ss({
|
|
|
2974
3005
|
} : (v.processMessages(N), a.current = e.length, l.current = JSON.stringify(e), p || k(Array.from(v.model.surfacesMap.values())), () => {
|
|
2975
3006
|
p = !0;
|
|
2976
3007
|
});
|
|
2977
|
-
}, [e, t]),
|
|
3008
|
+
}, [e, t]), g.length === 0 ? /* @__PURE__ */ u(ke, { children: n }) : /* @__PURE__ */ u(ke, { children: /* @__PURE__ */ u(ct, { resumeSearch: o, children: /* @__PURE__ */ u(lt, { caseSearch: i, children: /* @__PURE__ */ u(at, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: g.map((p) => /* @__PURE__ */ u(Zt, { surface: p }, p.id)) }) }) }) }) });
|
|
2978
3009
|
}
|
|
2979
|
-
const
|
|
2980
|
-
function
|
|
3010
|
+
const Vi = 100, Li = 3e4, ji = 1500, fe = /* @__PURE__ */ new Map();
|
|
3011
|
+
function $i(e) {
|
|
2981
3012
|
const t = e.trim();
|
|
2982
|
-
let n =
|
|
2983
|
-
return n || (n = new
|
|
3013
|
+
let n = fe.get(t);
|
|
3014
|
+
return n || (n = new Di(t), fe.set(t, n)), n.acquire(), n;
|
|
2984
3015
|
}
|
|
2985
|
-
class
|
|
3016
|
+
class Di {
|
|
2986
3017
|
constructor(t) {
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
3018
|
+
G(this, "url");
|
|
3019
|
+
G(this, "ws", null);
|
|
3020
|
+
G(this, "refCount", 0);
|
|
3021
|
+
G(this, "connectRequested", !1);
|
|
3022
|
+
G(this, "reconnectAttempt", 0);
|
|
3023
|
+
G(this, "reconnectTimer", null);
|
|
3024
|
+
G(this, "releaseTimer", null);
|
|
3025
|
+
G(this, "sendQueue", []);
|
|
3026
|
+
G(this, "handlers", /* @__PURE__ */ new Map());
|
|
2996
3027
|
this.url = t;
|
|
2997
3028
|
}
|
|
2998
3029
|
acquire() {
|
|
@@ -3000,12 +3031,12 @@ class Vi {
|
|
|
3000
3031
|
}
|
|
3001
3032
|
release() {
|
|
3002
3033
|
this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
|
|
3003
|
-
this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(),
|
|
3004
|
-
},
|
|
3034
|
+
this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), fe.get(this.url) === this && fe.delete(this.url));
|
|
3035
|
+
}, ji));
|
|
3005
3036
|
}
|
|
3006
3037
|
/** 强制关闭(测试用),跳过宽限期。 */
|
|
3007
3038
|
forceClose() {
|
|
3008
|
-
this.refCount = 0, this.teardown(),
|
|
3039
|
+
this.refCount = 0, this.teardown(), fe.get(this.url) === this && fe.delete(this.url);
|
|
3009
3040
|
}
|
|
3010
3041
|
subscribe(t, n) {
|
|
3011
3042
|
const r = t.trim();
|
|
@@ -3074,7 +3105,7 @@ class Vi {
|
|
|
3074
3105
|
}
|
|
3075
3106
|
}
|
|
3076
3107
|
enqueue(t) {
|
|
3077
|
-
for (this.sendQueue.push(t); this.sendQueue.length >
|
|
3108
|
+
for (this.sendQueue.push(t); this.sendQueue.length > Vi; )
|
|
3078
3109
|
this.sendQueue.shift();
|
|
3079
3110
|
}
|
|
3080
3111
|
flushQueue() {
|
|
@@ -3088,7 +3119,7 @@ class Vi {
|
|
|
3088
3119
|
if (!this.connectRequested || this.refCount <= 0) return;
|
|
3089
3120
|
this.clearReconnectTimer();
|
|
3090
3121
|
const t = Math.min(
|
|
3091
|
-
|
|
3122
|
+
Li,
|
|
3092
3123
|
1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
|
|
3093
3124
|
);
|
|
3094
3125
|
this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
|
|
@@ -3126,13 +3157,13 @@ class Vi {
|
|
|
3126
3157
|
}
|
|
3127
3158
|
}
|
|
3128
3159
|
}
|
|
3129
|
-
class
|
|
3160
|
+
class Hi {
|
|
3130
3161
|
constructor(t) {
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
this.askUserMessageId = t.askUserMessageId.trim(), this.connection =
|
|
3162
|
+
G(this, "askUserMessageId");
|
|
3163
|
+
G(this, "connection");
|
|
3164
|
+
G(this, "unsubscribe");
|
|
3165
|
+
G(this, "closed", !1);
|
|
3166
|
+
this.askUserMessageId = t.askUserMessageId.trim(), this.connection = $i(t.url);
|
|
3136
3167
|
const n = t.onAutoControl;
|
|
3137
3168
|
this.unsubscribe = n ? this.connection.subscribe(this.askUserMessageId, n) : () => {
|
|
3138
3169
|
};
|
|
@@ -3147,24 +3178,24 @@ class ji {
|
|
|
3147
3178
|
this.closed || (this.closed = !0, this.unsubscribe(), this.connection.release());
|
|
3148
3179
|
}
|
|
3149
3180
|
}
|
|
3150
|
-
function
|
|
3181
|
+
function Pn(e) {
|
|
3151
3182
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
3152
3183
|
}
|
|
3153
|
-
function
|
|
3184
|
+
function Ki(e, t) {
|
|
3154
3185
|
if (!e) return !1;
|
|
3155
|
-
const n = e.querySelector(`[data-skopon-field="${
|
|
3186
|
+
const n = e.querySelector(`[data-skopon-field="${Pn(t)}"]`);
|
|
3156
3187
|
return n instanceof HTMLElement ? ((n.querySelector(
|
|
3157
3188
|
'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
|
|
3158
3189
|
) ?? n).focus(), !0) : !1;
|
|
3159
3190
|
}
|
|
3160
|
-
function
|
|
3191
|
+
function Ji(e, t) {
|
|
3161
3192
|
if (!e) return !1;
|
|
3162
|
-
const n = e.querySelector(`[data-skopon-field="${
|
|
3193
|
+
const n = e.querySelector(`[data-skopon-field="${Pn(t)}"]`);
|
|
3163
3194
|
return n instanceof HTMLElement ? ((n.querySelector(
|
|
3164
3195
|
'button, [role="button"], .skopon-resume-select-card, input, label'
|
|
3165
3196
|
) ?? n).click(), !0) : !1;
|
|
3166
3197
|
}
|
|
3167
|
-
function
|
|
3198
|
+
function Gi(e, t, n) {
|
|
3168
3199
|
const r = e.action;
|
|
3169
3200
|
if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
|
|
3170
3201
|
console.warn("[FormAutoControl] unknown action", r);
|
|
@@ -3194,47 +3225,47 @@ function Hi(e, t, n) {
|
|
|
3194
3225
|
return;
|
|
3195
3226
|
}
|
|
3196
3227
|
if (r === "focus") {
|
|
3197
|
-
|
|
3228
|
+
Ki(t.rootElement, o), n.reportEvent({
|
|
3198
3229
|
action: "focus",
|
|
3199
3230
|
component: i,
|
|
3200
3231
|
field: o
|
|
3201
3232
|
});
|
|
3202
3233
|
return;
|
|
3203
3234
|
}
|
|
3204
|
-
|
|
3235
|
+
Ji(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
|
|
3205
3236
|
});
|
|
3206
3237
|
}
|
|
3207
|
-
function
|
|
3238
|
+
function Wi(e) {
|
|
3208
3239
|
const t = {};
|
|
3209
3240
|
for (const [n, r] of Object.entries(e))
|
|
3210
3241
|
r !== void 0 && (t[n] = r);
|
|
3211
3242
|
return t;
|
|
3212
3243
|
}
|
|
3213
|
-
function
|
|
3244
|
+
function Yi(e, t) {
|
|
3214
3245
|
var o;
|
|
3215
3246
|
const n = (o = e.name) == null ? void 0 : o.trim();
|
|
3216
3247
|
if (!n || !t) return { ...e };
|
|
3217
3248
|
const r = t.get(n);
|
|
3218
3249
|
return r ? e.type !== "resume_multiselect" && e.type !== "case_multiselect" ? { ...e } : { ...e, options: r.map((i) => ({ ...i })) } : { ...e };
|
|
3219
3250
|
}
|
|
3220
|
-
function
|
|
3251
|
+
function Qi(e) {
|
|
3221
3252
|
var i, s;
|
|
3222
3253
|
const n = {
|
|
3223
3254
|
blocks: (e.blocks ?? []).map(
|
|
3224
|
-
(a) =>
|
|
3255
|
+
(a) => Yi(a, e.liveOptions)
|
|
3225
3256
|
)
|
|
3226
3257
|
}, r = (i = e.title) == null ? void 0 : i.trim(), o = (s = e.description) == null ? void 0 : s.trim();
|
|
3227
3258
|
return r && (n.title = r), o && (n.description = o), {
|
|
3228
3259
|
form_schema: n,
|
|
3229
|
-
form_values:
|
|
3260
|
+
form_values: Wi(e.values ?? {}),
|
|
3230
3261
|
form_change: [...e.formChange ?? []]
|
|
3231
3262
|
};
|
|
3232
3263
|
}
|
|
3233
|
-
function
|
|
3234
|
-
const t =
|
|
3235
|
-
return t ?
|
|
3264
|
+
function Xi(e) {
|
|
3265
|
+
const t = Ve(e);
|
|
3266
|
+
return t ? ze(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
3236
3267
|
}
|
|
3237
|
-
function
|
|
3268
|
+
function Zi({
|
|
3238
3269
|
payload: e,
|
|
3239
3270
|
callbackUrl: t,
|
|
3240
3271
|
title: n,
|
|
@@ -3244,17 +3275,17 @@ function Yi({
|
|
|
3244
3275
|
submitHeaders: s,
|
|
3245
3276
|
onNotify: a
|
|
3246
3277
|
}) {
|
|
3247
|
-
const [l, c] =
|
|
3248
|
-
|
|
3278
|
+
const [l, c] = w(!1), m = A(!0);
|
|
3279
|
+
q(() => (m.current = !0, () => {
|
|
3249
3280
|
m.current = !1;
|
|
3250
3281
|
}), []);
|
|
3251
|
-
const d =
|
|
3252
|
-
() =>
|
|
3282
|
+
const d = L(
|
|
3283
|
+
() => Tt(s),
|
|
3253
3284
|
[s]
|
|
3254
|
-
), b =
|
|
3255
|
-
() =>
|
|
3285
|
+
), b = L(
|
|
3286
|
+
() => An(e, t, d),
|
|
3256
3287
|
[e, t, d]
|
|
3257
|
-
),
|
|
3288
|
+
), y = L(
|
|
3258
3289
|
() => ({
|
|
3259
3290
|
...i,
|
|
3260
3291
|
callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? t ?? null
|
|
@@ -3265,19 +3296,19 @@ function Yi({
|
|
|
3265
3296
|
if (!l) {
|
|
3266
3297
|
c(!0);
|
|
3267
3298
|
try {
|
|
3268
|
-
const
|
|
3269
|
-
context:
|
|
3299
|
+
const g = Xi(e), k = Mt({
|
|
3300
|
+
context: y,
|
|
3270
3301
|
payload: e,
|
|
3271
|
-
answer:
|
|
3272
|
-
}), p = await
|
|
3302
|
+
answer: g
|
|
3303
|
+
}), p = await Nn(k, {
|
|
3273
3304
|
headers: d
|
|
3274
3305
|
});
|
|
3275
3306
|
if (!m.current) return;
|
|
3276
|
-
const f =
|
|
3307
|
+
const f = Mn(p);
|
|
3277
3308
|
a == null || a(f.type, f.message);
|
|
3278
|
-
} catch (
|
|
3309
|
+
} catch (g) {
|
|
3279
3310
|
if (!m.current) return;
|
|
3280
|
-
const k =
|
|
3311
|
+
const k = g instanceof Error ? g.message : "提交失败";
|
|
3281
3312
|
a == null || a("error", k);
|
|
3282
3313
|
} finally {
|
|
3283
3314
|
m.current && c(!1);
|
|
@@ -3288,10 +3319,10 @@ function Yi({
|
|
|
3288
3319
|
/* @__PURE__ */ M("div", { className: "ask-user-curl-card-header", children: [
|
|
3289
3320
|
/* @__PURE__ */ M("div", { className: "ask-user-curl-card-header-title", children: [
|
|
3290
3321
|
/* @__PURE__ */ u(ne.Text, { type: "secondary", children: n ?? "curl 命令" }),
|
|
3291
|
-
r ? /* @__PURE__ */ u(
|
|
3292
|
-
o ? /* @__PURE__ */ u(
|
|
3322
|
+
r ? /* @__PURE__ */ u(ye, { title: r, children: /* @__PURE__ */ u(ve, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
|
|
3323
|
+
o ? /* @__PURE__ */ u(ye, { title: o, children: /* @__PURE__ */ u(ve, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
|
|
3293
3324
|
] }),
|
|
3294
|
-
/* @__PURE__ */ u(
|
|
3325
|
+
/* @__PURE__ */ u(ye, { title: "提交到 answer_agent_callback_url", children: /* @__PURE__ */ u(
|
|
3295
3326
|
Oe,
|
|
3296
3327
|
{
|
|
3297
3328
|
size: "small",
|
|
@@ -3306,8 +3337,8 @@ function Yi({
|
|
|
3306
3337
|
/* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children: b })
|
|
3307
3338
|
] });
|
|
3308
3339
|
}
|
|
3309
|
-
const
|
|
3310
|
-
function
|
|
3340
|
+
const es = 80;
|
|
3341
|
+
function ts(e, t) {
|
|
3311
3342
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
3312
3343
|
const n = t.message;
|
|
3313
3344
|
if (typeof n == "string" && n.trim())
|
|
@@ -3315,7 +3346,7 @@ function Xi(e, t) {
|
|
|
3315
3346
|
}
|
|
3316
3347
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
3317
3348
|
}
|
|
3318
|
-
function
|
|
3349
|
+
function ns({
|
|
3319
3350
|
payload: e,
|
|
3320
3351
|
formUniqueId: t,
|
|
3321
3352
|
askUserMessageId: n,
|
|
@@ -3330,210 +3361,223 @@ function Zi({
|
|
|
3330
3361
|
onSurfaceReadyChange: d,
|
|
3331
3362
|
onAutoControlReady: b
|
|
3332
3363
|
}) {
|
|
3333
|
-
const [
|
|
3364
|
+
const [y, S] = w(null), [g, k] = w(!1), [p, f] = w(!0), [v, x] = w(!1), N = A(null), _ = A(null), z = A(!0), C = A(l);
|
|
3334
3365
|
C.current = l;
|
|
3335
|
-
const
|
|
3336
|
-
() =>
|
|
3366
|
+
const B = un(), V = gt(), re = A(""), K = A(null), $ = (t == null ? void 0 : t.trim()) ?? "", W = (n == null ? void 0 : n.trim()) ?? "", ee = L(
|
|
3367
|
+
() => Tt(s),
|
|
3337
3368
|
[s]
|
|
3338
|
-
), te =
|
|
3369
|
+
), te = L(
|
|
3339
3370
|
() => ({
|
|
3340
3371
|
...i,
|
|
3341
3372
|
callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? r ?? null
|
|
3342
3373
|
}),
|
|
3343
3374
|
[i, r]
|
|
3344
3375
|
);
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
}), []),
|
|
3348
|
-
let
|
|
3349
|
-
return
|
|
3350
|
-
|
|
3351
|
-
}).catch((
|
|
3352
|
-
var
|
|
3353
|
-
if (!
|
|
3376
|
+
q(() => (z.current = !0, () => {
|
|
3377
|
+
z.current = !1, K.current != null && (clearTimeout(K.current), K.current = null);
|
|
3378
|
+
}), []), q(() => {
|
|
3379
|
+
let F = !1;
|
|
3380
|
+
return $ ? (f(!0), k(!1), a({ formUniqueId: $ }).then((O) => {
|
|
3381
|
+
F || (k(!!O.disabled), S(O.formDefinition ?? null));
|
|
3382
|
+
}).catch((O) => {
|
|
3383
|
+
var J;
|
|
3384
|
+
if (!F) {
|
|
3354
3385
|
k(!1), S(null);
|
|
3355
|
-
const Ie =
|
|
3356
|
-
(
|
|
3386
|
+
const Ie = O instanceof Error ? O.message : "获取表单定义失败";
|
|
3387
|
+
(J = C.current) == null || J.call(C, "error", Ie);
|
|
3357
3388
|
}
|
|
3358
3389
|
}).finally(() => {
|
|
3359
|
-
|
|
3390
|
+
F || f(!1);
|
|
3360
3391
|
}), () => {
|
|
3361
|
-
|
|
3392
|
+
F = !0;
|
|
3362
3393
|
}) : (f(!1), k(!1), S(null), () => {
|
|
3363
|
-
|
|
3394
|
+
F = !0;
|
|
3364
3395
|
});
|
|
3365
|
-
}, [
|
|
3366
|
-
const
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3396
|
+
}, [$, a]);
|
|
3397
|
+
const E = L(() => Ve(e), [e]), P = L(() => E ? Bo(E, y ?? void 0) : null, [E, y]), T = (P == null ? void 0 : P.matchedBlocks) ?? [], D = !!(E && Vo(E) && T.length === 0), U = L(() => D && E ? Lo(E) : P && P.renderBlocks.length > 0 ? P.renderBlocks : [], [P, D, E]), I = L(() => {
|
|
3398
|
+
if (D && E)
|
|
3399
|
+
return jo(E);
|
|
3400
|
+
const F = ze((P == null ? void 0 : P.extraBlocks) ?? []);
|
|
3401
|
+
return { ...ze(
|
|
3402
|
+
((P == null ? void 0 : P.matchedBlocks) ?? []).filter(
|
|
3403
|
+
(J) => J.type === "text" && J.hidden === !0
|
|
3404
|
+
)
|
|
3405
|
+
), ...F };
|
|
3406
|
+
}, [D, E, P]), Y = L(
|
|
3407
|
+
() => U.filter((F) => {
|
|
3408
|
+
var O;
|
|
3409
|
+
return (O = F.name) == null ? void 0 : O.trim();
|
|
3410
|
+
}).map((F) => F.name.trim()),
|
|
3411
|
+
[U]
|
|
3412
|
+
), ce = (P == null ? void 0 : P.title) ?? (E == null ? void 0 : E.title) ?? "", ue = (P == null ? void 0 : P.description) ?? (E == null ? void 0 : E.description) ?? "", me = L(() => U.length === 0 ? null : Uo(
|
|
3413
|
+
{ title: ce, description: ue },
|
|
3414
|
+
U
|
|
3415
|
+
), [ce, ue, U]), $e = L(() => {
|
|
3416
|
+
if (!me) return "";
|
|
3377
3417
|
try {
|
|
3378
|
-
return JSON.stringify(
|
|
3418
|
+
return JSON.stringify(me);
|
|
3379
3419
|
} catch {
|
|
3380
|
-
return String(
|
|
3420
|
+
return String(me);
|
|
3381
3421
|
}
|
|
3382
|
-
}, [
|
|
3383
|
-
|
|
3384
|
-
const
|
|
3385
|
-
var
|
|
3386
|
-
return { ...((
|
|
3387
|
-
}, [
|
|
3388
|
-
|
|
3389
|
-
const He = A(
|
|
3390
|
-
He.current =
|
|
3391
|
-
const
|
|
3392
|
-
(
|
|
3393
|
-
const
|
|
3394
|
-
title:
|
|
3395
|
-
description:
|
|
3396
|
-
blocks:
|
|
3397
|
-
values:
|
|
3398
|
-
liveOptions:
|
|
3399
|
-
formChange:
|
|
3422
|
+
}, [me]), De = $ ? `ask-user-${$}` : "ask-user-payload", oe = !!(!p && E && U.length > 0 && me);
|
|
3423
|
+
q(() => (d(oe), () => d(!1)), [oe, d]);
|
|
3424
|
+
const It = j(() => {
|
|
3425
|
+
var O;
|
|
3426
|
+
return { ...((O = N.current) == null ? void 0 : O.getValues(Y)) ?? {}, ...I };
|
|
3427
|
+
}, [Y, I]), Ft = A(V.liveOptions);
|
|
3428
|
+
Ft.current = V.liveOptions;
|
|
3429
|
+
const He = A(V.pendingChangeFields);
|
|
3430
|
+
He.current = V.pendingChangeFields;
|
|
3431
|
+
const he = j(
|
|
3432
|
+
(F) => {
|
|
3433
|
+
const O = Qi({
|
|
3434
|
+
title: ce,
|
|
3435
|
+
description: ue,
|
|
3436
|
+
blocks: U,
|
|
3437
|
+
values: It(),
|
|
3438
|
+
liveOptions: Ft.current,
|
|
3439
|
+
formChange: F
|
|
3400
3440
|
});
|
|
3401
|
-
|
|
3441
|
+
B.reportData(O);
|
|
3402
3442
|
},
|
|
3403
|
-
[
|
|
3404
|
-
), Ke = A(
|
|
3405
|
-
Ke.current =
|
|
3443
|
+
[ce, ue, U, It, B]
|
|
3444
|
+
), Ke = A(he);
|
|
3445
|
+
Ke.current = he, q(() => {
|
|
3406
3446
|
if (!oe) {
|
|
3407
3447
|
re.current = "";
|
|
3408
3448
|
return;
|
|
3409
3449
|
}
|
|
3410
3450
|
if (!$e) return;
|
|
3411
|
-
const
|
|
3412
|
-
if (re.current ===
|
|
3413
|
-
const
|
|
3414
|
-
|
|
3451
|
+
const F = `${De}::${$e}`;
|
|
3452
|
+
if (re.current === F) return;
|
|
3453
|
+
const O = setTimeout(() => {
|
|
3454
|
+
z.current && re.current !== F && (re.current = F, Ke.current([]));
|
|
3415
3455
|
}, 0);
|
|
3416
|
-
return () => clearTimeout(
|
|
3417
|
-
}, [oe, De, $e]),
|
|
3418
|
-
if (!(!oe ||
|
|
3456
|
+
return () => clearTimeout(O);
|
|
3457
|
+
}, [oe, De, $e]), q(() => {
|
|
3458
|
+
if (!(!oe || V.version === 0) && He.current.length !== 0)
|
|
3419
3459
|
return K.current != null && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
3420
|
-
if (K.current = null, !
|
|
3421
|
-
const
|
|
3422
|
-
|
|
3423
|
-
},
|
|
3460
|
+
if (K.current = null, !z.current) return;
|
|
3461
|
+
const F = [...He.current];
|
|
3462
|
+
V.clearPendingChangeFields(), F.length !== 0 && Ke.current(F);
|
|
3463
|
+
}, es), () => {
|
|
3424
3464
|
K.current != null && (clearTimeout(K.current), K.current = null);
|
|
3425
3465
|
};
|
|
3426
|
-
}, [oe,
|
|
3427
|
-
const Je =
|
|
3428
|
-
var
|
|
3466
|
+
}, [oe, V.version, V.clearPendingChangeFields]);
|
|
3467
|
+
const Je = j(async () => {
|
|
3468
|
+
var F, O, J, Ie, Rt, Pt, wt, zt;
|
|
3429
3469
|
if (!v) {
|
|
3430
3470
|
x(!0);
|
|
3431
3471
|
try {
|
|
3432
|
-
const
|
|
3433
|
-
if (
|
|
3434
|
-
(
|
|
3472
|
+
const ge = { ...((F = N.current) == null ? void 0 : F.getValues(Y)) ?? {}, ...I }, Ot = mi(U, ge);
|
|
3473
|
+
if (Ot) {
|
|
3474
|
+
(O = C.current) == null || O.call(C, "error", Ot.message);
|
|
3435
3475
|
return;
|
|
3436
3476
|
}
|
|
3437
|
-
const zt = { ...pe, ...I };
|
|
3438
3477
|
if (o === "post") {
|
|
3439
3478
|
const Lt = (r ?? "").trim();
|
|
3440
3479
|
if (!Lt) {
|
|
3441
|
-
(
|
|
3480
|
+
(J = C.current) == null || J.call(C, "error", "callback_url 为空,无法提交");
|
|
3442
3481
|
return;
|
|
3443
3482
|
}
|
|
3444
|
-
|
|
3483
|
+
he([]), B.reportEvent({
|
|
3445
3484
|
action: "submit",
|
|
3446
3485
|
component: "SubmitButton"
|
|
3447
3486
|
});
|
|
3448
|
-
const
|
|
3487
|
+
const We = await _n(Lt, ge, {
|
|
3449
3488
|
headers: ee
|
|
3450
3489
|
});
|
|
3451
|
-
if (!
|
|
3452
|
-
|
|
3490
|
+
if (!z.current) return;
|
|
3491
|
+
We.ok ? (Ie = C.current) == null || Ie.call(C, "success", "提交成功") : (Rt = C.current) == null || Rt.call(C, "error", ts(We.status, We.body));
|
|
3453
3492
|
return;
|
|
3454
3493
|
}
|
|
3455
|
-
const
|
|
3494
|
+
const wn = U.length > 0 ? {
|
|
3495
|
+
title: ce,
|
|
3496
|
+
description: ue,
|
|
3497
|
+
blocks: U
|
|
3498
|
+
} : E ?? void 0, qt = Mt({
|
|
3456
3499
|
context: te,
|
|
3457
3500
|
payload: e,
|
|
3458
|
-
form:
|
|
3459
|
-
answer:
|
|
3460
|
-
}),
|
|
3461
|
-
if (
|
|
3462
|
-
(
|
|
3501
|
+
form: wn,
|
|
3502
|
+
answer: ge
|
|
3503
|
+
}), Bt = Nt(qt);
|
|
3504
|
+
if (Bt) {
|
|
3505
|
+
(Pt = C.current) == null || Pt.call(C, "error", Bt);
|
|
3463
3506
|
return;
|
|
3464
3507
|
}
|
|
3465
|
-
|
|
3508
|
+
he([]), B.reportEvent({
|
|
3466
3509
|
action: "submit",
|
|
3467
3510
|
component: "SubmitButton"
|
|
3468
3511
|
});
|
|
3469
|
-
const
|
|
3512
|
+
const zn = await Nn(qt, {
|
|
3470
3513
|
headers: ee
|
|
3471
3514
|
});
|
|
3472
|
-
if (!
|
|
3473
|
-
const
|
|
3474
|
-
(
|
|
3475
|
-
} catch (
|
|
3476
|
-
if (!
|
|
3477
|
-
const
|
|
3478
|
-
(
|
|
3515
|
+
if (!z.current) return;
|
|
3516
|
+
const Vt = Mn(zn);
|
|
3517
|
+
(wt = C.current) == null || wt.call(C, Vt.type, Vt.message);
|
|
3518
|
+
} catch (Ge) {
|
|
3519
|
+
if (!z.current) return;
|
|
3520
|
+
const ge = Ge instanceof Error ? Ge.message : "提交失败";
|
|
3521
|
+
(zt = C.current) == null || zt.call(C, "error", ge);
|
|
3479
3522
|
} finally {
|
|
3480
|
-
|
|
3523
|
+
z.current && x(!1);
|
|
3481
3524
|
}
|
|
3482
3525
|
}
|
|
3483
3526
|
}, [
|
|
3484
3527
|
v,
|
|
3485
|
-
|
|
3486
|
-
|
|
3528
|
+
Y,
|
|
3529
|
+
U,
|
|
3530
|
+
ce,
|
|
3531
|
+
ue,
|
|
3487
3532
|
I,
|
|
3488
|
-
|
|
3489
|
-
|
|
3533
|
+
he,
|
|
3534
|
+
B,
|
|
3490
3535
|
o,
|
|
3491
3536
|
r,
|
|
3492
3537
|
ee,
|
|
3493
3538
|
te,
|
|
3494
3539
|
e,
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
U,
|
|
3540
|
+
E
|
|
3541
|
+
]), Et = A(Je);
|
|
3542
|
+
Et.current = Je;
|
|
3543
|
+
const Ut = j(
|
|
3544
|
+
(F) => {
|
|
3545
|
+
Gi(
|
|
3546
|
+
F,
|
|
3503
3547
|
{
|
|
3504
|
-
setValues: (
|
|
3505
|
-
var
|
|
3506
|
-
return (
|
|
3548
|
+
setValues: (O) => {
|
|
3549
|
+
var J;
|
|
3550
|
+
return (J = N.current) == null ? void 0 : J.setValues(O);
|
|
3507
3551
|
},
|
|
3508
|
-
getValues: (
|
|
3509
|
-
var
|
|
3510
|
-
return ((
|
|
3552
|
+
getValues: (O) => {
|
|
3553
|
+
var J;
|
|
3554
|
+
return ((J = N.current) == null ? void 0 : J.getValues(O)) ?? {};
|
|
3511
3555
|
},
|
|
3512
|
-
submit: () =>
|
|
3556
|
+
submit: () => Et.current(),
|
|
3513
3557
|
rootElement: _.current
|
|
3514
3558
|
},
|
|
3515
3559
|
{
|
|
3516
|
-
reportEvent:
|
|
3517
|
-
runAutoControl:
|
|
3560
|
+
reportEvent: B.reportEvent,
|
|
3561
|
+
runAutoControl: B.runAutoControl
|
|
3518
3562
|
}
|
|
3519
3563
|
);
|
|
3520
3564
|
},
|
|
3521
|
-
[
|
|
3565
|
+
[B]
|
|
3522
3566
|
);
|
|
3523
|
-
return
|
|
3567
|
+
return q(() => {
|
|
3524
3568
|
if (!oe) {
|
|
3525
3569
|
b(null);
|
|
3526
3570
|
return;
|
|
3527
3571
|
}
|
|
3528
|
-
return b(
|
|
3529
|
-
}, [oe,
|
|
3530
|
-
|
|
3572
|
+
return b(Ut), () => b(null);
|
|
3573
|
+
}, [oe, Ut, b]), p ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(ft, { size: "small" }) }) : !E || U.length === 0 ? /* @__PURE__ */ u(
|
|
3574
|
+
Zi,
|
|
3531
3575
|
{
|
|
3532
3576
|
payload: e,
|
|
3533
3577
|
callbackUrl: r,
|
|
3534
3578
|
answerAgentContext: te,
|
|
3535
3579
|
submitHeaders: s,
|
|
3536
|
-
unpublishedFormId:
|
|
3580
|
+
unpublishedFormId: g && $ ? $ : void 0,
|
|
3537
3581
|
onNotify: l
|
|
3538
3582
|
}
|
|
3539
3583
|
) : /* @__PURE__ */ M(
|
|
@@ -3541,16 +3585,16 @@ function Zi({
|
|
|
3541
3585
|
{
|
|
3542
3586
|
className: "ask-user-form-card",
|
|
3543
3587
|
ref: _,
|
|
3544
|
-
"data-ask-user-message-id":
|
|
3588
|
+
"data-ask-user-message-id": W || void 0,
|
|
3545
3589
|
children: [
|
|
3546
|
-
|
|
3590
|
+
g && $ ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(ye, { title: $, children: /* @__PURE__ */ u(ve, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
|
|
3547
3591
|
/* @__PURE__ */ u(
|
|
3548
|
-
|
|
3592
|
+
Bi,
|
|
3549
3593
|
{
|
|
3550
3594
|
ref: N,
|
|
3551
|
-
doc:
|
|
3595
|
+
doc: me,
|
|
3552
3596
|
surfaceId: De,
|
|
3553
|
-
fieldNames:
|
|
3597
|
+
fieldNames: Y,
|
|
3554
3598
|
interactive: !0,
|
|
3555
3599
|
wrapProvider: !1,
|
|
3556
3600
|
resumeSearch: c,
|
|
@@ -3558,7 +3602,7 @@ function Zi({
|
|
|
3558
3602
|
}
|
|
3559
3603
|
),
|
|
3560
3604
|
/* @__PURE__ */ u("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ u(
|
|
3561
|
-
|
|
3605
|
+
ye,
|
|
3562
3606
|
{
|
|
3563
3607
|
title: o === "post" ? "提交 JSON 到 callback_url" : "提交到 answer_agent_callback_url",
|
|
3564
3608
|
children: /* @__PURE__ */ u(
|
|
@@ -3578,16 +3622,16 @@ function Zi({
|
|
|
3578
3622
|
}
|
|
3579
3623
|
);
|
|
3580
3624
|
}
|
|
3581
|
-
function
|
|
3625
|
+
function Ts(e) {
|
|
3582
3626
|
var c;
|
|
3583
|
-
const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n =
|
|
3627
|
+
const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = L(() => Qo(), []), [r, o] = w(!1), i = A(null), s = j((m) => {
|
|
3584
3628
|
o(m);
|
|
3585
|
-
}, []), a =
|
|
3629
|
+
}, []), a = j(
|
|
3586
3630
|
(m) => {
|
|
3587
3631
|
i.current = m;
|
|
3588
3632
|
},
|
|
3589
3633
|
[]
|
|
3590
|
-
), l =
|
|
3634
|
+
), l = L(() => !n || !t ? null : new Hi({
|
|
3591
3635
|
url: n,
|
|
3592
3636
|
askUserMessageId: t,
|
|
3593
3637
|
onAutoControl: (m) => {
|
|
@@ -3595,15 +3639,15 @@ function ks(e) {
|
|
|
3595
3639
|
(d = i.current) == null || d.call(i, m);
|
|
3596
3640
|
}
|
|
3597
3641
|
}), [n, t]);
|
|
3598
|
-
return
|
|
3642
|
+
return q(() => {
|
|
3599
3643
|
if (l)
|
|
3600
3644
|
return () => {
|
|
3601
3645
|
l.close();
|
|
3602
3646
|
};
|
|
3603
|
-
}, [l]),
|
|
3647
|
+
}, [l]), q(() => {
|
|
3604
3648
|
!l || !r || l.connect();
|
|
3605
|
-
}, [l, r]), /* @__PURE__ */ u(
|
|
3606
|
-
|
|
3649
|
+
}, [l, r]), /* @__PURE__ */ u(ke, { children: /* @__PURE__ */ u(Hr, { client: l, children: /* @__PURE__ */ u(Lr, { children: /* @__PURE__ */ u(
|
|
3650
|
+
ns,
|
|
3607
3651
|
{
|
|
3608
3652
|
...e,
|
|
3609
3653
|
onSurfaceReadyChange: s,
|
|
@@ -3612,70 +3656,71 @@ function ks(e) {
|
|
|
3612
3656
|
) }) }) });
|
|
3613
3657
|
}
|
|
3614
3658
|
export {
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3659
|
+
ps as A2UI_PROTOCOL_VERSION,
|
|
3660
|
+
Ts as AskUserFormCard,
|
|
3661
|
+
lt as CaseSearchProvider,
|
|
3662
|
+
Zi as CurlSubmitBlock,
|
|
3663
|
+
Go as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
|
|
3664
|
+
Ko as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
|
|
3665
|
+
Jo as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
|
|
3666
|
+
Ct as DEFAULT_AUTH_STORAGE_KEY,
|
|
3667
|
+
Ho as DEFAULT_AUTH_TOKEN_FIELD,
|
|
3668
|
+
rr as FORM_MEDIA_SIZES,
|
|
3669
|
+
ct as ResumeSearchProvider,
|
|
3670
|
+
_s as SkoponA2uiStreamRenderer,
|
|
3671
|
+
ke as SkoponFormProvider,
|
|
3672
|
+
Bi as SkoponFormRenderer,
|
|
3673
|
+
Io as a2uiToBlocks,
|
|
3674
|
+
vn as blocksToA2ui,
|
|
3675
|
+
wr as blocksToJsonSchema,
|
|
3676
|
+
Mt as buildAnswerAgentBody,
|
|
3677
|
+
$o as buildAskUserCurlBodyJson,
|
|
3678
|
+
Do as buildAskUserCurlStatement,
|
|
3679
|
+
Ss as buildAskUserSubmitCurlFromPayload,
|
|
3680
|
+
Uo as buildAskUserSurface,
|
|
3681
|
+
An as buildCurlStatement,
|
|
3682
|
+
Me as coerceToggleValue,
|
|
3683
|
+
ks as copyTextToClipboard,
|
|
3684
|
+
ci as createCaseSearchClient,
|
|
3685
|
+
vs as createEmptyBlock,
|
|
3686
|
+
ys as createEmptyFormDefinition,
|
|
3687
|
+
Xo as createFormClient,
|
|
3688
|
+
ii as createResumeSearchClient,
|
|
3689
|
+
As as createSkoponSdkClients,
|
|
3690
|
+
ze as extractExtraBlockValues,
|
|
3691
|
+
Po as extractSurfaceValues,
|
|
3692
|
+
Mn as formatAnswerAgentSubmitMessage,
|
|
3693
|
+
jo as getPayloadHiddenBlockValues,
|
|
3694
|
+
bs as getPayloadInputFieldNames,
|
|
3695
|
+
Lo as getPayloadRenderableBlocks,
|
|
3696
|
+
Bo as intersectPayloadBlocksWithForm,
|
|
3697
|
+
dt as isA2uiSurfaceEmpty,
|
|
3698
|
+
hs as isDisplayBlockType,
|
|
3654
3699
|
Z as isInputBlockType,
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3700
|
+
_e as isLayoutBlockType,
|
|
3701
|
+
pe as isMediaBlockType,
|
|
3702
|
+
or as isOptionsBlockType,
|
|
3703
|
+
Ro as mapFormDefinitionFromDto,
|
|
3659
3704
|
qe as normalizeFormDefinition,
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3705
|
+
de as normalizeMultiselectCount,
|
|
3706
|
+
Ve as parsePayloadBlocksJson,
|
|
3707
|
+
Vo as payloadHasInputBlocks,
|
|
3708
|
+
Yo as resolveAnswerAgentCallbackUrl,
|
|
3709
|
+
xt as resolveClientHeaders,
|
|
3710
|
+
Qo as resolveRealtimeWsUrl,
|
|
3711
|
+
Rr as resolveSchemaDefaultValue,
|
|
3712
|
+
Tn as resolveSkoponAuthHeaders,
|
|
3713
|
+
Tt as resolveSubmitAuthHeaders,
|
|
3714
|
+
Eo as resolveSurfaceFromFormDefinition,
|
|
3715
|
+
qi as skoponAntdTheme,
|
|
3671
3716
|
ie as skoponBrandColors,
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3717
|
+
Nn as submitAnswerAgent,
|
|
3718
|
+
_n as submitFormJson,
|
|
3719
|
+
gs as supportsDefaultValue,
|
|
3720
|
+
Fo as surfaceDocToMessages,
|
|
3721
|
+
be as syncFormDefinition,
|
|
3722
|
+
Gr as useCaseSearch,
|
|
3723
|
+
oo as useResumeSearch,
|
|
3724
|
+
Nt as validateAnswerAgentBody,
|
|
3725
|
+
Cs as validateAnswerAgentContext
|
|
3681
3726
|
};
|