bi-components-library 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1643 -1507
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as ne, useRef as Q, useMemo as
|
|
3
|
-
import { Button as $e, Card as
|
|
4
|
-
import { createFromIconfontCN as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as $, jsxs as Z, Fragment as st } from "react/jsx-runtime";
|
|
2
|
+
import { useState as ne, useRef as Q, useMemo as Ze, useCallback as ae, useEffect as de, useLayoutEffect as je } from "react";
|
|
3
|
+
import { Button as $e, Card as Re, Modal as lt, Table as Ge, Flex as We, Spin as it, Empty as ct, Select as Fe, Form as De, Input as et, Space as ut, DatePicker as dt, Dropdown as pt, Tooltip as ft, Progress as yt, Pagination as mt, theme as ht } from "antd";
|
|
4
|
+
import { createFromIconfontCN as gt, LeftOutlined as vt, SearchOutlined as bt, ReloadOutlined as xt, InfoCircleOutlined as kt, SendOutlined as wt, PauseCircleOutlined as Et, PlayCircleOutlined as $t } from "@ant-design/icons";
|
|
5
|
+
import { createPortal as tt } from "react-dom";
|
|
6
|
+
const Ct = ({
|
|
7
7
|
variant: t = "primary",
|
|
8
|
-
loading:
|
|
9
|
-
children:
|
|
10
|
-
...
|
|
11
|
-
}) => /* @__PURE__ */
|
|
8
|
+
loading: c = !1,
|
|
9
|
+
children: l,
|
|
10
|
+
...s
|
|
11
|
+
}) => /* @__PURE__ */ $(
|
|
12
12
|
$e,
|
|
13
13
|
{
|
|
14
|
-
...
|
|
15
|
-
type: ((
|
|
16
|
-
switch (
|
|
14
|
+
...s,
|
|
15
|
+
type: ((C) => {
|
|
16
|
+
switch (C) {
|
|
17
17
|
case "primary":
|
|
18
18
|
return "primary";
|
|
19
19
|
case "ghost":
|
|
@@ -28,12 +28,12 @@ const vt = ({
|
|
|
28
28
|
return "primary";
|
|
29
29
|
}
|
|
30
30
|
})(t),
|
|
31
|
-
loading:
|
|
31
|
+
loading: c,
|
|
32
32
|
ghost: t === "ghost",
|
|
33
|
-
children:
|
|
33
|
+
children: l
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
|
-
|
|
36
|
+
Ct.__docgenInfo = {
|
|
37
37
|
displayName: "Button",
|
|
38
38
|
description: "基础按钮,用于触发操作",
|
|
39
39
|
props: {
|
|
@@ -77,25 +77,25 @@ vt.__docgenInfo = {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
const
|
|
80
|
+
const St = ({
|
|
81
81
|
title: t,
|
|
82
|
-
children:
|
|
83
|
-
bordered:
|
|
84
|
-
hoverable:
|
|
85
|
-
size:
|
|
86
|
-
...
|
|
87
|
-
}) => /* @__PURE__ */
|
|
88
|
-
|
|
82
|
+
children: c,
|
|
83
|
+
bordered: l = !0,
|
|
84
|
+
hoverable: s = !1,
|
|
85
|
+
size: u = "default",
|
|
86
|
+
...C
|
|
87
|
+
}) => /* @__PURE__ */ $(
|
|
88
|
+
Re,
|
|
89
89
|
{
|
|
90
|
-
...
|
|
90
|
+
...C,
|
|
91
91
|
title: t,
|
|
92
|
-
bordered:
|
|
93
|
-
hoverable:
|
|
94
|
-
size:
|
|
95
|
-
children:
|
|
92
|
+
bordered: l,
|
|
93
|
+
hoverable: s,
|
|
94
|
+
size: u,
|
|
95
|
+
children: c
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
|
-
|
|
98
|
+
St.__docgenInfo = {
|
|
99
99
|
displayName: "Card",
|
|
100
100
|
description: "卡片容器,用于分组内容",
|
|
101
101
|
props: {
|
|
@@ -146,23 +146,23 @@ bt.__docgenInfo = {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
const
|
|
149
|
+
const Tt = ({
|
|
150
150
|
showDefaultFooter: t = !0,
|
|
151
|
-
...
|
|
151
|
+
...c
|
|
152
152
|
}) => {
|
|
153
|
-
const
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
153
|
+
const l = c.footer !== void 0 ? c.footer : t ? (s, { OkBtn: u, CancelBtn: C }) => /* @__PURE__ */ Z(st, { children: [
|
|
154
|
+
/* @__PURE__ */ $(u, {}),
|
|
155
|
+
/* @__PURE__ */ $(C, {})
|
|
156
156
|
] }) : null;
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
|
|
157
|
+
return /* @__PURE__ */ $(
|
|
158
|
+
lt,
|
|
159
159
|
{
|
|
160
|
-
...
|
|
161
|
-
footer:
|
|
160
|
+
...c,
|
|
161
|
+
footer: l
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
164
|
};
|
|
165
|
-
|
|
165
|
+
Tt.__docgenInfo = {
|
|
166
166
|
displayName: "AppModal",
|
|
167
167
|
description: "应用级模态框组件,基于 Ant Design Modal 封装",
|
|
168
168
|
props: {
|
|
@@ -223,29 +223,29 @@ xt.__docgenInfo = {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
const
|
|
226
|
+
const qt = ({
|
|
227
227
|
scrollX: t,
|
|
228
|
-
showPagination:
|
|
229
|
-
defaultPageSize:
|
|
230
|
-
...
|
|
231
|
-
}) => /* @__PURE__ */
|
|
232
|
-
|
|
228
|
+
showPagination: c = !0,
|
|
229
|
+
defaultPageSize: l = 10,
|
|
230
|
+
...s
|
|
231
|
+
}) => /* @__PURE__ */ $(
|
|
232
|
+
Ge,
|
|
233
233
|
{
|
|
234
|
-
...
|
|
234
|
+
...s,
|
|
235
235
|
scroll: {
|
|
236
236
|
x: t || "max-content",
|
|
237
237
|
y: "50vh"
|
|
238
238
|
},
|
|
239
|
-
pagination:
|
|
239
|
+
pagination: c ? {
|
|
240
240
|
hideOnSinglePage: !0,
|
|
241
241
|
showSizeChanger: !0,
|
|
242
242
|
showQuickJumper: !0,
|
|
243
|
-
defaultPageSize:
|
|
244
|
-
...
|
|
243
|
+
defaultPageSize: l,
|
|
244
|
+
...s.pagination
|
|
245
245
|
} : !1
|
|
246
246
|
}
|
|
247
247
|
);
|
|
248
|
-
|
|
248
|
+
qt.__docgenInfo = {
|
|
249
249
|
displayName: "PageTable",
|
|
250
250
|
description: "页面级表格组件,高度铺满容器,自动滚动",
|
|
251
251
|
props: {
|
|
@@ -295,30 +295,30 @@ kt.__docgenInfo = {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
|
-
const
|
|
298
|
+
const Nt = gt({
|
|
299
299
|
scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
|
|
300
|
-
}),
|
|
300
|
+
}), At = ({
|
|
301
301
|
name: t,
|
|
302
|
-
size:
|
|
303
|
-
color:
|
|
304
|
-
style:
|
|
305
|
-
...
|
|
302
|
+
size: c,
|
|
303
|
+
color: l,
|
|
304
|
+
style: s,
|
|
305
|
+
...u
|
|
306
306
|
}) => {
|
|
307
|
-
const
|
|
308
|
-
fontSize:
|
|
309
|
-
color:
|
|
310
|
-
...
|
|
307
|
+
const C = {
|
|
308
|
+
fontSize: c,
|
|
309
|
+
color: l,
|
|
310
|
+
...s
|
|
311
311
|
};
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
|
|
312
|
+
return /* @__PURE__ */ $(
|
|
313
|
+
Nt,
|
|
314
314
|
{
|
|
315
|
-
...
|
|
315
|
+
...u,
|
|
316
316
|
type: t,
|
|
317
|
-
style:
|
|
317
|
+
style: C
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
320
|
};
|
|
321
|
-
|
|
321
|
+
At.__docgenInfo = {
|
|
322
322
|
displayName: "XcIcon",
|
|
323
323
|
description: "自定义图标组件,基于 iconfont",
|
|
324
324
|
props: {
|
|
@@ -354,43 +354,43 @@ Et.__docgenInfo = {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
|
-
const
|
|
357
|
+
const _t = ({
|
|
358
358
|
loading: t,
|
|
359
|
-
description:
|
|
360
|
-
className:
|
|
361
|
-
emptyChildren:
|
|
362
|
-
loadingText:
|
|
363
|
-
emptyImage:
|
|
359
|
+
description: c = "暂无数据",
|
|
360
|
+
className: l,
|
|
361
|
+
emptyChildren: s,
|
|
362
|
+
loadingText: u,
|
|
363
|
+
emptyImage: C
|
|
364
364
|
}) => t ? /* @__PURE__ */ Z(
|
|
365
365
|
We,
|
|
366
366
|
{
|
|
367
|
-
className: `pt-10 w-full ${
|
|
367
|
+
className: `pt-10 w-full ${l || ""}`,
|
|
368
368
|
align: "center",
|
|
369
369
|
justify: "center",
|
|
370
370
|
vertical: !0,
|
|
371
371
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
|
|
372
|
+
/* @__PURE__ */ $(it, { size: "large" }),
|
|
373
|
+
u && /* @__PURE__ */ $("div", { className: "mt-4 text-gray-500", children: u })
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
|
-
) : /* @__PURE__ */
|
|
376
|
+
) : /* @__PURE__ */ $(
|
|
377
377
|
We,
|
|
378
378
|
{
|
|
379
|
-
className: `pt-10 w-full ${
|
|
379
|
+
className: `pt-10 w-full ${l || ""}`,
|
|
380
380
|
align: "center",
|
|
381
381
|
justify: "center",
|
|
382
|
-
children: /* @__PURE__ */
|
|
383
|
-
|
|
382
|
+
children: /* @__PURE__ */ $(
|
|
383
|
+
ct,
|
|
384
384
|
{
|
|
385
|
-
image:
|
|
386
|
-
description:
|
|
385
|
+
image: C,
|
|
386
|
+
description: c,
|
|
387
387
|
imageStyle: { height: 180 },
|
|
388
|
-
children:
|
|
388
|
+
children: s
|
|
389
389
|
}
|
|
390
390
|
)
|
|
391
391
|
}
|
|
392
392
|
);
|
|
393
|
-
|
|
393
|
+
_t.__docgenInfo = {
|
|
394
394
|
displayName: "EmptyAndSpin",
|
|
395
395
|
description: "空状态和加载状态组合组件",
|
|
396
396
|
props: {
|
|
@@ -433,24 +433,24 @@ $t.__docgenInfo = {
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
|
-
const
|
|
436
|
+
const Lt = ({
|
|
437
437
|
onClick: t,
|
|
438
|
-
showText:
|
|
439
|
-
className:
|
|
440
|
-
size:
|
|
441
|
-
type:
|
|
442
|
-
}) => /* @__PURE__ */
|
|
438
|
+
showText: c = !1,
|
|
439
|
+
className: l,
|
|
440
|
+
size: s = "small",
|
|
441
|
+
type: u = "default"
|
|
442
|
+
}) => /* @__PURE__ */ $(
|
|
443
443
|
$e,
|
|
444
444
|
{
|
|
445
|
-
size:
|
|
446
|
-
type:
|
|
447
|
-
icon: /* @__PURE__ */
|
|
448
|
-
className: `cursor-pointer ${
|
|
445
|
+
size: s,
|
|
446
|
+
type: u,
|
|
447
|
+
icon: /* @__PURE__ */ $(vt, {}),
|
|
448
|
+
className: `cursor-pointer ${l || ""}`,
|
|
449
449
|
onClick: t,
|
|
450
|
-
children:
|
|
450
|
+
children: c && "返回"
|
|
451
451
|
}
|
|
452
452
|
);
|
|
453
|
-
|
|
453
|
+
Lt.__docgenInfo = {
|
|
454
454
|
displayName: "BackButton",
|
|
455
455
|
description: "返回按钮组件",
|
|
456
456
|
props: {
|
|
@@ -489,23 +489,23 @@ Ct.__docgenInfo = {
|
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
|
-
const
|
|
492
|
+
const Dt = ({
|
|
493
493
|
removePadding: t = !0,
|
|
494
|
-
className:
|
|
495
|
-
...
|
|
494
|
+
className: c,
|
|
495
|
+
...l
|
|
496
496
|
}) => {
|
|
497
|
-
const
|
|
498
|
-
return /* @__PURE__ */
|
|
497
|
+
const s = t ? `px-0 h-auto ${c || ""}` : c;
|
|
498
|
+
return /* @__PURE__ */ $(
|
|
499
499
|
$e,
|
|
500
500
|
{
|
|
501
501
|
type: "link",
|
|
502
|
-
...
|
|
503
|
-
className:
|
|
504
|
-
children:
|
|
502
|
+
...l,
|
|
503
|
+
className: s,
|
|
504
|
+
children: l.children
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
};
|
|
508
|
-
|
|
508
|
+
Dt.__docgenInfo = {
|
|
509
509
|
displayName: "LinkButton",
|
|
510
510
|
description: "链接样式按钮组件,适用于表格操作列",
|
|
511
511
|
props: {
|
|
@@ -542,121 +542,121 @@ Tt.__docgenInfo = {
|
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
|
-
const { Option:
|
|
545
|
+
const { Option: Mt } = Fe, It = ({
|
|
546
546
|
columns: t,
|
|
547
|
-
request:
|
|
548
|
-
searchFields:
|
|
549
|
-
showSearch:
|
|
550
|
-
showRefresh:
|
|
551
|
-
defaultPageSize:
|
|
552
|
-
pageSizeOptions:
|
|
553
|
-
autoLoad:
|
|
554
|
-
externalParams:
|
|
547
|
+
request: c,
|
|
548
|
+
searchFields: l = [],
|
|
549
|
+
showSearch: s = !0,
|
|
550
|
+
showRefresh: u = !0,
|
|
551
|
+
defaultPageSize: C = 10,
|
|
552
|
+
pageSizeOptions: T = ["10", "20", "50", "100"],
|
|
553
|
+
autoLoad: w = !0,
|
|
554
|
+
externalParams: k = {},
|
|
555
555
|
...e
|
|
556
556
|
}) => {
|
|
557
|
-
const [q, y] = ne([]), [
|
|
557
|
+
const [q, y] = ne([]), [i, r] = ne(!1), [n, o] = ne({
|
|
558
558
|
current: 1,
|
|
559
|
-
pageSize:
|
|
559
|
+
pageSize: C,
|
|
560
560
|
total: 0
|
|
561
|
-
}), [a,
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
const
|
|
566
|
-
const { sortable:
|
|
561
|
+
}), [a, f] = ne({}), [m, v] = ne({}), [x] = De.useForm(), V = Q(n);
|
|
562
|
+
V.current = n;
|
|
563
|
+
const E = Q(k);
|
|
564
|
+
E.current = k;
|
|
565
|
+
const B = Q(!1), G = Ze(() => t.map((d) => {
|
|
566
|
+
const { sortable: p, render: b, ...L } = d;
|
|
567
567
|
return {
|
|
568
568
|
...L,
|
|
569
|
-
sorter:
|
|
570
|
-
render:
|
|
569
|
+
sorter: p ? !0 : void 0,
|
|
570
|
+
render: b || ((N) => N)
|
|
571
571
|
};
|
|
572
|
-
}), [t]), F = ae(async (
|
|
573
|
-
if (
|
|
572
|
+
}), [t]), F = ae(async (d = {}) => {
|
|
573
|
+
if (c) {
|
|
574
574
|
r(!0);
|
|
575
575
|
try {
|
|
576
|
-
const
|
|
577
|
-
page:
|
|
578
|
-
pageSize:
|
|
579
|
-
sortField:
|
|
580
|
-
sortOrder:
|
|
581
|
-
searchParams: { ...a, ...
|
|
582
|
-
...
|
|
583
|
-
},
|
|
584
|
-
|
|
576
|
+
const p = {
|
|
577
|
+
page: V.current.current,
|
|
578
|
+
pageSize: V.current.pageSize,
|
|
579
|
+
sortField: m.field,
|
|
580
|
+
sortOrder: m.order,
|
|
581
|
+
searchParams: { ...a, ...E.current },
|
|
582
|
+
...d
|
|
583
|
+
}, b = await c(p);
|
|
584
|
+
b.success && (y(b.data), o((L) => ({
|
|
585
585
|
...L,
|
|
586
|
-
total:
|
|
587
|
-
current:
|
|
586
|
+
total: b.total,
|
|
587
|
+
current: p.page || L.current
|
|
588
588
|
})));
|
|
589
|
-
} catch (
|
|
590
|
-
console.error("加载数据失败:",
|
|
589
|
+
} catch (p) {
|
|
590
|
+
console.error("加载数据失败:", p);
|
|
591
591
|
} finally {
|
|
592
592
|
r(!1);
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
}, [
|
|
596
|
-
|
|
597
|
-
}, []),
|
|
598
|
-
|
|
599
|
-
}, [
|
|
595
|
+
}, [c, m, a]), W = ae((d) => {
|
|
596
|
+
f(d), o((p) => ({ ...p, current: 1 }));
|
|
597
|
+
}, []), H = ae(() => {
|
|
598
|
+
x.resetFields(), f({}), o((d) => ({ ...d, current: 1 }));
|
|
599
|
+
}, [x]), ee = ae(() => {
|
|
600
600
|
F();
|
|
601
|
-
}, [F]), re = ae((
|
|
601
|
+
}, [F]), re = ae((d, p, b) => {
|
|
602
602
|
const L = {
|
|
603
|
-
current:
|
|
604
|
-
pageSize:
|
|
605
|
-
total:
|
|
606
|
-
},
|
|
607
|
-
field:
|
|
608
|
-
order:
|
|
603
|
+
current: d.current || 1,
|
|
604
|
+
pageSize: d.pageSize || C,
|
|
605
|
+
total: d.total || 0
|
|
606
|
+
}, N = {
|
|
607
|
+
field: b?.field,
|
|
608
|
+
order: b?.order
|
|
609
609
|
};
|
|
610
|
-
o(L),
|
|
611
|
-
}, [
|
|
610
|
+
o(L), v(N);
|
|
611
|
+
}, [C]);
|
|
612
612
|
return de(() => {
|
|
613
|
-
const
|
|
614
|
-
(
|
|
615
|
-
}, [
|
|
616
|
-
|
|
617
|
-
|
|
613
|
+
const d = Object.keys(k).length > 0;
|
|
614
|
+
(w && !B.current || d) && (F(), B.current = !0);
|
|
615
|
+
}, [w, k, F]), /* @__PURE__ */ Z("div", { children: [
|
|
616
|
+
s && l.length > 0 && /* @__PURE__ */ $(Re, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ Z(
|
|
617
|
+
De,
|
|
618
618
|
{
|
|
619
|
-
form:
|
|
619
|
+
form: x,
|
|
620
620
|
layout: "inline",
|
|
621
|
-
onFinish:
|
|
622
|
-
initialValues:
|
|
621
|
+
onFinish: W,
|
|
622
|
+
initialValues: l.reduce((d, p) => (p.defaultValue !== void 0 && (d[p.key] = p.defaultValue), d), {}),
|
|
623
623
|
children: [
|
|
624
|
-
|
|
625
|
-
|
|
624
|
+
l.map((d) => /* @__PURE__ */ $(De.Item, { name: d.key, label: d.label, children: d.type === "input" ? /* @__PURE__ */ $(
|
|
625
|
+
et,
|
|
626
626
|
{
|
|
627
|
-
placeholder:
|
|
627
|
+
placeholder: d.placeholder || `请输入${d.label}`,
|
|
628
628
|
style: { width: 200 }
|
|
629
629
|
}
|
|
630
|
-
) : /* @__PURE__ */
|
|
631
|
-
|
|
630
|
+
) : /* @__PURE__ */ $(
|
|
631
|
+
Fe,
|
|
632
632
|
{
|
|
633
|
-
placeholder:
|
|
633
|
+
placeholder: d.placeholder || `请选择${d.label}`,
|
|
634
634
|
style: { width: 200 },
|
|
635
635
|
allowClear: !0,
|
|
636
|
-
children:
|
|
636
|
+
children: d.options?.map((p) => /* @__PURE__ */ $(Mt, { value: p.value, children: p.label }, p.value))
|
|
637
637
|
}
|
|
638
|
-
) },
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
|
|
638
|
+
) }, d.key)),
|
|
639
|
+
/* @__PURE__ */ $(De.Item, { children: /* @__PURE__ */ Z(ut, { children: [
|
|
640
|
+
/* @__PURE__ */ $($e, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ $(bt, {}), children: "查询" }),
|
|
641
|
+
/* @__PURE__ */ $($e, { onClick: H, children: "重置" }),
|
|
642
|
+
u && /* @__PURE__ */ $($e, { icon: /* @__PURE__ */ $(xt, {}), onClick: ee, children: "刷新" })
|
|
643
643
|
] }) })
|
|
644
644
|
]
|
|
645
645
|
}
|
|
646
646
|
) }),
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
|
|
647
|
+
/* @__PURE__ */ $(
|
|
648
|
+
Ge,
|
|
649
649
|
{
|
|
650
650
|
...e,
|
|
651
|
-
columns:
|
|
651
|
+
columns: G,
|
|
652
652
|
dataSource: q,
|
|
653
|
-
loading:
|
|
653
|
+
loading: i,
|
|
654
654
|
pagination: {
|
|
655
655
|
...n,
|
|
656
656
|
showSizeChanger: !0,
|
|
657
657
|
showQuickJumper: !0,
|
|
658
|
-
showTotal: (
|
|
659
|
-
pageSizeOptions:
|
|
658
|
+
showTotal: (d, p) => `第 ${p[0]}-${p[1]} 条/共 ${d} 条`,
|
|
659
|
+
pageSizeOptions: T
|
|
660
660
|
},
|
|
661
661
|
onChange: re,
|
|
662
662
|
scroll: { x: "max-content", y: "50vh" }
|
|
@@ -664,7 +664,7 @@ const { Option: qt } = Ge, St = ({
|
|
|
664
664
|
)
|
|
665
665
|
] });
|
|
666
666
|
};
|
|
667
|
-
|
|
667
|
+
It.__docgenInfo = {
|
|
668
668
|
displayName: "AdvancedTable",
|
|
669
669
|
description: "高阶表格组件,支持异步请求、搜索、排序等功能",
|
|
670
670
|
props: {
|
|
@@ -731,162 +731,155 @@ St.__docgenInfo = {
|
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
733
|
};
|
|
734
|
-
function
|
|
734
|
+
function Oe(t, c, l) {
|
|
735
735
|
if (!t.current) return;
|
|
736
|
-
const
|
|
737
|
-
for (const y of
|
|
738
|
-
y.exclusionGroup && y.exclusionGroup !== "separator" && (
|
|
736
|
+
const s = /* @__PURE__ */ new Set(), u = {};
|
|
737
|
+
for (const y of c)
|
|
738
|
+
y.exclusionGroup && y.exclusionGroup !== "separator" && (s.add(y.exclusionGroup), u[y.exclusionGroup] || (u[y.exclusionGroup] = []), u[y.exclusionGroup].push({
|
|
739
739
|
type: y.type,
|
|
740
740
|
key: y.key,
|
|
741
741
|
exclusionGroup: y.exclusionGroup
|
|
742
742
|
}));
|
|
743
|
-
const
|
|
744
|
-
for (const y of
|
|
745
|
-
|
|
746
|
-
for (const
|
|
747
|
-
if (
|
|
748
|
-
if (
|
|
749
|
-
|
|
743
|
+
const C = {};
|
|
744
|
+
for (const y of s) {
|
|
745
|
+
C[y] = !1;
|
|
746
|
+
for (const i of u[y])
|
|
747
|
+
if (i.type === "upload" && i.key) {
|
|
748
|
+
if (l[i.key] !== null && l[i.key] !== void 0) {
|
|
749
|
+
C[y] = !0;
|
|
750
750
|
break;
|
|
751
751
|
}
|
|
752
|
-
} else if (
|
|
752
|
+
} else if (i.type === "variable" && i.key) {
|
|
753
753
|
const r = t.current.querySelector(
|
|
754
|
-
`[data-type="variable"][data-key="${
|
|
754
|
+
`[data-type="variable"][data-key="${i.key}"]`
|
|
755
755
|
);
|
|
756
756
|
if (r && r.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
757
|
-
|
|
757
|
+
C[y] = !0;
|
|
758
758
|
break;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
|
-
const
|
|
763
|
-
(y) =>
|
|
762
|
+
const T = c.some((y) => y.exclusionGroup === "separator"), k = Object.keys(C).filter(
|
|
763
|
+
(y) => C[y]
|
|
764
764
|
).length > 0;
|
|
765
765
|
let e = null;
|
|
766
|
-
if (
|
|
767
|
-
for (const y of
|
|
768
|
-
if (y.exclusionGroup && y.exclusionGroup !== "separator" &&
|
|
766
|
+
if (k && T) {
|
|
767
|
+
for (const y of c)
|
|
768
|
+
if (y.exclusionGroup && y.exclusionGroup !== "separator" && C[y.exclusionGroup]) {
|
|
769
769
|
e = y.exclusionGroup;
|
|
770
770
|
break;
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
|
-
for (const y of
|
|
774
|
-
const
|
|
773
|
+
for (const y of s) {
|
|
774
|
+
const i = t.current.querySelectorAll(
|
|
775
775
|
`[data-group="${y}"]`
|
|
776
776
|
);
|
|
777
|
-
|
|
777
|
+
T && k && e ? y === e ? i.forEach((r) => {
|
|
778
778
|
r.classList.contains("required-upload-group") ? r.style.setProperty("display", "inline-flex", "important") : (r.classList.contains("exclusion-wrapper"), r.style.setProperty("display", "inline-block", "important"));
|
|
779
|
-
}) :
|
|
779
|
+
}) : i.forEach((r) => {
|
|
780
780
|
r.style.display = "none", r.style.setProperty("display", "none", "important");
|
|
781
|
-
}) :
|
|
781
|
+
}) : i.forEach((r) => {
|
|
782
782
|
r.classList.contains("required-upload-group") ? r.style.setProperty("display", "inline-flex", "important") : (r.classList.contains("exclusion-wrapper"), r.style.setProperty("display", "inline-block", "important"));
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
785
|
t.current.querySelectorAll(
|
|
786
786
|
'[data-group="separator"]'
|
|
787
787
|
).forEach((y) => {
|
|
788
|
-
y.style.display =
|
|
788
|
+
y.style.display = k ? "none" : "inline";
|
|
789
789
|
});
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function He(t, c, l, s) {
|
|
792
792
|
if (!t.current) {
|
|
793
|
-
|
|
793
|
+
s(!1);
|
|
794
794
|
return;
|
|
795
795
|
}
|
|
796
|
-
const
|
|
797
|
-
for (let
|
|
798
|
-
const r =
|
|
796
|
+
const u = [];
|
|
797
|
+
for (let i = 0; i < c.length; i++) {
|
|
798
|
+
const r = c[i];
|
|
799
799
|
if ((r.type === "variable" || r.type === "upload" || r.type === "multi-variable" || r.type === "select" || r.type === "textarea" || r.type === "richtext" || r.type === "datepicker") && r.required && r.key) {
|
|
800
|
-
|
|
800
|
+
u.push({
|
|
801
801
|
exclusionGroup: r.exclusionGroup || "",
|
|
802
802
|
key: r.key,
|
|
803
803
|
type: r.type === "multi-variable" ? "variable" : r.type,
|
|
804
804
|
isMultiVariable: r.type === "multi-variable",
|
|
805
|
-
minCount: r.type === "multi-variable" ? r.minCount : void 0
|
|
805
|
+
minCount: r.type === "multi-variable" ? r.minCount : void 0,
|
|
806
|
+
__index: i
|
|
806
807
|
});
|
|
807
808
|
continue;
|
|
808
809
|
}
|
|
809
810
|
if (r.type === "text" && r.className?.includes("rte-text-required"))
|
|
810
811
|
if (r.exclusionGroup)
|
|
811
|
-
for (let n =
|
|
812
|
-
const o =
|
|
812
|
+
for (let n = i + 1; n < c.length; n++) {
|
|
813
|
+
const o = c[n];
|
|
813
814
|
if (o.exclusionGroup === r.exclusionGroup && (o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
|
|
814
|
-
|
|
815
|
+
u.push({
|
|
815
816
|
exclusionGroup: r.exclusionGroup,
|
|
816
817
|
key: o.key,
|
|
817
|
-
type: o.type
|
|
818
|
+
type: o.type,
|
|
819
|
+
__index: n
|
|
818
820
|
});
|
|
819
821
|
break;
|
|
820
822
|
}
|
|
821
823
|
}
|
|
822
824
|
else
|
|
823
|
-
for (let n =
|
|
824
|
-
const o =
|
|
825
|
+
for (let n = i + 1; n < c.length; n++) {
|
|
826
|
+
const o = c[n];
|
|
825
827
|
if ((o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
|
|
826
|
-
|
|
828
|
+
u.push({
|
|
827
829
|
exclusionGroup: o.exclusionGroup || "",
|
|
828
830
|
key: o.key,
|
|
829
|
-
type: o.type
|
|
831
|
+
type: o.type,
|
|
832
|
+
__index: n
|
|
830
833
|
});
|
|
831
834
|
break;
|
|
832
835
|
}
|
|
833
836
|
}
|
|
834
837
|
}
|
|
835
|
-
const
|
|
836
|
-
if (
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
r.exclusionGroup === "separator" &&
|
|
838
|
+
const C = c.some((i) => i.exclusionGroup === "separator"), T = [];
|
|
839
|
+
if (C && u.length > 1) {
|
|
840
|
+
const i = [];
|
|
841
|
+
c.forEach((r, n) => {
|
|
842
|
+
r.exclusionGroup === "separator" && i.push(n);
|
|
840
843
|
});
|
|
841
|
-
for (const r of
|
|
842
|
-
const
|
|
843
|
-
|
|
844
|
-
(d) => (d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key === a.key
|
|
845
|
-
);
|
|
846
|
-
return u >= 0 && u < r;
|
|
847
|
-
}), o = f.filter((a) => {
|
|
848
|
-
const u = b.findIndex(
|
|
849
|
-
(d) => (d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key === a.key
|
|
850
|
-
);
|
|
851
|
-
return u >= 0 && u > r;
|
|
852
|
-
});
|
|
853
|
-
n.length > 0 && o.length > 0 && M.push([...n, ...o]);
|
|
844
|
+
for (const r of i) {
|
|
845
|
+
const o = u.filter((m) => typeof m.__index == "number" && m.__index < r).sort((m, v) => (v.__index ?? 0) - (m.__index ?? 0))[0], f = u.filter((m) => typeof m.__index == "number" && m.__index > r).sort((m, v) => (m.__index ?? 0) - (v.__index ?? 0))[0];
|
|
846
|
+
o && f && T.push([o, f]);
|
|
854
847
|
}
|
|
855
848
|
}
|
|
856
|
-
if (
|
|
857
|
-
if (
|
|
849
|
+
if (u.length === 0) {
|
|
850
|
+
if (c.length === 0) {
|
|
858
851
|
if (!t.current) {
|
|
859
|
-
|
|
852
|
+
s(!1);
|
|
860
853
|
return;
|
|
861
854
|
}
|
|
862
|
-
const
|
|
863
|
-
|
|
855
|
+
const i = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
856
|
+
s(i.length > 0);
|
|
864
857
|
return;
|
|
865
858
|
}
|
|
866
|
-
|
|
859
|
+
s(!0);
|
|
867
860
|
return;
|
|
868
861
|
}
|
|
869
|
-
const
|
|
862
|
+
const w = u.filter((i) => {
|
|
870
863
|
if (!t.current) return !1;
|
|
871
|
-
if (
|
|
864
|
+
if (i.exclusionGroup) {
|
|
872
865
|
const r = t.current.querySelectorAll(
|
|
873
|
-
`[data-group="${
|
|
866
|
+
`[data-group="${i.exclusionGroup}"]`
|
|
874
867
|
);
|
|
875
868
|
if (r.length > 0)
|
|
876
869
|
return r[0].style.display !== "none";
|
|
877
870
|
}
|
|
878
|
-
if (
|
|
871
|
+
if (i.type === "upload" && i.key) {
|
|
879
872
|
const r = t.current.querySelector(
|
|
880
|
-
`[data-type="upload"][data-key="${
|
|
873
|
+
`[data-type="upload"][data-key="${i.key}"]`
|
|
881
874
|
);
|
|
882
875
|
if (r) {
|
|
883
876
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
884
877
|
return n ? n.style.display !== "none" : !0;
|
|
885
878
|
}
|
|
886
|
-
} else if (
|
|
887
|
-
if (
|
|
879
|
+
} else if (i.type === "variable" && i.key)
|
|
880
|
+
if (i.isMultiVariable) {
|
|
888
881
|
const r = t.current.querySelectorAll(
|
|
889
|
-
`[data-type="variable"][data-multi-key="${
|
|
882
|
+
`[data-type="variable"][data-multi-key="${i.key}"]`
|
|
890
883
|
);
|
|
891
884
|
if (r.length > 0) {
|
|
892
885
|
const n = r[0], o = n.closest("[data-group]") || n.parentElement;
|
|
@@ -894,40 +887,40 @@ function Pe(t, b, p, l) {
|
|
|
894
887
|
}
|
|
895
888
|
} else {
|
|
896
889
|
const r = t.current.querySelector(
|
|
897
|
-
`[data-type="variable"][data-key="${
|
|
890
|
+
`[data-type="variable"][data-key="${i.key}"]`
|
|
898
891
|
);
|
|
899
892
|
if (r) {
|
|
900
893
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
901
894
|
return n ? n.style.display !== "none" : !0;
|
|
902
895
|
}
|
|
903
896
|
}
|
|
904
|
-
else if (
|
|
897
|
+
else if (i.type === "select" && i.key) {
|
|
905
898
|
const r = t.current.querySelector(
|
|
906
|
-
`[data-type="select"][data-key="${
|
|
899
|
+
`[data-type="select"][data-key="${i.key}"]`
|
|
907
900
|
);
|
|
908
901
|
if (r) {
|
|
909
902
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
910
903
|
return n ? n.style.display !== "none" : !0;
|
|
911
904
|
}
|
|
912
|
-
} else if (
|
|
905
|
+
} else if (i.type === "textarea" && i.key) {
|
|
913
906
|
const r = t.current.querySelector(
|
|
914
|
-
`[data-type="textarea"][data-key="${
|
|
907
|
+
`[data-type="textarea"][data-key="${i.key}"]`
|
|
915
908
|
);
|
|
916
909
|
if (r) {
|
|
917
910
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
918
911
|
return n ? n.style.display !== "none" : !0;
|
|
919
912
|
}
|
|
920
|
-
} else if (
|
|
913
|
+
} else if (i.type === "richtext" && i.key) {
|
|
921
914
|
const r = t.current.querySelector(
|
|
922
|
-
`[data-type="richtext"][data-key="${
|
|
915
|
+
`[data-type="richtext"][data-key="${i.key}"]`
|
|
923
916
|
);
|
|
924
917
|
if (r) {
|
|
925
918
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
926
919
|
return n ? n.style.display !== "none" : !0;
|
|
927
920
|
}
|
|
928
|
-
} else if (
|
|
921
|
+
} else if (i.type === "datepicker" && i.key) {
|
|
929
922
|
const r = t.current.querySelector(
|
|
930
|
-
`[data-type="datepicker"][data-key="${
|
|
923
|
+
`[data-type="datepicker"][data-key="${i.key}"]`
|
|
931
924
|
);
|
|
932
925
|
if (r) {
|
|
933
926
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
@@ -936,22 +929,22 @@ function Pe(t, b, p, l) {
|
|
|
936
929
|
}
|
|
937
930
|
return !1;
|
|
938
931
|
});
|
|
939
|
-
if (
|
|
940
|
-
|
|
932
|
+
if (w.length === 0) {
|
|
933
|
+
s(!0);
|
|
941
934
|
return;
|
|
942
935
|
}
|
|
943
|
-
const
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
r.key &&
|
|
936
|
+
const k = /* @__PURE__ */ new Set();
|
|
937
|
+
T.forEach((i) => {
|
|
938
|
+
i.forEach((r) => {
|
|
939
|
+
r.key && k.add(r.key);
|
|
947
940
|
});
|
|
948
941
|
});
|
|
949
|
-
const e =
|
|
950
|
-
(
|
|
942
|
+
const e = w.filter(
|
|
943
|
+
(i) => !i.key || !k.has(i.key)
|
|
951
944
|
);
|
|
952
|
-
let q = (
|
|
953
|
-
for (const
|
|
954
|
-
const r =
|
|
945
|
+
let q = (T.length === 0, !0);
|
|
946
|
+
for (const i of T) {
|
|
947
|
+
const r = i.filter((o) => {
|
|
955
948
|
if (!t.current) return !1;
|
|
956
949
|
if (o.exclusionGroup) {
|
|
957
950
|
const a = t.current.querySelectorAll(
|
|
@@ -967,7 +960,7 @@ function Pe(t, b, p, l) {
|
|
|
967
960
|
let n = !1;
|
|
968
961
|
for (const o of r)
|
|
969
962
|
if (o.type === "upload" && o.key) {
|
|
970
|
-
if (
|
|
963
|
+
if (l[o.key] !== null && l[o.key] !== void 0) {
|
|
971
964
|
n = !0;
|
|
972
965
|
break;
|
|
973
966
|
}
|
|
@@ -976,11 +969,14 @@ function Pe(t, b, p, l) {
|
|
|
976
969
|
const a = t.current.querySelectorAll(
|
|
977
970
|
`[data-type="variable"][data-multi-key="${o.key}"]`
|
|
978
971
|
);
|
|
979
|
-
let
|
|
980
|
-
for (const
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
972
|
+
let f = 0;
|
|
973
|
+
for (const v of Array.from(a)) {
|
|
974
|
+
if (v.classList.contains("show-placeholder"))
|
|
975
|
+
continue;
|
|
976
|
+
v.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (f += 1);
|
|
977
|
+
}
|
|
978
|
+
const m = o.minCount && o.minCount > 0 ? o.minCount : 1;
|
|
979
|
+
if (f >= m) {
|
|
984
980
|
n = !0;
|
|
985
981
|
break;
|
|
986
982
|
}
|
|
@@ -988,9 +984,13 @@ function Pe(t, b, p, l) {
|
|
|
988
984
|
const a = t.current.querySelector(
|
|
989
985
|
`[data-type="variable"][data-key="${o.key}"]`
|
|
990
986
|
);
|
|
991
|
-
if (a
|
|
992
|
-
|
|
993
|
-
|
|
987
|
+
if (a) {
|
|
988
|
+
if (a.classList.contains("show-placeholder"))
|
|
989
|
+
continue;
|
|
990
|
+
if (a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
991
|
+
n = !0;
|
|
992
|
+
break;
|
|
993
|
+
}
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
else if (o.type === "select" && o.key) {
|
|
@@ -1032,161 +1032,168 @@ function Pe(t, b, p, l) {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
let y = !0;
|
|
1035
|
-
for (const
|
|
1036
|
-
if (
|
|
1037
|
-
if (
|
|
1035
|
+
for (const i of e)
|
|
1036
|
+
if (i.type === "upload" && i.key) {
|
|
1037
|
+
if (l[i.key] === null || l[i.key] === void 0) {
|
|
1038
1038
|
y = !1;
|
|
1039
1039
|
break;
|
|
1040
1040
|
}
|
|
1041
|
-
} else if (
|
|
1042
|
-
if (
|
|
1041
|
+
} else if (i.type === "variable" && i.key)
|
|
1042
|
+
if (i.isMultiVariable) {
|
|
1043
1043
|
const r = t.current.querySelectorAll(
|
|
1044
|
-
`[data-type="variable"][data-multi-key="${
|
|
1044
|
+
`[data-type="variable"][data-multi-key="${i.key}"]`
|
|
1045
1045
|
);
|
|
1046
1046
|
let n = 0;
|
|
1047
|
-
for (const a of Array.from(r))
|
|
1047
|
+
for (const a of Array.from(r)) {
|
|
1048
|
+
if (a.classList.contains("show-placeholder"))
|
|
1049
|
+
continue;
|
|
1048
1050
|
a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (n += 1);
|
|
1049
|
-
|
|
1051
|
+
}
|
|
1052
|
+
const o = i.minCount && i.minCount > 0 ? i.minCount : 1;
|
|
1050
1053
|
if (n < o) {
|
|
1051
1054
|
y = !1;
|
|
1052
1055
|
break;
|
|
1053
1056
|
}
|
|
1054
1057
|
} else {
|
|
1055
1058
|
const r = t.current.querySelector(
|
|
1056
|
-
`[data-type="variable"][data-key="${
|
|
1059
|
+
`[data-type="variable"][data-key="${i.key}"]`
|
|
1057
1060
|
);
|
|
1058
1061
|
if (!r) {
|
|
1059
1062
|
y = !1;
|
|
1060
1063
|
break;
|
|
1061
1064
|
}
|
|
1065
|
+
if (r.classList.contains("show-placeholder")) {
|
|
1066
|
+
y = !1;
|
|
1067
|
+
break;
|
|
1068
|
+
}
|
|
1062
1069
|
if (r.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
|
|
1063
1070
|
y = !1;
|
|
1064
1071
|
break;
|
|
1065
1072
|
}
|
|
1066
1073
|
}
|
|
1067
|
-
else if (
|
|
1074
|
+
else if (i.type === "select" && i.key) {
|
|
1068
1075
|
const r = t.current.querySelector(
|
|
1069
|
-
`[data-type="select"][data-key="${
|
|
1076
|
+
`[data-type="select"][data-key="${i.key}"]`
|
|
1070
1077
|
);
|
|
1071
1078
|
if (!r || (r.value || "").trim().length === 0) {
|
|
1072
1079
|
y = !1;
|
|
1073
1080
|
break;
|
|
1074
1081
|
}
|
|
1075
|
-
} else if (
|
|
1082
|
+
} else if (i.type === "textarea" && i.key) {
|
|
1076
1083
|
const r = t.current.querySelector(
|
|
1077
|
-
`[data-type="textarea"][data-key="${
|
|
1084
|
+
`[data-type="textarea"][data-key="${i.key}"]`
|
|
1078
1085
|
);
|
|
1079
1086
|
if (!r || (r.value || "").trim().length === 0) {
|
|
1080
1087
|
y = !1;
|
|
1081
1088
|
break;
|
|
1082
1089
|
}
|
|
1083
|
-
} else if (
|
|
1090
|
+
} else if (i.type === "richtext" && i.key) {
|
|
1084
1091
|
const r = t.current.querySelector(
|
|
1085
|
-
`[data-type="richtext"][data-key="${
|
|
1092
|
+
`[data-type="richtext"][data-key="${i.key}"]`
|
|
1086
1093
|
);
|
|
1087
1094
|
if (!r || (r.textContent || "").replace(/[\u200B]/g, "").trim().length === 0) {
|
|
1088
1095
|
y = !1;
|
|
1089
1096
|
break;
|
|
1090
1097
|
}
|
|
1091
|
-
} else if (
|
|
1098
|
+
} else if (i.type === "datepicker" && i.key) {
|
|
1092
1099
|
const r = t.current.querySelector(
|
|
1093
|
-
`[data-type="datepicker"][data-key="${
|
|
1100
|
+
`[data-type="datepicker"][data-key="${i.key}"]`
|
|
1094
1101
|
);
|
|
1095
1102
|
if (!r || (r.getAttribute("data-value") || "").trim().length === 0) {
|
|
1096
1103
|
y = !1;
|
|
1097
1104
|
break;
|
|
1098
1105
|
}
|
|
1099
1106
|
}
|
|
1100
|
-
|
|
1107
|
+
s(q && y);
|
|
1101
1108
|
}
|
|
1102
|
-
function
|
|
1109
|
+
function Be(t, c) {
|
|
1103
1110
|
if (!t.current) return;
|
|
1104
|
-
t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1111
|
+
t.current.querySelectorAll('[data-type="variable"]').forEach((s) => {
|
|
1112
|
+
const u = s.innerText.replace(/\n/g, "");
|
|
1113
|
+
u.replace(/\u200B/g, "") ? s.classList.remove("show-placeholder") : (u !== "" && (s.innerText = ""), s.classList.add("show-placeholder"));
|
|
1107
1114
|
});
|
|
1108
1115
|
}
|
|
1109
|
-
function
|
|
1116
|
+
function Vt(t, c, l, s, u, C = {}, T) {
|
|
1110
1117
|
if (!t.current) return;
|
|
1111
|
-
let
|
|
1112
|
-
for (;
|
|
1113
|
-
const e =
|
|
1118
|
+
let w = "", k = 0;
|
|
1119
|
+
for (; k < c.length; ) {
|
|
1120
|
+
const e = c[k], q = k + 1 < c.length ? c[k + 1] : null;
|
|
1114
1121
|
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && q) {
|
|
1115
|
-
const a = q.type === "upload" && q.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === q.exclusionGroup,
|
|
1122
|
+
const a = q.type === "upload" && q.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === q.exclusionGroup, f = q.type === "variable" && q.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === q.exclusionGroup;
|
|
1116
1123
|
if (a) {
|
|
1117
|
-
const
|
|
1118
|
-
let
|
|
1119
|
-
e.className ?
|
|
1120
|
-
const
|
|
1121
|
-
let
|
|
1122
|
-
|
|
1123
|
-
const
|
|
1124
|
-
|
|
1124
|
+
const v = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
|
|
1125
|
+
let V = "";
|
|
1126
|
+
e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
|
|
1127
|
+
const E = q, B = l[E.key] !== null && l[E.key] !== void 0, G = B ? l[E.key] : null, F = B ? l[E.key]?.name : E.text, W = B ? "" : "hidden", H = E.tooltip && !B ? "" : "hidden", ee = B ? "has-file" : "", re = B && F ? ` data-file-name="${F.replace(/"/g, """)}"` : "";
|
|
1128
|
+
let d = "";
|
|
1129
|
+
B && G && (G.type?.startsWith("image/") ? d = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(G)}" alt="preview" />` : d = "<i class='iconfont icon-exlwenjian'></i>");
|
|
1130
|
+
const p = `<span contenteditable="false" data-type="upload" data-key="${E.key}" class="upload-chip"><span class="upload-inner-wrapper ${ee}"><span class="upload-icon">${d}</span><span class="upload-label"${re}>${F || E.text}</span>${E.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${H}" data-upload-key="${E.key}" data-tooltip="${E.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${W}" title="移除文件">×</span></span></span>`;
|
|
1131
|
+
w += v + V + p + x, k += 2;
|
|
1125
1132
|
continue;
|
|
1126
1133
|
}
|
|
1127
|
-
if (
|
|
1128
|
-
const
|
|
1129
|
-
let
|
|
1130
|
-
e.className ?
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1134
|
+
if (f) {
|
|
1135
|
+
const v = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
|
|
1136
|
+
let V = "";
|
|
1137
|
+
e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
|
|
1138
|
+
const E = q, G = (E.key ? u[E.key] : void 0) || E.text || "", F = !G, W = F ? "" : G, H = F ? "show-placeholder" : "", ee = E.exclusionGroup ? ` data-group="${E.exclusionGroup}"` : "", re = E.tooltip ? ` data-tooltip="${E.tooltip.replace(/"/g, """)}" data-variable-key="${E.key || ""}"` : "", d = E.tooltip && F ? "" : "hidden", p = `<span contenteditable="true" data-type="variable" data-key="${E.key}" data-placeholder="${E.placeholder || ""}"${ee}${re} class="variable-chip ${H}">${W}${E.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${d}" data-variable-key="${E.key}" data-tooltip="${E.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1139
|
+
w += v + V + p + x, k += 2;
|
|
1133
1140
|
continue;
|
|
1134
1141
|
}
|
|
1135
1142
|
}
|
|
1136
|
-
const
|
|
1143
|
+
const i = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", r = e.exclusionGroup ? `<span ${i} class="exclusion-wrapper">` : "", n = e.exclusionGroup ? "</span>" : "";
|
|
1137
1144
|
let o = "";
|
|
1138
1145
|
if (e.type === "tag") {
|
|
1139
|
-
const
|
|
1140
|
-
o = `<span contenteditable="false" class="tag-node group"${
|
|
1146
|
+
const f = s || T === "hideTagClose" ? "" : '<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>', m = s ? ' data-locked="true"' : "", v = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-tag-key="${e.key || ""}"` : "";
|
|
1147
|
+
o = `<span contenteditable="false" class="tag-node group"${m}${v}><span class="tag-label">${e.text}</span>${f}</span>`;
|
|
1141
1148
|
} else if (e.type === "text") {
|
|
1142
|
-
const a =
|
|
1143
|
-
e.className ? o = `<span class="${e.className}"${a}>${
|
|
1149
|
+
const a = s ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', m = (e.text ?? "").replace(/\n/g, "<br/>");
|
|
1150
|
+
e.className ? o = `<span class="${e.className}"${a}>${m}</span>` : o = s ? `<span${a}>${m}</span>` : `<span contenteditable="false">${m}</span>`;
|
|
1144
1151
|
} else if (e.type === "variable" && e.key) {
|
|
1145
|
-
const
|
|
1146
|
-
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1152
|
+
const f = u[e.key] || e.text || "", m = !f, v = m ? "" : f, x = m ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", E = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", B = e.tooltip && m ? "" : "hidden", G = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${V}${E} class="variable-chip ${x}">${v}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${B}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1153
|
+
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${G}</span>` : o = G;
|
|
1147
1154
|
} else if (e.type === "upload" && e.key) {
|
|
1148
|
-
const a =
|
|
1149
|
-
let
|
|
1150
|
-
a &&
|
|
1151
|
-
const
|
|
1152
|
-
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1155
|
+
const a = l[e.key] !== null && l[e.key] !== void 0, f = a ? l[e.key] : null, m = a ? l[e.key]?.name : e.text, v = a ? "" : "hidden", x = e.tooltip && !a ? "" : "hidden", V = a ? "has-file" : "", E = a && m ? ` data-file-name="${m.replace(/"/g, """)}"` : "";
|
|
1156
|
+
let B = "";
|
|
1157
|
+
a && f && (f.type?.startsWith("image/") ? B = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(f)}" alt="preview" />` : B = "<i class='iconfont icon-exlwenjian'></i>");
|
|
1158
|
+
const G = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${V}"><span class="upload-icon">${B}</span><span class="upload-label"${E}>${m || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${x}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${v}" title="移除文件">×</span></span></span>`;
|
|
1159
|
+
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${G}</span>` : o = G;
|
|
1153
1160
|
} else if (e.type === "select" && e.key) {
|
|
1154
|
-
const a =
|
|
1155
|
-
const
|
|
1156
|
-
return `<option value="${
|
|
1157
|
-
}).join(""),
|
|
1158
|
-
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1161
|
+
const a = u[e.key] || e.defaultValue || "", f = (e.options || []).map((x) => {
|
|
1162
|
+
const V = a === x.value ? "selected" : "";
|
|
1163
|
+
return `<option value="${x.value}" ${V}>${x.label}</option>`;
|
|
1164
|
+
}).join(""), m = e.placeholder ? `<option value="" ${a ? "" : "selected"} disabled hidden>${e.placeholder}</option>` : "", v = `<select data-type="select" data-key="${e.key}" class="rte-select">${m}${f}</select>`;
|
|
1165
|
+
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${v}</span>` : o = v;
|
|
1159
1166
|
} else if (e.type === "textarea" && e.key) {
|
|
1160
|
-
const a =
|
|
1161
|
-
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1167
|
+
const a = u[e.key] || "", f = e.maxHeight || 252, m = e.expandable !== !1, v = e.placeholder ? ` placeholder="${e.placeholder}"` : "", x = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${f}" style="max-height:${f}px;"${v}>${a}</textarea>`, V = m ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", E = `<div class="rte-textarea-wrapper" data-key="${e.key}">${x}${V}</div>`;
|
|
1168
|
+
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${E}</span>` : o = E;
|
|
1162
1169
|
} else if (e.type === "richtext" && e.key) {
|
|
1163
|
-
const a =
|
|
1164
|
-
e.required ? o = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-richtext-required"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1170
|
+
const a = u[e.key] || e.text || "", f = e.minHeight || 140, m = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", v = e.expandable !== !1, x = a, V = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${m} style="min-height:${f}px;">${x}</div>`, E = v ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", B = `<div class="rte-richtext-wrapper" data-key="${e.key}">${V}${E}</div>`, G = `<div class="rte-richtext-container" data-key="${e.key}">${B}</div>`;
|
|
1171
|
+
e.required ? o = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-richtext-required"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${G}</div>` : o = G;
|
|
1165
1172
|
} else if (e.type === "datepicker" && e.key) {
|
|
1166
|
-
const a =
|
|
1167
|
-
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${
|
|
1173
|
+
const a = u[e.key] || "", f = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", m = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", v = e.disableFuture ? ' data-disable-future="true"' : "", x = `<div data-type="datepicker" data-key="${e.key}" data-value="${a}" class="rte-datepicker-host"${f}${m}${v}></div>`;
|
|
1174
|
+
e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${x}</span>` : o = x;
|
|
1168
1175
|
} else if (e.type === "multi-variable" && e.key) {
|
|
1169
|
-
const a = e.maxCount || 9,
|
|
1176
|
+
const a = e.maxCount || 9, f = C[e.key] || 1, m = Math.min(f, a);
|
|
1170
1177
|
if (e.required) {
|
|
1171
|
-
const
|
|
1172
|
-
let
|
|
1173
|
-
for (let
|
|
1174
|
-
const
|
|
1175
|
-
|
|
1178
|
+
const v = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, x = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
|
|
1179
|
+
let V = "";
|
|
1180
|
+
for (let E = 0; E < m; E++) {
|
|
1181
|
+
const B = `${e.key}_${E}`, G = u[B] || "", F = !G, W = F ? "" : G, H = F ? "show-placeholder" : "", ee = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", re = e.tooltip && F ? "" : "hidden", d = `<span contenteditable="true" data-type="variable" data-key="${B}" data-multi-key="${e.key}" data-index="${E}" data-placeholder="${e.placeholder || ""}"${ee} class="variable-chip ${H}">${W}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${re}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1182
|
+
E === 0 ? V += `<span ${x} class="exclusion-wrapper required-upload-group required-multi-first">${v}${d}</span>` : V += d;
|
|
1176
1183
|
}
|
|
1177
|
-
o =
|
|
1184
|
+
o = V;
|
|
1178
1185
|
} else {
|
|
1179
|
-
let
|
|
1180
|
-
for (let
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1186
|
+
let v = "";
|
|
1187
|
+
for (let x = 0; x < m; x++) {
|
|
1188
|
+
const V = `${e.key}_${x}`, E = u[V] || "", B = !E, G = B ? "" : E, F = B ? "show-placeholder" : "", W = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", H = e.tooltip && B ? "" : "hidden", ee = `<span contenteditable="true" data-type="variable" data-key="${V}" data-multi-key="${e.key}" data-index="${x}" data-placeholder="${e.placeholder || ""}"${W} class="variable-chip ${F}">${G}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${H}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1189
|
+
v += ee;
|
|
1183
1190
|
}
|
|
1184
|
-
o =
|
|
1191
|
+
o = v;
|
|
1185
1192
|
}
|
|
1186
1193
|
}
|
|
1187
|
-
|
|
1194
|
+
w += r + o + n, k++;
|
|
1188
1195
|
}
|
|
1189
|
-
t.current && (t.current.innerHTML =
|
|
1196
|
+
t.current && (t.current.innerHTML = w, setTimeout(() => {
|
|
1190
1197
|
if (!t.current) return;
|
|
1191
1198
|
t.current.querySelectorAll('[data-type="variable"]').forEach((q) => {
|
|
1192
1199
|
const y = q.innerText.replace(/\n/g, "");
|
|
@@ -1194,10 +1201,10 @@ function Nt(t, b, p, l, f, T = {}, M) {
|
|
|
1194
1201
|
});
|
|
1195
1202
|
}, 0));
|
|
1196
1203
|
}
|
|
1197
|
-
function
|
|
1198
|
-
const
|
|
1204
|
+
function Pt(t, c, l, s, u = {}, C, T, w) {
|
|
1205
|
+
const k = ae(() => {
|
|
1199
1206
|
if (!t.current) return;
|
|
1200
|
-
if (
|
|
1207
|
+
if (c.length === 0) {
|
|
1201
1208
|
t.current.innerHTML = "";
|
|
1202
1209
|
return;
|
|
1203
1210
|
}
|
|
@@ -1205,45 +1212,45 @@ function At(t, b, p, l, f = {}, T, M, $) {
|
|
|
1205
1212
|
const y = t.current.__tempVariableValues;
|
|
1206
1213
|
if (y ? (e = y, setTimeout(() => {
|
|
1207
1214
|
if (t.current) {
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1210
|
-
}
|
|
1211
|
-
}, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1212
|
-
const
|
|
1213
|
-
if (
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
}
|
|
1217
|
-
}), t.current.querySelectorAll('[data-type="select"]').forEach((
|
|
1218
|
-
const
|
|
1219
|
-
if (
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1222
|
-
}
|
|
1223
|
-
}), t.current.querySelectorAll('[data-type="textarea"]').forEach((
|
|
1224
|
-
const
|
|
1225
|
-
if (
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1228
|
-
}
|
|
1229
|
-
}), t.current.querySelectorAll('[data-type="richtext"]').forEach((
|
|
1230
|
-
const
|
|
1231
|
-
if (
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1234
|
-
}
|
|
1235
|
-
}), t.current.querySelectorAll('[data-type="datepicker"]').forEach((
|
|
1236
|
-
const
|
|
1237
|
-
if (
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1240
|
-
}
|
|
1241
|
-
})),
|
|
1242
|
-
const { key:
|
|
1215
|
+
const i = t.current;
|
|
1216
|
+
i.__tempVariableValues === y && delete i.__tempVariableValues;
|
|
1217
|
+
}
|
|
1218
|
+
}, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((f) => {
|
|
1219
|
+
const m = f.dataset.key;
|
|
1220
|
+
if (m) {
|
|
1221
|
+
const v = f.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1222
|
+
v && (e[m] = v);
|
|
1223
|
+
}
|
|
1224
|
+
}), t.current.querySelectorAll('[data-type="select"]').forEach((f) => {
|
|
1225
|
+
const m = f.dataset.key;
|
|
1226
|
+
if (m) {
|
|
1227
|
+
const v = f.value.trim();
|
|
1228
|
+
v && (e[m] = v);
|
|
1229
|
+
}
|
|
1230
|
+
}), t.current.querySelectorAll('[data-type="textarea"]').forEach((f) => {
|
|
1231
|
+
const m = f.dataset.key;
|
|
1232
|
+
if (m) {
|
|
1233
|
+
const v = f.value.replace(/[\u200B]/g, "").trim();
|
|
1234
|
+
v && (e[m] = v);
|
|
1235
|
+
}
|
|
1236
|
+
}), t.current.querySelectorAll('[data-type="richtext"]').forEach((f) => {
|
|
1237
|
+
const m = f.dataset.key;
|
|
1238
|
+
if (m) {
|
|
1239
|
+
const v = (f.textContent || "").replace(/[\u200B]/g, "").trim();
|
|
1240
|
+
v && (e[m] = v);
|
|
1241
|
+
}
|
|
1242
|
+
}), t.current.querySelectorAll('[data-type="datepicker"]').forEach((f) => {
|
|
1243
|
+
const m = f.dataset.key;
|
|
1244
|
+
if (m) {
|
|
1245
|
+
const v = (f.getAttribute("data-value") || "").trim();
|
|
1246
|
+
v && (e[m] = v);
|
|
1247
|
+
}
|
|
1248
|
+
})), Vt(t, c, l, s, e, u, w), C?.current) {
|
|
1249
|
+
const { key: i, offset: r } = C.current;
|
|
1243
1250
|
setTimeout(() => {
|
|
1244
1251
|
if (!t.current) return;
|
|
1245
1252
|
const n = t.current.querySelector(
|
|
1246
|
-
`[data-type="variable"][data-key="${
|
|
1253
|
+
`[data-type="variable"][data-key="${i}"]`
|
|
1247
1254
|
);
|
|
1248
1255
|
if (n) {
|
|
1249
1256
|
try {
|
|
@@ -1252,23 +1259,23 @@ function At(t, b, p, l, f = {}, T, M, $) {
|
|
|
1252
1259
|
NodeFilter.SHOW_TEXT,
|
|
1253
1260
|
null
|
|
1254
1261
|
);
|
|
1255
|
-
let
|
|
1262
|
+
let f = 0, m = null, v = 0;
|
|
1256
1263
|
for (; a.nextNode(); ) {
|
|
1257
|
-
const
|
|
1258
|
-
if (
|
|
1259
|
-
|
|
1264
|
+
const x = a.currentNode, V = x.textContent?.length || 0;
|
|
1265
|
+
if (f + V >= r) {
|
|
1266
|
+
m = x, v = r - f;
|
|
1260
1267
|
break;
|
|
1261
1268
|
}
|
|
1262
|
-
|
|
1269
|
+
f += V;
|
|
1263
1270
|
}
|
|
1264
|
-
if (
|
|
1265
|
-
o.setStart(
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1271
|
+
if (m) {
|
|
1272
|
+
o.setStart(m, Math.min(v, m.textContent?.length || 0)), o.collapse(!0);
|
|
1273
|
+
const x = window.getSelection();
|
|
1274
|
+
x && (x.removeAllRanges(), x.addRange(o), n.focus());
|
|
1268
1275
|
} else {
|
|
1269
1276
|
o.selectNodeContents(n), o.collapse(!1);
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1277
|
+
const x = window.getSelection();
|
|
1278
|
+
x && (x.removeAllRanges(), x.addRange(o), n.focus());
|
|
1272
1279
|
}
|
|
1273
1280
|
} catch {
|
|
1274
1281
|
const o = document.createRange();
|
|
@@ -1276,158 +1283,161 @@ function At(t, b, p, l, f = {}, T, M, $) {
|
|
|
1276
1283
|
const a = window.getSelection();
|
|
1277
1284
|
a && (a.removeAllRanges(), a.addRange(o), n.focus());
|
|
1278
1285
|
}
|
|
1279
|
-
|
|
1286
|
+
C.current = null;
|
|
1280
1287
|
}
|
|
1281
1288
|
}, 0);
|
|
1282
1289
|
}
|
|
1283
|
-
}, [
|
|
1290
|
+
}, [c, l, s, t, u, C, T, w]);
|
|
1284
1291
|
de(() => {
|
|
1285
|
-
|
|
1286
|
-
}, [
|
|
1292
|
+
k();
|
|
1293
|
+
}, [k]);
|
|
1287
1294
|
}
|
|
1288
|
-
function
|
|
1295
|
+
function Bt(t, c, l, s) {
|
|
1289
1296
|
de(() => {
|
|
1290
|
-
const
|
|
1291
|
-
if (!
|
|
1292
|
-
const
|
|
1293
|
-
const
|
|
1294
|
-
if (
|
|
1295
|
-
const q =
|
|
1296
|
-
q &&
|
|
1297
|
+
const u = t.current;
|
|
1298
|
+
if (!u) return;
|
|
1299
|
+
const C = (w) => {
|
|
1300
|
+
const k = w.target?.closest(".upload-info-icon");
|
|
1301
|
+
if (k && k.classList.contains("upload-info-icon")) {
|
|
1302
|
+
const q = k.dataset.uploadKey;
|
|
1303
|
+
q && s({ key: q, anchorEl: k, type: "upload" });
|
|
1297
1304
|
return;
|
|
1298
1305
|
}
|
|
1299
|
-
const e =
|
|
1306
|
+
const e = w.target?.closest('[data-type="upload"]');
|
|
1300
1307
|
if (e) {
|
|
1301
1308
|
const q = e.dataset.key;
|
|
1302
1309
|
if (q) {
|
|
1303
|
-
const y =
|
|
1304
|
-
y && y.type && y.type.startsWith("image/") &&
|
|
1310
|
+
const y = l[q];
|
|
1311
|
+
y && y.type && y.type.startsWith("image/") && s({ key: q, anchorEl: e, type: "upload-preview" });
|
|
1305
1312
|
}
|
|
1306
1313
|
}
|
|
1307
|
-
},
|
|
1308
|
-
const
|
|
1309
|
-
if (
|
|
1310
|
-
!e || !
|
|
1314
|
+
}, T = (w) => {
|
|
1315
|
+
const k = w.target?.closest(".upload-info-icon"), e = w.relatedTarget;
|
|
1316
|
+
if (k && k.classList.contains("upload-info-icon")) {
|
|
1317
|
+
!e || !u.contains(e) ? s(null) : e.closest(".upload-info-icon") || s(null);
|
|
1311
1318
|
return;
|
|
1312
1319
|
}
|
|
1313
|
-
const q =
|
|
1320
|
+
const q = w.target?.closest('[data-type="upload"]');
|
|
1314
1321
|
if (q) {
|
|
1315
1322
|
const y = e;
|
|
1316
1323
|
if (y && q.contains(y))
|
|
1317
1324
|
return;
|
|
1318
|
-
|
|
1325
|
+
s(null);
|
|
1319
1326
|
}
|
|
1320
1327
|
};
|
|
1321
|
-
return
|
|
1322
|
-
|
|
1328
|
+
return u.addEventListener("mouseover", C, !0), u.addEventListener("mouseout", T, !0), () => {
|
|
1329
|
+
u.removeEventListener("mouseover", C, !0), u.removeEventListener("mouseout", T, !0);
|
|
1323
1330
|
};
|
|
1324
|
-
}, [
|
|
1331
|
+
}, [c, l, t, s]);
|
|
1325
1332
|
}
|
|
1326
|
-
function
|
|
1333
|
+
function Ot(t, c, l, s) {
|
|
1327
1334
|
de(() => {
|
|
1328
1335
|
if (!t.current) return;
|
|
1329
|
-
const
|
|
1330
|
-
if (
|
|
1336
|
+
const u = (k) => {
|
|
1337
|
+
if (s === "hideTagClose")
|
|
1331
1338
|
return;
|
|
1332
|
-
const e =
|
|
1333
|
-
q &&
|
|
1334
|
-
},
|
|
1335
|
-
|
|
1339
|
+
const e = k.currentTarget, q = e.dataset.tooltip, y = e.dataset.tagKey || "";
|
|
1340
|
+
q && l({ key: y, anchorEl: e, type: "tag" });
|
|
1341
|
+
}, C = () => {
|
|
1342
|
+
l(null);
|
|
1336
1343
|
};
|
|
1337
|
-
let
|
|
1338
|
-
const
|
|
1344
|
+
let T;
|
|
1345
|
+
const w = () => {
|
|
1339
1346
|
if (!t.current) return;
|
|
1340
1347
|
t.current.querySelectorAll(
|
|
1341
1348
|
".tag-node[data-tooltip]"
|
|
1342
1349
|
).forEach((e) => {
|
|
1343
|
-
e.addEventListener("mouseenter",
|
|
1350
|
+
e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", C);
|
|
1344
1351
|
});
|
|
1345
1352
|
};
|
|
1346
|
-
return
|
|
1347
|
-
|
|
1353
|
+
return T = requestAnimationFrame(() => {
|
|
1354
|
+
T = requestAnimationFrame(w);
|
|
1348
1355
|
}), () => {
|
|
1349
|
-
cancelAnimationFrame(
|
|
1356
|
+
cancelAnimationFrame(T), t.current && t.current.querySelectorAll(
|
|
1350
1357
|
".tag-node[data-tooltip]"
|
|
1351
1358
|
).forEach((e) => {
|
|
1352
|
-
e.removeEventListener("mouseenter",
|
|
1359
|
+
e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", C);
|
|
1353
1360
|
});
|
|
1354
1361
|
};
|
|
1355
|
-
}, [
|
|
1362
|
+
}, [c, t, l, s]);
|
|
1356
1363
|
}
|
|
1357
|
-
function
|
|
1364
|
+
function Ht(t, c, l) {
|
|
1358
1365
|
de(() => {
|
|
1359
|
-
const
|
|
1360
|
-
if (!
|
|
1361
|
-
const
|
|
1362
|
-
const
|
|
1363
|
-
if (
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
}
|
|
1367
|
-
},
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1366
|
+
const s = t.current;
|
|
1367
|
+
if (!s) return;
|
|
1368
|
+
const u = (T) => {
|
|
1369
|
+
const w = T.target?.closest(".variable-info-icon");
|
|
1370
|
+
if (w && w.classList.contains("variable-info-icon")) {
|
|
1371
|
+
const k = w.dataset.variableKey;
|
|
1372
|
+
k && l({ key: k, anchorEl: w, type: "variable" });
|
|
1373
|
+
}
|
|
1374
|
+
}, C = (T) => {
|
|
1375
|
+
const w = T.target?.closest(".variable-info-icon"), k = T.relatedTarget;
|
|
1376
|
+
w && w.classList.contains("variable-info-icon") && (!k || !s.contains(k) ? l(null) : k.closest(".variable-info-icon") || l(null));
|
|
1370
1377
|
};
|
|
1371
|
-
return
|
|
1372
|
-
|
|
1378
|
+
return s.addEventListener("mouseover", u, !0), s.addEventListener("mouseout", C, !0), () => {
|
|
1379
|
+
s.removeEventListener("mouseover", u, !0), s.removeEventListener("mouseout", C, !0);
|
|
1373
1380
|
};
|
|
1374
|
-
}, [
|
|
1381
|
+
}, [c, t, l]);
|
|
1375
1382
|
}
|
|
1376
|
-
function
|
|
1383
|
+
function Rt(t, c, l, s) {
|
|
1377
1384
|
de(() => {
|
|
1378
1385
|
if (!t.current) return;
|
|
1379
|
-
const
|
|
1380
|
-
const e =
|
|
1381
|
-
e.dataset.fileName &&
|
|
1382
|
-
},
|
|
1383
|
-
|
|
1386
|
+
const u = (k) => {
|
|
1387
|
+
const e = k.currentTarget;
|
|
1388
|
+
e.dataset.fileName && s({ key: "", anchorEl: e, type: "upload-label" });
|
|
1389
|
+
}, C = () => {
|
|
1390
|
+
s(null);
|
|
1384
1391
|
};
|
|
1385
|
-
let
|
|
1386
|
-
const
|
|
1392
|
+
let T;
|
|
1393
|
+
const w = () => {
|
|
1387
1394
|
if (!t.current) return;
|
|
1388
1395
|
t.current.querySelectorAll(
|
|
1389
1396
|
".upload-label[data-file-name]"
|
|
1390
1397
|
).forEach((e) => {
|
|
1391
|
-
e.addEventListener("mouseenter",
|
|
1398
|
+
e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", C);
|
|
1392
1399
|
});
|
|
1393
1400
|
};
|
|
1394
|
-
return
|
|
1395
|
-
|
|
1401
|
+
return T = requestAnimationFrame(() => {
|
|
1402
|
+
T = requestAnimationFrame(w);
|
|
1396
1403
|
}), () => {
|
|
1397
|
-
cancelAnimationFrame(
|
|
1404
|
+
cancelAnimationFrame(T), t.current && t.current.querySelectorAll(
|
|
1398
1405
|
".upload-label[data-file-name]"
|
|
1399
1406
|
).forEach((e) => {
|
|
1400
|
-
e.removeEventListener("mouseenter",
|
|
1407
|
+
e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", C);
|
|
1401
1408
|
});
|
|
1402
1409
|
};
|
|
1403
|
-
}, [
|
|
1410
|
+
}, [c, l, t, s]);
|
|
1404
1411
|
}
|
|
1405
|
-
function
|
|
1412
|
+
function Gt(t, c, l, s) {
|
|
1406
1413
|
de(() => {
|
|
1407
|
-
|
|
1408
|
-
|
|
1414
|
+
const u = setTimeout(() => {
|
|
1415
|
+
Oe(t, c, l), He(t, c, l, s);
|
|
1416
|
+
}, 0);
|
|
1417
|
+
return () => clearTimeout(u);
|
|
1418
|
+
}, [l, c, t, s]);
|
|
1409
1419
|
}
|
|
1410
|
-
function
|
|
1411
|
-
const
|
|
1420
|
+
function Ft(t, c) {
|
|
1421
|
+
const l = Q(0);
|
|
1412
1422
|
de(() => {
|
|
1413
1423
|
if (!t.current) return;
|
|
1414
|
-
let
|
|
1415
|
-
const
|
|
1416
|
-
|
|
1417
|
-
},
|
|
1418
|
-
|
|
1424
|
+
let s = !1, u = 0;
|
|
1425
|
+
const C = (a) => a instanceof HTMLElement ? !!(a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host") || a.closest(".ant-picker") || a.closest(".ant-picker-dropdown")) : !1, T = (a) => {
|
|
1426
|
+
s = !0, C(a.target) && (l.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target"));
|
|
1427
|
+
}, w = () => {
|
|
1428
|
+
s = !1, u = Date.now();
|
|
1419
1429
|
};
|
|
1420
|
-
let
|
|
1430
|
+
let k = !1, e = 0;
|
|
1421
1431
|
const q = () => {
|
|
1422
|
-
|
|
1432
|
+
k = !0;
|
|
1423
1433
|
}, y = () => {
|
|
1424
|
-
|
|
1425
|
-
},
|
|
1434
|
+
k = !1, e = Date.now();
|
|
1435
|
+
}, i = () => {
|
|
1426
1436
|
e = Date.now();
|
|
1427
1437
|
}, r = (a) => {
|
|
1428
|
-
|
|
1438
|
+
C(a.target) && (l.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target"));
|
|
1429
1439
|
}, n = () => {
|
|
1430
|
-
if (Date.now() -
|
|
1440
|
+
if (Date.now() - l.current < 800) {
|
|
1431
1441
|
console.log("[SelectionCtrl] skip selectionchange due to recent datepicker interaction");
|
|
1432
1442
|
return;
|
|
1433
1443
|
}
|
|
@@ -1438,242 +1448,242 @@ function _t(t, b) {
|
|
|
1438
1448
|
return;
|
|
1439
1449
|
}
|
|
1440
1450
|
if (!t.current) return;
|
|
1441
|
-
const
|
|
1442
|
-
if (!
|
|
1451
|
+
const f = window.getSelection();
|
|
1452
|
+
if (!f || f.rangeCount === 0 || c.current || s || k || Date.now() - e < 500)
|
|
1443
1453
|
return;
|
|
1444
|
-
const
|
|
1445
|
-
if (!
|
|
1446
|
-
return t.current.contains(
|
|
1447
|
-
const
|
|
1448
|
-
if (!
|
|
1454
|
+
const m = f.getRangeAt(0);
|
|
1455
|
+
if (!m.collapsed)
|
|
1456
|
+
return t.current.contains(m.commonAncestorContainer), void 0;
|
|
1457
|
+
const v = f.anchorNode;
|
|
1458
|
+
if (!v || !t.current.contains(v))
|
|
1449
1459
|
return;
|
|
1450
|
-
let
|
|
1451
|
-
if (
|
|
1452
|
-
const
|
|
1453
|
-
(
|
|
1454
|
-
} else if (
|
|
1455
|
-
const
|
|
1456
|
-
(
|
|
1457
|
-
}
|
|
1458
|
-
if (
|
|
1460
|
+
let x = !1;
|
|
1461
|
+
if (v.nodeType === Node.ELEMENT_NODE) {
|
|
1462
|
+
const E = v;
|
|
1463
|
+
(E.closest('[data-type="datepicker"]') || E.closest(".rte-datepicker-wrapper") || E.closest(".rte-datepicker-host")) && (x = !0);
|
|
1464
|
+
} else if (v.parentElement) {
|
|
1465
|
+
const E = v.parentElement;
|
|
1466
|
+
(E.closest('[data-type="datepicker"]') || E.closest(".rte-datepicker-wrapper") || E.closest(".rte-datepicker-host")) && (x = !0);
|
|
1467
|
+
}
|
|
1468
|
+
if (x)
|
|
1459
1469
|
return;
|
|
1460
|
-
let
|
|
1461
|
-
if (
|
|
1462
|
-
if (Date.now() -
|
|
1470
|
+
let V = null;
|
|
1471
|
+
if (v.nodeType === Node.ELEMENT_NODE ? V = v.closest('[data-type="variable"]') : v.nodeType === Node.TEXT_NODE && v.parentElement && (V = v.parentElement.closest('[data-type="variable"]')), !V) {
|
|
1472
|
+
if (Date.now() - u > 500)
|
|
1463
1473
|
return;
|
|
1464
|
-
const
|
|
1465
|
-
if (
|
|
1466
|
-
let
|
|
1467
|
-
for (const
|
|
1468
|
-
if (
|
|
1469
|
-
|
|
1474
|
+
const E = t.current.querySelectorAll('[data-type="variable"]');
|
|
1475
|
+
if (E.length > 0) {
|
|
1476
|
+
let B = null;
|
|
1477
|
+
for (const G of Array.from(E))
|
|
1478
|
+
if (G.style.display !== "none") {
|
|
1479
|
+
B = G;
|
|
1470
1480
|
break;
|
|
1471
1481
|
}
|
|
1472
|
-
if (!
|
|
1473
|
-
const
|
|
1474
|
-
|
|
1482
|
+
if (!B && E.length > 0 && (B = E[0]), B) {
|
|
1483
|
+
const G = document.createRange();
|
|
1484
|
+
G.selectNodeContents(B), G.collapse(!1), f.removeAllRanges(), f.addRange(G), B.focus();
|
|
1475
1485
|
} else
|
|
1476
|
-
|
|
1486
|
+
f.removeAllRanges();
|
|
1477
1487
|
} else
|
|
1478
|
-
|
|
1488
|
+
f.removeAllRanges();
|
|
1479
1489
|
}
|
|
1480
1490
|
}, o = t.current;
|
|
1481
|
-
return o && (o.addEventListener("compositionstart", q), o.addEventListener("compositionend", y), o.addEventListener("input",
|
|
1491
|
+
return o && (o.addEventListener("compositionstart", q), o.addEventListener("compositionend", y), o.addEventListener("input", i)), document.addEventListener("mousedown", T), document.addEventListener("mouseup", w), document.addEventListener("focusin", r), document.addEventListener("selectionchange", n), () => {
|
|
1482
1492
|
const a = t.current;
|
|
1483
|
-
a && (a.removeEventListener("compositionstart", q), a.removeEventListener("compositionend", y), a.removeEventListener("input",
|
|
1493
|
+
a && (a.removeEventListener("compositionstart", q), a.removeEventListener("compositionend", y), a.removeEventListener("input", i)), document.removeEventListener("mousedown", T), document.removeEventListener("mouseup", w), document.removeEventListener("focusin", r), document.removeEventListener("selectionchange", n);
|
|
1484
1494
|
};
|
|
1485
|
-
}, [t,
|
|
1495
|
+
}, [t, c]);
|
|
1486
1496
|
}
|
|
1487
|
-
function
|
|
1497
|
+
function Yt(t) {
|
|
1488
1498
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1489
1499
|
}
|
|
1490
|
-
var
|
|
1491
|
-
function
|
|
1492
|
-
return
|
|
1493
|
-
(function(
|
|
1494
|
-
t.exports =
|
|
1495
|
-
})(
|
|
1496
|
-
var
|
|
1497
|
-
var
|
|
1498
|
-
return "[" +
|
|
1499
|
-
} },
|
|
1500
|
-
var L = String(
|
|
1501
|
-
return !L || L.length >=
|
|
1502
|
-
},
|
|
1503
|
-
var
|
|
1504
|
-
return (
|
|
1505
|
-
}, m: function
|
|
1506
|
-
if (
|
|
1507
|
-
var L = 12 * (
|
|
1508
|
-
return +(-(L + (
|
|
1509
|
-
}, a: function(
|
|
1510
|
-
return
|
|
1511
|
-
}, p: function(
|
|
1512
|
-
return { M: y, y: r, w: q, d: e, D: n, h:
|
|
1513
|
-
}, u: function(
|
|
1514
|
-
return
|
|
1515
|
-
} },
|
|
1516
|
-
|
|
1517
|
-
var
|
|
1518
|
-
return
|
|
1519
|
-
}, F = function
|
|
1520
|
-
var
|
|
1521
|
-
if (!
|
|
1522
|
-
if (typeof
|
|
1523
|
-
var
|
|
1524
|
-
|
|
1525
|
-
var
|
|
1526
|
-
if (!
|
|
1500
|
+
var Me = { exports: {} }, zt = Me.exports, Ue;
|
|
1501
|
+
function nt() {
|
|
1502
|
+
return Ue || (Ue = 1, function(t, c) {
|
|
1503
|
+
(function(l, s) {
|
|
1504
|
+
t.exports = s();
|
|
1505
|
+
})(zt, function() {
|
|
1506
|
+
var l = 1e3, s = 6e4, u = 36e5, C = "millisecond", T = "second", w = "minute", k = "hour", e = "day", q = "week", y = "month", i = "quarter", r = "year", n = "date", o = "Invalid Date", a = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, f = /\[([^\]]+)]|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, m = { 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(d) {
|
|
1507
|
+
var p = ["th", "st", "nd", "rd"], b = d % 100;
|
|
1508
|
+
return "[" + d + (p[(b - 20) % 10] || p[b] || p[0]) + "]";
|
|
1509
|
+
} }, v = function(d, p, b) {
|
|
1510
|
+
var L = String(d);
|
|
1511
|
+
return !L || L.length >= p ? d : "" + Array(p + 1 - L.length).join(b) + d;
|
|
1512
|
+
}, x = { s: v, z: function(d) {
|
|
1513
|
+
var p = -d.utcOffset(), b = Math.abs(p), L = Math.floor(b / 60), N = b % 60;
|
|
1514
|
+
return (p <= 0 ? "+" : "-") + v(L, 2, "0") + ":" + v(N, 2, "0");
|
|
1515
|
+
}, m: function d(p, b) {
|
|
1516
|
+
if (p.date() < b.date()) return -d(b, p);
|
|
1517
|
+
var L = 12 * (b.year() - p.year()) + (b.month() - p.month()), N = p.clone().add(L, y), z = b - N < 0, Y = p.clone().add(L + (z ? -1 : 1), y);
|
|
1518
|
+
return +(-(L + (b - N) / (z ? N - Y : Y - N)) || 0);
|
|
1519
|
+
}, a: function(d) {
|
|
1520
|
+
return d < 0 ? Math.ceil(d) || 0 : Math.floor(d);
|
|
1521
|
+
}, p: function(d) {
|
|
1522
|
+
return { M: y, y: r, w: q, d: e, D: n, h: k, m: w, s: T, ms: C, Q: i }[d] || String(d || "").toLowerCase().replace(/s$/, "");
|
|
1523
|
+
}, u: function(d) {
|
|
1524
|
+
return d === void 0;
|
|
1525
|
+
} }, V = "en", E = {};
|
|
1526
|
+
E[V] = m;
|
|
1527
|
+
var B = "$isDayjsObject", G = function(d) {
|
|
1528
|
+
return d instanceof ee || !(!d || !d[B]);
|
|
1529
|
+
}, F = function d(p, b, L) {
|
|
1530
|
+
var N;
|
|
1531
|
+
if (!p) return V;
|
|
1532
|
+
if (typeof p == "string") {
|
|
1533
|
+
var z = p.toLowerCase();
|
|
1534
|
+
E[z] && (N = z), b && (E[z] = b, N = z);
|
|
1535
|
+
var Y = p.split("-");
|
|
1536
|
+
if (!N && Y.length > 1) return d(Y[0]);
|
|
1527
1537
|
} else {
|
|
1528
|
-
var te =
|
|
1529
|
-
|
|
1538
|
+
var te = p.name;
|
|
1539
|
+
E[te] = p, N = te;
|
|
1530
1540
|
}
|
|
1531
|
-
return !L &&
|
|
1532
|
-
},
|
|
1533
|
-
if (
|
|
1534
|
-
var
|
|
1535
|
-
return
|
|
1536
|
-
},
|
|
1537
|
-
|
|
1538
|
-
return
|
|
1541
|
+
return !L && N && (V = N), N || !L && V;
|
|
1542
|
+
}, W = function(d, p) {
|
|
1543
|
+
if (G(d)) return d.clone();
|
|
1544
|
+
var b = typeof p == "object" ? p : {};
|
|
1545
|
+
return b.date = d, b.args = arguments, new ee(b);
|
|
1546
|
+
}, H = x;
|
|
1547
|
+
H.l = F, H.i = G, H.w = function(d, p) {
|
|
1548
|
+
return W(d, { locale: p.$L, utc: p.$u, x: p.$x, $offset: p.$offset });
|
|
1539
1549
|
};
|
|
1540
1550
|
var ee = function() {
|
|
1541
|
-
function
|
|
1542
|
-
this.$L = F(
|
|
1551
|
+
function d(b) {
|
|
1552
|
+
this.$L = F(b.locale, null, !0), this.parse(b), this.$x = this.$x || b.x || {}, this[B] = !0;
|
|
1543
1553
|
}
|
|
1544
|
-
var
|
|
1545
|
-
return
|
|
1554
|
+
var p = d.prototype;
|
|
1555
|
+
return p.parse = function(b) {
|
|
1546
1556
|
this.$d = function(L) {
|
|
1547
|
-
var
|
|
1548
|
-
if (
|
|
1549
|
-
if (
|
|
1550
|
-
if (
|
|
1551
|
-
if (typeof
|
|
1552
|
-
var
|
|
1553
|
-
if (
|
|
1554
|
-
var te =
|
|
1555
|
-
return
|
|
1557
|
+
var N = L.date, z = L.utc;
|
|
1558
|
+
if (N === null) return /* @__PURE__ */ new Date(NaN);
|
|
1559
|
+
if (H.u(N)) return /* @__PURE__ */ new Date();
|
|
1560
|
+
if (N instanceof Date) return new Date(N);
|
|
1561
|
+
if (typeof N == "string" && !/Z$/i.test(N)) {
|
|
1562
|
+
var Y = N.match(a);
|
|
1563
|
+
if (Y) {
|
|
1564
|
+
var te = Y[2] - 1 || 0, se = (Y[7] || "0").substring(0, 3);
|
|
1565
|
+
return z ? new Date(Date.UTC(Y[1], te, Y[3] || 1, Y[4] || 0, Y[5] || 0, Y[6] || 0, se)) : new Date(Y[1], te, Y[3] || 1, Y[4] || 0, Y[5] || 0, Y[6] || 0, se);
|
|
1556
1566
|
}
|
|
1557
1567
|
}
|
|
1558
|
-
return new Date(
|
|
1559
|
-
}(
|
|
1560
|
-
},
|
|
1561
|
-
var
|
|
1562
|
-
this.$y =
|
|
1563
|
-
},
|
|
1564
|
-
return
|
|
1565
|
-
},
|
|
1568
|
+
return new Date(N);
|
|
1569
|
+
}(b), this.init();
|
|
1570
|
+
}, p.init = function() {
|
|
1571
|
+
var b = this.$d;
|
|
1572
|
+
this.$y = b.getFullYear(), this.$M = b.getMonth(), this.$D = b.getDate(), this.$W = b.getDay(), this.$H = b.getHours(), this.$m = b.getMinutes(), this.$s = b.getSeconds(), this.$ms = b.getMilliseconds();
|
|
1573
|
+
}, p.$utils = function() {
|
|
1574
|
+
return H;
|
|
1575
|
+
}, p.isValid = function() {
|
|
1566
1576
|
return this.$d.toString() !== o;
|
|
1567
|
-
},
|
|
1568
|
-
var
|
|
1569
|
-
return this.startOf(L) <=
|
|
1570
|
-
},
|
|
1571
|
-
return
|
|
1572
|
-
},
|
|
1573
|
-
return this.endOf(L) <
|
|
1574
|
-
},
|
|
1575
|
-
return
|
|
1576
|
-
},
|
|
1577
|
+
}, p.isSame = function(b, L) {
|
|
1578
|
+
var N = W(b);
|
|
1579
|
+
return this.startOf(L) <= N && N <= this.endOf(L);
|
|
1580
|
+
}, p.isAfter = function(b, L) {
|
|
1581
|
+
return W(b) < this.startOf(L);
|
|
1582
|
+
}, p.isBefore = function(b, L) {
|
|
1583
|
+
return this.endOf(L) < W(b);
|
|
1584
|
+
}, p.$g = function(b, L, N) {
|
|
1585
|
+
return H.u(b) ? this[L] : this.set(N, b);
|
|
1586
|
+
}, p.unix = function() {
|
|
1577
1587
|
return Math.floor(this.valueOf() / 1e3);
|
|
1578
|
-
},
|
|
1588
|
+
}, p.valueOf = function() {
|
|
1579
1589
|
return this.$d.getTime();
|
|
1580
|
-
},
|
|
1581
|
-
var
|
|
1582
|
-
var xe =
|
|
1583
|
-
return
|
|
1590
|
+
}, p.startOf = function(b, L) {
|
|
1591
|
+
var N = this, z = !!H.u(L) || L, Y = H.p(b), te = function(he, ye) {
|
|
1592
|
+
var xe = H.w(N.$u ? Date.UTC(N.$y, ye, he) : new Date(N.$y, ye, he), N);
|
|
1593
|
+
return z ? xe : xe.endOf(e);
|
|
1584
1594
|
}, se = function(he, ye) {
|
|
1585
|
-
return
|
|
1595
|
+
return H.w(N.toDate()[he].apply(N.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ye)), N);
|
|
1586
1596
|
}, ce = this.$W, pe = this.$M, fe = this.$D, be = "set" + (this.$u ? "UTC" : "");
|
|
1587
|
-
switch (
|
|
1597
|
+
switch (Y) {
|
|
1588
1598
|
case r:
|
|
1589
|
-
return
|
|
1599
|
+
return z ? te(1, 0) : te(31, 11);
|
|
1590
1600
|
case y:
|
|
1591
|
-
return
|
|
1601
|
+
return z ? te(1, pe) : te(0, pe + 1);
|
|
1592
1602
|
case q:
|
|
1593
1603
|
var X = this.$locale().weekStart || 0, ue = (ce < X ? ce + 7 : ce) - X;
|
|
1594
|
-
return te(
|
|
1604
|
+
return te(z ? fe - ue : fe + (6 - ue), pe);
|
|
1595
1605
|
case e:
|
|
1596
1606
|
case n:
|
|
1597
1607
|
return se(be + "Hours", 0);
|
|
1598
|
-
case
|
|
1608
|
+
case k:
|
|
1599
1609
|
return se(be + "Minutes", 1);
|
|
1600
|
-
case
|
|
1610
|
+
case w:
|
|
1601
1611
|
return se(be + "Seconds", 2);
|
|
1602
|
-
case
|
|
1612
|
+
case T:
|
|
1603
1613
|
return se(be + "Milliseconds", 3);
|
|
1604
1614
|
default:
|
|
1605
1615
|
return this.clone();
|
|
1606
1616
|
}
|
|
1607
|
-
},
|
|
1608
|
-
return this.startOf(
|
|
1609
|
-
},
|
|
1610
|
-
var
|
|
1611
|
-
if (
|
|
1617
|
+
}, p.endOf = function(b) {
|
|
1618
|
+
return this.startOf(b, !1);
|
|
1619
|
+
}, p.$set = function(b, L) {
|
|
1620
|
+
var N, z = H.p(b), Y = "set" + (this.$u ? "UTC" : ""), te = (N = {}, N[e] = Y + "Date", N[n] = Y + "Date", N[y] = Y + "Month", N[r] = Y + "FullYear", N[k] = Y + "Hours", N[w] = Y + "Minutes", N[T] = Y + "Seconds", N[C] = Y + "Milliseconds", N)[z], se = z === e ? this.$D + (L - this.$W) : L;
|
|
1621
|
+
if (z === y || z === r) {
|
|
1612
1622
|
var ce = this.clone().set(n, 1);
|
|
1613
1623
|
ce.$d[te](se), ce.init(), this.$d = ce.set(n, Math.min(this.$D, ce.daysInMonth())).$d;
|
|
1614
1624
|
} else te && this.$d[te](se);
|
|
1615
1625
|
return this.init(), this;
|
|
1616
|
-
},
|
|
1617
|
-
return this.clone().$set(
|
|
1618
|
-
},
|
|
1619
|
-
return this[
|
|
1620
|
-
},
|
|
1621
|
-
var
|
|
1622
|
-
|
|
1623
|
-
var
|
|
1624
|
-
var fe =
|
|
1625
|
-
return
|
|
1626
|
+
}, p.set = function(b, L) {
|
|
1627
|
+
return this.clone().$set(b, L);
|
|
1628
|
+
}, p.get = function(b) {
|
|
1629
|
+
return this[H.p(b)]();
|
|
1630
|
+
}, p.add = function(b, L) {
|
|
1631
|
+
var N, z = this;
|
|
1632
|
+
b = Number(b);
|
|
1633
|
+
var Y = H.p(L), te = function(pe) {
|
|
1634
|
+
var fe = W(z);
|
|
1635
|
+
return H.w(fe.date(fe.date() + Math.round(pe * b)), z);
|
|
1626
1636
|
};
|
|
1627
|
-
if (
|
|
1628
|
-
if (
|
|
1629
|
-
if (
|
|
1630
|
-
if (
|
|
1631
|
-
var se = (
|
|
1632
|
-
return
|
|
1633
|
-
},
|
|
1634
|
-
return this.add(-1 *
|
|
1635
|
-
},
|
|
1636
|
-
var L = this,
|
|
1637
|
-
if (!this.isValid()) return
|
|
1638
|
-
var
|
|
1639
|
-
return ye && (ye[xe] || ye(L,
|
|
1637
|
+
if (Y === y) return this.set(y, this.$M + b);
|
|
1638
|
+
if (Y === r) return this.set(r, this.$y + b);
|
|
1639
|
+
if (Y === e) return te(1);
|
|
1640
|
+
if (Y === q) return te(7);
|
|
1641
|
+
var se = (N = {}, N[w] = s, N[k] = u, N[T] = l, N)[Y] || 1, ce = this.$d.getTime() + b * se;
|
|
1642
|
+
return H.w(ce, this);
|
|
1643
|
+
}, p.subtract = function(b, L) {
|
|
1644
|
+
return this.add(-1 * b, L);
|
|
1645
|
+
}, p.format = function(b) {
|
|
1646
|
+
var L = this, N = this.$locale();
|
|
1647
|
+
if (!this.isValid()) return N.invalidDate || o;
|
|
1648
|
+
var z = b || "YYYY-MM-DDTHH:mm:ssZ", Y = H.z(this), te = this.$H, se = this.$m, ce = this.$M, pe = N.weekdays, fe = N.months, be = N.meridiem, X = function(ye, xe, we, Ce) {
|
|
1649
|
+
return ye && (ye[xe] || ye(L, z)) || we[xe].slice(0, Ce);
|
|
1640
1650
|
}, ue = function(ye) {
|
|
1641
|
-
return
|
|
1651
|
+
return H.s(te % 12 || 12, ye, "0");
|
|
1642
1652
|
}, he = be || function(ye, xe, we) {
|
|
1643
1653
|
var Ce = ye < 12 ? "AM" : "PM";
|
|
1644
1654
|
return we ? Ce.toLowerCase() : Ce;
|
|
1645
1655
|
};
|
|
1646
|
-
return
|
|
1656
|
+
return z.replace(f, function(ye, xe) {
|
|
1647
1657
|
return xe || function(we) {
|
|
1648
1658
|
switch (we) {
|
|
1649
1659
|
case "YY":
|
|
1650
1660
|
return String(L.$y).slice(-2);
|
|
1651
1661
|
case "YYYY":
|
|
1652
|
-
return
|
|
1662
|
+
return H.s(L.$y, 4, "0");
|
|
1653
1663
|
case "M":
|
|
1654
1664
|
return ce + 1;
|
|
1655
1665
|
case "MM":
|
|
1656
|
-
return
|
|
1666
|
+
return H.s(ce + 1, 2, "0");
|
|
1657
1667
|
case "MMM":
|
|
1658
|
-
return X(
|
|
1668
|
+
return X(N.monthsShort, ce, fe, 3);
|
|
1659
1669
|
case "MMMM":
|
|
1660
1670
|
return X(fe, ce);
|
|
1661
1671
|
case "D":
|
|
1662
1672
|
return L.$D;
|
|
1663
1673
|
case "DD":
|
|
1664
|
-
return
|
|
1674
|
+
return H.s(L.$D, 2, "0");
|
|
1665
1675
|
case "d":
|
|
1666
1676
|
return String(L.$W);
|
|
1667
1677
|
case "dd":
|
|
1668
|
-
return X(
|
|
1678
|
+
return X(N.weekdaysMin, L.$W, pe, 2);
|
|
1669
1679
|
case "ddd":
|
|
1670
|
-
return X(
|
|
1680
|
+
return X(N.weekdaysShort, L.$W, pe, 3);
|
|
1671
1681
|
case "dddd":
|
|
1672
1682
|
return pe[L.$W];
|
|
1673
1683
|
case "H":
|
|
1674
1684
|
return String(te);
|
|
1675
1685
|
case "HH":
|
|
1676
|
-
return
|
|
1686
|
+
return H.s(te, 2, "0");
|
|
1677
1687
|
case "h":
|
|
1678
1688
|
return ue(1);
|
|
1679
1689
|
case "hh":
|
|
@@ -1685,403 +1695,529 @@ function Ot() {
|
|
|
1685
1695
|
case "m":
|
|
1686
1696
|
return String(se);
|
|
1687
1697
|
case "mm":
|
|
1688
|
-
return
|
|
1698
|
+
return H.s(se, 2, "0");
|
|
1689
1699
|
case "s":
|
|
1690
1700
|
return String(L.$s);
|
|
1691
1701
|
case "ss":
|
|
1692
|
-
return
|
|
1702
|
+
return H.s(L.$s, 2, "0");
|
|
1693
1703
|
case "SSS":
|
|
1694
|
-
return
|
|
1704
|
+
return H.s(L.$ms, 3, "0");
|
|
1695
1705
|
case "Z":
|
|
1696
|
-
return
|
|
1706
|
+
return Y;
|
|
1697
1707
|
}
|
|
1698
1708
|
return null;
|
|
1699
|
-
}(ye) ||
|
|
1709
|
+
}(ye) || Y.replace(":", "");
|
|
1700
1710
|
});
|
|
1701
|
-
},
|
|
1711
|
+
}, p.utcOffset = function() {
|
|
1702
1712
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1703
|
-
},
|
|
1704
|
-
var
|
|
1705
|
-
return
|
|
1713
|
+
}, p.diff = function(b, L, N) {
|
|
1714
|
+
var z, Y = this, te = H.p(L), se = W(b), ce = (se.utcOffset() - this.utcOffset()) * s, pe = this - se, fe = function() {
|
|
1715
|
+
return H.m(Y, se);
|
|
1706
1716
|
};
|
|
1707
1717
|
switch (te) {
|
|
1708
1718
|
case r:
|
|
1709
|
-
|
|
1719
|
+
z = fe() / 12;
|
|
1710
1720
|
break;
|
|
1711
1721
|
case y:
|
|
1712
|
-
|
|
1722
|
+
z = fe();
|
|
1713
1723
|
break;
|
|
1714
|
-
case
|
|
1715
|
-
|
|
1724
|
+
case i:
|
|
1725
|
+
z = fe() / 3;
|
|
1716
1726
|
break;
|
|
1717
1727
|
case q:
|
|
1718
|
-
|
|
1728
|
+
z = (pe - ce) / 6048e5;
|
|
1719
1729
|
break;
|
|
1720
1730
|
case e:
|
|
1721
|
-
|
|
1731
|
+
z = (pe - ce) / 864e5;
|
|
1722
1732
|
break;
|
|
1723
|
-
case
|
|
1724
|
-
|
|
1733
|
+
case k:
|
|
1734
|
+
z = pe / u;
|
|
1725
1735
|
break;
|
|
1726
|
-
case
|
|
1727
|
-
|
|
1736
|
+
case w:
|
|
1737
|
+
z = pe / s;
|
|
1728
1738
|
break;
|
|
1729
|
-
case
|
|
1730
|
-
|
|
1739
|
+
case T:
|
|
1740
|
+
z = pe / l;
|
|
1731
1741
|
break;
|
|
1732
1742
|
default:
|
|
1733
|
-
|
|
1743
|
+
z = pe;
|
|
1734
1744
|
}
|
|
1735
|
-
return
|
|
1736
|
-
},
|
|
1745
|
+
return N ? z : H.a(z);
|
|
1746
|
+
}, p.daysInMonth = function() {
|
|
1737
1747
|
return this.endOf(y).$D;
|
|
1738
|
-
},
|
|
1739
|
-
return
|
|
1740
|
-
},
|
|
1741
|
-
if (!
|
|
1742
|
-
var
|
|
1743
|
-
return
|
|
1744
|
-
},
|
|
1745
|
-
return
|
|
1746
|
-
},
|
|
1748
|
+
}, p.$locale = function() {
|
|
1749
|
+
return E[this.$L];
|
|
1750
|
+
}, p.locale = function(b, L) {
|
|
1751
|
+
if (!b) return this.$L;
|
|
1752
|
+
var N = this.clone(), z = F(b, L, !0);
|
|
1753
|
+
return z && (N.$L = z), N;
|
|
1754
|
+
}, p.clone = function() {
|
|
1755
|
+
return H.w(this.$d, this);
|
|
1756
|
+
}, p.toDate = function() {
|
|
1747
1757
|
return new Date(this.valueOf());
|
|
1748
|
-
},
|
|
1758
|
+
}, p.toJSON = function() {
|
|
1749
1759
|
return this.isValid() ? this.toISOString() : null;
|
|
1750
|
-
},
|
|
1760
|
+
}, p.toISOString = function() {
|
|
1751
1761
|
return this.$d.toISOString();
|
|
1752
|
-
},
|
|
1762
|
+
}, p.toString = function() {
|
|
1753
1763
|
return this.$d.toUTCString();
|
|
1754
|
-
},
|
|
1764
|
+
}, d;
|
|
1755
1765
|
}(), re = ee.prototype;
|
|
1756
|
-
return
|
|
1757
|
-
re[
|
|
1758
|
-
return this.$g(
|
|
1766
|
+
return W.prototype = re, [["$ms", C], ["$s", T], ["$m", w], ["$H", k], ["$W", e], ["$M", y], ["$y", r], ["$D", n]].forEach(function(d) {
|
|
1767
|
+
re[d[1]] = function(p) {
|
|
1768
|
+
return this.$g(p, d[0], d[1]);
|
|
1759
1769
|
};
|
|
1760
|
-
}),
|
|
1761
|
-
return
|
|
1762
|
-
},
|
|
1763
|
-
return
|
|
1764
|
-
},
|
|
1770
|
+
}), W.extend = function(d, p) {
|
|
1771
|
+
return d.$i || (d(p, ee, W), d.$i = !0), W;
|
|
1772
|
+
}, W.locale = F, W.isDayjs = G, W.unix = function(d) {
|
|
1773
|
+
return W(1e3 * d);
|
|
1774
|
+
}, W.en = E[V], W.Ls = E, W.p = {}, W;
|
|
1775
|
+
});
|
|
1776
|
+
}(Me)), Me.exports;
|
|
1777
|
+
}
|
|
1778
|
+
var jt = nt();
|
|
1779
|
+
const Ie = /* @__PURE__ */ Yt(jt);
|
|
1780
|
+
var Ve = { exports: {} }, Wt = Ve.exports, Ke;
|
|
1781
|
+
function Ut() {
|
|
1782
|
+
return Ke || (Ke = 1, function(t, c) {
|
|
1783
|
+
(function(l, s) {
|
|
1784
|
+
t.exports = s(nt());
|
|
1785
|
+
})(Wt, function(l) {
|
|
1786
|
+
function s(T) {
|
|
1787
|
+
return T && typeof T == "object" && "default" in T ? T : { default: T };
|
|
1788
|
+
}
|
|
1789
|
+
var u = s(l), C = { 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(T, w) {
|
|
1790
|
+
return w === "W" ? T + "周" : T + "日";
|
|
1791
|
+
}, 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(T, w) {
|
|
1792
|
+
var k = 100 * T + w;
|
|
1793
|
+
return k < 600 ? "凌晨" : k < 900 ? "早上" : k < 1100 ? "上午" : k < 1300 ? "中午" : k < 1800 ? "下午" : "晚上";
|
|
1794
|
+
} };
|
|
1795
|
+
return u.default.locale(C, null, !0), C;
|
|
1796
|
+
});
|
|
1797
|
+
}(Ve)), Ve.exports;
|
|
1798
|
+
}
|
|
1799
|
+
Ut();
|
|
1800
|
+
function qe(t) {
|
|
1801
|
+
"@babel/helpers - typeof";
|
|
1802
|
+
return qe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(c) {
|
|
1803
|
+
return typeof c;
|
|
1804
|
+
} : function(c) {
|
|
1805
|
+
return c && typeof Symbol == "function" && c.constructor === Symbol && c !== Symbol.prototype ? "symbol" : typeof c;
|
|
1806
|
+
}, qe(t);
|
|
1807
|
+
}
|
|
1808
|
+
function Kt(t, c) {
|
|
1809
|
+
if (qe(t) != "object" || !t) return t;
|
|
1810
|
+
var l = t[Symbol.toPrimitive];
|
|
1811
|
+
if (l !== void 0) {
|
|
1812
|
+
var s = l.call(t, c);
|
|
1813
|
+
if (qe(s) != "object") return s;
|
|
1814
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1815
|
+
}
|
|
1816
|
+
return (c === "string" ? String : Number)(t);
|
|
1817
|
+
}
|
|
1818
|
+
function Xt(t) {
|
|
1819
|
+
var c = Kt(t, "string");
|
|
1820
|
+
return qe(c) == "symbol" ? c : c + "";
|
|
1821
|
+
}
|
|
1822
|
+
function Jt(t, c, l) {
|
|
1823
|
+
return (c = Xt(c)) in t ? Object.defineProperty(t, c, {
|
|
1824
|
+
value: l,
|
|
1825
|
+
enumerable: !0,
|
|
1826
|
+
configurable: !0,
|
|
1827
|
+
writable: !0
|
|
1828
|
+
}) : t[c] = l, t;
|
|
1829
|
+
}
|
|
1830
|
+
function Xe(t, c) {
|
|
1831
|
+
var l = Object.keys(t);
|
|
1832
|
+
if (Object.getOwnPropertySymbols) {
|
|
1833
|
+
var s = Object.getOwnPropertySymbols(t);
|
|
1834
|
+
c && (s = s.filter(function(u) {
|
|
1835
|
+
return Object.getOwnPropertyDescriptor(t, u).enumerable;
|
|
1836
|
+
})), l.push.apply(l, s);
|
|
1837
|
+
}
|
|
1838
|
+
return l;
|
|
1839
|
+
}
|
|
1840
|
+
function Je(t) {
|
|
1841
|
+
for (var c = 1; c < arguments.length; c++) {
|
|
1842
|
+
var l = arguments[c] != null ? arguments[c] : {};
|
|
1843
|
+
c % 2 ? Xe(Object(l), !0).forEach(function(s) {
|
|
1844
|
+
Jt(t, s, l[s]);
|
|
1845
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(l)) : Xe(Object(l)).forEach(function(s) {
|
|
1846
|
+
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(l, s));
|
|
1765
1847
|
});
|
|
1766
|
-
}
|
|
1848
|
+
}
|
|
1849
|
+
return t;
|
|
1767
1850
|
}
|
|
1768
|
-
var
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1851
|
+
var Qt = {
|
|
1852
|
+
yearFormat: "YYYY",
|
|
1853
|
+
dayFormat: "D",
|
|
1854
|
+
cellMeridiemFormat: "A",
|
|
1855
|
+
monthBeforeYear: !0
|
|
1856
|
+
}, Zt = Je(Je({}, Qt), {}, {
|
|
1857
|
+
locale: "zh_CN",
|
|
1858
|
+
today: "今天",
|
|
1859
|
+
now: "此刻",
|
|
1860
|
+
backToToday: "返回今天",
|
|
1861
|
+
ok: "确定",
|
|
1862
|
+
timeSelect: "选择时间",
|
|
1863
|
+
dateSelect: "选择日期",
|
|
1864
|
+
weekSelect: "选择周",
|
|
1865
|
+
clear: "清除",
|
|
1866
|
+
week: "周",
|
|
1867
|
+
month: "月",
|
|
1868
|
+
year: "年",
|
|
1869
|
+
previousMonth: "上个月 (翻页上键)",
|
|
1870
|
+
nextMonth: "下个月 (翻页下键)",
|
|
1871
|
+
monthSelect: "选择月份",
|
|
1872
|
+
yearSelect: "选择年份",
|
|
1873
|
+
decadeSelect: "选择年代",
|
|
1874
|
+
previousYear: "上一年 (Control键加左方向键)",
|
|
1875
|
+
nextYear: "下一年 (Control键加右方向键)",
|
|
1876
|
+
previousDecade: "上一年代",
|
|
1877
|
+
nextDecade: "下一年代",
|
|
1878
|
+
previousCentury: "上一世纪",
|
|
1879
|
+
nextCentury: "下一世纪",
|
|
1880
|
+
yearFormat: "YYYY年",
|
|
1881
|
+
cellDateFormat: "D",
|
|
1882
|
+
monthBeforeYear: !1
|
|
1883
|
+
});
|
|
1884
|
+
const en = {
|
|
1885
|
+
placeholder: "请选择时间",
|
|
1886
|
+
rangePlaceholder: ["开始时间", "结束时间"]
|
|
1887
|
+
}, at = {
|
|
1888
|
+
lang: Object.assign({
|
|
1889
|
+
placeholder: "请选择日期",
|
|
1890
|
+
yearPlaceholder: "请选择年份",
|
|
1891
|
+
quarterPlaceholder: "请选择季度",
|
|
1892
|
+
monthPlaceholder: "请选择月份",
|
|
1893
|
+
weekPlaceholder: "请选择周",
|
|
1894
|
+
rangePlaceholder: ["开始日期", "结束日期"],
|
|
1895
|
+
rangeYearPlaceholder: ["开始年份", "结束年份"],
|
|
1896
|
+
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
1897
|
+
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
1898
|
+
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
1899
|
+
}, Zt),
|
|
1900
|
+
timePickerLocale: Object.assign({}, en)
|
|
1901
|
+
};
|
|
1902
|
+
at.lang.ok = "确定";
|
|
1903
|
+
Ie.locale("zh-cn");
|
|
1904
|
+
const { RangePicker: tn } = dt, nn = ({ host: t, onChange: c }) => {
|
|
1905
|
+
const l = t.dataset.key, s = t.dataset.value, u = t.dataset.placeholder, C = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, T = t.dataset.disableFuture === "true", [w, k] = ne(() => {
|
|
1906
|
+
if (!s) return null;
|
|
1907
|
+
const o = s.split(",");
|
|
1908
|
+
return o.length === 2 && o[0] && o[1] ? [Ie(o[0]), Ie(o[1])] : null;
|
|
1774
1909
|
}), [e, q] = ne(null);
|
|
1775
|
-
return
|
|
1776
|
-
/* @__PURE__ */
|
|
1777
|
-
|
|
1910
|
+
return tt(
|
|
1911
|
+
/* @__PURE__ */ $("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "240px" }, children: /* @__PURE__ */ $(
|
|
1912
|
+
tn,
|
|
1778
1913
|
{
|
|
1779
|
-
value:
|
|
1780
|
-
disabledDate: (o) => o ?
|
|
1914
|
+
value: w,
|
|
1915
|
+
disabledDate: (o) => o ? T && o.isAfter(Ie(), "day") ? !0 : !C || !e || !e[0] ? !1 : Math.abs(o.diff(e[0], "days")) > C : !1,
|
|
1781
1916
|
onCalendarChange: (o) => {
|
|
1782
1917
|
console.log("[DatePicker] onCalendarChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), q(o);
|
|
1783
1918
|
},
|
|
1784
1919
|
onChange: (o) => {
|
|
1785
|
-
if (console.log("[DatePicker] onChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)),
|
|
1920
|
+
if (console.log("[DatePicker] onChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), k(o), q(null), o && o[0] && o[1]) {
|
|
1786
1921
|
const a = `${o[0].format("YYYY-MM-DD")},${o[1].format("YYYY-MM-DD")}`;
|
|
1787
|
-
t.setAttribute("data-value", a),
|
|
1922
|
+
t.setAttribute("data-value", a), c(l, a);
|
|
1788
1923
|
} else
|
|
1789
|
-
t.setAttribute("data-value", ""),
|
|
1924
|
+
t.setAttribute("data-value", ""), c(l, "");
|
|
1790
1925
|
},
|
|
1791
1926
|
onOpenChange: (o) => {
|
|
1792
|
-
console.log("[DatePicker] onOpenChange", o), q(o ?
|
|
1927
|
+
console.log("[DatePicker] onOpenChange", o), q(o ? w : null);
|
|
1793
1928
|
},
|
|
1794
|
-
placeholder: [
|
|
1929
|
+
placeholder: [u || "开始日期", u || "结束日期"],
|
|
1795
1930
|
style: { width: "100%" },
|
|
1796
1931
|
size: "small",
|
|
1797
1932
|
allowClear: !0,
|
|
1933
|
+
locale: at,
|
|
1798
1934
|
getPopupContainer: () => document.body,
|
|
1799
1935
|
popupClassName: "rte-datepicker-dropdown"
|
|
1800
1936
|
}
|
|
1801
1937
|
) }),
|
|
1802
1938
|
t
|
|
1803
1939
|
);
|
|
1804
|
-
},
|
|
1805
|
-
const [
|
|
1940
|
+
}, an = (t) => {
|
|
1941
|
+
const [c, l] = ne([]);
|
|
1806
1942
|
return de(() => {
|
|
1807
|
-
const
|
|
1808
|
-
if (!
|
|
1809
|
-
const
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1812
|
-
const e =
|
|
1813
|
-
e &&
|
|
1814
|
-
/* @__PURE__ */
|
|
1815
|
-
|
|
1943
|
+
const s = t.current;
|
|
1944
|
+
if (!s) return;
|
|
1945
|
+
const u = () => {
|
|
1946
|
+
const T = s.querySelectorAll(".rte-datepicker-host"), w = [];
|
|
1947
|
+
T.forEach((k) => {
|
|
1948
|
+
const e = k.getAttribute("data-key");
|
|
1949
|
+
e && w.push(
|
|
1950
|
+
/* @__PURE__ */ $(
|
|
1951
|
+
nn,
|
|
1816
1952
|
{
|
|
1817
|
-
host:
|
|
1818
|
-
onChange: (
|
|
1953
|
+
host: k,
|
|
1954
|
+
onChange: () => {
|
|
1819
1955
|
if (t.current) {
|
|
1820
|
-
const
|
|
1821
|
-
t.current.dispatchEvent(
|
|
1956
|
+
const q = new Event("input", { bubbles: !0 });
|
|
1957
|
+
t.current.dispatchEvent(q);
|
|
1822
1958
|
}
|
|
1823
1959
|
}
|
|
1824
1960
|
},
|
|
1825
1961
|
`datepicker-${e}`
|
|
1826
1962
|
)
|
|
1827
1963
|
);
|
|
1828
|
-
}),
|
|
1964
|
+
}), l(w);
|
|
1829
1965
|
};
|
|
1830
|
-
|
|
1831
|
-
const
|
|
1832
|
-
let
|
|
1833
|
-
for (const
|
|
1834
|
-
if (
|
|
1966
|
+
u();
|
|
1967
|
+
const C = new MutationObserver((T) => {
|
|
1968
|
+
let w = !1;
|
|
1969
|
+
for (const k of T)
|
|
1970
|
+
if (k.type === "childList") {
|
|
1835
1971
|
let e = !1;
|
|
1836
|
-
if (
|
|
1972
|
+
if (k.addedNodes.forEach((q) => {
|
|
1837
1973
|
if (q.nodeType === Node.ELEMENT_NODE) {
|
|
1838
1974
|
const y = q;
|
|
1839
1975
|
(y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
|
|
1840
1976
|
}
|
|
1841
|
-
}),
|
|
1977
|
+
}), k.removedNodes.forEach((q) => {
|
|
1842
1978
|
if (q.nodeType === Node.ELEMENT_NODE) {
|
|
1843
1979
|
const y = q;
|
|
1844
1980
|
(y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
|
|
1845
1981
|
}
|
|
1846
1982
|
}), e) {
|
|
1847
|
-
|
|
1983
|
+
w = !0;
|
|
1848
1984
|
break;
|
|
1849
1985
|
}
|
|
1850
1986
|
}
|
|
1851
|
-
|
|
1987
|
+
w && u();
|
|
1852
1988
|
});
|
|
1853
|
-
return
|
|
1854
|
-
}, [t]),
|
|
1855
|
-
},
|
|
1989
|
+
return C.observe(s, { childList: !0, subtree: !0 }), () => C.disconnect();
|
|
1990
|
+
}, [t]), c;
|
|
1991
|
+
}, rn = ({
|
|
1856
1992
|
config: t,
|
|
1857
|
-
onSend:
|
|
1858
|
-
isProcessing:
|
|
1859
|
-
disabled:
|
|
1860
|
-
width:
|
|
1861
|
-
lockStructure:
|
|
1862
|
-
agentOptions:
|
|
1863
|
-
onAgentSelect:
|
|
1864
|
-
onAgentExit:
|
|
1993
|
+
onSend: c,
|
|
1994
|
+
isProcessing: l = !1,
|
|
1995
|
+
disabled: s = !1,
|
|
1996
|
+
width: u,
|
|
1997
|
+
lockStructure: C = !1,
|
|
1998
|
+
agentOptions: T = [],
|
|
1999
|
+
onAgentSelect: w,
|
|
2000
|
+
onAgentExit: k,
|
|
1865
2001
|
loading: e = !1,
|
|
1866
2002
|
placeholder: q,
|
|
1867
2003
|
border: y,
|
|
1868
|
-
background:
|
|
2004
|
+
background: i = "transparent",
|
|
1869
2005
|
hideButtons: r
|
|
1870
2006
|
}) => {
|
|
1871
|
-
const n = Q(null), o = Q(null), [a,
|
|
1872
|
-
const
|
|
1873
|
-
return t.forEach((
|
|
1874
|
-
|
|
1875
|
-
}),
|
|
1876
|
-
}),
|
|
2007
|
+
const n = Q(null), o = Q(null), [a, f] = ne({}), [m, v] = ne(null), [x, V] = ne(null), E = Q(!1), B = Q(null), [G, F] = ne(!1), W = Q(null), [H, ee] = ne(!0), [re, d] = ne(() => {
|
|
2008
|
+
const g = {};
|
|
2009
|
+
return t.forEach((h) => {
|
|
2010
|
+
h.type === "multi-variable" && h.key && (g[h.key] = 1);
|
|
2011
|
+
}), g;
|
|
2012
|
+
}), p = Q({}), b = Q({}), L = Q({});
|
|
1877
2013
|
de(() => {
|
|
1878
|
-
|
|
2014
|
+
b.current = a;
|
|
1879
2015
|
}, [a]), de(() => {
|
|
1880
2016
|
L.current = re;
|
|
1881
2017
|
}, [re]);
|
|
1882
|
-
const
|
|
2018
|
+
const N = ae((g) => g.find((S) => S.type === "tag")?.text || null, []), z = Q(t), Y = Q(null);
|
|
1883
2019
|
de(() => {
|
|
1884
|
-
const
|
|
1885
|
-
if (
|
|
1886
|
-
const
|
|
1887
|
-
n.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1888
|
-
const
|
|
1889
|
-
if (
|
|
1890
|
-
const
|
|
1891
|
-
|
|
2020
|
+
const g = N(z.current), h = N(t);
|
|
2021
|
+
if (g && g !== h && n.current) {
|
|
2022
|
+
const S = {};
|
|
2023
|
+
n.current.querySelectorAll('[data-type="variable"]').forEach((_) => {
|
|
2024
|
+
const R = _.dataset.key;
|
|
2025
|
+
if (R) {
|
|
2026
|
+
const M = _.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2027
|
+
M && (S[R] = M);
|
|
1892
2028
|
}
|
|
1893
|
-
}), n.current.querySelectorAll('[data-type="select"]').forEach((
|
|
1894
|
-
const
|
|
1895
|
-
if (
|
|
1896
|
-
const
|
|
1897
|
-
|
|
2029
|
+
}), n.current.querySelectorAll('[data-type="select"]').forEach((_) => {
|
|
2030
|
+
const R = _.dataset.key;
|
|
2031
|
+
if (R) {
|
|
2032
|
+
const M = _.value.trim();
|
|
2033
|
+
M && (S[R] = M);
|
|
1898
2034
|
}
|
|
1899
|
-
}), n.current.querySelectorAll('[data-type="textarea"]').forEach((
|
|
1900
|
-
const
|
|
1901
|
-
if (
|
|
1902
|
-
const
|
|
1903
|
-
|
|
2035
|
+
}), n.current.querySelectorAll('[data-type="textarea"]').forEach((_) => {
|
|
2036
|
+
const R = _.dataset.key;
|
|
2037
|
+
if (R) {
|
|
2038
|
+
const M = _.value.replace(/[\u200B]/g, "").trim();
|
|
2039
|
+
M && (S[R] = M);
|
|
1904
2040
|
}
|
|
1905
|
-
}),
|
|
1906
|
-
variableValues:
|
|
1907
|
-
files: { ...
|
|
2041
|
+
}), p.current[g] = {
|
|
2042
|
+
variableValues: S,
|
|
2043
|
+
files: { ...b.current },
|
|
1908
2044
|
multiVariableCounts: { ...L.current }
|
|
1909
2045
|
};
|
|
1910
2046
|
}
|
|
1911
|
-
if (
|
|
1912
|
-
const
|
|
1913
|
-
|
|
1914
|
-
} else if (
|
|
1915
|
-
|
|
1916
|
-
const
|
|
1917
|
-
t.forEach((
|
|
1918
|
-
|
|
1919
|
-
}),
|
|
2047
|
+
if (h && p.current[h]) {
|
|
2048
|
+
const S = p.current[h];
|
|
2049
|
+
Y.current = S, f(S.files), d(S.multiVariableCounts);
|
|
2050
|
+
} else if (h) {
|
|
2051
|
+
Y.current = null;
|
|
2052
|
+
const S = {};
|
|
2053
|
+
t.forEach((I) => {
|
|
2054
|
+
I.type === "multi-variable" && I.key && (S[I.key] = 1);
|
|
2055
|
+
}), d(S), f({});
|
|
1920
2056
|
} else
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
}, [t,
|
|
1924
|
-
|
|
1925
|
-
|
|
2057
|
+
Y.current = null, d({}), f({});
|
|
2058
|
+
z.current = t;
|
|
2059
|
+
}, [t, N]), je(() => {
|
|
2060
|
+
Y.current && n.current && (n.current.__tempVariableValues = Y.current.variableValues, setTimeout(() => {
|
|
2061
|
+
Y.current && (Y.current = null);
|
|
1926
2062
|
}, 0));
|
|
1927
|
-
}),
|
|
1928
|
-
const te =
|
|
2063
|
+
}), Pt(n, t, a, C, re, W, void 0, r), Bt(n, t, a, V), Ot(n, t, V, r), Rt(n, t, a, V), Ht(n, t, V), Gt(n, t, a, F), Ft(n, E);
|
|
2064
|
+
const te = an(n);
|
|
1929
2065
|
de(() => {
|
|
1930
2066
|
if (t.length > 0) {
|
|
1931
2067
|
ee(!1);
|
|
1932
2068
|
return;
|
|
1933
2069
|
}
|
|
1934
|
-
const
|
|
2070
|
+
const g = () => {
|
|
1935
2071
|
if (!n.current) {
|
|
1936
2072
|
ee(!0);
|
|
1937
2073
|
return;
|
|
1938
2074
|
}
|
|
1939
|
-
const
|
|
1940
|
-
let
|
|
1941
|
-
|
|
1942
|
-
(
|
|
1943
|
-
}),
|
|
1944
|
-
|
|
2075
|
+
const S = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", I = n.current.querySelectorAll('[data-type="variable"]'), A = n.current.querySelectorAll('[data-type="upload"]');
|
|
2076
|
+
let D = !1;
|
|
2077
|
+
I.forEach((R) => {
|
|
2078
|
+
(R.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (D = !0);
|
|
2079
|
+
}), A.forEach((R) => {
|
|
2080
|
+
R.querySelector(".upload-inner-wrapper.has-file") && (D = !0);
|
|
1945
2081
|
});
|
|
1946
|
-
const
|
|
1947
|
-
ee(
|
|
2082
|
+
const _ = !S && !D;
|
|
2083
|
+
ee(_), t.length === 0 && F(!_);
|
|
1948
2084
|
};
|
|
1949
|
-
|
|
1950
|
-
const
|
|
1951
|
-
return n.current &&
|
|
2085
|
+
g();
|
|
2086
|
+
const h = new MutationObserver(g);
|
|
2087
|
+
return n.current && h.observe(n.current, {
|
|
1952
2088
|
childList: !0,
|
|
1953
2089
|
subtree: !0,
|
|
1954
2090
|
characterData: !0
|
|
1955
2091
|
}), () => {
|
|
1956
|
-
|
|
2092
|
+
h.disconnect();
|
|
1957
2093
|
};
|
|
1958
2094
|
}, [t]);
|
|
1959
|
-
const se = (
|
|
1960
|
-
if (
|
|
1961
|
-
|
|
2095
|
+
const se = (g) => {
|
|
2096
|
+
if (s) {
|
|
2097
|
+
g.preventDefault();
|
|
1962
2098
|
return;
|
|
1963
2099
|
}
|
|
1964
|
-
|
|
1965
|
-
const
|
|
1966
|
-
if (
|
|
1967
|
-
const
|
|
1968
|
-
if (
|
|
1969
|
-
let
|
|
1970
|
-
if (
|
|
1971
|
-
const
|
|
1972
|
-
if (
|
|
1973
|
-
const
|
|
1974
|
-
if (console.log("[Paste Event] 粘贴的内容:",
|
|
1975
|
-
const
|
|
1976
|
-
|
|
2100
|
+
g.preventDefault();
|
|
2101
|
+
const h = g.clipboardData.getData("text/plain"), S = window.getSelection();
|
|
2102
|
+
if (S && S.rangeCount > 0) {
|
|
2103
|
+
const I = S.anchorNode;
|
|
2104
|
+
if (I) {
|
|
2105
|
+
let A = null;
|
|
2106
|
+
if (I.nodeType === Node.ELEMENT_NODE ? A = I.closest('[data-type="variable"]') : I.nodeType === Node.TEXT_NODE && I.parentElement && (A = I.parentElement.closest('[data-type="variable"]')), A) {
|
|
2107
|
+
const D = A.dataset.multiKey;
|
|
2108
|
+
if (D) {
|
|
2109
|
+
const _ = /[、,,\s\n\r\t]+/, R = h.split(_).map((M) => M.trim()).filter((M) => M.length > 0);
|
|
2110
|
+
if (console.log("[Paste Event] 粘贴的内容:", h), console.log("[Paste Event] 拆分后的值:", R), R.length > 1) {
|
|
2111
|
+
const M = parseInt(A.dataset.index || "0", 10), j = t.find((ie) => ie.type === "multi-variable" && ie.key === D)?.maxCount || 9, U = re[D] || 1, P = Math.min(M + R.length, j);
|
|
2112
|
+
P > U && d((J) => ({
|
|
1977
2113
|
...J,
|
|
1978
|
-
[
|
|
2114
|
+
[D]: P
|
|
1979
2115
|
}));
|
|
1980
2116
|
const K = [];
|
|
1981
|
-
for (let J = 0; J <
|
|
1982
|
-
const ie = `${
|
|
1983
|
-
`[data-type="variable"][data-key="${ie}"][data-multi-key="${
|
|
2117
|
+
for (let J = 0; J < U; J++) {
|
|
2118
|
+
const ie = `${D}_${J}`, ge = n.current.querySelector(
|
|
2119
|
+
`[data-type="variable"][data-key="${ie}"][data-multi-key="${D}"]`
|
|
1984
2120
|
);
|
|
1985
2121
|
if (ge) {
|
|
1986
2122
|
const ke = ge.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1987
2123
|
K.push(ke);
|
|
1988
2124
|
}
|
|
1989
2125
|
}
|
|
1990
|
-
K.splice(
|
|
2126
|
+
K.splice(M, 1, ...R.slice(0, j - M));
|
|
1991
2127
|
const oe = K.slice(0, j);
|
|
1992
2128
|
oe.length > 0 && oe[oe.length - 1] !== "" && oe.length < j && oe.push("");
|
|
1993
2129
|
const O = Math.max(oe.length, 1), le = {};
|
|
1994
2130
|
oe.forEach((J, ie) => {
|
|
1995
|
-
J && (le[`${
|
|
2131
|
+
J && (le[`${D}_${ie}`] = J);
|
|
1996
2132
|
}), n.current.querySelectorAll(
|
|
1997
2133
|
'[data-type="variable"]'
|
|
1998
2134
|
).forEach((J) => {
|
|
1999
2135
|
const ie = J.dataset.key, ge = J.dataset.multiKey;
|
|
2000
|
-
if (ie && ge !==
|
|
2136
|
+
if (ie && ge !== D) {
|
|
2001
2137
|
const ke = J.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2002
2138
|
ke && (le[ie] = ke);
|
|
2003
2139
|
}
|
|
2004
|
-
}), n.current.__tempVariableValues = le,
|
|
2140
|
+
}), n.current.__tempVariableValues = le, d((J) => ({
|
|
2005
2141
|
...J,
|
|
2006
|
-
[
|
|
2142
|
+
[D]: O
|
|
2007
2143
|
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", oe);
|
|
2008
2144
|
return;
|
|
2009
|
-
} else
|
|
2145
|
+
} else R.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
|
|
2010
2146
|
}
|
|
2011
2147
|
}
|
|
2012
2148
|
}
|
|
2013
2149
|
}
|
|
2014
|
-
document.execCommand("insertText", !1,
|
|
2015
|
-
const
|
|
2016
|
-
if (
|
|
2017
|
-
const
|
|
2018
|
-
if (
|
|
2019
|
-
let
|
|
2020
|
-
if (
|
|
2021
|
-
const
|
|
2022
|
-
/[、,,\s]+/.test(
|
|
2150
|
+
document.execCommand("insertText", !1, h), ye(), setTimeout(() => {
|
|
2151
|
+
const I = window.getSelection();
|
|
2152
|
+
if (I && I.rangeCount > 0) {
|
|
2153
|
+
const A = I.anchorNode;
|
|
2154
|
+
if (A) {
|
|
2155
|
+
let D = null;
|
|
2156
|
+
if (A.nodeType === Node.ELEMENT_NODE ? D = A.closest('[data-type="variable"][data-multi-key]') : A.nodeType === Node.TEXT_NODE && A.parentElement && (D = A.parentElement.closest('[data-type="variable"][data-multi-key]')), D) {
|
|
2157
|
+
const _ = D.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2158
|
+
/[、,,\s]+/.test(_) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", _), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
|
|
2023
2159
|
}
|
|
2024
2160
|
}
|
|
2025
2161
|
}
|
|
2026
2162
|
}, 0);
|
|
2027
|
-
}, ce = (
|
|
2028
|
-
if (
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2163
|
+
}, ce = (g) => {
|
|
2164
|
+
if (g.target.files && g.target.files[0] && m) {
|
|
2165
|
+
const h = g.target.files[0], S = m;
|
|
2166
|
+
f((I) => ({ ...I, [S]: h }));
|
|
2031
2167
|
}
|
|
2032
|
-
|
|
2033
|
-
}, pe = (
|
|
2034
|
-
|
|
2035
|
-
const
|
|
2036
|
-
return delete
|
|
2168
|
+
g.target && (g.target.value = ""), v(null);
|
|
2169
|
+
}, pe = (g) => {
|
|
2170
|
+
f((h) => {
|
|
2171
|
+
const S = { ...h };
|
|
2172
|
+
return delete S[g], S;
|
|
2037
2173
|
});
|
|
2038
|
-
}, fe = (
|
|
2039
|
-
const
|
|
2040
|
-
if (
|
|
2174
|
+
}, fe = (g) => {
|
|
2175
|
+
const h = g.target;
|
|
2176
|
+
if (h.closest(".rte-datepicker-wrapper") || h.closest(".rte-datepicker-host"))
|
|
2041
2177
|
return;
|
|
2042
|
-
if (
|
|
2043
|
-
if (
|
|
2178
|
+
if (h.closest(".tag-close-btn")) {
|
|
2179
|
+
if (g.preventDefault(), g.stopPropagation(), C)
|
|
2044
2180
|
return;
|
|
2045
|
-
|
|
2181
|
+
V(null), k ? k() : n.current && (n.current.innerHTML = "", n.current.focus());
|
|
2046
2182
|
return;
|
|
2047
2183
|
}
|
|
2048
|
-
if (
|
|
2049
|
-
const
|
|
2050
|
-
if (
|
|
2051
|
-
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2184
|
+
if (C) {
|
|
2185
|
+
const A = h.closest(".tag-node"), D = h.closest('[data-type="text"]');
|
|
2186
|
+
if (A || D) {
|
|
2187
|
+
g.preventDefault(), g.stopPropagation();
|
|
2188
|
+
const _ = window.getSelection();
|
|
2189
|
+
_ && _.removeAllRanges();
|
|
2054
2190
|
return;
|
|
2055
2191
|
}
|
|
2056
2192
|
}
|
|
2057
|
-
|
|
2058
|
-
}, be = (
|
|
2059
|
-
if (!
|
|
2060
|
-
const
|
|
2061
|
-
(
|
|
2193
|
+
h.closest('[data-type="variable"]') || (B.current = { x: g.clientX, y: g.clientY }, E.current = !1, h.closest(".file-remove-btn") && (g.preventDefault(), g.stopPropagation()));
|
|
2194
|
+
}, be = (g) => {
|
|
2195
|
+
if (!g.target.closest('[data-type="variable"]') && B.current) {
|
|
2196
|
+
const I = Math.abs(g.clientX - B.current.x), A = Math.abs(g.clientY - B.current.y);
|
|
2197
|
+
(I > 3 || A > 3) && (E.current = !0);
|
|
2062
2198
|
}
|
|
2063
|
-
}, X = (
|
|
2064
|
-
if (
|
|
2065
|
-
|
|
2199
|
+
}, X = (g) => {
|
|
2200
|
+
if (g.target.closest('[data-type="variable"]')) {
|
|
2201
|
+
B.current = null, E.current = !1;
|
|
2066
2202
|
return;
|
|
2067
2203
|
}
|
|
2068
|
-
|
|
2069
|
-
}, ue = (
|
|
2070
|
-
if (
|
|
2204
|
+
B.current = null, E.current = !1;
|
|
2205
|
+
}, ue = (g) => {
|
|
2206
|
+
if (s)
|
|
2071
2207
|
return;
|
|
2072
|
-
const
|
|
2073
|
-
if (
|
|
2208
|
+
const h = g.target;
|
|
2209
|
+
if (h.closest('[data-type="datepicker"]'))
|
|
2074
2210
|
return;
|
|
2075
|
-
if (
|
|
2076
|
-
|
|
2211
|
+
if (h.closest(".tag-close-btn")) {
|
|
2212
|
+
g.preventDefault(), g.stopPropagation();
|
|
2077
2213
|
return;
|
|
2078
2214
|
}
|
|
2079
2215
|
if (t.length === 0)
|
|
2080
2216
|
return;
|
|
2081
|
-
const
|
|
2217
|
+
const A = (P, K) => {
|
|
2082
2218
|
if (!n.current) return;
|
|
2083
2219
|
Array.from(n.current.children).forEach((O) => {
|
|
2084
|
-
if (O !==
|
|
2220
|
+
if (O !== P)
|
|
2085
2221
|
if (K)
|
|
2086
2222
|
O.dataset.prevDisplay === void 0 && (O.dataset.prevDisplay = O.style.display || ""), O.style.setProperty("display", "none", "important");
|
|
2087
2223
|
else if (O.dataset.prevDisplay !== void 0) {
|
|
@@ -2090,13 +2226,13 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2090
2226
|
} else
|
|
2091
2227
|
O.style.removeProperty("display");
|
|
2092
2228
|
});
|
|
2093
|
-
},
|
|
2094
|
-
if (
|
|
2095
|
-
|
|
2096
|
-
const
|
|
2097
|
-
|
|
2098
|
-
const le =
|
|
2099
|
-
if (le ? le.classList.toggle("rte-textarea-overlay", O) :
|
|
2229
|
+
}, D = h.closest(".rte-textarea-toggle");
|
|
2230
|
+
if (D) {
|
|
2231
|
+
g.preventDefault(), g.stopPropagation();
|
|
2232
|
+
const P = D.closest(".rte-textarea-wrapper"), K = P?.querySelector('[data-type="textarea"]'), O = !(D.getAttribute("data-expanded") === "true");
|
|
2233
|
+
D.setAttribute("data-expanded", String(O)), D.textContent = O ? "收起" : "展开", P && P.classList.toggle("rte-textarea-expanded", O);
|
|
2234
|
+
const le = P?.closest(".rte-textarea-required");
|
|
2235
|
+
if (le ? le.classList.toggle("rte-textarea-overlay", O) : P && P.classList.toggle("rte-textarea-overlay", O), K)
|
|
2100
2236
|
if (O)
|
|
2101
2237
|
K.classList.add("rte-textarea-expanded"), K.style.maxHeight = "none", K.style.height = "100%";
|
|
2102
2238
|
else {
|
|
@@ -2107,116 +2243,116 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2107
2243
|
n.current && (O ? n.current.classList.add("rte-overlay-active") : n.current.classList.remove("rte-overlay-active"));
|
|
2108
2244
|
return;
|
|
2109
2245
|
}
|
|
2110
|
-
const
|
|
2111
|
-
if (
|
|
2112
|
-
|
|
2113
|
-
const
|
|
2246
|
+
const _ = h.closest(".rte-richtext-toggle");
|
|
2247
|
+
if (_) {
|
|
2248
|
+
g.preventDefault(), g.stopPropagation();
|
|
2249
|
+
const P = _.closest(".rte-richtext-wrapper"), K = P?.querySelector('[data-type="richtext"]'), O = !(_.getAttribute("data-expanded") === "true");
|
|
2114
2250
|
((ie, ge) => {
|
|
2115
2251
|
ie.setAttribute("data-expanded", String(ge)), ie.innerHTML = ge ? '<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>' : '<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>';
|
|
2116
|
-
})(
|
|
2117
|
-
const me =
|
|
2118
|
-
me ? me.classList.toggle("rte-richtext-expanded", O) :
|
|
2119
|
-
const J =
|
|
2120
|
-
K && (O ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), J && (J.classList.toggle("rte-richtext-host-expanded", O),
|
|
2252
|
+
})(_, O);
|
|
2253
|
+
const me = P?.closest(".rte-richtext-required");
|
|
2254
|
+
me ? me.classList.toggle("rte-richtext-expanded", O) : P && P.classList.toggle("rte-richtext-expanded", O);
|
|
2255
|
+
const J = P?.closest(".exclusion-wrapper") || P?.parentElement;
|
|
2256
|
+
K && (O ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), J && (J.classList.toggle("rte-richtext-host-expanded", O), A(J, O)), n.current && n.current.classList.toggle("rte-richtext-fullscreen-active", O);
|
|
2121
2257
|
return;
|
|
2122
2258
|
}
|
|
2123
|
-
if (
|
|
2124
|
-
|
|
2125
|
-
const
|
|
2126
|
-
|
|
2259
|
+
if (h.closest('[data-type="text"]')) {
|
|
2260
|
+
g.preventDefault(), g.stopPropagation();
|
|
2261
|
+
const P = window.getSelection();
|
|
2262
|
+
P && P.removeAllRanges();
|
|
2127
2263
|
return;
|
|
2128
2264
|
}
|
|
2129
|
-
if (
|
|
2130
|
-
|
|
2265
|
+
if (C && h.closest(".tag-node")) {
|
|
2266
|
+
g.preventDefault(), g.stopPropagation();
|
|
2131
2267
|
const K = window.getSelection();
|
|
2132
2268
|
K && K.removeAllRanges();
|
|
2133
2269
|
return;
|
|
2134
2270
|
}
|
|
2135
|
-
if (
|
|
2136
|
-
if (
|
|
2271
|
+
if (h.closest('[data-type="variable"]')) {
|
|
2272
|
+
if (E.current)
|
|
2137
2273
|
return;
|
|
2138
2274
|
setTimeout(() => {
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2275
|
+
const P = window.getSelection();
|
|
2276
|
+
P && !P.isCollapsed || Be(n);
|
|
2141
2277
|
}, 10);
|
|
2142
2278
|
return;
|
|
2143
2279
|
}
|
|
2144
|
-
const j =
|
|
2280
|
+
const j = h.closest(".file-remove-btn");
|
|
2145
2281
|
if (j) {
|
|
2146
|
-
|
|
2282
|
+
g.preventDefault(), g.stopPropagation();
|
|
2147
2283
|
const K = j.closest('[data-type="upload"]')?.dataset.key;
|
|
2148
2284
|
K && pe(K);
|
|
2149
2285
|
return;
|
|
2150
2286
|
}
|
|
2151
|
-
const
|
|
2152
|
-
if (
|
|
2153
|
-
const
|
|
2154
|
-
|
|
2287
|
+
const U = h.closest('[data-type="upload"]');
|
|
2288
|
+
if (U) {
|
|
2289
|
+
const P = U.dataset.key;
|
|
2290
|
+
P && (v(P), o.current?.click());
|
|
2155
2291
|
return;
|
|
2156
2292
|
}
|
|
2157
|
-
}, he = (
|
|
2158
|
-
const
|
|
2159
|
-
if (
|
|
2160
|
-
const
|
|
2161
|
-
if (
|
|
2162
|
-
const
|
|
2163
|
-
if (
|
|
2164
|
-
let
|
|
2165
|
-
|
|
2166
|
-
const j =
|
|
2167
|
-
j && j.nodeType === Node.TEXT_NODE ? (
|
|
2293
|
+
}, he = (g) => {
|
|
2294
|
+
const S = g.target.closest('[data-type="variable"]');
|
|
2295
|
+
if (S) {
|
|
2296
|
+
const I = window.getSelection();
|
|
2297
|
+
if (I) {
|
|
2298
|
+
const A = document.createRange(), D = S.textContent || "";
|
|
2299
|
+
if (D.replace(/\u200B/g, "")) {
|
|
2300
|
+
let R = 0, M = D.length;
|
|
2301
|
+
D.startsWith("") && (R = 1), D.endsWith("") && D.length > 1 && (M = D.length - 1);
|
|
2302
|
+
const j = S.firstChild;
|
|
2303
|
+
j && j.nodeType === Node.TEXT_NODE ? (A.setStart(j, R), A.setEnd(j, M)) : A.selectNodeContents(S);
|
|
2168
2304
|
} else
|
|
2169
|
-
|
|
2170
|
-
|
|
2305
|
+
A.selectNodeContents(S), A.collapse(!0);
|
|
2306
|
+
I.removeAllRanges(), I.addRange(A);
|
|
2171
2307
|
}
|
|
2172
2308
|
}
|
|
2173
2309
|
}, ye = () => {
|
|
2174
2310
|
if (t.length === 0) {
|
|
2175
2311
|
if (n.current) {
|
|
2176
|
-
const
|
|
2177
|
-
ee(
|
|
2312
|
+
const S = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
|
|
2313
|
+
ee(S), F(!S);
|
|
2178
2314
|
}
|
|
2179
2315
|
return;
|
|
2180
2316
|
}
|
|
2181
|
-
if (
|
|
2182
|
-
const
|
|
2183
|
-
if (
|
|
2184
|
-
let
|
|
2185
|
-
const
|
|
2186
|
-
|
|
2317
|
+
if (Be(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((S) => {
|
|
2318
|
+
const I = S.querySelector(".variable-info-icon");
|
|
2319
|
+
if (I) {
|
|
2320
|
+
let A = !1;
|
|
2321
|
+
const D = document.createTreeWalker(
|
|
2322
|
+
S,
|
|
2187
2323
|
NodeFilter.SHOW_TEXT,
|
|
2188
2324
|
{
|
|
2189
|
-
acceptNode: (
|
|
2325
|
+
acceptNode: (_) => I.contains(_) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
2190
2326
|
}
|
|
2191
2327
|
);
|
|
2192
|
-
for (;
|
|
2193
|
-
if (
|
|
2194
|
-
|
|
2328
|
+
for (; D.nextNode(); )
|
|
2329
|
+
if (D.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
|
|
2330
|
+
A = !0;
|
|
2195
2331
|
break;
|
|
2196
2332
|
}
|
|
2197
|
-
|
|
2198
|
-
}
|
|
2199
|
-
}),
|
|
2200
|
-
t.filter((
|
|
2201
|
-
if (!
|
|
2202
|
-
const
|
|
2203
|
-
for (let j = 0; j <
|
|
2204
|
-
const
|
|
2205
|
-
`[data-type="variable"][data-key="${
|
|
2333
|
+
A ? I.classList.add("hidden") : I.classList.remove("hidden");
|
|
2334
|
+
}
|
|
2335
|
+
}), Oe(n, t, a), He(n, t, a, F), !n.current) return;
|
|
2336
|
+
t.filter((h) => h.type === "multi-variable" && h.key).forEach((h) => {
|
|
2337
|
+
if (!h.key) return;
|
|
2338
|
+
const S = h.maxCount || 9, I = re[h.key] || 1, A = [];
|
|
2339
|
+
for (let j = 0; j < I; j++) {
|
|
2340
|
+
const U = `${h.key}_${j}`, P = n.current.querySelector(
|
|
2341
|
+
`[data-type="variable"][data-key="${U}"][data-multi-key="${h.key}"]`
|
|
2206
2342
|
);
|
|
2207
|
-
if (
|
|
2208
|
-
const K =
|
|
2209
|
-
|
|
2343
|
+
if (P) {
|
|
2344
|
+
const K = P.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2345
|
+
A.push(K);
|
|
2210
2346
|
}
|
|
2211
2347
|
}
|
|
2212
|
-
const
|
|
2213
|
-
let
|
|
2214
|
-
for (let j = 0; j <
|
|
2215
|
-
if (
|
|
2216
|
-
|
|
2348
|
+
const _ = (A[A.length - 1] || "") === "";
|
|
2349
|
+
let R = !1, M = -1;
|
|
2350
|
+
for (let j = 0; j < A.length - 1; j++)
|
|
2351
|
+
if (A[j] === "") {
|
|
2352
|
+
R = !0, M = j;
|
|
2217
2353
|
break;
|
|
2218
2354
|
}
|
|
2219
|
-
if (
|
|
2355
|
+
if (R && M >= 0) {
|
|
2220
2356
|
const j = window.getSelection();
|
|
2221
2357
|
if (j && j.rangeCount > 0) {
|
|
2222
2358
|
const O = j.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
@@ -2226,38 +2362,38 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2226
2362
|
const ie = document.createRange();
|
|
2227
2363
|
ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
|
|
2228
2364
|
const ge = ie.toString().length;
|
|
2229
|
-
|
|
2365
|
+
W.current = { key: J, offset: ge };
|
|
2230
2366
|
}
|
|
2231
2367
|
}
|
|
2232
2368
|
}
|
|
2233
|
-
const
|
|
2234
|
-
for (let O =
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2239
|
-
O && (
|
|
2369
|
+
const U = [...A];
|
|
2370
|
+
for (let O = M; O < U.length - 1; O++)
|
|
2371
|
+
U[O] = U[O + 1];
|
|
2372
|
+
U.pop();
|
|
2373
|
+
const P = {};
|
|
2374
|
+
U.forEach((O, le) => {
|
|
2375
|
+
O && (P[`${h.key}_${le}`] = O);
|
|
2240
2376
|
});
|
|
2241
|
-
const K = Math.max(
|
|
2377
|
+
const K = Math.max(_ ? U.length : U.length + 1, 1);
|
|
2242
2378
|
n.current.querySelectorAll(
|
|
2243
2379
|
'[data-type="variable"]'
|
|
2244
2380
|
).forEach((O) => {
|
|
2245
2381
|
const le = O.dataset.key, me = O.dataset.multiKey;
|
|
2246
|
-
if (le && me !==
|
|
2382
|
+
if (le && me !== h.key) {
|
|
2247
2383
|
const J = O.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2248
|
-
J && (
|
|
2384
|
+
J && (P[le] = J);
|
|
2249
2385
|
}
|
|
2250
|
-
}), n.current.__tempVariableValues =
|
|
2386
|
+
}), n.current.__tempVariableValues = P, d((O) => ({
|
|
2251
2387
|
...O,
|
|
2252
|
-
[
|
|
2388
|
+
[h.key]: K
|
|
2253
2389
|
}));
|
|
2254
2390
|
return;
|
|
2255
2391
|
}
|
|
2256
|
-
if (!
|
|
2257
|
-
const j =
|
|
2258
|
-
`[data-type="variable"][data-key="${
|
|
2392
|
+
if (!_) {
|
|
2393
|
+
const j = I - 1, U = `${h.key}_${j}`, P = n.current.querySelector(
|
|
2394
|
+
`[data-type="variable"][data-key="${U}"][data-multi-key="${h.key}"]`
|
|
2259
2395
|
);
|
|
2260
|
-
if (
|
|
2396
|
+
if (P && P.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && I < S) {
|
|
2261
2397
|
const oe = window.getSelection();
|
|
2262
2398
|
if (oe && oe.rangeCount > 0) {
|
|
2263
2399
|
const O = oe.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
@@ -2267,292 +2403,292 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2267
2403
|
const ie = document.createRange();
|
|
2268
2404
|
ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
|
|
2269
2405
|
const ge = ie.toString().length;
|
|
2270
|
-
|
|
2406
|
+
W.current = { key: J, offset: ge };
|
|
2271
2407
|
}
|
|
2272
2408
|
}
|
|
2273
2409
|
}
|
|
2274
|
-
|
|
2410
|
+
d((O) => ({
|
|
2275
2411
|
...O,
|
|
2276
|
-
[
|
|
2412
|
+
[h.key]: I + 1
|
|
2277
2413
|
}));
|
|
2278
2414
|
}
|
|
2279
2415
|
}
|
|
2280
2416
|
});
|
|
2281
2417
|
};
|
|
2282
|
-
|
|
2283
|
-
const
|
|
2284
|
-
if (!
|
|
2285
|
-
const
|
|
2286
|
-
const
|
|
2287
|
-
!
|
|
2418
|
+
je(() => {
|
|
2419
|
+
const g = n.current;
|
|
2420
|
+
if (!g) return;
|
|
2421
|
+
const h = /* @__PURE__ */ new Map(), S = (D) => {
|
|
2422
|
+
const _ = D.target, R = D.relatedTarget;
|
|
2423
|
+
!_ || !n.current || !n.current.contains(_) || R && n.current.contains(R) || setTimeout(() => {
|
|
2288
2424
|
if (n.current) {
|
|
2289
2425
|
if (t.length === 0) {
|
|
2290
|
-
const
|
|
2291
|
-
F(
|
|
2426
|
+
const M = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
2427
|
+
F(M.length > 0);
|
|
2292
2428
|
return;
|
|
2293
2429
|
}
|
|
2294
|
-
|
|
2430
|
+
Be(n), Oe(n, t, a), He(n, t, a, F);
|
|
2295
2431
|
}
|
|
2296
2432
|
}, 0);
|
|
2297
2433
|
};
|
|
2298
|
-
|
|
2299
|
-
const
|
|
2434
|
+
g.addEventListener("blur", S, !0);
|
|
2435
|
+
const I = () => {
|
|
2300
2436
|
if (!n.current) return;
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
}),
|
|
2304
|
-
const
|
|
2437
|
+
h.forEach((R, M) => {
|
|
2438
|
+
M.removeEventListener("blur", R, !1);
|
|
2439
|
+
}), h.clear();
|
|
2440
|
+
const D = n.current.querySelectorAll(
|
|
2305
2441
|
'[data-type="variable"][data-multi-key]'
|
|
2306
|
-
),
|
|
2307
|
-
|
|
2308
|
-
const
|
|
2309
|
-
if (!
|
|
2442
|
+
), _ = (R) => {
|
|
2443
|
+
R.stopPropagation(), R.stopImmediatePropagation();
|
|
2444
|
+
const M = R.target;
|
|
2445
|
+
if (!M || !n.current || !n.current.contains(M))
|
|
2310
2446
|
return;
|
|
2311
|
-
const j =
|
|
2447
|
+
const j = M.closest('[data-type="variable"][data-multi-key]');
|
|
2312
2448
|
if (!j || !n.current.contains(j))
|
|
2313
2449
|
return;
|
|
2314
|
-
let
|
|
2315
|
-
if (
|
|
2316
|
-
(ge === j || ge.contains(
|
|
2317
|
-
}), !
|
|
2450
|
+
let U = !1;
|
|
2451
|
+
if (h.forEach((ie, ge) => {
|
|
2452
|
+
(ge === j || ge.contains(M)) && (U = !0);
|
|
2453
|
+
}), !U)
|
|
2318
2454
|
return;
|
|
2319
|
-
const
|
|
2320
|
-
if (!
|
|
2321
|
-
const O =
|
|
2455
|
+
const P = j.dataset.multiKey, K = j.dataset.key, oe = j.dataset.index;
|
|
2456
|
+
if (!P || !K || oe === void 0) return;
|
|
2457
|
+
const O = R.relatedTarget;
|
|
2322
2458
|
if (!(!O || !n.current.contains(O)))
|
|
2323
2459
|
return;
|
|
2324
2460
|
const me = j.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2325
2461
|
console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
|
|
2326
|
-
multiKey:
|
|
2462
|
+
multiKey: P,
|
|
2327
2463
|
currentKey: K,
|
|
2328
2464
|
index: oe,
|
|
2329
2465
|
content: me
|
|
2330
2466
|
});
|
|
2331
2467
|
const J = /[、,,\s]+/;
|
|
2332
2468
|
if (J.test(me)) {
|
|
2333
|
-
const ie = me.split(J).map((
|
|
2469
|
+
const ie = me.split(J).map((Se) => Se.trim()).filter((Se) => Se.length > 0);
|
|
2334
2470
|
console.log("[Blur Event] 拆分前的内容:", me), console.log("[Blur Event] 拆分后的部分:", ie);
|
|
2335
2471
|
const ke = ie.slice(0, 9);
|
|
2336
2472
|
if (console.log("[Blur Event] 有效的部分(最多9个):", ke), ke.length > 1) {
|
|
2337
|
-
const
|
|
2338
|
-
if (
|
|
2339
|
-
const
|
|
2340
|
-
for (let ve = 0; ve <
|
|
2341
|
-
const
|
|
2342
|
-
`[data-type="variable"][data-key="${
|
|
2473
|
+
const Se = t.find((Ne) => Ne.type === "multi-variable" && Ne.key === P);
|
|
2474
|
+
if (Se) {
|
|
2475
|
+
const Ne = re[P] || 1, Ye = parseInt(oe, 10), ze = Se.maxCount || 9, Ae = [];
|
|
2476
|
+
for (let ve = 0; ve < Ne; ve++) {
|
|
2477
|
+
const Te = `${P}_${ve}`, _e = n.current.querySelector(
|
|
2478
|
+
`[data-type="variable"][data-key="${Te}"][data-multi-key="${P}"]`
|
|
2343
2479
|
);
|
|
2344
|
-
if (
|
|
2345
|
-
const Le =
|
|
2346
|
-
|
|
2480
|
+
if (_e) {
|
|
2481
|
+
const Le = _e.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2482
|
+
Ae.push(Le);
|
|
2347
2483
|
}
|
|
2348
2484
|
}
|
|
2349
|
-
console.log("[Blur Event] 拆分前的所有值:",
|
|
2350
|
-
const Ee =
|
|
2351
|
-
console.log("[Blur Event] 拆分后的所有值:", Ee), Ee.length > 0 && Ee[Ee.length - 1] !== "" && Ee.length <
|
|
2352
|
-
const
|
|
2353
|
-
Ee.forEach((ve,
|
|
2354
|
-
ve && (
|
|
2485
|
+
console.log("[Blur Event] 拆分前的所有值:", Ae), console.log("[Blur Event] 当前索引:", Ye), console.log("[Blur Event] 要插入的值:", ke), Ae.splice(Ye, 1, ...ke);
|
|
2486
|
+
const Ee = Ae.slice(0, ze);
|
|
2487
|
+
console.log("[Blur Event] 拆分后的所有值:", Ee), Ee.length > 0 && Ee[Ee.length - 1] !== "" && Ee.length < ze && Ee.push("");
|
|
2488
|
+
const ot = Math.max(Ee.length, 1), Pe = {};
|
|
2489
|
+
Ee.forEach((ve, Te) => {
|
|
2490
|
+
ve && (Pe[`${P}_${Te}`] = ve);
|
|
2355
2491
|
}), n.current.querySelectorAll(
|
|
2356
2492
|
'[data-type="variable"]'
|
|
2357
2493
|
).forEach((ve) => {
|
|
2358
|
-
const
|
|
2359
|
-
if (
|
|
2494
|
+
const Te = ve.dataset.key, _e = ve.dataset.multiKey;
|
|
2495
|
+
if (Te && _e !== P) {
|
|
2360
2496
|
const Le = ve.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2361
|
-
Le && (
|
|
2497
|
+
Le && (Pe[Te] = Le);
|
|
2362
2498
|
}
|
|
2363
|
-
}), n.current.__tempVariableValues =
|
|
2499
|
+
}), n.current.__tempVariableValues = Pe, d((ve) => ({
|
|
2364
2500
|
...ve,
|
|
2365
|
-
[
|
|
2501
|
+
[P]: ot
|
|
2366
2502
|
}));
|
|
2367
2503
|
}
|
|
2368
2504
|
}
|
|
2369
2505
|
}
|
|
2370
2506
|
};
|
|
2371
|
-
|
|
2372
|
-
|
|
2507
|
+
D.forEach((R) => {
|
|
2508
|
+
R.addEventListener("blur", _, !1), h.set(R, _);
|
|
2373
2509
|
});
|
|
2374
|
-
},
|
|
2375
|
-
|
|
2510
|
+
}, A = setTimeout(() => {
|
|
2511
|
+
I();
|
|
2376
2512
|
}, 0);
|
|
2377
2513
|
return () => {
|
|
2378
|
-
clearTimeout(
|
|
2379
|
-
|
|
2380
|
-
}),
|
|
2514
|
+
clearTimeout(A), g.removeEventListener("blur", S, !0), h.forEach((D, _) => {
|
|
2515
|
+
_.removeEventListener("blur", D, !1);
|
|
2516
|
+
}), h.clear();
|
|
2381
2517
|
};
|
|
2382
2518
|
}, [t, re, a]);
|
|
2383
|
-
const xe = (
|
|
2384
|
-
if (
|
|
2385
|
-
|
|
2519
|
+
const xe = (g) => {
|
|
2520
|
+
if (s) {
|
|
2521
|
+
g.preventDefault();
|
|
2386
2522
|
return;
|
|
2387
2523
|
}
|
|
2388
|
-
const
|
|
2389
|
-
if (
|
|
2390
|
-
const
|
|
2391
|
-
let
|
|
2392
|
-
if (
|
|
2393
|
-
if (
|
|
2394
|
-
const
|
|
2524
|
+
const h = window.getSelection();
|
|
2525
|
+
if (h && h.rangeCount > 0) {
|
|
2526
|
+
const S = h.anchorNode;
|
|
2527
|
+
let I = null;
|
|
2528
|
+
if (S && (S.nodeType === Node.ELEMENT_NODE ? I = S.closest('[data-type="text"]') : S.nodeType === Node.TEXT_NODE && S.parentElement && (I = S.parentElement.closest('[data-type="text"]'))), I) {
|
|
2529
|
+
if (g.preventDefault(), g.stopPropagation(), n.current) {
|
|
2530
|
+
const A = n.current.querySelector(
|
|
2395
2531
|
'[data-type="variable"], [data-type="upload"]'
|
|
2396
2532
|
);
|
|
2397
|
-
|
|
2533
|
+
A && A.focus();
|
|
2398
2534
|
}
|
|
2399
2535
|
return;
|
|
2400
2536
|
}
|
|
2401
2537
|
}
|
|
2402
|
-
if (
|
|
2403
|
-
const
|
|
2404
|
-
let
|
|
2405
|
-
if (
|
|
2406
|
-
if (
|
|
2407
|
-
const
|
|
2538
|
+
if (C && h && h.rangeCount > 0) {
|
|
2539
|
+
const S = h.anchorNode;
|
|
2540
|
+
let I = null;
|
|
2541
|
+
if (S && (S.nodeType === Node.ELEMENT_NODE ? I = S.closest(".tag-node") : S.nodeType === Node.TEXT_NODE && S.parentElement && (I = S.parentElement.closest(".tag-node"))), I) {
|
|
2542
|
+
if (g.preventDefault(), g.stopPropagation(), n.current) {
|
|
2543
|
+
const A = n.current.querySelector(
|
|
2408
2544
|
'[data-type="variable"], [data-type="upload"]'
|
|
2409
2545
|
);
|
|
2410
|
-
|
|
2546
|
+
A && A.focus();
|
|
2411
2547
|
}
|
|
2412
2548
|
return;
|
|
2413
2549
|
}
|
|
2414
2550
|
}
|
|
2415
|
-
if (
|
|
2416
|
-
if (
|
|
2417
|
-
|
|
2551
|
+
if (g.key === "Enter" && !g.shiftKey && (g.preventDefault(), we()), g.key === "Escape" && n.current) {
|
|
2552
|
+
if (C) {
|
|
2553
|
+
g.preventDefault();
|
|
2418
2554
|
return;
|
|
2419
2555
|
}
|
|
2420
2556
|
n.current.innerHTML = "", n.current.focus();
|
|
2421
2557
|
}
|
|
2422
|
-
if (
|
|
2423
|
-
const
|
|
2424
|
-
if (
|
|
2425
|
-
const
|
|
2426
|
-
if (
|
|
2427
|
-
let
|
|
2428
|
-
if (
|
|
2429
|
-
|
|
2558
|
+
if (g.key === "Backspace") {
|
|
2559
|
+
const S = window.getSelection();
|
|
2560
|
+
if (S && S.rangeCount > 0) {
|
|
2561
|
+
const I = S.getRangeAt(0), A = S.anchorNode;
|
|
2562
|
+
if (C) {
|
|
2563
|
+
let _ = null, R = null;
|
|
2564
|
+
if (A && (A.nodeType === Node.ELEMENT_NODE ? (_ = A.closest(".tag-node"), R = A.closest('[data-type="text"]')) : A.nodeType === Node.TEXT_NODE && A.parentElement && (_ = A.parentElement.closest(".tag-node"), R = A.parentElement.closest('[data-type="text"]'))), (_ || R) && I.collapsed && I.startOffset === 0) {
|
|
2565
|
+
g.preventDefault();
|
|
2430
2566
|
return;
|
|
2431
2567
|
}
|
|
2432
2568
|
}
|
|
2433
|
-
let
|
|
2434
|
-
if (
|
|
2569
|
+
let D = null;
|
|
2570
|
+
if (A && (A.nodeType === Node.ELEMENT_NODE ? D = A.closest(
|
|
2435
2571
|
'[data-type="variable"]'
|
|
2436
|
-
) :
|
|
2572
|
+
) : A.nodeType === Node.TEXT_NODE && A.parentElement && (D = A.parentElement.closest(
|
|
2437
2573
|
'[data-type="variable"]'
|
|
2438
|
-
))),
|
|
2439
|
-
if (!
|
|
2574
|
+
))), D) {
|
|
2575
|
+
if (!I.collapsed)
|
|
2440
2576
|
return;
|
|
2441
|
-
const
|
|
2442
|
-
if (
|
|
2443
|
-
|
|
2577
|
+
const _ = D.innerText;
|
|
2578
|
+
if (_ === "" || _ === "") {
|
|
2579
|
+
g.preventDefault();
|
|
2444
2580
|
return;
|
|
2445
2581
|
}
|
|
2446
|
-
if (
|
|
2447
|
-
|
|
2582
|
+
if (I.startOffset === 0) {
|
|
2583
|
+
g.preventDefault();
|
|
2448
2584
|
return;
|
|
2449
2585
|
}
|
|
2450
|
-
if (
|
|
2451
|
-
|
|
2586
|
+
if (_.startsWith("") && I.startOffset === 1) {
|
|
2587
|
+
g.preventDefault();
|
|
2452
2588
|
return;
|
|
2453
2589
|
}
|
|
2454
2590
|
}
|
|
2455
2591
|
}
|
|
2456
2592
|
}
|
|
2457
2593
|
}, we = () => {
|
|
2458
|
-
if (
|
|
2594
|
+
if (l || s || e || !G || !n.current) return;
|
|
2459
2595
|
if (t.length === 0) {
|
|
2460
|
-
const
|
|
2461
|
-
if (!
|
|
2462
|
-
|
|
2596
|
+
const D = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
2597
|
+
if (!D) return;
|
|
2598
|
+
c(D, D);
|
|
2463
2599
|
return;
|
|
2464
2600
|
}
|
|
2465
|
-
const
|
|
2466
|
-
let
|
|
2467
|
-
const
|
|
2468
|
-
if (!(
|
|
2469
|
-
if (
|
|
2470
|
-
|
|
2471
|
-
else if (
|
|
2472
|
-
const
|
|
2473
|
-
if (
|
|
2601
|
+
const g = n.current;
|
|
2602
|
+
let h = "";
|
|
2603
|
+
const S = {}, I = (D) => {
|
|
2604
|
+
if (!(D.nodeType === Node.ELEMENT_NODE && D.style.display === "none")) {
|
|
2605
|
+
if (D.nodeType === Node.TEXT_NODE)
|
|
2606
|
+
h += (D.textContent || "").replace(/\u200B/g, "");
|
|
2607
|
+
else if (D.nodeType === Node.ELEMENT_NODE) {
|
|
2608
|
+
const _ = D, R = _.dataset.type, M = _.dataset.key;
|
|
2609
|
+
if (R === "variable" && M) {
|
|
2474
2610
|
let j = "";
|
|
2475
|
-
const
|
|
2476
|
-
|
|
2611
|
+
const U = document.createTreeWalker(
|
|
2612
|
+
_,
|
|
2477
2613
|
NodeFilter.SHOW_TEXT,
|
|
2478
2614
|
{
|
|
2479
2615
|
acceptNode: (K) => {
|
|
2480
|
-
const oe =
|
|
2616
|
+
const oe = _.querySelector(".variable-info-icon");
|
|
2481
2617
|
return oe && oe.contains(K) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
2482
2618
|
}
|
|
2483
2619
|
}
|
|
2484
2620
|
);
|
|
2485
|
-
for (;
|
|
2486
|
-
j +=
|
|
2487
|
-
const
|
|
2488
|
-
if (
|
|
2489
|
-
const K =
|
|
2621
|
+
for (; U.nextNode(); )
|
|
2622
|
+
j += U.currentNode.textContent || "";
|
|
2623
|
+
const P = j.replace(/[\u200B\n]/g, "").trim();
|
|
2624
|
+
if (P) {
|
|
2625
|
+
const K = _.dataset.multiKey;
|
|
2490
2626
|
if (K) {
|
|
2491
|
-
(!
|
|
2492
|
-
const oe =
|
|
2493
|
-
oe.push(
|
|
2627
|
+
(!S[K] || !Array.isArray(S[K])) && (S[K] = []);
|
|
2628
|
+
const oe = S[K];
|
|
2629
|
+
oe.push(P), oe.length > 1 && (h += " "), h += P;
|
|
2494
2630
|
} else
|
|
2495
|
-
|
|
2631
|
+
S[M] = P, h += P;
|
|
2496
2632
|
}
|
|
2497
|
-
} else if (
|
|
2498
|
-
const j =
|
|
2499
|
-
if (
|
|
2500
|
-
|
|
2501
|
-
const
|
|
2502
|
-
|
|
2633
|
+
} else if (R === "select" && M) {
|
|
2634
|
+
const j = _, U = (j.value || "").trim();
|
|
2635
|
+
if (U) {
|
|
2636
|
+
S[M] = U;
|
|
2637
|
+
const P = j.selectedOptions?.[0];
|
|
2638
|
+
h += P?.textContent || U;
|
|
2503
2639
|
}
|
|
2504
|
-
} else if (
|
|
2505
|
-
const
|
|
2506
|
-
|
|
2507
|
-
} else if (
|
|
2508
|
-
const
|
|
2509
|
-
|
|
2510
|
-
} else if (
|
|
2511
|
-
const
|
|
2512
|
-
if (
|
|
2513
|
-
if (
|
|
2514
|
-
const
|
|
2515
|
-
|
|
2640
|
+
} else if (R === "textarea" && M) {
|
|
2641
|
+
const U = (_.value || "").replace(/\u200B/g, "").trim();
|
|
2642
|
+
U && (S[M] = U, h += U);
|
|
2643
|
+
} else if (R === "richtext" && M) {
|
|
2644
|
+
const U = (_.textContent || "").replace(/\u200B/g, "").trim();
|
|
2645
|
+
U && (S[M] = U, h += U);
|
|
2646
|
+
} else if (R === "datepicker" && M) {
|
|
2647
|
+
const U = (_.getAttribute("data-value") || "").trim();
|
|
2648
|
+
if (U)
|
|
2649
|
+
if (U.includes(",")) {
|
|
2650
|
+
const P = U.split(",");
|
|
2651
|
+
P.length === 2 ? (S[M] = P, h += `[${P[0]}, ${P[1]}]`) : (S[M] = U, h += U);
|
|
2516
2652
|
} else
|
|
2517
|
-
|
|
2518
|
-
} else if (
|
|
2519
|
-
|
|
2653
|
+
S[M] = U, h += U;
|
|
2654
|
+
} else if (R === "upload" && M)
|
|
2655
|
+
S[M] = a[M] ?? null, a[M] && (h += ` [附带文件: ${a[M]?.name}] `);
|
|
2520
2656
|
else {
|
|
2521
|
-
if (
|
|
2522
|
-
|
|
2657
|
+
if (_.classList.contains("tag-close-btn") || _.classList.contains("file-remove-btn")) return;
|
|
2658
|
+
_.getAttribute("contenteditable") === "false" && !R && _.classList.contains("tag-node") ? h += _.innerText : _.childNodes.forEach(I);
|
|
2523
2659
|
}
|
|
2524
2660
|
}
|
|
2525
2661
|
}
|
|
2526
2662
|
};
|
|
2527
|
-
if (
|
|
2528
|
-
const
|
|
2529
|
-
|
|
2530
|
-
const
|
|
2531
|
-
|
|
2532
|
-
(
|
|
2533
|
-
) ?
|
|
2534
|
-
|
|
2535
|
-
}) :
|
|
2536
|
-
|
|
2537
|
-
}) : typeof
|
|
2538
|
-
}),
|
|
2663
|
+
if (g.childNodes.forEach(I), h = h.trim(), !h) return;
|
|
2664
|
+
const A = new FormData();
|
|
2665
|
+
A.append("fullPrompt", h), Object.keys(S).forEach((D) => {
|
|
2666
|
+
const _ = S[D];
|
|
2667
|
+
_ != null && (_ instanceof File ? A.append(D, _) : Array.isArray(_) ? t.some(
|
|
2668
|
+
(M) => M.type === "multi-variable" && M.key === D
|
|
2669
|
+
) ? _.forEach((M) => {
|
|
2670
|
+
M != null && M !== "" && A.append(D, String(M));
|
|
2671
|
+
}) : _.forEach((M, j) => {
|
|
2672
|
+
M != null && (M instanceof File ? A.append(`${D}[${j}]`, M) : typeof M == "string" ? A.append(`${D}[${j}]`, M) : A.append(`${D}[${j}]`, String(M)));
|
|
2673
|
+
}) : typeof _ == "string" ? A.append(D, _) : A.append(D, String(_)));
|
|
2674
|
+
}), c(A, h);
|
|
2539
2675
|
}, Ce = {
|
|
2540
|
-
...
|
|
2676
|
+
...u ? { width: typeof u == "number" ? `${u}px` : u } : {},
|
|
2541
2677
|
...y ? { border: y } : {},
|
|
2542
|
-
...
|
|
2678
|
+
...i ? { background: i } : {}
|
|
2543
2679
|
};
|
|
2544
2680
|
return /* @__PURE__ */ Z(
|
|
2545
2681
|
"div",
|
|
2546
2682
|
{
|
|
2547
2683
|
className: "rich-text-editor",
|
|
2548
2684
|
style: Ce,
|
|
2549
|
-
"data-disabled":
|
|
2685
|
+
"data-disabled": s,
|
|
2550
2686
|
children: [
|
|
2551
|
-
/* @__PURE__ */
|
|
2687
|
+
/* @__PURE__ */ $(
|
|
2552
2688
|
"div",
|
|
2553
2689
|
{
|
|
2554
2690
|
ref: n,
|
|
2555
|
-
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${
|
|
2691
|
+
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${H && q ? "rte-editor-empty" : ""}`,
|
|
2556
2692
|
contentEditable: t.length === 0,
|
|
2557
2693
|
suppressContentEditableWarning: !0,
|
|
2558
2694
|
"data-placeholder": q,
|
|
@@ -2566,7 +2702,7 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2566
2702
|
onPaste: se
|
|
2567
2703
|
}
|
|
2568
2704
|
),
|
|
2569
|
-
/* @__PURE__ */
|
|
2705
|
+
/* @__PURE__ */ $(
|
|
2570
2706
|
"input",
|
|
2571
2707
|
{
|
|
2572
2708
|
type: "file",
|
|
@@ -2577,109 +2713,109 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2577
2713
|
}
|
|
2578
2714
|
),
|
|
2579
2715
|
/* @__PURE__ */ Z("div", { className: "rich-text-editor-footer", children: [
|
|
2580
|
-
/* @__PURE__ */
|
|
2716
|
+
/* @__PURE__ */ $("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ Z("div", { className: "rich-text-editor-brand", children: [
|
|
2581
2717
|
/* @__PURE__ */ Z("div", { className: "rte-brand-badge", children: [
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
-
/* @__PURE__ */
|
|
2718
|
+
/* @__PURE__ */ $("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
|
|
2719
|
+
/* @__PURE__ */ $("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
|
|
2584
2720
|
] }),
|
|
2585
|
-
r !== "hideAgent" && /* @__PURE__ */
|
|
2586
|
-
|
|
2721
|
+
r !== "hideAgent" && /* @__PURE__ */ $(
|
|
2722
|
+
pt,
|
|
2587
2723
|
{
|
|
2588
2724
|
placement: "top",
|
|
2589
2725
|
menu: {
|
|
2590
|
-
items:
|
|
2591
|
-
key:
|
|
2726
|
+
items: T.map((g) => ({
|
|
2727
|
+
key: g.key,
|
|
2592
2728
|
label: /* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2593
|
-
|
|
2594
|
-
/* @__PURE__ */
|
|
2729
|
+
g.icon && /* @__PURE__ */ $("i", { className: g.icon }),
|
|
2730
|
+
/* @__PURE__ */ $("span", { children: g.label })
|
|
2595
2731
|
] }),
|
|
2596
2732
|
onClick: () => {
|
|
2597
|
-
|
|
2733
|
+
w?.(g);
|
|
2598
2734
|
}
|
|
2599
2735
|
}))
|
|
2600
2736
|
},
|
|
2601
2737
|
trigger: ["click"],
|
|
2602
|
-
disabled:
|
|
2603
|
-
children: /* @__PURE__ */ Z("div", { className: "rte-agent-badge", style: { cursor:
|
|
2604
|
-
/* @__PURE__ */
|
|
2605
|
-
/* @__PURE__ */
|
|
2738
|
+
disabled: s || l,
|
|
2739
|
+
children: /* @__PURE__ */ Z("div", { className: "rte-agent-badge", style: { cursor: T.length > 0 ? "pointer" : "default" }, children: [
|
|
2740
|
+
/* @__PURE__ */ $("i", { className: "iconfont icon-zhinengti" }),
|
|
2741
|
+
/* @__PURE__ */ $("span", { className: "rte-agent-text", children: "智能体" })
|
|
2606
2742
|
] })
|
|
2607
2743
|
}
|
|
2608
2744
|
)
|
|
2609
2745
|
] }) }),
|
|
2610
2746
|
/* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2611
2747
|
(() => {
|
|
2612
|
-
const
|
|
2613
|
-
if (!
|
|
2614
|
-
const
|
|
2615
|
-
return !
|
|
2616
|
-
/* @__PURE__ */
|
|
2748
|
+
const g = t.find((S) => S.type === "tag");
|
|
2749
|
+
if (!g || !g.text) return null;
|
|
2750
|
+
const h = T.find((S) => S.label === g.text);
|
|
2751
|
+
return !h || h.points === void 0 || h.points === null ? null : /* @__PURE__ */ Z("div", { className: "rte-points-badge", children: [
|
|
2752
|
+
/* @__PURE__ */ $("i", { className: "iconfont icon-jifen", style: { marginRight: "4px" } }),
|
|
2617
2753
|
/* @__PURE__ */ Z("span", { style: { fontSize: "16px" }, children: [
|
|
2618
2754
|
"-",
|
|
2619
|
-
String(
|
|
2755
|
+
String(h.points)
|
|
2620
2756
|
] })
|
|
2621
2757
|
] });
|
|
2622
2758
|
})(),
|
|
2623
|
-
/* @__PURE__ */
|
|
2759
|
+
/* @__PURE__ */ $(
|
|
2624
2760
|
"button",
|
|
2625
2761
|
{
|
|
2626
2762
|
type: "button",
|
|
2627
2763
|
onClick: we,
|
|
2628
|
-
disabled:
|
|
2764
|
+
disabled: l || s || e || !G,
|
|
2629
2765
|
className: "rich-text-editor-send-button",
|
|
2630
|
-
children:
|
|
2766
|
+
children: l || e ? /* @__PURE__ */ $("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ $("i", { className: "iconfont icon-fasong" })
|
|
2631
2767
|
}
|
|
2632
2768
|
)
|
|
2633
2769
|
] })
|
|
2634
2770
|
] }),
|
|
2635
|
-
|
|
2636
|
-
if (!document.body.contains(
|
|
2771
|
+
x?.anchorEl && (() => {
|
|
2772
|
+
if (!document.body.contains(x.anchorEl))
|
|
2637
2773
|
return null;
|
|
2638
|
-
let
|
|
2774
|
+
let g = "", h = {
|
|
2639
2775
|
background: "var(--neutral-800, #262626)"
|
|
2640
2776
|
};
|
|
2641
|
-
if (
|
|
2642
|
-
|
|
2643
|
-
(
|
|
2777
|
+
if (x.type === "upload")
|
|
2778
|
+
g = t.find(
|
|
2779
|
+
(A) => A.type === "upload" && A.key === x.key
|
|
2644
2780
|
)?.tooltip || "";
|
|
2645
|
-
else if (
|
|
2646
|
-
|
|
2647
|
-
else if (
|
|
2648
|
-
|
|
2649
|
-
else if (
|
|
2650
|
-
|
|
2651
|
-
else if (
|
|
2652
|
-
const
|
|
2653
|
-
if (
|
|
2654
|
-
const
|
|
2655
|
-
|
|
2781
|
+
else if (x.type === "tag")
|
|
2782
|
+
g = x.anchorEl.dataset.tooltip || "";
|
|
2783
|
+
else if (x.type === "upload-label")
|
|
2784
|
+
g = x.anchorEl.dataset.fileName || "";
|
|
2785
|
+
else if (x.type === "variable")
|
|
2786
|
+
g = x.anchorEl.dataset.tooltip || "";
|
|
2787
|
+
else if (x.type === "upload-preview") {
|
|
2788
|
+
const I = a[x.key];
|
|
2789
|
+
if (I && I.type && I.type.startsWith("image/")) {
|
|
2790
|
+
const A = URL.createObjectURL(I);
|
|
2791
|
+
g = /* @__PURE__ */ $("div", { style: { width: 120, height: 120, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ $("img", { src: A, style: { maxWidth: 120, maxHeight: 120, objectFit: "contain" } }) }), h = {
|
|
2656
2792
|
background: "#fff",
|
|
2657
2793
|
padding: 4
|
|
2658
|
-
}, setTimeout(() => URL.revokeObjectURL(
|
|
2794
|
+
}, setTimeout(() => URL.revokeObjectURL(A), 1e3);
|
|
2659
2795
|
} else
|
|
2660
|
-
|
|
2796
|
+
g = "";
|
|
2661
2797
|
}
|
|
2662
|
-
if (!
|
|
2663
|
-
const
|
|
2664
|
-
return
|
|
2665
|
-
/* @__PURE__ */
|
|
2666
|
-
|
|
2798
|
+
if (!g) return null;
|
|
2799
|
+
const S = x.type === "upload-preview" ? "#0A0A0A" : "#fff";
|
|
2800
|
+
return tt(
|
|
2801
|
+
/* @__PURE__ */ $(
|
|
2802
|
+
ft,
|
|
2667
2803
|
{
|
|
2668
2804
|
arrow: !1,
|
|
2669
|
-
title: /* @__PURE__ */
|
|
2805
|
+
title: /* @__PURE__ */ $("div", { style: { maxWidth: "200px", fontSize: "12px", color: S }, children: g }),
|
|
2670
2806
|
open: !0,
|
|
2671
2807
|
placement: "top",
|
|
2672
2808
|
getPopupContainer: () => document.body,
|
|
2673
|
-
overlayInnerStyle:
|
|
2674
|
-
children: /* @__PURE__ */
|
|
2809
|
+
overlayInnerStyle: h,
|
|
2810
|
+
children: /* @__PURE__ */ $(
|
|
2675
2811
|
"div",
|
|
2676
2812
|
{
|
|
2677
2813
|
style: {
|
|
2678
2814
|
position: "fixed",
|
|
2679
|
-
left: `${
|
|
2680
|
-
top: `${
|
|
2681
|
-
width: `${
|
|
2682
|
-
height: `${
|
|
2815
|
+
left: `${x.anchorEl.getBoundingClientRect().left}px`,
|
|
2816
|
+
top: `${x.anchorEl.getBoundingClientRect().top}px`,
|
|
2817
|
+
width: `${x.anchorEl.offsetWidth}px`,
|
|
2818
|
+
height: `${x.anchorEl.offsetHeight}px`,
|
|
2683
2819
|
pointerEvents: "none"
|
|
2684
2820
|
}
|
|
2685
2821
|
}
|
|
@@ -2694,7 +2830,7 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2694
2830
|
}
|
|
2695
2831
|
);
|
|
2696
2832
|
};
|
|
2697
|
-
|
|
2833
|
+
rn.__docgenInfo = {
|
|
2698
2834
|
displayName: "RichTextEditor",
|
|
2699
2835
|
description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
|
|
2700
2836
|
props: {
|
|
@@ -2722,43 +2858,43 @@ zt.__docgenInfo = {
|
|
|
2722
2858
|
}
|
|
2723
2859
|
}
|
|
2724
2860
|
};
|
|
2725
|
-
const
|
|
2861
|
+
const Qe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", on = [
|
|
2726
2862
|
{ label: "5页", value: 5 },
|
|
2727
2863
|
{ label: "10页", value: 10 },
|
|
2728
2864
|
{ label: "15页", value: 15 },
|
|
2729
2865
|
{ label: "30页", value: 30 }
|
|
2730
|
-
],
|
|
2866
|
+
], sn = ({
|
|
2731
2867
|
autoLoading: t,
|
|
2732
|
-
batchSize:
|
|
2733
|
-
loadingProgress:
|
|
2734
|
-
loadIcon:
|
|
2735
|
-
onBatchSizeChange:
|
|
2736
|
-
onLoadNextPage:
|
|
2737
|
-
onStartAutoLoad:
|
|
2738
|
-
onStopLoad:
|
|
2739
|
-
}) => t &&
|
|
2740
|
-
|
|
2868
|
+
batchSize: c,
|
|
2869
|
+
loadingProgress: l,
|
|
2870
|
+
loadIcon: s,
|
|
2871
|
+
onBatchSizeChange: u,
|
|
2872
|
+
onLoadNextPage: C,
|
|
2873
|
+
onStartAutoLoad: T,
|
|
2874
|
+
onStopLoad: w
|
|
2875
|
+
}) => t && l ? /* @__PURE__ */ Z("div", { className: "auto_load_progress", children: [
|
|
2876
|
+
s || /* @__PURE__ */ $("img", { src: Qe, alt: "自动加载", width: 14, height: 14 }),
|
|
2741
2877
|
/* @__PURE__ */ Z("span", { children: [
|
|
2742
2878
|
"正在加载第",
|
|
2743
|
-
|
|
2879
|
+
l.currentPage,
|
|
2744
2880
|
"/",
|
|
2745
|
-
|
|
2881
|
+
l.totalPages,
|
|
2746
2882
|
"页"
|
|
2747
2883
|
] }),
|
|
2748
|
-
/* @__PURE__ */
|
|
2749
|
-
|
|
2884
|
+
/* @__PURE__ */ $(
|
|
2885
|
+
yt,
|
|
2750
2886
|
{
|
|
2751
|
-
percent:
|
|
2887
|
+
percent: l.percentage,
|
|
2752
2888
|
type: "line",
|
|
2753
2889
|
size: [160, 8]
|
|
2754
2890
|
}
|
|
2755
2891
|
),
|
|
2756
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ $("span", { onClick: w, className: "auto_load_stop_btn", children: "停止加载" })
|
|
2757
2893
|
] }) : /* @__PURE__ */ Z("div", { className: "auto_load_container", children: [
|
|
2758
|
-
/* @__PURE__ */
|
|
2894
|
+
/* @__PURE__ */ $(
|
|
2759
2895
|
"div",
|
|
2760
2896
|
{
|
|
2761
|
-
onClick:
|
|
2897
|
+
onClick: C,
|
|
2762
2898
|
className: "auto_load_next_btn",
|
|
2763
2899
|
style: {
|
|
2764
2900
|
backgroundColor: t ? "#f5f5f5" : "#2563eb"
|
|
@@ -2778,19 +2914,19 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2778
2914
|
"div",
|
|
2779
2915
|
{
|
|
2780
2916
|
className: "auto_load_btn",
|
|
2781
|
-
onClick: t ? void 0 :
|
|
2917
|
+
onClick: t ? void 0 : T,
|
|
2782
2918
|
children: [
|
|
2783
|
-
|
|
2784
|
-
/* @__PURE__ */
|
|
2919
|
+
s || /* @__PURE__ */ $("img", { src: Qe, alt: "自动加载", width: 14, height: 14 }),
|
|
2920
|
+
/* @__PURE__ */ $("span", { children: "自动加载" })
|
|
2785
2921
|
]
|
|
2786
2922
|
}
|
|
2787
2923
|
),
|
|
2788
|
-
/* @__PURE__ */
|
|
2789
|
-
|
|
2924
|
+
/* @__PURE__ */ $(
|
|
2925
|
+
Fe,
|
|
2790
2926
|
{
|
|
2791
|
-
value:
|
|
2792
|
-
onChange:
|
|
2793
|
-
options:
|
|
2927
|
+
value: c,
|
|
2928
|
+
onChange: u,
|
|
2929
|
+
options: on,
|
|
2794
2930
|
disabled: t,
|
|
2795
2931
|
size: "small",
|
|
2796
2932
|
className: "auto_load_select",
|
|
@@ -2800,80 +2936,80 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2800
2936
|
]
|
|
2801
2937
|
}
|
|
2802
2938
|
)
|
|
2803
|
-
] }),
|
|
2939
|
+
] }), ln = ({
|
|
2804
2940
|
current: t,
|
|
2805
|
-
loadIcon:
|
|
2806
|
-
pageSize:
|
|
2807
|
-
total:
|
|
2808
|
-
cachedPages:
|
|
2809
|
-
loadedCount:
|
|
2810
|
-
autoLoading:
|
|
2811
|
-
loadingProgress:
|
|
2812
|
-
onChange:
|
|
2941
|
+
loadIcon: c,
|
|
2942
|
+
pageSize: l,
|
|
2943
|
+
total: s,
|
|
2944
|
+
cachedPages: u,
|
|
2945
|
+
loadedCount: C,
|
|
2946
|
+
autoLoading: T = !1,
|
|
2947
|
+
loadingProgress: w,
|
|
2948
|
+
onChange: k,
|
|
2813
2949
|
onLoadNextPage: e,
|
|
2814
2950
|
onStartAutoLoad: q,
|
|
2815
2951
|
onStopLoading: y
|
|
2816
2952
|
}) => {
|
|
2817
|
-
const [
|
|
2953
|
+
const [i, r] = ne(5), n = Math.ceil(s / l), o = Ze(() => u.length >= n, [u, n]), a = () => Array.from(
|
|
2818
2954
|
{ length: n },
|
|
2819
|
-
(
|
|
2820
|
-
).filter((
|
|
2955
|
+
(v, x) => x + 1
|
|
2956
|
+
).filter((v) => !u.includes(v)).slice(0, i);
|
|
2821
2957
|
return /* @__PURE__ */ Z("div", { className: "pagination_footer", children: [
|
|
2822
2958
|
/* @__PURE__ */ Z("div", { className: "pagination_leftWrap", children: [
|
|
2823
2959
|
/* @__PURE__ */ Z("span", { className: "pagination_total", children: [
|
|
2824
|
-
/* @__PURE__ */
|
|
2825
|
-
|
|
2960
|
+
/* @__PURE__ */ $(
|
|
2961
|
+
kt,
|
|
2826
2962
|
{
|
|
2827
2963
|
style: { color: "#2563EB", marginRight: "4px" }
|
|
2828
2964
|
}
|
|
2829
2965
|
),
|
|
2830
2966
|
"已加载: ",
|
|
2831
|
-
|
|
2967
|
+
C,
|
|
2832
2968
|
"/",
|
|
2833
|
-
|
|
2969
|
+
s,
|
|
2834
2970
|
"条数据"
|
|
2835
2971
|
] }),
|
|
2836
|
-
!o && /* @__PURE__ */
|
|
2837
|
-
|
|
2972
|
+
!o && /* @__PURE__ */ $(
|
|
2973
|
+
sn,
|
|
2838
2974
|
{
|
|
2839
|
-
loadIcon:
|
|
2840
|
-
autoLoading:
|
|
2841
|
-
batchSize:
|
|
2842
|
-
loadingProgress:
|
|
2975
|
+
loadIcon: c || void 0,
|
|
2976
|
+
autoLoading: T,
|
|
2977
|
+
batchSize: i,
|
|
2978
|
+
loadingProgress: w,
|
|
2843
2979
|
disabled: !e || !q,
|
|
2844
2980
|
onBatchSizeChange: r,
|
|
2845
2981
|
onLoadNextPage: () => e?.(),
|
|
2846
2982
|
onStartAutoLoad: () => {
|
|
2847
|
-
const
|
|
2848
|
-
q?.(
|
|
2983
|
+
const m = a();
|
|
2984
|
+
q?.(m);
|
|
2849
2985
|
},
|
|
2850
2986
|
onStopLoad: () => y?.()
|
|
2851
2987
|
}
|
|
2852
2988
|
)
|
|
2853
2989
|
] }),
|
|
2854
|
-
/* @__PURE__ */
|
|
2855
|
-
|
|
2990
|
+
/* @__PURE__ */ $(
|
|
2991
|
+
mt,
|
|
2856
2992
|
{
|
|
2857
2993
|
current: t,
|
|
2858
|
-
pageSize:
|
|
2859
|
-
total:
|
|
2860
|
-
onChange: (
|
|
2994
|
+
pageSize: l,
|
|
2995
|
+
total: s,
|
|
2996
|
+
onChange: (m) => k(m),
|
|
2861
2997
|
showSizeChanger: !1,
|
|
2862
2998
|
showQuickJumper: !1,
|
|
2863
|
-
showTotal: (
|
|
2864
|
-
itemRender: (
|
|
2865
|
-
const
|
|
2866
|
-
return
|
|
2999
|
+
showTotal: (m, v) => "",
|
|
3000
|
+
itemRender: (m, v, x) => {
|
|
3001
|
+
const V = u.includes(m);
|
|
3002
|
+
return v === "prev" || v === "next" || v === "jump-prev" || v === "jump-next" ? /* @__PURE__ */ $("div", { className: "pageBox", children: x }) : /* @__PURE__ */ Z(
|
|
2867
3003
|
"div",
|
|
2868
3004
|
{
|
|
2869
3005
|
className: "pageBox",
|
|
2870
3006
|
style: {
|
|
2871
|
-
backgroundColor: t ===
|
|
2872
|
-
color: t ===
|
|
3007
|
+
backgroundColor: t === m ? "#2563EB" : "#f5f5f5",
|
|
3008
|
+
color: t === m ? "#fff" : V ? "#171717" : "#a3a3a3"
|
|
2873
3009
|
},
|
|
2874
3010
|
children: [
|
|
2875
|
-
|
|
2876
|
-
!
|
|
3011
|
+
m,
|
|
3012
|
+
!V && /* @__PURE__ */ $("span", { className: "unload_spot" })
|
|
2877
3013
|
]
|
|
2878
3014
|
}
|
|
2879
3015
|
);
|
|
@@ -2881,62 +3017,62 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2881
3017
|
}
|
|
2882
3018
|
)
|
|
2883
3019
|
] });
|
|
2884
|
-
},
|
|
3020
|
+
}, cn = (t) => {
|
|
2885
3021
|
const {
|
|
2886
|
-
loading:
|
|
2887
|
-
autoLoading:
|
|
2888
|
-
loadingProgress:
|
|
2889
|
-
columns:
|
|
2890
|
-
dataSource:
|
|
2891
|
-
total:
|
|
2892
|
-
current:
|
|
2893
|
-
pageSize:
|
|
3022
|
+
loading: c,
|
|
3023
|
+
autoLoading: l,
|
|
3024
|
+
loadingProgress: s,
|
|
3025
|
+
columns: u = [],
|
|
3026
|
+
dataSource: C = [],
|
|
3027
|
+
total: T,
|
|
3028
|
+
current: w,
|
|
3029
|
+
pageSize: k,
|
|
2894
3030
|
cachedPages: e,
|
|
2895
3031
|
onChangePage: q,
|
|
2896
3032
|
onLoadNextPage: y,
|
|
2897
|
-
onStartAutoLoad:
|
|
3033
|
+
onStartAutoLoad: i,
|
|
2898
3034
|
onStopLoading: r,
|
|
2899
3035
|
...n
|
|
2900
3036
|
} = t, o = Q(null), a = ae(
|
|
2901
|
-
(
|
|
2902
|
-
q(
|
|
2903
|
-
key: `${(
|
|
3037
|
+
(f) => {
|
|
3038
|
+
q(f), e.includes(f) && o.current?.scrollTo({
|
|
3039
|
+
key: `${(f - 1) * k + 1}`
|
|
2904
3040
|
});
|
|
2905
3041
|
},
|
|
2906
|
-
[
|
|
3042
|
+
[w]
|
|
2907
3043
|
);
|
|
2908
3044
|
return /* @__PURE__ */ Z("div", { className: "flex flex-col", children: [
|
|
2909
|
-
/* @__PURE__ */
|
|
2910
|
-
|
|
3045
|
+
/* @__PURE__ */ $(
|
|
3046
|
+
Ge,
|
|
2911
3047
|
{
|
|
2912
3048
|
ref: o,
|
|
2913
3049
|
...n,
|
|
2914
|
-
columns:
|
|
2915
|
-
dataSource:
|
|
3050
|
+
columns: u,
|
|
3051
|
+
dataSource: C,
|
|
2916
3052
|
pagination: !1,
|
|
2917
3053
|
virtual: !0
|
|
2918
3054
|
}
|
|
2919
3055
|
),
|
|
2920
|
-
/* @__PURE__ */
|
|
2921
|
-
|
|
3056
|
+
/* @__PURE__ */ $(
|
|
3057
|
+
ln,
|
|
2922
3058
|
{
|
|
2923
|
-
loading:
|
|
2924
|
-
autoLoading:
|
|
2925
|
-
loadingProgress:
|
|
2926
|
-
current:
|
|
2927
|
-
pageSize:
|
|
2928
|
-
total:
|
|
2929
|
-
loadedCount:
|
|
3059
|
+
loading: c,
|
|
3060
|
+
autoLoading: l,
|
|
3061
|
+
loadingProgress: s,
|
|
3062
|
+
current: w,
|
|
3063
|
+
pageSize: k,
|
|
3064
|
+
total: T,
|
|
3065
|
+
loadedCount: C.length,
|
|
2930
3066
|
cachedPages: e,
|
|
2931
3067
|
onChange: a,
|
|
2932
3068
|
onLoadNextPage: y,
|
|
2933
|
-
onStartAutoLoad:
|
|
3069
|
+
onStartAutoLoad: i,
|
|
2934
3070
|
onStopLoading: r
|
|
2935
3071
|
}
|
|
2936
3072
|
)
|
|
2937
3073
|
] });
|
|
2938
3074
|
};
|
|
2939
|
-
|
|
3075
|
+
cn.__docgenInfo = {
|
|
2940
3076
|
displayName: "VirtualTable",
|
|
2941
3077
|
description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
|
|
2942
3078
|
props: {
|
|
@@ -3043,77 +3179,77 @@ Yt.__docgenInfo = {
|
|
|
3043
3179
|
}
|
|
3044
3180
|
}
|
|
3045
3181
|
};
|
|
3046
|
-
const
|
|
3182
|
+
const un = ({
|
|
3047
3183
|
texts: t = [],
|
|
3048
|
-
placeholder:
|
|
3049
|
-
animationSpeed:
|
|
3050
|
-
autoPlay:
|
|
3051
|
-
value:
|
|
3052
|
-
onChange:
|
|
3053
|
-
...
|
|
3184
|
+
placeholder: c = "请输入内容",
|
|
3185
|
+
animationSpeed: l = 100,
|
|
3186
|
+
autoPlay: s = !0,
|
|
3187
|
+
value: u,
|
|
3188
|
+
onChange: C,
|
|
3189
|
+
...T
|
|
3054
3190
|
}) => {
|
|
3055
|
-
const [
|
|
3191
|
+
const [w, k] = ne(""), [e, q] = ne(0), [y, i] = ne(!1), [r, n] = ne(!1), [o, a] = ne(!1), f = Q(void 0), m = Q(void 0), v = Q(t), x = Q(e), V = Q(r), E = Q(w);
|
|
3056
3192
|
de(() => {
|
|
3057
|
-
|
|
3193
|
+
v.current = t, x.current = e, V.current = r, E.current = w;
|
|
3058
3194
|
});
|
|
3059
|
-
const
|
|
3060
|
-
let
|
|
3195
|
+
const B = ae((d, p) => {
|
|
3196
|
+
let b = 0;
|
|
3061
3197
|
a(!0);
|
|
3062
3198
|
const L = () => {
|
|
3063
|
-
|
|
3199
|
+
b < d.length ? (k(d.slice(0, b + 1)), b++, m.current = window.setTimeout(L, l)) : (a(!1), p?.());
|
|
3064
3200
|
};
|
|
3065
3201
|
L();
|
|
3066
|
-
}, [
|
|
3067
|
-
let
|
|
3068
|
-
const
|
|
3069
|
-
|
|
3202
|
+
}, [l]), G = ae((d) => {
|
|
3203
|
+
let p = E.current.length;
|
|
3204
|
+
const b = () => {
|
|
3205
|
+
p > 0 ? (k(E.current.slice(0, p - 1)), p--, m.current = window.setTimeout(b, l / 2)) : d?.();
|
|
3070
3206
|
};
|
|
3071
|
-
|
|
3072
|
-
}, [
|
|
3073
|
-
if (
|
|
3074
|
-
|
|
3075
|
-
const
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
q((
|
|
3207
|
+
b();
|
|
3208
|
+
}, [l]), F = ae(() => {
|
|
3209
|
+
if (v.current.length === 0 || V.current) return;
|
|
3210
|
+
i(!0);
|
|
3211
|
+
const d = v.current[x.current];
|
|
3212
|
+
E.current ? G(() => {
|
|
3213
|
+
B(d, () => {
|
|
3214
|
+
f.current = window.setTimeout(() => {
|
|
3215
|
+
q((p) => (p + 1) % v.current.length), i(!1);
|
|
3080
3216
|
}, 2e3);
|
|
3081
3217
|
});
|
|
3082
|
-
}) :
|
|
3083
|
-
|
|
3084
|
-
q((
|
|
3218
|
+
}) : B(d, () => {
|
|
3219
|
+
f.current = window.setTimeout(() => {
|
|
3220
|
+
q((p) => (p + 1) % v.current.length), i(!1);
|
|
3085
3221
|
}, 2e3);
|
|
3086
3222
|
});
|
|
3087
|
-
}, [
|
|
3088
|
-
return de(() => (
|
|
3089
|
-
|
|
3090
|
-
}), [e, r,
|
|
3091
|
-
!y &&
|
|
3092
|
-
}, [e, y,
|
|
3093
|
-
/* @__PURE__ */
|
|
3094
|
-
|
|
3223
|
+
}, [G, B]);
|
|
3224
|
+
return de(() => (s && t.length > 0 && !r && F(), () => {
|
|
3225
|
+
f.current && window.clearTimeout(f.current), m.current && window.clearTimeout(m.current);
|
|
3226
|
+
}), [e, r, s, t.length, F]), de(() => {
|
|
3227
|
+
!y && s && t.length > 0 && !r && F();
|
|
3228
|
+
}, [e, y, s, t.length, r, F]), /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
|
|
3229
|
+
/* @__PURE__ */ $(
|
|
3230
|
+
et,
|
|
3095
3231
|
{
|
|
3096
|
-
...
|
|
3097
|
-
value:
|
|
3098
|
-
onChange: (
|
|
3099
|
-
|
|
3232
|
+
...T,
|
|
3233
|
+
value: u,
|
|
3234
|
+
onChange: (d) => {
|
|
3235
|
+
C?.(d.target.value), T.onChange?.(d);
|
|
3100
3236
|
},
|
|
3101
|
-
onFocus: (
|
|
3102
|
-
n(!0),
|
|
3237
|
+
onFocus: (d) => {
|
|
3238
|
+
n(!0), f.current && window.clearTimeout(f.current), m.current && window.clearTimeout(m.current), i(!1), a(!1), T.onFocus?.(d);
|
|
3103
3239
|
},
|
|
3104
|
-
onBlur: (
|
|
3105
|
-
n(!1), !
|
|
3240
|
+
onBlur: (d) => {
|
|
3241
|
+
n(!1), !u && t.length > 0 && (k(""), q(0)), T.onBlur?.(d);
|
|
3106
3242
|
},
|
|
3107
|
-
placeholder: r ||
|
|
3243
|
+
placeholder: r || u ? c : w || c,
|
|
3108
3244
|
style: {
|
|
3109
3245
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3110
|
-
...
|
|
3246
|
+
...T.style,
|
|
3111
3247
|
position: "relative",
|
|
3112
3248
|
zIndex: 1
|
|
3113
3249
|
}
|
|
3114
3250
|
}
|
|
3115
3251
|
),
|
|
3116
|
-
!r && !
|
|
3252
|
+
!r && !u && w && /* @__PURE__ */ Z(
|
|
3117
3253
|
"div",
|
|
3118
3254
|
{
|
|
3119
3255
|
style: {
|
|
@@ -3133,8 +3269,8 @@ const Kt = ({
|
|
|
3133
3269
|
fontFamily: "inherit"
|
|
3134
3270
|
},
|
|
3135
3271
|
children: [
|
|
3136
|
-
/* @__PURE__ */
|
|
3137
|
-
o && /* @__PURE__ */
|
|
3272
|
+
/* @__PURE__ */ $("span", { children: w }),
|
|
3273
|
+
o && /* @__PURE__ */ $(
|
|
3138
3274
|
"span",
|
|
3139
3275
|
{
|
|
3140
3276
|
style: {
|
|
@@ -3150,7 +3286,7 @@ const Kt = ({
|
|
|
3150
3286
|
]
|
|
3151
3287
|
}
|
|
3152
3288
|
),
|
|
3153
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ $("style", { children: `
|
|
3154
3290
|
@keyframes blink {
|
|
3155
3291
|
0%, 50% { opacity: 1; }
|
|
3156
3292
|
51%, 100% { opacity: 0; }
|
|
@@ -3158,7 +3294,7 @@ const Kt = ({
|
|
|
3158
3294
|
` })
|
|
3159
3295
|
] });
|
|
3160
3296
|
};
|
|
3161
|
-
|
|
3297
|
+
un.__docgenInfo = {
|
|
3162
3298
|
displayName: "DynamicInput",
|
|
3163
3299
|
description: "动态文案输入框组件,支持流式文字动画效果",
|
|
3164
3300
|
props: {
|
|
@@ -3203,24 +3339,24 @@ Kt.__docgenInfo = {
|
|
|
3203
3339
|
}
|
|
3204
3340
|
}
|
|
3205
3341
|
};
|
|
3206
|
-
const
|
|
3342
|
+
const dn = ({
|
|
3207
3343
|
texts: t = [],
|
|
3208
3344
|
// 动态文案数组,默认为空数组
|
|
3209
|
-
placeholder:
|
|
3345
|
+
placeholder: c = "请输入内容",
|
|
3210
3346
|
// 占位符文本
|
|
3211
|
-
animationSpeed:
|
|
3347
|
+
animationSpeed: l = 100,
|
|
3212
3348
|
// 打字机动画速度,毫秒
|
|
3213
|
-
autoPlay:
|
|
3349
|
+
autoPlay: s = !0,
|
|
3214
3350
|
// 是否自动播放动画
|
|
3215
|
-
value:
|
|
3351
|
+
value: u = "",
|
|
3216
3352
|
// 受控模式的值
|
|
3217
|
-
onChange:
|
|
3353
|
+
onChange: C,
|
|
3218
3354
|
// 受控模式的变化回调
|
|
3219
|
-
onSubmit:
|
|
3355
|
+
onSubmit: T,
|
|
3220
3356
|
// 提交回调
|
|
3221
|
-
maxLength:
|
|
3357
|
+
maxLength: w = 500,
|
|
3222
3358
|
// 最大字符数限制
|
|
3223
|
-
showCount:
|
|
3359
|
+
showCount: k = !0,
|
|
3224
3360
|
// 是否显示字数统计
|
|
3225
3361
|
submitText: e = "发送",
|
|
3226
3362
|
// 提交按钮文本
|
|
@@ -3228,79 +3364,79 @@ const Xt = ({
|
|
|
3228
3364
|
// 是否禁用组件
|
|
3229
3365
|
rows: y = 4,
|
|
3230
3366
|
// 文本域行数
|
|
3231
|
-
style:
|
|
3367
|
+
style: i,
|
|
3232
3368
|
// 自定义样式
|
|
3233
3369
|
...r
|
|
3234
3370
|
// 其他原生属性
|
|
3235
3371
|
}) => {
|
|
3236
|
-
const [n, o] = ne(""), [a,
|
|
3372
|
+
const [n, o] = ne(""), [a, f] = ne(0), [m, v] = ne(!1), [x, V] = ne(!1), [E, B] = ne(!1), [G, F] = ne(u || ""), W = Q(void 0), H = Q(void 0), ee = Q(t), re = Q(a), d = Q(x), p = Q(n), b = Q(null);
|
|
3237
3373
|
de(() => {
|
|
3238
|
-
ee.current = t, re.current = a,
|
|
3374
|
+
ee.current = t, re.current = a, d.current = x, p.current = n;
|
|
3239
3375
|
});
|
|
3240
3376
|
const L = ae((X, ue) => {
|
|
3241
3377
|
let he = 0;
|
|
3242
|
-
|
|
3378
|
+
B(!0);
|
|
3243
3379
|
const ye = () => {
|
|
3244
|
-
he < X.length ? (o(X.slice(0, he + 1)), he++,
|
|
3380
|
+
he < X.length ? (o(X.slice(0, he + 1)), he++, H.current = window.setTimeout(ye, l)) : (B(!1), ue?.());
|
|
3245
3381
|
};
|
|
3246
3382
|
ye();
|
|
3247
|
-
}, [
|
|
3248
|
-
let ue =
|
|
3383
|
+
}, [l]), N = ae((X) => {
|
|
3384
|
+
let ue = p.current.length;
|
|
3249
3385
|
const he = () => {
|
|
3250
|
-
ue > 0 ? (o(
|
|
3386
|
+
ue > 0 ? (o(p.current.slice(0, ue - 1)), ue--, H.current = window.setTimeout(he, l / 2)) : X?.();
|
|
3251
3387
|
};
|
|
3252
3388
|
he();
|
|
3253
|
-
}, [
|
|
3254
|
-
if (ee.current.length === 0 ||
|
|
3255
|
-
|
|
3389
|
+
}, [l]), z = ae(() => {
|
|
3390
|
+
if (ee.current.length === 0 || d.current) return;
|
|
3391
|
+
v(!0);
|
|
3256
3392
|
const X = ee.current[re.current];
|
|
3257
|
-
|
|
3393
|
+
p.current ? N(() => {
|
|
3258
3394
|
L(X, () => {
|
|
3259
|
-
|
|
3260
|
-
|
|
3395
|
+
W.current = window.setTimeout(() => {
|
|
3396
|
+
f((ue) => (ue + 1) % ee.current.length), v(!1);
|
|
3261
3397
|
}, 2e3);
|
|
3262
3398
|
});
|
|
3263
3399
|
}) : L(X, () => {
|
|
3264
|
-
|
|
3265
|
-
|
|
3400
|
+
W.current = window.setTimeout(() => {
|
|
3401
|
+
f((ue) => (ue + 1) % ee.current.length), v(!1);
|
|
3266
3402
|
}, 2e3);
|
|
3267
3403
|
});
|
|
3268
|
-
}, [
|
|
3269
|
-
de(() => (
|
|
3270
|
-
|
|
3271
|
-
}), [a,
|
|
3272
|
-
!
|
|
3273
|
-
}, [a,
|
|
3274
|
-
const
|
|
3275
|
-
|
|
3404
|
+
}, [N, L]);
|
|
3405
|
+
de(() => (s && t.length > 0 && !x && z(), () => {
|
|
3406
|
+
W.current && window.clearTimeout(W.current), H.current && window.clearTimeout(H.current);
|
|
3407
|
+
}), [a, x, s, t.length, z]), de(() => {
|
|
3408
|
+
!m && s && t.length > 0 && !x && z();
|
|
3409
|
+
}, [a, m, s, t.length, x, z]);
|
|
3410
|
+
const Y = (X) => {
|
|
3411
|
+
V(!0), W.current && window.clearTimeout(W.current), H.current && window.clearTimeout(H.current), v(!1), B(!1), r.onFocus?.(X);
|
|
3276
3412
|
}, te = (X) => {
|
|
3277
|
-
|
|
3413
|
+
V(!1), !u && t.length > 0 && (o(""), f(0)), r.onBlur?.(X);
|
|
3278
3414
|
}, se = (X) => {
|
|
3279
3415
|
const ue = X.target.value;
|
|
3280
|
-
|
|
3416
|
+
w && ue.length > w || (C ? C(ue) : F(ue), r.onChange?.(X));
|
|
3281
3417
|
}, ce = () => {
|
|
3282
|
-
const X =
|
|
3283
|
-
X.trim() && !q && (
|
|
3418
|
+
const X = C ? u : G;
|
|
3419
|
+
X.trim() && !q && (T?.(X), C || F(""));
|
|
3284
3420
|
}, pe = (X) => {
|
|
3285
3421
|
(X.ctrlKey || X.metaKey) && X.key === "Enter" && (X.preventDefault(), ce()), r.onKeyDown?.(X);
|
|
3286
|
-
}, fe =
|
|
3287
|
-
return /* @__PURE__ */ Z("div", { style: { position: "relative", ...
|
|
3422
|
+
}, fe = C ? u : G, be = q || !fe.trim() || (w ? fe.length > w : !1);
|
|
3423
|
+
return /* @__PURE__ */ Z("div", { style: { position: "relative", ...i }, children: [
|
|
3288
3424
|
/* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
|
|
3289
|
-
/* @__PURE__ */
|
|
3425
|
+
/* @__PURE__ */ $(
|
|
3290
3426
|
"textarea",
|
|
3291
3427
|
{
|
|
3292
|
-
ref:
|
|
3293
|
-
value:
|
|
3428
|
+
ref: b,
|
|
3429
|
+
value: C ? u : G,
|
|
3294
3430
|
onChange: se,
|
|
3295
3431
|
onFocus: (X) => {
|
|
3296
|
-
X.target.style.borderColor = "#1890ff", X.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)",
|
|
3432
|
+
X.target.style.borderColor = "#1890ff", X.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", Y(X);
|
|
3297
3433
|
},
|
|
3298
3434
|
onBlur: (X) => {
|
|
3299
3435
|
X.target.style.borderColor = "#d9d9d9", X.target.style.boxShadow = "none", te(X);
|
|
3300
3436
|
},
|
|
3301
3437
|
onKeyDown: pe,
|
|
3302
|
-
placeholder:
|
|
3303
|
-
maxLength:
|
|
3438
|
+
placeholder: x || fe ? c : "",
|
|
3439
|
+
maxLength: w,
|
|
3304
3440
|
rows: y,
|
|
3305
3441
|
disabled: q,
|
|
3306
3442
|
style: {
|
|
@@ -3323,7 +3459,7 @@ const Xt = ({
|
|
|
3323
3459
|
...r
|
|
3324
3460
|
}
|
|
3325
3461
|
),
|
|
3326
|
-
!
|
|
3462
|
+
!x && !fe && n && /* @__PURE__ */ Z(
|
|
3327
3463
|
"div",
|
|
3328
3464
|
{
|
|
3329
3465
|
style: {
|
|
@@ -3345,8 +3481,8 @@ const Xt = ({
|
|
|
3345
3481
|
lineHeight: "1.5"
|
|
3346
3482
|
},
|
|
3347
3483
|
children: [
|
|
3348
|
-
/* @__PURE__ */
|
|
3349
|
-
|
|
3484
|
+
/* @__PURE__ */ $("span", { children: n }),
|
|
3485
|
+
E && /* @__PURE__ */ $(
|
|
3350
3486
|
"span",
|
|
3351
3487
|
{
|
|
3352
3488
|
style: {
|
|
@@ -3362,7 +3498,7 @@ const Xt = ({
|
|
|
3362
3498
|
]
|
|
3363
3499
|
}
|
|
3364
3500
|
),
|
|
3365
|
-
/* @__PURE__ */
|
|
3501
|
+
/* @__PURE__ */ $(
|
|
3366
3502
|
"div",
|
|
3367
3503
|
{
|
|
3368
3504
|
style: {
|
|
@@ -3371,12 +3507,12 @@ const Xt = ({
|
|
|
3371
3507
|
right: 8,
|
|
3372
3508
|
zIndex: 3
|
|
3373
3509
|
},
|
|
3374
|
-
children: /* @__PURE__ */
|
|
3510
|
+
children: /* @__PURE__ */ $(
|
|
3375
3511
|
$e,
|
|
3376
3512
|
{
|
|
3377
3513
|
type: "primary",
|
|
3378
3514
|
size: "small",
|
|
3379
|
-
icon: /* @__PURE__ */
|
|
3515
|
+
icon: /* @__PURE__ */ $(wt, {}),
|
|
3380
3516
|
onClick: ce,
|
|
3381
3517
|
disabled: be,
|
|
3382
3518
|
style: {
|
|
@@ -3393,7 +3529,7 @@ const Xt = ({
|
|
|
3393
3529
|
}
|
|
3394
3530
|
)
|
|
3395
3531
|
] }),
|
|
3396
|
-
|
|
3532
|
+
k && /* @__PURE__ */ Z(
|
|
3397
3533
|
"div",
|
|
3398
3534
|
{
|
|
3399
3535
|
style: {
|
|
@@ -3405,11 +3541,11 @@ const Xt = ({
|
|
|
3405
3541
|
children: [
|
|
3406
3542
|
fe.length,
|
|
3407
3543
|
"/",
|
|
3408
|
-
|
|
3544
|
+
w
|
|
3409
3545
|
]
|
|
3410
3546
|
}
|
|
3411
3547
|
),
|
|
3412
|
-
/* @__PURE__ */
|
|
3548
|
+
/* @__PURE__ */ $("style", { children: `
|
|
3413
3549
|
@keyframes blink {
|
|
3414
3550
|
0%, 50% { opacity: 1; }
|
|
3415
3551
|
51%, 100% { opacity: 0; }
|
|
@@ -3417,7 +3553,7 @@ const Xt = ({
|
|
|
3417
3553
|
` })
|
|
3418
3554
|
] });
|
|
3419
3555
|
};
|
|
3420
|
-
|
|
3556
|
+
dn.__docgenInfo = {
|
|
3421
3557
|
displayName: "DynamicTextArea",
|
|
3422
3558
|
description: "动态文案文本域组件,支持流式文字动画效果",
|
|
3423
3559
|
props: {
|
|
@@ -3503,96 +3639,96 @@ Xt.__docgenInfo = {
|
|
|
3503
3639
|
}
|
|
3504
3640
|
}
|
|
3505
3641
|
};
|
|
3506
|
-
const
|
|
3642
|
+
const rt = ({
|
|
3507
3643
|
src: t,
|
|
3508
|
-
poster:
|
|
3509
|
-
width:
|
|
3510
|
-
height:
|
|
3511
|
-
videoWidth:
|
|
3644
|
+
poster: c,
|
|
3645
|
+
width: l = 300,
|
|
3646
|
+
height: s,
|
|
3647
|
+
videoWidth: u,
|
|
3512
3648
|
// 参数保留但不使用,由CSS控制
|
|
3513
|
-
videoHeight:
|
|
3649
|
+
videoHeight: C,
|
|
3514
3650
|
// 参数保留但不使用,由CSS控制
|
|
3515
|
-
showPlayButton:
|
|
3516
|
-
autoPlayOnHover:
|
|
3517
|
-
onClick:
|
|
3651
|
+
showPlayButton: T = !0,
|
|
3652
|
+
autoPlayOnHover: w = !0,
|
|
3653
|
+
onClick: k,
|
|
3518
3654
|
onVideoLoaded: e,
|
|
3519
3655
|
onVideoPlay: q,
|
|
3520
3656
|
onVideoPause: y,
|
|
3521
|
-
onVideoEnded:
|
|
3657
|
+
onVideoEnded: i,
|
|
3522
3658
|
className: r,
|
|
3523
3659
|
style: n,
|
|
3524
3660
|
...o
|
|
3525
3661
|
}) => {
|
|
3526
|
-
const a = Q(null), [
|
|
3527
|
-
a.current && (a.current.play(),
|
|
3528
|
-
}, [q]),
|
|
3529
|
-
a.current && (a.current.pause(),
|
|
3662
|
+
const a = Q(null), [f, m] = ne(!1), [v, x] = ne(!1), [V, E] = ne(!1), B = ae(() => {
|
|
3663
|
+
a.current && (a.current.play(), m(!0), q?.());
|
|
3664
|
+
}, [q]), G = ae(() => {
|
|
3665
|
+
a.current && (a.current.pause(), m(!1), y?.());
|
|
3530
3666
|
}, [y]), F = ae((L) => {
|
|
3531
|
-
L.stopPropagation(),
|
|
3532
|
-
}, [
|
|
3533
|
-
|
|
3534
|
-
}, [
|
|
3535
|
-
|
|
3536
|
-
}, [
|
|
3537
|
-
|
|
3667
|
+
L.stopPropagation(), f ? G() : B();
|
|
3668
|
+
}, [f, B, G]), W = ae(() => {
|
|
3669
|
+
x(!0), w && !f && B();
|
|
3670
|
+
}, [w, f, B]), H = ae(() => {
|
|
3671
|
+
x(!1), w && f && G();
|
|
3672
|
+
}, [w, f, G]), ee = ae(() => {
|
|
3673
|
+
E(!0), e?.();
|
|
3538
3674
|
}, [e]), re = ae(() => {
|
|
3539
|
-
|
|
3540
|
-
}, [q]),
|
|
3541
|
-
|
|
3542
|
-
}, [y]),
|
|
3543
|
-
|
|
3544
|
-
}, [
|
|
3545
|
-
|
|
3546
|
-
}, [
|
|
3547
|
-
return /* @__PURE__ */
|
|
3548
|
-
|
|
3675
|
+
m(!0), q?.();
|
|
3676
|
+
}, [q]), d = ae(() => {
|
|
3677
|
+
m(!1), y?.();
|
|
3678
|
+
}, [y]), p = ae(() => {
|
|
3679
|
+
m(!1), i?.();
|
|
3680
|
+
}, [i]), b = ae((L) => {
|
|
3681
|
+
k?.(L);
|
|
3682
|
+
}, [k]);
|
|
3683
|
+
return /* @__PURE__ */ $(
|
|
3684
|
+
Re,
|
|
3549
3685
|
{
|
|
3550
3686
|
...o,
|
|
3551
3687
|
className: `video-card ${r || ""}`,
|
|
3552
3688
|
style: {
|
|
3553
|
-
width:
|
|
3554
|
-
height:
|
|
3689
|
+
width: l,
|
|
3690
|
+
height: s,
|
|
3555
3691
|
padding: 0,
|
|
3556
3692
|
overflow: "hidden",
|
|
3557
|
-
cursor:
|
|
3693
|
+
cursor: k ? "pointer" : "default",
|
|
3558
3694
|
border: "none",
|
|
3559
3695
|
borderRadius: 0,
|
|
3560
3696
|
...n
|
|
3561
3697
|
},
|
|
3562
3698
|
bordered: !1,
|
|
3563
|
-
onMouseEnter:
|
|
3564
|
-
onMouseLeave:
|
|
3565
|
-
onClick:
|
|
3699
|
+
onMouseEnter: W,
|
|
3700
|
+
onMouseLeave: H,
|
|
3701
|
+
onClick: b,
|
|
3566
3702
|
children: /* @__PURE__ */ Z("div", { className: "video-card-container", children: [
|
|
3567
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ $(
|
|
3568
3704
|
"video",
|
|
3569
3705
|
{
|
|
3570
3706
|
ref: a,
|
|
3571
3707
|
src: t,
|
|
3572
|
-
poster:
|
|
3708
|
+
poster: c,
|
|
3573
3709
|
preload: "metadata",
|
|
3574
3710
|
onLoadedData: ee,
|
|
3575
3711
|
onPlay: re,
|
|
3576
|
-
onPause:
|
|
3577
|
-
onEnded:
|
|
3712
|
+
onPause: d,
|
|
3713
|
+
onEnded: p,
|
|
3578
3714
|
muted: !0,
|
|
3579
3715
|
loop: !0
|
|
3580
3716
|
}
|
|
3581
3717
|
),
|
|
3582
|
-
|
|
3718
|
+
T && /* @__PURE__ */ $(
|
|
3583
3719
|
"div",
|
|
3584
3720
|
{
|
|
3585
|
-
className: `video-play-button ${
|
|
3721
|
+
className: `video-play-button ${v ? "hovered" : ""}`,
|
|
3586
3722
|
onClick: F,
|
|
3587
|
-
children:
|
|
3723
|
+
children: f ? /* @__PURE__ */ $(Et, { className: "play-icon" }) : /* @__PURE__ */ $($t, { className: "play-icon" })
|
|
3588
3724
|
}
|
|
3589
3725
|
),
|
|
3590
|
-
!
|
|
3726
|
+
!V && /* @__PURE__ */ $("div", { className: "video-loading-mask", children: /* @__PURE__ */ $("div", { className: "loading-spinner" }) })
|
|
3591
3727
|
] })
|
|
3592
3728
|
}
|
|
3593
3729
|
);
|
|
3594
3730
|
};
|
|
3595
|
-
|
|
3731
|
+
rt.__docgenInfo = {
|
|
3596
3732
|
displayName: "VideoCard",
|
|
3597
3733
|
description: "视频卡片组件,支持鼠标悬浮播放控制",
|
|
3598
3734
|
props: {
|
|
@@ -3693,12 +3829,12 @@ Je.__docgenInfo = {
|
|
|
3693
3829
|
}
|
|
3694
3830
|
}
|
|
3695
3831
|
};
|
|
3696
|
-
const
|
|
3832
|
+
const pn = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((l) => t.toLowerCase().includes(l)), fn = (t) => t.type ? t.type : pn(t.url) ? "video" : "image", yn = ({
|
|
3697
3833
|
items: t,
|
|
3698
|
-
columns:
|
|
3699
|
-
gap:
|
|
3700
|
-
responsive:
|
|
3701
|
-
breakpoints:
|
|
3834
|
+
columns: c,
|
|
3835
|
+
gap: l = 0,
|
|
3836
|
+
responsive: s = !0,
|
|
3837
|
+
breakpoints: u = {
|
|
3702
3838
|
xs: 1,
|
|
3703
3839
|
sm: 2,
|
|
3704
3840
|
md: 3,
|
|
@@ -3706,35 +3842,35 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3706
3842
|
xl: 5,
|
|
3707
3843
|
xxl: 6
|
|
3708
3844
|
},
|
|
3709
|
-
className:
|
|
3710
|
-
style:
|
|
3711
|
-
onClick:
|
|
3845
|
+
className: C,
|
|
3846
|
+
style: T,
|
|
3847
|
+
onClick: w
|
|
3712
3848
|
}) => {
|
|
3713
|
-
const
|
|
3714
|
-
if (!
|
|
3715
|
-
return
|
|
3849
|
+
const k = Q(null), [e, q] = ne(c || u.md || 3), y = Q(/* @__PURE__ */ new Map()), i = ae(() => {
|
|
3850
|
+
if (!s || c)
|
|
3851
|
+
return c || u.md || 3;
|
|
3716
3852
|
const a = window.innerWidth;
|
|
3717
|
-
return a < 576 ?
|
|
3718
|
-
}, [
|
|
3719
|
-
if (!
|
|
3720
|
-
const a = e,
|
|
3721
|
-
t.forEach((
|
|
3722
|
-
const
|
|
3853
|
+
return a < 576 ? u.xs || 1 : a < 768 ? u.sm || 2 : a < 992 ? u.md || 3 : a < 1200 ? u.lg || 4 : a < 1600 ? u.xl || 5 : u.xxl || 6;
|
|
3854
|
+
}, [s, c, u]), r = ae(() => {
|
|
3855
|
+
if (!k.current) return;
|
|
3856
|
+
const a = e, f = k.current, v = (f.offsetWidth - l * (a - 1)) / a, x = new Array(a).fill(0);
|
|
3857
|
+
t.forEach((E, B) => {
|
|
3858
|
+
const G = E.id || B, F = y.current.get(G);
|
|
3723
3859
|
if (!F) return;
|
|
3724
|
-
const
|
|
3725
|
-
F.style.position = "absolute", F.style.left = `${ee}px`, F.style.top = `${re}px`, F.style.width = `${
|
|
3860
|
+
const W = Math.min(...x), H = x.indexOf(W), ee = H * (v + l), re = x[H];
|
|
3861
|
+
F.style.position = "absolute", F.style.left = `${ee}px`, F.style.top = `${re}px`, F.style.width = `${v}px`, x[H] += F.offsetHeight + l;
|
|
3726
3862
|
});
|
|
3727
|
-
const
|
|
3728
|
-
|
|
3729
|
-
}, [t, e,
|
|
3863
|
+
const V = Math.max(...x);
|
|
3864
|
+
f.style.height = `${V}px`;
|
|
3865
|
+
}, [t, e, l]);
|
|
3730
3866
|
de(() => {
|
|
3731
3867
|
const a = () => {
|
|
3732
|
-
const
|
|
3733
|
-
|
|
3868
|
+
const f = i();
|
|
3869
|
+
f !== e && q(f);
|
|
3734
3870
|
};
|
|
3735
|
-
if (
|
|
3871
|
+
if (s)
|
|
3736
3872
|
return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
|
|
3737
|
-
}, [
|
|
3873
|
+
}, [s, i, e]), de(() => {
|
|
3738
3874
|
const a = setTimeout(() => {
|
|
3739
3875
|
r();
|
|
3740
3876
|
}, 100);
|
|
@@ -3743,34 +3879,34 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3743
3879
|
const n = ae(() => {
|
|
3744
3880
|
r();
|
|
3745
3881
|
}, [r]), o = ae((a) => {
|
|
3746
|
-
|
|
3747
|
-
}, [
|
|
3748
|
-
return /* @__PURE__ */
|
|
3882
|
+
w && w(a), a.onClick?.(a);
|
|
3883
|
+
}, [w]);
|
|
3884
|
+
return /* @__PURE__ */ $(
|
|
3749
3885
|
"div",
|
|
3750
3886
|
{
|
|
3751
|
-
ref:
|
|
3752
|
-
className: `waterfall-container ${
|
|
3887
|
+
ref: k,
|
|
3888
|
+
className: `waterfall-container ${C || ""}`,
|
|
3753
3889
|
style: {
|
|
3754
3890
|
position: "relative",
|
|
3755
3891
|
width: "100%",
|
|
3756
|
-
...
|
|
3892
|
+
...T
|
|
3757
3893
|
},
|
|
3758
|
-
children: t.map((a,
|
|
3759
|
-
const
|
|
3760
|
-
return /* @__PURE__ */
|
|
3894
|
+
children: t.map((a, f) => {
|
|
3895
|
+
const m = a.id || f, v = fn(a);
|
|
3896
|
+
return /* @__PURE__ */ $(
|
|
3761
3897
|
"div",
|
|
3762
3898
|
{
|
|
3763
|
-
ref: (
|
|
3764
|
-
|
|
3899
|
+
ref: (x) => {
|
|
3900
|
+
x ? y.current.set(m, x) : y.current.delete(m);
|
|
3765
3901
|
},
|
|
3766
3902
|
className: "waterfall-item",
|
|
3767
|
-
children:
|
|
3903
|
+
children: v === "video" ? /* @__PURE__ */ $("div", { style: {
|
|
3768
3904
|
width: "100%",
|
|
3769
3905
|
position: "relative",
|
|
3770
3906
|
paddingBottom: "56.25%",
|
|
3771
|
-
cursor:
|
|
3772
|
-
}, children: /* @__PURE__ */
|
|
3773
|
-
|
|
3907
|
+
cursor: w || a.onClick ? "pointer" : "default"
|
|
3908
|
+
}, children: /* @__PURE__ */ $("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ $(
|
|
3909
|
+
rt,
|
|
3774
3910
|
{
|
|
3775
3911
|
src: a.url,
|
|
3776
3912
|
poster: a.poster,
|
|
@@ -3781,17 +3917,17 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3781
3917
|
autoPlayOnHover: !0,
|
|
3782
3918
|
showPlayButton: !1
|
|
3783
3919
|
}
|
|
3784
|
-
) }) }) : /* @__PURE__ */
|
|
3920
|
+
) }) }) : /* @__PURE__ */ $(
|
|
3785
3921
|
"div",
|
|
3786
3922
|
{
|
|
3787
3923
|
className: "waterfall-image-wrapper",
|
|
3788
3924
|
onClick: () => o(a),
|
|
3789
|
-
style: { cursor:
|
|
3790
|
-
children: /* @__PURE__ */
|
|
3925
|
+
style: { cursor: w || a.onClick ? "pointer" : "default" },
|
|
3926
|
+
children: /* @__PURE__ */ $(
|
|
3791
3927
|
"img",
|
|
3792
3928
|
{
|
|
3793
3929
|
src: a.url,
|
|
3794
|
-
alt: `瀑布流图片 ${
|
|
3930
|
+
alt: `瀑布流图片 ${f + 1}`,
|
|
3795
3931
|
className: "waterfall-image",
|
|
3796
3932
|
onLoad: n,
|
|
3797
3933
|
onError: n,
|
|
@@ -3801,13 +3937,13 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3801
3937
|
}
|
|
3802
3938
|
)
|
|
3803
3939
|
},
|
|
3804
|
-
|
|
3940
|
+
m
|
|
3805
3941
|
);
|
|
3806
3942
|
})
|
|
3807
3943
|
}
|
|
3808
3944
|
);
|
|
3809
3945
|
};
|
|
3810
|
-
|
|
3946
|
+
yn.__docgenInfo = {
|
|
3811
3947
|
displayName: "Waterfall",
|
|
3812
3948
|
description: "瀑布流布局组件,支持图片和视频混合展示",
|
|
3813
3949
|
props: {
|
|
@@ -3863,8 +3999,8 @@ Zt.__docgenInfo = {
|
|
|
3863
3999
|
}
|
|
3864
4000
|
}
|
|
3865
4001
|
};
|
|
3866
|
-
const
|
|
3867
|
-
algorithm:
|
|
4002
|
+
const kn = {
|
|
4003
|
+
algorithm: ht.defaultAlgorithm,
|
|
3868
4004
|
token: {
|
|
3869
4005
|
// 主色
|
|
3870
4006
|
colorPrimary: "#3b82f6",
|
|
@@ -3930,21 +4066,21 @@ const sn = {
|
|
|
3930
4066
|
}
|
|
3931
4067
|
};
|
|
3932
4068
|
export {
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
4069
|
+
It as AdvancedTable,
|
|
4070
|
+
Tt as AppModal,
|
|
4071
|
+
Lt as BackButton,
|
|
4072
|
+
Ct as Button,
|
|
4073
|
+
St as Card,
|
|
4074
|
+
un as DynamicInput,
|
|
4075
|
+
dn as DynamicTextArea,
|
|
4076
|
+
_t as EmptyAndSpin,
|
|
4077
|
+
Dt as LinkButton,
|
|
4078
|
+
qt as PageTable,
|
|
4079
|
+
rn as RichTextEditor,
|
|
4080
|
+
rt as VideoCard,
|
|
4081
|
+
cn as VirtualTable,
|
|
4082
|
+
yn as Waterfall,
|
|
4083
|
+
At as XcIcon,
|
|
4084
|
+
kn as lightTheme
|
|
3949
4085
|
};
|
|
3950
4086
|
//# sourceMappingURL=index.es.js.map
|