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