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