@mxmweb/zui-components 1.2.3 → 1.2.4
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/index.js +698 -698
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as B, jsx as o, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import J, { createGlobalStyle as
|
|
4
|
-
import { useTheme as
|
|
5
|
-
import
|
|
6
|
-
import { CircleHelp as
|
|
7
|
-
import { Form as K, Input as
|
|
8
|
-
import { Button as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as B, jsx as o, Fragment as Hr } from "react/jsx-runtime";
|
|
2
|
+
import be, { useState as ue, useMemo as Se, useEffect as we, useRef as Me, useCallback as fe } from "react";
|
|
3
|
+
import J, { createGlobalStyle as Xr } from "styled-components";
|
|
4
|
+
import { useTheme as Te, deepMergeTheme as $e, defaultTheme as E } from "@mxmweb/zui-theme";
|
|
5
|
+
import mr from "animejs/lib/anime.es.js";
|
|
6
|
+
import { CircleHelp as Ir, Trash as Zr, File as ke, AlertCircle as br, Upload as Qr, ChevronDown as ea, ChevronRight as ra, Search as aa, CircleX as ta } from "lucide-react";
|
|
7
|
+
import { Form as K, Input as me, Select as Je, InputNumber as Ge, Slider as gr, Switch as xr, DatePicker as Ke, Radio as yr, Checkbox as $r, TimePicker as vr, Tooltip as er, Button as wr, Tag as na } from "antd";
|
|
8
|
+
import { Button as Ue, DropdownMenu as oa, SharedPagination as sa } from "@mxmweb/zui-elements";
|
|
9
|
+
const la = J.div`
|
|
10
10
|
background-color: #ffffff;
|
|
11
11
|
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
|
|
12
12
|
border-radius: ${(e) => {
|
|
@@ -16,7 +16,7 @@ const da = J.div`
|
|
|
16
16
|
height: 90vh;
|
|
17
17
|
overflow: hidden;
|
|
18
18
|
position: relative;
|
|
19
|
-
`,
|
|
19
|
+
`, ia = () => {
|
|
20
20
|
we(() => {
|
|
21
21
|
const e = "goggle-nav-icon-styles";
|
|
22
22
|
if (!document.getElementById(e)) {
|
|
@@ -35,33 +35,33 @@ const da = J.div`
|
|
|
35
35
|
`, document.head.appendChild(r);
|
|
36
36
|
}
|
|
37
37
|
}, []);
|
|
38
|
-
},
|
|
38
|
+
}, pt = ({
|
|
39
39
|
items: e,
|
|
40
40
|
activePath: r,
|
|
41
41
|
defaultOpen: t = !0,
|
|
42
42
|
open: s,
|
|
43
43
|
onOpenChange: h,
|
|
44
44
|
onItemClick: b,
|
|
45
|
-
logo:
|
|
45
|
+
logo: f,
|
|
46
46
|
className: d,
|
|
47
|
-
style:
|
|
47
|
+
style: p,
|
|
48
48
|
styles: N
|
|
49
49
|
}) => {
|
|
50
|
-
const
|
|
50
|
+
const C = Te(), M = $e(
|
|
51
51
|
// 基础:默认主题 + useTheme的配置
|
|
52
|
-
|
|
52
|
+
$e({ theme: E, mode: "light" }, C),
|
|
53
53
|
// 最高层:用户手动传入的styles
|
|
54
54
|
N
|
|
55
55
|
);
|
|
56
|
-
|
|
57
|
-
const [W, l] =
|
|
56
|
+
ia();
|
|
57
|
+
const [W, l] = ue(t), _ = typeof s == "boolean" ? s : W, I = (v) => {
|
|
58
58
|
typeof s == "boolean" || l(v), h == null || h(v);
|
|
59
|
-
}, [
|
|
59
|
+
}, [ae, oe] = ue(!1), a = (v) => v ? typeof v == "string" ? /* @__PURE__ */ o("img", { src: v, className: "w-6 h-6 transition-all duration-200", alt: "nav" }) : v : null, T = Se(() => ({
|
|
60
60
|
width: _ ? "60px" : "20px",
|
|
61
61
|
minWidth: _ ? "60px" : "20px",
|
|
62
62
|
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
63
63
|
}), [_]);
|
|
64
|
-
return /* @__PURE__ */ B(
|
|
64
|
+
return /* @__PURE__ */ B(la, { $theme: M.theme || E, className: `relative ${d || ""}`, style: { ...T, ...p }, children: [
|
|
65
65
|
/* @__PURE__ */ o(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
@@ -72,13 +72,13 @@ const da = J.div`
|
|
|
72
72
|
"aria-label": _ ? "收起" : "展开",
|
|
73
73
|
role: "button",
|
|
74
74
|
children: /* @__PURE__ */ o("div", { className: "group flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200", children: /* @__PURE__ */ B("div", { className: "relative w-4 h-4 flex items-center justify-center", children: [
|
|
75
|
-
/* @__PURE__ */ o("div", { className: `absolute w-[2px] h-3 bg-gray-400 rounded-full transition-all duration-300 ${
|
|
75
|
+
/* @__PURE__ */ o("div", { className: `absolute w-[2px] h-3 bg-gray-400 rounded-full transition-all duration-300 ${ae ? "opacity-0 scale-0" : "opacity-100 scale-100"}` }),
|
|
76
76
|
/* @__PURE__ */ o(
|
|
77
77
|
"svg",
|
|
78
78
|
{
|
|
79
79
|
viewBox: "0 0 24 24",
|
|
80
80
|
fill: "none",
|
|
81
|
-
className: `absolute w-4 h-4 stroke-gray-400 transition-all duration-300 ${
|
|
81
|
+
className: `absolute w-4 h-4 stroke-gray-400 transition-all duration-300 ${ae ? "opacity-100 scale-100" : "opacity-0 scale-0"} ${_ ? "rotate-0" : "rotate-180"}`,
|
|
82
82
|
strokeWidth: "2",
|
|
83
83
|
strokeLinecap: "round",
|
|
84
84
|
strokeLinejoin: "round",
|
|
@@ -98,7 +98,7 @@ const da = J.div`
|
|
|
98
98
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
99
99
|
},
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */ o("div", { className: "mb-6 transition-transform duration-300 hover:scale-105", children: typeof
|
|
101
|
+
/* @__PURE__ */ o("div", { className: "mb-6 transition-transform duration-300 hover:scale-105", children: typeof f == "string" ? /* @__PURE__ */ o("img", { src: f, className: "w-7 h-7", alt: "logo" }) : f || /* @__PURE__ */ o("div", { className: "w-7 h-7 rounded bg-gray-100 flex items-center justify-center text-xs text-gray-500", children: "G" }) }),
|
|
102
102
|
/* @__PURE__ */ o("div", { className: "w-full gap-y-[2px] mb-10 flex-1 overflow-x-hidden overflow-y-auto scrollbar-none flex flex-col items-center", children: e.map((v) => {
|
|
103
103
|
const U = !!(r && v.path && r.startsWith(v.path)), A = U && v.activeIcon ? v.activeIcon : v.icon;
|
|
104
104
|
return /* @__PURE__ */ B(
|
|
@@ -121,7 +121,7 @@ const da = J.div`
|
|
|
121
121
|
}
|
|
122
122
|
)
|
|
123
123
|
] });
|
|
124
|
-
},
|
|
124
|
+
}, da = J.div.withConfig({
|
|
125
125
|
shouldForwardProp: (e) => !["itemWidth", "itemGap", "theme"].includes(e)
|
|
126
126
|
})`
|
|
127
127
|
position: relative;
|
|
@@ -150,7 +150,7 @@ const da = J.div`
|
|
|
150
150
|
width: fit-content;
|
|
151
151
|
margin: 0 auto;
|
|
152
152
|
min-width: ${(e) => e.itemWidth * 2}px;
|
|
153
|
-
`,
|
|
153
|
+
`, ca = J.div.withConfig({
|
|
154
154
|
shouldForwardProp: (e) => !["itemWidth", "itemHeight", "itemGap", "isHovered", "magnification"].includes(e)
|
|
155
155
|
})`
|
|
156
156
|
position: relative;
|
|
@@ -162,7 +162,7 @@ const da = J.div`
|
|
|
162
162
|
transform: ${(e) => e.isHovered ? `scale(${e.magnification})` : "scale(1)"};
|
|
163
163
|
transform-origin: center bottom;
|
|
164
164
|
z-index: ${(e) => e.isHovered ? 10 : 1};
|
|
165
|
-
`,
|
|
165
|
+
`, ua = J.img.withConfig({
|
|
166
166
|
shouldForwardProp: (e) => !["isActive"].includes(e)
|
|
167
167
|
})`
|
|
168
168
|
width: 80%;
|
|
@@ -175,7 +175,7 @@ const da = J.div`
|
|
|
175
175
|
&:hover {
|
|
176
176
|
filter: none;
|
|
177
177
|
}
|
|
178
|
-
`,
|
|
178
|
+
`, ha = J.div.withConfig({
|
|
179
179
|
shouldForwardProp: (e) => !["isActive", "theme"].includes(e)
|
|
180
180
|
})`
|
|
181
181
|
position: absolute;
|
|
@@ -191,7 +191,7 @@ const da = J.div`
|
|
|
191
191
|
border-radius: 50%;
|
|
192
192
|
opacity: ${(e) => e.isActive ? 1 : 0};
|
|
193
193
|
transition: opacity 0.2s ease;
|
|
194
|
-
`,
|
|
194
|
+
`, pa = J.div.withConfig({
|
|
195
195
|
shouldForwardProp: (e) => !["visible", "theme"].includes(e)
|
|
196
196
|
})`
|
|
197
197
|
position: absolute;
|
|
@@ -230,43 +230,43 @@ const da = J.div`
|
|
|
230
230
|
return ((t = (r = e.theme) == null ? void 0 : r.colors) == null ? void 0 : t.text) || "rgba(0, 0, 0, 0.8)";
|
|
231
231
|
}};
|
|
232
232
|
}
|
|
233
|
-
`,
|
|
233
|
+
`, ft = ({
|
|
234
234
|
items: e,
|
|
235
235
|
itemWidth: r = 48,
|
|
236
236
|
itemHeight: t = 48,
|
|
237
237
|
magnification: s = 1.2,
|
|
238
238
|
itemGap: h = 13,
|
|
239
239
|
activeMode: b = "single",
|
|
240
|
-
defaultActiveId:
|
|
240
|
+
defaultActiveId: f,
|
|
241
241
|
defaultActiveIds: d = [],
|
|
242
|
-
onItemClick:
|
|
242
|
+
onItemClick: p,
|
|
243
243
|
onActiveChange: N,
|
|
244
|
-
onActiveChangeMultiple:
|
|
245
|
-
className:
|
|
244
|
+
onActiveChangeMultiple: C,
|
|
245
|
+
className: M,
|
|
246
246
|
styles: W
|
|
247
247
|
}) => {
|
|
248
|
-
const l =
|
|
248
|
+
const l = Te(), _ = $e(
|
|
249
249
|
// 基础:默认主题 + useTheme的配置
|
|
250
|
-
|
|
250
|
+
$e({ theme: E, mode: "light" }, l),
|
|
251
251
|
// 最高层:用户手动传入的styles
|
|
252
252
|
W
|
|
253
|
-
), [I,
|
|
253
|
+
), [I, ae] = ue(null), [oe, a] = ue(null), T = () => b === "multiple" ? d || [] : f || (e.length > 0 ? e[0].id : null), [v, U] = ue(
|
|
254
254
|
b === "single" ? T() : null
|
|
255
|
-
), [A, V] =
|
|
255
|
+
), [A, V] = ue(
|
|
256
256
|
b === "multiple" ? T() : []
|
|
257
|
-
), O =
|
|
258
|
-
|
|
257
|
+
), O = Me(null), Q = Me([]), X = (G) => {
|
|
258
|
+
ae(G), a(G);
|
|
259
259
|
const S = Q.current[G];
|
|
260
|
-
S &&
|
|
260
|
+
S && mr({
|
|
261
261
|
targets: S,
|
|
262
262
|
scale: s,
|
|
263
263
|
duration: 200,
|
|
264
264
|
easing: "easeOutCubic"
|
|
265
265
|
});
|
|
266
266
|
}, R = (G) => {
|
|
267
|
-
|
|
267
|
+
ae(null), a(null);
|
|
268
268
|
const S = Q.current[G];
|
|
269
|
-
S &&
|
|
269
|
+
S && mr({
|
|
270
270
|
targets: S,
|
|
271
271
|
scale: 1,
|
|
272
272
|
duration: 200,
|
|
@@ -277,25 +277,25 @@ const da = J.div`
|
|
|
277
277
|
v !== G.id && (U(G.id), N && N(G.id, G));
|
|
278
278
|
else {
|
|
279
279
|
const y = A.includes(G.id) ? A.filter((x) => x !== G.id) : [...A, G.id];
|
|
280
|
-
if (V(y),
|
|
280
|
+
if (V(y), C) {
|
|
281
281
|
const x = e.filter((D) => y.includes(D.id));
|
|
282
|
-
|
|
282
|
+
C(y, x);
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
|
|
285
|
+
p && p(G, S), G.onClick && G.onClick();
|
|
286
286
|
};
|
|
287
287
|
return we(() => {
|
|
288
288
|
Q.current = Q.current.slice(0, e.length);
|
|
289
289
|
}, [e.length]), /* @__PURE__ */ o(
|
|
290
|
-
|
|
290
|
+
da,
|
|
291
291
|
{
|
|
292
292
|
ref: O,
|
|
293
293
|
itemWidth: r,
|
|
294
294
|
itemGap: h,
|
|
295
295
|
theme: _.theme || E,
|
|
296
|
-
className:
|
|
296
|
+
className: M,
|
|
297
297
|
children: e.map((G, S) => /* @__PURE__ */ B(
|
|
298
|
-
|
|
298
|
+
ca,
|
|
299
299
|
{
|
|
300
300
|
ref: (y) => Q.current[S] = y,
|
|
301
301
|
itemWidth: r,
|
|
@@ -308,7 +308,7 @@ const da = J.div`
|
|
|
308
308
|
onClick: () => ee(G, S),
|
|
309
309
|
children: [
|
|
310
310
|
/* @__PURE__ */ o(
|
|
311
|
-
|
|
311
|
+
ua,
|
|
312
312
|
{
|
|
313
313
|
src: G.icon,
|
|
314
314
|
alt: G.label,
|
|
@@ -316,14 +316,14 @@ const da = J.div`
|
|
|
316
316
|
}
|
|
317
317
|
),
|
|
318
318
|
/* @__PURE__ */ o(
|
|
319
|
-
|
|
319
|
+
ha,
|
|
320
320
|
{
|
|
321
321
|
isActive: b === "single" ? v === G.id : A.includes(G.id),
|
|
322
322
|
theme: _.theme || E
|
|
323
323
|
}
|
|
324
324
|
),
|
|
325
325
|
/* @__PURE__ */ o(
|
|
326
|
-
|
|
326
|
+
pa,
|
|
327
327
|
{
|
|
328
328
|
visible: oe === S,
|
|
329
329
|
theme: _.theme || E,
|
|
@@ -336,35 +336,35 @@ const da = J.div`
|
|
|
336
336
|
))
|
|
337
337
|
}
|
|
338
338
|
);
|
|
339
|
-
},
|
|
339
|
+
}, Ur = (e) => {
|
|
340
340
|
if (e === 0) return "0 B";
|
|
341
341
|
const r = 1024, t = ["B", "KB", "MB", "GB"], s = Math.floor(Math.log(e) / Math.log(r));
|
|
342
342
|
return parseFloat((e / Math.pow(r, s)).toFixed(2)) + " " + t[s];
|
|
343
|
-
},
|
|
343
|
+
}, kr = () => Math.random().toString(36).substr(2, 9), fa = (e, r) => {
|
|
344
344
|
const t = { ...e.formData }, s = ["name", "filename", "title", "displayName", "fileName"], h = ["size", "fileSize", "file_size"], b = ["type", "fileType", "mimeType", "contentType"];
|
|
345
|
-
return r.forEach((
|
|
346
|
-
const d =
|
|
347
|
-
d && (s.includes(d.toLowerCase()) && !t[d] && (t[d] = e.name), h.includes(d.toLowerCase()) && !t[d] && (t[d] =
|
|
345
|
+
return r.forEach((f) => {
|
|
346
|
+
const d = f.name || f.field;
|
|
347
|
+
d && (s.includes(d.toLowerCase()) && !t[d] && (t[d] = e.name), h.includes(d.toLowerCase()) && !t[d] && (t[d] = Ur(e.size)), b.includes(d.toLowerCase()) && !t[d] && (t[d] = e.type));
|
|
348
348
|
}), t;
|
|
349
|
-
},
|
|
350
|
-
var
|
|
351
|
-
const d = new XMLHttpRequest(),
|
|
349
|
+
}, ma = async (e, r, t = {}, s = {}, h) => new Promise((b, f) => {
|
|
350
|
+
var M;
|
|
351
|
+
const d = new XMLHttpRequest(), p = new URL(r);
|
|
352
352
|
if (Object.entries(s).forEach(([W, l]) => {
|
|
353
|
-
|
|
354
|
-
}), (
|
|
353
|
+
p.searchParams.append(W, l);
|
|
354
|
+
}), (M = t["Content-Type"]) == null ? void 0 : M.includes("application/json")) {
|
|
355
355
|
const W = new FileReader();
|
|
356
356
|
W.onload = () => {
|
|
357
357
|
const l = W.result, _ = JSON.stringify({
|
|
358
358
|
file: l.split(",")[1]
|
|
359
359
|
// 移除 data:application/octet-stream;base64, 前缀
|
|
360
360
|
});
|
|
361
|
-
|
|
362
|
-
}, W.onerror = () =>
|
|
361
|
+
C(_);
|
|
362
|
+
}, W.onerror = () => f(new Error("文件读取失败")), W.readAsDataURL(e);
|
|
363
363
|
} else {
|
|
364
364
|
const W = new FormData();
|
|
365
|
-
W.append("tableFile", e),
|
|
365
|
+
W.append("tableFile", e), C(W);
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function C(W) {
|
|
368
368
|
d.upload.addEventListener("progress", (l) => {
|
|
369
369
|
if (l.lengthComputable) {
|
|
370
370
|
const _ = Math.round(l.loaded / l.total * 100);
|
|
@@ -393,19 +393,19 @@ const da = J.div`
|
|
|
393
393
|
statusText: d.statusText,
|
|
394
394
|
data: d.responseText ? JSON.parse(d.responseText) : null,
|
|
395
395
|
headers: d.getAllResponseHeaders()
|
|
396
|
-
},
|
|
396
|
+
}, f(_);
|
|
397
397
|
}
|
|
398
398
|
}), d.addEventListener("error", () => {
|
|
399
399
|
const l = new Error("网络错误,上传失败");
|
|
400
|
-
l.request = d, l.type = "network",
|
|
400
|
+
l.request = d, l.type = "network", f(l);
|
|
401
401
|
}), d.addEventListener("timeout", () => {
|
|
402
402
|
const l = new Error("请求超时,上传失败");
|
|
403
|
-
l.request = d, l.type = "timeout",
|
|
404
|
-
}), d.open("POST",
|
|
403
|
+
l.request = d, l.type = "timeout", f(l);
|
|
404
|
+
}), d.open("POST", p.toString()), Object.entries(t).forEach(([l, _]) => {
|
|
405
405
|
d.setRequestHeader(l, _);
|
|
406
406
|
}), d.send(W);
|
|
407
407
|
}
|
|
408
|
-
}),
|
|
408
|
+
}), ba = J.div`
|
|
409
409
|
border: 2px dashed ${(e) => {
|
|
410
410
|
var r, t, s, h;
|
|
411
411
|
return e.$isDragOver ? ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.primary) || "#007bff" : ((h = (s = e.$theme) == null ? void 0 : s.colors) == null ? void 0 : h.border) || "#dee2e6";
|
|
@@ -436,14 +436,14 @@ const da = J.div`
|
|
|
436
436
|
return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.background) || "#f8f9fa";
|
|
437
437
|
}};
|
|
438
438
|
}
|
|
439
|
-
`,
|
|
439
|
+
`, ga = J.div`
|
|
440
440
|
color: ${(e) => {
|
|
441
441
|
var r, t;
|
|
442
442
|
return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.primary) || "#007bff";
|
|
443
443
|
}};
|
|
444
444
|
font-size: 48px;
|
|
445
445
|
margin-bottom: 8px;
|
|
446
|
-
`,
|
|
446
|
+
`, xa = J.div`
|
|
447
447
|
color: ${(e) => {
|
|
448
448
|
var r, t;
|
|
449
449
|
return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.text) || "#343a40";
|
|
@@ -451,19 +451,19 @@ const da = J.div`
|
|
|
451
451
|
font-size: 16px;
|
|
452
452
|
font-weight: 500;
|
|
453
453
|
margin-bottom: 4px;
|
|
454
|
-
`,
|
|
454
|
+
`, Sr = J.div`
|
|
455
455
|
color: ${(e) => {
|
|
456
456
|
var r, t, s, h;
|
|
457
457
|
return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.textSecondary) || ((h = (s = e.$theme) == null ? void 0 : s.colors) == null ? void 0 : h.disabledText) || "#6b7280";
|
|
458
458
|
}};
|
|
459
459
|
font-size: 14px;
|
|
460
|
-
`,
|
|
460
|
+
`, ya = J.input`
|
|
461
461
|
display: none;
|
|
462
|
-
`,
|
|
462
|
+
`, $a = J.div`
|
|
463
463
|
|
|
464
464
|
width: 100%;
|
|
465
465
|
max-width: 600px;
|
|
466
|
-
`,
|
|
466
|
+
`, va = J.div.attrs({
|
|
467
467
|
className: "upload-item"
|
|
468
468
|
})`
|
|
469
469
|
display: flex;
|
|
@@ -490,17 +490,17 @@ const da = J.div`
|
|
|
490
490
|
return e.$hasForm ? "transparent" : e.$status === "error" ? ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.error) || "#FF0000" : ((h = (s = e.$theme) == null ? void 0 : s.colors) == null ? void 0 : h.primary) || "#007bff";
|
|
491
491
|
}};
|
|
492
492
|
}
|
|
493
|
-
`,
|
|
493
|
+
`, wa = J.div`
|
|
494
494
|
color: ${(e) => {
|
|
495
495
|
var r, t;
|
|
496
496
|
return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.primary) || "#007bff";
|
|
497
497
|
}};
|
|
498
498
|
margin-right: 12px;
|
|
499
499
|
flex-shrink: 0;
|
|
500
|
-
`,
|
|
500
|
+
`, ka = J.div`
|
|
501
501
|
flex: 1;
|
|
502
502
|
min-width: 0;
|
|
503
|
-
`,
|
|
503
|
+
`, Sa = J.div`
|
|
504
504
|
color: ${(e) => {
|
|
505
505
|
var r, t;
|
|
506
506
|
return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.text) || "#343a40";
|
|
@@ -511,13 +511,13 @@ const da = J.div`
|
|
|
511
511
|
white-space: nowrap;
|
|
512
512
|
overflow: hidden;
|
|
513
513
|
text-overflow: ellipsis;
|
|
514
|
-
`,
|
|
514
|
+
`, Na = J.div`
|
|
515
515
|
color: ${(e) => {
|
|
516
516
|
var r, t, s, h;
|
|
517
517
|
return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.textSecondary) || ((h = (s = e.$theme) == null ? void 0 : s.colors) == null ? void 0 : h.disabledText) || "#6b7280";
|
|
518
518
|
}};
|
|
519
519
|
font-size: 10px;
|
|
520
|
-
`,
|
|
520
|
+
`, Ca = J.div`
|
|
521
521
|
width: 100%;
|
|
522
522
|
height: 4px;
|
|
523
523
|
background: ${(e) => {
|
|
@@ -542,25 +542,25 @@ const da = J.div`
|
|
|
542
542
|
}};
|
|
543
543
|
transition: width 0.3s ease;
|
|
544
544
|
}
|
|
545
|
-
`,
|
|
545
|
+
`, Ma = J.div`
|
|
546
546
|
margin-left: 12px;
|
|
547
547
|
flex-shrink: 0;
|
|
548
548
|
color: ${(e) => {
|
|
549
|
-
var r, t, s, h, b,
|
|
549
|
+
var r, t, s, h, b, f, d, p, N, C;
|
|
550
550
|
switch (e.$status) {
|
|
551
551
|
case "success":
|
|
552
552
|
return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.success) || "#008000";
|
|
553
553
|
case "error":
|
|
554
554
|
return ((h = (s = e.$theme) == null ? void 0 : s.colors) == null ? void 0 : h.error) || "#FF0000";
|
|
555
555
|
case "uploading":
|
|
556
|
-
return ((
|
|
556
|
+
return ((f = (b = e.$theme) == null ? void 0 : b.colors) == null ? void 0 : f.primary) || "#007bff";
|
|
557
557
|
case "pending":
|
|
558
|
-
return ((
|
|
558
|
+
return ((p = (d = e.$theme) == null ? void 0 : d.colors) == null ? void 0 : p.warning) || "#FFA500";
|
|
559
559
|
default:
|
|
560
|
-
return ((
|
|
560
|
+
return ((C = (N = e.$theme) == null ? void 0 : N.colors) == null ? void 0 : C.disabledText) || "#808080";
|
|
561
561
|
}
|
|
562
562
|
}};
|
|
563
|
-
`,
|
|
563
|
+
`, Ta = J.button`
|
|
564
564
|
background: none;
|
|
565
565
|
border: none;
|
|
566
566
|
color: ${(e) => {
|
|
@@ -635,7 +635,7 @@ J.button`
|
|
|
635
635
|
}}20;
|
|
636
636
|
}
|
|
637
637
|
`;
|
|
638
|
-
const
|
|
638
|
+
const Fa = J.div`
|
|
639
639
|
padding: 0px;
|
|
640
640
|
background: ${(e) => {
|
|
641
641
|
var r, t;
|
|
@@ -696,7 +696,7 @@ J.input`
|
|
|
696
696
|
}};
|
|
697
697
|
}
|
|
698
698
|
`;
|
|
699
|
-
const
|
|
699
|
+
const Da = J.div`
|
|
700
700
|
/* 基础样式 */
|
|
701
701
|
margin-top: 5px;
|
|
702
702
|
background: ${(e) => {
|
|
@@ -739,12 +739,12 @@ const _a = J.div`
|
|
|
739
739
|
min-height: 32px !important;
|
|
740
740
|
}
|
|
741
741
|
`;
|
|
742
|
-
function
|
|
742
|
+
function ce(e) {
|
|
743
743
|
return e.label ? /* @__PURE__ */ B("div", { className: "flex items-center gap-2", children: [
|
|
744
744
|
/* @__PURE__ */ o("span", { className: "font-medium text-gray-800 text-sm", children: e.label }),
|
|
745
745
|
e.required && /* @__PURE__ */ o("span", { className: "text-red-500 font-bold text-sm", children: "*" }),
|
|
746
|
-
(e.helpText || e.description) && /* @__PURE__ */ o(
|
|
747
|
-
|
|
746
|
+
(e.helpText || e.description) && /* @__PURE__ */ o(er, { title: e.helpText || e.description, placement: "top", children: /* @__PURE__ */ o(
|
|
747
|
+
Ir,
|
|
748
748
|
{
|
|
749
749
|
className: "text-gray-400 hover:text-gray-600 cursor-help transition-colors",
|
|
750
750
|
size: 14
|
|
@@ -752,8 +752,8 @@ function ie(e) {
|
|
|
752
752
|
) })
|
|
753
753
|
] }) : null;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
const h = s === "sm" ? "28px" : "40px", b = s === "sm" ? "28px" : "40px",
|
|
755
|
+
function za(e = [], r, t = {}, s = "md") {
|
|
756
|
+
const h = s === "sm" ? "28px" : "40px", b = s === "sm" ? "28px" : "40px", f = s === "sm" ? "0 8px" : "0 12px", d = s === "sm" ? "16px" : "24px", p = s === "sm" ? "12px" : "14px", N = be.useMemo(
|
|
757
757
|
() => {
|
|
758
758
|
var v, U, A, V, O, Q;
|
|
759
759
|
(U = (v = r == null ? void 0 : r.theme) == null ? void 0 : v.colors) != null && U.border;
|
|
@@ -765,7 +765,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
765
765
|
margin-bottom: ${s === "sm" ? "6px" : "8px"} !important;
|
|
766
766
|
font-weight: 500 !important;
|
|
767
767
|
color: #374151 !important;
|
|
768
|
-
font-size: ${
|
|
768
|
+
font-size: ${p} !important;
|
|
769
769
|
}
|
|
770
770
|
.dynamic-form .ant-form-item {
|
|
771
771
|
margin-bottom: ${d} !important;
|
|
@@ -795,8 +795,8 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
795
795
|
transition: all 0.2s !important;
|
|
796
796
|
|
|
797
797
|
line-height: ${b} !important;
|
|
798
|
-
padding: ${
|
|
799
|
-
font-size: ${
|
|
798
|
+
padding: ${f} !important;
|
|
799
|
+
font-size: ${p} !important;
|
|
800
800
|
}
|
|
801
801
|
|
|
802
802
|
/* smooth show/hide for controlled items */
|
|
@@ -814,8 +814,8 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
814
814
|
.dynamic-form .ant-input-number,
|
|
815
815
|
.dynamic-form .ant-picker {
|
|
816
816
|
line-height: ${b} !important;
|
|
817
|
-
padding: ${
|
|
818
|
-
font-size: ${
|
|
817
|
+
padding: ${f} !important;
|
|
818
|
+
font-size: ${p} !important;
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
.dynamic-form .ant-input{
|
|
@@ -838,7 +838,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
838
838
|
border-radius: 6px !important;
|
|
839
839
|
border: 1px solid #d1d5db !important;
|
|
840
840
|
transition: all 0.2s !important;
|
|
841
|
-
font-size: ${
|
|
841
|
+
font-size: ${p} !important;
|
|
842
842
|
}
|
|
843
843
|
|
|
844
844
|
/* 密码框样式修复 */
|
|
@@ -856,7 +856,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
856
856
|
.dynamic-form .ant-input-password .ant-input {
|
|
857
857
|
height: ${s === "sm" ? "26px" : "38px"} !important;
|
|
858
858
|
line-height: ${s === "sm" ? "26px" : "38px"} !important;
|
|
859
|
-
padding: ${
|
|
859
|
+
padding: ${f} !important;
|
|
860
860
|
border: none !important;
|
|
861
861
|
background: transparent !important;
|
|
862
862
|
}
|
|
@@ -914,26 +914,26 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
914
914
|
}
|
|
915
915
|
`;
|
|
916
916
|
},
|
|
917
|
-
[s, h, b,
|
|
917
|
+
[s, h, b, f, d, p, r]
|
|
918
918
|
);
|
|
919
|
-
|
|
919
|
+
be.useEffect(() => {
|
|
920
920
|
const a = document.createElement("style");
|
|
921
921
|
return a.textContent = N, document.head.appendChild(a), () => {
|
|
922
922
|
document.head.removeChild(a);
|
|
923
923
|
};
|
|
924
924
|
}, [N]);
|
|
925
|
-
const [
|
|
925
|
+
const [C, M] = be.useState(() => {
|
|
926
926
|
const a = {};
|
|
927
927
|
return e.forEach((T) => {
|
|
928
928
|
T.name && (T.type === "switch" ? a[T.name] = t[T.name] ?? T.defaultValue ?? !1 : ["select", "radio", "checkbox"].includes(T.type) && (a[T.name] = t[T.name] ?? T.defaultValue ?? (T.type === "checkbox" ? [] : "")));
|
|
929
929
|
}), a;
|
|
930
|
-
}), W =
|
|
931
|
-
|
|
930
|
+
}), W = be.useRef();
|
|
931
|
+
be.useEffect(() => {
|
|
932
932
|
r && r.formInstance && !W.current && (W.current = r.formInstance);
|
|
933
933
|
}, [r]);
|
|
934
934
|
const l = (a, T, v) => {
|
|
935
935
|
var U;
|
|
936
|
-
if (
|
|
936
|
+
if (M((A) => ({ ...A, [a]: T })), W.current && v) {
|
|
937
937
|
let A = [];
|
|
938
938
|
if (Array.isArray(v))
|
|
939
939
|
A = v;
|
|
@@ -956,11 +956,11 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
956
956
|
} catch {
|
|
957
957
|
return {};
|
|
958
958
|
}
|
|
959
|
-
})(),
|
|
959
|
+
})(), ae = (a) => {
|
|
960
960
|
a.forEach((T) => {
|
|
961
961
|
if (!T) return;
|
|
962
962
|
if (T.controlledItems && T.name) {
|
|
963
|
-
const U =
|
|
963
|
+
const U = C[T.name];
|
|
964
964
|
if (Array.isArray(T.controlledItems))
|
|
965
965
|
T.type === "switch" && U === !1 && T.controlledItems.forEach((A) => {
|
|
966
966
|
A && _.add(A);
|
|
@@ -976,10 +976,10 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
(typeof T.hidden == "function" ? T.hidden(I) : T.hidden === !0) && T.name && _.add(T.name), T.type === "col" && Array.isArray(T.children) &&
|
|
979
|
+
(typeof T.hidden == "function" ? T.hidden(I) : T.hidden === !0) && T.name && _.add(T.name), T.type === "col" && Array.isArray(T.children) && ae(T.children);
|
|
980
980
|
});
|
|
981
981
|
};
|
|
982
|
-
|
|
982
|
+
ae(e);
|
|
983
983
|
const oe = e.map((a, T) => {
|
|
984
984
|
var v, U, A, V, O, Q, X, R, ee, G, S, y, x, D, w, L, q, Z, P, k, j, Y;
|
|
985
985
|
if (a.name && _.has(a.name)) return null;
|
|
@@ -1028,11 +1028,11 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1028
1028
|
if (a.type === "col") {
|
|
1029
1029
|
if (!a.children || a.children.length === 0) return null;
|
|
1030
1030
|
const i = (n, z) => {
|
|
1031
|
-
var
|
|
1031
|
+
var ye, Fe, De, ze, _e, Ae, We, Re, qe, Le, Be, Oe, je, Ye, He, $, te, se, ne, le, ie, pe;
|
|
1032
1032
|
const F = typeof n.hidden == "function" ? n.hidden(I) : n.hidden === !0;
|
|
1033
1033
|
if (n.name && _.has(n.name) || F) return null;
|
|
1034
1034
|
const m = {
|
|
1035
|
-
label: n.label ?
|
|
1035
|
+
label: n.label ? ce(n) : void 0,
|
|
1036
1036
|
name: n.name,
|
|
1037
1037
|
rules: n.name ? [
|
|
1038
1038
|
{
|
|
@@ -1057,7 +1057,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1057
1057
|
);
|
|
1058
1058
|
case "input":
|
|
1059
1059
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1060
|
-
|
|
1060
|
+
me,
|
|
1061
1061
|
{
|
|
1062
1062
|
placeholder: n.placeholder,
|
|
1063
1063
|
disabled: n.disabled,
|
|
@@ -1066,23 +1066,23 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1066
1066
|
) }, g);
|
|
1067
1067
|
case "select":
|
|
1068
1068
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1069
|
-
|
|
1069
|
+
Je,
|
|
1070
1070
|
{
|
|
1071
1071
|
placeholder: n.placeholder,
|
|
1072
1072
|
disabled: n.disabled,
|
|
1073
1073
|
className: re,
|
|
1074
|
-
value:
|
|
1075
|
-
onChange: (
|
|
1076
|
-
children: (
|
|
1074
|
+
value: C[n.name || ""],
|
|
1075
|
+
onChange: (de) => l(n.name || "", de, n.controlledItems),
|
|
1076
|
+
children: (ye = n.options) == null ? void 0 : ye.map((de, Ne) => /* @__PURE__ */ o(Je.Option, { value: de.value, children: de.render ? de.render() : de.label }, de.value || Ne))
|
|
1077
1077
|
}
|
|
1078
1078
|
) }, g);
|
|
1079
1079
|
case "number":
|
|
1080
1080
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1081
|
-
|
|
1081
|
+
Ge,
|
|
1082
1082
|
{
|
|
1083
1083
|
addonAfter: n.unit ? /* @__PURE__ */ o("span", { className: "text-[10px] text-gray-300", children: n.unit }) : null,
|
|
1084
|
-
min: (
|
|
1085
|
-
max: (
|
|
1084
|
+
min: (Fe = n.range) == null ? void 0 : Fe.min,
|
|
1085
|
+
max: (De = n.range) == null ? void 0 : De.max,
|
|
1086
1086
|
step: n.step,
|
|
1087
1087
|
placeholder: n.placeholder,
|
|
1088
1088
|
disabled: n.disabled,
|
|
@@ -1092,7 +1092,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1092
1092
|
) }, g);
|
|
1093
1093
|
case "password":
|
|
1094
1094
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1095
|
-
|
|
1095
|
+
me.Password,
|
|
1096
1096
|
{
|
|
1097
1097
|
placeholder: n.placeholder,
|
|
1098
1098
|
disabled: n.disabled,
|
|
@@ -1101,7 +1101,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1101
1101
|
) }, g);
|
|
1102
1102
|
case "textarea":
|
|
1103
1103
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1104
|
-
|
|
1104
|
+
me.TextArea,
|
|
1105
1105
|
{
|
|
1106
1106
|
placeholder: n.placeholder,
|
|
1107
1107
|
disabled: n.disabled,
|
|
@@ -1111,7 +1111,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1111
1111
|
) }, g);
|
|
1112
1112
|
case "date":
|
|
1113
1113
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1114
|
-
|
|
1114
|
+
Ke,
|
|
1115
1115
|
{
|
|
1116
1116
|
placeholder: n.placeholder,
|
|
1117
1117
|
disabled: n.disabled,
|
|
@@ -1121,7 +1121,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1121
1121
|
) }, g);
|
|
1122
1122
|
case "radio":
|
|
1123
1123
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1124
|
-
|
|
1124
|
+
yr.Group,
|
|
1125
1125
|
{
|
|
1126
1126
|
options: n.options,
|
|
1127
1127
|
disabled: n.disabled,
|
|
@@ -1138,13 +1138,13 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1138
1138
|
labelCol: { span: 24 },
|
|
1139
1139
|
wrapperCol: { span: 24 },
|
|
1140
1140
|
children: /* @__PURE__ */ B("div", { className: "flex items-center justify-between", children: [
|
|
1141
|
-
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: n.label ?
|
|
1141
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: n.label ? ce(n) : null }),
|
|
1142
1142
|
/* @__PURE__ */ o(K.Item, { name: n.name, valuePropName: "checked", noStyle: !0, children: /* @__PURE__ */ o(
|
|
1143
|
-
|
|
1143
|
+
xr,
|
|
1144
1144
|
{
|
|
1145
1145
|
disabled: n.disabled,
|
|
1146
|
-
checked:
|
|
1147
|
-
onChange: (
|
|
1146
|
+
checked: C[n.name || ""],
|
|
1147
|
+
onChange: (de) => l(n.name || "", de, n.controlledItems)
|
|
1148
1148
|
}
|
|
1149
1149
|
) })
|
|
1150
1150
|
] })
|
|
@@ -1154,13 +1154,13 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1154
1154
|
case "slider":
|
|
1155
1155
|
return /* @__PURE__ */ B("div", { className: "mb-6", children: [
|
|
1156
1156
|
/* @__PURE__ */ B("div", { className: "flex items-center justify-between mb-3", children: [
|
|
1157
|
-
/* @__PURE__ */ o("div", { className: "flex items-center", children: n.label ?
|
|
1157
|
+
/* @__PURE__ */ o("div", { className: "flex items-center", children: n.label ? ce(n) : null }),
|
|
1158
1158
|
/* @__PURE__ */ B("div", { className: "flex items-center gap-2", children: [
|
|
1159
1159
|
/* @__PURE__ */ o(K.Item, { name: n.name, noStyle: !0, children: /* @__PURE__ */ o(
|
|
1160
|
-
|
|
1160
|
+
Ge,
|
|
1161
1161
|
{
|
|
1162
|
-
min: (
|
|
1163
|
-
max: (
|
|
1162
|
+
min: (ze = n.range) == null ? void 0 : ze.min,
|
|
1163
|
+
max: (_e = n.range) == null ? void 0 : _e.max,
|
|
1164
1164
|
step: n.step,
|
|
1165
1165
|
disabled: n.disabled,
|
|
1166
1166
|
className: "h-8 w-20"
|
|
@@ -1170,10 +1170,10 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1170
1170
|
] })
|
|
1171
1171
|
] }),
|
|
1172
1172
|
/* @__PURE__ */ o(K.Item, { name: n.name, noStyle: !0, children: /* @__PURE__ */ o(
|
|
1173
|
-
|
|
1173
|
+
gr,
|
|
1174
1174
|
{
|
|
1175
|
-
min: (
|
|
1176
|
-
max: (
|
|
1175
|
+
min: (Ae = n.range) == null ? void 0 : Ae.min,
|
|
1176
|
+
max: (We = n.range) == null ? void 0 : We.max,
|
|
1177
1177
|
step: n.step,
|
|
1178
1178
|
disabled: n.disabled,
|
|
1179
1179
|
className: n.className
|
|
@@ -1182,7 +1182,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1182
1182
|
] }, n.name || `slider-${Math.random()}`);
|
|
1183
1183
|
case "checkbox":
|
|
1184
1184
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1185
|
-
|
|
1185
|
+
$r.Group,
|
|
1186
1186
|
{
|
|
1187
1187
|
options: n.options,
|
|
1188
1188
|
disabled: n.disabled,
|
|
@@ -1191,7 +1191,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1191
1191
|
) }, g);
|
|
1192
1192
|
case "email":
|
|
1193
1193
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1194
|
-
|
|
1194
|
+
me,
|
|
1195
1195
|
{
|
|
1196
1196
|
type: "email",
|
|
1197
1197
|
placeholder: n.placeholder,
|
|
@@ -1201,7 +1201,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1201
1201
|
) }, g);
|
|
1202
1202
|
case "time":
|
|
1203
1203
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1204
|
-
|
|
1204
|
+
vr,
|
|
1205
1205
|
{
|
|
1206
1206
|
placeholder: n.placeholder,
|
|
1207
1207
|
disabled: n.disabled,
|
|
@@ -1211,7 +1211,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1211
1211
|
) }, g);
|
|
1212
1212
|
case "datetime":
|
|
1213
1213
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1214
|
-
|
|
1214
|
+
Ke,
|
|
1215
1215
|
{
|
|
1216
1216
|
showTime: !0,
|
|
1217
1217
|
placeholder: n.placeholder,
|
|
@@ -1222,7 +1222,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1222
1222
|
) }, g);
|
|
1223
1223
|
case "file":
|
|
1224
1224
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1225
|
-
|
|
1225
|
+
me,
|
|
1226
1226
|
{
|
|
1227
1227
|
type: "file",
|
|
1228
1228
|
placeholder: n.placeholder,
|
|
@@ -1232,7 +1232,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1232
1232
|
) }, g);
|
|
1233
1233
|
case "color":
|
|
1234
1234
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1235
|
-
|
|
1235
|
+
me,
|
|
1236
1236
|
{
|
|
1237
1237
|
type: "color",
|
|
1238
1238
|
placeholder: n.placeholder,
|
|
@@ -1247,7 +1247,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1247
1247
|
) }, g);
|
|
1248
1248
|
case "json":
|
|
1249
1249
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1250
|
-
|
|
1250
|
+
me.TextArea,
|
|
1251
1251
|
{
|
|
1252
1252
|
placeholder: n.placeholder,
|
|
1253
1253
|
disabled: n.disabled,
|
|
@@ -1257,7 +1257,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1257
1257
|
) }, g);
|
|
1258
1258
|
case "markdown":
|
|
1259
1259
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1260
|
-
|
|
1260
|
+
me.TextArea,
|
|
1261
1261
|
{
|
|
1262
1262
|
placeholder: n.placeholder,
|
|
1263
1263
|
disabled: n.disabled,
|
|
@@ -1267,30 +1267,30 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1267
1267
|
) }, g);
|
|
1268
1268
|
case "uploader":
|
|
1269
1269
|
return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
|
|
1270
|
-
|
|
1270
|
+
Cr,
|
|
1271
1271
|
{
|
|
1272
|
-
multiple: ((
|
|
1273
|
-
accept: ((
|
|
1274
|
-
maxSize: ((
|
|
1275
|
-
maxFiles: ((
|
|
1276
|
-
autoUpload: ((
|
|
1277
|
-
url: (
|
|
1278
|
-
headers: ((
|
|
1279
|
-
queryParams: ((
|
|
1280
|
-
itemForm: ((
|
|
1281
|
-
buttons: ((
|
|
1282
|
-
icons: (
|
|
1272
|
+
multiple: ((Re = n.uploaderConfig) == null ? void 0 : Re.multiple) ?? !0,
|
|
1273
|
+
accept: ((qe = n.uploaderConfig) == null ? void 0 : qe.accept) ?? "*/*",
|
|
1274
|
+
maxSize: ((Le = n.uploaderConfig) == null ? void 0 : Le.maxSize) ?? 100,
|
|
1275
|
+
maxFiles: ((Be = n.uploaderConfig) == null ? void 0 : Be.maxFiles) ?? 10,
|
|
1276
|
+
autoUpload: ((Oe = n.uploaderConfig) == null ? void 0 : Oe.autoUpload) ?? !0,
|
|
1277
|
+
url: (je = n.uploaderConfig) == null ? void 0 : je.url,
|
|
1278
|
+
headers: ((Ye = n.uploaderConfig) == null ? void 0 : Ye.headers) ?? {},
|
|
1279
|
+
queryParams: ((He = n.uploaderConfig) == null ? void 0 : He.queryParams) ?? {},
|
|
1280
|
+
itemForm: (($ = n.uploaderConfig) == null ? void 0 : $.itemForm) ?? [],
|
|
1281
|
+
buttons: ((te = n.uploaderConfig) == null ? void 0 : te.buttons) || [],
|
|
1282
|
+
icons: (se = n.uploaderConfig) == null ? void 0 : se.icons,
|
|
1283
1283
|
placeholder: (ne = n.uploaderConfig) == null ? void 0 : ne.placeholder,
|
|
1284
1284
|
listName: (le = n.uploaderConfig) == null ? void 0 : le.listName,
|
|
1285
|
-
errorMessages: (
|
|
1286
|
-
onRef: (
|
|
1285
|
+
errorMessages: (ie = n.uploaderConfig) == null ? void 0 : ie.errorMessages,
|
|
1286
|
+
onRef: (pe = n.uploaderConfig) == null ? void 0 : pe.onRef,
|
|
1287
1287
|
styles: r,
|
|
1288
|
-
eventsEmit: (
|
|
1288
|
+
eventsEmit: (de, Ne) => {
|
|
1289
1289
|
if (r && typeof r.eventsEmit == "function") {
|
|
1290
|
-
const
|
|
1291
|
-
r.eventsEmit(
|
|
1290
|
+
const Ve = de.startsWith("uploader:") ? de : `uploader:${de}`;
|
|
1291
|
+
r.eventsEmit(Ve, {
|
|
1292
1292
|
fieldName: n.name,
|
|
1293
|
-
...
|
|
1293
|
+
...Ne
|
|
1294
1294
|
});
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
@@ -1345,7 +1345,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1345
1345
|
}), /* @__PURE__ */ o(
|
|
1346
1346
|
K.Item,
|
|
1347
1347
|
{
|
|
1348
|
-
label: a.label ?
|
|
1348
|
+
label: a.label ? ce(a) : void 0,
|
|
1349
1349
|
name: a.name,
|
|
1350
1350
|
rules: i.length > 0 ? i : void 0,
|
|
1351
1351
|
className: "mb-6",
|
|
@@ -1353,7 +1353,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1353
1353
|
wrapperCol: { span: 24 },
|
|
1354
1354
|
required: !1,
|
|
1355
1355
|
children: /* @__PURE__ */ o(
|
|
1356
|
-
|
|
1356
|
+
me,
|
|
1357
1357
|
{
|
|
1358
1358
|
placeholder: a.placeholder,
|
|
1359
1359
|
disabled: a.disabled,
|
|
@@ -1370,7 +1370,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1370
1370
|
return /* @__PURE__ */ o(
|
|
1371
1371
|
K.Item,
|
|
1372
1372
|
{
|
|
1373
|
-
label: a.label ?
|
|
1373
|
+
label: a.label ? ce(a) : void 0,
|
|
1374
1374
|
name: a.name,
|
|
1375
1375
|
rules: a.name ? [{ required: a.required, message: a.error || `请选择${a.label}` }] : void 0,
|
|
1376
1376
|
className: "mb-6",
|
|
@@ -1378,14 +1378,14 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1378
1378
|
wrapperCol: { span: 24 },
|
|
1379
1379
|
required: !1,
|
|
1380
1380
|
children: /* @__PURE__ */ o(
|
|
1381
|
-
|
|
1381
|
+
Je,
|
|
1382
1382
|
{
|
|
1383
1383
|
placeholder: a.placeholder,
|
|
1384
1384
|
disabled: a.disabled,
|
|
1385
1385
|
className: `${a.className || ""} ${s === "sm" ? "h-7" : "h-10"}`,
|
|
1386
|
-
value:
|
|
1386
|
+
value: C[a.name || ""],
|
|
1387
1387
|
onChange: (i) => l(a.name || "", i, a.controlledItems),
|
|
1388
|
-
children: (v = a.options) == null ? void 0 : v.map((i, u) => /* @__PURE__ */ o(
|
|
1388
|
+
children: (v = a.options) == null ? void 0 : v.map((i, u) => /* @__PURE__ */ o(Je.Option, { value: i.value, children: i.render ? i.render() : i.label }, i.value || u))
|
|
1389
1389
|
}
|
|
1390
1390
|
)
|
|
1391
1391
|
},
|
|
@@ -1395,7 +1395,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1395
1395
|
return /* @__PURE__ */ o(
|
|
1396
1396
|
K.Item,
|
|
1397
1397
|
{
|
|
1398
|
-
label: a.label ?
|
|
1398
|
+
label: a.label ? ce(a) : void 0,
|
|
1399
1399
|
name: a.name,
|
|
1400
1400
|
rules: a.name ? [{ required: a.required, message: a.error || `请输入${a.label}` }] : void 0,
|
|
1401
1401
|
className: "mb-6",
|
|
@@ -1403,7 +1403,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1403
1403
|
wrapperCol: { span: 24 },
|
|
1404
1404
|
required: !1,
|
|
1405
1405
|
children: /* @__PURE__ */ o(
|
|
1406
|
-
|
|
1406
|
+
Ge,
|
|
1407
1407
|
{
|
|
1408
1408
|
addonAfter: a.unit ? /* @__PURE__ */ o("span", { className: "text-[10px] text-gray-300", children: a.unit }) : null,
|
|
1409
1409
|
min: (U = a.range) == null ? void 0 : U.min,
|
|
@@ -1421,10 +1421,10 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1421
1421
|
if (a.type === "slider")
|
|
1422
1422
|
return /* @__PURE__ */ B("div", { className: "mb-6", children: [
|
|
1423
1423
|
/* @__PURE__ */ B("div", { className: "flex items-center justify-between mb-3", children: [
|
|
1424
|
-
/* @__PURE__ */ o("div", { className: "flex items-center", children: a.label ?
|
|
1424
|
+
/* @__PURE__ */ o("div", { className: "flex items-center", children: a.label ? ce(a) : null }),
|
|
1425
1425
|
/* @__PURE__ */ B("div", { className: "flex items-center gap-2", children: [
|
|
1426
1426
|
/* @__PURE__ */ o(K.Item, { name: a.name, noStyle: !0, children: /* @__PURE__ */ o(
|
|
1427
|
-
|
|
1427
|
+
Ge,
|
|
1428
1428
|
{
|
|
1429
1429
|
min: (V = a.range) == null ? void 0 : V.min,
|
|
1430
1430
|
max: (O = a.range) == null ? void 0 : O.max,
|
|
@@ -1437,7 +1437,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1437
1437
|
] })
|
|
1438
1438
|
] }),
|
|
1439
1439
|
/* @__PURE__ */ o(K.Item, { name: a.name, noStyle: !0, children: /* @__PURE__ */ o(
|
|
1440
|
-
|
|
1440
|
+
gr,
|
|
1441
1441
|
{
|
|
1442
1442
|
min: (Q = a.range) == null ? void 0 : Q.min,
|
|
1443
1443
|
max: (X = a.range) == null ? void 0 : X.max,
|
|
@@ -1457,12 +1457,12 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1457
1457
|
labelCol: { span: 24 },
|
|
1458
1458
|
wrapperCol: { span: 24 },
|
|
1459
1459
|
children: /* @__PURE__ */ B("div", { className: "flex items-center justify-between", children: [
|
|
1460
|
-
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: a.label ?
|
|
1460
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: a.label ? ce(a) : null }),
|
|
1461
1461
|
/* @__PURE__ */ o(K.Item, { name: a.name, valuePropName: "checked", noStyle: !0, children: /* @__PURE__ */ o(
|
|
1462
|
-
|
|
1462
|
+
xr,
|
|
1463
1463
|
{
|
|
1464
1464
|
disabled: a.disabled,
|
|
1465
|
-
checked: a.name ?
|
|
1465
|
+
checked: a.name ? C[a.name] : !1,
|
|
1466
1466
|
className: a.className,
|
|
1467
1467
|
onChange: (i) => a.name && l(a.name, i, a.controlledItems)
|
|
1468
1468
|
}
|
|
@@ -1484,7 +1484,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1484
1484
|
}), /* @__PURE__ */ o(
|
|
1485
1485
|
K.Item,
|
|
1486
1486
|
{
|
|
1487
|
-
label: a.label ?
|
|
1487
|
+
label: a.label ? ce(a) : void 0,
|
|
1488
1488
|
name: a.name,
|
|
1489
1489
|
rules: i.length > 0 ? i : void 0,
|
|
1490
1490
|
className: "mb-6",
|
|
@@ -1492,7 +1492,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1492
1492
|
wrapperCol: { span: 24 },
|
|
1493
1493
|
required: !1,
|
|
1494
1494
|
children: /* @__PURE__ */ o(
|
|
1495
|
-
|
|
1495
|
+
me.TextArea,
|
|
1496
1496
|
{
|
|
1497
1497
|
placeholder: a.placeholder,
|
|
1498
1498
|
disabled: a.disabled,
|
|
@@ -1511,7 +1511,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1511
1511
|
return a.type === "date" ? /* @__PURE__ */ o(
|
|
1512
1512
|
K.Item,
|
|
1513
1513
|
{
|
|
1514
|
-
label: a.label ?
|
|
1514
|
+
label: a.label ? ce(a) : void 0,
|
|
1515
1515
|
name: a.name,
|
|
1516
1516
|
rules: a.name ? [{ required: a.required, message: a.error || `请选择${a.label}` }] : void 0,
|
|
1517
1517
|
className: "mb-6",
|
|
@@ -1519,7 +1519,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1519
1519
|
wrapperCol: { span: 24 },
|
|
1520
1520
|
required: !1,
|
|
1521
1521
|
children: /* @__PURE__ */ o(
|
|
1522
|
-
|
|
1522
|
+
Ke,
|
|
1523
1523
|
{
|
|
1524
1524
|
placeholder: a.placeholder,
|
|
1525
1525
|
disabled: a.disabled,
|
|
@@ -1532,20 +1532,20 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1532
1532
|
) : a.type === "radio" ? /* @__PURE__ */ o(
|
|
1533
1533
|
K.Item,
|
|
1534
1534
|
{
|
|
1535
|
-
label: a.label ?
|
|
1535
|
+
label: a.label ? ce(a) : void 0,
|
|
1536
1536
|
name: a.name,
|
|
1537
1537
|
rules: a.name ? [{ required: a.required, message: a.error || `请选择${a.label}` }] : void 0,
|
|
1538
1538
|
className: "mb-6",
|
|
1539
1539
|
labelCol: { span: 24 },
|
|
1540
1540
|
wrapperCol: { span: 24 },
|
|
1541
1541
|
required: !1,
|
|
1542
|
-
children: /* @__PURE__ */ o(
|
|
1542
|
+
children: /* @__PURE__ */ o(yr.Group, { options: a.options, disabled: a.disabled, className: a.className })
|
|
1543
1543
|
},
|
|
1544
1544
|
a.name || `radio-${Math.random()}`
|
|
1545
1545
|
) : a.type === "password" ? /* @__PURE__ */ o(
|
|
1546
1546
|
K.Item,
|
|
1547
1547
|
{
|
|
1548
|
-
label: a.label ?
|
|
1548
|
+
label: a.label ? ce(a) : void 0,
|
|
1549
1549
|
name: a.name,
|
|
1550
1550
|
rules: a.name ? [{ required: a.required, message: a.error || `请输入${a.label}` }] : void 0,
|
|
1551
1551
|
className: "mb-6",
|
|
@@ -1553,7 +1553,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1553
1553
|
wrapperCol: { span: 24 },
|
|
1554
1554
|
required: !1,
|
|
1555
1555
|
children: /* @__PURE__ */ o(
|
|
1556
|
-
|
|
1556
|
+
me.Password,
|
|
1557
1557
|
{
|
|
1558
1558
|
placeholder: a.placeholder,
|
|
1559
1559
|
disabled: a.disabled,
|
|
@@ -1565,7 +1565,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1565
1565
|
) : a.type === "checkbox" ? /* @__PURE__ */ o(
|
|
1566
1566
|
K.Item,
|
|
1567
1567
|
{
|
|
1568
|
-
label: a.label ?
|
|
1568
|
+
label: a.label ? ce(a) : void 0,
|
|
1569
1569
|
name: a.name,
|
|
1570
1570
|
rules: a.name ? [{ required: a.required, message: a.error || `请选择${a.label}` }] : void 0,
|
|
1571
1571
|
className: "mb-6",
|
|
@@ -1573,7 +1573,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1573
1573
|
wrapperCol: { span: 24 },
|
|
1574
1574
|
required: !1,
|
|
1575
1575
|
children: /* @__PURE__ */ o(
|
|
1576
|
-
|
|
1576
|
+
$r.Group,
|
|
1577
1577
|
{
|
|
1578
1578
|
options: a.options,
|
|
1579
1579
|
disabled: a.disabled,
|
|
@@ -1585,7 +1585,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1585
1585
|
) : a.type === "email" ? /* @__PURE__ */ o(
|
|
1586
1586
|
K.Item,
|
|
1587
1587
|
{
|
|
1588
|
-
label: a.label ?
|
|
1588
|
+
label: a.label ? ce(a) : void 0,
|
|
1589
1589
|
name: a.name,
|
|
1590
1590
|
rules: a.name ? [
|
|
1591
1591
|
{ required: a.required, message: a.error || `请输入${a.label}` },
|
|
@@ -1596,7 +1596,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1596
1596
|
wrapperCol: { span: 24 },
|
|
1597
1597
|
required: !1,
|
|
1598
1598
|
children: /* @__PURE__ */ o(
|
|
1599
|
-
|
|
1599
|
+
me,
|
|
1600
1600
|
{
|
|
1601
1601
|
type: "email",
|
|
1602
1602
|
placeholder: a.placeholder,
|
|
@@ -1609,7 +1609,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1609
1609
|
) : a.type === "time" ? /* @__PURE__ */ o(
|
|
1610
1610
|
K.Item,
|
|
1611
1611
|
{
|
|
1612
|
-
label: a.label ?
|
|
1612
|
+
label: a.label ? ce(a) : void 0,
|
|
1613
1613
|
name: a.name,
|
|
1614
1614
|
rules: a.name ? [{ required: a.required, message: a.error || `请选择${a.label}` }] : void 0,
|
|
1615
1615
|
className: "mb-6",
|
|
@@ -1617,7 +1617,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1617
1617
|
wrapperCol: { span: 24 },
|
|
1618
1618
|
required: !1,
|
|
1619
1619
|
children: /* @__PURE__ */ o(
|
|
1620
|
-
|
|
1620
|
+
vr,
|
|
1621
1621
|
{
|
|
1622
1622
|
placeholder: a.placeholder,
|
|
1623
1623
|
disabled: a.disabled,
|
|
@@ -1630,7 +1630,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1630
1630
|
) : a.type === "datetime" ? /* @__PURE__ */ o(
|
|
1631
1631
|
K.Item,
|
|
1632
1632
|
{
|
|
1633
|
-
label: a.label ?
|
|
1633
|
+
label: a.label ? ce(a) : void 0,
|
|
1634
1634
|
name: a.name,
|
|
1635
1635
|
rules: a.name ? [{ required: a.required, message: a.error || `请选择${a.label}` }] : void 0,
|
|
1636
1636
|
className: "mb-6",
|
|
@@ -1638,7 +1638,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1638
1638
|
wrapperCol: { span: 24 },
|
|
1639
1639
|
required: !1,
|
|
1640
1640
|
children: /* @__PURE__ */ o(
|
|
1641
|
-
|
|
1641
|
+
Ke,
|
|
1642
1642
|
{
|
|
1643
1643
|
showTime: !0,
|
|
1644
1644
|
placeholder: a.placeholder,
|
|
@@ -1652,7 +1652,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1652
1652
|
) : a.type === "file" ? /* @__PURE__ */ o(
|
|
1653
1653
|
K.Item,
|
|
1654
1654
|
{
|
|
1655
|
-
label: a.label ?
|
|
1655
|
+
label: a.label ? ce(a) : void 0,
|
|
1656
1656
|
name: a.name,
|
|
1657
1657
|
rules: a.name ? [{ required: a.required, message: a.error || `请选择${a.label}` }] : void 0,
|
|
1658
1658
|
className: "mb-6",
|
|
@@ -1660,7 +1660,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1660
1660
|
wrapperCol: { span: 24 },
|
|
1661
1661
|
required: !1,
|
|
1662
1662
|
children: /* @__PURE__ */ o(
|
|
1663
|
-
|
|
1663
|
+
me,
|
|
1664
1664
|
{
|
|
1665
1665
|
type: "file",
|
|
1666
1666
|
placeholder: a.placeholder,
|
|
@@ -1673,7 +1673,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1673
1673
|
) : a.type === "color" ? /* @__PURE__ */ o(
|
|
1674
1674
|
K.Item,
|
|
1675
1675
|
{
|
|
1676
|
-
label: a.label ?
|
|
1676
|
+
label: a.label ? ce(a) : void 0,
|
|
1677
1677
|
name: a.name,
|
|
1678
1678
|
rules: a.name ? [{ required: a.required, message: a.error || `请选择${a.label}` }] : void 0,
|
|
1679
1679
|
className: "mb-6",
|
|
@@ -1681,7 +1681,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1681
1681
|
wrapperCol: { span: 24 },
|
|
1682
1682
|
required: !1,
|
|
1683
1683
|
children: /* @__PURE__ */ o(
|
|
1684
|
-
|
|
1684
|
+
me,
|
|
1685
1685
|
{
|
|
1686
1686
|
type: "color",
|
|
1687
1687
|
placeholder: a.placeholder,
|
|
@@ -1695,7 +1695,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1695
1695
|
) : a.type === "json" ? /* @__PURE__ */ o(
|
|
1696
1696
|
K.Item,
|
|
1697
1697
|
{
|
|
1698
|
-
label: a.label ?
|
|
1698
|
+
label: a.label ? ce(a) : void 0,
|
|
1699
1699
|
name: a.name,
|
|
1700
1700
|
rules: a.name ? [
|
|
1701
1701
|
{ required: a.required, message: a.error || `请输入${a.label}` },
|
|
@@ -1715,7 +1715,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1715
1715
|
wrapperCol: { span: 24 },
|
|
1716
1716
|
required: !1,
|
|
1717
1717
|
children: /* @__PURE__ */ o(
|
|
1718
|
-
|
|
1718
|
+
me.TextArea,
|
|
1719
1719
|
{
|
|
1720
1720
|
placeholder: a.placeholder,
|
|
1721
1721
|
disabled: a.disabled,
|
|
@@ -1728,7 +1728,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1728
1728
|
) : a.type === "markdown" ? /* @__PURE__ */ o(
|
|
1729
1729
|
K.Item,
|
|
1730
1730
|
{
|
|
1731
|
-
label: a.label ?
|
|
1731
|
+
label: a.label ? ce(a) : void 0,
|
|
1732
1732
|
name: a.name,
|
|
1733
1733
|
rules: a.name ? [{ required: a.required, message: a.error || `请输入${a.label}` }] : void 0,
|
|
1734
1734
|
className: "mb-6",
|
|
@@ -1736,7 +1736,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1736
1736
|
wrapperCol: { span: 24 },
|
|
1737
1737
|
required: !1,
|
|
1738
1738
|
children: /* @__PURE__ */ o(
|
|
1739
|
-
|
|
1739
|
+
me.TextArea,
|
|
1740
1740
|
{
|
|
1741
1741
|
placeholder: a.placeholder,
|
|
1742
1742
|
disabled: a.disabled,
|
|
@@ -1749,7 +1749,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1749
1749
|
) : a.type === "uploader" ? /* @__PURE__ */ o(
|
|
1750
1750
|
K.Item,
|
|
1751
1751
|
{
|
|
1752
|
-
label: a.label ?
|
|
1752
|
+
label: a.label ? ce(a) : void 0,
|
|
1753
1753
|
name: a.name,
|
|
1754
1754
|
rules: a.name ? [{ required: a.required, message: a.error || `请上传${a.label}` }] : void 0,
|
|
1755
1755
|
className: "mb-6",
|
|
@@ -1757,7 +1757,7 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1757
1757
|
wrapperCol: { span: 24 },
|
|
1758
1758
|
required: !1,
|
|
1759
1759
|
children: /* @__PURE__ */ o(
|
|
1760
|
-
|
|
1760
|
+
Cr,
|
|
1761
1761
|
{
|
|
1762
1762
|
multiple: ((R = a.uploaderConfig) == null ? void 0 : R.multiple) ?? !0,
|
|
1763
1763
|
accept: ((ee = a.uploaderConfig) == null ? void 0 : ee.accept) ?? "*/*",
|
|
@@ -1790,11 +1790,11 @@ function Aa(e = [], r, t = {}, s = "md") {
|
|
|
1790
1790
|
a.name || `uploader-${Math.random()}`
|
|
1791
1791
|
) : null;
|
|
1792
1792
|
});
|
|
1793
|
-
return
|
|
1793
|
+
return be.useEffect(() => {
|
|
1794
1794
|
r && typeof r.setFormRef == "function" && r.setFormRef(W);
|
|
1795
1795
|
}, [r]), oe;
|
|
1796
1796
|
}
|
|
1797
|
-
const
|
|
1797
|
+
const _a = `
|
|
1798
1798
|
.ant-input-password .ant-input-suffix {
|
|
1799
1799
|
position: absolute !important;
|
|
1800
1800
|
right: 8px !important;
|
|
@@ -1813,7 +1813,7 @@ const Wa = `
|
|
|
1813
1813
|
.ant-input-password:hover .ant-input-suffix .anticon {
|
|
1814
1814
|
color: rgba(0, 0, 0, 0.65) !important;
|
|
1815
1815
|
}
|
|
1816
|
-
`,
|
|
1816
|
+
`, Vr = be.forwardRef(
|
|
1817
1817
|
({
|
|
1818
1818
|
formItems: e,
|
|
1819
1819
|
formProps: r = {},
|
|
@@ -1821,20 +1821,20 @@ const Wa = `
|
|
|
1821
1821
|
eventsEmit: s,
|
|
1822
1822
|
databaseType: h,
|
|
1823
1823
|
styles: b,
|
|
1824
|
-
size:
|
|
1824
|
+
size: f = "md",
|
|
1825
1825
|
formConfig: d,
|
|
1826
|
-
title:
|
|
1826
|
+
title: p,
|
|
1827
1827
|
description: N,
|
|
1828
|
-
formWidth:
|
|
1829
|
-
...
|
|
1828
|
+
formWidth: C,
|
|
1829
|
+
...M
|
|
1830
1830
|
}, W) => {
|
|
1831
1831
|
var G, S, y, x, D, w, L, q, Z, P, k, j, Y, i;
|
|
1832
|
-
const [l] = K.useForm(), _ =
|
|
1832
|
+
const [l] = K.useForm(), _ = Te(), I = $e(
|
|
1833
1833
|
// 基础:默认主题 + useTheme的配置
|
|
1834
|
-
|
|
1834
|
+
$e({ theme: E, mode: "light" }, _),
|
|
1835
1835
|
// 最高层:用户手动传入的styles
|
|
1836
1836
|
b
|
|
1837
|
-
),
|
|
1837
|
+
), ae = Me({}), oe = () => {
|
|
1838
1838
|
const u = l.getFieldsValue(), c = [], n = (F) => {
|
|
1839
1839
|
F == null || F.forEach((m) => {
|
|
1840
1840
|
m && (m.type === "col" && Array.isArray(m.children) ? n(m.children) : m.name && c.push({ name: m.name, type: m.type }));
|
|
@@ -1842,14 +1842,14 @@ const Wa = `
|
|
|
1842
1842
|
};
|
|
1843
1843
|
n(e);
|
|
1844
1844
|
const z = c.map((F) => {
|
|
1845
|
-
const g = F.type === "uploader" ?
|
|
1845
|
+
const g = F.type === "uploader" ? ae.current[F.name] || u[F.name] || [] : u[F.name];
|
|
1846
1846
|
return { name: F.name, type: F.type, value: g };
|
|
1847
1847
|
});
|
|
1848
1848
|
return {
|
|
1849
1849
|
formName: (r == null ? void 0 : r.name) || "",
|
|
1850
1850
|
values: u,
|
|
1851
1851
|
fields: z,
|
|
1852
|
-
files:
|
|
1852
|
+
files: ae.current,
|
|
1853
1853
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1854
1854
|
};
|
|
1855
1855
|
}, a = (u, c) => {
|
|
@@ -1869,7 +1869,7 @@ const Wa = `
|
|
|
1869
1869
|
if (u.startsWith("uploader:")) {
|
|
1870
1870
|
const n = c == null ? void 0 : c.fieldName;
|
|
1871
1871
|
if (n) {
|
|
1872
|
-
const z =
|
|
1872
|
+
const z = ae.current[n] || [];
|
|
1873
1873
|
let F = z;
|
|
1874
1874
|
switch (u) {
|
|
1875
1875
|
case "uploader:success": {
|
|
@@ -1882,7 +1882,7 @@ const Wa = `
|
|
|
1882
1882
|
type: m.type,
|
|
1883
1883
|
uploadApiRes: m.uploadApiRes || {},
|
|
1884
1884
|
formData: m.formData || {}
|
|
1885
|
-
}, re = z.findIndex((
|
|
1885
|
+
}, re = z.findIndex((ye) => ye.id === g.id);
|
|
1886
1886
|
re >= 0 ? (z[re] = g, F = [...z]) : F = [...z, g];
|
|
1887
1887
|
}
|
|
1888
1888
|
break;
|
|
@@ -1909,7 +1909,7 @@ const Wa = `
|
|
|
1909
1909
|
break;
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
|
-
|
|
1912
|
+
ae.current[n] = F, l.setFieldsValue({ [n]: F });
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
1915
|
if (typeof s == "function") {
|
|
@@ -1919,7 +1919,7 @@ const Wa = `
|
|
|
1919
1919
|
};
|
|
1920
1920
|
u === "uploader:error" && n.data === void 0 && (n.data = oe()), s(u, n);
|
|
1921
1921
|
}
|
|
1922
|
-
}, [v, U] =
|
|
1922
|
+
}, [v, U] = ue(e);
|
|
1923
1923
|
we(() => {
|
|
1924
1924
|
U(e);
|
|
1925
1925
|
}, [e]);
|
|
@@ -1937,11 +1937,11 @@ const Wa = `
|
|
|
1937
1937
|
return n;
|
|
1938
1938
|
}
|
|
1939
1939
|
}
|
|
1940
|
-
}, O =
|
|
1940
|
+
}, O = za(
|
|
1941
1941
|
v,
|
|
1942
1942
|
{ ...b, eventsEmit: T, formInstance: l },
|
|
1943
1943
|
t,
|
|
1944
|
-
|
|
1944
|
+
f
|
|
1945
1945
|
), Q = async () => {
|
|
1946
1946
|
try {
|
|
1947
1947
|
const u = await l.validateFields();
|
|
@@ -1976,7 +1976,7 @@ const Wa = `
|
|
|
1976
1976
|
};
|
|
1977
1977
|
n(e);
|
|
1978
1978
|
const z = c.map((F) => {
|
|
1979
|
-
const g = F.type === "uploader" ?
|
|
1979
|
+
const g = F.type === "uploader" ? ae.current[F.name] || u[F.name] || [] : u[F.name];
|
|
1980
1980
|
return { name: F.name, type: F.type, value: g };
|
|
1981
1981
|
});
|
|
1982
1982
|
return {
|
|
@@ -1994,7 +1994,7 @@ const Wa = `
|
|
|
1994
1994
|
};
|
|
1995
1995
|
z(e);
|
|
1996
1996
|
const F = n.map((m) => {
|
|
1997
|
-
const re = m.type === "uploader" ?
|
|
1997
|
+
const re = m.type === "uploader" ? ae.current[m.name] || c[m.name] || [] : c[m.name];
|
|
1998
1998
|
return { name: m.name, type: m.type, value: re };
|
|
1999
1999
|
});
|
|
2000
2000
|
return {
|
|
@@ -2007,7 +2007,7 @@ const Wa = `
|
|
|
2007
2007
|
};
|
|
2008
2008
|
}
|
|
2009
2009
|
};
|
|
2010
|
-
return
|
|
2010
|
+
return be.useImperativeHandle(
|
|
2011
2011
|
W,
|
|
2012
2012
|
() => ({
|
|
2013
2013
|
form: l,
|
|
@@ -2023,8 +2023,8 @@ const Wa = `
|
|
|
2023
2023
|
getFieldProps: (u) => V(u)
|
|
2024
2024
|
}),
|
|
2025
2025
|
[l, ee, Q, X, R]
|
|
2026
|
-
), /* @__PURE__ */ B(
|
|
2027
|
-
/* @__PURE__ */ o("style", { children:
|
|
2026
|
+
), /* @__PURE__ */ B(Hr, { children: [
|
|
2027
|
+
/* @__PURE__ */ o("style", { children: _a }),
|
|
2028
2028
|
/* @__PURE__ */ B(
|
|
2029
2029
|
"div",
|
|
2030
2030
|
{
|
|
@@ -2032,14 +2032,14 @@ const Wa = `
|
|
|
2032
2032
|
position: "relative",
|
|
2033
2033
|
height: "100%",
|
|
2034
2034
|
padding: "24px",
|
|
2035
|
-
width:
|
|
2035
|
+
width: C || "100%",
|
|
2036
2036
|
// 使用传入的表单宽度或默认100%
|
|
2037
|
-
maxWidth:
|
|
2037
|
+
maxWidth: C || "100%"
|
|
2038
2038
|
// 确保最大宽度不超过设定值
|
|
2039
2039
|
},
|
|
2040
2040
|
children: [
|
|
2041
|
-
(
|
|
2042
|
-
|
|
2041
|
+
(p || N) && /* @__PURE__ */ B("div", { style: { marginBottom: "24px" }, children: [
|
|
2042
|
+
p && /* @__PURE__ */ o(
|
|
2043
2043
|
"h2",
|
|
2044
2044
|
{
|
|
2045
2045
|
style: {
|
|
@@ -2048,7 +2048,7 @@ const Wa = `
|
|
|
2048
2048
|
color: ((S = (G = I.theme) == null ? void 0 : G.colors) == null ? void 0 : S.text) || "#1f2937",
|
|
2049
2049
|
margin: "0 0 8px 0"
|
|
2050
2050
|
},
|
|
2051
|
-
children:
|
|
2051
|
+
children: p
|
|
2052
2052
|
}
|
|
2053
2053
|
),
|
|
2054
2054
|
N && /* @__PURE__ */ o(
|
|
@@ -2071,7 +2071,7 @@ const Wa = `
|
|
|
2071
2071
|
...r,
|
|
2072
2072
|
initialValues: t,
|
|
2073
2073
|
onValuesChange: a,
|
|
2074
|
-
...
|
|
2074
|
+
...M,
|
|
2075
2075
|
style: {
|
|
2076
2076
|
...r == null ? void 0 : r.style,
|
|
2077
2077
|
width: "100%",
|
|
@@ -2095,7 +2095,7 @@ const Wa = `
|
|
|
2095
2095
|
},
|
|
2096
2096
|
children: [
|
|
2097
2097
|
(d == null ? void 0 : d.showReset) && /* @__PURE__ */ o(
|
|
2098
|
-
|
|
2098
|
+
wr,
|
|
2099
2099
|
{
|
|
2100
2100
|
onClick: X,
|
|
2101
2101
|
style: {
|
|
@@ -2106,7 +2106,7 @@ const Wa = `
|
|
|
2106
2106
|
}
|
|
2107
2107
|
),
|
|
2108
2108
|
(d == null ? void 0 : d.showSubmit) && /* @__PURE__ */ o(
|
|
2109
|
-
|
|
2109
|
+
wr,
|
|
2110
2110
|
{
|
|
2111
2111
|
type: "primary",
|
|
2112
2112
|
onClick: Q,
|
|
@@ -2129,13 +2129,13 @@ const Wa = `
|
|
|
2129
2129
|
] });
|
|
2130
2130
|
}
|
|
2131
2131
|
);
|
|
2132
|
-
|
|
2133
|
-
const
|
|
2134
|
-
var s, h, b,
|
|
2132
|
+
be.memo(Vr);
|
|
2133
|
+
const Nr = !1, Aa = (e, r) => r != null && r.fileType ? e.startsWith("image/") ? r.fileType.image || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("document") || e.includes("pdf") || e.includes("text") ? r.fileType.document || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("spreadsheet") || e.includes("excel") || e.includes("csv") ? r.fileType.spreadsheet || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("zip") || e.includes("rar") || e.includes("7z") ? r.fileType.archive || /* @__PURE__ */ o(ke, { size: 20 }) : e.startsWith("video/") ? r.fileType.video || /* @__PURE__ */ o(ke, { size: 20 }) : e.startsWith("audio/") ? r.fileType.audio || /* @__PURE__ */ o(ke, { size: 20 }) : r.fileType.default || /* @__PURE__ */ o(ke, { size: 20 }) : /* @__PURE__ */ o(ke, { size: 20 }), Wa = (e, r, t) => {
|
|
2134
|
+
var s, h, b, f;
|
|
2135
2135
|
if (t != null && t.itemStatus)
|
|
2136
2136
|
switch (e) {
|
|
2137
2137
|
case "error":
|
|
2138
|
-
return t.itemStatus.error || /* @__PURE__ */ o(
|
|
2138
|
+
return t.itemStatus.error || /* @__PURE__ */ o(br, { size: 20 });
|
|
2139
2139
|
case "uploading":
|
|
2140
2140
|
return t.itemStatus.uploading || /* @__PURE__ */ o("span", { style: { fontSize: "12px", color: ((s = r == null ? void 0 : r.colors) == null ? void 0 : s.primary) || "#007bff" }, children: "上传中..." });
|
|
2141
2141
|
case "success":
|
|
@@ -2147,16 +2147,16 @@ const Mr = !1, Ra = (e, r) => r != null && r.fileType ? e.startsWith("image/") ?
|
|
|
2147
2147
|
}
|
|
2148
2148
|
switch (e) {
|
|
2149
2149
|
case "error":
|
|
2150
|
-
return /* @__PURE__ */ o(
|
|
2150
|
+
return /* @__PURE__ */ o(br, { size: 20 });
|
|
2151
2151
|
case "uploading":
|
|
2152
2152
|
return /* @__PURE__ */ o("span", { style: { fontSize: "12px", color: ((b = r == null ? void 0 : r.colors) == null ? void 0 : b.primary) || "#007bff" }, children: "上传中..." });
|
|
2153
2153
|
case "pending":
|
|
2154
|
-
return /* @__PURE__ */ o("span", { style: { fontSize: "12px", color: ((
|
|
2154
|
+
return /* @__PURE__ */ o("span", { style: { fontSize: "12px", color: ((f = r == null ? void 0 : r.colors) == null ? void 0 : f.warning) || "#FFA500" }, children: "等待中" });
|
|
2155
2155
|
default:
|
|
2156
2156
|
return null;
|
|
2157
2157
|
}
|
|
2158
2158
|
};
|
|
2159
|
-
|
|
2159
|
+
Xr`
|
|
2160
2160
|
.upload-item-container .upload-item {
|
|
2161
2161
|
padding: 0px !important;
|
|
2162
2162
|
}
|
|
@@ -2165,78 +2165,78 @@ Qr`
|
|
|
2165
2165
|
padding: 0px !important;
|
|
2166
2166
|
}
|
|
2167
2167
|
`;
|
|
2168
|
-
const
|
|
2168
|
+
const Ra = ({
|
|
2169
2169
|
item: e,
|
|
2170
2170
|
index: r,
|
|
2171
2171
|
theme: t,
|
|
2172
2172
|
itemForm: s,
|
|
2173
2173
|
onRemove: h,
|
|
2174
2174
|
onToggleExpand: b,
|
|
2175
|
-
onFormDataChange:
|
|
2175
|
+
onFormDataChange: f,
|
|
2176
2176
|
icons: d
|
|
2177
2177
|
}) => {
|
|
2178
|
-
var
|
|
2179
|
-
return /* @__PURE__ */ B(
|
|
2180
|
-
/* @__PURE__ */ B(
|
|
2181
|
-
/* @__PURE__ */ o(
|
|
2182
|
-
/* @__PURE__ */ B(
|
|
2178
|
+
var p;
|
|
2179
|
+
return /* @__PURE__ */ B(Da, { $theme: t, $status: e.status, $hasForm: s.length > 0, children: [
|
|
2180
|
+
/* @__PURE__ */ B(va, { $theme: t, $status: e.status, $hasForm: s.length > 0, children: [
|
|
2181
|
+
/* @__PURE__ */ o(wa, { $theme: t, children: Aa(e.type, d) }),
|
|
2182
|
+
/* @__PURE__ */ B(ka, { children: [
|
|
2183
2183
|
/* @__PURE__ */ B("div", { className: "flex items-center gap-1 line-clamp-1", children: [
|
|
2184
|
-
/* @__PURE__ */ o(
|
|
2185
|
-
/* @__PURE__ */ o(
|
|
2184
|
+
/* @__PURE__ */ o(Sa, { $theme: t, children: e.name }),
|
|
2185
|
+
/* @__PURE__ */ o(Na, { $theme: t, children: Ur(e.size) })
|
|
2186
2186
|
] }),
|
|
2187
|
-
e.status === "uploading" && /* @__PURE__ */ o(
|
|
2188
|
-
e.status === "error" && e.error && /* @__PURE__ */ o("div", { style: { color: ((
|
|
2187
|
+
e.status === "uploading" && /* @__PURE__ */ o(Ca, { $theme: t, $progress: e.progress }),
|
|
2188
|
+
e.status === "error" && e.error && /* @__PURE__ */ o("div", { style: { color: ((p = t == null ? void 0 : t.colors) == null ? void 0 : p.error) || "#FF0000", fontSize: "12px", marginTop: "4px" }, children: typeof e.error == "string" ? e.error : String(e.error) })
|
|
2189
2189
|
] }),
|
|
2190
2190
|
(() => {
|
|
2191
|
-
const N =
|
|
2192
|
-
return N && /* @__PURE__ */ o(
|
|
2191
|
+
const N = Wa(e.status, t, d);
|
|
2192
|
+
return N && /* @__PURE__ */ o(Ma, { $theme: t, $status: e.status, children: N });
|
|
2193
2193
|
})(),
|
|
2194
|
-
|
|
2194
|
+
Nr,
|
|
2195
2195
|
/* @__PURE__ */ o(
|
|
2196
|
-
|
|
2196
|
+
Ta,
|
|
2197
2197
|
{
|
|
2198
2198
|
$theme: t,
|
|
2199
2199
|
onClick: () => h(e.id),
|
|
2200
2200
|
title: "移除文件",
|
|
2201
|
-
children: /* @__PURE__ */ o(
|
|
2201
|
+
children: /* @__PURE__ */ o(Zr, { size: 16 })
|
|
2202
2202
|
}
|
|
2203
2203
|
)
|
|
2204
2204
|
] }),
|
|
2205
|
-
(s.length > 0 ||
|
|
2206
|
-
|
|
2205
|
+
(s.length > 0 || Nr) && /* @__PURE__ */ o(
|
|
2206
|
+
Fa,
|
|
2207
2207
|
{
|
|
2208
2208
|
$theme: t,
|
|
2209
2209
|
$hasError: e.status === "error",
|
|
2210
2210
|
className: "list-my",
|
|
2211
2211
|
children: /* @__PURE__ */ o(
|
|
2212
|
-
|
|
2212
|
+
Vr,
|
|
2213
2213
|
{
|
|
2214
2214
|
formItems: s,
|
|
2215
2215
|
initialValues: e.formData || {},
|
|
2216
2216
|
size: "sm",
|
|
2217
2217
|
formProps: { component: !1 },
|
|
2218
|
-
eventsEmit: (N,
|
|
2219
|
-
switch (console.log("DynamicForm Event:", N,
|
|
2218
|
+
eventsEmit: (N, C) => {
|
|
2219
|
+
switch (console.log("DynamicForm Event:", N, C), N) {
|
|
2220
2220
|
case "form:submit":
|
|
2221
|
-
|
|
2221
|
+
f(e.id, C.values);
|
|
2222
2222
|
break;
|
|
2223
2223
|
case "form:change":
|
|
2224
|
-
|
|
2224
|
+
f(e.id, C.values);
|
|
2225
2225
|
break;
|
|
2226
2226
|
case "form:fieldChange":
|
|
2227
|
-
if (
|
|
2228
|
-
const
|
|
2227
|
+
if (C.field && C.value !== void 0) {
|
|
2228
|
+
const M = {
|
|
2229
2229
|
...e.formData,
|
|
2230
|
-
[
|
|
2230
|
+
[C.field]: C.value
|
|
2231
2231
|
};
|
|
2232
|
-
|
|
2232
|
+
f(e.id, M);
|
|
2233
2233
|
}
|
|
2234
2234
|
break;
|
|
2235
2235
|
case "form:reset":
|
|
2236
|
-
|
|
2236
|
+
f(e.id, {});
|
|
2237
2237
|
break;
|
|
2238
2238
|
case "form:validate":
|
|
2239
|
-
|
|
2239
|
+
C.values && f(e.id, C.values);
|
|
2240
2240
|
break;
|
|
2241
2241
|
}
|
|
2242
2242
|
},
|
|
@@ -2250,7 +2250,7 @@ const La = ({
|
|
|
2250
2250
|
}
|
|
2251
2251
|
)
|
|
2252
2252
|
] });
|
|
2253
|
-
},
|
|
2253
|
+
}, Cr = ({
|
|
2254
2254
|
multiple: e = !0,
|
|
2255
2255
|
accept: r = "*/*",
|
|
2256
2256
|
maxSize: t = 100,
|
|
@@ -2260,30 +2260,30 @@ const La = ({
|
|
|
2260
2260
|
autoUpload: h = !0,
|
|
2261
2261
|
url: b = "http://localhost:3000/upload",
|
|
2262
2262
|
// 默认上传地址
|
|
2263
|
-
headers:
|
|
2263
|
+
headers: f = {},
|
|
2264
2264
|
// 默认请求头
|
|
2265
2265
|
queryParams: d = {},
|
|
2266
2266
|
// 默认查询参数
|
|
2267
|
-
itemForm:
|
|
2267
|
+
itemForm: p = [],
|
|
2268
2268
|
styles: N,
|
|
2269
|
-
buttons:
|
|
2269
|
+
buttons: C = [],
|
|
2270
2270
|
// 新增:自定义按钮数组
|
|
2271
|
-
errorMessages:
|
|
2271
|
+
errorMessages: M = {},
|
|
2272
2272
|
// 新增:错误提示配置
|
|
2273
2273
|
icons: W,
|
|
2274
2274
|
// 新增:图标配置
|
|
2275
2275
|
eventsEmit: l,
|
|
2276
2276
|
onRef: _,
|
|
2277
2277
|
placeholder: I,
|
|
2278
|
-
listName:
|
|
2278
|
+
listName: ae
|
|
2279
2279
|
}) => {
|
|
2280
2280
|
var j, Y;
|
|
2281
|
-
const oe =
|
|
2281
|
+
const oe = Te(), a = $e(
|
|
2282
2282
|
// 基础:默认主题 + useTheme的配置
|
|
2283
|
-
|
|
2283
|
+
$e({ theme: E, mode: "light" }, oe),
|
|
2284
2284
|
// 最高层:用户手动传入的styles
|
|
2285
2285
|
N
|
|
2286
|
-
), T =
|
|
2286
|
+
), T = Me(null), [v, U] = ue(!1), [A, V] = ue([]), O = fe((i) => (i ?? A).map((c) => ({
|
|
2287
2287
|
id: c.id,
|
|
2288
2288
|
name: c.name,
|
|
2289
2289
|
status: c.status,
|
|
@@ -2301,7 +2301,7 @@ const La = ({
|
|
|
2301
2301
|
`), i = i.replace(/\s*\/n\s*/gi, `
|
|
2302
2302
|
`), i = i.replace(/\\n/g, `
|
|
2303
2303
|
`), /* @__PURE__ */ o(
|
|
2304
|
-
|
|
2304
|
+
Sr,
|
|
2305
2305
|
{
|
|
2306
2306
|
$theme: a.theme || E,
|
|
2307
2307
|
style: {
|
|
@@ -2318,20 +2318,20 @@ const La = ({
|
|
|
2318
2318
|
uploadFailed: "上传失败,请重试",
|
|
2319
2319
|
fileTooLarge: `文件大小不能超过 ${t}MB`,
|
|
2320
2320
|
invalidFileType: "不支持的文件类型"
|
|
2321
|
-
}, R = { ...X, ...
|
|
2321
|
+
}, R = { ...X, ...M }, ee = (i, u) => R[i] ? R[i] : u || X[i], G = (i) => {
|
|
2322
2322
|
const u = i / 1048576;
|
|
2323
2323
|
return `${Number(u.toFixed(2))}MB`;
|
|
2324
|
-
}, S =
|
|
2324
|
+
}, S = fe(
|
|
2325
2325
|
(i, u) => {
|
|
2326
2326
|
const c = t * 1024 * 1024, n = [], z = [];
|
|
2327
2327
|
if (i.forEach((g) => {
|
|
2328
2328
|
g.size > c ? n.push(g) : z.push(g);
|
|
2329
2329
|
}), n.length > 0) {
|
|
2330
|
-
const g = n.map((
|
|
2330
|
+
const g = n.map((ye) => `${ye.name}(${G(ye.size)})`).join("、"), re = `${ee("fileTooLarge")}:${g}`;
|
|
2331
2331
|
l == null || l("uploader:error", {
|
|
2332
2332
|
type: "fileTooLarge",
|
|
2333
2333
|
message: re,
|
|
2334
|
-
files: n.map((
|
|
2334
|
+
files: n.map((ye) => ({ name: ye.name, size: ye.size })),
|
|
2335
2335
|
limit: `${t}MB`,
|
|
2336
2336
|
data: O()
|
|
2337
2337
|
});
|
|
@@ -2409,7 +2409,7 @@ const La = ({
|
|
|
2409
2409
|
const u = S(i, A.length);
|
|
2410
2410
|
if (u.length === 0) return;
|
|
2411
2411
|
const c = u.map((n) => ({
|
|
2412
|
-
id:
|
|
2412
|
+
id: kr(),
|
|
2413
2413
|
file: n,
|
|
2414
2414
|
name: n.name,
|
|
2415
2415
|
size: n.size,
|
|
@@ -2440,13 +2440,13 @@ const La = ({
|
|
|
2440
2440
|
we(() => {
|
|
2441
2441
|
_ && _(y);
|
|
2442
2442
|
}, [y, _]);
|
|
2443
|
-
const x =
|
|
2443
|
+
const x = fe(
|
|
2444
2444
|
(i) => {
|
|
2445
2445
|
if (!i) return;
|
|
2446
2446
|
const u = S(Array.from(i), A.length);
|
|
2447
2447
|
if (u.length === 0) return;
|
|
2448
2448
|
const c = u.map((n) => ({
|
|
2449
|
-
id:
|
|
2449
|
+
id: kr(),
|
|
2450
2450
|
file: n,
|
|
2451
2451
|
name: n.name,
|
|
2452
2452
|
size: n.size,
|
|
@@ -2460,16 +2460,16 @@ const La = ({
|
|
|
2460
2460
|
V((n) => [...n, ...c]), h && q(c);
|
|
2461
2461
|
},
|
|
2462
2462
|
[h, A.length, S]
|
|
2463
|
-
), D =
|
|
2463
|
+
), D = fe((i) => {
|
|
2464
2464
|
i.preventDefault(), U(!0);
|
|
2465
|
-
}, []), w =
|
|
2465
|
+
}, []), w = fe((i) => {
|
|
2466
2466
|
i.preventDefault(), U(!1);
|
|
2467
|
-
}, []), L =
|
|
2467
|
+
}, []), L = fe(
|
|
2468
2468
|
(i) => {
|
|
2469
2469
|
i.preventDefault(), U(!1), x(i.dataTransfer.files);
|
|
2470
2470
|
},
|
|
2471
2471
|
[x]
|
|
2472
|
-
), q =
|
|
2472
|
+
), q = fe(
|
|
2473
2473
|
async (i) => {
|
|
2474
2474
|
if (!b) {
|
|
2475
2475
|
console.error(ee("noUrl"));
|
|
@@ -2481,16 +2481,16 @@ const La = ({
|
|
|
2481
2481
|
V(
|
|
2482
2482
|
(m) => m.map((g) => g.id === u.id ? { ...g, status: "uploading" } : g)
|
|
2483
2483
|
);
|
|
2484
|
-
const c = await
|
|
2484
|
+
const c = await ma(u.file, b, f, d, (m) => {
|
|
2485
2485
|
V((g) => g.map((re) => re.id === u.id ? { ...re, progress: m } : re)), l == null || l("uploader:progress", { item: { ...u, progress: m }, data: O() });
|
|
2486
|
-
}), n =
|
|
2486
|
+
}), n = fa(u, p), z = {
|
|
2487
2487
|
...u,
|
|
2488
2488
|
status: "success",
|
|
2489
2489
|
uploadApiRes: c,
|
|
2490
2490
|
progress: 100,
|
|
2491
2491
|
formData: n,
|
|
2492
2492
|
// 使用自动填充后的表单数据
|
|
2493
|
-
isExpanded:
|
|
2493
|
+
isExpanded: p.length > 0
|
|
2494
2494
|
// 上传成功后,如果有表单配置则默认展开
|
|
2495
2495
|
}, F = A.map((m) => m.id === u.id ? z : m);
|
|
2496
2496
|
V((m) => m.map((g) => g.id === u.id ? z : g)), l == null || l("uploader:success", { item: z, data: O(F) });
|
|
@@ -2559,8 +2559,8 @@ const La = ({
|
|
|
2559
2559
|
}
|
|
2560
2560
|
l == null || l("uploader:complete", { items: A, data: O() });
|
|
2561
2561
|
},
|
|
2562
|
-
[b,
|
|
2563
|
-
), Z =
|
|
2562
|
+
[b, f, d, l, A, p, R.uploadFailed, O]
|
|
2563
|
+
), Z = fe(
|
|
2564
2564
|
(i) => {
|
|
2565
2565
|
V((u) => {
|
|
2566
2566
|
const c = u.find((n) => n.id === i);
|
|
@@ -2572,7 +2572,7 @@ const La = ({
|
|
|
2572
2572
|
});
|
|
2573
2573
|
},
|
|
2574
2574
|
[l, O]
|
|
2575
|
-
), P =
|
|
2575
|
+
), P = fe(
|
|
2576
2576
|
(i) => {
|
|
2577
2577
|
V(
|
|
2578
2578
|
(u) => u.map((c) => {
|
|
@@ -2593,7 +2593,7 @@ const La = ({
|
|
|
2593
2593
|
);
|
|
2594
2594
|
},
|
|
2595
2595
|
[l, O]
|
|
2596
|
-
), k =
|
|
2596
|
+
), k = fe(
|
|
2597
2597
|
(i, u) => {
|
|
2598
2598
|
console.log("FormData Change:", i, u), V((c) => {
|
|
2599
2599
|
const n = c.map((z) => {
|
|
@@ -2624,7 +2624,7 @@ const La = ({
|
|
|
2624
2624
|
);
|
|
2625
2625
|
return /* @__PURE__ */ B("div", { children: [
|
|
2626
2626
|
/* @__PURE__ */ B(
|
|
2627
|
-
|
|
2627
|
+
ba,
|
|
2628
2628
|
{
|
|
2629
2629
|
$theme: a.theme || E,
|
|
2630
2630
|
$isDragOver: v,
|
|
@@ -2636,10 +2636,10 @@ const La = ({
|
|
|
2636
2636
|
T.current && (T.current.value = ""), (i = T.current) == null || i.click();
|
|
2637
2637
|
},
|
|
2638
2638
|
children: [
|
|
2639
|
-
/* @__PURE__ */ o(
|
|
2640
|
-
Q || /* @__PURE__ */ B(
|
|
2641
|
-
/* @__PURE__ */ o(
|
|
2642
|
-
/* @__PURE__ */ B(
|
|
2639
|
+
/* @__PURE__ */ o(ga, { $theme: a.theme || E, children: (W == null ? void 0 : W.dragUpload) || /* @__PURE__ */ o(Qr, { size: 48 }) }),
|
|
2640
|
+
Q || /* @__PURE__ */ B(Hr, { children: [
|
|
2641
|
+
/* @__PURE__ */ o(xa, { $theme: a.theme || E, children: "拖拽文件到此处或点击选择文件" }),
|
|
2642
|
+
/* @__PURE__ */ B(Sr, { $theme: a.theme || E, children: [
|
|
2643
2643
|
"支持 ",
|
|
2644
2644
|
r,
|
|
2645
2645
|
" 格式,单个文件最大 ",
|
|
@@ -2652,7 +2652,7 @@ const La = ({
|
|
|
2652
2652
|
}
|
|
2653
2653
|
),
|
|
2654
2654
|
/* @__PURE__ */ o(
|
|
2655
|
-
|
|
2655
|
+
ya,
|
|
2656
2656
|
{
|
|
2657
2657
|
ref: T,
|
|
2658
2658
|
type: "file",
|
|
@@ -2670,13 +2670,13 @@ const La = ({
|
|
|
2670
2670
|
alignItems: "center",
|
|
2671
2671
|
margin: "6px 0px"
|
|
2672
2672
|
}, children: [
|
|
2673
|
-
/* @__PURE__ */ o("div", { className: "text-[14px] font-bold opacity-60", children:
|
|
2674
|
-
|
|
2673
|
+
/* @__PURE__ */ o("div", { className: "text-[14px] font-bold opacity-60", children: ae || "上传文件列表" }),
|
|
2674
|
+
C.length > 0 && /* @__PURE__ */ o("div", { style: {
|
|
2675
2675
|
display: "flex",
|
|
2676
2676
|
gap: "8px",
|
|
2677
2677
|
alignItems: "center"
|
|
2678
|
-
}, children:
|
|
2679
|
-
|
|
2678
|
+
}, children: C.map((i, u) => /* @__PURE__ */ o(
|
|
2679
|
+
Ue,
|
|
2680
2680
|
{
|
|
2681
2681
|
mode: i.mode || "default",
|
|
2682
2682
|
label: i.label,
|
|
@@ -2688,12 +2688,12 @@ const La = ({
|
|
|
2688
2688
|
u
|
|
2689
2689
|
)) })
|
|
2690
2690
|
] }),
|
|
2691
|
-
/* @__PURE__ */ o(
|
|
2692
|
-
|
|
2691
|
+
/* @__PURE__ */ o($a, { $theme: a.theme || E, children: A.map((i, u) => /* @__PURE__ */ o(
|
|
2692
|
+
Ra,
|
|
2693
2693
|
{
|
|
2694
2694
|
item: i,
|
|
2695
2695
|
index: u,
|
|
2696
|
-
itemForm:
|
|
2696
|
+
itemForm: p,
|
|
2697
2697
|
onRemove: Z,
|
|
2698
2698
|
onToggleExpand: P,
|
|
2699
2699
|
onFormDataChange: k,
|
|
@@ -2704,40 +2704,40 @@ const La = ({
|
|
|
2704
2704
|
)) })
|
|
2705
2705
|
] })
|
|
2706
2706
|
] });
|
|
2707
|
-
},
|
|
2707
|
+
}, mt = (e) => {
|
|
2708
2708
|
const r = {};
|
|
2709
2709
|
return e.forEach((t) => {
|
|
2710
2710
|
const s = t.name ?? t.key;
|
|
2711
2711
|
t.defaultValue !== void 0 && s && (r[s] = t.defaultValue);
|
|
2712
2712
|
}), r;
|
|
2713
|
-
},
|
|
2713
|
+
}, bt = (e, r) => {
|
|
2714
2714
|
const t = {};
|
|
2715
2715
|
return r.forEach((s) => {
|
|
2716
2716
|
var d;
|
|
2717
|
-
const h = s.name ?? s.key, b = e[h],
|
|
2717
|
+
const h = s.name ?? s.key, b = e[h], f = s.validation || [];
|
|
2718
2718
|
if (s.required && (b == null || b === "")) {
|
|
2719
|
-
t[h] = ((d =
|
|
2719
|
+
t[h] = ((d = f.find((p) => p.required)) == null ? void 0 : d.message) || `${s.label}是必填项`;
|
|
2720
2720
|
return;
|
|
2721
2721
|
}
|
|
2722
|
-
|
|
2723
|
-
if (
|
|
2724
|
-
t[h] =
|
|
2722
|
+
f.forEach((p) => {
|
|
2723
|
+
if (p.required && (b == null || b === "")) {
|
|
2724
|
+
t[h] = p.message || `${s.label}是必填项`;
|
|
2725
2725
|
return;
|
|
2726
2726
|
}
|
|
2727
|
-
if (
|
|
2728
|
-
t[h] =
|
|
2727
|
+
if (p.pattern && b && !p.pattern.test(b)) {
|
|
2728
|
+
t[h] = p.message || `${s.label}格式不正确`;
|
|
2729
2729
|
return;
|
|
2730
2730
|
}
|
|
2731
|
-
if (
|
|
2732
|
-
t[h] =
|
|
2731
|
+
if (p.min !== void 0 && b < p.min) {
|
|
2732
|
+
t[h] = p.message || `${s.label}不能小于${p.min}`;
|
|
2733
2733
|
return;
|
|
2734
2734
|
}
|
|
2735
|
-
if (
|
|
2736
|
-
t[h] =
|
|
2735
|
+
if (p.max !== void 0 && b > p.max) {
|
|
2736
|
+
t[h] = p.message || `${s.label}不能大于${p.max}`;
|
|
2737
2737
|
return;
|
|
2738
2738
|
}
|
|
2739
|
-
if (
|
|
2740
|
-
const N =
|
|
2739
|
+
if (p.validator && typeof p.validator == "function") {
|
|
2740
|
+
const N = p.validator(b);
|
|
2741
2741
|
if (N !== !0) {
|
|
2742
2742
|
t[h] = typeof N == "string" ? N : `${s.label}验证失败`;
|
|
2743
2743
|
return;
|
|
@@ -2745,7 +2745,7 @@ const La = ({
|
|
|
2745
2745
|
}
|
|
2746
2746
|
});
|
|
2747
2747
|
}), t;
|
|
2748
|
-
},
|
|
2748
|
+
}, gt = (e = 5) => {
|
|
2749
2749
|
const r = [];
|
|
2750
2750
|
for (let t = 0; t < e; t++) {
|
|
2751
2751
|
const s = ["input", "select", "radio", "checkbox", "date", "number"], h = s[t % s.length];
|
|
@@ -2777,17 +2777,17 @@ const La = ({
|
|
|
2777
2777
|
});
|
|
2778
2778
|
}
|
|
2779
2779
|
return r;
|
|
2780
|
-
},
|
|
2781
|
-
function
|
|
2780
|
+
}, xt = (e) => Object.keys(e).length === 0, yt = (e) => Object.values(e).filter(Boolean);
|
|
2781
|
+
function Er(e) {
|
|
2782
2782
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2783
2783
|
}
|
|
2784
|
-
var
|
|
2785
|
-
function
|
|
2786
|
-
return
|
|
2784
|
+
var Pe = { exports: {} }, qa = Pe.exports, Mr;
|
|
2785
|
+
function Jr() {
|
|
2786
|
+
return Mr || (Mr = 1, (function(e, r) {
|
|
2787
2787
|
(function(t, s) {
|
|
2788
2788
|
e.exports = s();
|
|
2789
|
-
})(
|
|
2790
|
-
var t = 1e3, s = 6e4, h = 36e5, b = "millisecond",
|
|
2789
|
+
})(qa, (function() {
|
|
2790
|
+
var t = 1e3, s = 6e4, h = 36e5, b = "millisecond", f = "second", d = "minute", p = "hour", N = "day", C = "week", M = "month", W = "quarter", l = "year", _ = "date", I = "Invalid Date", ae = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, oe = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, a = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(S) {
|
|
2791
2791
|
var y = ["th", "st", "nd", "rd"], x = S % 100;
|
|
2792
2792
|
return "[" + S + (y[(x - 20) % 10] || y[x] || y[0]) + "]";
|
|
2793
2793
|
} }, T = function(S, y, x) {
|
|
@@ -2798,12 +2798,12 @@ function Kr() {
|
|
|
2798
2798
|
return (y <= 0 ? "+" : "-") + T(D, 2, "0") + ":" + T(w, 2, "0");
|
|
2799
2799
|
}, m: function S(y, x) {
|
|
2800
2800
|
if (y.date() < x.date()) return -S(x, y);
|
|
2801
|
-
var D = 12 * (x.year() - y.year()) + (x.month() - y.month()), w = y.clone().add(D,
|
|
2801
|
+
var D = 12 * (x.year() - y.year()) + (x.month() - y.month()), w = y.clone().add(D, M), L = x - w < 0, q = y.clone().add(D + (L ? -1 : 1), M);
|
|
2802
2802
|
return +(-(D + (x - w) / (L ? w - q : q - w)) || 0);
|
|
2803
2803
|
}, a: function(S) {
|
|
2804
2804
|
return S < 0 ? Math.ceil(S) || 0 : Math.floor(S);
|
|
2805
2805
|
}, p: function(S) {
|
|
2806
|
-
return { M
|
|
2806
|
+
return { M, y: l, w: C, d: N, D: _, h: p, m: d, s: f, ms: b, Q: W }[S] || String(S || "").toLowerCase().replace(/s$/, "");
|
|
2807
2807
|
}, u: function(S) {
|
|
2808
2808
|
return S === void 0;
|
|
2809
2809
|
} }, U = "en", A = {};
|
|
@@ -2843,7 +2843,7 @@ function Kr() {
|
|
|
2843
2843
|
if (R.u(w)) return /* @__PURE__ */ new Date();
|
|
2844
2844
|
if (w instanceof Date) return new Date(w);
|
|
2845
2845
|
if (typeof w == "string" && !/Z$/i.test(w)) {
|
|
2846
|
-
var q = w.match(
|
|
2846
|
+
var q = w.match(ae);
|
|
2847
2847
|
if (q) {
|
|
2848
2848
|
var Z = q[2] - 1 || 0, P = (q[7] || "0").substring(0, 3);
|
|
2849
2849
|
return L ? new Date(Date.UTC(q[1], Z, q[3] || 1, q[4] || 0, q[5] || 0, q[6] || 0, P)) : new Date(q[1], Z, q[3] || 1, q[4] || 0, q[5] || 0, q[6] || 0, P);
|
|
@@ -2881,19 +2881,19 @@ function Kr() {
|
|
|
2881
2881
|
switch (q) {
|
|
2882
2882
|
case l:
|
|
2883
2883
|
return L ? Z(1, 0) : Z(31, 11);
|
|
2884
|
-
case C:
|
|
2885
|
-
return L ? Z(1, j) : Z(0, j + 1);
|
|
2886
2884
|
case M:
|
|
2885
|
+
return L ? Z(1, j) : Z(0, j + 1);
|
|
2886
|
+
case C:
|
|
2887
2887
|
var u = this.$locale().weekStart || 0, c = (k < u ? k + 7 : k) - u;
|
|
2888
2888
|
return Z(L ? Y - c : Y + (6 - c), j);
|
|
2889
2889
|
case N:
|
|
2890
2890
|
case _:
|
|
2891
2891
|
return P(i + "Hours", 0);
|
|
2892
|
-
case
|
|
2892
|
+
case p:
|
|
2893
2893
|
return P(i + "Minutes", 1);
|
|
2894
2894
|
case d:
|
|
2895
2895
|
return P(i + "Seconds", 2);
|
|
2896
|
-
case
|
|
2896
|
+
case f:
|
|
2897
2897
|
return P(i + "Milliseconds", 3);
|
|
2898
2898
|
default:
|
|
2899
2899
|
return this.clone();
|
|
@@ -2901,8 +2901,8 @@ function Kr() {
|
|
|
2901
2901
|
}, y.endOf = function(x) {
|
|
2902
2902
|
return this.startOf(x, !1);
|
|
2903
2903
|
}, y.$set = function(x, D) {
|
|
2904
|
-
var w, L = R.p(x), q = "set" + (this.$u ? "UTC" : ""), Z = (w = {}, w[N] = q + "Date", w[_] = q + "Date", w[
|
|
2905
|
-
if (L ===
|
|
2904
|
+
var w, L = R.p(x), q = "set" + (this.$u ? "UTC" : ""), Z = (w = {}, w[N] = q + "Date", w[_] = q + "Date", w[M] = q + "Month", w[l] = q + "FullYear", w[p] = q + "Hours", w[d] = q + "Minutes", w[f] = q + "Seconds", w[b] = q + "Milliseconds", w)[L], P = L === N ? this.$D + (D - this.$W) : D;
|
|
2905
|
+
if (L === M || L === l) {
|
|
2906
2906
|
var k = this.clone().set(_, 1);
|
|
2907
2907
|
k.$d[Z](P), k.init(), this.$d = k.set(_, Math.min(this.$D, k.daysInMonth())).$d;
|
|
2908
2908
|
} else Z && this.$d[Z](P);
|
|
@@ -2918,11 +2918,11 @@ function Kr() {
|
|
|
2918
2918
|
var Y = X(L);
|
|
2919
2919
|
return R.w(Y.date(Y.date() + Math.round(j * x)), L);
|
|
2920
2920
|
};
|
|
2921
|
-
if (q ===
|
|
2921
|
+
if (q === M) return this.set(M, this.$M + x);
|
|
2922
2922
|
if (q === l) return this.set(l, this.$y + x);
|
|
2923
2923
|
if (q === N) return Z(1);
|
|
2924
|
-
if (q ===
|
|
2925
|
-
var P = (w = {}, w[d] = s, w[
|
|
2924
|
+
if (q === C) return Z(7);
|
|
2925
|
+
var P = (w = {}, w[d] = s, w[p] = h, w[f] = t, w)[q] || 1, k = this.$d.getTime() + x * P;
|
|
2926
2926
|
return R.w(k, this);
|
|
2927
2927
|
}, y.subtract = function(x, D) {
|
|
2928
2928
|
return this.add(-1 * x, D);
|
|
@@ -3002,25 +3002,25 @@ function Kr() {
|
|
|
3002
3002
|
case l:
|
|
3003
3003
|
L = Y() / 12;
|
|
3004
3004
|
break;
|
|
3005
|
-
case
|
|
3005
|
+
case M:
|
|
3006
3006
|
L = Y();
|
|
3007
3007
|
break;
|
|
3008
3008
|
case W:
|
|
3009
3009
|
L = Y() / 3;
|
|
3010
3010
|
break;
|
|
3011
|
-
case
|
|
3011
|
+
case C:
|
|
3012
3012
|
L = (j - k) / 6048e5;
|
|
3013
3013
|
break;
|
|
3014
3014
|
case N:
|
|
3015
3015
|
L = (j - k) / 864e5;
|
|
3016
3016
|
break;
|
|
3017
|
-
case
|
|
3017
|
+
case p:
|
|
3018
3018
|
L = j / h;
|
|
3019
3019
|
break;
|
|
3020
3020
|
case d:
|
|
3021
3021
|
L = j / s;
|
|
3022
3022
|
break;
|
|
3023
|
-
case
|
|
3023
|
+
case f:
|
|
3024
3024
|
L = j / t;
|
|
3025
3025
|
break;
|
|
3026
3026
|
default:
|
|
@@ -3028,7 +3028,7 @@ function Kr() {
|
|
|
3028
3028
|
}
|
|
3029
3029
|
return w ? L : R.a(L);
|
|
3030
3030
|
}, y.daysInMonth = function() {
|
|
3031
|
-
return this.endOf(
|
|
3031
|
+
return this.endOf(M).$D;
|
|
3032
3032
|
}, y.$locale = function() {
|
|
3033
3033
|
return A[this.$L];
|
|
3034
3034
|
}, y.locale = function(x, D) {
|
|
@@ -3047,7 +3047,7 @@ function Kr() {
|
|
|
3047
3047
|
return this.$d.toUTCString();
|
|
3048
3048
|
}, S;
|
|
3049
3049
|
})(), G = ee.prototype;
|
|
3050
|
-
return X.prototype = G, [["$ms", b], ["$s",
|
|
3050
|
+
return X.prototype = G, [["$ms", b], ["$s", f], ["$m", d], ["$H", p], ["$W", N], ["$M", M], ["$y", l], ["$D", _]].forEach((function(S) {
|
|
3051
3051
|
G[S[1]] = function(y) {
|
|
3052
3052
|
return this.$g(y, S[0], S[1]);
|
|
3053
3053
|
};
|
|
@@ -3057,79 +3057,79 @@ function Kr() {
|
|
|
3057
3057
|
return X(1e3 * S);
|
|
3058
3058
|
}, X.en = A[U], X.Ls = A, X.p = {}, X;
|
|
3059
3059
|
}));
|
|
3060
|
-
})(
|
|
3060
|
+
})(Pe)), Pe.exports;
|
|
3061
3061
|
}
|
|
3062
|
-
var
|
|
3063
|
-
const
|
|
3064
|
-
var
|
|
3065
|
-
function
|
|
3066
|
-
return
|
|
3062
|
+
var La = Jr();
|
|
3063
|
+
const rr = /* @__PURE__ */ Er(La);
|
|
3064
|
+
var Xe = { exports: {} }, Ba = Xe.exports, Tr;
|
|
3065
|
+
function Oa() {
|
|
3066
|
+
return Tr || (Tr = 1, (function(e, r) {
|
|
3067
3067
|
(function(t, s) {
|
|
3068
3068
|
e.exports = s();
|
|
3069
|
-
})(
|
|
3069
|
+
})(Ba, (function() {
|
|
3070
3070
|
return function(t, s, h) {
|
|
3071
3071
|
t = t || {};
|
|
3072
|
-
var b = s.prototype,
|
|
3073
|
-
function d(N,
|
|
3074
|
-
return b.fromToBase(N,
|
|
3072
|
+
var b = s.prototype, f = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
3073
|
+
function d(N, C, M, W) {
|
|
3074
|
+
return b.fromToBase(N, C, M, W);
|
|
3075
3075
|
}
|
|
3076
|
-
h.en.relativeTime =
|
|
3077
|
-
for (var _, I,
|
|
3076
|
+
h.en.relativeTime = f, b.fromToBase = function(N, C, M, W, l) {
|
|
3077
|
+
for (var _, I, ae, oe = M.$locale().relativeTime || f, a = t.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], T = a.length, v = 0; v < T; v += 1) {
|
|
3078
3078
|
var U = a[v];
|
|
3079
|
-
U.d && (_ = W ? h(N).diff(
|
|
3079
|
+
U.d && (_ = W ? h(N).diff(M, U.d, !0) : M.diff(N, U.d, !0));
|
|
3080
3080
|
var A = (t.rounding || Math.round)(Math.abs(_));
|
|
3081
|
-
if (
|
|
3081
|
+
if (ae = _ > 0, A <= U.r || !U.r) {
|
|
3082
3082
|
A <= 1 && v > 0 && (U = a[v - 1]);
|
|
3083
3083
|
var V = oe[U.l];
|
|
3084
|
-
l && (A = l("" + A)), I = typeof V == "string" ? V.replace("%d", A) : V(A,
|
|
3084
|
+
l && (A = l("" + A)), I = typeof V == "string" ? V.replace("%d", A) : V(A, C, U.l, ae);
|
|
3085
3085
|
break;
|
|
3086
3086
|
}
|
|
3087
3087
|
}
|
|
3088
|
-
if (
|
|
3089
|
-
var O =
|
|
3088
|
+
if (C) return I;
|
|
3089
|
+
var O = ae ? oe.future : oe.past;
|
|
3090
3090
|
return typeof O == "function" ? O(I) : O.replace("%s", I);
|
|
3091
|
-
}, b.to = function(N,
|
|
3092
|
-
return d(N,
|
|
3093
|
-
}, b.from = function(N,
|
|
3094
|
-
return d(N,
|
|
3091
|
+
}, b.to = function(N, C) {
|
|
3092
|
+
return d(N, C, this, !0);
|
|
3093
|
+
}, b.from = function(N, C) {
|
|
3094
|
+
return d(N, C, this);
|
|
3095
3095
|
};
|
|
3096
|
-
var
|
|
3096
|
+
var p = function(N) {
|
|
3097
3097
|
return N.$u ? h.utc() : h();
|
|
3098
3098
|
};
|
|
3099
3099
|
b.toNow = function(N) {
|
|
3100
|
-
return this.to(
|
|
3100
|
+
return this.to(p(this), N);
|
|
3101
3101
|
}, b.fromNow = function(N) {
|
|
3102
|
-
return this.from(
|
|
3102
|
+
return this.from(p(this), N);
|
|
3103
3103
|
};
|
|
3104
3104
|
};
|
|
3105
3105
|
}));
|
|
3106
|
-
})(
|
|
3106
|
+
})(Xe)), Xe.exports;
|
|
3107
3107
|
}
|
|
3108
|
-
var
|
|
3109
|
-
const
|
|
3110
|
-
var
|
|
3111
|
-
function
|
|
3112
|
-
return
|
|
3108
|
+
var ja = Oa();
|
|
3109
|
+
const Ya = /* @__PURE__ */ Er(ja);
|
|
3110
|
+
var Ze = { exports: {} }, Ha = Ze.exports, Fr;
|
|
3111
|
+
function Ia() {
|
|
3112
|
+
return Fr || (Fr = 1, (function(e, r) {
|
|
3113
3113
|
(function(t, s) {
|
|
3114
|
-
e.exports = s(
|
|
3115
|
-
})(
|
|
3116
|
-
function s(
|
|
3117
|
-
return
|
|
3114
|
+
e.exports = s(Jr());
|
|
3115
|
+
})(Ha, (function(t) {
|
|
3116
|
+
function s(f) {
|
|
3117
|
+
return f && typeof f == "object" && "default" in f ? f : { default: f };
|
|
3118
3118
|
}
|
|
3119
|
-
var h = s(t), b = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(
|
|
3120
|
-
return d === "W" ?
|
|
3121
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(
|
|
3122
|
-
var
|
|
3123
|
-
return
|
|
3119
|
+
var h = s(t), b = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(f, d) {
|
|
3120
|
+
return d === "W" ? f + "周" : f + "日";
|
|
3121
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(f, d) {
|
|
3122
|
+
var p = 100 * f + d;
|
|
3123
|
+
return p < 600 ? "凌晨" : p < 900 ? "早上" : p < 1100 ? "上午" : p < 1300 ? "中午" : p < 1800 ? "下午" : "晚上";
|
|
3124
3124
|
} };
|
|
3125
3125
|
return h.default.locale(b, null, !0), b;
|
|
3126
3126
|
}));
|
|
3127
|
-
})(
|
|
3127
|
+
})(Ze)), Ze.exports;
|
|
3128
3128
|
}
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
const
|
|
3129
|
+
Ia();
|
|
3130
|
+
rr.locale("zh-cn");
|
|
3131
|
+
rr.extend(Ya);
|
|
3132
|
+
const Dr = {
|
|
3133
3133
|
success: "green",
|
|
3134
3134
|
error: "red",
|
|
3135
3135
|
warning: "orange",
|
|
@@ -3137,18 +3137,18 @@ const _r = {
|
|
|
3137
3137
|
info: "cyan",
|
|
3138
3138
|
default: "default"
|
|
3139
3139
|
};
|
|
3140
|
-
function
|
|
3140
|
+
function Ua(e) {
|
|
3141
3141
|
if (!e) return "-";
|
|
3142
|
-
const r =
|
|
3142
|
+
const r = rr(e), t = r.format("YYYY年M月D日 HH:mm"), s = r.fromNow();
|
|
3143
3143
|
return /* @__PURE__ */ o(
|
|
3144
|
-
|
|
3144
|
+
er,
|
|
3145
3145
|
{
|
|
3146
3146
|
title: /* @__PURE__ */ o("div", { style: { minWidth: 120 }, children: /* @__PURE__ */ o("div", { style: { color: "#aaa", fontSize: 12, marginTop: 2 }, children: s }) }),
|
|
3147
3147
|
children: /* @__PURE__ */ o("span", { style: { fontWeight: 500, opacity: 0.6 }, children: t })
|
|
3148
3148
|
}
|
|
3149
3149
|
);
|
|
3150
3150
|
}
|
|
3151
|
-
function
|
|
3151
|
+
function Va(e, r) {
|
|
3152
3152
|
if (e == null || e === "") return "-";
|
|
3153
3153
|
const t = Number(e);
|
|
3154
3154
|
if (isNaN(t)) return e;
|
|
@@ -3164,47 +3164,47 @@ function Ja(e, r) {
|
|
|
3164
3164
|
return t.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
3165
3165
|
}
|
|
3166
3166
|
}
|
|
3167
|
-
function
|
|
3167
|
+
function Ea(e, r, t = {}) {
|
|
3168
3168
|
const { eventsEmit: s } = r || {};
|
|
3169
|
-
return
|
|
3169
|
+
return be.useMemo(
|
|
3170
3170
|
() => e.map((h) => {
|
|
3171
3171
|
if (h.render) return h;
|
|
3172
3172
|
switch (h.type) {
|
|
3173
3173
|
case "customized":
|
|
3174
3174
|
return {
|
|
3175
3175
|
...h,
|
|
3176
|
-
render: (b,
|
|
3176
|
+
render: (b, f, d) => {
|
|
3177
3177
|
var oe, a;
|
|
3178
|
-
const
|
|
3179
|
-
let
|
|
3180
|
-
if (typeof
|
|
3178
|
+
const p = d == null ? void 0 : d.value;
|
|
3179
|
+
let C = p && typeof p == "object" && (p.component || p.Comp) ? p.component || p.Comp : h.component;
|
|
3180
|
+
if (typeof C == "string" && (C = ((oe = r == null ? void 0 : r.customizeComponents) == null ? void 0 : oe[C]) || ((a = t == null ? void 0 : t.customizeComponents) == null ? void 0 : a[C])), !C)
|
|
3181
3181
|
return h.fallback ?? null;
|
|
3182
|
-
const
|
|
3182
|
+
const M = p && typeof p == "object" && "data" in p ? p.data : d == null ? void 0 : d.value, W = typeof h.componentProps == "function" ? h.componentProps({ value: M, row: f, cell: d, col: h }) : h.componentProps || {}, l = p && typeof p == "object" && "props" in p ? p.props || {} : {};
|
|
3183
3183
|
let _ = {};
|
|
3184
|
-
if (
|
|
3184
|
+
if (p && typeof p == "object") {
|
|
3185
3185
|
const T = /* @__PURE__ */ new Set(["component", "Comp", "props"]);
|
|
3186
|
-
Object.keys(
|
|
3187
|
-
T.has(v) || (_[v] =
|
|
3186
|
+
Object.keys(p).forEach((v) => {
|
|
3187
|
+
T.has(v) || (_[v] = p[v]);
|
|
3188
3188
|
});
|
|
3189
3189
|
}
|
|
3190
|
-
const
|
|
3191
|
-
value:
|
|
3192
|
-
row:
|
|
3190
|
+
const ae = {
|
|
3191
|
+
value: M,
|
|
3192
|
+
row: f,
|
|
3193
3193
|
cell: d,
|
|
3194
3194
|
col: h,
|
|
3195
3195
|
emit: (T, v) => {
|
|
3196
3196
|
var U;
|
|
3197
|
-
return (U = r == null ? void 0 : r.eventsEmit) == null ? void 0 : U.call(r, T, { row:
|
|
3197
|
+
return (U = r == null ? void 0 : r.eventsEmit) == null ? void 0 : U.call(r, T, { row: f, cell: d, col: h, data: v });
|
|
3198
3198
|
},
|
|
3199
3199
|
...W,
|
|
3200
3200
|
..._,
|
|
3201
3201
|
...l
|
|
3202
3202
|
};
|
|
3203
|
-
if (
|
|
3204
|
-
return
|
|
3205
|
-
if (typeof
|
|
3206
|
-
const T =
|
|
3207
|
-
return
|
|
3203
|
+
if (be.isValidElement(C))
|
|
3204
|
+
return be.cloneElement(C, ae);
|
|
3205
|
+
if (typeof C == "function") {
|
|
3206
|
+
const T = C;
|
|
3207
|
+
return be.createElement(T, ae);
|
|
3208
3208
|
}
|
|
3209
3209
|
return h.fallback ?? null;
|
|
3210
3210
|
}
|
|
@@ -3212,21 +3212,21 @@ function Ga(e, r, t = {}) {
|
|
|
3212
3212
|
case "status":
|
|
3213
3213
|
return {
|
|
3214
3214
|
...h,
|
|
3215
|
-
render: (b,
|
|
3216
|
-
const
|
|
3217
|
-
return /* @__PURE__ */ o(
|
|
3215
|
+
render: (b, f, d) => {
|
|
3216
|
+
const p = (d == null ? void 0 : d.statusType) || "default", N = Dr[p] || Dr.default;
|
|
3217
|
+
return /* @__PURE__ */ o(na, { color: N, children: b });
|
|
3218
3218
|
}
|
|
3219
3219
|
};
|
|
3220
3220
|
case "date":
|
|
3221
3221
|
return {
|
|
3222
3222
|
...h,
|
|
3223
|
-
render: (b) =>
|
|
3223
|
+
render: (b) => Ua(b)
|
|
3224
3224
|
};
|
|
3225
3225
|
case "number":
|
|
3226
3226
|
return {
|
|
3227
3227
|
...h,
|
|
3228
3228
|
render: (b) => {
|
|
3229
|
-
const
|
|
3229
|
+
const f = h.numberStyle || "float";
|
|
3230
3230
|
return /* @__PURE__ */ o(
|
|
3231
3231
|
"span",
|
|
3232
3232
|
{
|
|
@@ -3238,7 +3238,7 @@ function Ga(e, r, t = {}) {
|
|
|
3238
3238
|
fontVariantNumeric: "tabular-nums",
|
|
3239
3239
|
fontFamily: "Consolas, Menlo, monospace"
|
|
3240
3240
|
},
|
|
3241
|
-
children:
|
|
3241
|
+
children: Va(b, f)
|
|
3242
3242
|
}
|
|
3243
3243
|
);
|
|
3244
3244
|
}
|
|
@@ -3264,20 +3264,20 @@ function Ga(e, r, t = {}) {
|
|
|
3264
3264
|
return {
|
|
3265
3265
|
...h,
|
|
3266
3266
|
render: (b) => {
|
|
3267
|
-
const
|
|
3267
|
+
const f = h.maxRow || 1, d = h.maxWidth || 240, p = h.areaStyle || "default", N = 13, C = 1.6, M = N * C, W = f * M;
|
|
3268
3268
|
let l = {
|
|
3269
3269
|
maxWidth: typeof d == "number" ? `${d}px` : d,
|
|
3270
3270
|
maxHeight: W,
|
|
3271
3271
|
overflowY: "auto",
|
|
3272
|
-
color:
|
|
3273
|
-
opacity:
|
|
3272
|
+
color: p === "code" ? "#d4d4d4" : "#666",
|
|
3273
|
+
opacity: p === "code" ? 1 : 0.85,
|
|
3274
3274
|
fontSize: N,
|
|
3275
|
-
lineHeight:
|
|
3275
|
+
lineHeight: C,
|
|
3276
3276
|
padding: "6px 10px",
|
|
3277
|
-
background:
|
|
3277
|
+
background: p === "code" ? "#1e1e1e" : "#f6f8fa",
|
|
3278
3278
|
borderRadius: 6,
|
|
3279
|
-
fontFamily:
|
|
3280
|
-
border:
|
|
3279
|
+
fontFamily: p === "code" ? '"SF Mono", "Consolas", "Menlo", monospace' : void 0,
|
|
3280
|
+
border: p === "code" ? "1px solid #232323" : "1px solid #e5e7eb",
|
|
3281
3281
|
whiteSpace: "pre-wrap",
|
|
3282
3282
|
wordBreak: "break-all",
|
|
3283
3283
|
boxSizing: "border-box",
|
|
@@ -3300,7 +3300,7 @@ function Ga(e, r, t = {}) {
|
|
|
3300
3300
|
minWidth: "200px",
|
|
3301
3301
|
maxWidth: "100%"
|
|
3302
3302
|
},
|
|
3303
|
-
children: b.map((
|
|
3303
|
+
children: b.map((f, d) => /* @__PURE__ */ o(
|
|
3304
3304
|
"span",
|
|
3305
3305
|
{
|
|
3306
3306
|
style: {
|
|
@@ -3317,7 +3317,7 @@ function Ga(e, r, t = {}) {
|
|
|
3317
3317
|
boxShadow: "0 1px 2px rgba(37, 99, 235, 0.1)",
|
|
3318
3318
|
flexShrink: 0
|
|
3319
3319
|
},
|
|
3320
|
-
children:
|
|
3320
|
+
children: f
|
|
3321
3321
|
},
|
|
3322
3322
|
d
|
|
3323
3323
|
))
|
|
@@ -3327,18 +3327,18 @@ function Ga(e, r, t = {}) {
|
|
|
3327
3327
|
case "action":
|
|
3328
3328
|
return {
|
|
3329
3329
|
...h,
|
|
3330
|
-
render: (b,
|
|
3331
|
-
const
|
|
3330
|
+
render: (b, f, d) => {
|
|
3331
|
+
const p = r != null && r.isPending ? r.isPending(f.id) : !1;
|
|
3332
3332
|
if (Array.isArray(b)) {
|
|
3333
|
-
const
|
|
3334
|
-
value:
|
|
3335
|
-
label:
|
|
3336
|
-
icon:
|
|
3337
|
-
disabled:
|
|
3338
|
-
key:
|
|
3339
|
-
} :
|
|
3340
|
-
if (
|
|
3341
|
-
const
|
|
3333
|
+
const C = b.map((M) => M && typeof M == "object" && (M.columnId === "actions" || M.type === "action") && "value" in M && !("mode" in M) ? {
|
|
3334
|
+
value: M.value,
|
|
3335
|
+
label: M.label || M.value,
|
|
3336
|
+
icon: M.icon,
|
|
3337
|
+
disabled: M.disabled,
|
|
3338
|
+
key: M.key
|
|
3339
|
+
} : M);
|
|
3340
|
+
if (C.length >= 3) {
|
|
3341
|
+
const M = C.slice(0, 2), W = C.slice(2);
|
|
3342
3342
|
return /* @__PURE__ */ B(
|
|
3343
3343
|
"div",
|
|
3344
3344
|
{
|
|
@@ -3349,31 +3349,31 @@ function Ga(e, r, t = {}) {
|
|
|
3349
3349
|
alignItems: "center"
|
|
3350
3350
|
},
|
|
3351
3351
|
children: [
|
|
3352
|
-
|
|
3353
|
-
|
|
3352
|
+
M.map((l, _) => /* @__PURE__ */ o(
|
|
3353
|
+
Ue,
|
|
3354
3354
|
{
|
|
3355
3355
|
mode: l.mode || "text",
|
|
3356
3356
|
label: l.label || l.value || "",
|
|
3357
3357
|
icon: l.icon,
|
|
3358
|
-
disabled: l.disabled ||
|
|
3358
|
+
disabled: l.disabled || p && l.value === "delete",
|
|
3359
3359
|
styles: t,
|
|
3360
3360
|
style: { padding: "0 8px", minWidth: 0 },
|
|
3361
|
-
onClick: () => s == null ? void 0 : s(`table_action_${l.value}`,
|
|
3361
|
+
onClick: () => s == null ? void 0 : s(`table_action_${l.value}`, f)
|
|
3362
3362
|
},
|
|
3363
3363
|
_
|
|
3364
3364
|
)),
|
|
3365
3365
|
/* @__PURE__ */ o(
|
|
3366
|
-
|
|
3366
|
+
oa,
|
|
3367
3367
|
{
|
|
3368
3368
|
actions: W.map((l, _) => ({
|
|
3369
3369
|
key: l.value || String(_),
|
|
3370
3370
|
label: l.label || l.value || "",
|
|
3371
3371
|
icon: l.icon,
|
|
3372
|
-
disabled: l.disabled ||
|
|
3372
|
+
disabled: l.disabled || p && l.value === "delete"
|
|
3373
3373
|
})),
|
|
3374
3374
|
onAction: (l) => {
|
|
3375
3375
|
const _ = W.find((I) => (I.value || String(I.key)) === l);
|
|
3376
|
-
_ && !_.disabled && !(
|
|
3376
|
+
_ && !_.disabled && !(p && _.value === "delete") && (s == null || s(`table_action_${_.value}`, f));
|
|
3377
3377
|
}
|
|
3378
3378
|
}
|
|
3379
3379
|
)
|
|
@@ -3381,31 +3381,31 @@ function Ga(e, r, t = {}) {
|
|
|
3381
3381
|
}
|
|
3382
3382
|
);
|
|
3383
3383
|
} else
|
|
3384
|
-
return /* @__PURE__ */ o("div", { style: { display: "flex", gap: 4, justifyContent: "center" }, children:
|
|
3385
|
-
|
|
3384
|
+
return /* @__PURE__ */ o("div", { style: { display: "flex", gap: 4, justifyContent: "center" }, children: C.map((M, W) => /* @__PURE__ */ o(
|
|
3385
|
+
Ue,
|
|
3386
3386
|
{
|
|
3387
|
-
mode:
|
|
3388
|
-
label:
|
|
3389
|
-
icon:
|
|
3390
|
-
disabled:
|
|
3387
|
+
mode: M.mode || "text",
|
|
3388
|
+
label: M.label || M.value || "",
|
|
3389
|
+
icon: M.icon,
|
|
3390
|
+
disabled: M.disabled || p && M.value === "delete",
|
|
3391
3391
|
styles: t,
|
|
3392
3392
|
style: { padding: "0 8px", minWidth: 0 },
|
|
3393
|
-
onClick: () => s == null ? void 0 : s(`table_action_${
|
|
3393
|
+
onClick: () => s == null ? void 0 : s(`table_action_${M.value}`, f)
|
|
3394
3394
|
},
|
|
3395
3395
|
W
|
|
3396
3396
|
)) });
|
|
3397
3397
|
}
|
|
3398
3398
|
const N = d || {};
|
|
3399
3399
|
return /* @__PURE__ */ o(
|
|
3400
|
-
|
|
3400
|
+
Ue,
|
|
3401
3401
|
{
|
|
3402
3402
|
mode: N.mode || "text",
|
|
3403
3403
|
label: N.label || N.value || "",
|
|
3404
3404
|
icon: N.icon,
|
|
3405
|
-
disabled: N.disabled ||
|
|
3405
|
+
disabled: N.disabled || p && N.value === "delete",
|
|
3406
3406
|
styles: t,
|
|
3407
3407
|
style: { padding: "0 8px", minWidth: 0 },
|
|
3408
|
-
onClick: () => s == null ? void 0 : s(`table_action_${N.value}`,
|
|
3408
|
+
onClick: () => s == null ? void 0 : s(`table_action_${N.value}`, f)
|
|
3409
3409
|
}
|
|
3410
3410
|
);
|
|
3411
3411
|
}
|
|
@@ -3419,20 +3419,20 @@ function Ga(e, r, t = {}) {
|
|
|
3419
3419
|
case "title":
|
|
3420
3420
|
return {
|
|
3421
3421
|
...h,
|
|
3422
|
-
render: (b,
|
|
3423
|
-
const
|
|
3422
|
+
render: (b, f, d) => {
|
|
3423
|
+
const p = (d == null ? void 0 : d.level) || 1, N = {
|
|
3424
3424
|
1: "text-xl font-bold",
|
|
3425
3425
|
2: "text-lg font-semibold",
|
|
3426
3426
|
3: "text-base font-medium"
|
|
3427
|
-
},
|
|
3427
|
+
}, C = N[p] || N[1];
|
|
3428
3428
|
return /* @__PURE__ */ B(
|
|
3429
3429
|
"div",
|
|
3430
3430
|
{
|
|
3431
|
-
className: `${
|
|
3431
|
+
className: `${C} text-gray-800 ${(d == null ? void 0 : d.className) || ""}`,
|
|
3432
3432
|
style: {
|
|
3433
3433
|
color: "#1f2937",
|
|
3434
3434
|
lineHeight: "1.4",
|
|
3435
|
-
fontWeight:
|
|
3435
|
+
fontWeight: p === 1 ? 700 : p === 2 ? 600 : 400
|
|
3436
3436
|
},
|
|
3437
3437
|
children: [
|
|
3438
3438
|
/* @__PURE__ */ o("span", { className: "h-full w-1 bg-gray-500 rounded-full mr-2" }),
|
|
@@ -3475,11 +3475,11 @@ function Ga(e, r, t = {}) {
|
|
|
3475
3475
|
]
|
|
3476
3476
|
);
|
|
3477
3477
|
}
|
|
3478
|
-
function
|
|
3478
|
+
function Ja(e) {
|
|
3479
3479
|
return /* @__PURE__ */ B("div", { className: "flex items-center gap-2", children: [
|
|
3480
3480
|
/* @__PURE__ */ o("span", { className: "font-medium text-gray-800 text-sm", children: e.title }),
|
|
3481
|
-
e.helpText && /* @__PURE__ */ o(
|
|
3482
|
-
|
|
3481
|
+
e.helpText && /* @__PURE__ */ o(er, { title: e.helpText, placement: "top", children: /* @__PURE__ */ o(
|
|
3482
|
+
Ir,
|
|
3483
3483
|
{
|
|
3484
3484
|
className: "text-gray-400 hover:text-gray-600 cursor-help transition-colors",
|
|
3485
3485
|
size: 14
|
|
@@ -3487,7 +3487,7 @@ function Ka(e) {
|
|
|
3487
3487
|
) })
|
|
3488
3488
|
] });
|
|
3489
3489
|
}
|
|
3490
|
-
const
|
|
3490
|
+
const Ga = J.div`
|
|
3491
3491
|
background: ${({ theme: e }) => e.colors.tableBackground || e.colors.background};
|
|
3492
3492
|
border-radius: ${({ theme: e }) => e.space.radius};
|
|
3493
3493
|
box-shadow: ${({ theme: e }) => e.colors.shadow};
|
|
@@ -3499,7 +3499,7 @@ const Pa = J.div`
|
|
|
3499
3499
|
min-height: 240px;
|
|
3500
3500
|
display: flex;
|
|
3501
3501
|
flex-direction: column;
|
|
3502
|
-
`,
|
|
3502
|
+
`, Ka = J.div`
|
|
3503
3503
|
background: ${({ theme: e }) => e.colors.tableBackground || e.colors.background};
|
|
3504
3504
|
border-radius: ${({ theme: e }) => e.space.radius};
|
|
3505
3505
|
padding: ${({ theme: e }) => e.space.padding};
|
|
@@ -3509,7 +3509,7 @@ const Pa = J.div`
|
|
|
3509
3509
|
display: flex;
|
|
3510
3510
|
flex-direction: column;
|
|
3511
3511
|
overflow: visible; // 子table不产生滚动条,由外层容器处理
|
|
3512
|
-
`,
|
|
3512
|
+
`, Pa = J.div`
|
|
3513
3513
|
overflow-x: auto;
|
|
3514
3514
|
overflow-y: hidden;
|
|
3515
3515
|
width: 100%;
|
|
@@ -3547,7 +3547,7 @@ const Pa = J.div`
|
|
|
3547
3547
|
&::-webkit-scrollbar-thumb:hover {
|
|
3548
3548
|
background: ${({ theme: e }) => e.colors.disabled};
|
|
3549
3549
|
}
|
|
3550
|
-
`,
|
|
3550
|
+
`, zr = (e) => {
|
|
3551
3551
|
switch (e) {
|
|
3552
3552
|
case "avatar":
|
|
3553
3553
|
return { minWidth: 48, textAlign: "center" };
|
|
@@ -3577,7 +3577,7 @@ const Pa = J.div`
|
|
|
3577
3577
|
default:
|
|
3578
3578
|
return { minWidth: 80, textAlign: "left" };
|
|
3579
3579
|
}
|
|
3580
|
-
},
|
|
3580
|
+
}, _r = J.th`
|
|
3581
3581
|
background: ${({ theme: e }) => e.colors.disabledBackground};
|
|
3582
3582
|
color: ${({ theme: e }) => e.colors.tableHeaderText || e.colors.text};
|
|
3583
3583
|
font-weight: 600;
|
|
@@ -3593,7 +3593,7 @@ const Pa = J.div`
|
|
|
3593
3593
|
&:last-child {
|
|
3594
3594
|
background: ${({ theme: e }) => e.colors.tableLastColumnBg || e.colors.disabledBackground};
|
|
3595
3595
|
}
|
|
3596
|
-
`,
|
|
3596
|
+
`, Ar = J.td`
|
|
3597
3597
|
padding: 0.5rem 0.75rem;
|
|
3598
3598
|
border-bottom: 1px solid ${({ theme: e }) => e.colors.border};
|
|
3599
3599
|
color: ${({ theme: e }) => e.colors.text};
|
|
@@ -3603,13 +3603,13 @@ const Pa = J.div`
|
|
|
3603
3603
|
overflow: hidden;
|
|
3604
3604
|
text-overflow: ellipsis;
|
|
3605
3605
|
background: ${({ theme: e }) => e.colors.tableBackground || "#fff"};
|
|
3606
|
-
`,
|
|
3606
|
+
`, Xa = J.tr`
|
|
3607
3607
|
&:hover {
|
|
3608
3608
|
background: ${({ theme: e }) => e.colors.disabledBackground};
|
|
3609
3609
|
}
|
|
3610
|
-
`,
|
|
3611
|
-
(e, r) => /* @__PURE__ */ o(
|
|
3612
|
-
),
|
|
3610
|
+
`, Za = be.forwardRef(
|
|
3611
|
+
(e, r) => /* @__PURE__ */ o(Xa, { ...e, ref: r })
|
|
3612
|
+
), Qa = `
|
|
3613
3613
|
.sticky-shadow-left {
|
|
3614
3614
|
box-shadow: 4px 0 8px -4px rgba(0,0,0,0.08);
|
|
3615
3615
|
transition: box-shadow 0.2s;
|
|
@@ -3621,24 +3621,24 @@ const Pa = J.div`
|
|
|
3621
3621
|
`;
|
|
3622
3622
|
if (typeof window < "u" && !document.getElementById("dynamic-table-sticky-shadow")) {
|
|
3623
3623
|
const e = document.createElement("style");
|
|
3624
|
-
e.id = "dynamic-table-sticky-shadow", e.innerHTML =
|
|
3624
|
+
e.id = "dynamic-table-sticky-shadow", e.innerHTML = Qa, document.head.appendChild(e);
|
|
3625
3625
|
}
|
|
3626
|
-
const
|
|
3627
|
-
var F, m, g, re,
|
|
3628
|
-
const r = e.dataSource || [], t = e.columns || [], s = e.size || "md", h = e.level || 0, b =
|
|
3626
|
+
const et = be.memo((e) => {
|
|
3627
|
+
var F, m, g, re, ye, Fe, De, ze, _e, Ae, We, Re, qe, Le, Be, Oe, je, Ye, He;
|
|
3628
|
+
const r = e.dataSource || [], t = e.columns || [], s = e.size || "md", h = e.level || 0, b = Te(), f = $e(
|
|
3629
3629
|
// 基础:默认主题 + useTheme的配置
|
|
3630
|
-
|
|
3630
|
+
$e({ theme: E, mode: "light" }, b),
|
|
3631
3631
|
// 最高层:用户手动传入的styles
|
|
3632
3632
|
e.styles
|
|
3633
|
-
), d = ((F =
|
|
3633
|
+
), d = ((F = f.theme) == null ? void 0 : F.colors) || E.colors, p = d.tableBackground || d.background || E.colors.background, N = d.tableFirstColumnBg || d.surfaceSubtle || p, C = d.tableLastColumnBg || d.surfaceSubtle || p, { viewId: M, total: W, requestPagesize: l = 50, viewPageSize: _ } = e, [I, ae] = ue(_);
|
|
3634
3634
|
we(() => {
|
|
3635
|
-
typeof _ == "number" && _ > 0 &&
|
|
3635
|
+
typeof _ == "number" && _ > 0 && ae(_);
|
|
3636
3636
|
}, [_]);
|
|
3637
|
-
const [oe, a] =
|
|
3637
|
+
const [oe, a] = ue(/* @__PURE__ */ new Set());
|
|
3638
3638
|
we(() => {
|
|
3639
3639
|
a(/* @__PURE__ */ new Set());
|
|
3640
|
-
}, [
|
|
3641
|
-
const [T, v] =
|
|
3640
|
+
}, [M]);
|
|
3641
|
+
const [T, v] = ue(!1), [U, A] = ue(!1), [V, O] = ue(/* @__PURE__ */ new Set()), Q = Me(null), X = Me(null), [R, ee] = ue(0), G = s === "sm" ? 0.7 : 1, S = Ea(
|
|
3642
3642
|
t,
|
|
3643
3643
|
{
|
|
3644
3644
|
eventsEmit: e.eventsEmit,
|
|
@@ -3646,69 +3646,69 @@ const at = me.memo((e) => {
|
|
|
3646
3646
|
customizeComponents: e.customizeComponents
|
|
3647
3647
|
},
|
|
3648
3648
|
e.styles
|
|
3649
|
-
), [y, x] =
|
|
3650
|
-
($,
|
|
3651
|
-
var
|
|
3652
|
-
x((
|
|
3653
|
-
let
|
|
3654
|
-
return
|
|
3649
|
+
), [y, x] = ue([]), D = fe(
|
|
3650
|
+
($, te) => {
|
|
3651
|
+
var le;
|
|
3652
|
+
x((ie) => {
|
|
3653
|
+
let pe;
|
|
3654
|
+
return te ? pe = [...ie, $] : pe = ie.filter((de) => de !== $), pe;
|
|
3655
3655
|
});
|
|
3656
|
-
const
|
|
3657
|
-
(
|
|
3656
|
+
const se = te ? [...y, $] : y.filter((ie) => ie !== $), ne = r.filter((ie) => se.includes(ie.id));
|
|
3657
|
+
(le = e.eventsEmit) == null || le.call(e, "table_row_select", {
|
|
3658
3658
|
rowId: $,
|
|
3659
|
-
checked:
|
|
3660
|
-
selectedItems:
|
|
3659
|
+
checked: te,
|
|
3660
|
+
selectedItems: ne
|
|
3661
3661
|
});
|
|
3662
3662
|
},
|
|
3663
3663
|
[y, r, e.eventsEmit]
|
|
3664
3664
|
), w = Se(
|
|
3665
3665
|
() => r.length > 0 && y.length === r.length,
|
|
3666
3666
|
[r.length, y.length]
|
|
3667
|
-
), L =
|
|
3667
|
+
), L = fe(
|
|
3668
3668
|
($) => {
|
|
3669
|
-
var
|
|
3670
|
-
const
|
|
3671
|
-
x(
|
|
3672
|
-
const
|
|
3673
|
-
(
|
|
3669
|
+
var ne;
|
|
3670
|
+
const te = $ ? r.map((le) => le.id) : [];
|
|
3671
|
+
x(te);
|
|
3672
|
+
const se = $ ? r : [];
|
|
3673
|
+
(ne = e.eventsEmit) == null || ne.call(e, "table_select_all", {
|
|
3674
3674
|
checked: $,
|
|
3675
|
-
selectedItems:
|
|
3675
|
+
selectedItems: se,
|
|
3676
3676
|
totalCount: r.length
|
|
3677
3677
|
});
|
|
3678
3678
|
},
|
|
3679
3679
|
[r, e.eventsEmit]
|
|
3680
|
-
), [q, Z] =
|
|
3680
|
+
), [q, Z] = ue(1), P = typeof I == "number" && I > 0 ? I : _ ?? (e.isSubTable ? 5 : 10), k = W || r.length;
|
|
3681
3681
|
Se(
|
|
3682
3682
|
() => Math.ceil(k / P),
|
|
3683
3683
|
[k, P]
|
|
3684
3684
|
);
|
|
3685
3685
|
const j = Se(() => {
|
|
3686
3686
|
if (e.viewBehavior !== "pagination") return r;
|
|
3687
|
-
const $ = (q - 1) * P,
|
|
3688
|
-
if (r.some((
|
|
3689
|
-
const
|
|
3690
|
-
for (let
|
|
3691
|
-
const
|
|
3692
|
-
|
|
3687
|
+
const $ = (q - 1) * P, te = $ + P;
|
|
3688
|
+
if (r.some((ne) => typeof ne.__absIndex == "number")) {
|
|
3689
|
+
const ne = [];
|
|
3690
|
+
for (let le = $; le < te; le++) {
|
|
3691
|
+
const ie = r.find((pe) => pe.__absIndex === le);
|
|
3692
|
+
ie && ne.push(ie);
|
|
3693
3693
|
}
|
|
3694
|
-
return
|
|
3694
|
+
return ne;
|
|
3695
3695
|
}
|
|
3696
|
-
return r.slice($,
|
|
3697
|
-
}, [e.viewBehavior, r, q, P]), Y =
|
|
3696
|
+
return r.slice($, te);
|
|
3697
|
+
}, [e.viewBehavior, r, q, P]), Y = fe(
|
|
3698
3698
|
($) => {
|
|
3699
|
-
var
|
|
3700
|
-
if (Z($), W && l &&
|
|
3701
|
-
const
|
|
3702
|
-
(!oe.has(
|
|
3703
|
-
const
|
|
3704
|
-
return
|
|
3705
|
-
}), (
|
|
3699
|
+
var te;
|
|
3700
|
+
if (Z($), W && l && M) {
|
|
3701
|
+
const se = ($ - 1) * P, ne = Math.floor(se / l) + 1;
|
|
3702
|
+
(!oe.has(ne) || se >= r.length) && (a((ie) => {
|
|
3703
|
+
const pe = new Set(ie);
|
|
3704
|
+
return pe.add(ne), pe;
|
|
3705
|
+
}), (te = e.eventsEmit) == null || te.call(
|
|
3706
3706
|
e,
|
|
3707
3707
|
"pagination:request_merge_data",
|
|
3708
3708
|
{
|
|
3709
|
-
viewId:
|
|
3709
|
+
viewId: M,
|
|
3710
3710
|
request: {
|
|
3711
|
-
pageNo:
|
|
3711
|
+
pageNo: ne,
|
|
3712
3712
|
pageSize: l
|
|
3713
3713
|
}
|
|
3714
3714
|
},
|
|
@@ -3716,22 +3716,22 @@ const at = me.memo((e) => {
|
|
|
3716
3716
|
));
|
|
3717
3717
|
}
|
|
3718
3718
|
},
|
|
3719
|
-
[W, l,
|
|
3720
|
-
), i =
|
|
3721
|
-
O((
|
|
3722
|
-
const
|
|
3723
|
-
return
|
|
3724
|
-
var
|
|
3725
|
-
(
|
|
3719
|
+
[W, l, M, P, r.length, e.eventsEmit, oe]
|
|
3720
|
+
), i = fe(($) => {
|
|
3721
|
+
O((te) => {
|
|
3722
|
+
const se = new Set(te);
|
|
3723
|
+
return se.has($) ? se.delete($) : (se.add($), setTimeout(() => {
|
|
3724
|
+
var ne, le;
|
|
3725
|
+
(le = e.eventsEmit) == null || le.call(e, "table_expand", {
|
|
3726
3726
|
tableId: $,
|
|
3727
|
-
children: ((
|
|
3727
|
+
children: ((ne = r.find((ie) => ie.id === $)) == null ? void 0 : ne.children) || []
|
|
3728
3728
|
});
|
|
3729
|
-
}, 0)),
|
|
3729
|
+
}, 0)), se;
|
|
3730
3730
|
});
|
|
3731
|
-
}, [r, e.eventsEmit]), u =
|
|
3731
|
+
}, [r, e.eventsEmit]), u = fe(($) => $.hasOwnProperty("children") && $.children !== void 0, []), c = fe(
|
|
3732
3732
|
($) => V.has($),
|
|
3733
3733
|
[V]
|
|
3734
|
-
), n =
|
|
3734
|
+
), n = fe(() => {
|
|
3735
3735
|
const $ = Q.current;
|
|
3736
3736
|
$ && (e.isSubTable || (v($.scrollLeft > 0), A($.scrollLeft < $.scrollWidth - $.offsetWidth - 1)));
|
|
3737
3737
|
}, [e.isSubTable]);
|
|
@@ -3744,21 +3744,21 @@ const at = me.memo((e) => {
|
|
|
3744
3744
|
}, [n]), we(() => {
|
|
3745
3745
|
const $ = Q.current;
|
|
3746
3746
|
if (!$) return;
|
|
3747
|
-
const
|
|
3748
|
-
const
|
|
3749
|
-
ee(
|
|
3747
|
+
const te = () => {
|
|
3748
|
+
const ne = $.getBoundingClientRect();
|
|
3749
|
+
ee(ne.width);
|
|
3750
3750
|
};
|
|
3751
|
-
|
|
3752
|
-
const
|
|
3753
|
-
return
|
|
3754
|
-
window.removeEventListener("resize",
|
|
3751
|
+
te(), window.addEventListener("resize", te);
|
|
3752
|
+
const se = new ResizeObserver(te);
|
|
3753
|
+
return se.observe($), () => {
|
|
3754
|
+
window.removeEventListener("resize", te), se.disconnect();
|
|
3755
3755
|
};
|
|
3756
3756
|
}, []);
|
|
3757
|
-
const z = e.isSubTable ?
|
|
3757
|
+
const z = e.isSubTable ? Ka : Ga;
|
|
3758
3758
|
return /* @__PURE__ */ B(
|
|
3759
3759
|
z,
|
|
3760
3760
|
{
|
|
3761
|
-
theme:
|
|
3761
|
+
theme: f.theme || E,
|
|
3762
3762
|
className: "w-full",
|
|
3763
3763
|
style: {
|
|
3764
3764
|
transform: `scale(${G})`,
|
|
@@ -3829,18 +3829,18 @@ const at = me.memo((e) => {
|
|
|
3829
3829
|
position: e.isSubTable ? void 0 : "sticky",
|
|
3830
3830
|
top: 0,
|
|
3831
3831
|
zIndex: 3,
|
|
3832
|
-
background: ((g = (m =
|
|
3832
|
+
background: ((g = (m = f.theme) == null ? void 0 : m.colors) == null ? void 0 : g.disabledBackground) || "#f5f5f5"
|
|
3833
3833
|
},
|
|
3834
3834
|
children: /* @__PURE__ */ B("tr", { children: [
|
|
3835
3835
|
e.allowMultiSelect && /* @__PURE__ */ o(
|
|
3836
|
-
|
|
3836
|
+
_r,
|
|
3837
3837
|
{
|
|
3838
|
-
theme:
|
|
3838
|
+
theme: f.theme || E,
|
|
3839
3839
|
style: {
|
|
3840
3840
|
position: "sticky",
|
|
3841
3841
|
left: 0,
|
|
3842
3842
|
zIndex: 3,
|
|
3843
|
-
background:
|
|
3843
|
+
background: N,
|
|
3844
3844
|
width: 40,
|
|
3845
3845
|
minWidth: 40,
|
|
3846
3846
|
maxWidth: 40,
|
|
@@ -3857,32 +3857,32 @@ const at = me.memo((e) => {
|
|
|
3857
3857
|
)
|
|
3858
3858
|
}
|
|
3859
3859
|
),
|
|
3860
|
-
S.map(($,
|
|
3861
|
-
var
|
|
3862
|
-
const
|
|
3860
|
+
S.map(($, te) => {
|
|
3861
|
+
var pe, de;
|
|
3862
|
+
const se = te === 0, ne = te === S.length - 1, le = se ? N : ne ? C : ((de = (pe = f.theme) == null ? void 0 : pe.colors) == null ? void 0 : de.disabledBackground) || "#f5f5f5", ie = se ? {
|
|
3863
3863
|
position: "sticky",
|
|
3864
3864
|
left: e.allowMultiSelect ? 40 : 0,
|
|
3865
3865
|
zIndex: 2,
|
|
3866
|
-
background:
|
|
3867
|
-
} :
|
|
3866
|
+
background: le
|
|
3867
|
+
} : ne ? {
|
|
3868
3868
|
position: "sticky",
|
|
3869
3869
|
right: 0,
|
|
3870
3870
|
zIndex: 2,
|
|
3871
|
-
background:
|
|
3871
|
+
background: le
|
|
3872
3872
|
} : {};
|
|
3873
3873
|
return /* @__PURE__ */ o(
|
|
3874
|
-
|
|
3874
|
+
_r,
|
|
3875
3875
|
{
|
|
3876
|
-
theme:
|
|
3876
|
+
theme: f.theme || E,
|
|
3877
3877
|
style: {
|
|
3878
|
-
...
|
|
3879
|
-
...
|
|
3878
|
+
...zr($.type),
|
|
3879
|
+
...ie,
|
|
3880
3880
|
...$.maxWidth !== void 0 ? {
|
|
3881
3881
|
maxWidth: typeof $.maxWidth == "number" ? `${$.maxWidth}px` : $.maxWidth
|
|
3882
3882
|
} : {}
|
|
3883
3883
|
},
|
|
3884
|
-
className:
|
|
3885
|
-
children:
|
|
3884
|
+
className: se && T ? "sticky-shadow-left" : ne && U ? "sticky-shadow-right" : "",
|
|
3885
|
+
children: Ja($)
|
|
3886
3886
|
},
|
|
3887
3887
|
$.id
|
|
3888
3888
|
);
|
|
@@ -3890,18 +3890,18 @@ const at = me.memo((e) => {
|
|
|
3890
3890
|
] })
|
|
3891
3891
|
}
|
|
3892
3892
|
),
|
|
3893
|
-
/* @__PURE__ */ o("tbody", { children: j.map(($,
|
|
3894
|
-
var
|
|
3895
|
-
const
|
|
3896
|
-
return /* @__PURE__ */ B(
|
|
3893
|
+
/* @__PURE__ */ o("tbody", { children: j.map(($, te) => {
|
|
3894
|
+
var ie, pe, de, Ne, Ve, ar, tr, nr, or, sr, lr, ir, dr, cr, ur, hr;
|
|
3895
|
+
const se = e.rowProps ? e.rowProps($, te) : {}, ne = u($), le = c($.id) || $.__autoExpand && ne;
|
|
3896
|
+
return /* @__PURE__ */ B(be.Fragment, { children: [
|
|
3897
3897
|
/* @__PURE__ */ B(
|
|
3898
|
-
|
|
3898
|
+
Za,
|
|
3899
3899
|
{
|
|
3900
|
-
theme:
|
|
3901
|
-
...
|
|
3902
|
-
className: `${
|
|
3900
|
+
theme: f.theme || E,
|
|
3901
|
+
...se,
|
|
3902
|
+
className: `${se.className || ""} ${(ie = e.addingIds) != null && ie.includes($.id) ? "adding-row" : ""} ${$.removing ? "removing-row" : ""}`,
|
|
3903
3903
|
style: {
|
|
3904
|
-
...
|
|
3904
|
+
...se.style,
|
|
3905
3905
|
...$.removing ? {
|
|
3906
3906
|
opacity: 0,
|
|
3907
3907
|
transform: "translateX(100px)",
|
|
@@ -3909,8 +3909,8 @@ const at = me.memo((e) => {
|
|
|
3909
3909
|
} : {}
|
|
3910
3910
|
},
|
|
3911
3911
|
onAnimationEnd: (H) => {
|
|
3912
|
-
var he,
|
|
3913
|
-
H.animationName === "row-slide-in" && ((he = e.addingIds) != null && he.includes($.id)) && ((
|
|
3912
|
+
var he, ge;
|
|
3913
|
+
H.animationName === "row-slide-in" && ((he = e.addingIds) != null && he.includes($.id)) && ((ge = e.onRowAddAnimationComplete) == null || ge.call(e, $.id));
|
|
3914
3914
|
},
|
|
3915
3915
|
onTransitionEnd: (H) => {
|
|
3916
3916
|
var he;
|
|
@@ -3918,9 +3918,9 @@ const at = me.memo((e) => {
|
|
|
3918
3918
|
},
|
|
3919
3919
|
children: [
|
|
3920
3920
|
e.allowMultiSelect && /* @__PURE__ */ o(
|
|
3921
|
-
|
|
3921
|
+
Ar,
|
|
3922
3922
|
{
|
|
3923
|
-
theme:
|
|
3923
|
+
theme: f.theme || E,
|
|
3924
3924
|
style: {
|
|
3925
3925
|
position: "sticky",
|
|
3926
3926
|
left: 0,
|
|
@@ -3943,28 +3943,28 @@ const at = me.memo((e) => {
|
|
|
3943
3943
|
}
|
|
3944
3944
|
),
|
|
3945
3945
|
S.map((H, he) => {
|
|
3946
|
-
var
|
|
3947
|
-
const
|
|
3946
|
+
var pr;
|
|
3947
|
+
const ge = he === 0, Ie = he === S.length - 1, Ce = ge ? N : Ie ? C : p, Gr = ge ? {
|
|
3948
3948
|
position: "sticky",
|
|
3949
3949
|
left: e.allowMultiSelect ? 40 : 0,
|
|
3950
3950
|
zIndex: 1,
|
|
3951
|
-
background:
|
|
3952
|
-
} :
|
|
3951
|
+
background: Ce
|
|
3952
|
+
} : Ie ? {
|
|
3953
3953
|
position: "sticky",
|
|
3954
3954
|
right: 0,
|
|
3955
3955
|
zIndex: 1,
|
|
3956
|
-
background:
|
|
3957
|
-
} : {},
|
|
3956
|
+
background: Ce
|
|
3957
|
+
} : {}, xe = ((pr = $.data) == null ? void 0 : pr.filter((Ee) => Ee.columnId === H.id)) || [], Kr = Object.assign(
|
|
3958
3958
|
{},
|
|
3959
|
-
|
|
3960
|
-
|
|
3959
|
+
zr(H.type),
|
|
3960
|
+
Gr,
|
|
3961
3961
|
H.maxWidth !== void 0 ? {
|
|
3962
3962
|
maxWidth: typeof H.maxWidth == "number" ? `${H.maxWidth}px` : H.maxWidth
|
|
3963
3963
|
} : {},
|
|
3964
|
-
{ background:
|
|
3965
|
-
),
|
|
3966
|
-
var
|
|
3967
|
-
return
|
|
3964
|
+
{ background: Ce }
|
|
3965
|
+
), Pr = () => {
|
|
3966
|
+
var Ee, fr;
|
|
3967
|
+
return ge && ne ? /* @__PURE__ */ B("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
3968
3968
|
/* @__PURE__ */ o(
|
|
3969
3969
|
"button",
|
|
3970
3970
|
{
|
|
@@ -3977,18 +3977,18 @@ const at = me.memo((e) => {
|
|
|
3977
3977
|
display: "flex",
|
|
3978
3978
|
alignItems: "center",
|
|
3979
3979
|
justifyContent: "center",
|
|
3980
|
-
color: ((
|
|
3980
|
+
color: ((fr = (Ee = f.theme) == null ? void 0 : Ee.colors) == null ? void 0 : fr.text) || "#222"
|
|
3981
3981
|
},
|
|
3982
|
-
children:
|
|
3982
|
+
children: le ? /* @__PURE__ */ o(ea, { size: 16 }) : /* @__PURE__ */ o(ra, { size: 16 })
|
|
3983
3983
|
}
|
|
3984
3984
|
),
|
|
3985
3985
|
/* @__PURE__ */ B("span", { style: { paddingLeft: h * 16 }, children: [
|
|
3986
3986
|
" ",
|
|
3987
|
-
|
|
3988
|
-
|
|
3987
|
+
xe.length > 0 ? H.type === "action" ? H.render ? H.render(
|
|
3988
|
+
xe.length > 1 ? xe.map((ve) => ve) : xe[0],
|
|
3989
3989
|
$,
|
|
3990
|
-
|
|
3991
|
-
) : null :
|
|
3990
|
+
xe.length > 1 ? void 0 : xe[0]
|
|
3991
|
+
) : null : xe.map((ve, Qe) => /* @__PURE__ */ o(
|
|
3992
3992
|
"span",
|
|
3993
3993
|
{
|
|
3994
3994
|
style: {
|
|
@@ -3999,18 +3999,18 @@ const at = me.memo((e) => {
|
|
|
3999
3999
|
textOverflow: "ellipsis",
|
|
4000
4000
|
verticalAlign: "middle"
|
|
4001
4001
|
},
|
|
4002
|
-
children: H.render ? H.render(
|
|
4002
|
+
children: H.render ? H.render(ve.value, $, ve) : /* @__PURE__ */ o("span", { children: ve.value })
|
|
4003
4003
|
},
|
|
4004
|
-
|
|
4004
|
+
Qe
|
|
4005
4005
|
)) : null
|
|
4006
4006
|
] })
|
|
4007
4007
|
] }) : /* @__PURE__ */ B("span", { style: { paddingLeft: h * 16 }, children: [
|
|
4008
4008
|
" ",
|
|
4009
|
-
|
|
4010
|
-
|
|
4009
|
+
xe.length > 0 ? H.type === "action" ? H.render ? H.render(
|
|
4010
|
+
xe.length > 1 ? xe.map((ve) => ve) : xe[0],
|
|
4011
4011
|
$,
|
|
4012
|
-
|
|
4013
|
-
) : null :
|
|
4012
|
+
xe.length > 1 ? void 0 : xe[0]
|
|
4013
|
+
) : null : xe.map((ve, Qe) => /* @__PURE__ */ o(
|
|
4014
4014
|
"span",
|
|
4015
4015
|
{
|
|
4016
4016
|
style: {
|
|
@@ -4021,19 +4021,19 @@ const at = me.memo((e) => {
|
|
|
4021
4021
|
textOverflow: "ellipsis",
|
|
4022
4022
|
verticalAlign: "middle"
|
|
4023
4023
|
},
|
|
4024
|
-
children: H.render ? H.render(
|
|
4024
|
+
children: H.render ? H.render(ve.value, $, ve) : /* @__PURE__ */ o("span", { children: ve.value })
|
|
4025
4025
|
},
|
|
4026
|
-
|
|
4026
|
+
Qe
|
|
4027
4027
|
)) : null
|
|
4028
4028
|
] });
|
|
4029
4029
|
};
|
|
4030
4030
|
return /* @__PURE__ */ o(
|
|
4031
|
-
|
|
4031
|
+
Ar,
|
|
4032
4032
|
{
|
|
4033
|
-
theme:
|
|
4034
|
-
style:
|
|
4035
|
-
className:
|
|
4036
|
-
children:
|
|
4033
|
+
theme: f.theme || E,
|
|
4034
|
+
style: Kr,
|
|
4035
|
+
className: ge && T ? "sticky-shadow-left" : Ie && U ? "sticky-shadow-right" : "",
|
|
4036
|
+
children: Pr()
|
|
4037
4037
|
},
|
|
4038
4038
|
H.id
|
|
4039
4039
|
);
|
|
@@ -4041,7 +4041,7 @@ const at = me.memo((e) => {
|
|
|
4041
4041
|
]
|
|
4042
4042
|
}
|
|
4043
4043
|
),
|
|
4044
|
-
|
|
4044
|
+
ne && le && $.children !== void 0 && /* @__PURE__ */ o(
|
|
4045
4045
|
"tr",
|
|
4046
4046
|
{
|
|
4047
4047
|
className: " relative ",
|
|
@@ -4068,7 +4068,7 @@ const at = me.memo((e) => {
|
|
|
4068
4068
|
// 最小宽度确保内容显示
|
|
4069
4069
|
maxWidth: "100%",
|
|
4070
4070
|
// 最大宽度不超过父容器
|
|
4071
|
-
background: ((
|
|
4071
|
+
background: ((de = (pe = f.theme) == null ? void 0 : pe.colors) == null ? void 0 : de.disabledBackground) || "#f5f5f5",
|
|
4072
4072
|
boxSizing: "border-box"
|
|
4073
4073
|
},
|
|
4074
4074
|
children: [
|
|
@@ -4086,7 +4086,7 @@ const at = me.memo((e) => {
|
|
|
4086
4086
|
alignItems: "center",
|
|
4087
4087
|
justifyContent: "center",
|
|
4088
4088
|
zIndex: 10,
|
|
4089
|
-
borderRadius:
|
|
4089
|
+
borderRadius: f.space.radius
|
|
4090
4090
|
},
|
|
4091
4091
|
children: /* @__PURE__ */ B(
|
|
4092
4092
|
"div",
|
|
@@ -4104,21 +4104,21 @@ const at = me.memo((e) => {
|
|
|
4104
4104
|
style: {
|
|
4105
4105
|
width: 24,
|
|
4106
4106
|
height: 24,
|
|
4107
|
-
border: `2px solid ${((
|
|
4108
|
-
borderTop: `2px solid ${((
|
|
4107
|
+
border: `2px solid ${((Ve = (Ne = f.theme) == null ? void 0 : Ne.colors) == null ? void 0 : Ve.border) || "#d1d5db"}`,
|
|
4108
|
+
borderTop: `2px solid ${((tr = (ar = f.theme) == null ? void 0 : ar.colors) == null ? void 0 : tr.primary) || "#2563eb"}`,
|
|
4109
4109
|
borderRadius: "50%",
|
|
4110
4110
|
animation: "spin 1s linear infinite"
|
|
4111
4111
|
}
|
|
4112
4112
|
}
|
|
4113
4113
|
),
|
|
4114
|
-
/* @__PURE__ */ o("span", { style: { fontSize: 14, color: ((
|
|
4114
|
+
/* @__PURE__ */ o("span", { style: { fontSize: 14, color: ((or = (nr = f.theme) == null ? void 0 : nr.colors) == null ? void 0 : or.text) || "#222" }, children: "加载中..." })
|
|
4115
4115
|
]
|
|
4116
4116
|
}
|
|
4117
4117
|
)
|
|
4118
4118
|
}
|
|
4119
4119
|
),
|
|
4120
4120
|
/* @__PURE__ */ B("div", { style: { marginBottom: "16px" }, children: [
|
|
4121
|
-
Array.isArray((
|
|
4121
|
+
Array.isArray((sr = e.subTableConfig) == null ? void 0 : sr.toolbar) && e.subTableConfig.toolbar.length > 0 && /* @__PURE__ */ o(
|
|
4122
4122
|
"div",
|
|
4123
4123
|
{
|
|
4124
4124
|
style: {
|
|
@@ -4128,20 +4128,20 @@ const at = me.memo((e) => {
|
|
|
4128
4128
|
marginBottom: 8
|
|
4129
4129
|
},
|
|
4130
4130
|
children: e.subTableConfig.toolbar.map((H, he) => {
|
|
4131
|
-
const
|
|
4131
|
+
const Ie = {
|
|
4132
4132
|
primary: "primary",
|
|
4133
4133
|
error: "danger",
|
|
4134
4134
|
default: "text"
|
|
4135
4135
|
}[H.btnType] || "text";
|
|
4136
4136
|
return /* @__PURE__ */ o(
|
|
4137
|
-
|
|
4137
|
+
Ue,
|
|
4138
4138
|
{
|
|
4139
|
-
mode:
|
|
4139
|
+
mode: Ie,
|
|
4140
4140
|
label: H.label,
|
|
4141
4141
|
icon: H.icon,
|
|
4142
4142
|
onClick: () => {
|
|
4143
|
-
var
|
|
4144
|
-
return (
|
|
4143
|
+
var Ce;
|
|
4144
|
+
return (Ce = e.eventsEmit) == null ? void 0 : Ce.call(e, "table_action_add", {
|
|
4145
4145
|
tableId: $.id,
|
|
4146
4146
|
action: H
|
|
4147
4147
|
});
|
|
@@ -4153,9 +4153,9 @@ const at = me.memo((e) => {
|
|
|
4153
4153
|
}
|
|
4154
4154
|
),
|
|
4155
4155
|
/* @__PURE__ */ o(
|
|
4156
|
-
|
|
4156
|
+
Pa,
|
|
4157
4157
|
{
|
|
4158
|
-
theme:
|
|
4158
|
+
theme: f.theme || E,
|
|
4159
4159
|
onWheel: (H) => {
|
|
4160
4160
|
H.stopPropagation();
|
|
4161
4161
|
},
|
|
@@ -4170,14 +4170,14 @@ const at = me.memo((e) => {
|
|
|
4170
4170
|
maxWidth: "100%"
|
|
4171
4171
|
},
|
|
4172
4172
|
children: /* @__PURE__ */ o(
|
|
4173
|
-
|
|
4173
|
+
et,
|
|
4174
4174
|
{
|
|
4175
|
-
columns: ((
|
|
4175
|
+
columns: ((lr = e.subTableConfig) == null ? void 0 : lr.columns) || [],
|
|
4176
4176
|
dataSource: $.children || [],
|
|
4177
4177
|
isSubTable: !0,
|
|
4178
4178
|
isPending: (H) => {
|
|
4179
|
-
var he,
|
|
4180
|
-
return ((
|
|
4179
|
+
var he, ge;
|
|
4180
|
+
return ((ge = (he = e.subTablePendingIds) == null ? void 0 : he[$.id]) == null ? void 0 : ge.includes(H)) || !1;
|
|
4181
4181
|
},
|
|
4182
4182
|
onRowAnimationComplete: (H) => {
|
|
4183
4183
|
var he;
|
|
@@ -4187,20 +4187,20 @@ const at = me.memo((e) => {
|
|
|
4187
4187
|
});
|
|
4188
4188
|
},
|
|
4189
4189
|
eventsEmit: (H, he) => {
|
|
4190
|
-
var
|
|
4191
|
-
(
|
|
4190
|
+
var ge;
|
|
4191
|
+
(ge = e.eventsEmit) == null || ge.call(e, H, { ...he, tableId: $.id });
|
|
4192
4192
|
},
|
|
4193
|
-
allowMultiSelect: (
|
|
4193
|
+
allowMultiSelect: (ir = e.subTableConfig) == null ? void 0 : ir.allowMultiSelect,
|
|
4194
4194
|
size: e.size,
|
|
4195
4195
|
level: h + 1,
|
|
4196
4196
|
subTableConfig: e.subTableConfig,
|
|
4197
4197
|
styles: e.styles,
|
|
4198
4198
|
onRowAddAnimationComplete: e.onRowAddAnimationComplete,
|
|
4199
4199
|
addingIds: e.addingIds,
|
|
4200
|
-
viewBehavior: (
|
|
4201
|
-
viewPageSize: (
|
|
4202
|
-
total: (
|
|
4203
|
-
requestPagesize: (
|
|
4200
|
+
viewBehavior: (dr = e.subTableConfig) == null ? void 0 : dr.viewBehavior,
|
|
4201
|
+
viewPageSize: (cr = e.subTableConfig) == null ? void 0 : cr.viewPageSize,
|
|
4202
|
+
total: (ur = e.subTableConfig) == null ? void 0 : ur.total,
|
|
4203
|
+
requestPagesize: (hr = e.subTableConfig) == null ? void 0 : hr.requestPagesize
|
|
4204
4204
|
}
|
|
4205
4205
|
)
|
|
4206
4206
|
}
|
|
@@ -4213,7 +4213,7 @@ const at = me.memo((e) => {
|
|
|
4213
4213
|
)
|
|
4214
4214
|
}
|
|
4215
4215
|
)
|
|
4216
|
-
] }, $.id ??
|
|
4216
|
+
] }, $.id ?? te);
|
|
4217
4217
|
}) })
|
|
4218
4218
|
]
|
|
4219
4219
|
}
|
|
@@ -4228,40 +4228,40 @@ const at = me.memo((e) => {
|
|
|
4228
4228
|
display: "flex",
|
|
4229
4229
|
justifyContent: "end",
|
|
4230
4230
|
alignItems: "center",
|
|
4231
|
-
background: ((
|
|
4232
|
-
borderTop: `1px solid ${((
|
|
4231
|
+
background: ((ye = (re = f.theme) == null ? void 0 : re.colors) == null ? void 0 : ye.background) || "#fff",
|
|
4232
|
+
borderTop: `1px solid ${((De = (Fe = f.theme) == null ? void 0 : Fe.colors) == null ? void 0 : De.border) || "#d1d5db"}`,
|
|
4233
4233
|
flexShrink: 0,
|
|
4234
4234
|
paddingRight: 16
|
|
4235
4235
|
},
|
|
4236
4236
|
children: /* @__PURE__ */ o(
|
|
4237
|
-
|
|
4237
|
+
sa,
|
|
4238
4238
|
{
|
|
4239
4239
|
current: q,
|
|
4240
4240
|
pageSize: P,
|
|
4241
4241
|
total: k,
|
|
4242
4242
|
onChange: Y,
|
|
4243
4243
|
onPageSizeChange: ($) => {
|
|
4244
|
-
var
|
|
4245
|
-
Z(1),
|
|
4244
|
+
var te;
|
|
4245
|
+
Z(1), ae($), W && l && M && e.eventsEmit && (a(/* @__PURE__ */ new Set()), e.eventsEmit(
|
|
4246
4246
|
"pagination:request_merge_data",
|
|
4247
4247
|
{
|
|
4248
|
-
viewId:
|
|
4248
|
+
viewId: M,
|
|
4249
4249
|
request: { pageNo: 1, pageSize: l }
|
|
4250
4250
|
},
|
|
4251
4251
|
void 0
|
|
4252
|
-
)), (
|
|
4252
|
+
)), (te = e.eventsEmit) == null || te.call(e, "pagination:pageSizeChange", { viewId: M, pageSize: $ });
|
|
4253
4253
|
},
|
|
4254
4254
|
showSizeChanger: !0,
|
|
4255
4255
|
pageSizeOptions: [5, 10, 20, 30, 50],
|
|
4256
4256
|
theme: {
|
|
4257
4257
|
colors: {
|
|
4258
|
-
background: ((
|
|
4259
|
-
text: ((
|
|
4260
|
-
border: ((
|
|
4261
|
-
disabledBackground: ((
|
|
4262
|
-
primary: ((
|
|
4258
|
+
background: ((_e = (ze = f.theme) == null ? void 0 : ze.colors) == null ? void 0 : _e.background) || "#fff",
|
|
4259
|
+
text: ((We = (Ae = f.theme) == null ? void 0 : Ae.colors) == null ? void 0 : We.text) || "#222",
|
|
4260
|
+
border: ((qe = (Re = f.theme) == null ? void 0 : Re.colors) == null ? void 0 : qe.border) || "#d1d5db",
|
|
4261
|
+
disabledBackground: ((Be = (Le = f.theme) == null ? void 0 : Le.colors) == null ? void 0 : Be.disabledBackground) || "#f5f5f5",
|
|
4262
|
+
primary: ((je = (Oe = f.theme) == null ? void 0 : Oe.colors) == null ? void 0 : je.primary) || "#2563eb"
|
|
4263
4263
|
},
|
|
4264
|
-
space: { radius: ((
|
|
4264
|
+
space: { radius: ((He = (Ye = f.theme) == null ? void 0 : Ye.space) == null ? void 0 : He.radius) || "6px" }
|
|
4265
4265
|
},
|
|
4266
4266
|
size: e.size,
|
|
4267
4267
|
showPageNumbers: !0
|
|
@@ -4272,7 +4272,7 @@ const at = me.memo((e) => {
|
|
|
4272
4272
|
]
|
|
4273
4273
|
}
|
|
4274
4274
|
);
|
|
4275
|
-
}),
|
|
4275
|
+
}), rt = J.div`
|
|
4276
4276
|
display: flex;
|
|
4277
4277
|
background-color: #ffffff;
|
|
4278
4278
|
border: 1px solid ${(e) => {
|
|
@@ -4287,7 +4287,7 @@ const at = me.memo((e) => {
|
|
|
4287
4287
|
width: ${(e) => e.$width || "600px"};
|
|
4288
4288
|
height: ${(e) => e.$height || "400px"};
|
|
4289
4289
|
position: relative;
|
|
4290
|
-
`,
|
|
4290
|
+
`, Wr = J.div`
|
|
4291
4291
|
display: flex;
|
|
4292
4292
|
flex-direction: column;
|
|
4293
4293
|
border-right: 1px solid ${(e) => {
|
|
@@ -4299,7 +4299,7 @@ const at = me.memo((e) => {
|
|
|
4299
4299
|
&:last-child {
|
|
4300
4300
|
border-right: none;
|
|
4301
4301
|
}
|
|
4302
|
-
`,
|
|
4302
|
+
`, Rr = J.div`
|
|
4303
4303
|
padding: 12px 16px;
|
|
4304
4304
|
border-bottom: 1px solid ${(e) => {
|
|
4305
4305
|
var r, t, s;
|
|
@@ -4315,7 +4315,7 @@ const at = me.memo((e) => {
|
|
|
4315
4315
|
var r, t, s;
|
|
4316
4316
|
return ((s = (t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.text) == null ? void 0 : s.primary) || "#111827";
|
|
4317
4317
|
}};
|
|
4318
|
-
`,
|
|
4318
|
+
`, at = J.div`
|
|
4319
4319
|
padding: 12px;
|
|
4320
4320
|
border-bottom: 1px solid ${(e) => {
|
|
4321
4321
|
var r, t, s;
|
|
@@ -4325,7 +4325,7 @@ const at = me.memo((e) => {
|
|
|
4325
4325
|
var r, t, s;
|
|
4326
4326
|
return ((s = (t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.background) == null ? void 0 : s.default) || "#ffffff";
|
|
4327
4327
|
}};
|
|
4328
|
-
`,
|
|
4328
|
+
`, tt = J.input`
|
|
4329
4329
|
width: 100%;
|
|
4330
4330
|
padding: 8px 12px 8px 36px;
|
|
4331
4331
|
border: 1px solid ${(e) => {
|
|
@@ -4357,14 +4357,14 @@ const at = me.memo((e) => {
|
|
|
4357
4357
|
return ((s = (t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.text) == null ? void 0 : s.tertiary) || "#9ca3af";
|
|
4358
4358
|
}};
|
|
4359
4359
|
}
|
|
4360
|
-
`,
|
|
4360
|
+
`, nt = J.div`
|
|
4361
4361
|
position: absolute;
|
|
4362
4362
|
left: 20px;
|
|
4363
4363
|
top: 50%;
|
|
4364
4364
|
transform: translateY(-50%);
|
|
4365
4365
|
color: #9ca3af;
|
|
4366
4366
|
pointer-events: none;
|
|
4367
|
-
`,
|
|
4367
|
+
`, qr = J.div`
|
|
4368
4368
|
flex: 1;
|
|
4369
4369
|
overflow-y: auto;
|
|
4370
4370
|
overflow-x: hidden;
|
|
@@ -4385,7 +4385,7 @@ const at = me.memo((e) => {
|
|
|
4385
4385
|
background: #a8a8a8;
|
|
4386
4386
|
}
|
|
4387
4387
|
}
|
|
4388
|
-
`,
|
|
4388
|
+
`, Lr = J.div`
|
|
4389
4389
|
padding: 10px 16px;
|
|
4390
4390
|
cursor: ${(e) => e.$disabled ? "not-allowed" : "pointer"};
|
|
4391
4391
|
transition: all 0.2s;
|
|
@@ -4408,7 +4408,7 @@ const at = me.memo((e) => {
|
|
|
4408
4408
|
&:last-child {
|
|
4409
4409
|
border-bottom: none;
|
|
4410
4410
|
}
|
|
4411
|
-
`,
|
|
4411
|
+
`, Br = J.span`
|
|
4412
4412
|
flex: 1;
|
|
4413
4413
|
font-size: 14px;
|
|
4414
4414
|
color: ${(e) => {
|
|
@@ -4418,7 +4418,7 @@ const at = me.memo((e) => {
|
|
|
4418
4418
|
overflow: hidden;
|
|
4419
4419
|
text-overflow: ellipsis;
|
|
4420
4420
|
white-space: nowrap;
|
|
4421
|
-
`,
|
|
4421
|
+
`, Or = J.button`
|
|
4422
4422
|
display: flex;
|
|
4423
4423
|
align-items: center;
|
|
4424
4424
|
justify-content: center;
|
|
@@ -4442,7 +4442,7 @@ const at = me.memo((e) => {
|
|
|
4442
4442
|
return ((s = (t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.text) == null ? void 0 : s.secondary) || "#C9CDD4";
|
|
4443
4443
|
}};
|
|
4444
4444
|
}
|
|
4445
|
-
`,
|
|
4445
|
+
`, jr = J.div`
|
|
4446
4446
|
padding: 40px 20px;
|
|
4447
4447
|
text-align: center;
|
|
4448
4448
|
color: ${(e) => {
|
|
@@ -4450,7 +4450,7 @@ const at = me.memo((e) => {
|
|
|
4450
4450
|
return ((s = (t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.text) == null ? void 0 : s.tertiary) || "#9ca3af";
|
|
4451
4451
|
}};
|
|
4452
4452
|
font-size: 14px;
|
|
4453
|
-
`,
|
|
4453
|
+
`, Yr = J.span`
|
|
4454
4454
|
display: inline-flex;
|
|
4455
4455
|
align-items: center;
|
|
4456
4456
|
justify-content: center;
|
|
@@ -4466,31 +4466,31 @@ const at = me.memo((e) => {
|
|
|
4466
4466
|
font-size: 12px;
|
|
4467
4467
|
font-weight: 500;
|
|
4468
4468
|
margin-left: 8px;
|
|
4469
|
-
`,
|
|
4469
|
+
`, $t = ({
|
|
4470
4470
|
dataSource: e,
|
|
4471
4471
|
value: r,
|
|
4472
4472
|
defaultValue: t = [],
|
|
4473
4473
|
onChange: s,
|
|
4474
4474
|
maxCount: h = 0,
|
|
4475
4475
|
searchPlaceholder: b = "搜索...",
|
|
4476
|
-
leftTitle:
|
|
4476
|
+
leftTitle: f = "可选",
|
|
4477
4477
|
rightTitle: d = "已选",
|
|
4478
|
-
showSearch:
|
|
4478
|
+
showSearch: p = !0,
|
|
4479
4479
|
filterOption: N,
|
|
4480
|
-
renderItem:
|
|
4481
|
-
renderSelectedItem:
|
|
4480
|
+
renderItem: C,
|
|
4481
|
+
renderSelectedItem: M,
|
|
4482
4482
|
onItemDataChange: W,
|
|
4483
4483
|
itemDataMap: l,
|
|
4484
4484
|
className: _,
|
|
4485
4485
|
style: I,
|
|
4486
|
-
styles:
|
|
4486
|
+
styles: ae,
|
|
4487
4487
|
height: oe,
|
|
4488
4488
|
width: a
|
|
4489
4489
|
}) => {
|
|
4490
|
-
const T =
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
), [U, A] =
|
|
4490
|
+
const T = Te(), v = $e(
|
|
4491
|
+
$e({ theme: E, mode: "light" }, T),
|
|
4492
|
+
ae
|
|
4493
|
+
), [U, A] = ue(t), [V, O] = ue(""), [Q, X] = ue(l || {}), R = l !== void 0 ? l : Q, ee = r !== void 0 ? r : U, G = (k) => {
|
|
4494
4494
|
r === void 0 && A(k), s == null || s(k);
|
|
4495
4495
|
}, y = N || ((k, j) => k ? j.label.toLowerCase().includes(k.toLowerCase()) : !0), x = Se(() => e.filter((k) => y(V, k)), [e, V, y]), D = Se(() => e.filter((k) => ee.includes(k.key)), [e, ee]), w = (k, j) => {
|
|
4496
4496
|
const Y = { ...R[k], ...j }, i = { ...R, [k]: Y };
|
|
@@ -4538,7 +4538,7 @@ const at = me.memo((e) => {
|
|
|
4538
4538
|
G(j);
|
|
4539
4539
|
}, Z = (k) => ee.includes(k), P = h > 0 && ee.length >= h;
|
|
4540
4540
|
return /* @__PURE__ */ B(
|
|
4541
|
-
|
|
4541
|
+
rt,
|
|
4542
4542
|
{
|
|
4543
4543
|
$theme: v.theme || E,
|
|
4544
4544
|
$width: a,
|
|
@@ -4546,19 +4546,19 @@ const at = me.memo((e) => {
|
|
|
4546
4546
|
className: _,
|
|
4547
4547
|
style: I,
|
|
4548
4548
|
children: [
|
|
4549
|
-
/* @__PURE__ */ B(
|
|
4550
|
-
/* @__PURE__ */ B(
|
|
4551
|
-
|
|
4552
|
-
h > 0 && /* @__PURE__ */ B(
|
|
4549
|
+
/* @__PURE__ */ B(Wr, { $theme: v.theme || E, style: { flex: 1 }, children: [
|
|
4550
|
+
/* @__PURE__ */ B(Rr, { $theme: v.theme || E, children: [
|
|
4551
|
+
f,
|
|
4552
|
+
h > 0 && /* @__PURE__ */ B(Yr, { $theme: v.theme || E, children: [
|
|
4553
4553
|
ee.length,
|
|
4554
4554
|
"/",
|
|
4555
4555
|
h
|
|
4556
4556
|
] })
|
|
4557
4557
|
] }),
|
|
4558
|
-
|
|
4559
|
-
/* @__PURE__ */ o(
|
|
4558
|
+
p && /* @__PURE__ */ o(at, { $theme: v.theme || E, children: /* @__PURE__ */ B("div", { style: { position: "relative" }, children: [
|
|
4559
|
+
/* @__PURE__ */ o(nt, { children: /* @__PURE__ */ o(aa, { size: 16 }) }),
|
|
4560
4560
|
/* @__PURE__ */ o(
|
|
4561
|
-
|
|
4561
|
+
tt,
|
|
4562
4562
|
{
|
|
4563
4563
|
$theme: v.theme || E,
|
|
4564
4564
|
type: "text",
|
|
@@ -4568,19 +4568,19 @@ const at = me.memo((e) => {
|
|
|
4568
4568
|
}
|
|
4569
4569
|
)
|
|
4570
4570
|
] }) }),
|
|
4571
|
-
/* @__PURE__ */ o(
|
|
4571
|
+
/* @__PURE__ */ o(qr, { children: x.length === 0 ? /* @__PURE__ */ o(jr, { $theme: v.theme || E, children: V ? "未找到匹配项" : "暂无数据" }) : x.map((k) => {
|
|
4572
4572
|
const j = Z(k.key), Y = k.disabled || P && !j;
|
|
4573
4573
|
return /* @__PURE__ */ B(
|
|
4574
|
-
|
|
4574
|
+
Lr,
|
|
4575
4575
|
{
|
|
4576
4576
|
$theme: v.theme || E,
|
|
4577
4577
|
$disabled: Y,
|
|
4578
4578
|
$selected: j,
|
|
4579
4579
|
onClick: () => q(k),
|
|
4580
4580
|
children: [
|
|
4581
|
-
/* @__PURE__ */ o(
|
|
4581
|
+
/* @__PURE__ */ o(Br, { $theme: v.theme || E, children: C ? C(k) : k.label }),
|
|
4582
4582
|
j && /* @__PURE__ */ o(
|
|
4583
|
-
|
|
4583
|
+
Or,
|
|
4584
4584
|
{
|
|
4585
4585
|
$theme: v.theme || E,
|
|
4586
4586
|
onClick: (i) => {
|
|
@@ -4591,7 +4591,7 @@ const at = me.memo((e) => {
|
|
|
4591
4591
|
}
|
|
4592
4592
|
),
|
|
4593
4593
|
!j && /* @__PURE__ */ o(
|
|
4594
|
-
|
|
4594
|
+
Or,
|
|
4595
4595
|
{
|
|
4596
4596
|
$theme: v.theme || E,
|
|
4597
4597
|
disabled: Y,
|
|
@@ -4607,22 +4607,22 @@ const at = me.memo((e) => {
|
|
|
4607
4607
|
);
|
|
4608
4608
|
}) })
|
|
4609
4609
|
] }),
|
|
4610
|
-
/* @__PURE__ */ B(
|
|
4611
|
-
/* @__PURE__ */ B(
|
|
4610
|
+
/* @__PURE__ */ B(Wr, { $theme: v.theme || E, style: { flex: 1 }, children: [
|
|
4611
|
+
/* @__PURE__ */ B(Rr, { $theme: v.theme || E, children: [
|
|
4612
4612
|
d,
|
|
4613
|
-
ee.length > 0 && /* @__PURE__ */ o(
|
|
4613
|
+
ee.length > 0 && /* @__PURE__ */ o(Yr, { $theme: v.theme || E, children: ee.length })
|
|
4614
4614
|
] }),
|
|
4615
|
-
/* @__PURE__ */ o(
|
|
4615
|
+
/* @__PURE__ */ o(qr, { children: D.length === 0 ? /* @__PURE__ */ o(jr, { $theme: v.theme || E, children: "暂无已选项" }) : D.map((k) => {
|
|
4616
4616
|
var i, u, c;
|
|
4617
4617
|
const j = R[k.key] || {}, Y = (n) => w(k.key, n);
|
|
4618
4618
|
return /* @__PURE__ */ B(
|
|
4619
|
-
|
|
4619
|
+
Lr,
|
|
4620
4620
|
{
|
|
4621
4621
|
$theme: v.theme || E,
|
|
4622
4622
|
children: [
|
|
4623
|
-
/* @__PURE__ */ o(
|
|
4623
|
+
/* @__PURE__ */ o(Br, { $theme: v.theme || E, children: M ? M(k, Y, j) : k.label }),
|
|
4624
4624
|
/* @__PURE__ */ o(
|
|
4625
|
-
|
|
4625
|
+
ta,
|
|
4626
4626
|
{
|
|
4627
4627
|
size: 14,
|
|
4628
4628
|
color: ((c = (u = (i = v.theme) == null ? void 0 : i.colors) == null ? void 0 : u.text) == null ? void 0 : c.secondary) || "#86909C",
|
|
@@ -4646,17 +4646,17 @@ const at = me.memo((e) => {
|
|
|
4646
4646
|
);
|
|
4647
4647
|
};
|
|
4648
4648
|
export {
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4649
|
+
ft as CustomDock,
|
|
4650
|
+
Vr as DynamicForm,
|
|
4651
|
+
et as DynamicTable,
|
|
4652
|
+
pt as GoogleNavbar,
|
|
4653
|
+
$t as SearchableSelector,
|
|
4654
|
+
Cr as Uploader,
|
|
4655
|
+
gt as generateFormItems,
|
|
4656
|
+
mt as getFormDefaultValues,
|
|
4657
|
+
yt as getFormErrors,
|
|
4658
|
+
xt as isFormValid,
|
|
4659
|
+
za as useDynamicFormItems,
|
|
4660
|
+
Ea as useDynamicTableColumns,
|
|
4661
|
+
bt as validateFormData
|
|
4662
4662
|
};
|