@skopon-cool/form-sdk 0.2.1 → 0.2.2
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/README.md +94 -9
- package/dist/adapter/a2uiAdapter.d.ts +1 -0
- package/dist/adapter/a2uiAdapter.d.ts.map +1 -1
- package/dist/adapter/formSchema.d.ts +2 -1
- package/dist/adapter/formSchema.d.ts.map +1 -1
- package/dist/catalog/a2uiCustomCatalog.d.ts.map +1 -1
- package/dist/client/apiEnvelope.d.ts +7 -0
- package/dist/client/apiEnvelope.d.ts.map +1 -0
- package/dist/client/authStorage.d.ts +19 -0
- package/dist/client/authStorage.d.ts.map +1 -0
- package/dist/client/caseSearchClient.d.ts +11 -0
- package/dist/client/caseSearchClient.d.ts.map +1 -0
- package/dist/client/formClient.d.ts +2 -2
- package/dist/client/formClient.d.ts.map +1 -1
- package/dist/client/resumeSearchClient.d.ts +9 -0
- package/dist/client/resumeSearchClient.d.ts.map +1 -0
- package/dist/client/skoponSdkClients.d.ts +22 -0
- package/dist/client/skoponSdkClients.d.ts.map +1 -0
- package/dist/components/AskUserFormCard.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1013 -759
- package/dist/submit/validateFormSubmit.d.ts +10 -0
- package/dist/submit/validateFormSubmit.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/adapter/a2uiAdapter.ts +1 -1
- package/src/adapter/formSchema.test.ts +24 -0
- package/src/adapter/formSchema.ts +9 -2
- package/src/adapter/resolveSurface.ts +3 -3
- package/src/catalog/a2uiCustomCatalog.tsx +35 -3
- package/src/catalog/textFieldPreview.test.tsx +31 -0
- package/src/client/apiEnvelope.ts +21 -0
- package/src/client/authStorage.test.ts +61 -0
- package/src/client/authStorage.ts +70 -0
- package/src/client/caseSearchClient.ts +107 -0
- package/src/client/formClient.test.ts +25 -0
- package/src/client/formClient.ts +7 -25
- package/src/client/resumeSearchClient.test.ts +87 -0
- package/src/client/resumeSearchClient.ts +108 -0
- package/src/client/skoponSdkClients.ts +51 -0
- package/src/components/AskUserFormCard.tsx +6 -0
- package/src/index.ts +21 -0
- package/src/submit/submit.test.ts +40 -0
- package/src/submit/validateFormSubmit.ts +111 -0
- package/dist/catalog/skoponSelectLoading.test.d.ts +0 -2
- package/dist/catalog/skoponSelectLoading.test.d.ts.map +0 -1
- package/dist/catalog/textFieldPreview.test.d.ts +0 -2
- package/dist/catalog/textFieldPreview.test.d.ts.map +0 -1
- package/dist/components/SkoponA2uiStreamRenderer.test.d.ts +0 -2
- package/dist/components/SkoponA2uiStreamRenderer.test.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import './form-sdk.css';
|
|
2
|
-
import { jsx as l, jsxs as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { Spin as
|
|
5
|
-
import { ReloadOutlined as
|
|
6
|
-
import { createBinderlessComponentImplementation as
|
|
2
|
+
import { jsx as l, jsxs as k } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as Le, useContext as $e, useCallback as te, useSyncExternalStore as Bt, useMemo as q, useState as _, useRef as L, useEffect as R, forwardRef as wt, useImperativeHandle as qt } from "react";
|
|
4
|
+
import { Spin as De, Button as Se, Typography as D, Avatar as Ot, Tag as re, Select as Re, Checkbox as Vt, Radio as jt, Switch as Lt, TimePicker as $t, DatePicker as Dt, Upload as Te, Input as Ie, InputNumber as Ht, ConfigProvider as Kt, Tooltip as ne } from "antd";
|
|
5
|
+
import { ReloadOutlined as it, FileTextOutlined as at, UserOutlined as Gt, FileImageOutlined as Jt, FileExcelOutlined as Yt, FileOutlined as st, PictureOutlined as Xt, SoundOutlined as Wt, VideoCameraOutlined as Qt } from "@ant-design/icons";
|
|
6
|
+
import { createBinderlessComponentImplementation as V, basicCatalog as fe, A2uiSurface as lt } from "@a2ui/react/v0_9";
|
|
7
7
|
import { z as f } from "zod";
|
|
8
|
-
import { Catalog as
|
|
9
|
-
import { injectBasicCatalogStyles as
|
|
10
|
-
import { injectStyles as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
8
|
+
import { Catalog as Zt, MessageProcessor as ct } from "@a2ui/web_core/v0_9";
|
|
9
|
+
import { injectBasicCatalogStyles as ut } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
10
|
+
import { injectStyles as pt } from "@a2ui/react/styles";
|
|
11
|
+
import Ze from "dayjs";
|
|
12
|
+
const Po = "v0.9", en = [
|
|
13
13
|
"huge",
|
|
14
14
|
"large",
|
|
15
15
|
"medium",
|
|
16
16
|
"small",
|
|
17
17
|
"icon"
|
|
18
18
|
];
|
|
19
|
-
function
|
|
19
|
+
function he(e) {
|
|
20
20
|
return e === "image" || e === "video" || e === "audio";
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function be(e) {
|
|
23
23
|
return e === "heading" || e === "paragraph";
|
|
24
24
|
}
|
|
25
25
|
function W(e) {
|
|
26
|
-
return
|
|
26
|
+
return !be(e) && !he(e);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function tn() {
|
|
29
29
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
30
30
|
return crypto.randomUUID();
|
|
31
31
|
if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
|
|
@@ -40,10 +40,10 @@ function Gt() {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
function ie(e) {
|
|
43
|
-
const t =
|
|
43
|
+
const t = tn().replace(/-/g, "").slice(0, 8);
|
|
44
44
|
return `${e}${t}`;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const mt = [
|
|
47
47
|
{ value: "image/*", label: "图片" },
|
|
48
48
|
{ value: "video/*", label: "视频" },
|
|
49
49
|
{ value: "audio/*", label: "音频" },
|
|
@@ -54,7 +54,7 @@ const at = [
|
|
|
54
54
|
{ value: "text/plain", label: "纯文本" },
|
|
55
55
|
{ value: "application/zip", label: "ZIP 压缩包" },
|
|
56
56
|
{ value: "application/x-rar-compressed", label: "RAR 压缩包" }
|
|
57
|
-
],
|
|
57
|
+
], nn = {
|
|
58
58
|
"image/*": ["image/*"],
|
|
59
59
|
"video/*": ["video/*"],
|
|
60
60
|
"audio/*": ["audio/*"],
|
|
@@ -74,7 +74,7 @@ const at = [
|
|
|
74
74
|
"text/plain": ["text/plain"],
|
|
75
75
|
"application/zip": ["application/zip"],
|
|
76
76
|
"application/x-rar-compressed": ["application/x-rar-compressed"]
|
|
77
|
-
},
|
|
77
|
+
}, rn = {
|
|
78
78
|
"image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
|
|
79
79
|
"video/*": [".mp4", ".mov", ".avi", ".webm"],
|
|
80
80
|
"audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
|
|
@@ -85,14 +85,14 @@ const at = [
|
|
|
85
85
|
"text/plain": [".txt"],
|
|
86
86
|
"application/zip": [".zip", ".7z"],
|
|
87
87
|
"application/x-rar-compressed": [".rar"]
|
|
88
|
-
},
|
|
88
|
+
}, on = {
|
|
89
89
|
"application/msword": "office/word",
|
|
90
90
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
|
|
91
91
|
"application/vnd.ms-excel": "office/excel",
|
|
92
92
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "office/excel",
|
|
93
93
|
"application/vnd.ms-powerpoint": "office/ppt",
|
|
94
94
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "office/ppt"
|
|
95
|
-
},
|
|
95
|
+
}, He = [
|
|
96
96
|
{ value: ".jpg", label: ".jpg" },
|
|
97
97
|
{ value: ".jpeg", label: ".jpeg" },
|
|
98
98
|
{ value: ".png", label: ".png" },
|
|
@@ -118,18 +118,18 @@ const at = [
|
|
|
118
118
|
{ value: ".zip", label: ".zip" },
|
|
119
119
|
{ value: ".rar", label: ".rar" },
|
|
120
120
|
{ value: ".7z", label: ".7z" }
|
|
121
|
-
],
|
|
122
|
-
|
|
123
|
-
),
|
|
124
|
-
|
|
125
|
-
),
|
|
126
|
-
|
|
121
|
+
], an = Object.fromEntries(
|
|
122
|
+
mt.map((e) => [e.value, e.label])
|
|
123
|
+
), sn = Object.fromEntries(
|
|
124
|
+
He.map((e) => [e.value, e.label])
|
|
125
|
+
), ln = new Set(mt.map((e) => e.value)), cn = new Set(
|
|
126
|
+
He.map((e) => e.value)
|
|
127
127
|
);
|
|
128
|
-
function
|
|
128
|
+
function un(e) {
|
|
129
129
|
const t = e.trim();
|
|
130
|
-
return t ?
|
|
130
|
+
return t ? ln.has(t) ? t : on[t] ?? null : null;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function pn(e) {
|
|
133
133
|
return Array.isArray(e) ? e.map((t) => {
|
|
134
134
|
const n = t.trim().toLowerCase();
|
|
135
135
|
return n ? n.startsWith(".") ? n : `.${n}` : "";
|
|
@@ -139,100 +139,103 @@ function ae(e) {
|
|
|
139
139
|
if (!Array.isArray(e)) return [];
|
|
140
140
|
const t = [], n = /* @__PURE__ */ new Set();
|
|
141
141
|
for (const r of e) {
|
|
142
|
-
const o =
|
|
142
|
+
const o = un(r);
|
|
143
143
|
o && !n.has(o) && (n.add(o), t.push(o));
|
|
144
144
|
}
|
|
145
145
|
return t;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function mn(e) {
|
|
148
148
|
const t = ae(e), n = [];
|
|
149
149
|
for (const r of t)
|
|
150
|
-
n.push(...
|
|
150
|
+
n.push(...nn[r] ?? [r]);
|
|
151
151
|
return n;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function dn(e) {
|
|
154
154
|
const t = ae(e);
|
|
155
155
|
if (t.length === 0) return [];
|
|
156
156
|
const n = /* @__PURE__ */ new Set();
|
|
157
157
|
for (const r of t)
|
|
158
|
-
for (const o of
|
|
158
|
+
for (const o of rn[r] ?? [])
|
|
159
159
|
n.add(o);
|
|
160
|
-
return
|
|
160
|
+
return He.filter((r) => n.has(r.value));
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
const n =
|
|
162
|
+
function Ke(e, t) {
|
|
163
|
+
const n = pn(t), r = ae(e);
|
|
164
164
|
if (r.length === 0)
|
|
165
|
-
return n.filter((i) =>
|
|
165
|
+
return n.filter((i) => cn.has(i));
|
|
166
166
|
const o = new Set(
|
|
167
|
-
|
|
167
|
+
dn(r).map((i) => i.value)
|
|
168
168
|
);
|
|
169
169
|
return n.filter((i) => o.has(i));
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
const n =
|
|
171
|
+
function fn(e, t) {
|
|
172
|
+
const n = mn(e), r = Ke(e, t), o = [...n, ...r];
|
|
173
173
|
return o.length > 0 ? o.join(",") : void 0;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
const n = ae(e), r =
|
|
175
|
+
function hn(e, t) {
|
|
176
|
+
const n = ae(e), r = Ke(
|
|
177
177
|
n,
|
|
178
178
|
t
|
|
179
179
|
), o = [
|
|
180
|
-
...n.map((i) =>
|
|
181
|
-
...r.map((i) =>
|
|
180
|
+
...n.map((i) => an[i] ?? i),
|
|
181
|
+
...r.map((i) => sn[i] ?? i)
|
|
182
182
|
];
|
|
183
183
|
return o.length === 0 ? null : o.join("、");
|
|
184
184
|
}
|
|
185
|
-
const
|
|
185
|
+
const gn = [
|
|
186
186
|
"video",
|
|
187
187
|
"audio",
|
|
188
188
|
"image",
|
|
189
189
|
"file",
|
|
190
190
|
"spreadsheet",
|
|
191
191
|
"document"
|
|
192
|
-
],
|
|
193
|
-
function
|
|
194
|
-
return e &&
|
|
192
|
+
], yn = new Set(gn);
|
|
193
|
+
function vn(e) {
|
|
194
|
+
return e && yn.has(e) ? e : "file";
|
|
195
195
|
}
|
|
196
|
-
function
|
|
197
|
-
return typeof e == "string" &&
|
|
196
|
+
function se(e) {
|
|
197
|
+
return typeof e == "string" && en.includes(e) ? e : "medium";
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Sn(e, t) {
|
|
200
200
|
var o;
|
|
201
201
|
const n = Math.max(1, t);
|
|
202
202
|
let r = [];
|
|
203
203
|
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);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function bn(e) {
|
|
206
206
|
var t;
|
|
207
207
|
return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
return `form-media-size-${
|
|
209
|
+
function Cn(e) {
|
|
210
|
+
return `form-media-size-${se(e)}`;
|
|
211
|
+
}
|
|
212
|
+
function xn(e) {
|
|
213
|
+
return `form-media-preview form-media-list ${Cn(e)}`;
|
|
211
214
|
}
|
|
212
|
-
|
|
213
|
-
|
|
215
|
+
const kn = 10;
|
|
216
|
+
function Ge(e) {
|
|
217
|
+
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
214
218
|
}
|
|
215
|
-
|
|
216
|
-
function ye(e) {
|
|
219
|
+
function le(e) {
|
|
217
220
|
return e === !0 || e === "true" || e === 1 || e === "1";
|
|
218
221
|
}
|
|
219
|
-
function
|
|
222
|
+
function et(e, t = 1) {
|
|
220
223
|
const n = typeof e == "number" ? e : Number(e);
|
|
221
224
|
return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
|
|
222
225
|
}
|
|
223
|
-
function
|
|
226
|
+
function pe(e, t = 1) {
|
|
224
227
|
const n = typeof e == "number" ? e : Number(e);
|
|
225
228
|
return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
|
|
226
229
|
}
|
|
227
|
-
function
|
|
230
|
+
function An(e, t) {
|
|
228
231
|
if (t !== void 0)
|
|
229
|
-
return e === "toggle" ?
|
|
232
|
+
return e === "toggle" ? le(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);
|
|
230
233
|
}
|
|
231
|
-
function
|
|
234
|
+
function Tn(e) {
|
|
232
235
|
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, a = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, s = Array.isArray(e == null ? void 0 : e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
|
|
233
236
|
return { agentKind: r, agentUniqueId: o, flowType: i, category: a, flowUniqueIds: s, pageSize: n };
|
|
234
237
|
}
|
|
235
|
-
function
|
|
238
|
+
function In(e) {
|
|
236
239
|
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;
|
|
237
240
|
return {
|
|
238
241
|
names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
|
|
@@ -241,14 +244,14 @@ function vn(e) {
|
|
|
241
244
|
pageSize: n
|
|
242
245
|
};
|
|
243
246
|
}
|
|
244
|
-
function
|
|
247
|
+
function Nn(e) {
|
|
245
248
|
if (e.type !== "case_singleselect") return e;
|
|
246
249
|
const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
|
|
247
250
|
return { ...e, type: "case_multiselect", defaultValue: t };
|
|
248
251
|
}
|
|
249
|
-
function
|
|
252
|
+
function Mn(e) {
|
|
250
253
|
var o, i;
|
|
251
|
-
const t =
|
|
254
|
+
const t = Nn(e), n = ae(t.fileAcceptTypes), r = t.type;
|
|
252
255
|
return {
|
|
253
256
|
id: ((o = t.id) == null ? void 0 : o.trim()) || ie("block-"),
|
|
254
257
|
type: r,
|
|
@@ -257,17 +260,17 @@ function Sn(e) {
|
|
|
257
260
|
placeholder: t.placeholder ?? "",
|
|
258
261
|
help: t.help ?? "",
|
|
259
262
|
required: t.required === !0,
|
|
260
|
-
mediaUrls:
|
|
261
|
-
mediaSize:
|
|
263
|
+
mediaUrls: he(r) ? Sn(t, kn) : void 0,
|
|
264
|
+
mediaSize: he(r) ? se(t.mediaSize) : void 0,
|
|
262
265
|
fileAcceptTypes: n,
|
|
263
|
-
fileAcceptExtensions:
|
|
266
|
+
fileAcceptExtensions: Ke(
|
|
264
267
|
n,
|
|
265
268
|
t.fileAcceptExtensions
|
|
266
269
|
),
|
|
267
|
-
filePlaceholderIcon:
|
|
268
|
-
fileMinCount: r === "file" ?
|
|
269
|
-
fileMaxCount: r === "file" ?
|
|
270
|
-
defaultValue:
|
|
270
|
+
filePlaceholderIcon: vn(t.filePlaceholderIcon),
|
|
271
|
+
fileMinCount: r === "file" ? et(t.fileMinCount, 1) : void 0,
|
|
272
|
+
fileMaxCount: r === "file" ? et(t.fileMaxCount, 1) : void 0,
|
|
273
|
+
defaultValue: An(r, t.defaultValue),
|
|
271
274
|
options: Array.isArray(t.options) ? t.options.map((a, s) => {
|
|
272
275
|
var c, u;
|
|
273
276
|
return {
|
|
@@ -276,16 +279,16 @@ function Sn(e) {
|
|
|
276
279
|
};
|
|
277
280
|
}) : void 0,
|
|
278
281
|
resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
|
|
279
|
-
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ?
|
|
280
|
-
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ?
|
|
281
|
-
resumeFilter: r === "resume_multiselect" ?
|
|
282
|
+
resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? pe(t.resumeMinCount, 1) : void 0,
|
|
283
|
+
resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? pe(t.resumeMaxCount, 1) : void 0,
|
|
284
|
+
resumeFilter: r === "resume_multiselect" ? In(t.resumeFilter) : void 0,
|
|
282
285
|
caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
|
|
283
|
-
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ?
|
|
284
|
-
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ?
|
|
285
|
-
caseFilter: r === "case_multiselect" ?
|
|
286
|
+
caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? pe(t.caseMinCount, 1) : void 0,
|
|
287
|
+
caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? pe(t.caseMaxCount, 1) : void 0,
|
|
288
|
+
caseFilter: r === "case_multiselect" ? Tn(t.caseFilter) : void 0
|
|
286
289
|
};
|
|
287
290
|
}
|
|
288
|
-
function
|
|
291
|
+
function ge(e) {
|
|
289
292
|
return {
|
|
290
293
|
title: e.title ?? "",
|
|
291
294
|
description: e.description ?? "",
|
|
@@ -293,18 +296,18 @@ function me(e) {
|
|
|
293
296
|
jsonSchema: e.jsonSchema ?? {}
|
|
294
297
|
};
|
|
295
298
|
}
|
|
296
|
-
function
|
|
299
|
+
function ee(e) {
|
|
297
300
|
if (!e || !Array.isArray(e.blocks))
|
|
298
|
-
return
|
|
299
|
-
const t = e.blocks.map(
|
|
300
|
-
return
|
|
301
|
+
return ge({ title: "", description: "", blocks: [], jsonSchema: {} });
|
|
302
|
+
const t = e.blocks.map(Mn);
|
|
303
|
+
return ge({
|
|
301
304
|
title: typeof e.title == "string" ? e.title : "",
|
|
302
305
|
description: typeof e.description == "string" ? e.description : "",
|
|
303
306
|
blocks: t,
|
|
304
|
-
jsonSchema:
|
|
307
|
+
jsonSchema: Ge(e.jsonSchema)
|
|
305
308
|
});
|
|
306
309
|
}
|
|
307
|
-
function
|
|
310
|
+
function Fn(e) {
|
|
308
311
|
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, a = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
|
|
309
312
|
return {
|
|
310
313
|
agentKind: n,
|
|
@@ -315,14 +318,14 @@ function xn(e) {
|
|
|
315
318
|
pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
|
|
316
319
|
};
|
|
317
320
|
}
|
|
318
|
-
function
|
|
321
|
+
function tt(e) {
|
|
319
322
|
if (e == null) return;
|
|
320
323
|
const t = typeof e == "number" ? e : Number(e);
|
|
321
324
|
if (!(!Number.isFinite(t) || t < 1))
|
|
322
325
|
return Math.floor(t);
|
|
323
326
|
}
|
|
324
|
-
function
|
|
325
|
-
var a, s, c, u, d,
|
|
327
|
+
function _n(e, t) {
|
|
328
|
+
var a, s, c, u, d, m;
|
|
326
329
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
327
330
|
return i({
|
|
328
331
|
id: n,
|
|
@@ -337,14 +340,14 @@ function Cn(e, t) {
|
|
|
337
340
|
flowType: (c = e.caseFilter) == null ? void 0 : c.flowType,
|
|
338
341
|
category: (u = e.caseFilter) == null ? void 0 : u.category,
|
|
339
342
|
flowUniqueIds: ((d = e.caseFilter) == null ? void 0 : d.flowUniqueIds) ?? [],
|
|
340
|
-
pageSize: ((
|
|
343
|
+
pageSize: ((m = e.caseFilter) == null ? void 0 : m.pageSize) ?? 20
|
|
341
344
|
},
|
|
342
345
|
...e.caseMinCount !== void 0 ? { minCount: e.caseMinCount } : {},
|
|
343
346
|
...e.caseMaxCount !== void 0 ? { maxCount: e.caseMaxCount } : {},
|
|
344
347
|
value: { path: o }
|
|
345
348
|
});
|
|
346
349
|
}
|
|
347
|
-
function
|
|
350
|
+
function Pn(e, t, n) {
|
|
348
351
|
const r = n.nameFromValue(e.value), o = {
|
|
349
352
|
...t("case_multiselect"),
|
|
350
353
|
name: r,
|
|
@@ -352,32 +355,32 @@ function kn(e, t, n) {
|
|
|
352
355
|
}, i = n.asLiteral(e.placeholder);
|
|
353
356
|
i && (o.placeholder = i);
|
|
354
357
|
const a = n.asLiteral(e.help);
|
|
355
|
-
a && (o.help = a), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter =
|
|
356
|
-
const s =
|
|
358
|
+
a && (o.help = a), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = Fn(e.caseFilter));
|
|
359
|
+
const s = tt(e.minCount);
|
|
357
360
|
s !== void 0 && (o.caseMinCount = s);
|
|
358
|
-
const c =
|
|
361
|
+
const c = tt(e.maxCount);
|
|
359
362
|
return c !== void 0 && (o.caseMaxCount = c), o;
|
|
360
363
|
}
|
|
361
|
-
const
|
|
362
|
-
function
|
|
364
|
+
const dt = Le({ interactive: !0 });
|
|
365
|
+
function Be({
|
|
363
366
|
interactive: e,
|
|
364
367
|
children: t
|
|
365
368
|
}) {
|
|
366
|
-
return /* @__PURE__ */ l(
|
|
369
|
+
return /* @__PURE__ */ l(dt.Provider, { value: { interactive: e }, children: t });
|
|
367
370
|
}
|
|
368
371
|
function K() {
|
|
369
|
-
return
|
|
372
|
+
return $e(dt);
|
|
370
373
|
}
|
|
371
|
-
function
|
|
374
|
+
function ft(e) {
|
|
372
375
|
return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
|
|
373
376
|
}
|
|
374
|
-
function
|
|
377
|
+
function nt(e, t = "value") {
|
|
375
378
|
const r = e.componentModel.properties[t];
|
|
376
|
-
if (!(!
|
|
379
|
+
if (!(!ft(r) || r === void 0))
|
|
377
380
|
return e.dataContext.resolveDynamicValue(r);
|
|
378
381
|
}
|
|
379
382
|
function G(e, t = "value") {
|
|
380
|
-
const r = e.componentModel.properties[t], o =
|
|
383
|
+
const r = e.componentModel.properties[t], o = ft(r), i = te(
|
|
381
384
|
(u) => {
|
|
382
385
|
if (!o || r === void 0) return () => {
|
|
383
386
|
};
|
|
@@ -388,7 +391,7 @@ function G(e, t = "value") {
|
|
|
388
391
|
), a = te(() => {
|
|
389
392
|
if (!(!o || r === void 0))
|
|
390
393
|
return e.dataContext.resolveDynamicValue(r);
|
|
391
|
-
}, [e, r, o]), s =
|
|
394
|
+
}, [e, r, o]), s = Bt(i, a, a), c = te(
|
|
392
395
|
(u) => {
|
|
393
396
|
!o || !r || typeof r != "object" || !("path" in r) || e.dataContext.set(String(r.path), u);
|
|
394
397
|
},
|
|
@@ -400,44 +403,44 @@ function oe(e) {
|
|
|
400
403
|
if (typeof e == "string") return e || void 0;
|
|
401
404
|
if (typeof e == "number") return String(e);
|
|
402
405
|
}
|
|
403
|
-
function
|
|
406
|
+
function O(e) {
|
|
404
407
|
return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
|
|
405
408
|
}
|
|
406
|
-
function
|
|
407
|
-
return t ? Array.isArray(e) ? null :
|
|
409
|
+
function ht(e, t) {
|
|
410
|
+
return t ? Array.isArray(e) ? null : O(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
|
|
408
411
|
}
|
|
409
|
-
function
|
|
412
|
+
function ye(e) {
|
|
410
413
|
if (e == null) return;
|
|
411
414
|
const t = typeof e == "number" ? e : Number(e);
|
|
412
415
|
if (!(!Number.isFinite(t) || t < 1))
|
|
413
416
|
return Math.floor(t);
|
|
414
417
|
}
|
|
415
|
-
function
|
|
418
|
+
function gt(e, t, n, r) {
|
|
416
419
|
if (e.includes(t)) {
|
|
417
420
|
const i = e.filter((a) => a !== t);
|
|
418
421
|
return n !== void 0 && i.length < n ? null : i;
|
|
419
422
|
}
|
|
420
423
|
return r !== void 0 && e.length >= r ? null : [...e, t];
|
|
421
424
|
}
|
|
422
|
-
function
|
|
425
|
+
function yt(e, t, n, r, o) {
|
|
423
426
|
if (!n) return !0;
|
|
424
427
|
const i = e.includes(t);
|
|
425
428
|
return !!(!i && o !== void 0 && e.length >= o || i && r !== void 0 && e.length <= r);
|
|
426
429
|
}
|
|
427
|
-
function
|
|
430
|
+
function vt(e, t) {
|
|
428
431
|
return t === void 0 || e.length <= t ? null : e.slice(0, t);
|
|
429
432
|
}
|
|
430
|
-
const
|
|
431
|
-
function
|
|
433
|
+
const St = Le(null);
|
|
434
|
+
function we({
|
|
432
435
|
caseSearch: e,
|
|
433
436
|
children: t
|
|
434
437
|
}) {
|
|
435
|
-
return /* @__PURE__ */ l(
|
|
438
|
+
return /* @__PURE__ */ l(St.Provider, { value: e ?? null, children: t });
|
|
436
439
|
}
|
|
437
|
-
function
|
|
438
|
-
return
|
|
440
|
+
function Un() {
|
|
441
|
+
return $e(St);
|
|
439
442
|
}
|
|
440
|
-
function
|
|
443
|
+
function Ne(e) {
|
|
441
444
|
return typeof e == "string" ? e : "";
|
|
442
445
|
}
|
|
443
446
|
function Me(e) {
|
|
@@ -446,15 +449,15 @@ function Me(e) {
|
|
|
446
449
|
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, a = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, s = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, c = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
|
|
447
450
|
return { agentKind: o, agentUniqueId: i, flowType: a, category: s, flowUniqueIds: c, pageSize: r };
|
|
448
451
|
}
|
|
449
|
-
function
|
|
452
|
+
function Fe(e) {
|
|
450
453
|
var r;
|
|
451
454
|
const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
|
|
452
455
|
return t || n;
|
|
453
456
|
}
|
|
454
|
-
function
|
|
457
|
+
function zn(e) {
|
|
455
458
|
return JSON.stringify(e);
|
|
456
459
|
}
|
|
457
|
-
const
|
|
460
|
+
const En = {
|
|
458
461
|
name: "SkoponCaseSelect",
|
|
459
462
|
schema: f.object({
|
|
460
463
|
label: f.any().optional(),
|
|
@@ -467,13 +470,13 @@ const Mn = {
|
|
|
467
470
|
value: f.any().optional()
|
|
468
471
|
}).passthrough()
|
|
469
472
|
};
|
|
470
|
-
function
|
|
473
|
+
function Rn({
|
|
471
474
|
item: e,
|
|
472
475
|
selected: t,
|
|
473
476
|
disabled: n,
|
|
474
477
|
onToggle: r
|
|
475
478
|
}) {
|
|
476
|
-
return /* @__PURE__ */
|
|
479
|
+
return /* @__PURE__ */ k(
|
|
477
480
|
"button",
|
|
478
481
|
{
|
|
479
482
|
type: "button",
|
|
@@ -481,11 +484,11 @@ function Nn({
|
|
|
481
484
|
disabled: n,
|
|
482
485
|
onClick: r,
|
|
483
486
|
children: [
|
|
484
|
-
/* @__PURE__ */ l("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ l(
|
|
485
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ l("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ l(at, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
|
|
488
|
+
/* @__PURE__ */ k("div", { className: "skopon-resume-select-card-body", children: [
|
|
486
489
|
/* @__PURE__ */ l("div", { className: "skopon-resume-select-card-name", children: e.name }),
|
|
487
490
|
e.description ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
|
|
488
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ k("div", { className: "skopon-resume-select-card-meta", children: [
|
|
489
492
|
e.caseUniqueId,
|
|
490
493
|
e.platform ? ` · ${e.platform}` : "",
|
|
491
494
|
e.link ? ` · ${e.link}` : ""
|
|
@@ -495,104 +498,104 @@ function Nn({
|
|
|
495
498
|
}
|
|
496
499
|
);
|
|
497
500
|
}
|
|
498
|
-
function
|
|
499
|
-
const { interactive: t } = K(), n =
|
|
500
|
-
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
}, [
|
|
504
|
-
const J =
|
|
505
|
-
async (
|
|
506
|
-
const
|
|
507
|
-
if (!n || !
|
|
508
|
-
|
|
501
|
+
function Bn({ context: e }) {
|
|
502
|
+
const { interactive: t } = K(), n = Un(), { value: r, setValue: o } = G(e), i = e.componentModel.properties, a = Ne(i.label), s = Ne(i.placeholder), c = Ne(i.help), u = i.enableRefresh !== !1, d = ye(i.minCount), m = ye(i.maxCount), b = q(() => Me(i.caseFilter), [i.caseFilter]), g = zn(b), [A, N] = _(1), [v, p] = _(!1), [h, x] = _(""), [y, C] = _([]), [M, E] = _(0), [$, Q] = _(b.pageSize ?? 20), j = L(0), w = O(r);
|
|
503
|
+
R(() => {
|
|
504
|
+
const S = vt(w, m);
|
|
505
|
+
S !== null && o(S);
|
|
506
|
+
}, [m, w, o]);
|
|
507
|
+
const J = q(() => n ? Fe(b) ? h || s || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, b, h, s]), Y = te(
|
|
508
|
+
async (S) => {
|
|
509
|
+
const F = Me(JSON.parse(g)), B = ++j.current;
|
|
510
|
+
if (!n || !Fe(F)) {
|
|
511
|
+
C([]), E(0), x(""), p(!1);
|
|
509
512
|
return;
|
|
510
513
|
}
|
|
511
|
-
|
|
514
|
+
p(!0), x("");
|
|
512
515
|
try {
|
|
513
|
-
const
|
|
514
|
-
if (
|
|
515
|
-
|
|
516
|
-
} catch (
|
|
517
|
-
if (
|
|
518
|
-
|
|
516
|
+
const I = await n({ filter: F, page: S });
|
|
517
|
+
if (B !== j.current) return;
|
|
518
|
+
C(I.list), E(I.total), N(I.page), Q(I.pageSize);
|
|
519
|
+
} catch (I) {
|
|
520
|
+
if (B !== j.current) return;
|
|
521
|
+
C([]), E(0), x(I instanceof Error ? I.message : "加载案例列表失败");
|
|
519
522
|
} finally {
|
|
520
|
-
|
|
523
|
+
B === j.current && p(!1);
|
|
521
524
|
}
|
|
522
525
|
},
|
|
523
526
|
[n, g]
|
|
524
527
|
);
|
|
525
|
-
|
|
526
|
-
|
|
528
|
+
R(() => {
|
|
529
|
+
N(1), Y(1);
|
|
527
530
|
}, [g, Y]);
|
|
528
|
-
const
|
|
531
|
+
const P = (S) => {
|
|
529
532
|
if (!t) return;
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
|
|
533
|
+
const F = gt(
|
|
534
|
+
w,
|
|
535
|
+
S,
|
|
533
536
|
d,
|
|
534
|
-
|
|
537
|
+
m
|
|
535
538
|
);
|
|
536
|
-
|
|
537
|
-
},
|
|
538
|
-
const
|
|
539
|
-
Y(
|
|
539
|
+
F !== null && o(F);
|
|
540
|
+
}, U = () => {
|
|
541
|
+
const S = Me(JSON.parse(g)), F = $ || S.pageSize || 20, B = Math.max(1, Math.ceil(M / F)), I = A >= B ? 1 : A + 1;
|
|
542
|
+
Y(I);
|
|
540
543
|
};
|
|
541
|
-
return /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ k("div", { className: "form-block-preview skopon-resume-select", children: [
|
|
542
545
|
a ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: a }) : null,
|
|
543
|
-
|
|
544
|
-
/* @__PURE__ */ l(
|
|
546
|
+
v && y.length === 0 ? /* @__PURE__ */ k("div", { className: "skopon-resume-select-status", children: [
|
|
547
|
+
/* @__PURE__ */ l(De, { size: "small" }),
|
|
545
548
|
" 加载案例…"
|
|
546
549
|
] }) : null,
|
|
547
|
-
!
|
|
548
|
-
y.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-list", children: y.map((
|
|
549
|
-
|
|
550
|
+
!v && y.length === 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-empty", children: J }) : null,
|
|
551
|
+
y.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-list", children: y.map((S) => /* @__PURE__ */ l(
|
|
552
|
+
Rn,
|
|
550
553
|
{
|
|
551
|
-
item:
|
|
552
|
-
selected:
|
|
553
|
-
disabled:
|
|
554
|
-
|
|
555
|
-
|
|
554
|
+
item: S,
|
|
555
|
+
selected: w.includes(S.caseUniqueId),
|
|
556
|
+
disabled: yt(
|
|
557
|
+
w,
|
|
558
|
+
S.caseUniqueId,
|
|
556
559
|
t,
|
|
557
560
|
d,
|
|
558
|
-
|
|
561
|
+
m
|
|
559
562
|
),
|
|
560
|
-
onToggle: () =>
|
|
563
|
+
onToggle: () => P(S.caseUniqueId)
|
|
561
564
|
},
|
|
562
|
-
|
|
565
|
+
S.caseUniqueId
|
|
563
566
|
)) }) : null,
|
|
564
|
-
u && n &&
|
|
565
|
-
|
|
567
|
+
u && n && Fe(b) ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ l(
|
|
568
|
+
Se,
|
|
566
569
|
{
|
|
567
570
|
type: "default",
|
|
568
571
|
size: "small",
|
|
569
|
-
icon: /* @__PURE__ */ l(
|
|
570
|
-
loading:
|
|
572
|
+
icon: /* @__PURE__ */ l(it, {}),
|
|
573
|
+
loading: v,
|
|
571
574
|
disabled: !t,
|
|
572
|
-
onClick:
|
|
575
|
+
onClick: U,
|
|
573
576
|
children: "换一批"
|
|
574
577
|
}
|
|
575
578
|
) }) : null,
|
|
576
|
-
c ? /* @__PURE__ */ l(
|
|
579
|
+
c ? /* @__PURE__ */ l(D.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
|
|
577
580
|
] });
|
|
578
581
|
}
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
),
|
|
582
|
+
const wn = V(
|
|
583
|
+
En,
|
|
584
|
+
Bn
|
|
585
|
+
), qn = {
|
|
583
586
|
type: "case_multiselect",
|
|
584
587
|
componentName: "SkoponCaseSelect",
|
|
585
|
-
toComponent:
|
|
586
|
-
fromComponent:
|
|
587
|
-
catalogComponents: [
|
|
588
|
+
toComponent: _n,
|
|
589
|
+
fromComponent: Pn,
|
|
590
|
+
catalogComponents: [wn]
|
|
588
591
|
};
|
|
589
|
-
function
|
|
592
|
+
function rt(e) {
|
|
590
593
|
if (e == null) return;
|
|
591
594
|
const t = typeof e == "number" ? e : Number(e);
|
|
592
595
|
if (!(!Number.isFinite(t) || t < 1))
|
|
593
596
|
return Math.floor(t);
|
|
594
597
|
}
|
|
595
|
-
function
|
|
598
|
+
function On(e, t) {
|
|
596
599
|
var a, s, c, u;
|
|
597
600
|
const { id: n, label: r, path: o, withData: i } = t;
|
|
598
601
|
return i({
|
|
@@ -613,7 +616,7 @@ function zn(e, t) {
|
|
|
613
616
|
value: { path: o }
|
|
614
617
|
});
|
|
615
618
|
}
|
|
616
|
-
function
|
|
619
|
+
function Vn(e, t, n) {
|
|
617
620
|
const r = n.nameFromValue(e.value), o = {
|
|
618
621
|
...t("resume_multiselect"),
|
|
619
622
|
name: r,
|
|
@@ -630,34 +633,34 @@ function Un(e, t, n) {
|
|
|
630
633
|
pageSize: typeof u.pageSize == "number" ? u.pageSize : 20
|
|
631
634
|
};
|
|
632
635
|
}
|
|
633
|
-
const s =
|
|
636
|
+
const s = rt(e.minCount);
|
|
634
637
|
s !== void 0 && (o.resumeMinCount = s);
|
|
635
|
-
const c =
|
|
638
|
+
const c = rt(e.maxCount);
|
|
636
639
|
return c !== void 0 && (o.resumeMaxCount = c), o;
|
|
637
640
|
}
|
|
638
|
-
const
|
|
639
|
-
function
|
|
641
|
+
const bt = Le(null);
|
|
642
|
+
function qe({
|
|
640
643
|
resumeSearch: e,
|
|
641
644
|
children: t
|
|
642
645
|
}) {
|
|
643
|
-
return /* @__PURE__ */ l(
|
|
646
|
+
return /* @__PURE__ */ l(bt.Provider, { value: e ?? null, children: t });
|
|
644
647
|
}
|
|
645
|
-
function
|
|
646
|
-
return
|
|
648
|
+
function jn() {
|
|
649
|
+
return $e(bt);
|
|
647
650
|
}
|
|
648
|
-
function
|
|
651
|
+
function _e(e) {
|
|
649
652
|
return typeof e == "string" ? e : "";
|
|
650
653
|
}
|
|
651
|
-
function
|
|
654
|
+
function Pe(e) {
|
|
652
655
|
if (!e || typeof e != "object")
|
|
653
656
|
return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
|
|
654
657
|
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), a = Number.isFinite(i) && i >= 1 && i <= 100 ? Math.floor(i) : 20;
|
|
655
658
|
return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: a };
|
|
656
659
|
}
|
|
657
|
-
function
|
|
660
|
+
function Ln(e) {
|
|
658
661
|
return JSON.stringify(e);
|
|
659
662
|
}
|
|
660
|
-
const
|
|
663
|
+
const $n = {
|
|
661
664
|
name: "SkoponResumeSelect",
|
|
662
665
|
schema: f.object({
|
|
663
666
|
label: f.any().optional(),
|
|
@@ -669,40 +672,40 @@ const Rn = {
|
|
|
669
672
|
maxCount: f.any().optional(),
|
|
670
673
|
value: f.any().optional()
|
|
671
674
|
}).passthrough()
|
|
672
|
-
},
|
|
673
|
-
function
|
|
674
|
-
const n = (t ?? []).filter(Boolean), r = n.slice(0,
|
|
675
|
-
return /* @__PURE__ */
|
|
675
|
+
}, Dn = 3, Hn = 2;
|
|
676
|
+
function Ue(e, t) {
|
|
677
|
+
const n = (t ?? []).filter(Boolean), r = n.slice(0, Dn), o = n.length - r.length;
|
|
678
|
+
return /* @__PURE__ */ k("div", { className: "skopon-resume-select-card-tags", children: [
|
|
676
679
|
/* @__PURE__ */ l("span", { className: "skopon-resume-select-card-tags-label", children: e }),
|
|
677
|
-
n.length > 0 ? /* @__PURE__ */
|
|
680
|
+
n.length > 0 ? /* @__PURE__ */ k("div", { className: "skopon-resume-select-card-tags-list", children: [
|
|
678
681
|
r.map((i) => /* @__PURE__ */ l(re, { className: "skopon-resume-select-card-tag", children: i }, i)),
|
|
679
|
-
o > 0 ? /* @__PURE__ */
|
|
682
|
+
o > 0 ? /* @__PURE__ */ k(re, { className: "skopon-resume-select-card-tag", children: [
|
|
680
683
|
"+",
|
|
681
684
|
o
|
|
682
685
|
] }) : null
|
|
683
686
|
] }) : /* @__PURE__ */ l("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
|
|
684
687
|
] });
|
|
685
688
|
}
|
|
686
|
-
function
|
|
687
|
-
return /* @__PURE__ */
|
|
689
|
+
function Kn(e) {
|
|
690
|
+
return /* @__PURE__ */ k("div", { className: "skopon-resume-select-card-field", children: [
|
|
688
691
|
/* @__PURE__ */ l("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
|
|
689
692
|
/* @__PURE__ */ l("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
|
|
690
693
|
] });
|
|
691
694
|
}
|
|
692
|
-
function
|
|
693
|
-
return /* @__PURE__ */
|
|
694
|
-
/* @__PURE__ */ l("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ l("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ l(
|
|
695
|
+
function Gn({ work: e }) {
|
|
696
|
+
return /* @__PURE__ */ k("div", { className: "skopon-resume-select-card-work", children: [
|
|
697
|
+
/* @__PURE__ */ l("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ l("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ l(Jt, { className: "skopon-resume-select-card-work-placeholder" }) }),
|
|
695
698
|
/* @__PURE__ */ l("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
|
|
696
699
|
] });
|
|
697
700
|
}
|
|
698
|
-
function
|
|
701
|
+
function Jn({
|
|
699
702
|
item: e,
|
|
700
703
|
selected: t,
|
|
701
704
|
disabled: n,
|
|
702
705
|
onToggle: r
|
|
703
706
|
}) {
|
|
704
|
-
const o = (e.works ?? []).slice(0,
|
|
705
|
-
return /* @__PURE__ */
|
|
707
|
+
const o = (e.works ?? []).slice(0, Hn);
|
|
708
|
+
return /* @__PURE__ */ k(
|
|
706
709
|
"button",
|
|
707
710
|
{
|
|
708
711
|
type: "button",
|
|
@@ -711,168 +714,168 @@ function wn({
|
|
|
711
714
|
onClick: r,
|
|
712
715
|
children: [
|
|
713
716
|
/* @__PURE__ */ l(
|
|
714
|
-
|
|
717
|
+
Ot,
|
|
715
718
|
{
|
|
716
719
|
size: 48,
|
|
717
720
|
src: e.avatarUrl || void 0,
|
|
718
|
-
icon: e.avatarUrl ? void 0 : /* @__PURE__ */ l(
|
|
721
|
+
icon: e.avatarUrl ? void 0 : /* @__PURE__ */ l(Gt, {}),
|
|
719
722
|
className: "skopon-resume-select-card-avatar"
|
|
720
723
|
}
|
|
721
724
|
),
|
|
722
725
|
/* @__PURE__ */ l("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ k("div", { className: "skopon-resume-select-card-body", children: [
|
|
727
|
+
Kn(e.satisfaction),
|
|
728
|
+
Ue("性格", e.personality),
|
|
729
|
+
Ue("专长", e.specialties),
|
|
730
|
+
Ue("擅长领域", e.traits),
|
|
731
|
+
/* @__PURE__ */ k("div", { className: "skopon-resume-select-card-works", children: [
|
|
729
732
|
/* @__PURE__ */ l("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
|
|
730
|
-
o.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, a) => /* @__PURE__ */ l(
|
|
733
|
+
o.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, a) => /* @__PURE__ */ l(Gn, { work: i }, `${i.title}-${a}`)) }) : /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
|
|
731
734
|
] })
|
|
732
735
|
] })
|
|
733
736
|
]
|
|
734
737
|
}
|
|
735
738
|
);
|
|
736
739
|
}
|
|
737
|
-
function
|
|
738
|
-
const { interactive: t } = K(), n =
|
|
739
|
-
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
}, [
|
|
740
|
+
function Yn({ context: e }) {
|
|
741
|
+
const { interactive: t } = K(), n = jn(), { value: r, setValue: o } = G(e), i = e.componentModel.properties, a = _e(i.label), s = _e(i.placeholder), c = _e(i.help), u = i.enableRefresh !== !1, d = ye(i.minCount), m = ye(i.maxCount), b = q(() => Pe(i.resumeFilter), [i.resumeFilter]), g = Ln(b), [A, N] = _(1), [v, p] = _(!1), [h, x] = _(""), [y, C] = _([]), [M, E] = _(0), [$, Q] = _(b.pageSize ?? 20), j = L(0), w = O(r);
|
|
742
|
+
R(() => {
|
|
743
|
+
const S = vt(w, m);
|
|
744
|
+
S !== null && o(S);
|
|
745
|
+
}, [m, w, o]);
|
|
743
746
|
const J = te(
|
|
744
|
-
async (
|
|
745
|
-
const
|
|
747
|
+
async (S) => {
|
|
748
|
+
const F = Pe(JSON.parse(g)), B = ++j.current;
|
|
746
749
|
if (!n) {
|
|
747
|
-
|
|
750
|
+
C([]), E(0), x("未配置简历搜索服务"), p(!1);
|
|
748
751
|
return;
|
|
749
752
|
}
|
|
750
|
-
|
|
753
|
+
p(!0), x("");
|
|
751
754
|
try {
|
|
752
|
-
const
|
|
753
|
-
if (
|
|
754
|
-
|
|
755
|
-
} catch (
|
|
756
|
-
if (
|
|
757
|
-
|
|
755
|
+
const I = await n({ filter: F, page: S });
|
|
756
|
+
if (B !== j.current) return;
|
|
757
|
+
C(I.list), E(I.total), N(I.page), Q(I.pageSize);
|
|
758
|
+
} catch (I) {
|
|
759
|
+
if (B !== j.current) return;
|
|
760
|
+
C([]), E(0), x(I instanceof Error ? I.message : "加载简历列表失败");
|
|
758
761
|
} finally {
|
|
759
|
-
|
|
762
|
+
B === j.current && p(!1);
|
|
760
763
|
}
|
|
761
764
|
},
|
|
762
765
|
[n, g]
|
|
763
766
|
);
|
|
764
|
-
|
|
765
|
-
|
|
767
|
+
R(() => {
|
|
768
|
+
N(1), J(1);
|
|
766
769
|
}, [g, J]);
|
|
767
|
-
const Y = (
|
|
770
|
+
const Y = (S) => {
|
|
768
771
|
if (!t) return;
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
|
|
772
|
+
const F = gt(
|
|
773
|
+
w,
|
|
774
|
+
S,
|
|
772
775
|
d,
|
|
773
|
-
|
|
776
|
+
m
|
|
774
777
|
);
|
|
775
|
-
|
|
776
|
-
},
|
|
777
|
-
const
|
|
778
|
-
J(
|
|
779
|
-
},
|
|
780
|
-
return /* @__PURE__ */
|
|
778
|
+
F !== null && o(F);
|
|
779
|
+
}, P = () => {
|
|
780
|
+
const S = Pe(JSON.parse(g)), F = $ || S.pageSize || 20, B = Math.max(1, Math.ceil(M / F)), I = A >= B ? 1 : A + 1;
|
|
781
|
+
J(I);
|
|
782
|
+
}, U = s || "暂无匹配的简历";
|
|
783
|
+
return /* @__PURE__ */ k("div", { className: "form-block-preview skopon-resume-select", children: [
|
|
781
784
|
a ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: a }) : null,
|
|
782
|
-
|
|
783
|
-
/* @__PURE__ */ l(
|
|
785
|
+
v && y.length === 0 ? /* @__PURE__ */ k("div", { className: "skopon-resume-select-status", children: [
|
|
786
|
+
/* @__PURE__ */ l(De, { size: "small" }),
|
|
784
787
|
" 加载简历…"
|
|
785
788
|
] }) : null,
|
|
786
|
-
!
|
|
787
|
-
!
|
|
788
|
-
y.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-list", children: y.map((
|
|
789
|
-
|
|
789
|
+
!v && h ? /* @__PURE__ */ l(D.Text, { type: "danger", className: "skopon-resume-select-status", children: h }) : null,
|
|
790
|
+
!v && !h && y.length === 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-empty", children: U }) : null,
|
|
791
|
+
y.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-list", children: y.map((S) => /* @__PURE__ */ l(
|
|
792
|
+
Jn,
|
|
790
793
|
{
|
|
791
|
-
item:
|
|
792
|
-
selected:
|
|
793
|
-
disabled:
|
|
794
|
-
|
|
795
|
-
|
|
794
|
+
item: S,
|
|
795
|
+
selected: w.includes(S.resumeUniqueId),
|
|
796
|
+
disabled: yt(
|
|
797
|
+
w,
|
|
798
|
+
S.resumeUniqueId,
|
|
796
799
|
t,
|
|
797
800
|
d,
|
|
798
|
-
|
|
801
|
+
m
|
|
799
802
|
),
|
|
800
|
-
onToggle: () => Y(
|
|
803
|
+
onToggle: () => Y(S.resumeUniqueId)
|
|
801
804
|
},
|
|
802
|
-
|
|
805
|
+
S.resumeUniqueId
|
|
803
806
|
)) }) : null,
|
|
804
807
|
u && n ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ l(
|
|
805
|
-
|
|
808
|
+
Se,
|
|
806
809
|
{
|
|
807
810
|
type: "default",
|
|
808
811
|
size: "small",
|
|
809
|
-
icon: /* @__PURE__ */ l(
|
|
810
|
-
loading:
|
|
812
|
+
icon: /* @__PURE__ */ l(it, {}),
|
|
813
|
+
loading: v,
|
|
811
814
|
disabled: !t,
|
|
812
|
-
onClick:
|
|
815
|
+
onClick: P,
|
|
813
816
|
children: "换一批"
|
|
814
817
|
}
|
|
815
818
|
) }) : null,
|
|
816
|
-
c ? /* @__PURE__ */ l(
|
|
819
|
+
c ? /* @__PURE__ */ l(D.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
|
|
817
820
|
] });
|
|
818
821
|
}
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
),
|
|
822
|
+
const Xn = V(
|
|
823
|
+
$n,
|
|
824
|
+
Yn
|
|
825
|
+
), Wn = {
|
|
823
826
|
type: "resume_multiselect",
|
|
824
827
|
componentName: "SkoponResumeSelect",
|
|
825
|
-
toComponent:
|
|
826
|
-
fromComponent:
|
|
827
|
-
catalogComponents: [
|
|
828
|
-
},
|
|
829
|
-
|
|
830
|
-
),
|
|
831
|
-
|
|
828
|
+
toComponent: On,
|
|
829
|
+
fromComponent: Vn,
|
|
830
|
+
catalogComponents: [Xn]
|
|
831
|
+
}, Ce = [Wn, qn], Qn = new Map(
|
|
832
|
+
Ce.map((e) => [e.type, e])
|
|
833
|
+
), Zn = new Map(
|
|
834
|
+
Ce.map((e) => [e.componentName, e])
|
|
832
835
|
);
|
|
833
|
-
function
|
|
834
|
-
return
|
|
836
|
+
function er(e) {
|
|
837
|
+
return Qn.get(e);
|
|
835
838
|
}
|
|
836
|
-
function
|
|
837
|
-
return
|
|
839
|
+
function tr(e) {
|
|
840
|
+
return Zn.get(e);
|
|
838
841
|
}
|
|
839
|
-
function
|
|
840
|
-
return
|
|
842
|
+
function nr() {
|
|
843
|
+
return Ce.flatMap((e) => e.catalogComponents);
|
|
841
844
|
}
|
|
842
|
-
function
|
|
843
|
-
return
|
|
845
|
+
function rr() {
|
|
846
|
+
return Ce.map((e) => e.componentName);
|
|
844
847
|
}
|
|
845
|
-
const
|
|
846
|
-
function
|
|
848
|
+
const ve = "root", Oe = "__title__", Ve = "__desc__", Je = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
|
|
849
|
+
function or(e) {
|
|
847
850
|
return `/${e}`;
|
|
848
851
|
}
|
|
849
|
-
function
|
|
852
|
+
function ot(e) {
|
|
850
853
|
return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
|
|
851
854
|
}
|
|
852
|
-
function
|
|
855
|
+
function z(e) {
|
|
853
856
|
if (typeof e == "string") return e;
|
|
854
857
|
}
|
|
855
|
-
function
|
|
858
|
+
function ir(e) {
|
|
856
859
|
const t = e.id || ie("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
|
|
857
860
|
return {
|
|
858
861
|
id: t,
|
|
859
862
|
component: "SkoponMedia",
|
|
860
863
|
mediaType: n,
|
|
861
|
-
urls:
|
|
862
|
-
mediaSize:
|
|
864
|
+
urls: bn(e),
|
|
865
|
+
mediaSize: se(e.mediaSize),
|
|
863
866
|
label: e.label ?? "",
|
|
864
867
|
help: e.help ?? "",
|
|
865
868
|
placeholder: e.placeholder ?? ""
|
|
866
869
|
};
|
|
867
870
|
}
|
|
868
|
-
function
|
|
871
|
+
function ar(e) {
|
|
869
872
|
if (Array.isArray(e.urls))
|
|
870
873
|
return e.urls.map((n) => String(n).trim()).filter(Boolean);
|
|
871
|
-
const t =
|
|
874
|
+
const t = z(e.url);
|
|
872
875
|
return t != null && t.trim() ? [t.trim()] : [];
|
|
873
876
|
}
|
|
874
|
-
function
|
|
875
|
-
const r = typeof e.id == "string" ? e.id : ie("block-"), o =
|
|
877
|
+
function me(e, t, n) {
|
|
878
|
+
const r = typeof e.id == "string" ? e.id : ie("block-"), o = ar(e), i = z(e.label) ?? z(e.description) ?? n, a = z(e.help), s = z(e.placeholder), c = se(e.mediaSize);
|
|
876
879
|
return {
|
|
877
880
|
id: r,
|
|
878
881
|
type: t,
|
|
@@ -883,10 +886,10 @@ function ue(e, t, n) {
|
|
|
883
886
|
mediaUrls: o.length > 0 ? o : [""]
|
|
884
887
|
};
|
|
885
888
|
}
|
|
886
|
-
function
|
|
889
|
+
function sr(e) {
|
|
887
890
|
switch (e.type) {
|
|
888
891
|
case "toggle":
|
|
889
|
-
return
|
|
892
|
+
return le(e.defaultValue);
|
|
890
893
|
case "multiselect":
|
|
891
894
|
case "checkbox":
|
|
892
895
|
case "resume_multiselect":
|
|
@@ -900,9 +903,9 @@ function Zn(e) {
|
|
|
900
903
|
return typeof e.defaultValue == "string" ? e.defaultValue : "";
|
|
901
904
|
}
|
|
902
905
|
}
|
|
903
|
-
function
|
|
906
|
+
function lr(e) {
|
|
904
907
|
var u;
|
|
905
|
-
const t = e.id || ie("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ?
|
|
908
|
+
const t = e.id || ie("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? or(r) : void 0, i = (e.options ?? []).map((d) => ({ label: d.label, value: d.value })), a = (d) => r ? { node: d, dataKey: r, dataValue: sr(e) } : { node: d }, s = { id: t, label: n, name: r, path: o, withData: a }, c = er(e.type);
|
|
906
909
|
if (c)
|
|
907
910
|
return c.toComponent(e, s);
|
|
908
911
|
switch (e.type) {
|
|
@@ -927,7 +930,7 @@ function er(e) {
|
|
|
927
930
|
component: "TextField",
|
|
928
931
|
label: n,
|
|
929
932
|
variant: "shortText",
|
|
930
|
-
validationRegexp:
|
|
933
|
+
validationRegexp: Je,
|
|
931
934
|
...e.placeholder ? { placeholder: e.placeholder } : {},
|
|
932
935
|
value: { path: o }
|
|
933
936
|
});
|
|
@@ -1013,7 +1016,7 @@ function er(e) {
|
|
|
1013
1016
|
case "image":
|
|
1014
1017
|
case "video":
|
|
1015
1018
|
case "audio":
|
|
1016
|
-
return { node:
|
|
1019
|
+
return { node: ir(e) };
|
|
1017
1020
|
case "file":
|
|
1018
1021
|
return a({
|
|
1019
1022
|
id: t,
|
|
@@ -1030,25 +1033,25 @@ function er(e) {
|
|
|
1030
1033
|
return { node: null };
|
|
1031
1034
|
}
|
|
1032
1035
|
}
|
|
1033
|
-
function
|
|
1036
|
+
function je(e) {
|
|
1034
1037
|
if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
|
|
1035
|
-
const t = e.components.find((r) => r.id ===
|
|
1038
|
+
const t = e.components.find((r) => r.id === ve);
|
|
1036
1039
|
if (!t) return e.components.length === 0;
|
|
1037
1040
|
const n = t.children;
|
|
1038
1041
|
return !Array.isArray(n) || n.length === 0;
|
|
1039
1042
|
}
|
|
1040
|
-
function
|
|
1043
|
+
function Ct(e, t) {
|
|
1041
1044
|
const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, a = (e.title ?? "").trim(), s = (e.description ?? "").trim();
|
|
1042
1045
|
i && a && (n.push({ id: Oe, component: "Text", text: a, variant: "h2" }), r.push(Oe)), i && s && (n.push({ id: Ve, component: "Text", text: s, variant: "body" }), r.push(Ve));
|
|
1043
1046
|
for (const d of e.blocks ?? []) {
|
|
1044
|
-
const { node:
|
|
1045
|
-
|
|
1047
|
+
const { node: m, dataKey: b, dataValue: g } = lr(d);
|
|
1048
|
+
m && (n.push(m), r.push(m.id), b && (o[b] = g));
|
|
1046
1049
|
}
|
|
1047
|
-
n.unshift({ id:
|
|
1048
|
-
const c = { root:
|
|
1050
|
+
n.unshift({ id: ve, component: "Column", children: r });
|
|
1051
|
+
const c = { root: ve, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
|
|
1049
1052
|
return u !== void 0 && (c.surfaceProperties = { styleId: u ?? null }), c;
|
|
1050
1053
|
}
|
|
1051
|
-
function
|
|
1054
|
+
function cr(e) {
|
|
1052
1055
|
const t = /* @__PURE__ */ new Map();
|
|
1053
1056
|
for (const n of e.components ?? [])
|
|
1054
1057
|
n && typeof n.id == "string" && t.set(n.id, n);
|
|
@@ -1065,10 +1068,10 @@ function ze(e) {
|
|
|
1065
1068
|
};
|
|
1066
1069
|
}).filter((n) => !!n) : [];
|
|
1067
1070
|
}
|
|
1068
|
-
function
|
|
1069
|
-
const t = typeof e.id == "string" ? e.id : ie("block-"), n = String(e.component ?? ""), r =
|
|
1071
|
+
function ur(e) {
|
|
1072
|
+
const t = typeof e.id == "string" ? e.id : ie("block-"), n = String(e.component ?? ""), r = z(e.label) ?? z(e.text) ?? "", o = ot(e.value), i = (s) => ({ id: t, type: s, label: r }), a = tr(n);
|
|
1070
1073
|
if (a)
|
|
1071
|
-
return a.fromComponent(e, i, { asLiteral:
|
|
1074
|
+
return a.fromComponent(e, i, { asLiteral: z, nameFromValue: ot });
|
|
1072
1075
|
switch (n) {
|
|
1073
1076
|
case "Text": {
|
|
1074
1077
|
const s = String(e.variant ?? "body"), c = /^h[1-6]$/i.test(s) || s === "title" || s === "subtitle";
|
|
@@ -1077,8 +1080,8 @@ function nr(e) {
|
|
|
1077
1080
|
case "TextField": {
|
|
1078
1081
|
const s = String(e.variant ?? "shortText");
|
|
1079
1082
|
let c = "text";
|
|
1080
|
-
s === "longText" ? c = "textarea" : s === "number" ? c = "number" :
|
|
1081
|
-
const u = { ...i(c), name: o }, d =
|
|
1083
|
+
s === "longText" ? c = "textarea" : s === "number" ? c = "number" : z(e.validationRegexp) === Je && (c = "email");
|
|
1084
|
+
const u = { ...i(c), name: o }, d = z(e.placeholder);
|
|
1082
1085
|
return d && (u.placeholder = d), u;
|
|
1083
1086
|
}
|
|
1084
1087
|
case "CheckBox":
|
|
@@ -1088,45 +1091,45 @@ function nr(e) {
|
|
|
1088
1091
|
...i(c),
|
|
1089
1092
|
name: o,
|
|
1090
1093
|
options: ze(e)
|
|
1091
|
-
}, d =
|
|
1094
|
+
}, d = z(e.placeholder);
|
|
1092
1095
|
return d && (u.placeholder = d), u;
|
|
1093
1096
|
}
|
|
1094
1097
|
case "ChoicePicker": {
|
|
1095
|
-
const s =
|
|
1098
|
+
const s = z(e.skoponPickerType);
|
|
1096
1099
|
if (s === "select" || s === "multiselect" || s === "radio" || s === "checkbox") {
|
|
1097
1100
|
const d = {
|
|
1098
1101
|
...i(s),
|
|
1099
1102
|
name: o,
|
|
1100
1103
|
options: ze(e)
|
|
1101
|
-
},
|
|
1102
|
-
return
|
|
1104
|
+
}, m = z(e.placeholder);
|
|
1105
|
+
return m && (d.placeholder = m), d;
|
|
1103
1106
|
}
|
|
1104
1107
|
const u = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
|
|
1105
1108
|
return { ...i(u), name: o, options: ze(e) };
|
|
1106
1109
|
}
|
|
1107
1110
|
case "DateTimeInput": {
|
|
1108
|
-
const s = e.enableDate === !0, c = e.enableTime === !0, d = { ...i(!s && c ? "time" : "datetime"), name: o },
|
|
1109
|
-
return
|
|
1111
|
+
const s = e.enableDate === !0, c = e.enableTime === !0, d = { ...i(!s && c ? "time" : "datetime"), name: o }, m = z(e.placeholder);
|
|
1112
|
+
return m && (d.placeholder = m), d;
|
|
1110
1113
|
}
|
|
1111
1114
|
case "SkoponMedia": {
|
|
1112
1115
|
const s = String(e.mediaType ?? "image");
|
|
1113
|
-
return
|
|
1116
|
+
return me(e, s === "video" ? "video" : s === "audio" ? "audio" : "image", r);
|
|
1114
1117
|
}
|
|
1115
1118
|
case "Image":
|
|
1116
|
-
return
|
|
1119
|
+
return me(e, "image", r);
|
|
1117
1120
|
case "Video":
|
|
1118
|
-
return
|
|
1121
|
+
return me(e, "video", r);
|
|
1119
1122
|
case "AudioPlayer":
|
|
1120
|
-
return
|
|
1123
|
+
return me(e, "audio", r);
|
|
1121
1124
|
case "FileUpload": {
|
|
1122
|
-
const s =
|
|
1125
|
+
const s = z(e.accept) ?? "", c = { ...i("file"), name: o };
|
|
1123
1126
|
return s && (c.fileAcceptExtensions = s.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (c.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (c.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (c.fileMinCount = e.minCount), typeof e.maxCount == "number" && (c.fileMaxCount = e.maxCount), c;
|
|
1124
1127
|
}
|
|
1125
1128
|
default:
|
|
1126
1129
|
return null;
|
|
1127
1130
|
}
|
|
1128
1131
|
}
|
|
1129
|
-
function
|
|
1132
|
+
function xt(e, t, n, r) {
|
|
1130
1133
|
if (n.has(e)) return;
|
|
1131
1134
|
n.add(e);
|
|
1132
1135
|
const o = t.get(e);
|
|
@@ -1134,47 +1137,47 @@ function yt(e, t, n, r) {
|
|
|
1134
1137
|
const i = String(o.component ?? "");
|
|
1135
1138
|
if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
|
|
1136
1139
|
for (const a of o.children)
|
|
1137
|
-
typeof a == "string" &&
|
|
1140
|
+
typeof a == "string" && xt(a, t, n, r);
|
|
1138
1141
|
return;
|
|
1139
1142
|
}
|
|
1140
1143
|
r.push(o);
|
|
1141
1144
|
}
|
|
1142
|
-
function
|
|
1145
|
+
function pr(e, t) {
|
|
1143
1146
|
return t ? e.map((n) => {
|
|
1144
1147
|
var i;
|
|
1145
1148
|
const r = (i = n.name) == null ? void 0 : i.trim();
|
|
1146
1149
|
if (!r || !(r in t)) return n;
|
|
1147
1150
|
const o = t[r];
|
|
1148
|
-
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue:
|
|
1151
|
+
return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: le(o) } : { ...n, defaultValue: o };
|
|
1149
1152
|
}) : e;
|
|
1150
1153
|
}
|
|
1151
|
-
function
|
|
1154
|
+
function mr(e) {
|
|
1152
1155
|
if (!e || !Array.isArray(e.components))
|
|
1153
|
-
return
|
|
1154
|
-
const t =
|
|
1155
|
-
|
|
1156
|
+
return ge({ title: "", description: "", blocks: [], jsonSchema: {} });
|
|
1157
|
+
const t = cr(e), n = [];
|
|
1158
|
+
xt(e.root ?? ve, t, /* @__PURE__ */ new Set(), n);
|
|
1156
1159
|
let r = "", o = "";
|
|
1157
1160
|
const i = [];
|
|
1158
1161
|
for (const a of n) {
|
|
1159
1162
|
if (a.id === Oe) {
|
|
1160
|
-
r =
|
|
1163
|
+
r = z(a.text) ?? r;
|
|
1161
1164
|
continue;
|
|
1162
1165
|
}
|
|
1163
1166
|
if (a.id === Ve) {
|
|
1164
|
-
o =
|
|
1167
|
+
o = z(a.text) ?? o;
|
|
1165
1168
|
continue;
|
|
1166
1169
|
}
|
|
1167
|
-
const s =
|
|
1170
|
+
const s = ur(a);
|
|
1168
1171
|
s && i.push(s);
|
|
1169
1172
|
}
|
|
1170
|
-
return
|
|
1173
|
+
return ge({
|
|
1171
1174
|
title: r,
|
|
1172
1175
|
description: o,
|
|
1173
|
-
blocks:
|
|
1176
|
+
blocks: pr(i, e.dataModel),
|
|
1174
1177
|
jsonSchema: {}
|
|
1175
1178
|
});
|
|
1176
1179
|
}
|
|
1177
|
-
function
|
|
1180
|
+
function dr(e, t) {
|
|
1178
1181
|
const { surfaceId: n, catalogId: r } = t, o = [
|
|
1179
1182
|
{ version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
|
|
1180
1183
|
{
|
|
@@ -1187,24 +1190,25 @@ function ir(e, t) {
|
|
|
1187
1190
|
updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
|
|
1188
1191
|
}), o;
|
|
1189
1192
|
}
|
|
1190
|
-
function
|
|
1193
|
+
function kt(e) {
|
|
1191
1194
|
return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
|
|
1192
1195
|
}
|
|
1193
|
-
function
|
|
1196
|
+
function fr(e, t) {
|
|
1194
1197
|
if (!e || typeof e != "object") return null;
|
|
1195
|
-
const n = e, r =
|
|
1196
|
-
if (r && !
|
|
1198
|
+
const n = e, r = kt(n.a2ui) ? n.a2ui : void 0;
|
|
1199
|
+
if (r && !je(r)) return r;
|
|
1197
1200
|
const o = Array.isArray(n.blocks) ? n.blocks : [];
|
|
1198
1201
|
if (o.length === 0) return null;
|
|
1199
|
-
const i =
|
|
1202
|
+
const i = ee({
|
|
1200
1203
|
title: typeof n.title == "string" ? n.title : "",
|
|
1201
1204
|
description: typeof n.description == "string" ? n.description : "",
|
|
1202
|
-
blocks: o
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
+
blocks: o,
|
|
1206
|
+
jsonSchema: Ge(n.jsonSchema ?? n.json_schema)
|
|
1207
|
+
}), a = Ct(i, t);
|
|
1208
|
+
return je(a) ? null : a;
|
|
1205
1209
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return
|
|
1210
|
+
function hr(e, t, n) {
|
|
1211
|
+
return Ct(
|
|
1208
1212
|
{
|
|
1209
1213
|
title: e.title,
|
|
1210
1214
|
description: e.description,
|
|
@@ -1213,17 +1217,18 @@ function lr(e, t, n) {
|
|
|
1213
1217
|
n
|
|
1214
1218
|
);
|
|
1215
1219
|
}
|
|
1216
|
-
function
|
|
1220
|
+
function gr(e) {
|
|
1217
1221
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1218
1222
|
return;
|
|
1219
1223
|
const t = e;
|
|
1220
|
-
return !(Array.isArray(t.blocks) && t.blocks.length > 0) &&
|
|
1224
|
+
return !(Array.isArray(t.blocks) && t.blocks.length > 0) && kt(t.a2ui) ? mr(t.a2ui) : ee({
|
|
1221
1225
|
title: typeof t.title == "string" ? t.title : "",
|
|
1222
1226
|
description: typeof t.description == "string" ? t.description : "",
|
|
1223
|
-
blocks: Array.isArray(t.blocks) ? t.blocks : []
|
|
1227
|
+
blocks: Array.isArray(t.blocks) ? t.blocks : [],
|
|
1228
|
+
jsonSchema: Ge(t.jsonSchema ?? t.json_schema)
|
|
1224
1229
|
});
|
|
1225
1230
|
}
|
|
1226
|
-
function
|
|
1231
|
+
function yr(e, t, n) {
|
|
1227
1232
|
const r = e.model.surfacesMap.get(t);
|
|
1228
1233
|
if (!r) return {};
|
|
1229
1234
|
const o = {};
|
|
@@ -1233,14 +1238,15 @@ function cr(e, t, n) {
|
|
|
1233
1238
|
}
|
|
1234
1239
|
return o;
|
|
1235
1240
|
}
|
|
1236
|
-
function
|
|
1237
|
-
return
|
|
1241
|
+
function vr(e) {
|
|
1242
|
+
return ee({
|
|
1238
1243
|
title: "",
|
|
1239
1244
|
description: "",
|
|
1240
|
-
blocks: [e]
|
|
1245
|
+
blocks: [e],
|
|
1246
|
+
jsonSchema: {}
|
|
1241
1247
|
}).blocks[0];
|
|
1242
1248
|
}
|
|
1243
|
-
function
|
|
1249
|
+
function Sr(e, t) {
|
|
1244
1250
|
var o, i;
|
|
1245
1251
|
const n = /* @__PURE__ */ new Map();
|
|
1246
1252
|
for (const a of t) {
|
|
@@ -1249,8 +1255,8 @@ function pr(e, t) {
|
|
|
1249
1255
|
}
|
|
1250
1256
|
const r = [];
|
|
1251
1257
|
for (const a of e.blocks) {
|
|
1252
|
-
if (
|
|
1253
|
-
r.push(
|
|
1258
|
+
if (be(a.type)) {
|
|
1259
|
+
r.push(vr(a));
|
|
1254
1260
|
continue;
|
|
1255
1261
|
}
|
|
1256
1262
|
if (!W(a.type)) continue;
|
|
@@ -1261,69 +1267,72 @@ function pr(e, t) {
|
|
|
1261
1267
|
}
|
|
1262
1268
|
return r;
|
|
1263
1269
|
}
|
|
1264
|
-
function
|
|
1270
|
+
function br(e, t) {
|
|
1265
1271
|
var r;
|
|
1266
1272
|
const n = {
|
|
1267
1273
|
...e,
|
|
1268
1274
|
name: ((r = e.name) == null ? void 0 : r.trim()) || t.name
|
|
1269
1275
|
};
|
|
1270
|
-
return t.defaultValue !== void 0 && (n.defaultValue = t.defaultValue),
|
|
1276
|
+
return t.defaultValue !== void 0 && (n.defaultValue = t.defaultValue), ee({
|
|
1271
1277
|
title: "",
|
|
1272
1278
|
description: "",
|
|
1273
|
-
blocks: [n]
|
|
1279
|
+
blocks: [n],
|
|
1280
|
+
jsonSchema: {}
|
|
1274
1281
|
}).blocks[0];
|
|
1275
1282
|
}
|
|
1276
|
-
function
|
|
1283
|
+
function At(e) {
|
|
1277
1284
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1278
1285
|
const t = e;
|
|
1279
|
-
return Array.isArray(t.blocks) ?
|
|
1286
|
+
return Array.isArray(t.blocks) ? ee({
|
|
1280
1287
|
title: typeof t.title == "string" ? t.title : "",
|
|
1281
1288
|
description: typeof t.description == "string" ? t.description : "",
|
|
1282
|
-
blocks: t.blocks
|
|
1289
|
+
blocks: t.blocks,
|
|
1290
|
+
jsonSchema: {}
|
|
1283
1291
|
}) : null;
|
|
1284
1292
|
}
|
|
1285
|
-
function
|
|
1293
|
+
function Cr(e, t) {
|
|
1286
1294
|
var i, a, s, c, u, d;
|
|
1287
1295
|
const n = /* @__PURE__ */ new Map();
|
|
1288
|
-
for (const
|
|
1289
|
-
W(
|
|
1296
|
+
for (const m of (t == null ? void 0 : t.blocks) ?? [])
|
|
1297
|
+
W(m.type) && ((i = m.name) != null && i.trim()) && n.set(m.name.trim(), m);
|
|
1290
1298
|
const r = [], o = [];
|
|
1291
|
-
for (const
|
|
1292
|
-
if (!W(
|
|
1293
|
-
const
|
|
1294
|
-
if (!
|
|
1295
|
-
const g = n.get(
|
|
1296
|
-
g ? r.push(
|
|
1297
|
-
|
|
1299
|
+
for (const m of e.blocks) {
|
|
1300
|
+
if (!W(m.type)) continue;
|
|
1301
|
+
const b = (a = m.name) == null ? void 0 : a.trim();
|
|
1302
|
+
if (!b) continue;
|
|
1303
|
+
const g = n.get(b);
|
|
1304
|
+
g ? r.push(br(g, m)) : o.push(
|
|
1305
|
+
ee({
|
|
1298
1306
|
title: "",
|
|
1299
1307
|
description: "",
|
|
1300
|
-
blocks: [
|
|
1308
|
+
blocks: [m],
|
|
1309
|
+
jsonSchema: {}
|
|
1301
1310
|
}).blocks[0]
|
|
1302
1311
|
);
|
|
1303
1312
|
}
|
|
1304
1313
|
return {
|
|
1305
1314
|
matchedBlocks: r,
|
|
1306
1315
|
extraBlocks: o,
|
|
1307
|
-
renderBlocks:
|
|
1316
|
+
renderBlocks: Sr(e, r),
|
|
1308
1317
|
title: ((s = e.title) == null ? void 0 : s.trim()) || ((c = t == null ? void 0 : t.title) == null ? void 0 : c.trim()) || "",
|
|
1309
1318
|
description: ((u = e.description) == null ? void 0 : u.trim()) || ((d = t == null ? void 0 : t.description) == null ? void 0 : d.trim()) || ""
|
|
1310
1319
|
};
|
|
1311
1320
|
}
|
|
1312
|
-
function
|
|
1321
|
+
function xr(e) {
|
|
1313
1322
|
const { type: t, defaultValue: n } = e;
|
|
1314
1323
|
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 : "";
|
|
1315
1324
|
}
|
|
1316
|
-
function
|
|
1325
|
+
function Tt(e) {
|
|
1317
1326
|
var n;
|
|
1318
1327
|
const t = {};
|
|
1319
1328
|
for (const r of e) {
|
|
1320
1329
|
if (!W(r.type)) continue;
|
|
1321
1330
|
const o = (n = r.name) == null ? void 0 : n.trim();
|
|
1322
|
-
o && (t[o] =
|
|
1331
|
+
o && (t[o] = xr(r));
|
|
1323
1332
|
}
|
|
1324
1333
|
return t;
|
|
1325
1334
|
}
|
|
1326
|
-
function
|
|
1335
|
+
function kr(e) {
|
|
1327
1336
|
return e.blocks.some(
|
|
1328
1337
|
(t) => {
|
|
1329
1338
|
var n;
|
|
@@ -1331,53 +1340,53 @@ function hr(e) {
|
|
|
1331
1340
|
}
|
|
1332
1341
|
);
|
|
1333
1342
|
}
|
|
1334
|
-
function
|
|
1343
|
+
function Ar(e) {
|
|
1335
1344
|
return e.blocks.filter((t) => {
|
|
1336
1345
|
var n;
|
|
1337
|
-
return
|
|
1346
|
+
return be(t.type) ? !0 : W(t.type) && !!((n = t.name) != null && n.trim());
|
|
1338
1347
|
});
|
|
1339
1348
|
}
|
|
1340
|
-
function
|
|
1349
|
+
function Tr(e) {
|
|
1341
1350
|
return e.blocks.filter((t) => {
|
|
1342
1351
|
var n;
|
|
1343
1352
|
return W(t.type) && ((n = t.name) == null ? void 0 : n.trim());
|
|
1344
1353
|
}).map((t) => t.name.trim());
|
|
1345
1354
|
}
|
|
1346
|
-
function
|
|
1355
|
+
function It(e) {
|
|
1347
1356
|
return e.replace(/'/g, "'\\''");
|
|
1348
1357
|
}
|
|
1349
|
-
function
|
|
1358
|
+
function Nt(e, t) {
|
|
1350
1359
|
const n = (t ?? "").trim() || "<callback_url>", r = JSON.stringify(e ?? {}, null, 2);
|
|
1351
1360
|
return [
|
|
1352
1361
|
`curl -X POST '${n}' \\`,
|
|
1353
1362
|
" -H 'Content-Type: application/json' \\",
|
|
1354
|
-
` -d '${
|
|
1363
|
+
` -d '${It(r)}'`
|
|
1355
1364
|
].join(`
|
|
1356
1365
|
`);
|
|
1357
1366
|
}
|
|
1358
|
-
function
|
|
1367
|
+
function Ir(e, t) {
|
|
1359
1368
|
return JSON.stringify({ ...e, ...t }, null, 2);
|
|
1360
1369
|
}
|
|
1361
|
-
function
|
|
1370
|
+
function Mt({
|
|
1362
1371
|
cardValues: e,
|
|
1363
1372
|
extraValues: t = {},
|
|
1364
1373
|
callbackUrl: n
|
|
1365
1374
|
}) {
|
|
1366
|
-
const r = (n ?? "").trim() || "<callback_url>", o =
|
|
1375
|
+
const r = (n ?? "").trim() || "<callback_url>", o = Ir(e, t);
|
|
1367
1376
|
return [
|
|
1368
1377
|
`curl -X POST '${r}' \\`,
|
|
1369
1378
|
" -H 'Content-Type: application/json' \\",
|
|
1370
|
-
` -d '${
|
|
1379
|
+
` -d '${It(o)}'`
|
|
1371
1380
|
].join(`
|
|
1372
1381
|
`);
|
|
1373
1382
|
}
|
|
1374
|
-
function
|
|
1375
|
-
const n =
|
|
1376
|
-
if (!n) return
|
|
1377
|
-
const r =
|
|
1378
|
-
return
|
|
1383
|
+
function Nr(e, t) {
|
|
1384
|
+
const n = At(e);
|
|
1385
|
+
if (!n) return Nt(e, t);
|
|
1386
|
+
const r = Tt(n.blocks);
|
|
1387
|
+
return Mt({ cardValues: r, callbackUrl: t });
|
|
1379
1388
|
}
|
|
1380
|
-
async function
|
|
1389
|
+
async function Mr(e, t, n) {
|
|
1381
1390
|
const r = e.trim();
|
|
1382
1391
|
if (!r)
|
|
1383
1392
|
throw new Error("callback_url 为空");
|
|
@@ -1404,7 +1413,7 @@ async function Sr(e, t, n) {
|
|
|
1404
1413
|
}
|
|
1405
1414
|
return { ok: i.ok, status: i.status, body: a };
|
|
1406
1415
|
}
|
|
1407
|
-
async function
|
|
1416
|
+
async function Ft(e) {
|
|
1408
1417
|
var n;
|
|
1409
1418
|
if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
|
|
1410
1419
|
await navigator.clipboard.writeText(e);
|
|
@@ -1420,7 +1429,7 @@ async function At(e) {
|
|
|
1420
1429
|
document.body.removeChild(t);
|
|
1421
1430
|
}
|
|
1422
1431
|
}
|
|
1423
|
-
async function
|
|
1432
|
+
async function Ye(e) {
|
|
1424
1433
|
let t;
|
|
1425
1434
|
try {
|
|
1426
1435
|
t = await e.json();
|
|
@@ -1433,10 +1442,37 @@ async function xr(e) {
|
|
|
1433
1442
|
throw new Error(t.message || `响应缺少 data (${e.status})`);
|
|
1434
1443
|
return t.data;
|
|
1435
1444
|
}
|
|
1436
|
-
|
|
1445
|
+
const Fr = "auth_user", _r = "token";
|
|
1446
|
+
function Pr(e) {
|
|
1447
|
+
if (typeof window > "u") return null;
|
|
1448
|
+
try {
|
|
1449
|
+
return e === "localStorage" ? window.localStorage : window.sessionStorage;
|
|
1450
|
+
} catch {
|
|
1451
|
+
return null;
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
function Ur(e, t) {
|
|
1455
|
+
try {
|
|
1456
|
+
const r = JSON.parse(e)[t];
|
|
1457
|
+
return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
|
|
1458
|
+
} catch {
|
|
1459
|
+
return "";
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
function zr(e = {}) {
|
|
1463
|
+
const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Fr, r = e.tokenField ?? _r, o = Pr(t);
|
|
1464
|
+
if (!o) return {};
|
|
1465
|
+
const i = o.getItem(n);
|
|
1466
|
+
if (!i) return {};
|
|
1467
|
+
const a = Ur(i, r);
|
|
1468
|
+
return a ? { Authorization: `Bearer ${a}` } : {};
|
|
1469
|
+
}
|
|
1470
|
+
async function Xe(e = {}) {
|
|
1471
|
+
return e.getHeaders ? await e.getHeaders() ?? {} : zr(e.authStorage);
|
|
1472
|
+
}
|
|
1473
|
+
function Er(e = {}) {
|
|
1437
1474
|
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
|
|
1438
1475
|
async function o(i) {
|
|
1439
|
-
var p;
|
|
1440
1476
|
const a = new URLSearchParams();
|
|
1441
1477
|
if (i.formId !== void 0)
|
|
1442
1478
|
a.set("form_id", String(i.formId));
|
|
@@ -1444,34 +1480,219 @@ function co(e = {}) {
|
|
|
1444
1480
|
a.set("form_unique_id", i.formUniqueId);
|
|
1445
1481
|
else
|
|
1446
1482
|
throw new Error("form_id 或 form_unique_id 至少传一个");
|
|
1447
|
-
const s = await (
|
|
1483
|
+
const s = await Xe(e), c = await r(`${t}${n}?${a.toString()}`, {
|
|
1448
1484
|
method: "GET",
|
|
1449
1485
|
headers: s
|
|
1450
|
-
}), u = await
|
|
1486
|
+
}), u = await Ye(c), d = gr(u.form_definition);
|
|
1451
1487
|
return {
|
|
1452
1488
|
formUniqueId: u.form_unique_id,
|
|
1453
1489
|
formId: u.form_id,
|
|
1454
1490
|
disabled: u.disabled === 1,
|
|
1455
1491
|
formDefinition: d,
|
|
1456
|
-
a2ui:
|
|
1492
|
+
a2ui: fr(u.form_definition) ?? void 0
|
|
1457
1493
|
};
|
|
1458
1494
|
}
|
|
1459
1495
|
return { fetchDetail: o };
|
|
1460
1496
|
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1497
|
+
function Rr(e) {
|
|
1498
|
+
return {
|
|
1499
|
+
resumeUniqueId: e.resume_unique_id,
|
|
1500
|
+
resumeId: e.resume_id,
|
|
1501
|
+
agentId: e.agent_id,
|
|
1502
|
+
name: e.name,
|
|
1503
|
+
avatarUrl: e.avatar_url ?? null,
|
|
1504
|
+
description: e.description ?? void 0,
|
|
1505
|
+
satisfaction: e.satisfaction,
|
|
1506
|
+
published: e.published,
|
|
1507
|
+
worksCount: e.works_count,
|
|
1508
|
+
personality: e.personality_json ?? [],
|
|
1509
|
+
specialties: e.specialties_json ?? [],
|
|
1510
|
+
traits: e.traits_json ?? [],
|
|
1511
|
+
works: (e.works_json ?? []).map((t) => ({
|
|
1512
|
+
title: t.title ?? "",
|
|
1513
|
+
coverUrl: t.cover_url ?? null,
|
|
1514
|
+
link: t.link
|
|
1515
|
+
}))
|
|
1516
|
+
};
|
|
1517
|
+
}
|
|
1518
|
+
function Br(e, t) {
|
|
1519
|
+
const n = new URLSearchParams();
|
|
1520
|
+
n.set("page", String(t)), n.set("page_size", String(e.pageSize ?? 20));
|
|
1521
|
+
for (const r of e.names ?? [])
|
|
1522
|
+
r && n.append("name", r);
|
|
1523
|
+
for (const r of e.agentUniqueIds ?? [])
|
|
1524
|
+
r && n.append("agent_unique_id", r);
|
|
1525
|
+
for (const r of e.resumeUniqueIds ?? [])
|
|
1526
|
+
r && n.append("resume_unique_id", r);
|
|
1527
|
+
return n;
|
|
1528
|
+
}
|
|
1529
|
+
function wr(e = {}) {
|
|
1530
|
+
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch;
|
|
1531
|
+
return async ({ filter: o, page: i }) => {
|
|
1532
|
+
const a = await Xe(e), s = Br(o, i), c = await r(`${t}${n}?${s.toString()}`, {
|
|
1533
|
+
method: "GET",
|
|
1534
|
+
headers: a
|
|
1535
|
+
}), u = await Ye(c);
|
|
1536
|
+
return {
|
|
1537
|
+
list: (u.list ?? []).map(Rr),
|
|
1538
|
+
total: u.total ?? 0,
|
|
1539
|
+
page: u.page ?? i,
|
|
1540
|
+
pageSize: u.page_size ?? o.pageSize ?? 20
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1543
|
+
}
|
|
1544
|
+
function qr(e) {
|
|
1545
|
+
var r, o, i, a;
|
|
1546
|
+
const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!((o = e.agentUniqueId) != null && o.trim() && ((i = e.flowType) != null && i.trim()) && ((a = e.category) != null && a.trim()));
|
|
1547
|
+
return t || n;
|
|
1548
|
+
}
|
|
1549
|
+
function Or(e) {
|
|
1550
|
+
return {
|
|
1551
|
+
caseUniqueId: e.case_unique_id,
|
|
1552
|
+
caseId: e.case_id,
|
|
1553
|
+
flowId: e.flow_id,
|
|
1554
|
+
name: e.name,
|
|
1555
|
+
link: e.link,
|
|
1556
|
+
platform: e.platform ?? null,
|
|
1557
|
+
description: e.description ?? void 0
|
|
1558
|
+
};
|
|
1559
|
+
}
|
|
1560
|
+
function Vr(e, t, n) {
|
|
1561
|
+
var o, i, a;
|
|
1562
|
+
const r = new URLSearchParams();
|
|
1563
|
+
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()), (a = e.category) != null && a.trim() && r.set("category_unique_id", e.category.trim());
|
|
1564
|
+
for (const s of e.flowUniqueIds ?? [])
|
|
1565
|
+
s && r.append("flow_unique_ids", s);
|
|
1566
|
+
return r;
|
|
1567
|
+
}
|
|
1568
|
+
function jr(e = {}) {
|
|
1569
|
+
const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
|
|
1570
|
+
return async ({ filter: i, page: a }) => {
|
|
1571
|
+
if (!qr(i))
|
|
1572
|
+
return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
|
|
1573
|
+
const s = await Xe(e), c = Vr(i, a, o), u = await r(`${t}${n}?${c.toString()}`, {
|
|
1574
|
+
method: "GET",
|
|
1575
|
+
headers: s
|
|
1576
|
+
}), d = await Ye(u);
|
|
1577
|
+
return {
|
|
1578
|
+
list: (d.list ?? []).map(Or),
|
|
1579
|
+
total: d.total ?? 0,
|
|
1580
|
+
page: d.page ?? a,
|
|
1581
|
+
pageSize: d.page_size ?? i.pageSize ?? 20
|
|
1582
|
+
};
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
function Uo(e = {}) {
|
|
1586
|
+
var r, o, i, a;
|
|
1587
|
+
const t = {
|
|
1588
|
+
baseUrl: e.baseUrl,
|
|
1589
|
+
fetch: e.fetch,
|
|
1590
|
+
getHeaders: e.getHeaders,
|
|
1591
|
+
authStorage: e.authStorage
|
|
1592
|
+
};
|
|
1593
|
+
return {
|
|
1594
|
+
fetchDetail: Er({
|
|
1595
|
+
...t,
|
|
1596
|
+
detailPath: (r = e.form) == null ? void 0 : r.detailPath
|
|
1597
|
+
}).fetchDetail,
|
|
1598
|
+
resumeSearch: wr({
|
|
1599
|
+
...t,
|
|
1600
|
+
searchPath: (o = e.resume) == null ? void 0 : o.searchPath
|
|
1601
|
+
}),
|
|
1602
|
+
caseSearch: jr({
|
|
1603
|
+
...t,
|
|
1604
|
+
listPath: (i = e.case) == null ? void 0 : i.listPath,
|
|
1605
|
+
published: (a = e.case) == null ? void 0 : a.published
|
|
1606
|
+
})
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
function _t(e, t) {
|
|
1610
|
+
if (!t.trim()) return !0;
|
|
1611
|
+
try {
|
|
1612
|
+
return new RegExp(t).test(e);
|
|
1613
|
+
} catch {
|
|
1614
|
+
return !0;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
function Pt(e) {
|
|
1618
|
+
return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
|
|
1619
|
+
}
|
|
1620
|
+
function Lr(e, t) {
|
|
1621
|
+
switch (e.type) {
|
|
1622
|
+
case "multiselect":
|
|
1623
|
+
case "checkbox":
|
|
1624
|
+
case "file":
|
|
1625
|
+
case "resume_multiselect":
|
|
1626
|
+
case "case_multiselect":
|
|
1627
|
+
return O(t).length === 0;
|
|
1628
|
+
case "toggle":
|
|
1629
|
+
return !le(t);
|
|
1630
|
+
case "number":
|
|
1631
|
+
return t == null || t === "";
|
|
1632
|
+
default:
|
|
1633
|
+
return Pt(t);
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
function Ee(e, t) {
|
|
1637
|
+
return e.required === !0 || t > 0;
|
|
1638
|
+
}
|
|
1639
|
+
function $r(e, t) {
|
|
1640
|
+
var n, r;
|
|
1641
|
+
for (const o of e) {
|
|
1642
|
+
const i = (n = o.name) == null ? void 0 : n.trim();
|
|
1643
|
+
if (!i || be(o.type) || he(o.type)) continue;
|
|
1644
|
+
const a = t[i], s = ((r = o.label) == null ? void 0 : r.trim()) || i;
|
|
1645
|
+
if (o.required && Lr(o, a))
|
|
1646
|
+
return { fieldName: i, label: s, message: `请填写「${s}」` };
|
|
1647
|
+
if (o.type === "email" && !Pt(a)) {
|
|
1648
|
+
const c = String(a).trim();
|
|
1649
|
+
if (!_t(c, Je))
|
|
1650
|
+
return { fieldName: i, label: s, message: `「${s}」格式不正确` };
|
|
1651
|
+
}
|
|
1652
|
+
if (o.type === "file") {
|
|
1653
|
+
const c = o.fileMinCount ?? 0, u = O(a).length;
|
|
1654
|
+
if (c > 0 && u < c && Ee(o, u))
|
|
1655
|
+
return {
|
|
1656
|
+
fieldName: i,
|
|
1657
|
+
label: s,
|
|
1658
|
+
message: `「${s}」至少需要 ${c} 个文件`
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
if (o.type === "resume_multiselect") {
|
|
1662
|
+
const c = o.resumeMinCount, u = O(a).length;
|
|
1663
|
+
if (c !== void 0 && u < c && Ee(o, u))
|
|
1664
|
+
return {
|
|
1665
|
+
fieldName: i,
|
|
1666
|
+
label: s,
|
|
1667
|
+
message: `「${s}」至少选择 ${c} 项`
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
if (o.type === "case_multiselect") {
|
|
1671
|
+
const c = o.caseMinCount, u = O(a).length;
|
|
1672
|
+
if (c !== void 0 && u < c && Ee(o, u))
|
|
1673
|
+
return {
|
|
1674
|
+
fieldName: i,
|
|
1675
|
+
label: s,
|
|
1676
|
+
message: `「${s}」至少选择 ${c} 项`
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
return null;
|
|
1681
|
+
}
|
|
1682
|
+
const Dr = {
|
|
1683
|
+
video: Qt,
|
|
1684
|
+
audio: Wt,
|
|
1685
|
+
image: Xt,
|
|
1686
|
+
file: st,
|
|
1687
|
+
spreadsheet: Yt,
|
|
1688
|
+
document: at
|
|
1468
1689
|
};
|
|
1469
|
-
function
|
|
1690
|
+
function Hr({
|
|
1470
1691
|
type: e,
|
|
1471
1692
|
size: t = 40,
|
|
1472
1693
|
className: n
|
|
1473
1694
|
}) {
|
|
1474
|
-
const r =
|
|
1695
|
+
const r = Dr[e] ?? st;
|
|
1475
1696
|
return /* @__PURE__ */ l(
|
|
1476
1697
|
r,
|
|
1477
1698
|
{
|
|
@@ -1481,7 +1702,7 @@ function kr({
|
|
|
1481
1702
|
}
|
|
1482
1703
|
);
|
|
1483
1704
|
}
|
|
1484
|
-
const
|
|
1705
|
+
const Ut = "skopon-form-v0_9", Kr = /* @__PURE__ */ new Set([
|
|
1485
1706
|
"SkoponMedia",
|
|
1486
1707
|
"SkoponSelect",
|
|
1487
1708
|
"Image",
|
|
@@ -1493,24 +1714,24 @@ const Tt = "skopon-form-v0_9", Ar = /* @__PURE__ */ new Set([
|
|
|
1493
1714
|
"FileUpload",
|
|
1494
1715
|
"TextField",
|
|
1495
1716
|
"Text",
|
|
1496
|
-
...
|
|
1497
|
-
]),
|
|
1498
|
-
function
|
|
1499
|
-
const t = [...
|
|
1717
|
+
...rr()
|
|
1718
|
+
]), Gr = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
|
|
1719
|
+
function ce(e) {
|
|
1720
|
+
const t = [...fe.components.values()].find((n) => n.name === e);
|
|
1500
1721
|
if (!t) throw new Error(`Missing basic catalog component: ${e}`);
|
|
1501
1722
|
return t.schema;
|
|
1502
1723
|
}
|
|
1503
|
-
function
|
|
1724
|
+
function T(e) {
|
|
1504
1725
|
return typeof e == "string" ? e : "";
|
|
1505
1726
|
}
|
|
1506
|
-
function
|
|
1727
|
+
function zt(e) {
|
|
1507
1728
|
return Array.isArray(e) ? e.map((t) => {
|
|
1508
1729
|
if (!t || typeof t != "object") return null;
|
|
1509
1730
|
const n = t, r = String(n.value ?? n.label ?? ""), o = String(n.label ?? n.value ?? "");
|
|
1510
1731
|
return { value: r, label: o };
|
|
1511
1732
|
}).filter((t) => !!t) : [];
|
|
1512
1733
|
}
|
|
1513
|
-
function
|
|
1734
|
+
function xe({
|
|
1514
1735
|
mediaType: e,
|
|
1515
1736
|
urls: t,
|
|
1516
1737
|
mediaSize: n,
|
|
@@ -1518,17 +1739,17 @@ function be({
|
|
|
1518
1739
|
help: o,
|
|
1519
1740
|
placeholder: i
|
|
1520
1741
|
}) {
|
|
1521
|
-
const a = r == null ? void 0 : r.trim(), s = o == null ? void 0 : o.trim(), c =
|
|
1522
|
-
return /* @__PURE__ */
|
|
1742
|
+
const a = r == null ? void 0 : r.trim(), s = o == null ? void 0 : o.trim(), c = xn(n), u = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
|
|
1743
|
+
return /* @__PURE__ */ k("div", { className: "form-block-preview", children: [
|
|
1523
1744
|
a ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: a }) : null,
|
|
1524
|
-
t.length === 0 ? /* @__PURE__ */ l("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ l("div", { className: c, children: t.map((d,
|
|
1745
|
+
t.length === 0 ? /* @__PURE__ */ l("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ l("div", { className: c, children: t.map((d, m) => e === "image" ? /* @__PURE__ */ l(
|
|
1525
1746
|
"img",
|
|
1526
1747
|
{
|
|
1527
1748
|
src: d,
|
|
1528
1749
|
alt: a || "图片",
|
|
1529
1750
|
className: "form-media-item"
|
|
1530
1751
|
},
|
|
1531
|
-
`media-${
|
|
1752
|
+
`media-${m}`
|
|
1532
1753
|
) : e === "video" ? /* @__PURE__ */ l(
|
|
1533
1754
|
"video",
|
|
1534
1755
|
{
|
|
@@ -1536,7 +1757,7 @@ function be({
|
|
|
1536
1757
|
controls: !0,
|
|
1537
1758
|
className: "form-media-item"
|
|
1538
1759
|
},
|
|
1539
|
-
`media-${
|
|
1760
|
+
`media-${m}`
|
|
1540
1761
|
) : /* @__PURE__ */ l(
|
|
1541
1762
|
"audio",
|
|
1542
1763
|
{
|
|
@@ -1544,23 +1765,23 @@ function be({
|
|
|
1544
1765
|
controls: !0,
|
|
1545
1766
|
className: "form-media-item form-media-item--audio"
|
|
1546
1767
|
},
|
|
1547
|
-
`media-${
|
|
1768
|
+
`media-${m}`
|
|
1548
1769
|
)) }),
|
|
1549
|
-
s ? /* @__PURE__ */ l(
|
|
1770
|
+
s ? /* @__PURE__ */ l(D.Text, { type: "secondary", className: "form-block-preview-help", children: s }) : null
|
|
1550
1771
|
] });
|
|
1551
1772
|
}
|
|
1552
|
-
function
|
|
1553
|
-
const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) :
|
|
1773
|
+
function ke(e, t) {
|
|
1774
|
+
const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : T(e.url).trim() ? [T(e.url).trim()] : [];
|
|
1554
1775
|
return {
|
|
1555
1776
|
mediaType: t,
|
|
1556
1777
|
urls: n,
|
|
1557
|
-
mediaSize:
|
|
1558
|
-
label:
|
|
1559
|
-
help:
|
|
1560
|
-
placeholder:
|
|
1778
|
+
mediaSize: se(e.mediaSize),
|
|
1779
|
+
label: T(e.label) || T(e.description),
|
|
1780
|
+
help: T(e.help),
|
|
1781
|
+
placeholder: T(e.placeholder)
|
|
1561
1782
|
};
|
|
1562
1783
|
}
|
|
1563
|
-
const
|
|
1784
|
+
const Jr = {
|
|
1564
1785
|
name: "SkoponMedia",
|
|
1565
1786
|
schema: f.object({
|
|
1566
1787
|
mediaType: f.any().optional(),
|
|
@@ -1570,19 +1791,19 @@ const Mr = {
|
|
|
1570
1791
|
help: f.any().optional(),
|
|
1571
1792
|
placeholder: f.any().optional()
|
|
1572
1793
|
}).passthrough()
|
|
1573
|
-
},
|
|
1574
|
-
const t = e.componentModel.properties, n =
|
|
1575
|
-
return /* @__PURE__ */ l(
|
|
1576
|
-
}),
|
|
1577
|
-
{ name: "Image", schema:
|
|
1578
|
-
({ context: e }) => /* @__PURE__ */ l(
|
|
1579
|
-
),
|
|
1580
|
-
{ name: "Video", schema:
|
|
1581
|
-
({ context: e }) => /* @__PURE__ */ l(
|
|
1582
|
-
),
|
|
1583
|
-
{ name: "AudioPlayer", schema:
|
|
1584
|
-
({ context: e }) => /* @__PURE__ */ l(
|
|
1585
|
-
),
|
|
1794
|
+
}, Yr = V(Jr, ({ context: e }) => {
|
|
1795
|
+
const t = e.componentModel.properties, n = T(t.mediaType);
|
|
1796
|
+
return /* @__PURE__ */ l(xe, { ...ke(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
|
|
1797
|
+
}), Xr = V(
|
|
1798
|
+
{ name: "Image", schema: ce("Image") },
|
|
1799
|
+
({ context: e }) => /* @__PURE__ */ l(xe, { ...ke(e.componentModel.properties, "image") })
|
|
1800
|
+
), Wr = V(
|
|
1801
|
+
{ name: "Video", schema: ce("Video") },
|
|
1802
|
+
({ context: e }) => /* @__PURE__ */ l(xe, { ...ke(e.componentModel.properties, "video") })
|
|
1803
|
+
), Qr = V(
|
|
1804
|
+
{ name: "AudioPlayer", schema: ce("AudioPlayer") },
|
|
1805
|
+
({ context: e }) => /* @__PURE__ */ l(xe, { ...ke(e.componentModel.properties, "audio") })
|
|
1806
|
+
), Zr = {
|
|
1586
1807
|
name: "SkoponSelect",
|
|
1587
1808
|
schema: f.object({
|
|
1588
1809
|
label: f.any().optional(),
|
|
@@ -1592,15 +1813,15 @@ const Mr = {
|
|
|
1592
1813
|
value: f.any().optional()
|
|
1593
1814
|
}).passthrough()
|
|
1594
1815
|
};
|
|
1595
|
-
function
|
|
1596
|
-
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i =
|
|
1597
|
-
return
|
|
1598
|
-
const u =
|
|
1816
|
+
function eo({ context: e }) {
|
|
1817
|
+
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = T(o.label), a = T(o.placeholder), s = zt(o.options), c = T(o.mode) === "multiple";
|
|
1818
|
+
return R(() => {
|
|
1819
|
+
const u = ht(n, c);
|
|
1599
1820
|
u !== null && r(u);
|
|
1600
|
-
}, [c, n, r]), /* @__PURE__ */
|
|
1821
|
+
}, [c, n, r]), /* @__PURE__ */ k("div", { className: "form-block-preview", children: [
|
|
1601
1822
|
i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
|
|
1602
1823
|
/* @__PURE__ */ l(
|
|
1603
|
-
|
|
1824
|
+
Re,
|
|
1604
1825
|
{
|
|
1605
1826
|
mode: c ? "multiple" : void 0,
|
|
1606
1827
|
disabled: !t,
|
|
@@ -1609,25 +1830,25 @@ function Ur({ context: e }) {
|
|
|
1609
1830
|
style: { width: "100%" },
|
|
1610
1831
|
placeholder: a || (c ? "请选择多项" : "请选择"),
|
|
1611
1832
|
options: s,
|
|
1612
|
-
value: c ?
|
|
1833
|
+
value: c ? O(n) : oe(n),
|
|
1613
1834
|
onChange: (u) => r(c ? u ?? [] : u ?? "")
|
|
1614
1835
|
}
|
|
1615
1836
|
)
|
|
1616
1837
|
] });
|
|
1617
1838
|
}
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1620
|
-
|
|
1839
|
+
const to = V(
|
|
1840
|
+
Zr,
|
|
1841
|
+
eo
|
|
1621
1842
|
);
|
|
1622
|
-
function
|
|
1623
|
-
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i =
|
|
1624
|
-
return
|
|
1625
|
-
const g =
|
|
1843
|
+
function no({ context: e }) {
|
|
1844
|
+
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = T(o.label), a = T(o.variant) || "mutuallyExclusive", s = T(o.skoponPickerType), c = T(o.placeholder), u = zt(o.options), m = s === "select" || s === "multiselect" || s === "radio" || s === "checkbox" ? s : a === "multipleSelection" ? "checkbox" : "radio", b = m === "multiselect" || m === "checkbox";
|
|
1845
|
+
return R(() => {
|
|
1846
|
+
const g = ht(n, b);
|
|
1626
1847
|
g !== null && r(g);
|
|
1627
|
-
}, [
|
|
1848
|
+
}, [b, n, r]), /* @__PURE__ */ k("div", { className: "form-block-preview", children: [
|
|
1628
1849
|
i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
|
|
1629
|
-
|
|
1630
|
-
|
|
1850
|
+
m === "select" ? /* @__PURE__ */ l(
|
|
1851
|
+
Re,
|
|
1631
1852
|
{
|
|
1632
1853
|
disabled: !t,
|
|
1633
1854
|
allowClear: !0,
|
|
@@ -1638,8 +1859,8 @@ function Er({ context: e }) {
|
|
|
1638
1859
|
value: oe(n),
|
|
1639
1860
|
onChange: (g) => r(g ?? "")
|
|
1640
1861
|
}
|
|
1641
|
-
) :
|
|
1642
|
-
|
|
1862
|
+
) : m === "multiselect" ? /* @__PURE__ */ l(
|
|
1863
|
+
Re,
|
|
1643
1864
|
{
|
|
1644
1865
|
mode: "multiple",
|
|
1645
1866
|
disabled: !t,
|
|
@@ -1648,20 +1869,20 @@ function Er({ context: e }) {
|
|
|
1648
1869
|
style: { width: "100%" },
|
|
1649
1870
|
placeholder: c || "请选择多项",
|
|
1650
1871
|
options: u,
|
|
1651
|
-
value:
|
|
1872
|
+
value: O(n),
|
|
1652
1873
|
onChange: (g) => r(g ?? [])
|
|
1653
1874
|
}
|
|
1654
|
-
) :
|
|
1655
|
-
|
|
1875
|
+
) : m === "checkbox" ? /* @__PURE__ */ l(
|
|
1876
|
+
Vt.Group,
|
|
1656
1877
|
{
|
|
1657
1878
|
disabled: !t,
|
|
1658
1879
|
className: "form-block-preview-control",
|
|
1659
1880
|
options: u,
|
|
1660
|
-
value:
|
|
1881
|
+
value: O(n),
|
|
1661
1882
|
onChange: (g) => r(g)
|
|
1662
1883
|
}
|
|
1663
1884
|
) : /* @__PURE__ */ l(
|
|
1664
|
-
|
|
1885
|
+
jt.Group,
|
|
1665
1886
|
{
|
|
1666
1887
|
disabled: !t,
|
|
1667
1888
|
className: "form-block-preview-control",
|
|
@@ -1672,7 +1893,7 @@ function Er({ context: e }) {
|
|
|
1672
1893
|
)
|
|
1673
1894
|
] });
|
|
1674
1895
|
}
|
|
1675
|
-
const
|
|
1896
|
+
const ro = V(
|
|
1676
1897
|
{
|
|
1677
1898
|
name: "ChoicePicker",
|
|
1678
1899
|
schema: f.object({
|
|
@@ -1684,57 +1905,57 @@ const Rr = q(
|
|
|
1684
1905
|
placeholder: f.any().optional()
|
|
1685
1906
|
}).passthrough()
|
|
1686
1907
|
},
|
|
1687
|
-
|
|
1908
|
+
no
|
|
1688
1909
|
);
|
|
1689
|
-
function
|
|
1690
|
-
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i =
|
|
1691
|
-
return /* @__PURE__ */
|
|
1910
|
+
function oo({ context: e }) {
|
|
1911
|
+
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = T(o.label);
|
|
1912
|
+
return /* @__PURE__ */ k("div", { className: "form-block-preview", children: [
|
|
1692
1913
|
i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
|
|
1693
1914
|
/* @__PURE__ */ l(
|
|
1694
|
-
|
|
1915
|
+
Lt,
|
|
1695
1916
|
{
|
|
1696
1917
|
disabled: !t,
|
|
1697
1918
|
className: "form-block-preview-control",
|
|
1698
|
-
checked:
|
|
1919
|
+
checked: le(n),
|
|
1699
1920
|
onChange: (a) => r(a)
|
|
1700
1921
|
}
|
|
1701
1922
|
)
|
|
1702
1923
|
] });
|
|
1703
1924
|
}
|
|
1704
|
-
const
|
|
1705
|
-
{ name: "CheckBox", schema:
|
|
1706
|
-
|
|
1925
|
+
const io = V(
|
|
1926
|
+
{ name: "CheckBox", schema: ce("CheckBox") },
|
|
1927
|
+
oo
|
|
1707
1928
|
);
|
|
1708
|
-
function
|
|
1929
|
+
function ao(e, t, n) {
|
|
1709
1930
|
const r = oe(e);
|
|
1710
1931
|
if (!r) return;
|
|
1711
1932
|
if (!t && n) {
|
|
1712
|
-
const i =
|
|
1933
|
+
const i = Ze(r, "HH:mm", !0);
|
|
1713
1934
|
return i.isValid() ? i : void 0;
|
|
1714
1935
|
}
|
|
1715
|
-
const o =
|
|
1936
|
+
const o = Ze(r);
|
|
1716
1937
|
return o.isValid() ? o : void 0;
|
|
1717
1938
|
}
|
|
1718
|
-
function
|
|
1719
|
-
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i =
|
|
1720
|
-
if (!
|
|
1939
|
+
function so({ context: e }) {
|
|
1940
|
+
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = T(o.label), a = T(o.placeholder), s = o.enableDate === !0, c = o.enableTime === !0, u = ao(n, s, c), d = (m) => {
|
|
1941
|
+
if (!m) {
|
|
1721
1942
|
r("");
|
|
1722
1943
|
return;
|
|
1723
1944
|
}
|
|
1724
1945
|
if (!s && c) {
|
|
1725
|
-
r(
|
|
1946
|
+
r(m.format("HH:mm"));
|
|
1726
1947
|
return;
|
|
1727
1948
|
}
|
|
1728
1949
|
if (s && c) {
|
|
1729
|
-
r(
|
|
1950
|
+
r(m.format("YYYY-MM-DDTHH:mm"));
|
|
1730
1951
|
return;
|
|
1731
1952
|
}
|
|
1732
|
-
r(
|
|
1953
|
+
r(m.format("YYYY-MM-DD"));
|
|
1733
1954
|
};
|
|
1734
|
-
return /* @__PURE__ */
|
|
1955
|
+
return /* @__PURE__ */ k("div", { className: "form-block-preview", children: [
|
|
1735
1956
|
i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
|
|
1736
1957
|
!s && c ? /* @__PURE__ */ l(
|
|
1737
|
-
|
|
1958
|
+
$t,
|
|
1738
1959
|
{
|
|
1739
1960
|
disabled: !t,
|
|
1740
1961
|
className: "form-block-preview-control",
|
|
@@ -1744,7 +1965,7 @@ function qr({ context: e }) {
|
|
|
1744
1965
|
onChange: d
|
|
1745
1966
|
}
|
|
1746
1967
|
) : /* @__PURE__ */ l(
|
|
1747
|
-
|
|
1968
|
+
Dt,
|
|
1748
1969
|
{
|
|
1749
1970
|
showTime: s && c,
|
|
1750
1971
|
disabled: !t,
|
|
@@ -1757,7 +1978,7 @@ function qr({ context: e }) {
|
|
|
1757
1978
|
)
|
|
1758
1979
|
] });
|
|
1759
1980
|
}
|
|
1760
|
-
const
|
|
1981
|
+
const lo = V(
|
|
1761
1982
|
{
|
|
1762
1983
|
name: "DateTimeInput",
|
|
1763
1984
|
schema: f.object({
|
|
@@ -1770,8 +1991,8 @@ const wr = q(
|
|
|
1770
1991
|
max: f.any().optional()
|
|
1771
1992
|
}).passthrough()
|
|
1772
1993
|
},
|
|
1773
|
-
|
|
1774
|
-
),
|
|
1994
|
+
so
|
|
1995
|
+
), co = {
|
|
1775
1996
|
name: "FileUpload",
|
|
1776
1997
|
schema: f.object({
|
|
1777
1998
|
label: f.any().optional(),
|
|
@@ -1783,109 +2004,130 @@ const wr = q(
|
|
|
1783
2004
|
value: f.any().optional()
|
|
1784
2005
|
}).passthrough()
|
|
1785
2006
|
};
|
|
1786
|
-
function
|
|
1787
|
-
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i =
|
|
2007
|
+
function uo({ context: e }) {
|
|
2008
|
+
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = T(o.label), a = T(o.accept), s = Array.isArray(o.fileAcceptTypes) ? o.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((p) => p.trim()).filter(Boolean) : void 0, u = hn(s, c), d = typeof o.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
|
|
1788
2009
|
o.filePlaceholderIcon
|
|
1789
|
-
) ? o.filePlaceholderIcon : "document",
|
|
1790
|
-
return /* @__PURE__ */
|
|
2010
|
+
) ? o.filePlaceholderIcon : "document", m = typeof o.minCount == "number" ? Math.max(0, o.minCount) : 0, b = typeof o.maxCount == "number" ? o.maxCount : 1, g = b > 0, A = O(n), N = g && A.length >= b, v = A.length < m;
|
|
2011
|
+
return /* @__PURE__ */ k("div", { className: "form-block-preview", children: [
|
|
1791
2012
|
i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
|
|
1792
|
-
/* @__PURE__ */
|
|
1793
|
-
|
|
2013
|
+
/* @__PURE__ */ k(
|
|
2014
|
+
Te.Dragger,
|
|
1794
2015
|
{
|
|
1795
|
-
disabled: !t ||
|
|
1796
|
-
accept:
|
|
2016
|
+
disabled: !t || N,
|
|
2017
|
+
accept: fn(s, c),
|
|
1797
2018
|
className: "form-file-upload-preview",
|
|
1798
2019
|
showUploadList: t && A.length > 0,
|
|
1799
|
-
fileList: t ? A.map((
|
|
1800
|
-
uid: `${h}-${
|
|
1801
|
-
name:
|
|
2020
|
+
fileList: t ? A.map((p, h) => ({
|
|
2021
|
+
uid: `${h}-${p}`,
|
|
2022
|
+
name: p,
|
|
1802
2023
|
status: "done"
|
|
1803
2024
|
})) : [],
|
|
1804
|
-
beforeUpload: (
|
|
1805
|
-
if (!t) return
|
|
1806
|
-
const h =
|
|
1807
|
-
if (g && h.length >=
|
|
1808
|
-
const x = g ? [...h,
|
|
2025
|
+
beforeUpload: (p) => {
|
|
2026
|
+
if (!t) return Te.LIST_IGNORE;
|
|
2027
|
+
const h = O(nt(e));
|
|
2028
|
+
if (g && h.length >= b) return Te.LIST_IGNORE;
|
|
2029
|
+
const x = g ? [...h, p.name].slice(0, b) : [...h, p.name];
|
|
1809
2030
|
return r(x), !1;
|
|
1810
2031
|
},
|
|
1811
|
-
onRemove: (
|
|
1812
|
-
const h =
|
|
1813
|
-
if (
|
|
1814
|
-
r(
|
|
2032
|
+
onRemove: (p) => {
|
|
2033
|
+
const h = O(nt(e)), x = /^(\d+)-/.exec(p.uid ?? ""), y = x ? Number(x[1]) : -1, C = y >= 0 && y < h.length ? h.filter((M, E) => E !== y) : h.filter((M) => M !== p.name);
|
|
2034
|
+
if (C.length < m) return !1;
|
|
2035
|
+
r(C);
|
|
1815
2036
|
},
|
|
1816
2037
|
children: [
|
|
1817
|
-
/* @__PURE__ */ l("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ l(
|
|
2038
|
+
/* @__PURE__ */ l("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ l(Hr, { type: d, size: 40 }) }),
|
|
1818
2039
|
/* @__PURE__ */ l("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
|
|
1819
2040
|
]
|
|
1820
2041
|
}
|
|
1821
2042
|
),
|
|
1822
|
-
/* @__PURE__ */
|
|
2043
|
+
/* @__PURE__ */ k(D.Text, { type: "secondary", className: "form-block-preview-help", children: [
|
|
1823
2044
|
"允许:",
|
|
1824
2045
|
u ?? "全部类型",
|
|
1825
|
-
|
|
1826
|
-
g ? `;最多 ${
|
|
2046
|
+
m > 0 ? `;至少 ${m} 个文件` : "",
|
|
2047
|
+
g ? `;最多 ${b} 个文件` : "",
|
|
1827
2048
|
";当前仅收集文件名(不含文件内容,需宿主另行上传)",
|
|
1828
|
-
|
|
2049
|
+
v && t ? `(当前 ${A.length} 个,未达下限)` : ""
|
|
1829
2050
|
] })
|
|
1830
2051
|
] });
|
|
1831
2052
|
}
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1834
|
-
|
|
2053
|
+
const po = V(
|
|
2054
|
+
co,
|
|
2055
|
+
uo
|
|
1835
2056
|
);
|
|
1836
|
-
function
|
|
1837
|
-
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i =
|
|
1838
|
-
|
|
2057
|
+
function mo({ context: e }) {
|
|
2058
|
+
const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = T(o.label), a = T(o.placeholder), s = T(o.variant) || "shortText", c = T(o.validationRegexp), u = oe(n) ?? "", d = !t, [m, b] = _(""), g = (v) => {
|
|
2059
|
+
if (!c || !v.trim()) {
|
|
2060
|
+
b("");
|
|
2061
|
+
return;
|
|
2062
|
+
}
|
|
2063
|
+
b(_t(v, c) ? "" : "格式不正确");
|
|
2064
|
+
};
|
|
2065
|
+
R(() => {
|
|
2066
|
+
g(u);
|
|
2067
|
+
}, [c, u]);
|
|
2068
|
+
const A = "form-block-preview-control";
|
|
2069
|
+
let N;
|
|
1839
2070
|
if (s === "longText")
|
|
1840
|
-
|
|
1841
|
-
|
|
2071
|
+
N = /* @__PURE__ */ l(
|
|
2072
|
+
Ie.TextArea,
|
|
1842
2073
|
{
|
|
1843
|
-
disabled:
|
|
1844
|
-
className:
|
|
2074
|
+
disabled: d,
|
|
2075
|
+
className: A,
|
|
1845
2076
|
placeholder: a || "长文本回答...",
|
|
1846
2077
|
autoSize: { minRows: 2, maxRows: 6 },
|
|
1847
|
-
value:
|
|
1848
|
-
|
|
2078
|
+
value: u,
|
|
2079
|
+
status: m ? "error" : void 0,
|
|
2080
|
+
onChange: (v) => {
|
|
2081
|
+
const p = v.target.value;
|
|
2082
|
+
r(p), g(p);
|
|
2083
|
+
},
|
|
2084
|
+
onBlur: (v) => g(v.target.value)
|
|
1849
2085
|
}
|
|
1850
2086
|
);
|
|
1851
2087
|
else if (s === "number") {
|
|
1852
|
-
const v =
|
|
1853
|
-
|
|
1854
|
-
|
|
2088
|
+
const v = u && Number.isFinite(Number(u)) ? Number(u) : void 0;
|
|
2089
|
+
N = /* @__PURE__ */ l(
|
|
2090
|
+
Ht,
|
|
1855
2091
|
{
|
|
1856
|
-
disabled:
|
|
1857
|
-
className:
|
|
2092
|
+
disabled: d,
|
|
2093
|
+
className: A,
|
|
1858
2094
|
style: { width: "100%" },
|
|
1859
2095
|
placeholder: a || "数字",
|
|
1860
2096
|
value: v,
|
|
1861
|
-
onChange: (
|
|
2097
|
+
onChange: (p) => r(p == null ? "" : String(p))
|
|
1862
2098
|
}
|
|
1863
2099
|
);
|
|
1864
|
-
} else s === "obscured" ?
|
|
1865
|
-
|
|
2100
|
+
} else s === "obscured" ? N = /* @__PURE__ */ l(
|
|
2101
|
+
Ie.Password,
|
|
1866
2102
|
{
|
|
1867
|
-
disabled:
|
|
1868
|
-
className:
|
|
2103
|
+
disabled: d,
|
|
2104
|
+
className: A,
|
|
1869
2105
|
placeholder: a,
|
|
1870
|
-
value:
|
|
2106
|
+
value: u,
|
|
1871
2107
|
onChange: (v) => r(v.target.value)
|
|
1872
2108
|
}
|
|
1873
|
-
) :
|
|
1874
|
-
|
|
2109
|
+
) : N = /* @__PURE__ */ l(
|
|
2110
|
+
Ie,
|
|
1875
2111
|
{
|
|
1876
|
-
disabled:
|
|
1877
|
-
className:
|
|
2112
|
+
disabled: d,
|
|
2113
|
+
className: A,
|
|
1878
2114
|
placeholder: a,
|
|
1879
|
-
value:
|
|
1880
|
-
|
|
2115
|
+
value: u,
|
|
2116
|
+
status: m ? "error" : void 0,
|
|
2117
|
+
onChange: (v) => {
|
|
2118
|
+
const p = v.target.value;
|
|
2119
|
+
r(p), g(p);
|
|
2120
|
+
},
|
|
2121
|
+
onBlur: (v) => g(v.target.value)
|
|
1881
2122
|
}
|
|
1882
2123
|
);
|
|
1883
|
-
return /* @__PURE__ */
|
|
2124
|
+
return /* @__PURE__ */ k("div", { className: "form-block-preview", children: [
|
|
1884
2125
|
i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
|
|
1885
|
-
|
|
2126
|
+
N,
|
|
2127
|
+
m ? /* @__PURE__ */ l(D.Text, { type: "danger", className: "form-block-preview-help", children: m }) : null
|
|
1886
2128
|
] });
|
|
1887
2129
|
}
|
|
1888
|
-
const
|
|
2130
|
+
const fo = V(
|
|
1889
2131
|
{
|
|
1890
2132
|
name: "TextField",
|
|
1891
2133
|
schema: f.object({
|
|
@@ -1896,37 +2138,37 @@ const Hr = q(
|
|
|
1896
2138
|
value: f.any().optional()
|
|
1897
2139
|
}).passthrough()
|
|
1898
2140
|
},
|
|
1899
|
-
|
|
2141
|
+
mo
|
|
1900
2142
|
);
|
|
1901
|
-
function
|
|
1902
|
-
const t = e.componentModel.properties, n =
|
|
1903
|
-
return
|
|
2143
|
+
function ho({ context: e }) {
|
|
2144
|
+
const t = e.componentModel.properties, n = T(t.text), r = T(t.variant) || "body";
|
|
2145
|
+
return Gr.has(r) ? r === "caption" ? /* @__PURE__ */ l(D.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ l("em", { children: n }) }) : /* @__PURE__ */ l(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ l(D.Paragraph, { className: "form-block-preview-paragraph", children: n });
|
|
1904
2146
|
}
|
|
1905
|
-
const
|
|
1906
|
-
{ name: "Text", schema:
|
|
1907
|
-
|
|
2147
|
+
const go = V(
|
|
2148
|
+
{ name: "Text", schema: ce("Text") },
|
|
2149
|
+
ho
|
|
1908
2150
|
);
|
|
1909
|
-
function
|
|
2151
|
+
function Et() {
|
|
1910
2152
|
const t = [
|
|
1911
|
-
...[...
|
|
1912
|
-
(r) => !
|
|
2153
|
+
...[...fe.components.values()].filter(
|
|
2154
|
+
(r) => !Kr.has(r.name)
|
|
1913
2155
|
),
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
...
|
|
1926
|
-
], n = [...
|
|
1927
|
-
return new
|
|
1928
|
-
}
|
|
1929
|
-
const
|
|
2156
|
+
Yr,
|
|
2157
|
+
to,
|
|
2158
|
+
Xr,
|
|
2159
|
+
Wr,
|
|
2160
|
+
Qr,
|
|
2161
|
+
ro,
|
|
2162
|
+
io,
|
|
2163
|
+
lo,
|
|
2164
|
+
po,
|
|
2165
|
+
fo,
|
|
2166
|
+
go,
|
|
2167
|
+
...nr()
|
|
2168
|
+
], n = [...fe.functions.values()];
|
|
2169
|
+
return new Zt(Ut, t, n, fe.themeSchema);
|
|
2170
|
+
}
|
|
2171
|
+
const H = {
|
|
1930
2172
|
jade9: "#29a383",
|
|
1931
2173
|
jade10: "#26997b",
|
|
1932
2174
|
jade11: "#208368",
|
|
@@ -1938,20 +2180,20 @@ const D = {
|
|
|
1938
2180
|
primaryHover: "#26997b",
|
|
1939
2181
|
primaryActive: "#1d3b31",
|
|
1940
2182
|
onPrimary: "#ffffff"
|
|
1941
|
-
},
|
|
2183
|
+
}, yo = {
|
|
1942
2184
|
cssVar: { key: "vidtempl" },
|
|
1943
2185
|
token: {
|
|
1944
|
-
colorPrimary:
|
|
1945
|
-
colorPrimaryHover:
|
|
1946
|
-
colorPrimaryActive:
|
|
1947
|
-
colorLink:
|
|
1948
|
-
colorLinkHover:
|
|
1949
|
-
colorSuccess:
|
|
2186
|
+
colorPrimary: H.primarySolid,
|
|
2187
|
+
colorPrimaryHover: H.primaryHover,
|
|
2188
|
+
colorPrimaryActive: H.primaryActive,
|
|
2189
|
+
colorLink: H.primary,
|
|
2190
|
+
colorLinkHover: H.primaryHover,
|
|
2191
|
+
colorSuccess: H.jade9,
|
|
1950
2192
|
colorWarning: "#f5a623",
|
|
1951
2193
|
gold6: "#f5a623",
|
|
1952
2194
|
gold7: "#e6951a",
|
|
1953
2195
|
colorError: "#e5484d",
|
|
1954
|
-
colorInfo:
|
|
2196
|
+
colorInfo: H.primary,
|
|
1955
2197
|
colorBgLayout: "#f9f9f9",
|
|
1956
2198
|
colorBgContainer: "#ffffff",
|
|
1957
2199
|
colorBgElevated: "#ffffff",
|
|
@@ -2011,7 +2253,7 @@ const D = {
|
|
|
2011
2253
|
},
|
|
2012
2254
|
Tag: {
|
|
2013
2255
|
defaultBg: "#e6f7ed",
|
|
2014
|
-
defaultColor:
|
|
2256
|
+
defaultColor: H.primary,
|
|
2015
2257
|
fontSizeSM: 13
|
|
2016
2258
|
},
|
|
2017
2259
|
Form: {
|
|
@@ -2028,9 +2270,9 @@ function X({
|
|
|
2028
2270
|
locale: t,
|
|
2029
2271
|
theme: n
|
|
2030
2272
|
}) {
|
|
2031
|
-
return /* @__PURE__ */ l(
|
|
2273
|
+
return /* @__PURE__ */ l(Kt, { theme: n ?? yo, locale: t, children: e });
|
|
2032
2274
|
}
|
|
2033
|
-
const
|
|
2275
|
+
const vo = wt(
|
|
2034
2276
|
function({
|
|
2035
2277
|
doc: t,
|
|
2036
2278
|
surfaceId: n = "skopon-form",
|
|
@@ -2041,57 +2283,57 @@ const Yr = Ft(
|
|
|
2041
2283
|
caseSearch: s = null,
|
|
2042
2284
|
wrapProvider: c = !0
|
|
2043
2285
|
}, u) {
|
|
2044
|
-
|
|
2045
|
-
|
|
2286
|
+
R(() => {
|
|
2287
|
+
pt(), ut();
|
|
2046
2288
|
}, []);
|
|
2047
|
-
const d = L(null),
|
|
2048
|
-
|
|
2049
|
-
const
|
|
2050
|
-
if (
|
|
2289
|
+
const d = L(null), m = L(i);
|
|
2290
|
+
m.current = i;
|
|
2291
|
+
const b = q(() => {
|
|
2292
|
+
if (je(t)) return "";
|
|
2051
2293
|
try {
|
|
2052
2294
|
return JSON.stringify(t);
|
|
2053
2295
|
} catch {
|
|
2054
2296
|
return String(t);
|
|
2055
2297
|
}
|
|
2056
|
-
}, [t]), g =
|
|
2057
|
-
if (!
|
|
2298
|
+
}, [t]), g = q(() => {
|
|
2299
|
+
if (!b)
|
|
2058
2300
|
return { surfaces: [], processor: null };
|
|
2059
2301
|
try {
|
|
2060
|
-
const
|
|
2302
|
+
const p = JSON.parse(b), h = new ct([Et()]), x = dr(p, {
|
|
2061
2303
|
surfaceId: n,
|
|
2062
|
-
catalogId:
|
|
2304
|
+
catalogId: Ut
|
|
2063
2305
|
});
|
|
2064
2306
|
return h.processMessages(x), {
|
|
2065
2307
|
surfaces: Array.from(h.model.surfacesMap.values()),
|
|
2066
2308
|
processor: h
|
|
2067
2309
|
};
|
|
2068
|
-
} catch (
|
|
2069
|
-
return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败",
|
|
2310
|
+
} catch (p) {
|
|
2311
|
+
return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", p), { surfaces: [], processor: null };
|
|
2070
2312
|
}
|
|
2071
|
-
}, [
|
|
2072
|
-
if (d.current =
|
|
2313
|
+
}, [b, n]), { surfaces: A, processor: N } = g;
|
|
2314
|
+
if (d.current = N, qt(
|
|
2073
2315
|
u,
|
|
2074
2316
|
() => ({
|
|
2075
|
-
getValues(
|
|
2317
|
+
getValues(p) {
|
|
2076
2318
|
const h = d.current;
|
|
2077
2319
|
if (!h) return {};
|
|
2078
|
-
const x = (
|
|
2079
|
-
return
|
|
2320
|
+
const x = (p ?? m.current).map((y) => y.trim()).filter(Boolean);
|
|
2321
|
+
return yr(h, n, x);
|
|
2080
2322
|
}
|
|
2081
2323
|
}),
|
|
2082
2324
|
[n]
|
|
2083
2325
|
), A.length === 0) {
|
|
2084
|
-
const
|
|
2085
|
-
return c ? /* @__PURE__ */ l(X, { children:
|
|
2326
|
+
const p = /* @__PURE__ */ l(qe, { resumeSearch: a, children: /* @__PURE__ */ l(we, { caseSearch: s, children: /* @__PURE__ */ l(Be, { interactive: o, children: r }) }) });
|
|
2327
|
+
return c ? /* @__PURE__ */ l(X, { children: p }) : p;
|
|
2086
2328
|
}
|
|
2087
|
-
const
|
|
2088
|
-
return c ? /* @__PURE__ */ l(X, { children:
|
|
2329
|
+
const v = /* @__PURE__ */ l(qe, { resumeSearch: a, children: /* @__PURE__ */ l(we, { caseSearch: s, children: /* @__PURE__ */ l(Be, { interactive: o, children: /* @__PURE__ */ l("div", { className: "a2ui-surface a2ui-container", children: A.map((p) => /* @__PURE__ */ l(lt, { surface: p }, p.id)) }) }) }) });
|
|
2330
|
+
return c ? /* @__PURE__ */ l(X, { children: v }) : v;
|
|
2089
2331
|
}
|
|
2090
2332
|
);
|
|
2091
|
-
function
|
|
2092
|
-
return new
|
|
2333
|
+
function de() {
|
|
2334
|
+
return new ct([Et()]);
|
|
2093
2335
|
}
|
|
2094
|
-
function
|
|
2336
|
+
function zo({
|
|
2095
2337
|
messages: e,
|
|
2096
2338
|
surfaceId: t = "skopon-form-stream",
|
|
2097
2339
|
emptyHint: n = null,
|
|
@@ -2099,78 +2341,78 @@ function uo({
|
|
|
2099
2341
|
resumeSearch: o = null,
|
|
2100
2342
|
caseSearch: i = null
|
|
2101
2343
|
}) {
|
|
2102
|
-
|
|
2103
|
-
|
|
2344
|
+
R(() => {
|
|
2345
|
+
pt(), ut();
|
|
2104
2346
|
}, []);
|
|
2105
2347
|
const a = L(null);
|
|
2106
|
-
a.current === null && (a.current =
|
|
2348
|
+
a.current === null && (a.current = de());
|
|
2107
2349
|
const s = L(0), c = L(""), u = L(!0), d = L(t);
|
|
2108
|
-
function p
|
|
2109
|
-
a.current =
|
|
2350
|
+
function m(p, h) {
|
|
2351
|
+
a.current = p, s.current = h.length, c.current = JSON.stringify(h), u.current && (A(p), v(Array.from(p.model.surfacesMap.values())));
|
|
2110
2352
|
}
|
|
2111
|
-
function
|
|
2353
|
+
function b(p, h) {
|
|
2112
2354
|
if (h <= 0) return !1;
|
|
2113
|
-
const x = JSON.stringify(
|
|
2355
|
+
const x = JSON.stringify(p.slice(0, h)), y = c.current;
|
|
2114
2356
|
if (!y) return !0;
|
|
2115
2357
|
try {
|
|
2116
|
-
const
|
|
2117
|
-
return JSON.stringify(
|
|
2358
|
+
const C = JSON.parse(y);
|
|
2359
|
+
return JSON.stringify(C.slice(0, h)) !== x;
|
|
2118
2360
|
} catch {
|
|
2119
2361
|
return !0;
|
|
2120
2362
|
}
|
|
2121
2363
|
}
|
|
2122
|
-
const [g, A] =
|
|
2364
|
+
const [g, A] = _(
|
|
2123
2365
|
() => a.current
|
|
2124
|
-
), [
|
|
2366
|
+
), [N, v] = _(
|
|
2125
2367
|
() => Array.from(
|
|
2126
2368
|
a.current.model.surfacesMap.values()
|
|
2127
2369
|
)
|
|
2128
2370
|
);
|
|
2129
|
-
return
|
|
2371
|
+
return R(() => (u.current = !0, () => {
|
|
2130
2372
|
u.current = !1;
|
|
2131
|
-
}), []),
|
|
2373
|
+
}), []), R(() => {
|
|
2132
2374
|
a.current = g;
|
|
2133
|
-
}, [g]),
|
|
2134
|
-
const
|
|
2135
|
-
u.current &&
|
|
2136
|
-
}, h = g.onSurfaceCreated(
|
|
2375
|
+
}, [g]), R(() => {
|
|
2376
|
+
const p = () => {
|
|
2377
|
+
u.current && v(Array.from(g.model.surfacesMap.values()));
|
|
2378
|
+
}, h = g.onSurfaceCreated(p), x = g.onSurfaceDeleted(p);
|
|
2137
2379
|
return () => {
|
|
2138
2380
|
h.unsubscribe(), x.unsubscribe();
|
|
2139
2381
|
};
|
|
2140
|
-
}, [g]),
|
|
2141
|
-
let
|
|
2382
|
+
}, [g]), R(() => {
|
|
2383
|
+
let p = !1;
|
|
2142
2384
|
const h = d.current !== t;
|
|
2143
2385
|
if (d.current = t, h) {
|
|
2144
|
-
const
|
|
2145
|
-
return Array.isArray(e) && e.length > 0 ? (
|
|
2146
|
-
|
|
2386
|
+
const M = de();
|
|
2387
|
+
return Array.isArray(e) && e.length > 0 ? (M.processMessages(e), p || m(M, e)) : (a.current = M, s.current = 0, c.current = "", p || (A(M), v([]))), () => {
|
|
2388
|
+
p = !0;
|
|
2147
2389
|
};
|
|
2148
2390
|
}
|
|
2149
2391
|
if (!Array.isArray(e) || e.length === 0) {
|
|
2150
2392
|
if (s.current > 0) {
|
|
2151
|
-
const
|
|
2152
|
-
a.current =
|
|
2393
|
+
const M = de();
|
|
2394
|
+
a.current = M, s.current = 0, c.current = "", p || (A(M), v([]));
|
|
2153
2395
|
}
|
|
2154
2396
|
return () => {
|
|
2155
|
-
|
|
2397
|
+
p = !0;
|
|
2156
2398
|
};
|
|
2157
2399
|
}
|
|
2158
2400
|
const x = a.current, y = s.current;
|
|
2159
|
-
if (e.length < y ||
|
|
2160
|
-
const
|
|
2161
|
-
return
|
|
2162
|
-
|
|
2401
|
+
if (e.length < y || b(e, y)) {
|
|
2402
|
+
const M = de();
|
|
2403
|
+
return M.processMessages(e), p || m(M, e), () => {
|
|
2404
|
+
p = !0;
|
|
2163
2405
|
};
|
|
2164
2406
|
}
|
|
2165
|
-
const
|
|
2166
|
-
return
|
|
2167
|
-
|
|
2168
|
-
} : (x.processMessages(
|
|
2169
|
-
|
|
2407
|
+
const C = e.slice(y);
|
|
2408
|
+
return C.length === 0 ? () => {
|
|
2409
|
+
p = !0;
|
|
2410
|
+
} : (x.processMessages(C), s.current = e.length, c.current = JSON.stringify(e), p || v(Array.from(x.model.surfacesMap.values())), () => {
|
|
2411
|
+
p = !0;
|
|
2170
2412
|
});
|
|
2171
|
-
}, [e, t]),
|
|
2413
|
+
}, [e, t]), N.length === 0 ? /* @__PURE__ */ l(X, { children: n }) : /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l(qe, { resumeSearch: o, children: /* @__PURE__ */ l(we, { caseSearch: i, children: /* @__PURE__ */ l(Be, { interactive: r, children: /* @__PURE__ */ l("div", { className: "a2ui-surface a2ui-container", children: N.map((p) => /* @__PURE__ */ l(lt, { surface: p }, p.id)) }) }) }) }) });
|
|
2172
2414
|
}
|
|
2173
|
-
function
|
|
2415
|
+
function So({
|
|
2174
2416
|
payload: e,
|
|
2175
2417
|
callbackUrl: t,
|
|
2176
2418
|
title: n,
|
|
@@ -2179,31 +2421,31 @@ function Xr({
|
|
|
2179
2421
|
copyMode: i = "display",
|
|
2180
2422
|
onNotify: a
|
|
2181
2423
|
}) {
|
|
2182
|
-
const s =
|
|
2183
|
-
() =>
|
|
2424
|
+
const s = q(
|
|
2425
|
+
() => Nt(e, t),
|
|
2184
2426
|
[e, t]
|
|
2185
|
-
), c =
|
|
2427
|
+
), c = q(() => i === "submitFields" ? Nr(e, t) : s, [i, e, t, s]);
|
|
2186
2428
|
async function u() {
|
|
2187
2429
|
try {
|
|
2188
|
-
await
|
|
2430
|
+
await Ft(c), a == null || a("success", "已复制到剪贴板");
|
|
2189
2431
|
} catch {
|
|
2190
2432
|
a == null || a("error", "复制失败");
|
|
2191
2433
|
}
|
|
2192
2434
|
}
|
|
2193
2435
|
const d = i === "submitFields" ? "复制提交字段 curl(向 callback 回传)" : "复制 curl";
|
|
2194
|
-
return /* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */ l(
|
|
2436
|
+
return /* @__PURE__ */ k("div", { className: "ask-user-curl-card", children: [
|
|
2437
|
+
/* @__PURE__ */ k("div", { className: "ask-user-curl-card-header", children: [
|
|
2438
|
+
/* @__PURE__ */ k("div", { className: "ask-user-curl-card-header-title", children: [
|
|
2439
|
+
/* @__PURE__ */ l(D.Text, { type: "secondary", children: n ?? "curl 命令" }),
|
|
2198
2440
|
r ? /* @__PURE__ */ l(ne, { title: r, children: /* @__PURE__ */ l(re, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
|
|
2199
2441
|
o ? /* @__PURE__ */ l(ne, { title: o, children: /* @__PURE__ */ l(re, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
|
|
2200
2442
|
] }),
|
|
2201
|
-
/* @__PURE__ */ l(ne, { title: d, children: /* @__PURE__ */ l(
|
|
2443
|
+
/* @__PURE__ */ l(ne, { title: d, children: /* @__PURE__ */ l(Se, { size: "small", type: "text", onClick: () => void u(), children: "复制" }) })
|
|
2202
2444
|
] }),
|
|
2203
2445
|
/* @__PURE__ */ l("pre", { className: "skopon-form-curl-json", children: s })
|
|
2204
2446
|
] });
|
|
2205
2447
|
}
|
|
2206
|
-
function
|
|
2448
|
+
function bo(e, t) {
|
|
2207
2449
|
if (t && typeof t == "object" && t !== null && "message" in t) {
|
|
2208
2450
|
const n = t.message;
|
|
2209
2451
|
if (typeof n == "string" && n.trim())
|
|
@@ -2211,7 +2453,7 @@ function Wr(e, t) {
|
|
|
2211
2453
|
}
|
|
2212
2454
|
return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
|
|
2213
2455
|
}
|
|
2214
|
-
function
|
|
2456
|
+
function Eo({
|
|
2215
2457
|
payload: e,
|
|
2216
2458
|
formUniqueId: t,
|
|
2217
2459
|
callbackUrl: n,
|
|
@@ -2221,46 +2463,46 @@ function po({
|
|
|
2221
2463
|
resumeSearch: a = null,
|
|
2222
2464
|
caseSearch: s = null
|
|
2223
2465
|
}) {
|
|
2224
|
-
const [c, u] =
|
|
2466
|
+
const [c, u] = _(null), [d, m] = _(!1), [b, g] = _(!0), [A, N] = _(!1), v = L(null), p = L(!0), h = L(i);
|
|
2225
2467
|
h.current = i;
|
|
2226
2468
|
const x = (t == null ? void 0 : t.trim()) ?? "";
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
}), []),
|
|
2230
|
-
let
|
|
2231
|
-
return x ? (g(!0),
|
|
2232
|
-
|
|
2233
|
-
}).catch((
|
|
2234
|
-
var
|
|
2235
|
-
if (!
|
|
2236
|
-
|
|
2237
|
-
const
|
|
2238
|
-
(
|
|
2469
|
+
R(() => (p.current = !0, () => {
|
|
2470
|
+
p.current = !1;
|
|
2471
|
+
}), []), R(() => {
|
|
2472
|
+
let P = !1;
|
|
2473
|
+
return x ? (g(!0), m(!1), o({ formUniqueId: x }).then((U) => {
|
|
2474
|
+
P || (m(!!U.disabled), u(U.formDefinition ?? null));
|
|
2475
|
+
}).catch((U) => {
|
|
2476
|
+
var S;
|
|
2477
|
+
if (!P) {
|
|
2478
|
+
m(!1), u(null);
|
|
2479
|
+
const F = U instanceof Error ? U.message : "获取表单定义失败";
|
|
2480
|
+
(S = h.current) == null || S.call(h, "error", F);
|
|
2239
2481
|
}
|
|
2240
2482
|
}).finally(() => {
|
|
2241
|
-
|
|
2483
|
+
P || g(!1);
|
|
2242
2484
|
}), () => {
|
|
2243
|
-
|
|
2244
|
-
}) : (g(!1),
|
|
2245
|
-
|
|
2485
|
+
P = !0;
|
|
2486
|
+
}) : (g(!1), m(!1), u(null), () => {
|
|
2487
|
+
P = !0;
|
|
2246
2488
|
});
|
|
2247
2489
|
}, [x, o]);
|
|
2248
|
-
const y =
|
|
2249
|
-
() =>
|
|
2250
|
-
[
|
|
2251
|
-
),
|
|
2252
|
-
var
|
|
2253
|
-
return (
|
|
2254
|
-
}).map((
|
|
2255
|
-
if (
|
|
2256
|
-
const
|
|
2257
|
-
return
|
|
2258
|
-
}, [
|
|
2259
|
-
if (
|
|
2260
|
-
return /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l("div", { className: "ask-user-form-card", children: /* @__PURE__ */ l(
|
|
2261
|
-
if (!y ||
|
|
2490
|
+
const y = q(() => At(e), [e]), C = q(() => y ? Cr(y, c ?? void 0) : null, [y, c]), M = (C == null ? void 0 : C.matchedBlocks) ?? [], E = !!(y && kr(y) && M.length === 0), $ = q(() => E && y ? Ar(y) : C && C.renderBlocks.length > 0 ? C.renderBlocks : [], [C, E, y]), Q = q(
|
|
2491
|
+
() => E ? {} : Tt((C == null ? void 0 : C.extraBlocks) ?? []),
|
|
2492
|
+
[E, C]
|
|
2493
|
+
), j = q(() => E && y ? Tr(y) : $.filter((P) => {
|
|
2494
|
+
var U;
|
|
2495
|
+
return (U = P.name) == null ? void 0 : U.trim();
|
|
2496
|
+
}).map((P) => P.name.trim()), [E, y, $]), w = q(() => {
|
|
2497
|
+
if ($.length === 0) return null;
|
|
2498
|
+
const P = (C == null ? void 0 : C.title) ?? (y == null ? void 0 : y.title) ?? "", U = (C == null ? void 0 : C.description) ?? (y == null ? void 0 : y.description) ?? "";
|
|
2499
|
+
return hr({ title: P, description: U }, $);
|
|
2500
|
+
}, [C, y, $]), J = x ? `ask-user-${x}` : "ask-user-payload";
|
|
2501
|
+
if (b)
|
|
2502
|
+
return /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l("div", { className: "ask-user-form-card", children: /* @__PURE__ */ l(De, { size: "small" }) }) });
|
|
2503
|
+
if (!y || $.length === 0)
|
|
2262
2504
|
return /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l(
|
|
2263
|
-
|
|
2505
|
+
So,
|
|
2264
2506
|
{
|
|
2265
2507
|
payload: e,
|
|
2266
2508
|
callbackUrl: n,
|
|
@@ -2270,44 +2512,49 @@ function po({
|
|
|
2270
2512
|
}
|
|
2271
2513
|
) });
|
|
2272
2514
|
async function Y() {
|
|
2273
|
-
var
|
|
2515
|
+
var P, U, S, F, B, I, We;
|
|
2274
2516
|
if (!A) {
|
|
2275
|
-
|
|
2517
|
+
N(!0);
|
|
2276
2518
|
try {
|
|
2277
|
-
const
|
|
2519
|
+
const Z = ((P = v.current) == null ? void 0 : P.getValues(j)) ?? {}, ue = $r($, Z);
|
|
2520
|
+
if (ue) {
|
|
2521
|
+
(U = h.current) == null || U.call(h, "error", ue.message);
|
|
2522
|
+
return;
|
|
2523
|
+
}
|
|
2524
|
+
const Rt = { ...Z, ...Q };
|
|
2278
2525
|
if (r === "post") {
|
|
2279
|
-
const
|
|
2280
|
-
if (!
|
|
2281
|
-
(
|
|
2526
|
+
const Qe = (n ?? "").trim();
|
|
2527
|
+
if (!Qe) {
|
|
2528
|
+
(S = h.current) == null || S.call(h, "error", "callback_url 为空,无法提交");
|
|
2282
2529
|
return;
|
|
2283
2530
|
}
|
|
2284
|
-
const
|
|
2285
|
-
if (!
|
|
2286
|
-
|
|
2531
|
+
const Ae = await Mr(Qe, Rt);
|
|
2532
|
+
if (!p.current) return;
|
|
2533
|
+
Ae.ok ? (F = h.current) == null || F.call(h, "success", "提交成功") : (B = h.current) == null || B.call(h, "error", bo(Ae.status, Ae.body));
|
|
2287
2534
|
return;
|
|
2288
2535
|
}
|
|
2289
|
-
if (await
|
|
2290
|
-
|
|
2291
|
-
), !
|
|
2292
|
-
(
|
|
2293
|
-
} catch (
|
|
2294
|
-
if (!
|
|
2295
|
-
const
|
|
2296
|
-
(
|
|
2536
|
+
if (await Ft(
|
|
2537
|
+
Mt({ cardValues: Z, extraValues: Q, callbackUrl: n })
|
|
2538
|
+
), !p.current) return;
|
|
2539
|
+
(I = h.current) == null || I.call(h, "success", "已复制 curl 到剪贴板");
|
|
2540
|
+
} catch (Z) {
|
|
2541
|
+
if (!p.current) return;
|
|
2542
|
+
const ue = Z instanceof Error ? Z.message : "复制失败";
|
|
2543
|
+
(We = h.current) == null || We.call(h, "error", ue);
|
|
2297
2544
|
} finally {
|
|
2298
|
-
|
|
2545
|
+
p.current && N(!1);
|
|
2299
2546
|
}
|
|
2300
2547
|
}
|
|
2301
2548
|
}
|
|
2302
|
-
return /* @__PURE__ */ l(X, { children: /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ l(X, { children: /* @__PURE__ */ k("div", { className: "ask-user-form-card", children: [
|
|
2303
2550
|
d && x ? /* @__PURE__ */ l("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ l(ne, { title: x, children: /* @__PURE__ */ l(re, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
|
|
2304
2551
|
/* @__PURE__ */ l(
|
|
2305
|
-
|
|
2552
|
+
vo,
|
|
2306
2553
|
{
|
|
2307
|
-
ref:
|
|
2308
|
-
doc:
|
|
2554
|
+
ref: v,
|
|
2555
|
+
doc: w,
|
|
2309
2556
|
surfaceId: J,
|
|
2310
|
-
fieldNames:
|
|
2557
|
+
fieldNames: j,
|
|
2311
2558
|
interactive: !0,
|
|
2312
2559
|
wrapProvider: !1,
|
|
2313
2560
|
resumeSearch: a,
|
|
@@ -2315,7 +2562,7 @@ function po({
|
|
|
2315
2562
|
}
|
|
2316
2563
|
),
|
|
2317
2564
|
/* @__PURE__ */ l("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ l(ne, { title: r === "curl" ? "点击复制 curl" : "提交 JSON 到 callback_url", children: /* @__PURE__ */ l(
|
|
2318
|
-
|
|
2565
|
+
Se,
|
|
2319
2566
|
{
|
|
2320
2567
|
type: "primary",
|
|
2321
2568
|
size: "small",
|
|
@@ -2328,43 +2575,50 @@ function po({
|
|
|
2328
2575
|
] }) });
|
|
2329
2576
|
}
|
|
2330
2577
|
export {
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2578
|
+
Po as A2UI_PROTOCOL_VERSION,
|
|
2579
|
+
Eo as AskUserFormCard,
|
|
2580
|
+
we as CaseSearchProvider,
|
|
2581
|
+
So as CurlSubmitBlock,
|
|
2582
|
+
Fr as DEFAULT_AUTH_STORAGE_KEY,
|
|
2583
|
+
_r as DEFAULT_AUTH_TOKEN_FIELD,
|
|
2584
|
+
en as FORM_MEDIA_SIZES,
|
|
2585
|
+
qe as ResumeSearchProvider,
|
|
2586
|
+
zo as SkoponA2uiStreamRenderer,
|
|
2338
2587
|
X as SkoponFormProvider,
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2588
|
+
vo as SkoponFormRenderer,
|
|
2589
|
+
mr as a2uiToBlocks,
|
|
2590
|
+
Ct as blocksToA2ui,
|
|
2591
|
+
Ir as buildAskUserCurlBodyJson,
|
|
2592
|
+
Mt as buildAskUserCurlStatement,
|
|
2593
|
+
Nr as buildAskUserSubmitCurlFromPayload,
|
|
2594
|
+
hr as buildAskUserSurface,
|
|
2595
|
+
Nt as buildCurlStatement,
|
|
2596
|
+
Ft as copyTextToClipboard,
|
|
2597
|
+
jr as createCaseSearchClient,
|
|
2598
|
+
Er as createFormClient,
|
|
2599
|
+
wr as createResumeSearchClient,
|
|
2600
|
+
Uo as createSkoponSdkClients,
|
|
2601
|
+
Tt as extractExtraBlockValues,
|
|
2602
|
+
yr as extractSurfaceValues,
|
|
2603
|
+
Tr as getPayloadInputFieldNames,
|
|
2604
|
+
Ar as getPayloadRenderableBlocks,
|
|
2605
|
+
Cr as intersectPayloadBlocksWithForm,
|
|
2606
|
+
je as isA2uiSurfaceEmpty,
|
|
2355
2607
|
W as isInputBlockType,
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2608
|
+
be as isLayoutBlockType,
|
|
2609
|
+
he as isMediaBlockType,
|
|
2610
|
+
gr as mapFormDefinitionFromDto,
|
|
2611
|
+
ee as normalizeFormDefinition,
|
|
2612
|
+
At as parsePayloadBlocksJson,
|
|
2613
|
+
kr as payloadHasInputBlocks,
|
|
2614
|
+
Xe as resolveClientHeaders,
|
|
2615
|
+
zr as resolveSkoponAuthHeaders,
|
|
2616
|
+
fr as resolveSurfaceFromFormDefinition,
|
|
2617
|
+
yo as skoponAntdTheme,
|
|
2618
|
+
H as skoponBrandColors,
|
|
2619
|
+
Mr as submitFormJson,
|
|
2620
|
+
dr as surfaceDocToMessages,
|
|
2621
|
+
ge as syncFormDefinition,
|
|
2622
|
+
Un as useCaseSearch,
|
|
2623
|
+
jn as useResumeSearch
|
|
2370
2624
|
};
|