bi-components-library 1.0.29 → 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 +1618 -1492
- 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:
|
|
82
|
+
children: c,
|
|
83
|
+
bordered: l = !0,
|
|
84
|
+
hoverable: s = !1,
|
|
85
85
|
size: u = "default",
|
|
86
|
-
...
|
|
87
|
-
}) => /* @__PURE__ */
|
|
88
|
-
|
|
86
|
+
...C
|
|
87
|
+
}) => /* @__PURE__ */ $(
|
|
88
|
+
Re,
|
|
89
89
|
{
|
|
90
|
-
...
|
|
90
|
+
...C,
|
|
91
91
|
title: t,
|
|
92
|
-
bordered:
|
|
93
|
-
hoverable:
|
|
92
|
+
bordered: l,
|
|
93
|
+
hoverable: s,
|
|
94
94
|
size: u,
|
|
95
|
-
children:
|
|
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:
|
|
302
|
+
size: c,
|
|
303
|
+
color: l,
|
|
304
|
+
style: s,
|
|
305
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:
|
|
359
|
+
description: c = "暂无数据",
|
|
360
|
+
className: l,
|
|
361
|
+
emptyChildren: s,
|
|
362
362
|
loadingText: u,
|
|
363
|
-
emptyImage:
|
|
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
|
-
u && /* @__PURE__ */
|
|
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:
|
|
438
|
+
showText: c = !1,
|
|
439
|
+
className: l,
|
|
440
|
+
size: s = "small",
|
|
441
441
|
type: u = "default"
|
|
442
|
-
}) => /* @__PURE__ */
|
|
442
|
+
}) => /* @__PURE__ */ $(
|
|
443
443
|
$e,
|
|
444
444
|
{
|
|
445
|
-
size:
|
|
445
|
+
size: s,
|
|
446
446
|
type: u,
|
|
447
|
-
icon: /* @__PURE__ */
|
|
448
|
-
className: `cursor-pointer ${
|
|
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:
|
|
547
|
+
request: c,
|
|
548
|
+
searchFields: l = [],
|
|
549
|
+
showSearch: s = !0,
|
|
550
550
|
showRefresh: u = !0,
|
|
551
|
-
defaultPageSize:
|
|
552
|
-
pageSizeOptions:
|
|
553
|
-
autoLoad:
|
|
554
|
-
externalParams:
|
|
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,
|
|
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,
|
|
561
|
+
}), [a, f] = ne({}), [m, v] = ne({}), [x] = De.useForm(), V = Q(n);
|
|
562
562
|
V.current = n;
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
const
|
|
566
|
-
const { sortable:
|
|
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
|
|
576
|
+
const p = {
|
|
577
577
|
page: V.current.current,
|
|
578
578
|
pageSize: V.current.pageSize,
|
|
579
|
-
sortField:
|
|
580
|
-
sortOrder:
|
|
581
|
-
searchParams: { ...a, ...
|
|
582
|
-
...
|
|
583
|
-
},
|
|
584
|
-
|
|
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:
|
|
603
|
+
current: d.current || 1,
|
|
604
|
+
pageSize: d.pageSize || C,
|
|
605
|
+
total: d.total || 0
|
|
606
606
|
}, N = {
|
|
607
|
-
field:
|
|
608
|
-
order:
|
|
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
|
-
u && /* @__PURE__ */
|
|
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, Nt = ({
|
|
|
664
664
|
)
|
|
665
665
|
] });
|
|
666
666
|
};
|
|
667
|
-
|
|
667
|
+
It.__docgenInfo = {
|
|
668
668
|
displayName: "AdvancedTable",
|
|
669
669
|
description: "高阶表格组件,支持异步请求、搜索、排序等功能",
|
|
670
670
|
props: {
|
|
@@ -731,71 +731,71 @@ Nt.__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
|
|
738
|
-
|
|
739
|
-
type:
|
|
740
|
-
key:
|
|
741
|
-
exclusionGroup:
|
|
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
|
+
type: y.type,
|
|
740
|
+
key: y.key,
|
|
741
|
+
exclusionGroup: y.exclusionGroup
|
|
742
742
|
}));
|
|
743
|
-
const
|
|
744
|
-
for (const
|
|
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
|
-
(
|
|
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
|
|
768
|
-
if (
|
|
769
|
-
e =
|
|
766
|
+
if (k && T) {
|
|
767
|
+
for (const y of c)
|
|
768
|
+
if (y.exclusionGroup && y.exclusionGroup !== "separator" && C[y.exclusionGroup]) {
|
|
769
|
+
e = y.exclusionGroup;
|
|
770
770
|
break;
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
|
-
for (const
|
|
774
|
-
const
|
|
775
|
-
`[data-group="${
|
|
773
|
+
for (const y of s) {
|
|
774
|
+
const i = t.current.querySelectorAll(
|
|
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
|
-
).forEach((
|
|
788
|
-
|
|
787
|
+
).forEach((y) => {
|
|
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
796
|
const u = [];
|
|
797
|
-
for (let
|
|
798
|
-
const r =
|
|
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 || "",
|
|
@@ -803,14 +803,14 @@ function Pe(t, x, d, i) {
|
|
|
803
803
|
type: r.type === "multi-variable" ? "variable" : r.type,
|
|
804
804
|
isMultiVariable: r.type === "multi-variable",
|
|
805
805
|
minCount: r.type === "multi-variable" ? r.minCount : void 0,
|
|
806
|
-
__index:
|
|
806
|
+
__index: i
|
|
807
807
|
});
|
|
808
808
|
continue;
|
|
809
809
|
}
|
|
810
810
|
if (r.type === "text" && r.className?.includes("rte-text-required"))
|
|
811
811
|
if (r.exclusionGroup)
|
|
812
|
-
for (let n =
|
|
813
|
-
const o =
|
|
812
|
+
for (let n = i + 1; n < c.length; n++) {
|
|
813
|
+
const o = c[n];
|
|
814
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) {
|
|
815
815
|
u.push({
|
|
816
816
|
exclusionGroup: r.exclusionGroup,
|
|
@@ -822,8 +822,8 @@ function Pe(t, x, d, i) {
|
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
else
|
|
825
|
-
for (let n =
|
|
826
|
-
const o =
|
|
825
|
+
for (let n = i + 1; n < c.length; n++) {
|
|
826
|
+
const o = c[n];
|
|
827
827
|
if ((o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
|
|
828
828
|
u.push({
|
|
829
829
|
exclusionGroup: o.exclusionGroup || "",
|
|
@@ -835,51 +835,51 @@ function Pe(t, x, d, i) {
|
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
const
|
|
839
|
-
if (
|
|
840
|
-
const
|
|
841
|
-
|
|
842
|
-
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);
|
|
843
843
|
});
|
|
844
|
-
for (const r of
|
|
845
|
-
const o = u.filter((
|
|
846
|
-
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]);
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
if (u.length === 0) {
|
|
850
|
-
if (
|
|
850
|
+
if (c.length === 0) {
|
|
851
851
|
if (!t.current) {
|
|
852
|
-
|
|
852
|
+
s(!1);
|
|
853
853
|
return;
|
|
854
854
|
}
|
|
855
|
-
const
|
|
856
|
-
i
|
|
855
|
+
const i = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
856
|
+
s(i.length > 0);
|
|
857
857
|
return;
|
|
858
858
|
}
|
|
859
|
-
|
|
859
|
+
s(!0);
|
|
860
860
|
return;
|
|
861
861
|
}
|
|
862
|
-
const
|
|
862
|
+
const w = u.filter((i) => {
|
|
863
863
|
if (!t.current) return !1;
|
|
864
|
-
if (
|
|
864
|
+
if (i.exclusionGroup) {
|
|
865
865
|
const r = t.current.querySelectorAll(
|
|
866
|
-
`[data-group="${
|
|
866
|
+
`[data-group="${i.exclusionGroup}"]`
|
|
867
867
|
);
|
|
868
868
|
if (r.length > 0)
|
|
869
869
|
return r[0].style.display !== "none";
|
|
870
870
|
}
|
|
871
|
-
if (
|
|
871
|
+
if (i.type === "upload" && i.key) {
|
|
872
872
|
const r = t.current.querySelector(
|
|
873
|
-
`[data-type="upload"][data-key="${
|
|
873
|
+
`[data-type="upload"][data-key="${i.key}"]`
|
|
874
874
|
);
|
|
875
875
|
if (r) {
|
|
876
876
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
877
877
|
return n ? n.style.display !== "none" : !0;
|
|
878
878
|
}
|
|
879
|
-
} else if (
|
|
880
|
-
if (
|
|
879
|
+
} else if (i.type === "variable" && i.key)
|
|
880
|
+
if (i.isMultiVariable) {
|
|
881
881
|
const r = t.current.querySelectorAll(
|
|
882
|
-
`[data-type="variable"][data-multi-key="${
|
|
882
|
+
`[data-type="variable"][data-multi-key="${i.key}"]`
|
|
883
883
|
);
|
|
884
884
|
if (r.length > 0) {
|
|
885
885
|
const n = r[0], o = n.closest("[data-group]") || n.parentElement;
|
|
@@ -887,40 +887,40 @@ function Pe(t, x, d, i) {
|
|
|
887
887
|
}
|
|
888
888
|
} else {
|
|
889
889
|
const r = t.current.querySelector(
|
|
890
|
-
`[data-type="variable"][data-key="${
|
|
890
|
+
`[data-type="variable"][data-key="${i.key}"]`
|
|
891
891
|
);
|
|
892
892
|
if (r) {
|
|
893
893
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
894
894
|
return n ? n.style.display !== "none" : !0;
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
|
-
else if (
|
|
897
|
+
else if (i.type === "select" && i.key) {
|
|
898
898
|
const r = t.current.querySelector(
|
|
899
|
-
`[data-type="select"][data-key="${
|
|
899
|
+
`[data-type="select"][data-key="${i.key}"]`
|
|
900
900
|
);
|
|
901
901
|
if (r) {
|
|
902
902
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
903
903
|
return n ? n.style.display !== "none" : !0;
|
|
904
904
|
}
|
|
905
|
-
} else if (
|
|
905
|
+
} else if (i.type === "textarea" && i.key) {
|
|
906
906
|
const r = t.current.querySelector(
|
|
907
|
-
`[data-type="textarea"][data-key="${
|
|
907
|
+
`[data-type="textarea"][data-key="${i.key}"]`
|
|
908
908
|
);
|
|
909
909
|
if (r) {
|
|
910
910
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
911
911
|
return n ? n.style.display !== "none" : !0;
|
|
912
912
|
}
|
|
913
|
-
} else if (
|
|
913
|
+
} else if (i.type === "richtext" && i.key) {
|
|
914
914
|
const r = t.current.querySelector(
|
|
915
|
-
`[data-type="richtext"][data-key="${
|
|
915
|
+
`[data-type="richtext"][data-key="${i.key}"]`
|
|
916
916
|
);
|
|
917
917
|
if (r) {
|
|
918
918
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
919
919
|
return n ? n.style.display !== "none" : !0;
|
|
920
920
|
}
|
|
921
|
-
} else if (
|
|
921
|
+
} else if (i.type === "datepicker" && i.key) {
|
|
922
922
|
const r = t.current.querySelector(
|
|
923
|
-
`[data-type="datepicker"][data-key="${
|
|
923
|
+
`[data-type="datepicker"][data-key="${i.key}"]`
|
|
924
924
|
);
|
|
925
925
|
if (r) {
|
|
926
926
|
const n = r.closest("[data-group]") || r.parentElement;
|
|
@@ -929,22 +929,22 @@ function Pe(t, x, d, i) {
|
|
|
929
929
|
}
|
|
930
930
|
return !1;
|
|
931
931
|
});
|
|
932
|
-
if (
|
|
933
|
-
|
|
932
|
+
if (w.length === 0) {
|
|
933
|
+
s(!0);
|
|
934
934
|
return;
|
|
935
935
|
}
|
|
936
|
-
const
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
r.key &&
|
|
936
|
+
const k = /* @__PURE__ */ new Set();
|
|
937
|
+
T.forEach((i) => {
|
|
938
|
+
i.forEach((r) => {
|
|
939
|
+
r.key && k.add(r.key);
|
|
940
940
|
});
|
|
941
941
|
});
|
|
942
|
-
const e =
|
|
943
|
-
(
|
|
942
|
+
const e = w.filter(
|
|
943
|
+
(i) => !i.key || !k.has(i.key)
|
|
944
944
|
);
|
|
945
|
-
let q = (
|
|
946
|
-
for (const
|
|
947
|
-
const r =
|
|
945
|
+
let q = (T.length === 0, !0);
|
|
946
|
+
for (const i of T) {
|
|
947
|
+
const r = i.filter((o) => {
|
|
948
948
|
if (!t.current) return !1;
|
|
949
949
|
if (o.exclusionGroup) {
|
|
950
950
|
const a = t.current.querySelectorAll(
|
|
@@ -960,7 +960,7 @@ function Pe(t, x, d, i) {
|
|
|
960
960
|
let n = !1;
|
|
961
961
|
for (const o of r)
|
|
962
962
|
if (o.type === "upload" && o.key) {
|
|
963
|
-
if (
|
|
963
|
+
if (l[o.key] !== null && l[o.key] !== void 0) {
|
|
964
964
|
n = !0;
|
|
965
965
|
break;
|
|
966
966
|
}
|
|
@@ -969,14 +969,14 @@ function Pe(t, x, d, i) {
|
|
|
969
969
|
const a = t.current.querySelectorAll(
|
|
970
970
|
`[data-type="variable"][data-multi-key="${o.key}"]`
|
|
971
971
|
);
|
|
972
|
-
let
|
|
973
|
-
for (const
|
|
974
|
-
if (
|
|
972
|
+
let f = 0;
|
|
973
|
+
for (const v of Array.from(a)) {
|
|
974
|
+
if (v.classList.contains("show-placeholder"))
|
|
975
975
|
continue;
|
|
976
|
-
|
|
976
|
+
v.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (f += 1);
|
|
977
977
|
}
|
|
978
|
-
const
|
|
979
|
-
if (
|
|
978
|
+
const m = o.minCount && o.minCount > 0 ? o.minCount : 1;
|
|
979
|
+
if (f >= m) {
|
|
980
980
|
n = !0;
|
|
981
981
|
break;
|
|
982
982
|
}
|
|
@@ -1031,17 +1031,17 @@ function Pe(t, x, d, i) {
|
|
|
1031
1031
|
break;
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
|
-
let
|
|
1035
|
-
for (const
|
|
1036
|
-
if (
|
|
1037
|
-
if (
|
|
1038
|
-
|
|
1034
|
+
let y = !0;
|
|
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
|
+
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
1047
|
for (const a of Array.from(r)) {
|
|
@@ -1049,208 +1049,208 @@ function Pe(t, x, d, i) {
|
|
|
1049
1049
|
continue;
|
|
1050
1050
|
a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (n += 1);
|
|
1051
1051
|
}
|
|
1052
|
-
const o =
|
|
1052
|
+
const o = i.minCount && i.minCount > 0 ? i.minCount : 1;
|
|
1053
1053
|
if (n < o) {
|
|
1054
|
-
|
|
1054
|
+
y = !1;
|
|
1055
1055
|
break;
|
|
1056
1056
|
}
|
|
1057
1057
|
} else {
|
|
1058
1058
|
const r = t.current.querySelector(
|
|
1059
|
-
`[data-type="variable"][data-key="${
|
|
1059
|
+
`[data-type="variable"][data-key="${i.key}"]`
|
|
1060
1060
|
);
|
|
1061
1061
|
if (!r) {
|
|
1062
|
-
|
|
1062
|
+
y = !1;
|
|
1063
1063
|
break;
|
|
1064
1064
|
}
|
|
1065
1065
|
if (r.classList.contains("show-placeholder")) {
|
|
1066
|
-
|
|
1066
|
+
y = !1;
|
|
1067
1067
|
break;
|
|
1068
1068
|
}
|
|
1069
1069
|
if (r.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
|
|
1070
|
-
|
|
1070
|
+
y = !1;
|
|
1071
1071
|
break;
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
|
-
else if (
|
|
1074
|
+
else if (i.type === "select" && i.key) {
|
|
1075
1075
|
const r = t.current.querySelector(
|
|
1076
|
-
`[data-type="select"][data-key="${
|
|
1076
|
+
`[data-type="select"][data-key="${i.key}"]`
|
|
1077
1077
|
);
|
|
1078
1078
|
if (!r || (r.value || "").trim().length === 0) {
|
|
1079
|
-
|
|
1079
|
+
y = !1;
|
|
1080
1080
|
break;
|
|
1081
1081
|
}
|
|
1082
|
-
} else if (
|
|
1082
|
+
} else if (i.type === "textarea" && i.key) {
|
|
1083
1083
|
const r = t.current.querySelector(
|
|
1084
|
-
`[data-type="textarea"][data-key="${
|
|
1084
|
+
`[data-type="textarea"][data-key="${i.key}"]`
|
|
1085
1085
|
);
|
|
1086
1086
|
if (!r || (r.value || "").trim().length === 0) {
|
|
1087
|
-
|
|
1087
|
+
y = !1;
|
|
1088
1088
|
break;
|
|
1089
1089
|
}
|
|
1090
|
-
} else if (
|
|
1090
|
+
} else if (i.type === "richtext" && i.key) {
|
|
1091
1091
|
const r = t.current.querySelector(
|
|
1092
|
-
`[data-type="richtext"][data-key="${
|
|
1092
|
+
`[data-type="richtext"][data-key="${i.key}"]`
|
|
1093
1093
|
);
|
|
1094
1094
|
if (!r || (r.textContent || "").replace(/[\u200B]/g, "").trim().length === 0) {
|
|
1095
|
-
|
|
1095
|
+
y = !1;
|
|
1096
1096
|
break;
|
|
1097
1097
|
}
|
|
1098
|
-
} else if (
|
|
1098
|
+
} else if (i.type === "datepicker" && i.key) {
|
|
1099
1099
|
const r = t.current.querySelector(
|
|
1100
|
-
`[data-type="datepicker"][data-key="${
|
|
1100
|
+
`[data-type="datepicker"][data-key="${i.key}"]`
|
|
1101
1101
|
);
|
|
1102
1102
|
if (!r || (r.getAttribute("data-value") || "").trim().length === 0) {
|
|
1103
|
-
|
|
1103
|
+
y = !1;
|
|
1104
1104
|
break;
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
|
|
1107
|
+
s(q && y);
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function Be(t, c) {
|
|
1110
1110
|
if (!t.current) return;
|
|
1111
|
-
t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1112
|
-
const u =
|
|
1113
|
-
u.replace(/\u200B/g, "") ?
|
|
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"));
|
|
1114
1114
|
});
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function Vt(t, c, l, s, u, C = {}, T) {
|
|
1117
1117
|
if (!t.current) return;
|
|
1118
|
-
let
|
|
1119
|
-
for (;
|
|
1120
|
-
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;
|
|
1121
1121
|
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && q) {
|
|
1122
|
-
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;
|
|
1123
1123
|
if (a) {
|
|
1124
|
-
const
|
|
1124
|
+
const v = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
|
|
1125
1125
|
let V = "";
|
|
1126
1126
|
e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
|
|
1127
|
-
const
|
|
1128
|
-
let
|
|
1129
|
-
|
|
1130
|
-
const
|
|
1131
|
-
|
|
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;
|
|
1132
1132
|
continue;
|
|
1133
1133
|
}
|
|
1134
|
-
if (
|
|
1135
|
-
const
|
|
1134
|
+
if (f) {
|
|
1135
|
+
const v = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
|
|
1136
1136
|
let V = "";
|
|
1137
1137
|
e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
|
|
1138
|
-
const
|
|
1139
|
-
|
|
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;
|
|
1140
1140
|
continue;
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
const
|
|
1143
|
+
const i = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", r = e.exclusionGroup ? `<span ${i} class="exclusion-wrapper">` : "", n = e.exclusionGroup ? "</span>" : "";
|
|
1144
1144
|
let o = "";
|
|
1145
1145
|
if (e.type === "tag") {
|
|
1146
|
-
const
|
|
1147
|
-
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>`;
|
|
1148
1148
|
} else if (e.type === "text") {
|
|
1149
|
-
const a =
|
|
1150
|
-
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>`;
|
|
1151
1151
|
} else if (e.type === "variable" && e.key) {
|
|
1152
|
-
const
|
|
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>${
|
|
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;
|
|
1154
1154
|
} else if (e.type === "upload" && e.key) {
|
|
1155
|
-
const a =
|
|
1156
|
-
let
|
|
1157
|
-
a &&
|
|
1158
|
-
const
|
|
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>${
|
|
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;
|
|
1160
1160
|
} else if (e.type === "select" && e.key) {
|
|
1161
|
-
const a = u[e.key] || e.defaultValue || "",
|
|
1162
|
-
const V = a ===
|
|
1163
|
-
return `<option value="${
|
|
1164
|
-
}).join(""),
|
|
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>${
|
|
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;
|
|
1166
1166
|
} else if (e.type === "textarea" && e.key) {
|
|
1167
|
-
const a = u[e.key] || "",
|
|
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>${
|
|
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;
|
|
1169
1169
|
} else if (e.type === "richtext" && e.key) {
|
|
1170
|
-
const a = u[e.key] || e.text || "",
|
|
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>${
|
|
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;
|
|
1172
1172
|
} else if (e.type === "datepicker" && e.key) {
|
|
1173
|
-
const a = u[e.key] || "",
|
|
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>${
|
|
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;
|
|
1175
1175
|
} else if (e.type === "multi-variable" && e.key) {
|
|
1176
|
-
const a = e.maxCount || 9,
|
|
1176
|
+
const a = e.maxCount || 9, f = C[e.key] || 1, m = Math.min(f, a);
|
|
1177
1177
|
if (e.required) {
|
|
1178
|
-
const
|
|
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
1179
|
let V = "";
|
|
1180
|
-
for (let
|
|
1181
|
-
const
|
|
1182
|
-
|
|
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;
|
|
1183
1183
|
}
|
|
1184
1184
|
o = V;
|
|
1185
1185
|
} else {
|
|
1186
|
-
let
|
|
1187
|
-
for (let
|
|
1188
|
-
const V = `${e.key}_${
|
|
1189
|
-
|
|
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;
|
|
1190
1190
|
}
|
|
1191
|
-
o =
|
|
1191
|
+
o = v;
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
|
-
|
|
1194
|
+
w += r + o + n, k++;
|
|
1195
1195
|
}
|
|
1196
|
-
t.current && (t.current.innerHTML =
|
|
1196
|
+
t.current && (t.current.innerHTML = w, setTimeout(() => {
|
|
1197
1197
|
if (!t.current) return;
|
|
1198
1198
|
t.current.querySelectorAll('[data-type="variable"]').forEach((q) => {
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1199
|
+
const y = q.innerText.replace(/\n/g, "");
|
|
1200
|
+
y.replace(/\u200B/g, "") ? q.classList.remove("show-placeholder") : (y !== "" && (q.innerText = ""), q.classList.add("show-placeholder"));
|
|
1201
1201
|
});
|
|
1202
1202
|
}, 0));
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1205
|
-
const
|
|
1204
|
+
function Pt(t, c, l, s, u = {}, C, T, w) {
|
|
1205
|
+
const k = ae(() => {
|
|
1206
1206
|
if (!t.current) return;
|
|
1207
|
-
if (
|
|
1207
|
+
if (c.length === 0) {
|
|
1208
1208
|
t.current.innerHTML = "";
|
|
1209
1209
|
return;
|
|
1210
1210
|
}
|
|
1211
1211
|
let e = {};
|
|
1212
|
-
const
|
|
1213
|
-
if (
|
|
1212
|
+
const y = t.current.__tempVariableValues;
|
|
1213
|
+
if (y ? (e = y, setTimeout(() => {
|
|
1214
1214
|
if (t.current) {
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1217
|
-
}
|
|
1218
|
-
}, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1219
|
-
const
|
|
1220
|
-
if (
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1223
|
-
}
|
|
1224
|
-
}), t.current.querySelectorAll('[data-type="select"]').forEach((
|
|
1225
|
-
const
|
|
1226
|
-
if (
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
}
|
|
1230
|
-
}), t.current.querySelectorAll('[data-type="textarea"]').forEach((
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
1233
|
-
const
|
|
1234
|
-
|
|
1235
|
-
}
|
|
1236
|
-
}), t.current.querySelectorAll('[data-type="richtext"]').forEach((
|
|
1237
|
-
const
|
|
1238
|
-
if (
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1241
|
-
}
|
|
1242
|
-
}), t.current.querySelectorAll('[data-type="datepicker"]').forEach((
|
|
1243
|
-
const
|
|
1244
|
-
if (
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
}
|
|
1248
|
-
})),
|
|
1249
|
-
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;
|
|
1250
1250
|
setTimeout(() => {
|
|
1251
1251
|
if (!t.current) return;
|
|
1252
1252
|
const n = t.current.querySelector(
|
|
1253
|
-
`[data-type="variable"][data-key="${
|
|
1253
|
+
`[data-type="variable"][data-key="${i}"]`
|
|
1254
1254
|
);
|
|
1255
1255
|
if (n) {
|
|
1256
1256
|
try {
|
|
@@ -1259,23 +1259,23 @@ function At(t, x, d, i, u = {}, T, I, $) {
|
|
|
1259
1259
|
NodeFilter.SHOW_TEXT,
|
|
1260
1260
|
null
|
|
1261
1261
|
);
|
|
1262
|
-
let
|
|
1262
|
+
let f = 0, m = null, v = 0;
|
|
1263
1263
|
for (; a.nextNode(); ) {
|
|
1264
|
-
const
|
|
1265
|
-
if (
|
|
1266
|
-
|
|
1264
|
+
const x = a.currentNode, V = x.textContent?.length || 0;
|
|
1265
|
+
if (f + V >= r) {
|
|
1266
|
+
m = x, v = r - f;
|
|
1267
1267
|
break;
|
|
1268
1268
|
}
|
|
1269
|
-
|
|
1269
|
+
f += V;
|
|
1270
1270
|
}
|
|
1271
|
-
if (
|
|
1272
|
-
o.setStart(
|
|
1273
|
-
const
|
|
1274
|
-
|
|
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());
|
|
1275
1275
|
} else {
|
|
1276
1276
|
o.selectNodeContents(n), o.collapse(!1);
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1277
|
+
const x = window.getSelection();
|
|
1278
|
+
x && (x.removeAllRanges(), x.addRange(o), n.focus());
|
|
1279
1279
|
}
|
|
1280
1280
|
} catch {
|
|
1281
1281
|
const o = document.createRange();
|
|
@@ -1283,161 +1283,161 @@ function At(t, x, d, i, u = {}, T, I, $) {
|
|
|
1283
1283
|
const a = window.getSelection();
|
|
1284
1284
|
a && (a.removeAllRanges(), a.addRange(o), n.focus());
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1286
|
+
C.current = null;
|
|
1287
1287
|
}
|
|
1288
1288
|
}, 0);
|
|
1289
1289
|
}
|
|
1290
|
-
}, [
|
|
1290
|
+
}, [c, l, s, t, u, C, T, w]);
|
|
1291
1291
|
de(() => {
|
|
1292
|
-
|
|
1293
|
-
}, [
|
|
1292
|
+
k();
|
|
1293
|
+
}, [k]);
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Bt(t, c, l, s) {
|
|
1296
1296
|
de(() => {
|
|
1297
1297
|
const u = t.current;
|
|
1298
1298
|
if (!u) return;
|
|
1299
|
-
const
|
|
1300
|
-
const
|
|
1301
|
-
if (
|
|
1302
|
-
const q =
|
|
1303
|
-
q &&
|
|
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" });
|
|
1304
1304
|
return;
|
|
1305
1305
|
}
|
|
1306
|
-
const e =
|
|
1306
|
+
const e = w.target?.closest('[data-type="upload"]');
|
|
1307
1307
|
if (e) {
|
|
1308
1308
|
const q = e.dataset.key;
|
|
1309
1309
|
if (q) {
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1310
|
+
const y = l[q];
|
|
1311
|
+
y && y.type && y.type.startsWith("image/") && s({ key: q, anchorEl: e, type: "upload-preview" });
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
|
-
},
|
|
1315
|
-
const
|
|
1316
|
-
if (
|
|
1317
|
-
!e || !u.contains(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);
|
|
1318
1318
|
return;
|
|
1319
1319
|
}
|
|
1320
|
-
const q =
|
|
1320
|
+
const q = w.target?.closest('[data-type="upload"]');
|
|
1321
1321
|
if (q) {
|
|
1322
|
-
const
|
|
1323
|
-
if (
|
|
1322
|
+
const y = e;
|
|
1323
|
+
if (y && q.contains(y))
|
|
1324
1324
|
return;
|
|
1325
|
-
|
|
1325
|
+
s(null);
|
|
1326
1326
|
}
|
|
1327
1327
|
};
|
|
1328
|
-
return u.addEventListener("mouseover",
|
|
1329
|
-
u.removeEventListener("mouseover",
|
|
1328
|
+
return u.addEventListener("mouseover", C, !0), u.addEventListener("mouseout", T, !0), () => {
|
|
1329
|
+
u.removeEventListener("mouseover", C, !0), u.removeEventListener("mouseout", T, !0);
|
|
1330
1330
|
};
|
|
1331
|
-
}, [
|
|
1331
|
+
}, [c, l, t, s]);
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function Ot(t, c, l, s) {
|
|
1334
1334
|
de(() => {
|
|
1335
1335
|
if (!t.current) return;
|
|
1336
|
-
const u = (
|
|
1337
|
-
if (
|
|
1336
|
+
const u = (k) => {
|
|
1337
|
+
if (s === "hideTagClose")
|
|
1338
1338
|
return;
|
|
1339
|
-
const e =
|
|
1340
|
-
q &&
|
|
1341
|
-
},
|
|
1342
|
-
|
|
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);
|
|
1343
1343
|
};
|
|
1344
|
-
let
|
|
1345
|
-
const
|
|
1344
|
+
let T;
|
|
1345
|
+
const w = () => {
|
|
1346
1346
|
if (!t.current) return;
|
|
1347
1347
|
t.current.querySelectorAll(
|
|
1348
1348
|
".tag-node[data-tooltip]"
|
|
1349
1349
|
).forEach((e) => {
|
|
1350
|
-
e.addEventListener("mouseenter", u), e.addEventListener("mouseleave",
|
|
1350
|
+
e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", C);
|
|
1351
1351
|
});
|
|
1352
1352
|
};
|
|
1353
|
-
return
|
|
1354
|
-
|
|
1353
|
+
return T = requestAnimationFrame(() => {
|
|
1354
|
+
T = requestAnimationFrame(w);
|
|
1355
1355
|
}), () => {
|
|
1356
|
-
cancelAnimationFrame(
|
|
1356
|
+
cancelAnimationFrame(T), t.current && t.current.querySelectorAll(
|
|
1357
1357
|
".tag-node[data-tooltip]"
|
|
1358
1358
|
).forEach((e) => {
|
|
1359
|
-
e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave",
|
|
1359
|
+
e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", C);
|
|
1360
1360
|
});
|
|
1361
1361
|
};
|
|
1362
|
-
}, [
|
|
1362
|
+
}, [c, t, l, s]);
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function Ht(t, c, l) {
|
|
1365
1365
|
de(() => {
|
|
1366
|
-
const
|
|
1367
|
-
if (!
|
|
1368
|
-
const u = (
|
|
1369
|
-
const
|
|
1370
|
-
if (
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1373
|
-
}
|
|
1374
|
-
},
|
|
1375
|
-
const
|
|
1376
|
-
|
|
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));
|
|
1377
1377
|
};
|
|
1378
|
-
return
|
|
1379
|
-
|
|
1378
|
+
return s.addEventListener("mouseover", u, !0), s.addEventListener("mouseout", C, !0), () => {
|
|
1379
|
+
s.removeEventListener("mouseover", u, !0), s.removeEventListener("mouseout", C, !0);
|
|
1380
1380
|
};
|
|
1381
|
-
}, [
|
|
1381
|
+
}, [c, t, l]);
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Rt(t, c, l, s) {
|
|
1384
1384
|
de(() => {
|
|
1385
1385
|
if (!t.current) return;
|
|
1386
|
-
const u = (
|
|
1387
|
-
const e =
|
|
1388
|
-
e.dataset.fileName &&
|
|
1389
|
-
},
|
|
1390
|
-
|
|
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);
|
|
1391
1391
|
};
|
|
1392
|
-
let
|
|
1393
|
-
const
|
|
1392
|
+
let T;
|
|
1393
|
+
const w = () => {
|
|
1394
1394
|
if (!t.current) return;
|
|
1395
1395
|
t.current.querySelectorAll(
|
|
1396
1396
|
".upload-label[data-file-name]"
|
|
1397
1397
|
).forEach((e) => {
|
|
1398
|
-
e.addEventListener("mouseenter", u), e.addEventListener("mouseleave",
|
|
1398
|
+
e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", C);
|
|
1399
1399
|
});
|
|
1400
1400
|
};
|
|
1401
|
-
return
|
|
1402
|
-
|
|
1401
|
+
return T = requestAnimationFrame(() => {
|
|
1402
|
+
T = requestAnimationFrame(w);
|
|
1403
1403
|
}), () => {
|
|
1404
|
-
cancelAnimationFrame(
|
|
1404
|
+
cancelAnimationFrame(T), t.current && t.current.querySelectorAll(
|
|
1405
1405
|
".upload-label[data-file-name]"
|
|
1406
1406
|
).forEach((e) => {
|
|
1407
|
-
e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave",
|
|
1407
|
+
e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", C);
|
|
1408
1408
|
});
|
|
1409
1409
|
};
|
|
1410
|
-
}, [
|
|
1410
|
+
}, [c, l, t, s]);
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Gt(t, c, l, s) {
|
|
1413
1413
|
de(() => {
|
|
1414
1414
|
const u = setTimeout(() => {
|
|
1415
|
-
|
|
1415
|
+
Oe(t, c, l), He(t, c, l, s);
|
|
1416
1416
|
}, 0);
|
|
1417
1417
|
return () => clearTimeout(u);
|
|
1418
|
-
}, [
|
|
1418
|
+
}, [l, c, t, s]);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1421
|
-
const
|
|
1420
|
+
function Ft(t, c) {
|
|
1421
|
+
const l = Q(0);
|
|
1422
1422
|
de(() => {
|
|
1423
1423
|
if (!t.current) return;
|
|
1424
|
-
let
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
-
},
|
|
1428
|
-
|
|
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();
|
|
1429
1429
|
};
|
|
1430
|
-
let
|
|
1430
|
+
let k = !1, e = 0;
|
|
1431
1431
|
const q = () => {
|
|
1432
|
-
|
|
1433
|
-
},
|
|
1434
|
-
|
|
1435
|
-
},
|
|
1432
|
+
k = !0;
|
|
1433
|
+
}, y = () => {
|
|
1434
|
+
k = !1, e = Date.now();
|
|
1435
|
+
}, i = () => {
|
|
1436
1436
|
e = Date.now();
|
|
1437
1437
|
}, r = (a) => {
|
|
1438
|
-
|
|
1438
|
+
C(a.target) && (l.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target"));
|
|
1439
1439
|
}, n = () => {
|
|
1440
|
-
if (Date.now() -
|
|
1440
|
+
if (Date.now() - l.current < 800) {
|
|
1441
1441
|
console.log("[SelectionCtrl] skip selectionchange due to recent datepicker interaction");
|
|
1442
1442
|
return;
|
|
1443
1443
|
}
|
|
@@ -1448,222 +1448,222 @@ function Vt(t, x) {
|
|
|
1448
1448
|
return;
|
|
1449
1449
|
}
|
|
1450
1450
|
if (!t.current) return;
|
|
1451
|
-
const
|
|
1452
|
-
if (!
|
|
1451
|
+
const f = window.getSelection();
|
|
1452
|
+
if (!f || f.rangeCount === 0 || c.current || s || k || Date.now() - e < 500)
|
|
1453
1453
|
return;
|
|
1454
|
-
const
|
|
1455
|
-
if (!
|
|
1456
|
-
return t.current.contains(
|
|
1457
|
-
const
|
|
1458
|
-
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))
|
|
1459
1459
|
return;
|
|
1460
|
-
let
|
|
1461
|
-
if (
|
|
1462
|
-
const
|
|
1463
|
-
(
|
|
1464
|
-
} else if (
|
|
1465
|
-
const
|
|
1466
|
-
(
|
|
1467
|
-
}
|
|
1468
|
-
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)
|
|
1469
1469
|
return;
|
|
1470
1470
|
let V = null;
|
|
1471
|
-
if (
|
|
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
1472
|
if (Date.now() - u > 500)
|
|
1473
1473
|
return;
|
|
1474
|
-
const
|
|
1475
|
-
if (
|
|
1476
|
-
let
|
|
1477
|
-
for (const
|
|
1478
|
-
if (
|
|
1479
|
-
|
|
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;
|
|
1480
1480
|
break;
|
|
1481
1481
|
}
|
|
1482
|
-
if (!
|
|
1483
|
-
const
|
|
1484
|
-
|
|
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();
|
|
1485
1485
|
} else
|
|
1486
|
-
|
|
1486
|
+
f.removeAllRanges();
|
|
1487
1487
|
} else
|
|
1488
|
-
|
|
1488
|
+
f.removeAllRanges();
|
|
1489
1489
|
}
|
|
1490
1490
|
}, o = t.current;
|
|
1491
|
-
return o && (o.addEventListener("compositionstart", q), o.addEventListener("compositionend",
|
|
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), () => {
|
|
1492
1492
|
const a = t.current;
|
|
1493
|
-
a && (a.removeEventListener("compositionstart", q), a.removeEventListener("compositionend",
|
|
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);
|
|
1494
1494
|
};
|
|
1495
|
-
}, [t,
|
|
1495
|
+
}, [t, c]);
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function Yt(t) {
|
|
1498
1498
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1499
1499
|
}
|
|
1500
|
-
var
|
|
1501
|
-
function
|
|
1502
|
-
return
|
|
1503
|
-
(function(
|
|
1504
|
-
t.exports =
|
|
1505
|
-
})(
|
|
1506
|
-
var
|
|
1507
|
-
var
|
|
1508
|
-
return "[" +
|
|
1509
|
-
} },
|
|
1510
|
-
var L = String(
|
|
1511
|
-
return !L || L.length >=
|
|
1512
|
-
},
|
|
1513
|
-
var
|
|
1514
|
-
return (
|
|
1515
|
-
}, m: function
|
|
1516
|
-
if (
|
|
1517
|
-
var L = 12 * (
|
|
1518
|
-
return +(-(L + (
|
|
1519
|
-
}, a: function(
|
|
1520
|
-
return
|
|
1521
|
-
}, p: function(
|
|
1522
|
-
return { M:
|
|
1523
|
-
}, u: function(
|
|
1524
|
-
return
|
|
1525
|
-
} }, V = "en",
|
|
1526
|
-
|
|
1527
|
-
var
|
|
1528
|
-
return
|
|
1529
|
-
}, F = function
|
|
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
1530
|
var N;
|
|
1531
|
-
if (!
|
|
1532
|
-
if (typeof
|
|
1533
|
-
var
|
|
1534
|
-
|
|
1535
|
-
var
|
|
1536
|
-
if (!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]);
|
|
1537
1537
|
} else {
|
|
1538
|
-
var te =
|
|
1539
|
-
|
|
1538
|
+
var te = p.name;
|
|
1539
|
+
E[te] = p, N = te;
|
|
1540
1540
|
}
|
|
1541
1541
|
return !L && N && (V = N), N || !L && V;
|
|
1542
|
-
},
|
|
1543
|
-
if (
|
|
1544
|
-
var
|
|
1545
|
-
return
|
|
1546
|
-
},
|
|
1547
|
-
|
|
1548
|
-
return
|
|
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 });
|
|
1549
1549
|
};
|
|
1550
1550
|
var ee = function() {
|
|
1551
|
-
function
|
|
1552
|
-
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;
|
|
1553
1553
|
}
|
|
1554
|
-
var
|
|
1555
|
-
return
|
|
1554
|
+
var p = d.prototype;
|
|
1555
|
+
return p.parse = function(b) {
|
|
1556
1556
|
this.$d = function(L) {
|
|
1557
|
-
var N = L.date,
|
|
1557
|
+
var N = L.date, z = L.utc;
|
|
1558
1558
|
if (N === null) return /* @__PURE__ */ new Date(NaN);
|
|
1559
|
-
if (
|
|
1559
|
+
if (H.u(N)) return /* @__PURE__ */ new Date();
|
|
1560
1560
|
if (N instanceof Date) return new Date(N);
|
|
1561
1561
|
if (typeof N == "string" && !/Z$/i.test(N)) {
|
|
1562
|
-
var
|
|
1563
|
-
if (
|
|
1564
|
-
var te =
|
|
1565
|
-
return
|
|
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);
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
return new Date(N);
|
|
1569
|
-
}(
|
|
1570
|
-
},
|
|
1571
|
-
var
|
|
1572
|
-
this.$y =
|
|
1573
|
-
},
|
|
1574
|
-
return
|
|
1575
|
-
},
|
|
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() {
|
|
1576
1576
|
return this.$d.toString() !== o;
|
|
1577
|
-
},
|
|
1578
|
-
var N =
|
|
1577
|
+
}, p.isSame = function(b, L) {
|
|
1578
|
+
var N = W(b);
|
|
1579
1579
|
return this.startOf(L) <= N && N <= this.endOf(L);
|
|
1580
|
-
},
|
|
1581
|
-
return
|
|
1582
|
-
},
|
|
1583
|
-
return this.endOf(L) <
|
|
1584
|
-
},
|
|
1585
|
-
return
|
|
1586
|
-
},
|
|
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() {
|
|
1587
1587
|
return Math.floor(this.valueOf() / 1e3);
|
|
1588
|
-
},
|
|
1588
|
+
}, p.valueOf = function() {
|
|
1589
1589
|
return this.$d.getTime();
|
|
1590
|
-
},
|
|
1591
|
-
var N = this,
|
|
1592
|
-
var xe =
|
|
1593
|
-
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);
|
|
1594
1594
|
}, se = function(he, ye) {
|
|
1595
|
-
return
|
|
1595
|
+
return H.w(N.toDate()[he].apply(N.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ye)), N);
|
|
1596
1596
|
}, ce = this.$W, pe = this.$M, fe = this.$D, be = "set" + (this.$u ? "UTC" : "");
|
|
1597
|
-
switch (
|
|
1597
|
+
switch (Y) {
|
|
1598
1598
|
case r:
|
|
1599
|
-
return
|
|
1600
|
-
case
|
|
1601
|
-
return
|
|
1599
|
+
return z ? te(1, 0) : te(31, 11);
|
|
1600
|
+
case y:
|
|
1601
|
+
return z ? te(1, pe) : te(0, pe + 1);
|
|
1602
1602
|
case q:
|
|
1603
1603
|
var X = this.$locale().weekStart || 0, ue = (ce < X ? ce + 7 : ce) - X;
|
|
1604
|
-
return te(
|
|
1604
|
+
return te(z ? fe - ue : fe + (6 - ue), pe);
|
|
1605
1605
|
case e:
|
|
1606
1606
|
case n:
|
|
1607
1607
|
return se(be + "Hours", 0);
|
|
1608
|
-
case
|
|
1608
|
+
case k:
|
|
1609
1609
|
return se(be + "Minutes", 1);
|
|
1610
|
-
case
|
|
1610
|
+
case w:
|
|
1611
1611
|
return se(be + "Seconds", 2);
|
|
1612
|
-
case
|
|
1612
|
+
case T:
|
|
1613
1613
|
return se(be + "Milliseconds", 3);
|
|
1614
1614
|
default:
|
|
1615
1615
|
return this.clone();
|
|
1616
1616
|
}
|
|
1617
|
-
},
|
|
1618
|
-
return this.startOf(
|
|
1619
|
-
},
|
|
1620
|
-
var N,
|
|
1621
|
-
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) {
|
|
1622
1622
|
var ce = this.clone().set(n, 1);
|
|
1623
1623
|
ce.$d[te](se), ce.init(), this.$d = ce.set(n, Math.min(this.$D, ce.daysInMonth())).$d;
|
|
1624
1624
|
} else te && this.$d[te](se);
|
|
1625
1625
|
return this.init(), this;
|
|
1626
|
-
},
|
|
1627
|
-
return this.clone().$set(
|
|
1628
|
-
},
|
|
1629
|
-
return this[
|
|
1630
|
-
},
|
|
1631
|
-
var N,
|
|
1632
|
-
|
|
1633
|
-
var
|
|
1634
|
-
var fe =
|
|
1635
|
-
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);
|
|
1636
1636
|
};
|
|
1637
|
-
if (
|
|
1638
|
-
if (
|
|
1639
|
-
if (
|
|
1640
|
-
if (
|
|
1641
|
-
var se = (N = {}, N[
|
|
1642
|
-
return
|
|
1643
|
-
},
|
|
1644
|
-
return this.add(-1 *
|
|
1645
|
-
},
|
|
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
1646
|
var L = this, N = this.$locale();
|
|
1647
1647
|
if (!this.isValid()) return N.invalidDate || o;
|
|
1648
|
-
var
|
|
1649
|
-
return ye && (ye[xe] || ye(L,
|
|
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);
|
|
1650
1650
|
}, ue = function(ye) {
|
|
1651
|
-
return
|
|
1651
|
+
return H.s(te % 12 || 12, ye, "0");
|
|
1652
1652
|
}, he = be || function(ye, xe, we) {
|
|
1653
1653
|
var Ce = ye < 12 ? "AM" : "PM";
|
|
1654
1654
|
return we ? Ce.toLowerCase() : Ce;
|
|
1655
1655
|
};
|
|
1656
|
-
return
|
|
1656
|
+
return z.replace(f, function(ye, xe) {
|
|
1657
1657
|
return xe || function(we) {
|
|
1658
1658
|
switch (we) {
|
|
1659
1659
|
case "YY":
|
|
1660
1660
|
return String(L.$y).slice(-2);
|
|
1661
1661
|
case "YYYY":
|
|
1662
|
-
return
|
|
1662
|
+
return H.s(L.$y, 4, "0");
|
|
1663
1663
|
case "M":
|
|
1664
1664
|
return ce + 1;
|
|
1665
1665
|
case "MM":
|
|
1666
|
-
return
|
|
1666
|
+
return H.s(ce + 1, 2, "0");
|
|
1667
1667
|
case "MMM":
|
|
1668
1668
|
return X(N.monthsShort, ce, fe, 3);
|
|
1669
1669
|
case "MMMM":
|
|
@@ -1671,7 +1671,7 @@ function Ot() {
|
|
|
1671
1671
|
case "D":
|
|
1672
1672
|
return L.$D;
|
|
1673
1673
|
case "DD":
|
|
1674
|
-
return
|
|
1674
|
+
return H.s(L.$D, 2, "0");
|
|
1675
1675
|
case "d":
|
|
1676
1676
|
return String(L.$W);
|
|
1677
1677
|
case "dd":
|
|
@@ -1683,7 +1683,7 @@ function Ot() {
|
|
|
1683
1683
|
case "H":
|
|
1684
1684
|
return String(te);
|
|
1685
1685
|
case "HH":
|
|
1686
|
-
return
|
|
1686
|
+
return H.s(te, 2, "0");
|
|
1687
1687
|
case "h":
|
|
1688
1688
|
return ue(1);
|
|
1689
1689
|
case "hh":
|
|
@@ -1695,136 +1695,262 @@ function Ot() {
|
|
|
1695
1695
|
case "m":
|
|
1696
1696
|
return String(se);
|
|
1697
1697
|
case "mm":
|
|
1698
|
-
return
|
|
1698
|
+
return H.s(se, 2, "0");
|
|
1699
1699
|
case "s":
|
|
1700
1700
|
return String(L.$s);
|
|
1701
1701
|
case "ss":
|
|
1702
|
-
return
|
|
1702
|
+
return H.s(L.$s, 2, "0");
|
|
1703
1703
|
case "SSS":
|
|
1704
|
-
return
|
|
1704
|
+
return H.s(L.$ms, 3, "0");
|
|
1705
1705
|
case "Z":
|
|
1706
|
-
return
|
|
1706
|
+
return Y;
|
|
1707
1707
|
}
|
|
1708
1708
|
return null;
|
|
1709
|
-
}(ye) ||
|
|
1709
|
+
}(ye) || Y.replace(":", "");
|
|
1710
1710
|
});
|
|
1711
|
-
},
|
|
1711
|
+
}, p.utcOffset = function() {
|
|
1712
1712
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1713
|
-
},
|
|
1714
|
-
var
|
|
1715
|
-
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);
|
|
1716
1716
|
};
|
|
1717
1717
|
switch (te) {
|
|
1718
1718
|
case r:
|
|
1719
|
-
|
|
1719
|
+
z = fe() / 12;
|
|
1720
1720
|
break;
|
|
1721
|
-
case
|
|
1722
|
-
|
|
1721
|
+
case y:
|
|
1722
|
+
z = fe();
|
|
1723
1723
|
break;
|
|
1724
|
-
case
|
|
1725
|
-
|
|
1724
|
+
case i:
|
|
1725
|
+
z = fe() / 3;
|
|
1726
1726
|
break;
|
|
1727
1727
|
case q:
|
|
1728
|
-
|
|
1728
|
+
z = (pe - ce) / 6048e5;
|
|
1729
1729
|
break;
|
|
1730
1730
|
case e:
|
|
1731
|
-
|
|
1731
|
+
z = (pe - ce) / 864e5;
|
|
1732
1732
|
break;
|
|
1733
|
-
case
|
|
1734
|
-
|
|
1733
|
+
case k:
|
|
1734
|
+
z = pe / u;
|
|
1735
1735
|
break;
|
|
1736
|
-
case
|
|
1737
|
-
|
|
1736
|
+
case w:
|
|
1737
|
+
z = pe / s;
|
|
1738
1738
|
break;
|
|
1739
|
-
case
|
|
1740
|
-
|
|
1739
|
+
case T:
|
|
1740
|
+
z = pe / l;
|
|
1741
1741
|
break;
|
|
1742
1742
|
default:
|
|
1743
|
-
|
|
1743
|
+
z = pe;
|
|
1744
1744
|
}
|
|
1745
|
-
return N ?
|
|
1746
|
-
},
|
|
1747
|
-
return this.endOf(
|
|
1748
|
-
},
|
|
1749
|
-
return
|
|
1750
|
-
},
|
|
1751
|
-
if (!
|
|
1752
|
-
var N = this.clone(),
|
|
1753
|
-
return
|
|
1754
|
-
},
|
|
1755
|
-
return
|
|
1756
|
-
},
|
|
1745
|
+
return N ? z : H.a(z);
|
|
1746
|
+
}, p.daysInMonth = function() {
|
|
1747
|
+
return this.endOf(y).$D;
|
|
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() {
|
|
1757
1757
|
return new Date(this.valueOf());
|
|
1758
|
-
},
|
|
1758
|
+
}, p.toJSON = function() {
|
|
1759
1759
|
return this.isValid() ? this.toISOString() : null;
|
|
1760
|
-
},
|
|
1760
|
+
}, p.toISOString = function() {
|
|
1761
1761
|
return this.$d.toISOString();
|
|
1762
|
-
},
|
|
1762
|
+
}, p.toString = function() {
|
|
1763
1763
|
return this.$d.toUTCString();
|
|
1764
|
-
},
|
|
1764
|
+
}, d;
|
|
1765
1765
|
}(), re = ee.prototype;
|
|
1766
|
-
return
|
|
1767
|
-
re[
|
|
1768
|
-
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]);
|
|
1769
1769
|
};
|
|
1770
|
-
}),
|
|
1771
|
-
return
|
|
1772
|
-
},
|
|
1773
|
-
return
|
|
1774
|
-
},
|
|
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));
|
|
1775
1847
|
});
|
|
1776
|
-
}
|
|
1848
|
+
}
|
|
1849
|
+
return t;
|
|
1777
1850
|
}
|
|
1778
|
-
var
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
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;
|
|
1784
1909
|
}), [e, q] = ne(null);
|
|
1785
|
-
return
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
|
|
1910
|
+
return tt(
|
|
1911
|
+
/* @__PURE__ */ $("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "240px" }, children: /* @__PURE__ */ $(
|
|
1912
|
+
tn,
|
|
1788
1913
|
{
|
|
1789
|
-
value:
|
|
1790
|
-
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,
|
|
1791
1916
|
onCalendarChange: (o) => {
|
|
1792
1917
|
console.log("[DatePicker] onCalendarChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), q(o);
|
|
1793
1918
|
},
|
|
1794
1919
|
onChange: (o) => {
|
|
1795
|
-
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]) {
|
|
1796
1921
|
const a = `${o[0].format("YYYY-MM-DD")},${o[1].format("YYYY-MM-DD")}`;
|
|
1797
|
-
t.setAttribute("data-value", a),
|
|
1922
|
+
t.setAttribute("data-value", a), c(l, a);
|
|
1798
1923
|
} else
|
|
1799
|
-
t.setAttribute("data-value", ""),
|
|
1924
|
+
t.setAttribute("data-value", ""), c(l, "");
|
|
1800
1925
|
},
|
|
1801
1926
|
onOpenChange: (o) => {
|
|
1802
|
-
console.log("[DatePicker] onOpenChange", o), q(o ?
|
|
1927
|
+
console.log("[DatePicker] onOpenChange", o), q(o ? w : null);
|
|
1803
1928
|
},
|
|
1804
1929
|
placeholder: [u || "开始日期", u || "结束日期"],
|
|
1805
1930
|
style: { width: "100%" },
|
|
1806
1931
|
size: "small",
|
|
1807
1932
|
allowClear: !0,
|
|
1933
|
+
locale: at,
|
|
1808
1934
|
getPopupContainer: () => document.body,
|
|
1809
1935
|
popupClassName: "rte-datepicker-dropdown"
|
|
1810
1936
|
}
|
|
1811
1937
|
) }),
|
|
1812
1938
|
t
|
|
1813
1939
|
);
|
|
1814
|
-
},
|
|
1815
|
-
const [
|
|
1940
|
+
}, an = (t) => {
|
|
1941
|
+
const [c, l] = ne([]);
|
|
1816
1942
|
return de(() => {
|
|
1817
|
-
const
|
|
1818
|
-
if (!
|
|
1943
|
+
const s = t.current;
|
|
1944
|
+
if (!s) return;
|
|
1819
1945
|
const u = () => {
|
|
1820
|
-
const
|
|
1821
|
-
|
|
1822
|
-
const e =
|
|
1823
|
-
e &&
|
|
1824
|
-
/* @__PURE__ */
|
|
1825
|
-
|
|
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,
|
|
1826
1952
|
{
|
|
1827
|
-
host:
|
|
1953
|
+
host: k,
|
|
1828
1954
|
onChange: () => {
|
|
1829
1955
|
if (t.current) {
|
|
1830
1956
|
const q = new Event("input", { bubbles: !0 });
|
|
@@ -1835,278 +1961,278 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
1835
1961
|
`datepicker-${e}`
|
|
1836
1962
|
)
|
|
1837
1963
|
);
|
|
1838
|
-
}),
|
|
1964
|
+
}), l(w);
|
|
1839
1965
|
};
|
|
1840
1966
|
u();
|
|
1841
|
-
const
|
|
1842
|
-
let
|
|
1843
|
-
for (const
|
|
1844
|
-
if (
|
|
1967
|
+
const C = new MutationObserver((T) => {
|
|
1968
|
+
let w = !1;
|
|
1969
|
+
for (const k of T)
|
|
1970
|
+
if (k.type === "childList") {
|
|
1845
1971
|
let e = !1;
|
|
1846
|
-
if (
|
|
1972
|
+
if (k.addedNodes.forEach((q) => {
|
|
1847
1973
|
if (q.nodeType === Node.ELEMENT_NODE) {
|
|
1848
|
-
const
|
|
1849
|
-
(
|
|
1974
|
+
const y = q;
|
|
1975
|
+
(y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
|
|
1850
1976
|
}
|
|
1851
|
-
}),
|
|
1977
|
+
}), k.removedNodes.forEach((q) => {
|
|
1852
1978
|
if (q.nodeType === Node.ELEMENT_NODE) {
|
|
1853
|
-
const
|
|
1854
|
-
(
|
|
1979
|
+
const y = q;
|
|
1980
|
+
(y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
|
|
1855
1981
|
}
|
|
1856
1982
|
}), e) {
|
|
1857
|
-
|
|
1983
|
+
w = !0;
|
|
1858
1984
|
break;
|
|
1859
1985
|
}
|
|
1860
1986
|
}
|
|
1861
|
-
|
|
1987
|
+
w && u();
|
|
1862
1988
|
});
|
|
1863
|
-
return
|
|
1864
|
-
}, [t]),
|
|
1865
|
-
},
|
|
1989
|
+
return C.observe(s, { childList: !0, subtree: !0 }), () => C.disconnect();
|
|
1990
|
+
}, [t]), c;
|
|
1991
|
+
}, rn = ({
|
|
1866
1992
|
config: t,
|
|
1867
|
-
onSend:
|
|
1868
|
-
isProcessing:
|
|
1869
|
-
disabled:
|
|
1993
|
+
onSend: c,
|
|
1994
|
+
isProcessing: l = !1,
|
|
1995
|
+
disabled: s = !1,
|
|
1870
1996
|
width: u,
|
|
1871
|
-
lockStructure:
|
|
1872
|
-
agentOptions:
|
|
1873
|
-
onAgentSelect:
|
|
1874
|
-
onAgentExit:
|
|
1997
|
+
lockStructure: C = !1,
|
|
1998
|
+
agentOptions: T = [],
|
|
1999
|
+
onAgentSelect: w,
|
|
2000
|
+
onAgentExit: k,
|
|
1875
2001
|
loading: e = !1,
|
|
1876
2002
|
placeholder: q,
|
|
1877
|
-
border:
|
|
1878
|
-
background:
|
|
2003
|
+
border: y,
|
|
2004
|
+
background: i = "transparent",
|
|
1879
2005
|
hideButtons: r
|
|
1880
2006
|
}) => {
|
|
1881
|
-
const n = Q(null), o = Q(null), [a,
|
|
1882
|
-
const
|
|
1883
|
-
return t.forEach((
|
|
1884
|
-
|
|
1885
|
-
}),
|
|
1886
|
-
}),
|
|
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({});
|
|
1887
2013
|
de(() => {
|
|
1888
|
-
|
|
2014
|
+
b.current = a;
|
|
1889
2015
|
}, [a]), de(() => {
|
|
1890
2016
|
L.current = re;
|
|
1891
2017
|
}, [re]);
|
|
1892
|
-
const N = ae((
|
|
2018
|
+
const N = ae((g) => g.find((S) => S.type === "tag")?.text || null, []), z = Q(t), Y = Q(null);
|
|
1893
2019
|
de(() => {
|
|
1894
|
-
const
|
|
1895
|
-
if (
|
|
1896
|
-
const
|
|
1897
|
-
n.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1898
|
-
const
|
|
1899
|
-
if (
|
|
1900
|
-
const
|
|
1901
|
-
|
|
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);
|
|
1902
2028
|
}
|
|
1903
|
-
}), n.current.querySelectorAll('[data-type="select"]').forEach((
|
|
1904
|
-
const
|
|
1905
|
-
if (
|
|
1906
|
-
const
|
|
1907
|
-
|
|
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);
|
|
1908
2034
|
}
|
|
1909
|
-
}), n.current.querySelectorAll('[data-type="textarea"]').forEach((
|
|
1910
|
-
const
|
|
1911
|
-
if (
|
|
1912
|
-
const
|
|
1913
|
-
|
|
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);
|
|
1914
2040
|
}
|
|
1915
|
-
}),
|
|
1916
|
-
variableValues:
|
|
1917
|
-
files: { ...
|
|
2041
|
+
}), p.current[g] = {
|
|
2042
|
+
variableValues: S,
|
|
2043
|
+
files: { ...b.current },
|
|
1918
2044
|
multiVariableCounts: { ...L.current }
|
|
1919
2045
|
};
|
|
1920
2046
|
}
|
|
1921
|
-
if (
|
|
1922
|
-
const
|
|
1923
|
-
|
|
1924
|
-
} else if (
|
|
1925
|
-
|
|
1926
|
-
const
|
|
1927
|
-
t.forEach((
|
|
1928
|
-
|
|
1929
|
-
}),
|
|
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({});
|
|
1930
2056
|
} else
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
}, [t, N]),
|
|
1934
|
-
|
|
1935
|
-
|
|
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);
|
|
1936
2062
|
}, 0));
|
|
1937
|
-
}),
|
|
1938
|
-
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);
|
|
1939
2065
|
de(() => {
|
|
1940
2066
|
if (t.length > 0) {
|
|
1941
2067
|
ee(!1);
|
|
1942
2068
|
return;
|
|
1943
2069
|
}
|
|
1944
|
-
const
|
|
2070
|
+
const g = () => {
|
|
1945
2071
|
if (!n.current) {
|
|
1946
2072
|
ee(!0);
|
|
1947
2073
|
return;
|
|
1948
2074
|
}
|
|
1949
|
-
const
|
|
1950
|
-
let
|
|
1951
|
-
|
|
1952
|
-
(
|
|
1953
|
-
}),
|
|
1954
|
-
|
|
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);
|
|
1955
2081
|
});
|
|
1956
|
-
const
|
|
1957
|
-
ee(
|
|
2082
|
+
const _ = !S && !D;
|
|
2083
|
+
ee(_), t.length === 0 && F(!_);
|
|
1958
2084
|
};
|
|
1959
|
-
|
|
1960
|
-
const
|
|
1961
|
-
return n.current &&
|
|
2085
|
+
g();
|
|
2086
|
+
const h = new MutationObserver(g);
|
|
2087
|
+
return n.current && h.observe(n.current, {
|
|
1962
2088
|
childList: !0,
|
|
1963
2089
|
subtree: !0,
|
|
1964
2090
|
characterData: !0
|
|
1965
2091
|
}), () => {
|
|
1966
|
-
|
|
2092
|
+
h.disconnect();
|
|
1967
2093
|
};
|
|
1968
2094
|
}, [t]);
|
|
1969
|
-
const se = (
|
|
1970
|
-
if (
|
|
1971
|
-
|
|
2095
|
+
const se = (g) => {
|
|
2096
|
+
if (s) {
|
|
2097
|
+
g.preventDefault();
|
|
1972
2098
|
return;
|
|
1973
2099
|
}
|
|
1974
|
-
|
|
1975
|
-
const
|
|
1976
|
-
if (
|
|
1977
|
-
const
|
|
1978
|
-
if (
|
|
1979
|
-
let
|
|
1980
|
-
if (
|
|
1981
|
-
const
|
|
1982
|
-
if (
|
|
1983
|
-
const
|
|
1984
|
-
if (console.log("[Paste Event] 粘贴的内容:",
|
|
1985
|
-
const
|
|
1986
|
-
|
|
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) => ({
|
|
1987
2113
|
...J,
|
|
1988
|
-
[
|
|
2114
|
+
[D]: P
|
|
1989
2115
|
}));
|
|
1990
2116
|
const K = [];
|
|
1991
|
-
for (let J = 0; J <
|
|
1992
|
-
const
|
|
1993
|
-
`[data-type="variable"][data-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}"]`
|
|
1994
2120
|
);
|
|
1995
2121
|
if (ge) {
|
|
1996
2122
|
const ke = ge.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1997
2123
|
K.push(ke);
|
|
1998
2124
|
}
|
|
1999
2125
|
}
|
|
2000
|
-
K.splice(
|
|
2126
|
+
K.splice(M, 1, ...R.slice(0, j - M));
|
|
2001
2127
|
const oe = K.slice(0, j);
|
|
2002
2128
|
oe.length > 0 && oe[oe.length - 1] !== "" && oe.length < j && oe.push("");
|
|
2003
|
-
const O = Math.max(oe.length, 1),
|
|
2004
|
-
oe.forEach((J,
|
|
2005
|
-
J && (
|
|
2129
|
+
const O = Math.max(oe.length, 1), le = {};
|
|
2130
|
+
oe.forEach((J, ie) => {
|
|
2131
|
+
J && (le[`${D}_${ie}`] = J);
|
|
2006
2132
|
}), n.current.querySelectorAll(
|
|
2007
2133
|
'[data-type="variable"]'
|
|
2008
2134
|
).forEach((J) => {
|
|
2009
|
-
const
|
|
2010
|
-
if (
|
|
2135
|
+
const ie = J.dataset.key, ge = J.dataset.multiKey;
|
|
2136
|
+
if (ie && ge !== D) {
|
|
2011
2137
|
const ke = J.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2012
|
-
ke && (ie
|
|
2138
|
+
ke && (le[ie] = ke);
|
|
2013
2139
|
}
|
|
2014
|
-
}), n.current.__tempVariableValues =
|
|
2140
|
+
}), n.current.__tempVariableValues = le, d((J) => ({
|
|
2015
2141
|
...J,
|
|
2016
|
-
[
|
|
2142
|
+
[D]: O
|
|
2017
2143
|
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", oe);
|
|
2018
2144
|
return;
|
|
2019
|
-
} else
|
|
2145
|
+
} else R.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
|
|
2020
2146
|
}
|
|
2021
2147
|
}
|
|
2022
2148
|
}
|
|
2023
2149
|
}
|
|
2024
|
-
document.execCommand("insertText", !1,
|
|
2025
|
-
const
|
|
2026
|
-
if (
|
|
2027
|
-
const
|
|
2028
|
-
if (
|
|
2029
|
-
let
|
|
2030
|
-
if (
|
|
2031
|
-
const
|
|
2032
|
-
/[、,,\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] 提示:失去焦点后将自动拆分"));
|
|
2033
2159
|
}
|
|
2034
2160
|
}
|
|
2035
2161
|
}
|
|
2036
2162
|
}, 0);
|
|
2037
|
-
}, ce = (
|
|
2038
|
-
if (
|
|
2039
|
-
const
|
|
2040
|
-
|
|
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 }));
|
|
2041
2167
|
}
|
|
2042
|
-
|
|
2043
|
-
}, pe = (
|
|
2044
|
-
|
|
2045
|
-
const
|
|
2046
|
-
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;
|
|
2047
2173
|
});
|
|
2048
|
-
}, fe = (
|
|
2049
|
-
const
|
|
2050
|
-
if (
|
|
2174
|
+
}, fe = (g) => {
|
|
2175
|
+
const h = g.target;
|
|
2176
|
+
if (h.closest(".rte-datepicker-wrapper") || h.closest(".rte-datepicker-host"))
|
|
2051
2177
|
return;
|
|
2052
|
-
if (
|
|
2053
|
-
if (
|
|
2178
|
+
if (h.closest(".tag-close-btn")) {
|
|
2179
|
+
if (g.preventDefault(), g.stopPropagation(), C)
|
|
2054
2180
|
return;
|
|
2055
|
-
V(null),
|
|
2181
|
+
V(null), k ? k() : n.current && (n.current.innerHTML = "", n.current.focus());
|
|
2056
2182
|
return;
|
|
2057
2183
|
}
|
|
2058
|
-
if (
|
|
2059
|
-
const
|
|
2060
|
-
if (
|
|
2061
|
-
|
|
2062
|
-
const
|
|
2063
|
-
|
|
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();
|
|
2064
2190
|
return;
|
|
2065
2191
|
}
|
|
2066
2192
|
}
|
|
2067
|
-
|
|
2068
|
-
}, be = (
|
|
2069
|
-
if (!
|
|
2070
|
-
const
|
|
2071
|
-
(
|
|
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);
|
|
2072
2198
|
}
|
|
2073
|
-
}, X = (
|
|
2074
|
-
if (
|
|
2075
|
-
|
|
2199
|
+
}, X = (g) => {
|
|
2200
|
+
if (g.target.closest('[data-type="variable"]')) {
|
|
2201
|
+
B.current = null, E.current = !1;
|
|
2076
2202
|
return;
|
|
2077
2203
|
}
|
|
2078
|
-
|
|
2079
|
-
}, ue = (
|
|
2080
|
-
if (
|
|
2204
|
+
B.current = null, E.current = !1;
|
|
2205
|
+
}, ue = (g) => {
|
|
2206
|
+
if (s)
|
|
2081
2207
|
return;
|
|
2082
|
-
const
|
|
2083
|
-
if (
|
|
2208
|
+
const h = g.target;
|
|
2209
|
+
if (h.closest('[data-type="datepicker"]'))
|
|
2084
2210
|
return;
|
|
2085
|
-
if (
|
|
2086
|
-
|
|
2211
|
+
if (h.closest(".tag-close-btn")) {
|
|
2212
|
+
g.preventDefault(), g.stopPropagation();
|
|
2087
2213
|
return;
|
|
2088
2214
|
}
|
|
2089
2215
|
if (t.length === 0)
|
|
2090
2216
|
return;
|
|
2091
|
-
const
|
|
2217
|
+
const A = (P, K) => {
|
|
2092
2218
|
if (!n.current) return;
|
|
2093
2219
|
Array.from(n.current.children).forEach((O) => {
|
|
2094
|
-
if (O !==
|
|
2220
|
+
if (O !== P)
|
|
2095
2221
|
if (K)
|
|
2096
2222
|
O.dataset.prevDisplay === void 0 && (O.dataset.prevDisplay = O.style.display || ""), O.style.setProperty("display", "none", "important");
|
|
2097
2223
|
else if (O.dataset.prevDisplay !== void 0) {
|
|
2098
|
-
const
|
|
2099
|
-
|
|
2224
|
+
const le = O.dataset.prevDisplay;
|
|
2225
|
+
le ? O.style.display = le : O.style.removeProperty("display"), delete O.dataset.prevDisplay;
|
|
2100
2226
|
} else
|
|
2101
2227
|
O.style.removeProperty("display");
|
|
2102
2228
|
});
|
|
2103
|
-
},
|
|
2104
|
-
if (
|
|
2105
|
-
|
|
2106
|
-
const
|
|
2107
|
-
|
|
2108
|
-
const
|
|
2109
|
-
if (
|
|
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)
|
|
2110
2236
|
if (O)
|
|
2111
2237
|
K.classList.add("rte-textarea-expanded"), K.style.maxHeight = "none", K.style.height = "100%";
|
|
2112
2238
|
else {
|
|
@@ -2117,452 +2243,452 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2117
2243
|
n.current && (O ? n.current.classList.add("rte-overlay-active") : n.current.classList.remove("rte-overlay-active"));
|
|
2118
2244
|
return;
|
|
2119
2245
|
}
|
|
2120
|
-
const
|
|
2121
|
-
if (
|
|
2122
|
-
|
|
2123
|
-
const
|
|
2124
|
-
((
|
|
2125
|
-
|
|
2126
|
-
})(
|
|
2127
|
-
const me =
|
|
2128
|
-
me ? me.classList.toggle("rte-richtext-expanded", O) :
|
|
2129
|
-
const J =
|
|
2130
|
-
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),
|
|
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");
|
|
2250
|
+
((ie, ge) => {
|
|
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>';
|
|
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);
|
|
2131
2257
|
return;
|
|
2132
2258
|
}
|
|
2133
|
-
if (
|
|
2134
|
-
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2259
|
+
if (h.closest('[data-type="text"]')) {
|
|
2260
|
+
g.preventDefault(), g.stopPropagation();
|
|
2261
|
+
const P = window.getSelection();
|
|
2262
|
+
P && P.removeAllRanges();
|
|
2137
2263
|
return;
|
|
2138
2264
|
}
|
|
2139
|
-
if (
|
|
2140
|
-
|
|
2265
|
+
if (C && h.closest(".tag-node")) {
|
|
2266
|
+
g.preventDefault(), g.stopPropagation();
|
|
2141
2267
|
const K = window.getSelection();
|
|
2142
2268
|
K && K.removeAllRanges();
|
|
2143
2269
|
return;
|
|
2144
2270
|
}
|
|
2145
|
-
if (
|
|
2146
|
-
if (
|
|
2271
|
+
if (h.closest('[data-type="variable"]')) {
|
|
2272
|
+
if (E.current)
|
|
2147
2273
|
return;
|
|
2148
2274
|
setTimeout(() => {
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2275
|
+
const P = window.getSelection();
|
|
2276
|
+
P && !P.isCollapsed || Be(n);
|
|
2151
2277
|
}, 10);
|
|
2152
2278
|
return;
|
|
2153
2279
|
}
|
|
2154
|
-
const j =
|
|
2280
|
+
const j = h.closest(".file-remove-btn");
|
|
2155
2281
|
if (j) {
|
|
2156
|
-
|
|
2282
|
+
g.preventDefault(), g.stopPropagation();
|
|
2157
2283
|
const K = j.closest('[data-type="upload"]')?.dataset.key;
|
|
2158
2284
|
K && pe(K);
|
|
2159
2285
|
return;
|
|
2160
2286
|
}
|
|
2161
|
-
const
|
|
2162
|
-
if (
|
|
2163
|
-
const
|
|
2164
|
-
|
|
2287
|
+
const U = h.closest('[data-type="upload"]');
|
|
2288
|
+
if (U) {
|
|
2289
|
+
const P = U.dataset.key;
|
|
2290
|
+
P && (v(P), o.current?.click());
|
|
2165
2291
|
return;
|
|
2166
2292
|
}
|
|
2167
|
-
}, he = (
|
|
2168
|
-
const
|
|
2169
|
-
if (
|
|
2170
|
-
const
|
|
2171
|
-
if (
|
|
2172
|
-
const
|
|
2173
|
-
if (
|
|
2174
|
-
let
|
|
2175
|
-
|
|
2176
|
-
const j =
|
|
2177
|
-
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);
|
|
2178
2304
|
} else
|
|
2179
|
-
|
|
2180
|
-
|
|
2305
|
+
A.selectNodeContents(S), A.collapse(!0);
|
|
2306
|
+
I.removeAllRanges(), I.addRange(A);
|
|
2181
2307
|
}
|
|
2182
2308
|
}
|
|
2183
2309
|
}, ye = () => {
|
|
2184
2310
|
if (t.length === 0) {
|
|
2185
2311
|
if (n.current) {
|
|
2186
|
-
const
|
|
2187
|
-
ee(
|
|
2312
|
+
const S = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
|
|
2313
|
+
ee(S), F(!S);
|
|
2188
2314
|
}
|
|
2189
2315
|
return;
|
|
2190
2316
|
}
|
|
2191
|
-
if (
|
|
2192
|
-
const
|
|
2193
|
-
if (
|
|
2194
|
-
let
|
|
2195
|
-
const
|
|
2196
|
-
|
|
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,
|
|
2197
2323
|
NodeFilter.SHOW_TEXT,
|
|
2198
2324
|
{
|
|
2199
|
-
acceptNode: (
|
|
2325
|
+
acceptNode: (_) => I.contains(_) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
2200
2326
|
}
|
|
2201
2327
|
);
|
|
2202
|
-
for (;
|
|
2203
|
-
if (
|
|
2204
|
-
|
|
2328
|
+
for (; D.nextNode(); )
|
|
2329
|
+
if (D.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
|
|
2330
|
+
A = !0;
|
|
2205
2331
|
break;
|
|
2206
2332
|
}
|
|
2207
|
-
|
|
2208
|
-
}
|
|
2209
|
-
}),
|
|
2210
|
-
t.filter((
|
|
2211
|
-
if (!
|
|
2212
|
-
const
|
|
2213
|
-
for (let j = 0; j <
|
|
2214
|
-
const
|
|
2215
|
-
`[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}"]`
|
|
2216
2342
|
);
|
|
2217
|
-
if (
|
|
2218
|
-
const K =
|
|
2219
|
-
|
|
2343
|
+
if (P) {
|
|
2344
|
+
const K = P.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2345
|
+
A.push(K);
|
|
2220
2346
|
}
|
|
2221
2347
|
}
|
|
2222
|
-
const
|
|
2223
|
-
let
|
|
2224
|
-
for (let j = 0; j <
|
|
2225
|
-
if (
|
|
2226
|
-
|
|
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;
|
|
2227
2353
|
break;
|
|
2228
2354
|
}
|
|
2229
|
-
if (
|
|
2355
|
+
if (R && M >= 0) {
|
|
2230
2356
|
const j = window.getSelection();
|
|
2231
2357
|
if (j && j.rangeCount > 0) {
|
|
2232
|
-
const O = j.getRangeAt(0),
|
|
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]');
|
|
2233
2359
|
if (me) {
|
|
2234
2360
|
const J = me.dataset.key;
|
|
2235
2361
|
if (J) {
|
|
2236
|
-
const
|
|
2237
|
-
|
|
2238
|
-
const ge =
|
|
2239
|
-
|
|
2362
|
+
const ie = document.createRange();
|
|
2363
|
+
ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
|
|
2364
|
+
const ge = ie.toString().length;
|
|
2365
|
+
W.current = { key: J, offset: ge };
|
|
2240
2366
|
}
|
|
2241
2367
|
}
|
|
2242
2368
|
}
|
|
2243
|
-
const
|
|
2244
|
-
for (let O =
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
const
|
|
2248
|
-
|
|
2249
|
-
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);
|
|
2250
2376
|
});
|
|
2251
|
-
const K = Math.max(
|
|
2377
|
+
const K = Math.max(_ ? U.length : U.length + 1, 1);
|
|
2252
2378
|
n.current.querySelectorAll(
|
|
2253
2379
|
'[data-type="variable"]'
|
|
2254
2380
|
).forEach((O) => {
|
|
2255
|
-
const
|
|
2256
|
-
if (
|
|
2381
|
+
const le = O.dataset.key, me = O.dataset.multiKey;
|
|
2382
|
+
if (le && me !== h.key) {
|
|
2257
2383
|
const J = O.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2258
|
-
J && (
|
|
2384
|
+
J && (P[le] = J);
|
|
2259
2385
|
}
|
|
2260
|
-
}), n.current.__tempVariableValues =
|
|
2386
|
+
}), n.current.__tempVariableValues = P, d((O) => ({
|
|
2261
2387
|
...O,
|
|
2262
|
-
[
|
|
2388
|
+
[h.key]: K
|
|
2263
2389
|
}));
|
|
2264
2390
|
return;
|
|
2265
2391
|
}
|
|
2266
|
-
if (!
|
|
2267
|
-
const j =
|
|
2268
|
-
`[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}"]`
|
|
2269
2395
|
);
|
|
2270
|
-
if (
|
|
2396
|
+
if (P && P.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && I < S) {
|
|
2271
2397
|
const oe = window.getSelection();
|
|
2272
2398
|
if (oe && oe.rangeCount > 0) {
|
|
2273
|
-
const O = oe.getRangeAt(0),
|
|
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]');
|
|
2274
2400
|
if (me) {
|
|
2275
2401
|
const J = me.dataset.key;
|
|
2276
2402
|
if (J) {
|
|
2277
|
-
const
|
|
2278
|
-
|
|
2279
|
-
const ge =
|
|
2280
|
-
|
|
2403
|
+
const ie = document.createRange();
|
|
2404
|
+
ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
|
|
2405
|
+
const ge = ie.toString().length;
|
|
2406
|
+
W.current = { key: J, offset: ge };
|
|
2281
2407
|
}
|
|
2282
2408
|
}
|
|
2283
2409
|
}
|
|
2284
|
-
|
|
2410
|
+
d((O) => ({
|
|
2285
2411
|
...O,
|
|
2286
|
-
[
|
|
2412
|
+
[h.key]: I + 1
|
|
2287
2413
|
}));
|
|
2288
2414
|
}
|
|
2289
2415
|
}
|
|
2290
2416
|
});
|
|
2291
2417
|
};
|
|
2292
|
-
|
|
2293
|
-
const
|
|
2294
|
-
if (!
|
|
2295
|
-
const
|
|
2296
|
-
const
|
|
2297
|
-
!
|
|
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(() => {
|
|
2298
2424
|
if (n.current) {
|
|
2299
2425
|
if (t.length === 0) {
|
|
2300
|
-
const
|
|
2301
|
-
F(
|
|
2426
|
+
const M = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
2427
|
+
F(M.length > 0);
|
|
2302
2428
|
return;
|
|
2303
2429
|
}
|
|
2304
|
-
|
|
2430
|
+
Be(n), Oe(n, t, a), He(n, t, a, F);
|
|
2305
2431
|
}
|
|
2306
2432
|
}, 0);
|
|
2307
2433
|
};
|
|
2308
|
-
|
|
2309
|
-
const
|
|
2434
|
+
g.addEventListener("blur", S, !0);
|
|
2435
|
+
const I = () => {
|
|
2310
2436
|
if (!n.current) return;
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
}),
|
|
2314
|
-
const
|
|
2437
|
+
h.forEach((R, M) => {
|
|
2438
|
+
M.removeEventListener("blur", R, !1);
|
|
2439
|
+
}), h.clear();
|
|
2440
|
+
const D = n.current.querySelectorAll(
|
|
2315
2441
|
'[data-type="variable"][data-multi-key]'
|
|
2316
|
-
),
|
|
2317
|
-
|
|
2318
|
-
const
|
|
2319
|
-
if (!
|
|
2442
|
+
), _ = (R) => {
|
|
2443
|
+
R.stopPropagation(), R.stopImmediatePropagation();
|
|
2444
|
+
const M = R.target;
|
|
2445
|
+
if (!M || !n.current || !n.current.contains(M))
|
|
2320
2446
|
return;
|
|
2321
|
-
const j =
|
|
2447
|
+
const j = M.closest('[data-type="variable"][data-multi-key]');
|
|
2322
2448
|
if (!j || !n.current.contains(j))
|
|
2323
2449
|
return;
|
|
2324
|
-
let
|
|
2325
|
-
if (
|
|
2326
|
-
(ge === j || ge.contains(
|
|
2327
|
-
}), !
|
|
2450
|
+
let U = !1;
|
|
2451
|
+
if (h.forEach((ie, ge) => {
|
|
2452
|
+
(ge === j || ge.contains(M)) && (U = !0);
|
|
2453
|
+
}), !U)
|
|
2328
2454
|
return;
|
|
2329
|
-
const
|
|
2330
|
-
if (!
|
|
2331
|
-
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;
|
|
2332
2458
|
if (!(!O || !n.current.contains(O)))
|
|
2333
2459
|
return;
|
|
2334
2460
|
const me = j.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2335
2461
|
console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
|
|
2336
|
-
multiKey:
|
|
2462
|
+
multiKey: P,
|
|
2337
2463
|
currentKey: K,
|
|
2338
2464
|
index: oe,
|
|
2339
2465
|
content: me
|
|
2340
2466
|
});
|
|
2341
2467
|
const J = /[、,,\s]+/;
|
|
2342
2468
|
if (J.test(me)) {
|
|
2343
|
-
const
|
|
2344
|
-
console.log("[Blur Event] 拆分前的内容:", me), console.log("[Blur Event] 拆分后的部分:",
|
|
2345
|
-
const ke =
|
|
2469
|
+
const ie = me.split(J).map((Se) => Se.trim()).filter((Se) => Se.length > 0);
|
|
2470
|
+
console.log("[Blur Event] 拆分前的内容:", me), console.log("[Blur Event] 拆分后的部分:", ie);
|
|
2471
|
+
const ke = ie.slice(0, 9);
|
|
2346
2472
|
if (console.log("[Blur Event] 有效的部分(最多9个):", ke), ke.length > 1) {
|
|
2347
|
-
const
|
|
2348
|
-
if (
|
|
2349
|
-
const Ne = re[
|
|
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 = [];
|
|
2350
2476
|
for (let ve = 0; ve < Ne; ve++) {
|
|
2351
|
-
const
|
|
2352
|
-
`[data-type="variable"][data-key="${
|
|
2477
|
+
const Te = `${P}_${ve}`, _e = n.current.querySelector(
|
|
2478
|
+
`[data-type="variable"][data-key="${Te}"][data-multi-key="${P}"]`
|
|
2353
2479
|
);
|
|
2354
|
-
if (
|
|
2355
|
-
const Le =
|
|
2356
|
-
|
|
2480
|
+
if (_e) {
|
|
2481
|
+
const Le = _e.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2482
|
+
Ae.push(Le);
|
|
2357
2483
|
}
|
|
2358
2484
|
}
|
|
2359
|
-
console.log("[Blur Event] 拆分前的所有值:",
|
|
2360
|
-
const Ee =
|
|
2361
|
-
console.log("[Blur Event] 拆分后的所有值:", Ee), Ee.length > 0 && Ee[Ee.length - 1] !== "" && Ee.length <
|
|
2362
|
-
const
|
|
2363
|
-
Ee.forEach((ve,
|
|
2364
|
-
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);
|
|
2365
2491
|
}), n.current.querySelectorAll(
|
|
2366
2492
|
'[data-type="variable"]'
|
|
2367
2493
|
).forEach((ve) => {
|
|
2368
|
-
const
|
|
2369
|
-
if (
|
|
2494
|
+
const Te = ve.dataset.key, _e = ve.dataset.multiKey;
|
|
2495
|
+
if (Te && _e !== P) {
|
|
2370
2496
|
const Le = ve.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2371
|
-
Le && (
|
|
2497
|
+
Le && (Pe[Te] = Le);
|
|
2372
2498
|
}
|
|
2373
|
-
}), n.current.__tempVariableValues =
|
|
2499
|
+
}), n.current.__tempVariableValues = Pe, d((ve) => ({
|
|
2374
2500
|
...ve,
|
|
2375
|
-
[
|
|
2501
|
+
[P]: ot
|
|
2376
2502
|
}));
|
|
2377
2503
|
}
|
|
2378
2504
|
}
|
|
2379
2505
|
}
|
|
2380
2506
|
};
|
|
2381
|
-
|
|
2382
|
-
|
|
2507
|
+
D.forEach((R) => {
|
|
2508
|
+
R.addEventListener("blur", _, !1), h.set(R, _);
|
|
2383
2509
|
});
|
|
2384
|
-
},
|
|
2385
|
-
|
|
2510
|
+
}, A = setTimeout(() => {
|
|
2511
|
+
I();
|
|
2386
2512
|
}, 0);
|
|
2387
2513
|
return () => {
|
|
2388
|
-
clearTimeout(
|
|
2389
|
-
|
|
2390
|
-
}),
|
|
2514
|
+
clearTimeout(A), g.removeEventListener("blur", S, !0), h.forEach((D, _) => {
|
|
2515
|
+
_.removeEventListener("blur", D, !1);
|
|
2516
|
+
}), h.clear();
|
|
2391
2517
|
};
|
|
2392
2518
|
}, [t, re, a]);
|
|
2393
|
-
const xe = (
|
|
2394
|
-
if (
|
|
2395
|
-
|
|
2519
|
+
const xe = (g) => {
|
|
2520
|
+
if (s) {
|
|
2521
|
+
g.preventDefault();
|
|
2396
2522
|
return;
|
|
2397
2523
|
}
|
|
2398
|
-
const
|
|
2399
|
-
if (
|
|
2400
|
-
const
|
|
2401
|
-
let
|
|
2402
|
-
if (
|
|
2403
|
-
if (
|
|
2404
|
-
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(
|
|
2405
2531
|
'[data-type="variable"], [data-type="upload"]'
|
|
2406
2532
|
);
|
|
2407
|
-
|
|
2533
|
+
A && A.focus();
|
|
2408
2534
|
}
|
|
2409
2535
|
return;
|
|
2410
2536
|
}
|
|
2411
2537
|
}
|
|
2412
|
-
if (
|
|
2413
|
-
const
|
|
2414
|
-
let
|
|
2415
|
-
if (
|
|
2416
|
-
if (
|
|
2417
|
-
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(
|
|
2418
2544
|
'[data-type="variable"], [data-type="upload"]'
|
|
2419
2545
|
);
|
|
2420
|
-
|
|
2546
|
+
A && A.focus();
|
|
2421
2547
|
}
|
|
2422
2548
|
return;
|
|
2423
2549
|
}
|
|
2424
2550
|
}
|
|
2425
|
-
if (
|
|
2426
|
-
if (
|
|
2427
|
-
|
|
2551
|
+
if (g.key === "Enter" && !g.shiftKey && (g.preventDefault(), we()), g.key === "Escape" && n.current) {
|
|
2552
|
+
if (C) {
|
|
2553
|
+
g.preventDefault();
|
|
2428
2554
|
return;
|
|
2429
2555
|
}
|
|
2430
2556
|
n.current.innerHTML = "", n.current.focus();
|
|
2431
2557
|
}
|
|
2432
|
-
if (
|
|
2433
|
-
const
|
|
2434
|
-
if (
|
|
2435
|
-
const
|
|
2436
|
-
if (
|
|
2437
|
-
let
|
|
2438
|
-
if (
|
|
2439
|
-
|
|
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();
|
|
2440
2566
|
return;
|
|
2441
2567
|
}
|
|
2442
2568
|
}
|
|
2443
|
-
let
|
|
2444
|
-
if (
|
|
2569
|
+
let D = null;
|
|
2570
|
+
if (A && (A.nodeType === Node.ELEMENT_NODE ? D = A.closest(
|
|
2445
2571
|
'[data-type="variable"]'
|
|
2446
|
-
) :
|
|
2572
|
+
) : A.nodeType === Node.TEXT_NODE && A.parentElement && (D = A.parentElement.closest(
|
|
2447
2573
|
'[data-type="variable"]'
|
|
2448
|
-
))),
|
|
2449
|
-
if (!
|
|
2574
|
+
))), D) {
|
|
2575
|
+
if (!I.collapsed)
|
|
2450
2576
|
return;
|
|
2451
|
-
const
|
|
2452
|
-
if (
|
|
2453
|
-
|
|
2577
|
+
const _ = D.innerText;
|
|
2578
|
+
if (_ === "" || _ === "") {
|
|
2579
|
+
g.preventDefault();
|
|
2454
2580
|
return;
|
|
2455
2581
|
}
|
|
2456
|
-
if (
|
|
2457
|
-
|
|
2582
|
+
if (I.startOffset === 0) {
|
|
2583
|
+
g.preventDefault();
|
|
2458
2584
|
return;
|
|
2459
2585
|
}
|
|
2460
|
-
if (
|
|
2461
|
-
|
|
2586
|
+
if (_.startsWith("") && I.startOffset === 1) {
|
|
2587
|
+
g.preventDefault();
|
|
2462
2588
|
return;
|
|
2463
2589
|
}
|
|
2464
2590
|
}
|
|
2465
2591
|
}
|
|
2466
2592
|
}
|
|
2467
2593
|
}, we = () => {
|
|
2468
|
-
if (
|
|
2594
|
+
if (l || s || e || !G || !n.current) return;
|
|
2469
2595
|
if (t.length === 0) {
|
|
2470
|
-
const
|
|
2471
|
-
if (!
|
|
2472
|
-
|
|
2596
|
+
const D = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
2597
|
+
if (!D) return;
|
|
2598
|
+
c(D, D);
|
|
2473
2599
|
return;
|
|
2474
2600
|
}
|
|
2475
|
-
const
|
|
2476
|
-
let
|
|
2477
|
-
const
|
|
2478
|
-
if (!(
|
|
2479
|
-
if (
|
|
2480
|
-
|
|
2481
|
-
else if (
|
|
2482
|
-
const
|
|
2483
|
-
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) {
|
|
2484
2610
|
let j = "";
|
|
2485
|
-
const
|
|
2486
|
-
|
|
2611
|
+
const U = document.createTreeWalker(
|
|
2612
|
+
_,
|
|
2487
2613
|
NodeFilter.SHOW_TEXT,
|
|
2488
2614
|
{
|
|
2489
2615
|
acceptNode: (K) => {
|
|
2490
|
-
const oe =
|
|
2616
|
+
const oe = _.querySelector(".variable-info-icon");
|
|
2491
2617
|
return oe && oe.contains(K) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
2492
2618
|
}
|
|
2493
2619
|
}
|
|
2494
2620
|
);
|
|
2495
|
-
for (;
|
|
2496
|
-
j +=
|
|
2497
|
-
const
|
|
2498
|
-
if (
|
|
2499
|
-
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;
|
|
2500
2626
|
if (K) {
|
|
2501
|
-
(!
|
|
2502
|
-
const oe =
|
|
2503
|
-
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;
|
|
2504
2630
|
} else
|
|
2505
|
-
|
|
2631
|
+
S[M] = P, h += P;
|
|
2506
2632
|
}
|
|
2507
|
-
} else if (
|
|
2508
|
-
const j =
|
|
2509
|
-
if (
|
|
2510
|
-
|
|
2511
|
-
const
|
|
2512
|
-
|
|
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;
|
|
2513
2639
|
}
|
|
2514
|
-
} else if (
|
|
2515
|
-
const
|
|
2516
|
-
|
|
2517
|
-
} else if (
|
|
2518
|
-
const
|
|
2519
|
-
|
|
2520
|
-
} else if (
|
|
2521
|
-
const
|
|
2522
|
-
if (
|
|
2523
|
-
if (
|
|
2524
|
-
const
|
|
2525
|
-
|
|
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);
|
|
2526
2652
|
} else
|
|
2527
|
-
|
|
2528
|
-
} else if (
|
|
2529
|
-
|
|
2653
|
+
S[M] = U, h += U;
|
|
2654
|
+
} else if (R === "upload" && M)
|
|
2655
|
+
S[M] = a[M] ?? null, a[M] && (h += ` [附带文件: ${a[M]?.name}] `);
|
|
2530
2656
|
else {
|
|
2531
|
-
if (
|
|
2532
|
-
|
|
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);
|
|
2533
2659
|
}
|
|
2534
2660
|
}
|
|
2535
2661
|
}
|
|
2536
2662
|
};
|
|
2537
|
-
if (
|
|
2538
|
-
const
|
|
2539
|
-
|
|
2540
|
-
const
|
|
2541
|
-
|
|
2542
|
-
(
|
|
2543
|
-
) ?
|
|
2544
|
-
|
|
2545
|
-
}) :
|
|
2546
|
-
|
|
2547
|
-
}) : typeof
|
|
2548
|
-
}),
|
|
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);
|
|
2549
2675
|
}, Ce = {
|
|
2550
2676
|
...u ? { width: typeof u == "number" ? `${u}px` : u } : {},
|
|
2551
|
-
...
|
|
2552
|
-
...
|
|
2677
|
+
...y ? { border: y } : {},
|
|
2678
|
+
...i ? { background: i } : {}
|
|
2553
2679
|
};
|
|
2554
2680
|
return /* @__PURE__ */ Z(
|
|
2555
2681
|
"div",
|
|
2556
2682
|
{
|
|
2557
2683
|
className: "rich-text-editor",
|
|
2558
2684
|
style: Ce,
|
|
2559
|
-
"data-disabled":
|
|
2685
|
+
"data-disabled": s,
|
|
2560
2686
|
children: [
|
|
2561
|
-
/* @__PURE__ */
|
|
2687
|
+
/* @__PURE__ */ $(
|
|
2562
2688
|
"div",
|
|
2563
2689
|
{
|
|
2564
2690
|
ref: n,
|
|
2565
|
-
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${
|
|
2691
|
+
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${H && q ? "rte-editor-empty" : ""}`,
|
|
2566
2692
|
contentEditable: t.length === 0,
|
|
2567
2693
|
suppressContentEditableWarning: !0,
|
|
2568
2694
|
"data-placeholder": q,
|
|
@@ -2576,7 +2702,7 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2576
2702
|
onPaste: se
|
|
2577
2703
|
}
|
|
2578
2704
|
),
|
|
2579
|
-
/* @__PURE__ */
|
|
2705
|
+
/* @__PURE__ */ $(
|
|
2580
2706
|
"input",
|
|
2581
2707
|
{
|
|
2582
2708
|
type: "file",
|
|
@@ -2587,109 +2713,109 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2587
2713
|
}
|
|
2588
2714
|
),
|
|
2589
2715
|
/* @__PURE__ */ Z("div", { className: "rich-text-editor-footer", children: [
|
|
2590
|
-
/* @__PURE__ */
|
|
2716
|
+
/* @__PURE__ */ $("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ Z("div", { className: "rich-text-editor-brand", children: [
|
|
2591
2717
|
/* @__PURE__ */ Z("div", { className: "rte-brand-badge", children: [
|
|
2592
|
-
/* @__PURE__ */
|
|
2593
|
-
/* @__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" })
|
|
2594
2720
|
] }),
|
|
2595
|
-
r !== "hideAgent" && /* @__PURE__ */
|
|
2596
|
-
|
|
2721
|
+
r !== "hideAgent" && /* @__PURE__ */ $(
|
|
2722
|
+
pt,
|
|
2597
2723
|
{
|
|
2598
2724
|
placement: "top",
|
|
2599
2725
|
menu: {
|
|
2600
|
-
items:
|
|
2601
|
-
key:
|
|
2726
|
+
items: T.map((g) => ({
|
|
2727
|
+
key: g.key,
|
|
2602
2728
|
label: /* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2603
|
-
|
|
2604
|
-
/* @__PURE__ */
|
|
2729
|
+
g.icon && /* @__PURE__ */ $("i", { className: g.icon }),
|
|
2730
|
+
/* @__PURE__ */ $("span", { children: g.label })
|
|
2605
2731
|
] }),
|
|
2606
2732
|
onClick: () => {
|
|
2607
|
-
|
|
2733
|
+
w?.(g);
|
|
2608
2734
|
}
|
|
2609
2735
|
}))
|
|
2610
2736
|
},
|
|
2611
2737
|
trigger: ["click"],
|
|
2612
|
-
disabled:
|
|
2613
|
-
children: /* @__PURE__ */ Z("div", { className: "rte-agent-badge", style: { cursor:
|
|
2614
|
-
/* @__PURE__ */
|
|
2615
|
-
/* @__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: "智能体" })
|
|
2616
2742
|
] })
|
|
2617
2743
|
}
|
|
2618
2744
|
)
|
|
2619
2745
|
] }) }),
|
|
2620
2746
|
/* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2621
2747
|
(() => {
|
|
2622
|
-
const
|
|
2623
|
-
if (!
|
|
2624
|
-
const
|
|
2625
|
-
return !
|
|
2626
|
-
/* @__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" } }),
|
|
2627
2753
|
/* @__PURE__ */ Z("span", { style: { fontSize: "16px" }, children: [
|
|
2628
2754
|
"-",
|
|
2629
|
-
String(
|
|
2755
|
+
String(h.points)
|
|
2630
2756
|
] })
|
|
2631
2757
|
] });
|
|
2632
2758
|
})(),
|
|
2633
|
-
/* @__PURE__ */
|
|
2759
|
+
/* @__PURE__ */ $(
|
|
2634
2760
|
"button",
|
|
2635
2761
|
{
|
|
2636
2762
|
type: "button",
|
|
2637
2763
|
onClick: we,
|
|
2638
|
-
disabled:
|
|
2764
|
+
disabled: l || s || e || !G,
|
|
2639
2765
|
className: "rich-text-editor-send-button",
|
|
2640
|
-
children:
|
|
2766
|
+
children: l || e ? /* @__PURE__ */ $("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ $("i", { className: "iconfont icon-fasong" })
|
|
2641
2767
|
}
|
|
2642
2768
|
)
|
|
2643
2769
|
] })
|
|
2644
2770
|
] }),
|
|
2645
|
-
|
|
2646
|
-
if (!document.body.contains(
|
|
2771
|
+
x?.anchorEl && (() => {
|
|
2772
|
+
if (!document.body.contains(x.anchorEl))
|
|
2647
2773
|
return null;
|
|
2648
|
-
let
|
|
2774
|
+
let g = "", h = {
|
|
2649
2775
|
background: "var(--neutral-800, #262626)"
|
|
2650
2776
|
};
|
|
2651
|
-
if (
|
|
2652
|
-
|
|
2653
|
-
(
|
|
2777
|
+
if (x.type === "upload")
|
|
2778
|
+
g = t.find(
|
|
2779
|
+
(A) => A.type === "upload" && A.key === x.key
|
|
2654
2780
|
)?.tooltip || "";
|
|
2655
|
-
else if (
|
|
2656
|
-
|
|
2657
|
-
else if (
|
|
2658
|
-
|
|
2659
|
-
else if (
|
|
2660
|
-
|
|
2661
|
-
else if (
|
|
2662
|
-
const
|
|
2663
|
-
if (
|
|
2664
|
-
const
|
|
2665
|
-
|
|
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 = {
|
|
2666
2792
|
background: "#fff",
|
|
2667
2793
|
padding: 4
|
|
2668
|
-
}, setTimeout(() => URL.revokeObjectURL(
|
|
2794
|
+
}, setTimeout(() => URL.revokeObjectURL(A), 1e3);
|
|
2669
2795
|
} else
|
|
2670
|
-
|
|
2796
|
+
g = "";
|
|
2671
2797
|
}
|
|
2672
|
-
if (!
|
|
2673
|
-
const
|
|
2674
|
-
return
|
|
2675
|
-
/* @__PURE__ */
|
|
2676
|
-
|
|
2798
|
+
if (!g) return null;
|
|
2799
|
+
const S = x.type === "upload-preview" ? "#0A0A0A" : "#fff";
|
|
2800
|
+
return tt(
|
|
2801
|
+
/* @__PURE__ */ $(
|
|
2802
|
+
ft,
|
|
2677
2803
|
{
|
|
2678
2804
|
arrow: !1,
|
|
2679
|
-
title: /* @__PURE__ */
|
|
2805
|
+
title: /* @__PURE__ */ $("div", { style: { maxWidth: "200px", fontSize: "12px", color: S }, children: g }),
|
|
2680
2806
|
open: !0,
|
|
2681
2807
|
placement: "top",
|
|
2682
2808
|
getPopupContainer: () => document.body,
|
|
2683
|
-
overlayInnerStyle:
|
|
2684
|
-
children: /* @__PURE__ */
|
|
2809
|
+
overlayInnerStyle: h,
|
|
2810
|
+
children: /* @__PURE__ */ $(
|
|
2685
2811
|
"div",
|
|
2686
2812
|
{
|
|
2687
2813
|
style: {
|
|
2688
2814
|
position: "fixed",
|
|
2689
|
-
left: `${
|
|
2690
|
-
top: `${
|
|
2691
|
-
width: `${
|
|
2692
|
-
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`,
|
|
2693
2819
|
pointerEvents: "none"
|
|
2694
2820
|
}
|
|
2695
2821
|
}
|
|
@@ -2704,7 +2830,7 @@ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
|
|
|
2704
2830
|
}
|
|
2705
2831
|
);
|
|
2706
2832
|
};
|
|
2707
|
-
|
|
2833
|
+
rn.__docgenInfo = {
|
|
2708
2834
|
displayName: "RichTextEditor",
|
|
2709
2835
|
description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
|
|
2710
2836
|
props: {
|
|
@@ -2732,43 +2858,43 @@ zt.__docgenInfo = {
|
|
|
2732
2858
|
}
|
|
2733
2859
|
}
|
|
2734
2860
|
};
|
|
2735
|
-
const
|
|
2861
|
+
const Qe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", on = [
|
|
2736
2862
|
{ label: "5页", value: 5 },
|
|
2737
2863
|
{ label: "10页", value: 10 },
|
|
2738
2864
|
{ label: "15页", value: 15 },
|
|
2739
2865
|
{ label: "30页", value: 30 }
|
|
2740
|
-
],
|
|
2866
|
+
], sn = ({
|
|
2741
2867
|
autoLoading: t,
|
|
2742
|
-
batchSize:
|
|
2743
|
-
loadingProgress:
|
|
2744
|
-
loadIcon:
|
|
2868
|
+
batchSize: c,
|
|
2869
|
+
loadingProgress: l,
|
|
2870
|
+
loadIcon: s,
|
|
2745
2871
|
onBatchSizeChange: u,
|
|
2746
|
-
onLoadNextPage:
|
|
2747
|
-
onStartAutoLoad:
|
|
2748
|
-
onStopLoad:
|
|
2749
|
-
}) => t &&
|
|
2750
|
-
|
|
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 }),
|
|
2751
2877
|
/* @__PURE__ */ Z("span", { children: [
|
|
2752
2878
|
"正在加载第",
|
|
2753
|
-
|
|
2879
|
+
l.currentPage,
|
|
2754
2880
|
"/",
|
|
2755
|
-
|
|
2881
|
+
l.totalPages,
|
|
2756
2882
|
"页"
|
|
2757
2883
|
] }),
|
|
2758
|
-
/* @__PURE__ */
|
|
2759
|
-
|
|
2884
|
+
/* @__PURE__ */ $(
|
|
2885
|
+
yt,
|
|
2760
2886
|
{
|
|
2761
|
-
percent:
|
|
2887
|
+
percent: l.percentage,
|
|
2762
2888
|
type: "line",
|
|
2763
2889
|
size: [160, 8]
|
|
2764
2890
|
}
|
|
2765
2891
|
),
|
|
2766
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ $("span", { onClick: w, className: "auto_load_stop_btn", children: "停止加载" })
|
|
2767
2893
|
] }) : /* @__PURE__ */ Z("div", { className: "auto_load_container", children: [
|
|
2768
|
-
/* @__PURE__ */
|
|
2894
|
+
/* @__PURE__ */ $(
|
|
2769
2895
|
"div",
|
|
2770
2896
|
{
|
|
2771
|
-
onClick:
|
|
2897
|
+
onClick: C,
|
|
2772
2898
|
className: "auto_load_next_btn",
|
|
2773
2899
|
style: {
|
|
2774
2900
|
backgroundColor: t ? "#f5f5f5" : "#2563eb"
|
|
@@ -2788,19 +2914,19 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2788
2914
|
"div",
|
|
2789
2915
|
{
|
|
2790
2916
|
className: "auto_load_btn",
|
|
2791
|
-
onClick: t ? void 0 :
|
|
2917
|
+
onClick: t ? void 0 : T,
|
|
2792
2918
|
children: [
|
|
2793
|
-
|
|
2794
|
-
/* @__PURE__ */
|
|
2919
|
+
s || /* @__PURE__ */ $("img", { src: Qe, alt: "自动加载", width: 14, height: 14 }),
|
|
2920
|
+
/* @__PURE__ */ $("span", { children: "自动加载" })
|
|
2795
2921
|
]
|
|
2796
2922
|
}
|
|
2797
2923
|
),
|
|
2798
|
-
/* @__PURE__ */
|
|
2799
|
-
|
|
2924
|
+
/* @__PURE__ */ $(
|
|
2925
|
+
Fe,
|
|
2800
2926
|
{
|
|
2801
|
-
value:
|
|
2927
|
+
value: c,
|
|
2802
2928
|
onChange: u,
|
|
2803
|
-
options:
|
|
2929
|
+
options: on,
|
|
2804
2930
|
disabled: t,
|
|
2805
2931
|
size: "small",
|
|
2806
2932
|
className: "auto_load_select",
|
|
@@ -2810,80 +2936,80 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2810
2936
|
]
|
|
2811
2937
|
}
|
|
2812
2938
|
)
|
|
2813
|
-
] }),
|
|
2939
|
+
] }), ln = ({
|
|
2814
2940
|
current: t,
|
|
2815
|
-
loadIcon:
|
|
2816
|
-
pageSize:
|
|
2817
|
-
total:
|
|
2941
|
+
loadIcon: c,
|
|
2942
|
+
pageSize: l,
|
|
2943
|
+
total: s,
|
|
2818
2944
|
cachedPages: u,
|
|
2819
|
-
loadedCount:
|
|
2820
|
-
autoLoading:
|
|
2821
|
-
loadingProgress:
|
|
2822
|
-
onChange:
|
|
2945
|
+
loadedCount: C,
|
|
2946
|
+
autoLoading: T = !1,
|
|
2947
|
+
loadingProgress: w,
|
|
2948
|
+
onChange: k,
|
|
2823
2949
|
onLoadNextPage: e,
|
|
2824
2950
|
onStartAutoLoad: q,
|
|
2825
|
-
onStopLoading:
|
|
2951
|
+
onStopLoading: y
|
|
2826
2952
|
}) => {
|
|
2827
|
-
const [
|
|
2953
|
+
const [i, r] = ne(5), n = Math.ceil(s / l), o = Ze(() => u.length >= n, [u, n]), a = () => Array.from(
|
|
2828
2954
|
{ length: n },
|
|
2829
|
-
(
|
|
2830
|
-
).filter((
|
|
2955
|
+
(v, x) => x + 1
|
|
2956
|
+
).filter((v) => !u.includes(v)).slice(0, i);
|
|
2831
2957
|
return /* @__PURE__ */ Z("div", { className: "pagination_footer", children: [
|
|
2832
2958
|
/* @__PURE__ */ Z("div", { className: "pagination_leftWrap", children: [
|
|
2833
2959
|
/* @__PURE__ */ Z("span", { className: "pagination_total", children: [
|
|
2834
|
-
/* @__PURE__ */
|
|
2835
|
-
|
|
2960
|
+
/* @__PURE__ */ $(
|
|
2961
|
+
kt,
|
|
2836
2962
|
{
|
|
2837
2963
|
style: { color: "#2563EB", marginRight: "4px" }
|
|
2838
2964
|
}
|
|
2839
2965
|
),
|
|
2840
2966
|
"已加载: ",
|
|
2841
|
-
|
|
2967
|
+
C,
|
|
2842
2968
|
"/",
|
|
2843
|
-
|
|
2969
|
+
s,
|
|
2844
2970
|
"条数据"
|
|
2845
2971
|
] }),
|
|
2846
|
-
!o && /* @__PURE__ */
|
|
2847
|
-
|
|
2972
|
+
!o && /* @__PURE__ */ $(
|
|
2973
|
+
sn,
|
|
2848
2974
|
{
|
|
2849
|
-
loadIcon:
|
|
2850
|
-
autoLoading:
|
|
2851
|
-
batchSize:
|
|
2852
|
-
loadingProgress:
|
|
2975
|
+
loadIcon: c || void 0,
|
|
2976
|
+
autoLoading: T,
|
|
2977
|
+
batchSize: i,
|
|
2978
|
+
loadingProgress: w,
|
|
2853
2979
|
disabled: !e || !q,
|
|
2854
2980
|
onBatchSizeChange: r,
|
|
2855
2981
|
onLoadNextPage: () => e?.(),
|
|
2856
2982
|
onStartAutoLoad: () => {
|
|
2857
|
-
const
|
|
2858
|
-
q?.(
|
|
2983
|
+
const m = a();
|
|
2984
|
+
q?.(m);
|
|
2859
2985
|
},
|
|
2860
|
-
onStopLoad: () =>
|
|
2986
|
+
onStopLoad: () => y?.()
|
|
2861
2987
|
}
|
|
2862
2988
|
)
|
|
2863
2989
|
] }),
|
|
2864
|
-
/* @__PURE__ */
|
|
2865
|
-
|
|
2990
|
+
/* @__PURE__ */ $(
|
|
2991
|
+
mt,
|
|
2866
2992
|
{
|
|
2867
2993
|
current: t,
|
|
2868
|
-
pageSize:
|
|
2869
|
-
total:
|
|
2870
|
-
onChange: (
|
|
2994
|
+
pageSize: l,
|
|
2995
|
+
total: s,
|
|
2996
|
+
onChange: (m) => k(m),
|
|
2871
2997
|
showSizeChanger: !1,
|
|
2872
2998
|
showQuickJumper: !1,
|
|
2873
|
-
showTotal: (
|
|
2874
|
-
itemRender: (
|
|
2875
|
-
const V = u.includes(
|
|
2876
|
-
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(
|
|
2877
3003
|
"div",
|
|
2878
3004
|
{
|
|
2879
3005
|
className: "pageBox",
|
|
2880
3006
|
style: {
|
|
2881
|
-
backgroundColor: t ===
|
|
2882
|
-
color: t ===
|
|
3007
|
+
backgroundColor: t === m ? "#2563EB" : "#f5f5f5",
|
|
3008
|
+
color: t === m ? "#fff" : V ? "#171717" : "#a3a3a3"
|
|
2883
3009
|
},
|
|
2884
3010
|
children: [
|
|
2885
|
-
|
|
2886
|
-
!V && /* @__PURE__ */
|
|
3011
|
+
m,
|
|
3012
|
+
!V && /* @__PURE__ */ $("span", { className: "unload_spot" })
|
|
2887
3013
|
]
|
|
2888
3014
|
}
|
|
2889
3015
|
);
|
|
@@ -2891,62 +3017,62 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2891
3017
|
}
|
|
2892
3018
|
)
|
|
2893
3019
|
] });
|
|
2894
|
-
},
|
|
3020
|
+
}, cn = (t) => {
|
|
2895
3021
|
const {
|
|
2896
|
-
loading:
|
|
2897
|
-
autoLoading:
|
|
2898
|
-
loadingProgress:
|
|
3022
|
+
loading: c,
|
|
3023
|
+
autoLoading: l,
|
|
3024
|
+
loadingProgress: s,
|
|
2899
3025
|
columns: u = [],
|
|
2900
|
-
dataSource:
|
|
2901
|
-
total:
|
|
2902
|
-
current:
|
|
2903
|
-
pageSize:
|
|
3026
|
+
dataSource: C = [],
|
|
3027
|
+
total: T,
|
|
3028
|
+
current: w,
|
|
3029
|
+
pageSize: k,
|
|
2904
3030
|
cachedPages: e,
|
|
2905
3031
|
onChangePage: q,
|
|
2906
|
-
onLoadNextPage:
|
|
2907
|
-
onStartAutoLoad:
|
|
3032
|
+
onLoadNextPage: y,
|
|
3033
|
+
onStartAutoLoad: i,
|
|
2908
3034
|
onStopLoading: r,
|
|
2909
3035
|
...n
|
|
2910
3036
|
} = t, o = Q(null), a = ae(
|
|
2911
|
-
(
|
|
2912
|
-
q(
|
|
2913
|
-
key: `${(
|
|
3037
|
+
(f) => {
|
|
3038
|
+
q(f), e.includes(f) && o.current?.scrollTo({
|
|
3039
|
+
key: `${(f - 1) * k + 1}`
|
|
2914
3040
|
});
|
|
2915
3041
|
},
|
|
2916
|
-
[
|
|
3042
|
+
[w]
|
|
2917
3043
|
);
|
|
2918
3044
|
return /* @__PURE__ */ Z("div", { className: "flex flex-col", children: [
|
|
2919
|
-
/* @__PURE__ */
|
|
2920
|
-
|
|
3045
|
+
/* @__PURE__ */ $(
|
|
3046
|
+
Ge,
|
|
2921
3047
|
{
|
|
2922
3048
|
ref: o,
|
|
2923
3049
|
...n,
|
|
2924
3050
|
columns: u,
|
|
2925
|
-
dataSource:
|
|
3051
|
+
dataSource: C,
|
|
2926
3052
|
pagination: !1,
|
|
2927
3053
|
virtual: !0
|
|
2928
3054
|
}
|
|
2929
3055
|
),
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
|
|
3056
|
+
/* @__PURE__ */ $(
|
|
3057
|
+
ln,
|
|
2932
3058
|
{
|
|
2933
|
-
loading:
|
|
2934
|
-
autoLoading:
|
|
2935
|
-
loadingProgress:
|
|
2936
|
-
current:
|
|
2937
|
-
pageSize:
|
|
2938
|
-
total:
|
|
2939
|
-
loadedCount:
|
|
3059
|
+
loading: c,
|
|
3060
|
+
autoLoading: l,
|
|
3061
|
+
loadingProgress: s,
|
|
3062
|
+
current: w,
|
|
3063
|
+
pageSize: k,
|
|
3064
|
+
total: T,
|
|
3065
|
+
loadedCount: C.length,
|
|
2940
3066
|
cachedPages: e,
|
|
2941
3067
|
onChange: a,
|
|
2942
|
-
onLoadNextPage:
|
|
2943
|
-
onStartAutoLoad:
|
|
3068
|
+
onLoadNextPage: y,
|
|
3069
|
+
onStartAutoLoad: i,
|
|
2944
3070
|
onStopLoading: r
|
|
2945
3071
|
}
|
|
2946
3072
|
)
|
|
2947
3073
|
] });
|
|
2948
3074
|
};
|
|
2949
|
-
|
|
3075
|
+
cn.__docgenInfo = {
|
|
2950
3076
|
displayName: "VirtualTable",
|
|
2951
3077
|
description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
|
|
2952
3078
|
props: {
|
|
@@ -3053,77 +3179,77 @@ Yt.__docgenInfo = {
|
|
|
3053
3179
|
}
|
|
3054
3180
|
}
|
|
3055
3181
|
};
|
|
3056
|
-
const
|
|
3182
|
+
const un = ({
|
|
3057
3183
|
texts: t = [],
|
|
3058
|
-
placeholder:
|
|
3059
|
-
animationSpeed:
|
|
3060
|
-
autoPlay:
|
|
3184
|
+
placeholder: c = "请输入内容",
|
|
3185
|
+
animationSpeed: l = 100,
|
|
3186
|
+
autoPlay: s = !0,
|
|
3061
3187
|
value: u,
|
|
3062
|
-
onChange:
|
|
3063
|
-
...
|
|
3188
|
+
onChange: C,
|
|
3189
|
+
...T
|
|
3064
3190
|
}) => {
|
|
3065
|
-
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);
|
|
3066
3192
|
de(() => {
|
|
3067
|
-
|
|
3193
|
+
v.current = t, x.current = e, V.current = r, E.current = w;
|
|
3068
3194
|
});
|
|
3069
|
-
const
|
|
3070
|
-
let
|
|
3195
|
+
const B = ae((d, p) => {
|
|
3196
|
+
let b = 0;
|
|
3071
3197
|
a(!0);
|
|
3072
3198
|
const L = () => {
|
|
3073
|
-
|
|
3199
|
+
b < d.length ? (k(d.slice(0, b + 1)), b++, m.current = window.setTimeout(L, l)) : (a(!1), p?.());
|
|
3074
3200
|
};
|
|
3075
3201
|
L();
|
|
3076
|
-
}, [
|
|
3077
|
-
let
|
|
3078
|
-
const
|
|
3079
|
-
|
|
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?.();
|
|
3080
3206
|
};
|
|
3081
|
-
|
|
3082
|
-
}, [
|
|
3083
|
-
if (
|
|
3084
|
-
|
|
3085
|
-
const
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
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);
|
|
3090
3216
|
}, 2e3);
|
|
3091
3217
|
});
|
|
3092
|
-
}) :
|
|
3093
|
-
|
|
3094
|
-
q((
|
|
3218
|
+
}) : B(d, () => {
|
|
3219
|
+
f.current = window.setTimeout(() => {
|
|
3220
|
+
q((p) => (p + 1) % v.current.length), i(!1);
|
|
3095
3221
|
}, 2e3);
|
|
3096
3222
|
});
|
|
3097
|
-
}, [
|
|
3098
|
-
return de(() => (
|
|
3099
|
-
|
|
3100
|
-
}), [e, r,
|
|
3101
|
-
!
|
|
3102
|
-
}, [e,
|
|
3103
|
-
/* @__PURE__ */
|
|
3104
|
-
|
|
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,
|
|
3105
3231
|
{
|
|
3106
|
-
...
|
|
3232
|
+
...T,
|
|
3107
3233
|
value: u,
|
|
3108
|
-
onChange: (
|
|
3109
|
-
|
|
3234
|
+
onChange: (d) => {
|
|
3235
|
+
C?.(d.target.value), T.onChange?.(d);
|
|
3110
3236
|
},
|
|
3111
|
-
onFocus: (
|
|
3112
|
-
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);
|
|
3113
3239
|
},
|
|
3114
|
-
onBlur: (
|
|
3115
|
-
n(!1), !u && t.length > 0 && (
|
|
3240
|
+
onBlur: (d) => {
|
|
3241
|
+
n(!1), !u && t.length > 0 && (k(""), q(0)), T.onBlur?.(d);
|
|
3116
3242
|
},
|
|
3117
|
-
placeholder: r || u ?
|
|
3243
|
+
placeholder: r || u ? c : w || c,
|
|
3118
3244
|
style: {
|
|
3119
3245
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3120
|
-
...
|
|
3246
|
+
...T.style,
|
|
3121
3247
|
position: "relative",
|
|
3122
3248
|
zIndex: 1
|
|
3123
3249
|
}
|
|
3124
3250
|
}
|
|
3125
3251
|
),
|
|
3126
|
-
!r && !u &&
|
|
3252
|
+
!r && !u && w && /* @__PURE__ */ Z(
|
|
3127
3253
|
"div",
|
|
3128
3254
|
{
|
|
3129
3255
|
style: {
|
|
@@ -3143,8 +3269,8 @@ const Kt = ({
|
|
|
3143
3269
|
fontFamily: "inherit"
|
|
3144
3270
|
},
|
|
3145
3271
|
children: [
|
|
3146
|
-
/* @__PURE__ */
|
|
3147
|
-
o && /* @__PURE__ */
|
|
3272
|
+
/* @__PURE__ */ $("span", { children: w }),
|
|
3273
|
+
o && /* @__PURE__ */ $(
|
|
3148
3274
|
"span",
|
|
3149
3275
|
{
|
|
3150
3276
|
style: {
|
|
@@ -3160,7 +3286,7 @@ const Kt = ({
|
|
|
3160
3286
|
]
|
|
3161
3287
|
}
|
|
3162
3288
|
),
|
|
3163
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ $("style", { children: `
|
|
3164
3290
|
@keyframes blink {
|
|
3165
3291
|
0%, 50% { opacity: 1; }
|
|
3166
3292
|
51%, 100% { opacity: 0; }
|
|
@@ -3168,7 +3294,7 @@ const Kt = ({
|
|
|
3168
3294
|
` })
|
|
3169
3295
|
] });
|
|
3170
3296
|
};
|
|
3171
|
-
|
|
3297
|
+
un.__docgenInfo = {
|
|
3172
3298
|
displayName: "DynamicInput",
|
|
3173
3299
|
description: "动态文案输入框组件,支持流式文字动画效果",
|
|
3174
3300
|
props: {
|
|
@@ -3213,109 +3339,109 @@ Kt.__docgenInfo = {
|
|
|
3213
3339
|
}
|
|
3214
3340
|
}
|
|
3215
3341
|
};
|
|
3216
|
-
const
|
|
3342
|
+
const dn = ({
|
|
3217
3343
|
texts: t = [],
|
|
3218
3344
|
// 动态文案数组,默认为空数组
|
|
3219
|
-
placeholder:
|
|
3345
|
+
placeholder: c = "请输入内容",
|
|
3220
3346
|
// 占位符文本
|
|
3221
|
-
animationSpeed:
|
|
3347
|
+
animationSpeed: l = 100,
|
|
3222
3348
|
// 打字机动画速度,毫秒
|
|
3223
|
-
autoPlay:
|
|
3349
|
+
autoPlay: s = !0,
|
|
3224
3350
|
// 是否自动播放动画
|
|
3225
3351
|
value: u = "",
|
|
3226
3352
|
// 受控模式的值
|
|
3227
|
-
onChange:
|
|
3353
|
+
onChange: C,
|
|
3228
3354
|
// 受控模式的变化回调
|
|
3229
|
-
onSubmit:
|
|
3355
|
+
onSubmit: T,
|
|
3230
3356
|
// 提交回调
|
|
3231
|
-
maxLength:
|
|
3357
|
+
maxLength: w = 500,
|
|
3232
3358
|
// 最大字符数限制
|
|
3233
|
-
showCount:
|
|
3359
|
+
showCount: k = !0,
|
|
3234
3360
|
// 是否显示字数统计
|
|
3235
3361
|
submitText: e = "发送",
|
|
3236
3362
|
// 提交按钮文本
|
|
3237
3363
|
disabled: q = !1,
|
|
3238
3364
|
// 是否禁用组件
|
|
3239
|
-
rows:
|
|
3365
|
+
rows: y = 4,
|
|
3240
3366
|
// 文本域行数
|
|
3241
|
-
style:
|
|
3367
|
+
style: i,
|
|
3242
3368
|
// 自定义样式
|
|
3243
3369
|
...r
|
|
3244
3370
|
// 其他原生属性
|
|
3245
3371
|
}) => {
|
|
3246
|
-
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);
|
|
3247
3373
|
de(() => {
|
|
3248
|
-
ee.current = t, re.current = a,
|
|
3374
|
+
ee.current = t, re.current = a, d.current = x, p.current = n;
|
|
3249
3375
|
});
|
|
3250
3376
|
const L = ae((X, ue) => {
|
|
3251
3377
|
let he = 0;
|
|
3252
|
-
|
|
3378
|
+
B(!0);
|
|
3253
3379
|
const ye = () => {
|
|
3254
|
-
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?.());
|
|
3255
3381
|
};
|
|
3256
3382
|
ye();
|
|
3257
|
-
}, [
|
|
3258
|
-
let ue =
|
|
3383
|
+
}, [l]), N = ae((X) => {
|
|
3384
|
+
let ue = p.current.length;
|
|
3259
3385
|
const he = () => {
|
|
3260
|
-
ue > 0 ? (o(
|
|
3386
|
+
ue > 0 ? (o(p.current.slice(0, ue - 1)), ue--, H.current = window.setTimeout(he, l / 2)) : X?.();
|
|
3261
3387
|
};
|
|
3262
3388
|
he();
|
|
3263
|
-
}, [
|
|
3264
|
-
if (ee.current.length === 0 ||
|
|
3265
|
-
|
|
3389
|
+
}, [l]), z = ae(() => {
|
|
3390
|
+
if (ee.current.length === 0 || d.current) return;
|
|
3391
|
+
v(!0);
|
|
3266
3392
|
const X = ee.current[re.current];
|
|
3267
|
-
|
|
3393
|
+
p.current ? N(() => {
|
|
3268
3394
|
L(X, () => {
|
|
3269
|
-
|
|
3270
|
-
|
|
3395
|
+
W.current = window.setTimeout(() => {
|
|
3396
|
+
f((ue) => (ue + 1) % ee.current.length), v(!1);
|
|
3271
3397
|
}, 2e3);
|
|
3272
3398
|
});
|
|
3273
3399
|
}) : L(X, () => {
|
|
3274
|
-
|
|
3275
|
-
|
|
3400
|
+
W.current = window.setTimeout(() => {
|
|
3401
|
+
f((ue) => (ue + 1) % ee.current.length), v(!1);
|
|
3276
3402
|
}, 2e3);
|
|
3277
3403
|
});
|
|
3278
3404
|
}, [N, L]);
|
|
3279
|
-
de(() => (
|
|
3280
|
-
|
|
3281
|
-
}), [a,
|
|
3282
|
-
!
|
|
3283
|
-
}, [a,
|
|
3284
|
-
const
|
|
3285
|
-
V(!0),
|
|
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);
|
|
3286
3412
|
}, te = (X) => {
|
|
3287
|
-
V(!1), !u && t.length > 0 && (o(""),
|
|
3413
|
+
V(!1), !u && t.length > 0 && (o(""), f(0)), r.onBlur?.(X);
|
|
3288
3414
|
}, se = (X) => {
|
|
3289
3415
|
const ue = X.target.value;
|
|
3290
|
-
|
|
3416
|
+
w && ue.length > w || (C ? C(ue) : F(ue), r.onChange?.(X));
|
|
3291
3417
|
}, ce = () => {
|
|
3292
|
-
const X =
|
|
3293
|
-
X.trim() && !q && (
|
|
3418
|
+
const X = C ? u : G;
|
|
3419
|
+
X.trim() && !q && (T?.(X), C || F(""));
|
|
3294
3420
|
}, pe = (X) => {
|
|
3295
3421
|
(X.ctrlKey || X.metaKey) && X.key === "Enter" && (X.preventDefault(), ce()), r.onKeyDown?.(X);
|
|
3296
|
-
}, fe =
|
|
3297
|
-
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: [
|
|
3298
3424
|
/* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
|
|
3299
|
-
/* @__PURE__ */
|
|
3425
|
+
/* @__PURE__ */ $(
|
|
3300
3426
|
"textarea",
|
|
3301
3427
|
{
|
|
3302
|
-
ref:
|
|
3303
|
-
value:
|
|
3428
|
+
ref: b,
|
|
3429
|
+
value: C ? u : G,
|
|
3304
3430
|
onChange: se,
|
|
3305
3431
|
onFocus: (X) => {
|
|
3306
|
-
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);
|
|
3307
3433
|
},
|
|
3308
3434
|
onBlur: (X) => {
|
|
3309
3435
|
X.target.style.borderColor = "#d9d9d9", X.target.style.boxShadow = "none", te(X);
|
|
3310
3436
|
},
|
|
3311
3437
|
onKeyDown: pe,
|
|
3312
|
-
placeholder:
|
|
3313
|
-
maxLength:
|
|
3314
|
-
rows:
|
|
3438
|
+
placeholder: x || fe ? c : "",
|
|
3439
|
+
maxLength: w,
|
|
3440
|
+
rows: y,
|
|
3315
3441
|
disabled: q,
|
|
3316
3442
|
style: {
|
|
3317
3443
|
width: "100%",
|
|
3318
|
-
minHeight: `${
|
|
3444
|
+
minHeight: `${y * 24 + 16}px`,
|
|
3319
3445
|
padding: "8px 60px 8px 12px",
|
|
3320
3446
|
// 右侧留出按钮空间
|
|
3321
3447
|
border: "1px solid #d9d9d9",
|
|
@@ -3333,7 +3459,7 @@ const Xt = ({
|
|
|
3333
3459
|
...r
|
|
3334
3460
|
}
|
|
3335
3461
|
),
|
|
3336
|
-
!
|
|
3462
|
+
!x && !fe && n && /* @__PURE__ */ Z(
|
|
3337
3463
|
"div",
|
|
3338
3464
|
{
|
|
3339
3465
|
style: {
|
|
@@ -3355,8 +3481,8 @@ const Xt = ({
|
|
|
3355
3481
|
lineHeight: "1.5"
|
|
3356
3482
|
},
|
|
3357
3483
|
children: [
|
|
3358
|
-
/* @__PURE__ */
|
|
3359
|
-
|
|
3484
|
+
/* @__PURE__ */ $("span", { children: n }),
|
|
3485
|
+
E && /* @__PURE__ */ $(
|
|
3360
3486
|
"span",
|
|
3361
3487
|
{
|
|
3362
3488
|
style: {
|
|
@@ -3372,7 +3498,7 @@ const Xt = ({
|
|
|
3372
3498
|
]
|
|
3373
3499
|
}
|
|
3374
3500
|
),
|
|
3375
|
-
/* @__PURE__ */
|
|
3501
|
+
/* @__PURE__ */ $(
|
|
3376
3502
|
"div",
|
|
3377
3503
|
{
|
|
3378
3504
|
style: {
|
|
@@ -3381,12 +3507,12 @@ const Xt = ({
|
|
|
3381
3507
|
right: 8,
|
|
3382
3508
|
zIndex: 3
|
|
3383
3509
|
},
|
|
3384
|
-
children: /* @__PURE__ */
|
|
3510
|
+
children: /* @__PURE__ */ $(
|
|
3385
3511
|
$e,
|
|
3386
3512
|
{
|
|
3387
3513
|
type: "primary",
|
|
3388
3514
|
size: "small",
|
|
3389
|
-
icon: /* @__PURE__ */
|
|
3515
|
+
icon: /* @__PURE__ */ $(wt, {}),
|
|
3390
3516
|
onClick: ce,
|
|
3391
3517
|
disabled: be,
|
|
3392
3518
|
style: {
|
|
@@ -3403,7 +3529,7 @@ const Xt = ({
|
|
|
3403
3529
|
}
|
|
3404
3530
|
)
|
|
3405
3531
|
] }),
|
|
3406
|
-
|
|
3532
|
+
k && /* @__PURE__ */ Z(
|
|
3407
3533
|
"div",
|
|
3408
3534
|
{
|
|
3409
3535
|
style: {
|
|
@@ -3415,11 +3541,11 @@ const Xt = ({
|
|
|
3415
3541
|
children: [
|
|
3416
3542
|
fe.length,
|
|
3417
3543
|
"/",
|
|
3418
|
-
|
|
3544
|
+
w
|
|
3419
3545
|
]
|
|
3420
3546
|
}
|
|
3421
3547
|
),
|
|
3422
|
-
/* @__PURE__ */
|
|
3548
|
+
/* @__PURE__ */ $("style", { children: `
|
|
3423
3549
|
@keyframes blink {
|
|
3424
3550
|
0%, 50% { opacity: 1; }
|
|
3425
3551
|
51%, 100% { opacity: 0; }
|
|
@@ -3427,7 +3553,7 @@ const Xt = ({
|
|
|
3427
3553
|
` })
|
|
3428
3554
|
] });
|
|
3429
3555
|
};
|
|
3430
|
-
|
|
3556
|
+
dn.__docgenInfo = {
|
|
3431
3557
|
displayName: "DynamicTextArea",
|
|
3432
3558
|
description: "动态文案文本域组件,支持流式文字动画效果",
|
|
3433
3559
|
props: {
|
|
@@ -3513,96 +3639,96 @@ Xt.__docgenInfo = {
|
|
|
3513
3639
|
}
|
|
3514
3640
|
}
|
|
3515
3641
|
};
|
|
3516
|
-
const
|
|
3642
|
+
const rt = ({
|
|
3517
3643
|
src: t,
|
|
3518
|
-
poster:
|
|
3519
|
-
width:
|
|
3520
|
-
height:
|
|
3644
|
+
poster: c,
|
|
3645
|
+
width: l = 300,
|
|
3646
|
+
height: s,
|
|
3521
3647
|
videoWidth: u,
|
|
3522
3648
|
// 参数保留但不使用,由CSS控制
|
|
3523
|
-
videoHeight:
|
|
3649
|
+
videoHeight: C,
|
|
3524
3650
|
// 参数保留但不使用,由CSS控制
|
|
3525
|
-
showPlayButton:
|
|
3526
|
-
autoPlayOnHover:
|
|
3527
|
-
onClick:
|
|
3651
|
+
showPlayButton: T = !0,
|
|
3652
|
+
autoPlayOnHover: w = !0,
|
|
3653
|
+
onClick: k,
|
|
3528
3654
|
onVideoLoaded: e,
|
|
3529
3655
|
onVideoPlay: q,
|
|
3530
|
-
onVideoPause:
|
|
3531
|
-
onVideoEnded:
|
|
3656
|
+
onVideoPause: y,
|
|
3657
|
+
onVideoEnded: i,
|
|
3532
3658
|
className: r,
|
|
3533
3659
|
style: n,
|
|
3534
3660
|
...o
|
|
3535
3661
|
}) => {
|
|
3536
|
-
const a = Q(null), [
|
|
3537
|
-
a.current && (a.current.play(),
|
|
3538
|
-
}, [q]),
|
|
3539
|
-
a.current && (a.current.pause(),
|
|
3540
|
-
}, [
|
|
3541
|
-
L.stopPropagation(),
|
|
3542
|
-
}, [
|
|
3543
|
-
|
|
3544
|
-
}, [
|
|
3545
|
-
|
|
3546
|
-
}, [
|
|
3547
|
-
|
|
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?.());
|
|
3666
|
+
}, [y]), F = ae((L) => {
|
|
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?.();
|
|
3548
3674
|
}, [e]), re = ae(() => {
|
|
3549
|
-
|
|
3550
|
-
}, [q]),
|
|
3551
|
-
|
|
3552
|
-
}, [
|
|
3553
|
-
|
|
3554
|
-
}, [
|
|
3555
|
-
|
|
3556
|
-
}, [
|
|
3557
|
-
return /* @__PURE__ */
|
|
3558
|
-
|
|
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,
|
|
3559
3685
|
{
|
|
3560
3686
|
...o,
|
|
3561
3687
|
className: `video-card ${r || ""}`,
|
|
3562
3688
|
style: {
|
|
3563
|
-
width:
|
|
3564
|
-
height:
|
|
3689
|
+
width: l,
|
|
3690
|
+
height: s,
|
|
3565
3691
|
padding: 0,
|
|
3566
3692
|
overflow: "hidden",
|
|
3567
|
-
cursor:
|
|
3693
|
+
cursor: k ? "pointer" : "default",
|
|
3568
3694
|
border: "none",
|
|
3569
3695
|
borderRadius: 0,
|
|
3570
3696
|
...n
|
|
3571
3697
|
},
|
|
3572
3698
|
bordered: !1,
|
|
3573
|
-
onMouseEnter:
|
|
3574
|
-
onMouseLeave:
|
|
3575
|
-
onClick:
|
|
3699
|
+
onMouseEnter: W,
|
|
3700
|
+
onMouseLeave: H,
|
|
3701
|
+
onClick: b,
|
|
3576
3702
|
children: /* @__PURE__ */ Z("div", { className: "video-card-container", children: [
|
|
3577
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ $(
|
|
3578
3704
|
"video",
|
|
3579
3705
|
{
|
|
3580
3706
|
ref: a,
|
|
3581
3707
|
src: t,
|
|
3582
|
-
poster:
|
|
3708
|
+
poster: c,
|
|
3583
3709
|
preload: "metadata",
|
|
3584
3710
|
onLoadedData: ee,
|
|
3585
3711
|
onPlay: re,
|
|
3586
|
-
onPause:
|
|
3587
|
-
onEnded:
|
|
3712
|
+
onPause: d,
|
|
3713
|
+
onEnded: p,
|
|
3588
3714
|
muted: !0,
|
|
3589
3715
|
loop: !0
|
|
3590
3716
|
}
|
|
3591
3717
|
),
|
|
3592
|
-
|
|
3718
|
+
T && /* @__PURE__ */ $(
|
|
3593
3719
|
"div",
|
|
3594
3720
|
{
|
|
3595
|
-
className: `video-play-button ${
|
|
3721
|
+
className: `video-play-button ${v ? "hovered" : ""}`,
|
|
3596
3722
|
onClick: F,
|
|
3597
|
-
children:
|
|
3723
|
+
children: f ? /* @__PURE__ */ $(Et, { className: "play-icon" }) : /* @__PURE__ */ $($t, { className: "play-icon" })
|
|
3598
3724
|
}
|
|
3599
3725
|
),
|
|
3600
|
-
!V && /* @__PURE__ */
|
|
3726
|
+
!V && /* @__PURE__ */ $("div", { className: "video-loading-mask", children: /* @__PURE__ */ $("div", { className: "loading-spinner" }) })
|
|
3601
3727
|
] })
|
|
3602
3728
|
}
|
|
3603
3729
|
);
|
|
3604
3730
|
};
|
|
3605
|
-
|
|
3731
|
+
rt.__docgenInfo = {
|
|
3606
3732
|
displayName: "VideoCard",
|
|
3607
3733
|
description: "视频卡片组件,支持鼠标悬浮播放控制",
|
|
3608
3734
|
props: {
|
|
@@ -3703,11 +3829,11 @@ Je.__docgenInfo = {
|
|
|
3703
3829
|
}
|
|
3704
3830
|
}
|
|
3705
3831
|
};
|
|
3706
|
-
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 = ({
|
|
3707
3833
|
items: t,
|
|
3708
|
-
columns:
|
|
3709
|
-
gap:
|
|
3710
|
-
responsive:
|
|
3834
|
+
columns: c,
|
|
3835
|
+
gap: l = 0,
|
|
3836
|
+
responsive: s = !0,
|
|
3711
3837
|
breakpoints: u = {
|
|
3712
3838
|
xs: 1,
|
|
3713
3839
|
sm: 2,
|
|
@@ -3716,35 +3842,35 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3716
3842
|
xl: 5,
|
|
3717
3843
|
xxl: 6
|
|
3718
3844
|
},
|
|
3719
|
-
className:
|
|
3720
|
-
style:
|
|
3721
|
-
onClick:
|
|
3845
|
+
className: C,
|
|
3846
|
+
style: T,
|
|
3847
|
+
onClick: w
|
|
3722
3848
|
}) => {
|
|
3723
|
-
const
|
|
3724
|
-
if (!
|
|
3725
|
-
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;
|
|
3726
3852
|
const a = window.innerWidth;
|
|
3727
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;
|
|
3728
|
-
}, [
|
|
3729
|
-
if (!
|
|
3730
|
-
const a = e,
|
|
3731
|
-
t.forEach((
|
|
3732
|
-
const
|
|
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);
|
|
3733
3859
|
if (!F) return;
|
|
3734
|
-
const
|
|
3735
|
-
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;
|
|
3736
3862
|
});
|
|
3737
|
-
const V = Math.max(...
|
|
3738
|
-
|
|
3739
|
-
}, [t, e,
|
|
3863
|
+
const V = Math.max(...x);
|
|
3864
|
+
f.style.height = `${V}px`;
|
|
3865
|
+
}, [t, e, l]);
|
|
3740
3866
|
de(() => {
|
|
3741
3867
|
const a = () => {
|
|
3742
|
-
const
|
|
3743
|
-
|
|
3868
|
+
const f = i();
|
|
3869
|
+
f !== e && q(f);
|
|
3744
3870
|
};
|
|
3745
|
-
if (
|
|
3871
|
+
if (s)
|
|
3746
3872
|
return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
|
|
3747
|
-
}, [
|
|
3873
|
+
}, [s, i, e]), de(() => {
|
|
3748
3874
|
const a = setTimeout(() => {
|
|
3749
3875
|
r();
|
|
3750
3876
|
}, 100);
|
|
@@ -3753,34 +3879,34 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3753
3879
|
const n = ae(() => {
|
|
3754
3880
|
r();
|
|
3755
3881
|
}, [r]), o = ae((a) => {
|
|
3756
|
-
|
|
3757
|
-
}, [
|
|
3758
|
-
return /* @__PURE__ */
|
|
3882
|
+
w && w(a), a.onClick?.(a);
|
|
3883
|
+
}, [w]);
|
|
3884
|
+
return /* @__PURE__ */ $(
|
|
3759
3885
|
"div",
|
|
3760
3886
|
{
|
|
3761
|
-
ref:
|
|
3762
|
-
className: `waterfall-container ${
|
|
3887
|
+
ref: k,
|
|
3888
|
+
className: `waterfall-container ${C || ""}`,
|
|
3763
3889
|
style: {
|
|
3764
3890
|
position: "relative",
|
|
3765
3891
|
width: "100%",
|
|
3766
|
-
...
|
|
3892
|
+
...T
|
|
3767
3893
|
},
|
|
3768
|
-
children: t.map((a,
|
|
3769
|
-
const
|
|
3770
|
-
return /* @__PURE__ */
|
|
3894
|
+
children: t.map((a, f) => {
|
|
3895
|
+
const m = a.id || f, v = fn(a);
|
|
3896
|
+
return /* @__PURE__ */ $(
|
|
3771
3897
|
"div",
|
|
3772
3898
|
{
|
|
3773
|
-
ref: (
|
|
3774
|
-
|
|
3899
|
+
ref: (x) => {
|
|
3900
|
+
x ? y.current.set(m, x) : y.current.delete(m);
|
|
3775
3901
|
},
|
|
3776
3902
|
className: "waterfall-item",
|
|
3777
|
-
children:
|
|
3903
|
+
children: v === "video" ? /* @__PURE__ */ $("div", { style: {
|
|
3778
3904
|
width: "100%",
|
|
3779
3905
|
position: "relative",
|
|
3780
3906
|
paddingBottom: "56.25%",
|
|
3781
|
-
cursor:
|
|
3782
|
-
}, children: /* @__PURE__ */
|
|
3783
|
-
|
|
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,
|
|
3784
3910
|
{
|
|
3785
3911
|
src: a.url,
|
|
3786
3912
|
poster: a.poster,
|
|
@@ -3791,17 +3917,17 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3791
3917
|
autoPlayOnHover: !0,
|
|
3792
3918
|
showPlayButton: !1
|
|
3793
3919
|
}
|
|
3794
|
-
) }) }) : /* @__PURE__ */
|
|
3920
|
+
) }) }) : /* @__PURE__ */ $(
|
|
3795
3921
|
"div",
|
|
3796
3922
|
{
|
|
3797
3923
|
className: "waterfall-image-wrapper",
|
|
3798
3924
|
onClick: () => o(a),
|
|
3799
|
-
style: { cursor:
|
|
3800
|
-
children: /* @__PURE__ */
|
|
3925
|
+
style: { cursor: w || a.onClick ? "pointer" : "default" },
|
|
3926
|
+
children: /* @__PURE__ */ $(
|
|
3801
3927
|
"img",
|
|
3802
3928
|
{
|
|
3803
3929
|
src: a.url,
|
|
3804
|
-
alt: `瀑布流图片 ${
|
|
3930
|
+
alt: `瀑布流图片 ${f + 1}`,
|
|
3805
3931
|
className: "waterfall-image",
|
|
3806
3932
|
onLoad: n,
|
|
3807
3933
|
onError: n,
|
|
@@ -3811,13 +3937,13 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3811
3937
|
}
|
|
3812
3938
|
)
|
|
3813
3939
|
},
|
|
3814
|
-
|
|
3940
|
+
m
|
|
3815
3941
|
);
|
|
3816
3942
|
})
|
|
3817
3943
|
}
|
|
3818
3944
|
);
|
|
3819
3945
|
};
|
|
3820
|
-
|
|
3946
|
+
yn.__docgenInfo = {
|
|
3821
3947
|
displayName: "Waterfall",
|
|
3822
3948
|
description: "瀑布流布局组件,支持图片和视频混合展示",
|
|
3823
3949
|
props: {
|
|
@@ -3873,8 +3999,8 @@ Zt.__docgenInfo = {
|
|
|
3873
3999
|
}
|
|
3874
4000
|
}
|
|
3875
4001
|
};
|
|
3876
|
-
const
|
|
3877
|
-
algorithm:
|
|
4002
|
+
const kn = {
|
|
4003
|
+
algorithm: ht.defaultAlgorithm,
|
|
3878
4004
|
token: {
|
|
3879
4005
|
// 主色
|
|
3880
4006
|
colorPrimary: "#3b82f6",
|
|
@@ -3940,21 +4066,21 @@ const sn = {
|
|
|
3940
4066
|
}
|
|
3941
4067
|
};
|
|
3942
4068
|
export {
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
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
|
|
3959
4085
|
};
|
|
3960
4086
|
//# sourceMappingURL=index.es.js.map
|