@skopon-cool/form-sdk 0.4.0 → 0.4.1
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/index.js +775 -781
- package/package.json +1 -1
- package/src/components/AskUserFormCard.tsx +24 -24
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import './form-sdk.css';
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var G = (e, t, n) =>
|
|
2
|
+
var Fn = Object.defineProperty;
|
|
3
|
+
var En = (e, t, n) => t in e ? Fn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
+
var G = (e, t, n) => En(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
5
|
import { jsx as u, jsxs as I } from "react/jsx-runtime";
|
|
6
|
-
import { useRef as
|
|
7
|
-
import { Spin as
|
|
8
|
-
import { ReloadOutlined as
|
|
9
|
-
import { createBinderlessComponentImplementation as Q, basicCatalog as Ee, A2uiSurface as
|
|
6
|
+
import { useRef as A, useState as R, useCallback as $, useMemo as j, createContext as ye, useContext as ve, useEffect as z, useSyncExternalStore as Un, forwardRef as Rn, useImperativeHandle as wn } from "react";
|
|
7
|
+
import { Spin as mt, Button as ze, Typography as te, Avatar as Pn, Tag as fe, Select as ot, Checkbox as zn, Radio as On, Switch as qn, TimePicker as Bn, DatePicker as Ln, Upload as Je, Input as We, InputNumber as Vn, ConfigProvider as jn, Tooltip as pe } from "antd";
|
|
8
|
+
import { ReloadOutlined as Gt, FileTextOutlined as Jt, UserOutlined as $n, FileImageOutlined as Dn, FileExcelOutlined as Hn, FileOutlined as Wt, PictureOutlined as Kn, SoundOutlined as Gn, VideoCameraOutlined as Jn } from "@ant-design/icons";
|
|
9
|
+
import { createBinderlessComponentImplementation as Q, basicCatalog as Ee, A2uiSurface as Yt } 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 Wn, MessageProcessor as Qt } from "@a2ui/web_core/v0_9";
|
|
12
|
+
import { injectBasicCatalogStyles as Xt } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
13
|
+
import { injectStyles as Zt } from "@a2ui/react/styles";
|
|
14
|
+
import Lt from "dayjs";
|
|
15
|
+
const ns = "v0.9", Yn = [
|
|
16
16
|
"huge",
|
|
17
17
|
"large",
|
|
18
18
|
"medium",
|
|
@@ -28,7 +28,7 @@ function Oe(e) {
|
|
|
28
28
|
function ae(e) {
|
|
29
29
|
return !Oe(e) && !Ue(e);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Qn() {
|
|
32
32
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
33
33
|
return crypto.randomUUID();
|
|
34
34
|
if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
|
|
@@ -43,10 +43,10 @@ function Jn() {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
function Se(e) {
|
|
46
|
-
const t =
|
|
46
|
+
const t = Qn().replace(/-/g, "").slice(0, 8);
|
|
47
47
|
return `${e}${t}`;
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const en = [
|
|
50
50
|
{ value: "image/*", label: "图片" },
|
|
51
51
|
{ value: "video/*", label: "视频" },
|
|
52
52
|
{ value: "audio/*", label: "音频" },
|
|
@@ -57,7 +57,7 @@ const Qt = [
|
|
|
57
57
|
{ value: "text/plain", label: "纯文本" },
|
|
58
58
|
{ value: "application/zip", label: "ZIP 压缩包" },
|
|
59
59
|
{ value: "application/x-rar-compressed", label: "RAR 压缩包" }
|
|
60
|
-
],
|
|
60
|
+
], Xn = {
|
|
61
61
|
"image/*": ["image/*"],
|
|
62
62
|
"video/*": ["video/*"],
|
|
63
63
|
"audio/*": ["audio/*"],
|
|
@@ -77,7 +77,7 @@ const Qt = [
|
|
|
77
77
|
"text/plain": ["text/plain"],
|
|
78
78
|
"application/zip": ["application/zip"],
|
|
79
79
|
"application/x-rar-compressed": ["application/x-rar-compressed"]
|
|
80
|
-
},
|
|
80
|
+
}, Zn = {
|
|
81
81
|
"image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
|
|
82
82
|
"video/*": [".mp4", ".mov", ".avi", ".webm"],
|
|
83
83
|
"audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
|
|
@@ -88,14 +88,14 @@ const Qt = [
|
|
|
88
88
|
"text/plain": [".txt"],
|
|
89
89
|
"application/zip": [".zip", ".7z"],
|
|
90
90
|
"application/x-rar-compressed": [".rar"]
|
|
91
|
-
},
|
|
91
|
+
}, er = {
|
|
92
92
|
"application/msword": "office/word",
|
|
93
93
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
|
|
94
94
|
"application/vnd.ms-excel": "office/excel",
|
|
95
95
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "office/excel",
|
|
96
96
|
"application/vnd.ms-powerpoint": "office/ppt",
|
|
97
97
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "office/ppt"
|
|
98
|
-
},
|
|
98
|
+
}, dt = [
|
|
99
99
|
{ value: ".jpg", label: ".jpg" },
|
|
100
100
|
{ value: ".jpeg", label: ".jpeg" },
|
|
101
101
|
{ value: ".png", label: ".png" },
|
|
@@ -121,18 +121,18 @@ const Qt = [
|
|
|
121
121
|
{ value: ".zip", label: ".zip" },
|
|
122
122
|
{ value: ".rar", label: ".rar" },
|
|
123
123
|
{ value: ".7z", label: ".7z" }
|
|
124
|
-
],
|
|
125
|
-
|
|
126
|
-
),
|
|
127
|
-
|
|
128
|
-
),
|
|
129
|
-
|
|
124
|
+
], tr = Object.fromEntries(
|
|
125
|
+
en.map((e) => [e.value, e.label])
|
|
126
|
+
), nr = Object.fromEntries(
|
|
127
|
+
dt.map((e) => [e.value, e.label])
|
|
128
|
+
), rr = new Set(en.map((e) => e.value)), or = new Set(
|
|
129
|
+
dt.map((e) => e.value)
|
|
130
130
|
);
|
|
131
|
-
function
|
|
131
|
+
function ir(e) {
|
|
132
132
|
const t = e.trim();
|
|
133
|
-
return t ?
|
|
133
|
+
return t ? rr.has(t) ? t : er[t] ?? null : null;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function sr(e) {
|
|
136
136
|
return Array.isArray(e) ? e.map((t) => {
|
|
137
137
|
const n = t.trim().toLowerCase();
|
|
138
138
|
return n ? n.startsWith(".") ? n : `.${n}` : "";
|
|
@@ -142,87 +142,87 @@ function be(e) {
|
|
|
142
142
|
if (!Array.isArray(e)) return [];
|
|
143
143
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
144
144
|
for (const r of e) {
|
|
145
|
-
const o =
|
|
145
|
+
const o = ir(r);
|
|
146
146
|
o && !n.has(o) && (n.add(o), t.push(o));
|
|
147
147
|
}
|
|
148
148
|
return t;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function ar(e) {
|
|
151
151
|
const t = be(e), n = [];
|
|
152
152
|
for (const r of t)
|
|
153
|
-
n.push(...
|
|
153
|
+
n.push(...Xn[r] ?? [r]);
|
|
154
154
|
return n;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function lr(e) {
|
|
157
157
|
const t = be(e);
|
|
158
158
|
if (t.length === 0) return [];
|
|
159
159
|
const n = /* @__PURE__ */ new Set();
|
|
160
160
|
for (const r of t)
|
|
161
|
-
for (const o of
|
|
161
|
+
for (const o of Zn[r] ?? [])
|
|
162
162
|
n.add(o);
|
|
163
|
-
return
|
|
163
|
+
return dt.filter((r) => n.has(r.value));
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
const n =
|
|
165
|
+
function pt(e, t) {
|
|
166
|
+
const n = sr(t), r = be(e);
|
|
167
167
|
if (r.length === 0)
|
|
168
|
-
return n.filter((i) =>
|
|
168
|
+
return n.filter((i) => or.has(i));
|
|
169
169
|
const o = new Set(
|
|
170
|
-
|
|
170
|
+
lr(r).map((i) => i.value)
|
|
171
171
|
);
|
|
172
172
|
return n.filter((i) => o.has(i));
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const n =
|
|
174
|
+
function cr(e, t) {
|
|
175
|
+
const n = ar(e), r = pt(e, t), o = [...n, ...r];
|
|
176
176
|
return o.length > 0 ? o.join(",") : void 0;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
const n = be(e), r =
|
|
178
|
+
function ur(e, t) {
|
|
179
|
+
const n = be(e), r = pt(
|
|
180
180
|
n,
|
|
181
181
|
t
|
|
182
182
|
), o = [
|
|
183
|
-
...n.map((i) =>
|
|
184
|
-
...r.map((i) =>
|
|
183
|
+
...n.map((i) => tr[i] ?? i),
|
|
184
|
+
...r.map((i) => nr[i] ?? i)
|
|
185
185
|
];
|
|
186
186
|
return o.length === 0 ? null : o.join("、");
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const mr = [
|
|
189
189
|
"video",
|
|
190
190
|
"audio",
|
|
191
191
|
"image",
|
|
192
192
|
"file",
|
|
193
193
|
"spreadsheet",
|
|
194
194
|
"document"
|
|
195
|
-
],
|
|
196
|
-
function
|
|
197
|
-
return e &&
|
|
195
|
+
], dr = new Set(mr);
|
|
196
|
+
function pr(e) {
|
|
197
|
+
return e && dr.has(e) ? e : "file";
|
|
198
198
|
}
|
|
199
199
|
function ke(e) {
|
|
200
|
-
return typeof e == "string" &&
|
|
200
|
+
return typeof e == "string" && Yn.includes(e) ? e : "medium";
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function fr(e, t) {
|
|
203
203
|
var o;
|
|
204
204
|
const n = Math.max(1, t);
|
|
205
205
|
let r = [];
|
|
206
206
|
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);
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function hr(e) {
|
|
209
209
|
var t;
|
|
210
210
|
return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function gr(e) {
|
|
213
213
|
return `form-media-size-${ke(e)}`;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
return `form-media-preview form-media-list ${
|
|
215
|
+
function yr(e) {
|
|
216
|
+
return `form-media-preview form-media-list ${gr(e)}`;
|
|
217
217
|
}
|
|
218
|
-
const
|
|
219
|
-
function
|
|
218
|
+
const vr = 10;
|
|
219
|
+
function ft(e) {
|
|
220
220
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
221
221
|
}
|
|
222
222
|
function Ce(e) {
|
|
223
223
|
return e === !0 || e === "true" || e === 1 || e === "1";
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Vt(e, t = 1) {
|
|
226
226
|
const n = typeof e == "number" ? e : Number(e);
|
|
227
227
|
return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
|
|
228
228
|
}
|
|
@@ -230,15 +230,15 @@ function Me(e, t = 1) {
|
|
|
230
230
|
const n = typeof e == "number" ? e : Number(e);
|
|
231
231
|
return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Sr(e, t) {
|
|
234
234
|
if (t !== void 0)
|
|
235
235
|
return e === "toggle" ? Ce(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String) : typeof t == "string" && t ? [t] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function br(e) {
|
|
238
238
|
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 = Array.isArray(e == null ? void 0 : e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
|
|
239
239
|
return { agentKind: r, agentUniqueId: o, flowType: i, category: s, flowUniqueIds: a, pageSize: n };
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function kr(e) {
|
|
242
242
|
const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20;
|
|
243
243
|
return {
|
|
244
244
|
names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
|
|
@@ -247,14 +247,14 @@ function vr(e) {
|
|
|
247
247
|
pageSize: n
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function Cr(e) {
|
|
251
251
|
if (e.type !== "case_singleselect") return e;
|
|
252
252
|
const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
|
|
253
253
|
return { ...e, type: "case_multiselect", defaultValue: t };
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function Ar(e) {
|
|
256
256
|
var o, i;
|
|
257
|
-
const t =
|
|
257
|
+
const t = Cr(e), n = be(t.fileAcceptTypes), r = t.type;
|
|
258
258
|
return {
|
|
259
259
|
id: ((o = t.id) == null ? void 0 : o.trim()) || Se("block-"),
|
|
260
260
|
type: r,
|
|
@@ -263,17 +263,17 @@ function br(e) {
|
|
|
263
263
|
placeholder: t.placeholder ?? "",
|
|
264
264
|
help: t.help ?? "",
|
|
265
265
|
required: t.required === !0,
|
|
266
|
-
mediaUrls: Ue(r) ?
|
|
266
|
+
mediaUrls: Ue(r) ? fr(t, vr) : void 0,
|
|
267
267
|
mediaSize: Ue(r) ? ke(t.mediaSize) : void 0,
|
|
268
268
|
fileAcceptTypes: n,
|
|
269
|
-
fileAcceptExtensions:
|
|
269
|
+
fileAcceptExtensions: pt(
|
|
270
270
|
n,
|
|
271
271
|
t.fileAcceptExtensions
|
|
272
272
|
),
|
|
273
|
-
filePlaceholderIcon:
|
|
274
|
-
fileMinCount: r === "file" ?
|
|
275
|
-
fileMaxCount: r === "file" ?
|
|
276
|
-
defaultValue:
|
|
273
|
+
filePlaceholderIcon: pr(t.filePlaceholderIcon),
|
|
274
|
+
fileMinCount: r === "file" ? Vt(t.fileMinCount, 1) : void 0,
|
|
275
|
+
fileMaxCount: r === "file" ? Vt(t.fileMaxCount, 1) : void 0,
|
|
276
|
+
defaultValue: Sr(r, t.defaultValue),
|
|
277
277
|
options: Array.isArray(t.options) ? t.options.map((s, a) => {
|
|
278
278
|
var l, c;
|
|
279
279
|
return {
|
|
@@ -284,11 +284,11 @@ function br(e) {
|
|
|
284
284
|
resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
|
|
285
285
|
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? Me(t.resumeMinCount, 1) : void 0,
|
|
286
286
|
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? Me(t.resumeMaxCount, 1) : void 0,
|
|
287
|
-
resumeFilter: r === "resume_multiselect" ?
|
|
287
|
+
resumeFilter: r === "resume_multiselect" ? kr(t.resumeFilter) : void 0,
|
|
288
288
|
caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
|
|
289
289
|
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? Me(t.caseMinCount, 1) : void 0,
|
|
290
290
|
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? Me(t.caseMaxCount, 1) : void 0,
|
|
291
|
-
caseFilter: r === "case_multiselect" ?
|
|
291
|
+
caseFilter: r === "case_multiselect" ? br(t.caseFilter) : void 0
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
294
|
function Re(e) {
|
|
@@ -299,18 +299,18 @@ function Re(e) {
|
|
|
299
299
|
jsonSchema: e.jsonSchema ?? {}
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function ue(e) {
|
|
303
303
|
if (!e || !Array.isArray(e.blocks))
|
|
304
304
|
return Re({ title: "", description: "", blocks: [], jsonSchema: {} });
|
|
305
|
-
const t = e.blocks.map(
|
|
305
|
+
const t = e.blocks.map(Ar);
|
|
306
306
|
return Re({
|
|
307
307
|
title: typeof e.title == "string" ? e.title : "",
|
|
308
308
|
description: typeof e.description == "string" ? e.description : "",
|
|
309
309
|
blocks: t,
|
|
310
|
-
jsonSchema:
|
|
310
|
+
jsonSchema: ft(e.jsonSchema)
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function _r(e) {
|
|
314
314
|
const t = typeof e.pageSize == "number" ? e.pageSize : Number(e.pageSize), n = typeof e.agentKind == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, r = typeof e.agentUniqueId == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, o = typeof e.flowType == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, i = typeof e.category == "string" && e.category.trim() ? e.category.trim() : void 0, s = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
|
|
315
315
|
return {
|
|
316
316
|
agentKind: n,
|
|
@@ -321,13 +321,13 @@ function kr(e) {
|
|
|
321
321
|
pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function jt(e) {
|
|
325
325
|
if (e == null) return;
|
|
326
326
|
const t = typeof e == "number" ? e : Number(e);
|
|
327
327
|
if (!(!Number.isFinite(t) || t < 1))
|
|
328
328
|
return Math.floor(t);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function Tr(e, t) {
|
|
331
331
|
var s, a, l, c, m, d;
|
|
332
332
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
333
333
|
return i({
|
|
@@ -350,7 +350,7 @@ function Cr(e, t) {
|
|
|
350
350
|
value: { path: o }
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function xr(e, t, n) {
|
|
354
354
|
const r = n.nameFromValue(e.value), o = {
|
|
355
355
|
...t("case_multiselect"),
|
|
356
356
|
name: r,
|
|
@@ -358,23 +358,23 @@ function Ar(e, t, n) {
|
|
|
358
358
|
}, i = n.asLiteral(e.placeholder);
|
|
359
359
|
i && (o.placeholder = i);
|
|
360
360
|
const s = n.asLiteral(e.help);
|
|
361
|
-
s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter =
|
|
362
|
-
const a =
|
|
361
|
+
s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = _r(e.caseFilter));
|
|
362
|
+
const a = jt(e.minCount);
|
|
363
363
|
a !== void 0 && (o.caseMinCount = a);
|
|
364
|
-
const l =
|
|
364
|
+
const l = jt(e.maxCount);
|
|
365
365
|
return l !== void 0 && (o.caseMaxCount = l), o;
|
|
366
366
|
}
|
|
367
|
-
const
|
|
367
|
+
const tn = ye(
|
|
368
368
|
null
|
|
369
369
|
);
|
|
370
|
-
function
|
|
370
|
+
function Ir(e) {
|
|
371
371
|
try {
|
|
372
372
|
return JSON.stringify(e);
|
|
373
373
|
} catch {
|
|
374
374
|
return String(e.length);
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
const
|
|
377
|
+
const Mr = {
|
|
378
378
|
publishLiveOptions: () => {
|
|
379
379
|
},
|
|
380
380
|
liveOptions: /* @__PURE__ */ new Map(),
|
|
@@ -383,8 +383,8 @@ const Tr = {
|
|
|
383
383
|
clearPendingChangeFields: () => {
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
|
-
function
|
|
387
|
-
const t =
|
|
386
|
+
function Nr({ children: e }) {
|
|
387
|
+
const t = A(/* @__PURE__ */ new Map()), n = A(/* @__PURE__ */ new Map()), r = A([]), [o, i] = R(0), [s, a] = R(() => /* @__PURE__ */ new Map()), [l, c] = R(
|
|
388
388
|
[]
|
|
389
389
|
), m = $(
|
|
390
390
|
(g, b) => {
|
|
@@ -393,7 +393,7 @@ function xr({ children: e }) {
|
|
|
393
393
|
const k = b.map((p) => ({
|
|
394
394
|
value: String(p.value ?? ""),
|
|
395
395
|
label: String(p.label ?? p.value ?? "")
|
|
396
|
-
})), f =
|
|
396
|
+
})), f = Ir(k);
|
|
397
397
|
n.current.get(y) !== f && (n.current.set(y, f), t.current.set(y, k), r.current.includes(y) || (r.current = [...r.current, y]), a(new Map(t.current)), c(r.current), i((p) => p + 1));
|
|
398
398
|
},
|
|
399
399
|
[]
|
|
@@ -415,26 +415,26 @@ function xr({ children: e }) {
|
|
|
415
415
|
d
|
|
416
416
|
]
|
|
417
417
|
);
|
|
418
|
-
return /* @__PURE__ */ u(
|
|
418
|
+
return /* @__PURE__ */ u(tn.Provider, { value: S, children: e });
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
return ve(
|
|
420
|
+
function ht() {
|
|
421
|
+
return ve(tn) ?? Mr;
|
|
422
422
|
}
|
|
423
|
-
const
|
|
424
|
-
function
|
|
423
|
+
const nn = ye({ interactive: !0 });
|
|
424
|
+
function it({
|
|
425
425
|
interactive: e,
|
|
426
426
|
children: t
|
|
427
427
|
}) {
|
|
428
|
-
return /* @__PURE__ */ u(
|
|
428
|
+
return /* @__PURE__ */ u(nn.Provider, { value: { interactive: e }, children: t });
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
return ve(
|
|
430
|
+
function ie() {
|
|
431
|
+
return ve(nn);
|
|
432
432
|
}
|
|
433
|
-
const
|
|
434
|
-
function
|
|
433
|
+
const rn = ye(null);
|
|
434
|
+
function Fr(e) {
|
|
435
435
|
return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
|
|
436
436
|
}
|
|
437
|
-
const
|
|
437
|
+
const Er = {
|
|
438
438
|
reportEvent: () => {
|
|
439
439
|
},
|
|
440
440
|
reportData: () => {
|
|
@@ -442,7 +442,7 @@ const Mr = {
|
|
|
442
442
|
runAutoControl: (e) => e(),
|
|
443
443
|
isAutoControl: () => !1
|
|
444
444
|
};
|
|
445
|
-
function
|
|
445
|
+
function Ur(e) {
|
|
446
446
|
const t = {};
|
|
447
447
|
for (const [n, r] of Object.entries(e.form_values ?? {}))
|
|
448
448
|
r !== void 0 && (t[n] = r);
|
|
@@ -452,11 +452,11 @@ function Fr(e) {
|
|
|
452
452
|
form_change: Array.isArray(e.form_change) ? [...e.form_change] : []
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Rr({
|
|
456
456
|
client: e,
|
|
457
457
|
children: t
|
|
458
458
|
}) {
|
|
459
|
-
const n =
|
|
459
|
+
const n = A(0), r = A(e);
|
|
460
460
|
r.current = e;
|
|
461
461
|
const o = $((c) => {
|
|
462
462
|
const m = r.current;
|
|
@@ -470,7 +470,7 @@ function Nr({
|
|
|
470
470
|
m.send(S, d);
|
|
471
471
|
}, []), i = $((c) => {
|
|
472
472
|
const m = r.current;
|
|
473
|
-
m && m.send("form_runtime_data",
|
|
473
|
+
m && m.send("form_runtime_data", Ur(c));
|
|
474
474
|
}, []), s = $((c) => {
|
|
475
475
|
n.current += 1;
|
|
476
476
|
let m;
|
|
@@ -479,7 +479,7 @@ function Nr({
|
|
|
479
479
|
} catch (d) {
|
|
480
480
|
throw n.current = Math.max(0, n.current - 1), d;
|
|
481
481
|
}
|
|
482
|
-
return
|
|
482
|
+
return Fr(m) ? Promise.resolve(m).finally(() => {
|
|
483
483
|
n.current = Math.max(0, n.current - 1);
|
|
484
484
|
}) : (n.current = Math.max(0, n.current - 1), m);
|
|
485
485
|
}, []), a = $(
|
|
@@ -494,38 +494,38 @@ function Nr({
|
|
|
494
494
|
}),
|
|
495
495
|
[o, i, s, a]
|
|
496
496
|
);
|
|
497
|
-
return /* @__PURE__ */ u(
|
|
497
|
+
return /* @__PURE__ */ u(rn.Provider, { value: l, children: t });
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
return ve(
|
|
499
|
+
function on() {
|
|
500
|
+
return ve(rn) ?? Er;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
502
|
+
const wr = 300;
|
|
503
|
+
function sn(e) {
|
|
504
504
|
return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Pr(e) {
|
|
507
507
|
if (!e) return;
|
|
508
508
|
const t = e.trim();
|
|
509
509
|
if (t)
|
|
510
510
|
return t.startsWith("/") ? t.slice(1) : t;
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function $t(e, t = "value") {
|
|
513
513
|
const r = e.componentModel.properties[t];
|
|
514
|
-
if (!(!
|
|
514
|
+
if (!(!sn(r) || r === void 0))
|
|
515
515
|
return e.dataContext.resolveDynamicValue(r);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
518
|
-
const o = e.componentModel.properties[t], i =
|
|
517
|
+
function se(e, t = "value", n = {}) {
|
|
518
|
+
const o = e.componentModel.properties[t], i = sn(o), s = Pr(i), a = on(), {
|
|
519
519
|
component: l = "Unknown",
|
|
520
520
|
changeAction: c = "change",
|
|
521
521
|
debounceChange: m = !1
|
|
522
|
-
} = n, d =
|
|
522
|
+
} = n, d = A(null), S = A(void 0), g = A(!1), b = A(a);
|
|
523
523
|
b.current = a;
|
|
524
|
-
const y =
|
|
524
|
+
const y = A(c);
|
|
525
525
|
y.current = c;
|
|
526
|
-
const k =
|
|
526
|
+
const k = A(l);
|
|
527
527
|
k.current = l;
|
|
528
|
-
const f =
|
|
528
|
+
const f = A(s);
|
|
529
529
|
f.current = s, z(() => () => {
|
|
530
530
|
d.current != null && (clearTimeout(d.current), d.current = null), g.current && f.current && (g.current = !1, b.current.reportEvent({
|
|
531
531
|
action: y.current,
|
|
@@ -538,17 +538,17 @@ function ie(e, t = "value", n = {}) {
|
|
|
538
538
|
(O) => {
|
|
539
539
|
if (!i || o === void 0) return () => {
|
|
540
540
|
};
|
|
541
|
-
const
|
|
542
|
-
return () =>
|
|
541
|
+
const B = e.dataContext.subscribeDynamicValue(o, () => O());
|
|
542
|
+
return () => B.unsubscribe();
|
|
543
543
|
},
|
|
544
544
|
[e, o, i]
|
|
545
545
|
), v = $(() => {
|
|
546
546
|
if (!(!i || o === void 0))
|
|
547
547
|
return e.dataContext.resolveDynamicValue(o);
|
|
548
|
-
}, [e, o, i]), x =
|
|
548
|
+
}, [e, o, i]), x = Un(p, v, v), M = $(
|
|
549
549
|
(O) => {
|
|
550
550
|
if (!s) return;
|
|
551
|
-
const
|
|
551
|
+
const B = () => {
|
|
552
552
|
g.current = !1, b.current.reportEvent({
|
|
553
553
|
action: c,
|
|
554
554
|
component: l,
|
|
@@ -557,24 +557,24 @@ function ie(e, t = "value", n = {}) {
|
|
|
557
557
|
});
|
|
558
558
|
};
|
|
559
559
|
if (!m) {
|
|
560
|
-
|
|
560
|
+
B();
|
|
561
561
|
return;
|
|
562
562
|
}
|
|
563
563
|
S.current = O, g.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
564
|
-
d.current = null,
|
|
565
|
-
},
|
|
564
|
+
d.current = null, B();
|
|
565
|
+
}, wr);
|
|
566
566
|
},
|
|
567
567
|
[s, c, l, m]
|
|
568
|
-
),
|
|
568
|
+
), _ = $(
|
|
569
569
|
(O) => {
|
|
570
570
|
!i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), O);
|
|
571
571
|
},
|
|
572
572
|
[e, o, i]
|
|
573
|
-
),
|
|
573
|
+
), w = $(
|
|
574
574
|
(O) => {
|
|
575
|
-
|
|
575
|
+
_(O), M(O);
|
|
576
576
|
},
|
|
577
|
-
[
|
|
577
|
+
[_, M]
|
|
578
578
|
), C = $(() => {
|
|
579
579
|
s && b.current.reportEvent({
|
|
580
580
|
action: "focus",
|
|
@@ -584,9 +584,9 @@ function ie(e, t = "value", n = {}) {
|
|
|
584
584
|
}, [s, l]);
|
|
585
585
|
return {
|
|
586
586
|
value: x,
|
|
587
|
-
setValue:
|
|
587
|
+
setValue: w,
|
|
588
588
|
/** 写入 dataModel 但不上报(用于模式切换规范化等内部同步) */
|
|
589
|
-
setValueSilent:
|
|
589
|
+
setValueSilent: _,
|
|
590
590
|
hasBinding: !!i,
|
|
591
591
|
fieldName: s,
|
|
592
592
|
reportFocus: C
|
|
@@ -599,7 +599,7 @@ function he(e) {
|
|
|
599
599
|
function Y(e) {
|
|
600
600
|
return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function an(e, t) {
|
|
603
603
|
return t ? Array.isArray(e) ? null : Y(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
|
|
604
604
|
}
|
|
605
605
|
function we(e) {
|
|
@@ -608,49 +608,49 @@ function we(e) {
|
|
|
608
608
|
if (!(!Number.isFinite(t) || t < 1))
|
|
609
609
|
return Math.floor(t);
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function ln(e, t, n, r) {
|
|
612
612
|
if (e.includes(t)) {
|
|
613
613
|
const i = e.filter((s) => s !== t);
|
|
614
614
|
return n !== void 0 && i.length < n ? null : i;
|
|
615
615
|
}
|
|
616
616
|
return r !== void 0 && e.length >= r ? null : [...e, t];
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function cn(e, t, n, r, o) {
|
|
619
619
|
if (!n) return !0;
|
|
620
620
|
const i = e.includes(t);
|
|
621
621
|
return !!(!i && o !== void 0 && e.length >= o || i && r !== void 0 && e.length <= r);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function un(e, t) {
|
|
624
624
|
return t === void 0 || e.length <= t ? null : e.slice(0, t);
|
|
625
625
|
}
|
|
626
|
-
const
|
|
627
|
-
function
|
|
626
|
+
const mn = ye(null);
|
|
627
|
+
function st({
|
|
628
628
|
caseSearch: e,
|
|
629
629
|
children: t
|
|
630
630
|
}) {
|
|
631
|
-
return /* @__PURE__ */ u(
|
|
631
|
+
return /* @__PURE__ */ u(mn.Provider, { value: e ?? null, children: t });
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
return ve(
|
|
633
|
+
function zr() {
|
|
634
|
+
return ve(mn);
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function Ye(e) {
|
|
637
637
|
return typeof e == "string" ? e : "";
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function Qe(e) {
|
|
640
640
|
if (!e || typeof e != "object")
|
|
641
641
|
return { flowUniqueIds: [], pageSize: 20 };
|
|
642
642
|
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 = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
|
|
643
643
|
return { agentKind: o, agentUniqueId: i, flowType: s, category: a, flowUniqueIds: l, pageSize: r };
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function Xe(e) {
|
|
646
646
|
var r;
|
|
647
647
|
const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
|
|
648
648
|
return t || n;
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function Or(e) {
|
|
651
651
|
return JSON.stringify(e);
|
|
652
652
|
}
|
|
653
|
-
const
|
|
653
|
+
const qr = {
|
|
654
654
|
name: "SkoponCaseSelect",
|
|
655
655
|
schema: h.object({
|
|
656
656
|
label: h.any().optional(),
|
|
@@ -663,7 +663,7 @@ const Pr = {
|
|
|
663
663
|
value: h.any().optional()
|
|
664
664
|
}).passthrough()
|
|
665
665
|
};
|
|
666
|
-
function
|
|
666
|
+
function Br({
|
|
667
667
|
item: e,
|
|
668
668
|
selected: t,
|
|
669
669
|
disabled: n,
|
|
@@ -677,7 +677,7 @@ function zr({
|
|
|
677
677
|
disabled: n,
|
|
678
678
|
onClick: r,
|
|
679
679
|
children: [
|
|
680
|
-
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(
|
|
680
|
+
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(Jt, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
|
|
681
681
|
/* @__PURE__ */ I("div", { className: "skopon-resume-select-card-body", children: [
|
|
682
682
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name }),
|
|
683
683
|
e.description ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
|
|
@@ -691,38 +691,38 @@ function zr({
|
|
|
691
691
|
}
|
|
692
692
|
);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
const { interactive: t } =
|
|
694
|
+
function Lr({ context: e }) {
|
|
695
|
+
const { interactive: t } = ie(), n = zr(), { publishLiveOptions: r } = ht(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = se(e, "value", {
|
|
696
696
|
component: "SkoponCaseSelect",
|
|
697
697
|
changeAction: "click"
|
|
698
|
-
}), l = e.componentModel.properties, c =
|
|
698
|
+
}), l = e.componentModel.properties, c = Ye(l.label), m = Ye(l.placeholder), d = Ye(l.help), S = l.enableRefresh !== !1, g = we(l.minCount), b = we(l.maxCount), y = j(() => Qe(l.caseFilter), [l.caseFilter]), k = Or(y), [f, p] = R(1), [v, x] = R(!1), [M, _] = R(""), [w, C] = R([]), [O, B] = R(0), [ne, K] = R(y.pageSize ?? 20), D = A(0), J = Y(o);
|
|
699
699
|
z(() => {
|
|
700
|
-
const
|
|
701
|
-
|
|
700
|
+
const T = un(J, b);
|
|
701
|
+
T !== null && s(T);
|
|
702
702
|
}, [b, J, s]);
|
|
703
|
-
const Z = j(() => n ?
|
|
704
|
-
async (
|
|
705
|
-
const V =
|
|
706
|
-
if (!n || !
|
|
707
|
-
C([]),
|
|
703
|
+
const Z = j(() => n ? Xe(y) ? M || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, y, M, m]), ee = $(
|
|
704
|
+
async (T) => {
|
|
705
|
+
const V = Qe(JSON.parse(k)), P = ++D.current;
|
|
706
|
+
if (!n || !Xe(V)) {
|
|
707
|
+
C([]), B(0), _(""), x(!1);
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
|
-
x(!0),
|
|
710
|
+
x(!0), _("");
|
|
711
711
|
try {
|
|
712
|
-
const
|
|
713
|
-
if (
|
|
714
|
-
C(
|
|
712
|
+
const N = await n({ filter: V, page: T });
|
|
713
|
+
if (P !== D.current) return;
|
|
714
|
+
C(N.list), B(N.total), p(N.page), K(N.pageSize), a && r(
|
|
715
715
|
a,
|
|
716
|
-
|
|
716
|
+
N.list.map((W) => ({
|
|
717
717
|
value: W.caseUniqueId,
|
|
718
718
|
label: W.name || W.caseUniqueId
|
|
719
719
|
}))
|
|
720
720
|
);
|
|
721
|
-
} catch (
|
|
722
|
-
if (
|
|
723
|
-
C([]),
|
|
721
|
+
} catch (N) {
|
|
722
|
+
if (P !== D.current) return;
|
|
723
|
+
C([]), B(0), _(N instanceof Error ? N.message : "加载案例列表失败");
|
|
724
724
|
} finally {
|
|
725
|
-
|
|
725
|
+
P === D.current && x(!1);
|
|
726
726
|
}
|
|
727
727
|
},
|
|
728
728
|
[n, k, a, r]
|
|
@@ -730,18 +730,18 @@ function Or({ context: e }) {
|
|
|
730
730
|
z(() => {
|
|
731
731
|
p(1), ee(1);
|
|
732
732
|
}, [k, ee]);
|
|
733
|
-
const
|
|
733
|
+
const F = (T) => {
|
|
734
734
|
if (!t) return;
|
|
735
|
-
const V =
|
|
735
|
+
const V = ln(
|
|
736
736
|
J,
|
|
737
|
-
|
|
737
|
+
T,
|
|
738
738
|
g,
|
|
739
739
|
b
|
|
740
740
|
);
|
|
741
741
|
V !== null && i(V);
|
|
742
742
|
}, L = () => {
|
|
743
|
-
const
|
|
744
|
-
ee(
|
|
743
|
+
const T = Qe(JSON.parse(k)), V = ne || T.pageSize || 20, P = Math.max(1, Math.ceil(O / V)), N = f >= P ? 1 : f + 1;
|
|
744
|
+
ee(N);
|
|
745
745
|
};
|
|
746
746
|
return /* @__PURE__ */ I(
|
|
747
747
|
"div",
|
|
@@ -750,33 +750,33 @@ function Or({ context: e }) {
|
|
|
750
750
|
"data-skopon-field": a || void 0,
|
|
751
751
|
children: [
|
|
752
752
|
c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
|
|
753
|
-
v &&
|
|
754
|
-
/* @__PURE__ */ u(
|
|
753
|
+
v && w.length === 0 ? /* @__PURE__ */ I("div", { className: "skopon-resume-select-status", children: [
|
|
754
|
+
/* @__PURE__ */ u(mt, { size: "small" }),
|
|
755
755
|
" 加载案例…"
|
|
756
756
|
] }) : null,
|
|
757
|
-
!v &&
|
|
758
|
-
|
|
759
|
-
|
|
757
|
+
!v && w.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: Z }) : null,
|
|
758
|
+
w.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ u(
|
|
759
|
+
Br,
|
|
760
760
|
{
|
|
761
|
-
item:
|
|
762
|
-
selected: J.includes(
|
|
763
|
-
disabled:
|
|
761
|
+
item: T,
|
|
762
|
+
selected: J.includes(T.caseUniqueId),
|
|
763
|
+
disabled: cn(
|
|
764
764
|
J,
|
|
765
|
-
|
|
765
|
+
T.caseUniqueId,
|
|
766
766
|
t,
|
|
767
767
|
g,
|
|
768
768
|
b
|
|
769
769
|
),
|
|
770
|
-
onToggle: () =>
|
|
770
|
+
onToggle: () => F(T.caseUniqueId)
|
|
771
771
|
},
|
|
772
|
-
|
|
772
|
+
T.caseUniqueId
|
|
773
773
|
)) }) : null,
|
|
774
|
-
S && n &&
|
|
774
|
+
S && n && Xe(y) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
|
|
775
775
|
ze,
|
|
776
776
|
{
|
|
777
777
|
type: "default",
|
|
778
778
|
size: "small",
|
|
779
|
-
icon: /* @__PURE__ */ u(
|
|
779
|
+
icon: /* @__PURE__ */ u(Gt, {}),
|
|
780
780
|
loading: v,
|
|
781
781
|
disabled: !t,
|
|
782
782
|
onClick: L,
|
|
@@ -788,23 +788,23 @@ function Or({ context: e }) {
|
|
|
788
788
|
}
|
|
789
789
|
);
|
|
790
790
|
}
|
|
791
|
-
const
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
),
|
|
791
|
+
const Vr = Q(
|
|
792
|
+
qr,
|
|
793
|
+
Lr
|
|
794
|
+
), jr = {
|
|
795
795
|
type: "case_multiselect",
|
|
796
796
|
componentName: "SkoponCaseSelect",
|
|
797
|
-
toComponent:
|
|
798
|
-
fromComponent:
|
|
799
|
-
catalogComponents: [
|
|
797
|
+
toComponent: Tr,
|
|
798
|
+
fromComponent: xr,
|
|
799
|
+
catalogComponents: [Vr]
|
|
800
800
|
};
|
|
801
|
-
function
|
|
801
|
+
function Dt(e) {
|
|
802
802
|
if (e == null) return;
|
|
803
803
|
const t = typeof e == "number" ? e : Number(e);
|
|
804
804
|
if (!(!Number.isFinite(t) || t < 1))
|
|
805
805
|
return Math.floor(t);
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function $r(e, t) {
|
|
808
808
|
var s, a, l, c;
|
|
809
809
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
810
810
|
return i({
|
|
@@ -825,7 +825,7 @@ function Lr(e, t) {
|
|
|
825
825
|
value: { path: o }
|
|
826
826
|
});
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function Dr(e, t, n) {
|
|
829
829
|
const r = n.nameFromValue(e.value), o = {
|
|
830
830
|
...t("resume_multiselect"),
|
|
831
831
|
name: r,
|
|
@@ -842,34 +842,34 @@ function Vr(e, t, n) {
|
|
|
842
842
|
pageSize: typeof c.pageSize == "number" ? c.pageSize : 20
|
|
843
843
|
};
|
|
844
844
|
}
|
|
845
|
-
const a =
|
|
845
|
+
const a = Dt(e.minCount);
|
|
846
846
|
a !== void 0 && (o.resumeMinCount = a);
|
|
847
|
-
const l =
|
|
847
|
+
const l = Dt(e.maxCount);
|
|
848
848
|
return l !== void 0 && (o.resumeMaxCount = l), o;
|
|
849
849
|
}
|
|
850
|
-
const
|
|
851
|
-
function
|
|
850
|
+
const dn = ye(null);
|
|
851
|
+
function at({
|
|
852
852
|
resumeSearch: e,
|
|
853
853
|
children: t
|
|
854
854
|
}) {
|
|
855
|
-
return /* @__PURE__ */ u(
|
|
855
|
+
return /* @__PURE__ */ u(dn.Provider, { value: e ?? null, children: t });
|
|
856
856
|
}
|
|
857
|
-
function
|
|
858
|
-
return ve(
|
|
857
|
+
function Hr() {
|
|
858
|
+
return ve(dn);
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function Ze(e) {
|
|
861
861
|
return typeof e == "string" ? e : "";
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function et(e) {
|
|
864
864
|
if (!e || typeof e != "object")
|
|
865
865
|
return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
|
|
866
866
|
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;
|
|
867
867
|
return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: s };
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function Kr(e) {
|
|
870
870
|
return JSON.stringify(e);
|
|
871
871
|
}
|
|
872
|
-
const
|
|
872
|
+
const Gr = {
|
|
873
873
|
name: "SkoponResumeSelect",
|
|
874
874
|
schema: h.object({
|
|
875
875
|
label: h.any().optional(),
|
|
@@ -881,9 +881,9 @@ const Dr = {
|
|
|
881
881
|
maxCount: h.any().optional(),
|
|
882
882
|
value: h.any().optional()
|
|
883
883
|
}).passthrough()
|
|
884
|
-
},
|
|
885
|
-
function
|
|
886
|
-
const n = (t ?? []).filter(Boolean), r = n.slice(0,
|
|
884
|
+
}, Jr = 3, Wr = 2;
|
|
885
|
+
function tt(e, t) {
|
|
886
|
+
const n = (t ?? []).filter(Boolean), r = n.slice(0, Jr), o = n.length - r.length;
|
|
887
887
|
return /* @__PURE__ */ I("div", { className: "skopon-resume-select-card-tags", children: [
|
|
888
888
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: e }),
|
|
889
889
|
n.length > 0 ? /* @__PURE__ */ I("div", { className: "skopon-resume-select-card-tags-list", children: [
|
|
@@ -895,25 +895,25 @@ function Ze(e, t) {
|
|
|
895
895
|
] }) : /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
|
|
896
896
|
] });
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Yr(e) {
|
|
899
899
|
return /* @__PURE__ */ I("div", { className: "skopon-resume-select-card-field", children: [
|
|
900
900
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
|
|
901
901
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
|
|
902
902
|
] });
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function Qr({ work: e }) {
|
|
905
905
|
return /* @__PURE__ */ I("div", { className: "skopon-resume-select-card-work", children: [
|
|
906
|
-
/* @__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(
|
|
906
|
+
/* @__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(Dn, { className: "skopon-resume-select-card-work-placeholder" }) }),
|
|
907
907
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
|
|
908
908
|
] });
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function Xr({
|
|
911
911
|
item: e,
|
|
912
912
|
selected: t,
|
|
913
913
|
disabled: n,
|
|
914
914
|
onToggle: r
|
|
915
915
|
}) {
|
|
916
|
-
const o = (e.works ?? []).slice(0,
|
|
916
|
+
const o = (e.works ?? []).slice(0, Wr);
|
|
917
917
|
return /* @__PURE__ */ I(
|
|
918
918
|
"button",
|
|
919
919
|
{
|
|
@@ -923,61 +923,61 @@ function Wr({
|
|
|
923
923
|
onClick: r,
|
|
924
924
|
children: [
|
|
925
925
|
/* @__PURE__ */ u(
|
|
926
|
-
|
|
926
|
+
Pn,
|
|
927
927
|
{
|
|
928
928
|
size: 48,
|
|
929
929
|
src: e.avatarUrl || void 0,
|
|
930
|
-
icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(
|
|
930
|
+
icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u($n, {}),
|
|
931
931
|
className: "skopon-resume-select-card-avatar"
|
|
932
932
|
}
|
|
933
933
|
),
|
|
934
934
|
/* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
|
|
935
935
|
/* @__PURE__ */ I("div", { className: "skopon-resume-select-card-body", children: [
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
936
|
+
Yr(e.satisfaction),
|
|
937
|
+
tt("性格", e.personality),
|
|
938
|
+
tt("专长", e.specialties),
|
|
939
|
+
tt("擅长领域", e.traits),
|
|
940
940
|
/* @__PURE__ */ I("div", { className: "skopon-resume-select-card-works", children: [
|
|
941
941
|
/* @__PURE__ */ u("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
|
|
942
|
-
o.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ u(
|
|
942
|
+
o.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ u(Qr, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
|
|
943
943
|
] })
|
|
944
944
|
] })
|
|
945
945
|
]
|
|
946
946
|
}
|
|
947
947
|
);
|
|
948
948
|
}
|
|
949
|
-
function
|
|
950
|
-
const { interactive: t } =
|
|
949
|
+
function Zr({ context: e }) {
|
|
950
|
+
const { interactive: t } = ie(), n = Hr(), { publishLiveOptions: r } = ht(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = se(e, "value", {
|
|
951
951
|
component: "SkoponResumeSelect",
|
|
952
952
|
changeAction: "click"
|
|
953
|
-
}), l = e.componentModel.properties, c =
|
|
953
|
+
}), l = e.componentModel.properties, c = Ze(l.label), m = Ze(l.placeholder), d = Ze(l.help), S = l.enableRefresh !== !1, g = we(l.minCount), b = we(l.maxCount), y = j(() => et(l.resumeFilter), [l.resumeFilter]), k = Kr(y), [f, p] = R(1), [v, x] = R(!1), [M, _] = R(""), [w, C] = R([]), [O, B] = R(0), [ne, K] = R(y.pageSize ?? 20), D = A(0), J = Y(o);
|
|
954
954
|
z(() => {
|
|
955
|
-
const
|
|
956
|
-
|
|
955
|
+
const T = un(J, b);
|
|
956
|
+
T !== null && s(T);
|
|
957
957
|
}, [b, J, s]);
|
|
958
958
|
const Z = $(
|
|
959
|
-
async (
|
|
960
|
-
const V =
|
|
959
|
+
async (T) => {
|
|
960
|
+
const V = et(JSON.parse(k)), P = ++D.current;
|
|
961
961
|
if (!n) {
|
|
962
|
-
C([]),
|
|
962
|
+
C([]), B(0), _("未配置简历搜索服务"), x(!1);
|
|
963
963
|
return;
|
|
964
964
|
}
|
|
965
|
-
x(!0),
|
|
965
|
+
x(!0), _("");
|
|
966
966
|
try {
|
|
967
|
-
const
|
|
968
|
-
if (
|
|
969
|
-
C(
|
|
967
|
+
const N = await n({ filter: V, page: T });
|
|
968
|
+
if (P !== D.current) return;
|
|
969
|
+
C(N.list), B(N.total), p(N.page), K(N.pageSize), a && r(
|
|
970
970
|
a,
|
|
971
|
-
|
|
971
|
+
N.list.map((W) => ({
|
|
972
972
|
value: W.resumeUniqueId,
|
|
973
973
|
label: W.name || W.resumeUniqueId
|
|
974
974
|
}))
|
|
975
975
|
);
|
|
976
|
-
} catch (
|
|
977
|
-
if (
|
|
978
|
-
C([]),
|
|
976
|
+
} catch (N) {
|
|
977
|
+
if (P !== D.current) return;
|
|
978
|
+
C([]), B(0), _(N instanceof Error ? N.message : "加载简历列表失败");
|
|
979
979
|
} finally {
|
|
980
|
-
|
|
980
|
+
P === D.current && x(!1);
|
|
981
981
|
}
|
|
982
982
|
},
|
|
983
983
|
[n, k, a, r]
|
|
@@ -985,18 +985,18 @@ function Yr({ context: e }) {
|
|
|
985
985
|
z(() => {
|
|
986
986
|
p(1), Z(1);
|
|
987
987
|
}, [k, Z]);
|
|
988
|
-
const ee = (
|
|
988
|
+
const ee = (T) => {
|
|
989
989
|
if (!t) return;
|
|
990
|
-
const V =
|
|
990
|
+
const V = ln(
|
|
991
991
|
J,
|
|
992
|
-
|
|
992
|
+
T,
|
|
993
993
|
g,
|
|
994
994
|
b
|
|
995
995
|
);
|
|
996
996
|
V !== null && i(V);
|
|
997
|
-
},
|
|
998
|
-
const
|
|
999
|
-
Z(
|
|
997
|
+
}, F = () => {
|
|
998
|
+
const T = et(JSON.parse(k)), V = ne || T.pageSize || 20, P = Math.max(1, Math.ceil(O / V)), N = f >= P ? 1 : f + 1;
|
|
999
|
+
Z(N);
|
|
1000
1000
|
}, L = m || "暂无匹配的简历";
|
|
1001
1001
|
return /* @__PURE__ */ I(
|
|
1002
1002
|
"div",
|
|
@@ -1005,37 +1005,37 @@ function Yr({ context: e }) {
|
|
|
1005
1005
|
"data-skopon-field": a || void 0,
|
|
1006
1006
|
children: [
|
|
1007
1007
|
c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
|
|
1008
|
-
v &&
|
|
1009
|
-
/* @__PURE__ */ u(
|
|
1008
|
+
v && w.length === 0 ? /* @__PURE__ */ I("div", { className: "skopon-resume-select-status", children: [
|
|
1009
|
+
/* @__PURE__ */ u(mt, { size: "small" }),
|
|
1010
1010
|
" 加载简历…"
|
|
1011
1011
|
] }) : null,
|
|
1012
1012
|
!v && M ? /* @__PURE__ */ u(te.Text, { type: "danger", className: "skopon-resume-select-status", children: M }) : null,
|
|
1013
|
-
!v && !M &&
|
|
1014
|
-
|
|
1015
|
-
|
|
1013
|
+
!v && !M && w.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: L }) : null,
|
|
1014
|
+
w.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ u(
|
|
1015
|
+
Xr,
|
|
1016
1016
|
{
|
|
1017
|
-
item:
|
|
1018
|
-
selected: J.includes(
|
|
1019
|
-
disabled:
|
|
1017
|
+
item: T,
|
|
1018
|
+
selected: J.includes(T.resumeUniqueId),
|
|
1019
|
+
disabled: cn(
|
|
1020
1020
|
J,
|
|
1021
|
-
|
|
1021
|
+
T.resumeUniqueId,
|
|
1022
1022
|
t,
|
|
1023
1023
|
g,
|
|
1024
1024
|
b
|
|
1025
1025
|
),
|
|
1026
|
-
onToggle: () => ee(
|
|
1026
|
+
onToggle: () => ee(T.resumeUniqueId)
|
|
1027
1027
|
},
|
|
1028
|
-
|
|
1028
|
+
T.resumeUniqueId
|
|
1029
1029
|
)) }) : null,
|
|
1030
1030
|
S && n ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
|
|
1031
1031
|
ze,
|
|
1032
1032
|
{
|
|
1033
1033
|
type: "default",
|
|
1034
1034
|
size: "small",
|
|
1035
|
-
icon: /* @__PURE__ */ u(
|
|
1035
|
+
icon: /* @__PURE__ */ u(Gt, {}),
|
|
1036
1036
|
loading: v,
|
|
1037
1037
|
disabled: !t,
|
|
1038
|
-
onClick:
|
|
1038
|
+
onClick: F,
|
|
1039
1039
|
children: "换一批"
|
|
1040
1040
|
}
|
|
1041
1041
|
) }) : null,
|
|
@@ -1044,63 +1044,63 @@ function Yr({ context: e }) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
);
|
|
1046
1046
|
}
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
),
|
|
1047
|
+
const eo = Q(
|
|
1048
|
+
Gr,
|
|
1049
|
+
Zr
|
|
1050
|
+
), to = {
|
|
1051
1051
|
type: "resume_multiselect",
|
|
1052
1052
|
componentName: "SkoponResumeSelect",
|
|
1053
|
-
toComponent:
|
|
1054
|
-
fromComponent:
|
|
1055
|
-
catalogComponents: [
|
|
1056
|
-
}, qe = [
|
|
1053
|
+
toComponent: $r,
|
|
1054
|
+
fromComponent: Dr,
|
|
1055
|
+
catalogComponents: [eo]
|
|
1056
|
+
}, qe = [to, jr], no = new Map(
|
|
1057
1057
|
qe.map((e) => [e.type, e])
|
|
1058
|
-
),
|
|
1058
|
+
), ro = new Map(
|
|
1059
1059
|
qe.map((e) => [e.componentName, e])
|
|
1060
1060
|
);
|
|
1061
|
-
function
|
|
1062
|
-
return
|
|
1061
|
+
function oo(e) {
|
|
1062
|
+
return no.get(e);
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1065
|
-
return
|
|
1064
|
+
function io(e) {
|
|
1065
|
+
return ro.get(e);
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function so() {
|
|
1068
1068
|
return qe.flatMap((e) => e.catalogComponents);
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function ao() {
|
|
1071
1071
|
return qe.map((e) => e.componentName);
|
|
1072
1072
|
}
|
|
1073
|
-
const Pe = "root",
|
|
1074
|
-
function
|
|
1073
|
+
const Pe = "root", lt = "__title__", ct = "__desc__", gt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
|
|
1074
|
+
function lo(e) {
|
|
1075
1075
|
return `/${e}`;
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1077
|
+
function Ht(e) {
|
|
1078
1078
|
return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
|
|
1079
1079
|
}
|
|
1080
1080
|
function H(e) {
|
|
1081
1081
|
if (typeof e == "string") return e;
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function co(e) {
|
|
1084
1084
|
const t = e.id || Se("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
|
|
1085
1085
|
return {
|
|
1086
1086
|
id: t,
|
|
1087
1087
|
component: "SkoponMedia",
|
|
1088
1088
|
mediaType: n,
|
|
1089
|
-
urls:
|
|
1089
|
+
urls: hr(e),
|
|
1090
1090
|
mediaSize: ke(e.mediaSize),
|
|
1091
1091
|
label: e.label ?? "",
|
|
1092
1092
|
help: e.help ?? "",
|
|
1093
1093
|
placeholder: e.placeholder ?? ""
|
|
1094
1094
|
};
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function uo(e) {
|
|
1097
1097
|
if (Array.isArray(e.urls))
|
|
1098
1098
|
return e.urls.map((n) => String(n).trim()).filter(Boolean);
|
|
1099
1099
|
const t = H(e.url);
|
|
1100
1100
|
return t != null && t.trim() ? [t.trim()] : [];
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
const r = typeof e.id == "string" ? e.id : Se("block-"), o =
|
|
1102
|
+
function Ne(e, t, n) {
|
|
1103
|
+
const r = typeof e.id == "string" ? e.id : Se("block-"), o = uo(e), i = H(e.label) ?? H(e.description) ?? n, s = H(e.help), a = H(e.placeholder), l = ke(e.mediaSize);
|
|
1104
1104
|
return {
|
|
1105
1105
|
id: r,
|
|
1106
1106
|
type: t,
|
|
@@ -1111,7 +1111,7 @@ function Fe(e, t, n) {
|
|
|
1111
1111
|
mediaUrls: o.length > 0 ? o : [""]
|
|
1112
1112
|
};
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1114
|
+
function mo(e) {
|
|
1115
1115
|
switch (e.type) {
|
|
1116
1116
|
case "toggle":
|
|
1117
1117
|
return Ce(e.defaultValue);
|
|
@@ -1128,9 +1128,9 @@ function lo(e) {
|
|
|
1128
1128
|
return typeof e.defaultValue == "string" ? e.defaultValue : "";
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function po(e) {
|
|
1132
1132
|
var c;
|
|
1133
|
-
const t = e.id || Se("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ?
|
|
1133
|
+
const t = e.id || Se("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? lo(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), s = (m) => r ? { node: m, dataKey: r, dataValue: mo(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = oo(e.type);
|
|
1134
1134
|
if (l)
|
|
1135
1135
|
return l.toComponent(e, a);
|
|
1136
1136
|
switch (e.type) {
|
|
@@ -1155,7 +1155,7 @@ function co(e) {
|
|
|
1155
1155
|
component: "TextField",
|
|
1156
1156
|
label: n,
|
|
1157
1157
|
variant: "shortText",
|
|
1158
|
-
validationRegexp:
|
|
1158
|
+
validationRegexp: gt,
|
|
1159
1159
|
...e.placeholder ? { placeholder: e.placeholder } : {},
|
|
1160
1160
|
value: { path: o }
|
|
1161
1161
|
});
|
|
@@ -1241,7 +1241,7 @@ function co(e) {
|
|
|
1241
1241
|
case "image":
|
|
1242
1242
|
case "video":
|
|
1243
1243
|
case "audio":
|
|
1244
|
-
return { node:
|
|
1244
|
+
return { node: co(e) };
|
|
1245
1245
|
case "file":
|
|
1246
1246
|
return s({
|
|
1247
1247
|
id: t,
|
|
@@ -1258,31 +1258,31 @@ function co(e) {
|
|
|
1258
1258
|
return { node: null };
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1261
|
+
function ut(e) {
|
|
1262
1262
|
if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
|
|
1263
1263
|
const t = e.components.find((r) => r.id === Pe);
|
|
1264
1264
|
if (!t) return e.components.length === 0;
|
|
1265
1265
|
const n = t.children;
|
|
1266
1266
|
return !Array.isArray(n) || n.length === 0;
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function pn(e, t) {
|
|
1269
1269
|
const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, s = (e.title ?? "").trim(), a = (e.description ?? "").trim();
|
|
1270
|
-
i && s && (n.push({ id:
|
|
1270
|
+
i && s && (n.push({ id: lt, component: "Text", text: s, variant: "h2" }), r.push(lt)), i && a && (n.push({ id: ct, component: "Text", text: a, variant: "body" }), r.push(ct));
|
|
1271
1271
|
for (const m of e.blocks ?? []) {
|
|
1272
|
-
const { node: d, dataKey: S, dataValue: g } =
|
|
1272
|
+
const { node: d, dataKey: S, dataValue: g } = po(m);
|
|
1273
1273
|
d && (n.push(d), r.push(d.id), S && (o[S] = g));
|
|
1274
1274
|
}
|
|
1275
1275
|
n.unshift({ id: Pe, component: "Column", children: r });
|
|
1276
1276
|
const l = { root: Pe, components: n, dataModel: o }, c = t == null ? void 0 : t.styleId;
|
|
1277
1277
|
return c !== void 0 && (l.surfaceProperties = { styleId: c ?? null }), l;
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function fo(e) {
|
|
1280
1280
|
const t = /* @__PURE__ */ new Map();
|
|
1281
1281
|
for (const n of e.components ?? [])
|
|
1282
1282
|
n && typeof n.id == "string" && t.set(n.id, n);
|
|
1283
1283
|
return t;
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function nt(e) {
|
|
1286
1286
|
const t = e.options;
|
|
1287
1287
|
return Array.isArray(t) ? t.map((n) => {
|
|
1288
1288
|
if (!n || typeof n != "object") return null;
|
|
@@ -1293,10 +1293,10 @@ function et(e) {
|
|
|
1293
1293
|
};
|
|
1294
1294
|
}).filter((n) => !!n) : [];
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const t = typeof e.id == "string" ? e.id : Se("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o =
|
|
1296
|
+
function ho(e) {
|
|
1297
|
+
const t = typeof e.id == "string" ? e.id : Se("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o = Ht(e.value), i = (a) => ({ id: t, type: a, label: r }), s = io(n);
|
|
1298
1298
|
if (s)
|
|
1299
|
-
return s.fromComponent(e, i, { asLiteral: H, nameFromValue:
|
|
1299
|
+
return s.fromComponent(e, i, { asLiteral: H, nameFromValue: Ht });
|
|
1300
1300
|
switch (n) {
|
|
1301
1301
|
case "Text": {
|
|
1302
1302
|
const a = String(e.variant ?? "body"), l = /^h[1-6]$/i.test(a) || a === "title" || a === "subtitle";
|
|
@@ -1305,7 +1305,7 @@ function mo(e) {
|
|
|
1305
1305
|
case "TextField": {
|
|
1306
1306
|
const a = String(e.variant ?? "shortText");
|
|
1307
1307
|
let l = "text";
|
|
1308
|
-
a === "longText" ? l = "textarea" : a === "number" ? l = "number" : H(e.validationRegexp) ===
|
|
1308
|
+
a === "longText" ? l = "textarea" : a === "number" ? l = "number" : H(e.validationRegexp) === gt && (l = "email");
|
|
1309
1309
|
const c = { ...i(l), name: o }, m = H(e.placeholder);
|
|
1310
1310
|
return m && (c.placeholder = m), c;
|
|
1311
1311
|
}
|
|
@@ -1315,7 +1315,7 @@ function mo(e) {
|
|
|
1315
1315
|
const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", c = {
|
|
1316
1316
|
...i(l),
|
|
1317
1317
|
name: o,
|
|
1318
|
-
options:
|
|
1318
|
+
options: nt(e)
|
|
1319
1319
|
}, m = H(e.placeholder);
|
|
1320
1320
|
return m && (c.placeholder = m), c;
|
|
1321
1321
|
}
|
|
@@ -1325,12 +1325,12 @@ function mo(e) {
|
|
|
1325
1325
|
const m = {
|
|
1326
1326
|
...i(a),
|
|
1327
1327
|
name: o,
|
|
1328
|
-
options:
|
|
1328
|
+
options: nt(e)
|
|
1329
1329
|
}, d = H(e.placeholder);
|
|
1330
1330
|
return d && (m.placeholder = d), m;
|
|
1331
1331
|
}
|
|
1332
1332
|
const c = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
|
|
1333
|
-
return { ...i(c), name: o, options:
|
|
1333
|
+
return { ...i(c), name: o, options: nt(e) };
|
|
1334
1334
|
}
|
|
1335
1335
|
case "DateTimeInput": {
|
|
1336
1336
|
const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d = H(e.placeholder);
|
|
@@ -1338,14 +1338,14 @@ function mo(e) {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
case "SkoponMedia": {
|
|
1340
1340
|
const a = String(e.mediaType ?? "image");
|
|
1341
|
-
return
|
|
1341
|
+
return Ne(e, a === "video" ? "video" : a === "audio" ? "audio" : "image", r);
|
|
1342
1342
|
}
|
|
1343
1343
|
case "Image":
|
|
1344
|
-
return
|
|
1344
|
+
return Ne(e, "image", r);
|
|
1345
1345
|
case "Video":
|
|
1346
|
-
return
|
|
1346
|
+
return Ne(e, "video", r);
|
|
1347
1347
|
case "AudioPlayer":
|
|
1348
|
-
return
|
|
1348
|
+
return Ne(e, "audio", r);
|
|
1349
1349
|
case "FileUpload": {
|
|
1350
1350
|
const a = H(e.accept) ?? "", l = { ...i("file"), name: o };
|
|
1351
1351
|
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;
|
|
@@ -1354,7 +1354,7 @@ function mo(e) {
|
|
|
1354
1354
|
return null;
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1357
|
+
function fn(e, t, n, r) {
|
|
1358
1358
|
if (n.has(e)) return;
|
|
1359
1359
|
n.add(e);
|
|
1360
1360
|
const o = t.get(e);
|
|
@@ -1362,12 +1362,12 @@ function mn(e, t, n, r) {
|
|
|
1362
1362
|
const i = String(o.component ?? "");
|
|
1363
1363
|
if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
|
|
1364
1364
|
for (const s of o.children)
|
|
1365
|
-
typeof s == "string" &&
|
|
1365
|
+
typeof s == "string" && fn(s, t, n, r);
|
|
1366
1366
|
return;
|
|
1367
1367
|
}
|
|
1368
1368
|
r.push(o);
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function go(e, t) {
|
|
1371
1371
|
return t ? e.map((n) => {
|
|
1372
1372
|
var i;
|
|
1373
1373
|
const r = (i = n.name) == null ? void 0 : i.trim();
|
|
@@ -1376,33 +1376,33 @@ function po(e, t) {
|
|
|
1376
1376
|
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: Ce(o) } : { ...n, defaultValue: o };
|
|
1377
1377
|
}) : e;
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1379
|
+
function yo(e) {
|
|
1380
1380
|
if (!e || !Array.isArray(e.components))
|
|
1381
1381
|
return Re({ title: "", description: "", blocks: [], jsonSchema: {} });
|
|
1382
|
-
const t =
|
|
1383
|
-
|
|
1382
|
+
const t = fo(e), n = [];
|
|
1383
|
+
fn(e.root ?? Pe, t, /* @__PURE__ */ new Set(), n);
|
|
1384
1384
|
let r = "", o = "";
|
|
1385
1385
|
const i = [];
|
|
1386
1386
|
for (const s of n) {
|
|
1387
|
-
if (s.id ===
|
|
1387
|
+
if (s.id === lt) {
|
|
1388
1388
|
r = H(s.text) ?? r;
|
|
1389
1389
|
continue;
|
|
1390
1390
|
}
|
|
1391
|
-
if (s.id ===
|
|
1391
|
+
if (s.id === ct) {
|
|
1392
1392
|
o = H(s.text) ?? o;
|
|
1393
1393
|
continue;
|
|
1394
1394
|
}
|
|
1395
|
-
const a =
|
|
1395
|
+
const a = ho(s);
|
|
1396
1396
|
a && i.push(a);
|
|
1397
1397
|
}
|
|
1398
1398
|
return Re({
|
|
1399
1399
|
title: r,
|
|
1400
1400
|
description: o,
|
|
1401
|
-
blocks:
|
|
1401
|
+
blocks: go(i, e.dataModel),
|
|
1402
1402
|
jsonSchema: {}
|
|
1403
1403
|
});
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function vo(e, t) {
|
|
1406
1406
|
const { surfaceId: n, catalogId: r } = t, o = [
|
|
1407
1407
|
{ version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
|
|
1408
1408
|
{
|
|
@@ -1415,25 +1415,25 @@ function ho(e, t) {
|
|
|
1415
1415
|
updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
|
|
1416
1416
|
}), o;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function hn(e) {
|
|
1419
1419
|
return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function So(e, t) {
|
|
1422
1422
|
if (!e || typeof e != "object") return null;
|
|
1423
|
-
const n = e, r =
|
|
1424
|
-
if (r && !
|
|
1423
|
+
const n = e, r = hn(n.a2ui) ? n.a2ui : void 0;
|
|
1424
|
+
if (r && !ut(r)) return r;
|
|
1425
1425
|
const o = Array.isArray(n.blocks) ? n.blocks : [];
|
|
1426
1426
|
if (o.length === 0) return null;
|
|
1427
|
-
const i =
|
|
1427
|
+
const i = ue({
|
|
1428
1428
|
title: typeof n.title == "string" ? n.title : "",
|
|
1429
1429
|
description: typeof n.description == "string" ? n.description : "",
|
|
1430
1430
|
blocks: o,
|
|
1431
|
-
jsonSchema:
|
|
1432
|
-
}), s =
|
|
1433
|
-
return
|
|
1431
|
+
jsonSchema: ft(n.jsonSchema ?? n.json_schema)
|
|
1432
|
+
}), s = pn(i, t);
|
|
1433
|
+
return ut(s) ? null : s;
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1436
|
-
return
|
|
1435
|
+
function bo(e, t, n) {
|
|
1436
|
+
return pn(
|
|
1437
1437
|
{
|
|
1438
1438
|
title: e.title,
|
|
1439
1439
|
description: e.description,
|
|
@@ -1442,18 +1442,18 @@ function yo(e, t, n) {
|
|
|
1442
1442
|
n
|
|
1443
1443
|
);
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function ko(e) {
|
|
1446
1446
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1447
1447
|
return;
|
|
1448
1448
|
const t = e;
|
|
1449
|
-
return !(Array.isArray(t.blocks) && t.blocks.length > 0) &&
|
|
1449
|
+
return !(Array.isArray(t.blocks) && t.blocks.length > 0) && hn(t.a2ui) ? yo(t.a2ui) : ue({
|
|
1450
1450
|
title: typeof t.title == "string" ? t.title : "",
|
|
1451
1451
|
description: typeof t.description == "string" ? t.description : "",
|
|
1452
1452
|
blocks: Array.isArray(t.blocks) ? t.blocks : [],
|
|
1453
|
-
jsonSchema:
|
|
1453
|
+
jsonSchema: ft(t.jsonSchema ?? t.json_schema)
|
|
1454
1454
|
});
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function Co(e, t, n) {
|
|
1457
1457
|
const r = e.model.surfacesMap.get(t);
|
|
1458
1458
|
if (!r) return {};
|
|
1459
1459
|
const o = {};
|
|
@@ -1463,15 +1463,15 @@ function So(e, t, n) {
|
|
|
1463
1463
|
}
|
|
1464
1464
|
return o;
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1467
|
-
return
|
|
1466
|
+
function Ao(e) {
|
|
1467
|
+
return ue({
|
|
1468
1468
|
title: "",
|
|
1469
1469
|
description: "",
|
|
1470
1470
|
blocks: [e],
|
|
1471
1471
|
jsonSchema: {}
|
|
1472
1472
|
}).blocks[0];
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function _o(e, t) {
|
|
1475
1475
|
var o, i;
|
|
1476
1476
|
const n = /* @__PURE__ */ new Map();
|
|
1477
1477
|
for (const s of t) {
|
|
@@ -1481,7 +1481,7 @@ function ko(e, t) {
|
|
|
1481
1481
|
const r = [];
|
|
1482
1482
|
for (const s of e.blocks) {
|
|
1483
1483
|
if (Oe(s.type)) {
|
|
1484
|
-
r.push(
|
|
1484
|
+
r.push(Ao(s));
|
|
1485
1485
|
continue;
|
|
1486
1486
|
}
|
|
1487
1487
|
if (!ae(s.type)) continue;
|
|
@@ -1492,13 +1492,13 @@ function ko(e, t) {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
return r;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function To(e, t) {
|
|
1496
1496
|
var r;
|
|
1497
1497
|
const n = {
|
|
1498
1498
|
...e,
|
|
1499
1499
|
name: ((r = e.name) == null ? void 0 : r.trim()) || t.name
|
|
1500
1500
|
};
|
|
1501
|
-
return t.defaultValue !== void 0 && (n.defaultValue = t.defaultValue),
|
|
1501
|
+
return t.defaultValue !== void 0 && (n.defaultValue = t.defaultValue), ue({
|
|
1502
1502
|
title: "",
|
|
1503
1503
|
description: "",
|
|
1504
1504
|
blocks: [n],
|
|
@@ -1508,14 +1508,14 @@ function Co(e, t) {
|
|
|
1508
1508
|
function Be(e) {
|
|
1509
1509
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1510
1510
|
const t = e;
|
|
1511
|
-
return Array.isArray(t.blocks) ?
|
|
1511
|
+
return Array.isArray(t.blocks) ? ue({
|
|
1512
1512
|
title: typeof t.title == "string" ? t.title : "",
|
|
1513
1513
|
description: typeof t.description == "string" ? t.description : "",
|
|
1514
1514
|
blocks: t.blocks,
|
|
1515
1515
|
jsonSchema: {}
|
|
1516
1516
|
}) : null;
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function xo(e, t) {
|
|
1519
1519
|
var i, s, a, l, c, m;
|
|
1520
1520
|
const n = /* @__PURE__ */ new Map();
|
|
1521
1521
|
for (const d of (t == null ? void 0 : t.blocks) ?? [])
|
|
@@ -1526,8 +1526,8 @@ function Ao(e, t) {
|
|
|
1526
1526
|
const S = (s = d.name) == null ? void 0 : s.trim();
|
|
1527
1527
|
if (!S) continue;
|
|
1528
1528
|
const g = n.get(S);
|
|
1529
|
-
g ? r.push(
|
|
1530
|
-
|
|
1529
|
+
g ? r.push(To(g, d)) : o.push(
|
|
1530
|
+
ue({
|
|
1531
1531
|
title: "",
|
|
1532
1532
|
description: "",
|
|
1533
1533
|
blocks: [d],
|
|
@@ -1538,26 +1538,26 @@ function Ao(e, t) {
|
|
|
1538
1538
|
return {
|
|
1539
1539
|
matchedBlocks: r,
|
|
1540
1540
|
extraBlocks: o,
|
|
1541
|
-
renderBlocks:
|
|
1541
|
+
renderBlocks: _o(e, r),
|
|
1542
1542
|
title: ((a = e.title) == null ? void 0 : a.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
|
|
1543
1543
|
description: ((c = e.description) == null ? void 0 : c.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
|
|
1544
1544
|
};
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function Io(e) {
|
|
1547
1547
|
const { type: t, defaultValue: n } = e;
|
|
1548
1548
|
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 : "";
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function yt(e) {
|
|
1551
1551
|
var n;
|
|
1552
1552
|
const t = {};
|
|
1553
1553
|
for (const r of e) {
|
|
1554
1554
|
if (!ae(r.type)) continue;
|
|
1555
1555
|
const o = (n = r.name) == null ? void 0 : n.trim();
|
|
1556
|
-
o && (t[o] =
|
|
1556
|
+
o && (t[o] = Io(r));
|
|
1557
1557
|
}
|
|
1558
1558
|
return t;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function Mo(e) {
|
|
1561
1561
|
return e.blocks.some(
|
|
1562
1562
|
(t) => {
|
|
1563
1563
|
var n;
|
|
@@ -1565,61 +1565,61 @@ function To(e) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
);
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function No(e) {
|
|
1569
1569
|
return e.blocks.filter((t) => {
|
|
1570
1570
|
var n;
|
|
1571
1571
|
return Oe(t.type) ? !0 : ae(t.type) && !!((n = t.name) != null && n.trim());
|
|
1572
1572
|
});
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1574
|
+
function Fo(e) {
|
|
1575
1575
|
return e.blocks.filter((t) => {
|
|
1576
1576
|
var n;
|
|
1577
1577
|
return ae(t.type) && ((n = t.name) == null ? void 0 : n.trim());
|
|
1578
1578
|
}).map((t) => t.name.trim());
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function vt(e) {
|
|
1581
1581
|
return e.replace(/'/g, "'\\''");
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function gn(e) {
|
|
1584
1584
|
var n;
|
|
1585
1585
|
const t = (n = e == null ? void 0 : e.Authorization) == null ? void 0 : n.trim();
|
|
1586
|
-
return t ? ` -H 'Authorization: ${
|
|
1586
|
+
return t ? ` -H 'Authorization: ${vt(t)}' \\` : " -H 'Authorization: Bearer <token>' \\";
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1588
|
+
function yn(e, t, n) {
|
|
1589
1589
|
const r = (t ?? "").trim() || "<callback_url>", o = JSON.stringify(e ?? {}, null, 2);
|
|
1590
1590
|
return [
|
|
1591
1591
|
`curl -X POST '${r}' \\`,
|
|
1592
1592
|
" -H 'Content-Type: application/json' \\",
|
|
1593
|
-
|
|
1594
|
-
` -d '${
|
|
1593
|
+
gn(n),
|
|
1594
|
+
` -d '${vt(o)}'`
|
|
1595
1595
|
].join(`
|
|
1596
1596
|
`);
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1598
|
+
function Eo(e, t) {
|
|
1599
1599
|
return JSON.stringify({ ...e, ...t }, null, 2);
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1601
|
+
function Uo({
|
|
1602
1602
|
cardValues: e,
|
|
1603
1603
|
extraValues: t = {},
|
|
1604
1604
|
callbackUrl: n,
|
|
1605
1605
|
headers: r
|
|
1606
1606
|
}) {
|
|
1607
|
-
const o = (n ?? "").trim() || "<callback_url>", i =
|
|
1607
|
+
const o = (n ?? "").trim() || "<callback_url>", i = Eo(e, t);
|
|
1608
1608
|
return [
|
|
1609
1609
|
`curl -X POST '${o}' \\`,
|
|
1610
1610
|
" -H 'Content-Type: application/json' \\",
|
|
1611
|
-
|
|
1612
|
-
` -d '${
|
|
1611
|
+
gn(r),
|
|
1612
|
+
` -d '${vt(i)}'`
|
|
1613
1613
|
].join(`
|
|
1614
1614
|
`);
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1616
|
+
function rs(e, t, n) {
|
|
1617
1617
|
const r = Be(e);
|
|
1618
|
-
if (!r) return
|
|
1619
|
-
const o =
|
|
1620
|
-
return
|
|
1618
|
+
if (!r) return yn(e, t, n);
|
|
1619
|
+
const o = yt(r.blocks);
|
|
1620
|
+
return Uo({ cardValues: o, callbackUrl: t, headers: n });
|
|
1621
1621
|
}
|
|
1622
|
-
async function
|
|
1622
|
+
async function vn(e, t, n) {
|
|
1623
1623
|
const r = e.trim();
|
|
1624
1624
|
if (!r)
|
|
1625
1625
|
throw new Error("callback_url 为空");
|
|
@@ -1646,7 +1646,7 @@ async function hn(e, t, n) {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
return { ok: i.ok, status: i.status, body: s };
|
|
1648
1648
|
}
|
|
1649
|
-
async function
|
|
1649
|
+
async function os(e) {
|
|
1650
1650
|
var n;
|
|
1651
1651
|
if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
|
|
1652
1652
|
await navigator.clipboard.writeText(e);
|
|
@@ -1662,7 +1662,7 @@ async function ts(e) {
|
|
|
1662
1662
|
document.body.removeChild(t);
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
async function
|
|
1665
|
+
async function St(e) {
|
|
1666
1666
|
let t;
|
|
1667
1667
|
try {
|
|
1668
1668
|
t = await e.json();
|
|
@@ -1675,8 +1675,8 @@ async function yt(e) {
|
|
|
1675
1675
|
throw new Error(t.message || `响应缺少 data (${e.status})`);
|
|
1676
1676
|
return t.data;
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1679
|
-
function
|
|
1678
|
+
const bt = "auth_user", Ro = "token", wo = "answer_agent_callback_url", Po = "realtime_ws_url", zo = "/api/v1/mock/ask_user_answer_mock";
|
|
1679
|
+
function kt(e) {
|
|
1680
1680
|
if (typeof window > "u") return null;
|
|
1681
1681
|
try {
|
|
1682
1682
|
return e === "localStorage" ? window.localStorage : window.sessionStorage;
|
|
@@ -1684,7 +1684,7 @@ function St(e) {
|
|
|
1684
1684
|
return null;
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
|
-
function
|
|
1687
|
+
function Ct(e) {
|
|
1688
1688
|
try {
|
|
1689
1689
|
const t = JSON.parse(e);
|
|
1690
1690
|
return !t || typeof t != "object" || Array.isArray(t) ? null : t;
|
|
@@ -1692,50 +1692,50 @@ function bt(e) {
|
|
|
1692
1692
|
return null;
|
|
1693
1693
|
}
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1696
|
-
const n =
|
|
1695
|
+
function Oo(e, t) {
|
|
1696
|
+
const n = Ct(e);
|
|
1697
1697
|
if (!n) return "";
|
|
1698
1698
|
const r = n[t];
|
|
1699
1699
|
return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1702
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ??
|
|
1701
|
+
function qo(e = {}) {
|
|
1702
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? bt, r = e.answerAgentCallbackUrlField ?? wo, o = kt(t);
|
|
1703
1703
|
if (!o) return "";
|
|
1704
1704
|
const i = o.getItem(n);
|
|
1705
1705
|
if (!i) return "";
|
|
1706
|
-
const s =
|
|
1706
|
+
const s = Ct(i);
|
|
1707
1707
|
if (!s) return "";
|
|
1708
1708
|
const a = s[r];
|
|
1709
|
-
return (typeof a == "string" ? a.trim() : "") ||
|
|
1709
|
+
return (typeof a == "string" ? a.trim() : "") || zo;
|
|
1710
1710
|
}
|
|
1711
|
-
function
|
|
1712
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ??
|
|
1711
|
+
function Bo(e = {}) {
|
|
1712
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? bt, r = e.realtimeWsUrlField ?? Po, o = kt(t);
|
|
1713
1713
|
if (!o) return "";
|
|
1714
1714
|
const i = o.getItem(n);
|
|
1715
1715
|
if (!i) return "";
|
|
1716
|
-
const s =
|
|
1716
|
+
const s = Ct(i);
|
|
1717
1717
|
if (!s) return "";
|
|
1718
1718
|
const a = s[r];
|
|
1719
1719
|
return typeof a == "string" ? a.trim() : "";
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function At(e, t) {
|
|
1722
1722
|
return {
|
|
1723
|
-
...
|
|
1723
|
+
...Sn(t),
|
|
1724
1724
|
...e ?? {}
|
|
1725
1725
|
};
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1728
|
-
const t = e.storage ?? "sessionStorage", n = e.storageKey ??
|
|
1727
|
+
function Sn(e = {}) {
|
|
1728
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? bt, r = e.tokenField ?? Ro, o = kt(t);
|
|
1729
1729
|
if (!o) return {};
|
|
1730
1730
|
const i = o.getItem(n);
|
|
1731
1731
|
if (!i) return {};
|
|
1732
|
-
const s =
|
|
1732
|
+
const s = Oo(i, r);
|
|
1733
1733
|
return s ? { Authorization: `Bearer ${s}` } : {};
|
|
1734
1734
|
}
|
|
1735
|
-
async function
|
|
1736
|
-
return e.getHeaders ? await e.getHeaders() ?? {} :
|
|
1735
|
+
async function _t(e = {}) {
|
|
1736
|
+
return e.getHeaders ? await e.getHeaders() ?? {} : Sn(e.authStorage);
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1738
|
+
function Lo(e = {}) {
|
|
1739
1739
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
|
|
1740
1740
|
async function o(i) {
|
|
1741
1741
|
const s = new URLSearchParams();
|
|
@@ -1745,21 +1745,21 @@ function Oo(e = {}) {
|
|
|
1745
1745
|
s.set("form_unique_id", i.formUniqueId);
|
|
1746
1746
|
else
|
|
1747
1747
|
throw new Error("form_id 或 form_unique_id 至少传一个");
|
|
1748
|
-
const a = await
|
|
1748
|
+
const a = await _t(e), l = await r(`${t}${n}?${s.toString()}`, {
|
|
1749
1749
|
method: "GET",
|
|
1750
1750
|
headers: a
|
|
1751
|
-
}), c = await
|
|
1751
|
+
}), c = await St(l), m = ko(c.form_definition);
|
|
1752
1752
|
return {
|
|
1753
1753
|
formUniqueId: c.form_unique_id,
|
|
1754
1754
|
formId: c.form_id,
|
|
1755
1755
|
disabled: c.disabled === 1,
|
|
1756
1756
|
formDefinition: m,
|
|
1757
|
-
a2ui:
|
|
1757
|
+
a2ui: So(c.form_definition) ?? void 0
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
1760
|
return { fetchDetail: o };
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function Vo(e) {
|
|
1763
1763
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1764
1764
|
return e ?? null;
|
|
1765
1765
|
const t = e;
|
|
@@ -1769,13 +1769,13 @@ function qo(e) {
|
|
|
1769
1769
|
blocks: t.blocks
|
|
1770
1770
|
} : e;
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1772
|
+
function Tt({
|
|
1773
1773
|
context: e,
|
|
1774
1774
|
payload: t,
|
|
1775
1775
|
form: n,
|
|
1776
1776
|
answer: r
|
|
1777
1777
|
}) {
|
|
1778
|
-
const o = Be(t) ?? t, i = n ?
|
|
1778
|
+
const o = Be(t) ?? t, i = n ? Vo(n) : o;
|
|
1779
1779
|
return {
|
|
1780
1780
|
mission_id: e.missionId ?? null,
|
|
1781
1781
|
tenant_id: e.tenantId ?? null,
|
|
@@ -1788,7 +1788,7 @@ function At({
|
|
|
1788
1788
|
answer: r
|
|
1789
1789
|
};
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1791
|
+
function xt(e) {
|
|
1792
1792
|
const t = e.callback_url;
|
|
1793
1793
|
if (typeof t != "string" || !t.trim())
|
|
1794
1794
|
return "callback_url 为空,无法提交";
|
|
@@ -1803,34 +1803,34 @@ function _t(e) {
|
|
|
1803
1803
|
const o = e.mission_id;
|
|
1804
1804
|
return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1807
|
-
return
|
|
1808
|
-
|
|
1806
|
+
function is(e) {
|
|
1807
|
+
return xt(
|
|
1808
|
+
Tt({
|
|
1809
1809
|
context: e,
|
|
1810
1810
|
payload: {},
|
|
1811
1811
|
answer: {}
|
|
1812
1812
|
})
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
|
-
const
|
|
1816
|
-
function
|
|
1815
|
+
const Kt = "answer_agent_callback_url 未配置,无法提交";
|
|
1816
|
+
function jo(e) {
|
|
1817
1817
|
if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
|
|
1818
1818
|
const n = e.answerAgentCallbackUrl.trim();
|
|
1819
1819
|
if (!n)
|
|
1820
|
-
throw new Error(
|
|
1820
|
+
throw new Error(Kt);
|
|
1821
1821
|
return n;
|
|
1822
1822
|
}
|
|
1823
|
-
const t =
|
|
1823
|
+
const t = qo(e == null ? void 0 : e.authStorage).trim();
|
|
1824
1824
|
if (!t)
|
|
1825
|
-
throw new Error(
|
|
1825
|
+
throw new Error(Kt);
|
|
1826
1826
|
return t;
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function bn(e) {
|
|
1829
1829
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1830
1830
|
const n = e.data;
|
|
1831
1831
|
return !n || typeof n != "object" || Array.isArray(n) ? null : n;
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1833
|
+
function $o(e, t) {
|
|
1834
1834
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
1835
1835
|
const n = t.message;
|
|
1836
1836
|
if (typeof n == "string" && n.trim())
|
|
@@ -1838,27 +1838,27 @@ function Lo(e, t) {
|
|
|
1838
1838
|
}
|
|
1839
1839
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Do(e) {
|
|
1842
1842
|
return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1845
|
-
const t =
|
|
1846
|
-
return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message:
|
|
1844
|
+
function kn(e) {
|
|
1845
|
+
const t = bn(e.body);
|
|
1846
|
+
return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: Do(t) } : e.ok ? { type: "success", message: "提交成功" } : {
|
|
1847
1847
|
type: "error",
|
|
1848
|
-
message:
|
|
1848
|
+
message: $o(e.status, e.body)
|
|
1849
1849
|
};
|
|
1850
1850
|
}
|
|
1851
|
-
async function
|
|
1852
|
-
const n =
|
|
1851
|
+
async function Cn(e, t) {
|
|
1852
|
+
const n = xt(e);
|
|
1853
1853
|
if (n)
|
|
1854
1854
|
throw new Error(n);
|
|
1855
|
-
const r =
|
|
1855
|
+
const r = jo(t), o = await vn(r, e, {
|
|
1856
1856
|
...t,
|
|
1857
|
-
headers:
|
|
1858
|
-
}), i =
|
|
1857
|
+
headers: At(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
|
|
1858
|
+
}), i = bn(o.body);
|
|
1859
1859
|
return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1861
|
+
function Ho(e) {
|
|
1862
1862
|
return {
|
|
1863
1863
|
resumeUniqueId: e.resume_unique_id,
|
|
1864
1864
|
resumeId: e.resume_id,
|
|
@@ -1879,7 +1879,7 @@ function jo(e) {
|
|
|
1879
1879
|
}))
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1882
|
+
function Ko(e, t) {
|
|
1883
1883
|
const n = new URLSearchParams();
|
|
1884
1884
|
n.set("page", String(t)), n.set("page_size", String(e.pageSize ?? 20));
|
|
1885
1885
|
for (const r of e.names ?? [])
|
|
@@ -1890,27 +1890,27 @@ function $o(e, t) {
|
|
|
1890
1890
|
r && n.append("resume_unique_id", r);
|
|
1891
1891
|
return n;
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function Go(e = {}) {
|
|
1894
1894
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch;
|
|
1895
1895
|
return async ({ filter: o, page: i }) => {
|
|
1896
|
-
const s = await
|
|
1896
|
+
const s = await _t(e), a = Ko(o, i), l = await r(`${t}${n}?${a.toString()}`, {
|
|
1897
1897
|
method: "GET",
|
|
1898
1898
|
headers: s
|
|
1899
|
-
}), c = await
|
|
1899
|
+
}), c = await St(l);
|
|
1900
1900
|
return {
|
|
1901
|
-
list: (c.list ?? []).map(
|
|
1901
|
+
list: (c.list ?? []).map(Ho),
|
|
1902
1902
|
total: c.total ?? 0,
|
|
1903
1903
|
page: c.page ?? i,
|
|
1904
1904
|
pageSize: c.page_size ?? o.pageSize ?? 20
|
|
1905
1905
|
};
|
|
1906
1906
|
};
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function Jo(e) {
|
|
1909
1909
|
var r, o, i, s;
|
|
1910
1910
|
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()));
|
|
1911
1911
|
return t || n;
|
|
1912
1912
|
}
|
|
1913
|
-
function
|
|
1913
|
+
function Wo(e) {
|
|
1914
1914
|
return {
|
|
1915
1915
|
caseUniqueId: e.case_unique_id,
|
|
1916
1916
|
caseId: e.case_id,
|
|
@@ -1921,7 +1921,7 @@ function Ko(e) {
|
|
|
1921
1921
|
description: e.description ?? void 0
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1924
|
+
function Yo(e, t, n) {
|
|
1925
1925
|
var o, i, s;
|
|
1926
1926
|
const r = new URLSearchParams();
|
|
1927
1927
|
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());
|
|
@@ -1929,24 +1929,24 @@ function Go(e, t, n) {
|
|
|
1929
1929
|
a && r.append("flow_unique_ids", a);
|
|
1930
1930
|
return r;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Qo(e = {}) {
|
|
1933
1933
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
|
|
1934
1934
|
return async ({ filter: i, page: s }) => {
|
|
1935
|
-
if (!
|
|
1935
|
+
if (!Jo(i))
|
|
1936
1936
|
return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
|
|
1937
|
-
const a = await
|
|
1937
|
+
const a = await _t(e), l = Yo(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
|
|
1938
1938
|
method: "GET",
|
|
1939
1939
|
headers: a
|
|
1940
|
-
}), m = await
|
|
1940
|
+
}), m = await St(c);
|
|
1941
1941
|
return {
|
|
1942
|
-
list: (m.list ?? []).map(
|
|
1942
|
+
list: (m.list ?? []).map(Wo),
|
|
1943
1943
|
total: m.total ?? 0,
|
|
1944
1944
|
page: m.page ?? s,
|
|
1945
1945
|
pageSize: m.page_size ?? i.pageSize ?? 20
|
|
1946
1946
|
};
|
|
1947
1947
|
};
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1949
|
+
function ss(e = {}) {
|
|
1950
1950
|
var r, o, i, s;
|
|
1951
1951
|
const t = {
|
|
1952
1952
|
baseUrl: e.baseUrl,
|
|
@@ -1955,22 +1955,22 @@ function rs(e = {}) {
|
|
|
1955
1955
|
authStorage: e.authStorage
|
|
1956
1956
|
};
|
|
1957
1957
|
return {
|
|
1958
|
-
fetchDetail:
|
|
1958
|
+
fetchDetail: Lo({
|
|
1959
1959
|
...t,
|
|
1960
1960
|
detailPath: (r = e.form) == null ? void 0 : r.detailPath
|
|
1961
1961
|
}).fetchDetail,
|
|
1962
|
-
resumeSearch:
|
|
1962
|
+
resumeSearch: Go({
|
|
1963
1963
|
...t,
|
|
1964
1964
|
searchPath: (o = e.resume) == null ? void 0 : o.searchPath
|
|
1965
1965
|
}),
|
|
1966
|
-
caseSearch:
|
|
1966
|
+
caseSearch: Qo({
|
|
1967
1967
|
...t,
|
|
1968
1968
|
listPath: (i = e.case) == null ? void 0 : i.listPath,
|
|
1969
1969
|
published: (s = e.case) == null ? void 0 : s.published
|
|
1970
1970
|
})
|
|
1971
1971
|
};
|
|
1972
1972
|
}
|
|
1973
|
-
function
|
|
1973
|
+
function An(e, t) {
|
|
1974
1974
|
if (!t.trim()) return !0;
|
|
1975
1975
|
try {
|
|
1976
1976
|
return new RegExp(t).test(e);
|
|
@@ -1978,10 +1978,10 @@ function bn(e, t) {
|
|
|
1978
1978
|
return !0;
|
|
1979
1979
|
}
|
|
1980
1980
|
}
|
|
1981
|
-
function
|
|
1981
|
+
function _n(e) {
|
|
1982
1982
|
return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1984
|
+
function Xo(e, t) {
|
|
1985
1985
|
switch (e.type) {
|
|
1986
1986
|
case "multiselect":
|
|
1987
1987
|
case "checkbox":
|
|
@@ -1994,28 +1994,28 @@ function Wo(e, t) {
|
|
|
1994
1994
|
case "number":
|
|
1995
1995
|
return t == null || t === "";
|
|
1996
1996
|
default:
|
|
1997
|
-
return
|
|
1997
|
+
return _n(t);
|
|
1998
1998
|
}
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2000
|
+
function rt(e, t) {
|
|
2001
2001
|
return e.required === !0 || t > 0;
|
|
2002
2002
|
}
|
|
2003
|
-
function
|
|
2003
|
+
function Zo(e, t) {
|
|
2004
2004
|
var n, r;
|
|
2005
2005
|
for (const o of e) {
|
|
2006
2006
|
const i = (n = o.name) == null ? void 0 : n.trim();
|
|
2007
2007
|
if (!i || Oe(o.type) || Ue(o.type)) continue;
|
|
2008
2008
|
const s = t[i], a = ((r = o.label) == null ? void 0 : r.trim()) || i;
|
|
2009
|
-
if (o.required &&
|
|
2009
|
+
if (o.required && Xo(o, s))
|
|
2010
2010
|
return { fieldName: i, label: a, message: `请填写「${a}」` };
|
|
2011
|
-
if (o.type === "email" && !
|
|
2011
|
+
if (o.type === "email" && !_n(s)) {
|
|
2012
2012
|
const l = String(s).trim();
|
|
2013
|
-
if (!
|
|
2013
|
+
if (!An(l, gt))
|
|
2014
2014
|
return { fieldName: i, label: a, message: `「${a}」格式不正确` };
|
|
2015
2015
|
}
|
|
2016
2016
|
if (o.type === "file") {
|
|
2017
2017
|
const l = o.fileMinCount ?? 0, c = Y(s).length;
|
|
2018
|
-
if (l > 0 && c < l &&
|
|
2018
|
+
if (l > 0 && c < l && rt(o, c))
|
|
2019
2019
|
return {
|
|
2020
2020
|
fieldName: i,
|
|
2021
2021
|
label: a,
|
|
@@ -2024,7 +2024,7 @@ function Yo(e, t) {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
if (o.type === "resume_multiselect") {
|
|
2026
2026
|
const l = o.resumeMinCount, c = Y(s).length;
|
|
2027
|
-
if (l !== void 0 && c < l &&
|
|
2027
|
+
if (l !== void 0 && c < l && rt(o, c))
|
|
2028
2028
|
return {
|
|
2029
2029
|
fieldName: i,
|
|
2030
2030
|
label: a,
|
|
@@ -2033,7 +2033,7 @@ function Yo(e, t) {
|
|
|
2033
2033
|
}
|
|
2034
2034
|
if (o.type === "case_multiselect") {
|
|
2035
2035
|
const l = o.caseMinCount, c = Y(s).length;
|
|
2036
|
-
if (l !== void 0 && c < l &&
|
|
2036
|
+
if (l !== void 0 && c < l && rt(o, c))
|
|
2037
2037
|
return {
|
|
2038
2038
|
fieldName: i,
|
|
2039
2039
|
label: a,
|
|
@@ -2043,20 +2043,20 @@ function Yo(e, t) {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
return null;
|
|
2045
2045
|
}
|
|
2046
|
-
const
|
|
2047
|
-
video:
|
|
2048
|
-
audio:
|
|
2049
|
-
image:
|
|
2050
|
-
file:
|
|
2051
|
-
spreadsheet:
|
|
2052
|
-
document:
|
|
2046
|
+
const ei = {
|
|
2047
|
+
video: Jn,
|
|
2048
|
+
audio: Gn,
|
|
2049
|
+
image: Kn,
|
|
2050
|
+
file: Wt,
|
|
2051
|
+
spreadsheet: Hn,
|
|
2052
|
+
document: Jt
|
|
2053
2053
|
};
|
|
2054
|
-
function
|
|
2054
|
+
function ti({
|
|
2055
2055
|
type: e,
|
|
2056
2056
|
size: t = 40,
|
|
2057
2057
|
className: n
|
|
2058
2058
|
}) {
|
|
2059
|
-
const r =
|
|
2059
|
+
const r = ei[e] ?? Wt;
|
|
2060
2060
|
return /* @__PURE__ */ u(
|
|
2061
2061
|
r,
|
|
2062
2062
|
{
|
|
@@ -2066,7 +2066,7 @@ function Xo({
|
|
|
2066
2066
|
}
|
|
2067
2067
|
);
|
|
2068
2068
|
}
|
|
2069
|
-
const
|
|
2069
|
+
const Tn = "skopon-form-v0_9", ni = /* @__PURE__ */ new Set([
|
|
2070
2070
|
"SkoponMedia",
|
|
2071
2071
|
"SkoponSelect",
|
|
2072
2072
|
"Image",
|
|
@@ -2078,8 +2078,8 @@ const Cn = "skopon-form-v0_9", Zo = /* @__PURE__ */ new Set([
|
|
|
2078
2078
|
"FileUpload",
|
|
2079
2079
|
"TextField",
|
|
2080
2080
|
"Text",
|
|
2081
|
-
...
|
|
2082
|
-
]),
|
|
2081
|
+
...ao()
|
|
2082
|
+
]), ri = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
|
|
2083
2083
|
function Ae(e) {
|
|
2084
2084
|
const t = [...Ee.components.values()].find((n) => n.name === e);
|
|
2085
2085
|
if (!t) throw new Error(`Missing basic catalog component: ${e}`);
|
|
@@ -2088,7 +2088,7 @@ function Ae(e) {
|
|
|
2088
2088
|
function E(e) {
|
|
2089
2089
|
return typeof e == "string" ? e : "";
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function xn(e) {
|
|
2092
2092
|
return Array.isArray(e) ? e.map((t) => {
|
|
2093
2093
|
if (!t || typeof t != "object") return null;
|
|
2094
2094
|
const n = t, r = String(n.value ?? n.label ?? ""), o = String(n.label ?? n.value ?? "");
|
|
@@ -2103,7 +2103,7 @@ function Le({
|
|
|
2103
2103
|
help: o,
|
|
2104
2104
|
placeholder: i
|
|
2105
2105
|
}) {
|
|
2106
|
-
const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l =
|
|
2106
|
+
const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = yr(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
|
|
2107
2107
|
return /* @__PURE__ */ I("div", { className: "form-block-preview", children: [
|
|
2108
2108
|
s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
|
|
2109
2109
|
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(
|
|
@@ -2145,7 +2145,7 @@ function Ve(e, t) {
|
|
|
2145
2145
|
placeholder: E(e.placeholder)
|
|
2146
2146
|
};
|
|
2147
2147
|
}
|
|
2148
|
-
const
|
|
2148
|
+
const oi = {
|
|
2149
2149
|
name: "SkoponMedia",
|
|
2150
2150
|
schema: h.object({
|
|
2151
2151
|
mediaType: h.any().optional(),
|
|
@@ -2155,19 +2155,19 @@ const ti = {
|
|
|
2155
2155
|
help: h.any().optional(),
|
|
2156
2156
|
placeholder: h.any().optional()
|
|
2157
2157
|
}).passthrough()
|
|
2158
|
-
},
|
|
2158
|
+
}, ii = Q(oi, ({ context: e }) => {
|
|
2159
2159
|
const t = e.componentModel.properties, n = E(t.mediaType);
|
|
2160
2160
|
return /* @__PURE__ */ u(Le, { ...Ve(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
|
|
2161
|
-
}),
|
|
2161
|
+
}), si = Q(
|
|
2162
2162
|
{ name: "Image", schema: Ae("Image") },
|
|
2163
2163
|
({ context: e }) => /* @__PURE__ */ u(Le, { ...Ve(e.componentModel.properties, "image") })
|
|
2164
|
-
),
|
|
2164
|
+
), ai = Q(
|
|
2165
2165
|
{ name: "Video", schema: Ae("Video") },
|
|
2166
2166
|
({ context: e }) => /* @__PURE__ */ u(Le, { ...Ve(e.componentModel.properties, "video") })
|
|
2167
|
-
),
|
|
2167
|
+
), li = Q(
|
|
2168
2168
|
{ name: "AudioPlayer", schema: Ae("AudioPlayer") },
|
|
2169
2169
|
({ context: e }) => /* @__PURE__ */ u(Le, { ...Ve(e.componentModel.properties, "audio") })
|
|
2170
|
-
),
|
|
2170
|
+
), ci = {
|
|
2171
2171
|
name: "SkoponSelect",
|
|
2172
2172
|
schema: h.object({
|
|
2173
2173
|
label: h.any().optional(),
|
|
@@ -2177,18 +2177,18 @@ const ti = {
|
|
|
2177
2177
|
value: h.any().optional()
|
|
2178
2178
|
}).passthrough()
|
|
2179
2179
|
};
|
|
2180
|
-
function
|
|
2181
|
-
const { interactive: t } =
|
|
2180
|
+
function ui({ context: e }) {
|
|
2181
|
+
const { interactive: t } = ie(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = se(e, "value", {
|
|
2182
2182
|
component: "SkoponSelect",
|
|
2183
2183
|
changeAction: "select"
|
|
2184
|
-
}), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), c =
|
|
2184
|
+
}), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), c = xn(s.options), m = E(s.mode) === "multiple";
|
|
2185
2185
|
return z(() => {
|
|
2186
|
-
const d =
|
|
2186
|
+
const d = an(n, m);
|
|
2187
2187
|
d !== null && o(d);
|
|
2188
2188
|
}, [m, n, o]), /* @__PURE__ */ I("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
|
|
2189
2189
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2190
2190
|
/* @__PURE__ */ u(
|
|
2191
|
-
|
|
2191
|
+
ot,
|
|
2192
2192
|
{
|
|
2193
2193
|
mode: m ? "multiple" : void 0,
|
|
2194
2194
|
disabled: !t,
|
|
@@ -2203,22 +2203,22 @@ function ai({ context: e }) {
|
|
|
2203
2203
|
)
|
|
2204
2204
|
] });
|
|
2205
2205
|
}
|
|
2206
|
-
const
|
|
2207
|
-
|
|
2208
|
-
|
|
2206
|
+
const mi = Q(
|
|
2207
|
+
ci,
|
|
2208
|
+
ui
|
|
2209
2209
|
);
|
|
2210
|
-
function
|
|
2211
|
-
const { interactive: t } =
|
|
2210
|
+
function di({ context: e }) {
|
|
2211
|
+
const { interactive: t } = ie(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = se(e, "value", {
|
|
2212
2212
|
component: "ChoicePicker",
|
|
2213
2213
|
changeAction: "select"
|
|
2214
|
-
}), s = e.componentModel.properties, a = E(s.label), l = E(s.variant) || "mutuallyExclusive", c = E(s.skoponPickerType), m = E(s.placeholder), d =
|
|
2214
|
+
}), s = e.componentModel.properties, a = E(s.label), l = E(s.variant) || "mutuallyExclusive", c = E(s.skoponPickerType), m = E(s.placeholder), d = xn(s.options), g = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", b = g === "multiselect" || g === "checkbox";
|
|
2215
2215
|
return z(() => {
|
|
2216
|
-
const y =
|
|
2216
|
+
const y = an(n, b);
|
|
2217
2217
|
y !== null && o(y);
|
|
2218
2218
|
}, [b, n, o]), /* @__PURE__ */ I("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
|
|
2219
2219
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2220
2220
|
g === "select" ? /* @__PURE__ */ u(
|
|
2221
|
-
|
|
2221
|
+
ot,
|
|
2222
2222
|
{
|
|
2223
2223
|
disabled: !t,
|
|
2224
2224
|
allowClear: !0,
|
|
@@ -2230,7 +2230,7 @@ function ci({ context: e }) {
|
|
|
2230
2230
|
onChange: (y) => r(y ?? "")
|
|
2231
2231
|
}
|
|
2232
2232
|
) : g === "multiselect" ? /* @__PURE__ */ u(
|
|
2233
|
-
|
|
2233
|
+
ot,
|
|
2234
2234
|
{
|
|
2235
2235
|
mode: "multiple",
|
|
2236
2236
|
disabled: !t,
|
|
@@ -2243,7 +2243,7 @@ function ci({ context: e }) {
|
|
|
2243
2243
|
onChange: (y) => r(y ?? [])
|
|
2244
2244
|
}
|
|
2245
2245
|
) : g === "checkbox" ? /* @__PURE__ */ u(
|
|
2246
|
-
|
|
2246
|
+
zn.Group,
|
|
2247
2247
|
{
|
|
2248
2248
|
disabled: !t,
|
|
2249
2249
|
className: "form-block-preview-control",
|
|
@@ -2252,7 +2252,7 @@ function ci({ context: e }) {
|
|
|
2252
2252
|
onChange: (y) => r(y)
|
|
2253
2253
|
}
|
|
2254
2254
|
) : /* @__PURE__ */ u(
|
|
2255
|
-
|
|
2255
|
+
On.Group,
|
|
2256
2256
|
{
|
|
2257
2257
|
disabled: !t,
|
|
2258
2258
|
className: "form-block-preview-control",
|
|
@@ -2263,7 +2263,7 @@ function ci({ context: e }) {
|
|
|
2263
2263
|
)
|
|
2264
2264
|
] });
|
|
2265
2265
|
}
|
|
2266
|
-
const
|
|
2266
|
+
const pi = Q(
|
|
2267
2267
|
{
|
|
2268
2268
|
name: "ChoicePicker",
|
|
2269
2269
|
schema: h.object({
|
|
@@ -2275,17 +2275,17 @@ const ui = Q(
|
|
|
2275
2275
|
placeholder: h.any().optional()
|
|
2276
2276
|
}).passthrough()
|
|
2277
2277
|
},
|
|
2278
|
-
|
|
2278
|
+
di
|
|
2279
2279
|
);
|
|
2280
|
-
function
|
|
2281
|
-
const { interactive: t } =
|
|
2280
|
+
function fi({ context: e }) {
|
|
2281
|
+
const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o } = se(e, "value", {
|
|
2282
2282
|
component: "CheckBox",
|
|
2283
2283
|
changeAction: "change"
|
|
2284
2284
|
}), i = e.componentModel.properties, s = E(i.label);
|
|
2285
2285
|
return /* @__PURE__ */ I("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
2286
2286
|
s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
|
|
2287
2287
|
/* @__PURE__ */ u(
|
|
2288
|
-
|
|
2288
|
+
qn,
|
|
2289
2289
|
{
|
|
2290
2290
|
disabled: !t,
|
|
2291
2291
|
className: "form-block-preview-control",
|
|
@@ -2295,25 +2295,25 @@ function mi({ context: e }) {
|
|
|
2295
2295
|
)
|
|
2296
2296
|
] });
|
|
2297
2297
|
}
|
|
2298
|
-
const
|
|
2298
|
+
const hi = Q(
|
|
2299
2299
|
{ name: "CheckBox", schema: Ae("CheckBox") },
|
|
2300
|
-
|
|
2300
|
+
fi
|
|
2301
2301
|
);
|
|
2302
|
-
function
|
|
2302
|
+
function gi(e, t, n) {
|
|
2303
2303
|
const r = he(e);
|
|
2304
2304
|
if (!r) return;
|
|
2305
2305
|
if (!t && n) {
|
|
2306
|
-
const i =
|
|
2306
|
+
const i = Lt(r, "HH:mm", !0);
|
|
2307
2307
|
return i.isValid() ? i : void 0;
|
|
2308
2308
|
}
|
|
2309
|
-
const o =
|
|
2309
|
+
const o = Lt(r);
|
|
2310
2310
|
return o.isValid() ? o : void 0;
|
|
2311
2311
|
}
|
|
2312
|
-
function
|
|
2313
|
-
const { interactive: t } =
|
|
2312
|
+
function yi({ context: e }) {
|
|
2313
|
+
const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o, reportFocus: i } = se(e, "value", {
|
|
2314
2314
|
component: "DateTimeInput",
|
|
2315
2315
|
changeAction: "change"
|
|
2316
|
-
}), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d =
|
|
2316
|
+
}), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = gi(n, c, m), S = (g) => {
|
|
2317
2317
|
if (!g) {
|
|
2318
2318
|
r("");
|
|
2319
2319
|
return;
|
|
@@ -2331,7 +2331,7 @@ function fi({ context: e }) {
|
|
|
2331
2331
|
return /* @__PURE__ */ I("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
2332
2332
|
a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
|
|
2333
2333
|
!c && m ? /* @__PURE__ */ u(
|
|
2334
|
-
|
|
2334
|
+
Bn,
|
|
2335
2335
|
{
|
|
2336
2336
|
disabled: !t,
|
|
2337
2337
|
className: "form-block-preview-control",
|
|
@@ -2342,7 +2342,7 @@ function fi({ context: e }) {
|
|
|
2342
2342
|
onFocus: i
|
|
2343
2343
|
}
|
|
2344
2344
|
) : /* @__PURE__ */ u(
|
|
2345
|
-
|
|
2345
|
+
Ln,
|
|
2346
2346
|
{
|
|
2347
2347
|
showTime: c && m,
|
|
2348
2348
|
disabled: !t,
|
|
@@ -2356,7 +2356,7 @@ function fi({ context: e }) {
|
|
|
2356
2356
|
)
|
|
2357
2357
|
] });
|
|
2358
2358
|
}
|
|
2359
|
-
const
|
|
2359
|
+
const vi = Q(
|
|
2360
2360
|
{
|
|
2361
2361
|
name: "DateTimeInput",
|
|
2362
2362
|
schema: h.object({
|
|
@@ -2369,8 +2369,8 @@ const hi = Q(
|
|
|
2369
2369
|
max: h.any().optional()
|
|
2370
2370
|
}).passthrough()
|
|
2371
2371
|
},
|
|
2372
|
-
|
|
2373
|
-
),
|
|
2372
|
+
yi
|
|
2373
|
+
), Si = {
|
|
2374
2374
|
name: "FileUpload",
|
|
2375
2375
|
schema: h.object({
|
|
2376
2376
|
label: h.any().optional(),
|
|
@@ -2382,20 +2382,20 @@ const hi = Q(
|
|
|
2382
2382
|
value: h.any().optional()
|
|
2383
2383
|
}).passthrough()
|
|
2384
2384
|
};
|
|
2385
|
-
function
|
|
2386
|
-
const { interactive: t } =
|
|
2385
|
+
function bi({ context: e }) {
|
|
2386
|
+
const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o } = se(e, "value", {
|
|
2387
2387
|
component: "FileUpload",
|
|
2388
2388
|
changeAction: "change"
|
|
2389
|
-
}), i = e.componentModel.properties, s = E(i.label), a = E(i.accept), l = Array.isArray(i.fileAcceptTypes) ? i.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((p) => p.trim()).filter(Boolean) : void 0, m =
|
|
2389
|
+
}), i = e.componentModel.properties, s = E(i.label), a = E(i.accept), l = Array.isArray(i.fileAcceptTypes) ? i.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((p) => p.trim()).filter(Boolean) : void 0, m = ur(l, c), d = typeof i.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
|
|
2390
2390
|
i.filePlaceholderIcon
|
|
2391
2391
|
) ? i.filePlaceholderIcon : "document", S = typeof i.minCount == "number" ? Math.max(0, i.minCount) : 0, g = typeof i.maxCount == "number" ? i.maxCount : 1, b = g > 0, y = Y(n), k = b && y.length >= g, f = y.length < S;
|
|
2392
2392
|
return /* @__PURE__ */ I("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
|
|
2393
2393
|
s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
|
|
2394
2394
|
/* @__PURE__ */ I(
|
|
2395
|
-
|
|
2395
|
+
Je.Dragger,
|
|
2396
2396
|
{
|
|
2397
2397
|
disabled: !t || k,
|
|
2398
|
-
accept:
|
|
2398
|
+
accept: cr(l, c),
|
|
2399
2399
|
className: "form-file-upload-preview",
|
|
2400
2400
|
showUploadList: t && y.length > 0,
|
|
2401
2401
|
fileList: t ? y.map((p, v) => ({
|
|
@@ -2404,19 +2404,19 @@ function yi({ context: e }) {
|
|
|
2404
2404
|
status: "done"
|
|
2405
2405
|
})) : [],
|
|
2406
2406
|
beforeUpload: (p) => {
|
|
2407
|
-
if (!t) return
|
|
2408
|
-
const v = Y(
|
|
2409
|
-
if (b && v.length >= g) return
|
|
2407
|
+
if (!t) return Je.LIST_IGNORE;
|
|
2408
|
+
const v = Y($t(e));
|
|
2409
|
+
if (b && v.length >= g) return Je.LIST_IGNORE;
|
|
2410
2410
|
const x = b ? [...v, p.name].slice(0, g) : [...v, p.name];
|
|
2411
2411
|
return r(x), !1;
|
|
2412
2412
|
},
|
|
2413
2413
|
onRemove: (p) => {
|
|
2414
|
-
const v = Y(
|
|
2415
|
-
if (
|
|
2416
|
-
r(
|
|
2414
|
+
const v = Y($t(e)), x = /^(\d+)-/.exec(p.uid ?? ""), M = x ? Number(x[1]) : -1, _ = M >= 0 && M < v.length ? v.filter((w, C) => C !== M) : v.filter((w) => w !== p.name);
|
|
2415
|
+
if (_.length < S) return !1;
|
|
2416
|
+
r(_);
|
|
2417
2417
|
},
|
|
2418
2418
|
children: [
|
|
2419
|
-
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(
|
|
2419
|
+
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(ti, { type: d, size: 40 }) }),
|
|
2420
2420
|
/* @__PURE__ */ u("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
|
|
2421
2421
|
]
|
|
2422
2422
|
}
|
|
@@ -2431,21 +2431,21 @@ function yi({ context: e }) {
|
|
|
2431
2431
|
] })
|
|
2432
2432
|
] });
|
|
2433
2433
|
}
|
|
2434
|
-
const
|
|
2435
|
-
|
|
2436
|
-
|
|
2434
|
+
const ki = Q(
|
|
2435
|
+
Si,
|
|
2436
|
+
bi
|
|
2437
2437
|
);
|
|
2438
|
-
function
|
|
2439
|
-
const { interactive: t } =
|
|
2438
|
+
function Ci({ context: e }) {
|
|
2439
|
+
const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o, reportFocus: i } = se(e, "value", {
|
|
2440
2440
|
component: "TextField",
|
|
2441
2441
|
changeAction: "change",
|
|
2442
2442
|
debounceChange: !0
|
|
2443
|
-
}), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), c = E(s.variant) || "shortText", m = E(s.validationRegexp), d = he(n) ?? "", S = !t, [g, b] =
|
|
2443
|
+
}), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), c = E(s.variant) || "shortText", m = E(s.validationRegexp), d = he(n) ?? "", S = !t, [g, b] = R(""), y = (p) => {
|
|
2444
2444
|
if (!m || !p.trim()) {
|
|
2445
2445
|
b("");
|
|
2446
2446
|
return;
|
|
2447
2447
|
}
|
|
2448
|
-
b(
|
|
2448
|
+
b(An(p, m) ? "" : "格式不正确");
|
|
2449
2449
|
};
|
|
2450
2450
|
z(() => {
|
|
2451
2451
|
y(d);
|
|
@@ -2454,7 +2454,7 @@ function Si({ context: e }) {
|
|
|
2454
2454
|
let f;
|
|
2455
2455
|
if (c === "longText")
|
|
2456
2456
|
f = /* @__PURE__ */ u(
|
|
2457
|
-
|
|
2457
|
+
We.TextArea,
|
|
2458
2458
|
{
|
|
2459
2459
|
disabled: S,
|
|
2460
2460
|
className: k,
|
|
@@ -2473,7 +2473,7 @@ function Si({ context: e }) {
|
|
|
2473
2473
|
else if (c === "number") {
|
|
2474
2474
|
const p = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
|
|
2475
2475
|
f = /* @__PURE__ */ u(
|
|
2476
|
-
|
|
2476
|
+
Vn,
|
|
2477
2477
|
{
|
|
2478
2478
|
disabled: S,
|
|
2479
2479
|
className: k,
|
|
@@ -2485,7 +2485,7 @@ function Si({ context: e }) {
|
|
|
2485
2485
|
}
|
|
2486
2486
|
);
|
|
2487
2487
|
} else c === "obscured" ? f = /* @__PURE__ */ u(
|
|
2488
|
-
|
|
2488
|
+
We.Password,
|
|
2489
2489
|
{
|
|
2490
2490
|
disabled: S,
|
|
2491
2491
|
className: k,
|
|
@@ -2495,7 +2495,7 @@ function Si({ context: e }) {
|
|
|
2495
2495
|
onFocus: i
|
|
2496
2496
|
}
|
|
2497
2497
|
) : f = /* @__PURE__ */ u(
|
|
2498
|
-
|
|
2498
|
+
We,
|
|
2499
2499
|
{
|
|
2500
2500
|
disabled: S,
|
|
2501
2501
|
className: k,
|
|
@@ -2516,7 +2516,7 @@ function Si({ context: e }) {
|
|
|
2516
2516
|
g ? /* @__PURE__ */ u(te.Text, { type: "danger", className: "form-block-preview-help", children: g }) : null
|
|
2517
2517
|
] });
|
|
2518
2518
|
}
|
|
2519
|
-
const
|
|
2519
|
+
const Ai = Q(
|
|
2520
2520
|
{
|
|
2521
2521
|
name: "TextField",
|
|
2522
2522
|
schema: h.object({
|
|
@@ -2527,37 +2527,37 @@ const bi = Q(
|
|
|
2527
2527
|
value: h.any().optional()
|
|
2528
2528
|
}).passthrough()
|
|
2529
2529
|
},
|
|
2530
|
-
|
|
2530
|
+
Ci
|
|
2531
2531
|
);
|
|
2532
|
-
function
|
|
2532
|
+
function _i({ context: e }) {
|
|
2533
2533
|
const t = e.componentModel.properties, n = E(t.text), r = E(t.variant) || "body";
|
|
2534
|
-
return
|
|
2534
|
+
return ri.has(r) ? r === "caption" ? /* @__PURE__ */ u(te.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(te.Paragraph, { className: "form-block-preview-paragraph", children: n });
|
|
2535
2535
|
}
|
|
2536
|
-
const
|
|
2536
|
+
const Ti = Q(
|
|
2537
2537
|
{ name: "Text", schema: Ae("Text") },
|
|
2538
|
-
|
|
2538
|
+
_i
|
|
2539
2539
|
);
|
|
2540
|
-
function
|
|
2540
|
+
function In() {
|
|
2541
2541
|
const t = [
|
|
2542
2542
|
...[...Ee.components.values()].filter(
|
|
2543
|
-
(r) => !
|
|
2543
|
+
(r) => !ni.has(r.name)
|
|
2544
2544
|
),
|
|
2545
|
-
ni,
|
|
2546
|
-
li,
|
|
2547
|
-
ri,
|
|
2548
|
-
oi,
|
|
2549
2545
|
ii,
|
|
2550
|
-
|
|
2551
|
-
|
|
2546
|
+
mi,
|
|
2547
|
+
si,
|
|
2548
|
+
ai,
|
|
2549
|
+
li,
|
|
2550
|
+
pi,
|
|
2552
2551
|
hi,
|
|
2553
2552
|
vi,
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2553
|
+
ki,
|
|
2554
|
+
Ai,
|
|
2555
|
+
Ti,
|
|
2556
|
+
...so()
|
|
2557
2557
|
], n = [...Ee.functions.values()];
|
|
2558
|
-
return new
|
|
2558
|
+
return new Wn(Tn, t, n, Ee.themeSchema);
|
|
2559
2559
|
}
|
|
2560
|
-
const
|
|
2560
|
+
const oe = {
|
|
2561
2561
|
jade9: "#29a383",
|
|
2562
2562
|
jade10: "#26997b",
|
|
2563
2563
|
jade11: "#208368",
|
|
@@ -2569,20 +2569,20 @@ const re = {
|
|
|
2569
2569
|
primaryHover: "#26997b",
|
|
2570
2570
|
primaryActive: "#1d3b31",
|
|
2571
2571
|
onPrimary: "#ffffff"
|
|
2572
|
-
},
|
|
2572
|
+
}, xi = {
|
|
2573
2573
|
cssVar: { key: "vidtempl" },
|
|
2574
2574
|
token: {
|
|
2575
|
-
colorPrimary:
|
|
2576
|
-
colorPrimaryHover:
|
|
2577
|
-
colorPrimaryActive:
|
|
2578
|
-
colorLink:
|
|
2579
|
-
colorLinkHover:
|
|
2580
|
-
colorSuccess:
|
|
2575
|
+
colorPrimary: oe.primarySolid,
|
|
2576
|
+
colorPrimaryHover: oe.primaryHover,
|
|
2577
|
+
colorPrimaryActive: oe.primaryActive,
|
|
2578
|
+
colorLink: oe.primary,
|
|
2579
|
+
colorLinkHover: oe.primaryHover,
|
|
2580
|
+
colorSuccess: oe.jade9,
|
|
2581
2581
|
colorWarning: "#f5a623",
|
|
2582
2582
|
gold6: "#f5a623",
|
|
2583
2583
|
gold7: "#e6951a",
|
|
2584
2584
|
colorError: "#e5484d",
|
|
2585
|
-
colorInfo:
|
|
2585
|
+
colorInfo: oe.primary,
|
|
2586
2586
|
colorBgLayout: "#f9f9f9",
|
|
2587
2587
|
colorBgContainer: "#ffffff",
|
|
2588
2588
|
colorBgElevated: "#ffffff",
|
|
@@ -2642,7 +2642,7 @@ const re = {
|
|
|
2642
2642
|
},
|
|
2643
2643
|
Tag: {
|
|
2644
2644
|
defaultBg: "#e6f7ed",
|
|
2645
|
-
defaultColor:
|
|
2645
|
+
defaultColor: oe.primary,
|
|
2646
2646
|
fontSizeSM: 13
|
|
2647
2647
|
},
|
|
2648
2648
|
Form: {
|
|
@@ -2659,9 +2659,9 @@ function ge({
|
|
|
2659
2659
|
locale: t,
|
|
2660
2660
|
theme: n
|
|
2661
2661
|
}) {
|
|
2662
|
-
return /* @__PURE__ */ u(
|
|
2662
|
+
return /* @__PURE__ */ u(jn, { theme: n ?? xi, locale: t, children: e });
|
|
2663
2663
|
}
|
|
2664
|
-
const
|
|
2664
|
+
const Ii = Rn(
|
|
2665
2665
|
function({
|
|
2666
2666
|
doc: t,
|
|
2667
2667
|
surfaceId: n = "skopon-form",
|
|
@@ -2673,12 +2673,12 @@ const _i = Nn(
|
|
|
2673
2673
|
wrapProvider: l = !0
|
|
2674
2674
|
}, c) {
|
|
2675
2675
|
z(() => {
|
|
2676
|
-
|
|
2676
|
+
Zt(), Xt();
|
|
2677
2677
|
}, []);
|
|
2678
|
-
const m =
|
|
2678
|
+
const m = A(null), d = A(i);
|
|
2679
2679
|
d.current = i;
|
|
2680
2680
|
const S = j(() => {
|
|
2681
|
-
if (
|
|
2681
|
+
if (ut(t)) return "";
|
|
2682
2682
|
try {
|
|
2683
2683
|
return JSON.stringify(t);
|
|
2684
2684
|
} catch {
|
|
@@ -2688,9 +2688,9 @@ const _i = Nn(
|
|
|
2688
2688
|
if (!S)
|
|
2689
2689
|
return { surfaces: [], processor: null };
|
|
2690
2690
|
try {
|
|
2691
|
-
const f = JSON.parse(S), p = new
|
|
2691
|
+
const f = JSON.parse(S), p = new Qt([In()]), v = vo(f, {
|
|
2692
2692
|
surfaceId: n,
|
|
2693
|
-
catalogId:
|
|
2693
|
+
catalogId: Tn
|
|
2694
2694
|
});
|
|
2695
2695
|
return p.processMessages(v), {
|
|
2696
2696
|
surfaces: Array.from(p.model.surfacesMap.values()),
|
|
@@ -2700,14 +2700,14 @@ const _i = Nn(
|
|
|
2700
2700
|
return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", f), { surfaces: [], processor: null };
|
|
2701
2701
|
}
|
|
2702
2702
|
}, [S, n]), { surfaces: b, processor: y } = g;
|
|
2703
|
-
if (m.current = y,
|
|
2703
|
+
if (m.current = y, wn(
|
|
2704
2704
|
c,
|
|
2705
2705
|
() => ({
|
|
2706
2706
|
getValues(f) {
|
|
2707
2707
|
const p = m.current;
|
|
2708
2708
|
if (!p) return {};
|
|
2709
2709
|
const v = (f ?? d.current).map((x) => x.trim()).filter(Boolean);
|
|
2710
|
-
return
|
|
2710
|
+
return Co(p, n, v);
|
|
2711
2711
|
},
|
|
2712
2712
|
setValues(f) {
|
|
2713
2713
|
const p = m.current;
|
|
@@ -2715,24 +2715,24 @@ const _i = Nn(
|
|
|
2715
2715
|
const v = p.model.surfacesMap.get(n);
|
|
2716
2716
|
if (v)
|
|
2717
2717
|
for (const [x, M] of Object.entries(f)) {
|
|
2718
|
-
const
|
|
2719
|
-
|
|
2718
|
+
const _ = x.trim();
|
|
2719
|
+
_ && v.dataModel.set(`/${_}`, M);
|
|
2720
2720
|
}
|
|
2721
2721
|
}
|
|
2722
2722
|
}),
|
|
2723
2723
|
[n]
|
|
2724
2724
|
), b.length === 0) {
|
|
2725
|
-
const f = /* @__PURE__ */ u(
|
|
2725
|
+
const f = /* @__PURE__ */ u(at, { resumeSearch: s, children: /* @__PURE__ */ u(st, { caseSearch: a, children: /* @__PURE__ */ u(it, { interactive: o, children: r }) }) });
|
|
2726
2726
|
return l ? /* @__PURE__ */ u(ge, { children: f }) : f;
|
|
2727
2727
|
}
|
|
2728
|
-
const k = /* @__PURE__ */ u(
|
|
2728
|
+
const k = /* @__PURE__ */ u(at, { resumeSearch: s, children: /* @__PURE__ */ u(st, { caseSearch: a, children: /* @__PURE__ */ u(it, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: b.map((f) => /* @__PURE__ */ u(Yt, { surface: f }, f.id)) }) }) }) });
|
|
2729
2729
|
return l ? /* @__PURE__ */ u(ge, { children: k }) : k;
|
|
2730
2730
|
}
|
|
2731
2731
|
);
|
|
2732
|
-
function
|
|
2733
|
-
return new
|
|
2732
|
+
function Fe() {
|
|
2733
|
+
return new Qt([In()]);
|
|
2734
2734
|
}
|
|
2735
|
-
function
|
|
2735
|
+
function as({
|
|
2736
2736
|
messages: e,
|
|
2737
2737
|
surfaceId: t = "skopon-form-stream",
|
|
2738
2738
|
emptyHint: n = null,
|
|
@@ -2741,11 +2741,11 @@ function os({
|
|
|
2741
2741
|
caseSearch: i = null
|
|
2742
2742
|
}) {
|
|
2743
2743
|
z(() => {
|
|
2744
|
-
|
|
2744
|
+
Zt(), Xt();
|
|
2745
2745
|
}, []);
|
|
2746
|
-
const s =
|
|
2747
|
-
s.current === null && (s.current =
|
|
2748
|
-
const a =
|
|
2746
|
+
const s = A(null);
|
|
2747
|
+
s.current === null && (s.current = Fe());
|
|
2748
|
+
const a = A(0), l = A(""), c = A(!0), m = A(t);
|
|
2749
2749
|
function d(f, p) {
|
|
2750
2750
|
s.current = f, a.current = p.length, l.current = JSON.stringify(p), c.current && (b(f), k(Array.from(f.model.surfacesMap.values())));
|
|
2751
2751
|
}
|
|
@@ -2760,9 +2760,9 @@ function os({
|
|
|
2760
2760
|
return !0;
|
|
2761
2761
|
}
|
|
2762
2762
|
}
|
|
2763
|
-
const [g, b] =
|
|
2763
|
+
const [g, b] = R(
|
|
2764
2764
|
() => s.current
|
|
2765
|
-
), [y, k] =
|
|
2765
|
+
), [y, k] = R(
|
|
2766
2766
|
() => Array.from(
|
|
2767
2767
|
s.current.model.surfacesMap.values()
|
|
2768
2768
|
)
|
|
@@ -2782,15 +2782,15 @@ function os({
|
|
|
2782
2782
|
let f = !1;
|
|
2783
2783
|
const p = m.current !== t;
|
|
2784
2784
|
if (m.current = t, p) {
|
|
2785
|
-
const
|
|
2786
|
-
return Array.isArray(e) && e.length > 0 ? (
|
|
2785
|
+
const _ = Fe();
|
|
2786
|
+
return Array.isArray(e) && e.length > 0 ? (_.processMessages(e), f || d(_, e)) : (s.current = _, a.current = 0, l.current = "", f || (b(_), k([]))), () => {
|
|
2787
2787
|
f = !0;
|
|
2788
2788
|
};
|
|
2789
2789
|
}
|
|
2790
2790
|
if (!Array.isArray(e) || e.length === 0) {
|
|
2791
2791
|
if (a.current > 0) {
|
|
2792
|
-
const
|
|
2793
|
-
s.current =
|
|
2792
|
+
const _ = Fe();
|
|
2793
|
+
s.current = _, a.current = 0, l.current = "", f || (b(_), k([]));
|
|
2794
2794
|
}
|
|
2795
2795
|
return () => {
|
|
2796
2796
|
f = !0;
|
|
@@ -2798,8 +2798,8 @@ function os({
|
|
|
2798
2798
|
}
|
|
2799
2799
|
const v = s.current, x = a.current;
|
|
2800
2800
|
if (e.length < x || S(e, x)) {
|
|
2801
|
-
const
|
|
2802
|
-
return
|
|
2801
|
+
const _ = Fe();
|
|
2802
|
+
return _.processMessages(e), f || d(_, e), () => {
|
|
2803
2803
|
f = !0;
|
|
2804
2804
|
};
|
|
2805
2805
|
}
|
|
@@ -2809,15 +2809,15 @@ function os({
|
|
|
2809
2809
|
} : (v.processMessages(M), a.current = e.length, l.current = JSON.stringify(e), f || k(Array.from(v.model.surfacesMap.values())), () => {
|
|
2810
2810
|
f = !0;
|
|
2811
2811
|
});
|
|
2812
|
-
}, [e, t]), y.length === 0 ? /* @__PURE__ */ u(ge, { children: n }) : /* @__PURE__ */ u(ge, { children: /* @__PURE__ */ u(
|
|
2812
|
+
}, [e, t]), y.length === 0 ? /* @__PURE__ */ u(ge, { children: n }) : /* @__PURE__ */ u(ge, { children: /* @__PURE__ */ u(at, { resumeSearch: o, children: /* @__PURE__ */ u(st, { caseSearch: i, children: /* @__PURE__ */ u(it, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: y.map((f) => /* @__PURE__ */ u(Yt, { surface: f }, f.id)) }) }) }) }) });
|
|
2813
2813
|
}
|
|
2814
|
-
const
|
|
2815
|
-
function
|
|
2814
|
+
const Mi = 100, Ni = 3e4, Fi = 1500, ce = /* @__PURE__ */ new Map();
|
|
2815
|
+
function Ei(e) {
|
|
2816
2816
|
const t = e.trim();
|
|
2817
|
-
let n =
|
|
2818
|
-
return n || (n = new
|
|
2817
|
+
let n = ce.get(t);
|
|
2818
|
+
return n || (n = new Ui(t), ce.set(t, n)), n.acquire(), n;
|
|
2819
2819
|
}
|
|
2820
|
-
class
|
|
2820
|
+
class Ui {
|
|
2821
2821
|
constructor(t) {
|
|
2822
2822
|
G(this, "url");
|
|
2823
2823
|
G(this, "ws", null);
|
|
@@ -2835,12 +2835,12 @@ class Fi {
|
|
|
2835
2835
|
}
|
|
2836
2836
|
release() {
|
|
2837
2837
|
this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
|
|
2838
|
-
this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(),
|
|
2839
|
-
},
|
|
2838
|
+
this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), ce.get(this.url) === this && ce.delete(this.url));
|
|
2839
|
+
}, Fi));
|
|
2840
2840
|
}
|
|
2841
2841
|
/** 强制关闭(测试用),跳过宽限期。 */
|
|
2842
2842
|
forceClose() {
|
|
2843
|
-
this.refCount = 0, this.teardown(),
|
|
2843
|
+
this.refCount = 0, this.teardown(), ce.get(this.url) === this && ce.delete(this.url);
|
|
2844
2844
|
}
|
|
2845
2845
|
subscribe(t, n) {
|
|
2846
2846
|
const r = t.trim();
|
|
@@ -2909,7 +2909,7 @@ class Fi {
|
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
2911
2911
|
enqueue(t) {
|
|
2912
|
-
for (this.sendQueue.push(t); this.sendQueue.length >
|
|
2912
|
+
for (this.sendQueue.push(t); this.sendQueue.length > Mi; )
|
|
2913
2913
|
this.sendQueue.shift();
|
|
2914
2914
|
}
|
|
2915
2915
|
flushQueue() {
|
|
@@ -2923,7 +2923,7 @@ class Fi {
|
|
|
2923
2923
|
if (!this.connectRequested || this.refCount <= 0) return;
|
|
2924
2924
|
this.clearReconnectTimer();
|
|
2925
2925
|
const t = Math.min(
|
|
2926
|
-
|
|
2926
|
+
Ni,
|
|
2927
2927
|
1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
|
|
2928
2928
|
);
|
|
2929
2929
|
this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
|
|
@@ -2961,13 +2961,13 @@ class Fi {
|
|
|
2961
2961
|
}
|
|
2962
2962
|
}
|
|
2963
2963
|
}
|
|
2964
|
-
class
|
|
2964
|
+
class Ri {
|
|
2965
2965
|
constructor(t) {
|
|
2966
2966
|
G(this, "askUserMessageId");
|
|
2967
2967
|
G(this, "connection");
|
|
2968
2968
|
G(this, "unsubscribe");
|
|
2969
2969
|
G(this, "closed", !1);
|
|
2970
|
-
this.askUserMessageId = t.askUserMessageId.trim(), this.connection =
|
|
2970
|
+
this.askUserMessageId = t.askUserMessageId.trim(), this.connection = Ei(t.url);
|
|
2971
2971
|
const n = t.onAutoControl;
|
|
2972
2972
|
this.unsubscribe = n ? this.connection.subscribe(this.askUserMessageId, n) : () => {
|
|
2973
2973
|
};
|
|
@@ -2982,24 +2982,24 @@ class Ni {
|
|
|
2982
2982
|
this.closed || (this.closed = !0, this.unsubscribe(), this.connection.release());
|
|
2983
2983
|
}
|
|
2984
2984
|
}
|
|
2985
|
-
function
|
|
2985
|
+
function Mn(e) {
|
|
2986
2986
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
2987
2987
|
}
|
|
2988
|
-
function
|
|
2988
|
+
function wi(e, t) {
|
|
2989
2989
|
if (!e) return !1;
|
|
2990
|
-
const n = e.querySelector(`[data-skopon-field="${
|
|
2990
|
+
const n = e.querySelector(`[data-skopon-field="${Mn(t)}"]`);
|
|
2991
2991
|
return n instanceof HTMLElement ? ((n.querySelector(
|
|
2992
2992
|
'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
|
|
2993
2993
|
) ?? n).focus(), !0) : !1;
|
|
2994
2994
|
}
|
|
2995
|
-
function
|
|
2995
|
+
function Pi(e, t) {
|
|
2996
2996
|
if (!e) return !1;
|
|
2997
|
-
const n = e.querySelector(`[data-skopon-field="${
|
|
2997
|
+
const n = e.querySelector(`[data-skopon-field="${Mn(t)}"]`);
|
|
2998
2998
|
return n instanceof HTMLElement ? ((n.querySelector(
|
|
2999
2999
|
'button, [role="button"], .skopon-resume-select-card, input, label'
|
|
3000
3000
|
) ?? n).click(), !0) : !1;
|
|
3001
3001
|
}
|
|
3002
|
-
function
|
|
3002
|
+
function zi(e, t, n) {
|
|
3003
3003
|
const r = e.action;
|
|
3004
3004
|
if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
|
|
3005
3005
|
console.warn("[FormAutoControl] unknown action", r);
|
|
@@ -3029,47 +3029,47 @@ function Ri(e, t, n) {
|
|
|
3029
3029
|
return;
|
|
3030
3030
|
}
|
|
3031
3031
|
if (r === "focus") {
|
|
3032
|
-
|
|
3032
|
+
wi(t.rootElement, o), n.reportEvent({
|
|
3033
3033
|
action: "focus",
|
|
3034
3034
|
component: i,
|
|
3035
3035
|
field: o
|
|
3036
3036
|
});
|
|
3037
3037
|
return;
|
|
3038
3038
|
}
|
|
3039
|
-
|
|
3039
|
+
Pi(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
|
|
3040
3040
|
});
|
|
3041
3041
|
}
|
|
3042
|
-
function
|
|
3042
|
+
function Oi(e) {
|
|
3043
3043
|
const t = {};
|
|
3044
3044
|
for (const [n, r] of Object.entries(e))
|
|
3045
3045
|
r !== void 0 && (t[n] = r);
|
|
3046
3046
|
return t;
|
|
3047
3047
|
}
|
|
3048
|
-
function
|
|
3048
|
+
function qi(e, t) {
|
|
3049
3049
|
var o;
|
|
3050
3050
|
const n = (o = e.name) == null ? void 0 : o.trim();
|
|
3051
3051
|
if (!n || !t) return { ...e };
|
|
3052
3052
|
const r = t.get(n);
|
|
3053
3053
|
return r ? e.type !== "resume_multiselect" && e.type !== "case_multiselect" ? { ...e } : { ...e, options: r.map((i) => ({ ...i })) } : { ...e };
|
|
3054
3054
|
}
|
|
3055
|
-
function
|
|
3055
|
+
function Bi(e) {
|
|
3056
3056
|
var i, s;
|
|
3057
3057
|
const n = {
|
|
3058
3058
|
blocks: (e.blocks ?? []).map(
|
|
3059
|
-
(a) =>
|
|
3059
|
+
(a) => qi(a, e.liveOptions)
|
|
3060
3060
|
)
|
|
3061
3061
|
}, r = (i = e.title) == null ? void 0 : i.trim(), o = (s = e.description) == null ? void 0 : s.trim();
|
|
3062
3062
|
return r && (n.title = r), o && (n.description = o), {
|
|
3063
3063
|
form_schema: n,
|
|
3064
|
-
form_values:
|
|
3064
|
+
form_values: Oi(e.values ?? {}),
|
|
3065
3065
|
form_change: [...e.formChange ?? []]
|
|
3066
3066
|
};
|
|
3067
3067
|
}
|
|
3068
|
-
function
|
|
3068
|
+
function Li(e) {
|
|
3069
3069
|
const t = Be(e);
|
|
3070
|
-
return t ?
|
|
3070
|
+
return t ? yt(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
3071
3071
|
}
|
|
3072
|
-
function
|
|
3072
|
+
function Vi({
|
|
3073
3073
|
payload: e,
|
|
3074
3074
|
callbackUrl: t,
|
|
3075
3075
|
title: n,
|
|
@@ -3079,15 +3079,15 @@ function qi({
|
|
|
3079
3079
|
submitHeaders: s,
|
|
3080
3080
|
onNotify: a
|
|
3081
3081
|
}) {
|
|
3082
|
-
const [l, c] =
|
|
3082
|
+
const [l, c] = R(!1), m = A(!0);
|
|
3083
3083
|
z(() => (m.current = !0, () => {
|
|
3084
3084
|
m.current = !1;
|
|
3085
3085
|
}), []);
|
|
3086
3086
|
const d = j(
|
|
3087
|
-
() =>
|
|
3087
|
+
() => At(s),
|
|
3088
3088
|
[s]
|
|
3089
3089
|
), S = j(
|
|
3090
|
-
() =>
|
|
3090
|
+
() => yn(e, t, d),
|
|
3091
3091
|
[e, t, d]
|
|
3092
3092
|
), g = j(
|
|
3093
3093
|
() => ({
|
|
@@ -3100,15 +3100,15 @@ function qi({
|
|
|
3100
3100
|
if (!l) {
|
|
3101
3101
|
c(!0);
|
|
3102
3102
|
try {
|
|
3103
|
-
const y =
|
|
3103
|
+
const y = Li(e), k = Tt({
|
|
3104
3104
|
context: g,
|
|
3105
3105
|
payload: e,
|
|
3106
3106
|
answer: y
|
|
3107
|
-
}), f = await
|
|
3107
|
+
}), f = await Cn(k, {
|
|
3108
3108
|
headers: d
|
|
3109
3109
|
});
|
|
3110
3110
|
if (!m.current) return;
|
|
3111
|
-
const p =
|
|
3111
|
+
const p = kn(f);
|
|
3112
3112
|
a == null || a(p.type, p.message);
|
|
3113
3113
|
} catch (y) {
|
|
3114
3114
|
if (!m.current) return;
|
|
@@ -3141,8 +3141,8 @@ function qi({
|
|
|
3141
3141
|
/* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children: S })
|
|
3142
3142
|
] });
|
|
3143
3143
|
}
|
|
3144
|
-
const
|
|
3145
|
-
function
|
|
3144
|
+
const ji = 80;
|
|
3145
|
+
function $i(e, t) {
|
|
3146
3146
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
3147
3147
|
const n = t.message;
|
|
3148
3148
|
if (typeof n == "string" && n.trim())
|
|
@@ -3150,7 +3150,7 @@ function Li(e, t) {
|
|
|
3150
3150
|
}
|
|
3151
3151
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
3152
3152
|
}
|
|
3153
|
-
function
|
|
3153
|
+
function Di({
|
|
3154
3154
|
payload: e,
|
|
3155
3155
|
formUniqueId: t,
|
|
3156
3156
|
askUserMessageId: n,
|
|
@@ -3165,10 +3165,10 @@ function Vi({
|
|
|
3165
3165
|
onSurfaceReadyChange: d,
|
|
3166
3166
|
onAutoControlReady: S
|
|
3167
3167
|
}) {
|
|
3168
|
-
const [g, b] =
|
|
3168
|
+
const [g, b] = R(null), [y, k] = R(!1), [f, p] = R(!0), [v, x] = R(!1), M = A(null), _ = A(null), w = A(!0), C = A(l);
|
|
3169
3169
|
C.current = l;
|
|
3170
|
-
const O =
|
|
3171
|
-
() =>
|
|
3170
|
+
const O = on(), B = ht(), ne = A(""), K = A(null), D = (t == null ? void 0 : t.trim()) ?? "", J = (n == null ? void 0 : n.trim()) ?? "", Z = j(
|
|
3171
|
+
() => At(s),
|
|
3172
3172
|
[s]
|
|
3173
3173
|
), ee = j(
|
|
3174
3174
|
() => ({
|
|
@@ -3177,156 +3177,150 @@ function Vi({
|
|
|
3177
3177
|
}),
|
|
3178
3178
|
[i, r]
|
|
3179
3179
|
);
|
|
3180
|
-
z(() => (
|
|
3181
|
-
|
|
3180
|
+
z(() => (w.current = !0, () => {
|
|
3181
|
+
w.current = !1, K.current != null && (clearTimeout(K.current), K.current = null);
|
|
3182
3182
|
}), []), z(() => {
|
|
3183
|
-
let
|
|
3184
|
-
return D ? (p(!0), k(!1), a({ formUniqueId: D }).then((
|
|
3185
|
-
|
|
3186
|
-
}).catch((
|
|
3183
|
+
let U = !1;
|
|
3184
|
+
return D ? (p(!0), k(!1), a({ formUniqueId: D }).then((q) => {
|
|
3185
|
+
U || (k(!!q.disabled), b(q.formDefinition ?? null));
|
|
3186
|
+
}).catch((q) => {
|
|
3187
3187
|
var X;
|
|
3188
|
-
if (!
|
|
3188
|
+
if (!U) {
|
|
3189
3189
|
k(!1), b(null);
|
|
3190
|
-
const xe =
|
|
3190
|
+
const xe = q instanceof Error ? q.message : "获取表单定义失败";
|
|
3191
3191
|
(X = C.current) == null || X.call(C, "error", xe);
|
|
3192
3192
|
}
|
|
3193
3193
|
}).finally(() => {
|
|
3194
|
-
|
|
3194
|
+
U || p(!1);
|
|
3195
3195
|
}), () => {
|
|
3196
|
-
|
|
3196
|
+
U = !0;
|
|
3197
3197
|
}) : (p(!1), k(!1), b(null), () => {
|
|
3198
|
-
|
|
3198
|
+
U = !0;
|
|
3199
3199
|
});
|
|
3200
3200
|
}, [D, a]);
|
|
3201
|
-
const
|
|
3202
|
-
() => V ? {} :
|
|
3201
|
+
const F = j(() => Be(e), [e]), L = j(() => F ? xo(F, g ?? void 0) : null, [F, g]), T = (L == null ? void 0 : L.matchedBlocks) ?? [], V = !!(F && Mo(F) && T.length === 0), P = j(() => V && F ? No(F) : L && L.renderBlocks.length > 0 ? L.renderBlocks : [], [L, V, F]), N = j(
|
|
3202
|
+
() => V ? {} : yt((L == null ? void 0 : L.extraBlocks) ?? []),
|
|
3203
3203
|
[V, L]
|
|
3204
|
-
), W = j(() => V &&
|
|
3205
|
-
var
|
|
3206
|
-
return (
|
|
3207
|
-
}).map((
|
|
3204
|
+
), W = j(() => V && F ? Fo(F) : P.filter((U) => {
|
|
3205
|
+
var q;
|
|
3206
|
+
return (q = U.name) == null ? void 0 : q.trim();
|
|
3207
|
+
}).map((U) => U.name.trim()), [V, F, P]), _e = (L == null ? void 0 : L.title) ?? (F == null ? void 0 : F.title) ?? "", Te = (L == null ? void 0 : L.description) ?? (F == null ? void 0 : F.description) ?? "", le = j(() => P.length === 0 ? null : bo(
|
|
3208
3208
|
{ title: _e, description: Te },
|
|
3209
|
-
|
|
3210
|
-
), [_e, Te,
|
|
3211
|
-
if (!
|
|
3209
|
+
P
|
|
3210
|
+
), [_e, Te, P]), je = j(() => {
|
|
3211
|
+
if (!le) return "";
|
|
3212
3212
|
try {
|
|
3213
|
-
return JSON.stringify(
|
|
3213
|
+
return JSON.stringify(le);
|
|
3214
3214
|
} catch {
|
|
3215
|
-
return String(
|
|
3215
|
+
return String(le);
|
|
3216
3216
|
}
|
|
3217
|
-
}, [
|
|
3218
|
-
z(() => (d(
|
|
3219
|
-
const
|
|
3220
|
-
var
|
|
3221
|
-
return { ...((
|
|
3222
|
-
}, [W,
|
|
3223
|
-
|
|
3224
|
-
|
|
3217
|
+
}, [le]), $e = D ? `ask-user-${D}` : "ask-user-payload", re = !!(!f && F && P.length > 0 && le);
|
|
3218
|
+
z(() => (d(re), () => d(!1)), [re, d]);
|
|
3219
|
+
const It = $(() => {
|
|
3220
|
+
var q;
|
|
3221
|
+
return { ...((q = M.current) == null ? void 0 : q.getValues(W)) ?? {}, ...N };
|
|
3222
|
+
}, [W, N]), Mt = A(B.liveOptions);
|
|
3223
|
+
Mt.current = B.liveOptions;
|
|
3224
|
+
const De = A(B.pendingChangeFields);
|
|
3225
|
+
De.current = B.pendingChangeFields;
|
|
3226
|
+
const me = $(
|
|
3227
|
+
(U) => {
|
|
3228
|
+
const q = Bi({
|
|
3225
3229
|
title: _e,
|
|
3226
3230
|
description: Te,
|
|
3227
|
-
blocks:
|
|
3228
|
-
values:
|
|
3229
|
-
liveOptions:
|
|
3230
|
-
formChange:
|
|
3231
|
+
blocks: P,
|
|
3232
|
+
values: It(),
|
|
3233
|
+
liveOptions: Mt.current,
|
|
3234
|
+
formChange: U
|
|
3231
3235
|
});
|
|
3232
|
-
O.reportData(
|
|
3236
|
+
O.reportData(q);
|
|
3233
3237
|
},
|
|
3234
|
-
[
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
if (le.current === P) return;
|
|
3247
|
-
le.current = P;
|
|
3248
|
-
const B = setTimeout(() => {
|
|
3249
|
-
R.current && se([]);
|
|
3238
|
+
[_e, Te, P, It, O]
|
|
3239
|
+
), He = A(me);
|
|
3240
|
+
He.current = me, z(() => {
|
|
3241
|
+
if (!re) {
|
|
3242
|
+
ne.current = "";
|
|
3243
|
+
return;
|
|
3244
|
+
}
|
|
3245
|
+
if (!je) return;
|
|
3246
|
+
const U = `${$e}::${je}`;
|
|
3247
|
+
if (ne.current === U) return;
|
|
3248
|
+
const q = setTimeout(() => {
|
|
3249
|
+
w.current && ne.current !== U && (ne.current = U, He.current([]));
|
|
3250
3250
|
}, 0);
|
|
3251
|
-
return () => clearTimeout(
|
|
3252
|
-
}, [
|
|
3253
|
-
if (!(!
|
|
3251
|
+
return () => clearTimeout(q);
|
|
3252
|
+
}, [re, $e, je]), z(() => {
|
|
3253
|
+
if (!(!re || B.version === 0) && De.current.length !== 0)
|
|
3254
3254
|
return K.current != null && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
3255
|
-
if (K.current = null, !
|
|
3256
|
-
const
|
|
3257
|
-
|
|
3258
|
-
},
|
|
3255
|
+
if (K.current = null, !w.current) return;
|
|
3256
|
+
const U = [...De.current];
|
|
3257
|
+
B.clearPendingChangeFields(), U.length !== 0 && He.current(U);
|
|
3258
|
+
}, ji), () => {
|
|
3259
3259
|
K.current != null && (clearTimeout(K.current), K.current = null);
|
|
3260
3260
|
};
|
|
3261
|
-
}, [
|
|
3262
|
-
|
|
3263
|
-
q
|
|
3264
|
-
q.pendingChangeFields,
|
|
3265
|
-
q.clearPendingChangeFields,
|
|
3266
|
-
se
|
|
3267
|
-
]);
|
|
3268
|
-
const De = $(async () => {
|
|
3269
|
-
var P, B, X, xe, Mt, Ft, Nt, Et;
|
|
3261
|
+
}, [re, B.version, B.clearPendingChangeFields]);
|
|
3262
|
+
const Ke = $(async () => {
|
|
3263
|
+
var U, q, X, xe, Et, Ut, Rt, wt;
|
|
3270
3264
|
if (!v) {
|
|
3271
3265
|
x(!0);
|
|
3272
3266
|
try {
|
|
3273
|
-
const de = ((
|
|
3267
|
+
const de = ((U = M.current) == null ? void 0 : U.getValues(W)) ?? {}, Ie = Zo(P, de);
|
|
3274
3268
|
if (Ie) {
|
|
3275
|
-
(
|
|
3269
|
+
(q = C.current) == null || q.call(C, "error", Ie.message);
|
|
3276
3270
|
return;
|
|
3277
3271
|
}
|
|
3278
|
-
const
|
|
3272
|
+
const Pt = { ...de, ...N };
|
|
3279
3273
|
if (o === "post") {
|
|
3280
|
-
const
|
|
3281
|
-
if (!
|
|
3274
|
+
const Bt = (r ?? "").trim();
|
|
3275
|
+
if (!Bt) {
|
|
3282
3276
|
(X = C.current) == null || X.call(C, "error", "callback_url 为空,无法提交");
|
|
3283
3277
|
return;
|
|
3284
3278
|
}
|
|
3285
|
-
|
|
3279
|
+
me([]), O.reportEvent({
|
|
3286
3280
|
action: "submit",
|
|
3287
3281
|
component: "SubmitButton"
|
|
3288
3282
|
});
|
|
3289
|
-
const
|
|
3283
|
+
const Ge = await vn(Bt, Pt, {
|
|
3290
3284
|
headers: Z
|
|
3291
3285
|
});
|
|
3292
|
-
if (!
|
|
3293
|
-
|
|
3286
|
+
if (!w.current) return;
|
|
3287
|
+
Ge.ok ? (xe = C.current) == null || xe.call(C, "success", "提交成功") : (Et = C.current) == null || Et.call(C, "error", $i(Ge.status, Ge.body));
|
|
3294
3288
|
return;
|
|
3295
3289
|
}
|
|
3296
|
-
const
|
|
3290
|
+
const zt = Tt({
|
|
3297
3291
|
context: ee,
|
|
3298
3292
|
payload: e,
|
|
3299
|
-
form: g ??
|
|
3300
|
-
answer:
|
|
3301
|
-
}),
|
|
3302
|
-
if (
|
|
3303
|
-
(
|
|
3293
|
+
form: g ?? F,
|
|
3294
|
+
answer: Pt
|
|
3295
|
+
}), Ot = xt(zt);
|
|
3296
|
+
if (Ot) {
|
|
3297
|
+
(Ut = C.current) == null || Ut.call(C, "error", Ot);
|
|
3304
3298
|
return;
|
|
3305
3299
|
}
|
|
3306
|
-
|
|
3300
|
+
me([]), O.reportEvent({
|
|
3307
3301
|
action: "submit",
|
|
3308
3302
|
component: "SubmitButton"
|
|
3309
3303
|
});
|
|
3310
|
-
const
|
|
3304
|
+
const Nn = await Cn(zt, {
|
|
3311
3305
|
headers: Z
|
|
3312
3306
|
});
|
|
3313
|
-
if (!
|
|
3314
|
-
const
|
|
3315
|
-
(
|
|
3307
|
+
if (!w.current) return;
|
|
3308
|
+
const qt = kn(Nn);
|
|
3309
|
+
(Rt = C.current) == null || Rt.call(C, qt.type, qt.message);
|
|
3316
3310
|
} catch (de) {
|
|
3317
|
-
if (!
|
|
3311
|
+
if (!w.current) return;
|
|
3318
3312
|
const Ie = de instanceof Error ? de.message : "提交失败";
|
|
3319
|
-
(
|
|
3313
|
+
(wt = C.current) == null || wt.call(C, "error", Ie);
|
|
3320
3314
|
} finally {
|
|
3321
|
-
|
|
3315
|
+
w.current && x(!1);
|
|
3322
3316
|
}
|
|
3323
3317
|
}
|
|
3324
3318
|
}, [
|
|
3325
3319
|
v,
|
|
3326
3320
|
W,
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3321
|
+
P,
|
|
3322
|
+
N,
|
|
3323
|
+
me,
|
|
3330
3324
|
O,
|
|
3331
3325
|
o,
|
|
3332
3326
|
r,
|
|
@@ -3334,24 +3328,24 @@ function Vi({
|
|
|
3334
3328
|
ee,
|
|
3335
3329
|
e,
|
|
3336
3330
|
g,
|
|
3337
|
-
|
|
3338
|
-
]),
|
|
3339
|
-
|
|
3340
|
-
const
|
|
3341
|
-
(
|
|
3342
|
-
|
|
3343
|
-
|
|
3331
|
+
F
|
|
3332
|
+
]), Nt = A(Ke);
|
|
3333
|
+
Nt.current = Ke;
|
|
3334
|
+
const Ft = $(
|
|
3335
|
+
(U) => {
|
|
3336
|
+
zi(
|
|
3337
|
+
U,
|
|
3344
3338
|
{
|
|
3345
|
-
setValues: (
|
|
3339
|
+
setValues: (q) => {
|
|
3346
3340
|
var X;
|
|
3347
|
-
return (X = M.current) == null ? void 0 : X.setValues(
|
|
3341
|
+
return (X = M.current) == null ? void 0 : X.setValues(q);
|
|
3348
3342
|
},
|
|
3349
|
-
getValues: (
|
|
3343
|
+
getValues: (q) => {
|
|
3350
3344
|
var X;
|
|
3351
|
-
return ((X = M.current) == null ? void 0 : X.getValues(
|
|
3345
|
+
return ((X = M.current) == null ? void 0 : X.getValues(q)) ?? {};
|
|
3352
3346
|
},
|
|
3353
|
-
submit: () =>
|
|
3354
|
-
rootElement:
|
|
3347
|
+
submit: () => Nt.current(),
|
|
3348
|
+
rootElement: _.current
|
|
3355
3349
|
},
|
|
3356
3350
|
{
|
|
3357
3351
|
reportEvent: O.reportEvent,
|
|
@@ -3362,13 +3356,13 @@ function Vi({
|
|
|
3362
3356
|
[O]
|
|
3363
3357
|
);
|
|
3364
3358
|
return z(() => {
|
|
3365
|
-
if (!
|
|
3359
|
+
if (!re) {
|
|
3366
3360
|
S(null);
|
|
3367
3361
|
return;
|
|
3368
3362
|
}
|
|
3369
|
-
return S(
|
|
3370
|
-
}, [
|
|
3371
|
-
|
|
3363
|
+
return S(Ft), () => S(null);
|
|
3364
|
+
}, [re, Ft, S]), f ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(mt, { size: "small" }) }) : !F || P.length === 0 ? /* @__PURE__ */ u(
|
|
3365
|
+
Vi,
|
|
3372
3366
|
{
|
|
3373
3367
|
payload: e,
|
|
3374
3368
|
callbackUrl: r,
|
|
@@ -3381,15 +3375,15 @@ function Vi({
|
|
|
3381
3375
|
"div",
|
|
3382
3376
|
{
|
|
3383
3377
|
className: "ask-user-form-card",
|
|
3384
|
-
ref:
|
|
3378
|
+
ref: _,
|
|
3385
3379
|
"data-ask-user-message-id": J || void 0,
|
|
3386
3380
|
children: [
|
|
3387
3381
|
y && D ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(pe, { title: D, children: /* @__PURE__ */ u(fe, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
|
|
3388
3382
|
/* @__PURE__ */ u(
|
|
3389
|
-
|
|
3383
|
+
Ii,
|
|
3390
3384
|
{
|
|
3391
3385
|
ref: M,
|
|
3392
|
-
doc:
|
|
3386
|
+
doc: le,
|
|
3393
3387
|
surfaceId: $e,
|
|
3394
3388
|
fieldNames: W,
|
|
3395
3389
|
interactive: !0,
|
|
@@ -3409,7 +3403,7 @@ function Vi({
|
|
|
3409
3403
|
size: "small",
|
|
3410
3404
|
loading: v,
|
|
3411
3405
|
disabled: v,
|
|
3412
|
-
onClick: () => void
|
|
3406
|
+
onClick: () => void Ke(),
|
|
3413
3407
|
children: "提交"
|
|
3414
3408
|
}
|
|
3415
3409
|
)
|
|
@@ -3419,16 +3413,16 @@ function Vi({
|
|
|
3419
3413
|
}
|
|
3420
3414
|
);
|
|
3421
3415
|
}
|
|
3422
|
-
function
|
|
3416
|
+
function ls(e) {
|
|
3423
3417
|
var c;
|
|
3424
|
-
const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = j(() =>
|
|
3418
|
+
const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = j(() => Bo(), []), [r, o] = R(!1), i = A(null), s = $((m) => {
|
|
3425
3419
|
o(m);
|
|
3426
3420
|
}, []), a = $(
|
|
3427
3421
|
(m) => {
|
|
3428
3422
|
i.current = m;
|
|
3429
3423
|
},
|
|
3430
3424
|
[]
|
|
3431
|
-
), l = j(() => !n || !t ? null : new
|
|
3425
|
+
), l = j(() => !n || !t ? null : new Ri({
|
|
3432
3426
|
url: n,
|
|
3433
3427
|
askUserMessageId: t,
|
|
3434
3428
|
onAutoControl: (m) => {
|
|
@@ -3443,8 +3437,8 @@ function is(e) {
|
|
|
3443
3437
|
};
|
|
3444
3438
|
}, [l]), z(() => {
|
|
3445
3439
|
!l || !r || l.connect();
|
|
3446
|
-
}, [l, r]), /* @__PURE__ */ u(ge, { children: /* @__PURE__ */ u(
|
|
3447
|
-
|
|
3440
|
+
}, [l, r]), /* @__PURE__ */ u(ge, { children: /* @__PURE__ */ u(Rr, { client: l, children: /* @__PURE__ */ u(Nr, { children: /* @__PURE__ */ u(
|
|
3441
|
+
Di,
|
|
3448
3442
|
{
|
|
3449
3443
|
...e,
|
|
3450
3444
|
onSurfaceReadyChange: s,
|
|
@@ -3453,61 +3447,61 @@ function is(e) {
|
|
|
3453
3447
|
) }) }) });
|
|
3454
3448
|
}
|
|
3455
3449
|
export {
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3450
|
+
ns as A2UI_PROTOCOL_VERSION,
|
|
3451
|
+
ls as AskUserFormCard,
|
|
3452
|
+
st as CaseSearchProvider,
|
|
3453
|
+
Vi as CurlSubmitBlock,
|
|
3454
|
+
zo as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
|
|
3455
|
+
wo as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
|
|
3456
|
+
Po as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
|
|
3457
|
+
bt as DEFAULT_AUTH_STORAGE_KEY,
|
|
3458
|
+
Ro as DEFAULT_AUTH_TOKEN_FIELD,
|
|
3459
|
+
Yn as FORM_MEDIA_SIZES,
|
|
3460
|
+
at as ResumeSearchProvider,
|
|
3461
|
+
as as SkoponA2uiStreamRenderer,
|
|
3468
3462
|
ge as SkoponFormProvider,
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3463
|
+
Ii as SkoponFormRenderer,
|
|
3464
|
+
yo as a2uiToBlocks,
|
|
3465
|
+
pn as blocksToA2ui,
|
|
3466
|
+
Tt as buildAnswerAgentBody,
|
|
3467
|
+
Eo as buildAskUserCurlBodyJson,
|
|
3468
|
+
Uo as buildAskUserCurlStatement,
|
|
3469
|
+
rs as buildAskUserSubmitCurlFromPayload,
|
|
3470
|
+
bo as buildAskUserSurface,
|
|
3471
|
+
yn as buildCurlStatement,
|
|
3472
|
+
os as copyTextToClipboard,
|
|
3473
|
+
Qo as createCaseSearchClient,
|
|
3474
|
+
Lo as createFormClient,
|
|
3475
|
+
Go as createResumeSearchClient,
|
|
3476
|
+
ss as createSkoponSdkClients,
|
|
3477
|
+
yt as extractExtraBlockValues,
|
|
3478
|
+
Co as extractSurfaceValues,
|
|
3479
|
+
kn as formatAnswerAgentSubmitMessage,
|
|
3480
|
+
Fo as getPayloadInputFieldNames,
|
|
3481
|
+
No as getPayloadRenderableBlocks,
|
|
3482
|
+
xo as intersectPayloadBlocksWithForm,
|
|
3483
|
+
ut as isA2uiSurfaceEmpty,
|
|
3490
3484
|
ae as isInputBlockType,
|
|
3491
3485
|
Oe as isLayoutBlockType,
|
|
3492
3486
|
Ue as isMediaBlockType,
|
|
3493
|
-
|
|
3494
|
-
|
|
3487
|
+
ko as mapFormDefinitionFromDto,
|
|
3488
|
+
ue as normalizeFormDefinition,
|
|
3495
3489
|
Be as parsePayloadBlocksJson,
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3490
|
+
Mo as payloadHasInputBlocks,
|
|
3491
|
+
qo as resolveAnswerAgentCallbackUrl,
|
|
3492
|
+
_t as resolveClientHeaders,
|
|
3493
|
+
Bo as resolveRealtimeWsUrl,
|
|
3494
|
+
Sn as resolveSkoponAuthHeaders,
|
|
3495
|
+
At as resolveSubmitAuthHeaders,
|
|
3496
|
+
So as resolveSurfaceFromFormDefinition,
|
|
3497
|
+
xi as skoponAntdTheme,
|
|
3498
|
+
oe as skoponBrandColors,
|
|
3499
|
+
Cn as submitAnswerAgent,
|
|
3500
|
+
vn as submitFormJson,
|
|
3501
|
+
vo as surfaceDocToMessages,
|
|
3508
3502
|
Re as syncFormDefinition,
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3503
|
+
zr as useCaseSearch,
|
|
3504
|
+
Hr as useResumeSearch,
|
|
3505
|
+
xt as validateAnswerAgentBody,
|
|
3506
|
+
is as validateAnswerAgentContext
|
|
3513
3507
|
};
|