bi-components-library 1.0.73 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1459 -1414
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +7 -7
- 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 L, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Button as
|
|
4
|
-
import { createFromIconfontCN as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as L, jsxs as ue, Fragment as Tn } from "react/jsx-runtime";
|
|
2
|
+
import Sn, { useState as oe, useRef as te, useMemo as qt, useCallback as ce, useEffect as fe, useLayoutEffect as Je } from "react";
|
|
3
|
+
import { Button as Pe, Card as At, Modal as Nn, Table as _t, Flex as Kt, Spin as qn, Empty as An, Select as gt, Form as pt, Input as tn, Space as _n, DatePicker as Ln, message as Mn, Dropdown as In, Tooltip as Dn, Progress as Bn, Pagination as Hn, theme as Pn } from "antd";
|
|
4
|
+
import { createFromIconfontCN as Vn, LeftOutlined as Rn, SearchOutlined as On, ReloadOutlined as Gn, InfoCircleOutlined as Fn, SendOutlined as zn, PauseCircleOutlined as Yn, PlayCircleOutlined as jn } from "@ant-design/icons";
|
|
5
|
+
import { createPortal as Lt } from "react-dom";
|
|
6
|
+
const Wn = ({
|
|
7
7
|
variant: t = "primary",
|
|
8
8
|
loading: y = !1,
|
|
9
9
|
children: s,
|
|
10
10
|
...o
|
|
11
11
|
}) => /* @__PURE__ */ L(
|
|
12
|
-
|
|
12
|
+
Pe,
|
|
13
13
|
{
|
|
14
14
|
...o,
|
|
15
15
|
type: ((T) => {
|
|
@@ -33,7 +33,7 @@ const Rn = ({
|
|
|
33
33
|
children: s
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
|
-
|
|
36
|
+
Wn.__docgenInfo = {
|
|
37
37
|
displayName: "Button",
|
|
38
38
|
description: "基础按钮,用于触发操作",
|
|
39
39
|
props: {
|
|
@@ -77,7 +77,7 @@ Rn.__docgenInfo = {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
const
|
|
80
|
+
const Un = ({
|
|
81
81
|
title: t,
|
|
82
82
|
children: y,
|
|
83
83
|
bordered: s = !0,
|
|
@@ -85,7 +85,7 @@ const On = ({
|
|
|
85
85
|
size: b = "default",
|
|
86
86
|
...T
|
|
87
87
|
}) => /* @__PURE__ */ L(
|
|
88
|
-
|
|
88
|
+
At,
|
|
89
89
|
{
|
|
90
90
|
...T,
|
|
91
91
|
title: t,
|
|
@@ -95,7 +95,7 @@ const On = ({
|
|
|
95
95
|
children: y
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
|
-
|
|
98
|
+
Un.__docgenInfo = {
|
|
99
99
|
displayName: "Card",
|
|
100
100
|
description: "卡片容器,用于分组内容",
|
|
101
101
|
props: {
|
|
@@ -146,23 +146,23 @@ On.__docgenInfo = {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
const
|
|
149
|
+
const Kn = ({
|
|
150
150
|
showDefaultFooter: t = !0,
|
|
151
151
|
...y
|
|
152
152
|
}) => {
|
|
153
|
-
const s = y.footer !== void 0 ? y.footer : t ? (o, { OkBtn: b, CancelBtn: T }) => /* @__PURE__ */
|
|
153
|
+
const s = y.footer !== void 0 ? y.footer : t ? (o, { OkBtn: b, CancelBtn: T }) => /* @__PURE__ */ ue(Tn, { children: [
|
|
154
154
|
/* @__PURE__ */ L(b, {}),
|
|
155
155
|
/* @__PURE__ */ L(T, {})
|
|
156
156
|
] }) : null;
|
|
157
157
|
return /* @__PURE__ */ L(
|
|
158
|
-
|
|
158
|
+
Nn,
|
|
159
159
|
{
|
|
160
160
|
...y,
|
|
161
161
|
footer: s
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
164
|
};
|
|
165
|
-
|
|
165
|
+
Kn.__docgenInfo = {
|
|
166
166
|
displayName: "AppModal",
|
|
167
167
|
description: "应用级模态框组件,基于 Ant Design Modal 封装",
|
|
168
168
|
props: {
|
|
@@ -223,13 +223,13 @@ Gn.__docgenInfo = {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
const
|
|
226
|
+
const Xn = ({
|
|
227
227
|
scrollX: t,
|
|
228
228
|
showPagination: y = !0,
|
|
229
229
|
defaultPageSize: s = 10,
|
|
230
230
|
...o
|
|
231
231
|
}) => /* @__PURE__ */ L(
|
|
232
|
-
|
|
232
|
+
_t,
|
|
233
233
|
{
|
|
234
234
|
...o,
|
|
235
235
|
scroll: {
|
|
@@ -245,7 +245,7 @@ const Fn = ({
|
|
|
245
245
|
} : !1
|
|
246
246
|
}
|
|
247
247
|
);
|
|
248
|
-
|
|
248
|
+
Xn.__docgenInfo = {
|
|
249
249
|
displayName: "PageTable",
|
|
250
250
|
description: "页面级表格组件,高度铺满容器,自动滚动",
|
|
251
251
|
props: {
|
|
@@ -295,9 +295,9 @@ Fn.__docgenInfo = {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
|
-
const
|
|
298
|
+
const Jn = Vn({
|
|
299
299
|
scriptUrl: ["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]
|
|
300
|
-
}),
|
|
300
|
+
}), Qn = ({
|
|
301
301
|
name: t,
|
|
302
302
|
size: y,
|
|
303
303
|
color: s,
|
|
@@ -310,7 +310,7 @@ const zn = Ln({
|
|
|
310
310
|
...o
|
|
311
311
|
};
|
|
312
312
|
return /* @__PURE__ */ L(
|
|
313
|
-
|
|
313
|
+
Jn,
|
|
314
314
|
{
|
|
315
315
|
...b,
|
|
316
316
|
type: t,
|
|
@@ -318,7 +318,7 @@ const zn = Ln({
|
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
320
|
};
|
|
321
|
-
|
|
321
|
+
Qn.__docgenInfo = {
|
|
322
322
|
displayName: "XcIcon",
|
|
323
323
|
description: "自定义图标组件,基于 iconfont",
|
|
324
324
|
props: {
|
|
@@ -354,33 +354,33 @@ Yn.__docgenInfo = {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
|
-
const
|
|
357
|
+
const Zn = ({
|
|
358
358
|
loading: t,
|
|
359
359
|
description: y = "暂无数据",
|
|
360
360
|
className: s,
|
|
361
361
|
emptyChildren: o,
|
|
362
362
|
loadingText: b,
|
|
363
363
|
emptyImage: T
|
|
364
|
-
}) => t ? /* @__PURE__ */
|
|
365
|
-
|
|
364
|
+
}) => t ? /* @__PURE__ */ ue(
|
|
365
|
+
Kt,
|
|
366
366
|
{
|
|
367
367
|
className: `pt-10 w-full ${s || ""}`,
|
|
368
368
|
align: "center",
|
|
369
369
|
justify: "center",
|
|
370
370
|
vertical: !0,
|
|
371
371
|
children: [
|
|
372
|
-
/* @__PURE__ */ L(
|
|
372
|
+
/* @__PURE__ */ L(qn, { size: "large" }),
|
|
373
373
|
b && /* @__PURE__ */ L("div", { className: "mt-4 text-gray-500", children: b })
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
376
|
) : /* @__PURE__ */ L(
|
|
377
|
-
|
|
377
|
+
Kt,
|
|
378
378
|
{
|
|
379
379
|
className: `pt-10 w-full ${s || ""}`,
|
|
380
380
|
align: "center",
|
|
381
381
|
justify: "center",
|
|
382
382
|
children: /* @__PURE__ */ L(
|
|
383
|
-
|
|
383
|
+
An,
|
|
384
384
|
{
|
|
385
385
|
image: T,
|
|
386
386
|
description: y,
|
|
@@ -390,7 +390,7 @@ const jn = ({
|
|
|
390
390
|
)
|
|
391
391
|
}
|
|
392
392
|
);
|
|
393
|
-
|
|
393
|
+
Zn.__docgenInfo = {
|
|
394
394
|
displayName: "EmptyAndSpin",
|
|
395
395
|
description: "空状态和加载状态组合组件",
|
|
396
396
|
props: {
|
|
@@ -433,24 +433,24 @@ jn.__docgenInfo = {
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
|
-
const
|
|
436
|
+
const er = ({
|
|
437
437
|
onClick: t,
|
|
438
438
|
showText: y = !1,
|
|
439
439
|
className: s,
|
|
440
440
|
size: o = "small",
|
|
441
441
|
type: b = "default"
|
|
442
442
|
}) => /* @__PURE__ */ L(
|
|
443
|
-
|
|
443
|
+
Pe,
|
|
444
444
|
{
|
|
445
445
|
size: o,
|
|
446
446
|
type: b,
|
|
447
|
-
icon: /* @__PURE__ */ L(
|
|
447
|
+
icon: /* @__PURE__ */ L(Rn, {}),
|
|
448
448
|
className: `cursor-pointer ${s || ""}`,
|
|
449
449
|
onClick: t,
|
|
450
450
|
children: y && "返回"
|
|
451
451
|
}
|
|
452
452
|
);
|
|
453
|
-
|
|
453
|
+
er.__docgenInfo = {
|
|
454
454
|
displayName: "BackButton",
|
|
455
455
|
description: "返回按钮组件",
|
|
456
456
|
props: {
|
|
@@ -489,14 +489,14 @@ Wn.__docgenInfo = {
|
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
|
-
const
|
|
492
|
+
const tr = ({
|
|
493
493
|
removePadding: t = !0,
|
|
494
494
|
className: y,
|
|
495
495
|
...s
|
|
496
496
|
}) => {
|
|
497
497
|
const o = t ? `px-0 h-auto ${y || ""}` : y;
|
|
498
498
|
return /* @__PURE__ */ L(
|
|
499
|
-
|
|
499
|
+
Pe,
|
|
500
500
|
{
|
|
501
501
|
type: "link",
|
|
502
502
|
...s,
|
|
@@ -505,7 +505,7 @@ const Un = ({
|
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
};
|
|
508
|
-
|
|
508
|
+
tr.__docgenInfo = {
|
|
509
509
|
displayName: "LinkButton",
|
|
510
510
|
description: "链接样式按钮组件,适用于表格操作列",
|
|
511
511
|
props: {
|
|
@@ -542,7 +542,7 @@ Un.__docgenInfo = {
|
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
|
-
const { Option:
|
|
545
|
+
const { Option: nr } = gt, rr = ({
|
|
546
546
|
columns: t,
|
|
547
547
|
request: y,
|
|
548
548
|
searchFields: s = [],
|
|
@@ -552,119 +552,119 @@ const { Option: Kn } = dt, Xn = ({
|
|
|
552
552
|
pageSizeOptions: I = ["10", "20", "50", "100"],
|
|
553
553
|
autoLoad: A = !0,
|
|
554
554
|
externalParams: $ = {},
|
|
555
|
-
...
|
|
555
|
+
...E
|
|
556
556
|
}) => {
|
|
557
|
-
const [
|
|
557
|
+
const [S, w] = oe([]), [V, k] = oe(!1), [e, n] = oe({
|
|
558
558
|
current: 1,
|
|
559
559
|
pageSize: T,
|
|
560
560
|
total: 0
|
|
561
|
-
}), [r,
|
|
561
|
+
}), [r, u] = oe({}), [d, D] = oe({}), [C] = pt.useForm(), F = te(e);
|
|
562
562
|
F.current = e;
|
|
563
563
|
const Y = te($);
|
|
564
564
|
Y.current = $;
|
|
565
|
-
const z = te(!1), O =
|
|
566
|
-
const { sortable:
|
|
565
|
+
const z = te(!1), O = qt(() => t.map((p) => {
|
|
566
|
+
const { sortable: c, render: v, ...P } = p;
|
|
567
567
|
return {
|
|
568
|
-
...
|
|
569
|
-
sorter:
|
|
568
|
+
...P,
|
|
569
|
+
sorter: c ? !0 : void 0,
|
|
570
570
|
render: v || ((B) => B)
|
|
571
571
|
};
|
|
572
|
-
}), [t]),
|
|
572
|
+
}), [t]), _ = ce(async (p = {}) => {
|
|
573
573
|
if (y) {
|
|
574
574
|
k(!0);
|
|
575
575
|
try {
|
|
576
|
-
const
|
|
576
|
+
const c = {
|
|
577
577
|
page: F.current.current,
|
|
578
578
|
pageSize: F.current.pageSize,
|
|
579
|
-
sortField:
|
|
580
|
-
sortOrder:
|
|
579
|
+
sortField: d.field,
|
|
580
|
+
sortOrder: d.order,
|
|
581
581
|
searchParams: { ...r, ...Y.current },
|
|
582
|
-
...
|
|
583
|
-
}, v = await y(
|
|
584
|
-
v.success && (w(v.data), n((
|
|
585
|
-
...
|
|
582
|
+
...p
|
|
583
|
+
}, v = await y(c);
|
|
584
|
+
v.success && (w(v.data), n((P) => ({
|
|
585
|
+
...P,
|
|
586
586
|
total: v.total,
|
|
587
|
-
current:
|
|
587
|
+
current: c.page || P.current
|
|
588
588
|
})));
|
|
589
|
-
} catch (
|
|
590
|
-
console.error("加载数据失败:",
|
|
589
|
+
} catch (c) {
|
|
590
|
+
console.error("加载数据失败:", c);
|
|
591
591
|
} finally {
|
|
592
592
|
k(!1);
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
}, [y,
|
|
596
|
-
|
|
597
|
-
}, []),
|
|
598
|
-
|
|
599
|
-
}, [
|
|
600
|
-
|
|
601
|
-
}, [
|
|
602
|
-
const
|
|
603
|
-
current:
|
|
604
|
-
pageSize:
|
|
605
|
-
total:
|
|
595
|
+
}, [y, d, r]), G = ce((p) => {
|
|
596
|
+
u(p), n((c) => ({ ...c, current: 1 }));
|
|
597
|
+
}, []), M = ce(() => {
|
|
598
|
+
C.resetFields(), u({}), n((p) => ({ ...p, current: 1 }));
|
|
599
|
+
}, [C]), R = ce(() => {
|
|
600
|
+
_();
|
|
601
|
+
}, [_]), X = ce((p, c, v) => {
|
|
602
|
+
const P = {
|
|
603
|
+
current: p.current || 1,
|
|
604
|
+
pageSize: p.pageSize || T,
|
|
605
|
+
total: p.total || 0
|
|
606
606
|
}, B = {
|
|
607
607
|
field: v?.field,
|
|
608
608
|
order: v?.order
|
|
609
609
|
};
|
|
610
|
-
n(
|
|
610
|
+
n(P), D(B);
|
|
611
611
|
}, [T]);
|
|
612
|
-
return
|
|
613
|
-
const
|
|
614
|
-
(A && !z.current ||
|
|
615
|
-
}, [A, $,
|
|
616
|
-
o && s.length > 0 && /* @__PURE__ */ L(
|
|
617
|
-
|
|
612
|
+
return fe(() => {
|
|
613
|
+
const p = Object.keys($).length > 0;
|
|
614
|
+
(A && !z.current || p) && (_(), z.current = !0);
|
|
615
|
+
}, [A, $, _]), /* @__PURE__ */ ue("div", { children: [
|
|
616
|
+
o && s.length > 0 && /* @__PURE__ */ L(At, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ ue(
|
|
617
|
+
pt,
|
|
618
618
|
{
|
|
619
|
-
form:
|
|
619
|
+
form: C,
|
|
620
620
|
layout: "inline",
|
|
621
621
|
onFinish: G,
|
|
622
|
-
initialValues: s.reduce((
|
|
622
|
+
initialValues: s.reduce((p, c) => (c.defaultValue !== void 0 && (p[c.key] = c.defaultValue), p), {}),
|
|
623
623
|
children: [
|
|
624
|
-
s.map((
|
|
625
|
-
|
|
624
|
+
s.map((p) => /* @__PURE__ */ L(pt.Item, { name: p.key, label: p.label, children: p.type === "input" ? /* @__PURE__ */ L(
|
|
625
|
+
tn,
|
|
626
626
|
{
|
|
627
|
-
placeholder:
|
|
627
|
+
placeholder: p.placeholder || `请输入${p.label}`,
|
|
628
628
|
style: { width: 200 }
|
|
629
629
|
}
|
|
630
630
|
) : /* @__PURE__ */ L(
|
|
631
|
-
|
|
631
|
+
gt,
|
|
632
632
|
{
|
|
633
|
-
placeholder:
|
|
633
|
+
placeholder: p.placeholder || `请选择${p.label}`,
|
|
634
634
|
style: { width: 200 },
|
|
635
635
|
allowClear: !0,
|
|
636
|
-
children:
|
|
636
|
+
children: p.options?.map((c) => /* @__PURE__ */ L(nr, { value: c.value, children: c.label }, c.value))
|
|
637
637
|
}
|
|
638
|
-
) },
|
|
639
|
-
/* @__PURE__ */ L(
|
|
640
|
-
/* @__PURE__ */ L(
|
|
641
|
-
/* @__PURE__ */ L(
|
|
642
|
-
b && /* @__PURE__ */ L(
|
|
638
|
+
) }, p.key)),
|
|
639
|
+
/* @__PURE__ */ L(pt.Item, { children: /* @__PURE__ */ ue(_n, { children: [
|
|
640
|
+
/* @__PURE__ */ L(Pe, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ L(On, {}), children: "查询" }),
|
|
641
|
+
/* @__PURE__ */ L(Pe, { onClick: M, children: "重置" }),
|
|
642
|
+
b && /* @__PURE__ */ L(Pe, { icon: /* @__PURE__ */ L(Gn, {}), onClick: R, children: "刷新" })
|
|
643
643
|
] }) })
|
|
644
644
|
]
|
|
645
645
|
}
|
|
646
646
|
) }),
|
|
647
647
|
/* @__PURE__ */ L(
|
|
648
|
-
|
|
648
|
+
_t,
|
|
649
649
|
{
|
|
650
|
-
...
|
|
650
|
+
...E,
|
|
651
651
|
columns: O,
|
|
652
|
-
dataSource:
|
|
653
|
-
loading:
|
|
652
|
+
dataSource: S,
|
|
653
|
+
loading: V,
|
|
654
654
|
pagination: {
|
|
655
655
|
...e,
|
|
656
656
|
showSizeChanger: !0,
|
|
657
657
|
showQuickJumper: !0,
|
|
658
|
-
showTotal: (
|
|
658
|
+
showTotal: (p, c) => `第 ${c[0]}-${c[1]} 条/共 ${p} 条`,
|
|
659
659
|
pageSizeOptions: I
|
|
660
660
|
},
|
|
661
|
-
onChange:
|
|
661
|
+
onChange: X,
|
|
662
662
|
scroll: { x: "max-content", y: "50vh" }
|
|
663
663
|
}
|
|
664
664
|
)
|
|
665
665
|
] });
|
|
666
666
|
};
|
|
667
|
-
|
|
667
|
+
rr.__docgenInfo = {
|
|
668
668
|
displayName: "AdvancedTable",
|
|
669
669
|
description: "高阶表格组件,支持异步请求、搜索、排序等功能",
|
|
670
670
|
props: {
|
|
@@ -731,7 +731,7 @@ Xn.__docgenInfo = {
|
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
733
|
};
|
|
734
|
-
function
|
|
734
|
+
function St(t, y, s) {
|
|
735
735
|
if (!t.current) return;
|
|
736
736
|
const o = /* @__PURE__ */ new Set(), b = {};
|
|
737
737
|
for (const w of y)
|
|
@@ -743,17 +743,17 @@ function wt(t, y, s) {
|
|
|
743
743
|
const T = {};
|
|
744
744
|
for (const w of o) {
|
|
745
745
|
T[w] = !1;
|
|
746
|
-
for (const
|
|
747
|
-
if (
|
|
748
|
-
if (s[
|
|
746
|
+
for (const V of b[w])
|
|
747
|
+
if (V.type === "upload" && V.key) {
|
|
748
|
+
if (s[V.key] !== null && s[V.key] !== void 0) {
|
|
749
749
|
T[w] = !0;
|
|
750
750
|
break;
|
|
751
751
|
}
|
|
752
|
-
} else if ((
|
|
753
|
-
const k =
|
|
754
|
-
`[data-type="variable"][data-multi-key="${
|
|
752
|
+
} else if ((V.type === "variable" || V.type === "multi-variable") && V.key) {
|
|
753
|
+
const k = V.type === "multi-variable" ? t.current.querySelectorAll(
|
|
754
|
+
`[data-type="variable"][data-multi-key="${V.key}"]`
|
|
755
755
|
) : [t.current.querySelector(
|
|
756
|
-
`[data-type="variable"][data-key="${
|
|
756
|
+
`[data-type="variable"][data-key="${V.key}"]`
|
|
757
757
|
)].filter(Boolean);
|
|
758
758
|
for (const e of k)
|
|
759
759
|
if (!e.classList.contains("show-placeholder") && e.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
@@ -767,23 +767,23 @@ function wt(t, y, s) {
|
|
|
767
767
|
const I = y.some((w) => w.exclusionGroup === "separator"), $ = Object.keys(T).filter(
|
|
768
768
|
(w) => T[w]
|
|
769
769
|
).length > 0;
|
|
770
|
-
let
|
|
770
|
+
let E = null;
|
|
771
771
|
if ($ && I) {
|
|
772
772
|
for (const w of y)
|
|
773
773
|
if (w.exclusionGroup && w.exclusionGroup !== "separator" && T[w.exclusionGroup]) {
|
|
774
|
-
|
|
774
|
+
E = w.exclusionGroup;
|
|
775
775
|
break;
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
for (const w of o) {
|
|
779
|
-
const
|
|
779
|
+
const V = t.current.querySelectorAll(
|
|
780
780
|
`[data-group="${w}"]`
|
|
781
781
|
);
|
|
782
|
-
I && $ &&
|
|
782
|
+
I && $ && E ? w === E ? V.forEach((k) => {
|
|
783
783
|
k.closest('[data-rte-force-hidden="1"]') || (k.classList.contains("required-upload-group") ? k.style.setProperty("display", "inline-flex", "important") : (k.classList.contains("exclusion-wrapper"), k.style.setProperty("display", "inline-block", "important")));
|
|
784
|
-
}) :
|
|
784
|
+
}) : V.forEach((k) => {
|
|
785
785
|
k.closest('[data-rte-force-hidden="1"]') || (k.style.display = "none", k.style.setProperty("display", "none", "important"));
|
|
786
|
-
}) :
|
|
786
|
+
}) : V.forEach((k) => {
|
|
787
787
|
k.closest('[data-rte-force-hidden="1"]') || (k.classList.contains("required-upload-group") ? k.style.setProperty("display", "inline-flex", "important") : (k.classList.contains("exclusion-wrapper"), k.style.setProperty("display", "inline-block", "important")));
|
|
788
788
|
});
|
|
789
789
|
}
|
|
@@ -793,7 +793,7 @@ function wt(t, y, s) {
|
|
|
793
793
|
w.style.display = $ ? "none" : "inline";
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Nt(t, y, s, o) {
|
|
797
797
|
if (!t.current) {
|
|
798
798
|
o(!1);
|
|
799
799
|
return;
|
|
@@ -801,16 +801,16 @@ function kt(t, y, s, o) {
|
|
|
801
801
|
const b = (e) => {
|
|
802
802
|
if ((e.getAttribute("data-node-type") || "") !== "report-module")
|
|
803
803
|
return (e.textContent || "").replace(/[\u200B]/g, "").trim();
|
|
804
|
-
const r = (e.textContent || "").replace(/[\u200B]/g, "").trim(),
|
|
805
|
-
if (
|
|
804
|
+
const r = (e.textContent || "").replace(/[\u200B]/g, "").trim(), u = Array.from(e.querySelectorAll(":scope > div"));
|
|
805
|
+
if (u.length === 0)
|
|
806
806
|
return r;
|
|
807
|
-
let
|
|
808
|
-
for (let F = 0; F <
|
|
809
|
-
if ((
|
|
810
|
-
|
|
807
|
+
let d = -1;
|
|
808
|
+
for (let F = 0; F < u.length; F++)
|
|
809
|
+
if ((u[F].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
|
|
810
|
+
d = F;
|
|
811
811
|
break;
|
|
812
812
|
}
|
|
813
|
-
return
|
|
813
|
+
return u.filter((F, Y) => Y !== d).map((F) => (F.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
|
|
814
814
|
`).trim() || r;
|
|
815
815
|
}, T = (e) => e ? !!e.closest('[data-rte-force-hidden="1"]') : !1, I = [];
|
|
816
816
|
for (let e = 0; e < y.length; e++) {
|
|
@@ -829,12 +829,12 @@ function kt(t, y, s, o) {
|
|
|
829
829
|
if (n.type === "text" && n.className?.includes("rte-text-required"))
|
|
830
830
|
if (n.exclusionGroup)
|
|
831
831
|
for (let r = e + 1; r < y.length; r++) {
|
|
832
|
-
const
|
|
833
|
-
if (
|
|
832
|
+
const u = y[r];
|
|
833
|
+
if (u.exclusionGroup === n.exclusionGroup && (u.type === "variable" || u.type === "upload" || u.type === "select" || u.type === "textarea" || u.type === "richtext" || u.type === "datepicker") && u.key) {
|
|
834
834
|
I.push({
|
|
835
835
|
exclusionGroup: n.exclusionGroup,
|
|
836
|
-
key:
|
|
837
|
-
type:
|
|
836
|
+
key: u.key,
|
|
837
|
+
type: u.type,
|
|
838
838
|
__index: r
|
|
839
839
|
});
|
|
840
840
|
break;
|
|
@@ -842,12 +842,12 @@ function kt(t, y, s, o) {
|
|
|
842
842
|
}
|
|
843
843
|
else
|
|
844
844
|
for (let r = e + 1; r < y.length; r++) {
|
|
845
|
-
const
|
|
846
|
-
if ((
|
|
845
|
+
const u = y[r];
|
|
846
|
+
if ((u.type === "variable" || u.type === "upload" || u.type === "select" || u.type === "textarea" || u.type === "richtext" || u.type === "datepicker") && u.key) {
|
|
847
847
|
I.push({
|
|
848
|
-
exclusionGroup:
|
|
849
|
-
key:
|
|
850
|
-
type:
|
|
848
|
+
exclusionGroup: u.exclusionGroup || "",
|
|
849
|
+
key: u.key,
|
|
850
|
+
type: u.type,
|
|
851
851
|
__index: r
|
|
852
852
|
});
|
|
853
853
|
break;
|
|
@@ -861,8 +861,8 @@ function kt(t, y, s, o) {
|
|
|
861
861
|
n.exclusionGroup === "separator" && e.push(r);
|
|
862
862
|
});
|
|
863
863
|
for (const n of e) {
|
|
864
|
-
const
|
|
865
|
-
|
|
864
|
+
const u = I.filter((C) => typeof C.__index == "number" && C.__index < n).sort((C, F) => (F.__index ?? 0) - (C.__index ?? 0))[0], D = I.filter((C) => typeof C.__index == "number" && C.__index > n).sort((C, F) => (C.__index ?? 0) - (F.__index ?? 0))[0];
|
|
865
|
+
u && D && $.push([u, D]);
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
if (I.length === 0) {
|
|
@@ -878,7 +878,7 @@ function kt(t, y, s, o) {
|
|
|
878
878
|
o(!0);
|
|
879
879
|
return;
|
|
880
880
|
}
|
|
881
|
-
const
|
|
881
|
+
const E = I.filter((e) => {
|
|
882
882
|
if (!t.current) return !1;
|
|
883
883
|
if (e.exclusionGroup) {
|
|
884
884
|
const n = t.current.querySelectorAll(
|
|
@@ -901,8 +901,8 @@ function kt(t, y, s, o) {
|
|
|
901
901
|
`[data-type="variable"][data-multi-key="${e.key}"]`
|
|
902
902
|
);
|
|
903
903
|
if (n.length > 0) {
|
|
904
|
-
const r = n[0],
|
|
905
|
-
return T(
|
|
904
|
+
const r = n[0], u = r.closest("[data-group]") || r.parentElement;
|
|
905
|
+
return T(u) ? !0 : u ? u.style.display !== "none" : !0;
|
|
906
906
|
}
|
|
907
907
|
} else {
|
|
908
908
|
const n = t.current.querySelector(
|
|
@@ -948,30 +948,30 @@ function kt(t, y, s, o) {
|
|
|
948
948
|
}
|
|
949
949
|
return !1;
|
|
950
950
|
});
|
|
951
|
-
if (
|
|
951
|
+
if (E.length === 0) {
|
|
952
952
|
o(!0);
|
|
953
953
|
return;
|
|
954
954
|
}
|
|
955
|
-
const
|
|
955
|
+
const S = /* @__PURE__ */ new Set();
|
|
956
956
|
$.forEach((e) => {
|
|
957
957
|
e.forEach((n) => {
|
|
958
|
-
n.key &&
|
|
958
|
+
n.key && S.add(n.key);
|
|
959
959
|
});
|
|
960
960
|
});
|
|
961
|
-
const w =
|
|
962
|
-
(e) => !e.key || !
|
|
961
|
+
const w = E.filter(
|
|
962
|
+
(e) => !e.key || !S.has(e.key)
|
|
963
963
|
);
|
|
964
|
-
let
|
|
964
|
+
let V = ($.length === 0, !0);
|
|
965
965
|
for (const e of $) {
|
|
966
|
-
const n = e.filter((
|
|
966
|
+
const n = e.filter((u) => {
|
|
967
967
|
if (!t.current) return !1;
|
|
968
|
-
if (
|
|
969
|
-
const
|
|
970
|
-
`[data-group="${
|
|
968
|
+
if (u.exclusionGroup) {
|
|
969
|
+
const d = t.current.querySelectorAll(
|
|
970
|
+
`[data-group="${u.exclusionGroup}"]`
|
|
971
971
|
);
|
|
972
|
-
if (
|
|
973
|
-
const
|
|
974
|
-
return T(
|
|
972
|
+
if (d.length > 0) {
|
|
973
|
+
const D = d[0];
|
|
974
|
+
return T(D) ? !0 : D.style.display !== "none";
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
977
|
return !0;
|
|
@@ -979,91 +979,91 @@ function kt(t, y, s, o) {
|
|
|
979
979
|
if (n.length === 0)
|
|
980
980
|
continue;
|
|
981
981
|
let r = !1;
|
|
982
|
-
for (const
|
|
983
|
-
if (
|
|
984
|
-
if (
|
|
985
|
-
let
|
|
986
|
-
const
|
|
987
|
-
`[data-type="upload"][data-batch-key="${
|
|
982
|
+
for (const u of n)
|
|
983
|
+
if (u.type === "upload" && u.key) {
|
|
984
|
+
if (u.minCount && u.minCount > 0) {
|
|
985
|
+
let d = 0;
|
|
986
|
+
const D = t.current.querySelectorAll(
|
|
987
|
+
`[data-type="upload"][data-batch-key="${u.key}"]`
|
|
988
988
|
);
|
|
989
|
-
if (
|
|
989
|
+
if (D.length === 0)
|
|
990
990
|
continue;
|
|
991
|
-
for (let
|
|
992
|
-
const Y =
|
|
993
|
-
Y && s[Y] != null && (
|
|
991
|
+
for (let C = 0; C < D.length; C++) {
|
|
992
|
+
const Y = D[C].dataset.key;
|
|
993
|
+
Y && s[Y] != null && (d += 1);
|
|
994
994
|
}
|
|
995
|
-
if (
|
|
995
|
+
if (d >= u.minCount) {
|
|
996
996
|
r = !0;
|
|
997
997
|
break;
|
|
998
998
|
}
|
|
999
|
-
} else if (s[
|
|
999
|
+
} else if (s[u.key] !== null && s[u.key] !== void 0) {
|
|
1000
1000
|
r = !0;
|
|
1001
1001
|
break;
|
|
1002
1002
|
}
|
|
1003
|
-
} else if (
|
|
1004
|
-
if (
|
|
1005
|
-
const
|
|
1006
|
-
`[data-type="variable"][data-multi-key="${
|
|
1003
|
+
} else if (u.type === "variable" && u.key)
|
|
1004
|
+
if (u.isMultiVariable) {
|
|
1005
|
+
const d = t.current.querySelectorAll(
|
|
1006
|
+
`[data-type="variable"][data-multi-key="${u.key}"]`
|
|
1007
1007
|
);
|
|
1008
|
-
let
|
|
1009
|
-
for (const F of Array.from(
|
|
1008
|
+
let D = 0;
|
|
1009
|
+
for (const F of Array.from(d)) {
|
|
1010
1010
|
if (F.classList.contains("show-placeholder"))
|
|
1011
1011
|
continue;
|
|
1012
|
-
F.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (
|
|
1012
|
+
F.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (D += 1);
|
|
1013
1013
|
}
|
|
1014
|
-
const
|
|
1015
|
-
if (
|
|
1014
|
+
const C = u.minCount && u.minCount > 0 ? u.minCount : 1;
|
|
1015
|
+
if (D >= C) {
|
|
1016
1016
|
r = !0;
|
|
1017
1017
|
break;
|
|
1018
1018
|
}
|
|
1019
1019
|
} else {
|
|
1020
|
-
const
|
|
1021
|
-
`[data-type="variable"][data-key="${
|
|
1020
|
+
const d = t.current.querySelector(
|
|
1021
|
+
`[data-type="variable"][data-key="${u.key}"]`
|
|
1022
1022
|
);
|
|
1023
|
-
if (
|
|
1024
|
-
if (
|
|
1023
|
+
if (d) {
|
|
1024
|
+
if (d.classList.contains("show-placeholder"))
|
|
1025
1025
|
continue;
|
|
1026
|
-
if (
|
|
1026
|
+
if (d.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1027
1027
|
r = !0;
|
|
1028
1028
|
break;
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
else if (
|
|
1033
|
-
const
|
|
1034
|
-
`[data-type="select"][data-key="${
|
|
1032
|
+
else if (u.type === "select" && u.key) {
|
|
1033
|
+
const d = t.current.querySelector(
|
|
1034
|
+
`[data-type="select"][data-key="${u.key}"]`
|
|
1035
1035
|
);
|
|
1036
|
-
if (
|
|
1036
|
+
if (d && (d.getAttribute("data-value") || "").trim().length > 0) {
|
|
1037
1037
|
r = !0;
|
|
1038
1038
|
break;
|
|
1039
1039
|
}
|
|
1040
|
-
} else if (
|
|
1041
|
-
const
|
|
1042
|
-
`[data-type="textarea"][data-key="${
|
|
1040
|
+
} else if (u.type === "textarea" && u.key) {
|
|
1041
|
+
const d = t.current.querySelector(
|
|
1042
|
+
`[data-type="textarea"][data-key="${u.key}"]`
|
|
1043
1043
|
);
|
|
1044
|
-
if (
|
|
1044
|
+
if (d && (d.value || "").trim().length > 0) {
|
|
1045
1045
|
r = !0;
|
|
1046
1046
|
break;
|
|
1047
1047
|
}
|
|
1048
|
-
} else if (
|
|
1049
|
-
const
|
|
1050
|
-
`[data-type="richtext"][data-key="${
|
|
1048
|
+
} else if (u.type === "richtext" && u.key) {
|
|
1049
|
+
const d = t.current.querySelector(
|
|
1050
|
+
`[data-type="richtext"][data-key="${u.key}"]`
|
|
1051
1051
|
);
|
|
1052
|
-
if (
|
|
1052
|
+
if (d && b(d).length > 0) {
|
|
1053
1053
|
r = !0;
|
|
1054
1054
|
break;
|
|
1055
1055
|
}
|
|
1056
|
-
} else if (
|
|
1057
|
-
const
|
|
1058
|
-
`[data-type="datepicker"][data-key="${
|
|
1056
|
+
} else if (u.type === "datepicker" && u.key) {
|
|
1057
|
+
const d = t.current.querySelector(
|
|
1058
|
+
`[data-type="datepicker"][data-key="${u.key}"]`
|
|
1059
1059
|
);
|
|
1060
|
-
if (
|
|
1060
|
+
if (d && (d.getAttribute("data-value") || "").trim().length > 0) {
|
|
1061
1061
|
r = !0;
|
|
1062
1062
|
break;
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
if (!r) {
|
|
1066
|
-
|
|
1066
|
+
V = !1;
|
|
1067
1067
|
break;
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
@@ -1079,9 +1079,9 @@ function kt(t, y, s, o) {
|
|
|
1079
1079
|
k = !1;
|
|
1080
1080
|
break;
|
|
1081
1081
|
}
|
|
1082
|
-
for (let
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1082
|
+
for (let u = 0; u < r.length; u++) {
|
|
1083
|
+
const D = r[u].dataset.key;
|
|
1084
|
+
D && s[D] != null && (n += 1);
|
|
1085
1085
|
}
|
|
1086
1086
|
if (n < e.minCount) {
|
|
1087
1087
|
k = !1;
|
|
@@ -1097,13 +1097,13 @@ function kt(t, y, s, o) {
|
|
|
1097
1097
|
`[data-type="variable"][data-multi-key="${e.key}"]`
|
|
1098
1098
|
);
|
|
1099
1099
|
let r = 0;
|
|
1100
|
-
for (const
|
|
1101
|
-
if (
|
|
1100
|
+
for (const d of Array.from(n)) {
|
|
1101
|
+
if (d.classList.contains("show-placeholder"))
|
|
1102
1102
|
continue;
|
|
1103
|
-
|
|
1103
|
+
d.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (r += 1);
|
|
1104
1104
|
}
|
|
1105
|
-
const
|
|
1106
|
-
if (r <
|
|
1105
|
+
const u = e.minCount && e.minCount > 0 ? e.minCount : 1;
|
|
1106
|
+
if (r < u) {
|
|
1107
1107
|
k = !1;
|
|
1108
1108
|
break;
|
|
1109
1109
|
}
|
|
@@ -1157,49 +1157,49 @@ function kt(t, y, s, o) {
|
|
|
1157
1157
|
break;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
o(
|
|
1160
|
+
o(V && k);
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function Tt(t, y) {
|
|
1163
1163
|
if (!t.current) return;
|
|
1164
1164
|
t.current.querySelectorAll('[data-type="variable"]').forEach((o) => {
|
|
1165
1165
|
const b = o.innerText;
|
|
1166
1166
|
b.replace(/\u200B/g, "").trim().length === 0 ? (b !== "" && (o.innerText = ""), o.classList.add("show-placeholder")) : o.classList.remove("show-placeholder");
|
|
1167
1167
|
});
|
|
1168
1168
|
}
|
|
1169
|
-
const
|
|
1170
|
-
const s = t.dataset.key, o = t.dataset.placeholder, b = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", T = t.dataset.required === "true", I = t.dataset.value || "", A =
|
|
1169
|
+
const ar = ({ host: t, onChange: y }) => {
|
|
1170
|
+
const s = t.dataset.key, o = t.dataset.placeholder, b = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", T = t.dataset.required === "true", I = t.dataset.value || "", A = Sn.useMemo(() => {
|
|
1171
1171
|
try {
|
|
1172
1172
|
return JSON.parse(b);
|
|
1173
1173
|
} catch {
|
|
1174
1174
|
return [];
|
|
1175
1175
|
}
|
|
1176
|
-
}, [b]), [$,
|
|
1176
|
+
}, [b]), [$, E] = oe(I || void 0), [S, w] = oe(80), V = (e) => {
|
|
1177
1177
|
const r = document.createElement("canvas").getContext("2d");
|
|
1178
1178
|
return r ? (r.font = '14px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif', r.measureText(e).width) : e.length * 14;
|
|
1179
1179
|
};
|
|
1180
|
-
|
|
1181
|
-
const e = $ ? A.find((
|
|
1180
|
+
fe(() => {
|
|
1181
|
+
const e = $ ? A.find((u) => u.value === $)?.label || $ : o || "请选择", n = V(e), r = Math.max(64, Math.ceil(n + 40));
|
|
1182
1182
|
w(r);
|
|
1183
1183
|
}, [$, A, o]);
|
|
1184
1184
|
const k = (e) => {
|
|
1185
|
-
|
|
1185
|
+
E(e), t.setAttribute("data-value", e), y(s, e);
|
|
1186
1186
|
};
|
|
1187
|
-
return
|
|
1188
|
-
|
|
1189
|
-
}, [I]),
|
|
1187
|
+
return fe(() => {
|
|
1188
|
+
E(I || void 0);
|
|
1189
|
+
}, [I]), Lt(
|
|
1190
1190
|
/* @__PURE__ */ L(
|
|
1191
1191
|
"div",
|
|
1192
1192
|
{
|
|
1193
1193
|
className: "rte-select-wrapper",
|
|
1194
1194
|
contentEditable: !1,
|
|
1195
|
-
style: { display: "inline-block", minWidth:
|
|
1195
|
+
style: { display: "inline-block", minWidth: S, width: S },
|
|
1196
1196
|
children: /* @__PURE__ */ L(
|
|
1197
|
-
|
|
1197
|
+
gt,
|
|
1198
1198
|
{
|
|
1199
1199
|
value: $,
|
|
1200
1200
|
onChange: k,
|
|
1201
1201
|
placeholder: o || "请选择",
|
|
1202
|
-
style: { width: "100%", minWidth:
|
|
1202
|
+
style: { width: "100%", minWidth: S },
|
|
1203
1203
|
options: A,
|
|
1204
1204
|
allowClear: !T,
|
|
1205
1205
|
size: "small",
|
|
@@ -1213,28 +1213,28 @@ const Jn = ({ host: t, onChange: y }) => {
|
|
|
1213
1213
|
),
|
|
1214
1214
|
t
|
|
1215
1215
|
);
|
|
1216
|
-
},
|
|
1217
|
-
const [y, s] =
|
|
1218
|
-
return
|
|
1216
|
+
}, or = (t) => {
|
|
1217
|
+
const [y, s] = oe([]);
|
|
1218
|
+
return fe(() => {
|
|
1219
1219
|
const o = t.current;
|
|
1220
1220
|
if (!o) return;
|
|
1221
1221
|
const b = () => {
|
|
1222
1222
|
const I = o.querySelectorAll(".rte-select-host"), A = [];
|
|
1223
1223
|
I.forEach(($) => {
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1224
|
+
const E = $.getAttribute("data-key");
|
|
1225
|
+
E && A.push(
|
|
1226
1226
|
/* @__PURE__ */ L(
|
|
1227
|
-
|
|
1227
|
+
ar,
|
|
1228
1228
|
{
|
|
1229
1229
|
host: $,
|
|
1230
1230
|
onChange: () => {
|
|
1231
1231
|
if (t.current) {
|
|
1232
|
-
const
|
|
1233
|
-
t.current.dispatchEvent(
|
|
1232
|
+
const S = new Event("input", { bubbles: !0 });
|
|
1233
|
+
t.current.dispatchEvent(S);
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
1236
|
},
|
|
1237
|
-
`select-${
|
|
1237
|
+
`select-${E}`
|
|
1238
1238
|
)
|
|
1239
1239
|
);
|
|
1240
1240
|
}), s(A);
|
|
@@ -1244,18 +1244,18 @@ const Jn = ({ host: t, onChange: y }) => {
|
|
|
1244
1244
|
let A = !1;
|
|
1245
1245
|
for (const $ of I)
|
|
1246
1246
|
if ($.type === "childList") {
|
|
1247
|
-
let
|
|
1248
|
-
if ($.addedNodes.forEach((
|
|
1249
|
-
if (
|
|
1250
|
-
const w =
|
|
1251
|
-
(w.classList?.contains("rte-select-host") || w.querySelector?.(".rte-select-host")) && (
|
|
1247
|
+
let E = !1;
|
|
1248
|
+
if ($.addedNodes.forEach((S) => {
|
|
1249
|
+
if (S.nodeType === Node.ELEMENT_NODE) {
|
|
1250
|
+
const w = S;
|
|
1251
|
+
(w.classList?.contains("rte-select-host") || w.querySelector?.(".rte-select-host")) && (E = !0);
|
|
1252
1252
|
}
|
|
1253
|
-
}), $.removedNodes.forEach((
|
|
1254
|
-
if (
|
|
1255
|
-
const w =
|
|
1256
|
-
(w.classList?.contains("rte-select-host") || w.querySelector?.(".rte-select-host")) && (
|
|
1253
|
+
}), $.removedNodes.forEach((S) => {
|
|
1254
|
+
if (S.nodeType === Node.ELEMENT_NODE) {
|
|
1255
|
+
const w = S;
|
|
1256
|
+
(w.classList?.contains("rte-select-host") || w.querySelector?.(".rte-select-host")) && (E = !0);
|
|
1257
1257
|
}
|
|
1258
|
-
}),
|
|
1258
|
+
}), E) {
|
|
1259
1259
|
A = !0;
|
|
1260
1260
|
break;
|
|
1261
1261
|
}
|
|
@@ -1264,142 +1264,142 @@ const Jn = ({ host: t, onChange: y }) => {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
return T.observe(o, { childList: !0, subtree: !0 }), () => T.disconnect();
|
|
1266
1266
|
}, [t]), y;
|
|
1267
|
-
},
|
|
1268
|
-
function
|
|
1267
|
+
}, ft = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1268
|
+
function sr(t, y, s, o, b, T = {}, I, A) {
|
|
1269
1269
|
if (!t.current) return;
|
|
1270
|
-
const $ = /[;;,,。.!!??::、]/,
|
|
1270
|
+
const $ = /[;;,,。.!!??::、]/, E = (e) => {
|
|
1271
1271
|
const n = (e ?? "").trim();
|
|
1272
1272
|
return n.length === 1 && $.test(n);
|
|
1273
|
-
},
|
|
1273
|
+
}, S = (e) => {
|
|
1274
1274
|
const n = e ?? "", r = n.match(new RegExp(`^\\s*(${$.source})`));
|
|
1275
1275
|
if (!r) return null;
|
|
1276
|
-
const
|
|
1277
|
-
return { punct:
|
|
1278
|
-
}, w = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`,
|
|
1276
|
+
const u = r[1], d = n.replace(new RegExp(`^\\s*${$.source}`), "");
|
|
1277
|
+
return { punct: u, rest: d };
|
|
1278
|
+
}, w = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`, V = [];
|
|
1279
1279
|
let k = 0;
|
|
1280
1280
|
for (; k < y.length; ) {
|
|
1281
1281
|
const e = y[k], n = k + 1 < y.length ? y[k + 1] : null;
|
|
1282
1282
|
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && n) {
|
|
1283
1283
|
const Y = n.type === "upload" && n.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === n.exclusionGroup, z = n.type === "variable" && n.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === n.exclusionGroup;
|
|
1284
1284
|
if (Y) {
|
|
1285
|
-
const O = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "",
|
|
1286
|
-
let
|
|
1287
|
-
e.className ?
|
|
1288
|
-
const R = n,
|
|
1289
|
-
let
|
|
1290
|
-
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1285
|
+
const O = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", _ = `<span ${O} class="exclusion-wrapper required-upload-group">`, G = "</span>";
|
|
1286
|
+
let M = "";
|
|
1287
|
+
e.className ? M = `<span class="${e.className}">${e.text ?? ""}</span>` : M = e.text ?? "";
|
|
1288
|
+
const R = n, X = s[R.key] !== null && s[R.key] !== void 0, p = X ? s[R.key] : null, c = X ? s[R.key]?.name : R.text, v = X ? "" : "hidden", P = R.tooltip && !X ? "" : "hidden", B = X ? "has-file" : "", j = X && c ? ` data-file-name="${c.replace(/"/g, """)}"` : "";
|
|
1289
|
+
let J = "";
|
|
1290
|
+
X && p ? p.type?.startsWith("image/") ? J = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(p)}" alt="preview" />` : J = "<i class='iconfont icon-exlwenjian'></i>" : J = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1291
|
+
const re = (R.text || "").trim(), de = X && re.length >= 12 ? `<span ${O} contenteditable="false" class="exclusion-wrapper upload-hint">${re}</span>` : "", ye = `<span contenteditable="false" data-type="upload" data-key="${R.key}" class="upload-chip"><span class="upload-inner-wrapper ${B}"><span class="upload-icon">${J}</span><span class="upload-label"${j}>${c || R.text}</span>${R.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${P}" data-upload-key="${R.key}" data-tooltip="${R.tooltip}"></i>` : ""}<span class="file-remove-btn ${v}" title="移除文件">×</span></span></span>`;
|
|
1292
|
+
V.push(_ + M + ye + G + de), k += 2;
|
|
1293
1293
|
continue;
|
|
1294
1294
|
}
|
|
1295
1295
|
if (z) {
|
|
1296
|
-
const
|
|
1297
|
-
let
|
|
1298
|
-
e.className ?
|
|
1299
|
-
const R = n,
|
|
1300
|
-
|
|
1296
|
+
const _ = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, G = "</span>";
|
|
1297
|
+
let M = "";
|
|
1298
|
+
e.className ? M = `<span class="${e.className}">${e.text ?? ""}</span>` : M = e.text ?? "";
|
|
1299
|
+
const R = n, p = (R.key ? b[R.key] : void 0) || R.text || "", c = !p, v = c ? "" : p, P = c ? "show-placeholder" : "", B = R.exclusionGroup ? ` data-group="${R.exclusionGroup}"` : "", j = R.tooltip ? ` data-tooltip="${R.tooltip.replace(/"/g, """)}" data-variable-key="${R.key || ""}"` : "", J = R.tooltip && c ? "" : "hidden", re = `<span contenteditable="true" data-type="variable" data-key="${R.key}" data-placeholder="${R.placeholder || ""}"${B}${j} class="variable-chip ${P}">${v}${R.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${J}" data-variable-key="${R.key}" data-tooltip="${R.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1300
|
+
V.push(_ + M + re + G), k += 2;
|
|
1301
1301
|
continue;
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
|
-
const
|
|
1305
|
-
let
|
|
1304
|
+
const u = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", d = e.exclusionGroup ? `<span ${u} class="exclusion-wrapper">` : "", D = e.exclusionGroup ? "</span>" : "";
|
|
1305
|
+
let C = "";
|
|
1306
1306
|
if (e.type === "tag") {
|
|
1307
|
-
const z = o || I === "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>', O = o ? ' data-locked="true"' : "",
|
|
1308
|
-
|
|
1307
|
+
const z = o || I === "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>', O = o ? ' data-locked="true"' : "", _ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-tag-key="${e.key || ""}"` : "";
|
|
1308
|
+
C = `<span contenteditable="false" class="tag-node group"${O}${_}><span class="tag-label">${e.text}</span>${z}</span>`;
|
|
1309
1309
|
} else if (e.type === "text") {
|
|
1310
1310
|
const Y = o ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', O = (e.text ?? "").replace(/\n/g, "<br/>");
|
|
1311
|
-
e.className ?
|
|
1311
|
+
e.className ? C = `<span data-type="text" class="${e.className}"${Y}>${O}</span>` : C = o ? `<span data-type="text"${Y}>${O}</span>` : `<span data-type="text" contenteditable="false">${O}</span>`;
|
|
1312
1312
|
} else if (e.type === "variable" && e.key) {
|
|
1313
|
-
const z = b[e.key] || e.text || "", O = !z,
|
|
1314
|
-
e.required ?
|
|
1313
|
+
const z = b[e.key] || e.text || "", O = !z, _ = O ? "" : z, G = O ? "show-placeholder" : "", M = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", R = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && O ? "" : "hidden", p = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${M}${R} class="variable-chip ${G}">${_}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1314
|
+
e.required ? C = `<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>` : C = p;
|
|
1315
1315
|
} else if (e.type === "report-url" && e.key) {
|
|
1316
|
-
const z = b[e.key] || e.text || "", O = !z,
|
|
1317
|
-
e.required ?
|
|
1316
|
+
const z = b[e.key] || e.text || "", O = !z, _ = O ? "" : z, G = O ? "show-placeholder" : "", M = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", R = e.tooltip ? ` data-tooltip="${ft(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && O ? "" : "hidden", p = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${ft(e.placeholder || "")}"${M}${R} class="variable-chip rte-report-url ${G}">${_}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${ft(e.tooltip)}" ></i>` : ""}</span>`;
|
|
1317
|
+
e.required ? C = `<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>` : C = p;
|
|
1318
1318
|
} else if (e.type === "upload" && e.key)
|
|
1319
1319
|
if (typeof e.maxCount == "number" && typeof e.minCount == "number" && e.maxCount > 1) {
|
|
1320
1320
|
const z = e.minCount || 1, O = e.maxCount || 3;
|
|
1321
|
-
let
|
|
1321
|
+
let _ = 0;
|
|
1322
1322
|
for (let R = 0; R < O; R++) {
|
|
1323
|
-
const
|
|
1324
|
-
s[
|
|
1323
|
+
const X = `${e.key}-${R}`;
|
|
1324
|
+
s[X] != null && (_ += 1);
|
|
1325
1325
|
}
|
|
1326
1326
|
const G = Math.min(
|
|
1327
1327
|
O,
|
|
1328
|
-
Math.max(z,
|
|
1328
|
+
Math.max(z, _ + (_ < O ? 1 : 0))
|
|
1329
1329
|
);
|
|
1330
|
-
let
|
|
1330
|
+
let M = "";
|
|
1331
1331
|
for (let R = 0; R < G; R++) {
|
|
1332
|
-
const
|
|
1333
|
-
let
|
|
1334
|
-
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1332
|
+
const X = `${e.key}-${R}`, p = s[X] !== null && s[X] !== void 0, c = p ? s[X] : null, v = p ? s[X]?.name : e.text, P = p ? "" : "hidden", B = e.tooltip && !p ? "" : "hidden", j = p ? "has-file" : "", J = p && v ? ` data-file-name="${v.replace(/"/g, """)}"` : "";
|
|
1333
|
+
let re = "";
|
|
1334
|
+
p && c ? c.type?.startsWith("image/") ? re = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(c)}" alt="preview" />` : re = "<i class='iconfont icon-exlwenjian'></i>" : re = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1335
|
+
const me = ` data-batch-key="${e.key}"`, de = ` data-batch-index="${R}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${X}"${me}${de} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${j}"><span class="upload-icon">${re}</span><span class="upload-label"${J}>${v || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${B}" data-upload-key="${X}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;
|
|
1336
|
+
M += ye;
|
|
1337
1337
|
}
|
|
1338
|
-
e.required ?
|
|
1338
|
+
e.required ? C = `<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">${M}</span></span>` : C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${M}</span>`;
|
|
1339
1339
|
} else {
|
|
1340
|
-
const z = s[e.key] !== null && s[e.key] !== void 0, O = z ? s[e.key] : null,
|
|
1341
|
-
let
|
|
1342
|
-
z && O ? O.type?.startsWith("image/") ?
|
|
1343
|
-
const
|
|
1344
|
-
e.required ?
|
|
1340
|
+
const z = s[e.key] !== null && s[e.key] !== void 0, O = z ? s[e.key] : null, _ = z ? s[e.key]?.name : e.text, G = z ? "" : "hidden", M = e.tooltip && !z ? "" : "hidden", R = z ? "has-file" : "", X = z && _ ? ` data-file-name="${_.replace(/"/g, """)}"` : "";
|
|
1341
|
+
let p = "";
|
|
1342
|
+
z && O ? O.type?.startsWith("image/") ? p = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(O)}" alt="preview" />` : p = "<i class='iconfont icon-exlwenjian'></i>" : p = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1343
|
+
const c = (e.text || "").trim(), P = z && e.showHint === !0 && c.length >= 12 ? `<span ${u} contenteditable="false" class="exclusion-wrapper upload-hint">${c}</span>` : "", B = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${R}"><span class="upload-icon">${p}</span><span class="upload-label"${X}>${_ || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${M}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${G}" title="移除文件">×</span></span></span>`;
|
|
1344
|
+
e.required ? C = `<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>${B}</span>${P}` : C = B + P;
|
|
1345
1345
|
}
|
|
1346
1346
|
else if (e.type === "select" && e.key) {
|
|
1347
|
-
const Y = b[e.key] || e.defaultValue || "", z = encodeURIComponent(JSON.stringify(e.options || [])), O = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "",
|
|
1348
|
-
e.required ?
|
|
1347
|
+
const Y = b[e.key] || e.defaultValue || "", z = encodeURIComponent(JSON.stringify(e.options || [])), O = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", _ = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", G = e.required ? ' data-required="true"' : "", M = `<div data-type="select" data-key="${e.key}" data-value="${Y}" data-options="${z}"${O}${_}${G} class="rte-select-host"></div>`;
|
|
1348
|
+
e.required ? C = `<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>${M}</span>` : C = M;
|
|
1349
1349
|
} else if (e.type === "textarea" && e.key) {
|
|
1350
|
-
const Y = b[e.key] || "", z = typeof e.maxHeight == "number" ? e.maxHeight : A?.textarea?.maxHeight ?? 252, O = typeof e.expandable == "boolean" ? e.expandable : A?.textarea?.expandable ?? !0,
|
|
1351
|
-
e.required ?
|
|
1350
|
+
const Y = b[e.key] || "", z = typeof e.maxHeight == "number" ? e.maxHeight : A?.textarea?.maxHeight ?? 252, O = typeof e.expandable == "boolean" ? e.expandable : A?.textarea?.expandable ?? !0, _ = e.placeholder ? ` placeholder="${e.placeholder}"` : "", G = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${z}" style="max-height:${z}px;"${_}>${Y}</textarea>`, M = O ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", R = `<div class="rte-textarea-wrapper" data-key="${e.key}">${G}${M}</div>`;
|
|
1351
|
+
e.required ? C = `<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>` : C = R;
|
|
1352
1352
|
} else if (e.type === "richtext" && e.key) {
|
|
1353
|
-
const Y = b[e.key] || e.text || "", z = typeof e.minHeight == "number" ? e.minHeight : A?.richtext?.minHeight ?? 40, O = typeof e.maxHeight == "number" ? e.maxHeight : A?.richtext?.maxHeight ?? 160,
|
|
1354
|
-
e.required ?
|
|
1353
|
+
const Y = b[e.key] || e.text || "", z = typeof e.minHeight == "number" ? e.minHeight : A?.richtext?.minHeight ?? 40, O = typeof e.maxHeight == "number" ? e.maxHeight : A?.richtext?.maxHeight ?? 160, _ = Math.max(O, z), G = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", M = typeof e.expandable == "boolean" ? e.expandable : A?.richtext?.expandable ?? !0, R = Y, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${G} style="min-height:${z}px;max-height:${_}px;overflow:auto;">${R}</div>`, p = M ? `<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>` : "", c = `<div class="rte-richtext-wrapper" data-key="${e.key}">${X}${p}</div>`, v = `<div class="rte-richtext-container" data-key="${e.key}">${c}</div>`;
|
|
1354
|
+
e.required ? C = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${v}</div>` : C = v;
|
|
1355
1355
|
} else if (e.type === "report-module" && e.key) {
|
|
1356
|
-
const z = Object.prototype.hasOwnProperty.call(b, e.key) ? b[e.key] : e.text || "", O = typeof e.minHeight == "number" ? e.minHeight : 80,
|
|
1357
|
-
e.required ?
|
|
1356
|
+
const z = Object.prototype.hasOwnProperty.call(b, e.key) ? b[e.key] : e.text || "", O = typeof e.minHeight == "number" ? e.minHeight : 80, _ = typeof e.maxHeight == "number" ? e.maxHeight : 240, G = Math.max(_, O), M = e.placeholder ? ` data-placeholder="${ft(e.placeholder)}"` : "", R = z, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" class="rte-richtext rte-report-module"${M} style="min-height:${O}px;max-height:${G}px;overflow:auto;">${R}</div>`, p = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${X}</div>`, c = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${p}</div>`;
|
|
1357
|
+
e.required ? C = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${c}</div>` : C = c;
|
|
1358
1358
|
} else if (e.type === "datepicker" && e.key) {
|
|
1359
|
-
const Y = b[e.key] || "", z = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", O = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "",
|
|
1360
|
-
e.required ?
|
|
1359
|
+
const Y = b[e.key] || "", z = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", O = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", _ = e.disableFuture ? ' data-disable-future="true"' : "", G = `<div data-type="datepicker" data-key="${e.key}" data-value="${Y}" class="rte-datepicker-host"${z}${O}${_}></div>`;
|
|
1360
|
+
e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${G}</span>` : C = G;
|
|
1361
1361
|
} else if (e.type === "multi-variable" && e.key) {
|
|
1362
1362
|
const Y = e.maxCount || 9, z = T[e.key] || 1, O = Math.min(z, Y);
|
|
1363
1363
|
if (e.required) {
|
|
1364
|
-
const
|
|
1365
|
-
let
|
|
1364
|
+
const _ = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, G = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
|
|
1365
|
+
let M = "";
|
|
1366
1366
|
for (let R = 0; R < O; R++) {
|
|
1367
|
-
const
|
|
1368
|
-
R === 0 ?
|
|
1367
|
+
const X = `${e.key}_${R}`, p = b[X] || "", c = !p, v = c ? "" : p, P = c ? "show-placeholder" : "", B = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", j = e.tooltip && c ? "" : "hidden", J = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", re = `<span contenteditable="true" data-type="variable" data-key="${X}" data-multi-key="${e.key}" data-index="${R}" data-placeholder="${e.placeholder || ""}"${J}${B} class="variable-chip ${P}">${v}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${j}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1368
|
+
R === 0 ? M += `<span ${G} class="exclusion-wrapper required-upload-group required-multi-first">${_}${re}</span>` : M += re;
|
|
1369
1369
|
}
|
|
1370
|
-
|
|
1370
|
+
C = M;
|
|
1371
1371
|
} else {
|
|
1372
|
-
let
|
|
1372
|
+
let _ = "";
|
|
1373
1373
|
for (let G = 0; G < O; G++) {
|
|
1374
|
-
const
|
|
1375
|
-
|
|
1374
|
+
const M = `${e.key}_${G}`, R = b[M] || "", X = !R, p = X ? "" : R, c = X ? "show-placeholder" : "", v = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && X ? "" : "hidden", B = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", j = `<span contenteditable="true" data-type="variable" data-key="${M}" data-multi-key="${e.key}" data-index="${G}" data-placeholder="${e.placeholder || ""}"${B}${v} class="variable-chip ${c}">${p}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1375
|
+
_ += j;
|
|
1376
1376
|
}
|
|
1377
|
-
|
|
1377
|
+
C = _;
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
const F =
|
|
1380
|
+
const F = d + C + D;
|
|
1381
1381
|
if (e.type === "text" && !e.className && !e.exclusionGroup) {
|
|
1382
|
-
if (
|
|
1383
|
-
const z =
|
|
1384
|
-
|
|
1382
|
+
if (E(e.text) && V.length > 0) {
|
|
1383
|
+
const z = V[V.length - 1], O = (e.text ?? "").trim();
|
|
1384
|
+
V[V.length - 1] = `<span class="rte-inline-group">${z}${w(O)}</span>`, k++;
|
|
1385
1385
|
continue;
|
|
1386
1386
|
}
|
|
1387
|
-
const Y =
|
|
1388
|
-
if (Y &&
|
|
1389
|
-
const z =
|
|
1390
|
-
|
|
1387
|
+
const Y = S(e.text);
|
|
1388
|
+
if (Y && V.length > 0) {
|
|
1389
|
+
const z = V[V.length - 1];
|
|
1390
|
+
V[V.length - 1] = `<span class="rte-inline-group">${z}${w(Y.punct)}</span>`;
|
|
1391
1391
|
const O = Y.rest;
|
|
1392
1392
|
if (O) {
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1393
|
+
const _ = O.replace(/\n/g, "<br/>");
|
|
1394
|
+
V.push(`<span data-type="text" contenteditable="false">${_}</span>`);
|
|
1395
1395
|
}
|
|
1396
1396
|
k++;
|
|
1397
1397
|
continue;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
|
|
1400
|
+
V.push(F), k++;
|
|
1401
1401
|
}
|
|
1402
|
-
t.current && (t.current.innerHTML =
|
|
1402
|
+
t.current && (t.current.innerHTML = V.join(""), setTimeout(() => {
|
|
1403
1403
|
if (!t.current) return;
|
|
1404
1404
|
t.current.querySelectorAll('[data-type="variable"]').forEach((n) => {
|
|
1405
1405
|
const r = n.innerText.replace(/\n/g, "");
|
|
@@ -1407,56 +1407,56 @@ function Zn(t, y, s, o, b, T = {}, I, A) {
|
|
|
1407
1407
|
});
|
|
1408
1408
|
}, 0));
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1411
|
-
const
|
|
1410
|
+
function lr(t, y, s, o, b = {}, T, I, A, $) {
|
|
1411
|
+
const E = ce(() => {
|
|
1412
1412
|
if (!t.current) return;
|
|
1413
1413
|
if (y.length === 0) {
|
|
1414
1414
|
t.current.innerHTML = "";
|
|
1415
1415
|
return;
|
|
1416
1416
|
}
|
|
1417
|
-
let
|
|
1418
|
-
const
|
|
1419
|
-
if (
|
|
1417
|
+
let S = {};
|
|
1418
|
+
const V = t.current.__tempVariableValues;
|
|
1419
|
+
if (V ? (S = V, setTimeout(() => {
|
|
1420
1420
|
if (t.current) {
|
|
1421
1421
|
const k = t.current;
|
|
1422
|
-
k.__tempVariableValues ===
|
|
1422
|
+
k.__tempVariableValues === V && delete k.__tempVariableValues;
|
|
1423
1423
|
}
|
|
1424
|
-
}, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1425
|
-
const
|
|
1426
|
-
if (
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1424
|
+
}, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((d) => {
|
|
1425
|
+
const D = d.dataset.key;
|
|
1426
|
+
if (D) {
|
|
1427
|
+
const C = d.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1428
|
+
C && (S[D] = C);
|
|
1429
1429
|
}
|
|
1430
|
-
}), t.current.querySelectorAll('[data-type="select"]').forEach((
|
|
1431
|
-
const
|
|
1432
|
-
if (
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1430
|
+
}), t.current.querySelectorAll('[data-type="select"]').forEach((d) => {
|
|
1431
|
+
const D = d.dataset.key;
|
|
1432
|
+
if (D) {
|
|
1433
|
+
const C = (d.getAttribute("data-value") || "").trim();
|
|
1434
|
+
C && (S[D] = C);
|
|
1435
1435
|
}
|
|
1436
|
-
}), t.current.querySelectorAll('[data-type="textarea"]').forEach((
|
|
1437
|
-
const
|
|
1438
|
-
if (
|
|
1439
|
-
const
|
|
1440
|
-
|
|
1436
|
+
}), t.current.querySelectorAll('[data-type="textarea"]').forEach((d) => {
|
|
1437
|
+
const D = d.dataset.key;
|
|
1438
|
+
if (D) {
|
|
1439
|
+
const C = d.value.replace(/[\u200B]/g, "").trim();
|
|
1440
|
+
C && (S[D] = C);
|
|
1441
1441
|
}
|
|
1442
|
-
}), t.current.querySelectorAll('[data-type="richtext"]').forEach((
|
|
1443
|
-
const
|
|
1444
|
-
if (
|
|
1445
|
-
const
|
|
1446
|
-
(
|
|
1442
|
+
}), t.current.querySelectorAll('[data-type="richtext"]').forEach((d) => {
|
|
1443
|
+
const D = d.dataset.key;
|
|
1444
|
+
if (D) {
|
|
1445
|
+
const C = d.getAttribute("data-node-type") || "", F = C === "report-module" ? (d.innerHTML || "").replace(/[\u200B]/g, "").trim() : (d.textContent || "").replace(/[\u200B]/g, "").trim();
|
|
1446
|
+
(C === "report-module" || F) && (S[D] = F);
|
|
1447
1447
|
}
|
|
1448
|
-
}), t.current.querySelectorAll('[data-type="datepicker"]').forEach((
|
|
1449
|
-
const
|
|
1450
|
-
if (
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1448
|
+
}), t.current.querySelectorAll('[data-type="datepicker"]').forEach((d) => {
|
|
1449
|
+
const D = d.dataset.key;
|
|
1450
|
+
if (D) {
|
|
1451
|
+
const C = (d.getAttribute("data-value") || "").trim();
|
|
1452
|
+
C && (S[D] = C);
|
|
1453
1453
|
}
|
|
1454
|
-
})),
|
|
1454
|
+
})), sr(
|
|
1455
1455
|
t,
|
|
1456
1456
|
y,
|
|
1457
1457
|
s,
|
|
1458
1458
|
o,
|
|
1459
|
-
|
|
1459
|
+
S,
|
|
1460
1460
|
b,
|
|
1461
1461
|
A,
|
|
1462
1462
|
$
|
|
@@ -1469,22 +1469,22 @@ function er(t, y, s, o, b = {}, T, I, A, $) {
|
|
|
1469
1469
|
);
|
|
1470
1470
|
if (n) {
|
|
1471
1471
|
try {
|
|
1472
|
-
const r = document.createRange(),
|
|
1472
|
+
const r = document.createRange(), u = document.createTreeWalker(
|
|
1473
1473
|
n,
|
|
1474
1474
|
NodeFilter.SHOW_TEXT,
|
|
1475
1475
|
null
|
|
1476
1476
|
);
|
|
1477
|
-
let
|
|
1478
|
-
for (;
|
|
1479
|
-
const F =
|
|
1480
|
-
if (
|
|
1481
|
-
|
|
1477
|
+
let d = 0, D = null, C = 0;
|
|
1478
|
+
for (; u.nextNode(); ) {
|
|
1479
|
+
const F = u.currentNode, Y = F.textContent?.length || 0;
|
|
1480
|
+
if (d + Y >= e) {
|
|
1481
|
+
D = F, C = e - d;
|
|
1482
1482
|
break;
|
|
1483
1483
|
}
|
|
1484
|
-
|
|
1484
|
+
d += Y;
|
|
1485
1485
|
}
|
|
1486
|
-
if (
|
|
1487
|
-
r.setStart(
|
|
1486
|
+
if (D) {
|
|
1487
|
+
r.setStart(D, Math.min(C, D.textContent?.length || 0)), r.collapse(!0);
|
|
1488
1488
|
const F = window.getSelection();
|
|
1489
1489
|
F && (F.removeAllRanges(), F.addRange(r), n.focus());
|
|
1490
1490
|
} else {
|
|
@@ -1495,58 +1495,58 @@ function er(t, y, s, o, b = {}, T, I, A, $) {
|
|
|
1495
1495
|
} catch {
|
|
1496
1496
|
const r = document.createRange();
|
|
1497
1497
|
r.selectNodeContents(n), r.collapse(!1);
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1498
|
+
const u = window.getSelection();
|
|
1499
|
+
u && (u.removeAllRanges(), u.addRange(r), n.focus());
|
|
1500
1500
|
}
|
|
1501
1501
|
T.current = null;
|
|
1502
1502
|
}
|
|
1503
1503
|
}, 0);
|
|
1504
1504
|
}
|
|
1505
1505
|
}, [y, s, o, t, b, T, I, A, $]);
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
}, [
|
|
1506
|
+
fe(() => {
|
|
1507
|
+
E();
|
|
1508
|
+
}, [E]);
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1511
|
-
|
|
1510
|
+
function ir(t, y, s, o) {
|
|
1511
|
+
fe(() => {
|
|
1512
1512
|
const b = t.current;
|
|
1513
1513
|
if (!b) return;
|
|
1514
1514
|
const T = ($) => $.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test($.name || ""), I = ($) => {
|
|
1515
|
-
const
|
|
1516
|
-
if (
|
|
1517
|
-
const w =
|
|
1515
|
+
const E = $.target?.closest(".upload-info-icon");
|
|
1516
|
+
if (E && E.classList.contains("upload-info-icon")) {
|
|
1517
|
+
const w = E.dataset.uploadKey;
|
|
1518
1518
|
if (w) {
|
|
1519
|
-
const
|
|
1520
|
-
o(
|
|
1519
|
+
const V = E.closest('[data-type="upload"]');
|
|
1520
|
+
o(V ? { key: w, anchorEl: V, type: "upload" } : { key: w, anchorEl: E, type: "upload" });
|
|
1521
1521
|
}
|
|
1522
1522
|
return;
|
|
1523
1523
|
}
|
|
1524
|
-
const
|
|
1525
|
-
if (
|
|
1526
|
-
const w =
|
|
1524
|
+
const S = $.target?.closest('[data-type="upload"]');
|
|
1525
|
+
if (S) {
|
|
1526
|
+
const w = S.dataset.key;
|
|
1527
1527
|
if (w) {
|
|
1528
|
-
const
|
|
1529
|
-
|
|
1528
|
+
const V = s[w];
|
|
1529
|
+
V && T(V) && o({ key: w, anchorEl: S, type: "upload-preview" });
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
}, A = ($) => {
|
|
1533
|
-
const
|
|
1534
|
-
if (
|
|
1535
|
-
const
|
|
1536
|
-
if (
|
|
1533
|
+
const E = $.target?.closest(".upload-info-icon"), S = $.relatedTarget;
|
|
1534
|
+
if (E && E.classList.contains("upload-info-icon")) {
|
|
1535
|
+
const V = E.closest('[data-type="upload"]');
|
|
1536
|
+
if (S && V && V.contains(S))
|
|
1537
1537
|
return;
|
|
1538
|
-
if (!
|
|
1538
|
+
if (!S || !b.contains(S))
|
|
1539
1539
|
o(null);
|
|
1540
1540
|
else {
|
|
1541
|
-
const k =
|
|
1542
|
-
(!k || k !==
|
|
1541
|
+
const k = S.closest('[data-type="upload"]');
|
|
1542
|
+
(!k || k !== V) && o(null);
|
|
1543
1543
|
}
|
|
1544
1544
|
return;
|
|
1545
1545
|
}
|
|
1546
1546
|
const w = $.target?.closest('[data-type="upload"]');
|
|
1547
1547
|
if (w) {
|
|
1548
|
-
const
|
|
1549
|
-
if (
|
|
1548
|
+
const V = S;
|
|
1549
|
+
if (V && w.contains(V))
|
|
1550
1550
|
return;
|
|
1551
1551
|
o(null);
|
|
1552
1552
|
}
|
|
@@ -1556,14 +1556,14 @@ function tr(t, y, s, o) {
|
|
|
1556
1556
|
};
|
|
1557
1557
|
}, [y, s, t, o]);
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1560
|
-
|
|
1559
|
+
function cr(t, y, s, o) {
|
|
1560
|
+
fe(() => {
|
|
1561
1561
|
if (!t.current) return;
|
|
1562
1562
|
const b = ($) => {
|
|
1563
1563
|
if (o === "hideTagClose")
|
|
1564
1564
|
return;
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1565
|
+
const E = $.currentTarget, S = E.dataset.tooltip, w = E.dataset.tagKey || "";
|
|
1566
|
+
S && s({ key: w, anchorEl: E, type: "tag" });
|
|
1567
1567
|
}, T = () => {
|
|
1568
1568
|
s(null);
|
|
1569
1569
|
};
|
|
@@ -1572,8 +1572,8 @@ function nr(t, y, s, o) {
|
|
|
1572
1572
|
if (!t.current) return;
|
|
1573
1573
|
t.current.querySelectorAll(
|
|
1574
1574
|
".tag-node[data-tooltip]"
|
|
1575
|
-
).forEach((
|
|
1576
|
-
|
|
1575
|
+
).forEach((E) => {
|
|
1576
|
+
E.addEventListener("mouseenter", b), E.addEventListener("mouseleave", T);
|
|
1577
1577
|
});
|
|
1578
1578
|
};
|
|
1579
1579
|
return I = requestAnimationFrame(() => {
|
|
@@ -1581,14 +1581,14 @@ function nr(t, y, s, o) {
|
|
|
1581
1581
|
}), () => {
|
|
1582
1582
|
cancelAnimationFrame(I), t.current && t.current.querySelectorAll(
|
|
1583
1583
|
".tag-node[data-tooltip]"
|
|
1584
|
-
).forEach((
|
|
1585
|
-
|
|
1584
|
+
).forEach((E) => {
|
|
1585
|
+
E.removeEventListener("mouseenter", b), E.removeEventListener("mouseleave", T);
|
|
1586
1586
|
});
|
|
1587
1587
|
};
|
|
1588
1588
|
}, [y, t, s, o]);
|
|
1589
1589
|
}
|
|
1590
|
-
function
|
|
1591
|
-
|
|
1590
|
+
function ur(t, y, s) {
|
|
1591
|
+
fe(() => {
|
|
1592
1592
|
const o = t.current;
|
|
1593
1593
|
if (!o) return;
|
|
1594
1594
|
const b = (I) => {
|
|
@@ -1606,16 +1606,16 @@ function rr(t, y, s) {
|
|
|
1606
1606
|
};
|
|
1607
1607
|
}, [y, t, s]);
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1609
|
+
function dr(t, y, s, o) {
|
|
1610
|
+
fe(() => {
|
|
1611
1611
|
if (!t.current) return;
|
|
1612
|
-
const b = (
|
|
1613
|
-
const
|
|
1612
|
+
const b = (E) => E.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(E.name || ""), T = (E) => {
|
|
1613
|
+
const S = E.currentTarget, w = S.dataset.fileName, V = S.closest('[data-type="upload"]'), k = V?.dataset.key || "", e = k ? s[k] : null;
|
|
1614
1614
|
if (e && b(e)) {
|
|
1615
|
-
o({ key: k, anchorEl:
|
|
1615
|
+
o({ key: k, anchorEl: V || S, type: "upload-preview" });
|
|
1616
1616
|
return;
|
|
1617
1617
|
}
|
|
1618
|
-
w && o({ key: k, anchorEl:
|
|
1618
|
+
w && o({ key: k, anchorEl: V || S, type: "upload-label" });
|
|
1619
1619
|
}, I = () => {
|
|
1620
1620
|
o(null);
|
|
1621
1621
|
};
|
|
@@ -1624,8 +1624,8 @@ function ar(t, y, s, o) {
|
|
|
1624
1624
|
if (!t.current) return;
|
|
1625
1625
|
t.current.querySelectorAll(
|
|
1626
1626
|
".upload-label[data-file-name]"
|
|
1627
|
-
).forEach((
|
|
1628
|
-
|
|
1627
|
+
).forEach((S) => {
|
|
1628
|
+
S.addEventListener("mouseenter", T), S.addEventListener("mouseleave", I);
|
|
1629
1629
|
});
|
|
1630
1630
|
};
|
|
1631
1631
|
return A = requestAnimationFrame(() => {
|
|
@@ -1633,67 +1633,67 @@ function ar(t, y, s, o) {
|
|
|
1633
1633
|
}), () => {
|
|
1634
1634
|
cancelAnimationFrame(A), t.current && t.current.querySelectorAll(
|
|
1635
1635
|
".upload-label[data-file-name]"
|
|
1636
|
-
).forEach((
|
|
1637
|
-
|
|
1636
|
+
).forEach((S) => {
|
|
1637
|
+
S.removeEventListener("mouseenter", T), S.removeEventListener("mouseleave", I);
|
|
1638
1638
|
});
|
|
1639
1639
|
};
|
|
1640
1640
|
}, [y, s, t, o]);
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1643
|
-
|
|
1642
|
+
function pr(t, y, s, o) {
|
|
1643
|
+
fe(() => {
|
|
1644
1644
|
const b = setTimeout(() => {
|
|
1645
|
-
|
|
1645
|
+
St(t, y, s), Nt(t, y, s, o);
|
|
1646
1646
|
}, 0);
|
|
1647
1647
|
return () => clearTimeout(b);
|
|
1648
1648
|
}, [s, y, t, o]);
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function fr(t, y) {
|
|
1651
1651
|
const s = te(0), o = te(0);
|
|
1652
|
-
|
|
1652
|
+
fe(() => {
|
|
1653
1653
|
if (!t.current) return;
|
|
1654
1654
|
let b = !1, T = 0;
|
|
1655
|
-
const I = (
|
|
1656
|
-
b = !0, I(
|
|
1657
|
-
},
|
|
1655
|
+
const I = (d) => d instanceof HTMLElement ? !!(d.closest(".rte-datepicker-wrapper") || d.closest(".rte-datepicker-host") || d.closest(".ant-picker") || d.closest(".ant-picker-dropdown")) : !1, A = (d) => d instanceof HTMLElement ? !!(d.closest(".rte-select-wrapper") || d.closest(".rte-select-host") || d.closest(".ant-select") || d.closest(".ant-select-dropdown")) : !1, $ = (d) => {
|
|
1656
|
+
b = !0, I(d.target) && (s.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), A(d.target) && (o.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
|
|
1657
|
+
}, E = () => {
|
|
1658
1658
|
b = !1, T = Date.now();
|
|
1659
1659
|
};
|
|
1660
|
-
let
|
|
1661
|
-
const
|
|
1662
|
-
|
|
1660
|
+
let S = !1, w = 0;
|
|
1661
|
+
const V = () => {
|
|
1662
|
+
S = !0;
|
|
1663
1663
|
}, k = () => {
|
|
1664
|
-
|
|
1664
|
+
S = !1, w = Date.now();
|
|
1665
1665
|
}, e = () => {
|
|
1666
1666
|
w = Date.now();
|
|
1667
|
-
}, n = (
|
|
1668
|
-
I(
|
|
1667
|
+
}, n = (d) => {
|
|
1668
|
+
I(d.target) && (s.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), A(d.target) && (o.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
|
|
1669
1669
|
}, r = () => {
|
|
1670
1670
|
if (Date.now() - s.current < 800 || Date.now() - o.current < 800) {
|
|
1671
1671
|
console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");
|
|
1672
1672
|
return;
|
|
1673
1673
|
}
|
|
1674
|
-
const
|
|
1675
|
-
if (
|
|
1676
|
-
|
|
1674
|
+
const d = document.activeElement;
|
|
1675
|
+
if (d && (d.closest(".rte-datepicker-wrapper") || d.closest(".rte-datepicker-host") || d.closest(".ant-picker-dropdown") || // Antd dropdown
|
|
1676
|
+
d.tagName === "INPUT" && d.closest(".ant-picker") || d.closest(".rte-select-wrapper") || d.closest(".rte-select-host") || d.closest(".ant-select") || d.closest(".ant-select-dropdown"))) {
|
|
1677
1677
|
console.log("[SelectionCtrl] activeElement is picker/select; skip");
|
|
1678
1678
|
return;
|
|
1679
1679
|
}
|
|
1680
1680
|
if (!t.current) return;
|
|
1681
|
-
const
|
|
1682
|
-
if (!
|
|
1681
|
+
const D = window.getSelection();
|
|
1682
|
+
if (!D || D.rangeCount === 0 || y.current || b || S || Date.now() - w < 500)
|
|
1683
1683
|
return;
|
|
1684
|
-
const
|
|
1685
|
-
if (!
|
|
1686
|
-
return t.current.contains(
|
|
1687
|
-
const F =
|
|
1684
|
+
const C = D.getRangeAt(0);
|
|
1685
|
+
if (!C.collapsed)
|
|
1686
|
+
return t.current.contains(C.commonAncestorContainer), void 0;
|
|
1687
|
+
const F = D.anchorNode;
|
|
1688
1688
|
if (!F || !t.current.contains(F))
|
|
1689
1689
|
return;
|
|
1690
1690
|
let Y = !1, z = !1;
|
|
1691
1691
|
if (F.nodeType === Node.ELEMENT_NODE) {
|
|
1692
|
-
const
|
|
1693
|
-
(
|
|
1692
|
+
const _ = F;
|
|
1693
|
+
(_.closest('[data-type="datepicker"]') || _.closest(".rte-datepicker-wrapper") || _.closest(".rte-datepicker-host")) && (Y = !0), (_.closest('[data-type="select"]') || _.closest(".rte-select-wrapper") || _.closest(".rte-select-host")) && (z = !0);
|
|
1694
1694
|
} else if (F.parentElement) {
|
|
1695
|
-
const
|
|
1696
|
-
(
|
|
1695
|
+
const _ = F.parentElement;
|
|
1696
|
+
(_.closest('[data-type="datepicker"]') || _.closest(".rte-datepicker-wrapper") || _.closest(".rte-datepicker-host")) && (Y = !0), (_.closest('[data-type="select"]') || _.closest(".rte-select-wrapper") || _.closest(".rte-select-host")) && (z = !0);
|
|
1697
1697
|
}
|
|
1698
1698
|
if (Y || z)
|
|
1699
1699
|
return;
|
|
@@ -1701,318 +1701,318 @@ function sr(t, y) {
|
|
|
1701
1701
|
if (F.nodeType === Node.ELEMENT_NODE ? O = F.closest('[data-type="variable"]') : F.nodeType === Node.TEXT_NODE && F.parentElement && (O = F.parentElement.closest('[data-type="variable"]')), !O) {
|
|
1702
1702
|
if (Date.now() - T > 500)
|
|
1703
1703
|
return;
|
|
1704
|
-
const
|
|
1705
|
-
if (
|
|
1704
|
+
const _ = t.current.querySelectorAll('[data-type="variable"]');
|
|
1705
|
+
if (_.length > 0) {
|
|
1706
1706
|
let G = null;
|
|
1707
|
-
for (const
|
|
1708
|
-
if (
|
|
1709
|
-
G =
|
|
1707
|
+
for (const M of Array.from(_))
|
|
1708
|
+
if (M.style.display !== "none") {
|
|
1709
|
+
G = M;
|
|
1710
1710
|
break;
|
|
1711
1711
|
}
|
|
1712
|
-
if (!G &&
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1712
|
+
if (!G && _.length > 0 && (G = _[0]), G) {
|
|
1713
|
+
const M = document.createRange();
|
|
1714
|
+
M.selectNodeContents(G), M.collapse(!1), D.removeAllRanges(), D.addRange(M), G.focus();
|
|
1715
1715
|
} else
|
|
1716
|
-
|
|
1716
|
+
D.removeAllRanges();
|
|
1717
1717
|
} else
|
|
1718
|
-
|
|
1718
|
+
D.removeAllRanges();
|
|
1719
1719
|
}
|
|
1720
|
-
},
|
|
1721
|
-
return
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1720
|
+
}, u = t.current;
|
|
1721
|
+
return u && (u.addEventListener("compositionstart", V), u.addEventListener("compositionend", k), u.addEventListener("input", e)), document.addEventListener("mousedown", $), document.addEventListener("mouseup", E), document.addEventListener("focusin", n), document.addEventListener("selectionchange", r), () => {
|
|
1722
|
+
const d = t.current;
|
|
1723
|
+
d && (d.removeEventListener("compositionstart", V), d.removeEventListener("compositionend", k), d.removeEventListener("input", e)), document.removeEventListener("mousedown", $), document.removeEventListener("mouseup", E), document.removeEventListener("focusin", n), document.removeEventListener("selectionchange", r);
|
|
1724
1724
|
};
|
|
1725
1725
|
}, [t, y]);
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function mr(t) {
|
|
1728
1728
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1729
1729
|
}
|
|
1730
|
-
var
|
|
1731
|
-
function
|
|
1732
|
-
return
|
|
1730
|
+
var mt = { exports: {} }, yr = mt.exports, Xt;
|
|
1731
|
+
function nn() {
|
|
1732
|
+
return Xt || (Xt = 1, function(t, y) {
|
|
1733
1733
|
(function(s, o) {
|
|
1734
1734
|
t.exports = o();
|
|
1735
|
-
})(
|
|
1736
|
-
var s = 1e3, o = 6e4, b = 36e5, T = "millisecond", I = "second", A = "minute", $ = "hour",
|
|
1737
|
-
var
|
|
1738
|
-
return "[" +
|
|
1739
|
-
} },
|
|
1740
|
-
var
|
|
1741
|
-
return !
|
|
1742
|
-
},
|
|
1743
|
-
var
|
|
1744
|
-
return (
|
|
1745
|
-
}, m: function
|
|
1746
|
-
if (
|
|
1747
|
-
var
|
|
1748
|
-
return +(-(
|
|
1749
|
-
}, a: function(
|
|
1750
|
-
return
|
|
1751
|
-
}, p: function(
|
|
1752
|
-
return { M: w, y: k, w:
|
|
1753
|
-
}, u: function(
|
|
1754
|
-
return
|
|
1735
|
+
})(yr, function() {
|
|
1736
|
+
var s = 1e3, o = 6e4, b = 36e5, T = "millisecond", I = "second", A = "minute", $ = "hour", E = "day", S = "week", w = "month", V = "quarter", k = "year", e = "date", n = "Invalid Date", r = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, u = /\[([^\]]+)]|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, d = { 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(p) {
|
|
1737
|
+
var c = ["th", "st", "nd", "rd"], v = p % 100;
|
|
1738
|
+
return "[" + p + (c[(v - 20) % 10] || c[v] || c[0]) + "]";
|
|
1739
|
+
} }, D = function(p, c, v) {
|
|
1740
|
+
var P = String(p);
|
|
1741
|
+
return !P || P.length >= c ? p : "" + Array(c + 1 - P.length).join(v) + p;
|
|
1742
|
+
}, C = { s: D, z: function(p) {
|
|
1743
|
+
var c = -p.utcOffset(), v = Math.abs(c), P = Math.floor(v / 60), B = v % 60;
|
|
1744
|
+
return (c <= 0 ? "+" : "-") + D(P, 2, "0") + ":" + D(B, 2, "0");
|
|
1745
|
+
}, m: function p(c, v) {
|
|
1746
|
+
if (c.date() < v.date()) return -p(v, c);
|
|
1747
|
+
var P = 12 * (v.year() - c.year()) + (v.month() - c.month()), B = c.clone().add(P, w), j = v - B < 0, J = c.clone().add(P + (j ? -1 : 1), w);
|
|
1748
|
+
return +(-(P + (v - B) / (j ? B - J : J - B)) || 0);
|
|
1749
|
+
}, a: function(p) {
|
|
1750
|
+
return p < 0 ? Math.ceil(p) || 0 : Math.floor(p);
|
|
1751
|
+
}, p: function(p) {
|
|
1752
|
+
return { M: w, y: k, w: S, d: E, D: e, h: $, m: A, s: I, ms: T, Q: V }[p] || String(p || "").toLowerCase().replace(/s$/, "");
|
|
1753
|
+
}, u: function(p) {
|
|
1754
|
+
return p === void 0;
|
|
1755
1755
|
} }, F = "en", Y = {};
|
|
1756
|
-
Y[F] =
|
|
1757
|
-
var z = "$isDayjsObject", O = function(
|
|
1758
|
-
return
|
|
1759
|
-
},
|
|
1756
|
+
Y[F] = d;
|
|
1757
|
+
var z = "$isDayjsObject", O = function(p) {
|
|
1758
|
+
return p instanceof R || !(!p || !p[z]);
|
|
1759
|
+
}, _ = function p(c, v, P) {
|
|
1760
1760
|
var B;
|
|
1761
|
-
if (!
|
|
1762
|
-
if (typeof
|
|
1763
|
-
var
|
|
1764
|
-
Y[
|
|
1765
|
-
var
|
|
1766
|
-
if (!B &&
|
|
1761
|
+
if (!c) return F;
|
|
1762
|
+
if (typeof c == "string") {
|
|
1763
|
+
var j = c.toLowerCase();
|
|
1764
|
+
Y[j] && (B = j), v && (Y[j] = v, B = j);
|
|
1765
|
+
var J = c.split("-");
|
|
1766
|
+
if (!B && J.length > 1) return p(J[0]);
|
|
1767
1767
|
} else {
|
|
1768
|
-
var
|
|
1769
|
-
Y[
|
|
1768
|
+
var re = c.name;
|
|
1769
|
+
Y[re] = c, B = re;
|
|
1770
1770
|
}
|
|
1771
|
-
return !
|
|
1772
|
-
}, G = function(
|
|
1773
|
-
if (O(
|
|
1774
|
-
var v = typeof
|
|
1775
|
-
return v.date =
|
|
1776
|
-
},
|
|
1777
|
-
|
|
1778
|
-
return G(
|
|
1771
|
+
return !P && B && (F = B), B || !P && F;
|
|
1772
|
+
}, G = function(p, c) {
|
|
1773
|
+
if (O(p)) return p.clone();
|
|
1774
|
+
var v = typeof c == "object" ? c : {};
|
|
1775
|
+
return v.date = p, v.args = arguments, new R(v);
|
|
1776
|
+
}, M = C;
|
|
1777
|
+
M.l = _, M.i = O, M.w = function(p, c) {
|
|
1778
|
+
return G(p, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
|
|
1779
1779
|
};
|
|
1780
1780
|
var R = function() {
|
|
1781
|
-
function
|
|
1782
|
-
this.$L =
|
|
1781
|
+
function p(v) {
|
|
1782
|
+
this.$L = _(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[z] = !0;
|
|
1783
1783
|
}
|
|
1784
|
-
var
|
|
1785
|
-
return
|
|
1786
|
-
this.$d = function(
|
|
1787
|
-
var B =
|
|
1784
|
+
var c = p.prototype;
|
|
1785
|
+
return c.parse = function(v) {
|
|
1786
|
+
this.$d = function(P) {
|
|
1787
|
+
var B = P.date, j = P.utc;
|
|
1788
1788
|
if (B === null) return /* @__PURE__ */ new Date(NaN);
|
|
1789
|
-
if (
|
|
1789
|
+
if (M.u(B)) return /* @__PURE__ */ new Date();
|
|
1790
1790
|
if (B instanceof Date) return new Date(B);
|
|
1791
1791
|
if (typeof B == "string" && !/Z$/i.test(B)) {
|
|
1792
|
-
var
|
|
1793
|
-
if (
|
|
1794
|
-
var
|
|
1795
|
-
return
|
|
1792
|
+
var J = B.match(r);
|
|
1793
|
+
if (J) {
|
|
1794
|
+
var re = J[2] - 1 || 0, me = (J[7] || "0").substring(0, 3);
|
|
1795
|
+
return j ? new Date(Date.UTC(J[1], re, J[3] || 1, J[4] || 0, J[5] || 0, J[6] || 0, me)) : new Date(J[1], re, J[3] || 1, J[4] || 0, J[5] || 0, J[6] || 0, me);
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
return new Date(B);
|
|
1799
1799
|
}(v), this.init();
|
|
1800
|
-
},
|
|
1800
|
+
}, c.init = function() {
|
|
1801
1801
|
var v = this.$d;
|
|
1802
1802
|
this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds();
|
|
1803
|
-
},
|
|
1804
|
-
return
|
|
1805
|
-
},
|
|
1803
|
+
}, c.$utils = function() {
|
|
1804
|
+
return M;
|
|
1805
|
+
}, c.isValid = function() {
|
|
1806
1806
|
return this.$d.toString() !== n;
|
|
1807
|
-
},
|
|
1807
|
+
}, c.isSame = function(v, P) {
|
|
1808
1808
|
var B = G(v);
|
|
1809
|
-
return this.startOf(
|
|
1810
|
-
},
|
|
1811
|
-
return G(v) < this.startOf(
|
|
1812
|
-
},
|
|
1813
|
-
return this.endOf(
|
|
1814
|
-
},
|
|
1815
|
-
return
|
|
1816
|
-
},
|
|
1809
|
+
return this.startOf(P) <= B && B <= this.endOf(P);
|
|
1810
|
+
}, c.isAfter = function(v, P) {
|
|
1811
|
+
return G(v) < this.startOf(P);
|
|
1812
|
+
}, c.isBefore = function(v, P) {
|
|
1813
|
+
return this.endOf(P) < G(v);
|
|
1814
|
+
}, c.$g = function(v, P, B) {
|
|
1815
|
+
return M.u(v) ? this[P] : this.set(B, v);
|
|
1816
|
+
}, c.unix = function() {
|
|
1817
1817
|
return Math.floor(this.valueOf() / 1e3);
|
|
1818
|
-
},
|
|
1818
|
+
}, c.valueOf = function() {
|
|
1819
1819
|
return this.$d.getTime();
|
|
1820
|
-
},
|
|
1821
|
-
var B = this,
|
|
1822
|
-
var
|
|
1823
|
-
return
|
|
1824
|
-
},
|
|
1825
|
-
return
|
|
1826
|
-
},
|
|
1827
|
-
switch (
|
|
1820
|
+
}, c.startOf = function(v, P) {
|
|
1821
|
+
var B = this, j = !!M.u(P) || P, J = M.p(v), re = function($e, xe) {
|
|
1822
|
+
var qe = M.w(B.$u ? Date.UTC(B.$y, xe, $e) : new Date(B.$y, xe, $e), B);
|
|
1823
|
+
return j ? qe : qe.endOf(E);
|
|
1824
|
+
}, me = function($e, xe) {
|
|
1825
|
+
return M.w(B.toDate()[$e].apply(B.toDate("s"), (j ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(xe)), B);
|
|
1826
|
+
}, de = this.$W, ye = this.$M, N = this.$D, be = "set" + (this.$u ? "UTC" : "");
|
|
1827
|
+
switch (J) {
|
|
1828
1828
|
case k:
|
|
1829
|
-
return
|
|
1829
|
+
return j ? re(1, 0) : re(31, 11);
|
|
1830
1830
|
case w:
|
|
1831
|
-
return
|
|
1832
|
-
case
|
|
1833
|
-
var
|
|
1834
|
-
return
|
|
1835
|
-
case
|
|
1831
|
+
return j ? re(1, ye) : re(0, ye + 1);
|
|
1832
|
+
case S:
|
|
1833
|
+
var U = this.$locale().weekStart || 0, ge = (de < U ? de + 7 : de) - U;
|
|
1834
|
+
return re(j ? N - ge : N + (6 - ge), ye);
|
|
1835
|
+
case E:
|
|
1836
1836
|
case e:
|
|
1837
|
-
return
|
|
1837
|
+
return me(be + "Hours", 0);
|
|
1838
1838
|
case $:
|
|
1839
|
-
return
|
|
1839
|
+
return me(be + "Minutes", 1);
|
|
1840
1840
|
case A:
|
|
1841
|
-
return
|
|
1841
|
+
return me(be + "Seconds", 2);
|
|
1842
1842
|
case I:
|
|
1843
|
-
return
|
|
1843
|
+
return me(be + "Milliseconds", 3);
|
|
1844
1844
|
default:
|
|
1845
1845
|
return this.clone();
|
|
1846
1846
|
}
|
|
1847
|
-
},
|
|
1847
|
+
}, c.endOf = function(v) {
|
|
1848
1848
|
return this.startOf(v, !1);
|
|
1849
|
-
},
|
|
1850
|
-
var B,
|
|
1851
|
-
if (
|
|
1852
|
-
var
|
|
1853
|
-
|
|
1854
|
-
} else
|
|
1849
|
+
}, c.$set = function(v, P) {
|
|
1850
|
+
var B, j = M.p(v), J = "set" + (this.$u ? "UTC" : ""), re = (B = {}, B[E] = J + "Date", B[e] = J + "Date", B[w] = J + "Month", B[k] = J + "FullYear", B[$] = J + "Hours", B[A] = J + "Minutes", B[I] = J + "Seconds", B[T] = J + "Milliseconds", B)[j], me = j === E ? this.$D + (P - this.$W) : P;
|
|
1851
|
+
if (j === w || j === k) {
|
|
1852
|
+
var de = this.clone().set(e, 1);
|
|
1853
|
+
de.$d[re](me), de.init(), this.$d = de.set(e, Math.min(this.$D, de.daysInMonth())).$d;
|
|
1854
|
+
} else re && this.$d[re](me);
|
|
1855
1855
|
return this.init(), this;
|
|
1856
|
-
},
|
|
1857
|
-
return this.clone().$set(v,
|
|
1858
|
-
},
|
|
1859
|
-
return this[
|
|
1860
|
-
},
|
|
1861
|
-
var B,
|
|
1856
|
+
}, c.set = function(v, P) {
|
|
1857
|
+
return this.clone().$set(v, P);
|
|
1858
|
+
}, c.get = function(v) {
|
|
1859
|
+
return this[M.p(v)]();
|
|
1860
|
+
}, c.add = function(v, P) {
|
|
1861
|
+
var B, j = this;
|
|
1862
1862
|
v = Number(v);
|
|
1863
|
-
var
|
|
1864
|
-
var
|
|
1865
|
-
return
|
|
1863
|
+
var J = M.p(P), re = function(ye) {
|
|
1864
|
+
var N = G(j);
|
|
1865
|
+
return M.w(N.date(N.date() + Math.round(ye * v)), j);
|
|
1866
1866
|
};
|
|
1867
|
-
if (
|
|
1868
|
-
if (
|
|
1869
|
-
if (
|
|
1870
|
-
if (
|
|
1871
|
-
var
|
|
1872
|
-
return
|
|
1873
|
-
},
|
|
1874
|
-
return this.add(-1 * v,
|
|
1875
|
-
},
|
|
1876
|
-
var
|
|
1867
|
+
if (J === w) return this.set(w, this.$M + v);
|
|
1868
|
+
if (J === k) return this.set(k, this.$y + v);
|
|
1869
|
+
if (J === E) return re(1);
|
|
1870
|
+
if (J === S) return re(7);
|
|
1871
|
+
var me = (B = {}, B[A] = o, B[$] = b, B[I] = s, B)[J] || 1, de = this.$d.getTime() + v * me;
|
|
1872
|
+
return M.w(de, this);
|
|
1873
|
+
}, c.subtract = function(v, P) {
|
|
1874
|
+
return this.add(-1 * v, P);
|
|
1875
|
+
}, c.format = function(v) {
|
|
1876
|
+
var P = this, B = this.$locale();
|
|
1877
1877
|
if (!this.isValid()) return B.invalidDate || n;
|
|
1878
|
-
var
|
|
1879
|
-
return
|
|
1880
|
-
},
|
|
1881
|
-
return
|
|
1882
|
-
},
|
|
1883
|
-
var
|
|
1884
|
-
return
|
|
1878
|
+
var j = v || "YYYY-MM-DDTHH:mm:ssZ", J = M.z(this), re = this.$H, me = this.$m, de = this.$M, ye = B.weekdays, N = B.months, be = B.meridiem, U = function(xe, qe, Ae, he) {
|
|
1879
|
+
return xe && (xe[qe] || xe(P, j)) || Ae[qe].slice(0, he);
|
|
1880
|
+
}, ge = function(xe) {
|
|
1881
|
+
return M.s(re % 12 || 12, xe, "0");
|
|
1882
|
+
}, $e = be || function(xe, qe, Ae) {
|
|
1883
|
+
var he = xe < 12 ? "AM" : "PM";
|
|
1884
|
+
return Ae ? he.toLowerCase() : he;
|
|
1885
1885
|
};
|
|
1886
|
-
return
|
|
1887
|
-
return
|
|
1888
|
-
switch (
|
|
1886
|
+
return j.replace(u, function(xe, qe) {
|
|
1887
|
+
return qe || function(Ae) {
|
|
1888
|
+
switch (Ae) {
|
|
1889
1889
|
case "YY":
|
|
1890
|
-
return String(
|
|
1890
|
+
return String(P.$y).slice(-2);
|
|
1891
1891
|
case "YYYY":
|
|
1892
|
-
return
|
|
1892
|
+
return M.s(P.$y, 4, "0");
|
|
1893
1893
|
case "M":
|
|
1894
|
-
return
|
|
1894
|
+
return de + 1;
|
|
1895
1895
|
case "MM":
|
|
1896
|
-
return
|
|
1896
|
+
return M.s(de + 1, 2, "0");
|
|
1897
1897
|
case "MMM":
|
|
1898
|
-
return
|
|
1898
|
+
return U(B.monthsShort, de, N, 3);
|
|
1899
1899
|
case "MMMM":
|
|
1900
|
-
return
|
|
1900
|
+
return U(N, de);
|
|
1901
1901
|
case "D":
|
|
1902
|
-
return
|
|
1902
|
+
return P.$D;
|
|
1903
1903
|
case "DD":
|
|
1904
|
-
return
|
|
1904
|
+
return M.s(P.$D, 2, "0");
|
|
1905
1905
|
case "d":
|
|
1906
|
-
return String(
|
|
1906
|
+
return String(P.$W);
|
|
1907
1907
|
case "dd":
|
|
1908
|
-
return
|
|
1908
|
+
return U(B.weekdaysMin, P.$W, ye, 2);
|
|
1909
1909
|
case "ddd":
|
|
1910
|
-
return
|
|
1910
|
+
return U(B.weekdaysShort, P.$W, ye, 3);
|
|
1911
1911
|
case "dddd":
|
|
1912
|
-
return
|
|
1912
|
+
return ye[P.$W];
|
|
1913
1913
|
case "H":
|
|
1914
|
-
return String(
|
|
1914
|
+
return String(re);
|
|
1915
1915
|
case "HH":
|
|
1916
|
-
return
|
|
1916
|
+
return M.s(re, 2, "0");
|
|
1917
1917
|
case "h":
|
|
1918
|
-
return
|
|
1918
|
+
return ge(1);
|
|
1919
1919
|
case "hh":
|
|
1920
|
-
return
|
|
1920
|
+
return ge(2);
|
|
1921
1921
|
case "a":
|
|
1922
|
-
return
|
|
1922
|
+
return $e(re, me, !0);
|
|
1923
1923
|
case "A":
|
|
1924
|
-
return
|
|
1924
|
+
return $e(re, me, !1);
|
|
1925
1925
|
case "m":
|
|
1926
|
-
return String(
|
|
1926
|
+
return String(me);
|
|
1927
1927
|
case "mm":
|
|
1928
|
-
return
|
|
1928
|
+
return M.s(me, 2, "0");
|
|
1929
1929
|
case "s":
|
|
1930
|
-
return String(
|
|
1930
|
+
return String(P.$s);
|
|
1931
1931
|
case "ss":
|
|
1932
|
-
return
|
|
1932
|
+
return M.s(P.$s, 2, "0");
|
|
1933
1933
|
case "SSS":
|
|
1934
|
-
return
|
|
1934
|
+
return M.s(P.$ms, 3, "0");
|
|
1935
1935
|
case "Z":
|
|
1936
|
-
return
|
|
1936
|
+
return J;
|
|
1937
1937
|
}
|
|
1938
1938
|
return null;
|
|
1939
|
-
}(
|
|
1939
|
+
}(xe) || J.replace(":", "");
|
|
1940
1940
|
});
|
|
1941
|
-
},
|
|
1941
|
+
}, c.utcOffset = function() {
|
|
1942
1942
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1943
|
-
},
|
|
1944
|
-
var
|
|
1945
|
-
return
|
|
1943
|
+
}, c.diff = function(v, P, B) {
|
|
1944
|
+
var j, J = this, re = M.p(P), me = G(v), de = (me.utcOffset() - this.utcOffset()) * o, ye = this - me, N = function() {
|
|
1945
|
+
return M.m(J, me);
|
|
1946
1946
|
};
|
|
1947
|
-
switch (
|
|
1947
|
+
switch (re) {
|
|
1948
1948
|
case k:
|
|
1949
|
-
|
|
1949
|
+
j = N() / 12;
|
|
1950
1950
|
break;
|
|
1951
1951
|
case w:
|
|
1952
|
-
|
|
1952
|
+
j = N();
|
|
1953
1953
|
break;
|
|
1954
|
-
case
|
|
1955
|
-
|
|
1954
|
+
case V:
|
|
1955
|
+
j = N() / 3;
|
|
1956
1956
|
break;
|
|
1957
|
-
case
|
|
1958
|
-
|
|
1957
|
+
case S:
|
|
1958
|
+
j = (ye - de) / 6048e5;
|
|
1959
1959
|
break;
|
|
1960
|
-
case
|
|
1961
|
-
|
|
1960
|
+
case E:
|
|
1961
|
+
j = (ye - de) / 864e5;
|
|
1962
1962
|
break;
|
|
1963
1963
|
case $:
|
|
1964
|
-
|
|
1964
|
+
j = ye / b;
|
|
1965
1965
|
break;
|
|
1966
1966
|
case A:
|
|
1967
|
-
|
|
1967
|
+
j = ye / o;
|
|
1968
1968
|
break;
|
|
1969
1969
|
case I:
|
|
1970
|
-
|
|
1970
|
+
j = ye / s;
|
|
1971
1971
|
break;
|
|
1972
1972
|
default:
|
|
1973
|
-
|
|
1973
|
+
j = ye;
|
|
1974
1974
|
}
|
|
1975
|
-
return B ?
|
|
1976
|
-
},
|
|
1975
|
+
return B ? j : M.a(j);
|
|
1976
|
+
}, c.daysInMonth = function() {
|
|
1977
1977
|
return this.endOf(w).$D;
|
|
1978
|
-
},
|
|
1978
|
+
}, c.$locale = function() {
|
|
1979
1979
|
return Y[this.$L];
|
|
1980
|
-
},
|
|
1980
|
+
}, c.locale = function(v, P) {
|
|
1981
1981
|
if (!v) return this.$L;
|
|
1982
|
-
var B = this.clone(),
|
|
1983
|
-
return
|
|
1984
|
-
},
|
|
1985
|
-
return
|
|
1986
|
-
},
|
|
1982
|
+
var B = this.clone(), j = _(v, P, !0);
|
|
1983
|
+
return j && (B.$L = j), B;
|
|
1984
|
+
}, c.clone = function() {
|
|
1985
|
+
return M.w(this.$d, this);
|
|
1986
|
+
}, c.toDate = function() {
|
|
1987
1987
|
return new Date(this.valueOf());
|
|
1988
|
-
},
|
|
1988
|
+
}, c.toJSON = function() {
|
|
1989
1989
|
return this.isValid() ? this.toISOString() : null;
|
|
1990
|
-
},
|
|
1990
|
+
}, c.toISOString = function() {
|
|
1991
1991
|
return this.$d.toISOString();
|
|
1992
|
-
},
|
|
1992
|
+
}, c.toString = function() {
|
|
1993
1993
|
return this.$d.toUTCString();
|
|
1994
|
-
},
|
|
1995
|
-
}(),
|
|
1996
|
-
return G.prototype =
|
|
1997
|
-
|
|
1998
|
-
return this.$g(
|
|
1994
|
+
}, p;
|
|
1995
|
+
}(), X = R.prototype;
|
|
1996
|
+
return G.prototype = X, [["$ms", T], ["$s", I], ["$m", A], ["$H", $], ["$W", E], ["$M", w], ["$y", k], ["$D", e]].forEach(function(p) {
|
|
1997
|
+
X[p[1]] = function(c) {
|
|
1998
|
+
return this.$g(c, p[0], p[1]);
|
|
1999
1999
|
};
|
|
2000
|
-
}), G.extend = function(
|
|
2001
|
-
return
|
|
2002
|
-
}, G.locale =
|
|
2003
|
-
return G(1e3 *
|
|
2000
|
+
}), G.extend = function(p, c) {
|
|
2001
|
+
return p.$i || (p(c, R, G), p.$i = !0), G;
|
|
2002
|
+
}, G.locale = _, G.isDayjs = O, G.unix = function(p) {
|
|
2003
|
+
return G(1e3 * p);
|
|
2004
2004
|
}, G.en = Y[F], G.Ls = Y, G.p = {}, G;
|
|
2005
2005
|
});
|
|
2006
|
-
}(
|
|
2006
|
+
}(mt)), mt.exports;
|
|
2007
2007
|
}
|
|
2008
|
-
var
|
|
2009
|
-
const
|
|
2010
|
-
var
|
|
2011
|
-
function
|
|
2012
|
-
return
|
|
2008
|
+
var hr = nn();
|
|
2009
|
+
const yt = /* @__PURE__ */ mr(hr);
|
|
2010
|
+
var ht = { exports: {} }, gr = ht.exports, Jt;
|
|
2011
|
+
function br() {
|
|
2012
|
+
return Jt || (Jt = 1, function(t, y) {
|
|
2013
2013
|
(function(s, o) {
|
|
2014
|
-
t.exports = o(
|
|
2015
|
-
})(
|
|
2014
|
+
t.exports = o(nn());
|
|
2015
|
+
})(gr, function(s) {
|
|
2016
2016
|
function o(I) {
|
|
2017
2017
|
return I && typeof I == "object" && "default" in I ? I : { default: I };
|
|
2018
2018
|
}
|
|
@@ -2024,40 +2024,40 @@ function dr() {
|
|
|
2024
2024
|
} };
|
|
2025
2025
|
return b.default.locale(T, null, !0), T;
|
|
2026
2026
|
});
|
|
2027
|
-
}(
|
|
2027
|
+
}(ht)), ht.exports;
|
|
2028
2028
|
}
|
|
2029
|
-
|
|
2030
|
-
function
|
|
2029
|
+
br();
|
|
2030
|
+
function Qe(t) {
|
|
2031
2031
|
"@babel/helpers - typeof";
|
|
2032
|
-
return
|
|
2032
|
+
return Qe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
|
|
2033
2033
|
return typeof y;
|
|
2034
2034
|
} : function(y) {
|
|
2035
2035
|
return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y;
|
|
2036
|
-
},
|
|
2036
|
+
}, Qe(t);
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2039
|
-
if (
|
|
2038
|
+
function vr(t, y) {
|
|
2039
|
+
if (Qe(t) != "object" || !t) return t;
|
|
2040
2040
|
var s = t[Symbol.toPrimitive];
|
|
2041
2041
|
if (s !== void 0) {
|
|
2042
2042
|
var o = s.call(t, y);
|
|
2043
|
-
if (
|
|
2043
|
+
if (Qe(o) != "object") return o;
|
|
2044
2044
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2045
2045
|
}
|
|
2046
2046
|
return (y === "string" ? String : Number)(t);
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2049
|
-
var y =
|
|
2050
|
-
return
|
|
2048
|
+
function xr(t) {
|
|
2049
|
+
var y = vr(t, "string");
|
|
2050
|
+
return Qe(y) == "symbol" ? y : y + "";
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2053
|
-
return (y =
|
|
2052
|
+
function wr(t, y, s) {
|
|
2053
|
+
return (y = xr(y)) in t ? Object.defineProperty(t, y, {
|
|
2054
2054
|
value: s,
|
|
2055
2055
|
enumerable: !0,
|
|
2056
2056
|
configurable: !0,
|
|
2057
2057
|
writable: !0
|
|
2058
2058
|
}) : t[y] = s, t;
|
|
2059
2059
|
}
|
|
2060
|
-
function
|
|
2060
|
+
function Qt(t, y) {
|
|
2061
2061
|
var s = Object.keys(t);
|
|
2062
2062
|
if (Object.getOwnPropertySymbols) {
|
|
2063
2063
|
var o = Object.getOwnPropertySymbols(t);
|
|
@@ -2067,23 +2067,23 @@ function Yt(t, y) {
|
|
|
2067
2067
|
}
|
|
2068
2068
|
return s;
|
|
2069
2069
|
}
|
|
2070
|
-
function
|
|
2070
|
+
function Zt(t) {
|
|
2071
2071
|
for (var y = 1; y < arguments.length; y++) {
|
|
2072
2072
|
var s = arguments[y] != null ? arguments[y] : {};
|
|
2073
|
-
y % 2 ?
|
|
2074
|
-
|
|
2075
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(s)) :
|
|
2073
|
+
y % 2 ? Qt(Object(s), !0).forEach(function(o) {
|
|
2074
|
+
wr(t, o, s[o]);
|
|
2075
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(s)) : Qt(Object(s)).forEach(function(o) {
|
|
2076
2076
|
Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(s, o));
|
|
2077
2077
|
});
|
|
2078
2078
|
}
|
|
2079
2079
|
return t;
|
|
2080
2080
|
}
|
|
2081
|
-
var
|
|
2081
|
+
var kr = {
|
|
2082
2082
|
yearFormat: "YYYY",
|
|
2083
2083
|
dayFormat: "D",
|
|
2084
2084
|
cellMeridiemFormat: "A",
|
|
2085
2085
|
monthBeforeYear: !0
|
|
2086
|
-
},
|
|
2086
|
+
}, $r = Zt(Zt({}, kr), {}, {
|
|
2087
2087
|
locale: "zh_CN",
|
|
2088
2088
|
today: "今天",
|
|
2089
2089
|
now: "此刻",
|
|
@@ -2111,10 +2111,10 @@ var yr = {
|
|
|
2111
2111
|
cellDateFormat: "D",
|
|
2112
2112
|
monthBeforeYear: !1
|
|
2113
2113
|
});
|
|
2114
|
-
const
|
|
2114
|
+
const Er = {
|
|
2115
2115
|
placeholder: "请选择时间",
|
|
2116
2116
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
2117
|
-
},
|
|
2117
|
+
}, rn = {
|
|
2118
2118
|
lang: Object.assign({
|
|
2119
2119
|
placeholder: "请选择日期",
|
|
2120
2120
|
yearPlaceholder: "请选择年份",
|
|
@@ -2126,69 +2126,69 @@ const gr = {
|
|
|
2126
2126
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
2127
2127
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
2128
2128
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
2129
|
-
},
|
|
2130
|
-
timePickerLocale: Object.assign({},
|
|
2129
|
+
}, $r),
|
|
2130
|
+
timePickerLocale: Object.assign({}, Er)
|
|
2131
2131
|
};
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
const { RangePicker:
|
|
2135
|
-
const s = t.dataset.key, o = t.dataset.value, b = t.dataset.placeholder, T = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, I = t.dataset.disableFuture === "true", [A, $] =
|
|
2132
|
+
rn.lang.ok = "确定";
|
|
2133
|
+
yt.locale("zh-cn");
|
|
2134
|
+
const { RangePicker: Cr } = Ln, Tr = ({ host: t, onChange: y }) => {
|
|
2135
|
+
const s = t.dataset.key, o = t.dataset.value, b = t.dataset.placeholder, T = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, I = t.dataset.disableFuture === "true", [A, $] = oe(() => {
|
|
2136
2136
|
if (!o) return null;
|
|
2137
2137
|
const n = o.split(",");
|
|
2138
|
-
return n.length === 2 && n[0] && n[1] ? [
|
|
2139
|
-
}), [
|
|
2140
|
-
return
|
|
2138
|
+
return n.length === 2 && n[0] && n[1] ? [yt(n[0]), yt(n[1])] : null;
|
|
2139
|
+
}), [E, S] = oe(null);
|
|
2140
|
+
return Lt(
|
|
2141
2141
|
/* @__PURE__ */ L("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "260px", marginLeft: "4px", marginRight: "4px", fontSize: "16px", height: "30px", lineHeight: "30px" }, children: /* @__PURE__ */ L(
|
|
2142
|
-
|
|
2142
|
+
Cr,
|
|
2143
2143
|
{
|
|
2144
2144
|
value: A,
|
|
2145
|
-
disabledDate: (n) => n ? I && n.isAfter(
|
|
2145
|
+
disabledDate: (n) => n ? I && n.isAfter(yt(), "day") ? !0 : !T || !E || !E[0] ? !1 : Math.abs(n.diff(E[0], "days")) > T : !1,
|
|
2146
2146
|
onCalendarChange: (n) => {
|
|
2147
|
-
console.log("[DatePicker] onCalendarChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)),
|
|
2147
|
+
console.log("[DatePicker] onCalendarChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), S(n);
|
|
2148
2148
|
},
|
|
2149
2149
|
onChange: (n) => {
|
|
2150
|
-
if (console.log("[DatePicker] onChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), $(n),
|
|
2150
|
+
if (console.log("[DatePicker] onChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), $(n), S(null), n && n[0] && n[1]) {
|
|
2151
2151
|
const r = `${n[0].format("YYYY-MM-DD")},${n[1].format("YYYY-MM-DD")}`;
|
|
2152
2152
|
t.setAttribute("data-value", r), y(s, r);
|
|
2153
2153
|
} else
|
|
2154
2154
|
t.setAttribute("data-value", ""), y(s, "");
|
|
2155
2155
|
},
|
|
2156
2156
|
onOpenChange: (n) => {
|
|
2157
|
-
console.log("[DatePicker] onOpenChange", n),
|
|
2157
|
+
console.log("[DatePicker] onOpenChange", n), S(n ? A : null);
|
|
2158
2158
|
},
|
|
2159
2159
|
placeholder: [b || "开始日期", b || "结束日期"],
|
|
2160
2160
|
style: { width: "100%" },
|
|
2161
2161
|
size: "small",
|
|
2162
2162
|
allowClear: !0,
|
|
2163
|
-
locale:
|
|
2163
|
+
locale: rn,
|
|
2164
2164
|
getPopupContainer: () => document.body,
|
|
2165
2165
|
popupClassName: "rte-datepicker-dropdown"
|
|
2166
2166
|
}
|
|
2167
2167
|
) }),
|
|
2168
2168
|
t
|
|
2169
2169
|
);
|
|
2170
|
-
},
|
|
2171
|
-
const [y, s] =
|
|
2172
|
-
return
|
|
2170
|
+
}, Sr = (t) => {
|
|
2171
|
+
const [y, s] = oe([]);
|
|
2172
|
+
return fe(() => {
|
|
2173
2173
|
const o = t.current;
|
|
2174
2174
|
if (!o) return;
|
|
2175
2175
|
const b = () => {
|
|
2176
2176
|
const I = o.querySelectorAll(".rte-datepicker-host"), A = [];
|
|
2177
2177
|
I.forEach(($) => {
|
|
2178
|
-
const
|
|
2179
|
-
|
|
2178
|
+
const E = $.getAttribute("data-key");
|
|
2179
|
+
E && A.push(
|
|
2180
2180
|
/* @__PURE__ */ L(
|
|
2181
|
-
|
|
2181
|
+
Tr,
|
|
2182
2182
|
{
|
|
2183
2183
|
host: $,
|
|
2184
2184
|
onChange: () => {
|
|
2185
2185
|
if (t.current) {
|
|
2186
|
-
const
|
|
2187
|
-
t.current.dispatchEvent(
|
|
2186
|
+
const S = new Event("input", { bubbles: !0 });
|
|
2187
|
+
t.current.dispatchEvent(S);
|
|
2188
2188
|
}
|
|
2189
2189
|
}
|
|
2190
2190
|
},
|
|
2191
|
-
`datepicker-${
|
|
2191
|
+
`datepicker-${E}`
|
|
2192
2192
|
)
|
|
2193
2193
|
);
|
|
2194
2194
|
}), s(A);
|
|
@@ -2198,18 +2198,18 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2198
2198
|
let A = !1;
|
|
2199
2199
|
for (const $ of I)
|
|
2200
2200
|
if ($.type === "childList") {
|
|
2201
|
-
let
|
|
2202
|
-
if ($.addedNodes.forEach((
|
|
2203
|
-
if (
|
|
2204
|
-
const w =
|
|
2205
|
-
(w.classList?.contains("rte-datepicker-host") || w.querySelector?.(".rte-datepicker-host")) && (
|
|
2201
|
+
let E = !1;
|
|
2202
|
+
if ($.addedNodes.forEach((S) => {
|
|
2203
|
+
if (S.nodeType === Node.ELEMENT_NODE) {
|
|
2204
|
+
const w = S;
|
|
2205
|
+
(w.classList?.contains("rte-datepicker-host") || w.querySelector?.(".rte-datepicker-host")) && (E = !0);
|
|
2206
2206
|
}
|
|
2207
|
-
}), $.removedNodes.forEach((
|
|
2208
|
-
if (
|
|
2209
|
-
const w =
|
|
2210
|
-
(w.classList?.contains("rte-datepicker-host") || w.querySelector?.(".rte-datepicker-host")) && (
|
|
2207
|
+
}), $.removedNodes.forEach((S) => {
|
|
2208
|
+
if (S.nodeType === Node.ELEMENT_NODE) {
|
|
2209
|
+
const w = S;
|
|
2210
|
+
(w.classList?.contains("rte-datepicker-host") || w.querySelector?.(".rte-datepicker-host")) && (E = !0);
|
|
2211
2211
|
}
|
|
2212
|
-
}),
|
|
2212
|
+
}), E) {
|
|
2213
2213
|
A = !0;
|
|
2214
2214
|
break;
|
|
2215
2215
|
}
|
|
@@ -2218,7 +2218,7 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2218
2218
|
});
|
|
2219
2219
|
return T.observe(o, { childList: !0, subtree: !0 }), () => T.disconnect();
|
|
2220
2220
|
}, [t]), y;
|
|
2221
|
-
},
|
|
2221
|
+
}, Nr = ({
|
|
2222
2222
|
config: t,
|
|
2223
2223
|
onSend: y,
|
|
2224
2224
|
isProcessing: s = !1,
|
|
@@ -2228,258 +2228,303 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2228
2228
|
agentOptions: I = [],
|
|
2229
2229
|
onAgentSelect: A,
|
|
2230
2230
|
onAgentExit: $,
|
|
2231
|
-
loading:
|
|
2232
|
-
placeholder:
|
|
2231
|
+
loading: E = !1,
|
|
2232
|
+
placeholder: S,
|
|
2233
2233
|
border: w,
|
|
2234
|
-
background:
|
|
2234
|
+
background: V = "transparent",
|
|
2235
2235
|
hideButtons: k,
|
|
2236
2236
|
maxHeight: e,
|
|
2237
2237
|
minHeight: n,
|
|
2238
2238
|
className: r = "",
|
|
2239
|
-
onEditorAreaClick:
|
|
2240
|
-
autoCollapseOnScroll:
|
|
2241
|
-
scrollContainerRef:
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2239
|
+
onEditorAreaClick: u,
|
|
2240
|
+
autoCollapseOnScroll: d,
|
|
2241
|
+
scrollContainerRef: D,
|
|
2242
|
+
scrollCollapseMode: C = "default",
|
|
2243
|
+
atBottomOffset: F = 10,
|
|
2244
|
+
atBottomExitOffset: Y,
|
|
2245
|
+
collapseOnScrollAtBottom: z = !1,
|
|
2246
|
+
scrollEndDebounceMs: O = 120,
|
|
2247
|
+
collapseTransitionMs: _ = 0,
|
|
2248
|
+
lockDuringCollapseTransition: G = !0,
|
|
2249
|
+
collapseAutoToggleThrottleMs: M = 0,
|
|
2250
|
+
collapsedTotalHeight: R = 132,
|
|
2251
|
+
clickOverrideAutoCollapseMs: X = 360,
|
|
2252
|
+
toggleOnBlankClick: p,
|
|
2253
|
+
scrollThrottleMs: c,
|
|
2254
|
+
collapsed: v,
|
|
2255
|
+
defaultCollapsed: P,
|
|
2256
|
+
onCollapsedChange: B,
|
|
2257
|
+
reportAnalyze: j,
|
|
2258
|
+
nodeDefaults: J
|
|
2257
2259
|
}) => {
|
|
2258
|
-
const [
|
|
2259
|
-
}),
|
|
2260
|
-
|
|
2261
|
-
), [
|
|
2262
|
-
|
|
2263
|
-
}, []),
|
|
2260
|
+
const [re, me] = Mn.useMessage(), de = te(null), ye = te(null), N = te(null), be = te(null), [U, ge] = oe({}), [$e, xe] = oe(null), [qe, Ae] = oe(null), [he, Ye] = oe(null), Ve = te(!1), Re = te(null), [Mt, Oe] = oe(!1), [Ze, et] = oe({}), bt = te(() => {
|
|
2261
|
+
}), Ge = te({}), tt = te({}), nt = te(null), [on, rt] = oe(!0), It = te(null), [sn, ln] = oe(0), at = typeof v == "boolean", [ot, cn] = oe(
|
|
2262
|
+
P ?? !1
|
|
2263
|
+
), [je, un] = oe(!1), We = te(!1), Dt = te(ot), Bt = te(window), vt = te(null), st = te(!1), [dn, Ht] = oe(!1), xt = te(null), lt = te(null), it = te(null), De = te(0), _e = te(null), wt = te(0), Ue = te(0), Fe = te(null), ct = te(null), Pt = ce(() => {
|
|
2264
|
+
wt.current = 0;
|
|
2265
|
+
}, []), kt = ce(() => {
|
|
2266
|
+
Fe.current != null && (window.clearTimeout(Fe.current), Fe.current = null);
|
|
2267
|
+
}, []), Ke = ce(
|
|
2264
2268
|
(a, l, i = !1) => {
|
|
2265
|
-
if ((
|
|
2266
|
-
const m =
|
|
2267
|
-
if (!i && m &&
|
|
2268
|
-
|
|
2269
|
+
if ((at ? v : Dt.current) === a) return;
|
|
2270
|
+
const m = G && typeof _ == "number" && _ > 0;
|
|
2271
|
+
if (!i && m && st.current) {
|
|
2272
|
+
xt.current = { next: a, reason: l };
|
|
2269
2273
|
return;
|
|
2270
2274
|
}
|
|
2271
|
-
m && (
|
|
2272
|
-
|
|
2273
|
-
const H =
|
|
2274
|
-
|
|
2275
|
+
m && (st.current = !0, Ht(!0), lt.current && window.clearTimeout(lt.current), lt.current = window.setTimeout(() => {
|
|
2276
|
+
st.current = !1, Ht(!1), lt.current = null;
|
|
2277
|
+
const H = xt.current;
|
|
2278
|
+
xt.current = null, H && Ke(H.next, H.reason, !0);
|
|
2275
2279
|
try {
|
|
2276
|
-
|
|
2280
|
+
it.current?.();
|
|
2277
2281
|
} catch {
|
|
2278
2282
|
}
|
|
2279
|
-
},
|
|
2283
|
+
}, _)), at || cn(a), B?.(a, l);
|
|
2280
2284
|
},
|
|
2281
2285
|
[
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2286
|
+
at,
|
|
2287
|
+
v,
|
|
2288
|
+
G,
|
|
2289
|
+
_,
|
|
2290
|
+
B
|
|
2287
2291
|
]
|
|
2288
|
-
),
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
}, [
|
|
2292
|
-
|
|
2293
|
-
}, [
|
|
2294
|
-
const a =
|
|
2292
|
+
), pn = Ke;
|
|
2293
|
+
fe(() => {
|
|
2294
|
+
Dt.current = ot;
|
|
2295
|
+
}, [ot]), fe(() => {
|
|
2296
|
+
We.current = je;
|
|
2297
|
+
}, [je]), Je(() => {
|
|
2298
|
+
const a = It.current;
|
|
2295
2299
|
if (!a) return;
|
|
2296
2300
|
const l = () => {
|
|
2297
2301
|
const h = Math.ceil(a.getBoundingClientRect().height || 0);
|
|
2298
|
-
|
|
2302
|
+
ln((m) => m === h ? m : h);
|
|
2299
2303
|
};
|
|
2300
2304
|
if (l(), typeof ResizeObserver > "u") return;
|
|
2301
2305
|
const i = new ResizeObserver(() => l());
|
|
2302
2306
|
return i.observe(a), () => i.disconnect();
|
|
2303
|
-
}, []),
|
|
2304
|
-
if (!
|
|
2305
|
-
const a =
|
|
2306
|
-
let
|
|
2307
|
-
for (;
|
|
2308
|
-
const
|
|
2309
|
-
if (
|
|
2310
|
-
|
|
2307
|
+
}, []), fe(() => {
|
|
2308
|
+
if (!d) return;
|
|
2309
|
+
const a = D?.current ?? null, i = ((Z) => {
|
|
2310
|
+
let le = Z;
|
|
2311
|
+
for (; le && le !== document.body; ) {
|
|
2312
|
+
const we = window.getComputedStyle(le), ve = we.overflowY, Se = we.overflowX, ke = (ve === "auto" || ve === "scroll") && le.scrollHeight > le.clientHeight + 1, Ce = (Se === "auto" || Se === "scroll") && le.scrollWidth > le.clientWidth + 1;
|
|
2313
|
+
if (ke || Ce) return le;
|
|
2314
|
+
le = le.parentElement;
|
|
2311
2315
|
}
|
|
2312
2316
|
return null;
|
|
2313
|
-
})(
|
|
2314
|
-
|
|
2317
|
+
})(de.current?.parentElement ?? null), h = C === "approach-input" ? a ?? window : a ?? i ?? window;
|
|
2318
|
+
Bt.current = h;
|
|
2315
2319
|
const m = () => {
|
|
2316
|
-
|
|
2317
|
-
}, H = (
|
|
2318
|
-
const
|
|
2319
|
-
|
|
2320
|
+
Pt();
|
|
2321
|
+
}, H = (Z) => {
|
|
2322
|
+
const le = Z.target;
|
|
2323
|
+
le && (h !== window ? h.contains(le) && m() : de.current?.contains(le) && m());
|
|
2320
2324
|
};
|
|
2321
2325
|
window.addEventListener("wheel", m, { passive: !0 }), window.addEventListener("touchmove", m, { passive: !0 }), window.addEventListener("pointerdown", H, { passive: !0 });
|
|
2322
|
-
let x = 0, g = 0, q = null, f = -1, Q = "none";
|
|
2323
|
-
const
|
|
2326
|
+
let x = 0, g = 0, q = null, f = -1, Q = "none", K = -1;
|
|
2327
|
+
const ee = () => {
|
|
2324
2328
|
if (h === window) {
|
|
2325
|
-
const
|
|
2329
|
+
const le = document.documentElement;
|
|
2326
2330
|
return {
|
|
2327
|
-
scrollTop:
|
|
2328
|
-
scrollHeight:
|
|
2329
|
-
clientHeight:
|
|
2331
|
+
scrollTop: le.scrollTop,
|
|
2332
|
+
scrollHeight: le.scrollHeight,
|
|
2333
|
+
clientHeight: le.clientHeight
|
|
2330
2334
|
};
|
|
2331
2335
|
}
|
|
2332
|
-
const
|
|
2336
|
+
const Z = h;
|
|
2333
2337
|
return {
|
|
2334
|
-
scrollTop:
|
|
2335
|
-
scrollHeight:
|
|
2336
|
-
clientHeight:
|
|
2338
|
+
scrollTop: Z.scrollTop,
|
|
2339
|
+
scrollHeight: Z.scrollHeight,
|
|
2340
|
+
clientHeight: Z.clientHeight
|
|
2337
2341
|
};
|
|
2338
|
-
},
|
|
2342
|
+
}, ne = () => {
|
|
2339
2343
|
if (h === window) {
|
|
2340
|
-
const
|
|
2341
|
-
|
|
2344
|
+
const Z = document.documentElement;
|
|
2345
|
+
Z.scrollTop = Math.max(0, Z.scrollHeight - Z.clientHeight);
|
|
2342
2346
|
} else {
|
|
2343
|
-
const
|
|
2344
|
-
|
|
2347
|
+
const Z = h;
|
|
2348
|
+
Z.scrollTop = Math.max(0, Z.scrollHeight - Z.clientHeight);
|
|
2345
2349
|
}
|
|
2346
|
-
},
|
|
2347
|
-
const
|
|
2348
|
-
|
|
2349
|
-
typeof
|
|
2350
|
-
),
|
|
2351
|
-
if (Date.now() <
|
|
2350
|
+
}, W = () => {
|
|
2351
|
+
const Z = F, le = Math.max(
|
|
2352
|
+
Z + 1,
|
|
2353
|
+
typeof Y == "number" ? Y : Z + 16
|
|
2354
|
+
), we = We.current;
|
|
2355
|
+
if (Date.now() < De.current) return !0;
|
|
2352
2356
|
if (h === window) {
|
|
2353
|
-
const
|
|
2354
|
-
if (
|
|
2355
|
-
const
|
|
2356
|
-
return
|
|
2357
|
+
const ke = document.documentElement;
|
|
2358
|
+
if (ke.scrollHeight <= ke.clientHeight + F) return !1;
|
|
2359
|
+
const Ce = ke.scrollHeight - ke.scrollTop - ke.clientHeight;
|
|
2360
|
+
return we ? Ce <= le : Ce <= Z;
|
|
2357
2361
|
}
|
|
2358
|
-
const
|
|
2359
|
-
if (
|
|
2360
|
-
const
|
|
2361
|
-
return
|
|
2362
|
-
},
|
|
2363
|
-
|
|
2364
|
-
const
|
|
2365
|
-
|
|
2362
|
+
const ve = h;
|
|
2363
|
+
if (ve.scrollHeight <= ve.clientHeight + F) return !1;
|
|
2364
|
+
const Se = ve.scrollHeight - ve.scrollTop - ve.clientHeight;
|
|
2365
|
+
return we ? Se <= le : Se <= Z;
|
|
2366
|
+
}, se = (Z) => {
|
|
2367
|
+
De.current = Math.max(De.current, Date.now() + Z);
|
|
2368
|
+
const le = () => {
|
|
2369
|
+
_e.current = null, !(Date.now() >= De.current) && (ne(), _e.current = window.requestAnimationFrame(le));
|
|
2366
2370
|
};
|
|
2367
|
-
|
|
2368
|
-
},
|
|
2369
|
-
|
|
2370
|
-
},
|
|
2371
|
-
if (
|
|
2371
|
+
_e.current == null && (ne(), _e.current = window.requestAnimationFrame(le));
|
|
2372
|
+
}, ie = () => {
|
|
2373
|
+
De.current = 0, _e.current != null && (window.cancelAnimationFrame(_e.current), _e.current = null);
|
|
2374
|
+
}, ae = (Z, le) => {
|
|
2375
|
+
if (typeof X == "number" && X > 0 && Date.now() < wt.current)
|
|
2376
|
+
return;
|
|
2377
|
+
const we = typeof M == "number" ? M : 0;
|
|
2378
|
+
if (we > 0) {
|
|
2372
2379
|
const ve = Date.now();
|
|
2373
|
-
if (ve
|
|
2380
|
+
if (ve < Ue.current) {
|
|
2381
|
+
if (ct.current = { next: Z, reason: le }, Fe.current == null) {
|
|
2382
|
+
const Se = Math.max(0, Ue.current - ve);
|
|
2383
|
+
Fe.current = window.setTimeout(() => {
|
|
2384
|
+
Fe.current = null;
|
|
2385
|
+
const ke = ct.current;
|
|
2386
|
+
ct.current = null, ke && (Ue.current = Date.now() + we, Ke(ke.next, ke.reason));
|
|
2387
|
+
}, Se);
|
|
2388
|
+
}
|
|
2389
|
+
return;
|
|
2390
|
+
}
|
|
2391
|
+
Ue.current = ve + we, kt();
|
|
2392
|
+
}
|
|
2393
|
+
Ke(Z, le);
|
|
2394
|
+
}, pe = (Z = !1) => {
|
|
2395
|
+
if (!Z && typeof c == "number" && c > 0) {
|
|
2396
|
+
const ve = Date.now();
|
|
2397
|
+
if (ve - g < c) return;
|
|
2374
2398
|
g = ve;
|
|
2375
2399
|
}
|
|
2376
|
-
const
|
|
2377
|
-
if (
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2400
|
+
const le = We.current, we = W();
|
|
2401
|
+
if (We.current = we, un((ve) => ve === we ? ve : we), C === "approach-input" && h !== window) {
|
|
2402
|
+
const { scrollTop: ve, scrollHeight: Se, clientHeight: ke } = ee(), Ce = Se - ve - ke, Xe = K >= 0 && Ce < K - 2;
|
|
2403
|
+
if (K = Ce, Z) {
|
|
2404
|
+
we ? ae(!1, "bottom") : ae(!0, "scroll");
|
|
2405
|
+
return;
|
|
2406
|
+
}
|
|
2407
|
+
if (we) {
|
|
2408
|
+
if (ae(!1, "bottom"), Q !== "up" && !le) {
|
|
2409
|
+
const Ut = Math.max(200, Le + 80);
|
|
2410
|
+
se(Ut);
|
|
2382
2411
|
}
|
|
2383
2412
|
return;
|
|
2384
2413
|
}
|
|
2385
|
-
|
|
2414
|
+
Xe && ae(!0, "scroll");
|
|
2415
|
+
return;
|
|
2416
|
+
}
|
|
2417
|
+
if (we) {
|
|
2418
|
+
if (!(z && Q === "up") && (ae(!1, "bottom"), Q !== "up" && !le)) {
|
|
2419
|
+
const ve = Math.max(200, Le + 80);
|
|
2420
|
+
se(ve);
|
|
2421
|
+
}
|
|
2422
|
+
return;
|
|
2386
2423
|
}
|
|
2424
|
+
De.current && ie(), ae(!0, "scroll");
|
|
2387
2425
|
};
|
|
2388
|
-
|
|
2389
|
-
const
|
|
2390
|
-
if (
|
|
2391
|
-
const { scrollTop:
|
|
2392
|
-
f >= 0 && (
|
|
2426
|
+
it.current = () => pe(!0);
|
|
2427
|
+
const Ee = () => {
|
|
2428
|
+
if (G && typeof _ == "number" && _ > 0 && st.current) {
|
|
2429
|
+
const { scrollTop: Z } = ee();
|
|
2430
|
+
f >= 0 && (Z > f ? Q = "down" : Z < f && (Q = "up")), f >= 0 && Z < f && ie(), f = Z;
|
|
2393
2431
|
return;
|
|
2394
2432
|
}
|
|
2395
2433
|
{
|
|
2396
|
-
const { scrollTop:
|
|
2397
|
-
f >= 0 && (
|
|
2434
|
+
const { scrollTop: Z } = ee();
|
|
2435
|
+
f >= 0 && (Z > f ? Q = "down" : Z < f && (Q = "up")), f >= 0 && Z < f && ie(), z && f >= 0 && We.current && Z < f && (vt.current = de.current?.getBoundingClientRect().height ?? null, ae(!0, "scroll")), f = Z;
|
|
2398
2436
|
}
|
|
2399
2437
|
x || (x = window.requestAnimationFrame(() => {
|
|
2400
|
-
x = 0,
|
|
2401
|
-
}),
|
|
2402
|
-
|
|
2403
|
-
},
|
|
2438
|
+
x = 0, pe();
|
|
2439
|
+
}), O && O > 0 && (q && window.clearTimeout(q), q = window.setTimeout(() => {
|
|
2440
|
+
pe(!0);
|
|
2441
|
+
}, O)));
|
|
2404
2442
|
};
|
|
2405
|
-
|
|
2406
|
-
|
|
2443
|
+
h === window ? window.addEventListener("scroll", Ee, { passive: !0 }) : h.addEventListener("scroll", Ee, { passive: !0 }), f = ee().scrollTop;
|
|
2444
|
+
{
|
|
2445
|
+
const Z = ee();
|
|
2446
|
+
K = Z.scrollHeight - Z.scrollTop - Z.clientHeight;
|
|
2447
|
+
}
|
|
2448
|
+
return pe(!0), () => {
|
|
2449
|
+
it.current && (it.current = null), _e.current != null && (window.cancelAnimationFrame(_e.current), _e.current = null), De.current = 0, kt(), Ue.current = 0, ct.current = null, window.removeEventListener("wheel", m), window.removeEventListener("touchmove", m), window.removeEventListener("pointerdown", H), h === window ? window.removeEventListener("scroll", Ee) : h.removeEventListener("scroll", Ee), q && window.clearTimeout(q), x && window.cancelAnimationFrame(x);
|
|
2407
2450
|
};
|
|
2408
2451
|
}, [
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
S,
|
|
2452
|
+
d,
|
|
2453
|
+
D,
|
|
2412
2454
|
F,
|
|
2413
|
-
J,
|
|
2414
2455
|
Y,
|
|
2456
|
+
c,
|
|
2415
2457
|
z,
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2458
|
+
O,
|
|
2459
|
+
Ke,
|
|
2460
|
+
Pt,
|
|
2461
|
+
X,
|
|
2462
|
+
M,
|
|
2463
|
+
kt
|
|
2419
2464
|
]);
|
|
2420
|
-
const [
|
|
2465
|
+
const [Be, Me] = oe(() => {
|
|
2421
2466
|
const a = {};
|
|
2422
2467
|
return t.forEach((l) => {
|
|
2423
2468
|
l.type === "multi-variable" && l.key && (a[l.key] = 1);
|
|
2424
2469
|
}), a;
|
|
2425
|
-
}),
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
}, [
|
|
2429
|
-
|
|
2430
|
-
}, [
|
|
2431
|
-
const
|
|
2432
|
-
|
|
2433
|
-
const a =
|
|
2434
|
-
if (a && a !== l &&
|
|
2470
|
+
}), $t = te({}), Vt = te({}), Rt = te({});
|
|
2471
|
+
fe(() => {
|
|
2472
|
+
Vt.current = U;
|
|
2473
|
+
}, [U]), fe(() => {
|
|
2474
|
+
Rt.current = Be;
|
|
2475
|
+
}, [Be]);
|
|
2476
|
+
const Et = ce((a) => a.find((i) => i.type === "tag")?.text || null, []), Ot = te(t), He = te(null);
|
|
2477
|
+
fe(() => {
|
|
2478
|
+
const a = Et(Ot.current), l = Et(t);
|
|
2479
|
+
if (a && a !== l && N.current) {
|
|
2435
2480
|
const i = {};
|
|
2436
|
-
|
|
2481
|
+
N.current.querySelectorAll('[data-type="variable"]').forEach((x) => {
|
|
2437
2482
|
const g = x.dataset.key;
|
|
2438
2483
|
if (g) {
|
|
2439
2484
|
const q = x.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2440
2485
|
q && (i[g] = q);
|
|
2441
2486
|
}
|
|
2442
|
-
}),
|
|
2487
|
+
}), N.current.querySelectorAll('[data-type="select"]').forEach((x) => {
|
|
2443
2488
|
const g = x.dataset.key;
|
|
2444
2489
|
if (g) {
|
|
2445
2490
|
const q = (x.getAttribute("data-value") || "").trim();
|
|
2446
2491
|
q && (i[g] = q);
|
|
2447
2492
|
}
|
|
2448
|
-
}),
|
|
2493
|
+
}), N.current.querySelectorAll('[data-type="textarea"]').forEach((x) => {
|
|
2449
2494
|
const g = x.dataset.key;
|
|
2450
2495
|
if (g) {
|
|
2451
2496
|
const q = x.value.replace(/[\u200B]/g, "").trim();
|
|
2452
2497
|
q && (i[g] = q);
|
|
2453
2498
|
}
|
|
2454
|
-
}),
|
|
2499
|
+
}), $t.current[a] = {
|
|
2455
2500
|
variableValues: i,
|
|
2456
|
-
files: { ...
|
|
2457
|
-
multiVariableCounts: { ...
|
|
2501
|
+
files: { ...Vt.current },
|
|
2502
|
+
multiVariableCounts: { ...Rt.current }
|
|
2458
2503
|
};
|
|
2459
2504
|
}
|
|
2460
|
-
if (l &&
|
|
2461
|
-
const i =
|
|
2462
|
-
|
|
2505
|
+
if (l && $t.current[l]) {
|
|
2506
|
+
const i = $t.current[l];
|
|
2507
|
+
He.current = i, ge(i.files), Me(i.multiVariableCounts);
|
|
2463
2508
|
} else if (l) {
|
|
2464
|
-
|
|
2509
|
+
He.current = null;
|
|
2465
2510
|
const i = {};
|
|
2466
2511
|
t.forEach((h) => {
|
|
2467
2512
|
h.type === "multi-variable" && h.key && (i[h.key] = 1);
|
|
2468
|
-
}),
|
|
2513
|
+
}), Me(i), ge({});
|
|
2469
2514
|
} else
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
}, [t,
|
|
2473
|
-
|
|
2474
|
-
|
|
2515
|
+
He.current = null, Me({}), ge({});
|
|
2516
|
+
Ot.current = t;
|
|
2517
|
+
}, [t, Et]), Je(() => {
|
|
2518
|
+
He.current && N.current && (N.current.__tempVariableValues = He.current.variableValues, setTimeout(() => {
|
|
2519
|
+
He.current && (He.current = null);
|
|
2475
2520
|
}, 0));
|
|
2476
2521
|
});
|
|
2477
|
-
const
|
|
2522
|
+
const Te = qt(() => {
|
|
2478
2523
|
if (!t || t.length === 0) return t;
|
|
2479
2524
|
const a = [], l = (i) => i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2480
2525
|
for (const i of t) {
|
|
2481
2526
|
if (a.push(i), i.type !== "report-url" || !i.key) continue;
|
|
2482
|
-
const h =
|
|
2527
|
+
const h = Ze[i.key], m = h?.status ?? "idle", H = h?.modules ?? [];
|
|
2483
2528
|
m === "loading" && a.push({
|
|
2484
2529
|
type: "text",
|
|
2485
2530
|
className: "rte-report-parsing",
|
|
@@ -2504,19 +2549,19 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2504
2549
|
` }));
|
|
2505
2550
|
}
|
|
2506
2551
|
return a;
|
|
2507
|
-
}, [t,
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2552
|
+
}, [t, Ze]);
|
|
2553
|
+
lr(
|
|
2554
|
+
N,
|
|
2555
|
+
Te,
|
|
2556
|
+
U,
|
|
2512
2557
|
T,
|
|
2513
|
-
|
|
2514
|
-
|
|
2558
|
+
Be,
|
|
2559
|
+
nt,
|
|
2515
2560
|
void 0,
|
|
2516
2561
|
k,
|
|
2517
|
-
|
|
2518
|
-
),
|
|
2519
|
-
const
|
|
2562
|
+
J
|
|
2563
|
+
), ir(N, Te, U, Ye), cr(N, Te, Ye, k), dr(N, Te, U, Ye), ur(N, Te, Ye), pr(N, Te, U, Oe), fr(N, Ve);
|
|
2564
|
+
const fn = or(N), mn = Sr(N), Ct = ce((a) => {
|
|
2520
2565
|
const l = a.trim();
|
|
2521
2566
|
if (!l) return { url: "" };
|
|
2522
2567
|
let i = null;
|
|
@@ -2531,10 +2576,10 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2531
2576
|
}
|
|
2532
2577
|
const h = i.pathname.split("/").filter(Boolean), m = h.findIndex((q) => q === "report"), H = m >= 0 ? h[m + 1] : void 0, x = h[0] && h[0].length <= 5 ? h[0] : void 0, g = i.searchParams.get("agentId") || void 0;
|
|
2533
2578
|
return { url: l, reportId: H, agentId: g, lang: x };
|
|
2534
|
-
}, []),
|
|
2579
|
+
}, []), Gt = ce(() => {
|
|
2535
2580
|
const a = {};
|
|
2536
|
-
if (!
|
|
2537
|
-
const l =
|
|
2581
|
+
if (!N.current) return a;
|
|
2582
|
+
const l = N.current;
|
|
2538
2583
|
return l.querySelectorAll('[data-type="variable"]').forEach((g) => {
|
|
2539
2584
|
const q = g.dataset.key;
|
|
2540
2585
|
if (!q) return;
|
|
@@ -2561,18 +2606,18 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2561
2606
|
const f = (g.getAttribute("data-value") || "").trim();
|
|
2562
2607
|
f && (a[q] = f);
|
|
2563
2608
|
}), a;
|
|
2564
|
-
}, []),
|
|
2609
|
+
}, []), Ft = ce(
|
|
2565
2610
|
(a) => (a?.modules || []).map((i, h) => {
|
|
2566
2611
|
const m = (i?.title || `模块${h + 1}`).trim() || `模块${h + 1}`, H = (i?.content || "").trim(), x = H.length > 0 ? H : `请补充:${m}`;
|
|
2567
2612
|
return { title: m, content: x };
|
|
2568
2613
|
}),
|
|
2569
2614
|
[]
|
|
2570
|
-
),
|
|
2615
|
+
), zt = ce(
|
|
2571
2616
|
(a, l) => {
|
|
2572
2617
|
const i = (l || "").trim();
|
|
2573
2618
|
if (!a) return;
|
|
2574
2619
|
if (!i) {
|
|
2575
|
-
|
|
2620
|
+
et((x) => ({
|
|
2576
2621
|
...x,
|
|
2577
2622
|
[a]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
|
|
2578
2623
|
}));
|
|
@@ -2582,18 +2627,18 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2582
2627
|
const x = window.getSelection();
|
|
2583
2628
|
if (x && x.rangeCount > 0) {
|
|
2584
2629
|
const g = x.getRangeAt(0), q = g.startContainer, f = q.nodeType === Node.ELEMENT_NODE ? q.closest(`[data-type="variable"][data-key="${a}"]`) : q.parentElement?.closest(`[data-type="variable"][data-key="${a}"]`);
|
|
2585
|
-
if (f &&
|
|
2630
|
+
if (f && N.current?.contains(f)) {
|
|
2586
2631
|
const Q = document.createRange();
|
|
2587
2632
|
Q.setStartBefore(f), Q.setEnd(g.startContainer, g.startOffset);
|
|
2588
2633
|
const K = Q.toString().length;
|
|
2589
|
-
|
|
2634
|
+
nt.current = { key: a, offset: K };
|
|
2590
2635
|
}
|
|
2591
2636
|
}
|
|
2592
2637
|
} catch {
|
|
2593
2638
|
}
|
|
2594
|
-
const h =
|
|
2639
|
+
const h = Ze[a];
|
|
2595
2640
|
if (h?.lastParsedUrl && h.lastParsedUrl === i && h.status === "loading") return;
|
|
2596
|
-
|
|
2641
|
+
et((x) => ({
|
|
2597
2642
|
...x,
|
|
2598
2643
|
[a]: {
|
|
2599
2644
|
...x[a] || { modules: [] },
|
|
@@ -2602,8 +2647,8 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2602
2647
|
lastParsedUrl: i
|
|
2603
2648
|
}
|
|
2604
2649
|
}));
|
|
2605
|
-
const m =
|
|
2606
|
-
(
|
|
2650
|
+
const m = Ct(i);
|
|
2651
|
+
(j || (async (x) => ({
|
|
2607
2652
|
modules: [
|
|
2608
2653
|
{
|
|
2609
2654
|
title: "第1张:人群+场景直击图",
|
|
@@ -2616,20 +2661,20 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2616
2661
|
}
|
|
2617
2662
|
]
|
|
2618
2663
|
})))(m).then((x) => {
|
|
2619
|
-
const g =
|
|
2620
|
-
if (
|
|
2621
|
-
const q =
|
|
2664
|
+
const g = Ft(x);
|
|
2665
|
+
if (N.current) {
|
|
2666
|
+
const q = Gt();
|
|
2622
2667
|
g.forEach((f, Q) => {
|
|
2623
2668
|
q[`${a}__module_${Q}`] = f.content;
|
|
2624
|
-
}),
|
|
2669
|
+
}), N.current.__tempVariableValues = q;
|
|
2625
2670
|
}
|
|
2626
|
-
|
|
2671
|
+
et((q) => ({
|
|
2627
2672
|
...q,
|
|
2628
2673
|
[a]: { status: "success", error: void 0, lastParsedUrl: i, modules: g }
|
|
2629
2674
|
}));
|
|
2630
2675
|
}).catch((x) => {
|
|
2631
2676
|
const g = x instanceof Error ? x.message : String(x);
|
|
2632
|
-
|
|
2677
|
+
et((q) => ({
|
|
2633
2678
|
...q,
|
|
2634
2679
|
[a]: {
|
|
2635
2680
|
...q[a] || { modules: [] },
|
|
@@ -2641,24 +2686,24 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2641
2686
|
}));
|
|
2642
2687
|
});
|
|
2643
2688
|
},
|
|
2644
|
-
[
|
|
2689
|
+
[Gt, Ft, Ct, j, Ze]
|
|
2645
2690
|
);
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
}, [
|
|
2649
|
-
const a =
|
|
2650
|
-
Object.keys(a).forEach((l) => window.clearTimeout(a[l])),
|
|
2651
|
-
}, []),
|
|
2652
|
-
if (
|
|
2653
|
-
|
|
2691
|
+
fe(() => {
|
|
2692
|
+
bt.current = zt;
|
|
2693
|
+
}, [zt]), fe(() => () => {
|
|
2694
|
+
const a = Ge.current;
|
|
2695
|
+
Object.keys(a).forEach((l) => window.clearTimeout(a[l])), Ge.current = {}, tt.current = {};
|
|
2696
|
+
}, []), fe(() => {
|
|
2697
|
+
if (Te.length > 0) {
|
|
2698
|
+
rt(!1);
|
|
2654
2699
|
return;
|
|
2655
2700
|
}
|
|
2656
2701
|
const a = () => {
|
|
2657
|
-
if (!
|
|
2658
|
-
|
|
2702
|
+
if (!N.current) {
|
|
2703
|
+
rt(!0);
|
|
2659
2704
|
return;
|
|
2660
2705
|
}
|
|
2661
|
-
const i =
|
|
2706
|
+
const i = N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", h = N.current.querySelectorAll('[data-type="variable"]'), m = N.current.querySelectorAll('[data-type="upload"]');
|
|
2662
2707
|
let H = !1;
|
|
2663
2708
|
h.forEach((g) => {
|
|
2664
2709
|
(g.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (H = !0);
|
|
@@ -2666,19 +2711,19 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2666
2711
|
g.querySelector(".upload-inner-wrapper.has-file") && (H = !0);
|
|
2667
2712
|
});
|
|
2668
2713
|
const x = !i && !H;
|
|
2669
|
-
|
|
2714
|
+
rt(x), Te.length === 0 && Oe(!x);
|
|
2670
2715
|
};
|
|
2671
2716
|
a();
|
|
2672
2717
|
const l = new MutationObserver(a);
|
|
2673
|
-
return
|
|
2718
|
+
return N.current && l.observe(N.current, {
|
|
2674
2719
|
childList: !0,
|
|
2675
2720
|
subtree: !0,
|
|
2676
2721
|
characterData: !0
|
|
2677
2722
|
}), () => {
|
|
2678
2723
|
l.disconnect();
|
|
2679
2724
|
};
|
|
2680
|
-
}, [
|
|
2681
|
-
const
|
|
2725
|
+
}, [Te]);
|
|
2726
|
+
const yn = (a) => {
|
|
2682
2727
|
if (o) {
|
|
2683
2728
|
a.preventDefault();
|
|
2684
2729
|
return;
|
|
@@ -2694,46 +2739,46 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2694
2739
|
if (H) {
|
|
2695
2740
|
const x = /[、,,\s\n\r\t]+/, g = l.split(x).map((q) => q.trim()).filter((q) => q.length > 0);
|
|
2696
2741
|
if (console.log("[Paste Event] 粘贴的内容:", l), console.log("[Paste Event] 拆分后的值:", g), g.length > 1) {
|
|
2697
|
-
const q = parseInt(m.dataset.index || "0", 10), f = t.find((
|
|
2698
|
-
K > Q &&
|
|
2699
|
-
...
|
|
2742
|
+
const q = parseInt(m.dataset.index || "0", 10), f = t.find((pe) => pe.type === "multi-variable" && pe.key === H)?.maxCount || 9, Q = Be[H] || 1, K = Math.min(q + g.length, f);
|
|
2743
|
+
K > Q && Me((ae) => ({
|
|
2744
|
+
...ae,
|
|
2700
2745
|
[H]: K
|
|
2701
2746
|
}));
|
|
2702
2747
|
const ee = [];
|
|
2703
|
-
for (let
|
|
2704
|
-
const
|
|
2705
|
-
`[data-type="variable"][data-key="${
|
|
2748
|
+
for (let ae = 0; ae < Q; ae++) {
|
|
2749
|
+
const pe = `${H}_${ae}`, Ee = N.current.querySelector(
|
|
2750
|
+
`[data-type="variable"][data-key="${pe}"][data-multi-key="${H}"]`
|
|
2706
2751
|
);
|
|
2707
|
-
if (
|
|
2708
|
-
const
|
|
2709
|
-
ee.push(
|
|
2752
|
+
if (Ee) {
|
|
2753
|
+
const Z = Ee.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2754
|
+
ee.push(Z);
|
|
2710
2755
|
}
|
|
2711
2756
|
}
|
|
2712
2757
|
ee.splice(q, 1, ...g.slice(0, f - q));
|
|
2713
|
-
const
|
|
2714
|
-
|
|
2715
|
-
const
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
}),
|
|
2758
|
+
const ne = ee.slice(0, f);
|
|
2759
|
+
ne.length > 0 && ne[ne.length - 1] !== "" && ne.length < f && ne.push("");
|
|
2760
|
+
const W = Math.max(ne.length, 1), se = {};
|
|
2761
|
+
ne.forEach((ae, pe) => {
|
|
2762
|
+
ae && (se[`${H}_${pe}`] = ae);
|
|
2763
|
+
}), N.current.querySelectorAll(
|
|
2719
2764
|
'[data-type="variable"]'
|
|
2720
|
-
).forEach((
|
|
2721
|
-
const
|
|
2722
|
-
if (
|
|
2723
|
-
const
|
|
2724
|
-
|
|
2765
|
+
).forEach((ae) => {
|
|
2766
|
+
const pe = ae.dataset.key, Ee = ae.dataset.multiKey;
|
|
2767
|
+
if (pe && Ee !== H) {
|
|
2768
|
+
const Z = ae.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2769
|
+
Z && (se[pe] = Z);
|
|
2725
2770
|
}
|
|
2726
|
-
}),
|
|
2727
|
-
...
|
|
2728
|
-
[H]:
|
|
2729
|
-
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:",
|
|
2771
|
+
}), N.current.__tempVariableValues = se, Me((ae) => ({
|
|
2772
|
+
...ae,
|
|
2773
|
+
[H]: W
|
|
2774
|
+
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", ne);
|
|
2730
2775
|
return;
|
|
2731
2776
|
} else g.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
|
|
2732
2777
|
}
|
|
2733
2778
|
}
|
|
2734
2779
|
}
|
|
2735
2780
|
}
|
|
2736
|
-
document.execCommand("insertText", !1, l),
|
|
2781
|
+
document.execCommand("insertText", !1, l), jt(), setTimeout(() => {
|
|
2737
2782
|
const h = window.getSelection();
|
|
2738
2783
|
if (h && h.rangeCount > 0) {
|
|
2739
2784
|
const m = h.anchorNode;
|
|
@@ -2746,47 +2791,47 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2746
2791
|
}
|
|
2747
2792
|
}
|
|
2748
2793
|
}, 0);
|
|
2749
|
-
},
|
|
2794
|
+
}, hn = (a) => {
|
|
2750
2795
|
if (!a.target.files) {
|
|
2751
|
-
a.target && (a.target.value = ""),
|
|
2796
|
+
a.target && (a.target.value = ""), xe(null), Ae(null);
|
|
2752
2797
|
return;
|
|
2753
2798
|
}
|
|
2754
2799
|
const l = 10 * 1024 * 1024, i = (m) => m.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(m.name || ""), h = (m) => i(m) && m.size > l;
|
|
2755
|
-
if (
|
|
2756
|
-
const m =
|
|
2757
|
-
if (q > 0 &&
|
|
2800
|
+
if (qe && a.target.files && a.target.files.length > 0) {
|
|
2801
|
+
const m = qe, H = t.find((f) => f.type === "upload" && f.key === m), x = Array.from(a.target.files), g = x.filter((f) => !h(f)), q = x.length - g.length;
|
|
2802
|
+
if (q > 0 && re.error(`已自动过滤 ${q} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), H && typeof H.maxCount == "number" && typeof H.minCount == "number") {
|
|
2758
2803
|
const f = H.maxCount;
|
|
2759
2804
|
let Q = 0;
|
|
2760
|
-
|
|
2805
|
+
ge((K) => {
|
|
2761
2806
|
for (let se = 0; se < f; se++) {
|
|
2762
|
-
const
|
|
2763
|
-
K[
|
|
2807
|
+
const ie = `${m}-${se}`;
|
|
2808
|
+
K[ie] && (Q = se + 1);
|
|
2764
2809
|
}
|
|
2765
|
-
const ee = f - Q,
|
|
2766
|
-
return
|
|
2767
|
-
const
|
|
2768
|
-
|
|
2769
|
-
}),
|
|
2810
|
+
const ee = f - Q, ne = g.slice(0, ee), W = { ...K };
|
|
2811
|
+
return ne.forEach((se, ie) => {
|
|
2812
|
+
const ae = `${m}-${Q + ie}`;
|
|
2813
|
+
W[ae] = se;
|
|
2814
|
+
}), W;
|
|
2770
2815
|
});
|
|
2771
2816
|
}
|
|
2772
|
-
} else if (
|
|
2773
|
-
const m = a.target.files[0], H =
|
|
2774
|
-
h(m) ?
|
|
2817
|
+
} else if ($e && a.target.files[0]) {
|
|
2818
|
+
const m = a.target.files[0], H = $e;
|
|
2819
|
+
h(m) ? re.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : ge((x) => ({ ...x, [H]: m }));
|
|
2775
2820
|
}
|
|
2776
|
-
a.target && (a.target.value = ""),
|
|
2777
|
-
},
|
|
2778
|
-
|
|
2821
|
+
a.target && (a.target.value = ""), xe(null), Ae(null);
|
|
2822
|
+
}, Yt = (a) => {
|
|
2823
|
+
ge((l) => {
|
|
2779
2824
|
const i = { ...l };
|
|
2780
2825
|
return delete i[a], i;
|
|
2781
2826
|
});
|
|
2782
|
-
},
|
|
2827
|
+
}, gn = (a) => {
|
|
2783
2828
|
const l = a.target;
|
|
2784
2829
|
if (l.closest(".rte-datepicker-wrapper") || l.closest(".rte-datepicker-host") || l.closest(".rte-select-wrapper") || l.closest(".rte-select-host") || l.closest(".ant-select-dropdown"))
|
|
2785
2830
|
return;
|
|
2786
2831
|
if (l.closest(".tag-close-btn")) {
|
|
2787
2832
|
if (a.preventDefault(), a.stopPropagation(), T)
|
|
2788
2833
|
return;
|
|
2789
|
-
|
|
2834
|
+
Ye(null), $ ? $() : N.current && (N.current.innerHTML = "", N.current.focus());
|
|
2790
2835
|
return;
|
|
2791
2836
|
}
|
|
2792
2837
|
if (T) {
|
|
@@ -2798,19 +2843,19 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2798
2843
|
return;
|
|
2799
2844
|
}
|
|
2800
2845
|
}
|
|
2801
|
-
l.closest('[data-type="variable"]') || (
|
|
2802
|
-
},
|
|
2803
|
-
if (!a.target.closest('[data-type="variable"]') &&
|
|
2804
|
-
const h = Math.abs(a.clientX -
|
|
2805
|
-
(h > 3 || m > 3) && (
|
|
2846
|
+
l.closest('[data-type="variable"]') || (Re.current = { x: a.clientX, y: a.clientY }, Ve.current = !1, l.closest(".file-remove-btn") && (a.preventDefault(), a.stopPropagation()));
|
|
2847
|
+
}, bn = (a) => {
|
|
2848
|
+
if (!a.target.closest('[data-type="variable"]') && Re.current) {
|
|
2849
|
+
const h = Math.abs(a.clientX - Re.current.x), m = Math.abs(a.clientY - Re.current.y);
|
|
2850
|
+
(h > 3 || m > 3) && (Ve.current = !0);
|
|
2806
2851
|
}
|
|
2807
|
-
},
|
|
2852
|
+
}, vn = (a) => {
|
|
2808
2853
|
if (a.target.closest('[data-type="variable"]')) {
|
|
2809
|
-
|
|
2854
|
+
Re.current = null, Ve.current = !1;
|
|
2810
2855
|
return;
|
|
2811
2856
|
}
|
|
2812
|
-
|
|
2813
|
-
},
|
|
2857
|
+
Re.current = null, Ve.current = !1;
|
|
2858
|
+
}, xn = (a) => {
|
|
2814
2859
|
if (o)
|
|
2815
2860
|
return;
|
|
2816
2861
|
const l = a.target;
|
|
@@ -2835,11 +2880,11 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2835
2880
|
return;
|
|
2836
2881
|
}
|
|
2837
2882
|
if (l.closest('[data-type="variable"]')) {
|
|
2838
|
-
if (
|
|
2883
|
+
if (Ve.current)
|
|
2839
2884
|
return;
|
|
2840
2885
|
setTimeout(() => {
|
|
2841
2886
|
const q = window.getSelection();
|
|
2842
|
-
q && !q.isCollapsed ||
|
|
2887
|
+
q && !q.isCollapsed || Tt(N);
|
|
2843
2888
|
}, 10);
|
|
2844
2889
|
return;
|
|
2845
2890
|
}
|
|
@@ -2852,22 +2897,22 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2852
2897
|
const K = t.find((ee) => ee.type === "upload" && ee.key === Q);
|
|
2853
2898
|
if (K && typeof K.maxCount == "number" && typeof K.minCount == "number") {
|
|
2854
2899
|
const ee = K.maxCount;
|
|
2855
|
-
|
|
2856
|
-
const
|
|
2857
|
-
for (let
|
|
2858
|
-
const
|
|
2859
|
-
|
|
2900
|
+
ge((ne) => {
|
|
2901
|
+
const W = { ...ne }, se = [];
|
|
2902
|
+
for (let ie = 0; ie < ee; ie++) {
|
|
2903
|
+
const ae = `${Q}-${ie}`, pe = W[ae];
|
|
2904
|
+
pe != null && ae !== f && se.push(pe);
|
|
2860
2905
|
}
|
|
2861
|
-
for (let
|
|
2862
|
-
delete
|
|
2863
|
-
return se.forEach((
|
|
2864
|
-
|
|
2865
|
-
}),
|
|
2906
|
+
for (let ie = 0; ie < ee; ie++)
|
|
2907
|
+
delete W[`${Q}-${ie}`];
|
|
2908
|
+
return se.forEach((ie, ae) => {
|
|
2909
|
+
W[`${Q}-${ae}`] = ie;
|
|
2910
|
+
}), W;
|
|
2866
2911
|
});
|
|
2867
2912
|
} else
|
|
2868
|
-
|
|
2913
|
+
Yt(f);
|
|
2869
2914
|
} else
|
|
2870
|
-
|
|
2915
|
+
Yt(f);
|
|
2871
2916
|
return;
|
|
2872
2917
|
}
|
|
2873
2918
|
const g = l.closest('[data-type="upload"]');
|
|
@@ -2878,21 +2923,21 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2878
2923
|
const Q = t.find((K) => K.type === "upload" && K.key === f);
|
|
2879
2924
|
if (Q && typeof Q.maxCount == "number" && typeof Q.minCount == "number") {
|
|
2880
2925
|
const K = Q.maxCount;
|
|
2881
|
-
if (
|
|
2882
|
-
|
|
2926
|
+
if (U[q] != null) {
|
|
2927
|
+
be.current && (be.current.multiple = !1), Ae(null), xe(q), be.current?.click();
|
|
2883
2928
|
return;
|
|
2884
2929
|
}
|
|
2885
|
-
let
|
|
2886
|
-
for (let
|
|
2887
|
-
|
|
2888
|
-
|
|
2930
|
+
let ne = 0;
|
|
2931
|
+
for (let W = 0; W < K; W++)
|
|
2932
|
+
U[`${f}-${W}`] != null && (ne += 1);
|
|
2933
|
+
ne < K && be.current ? (be.current.multiple = !0, Ae(f), be.current.click()) : (be.current && (be.current.multiple = !1), xe(q), be.current?.click());
|
|
2889
2934
|
} else
|
|
2890
|
-
|
|
2935
|
+
be.current && (be.current.multiple = !1), xe(q), be.current?.click();
|
|
2891
2936
|
} else
|
|
2892
|
-
|
|
2937
|
+
be.current && (be.current.multiple = !1), xe(q), be.current?.click();
|
|
2893
2938
|
return;
|
|
2894
2939
|
}
|
|
2895
|
-
},
|
|
2940
|
+
}, wn = (a) => {
|
|
2896
2941
|
const i = a.target.closest('[data-type="variable"]');
|
|
2897
2942
|
if (i) {
|
|
2898
2943
|
const h = window.getSelection();
|
|
@@ -2908,15 +2953,15 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2908
2953
|
h.removeAllRanges(), h.addRange(m);
|
|
2909
2954
|
}
|
|
2910
2955
|
}
|
|
2911
|
-
},
|
|
2956
|
+
}, jt = () => {
|
|
2912
2957
|
if (t.length === 0) {
|
|
2913
|
-
if (
|
|
2914
|
-
const i = !(
|
|
2915
|
-
|
|
2958
|
+
if (N.current) {
|
|
2959
|
+
const i = !(N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
|
|
2960
|
+
rt(i), Oe(!i);
|
|
2916
2961
|
}
|
|
2917
2962
|
return;
|
|
2918
2963
|
}
|
|
2919
|
-
|
|
2964
|
+
Tt(N);
|
|
2920
2965
|
try {
|
|
2921
2966
|
const i = window.getSelection()?.anchorNode ?? null;
|
|
2922
2967
|
let h = null;
|
|
@@ -2929,21 +2974,21 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2929
2974
|
if (m) {
|
|
2930
2975
|
const H = h.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2931
2976
|
if (H) {
|
|
2932
|
-
if (!
|
|
2933
|
-
|
|
2934
|
-
const g =
|
|
2935
|
-
g && window.clearTimeout(g),
|
|
2936
|
-
|
|
2977
|
+
if (!Ct(H).reportId || tt.current[m] === H) return;
|
|
2978
|
+
tt.current[m] = H;
|
|
2979
|
+
const g = Ge.current[m];
|
|
2980
|
+
g && window.clearTimeout(g), Ge.current[m] = window.setTimeout(() => {
|
|
2981
|
+
bt.current(m, H);
|
|
2937
2982
|
}, 400);
|
|
2938
2983
|
} else {
|
|
2939
|
-
const x =
|
|
2940
|
-
x && window.clearTimeout(x), delete
|
|
2984
|
+
const x = Ge.current[m];
|
|
2985
|
+
x && window.clearTimeout(x), delete Ge.current[m], tt.current[m] = "", bt.current(m, "");
|
|
2941
2986
|
}
|
|
2942
2987
|
}
|
|
2943
2988
|
}
|
|
2944
2989
|
} catch {
|
|
2945
2990
|
}
|
|
2946
|
-
if (
|
|
2991
|
+
if (N.current && N.current.querySelectorAll('[data-type="variable"]').forEach((i) => {
|
|
2947
2992
|
const h = i.querySelector(".variable-info-icon");
|
|
2948
2993
|
if (h) {
|
|
2949
2994
|
let m = !1;
|
|
@@ -2961,12 +3006,12 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2961
3006
|
}
|
|
2962
3007
|
m ? h.classList.add("hidden") : h.classList.remove("hidden");
|
|
2963
3008
|
}
|
|
2964
|
-
}),
|
|
3009
|
+
}), St(N, t, U), Nt(N, Te, U, Oe), !N.current) return;
|
|
2965
3010
|
t.filter((l) => l.type === "multi-variable" && l.key).forEach((l) => {
|
|
2966
3011
|
if (!l.key) return;
|
|
2967
|
-
const i = l.maxCount || 9, h =
|
|
3012
|
+
const i = l.maxCount || 9, h = Be[l.key] || 1, m = [];
|
|
2968
3013
|
for (let f = 0; f < h; f++) {
|
|
2969
|
-
const Q = `${l.key}_${f}`, K =
|
|
3014
|
+
const Q = `${l.key}_${f}`, K = N.current.querySelector(
|
|
2970
3015
|
`[data-type="variable"][data-key="${Q}"][data-multi-key="${l.key}"]`
|
|
2971
3016
|
);
|
|
2972
3017
|
if (K) {
|
|
@@ -2984,150 +3029,150 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
2984
3029
|
if (g && q >= 0) {
|
|
2985
3030
|
const f = window.getSelection();
|
|
2986
3031
|
if (f && f.rangeCount > 0) {
|
|
2987
|
-
const
|
|
2988
|
-
if (
|
|
2989
|
-
const
|
|
2990
|
-
if (
|
|
2991
|
-
const
|
|
2992
|
-
|
|
2993
|
-
const
|
|
2994
|
-
|
|
3032
|
+
const W = f.getRangeAt(0), se = W.startContainer, ie = se.nodeType === Node.ELEMENT_NODE ? se.closest('[data-type="variable"][data-multi-key]') : se.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
3033
|
+
if (ie) {
|
|
3034
|
+
const ae = ie.dataset.key;
|
|
3035
|
+
if (ae) {
|
|
3036
|
+
const pe = document.createRange();
|
|
3037
|
+
pe.setStartBefore(ie), pe.setEnd(W.startContainer, W.startOffset);
|
|
3038
|
+
const Ee = pe.toString().length;
|
|
3039
|
+
nt.current = { key: ae, offset: Ee };
|
|
2995
3040
|
}
|
|
2996
3041
|
}
|
|
2997
3042
|
}
|
|
2998
3043
|
const Q = [...m];
|
|
2999
|
-
for (let
|
|
3000
|
-
Q[
|
|
3044
|
+
for (let W = q; W < Q.length - 1; W++)
|
|
3045
|
+
Q[W] = Q[W + 1];
|
|
3001
3046
|
Q.pop();
|
|
3002
3047
|
const K = {};
|
|
3003
|
-
Q.forEach((
|
|
3004
|
-
|
|
3048
|
+
Q.forEach((W, se) => {
|
|
3049
|
+
W && (K[`${l.key}_${se}`] = W);
|
|
3005
3050
|
});
|
|
3006
3051
|
const ee = Math.max(x ? Q.length : Q.length + 1, 1);
|
|
3007
|
-
|
|
3052
|
+
N.current.querySelectorAll(
|
|
3008
3053
|
'[data-type="variable"]'
|
|
3009
|
-
).forEach((
|
|
3010
|
-
const se =
|
|
3011
|
-
if (se &&
|
|
3012
|
-
const
|
|
3013
|
-
|
|
3054
|
+
).forEach((W) => {
|
|
3055
|
+
const se = W.dataset.key, ie = W.dataset.multiKey;
|
|
3056
|
+
if (se && ie !== l.key) {
|
|
3057
|
+
const ae = W.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3058
|
+
ae && (K[se] = ae);
|
|
3014
3059
|
}
|
|
3015
|
-
}),
|
|
3016
|
-
...
|
|
3060
|
+
}), N.current.__tempVariableValues = K, Me((W) => ({
|
|
3061
|
+
...W,
|
|
3017
3062
|
[l.key]: ee
|
|
3018
3063
|
}));
|
|
3019
3064
|
return;
|
|
3020
3065
|
}
|
|
3021
3066
|
if (!x) {
|
|
3022
|
-
const f = h - 1, Q = `${l.key}_${f}`, K =
|
|
3067
|
+
const f = h - 1, Q = `${l.key}_${f}`, K = N.current.querySelector(
|
|
3023
3068
|
`[data-type="variable"][data-key="${Q}"][data-multi-key="${l.key}"]`
|
|
3024
3069
|
);
|
|
3025
3070
|
if (K && K.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && h < i) {
|
|
3026
|
-
const
|
|
3027
|
-
if (
|
|
3028
|
-
const
|
|
3029
|
-
if (
|
|
3030
|
-
const
|
|
3031
|
-
if (
|
|
3032
|
-
const
|
|
3033
|
-
|
|
3034
|
-
const
|
|
3035
|
-
|
|
3071
|
+
const ne = window.getSelection();
|
|
3072
|
+
if (ne && ne.rangeCount > 0) {
|
|
3073
|
+
const W = ne.getRangeAt(0), se = W.startContainer, ie = se.nodeType === Node.ELEMENT_NODE ? se.closest('[data-type="variable"][data-multi-key]') : se.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
3074
|
+
if (ie) {
|
|
3075
|
+
const ae = ie.dataset.key;
|
|
3076
|
+
if (ae) {
|
|
3077
|
+
const pe = document.createRange();
|
|
3078
|
+
pe.setStartBefore(ie), pe.setEnd(W.startContainer, W.startOffset);
|
|
3079
|
+
const Ee = pe.toString().length;
|
|
3080
|
+
nt.current = { key: ae, offset: Ee };
|
|
3036
3081
|
}
|
|
3037
3082
|
}
|
|
3038
3083
|
}
|
|
3039
|
-
|
|
3040
|
-
...
|
|
3084
|
+
Me((W) => ({
|
|
3085
|
+
...W,
|
|
3041
3086
|
[l.key]: h + 1
|
|
3042
3087
|
}));
|
|
3043
3088
|
}
|
|
3044
3089
|
}
|
|
3045
3090
|
});
|
|
3046
3091
|
};
|
|
3047
|
-
|
|
3048
|
-
const a =
|
|
3092
|
+
Je(() => {
|
|
3093
|
+
const a = N.current;
|
|
3049
3094
|
if (!a) return;
|
|
3050
3095
|
const l = /* @__PURE__ */ new Map(), i = (H) => {
|
|
3051
3096
|
const x = H.target, g = H.relatedTarget;
|
|
3052
|
-
!x || !
|
|
3053
|
-
if (
|
|
3054
|
-
if (
|
|
3055
|
-
const q =
|
|
3056
|
-
|
|
3097
|
+
!x || !N.current || !N.current.contains(x) || g && N.current.contains(g) || setTimeout(() => {
|
|
3098
|
+
if (N.current) {
|
|
3099
|
+
if (Te.length === 0) {
|
|
3100
|
+
const q = N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
3101
|
+
Oe(q.length > 0);
|
|
3057
3102
|
return;
|
|
3058
3103
|
}
|
|
3059
|
-
|
|
3104
|
+
Tt(N), St(N, Te, U), Nt(N, Te, U, Oe);
|
|
3060
3105
|
}
|
|
3061
3106
|
}, 0);
|
|
3062
3107
|
};
|
|
3063
3108
|
a.addEventListener("blur", i, !0);
|
|
3064
3109
|
const h = () => {
|
|
3065
|
-
if (!
|
|
3110
|
+
if (!N.current) return;
|
|
3066
3111
|
l.forEach((g, q) => {
|
|
3067
3112
|
q.removeEventListener("blur", g, !1);
|
|
3068
3113
|
}), l.clear();
|
|
3069
|
-
const H =
|
|
3114
|
+
const H = N.current.querySelectorAll(
|
|
3070
3115
|
'[data-type="variable"][data-multi-key]'
|
|
3071
3116
|
), x = (g) => {
|
|
3072
3117
|
g.stopPropagation(), g.stopImmediatePropagation();
|
|
3073
3118
|
const q = g.target;
|
|
3074
|
-
if (!q || !
|
|
3119
|
+
if (!q || !N.current || !N.current.contains(q))
|
|
3075
3120
|
return;
|
|
3076
3121
|
const f = q.closest('[data-type="variable"][data-multi-key]');
|
|
3077
|
-
if (!f || !
|
|
3122
|
+
if (!f || !N.current.contains(f))
|
|
3078
3123
|
return;
|
|
3079
3124
|
let Q = !1;
|
|
3080
|
-
if (l.forEach((
|
|
3081
|
-
(
|
|
3125
|
+
if (l.forEach((pe, Ee) => {
|
|
3126
|
+
(Ee === f || Ee.contains(q)) && (Q = !0);
|
|
3082
3127
|
}), !Q)
|
|
3083
3128
|
return;
|
|
3084
|
-
const K = f.dataset.multiKey, ee = f.dataset.key,
|
|
3085
|
-
if (!K || !ee ||
|
|
3086
|
-
const
|
|
3087
|
-
if (!(!
|
|
3129
|
+
const K = f.dataset.multiKey, ee = f.dataset.key, ne = f.dataset.index;
|
|
3130
|
+
if (!K || !ee || ne === void 0) return;
|
|
3131
|
+
const W = g.relatedTarget;
|
|
3132
|
+
if (!(!W || !N.current.contains(W)))
|
|
3088
3133
|
return;
|
|
3089
|
-
const
|
|
3134
|
+
const ie = f.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3090
3135
|
console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
|
|
3091
3136
|
multiKey: K,
|
|
3092
3137
|
currentKey: ee,
|
|
3093
|
-
index:
|
|
3094
|
-
content:
|
|
3138
|
+
index: ne,
|
|
3139
|
+
content: ie
|
|
3095
3140
|
});
|
|
3096
|
-
const
|
|
3097
|
-
if (
|
|
3098
|
-
const
|
|
3099
|
-
console.log("[Blur Event] 拆分前的内容:",
|
|
3100
|
-
const
|
|
3101
|
-
if (console.log("[Blur Event] 有效的部分(最多9个):",
|
|
3102
|
-
const
|
|
3103
|
-
if (
|
|
3104
|
-
const
|
|
3105
|
-
for (let
|
|
3106
|
-
const
|
|
3107
|
-
`[data-type="variable"][data-key="${
|
|
3141
|
+
const ae = /[、,,\s]+/;
|
|
3142
|
+
if (ae.test(ie)) {
|
|
3143
|
+
const pe = ie.split(ae).map((le) => le.trim()).filter((le) => le.length > 0);
|
|
3144
|
+
console.log("[Blur Event] 拆分前的内容:", ie), console.log("[Blur Event] 拆分后的部分:", pe);
|
|
3145
|
+
const Z = pe.slice(0, 9);
|
|
3146
|
+
if (console.log("[Blur Event] 有效的部分(最多9个):", Z), Z.length > 1) {
|
|
3147
|
+
const le = t.find((we) => we.type === "multi-variable" && we.key === K);
|
|
3148
|
+
if (le) {
|
|
3149
|
+
const we = Be[K] || 1, ve = parseInt(ne, 10), Se = le.maxCount || 9, ke = [];
|
|
3150
|
+
for (let Ne = 0; Ne < we; Ne++) {
|
|
3151
|
+
const ze = `${K}_${Ne}`, ut = N.current.querySelector(
|
|
3152
|
+
`[data-type="variable"][data-key="${ze}"][data-multi-key="${K}"]`
|
|
3108
3153
|
);
|
|
3109
|
-
if (
|
|
3110
|
-
const
|
|
3111
|
-
|
|
3154
|
+
if (ut) {
|
|
3155
|
+
const dt = ut.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3156
|
+
ke.push(dt);
|
|
3112
3157
|
}
|
|
3113
3158
|
}
|
|
3114
|
-
console.log("[Blur Event] 拆分前的所有值:",
|
|
3115
|
-
const
|
|
3116
|
-
console.log("[Blur Event] 拆分后的所有值:",
|
|
3117
|
-
const
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
}),
|
|
3159
|
+
console.log("[Blur Event] 拆分前的所有值:", ke), console.log("[Blur Event] 当前索引:", ve), console.log("[Blur Event] 要插入的值:", Z), ke.splice(ve, 1, ...Z);
|
|
3160
|
+
const Ce = ke.slice(0, Se);
|
|
3161
|
+
console.log("[Blur Event] 拆分后的所有值:", Ce), Ce.length > 0 && Ce[Ce.length - 1] !== "" && Ce.length < Se && Ce.push("");
|
|
3162
|
+
const Wt = Math.max(Ce.length, 1), Xe = {};
|
|
3163
|
+
Ce.forEach((Ne, ze) => {
|
|
3164
|
+
Ne && (Xe[`${K}_${ze}`] = Ne);
|
|
3165
|
+
}), N.current.querySelectorAll(
|
|
3121
3166
|
'[data-type="variable"]'
|
|
3122
|
-
).forEach((
|
|
3123
|
-
const
|
|
3124
|
-
if (
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3167
|
+
).forEach((Ne) => {
|
|
3168
|
+
const ze = Ne.dataset.key, ut = Ne.dataset.multiKey;
|
|
3169
|
+
if (ze && ut !== K) {
|
|
3170
|
+
const dt = Ne.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3171
|
+
dt && (Xe[ze] = dt);
|
|
3127
3172
|
}
|
|
3128
|
-
}),
|
|
3129
|
-
...
|
|
3130
|
-
[K]:
|
|
3173
|
+
}), N.current.__tempVariableValues = Xe, Me((Ne) => ({
|
|
3174
|
+
...Ne,
|
|
3175
|
+
[K]: Wt
|
|
3131
3176
|
}));
|
|
3132
3177
|
}
|
|
3133
3178
|
}
|
|
@@ -3144,8 +3189,8 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3144
3189
|
x.removeEventListener("blur", H, !1);
|
|
3145
3190
|
}), l.clear();
|
|
3146
3191
|
};
|
|
3147
|
-
}, [t,
|
|
3148
|
-
const
|
|
3192
|
+
}, [t, Te, Be, U]);
|
|
3193
|
+
const kn = (a) => {
|
|
3149
3194
|
if (o) {
|
|
3150
3195
|
a.preventDefault();
|
|
3151
3196
|
return;
|
|
@@ -3159,8 +3204,8 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3159
3204
|
const i = l.anchorNode;
|
|
3160
3205
|
let h = null;
|
|
3161
3206
|
if (i && (i.nodeType === Node.ELEMENT_NODE ? h = i.closest('[data-type="text"]') : i.nodeType === Node.TEXT_NODE && i.parentElement && (h = i.parentElement.closest('[data-type="text"]'))), h) {
|
|
3162
|
-
if (a.preventDefault(), a.stopPropagation(),
|
|
3163
|
-
const m =
|
|
3207
|
+
if (a.preventDefault(), a.stopPropagation(), N.current) {
|
|
3208
|
+
const m = N.current.querySelector(
|
|
3164
3209
|
'[data-type="variable"], [data-type="upload"]'
|
|
3165
3210
|
);
|
|
3166
3211
|
m && m.focus();
|
|
@@ -3172,8 +3217,8 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3172
3217
|
const i = l.anchorNode;
|
|
3173
3218
|
let h = null;
|
|
3174
3219
|
if (i && (i.nodeType === Node.ELEMENT_NODE ? h = i.closest(".tag-node") : i.nodeType === Node.TEXT_NODE && i.parentElement && (h = i.parentElement.closest(".tag-node"))), h) {
|
|
3175
|
-
if (a.preventDefault(), a.stopPropagation(),
|
|
3176
|
-
const m =
|
|
3220
|
+
if (a.preventDefault(), a.stopPropagation(), N.current) {
|
|
3221
|
+
const m = N.current.querySelector(
|
|
3177
3222
|
'[data-type="variable"], [data-type="upload"]'
|
|
3178
3223
|
);
|
|
3179
3224
|
m && m.focus();
|
|
@@ -3181,12 +3226,12 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3181
3226
|
return;
|
|
3182
3227
|
}
|
|
3183
3228
|
}
|
|
3184
|
-
if (a.key === "Escape" &&
|
|
3229
|
+
if (a.key === "Escape" && N.current) {
|
|
3185
3230
|
if (T) {
|
|
3186
3231
|
a.preventDefault();
|
|
3187
3232
|
return;
|
|
3188
3233
|
}
|
|
3189
|
-
|
|
3234
|
+
N.current.innerHTML = "", N.current.focus();
|
|
3190
3235
|
}
|
|
3191
3236
|
if (a.key === "Backspace") {
|
|
3192
3237
|
const i = window.getSelection();
|
|
@@ -3223,19 +3268,19 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3223
3268
|
}
|
|
3224
3269
|
}
|
|
3225
3270
|
}
|
|
3226
|
-
},
|
|
3227
|
-
if (s || o ||
|
|
3271
|
+
}, $n = () => {
|
|
3272
|
+
if (s || o || E || !Mt || !N.current) return;
|
|
3228
3273
|
if (t.length === 0) {
|
|
3229
|
-
const x =
|
|
3274
|
+
const x = N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
3230
3275
|
if (!x) return;
|
|
3231
|
-
if (y(x, x),
|
|
3232
|
-
|
|
3276
|
+
if (y(x, x), N.current) {
|
|
3277
|
+
N.current.textContent = "";
|
|
3233
3278
|
const g = new Event("input", { bubbles: !0 });
|
|
3234
|
-
|
|
3279
|
+
N.current.dispatchEvent(g);
|
|
3235
3280
|
}
|
|
3236
3281
|
return;
|
|
3237
3282
|
}
|
|
3238
|
-
const a =
|
|
3283
|
+
const a = N.current;
|
|
3239
3284
|
let l = "";
|
|
3240
3285
|
const i = {}, h = /* @__PURE__ */ new Set(), m = (x) => {
|
|
3241
3286
|
if (!(x.nodeType === Node.ELEMENT_NODE && x.style.display === "none")) {
|
|
@@ -3249,23 +3294,23 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3249
3294
|
g,
|
|
3250
3295
|
NodeFilter.SHOW_TEXT,
|
|
3251
3296
|
{
|
|
3252
|
-
acceptNode: (
|
|
3297
|
+
acceptNode: (W) => {
|
|
3253
3298
|
const se = g.querySelector(".variable-info-icon");
|
|
3254
|
-
return se && se.contains(
|
|
3299
|
+
return se && se.contains(W) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
3255
3300
|
}
|
|
3256
3301
|
}
|
|
3257
3302
|
);
|
|
3258
3303
|
for (; ee.nextNode(); )
|
|
3259
3304
|
K += ee.currentNode.textContent || "";
|
|
3260
|
-
const
|
|
3261
|
-
if (
|
|
3262
|
-
const
|
|
3263
|
-
if (
|
|
3264
|
-
(!i[
|
|
3265
|
-
const se = i[
|
|
3266
|
-
se.push(
|
|
3305
|
+
const ne = K.replace(/[\u200B\n]/g, "").trim();
|
|
3306
|
+
if (ne) {
|
|
3307
|
+
const W = g.dataset.multiKey;
|
|
3308
|
+
if (W) {
|
|
3309
|
+
(!i[W] || !Array.isArray(i[W])) && (i[W] = []);
|
|
3310
|
+
const se = i[W];
|
|
3311
|
+
se.push(ne), se.length > 1 && (l += " "), l += ne;
|
|
3267
3312
|
} else
|
|
3268
|
-
Q === "report-url" ? (i[`${f}__sourceUrl`] =
|
|
3313
|
+
Q === "report-url" ? (i[`${f}__sourceUrl`] = ne, l += ne) : (i[f] = ne, l += ne);
|
|
3269
3314
|
}
|
|
3270
3315
|
} else if (q === "select" && f) {
|
|
3271
3316
|
const K = (g.getAttribute("data-value") || "").trim();
|
|
@@ -3277,33 +3322,33 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3277
3322
|
const ee = (g.textContent || "").replace(/\u200B/g, "").trim();
|
|
3278
3323
|
if (ee)
|
|
3279
3324
|
if (Q === "report-module") {
|
|
3280
|
-
const
|
|
3281
|
-
(!i[
|
|
3325
|
+
const W = (f.match(/^(.*)__module_\d+$/)?.[1] || f).trim();
|
|
3326
|
+
(!i[W] || !Array.isArray(i[W])) && (i[W] = []), i[W].push(ee), h.add(W), l += ee;
|
|
3282
3327
|
} else
|
|
3283
3328
|
i[f] = ee, l += ee;
|
|
3284
3329
|
} else if (q === "datepicker" && f) {
|
|
3285
3330
|
const ee = (g.getAttribute("data-value") || "").trim();
|
|
3286
3331
|
if (ee)
|
|
3287
3332
|
if (ee.includes(",")) {
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3333
|
+
const ne = ee.split(",");
|
|
3334
|
+
ne.length === 2 ? (i[f] = ne, l += `[${ne[0]}, ${ne[1]}]`) : (i[f] = ee, l += ee);
|
|
3290
3335
|
} else
|
|
3291
3336
|
i[f] = ee, l += ee;
|
|
3292
3337
|
} else if (q === "upload" && f) {
|
|
3293
3338
|
const K = g.dataset.batchKey;
|
|
3294
3339
|
if (K) {
|
|
3295
|
-
const ee = t.find((
|
|
3340
|
+
const ee = t.find((ne) => ne.type === "upload" && ne.key === K);
|
|
3296
3341
|
if (ee && typeof ee.maxCount == "number" && typeof ee.minCount == "number") {
|
|
3297
|
-
const
|
|
3298
|
-
for (let
|
|
3299
|
-
const se = `${K}-${
|
|
3300
|
-
|
|
3342
|
+
const ne = [];
|
|
3343
|
+
for (let W = 0; W < ee.maxCount; W++) {
|
|
3344
|
+
const se = `${K}-${W}`, ie = U[se];
|
|
3345
|
+
ie && ne.push(ie);
|
|
3301
3346
|
}
|
|
3302
|
-
i[K] || (i[K] =
|
|
3347
|
+
i[K] || (i[K] = ne.length > 0 ? ne : null, ne.length > 0 && (l += ` [附带${ne.length}个文件: ${ne.map((W) => W.name).join(", ")}] `));
|
|
3303
3348
|
} else
|
|
3304
|
-
i[f] =
|
|
3349
|
+
i[f] = U[f] ?? null, U[f] && (l += ` [附带文件: ${U[f]?.name}] `);
|
|
3305
3350
|
} else
|
|
3306
|
-
i[f] =
|
|
3351
|
+
i[f] = U[f] ?? null, U[f] && (l += ` [附带文件: ${U[f]?.name}] `);
|
|
3307
3352
|
} else {
|
|
3308
3353
|
if (g.classList.contains("tag-close-btn") || g.classList.contains("file-remove-btn")) return;
|
|
3309
3354
|
g.getAttribute("contenteditable") === "false" && !q && g.classList.contains("tag-node") ? l += g.innerText : g.childNodes.forEach(m);
|
|
@@ -3323,38 +3368,38 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3323
3368
|
f != null && (f instanceof File ? H.append(`${x}[${Q}]`, f) : typeof f == "string" ? H.append(`${x}[${Q}]`, f) : H.append(`${x}[${Q}]`, String(f)));
|
|
3324
3369
|
}) : typeof g == "string" ? H.append(x, g) : H.append(x, String(g)));
|
|
3325
3370
|
}), y(H, l);
|
|
3326
|
-
},
|
|
3371
|
+
}, Ie = je ? !1 : at ? v : ot, En = Math.max(
|
|
3327
3372
|
0,
|
|
3328
|
-
|
|
3329
|
-
),
|
|
3373
|
+
R - sn
|
|
3374
|
+
), Le = typeof _ == "number" && _ > 0 ? _ : 0, Cn = {
|
|
3330
3375
|
...b ? { width: typeof b == "number" ? `${b}px` : b } : {},
|
|
3331
3376
|
...w ? { border: w } : {},
|
|
3332
|
-
...
|
|
3333
|
-
...
|
|
3334
|
-
transition: `height ${
|
|
3377
|
+
...V ? { background: V } : {},
|
|
3378
|
+
...Le ? {
|
|
3379
|
+
transition: `height ${Le}ms cubic-bezier(0.2, 0, 0, 1), max-height ${Le}ms cubic-bezier(0.2, 0, 0, 1)`
|
|
3335
3380
|
} : {},
|
|
3336
|
-
...
|
|
3337
|
-
height: `${
|
|
3338
|
-
maxHeight: `${
|
|
3339
|
-
minHeight: `${
|
|
3381
|
+
...Ie ? {
|
|
3382
|
+
height: `${R}px`,
|
|
3383
|
+
maxHeight: `${R}px`,
|
|
3384
|
+
minHeight: `${R}px`
|
|
3340
3385
|
} : {
|
|
3341
3386
|
...e ? { maxHeight: typeof e == "number" ? `${e}px` : e } : {},
|
|
3342
3387
|
...n ? { minHeight: typeof n == "number" ? `${n}px` : n } : {}
|
|
3343
3388
|
}
|
|
3344
3389
|
};
|
|
3345
|
-
return
|
|
3346
|
-
if (!
|
|
3390
|
+
return Je(() => {
|
|
3391
|
+
if (!Ie || !ye.current) return;
|
|
3347
3392
|
const l = window.requestAnimationFrame(() => {
|
|
3348
|
-
|
|
3393
|
+
ye.current && (ye.current.scrollTop = 0, ye.current.scrollLeft = 0);
|
|
3349
3394
|
});
|
|
3350
3395
|
return () => window.cancelAnimationFrame(l);
|
|
3351
|
-
}, [
|
|
3352
|
-
if (!
|
|
3353
|
-
const a =
|
|
3396
|
+
}, [Ie]), Je(() => {
|
|
3397
|
+
if (!Ie) return;
|
|
3398
|
+
const a = vt.current;
|
|
3354
3399
|
if (!a) return;
|
|
3355
|
-
const l =
|
|
3400
|
+
const l = de.current?.getBoundingClientRect().height ?? 0, i = Math.max(0, a - l);
|
|
3356
3401
|
if (i > 0) {
|
|
3357
|
-
const h =
|
|
3402
|
+
const h = Bt.current;
|
|
3358
3403
|
if (h === window) {
|
|
3359
3404
|
const m = document.documentElement;
|
|
3360
3405
|
m.scrollTop = Math.max(0, m.scrollTop - i);
|
|
@@ -3363,43 +3408,43 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3363
3408
|
m.scrollTop = Math.max(0, m.scrollTop - i);
|
|
3364
3409
|
}
|
|
3365
3410
|
}
|
|
3366
|
-
|
|
3367
|
-
}, [
|
|
3411
|
+
vt.current = null;
|
|
3412
|
+
}, [Ie]), /* @__PURE__ */ ue(
|
|
3368
3413
|
"div",
|
|
3369
3414
|
{
|
|
3370
|
-
className: `rich-text-editor${
|
|
3371
|
-
style:
|
|
3415
|
+
className: `rich-text-editor${Ie ? " rte-auto-collapsed" : ""}${r ? ` ${r}` : ""}`,
|
|
3416
|
+
style: Cn,
|
|
3372
3417
|
"data-disabled": o,
|
|
3373
|
-
ref:
|
|
3418
|
+
ref: de,
|
|
3374
3419
|
children: [
|
|
3375
|
-
|
|
3376
|
-
/* @__PURE__ */
|
|
3420
|
+
me,
|
|
3421
|
+
/* @__PURE__ */ ue(
|
|
3377
3422
|
"div",
|
|
3378
3423
|
{
|
|
3379
3424
|
className: "rich-text-editor-content",
|
|
3380
|
-
ref:
|
|
3381
|
-
style:
|
|
3425
|
+
ref: ye,
|
|
3426
|
+
style: Ie ? {
|
|
3382
3427
|
// 折叠态:只裁切内容区(footer 保持),高度由 collapsedTotalHeight - footerHeight 得出
|
|
3383
|
-
maxHeight: `${
|
|
3428
|
+
maxHeight: `${En}px`,
|
|
3384
3429
|
overflow: "hidden",
|
|
3385
|
-
...
|
|
3386
|
-
transition: `max-height ${
|
|
3430
|
+
...Le ? {
|
|
3431
|
+
transition: `max-height ${Le}ms cubic-bezier(0.2, 0, 0, 1)`
|
|
3387
3432
|
} : {}
|
|
3388
|
-
} :
|
|
3433
|
+
} : Le ? { transition: `max-height ${Le}ms cubic-bezier(0.2, 0, 0, 1)` } : void 0,
|
|
3389
3434
|
children: [
|
|
3390
3435
|
/* @__PURE__ */ L(
|
|
3391
3436
|
"div",
|
|
3392
3437
|
{
|
|
3393
|
-
ref:
|
|
3394
|
-
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${
|
|
3438
|
+
ref: N,
|
|
3439
|
+
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${on && S ? "rte-editor-empty" : ""}`,
|
|
3395
3440
|
contentEditable: t.length === 0,
|
|
3396
3441
|
suppressContentEditableWarning: !0,
|
|
3397
|
-
"data-placeholder":
|
|
3398
|
-
onMouseDown:
|
|
3399
|
-
onMouseMove:
|
|
3400
|
-
onMouseUp:
|
|
3442
|
+
"data-placeholder": S,
|
|
3443
|
+
onMouseDown: gn,
|
|
3444
|
+
onMouseMove: bn,
|
|
3445
|
+
onMouseUp: vn,
|
|
3401
3446
|
onClick: (a) => {
|
|
3402
|
-
|
|
3447
|
+
xn(a);
|
|
3403
3448
|
const l = a.target;
|
|
3404
3449
|
if (l) {
|
|
3405
3450
|
const h = [
|
|
@@ -3429,45 +3474,45 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3429
3474
|
].join(",");
|
|
3430
3475
|
if (l.closest(h)) return;
|
|
3431
3476
|
}
|
|
3432
|
-
if (
|
|
3433
|
-
if (
|
|
3434
|
-
|
|
3477
|
+
if (p || d && !je) {
|
|
3478
|
+
if (dn || d && je) return;
|
|
3479
|
+
d && typeof X == "number" && X > 0 && (wt.current = Date.now() + X), pn(!Ie, "click");
|
|
3435
3480
|
}
|
|
3436
|
-
|
|
3481
|
+
u && u(a);
|
|
3437
3482
|
},
|
|
3438
|
-
onDoubleClick:
|
|
3439
|
-
onInput:
|
|
3440
|
-
onKeyDown:
|
|
3441
|
-
onPaste:
|
|
3483
|
+
onDoubleClick: wn,
|
|
3484
|
+
onInput: jt,
|
|
3485
|
+
onKeyDown: kn,
|
|
3486
|
+
onPaste: yn
|
|
3442
3487
|
}
|
|
3443
3488
|
),
|
|
3444
3489
|
/* @__PURE__ */ L(
|
|
3445
3490
|
"input",
|
|
3446
3491
|
{
|
|
3447
3492
|
type: "file",
|
|
3448
|
-
ref:
|
|
3493
|
+
ref: be,
|
|
3449
3494
|
className: "rte-file-input",
|
|
3450
3495
|
accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
|
|
3451
|
-
onChange:
|
|
3496
|
+
onChange: hn
|
|
3452
3497
|
}
|
|
3453
3498
|
)
|
|
3454
3499
|
]
|
|
3455
3500
|
}
|
|
3456
3501
|
),
|
|
3457
|
-
/* @__PURE__ */
|
|
3458
|
-
/* @__PURE__ */ L("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */
|
|
3459
|
-
/* @__PURE__ */
|
|
3502
|
+
/* @__PURE__ */ ue("div", { className: "rich-text-editor-footer", ref: It, children: [
|
|
3503
|
+
/* @__PURE__ */ L("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ ue("div", { className: "rich-text-editor-brand", children: [
|
|
3504
|
+
/* @__PURE__ */ ue("div", { className: "rte-brand-badge", children: [
|
|
3460
3505
|
/* @__PURE__ */ L("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
|
|
3461
3506
|
/* @__PURE__ */ L("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
|
|
3462
3507
|
] }),
|
|
3463
3508
|
k !== "hideAgent" && /* @__PURE__ */ L(
|
|
3464
|
-
|
|
3509
|
+
In,
|
|
3465
3510
|
{
|
|
3466
3511
|
placement: "topLeft",
|
|
3467
3512
|
menu: {
|
|
3468
3513
|
items: I.filter((a) => a.isShowNew !== 1).map((a) => ({
|
|
3469
3514
|
key: a.key,
|
|
3470
|
-
label: /* @__PURE__ */
|
|
3515
|
+
label: /* @__PURE__ */ ue("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3471
3516
|
a.icon && /* @__PURE__ */ L("i", { className: a.icon }),
|
|
3472
3517
|
/* @__PURE__ */ L("span", { children: a.label })
|
|
3473
3518
|
] }),
|
|
@@ -3479,21 +3524,21 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3479
3524
|
trigger: ["click"],
|
|
3480
3525
|
disabled: o || s,
|
|
3481
3526
|
overlayClassName: "rte-agent-dropdown",
|
|
3482
|
-
children: /* @__PURE__ */
|
|
3527
|
+
children: /* @__PURE__ */ ue("div", { className: "rte-agent-badge", style: { cursor: I.length > 0 ? "pointer" : "default" }, children: [
|
|
3483
3528
|
/* @__PURE__ */ L("i", { className: "iconfont icon-zhinengti", style: { fontSize: "16px" } }),
|
|
3484
3529
|
/* @__PURE__ */ L("span", { className: "rte-agent-text", children: "智能体" })
|
|
3485
3530
|
] })
|
|
3486
3531
|
}
|
|
3487
3532
|
)
|
|
3488
3533
|
] }) }),
|
|
3489
|
-
/* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ ue("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3490
3535
|
(() => {
|
|
3491
3536
|
const a = t.find((i) => i.type === "tag");
|
|
3492
3537
|
if (!a || !a.text) return null;
|
|
3493
3538
|
const l = I.find((i) => i.label === a.text);
|
|
3494
|
-
return !l || l.points === void 0 || l.points === null ? null : /* @__PURE__ */
|
|
3539
|
+
return !l || l.points === void 0 || l.points === null ? null : /* @__PURE__ */ ue("div", { className: "rte-points-badge", children: [
|
|
3495
3540
|
/* @__PURE__ */ L("i", { className: "iconfont icon-jifen", style: { marginRight: "4px", fontSize: "16px" } }),
|
|
3496
|
-
/* @__PURE__ */
|
|
3541
|
+
/* @__PURE__ */ ue("span", { style: { fontSize: "16px", lineHeight: "22px" }, children: [
|
|
3497
3542
|
"-",
|
|
3498
3543
|
String(l.points)
|
|
3499
3544
|
] })
|
|
@@ -3503,32 +3548,32 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3503
3548
|
"button",
|
|
3504
3549
|
{
|
|
3505
3550
|
type: "button",
|
|
3506
|
-
onClick:
|
|
3507
|
-
disabled: s || o ||
|
|
3551
|
+
onClick: $n,
|
|
3552
|
+
disabled: s || o || E || !Mt,
|
|
3508
3553
|
className: "rich-text-editor-send-button",
|
|
3509
|
-
children: s ||
|
|
3554
|
+
children: s || E ? /* @__PURE__ */ L("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ L("i", { className: "iconfont icon-fasong" })
|
|
3510
3555
|
}
|
|
3511
3556
|
)
|
|
3512
3557
|
] })
|
|
3513
3558
|
] }),
|
|
3514
|
-
|
|
3515
|
-
if (!document.body.contains(
|
|
3559
|
+
he?.anchorEl && (() => {
|
|
3560
|
+
if (!document.body.contains(he.anchorEl))
|
|
3516
3561
|
return null;
|
|
3517
3562
|
let a = "", l = {
|
|
3518
3563
|
background: "var(--neutral-800, #262626)"
|
|
3519
3564
|
};
|
|
3520
|
-
if (
|
|
3565
|
+
if (he.type === "upload")
|
|
3521
3566
|
a = t.find(
|
|
3522
|
-
(m) => m.type === "upload" && m.key ===
|
|
3567
|
+
(m) => m.type === "upload" && m.key === he.key
|
|
3523
3568
|
)?.tooltip || "";
|
|
3524
|
-
else if (
|
|
3525
|
-
a =
|
|
3526
|
-
else if (
|
|
3527
|
-
a =
|
|
3528
|
-
else if (
|
|
3529
|
-
a =
|
|
3530
|
-
else if (
|
|
3531
|
-
const h =
|
|
3569
|
+
else if (he.type === "tag")
|
|
3570
|
+
a = he.anchorEl.dataset.tooltip || "";
|
|
3571
|
+
else if (he.type === "upload-label")
|
|
3572
|
+
a = he.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName || he.anchorEl.dataset.fileName || "";
|
|
3573
|
+
else if (he.type === "variable")
|
|
3574
|
+
a = he.anchorEl.dataset.tooltip || "";
|
|
3575
|
+
else if (he.type === "upload-preview") {
|
|
3576
|
+
const h = U[he.key], m = !!h && (h.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(h.name || ""));
|
|
3532
3577
|
if (h && m) {
|
|
3533
3578
|
const H = URL.createObjectURL(h);
|
|
3534
3579
|
a = /* @__PURE__ */ L("div", { className: "rte-upload-preview", children: /* @__PURE__ */ L("img", { className: "rte-upload-preview-img", src: H, alt: h.name }) }), l = {
|
|
@@ -3541,20 +3586,20 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3541
3586
|
a = "";
|
|
3542
3587
|
}
|
|
3543
3588
|
if (!a) return null;
|
|
3544
|
-
const i =
|
|
3545
|
-
return
|
|
3589
|
+
const i = he.type === "upload-preview" ? "#0A0A0A" : "#fff";
|
|
3590
|
+
return Lt(
|
|
3546
3591
|
/* @__PURE__ */ L(
|
|
3547
|
-
|
|
3592
|
+
Dn,
|
|
3548
3593
|
{
|
|
3549
3594
|
arrow: !1,
|
|
3550
3595
|
overlayClassName: [
|
|
3551
3596
|
"rte-tooltip",
|
|
3552
|
-
|
|
3553
|
-
|
|
3597
|
+
he.type === "upload-preview" ? "rte-tooltip-preview" : "",
|
|
3598
|
+
he.type === "tag" ? "rte-tooltip-tag" : ""
|
|
3554
3599
|
].filter(Boolean).join(" "),
|
|
3555
|
-
title:
|
|
3600
|
+
title: he.type === "upload-preview" ? a : /* @__PURE__ */ L("div", { style: { maxWidth: "200px", fontSize: "12px", color: i }, children: a }),
|
|
3556
3601
|
open: !0,
|
|
3557
|
-
placement:
|
|
3602
|
+
placement: he.type === "upload-preview" ? "topLeft" : "top",
|
|
3558
3603
|
getPopupContainer: () => document.body,
|
|
3559
3604
|
overlayInnerStyle: l,
|
|
3560
3605
|
children: /* @__PURE__ */ L(
|
|
@@ -3562,11 +3607,11 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3562
3607
|
{
|
|
3563
3608
|
style: {
|
|
3564
3609
|
position: "fixed",
|
|
3565
|
-
left: `${
|
|
3610
|
+
left: `${he.anchorEl.getBoundingClientRect().left}px`,
|
|
3566
3611
|
// 对于 upload-label 类型的 tooltip,向上移动 6px 以增加间距
|
|
3567
|
-
top: `${
|
|
3568
|
-
width: `${
|
|
3569
|
-
height: `${
|
|
3612
|
+
top: `${he.anchorEl.getBoundingClientRect().top - (he.type === "upload-label" ? 4 : 0)}px`,
|
|
3613
|
+
width: `${he.anchorEl.offsetWidth}px`,
|
|
3614
|
+
height: `${he.anchorEl.offsetHeight}px`,
|
|
3570
3615
|
pointerEvents: "none"
|
|
3571
3616
|
}
|
|
3572
3617
|
}
|
|
@@ -3576,13 +3621,13 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
|
|
|
3576
3621
|
document.body
|
|
3577
3622
|
);
|
|
3578
3623
|
})(),
|
|
3579
|
-
|
|
3580
|
-
|
|
3624
|
+
mn,
|
|
3625
|
+
fn
|
|
3581
3626
|
]
|
|
3582
3627
|
}
|
|
3583
3628
|
);
|
|
3584
3629
|
};
|
|
3585
|
-
|
|
3630
|
+
Nr.__docgenInfo = {
|
|
3586
3631
|
displayName: "RichTextEditor",
|
|
3587
3632
|
description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
|
|
3588
3633
|
props: {
|
|
@@ -3610,12 +3655,12 @@ wr.__docgenInfo = {
|
|
|
3610
3655
|
}
|
|
3611
3656
|
}
|
|
3612
3657
|
};
|
|
3613
|
-
const
|
|
3658
|
+
const en = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", qr = [
|
|
3614
3659
|
{ label: "5页", value: 5 },
|
|
3615
3660
|
{ label: "10页", value: 10 },
|
|
3616
3661
|
{ label: "15页", value: 15 },
|
|
3617
3662
|
{ label: "30页", value: 30 }
|
|
3618
|
-
],
|
|
3663
|
+
], Ar = ({
|
|
3619
3664
|
autoLoading: t,
|
|
3620
3665
|
batchSize: y,
|
|
3621
3666
|
loadingProgress: s,
|
|
@@ -3624,9 +3669,9 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3624
3669
|
onLoadNextPage: T,
|
|
3625
3670
|
onStartAutoLoad: I,
|
|
3626
3671
|
onStopLoad: A
|
|
3627
|
-
}) => t && s ? /* @__PURE__ */
|
|
3628
|
-
o || /* @__PURE__ */ L("img", { src:
|
|
3629
|
-
/* @__PURE__ */
|
|
3672
|
+
}) => t && s ? /* @__PURE__ */ ue("div", { className: "auto_load_progress", children: [
|
|
3673
|
+
o || /* @__PURE__ */ L("img", { src: en, alt: "自动加载", width: 14, height: 14 }),
|
|
3674
|
+
/* @__PURE__ */ ue("span", { children: [
|
|
3630
3675
|
"正在加载第",
|
|
3631
3676
|
s.currentPage,
|
|
3632
3677
|
"/",
|
|
@@ -3634,7 +3679,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3634
3679
|
"页"
|
|
3635
3680
|
] }),
|
|
3636
3681
|
/* @__PURE__ */ L(
|
|
3637
|
-
|
|
3682
|
+
Bn,
|
|
3638
3683
|
{
|
|
3639
3684
|
percent: s.percentage,
|
|
3640
3685
|
type: "line",
|
|
@@ -3642,7 +3687,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3642
3687
|
}
|
|
3643
3688
|
),
|
|
3644
3689
|
/* @__PURE__ */ L("span", { onClick: A, className: "auto_load_stop_btn", children: "停止加载" })
|
|
3645
|
-
] }) : /* @__PURE__ */
|
|
3690
|
+
] }) : /* @__PURE__ */ ue("div", { className: "auto_load_container", children: [
|
|
3646
3691
|
/* @__PURE__ */ L(
|
|
3647
3692
|
"div",
|
|
3648
3693
|
{
|
|
@@ -3654,7 +3699,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3654
3699
|
children: "加载下一页"
|
|
3655
3700
|
}
|
|
3656
3701
|
),
|
|
3657
|
-
/* @__PURE__ */
|
|
3702
|
+
/* @__PURE__ */ ue(
|
|
3658
3703
|
"div",
|
|
3659
3704
|
{
|
|
3660
3705
|
className: "right_control_wrap",
|
|
@@ -3662,23 +3707,23 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3662
3707
|
backgroundColor: t ? "#f5f5f5" : "#2563eb"
|
|
3663
3708
|
},
|
|
3664
3709
|
children: [
|
|
3665
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ ue(
|
|
3666
3711
|
"div",
|
|
3667
3712
|
{
|
|
3668
3713
|
className: "auto_load_btn",
|
|
3669
3714
|
onClick: t ? void 0 : I,
|
|
3670
3715
|
children: [
|
|
3671
|
-
o || /* @__PURE__ */ L("img", { src:
|
|
3716
|
+
o || /* @__PURE__ */ L("img", { src: en, alt: "自动加载", width: 14, height: 14 }),
|
|
3672
3717
|
/* @__PURE__ */ L("span", { children: "自动加载" })
|
|
3673
3718
|
]
|
|
3674
3719
|
}
|
|
3675
3720
|
),
|
|
3676
3721
|
/* @__PURE__ */ L(
|
|
3677
|
-
|
|
3722
|
+
gt,
|
|
3678
3723
|
{
|
|
3679
3724
|
value: y,
|
|
3680
3725
|
onChange: b,
|
|
3681
|
-
options:
|
|
3726
|
+
options: qr,
|
|
3682
3727
|
disabled: t,
|
|
3683
3728
|
size: "small",
|
|
3684
3729
|
className: "auto_load_select",
|
|
@@ -3688,7 +3733,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3688
3733
|
]
|
|
3689
3734
|
}
|
|
3690
3735
|
)
|
|
3691
|
-
] }),
|
|
3736
|
+
] }), _r = ({
|
|
3692
3737
|
current: t,
|
|
3693
3738
|
loadIcon: y,
|
|
3694
3739
|
pageSize: s,
|
|
@@ -3698,19 +3743,19 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3698
3743
|
autoLoading: I = !1,
|
|
3699
3744
|
loadingProgress: A,
|
|
3700
3745
|
onChange: $,
|
|
3701
|
-
onLoadNextPage:
|
|
3702
|
-
onStartAutoLoad:
|
|
3746
|
+
onLoadNextPage: E,
|
|
3747
|
+
onStartAutoLoad: S,
|
|
3703
3748
|
onStopLoading: w
|
|
3704
3749
|
}) => {
|
|
3705
|
-
const [
|
|
3750
|
+
const [V, k] = oe(5), e = Math.ceil(o / s), n = qt(() => b.length >= e, [b, e]), r = () => Array.from(
|
|
3706
3751
|
{ length: e },
|
|
3707
|
-
(
|
|
3708
|
-
).filter((
|
|
3709
|
-
return /* @__PURE__ */
|
|
3710
|
-
/* @__PURE__ */
|
|
3711
|
-
/* @__PURE__ */
|
|
3752
|
+
(D, C) => C + 1
|
|
3753
|
+
).filter((D) => !b.includes(D)).slice(0, V);
|
|
3754
|
+
return /* @__PURE__ */ ue("div", { className: "pagination_footer", children: [
|
|
3755
|
+
/* @__PURE__ */ ue("div", { className: "pagination_leftWrap", children: [
|
|
3756
|
+
/* @__PURE__ */ ue("span", { className: "pagination_total", children: [
|
|
3712
3757
|
/* @__PURE__ */ L(
|
|
3713
|
-
|
|
3758
|
+
Fn,
|
|
3714
3759
|
{
|
|
3715
3760
|
style: { color: "#2563EB", marginRight: "4px" }
|
|
3716
3761
|
}
|
|
@@ -3722,45 +3767,45 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3722
3767
|
"条数据"
|
|
3723
3768
|
] }),
|
|
3724
3769
|
!n && /* @__PURE__ */ L(
|
|
3725
|
-
|
|
3770
|
+
Ar,
|
|
3726
3771
|
{
|
|
3727
3772
|
loadIcon: y || void 0,
|
|
3728
3773
|
autoLoading: I,
|
|
3729
|
-
batchSize:
|
|
3774
|
+
batchSize: V,
|
|
3730
3775
|
loadingProgress: A,
|
|
3731
|
-
disabled: !
|
|
3776
|
+
disabled: !E || !S,
|
|
3732
3777
|
onBatchSizeChange: k,
|
|
3733
|
-
onLoadNextPage: () =>
|
|
3778
|
+
onLoadNextPage: () => E?.(),
|
|
3734
3779
|
onStartAutoLoad: () => {
|
|
3735
|
-
const
|
|
3736
|
-
|
|
3780
|
+
const d = r();
|
|
3781
|
+
S?.(d);
|
|
3737
3782
|
},
|
|
3738
3783
|
onStopLoad: () => w?.()
|
|
3739
3784
|
}
|
|
3740
3785
|
)
|
|
3741
3786
|
] }),
|
|
3742
3787
|
/* @__PURE__ */ L(
|
|
3743
|
-
|
|
3788
|
+
Hn,
|
|
3744
3789
|
{
|
|
3745
3790
|
current: t,
|
|
3746
3791
|
pageSize: s,
|
|
3747
3792
|
total: o,
|
|
3748
|
-
onChange: (
|
|
3793
|
+
onChange: (d) => $(d),
|
|
3749
3794
|
showSizeChanger: !1,
|
|
3750
3795
|
showQuickJumper: !1,
|
|
3751
3796
|
showTotal: () => "",
|
|
3752
|
-
itemRender: (
|
|
3753
|
-
const F = b.includes(
|
|
3754
|
-
return
|
|
3797
|
+
itemRender: (d, D, C) => {
|
|
3798
|
+
const F = b.includes(d);
|
|
3799
|
+
return D === "prev" || D === "next" || D === "jump-prev" || D === "jump-next" ? /* @__PURE__ */ L("div", { className: "pageBox", children: C }) : /* @__PURE__ */ ue(
|
|
3755
3800
|
"div",
|
|
3756
3801
|
{
|
|
3757
3802
|
className: "pageBox",
|
|
3758
3803
|
style: {
|
|
3759
|
-
backgroundColor: t ===
|
|
3760
|
-
color: t ===
|
|
3804
|
+
backgroundColor: t === d ? "#2563EB" : "#f5f5f5",
|
|
3805
|
+
color: t === d ? "#fff" : F ? "#171717" : "#a3a3a3"
|
|
3761
3806
|
},
|
|
3762
3807
|
children: [
|
|
3763
|
-
|
|
3808
|
+
d,
|
|
3764
3809
|
!F && /* @__PURE__ */ L("span", { className: "unload_spot" })
|
|
3765
3810
|
]
|
|
3766
3811
|
}
|
|
@@ -3769,7 +3814,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3769
3814
|
}
|
|
3770
3815
|
)
|
|
3771
3816
|
] });
|
|
3772
|
-
},
|
|
3817
|
+
}, Lr = (t) => {
|
|
3773
3818
|
const {
|
|
3774
3819
|
loading: y,
|
|
3775
3820
|
autoLoading: s,
|
|
@@ -3779,23 +3824,23 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3779
3824
|
total: I,
|
|
3780
3825
|
current: A,
|
|
3781
3826
|
pageSize: $,
|
|
3782
|
-
cachedPages:
|
|
3783
|
-
onChangePage:
|
|
3827
|
+
cachedPages: E,
|
|
3828
|
+
onChangePage: S,
|
|
3784
3829
|
onLoadNextPage: w,
|
|
3785
|
-
onStartAutoLoad:
|
|
3830
|
+
onStartAutoLoad: V,
|
|
3786
3831
|
onStopLoading: k,
|
|
3787
3832
|
...e
|
|
3788
|
-
} = t, n = te(null), r =
|
|
3789
|
-
(
|
|
3790
|
-
|
|
3791
|
-
key: `${(
|
|
3833
|
+
} = t, n = te(null), r = ce(
|
|
3834
|
+
(u) => {
|
|
3835
|
+
S(u), E.includes(u) && n.current?.scrollTo({
|
|
3836
|
+
key: `${(u - 1) * $ + 1}`
|
|
3792
3837
|
});
|
|
3793
3838
|
},
|
|
3794
|
-
[
|
|
3839
|
+
[E, S, $]
|
|
3795
3840
|
);
|
|
3796
|
-
return /* @__PURE__ */
|
|
3841
|
+
return /* @__PURE__ */ ue("div", { className: "flex flex-col", children: [
|
|
3797
3842
|
/* @__PURE__ */ L(
|
|
3798
|
-
|
|
3843
|
+
_t,
|
|
3799
3844
|
{
|
|
3800
3845
|
ref: n,
|
|
3801
3846
|
...e,
|
|
@@ -3806,7 +3851,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3806
3851
|
}
|
|
3807
3852
|
),
|
|
3808
3853
|
/* @__PURE__ */ L(
|
|
3809
|
-
|
|
3854
|
+
_r,
|
|
3810
3855
|
{
|
|
3811
3856
|
loading: y,
|
|
3812
3857
|
autoLoading: s,
|
|
@@ -3815,16 +3860,16 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3815
3860
|
pageSize: $,
|
|
3816
3861
|
total: I,
|
|
3817
3862
|
loadedCount: T.length,
|
|
3818
|
-
cachedPages:
|
|
3863
|
+
cachedPages: E,
|
|
3819
3864
|
onChange: r,
|
|
3820
3865
|
onLoadNextPage: w,
|
|
3821
|
-
onStartAutoLoad:
|
|
3866
|
+
onStartAutoLoad: V,
|
|
3822
3867
|
onStopLoading: k
|
|
3823
3868
|
}
|
|
3824
3869
|
)
|
|
3825
3870
|
] });
|
|
3826
3871
|
};
|
|
3827
|
-
|
|
3872
|
+
Lr.__docgenInfo = {
|
|
3828
3873
|
displayName: "VirtualTable",
|
|
3829
3874
|
description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
|
|
3830
3875
|
props: {
|
|
@@ -3931,7 +3976,7 @@ Cr.__docgenInfo = {
|
|
|
3931
3976
|
}
|
|
3932
3977
|
}
|
|
3933
3978
|
};
|
|
3934
|
-
const
|
|
3979
|
+
const Mr = ({
|
|
3935
3980
|
texts: t = [],
|
|
3936
3981
|
placeholder: y = "请输入内容",
|
|
3937
3982
|
animationSpeed: s = 100,
|
|
@@ -3940,57 +3985,57 @@ const Sr = ({
|
|
|
3940
3985
|
onChange: T,
|
|
3941
3986
|
...I
|
|
3942
3987
|
}) => {
|
|
3943
|
-
const [A, $] =
|
|
3944
|
-
|
|
3945
|
-
|
|
3988
|
+
const [A, $] = oe(""), [E, S] = oe(0), [w, V] = oe(!1), [k, e] = oe(!1), [n, r] = oe(!1), u = te(void 0), d = te(void 0), D = te(t), C = te(E), F = te(k), Y = te(A);
|
|
3989
|
+
fe(() => {
|
|
3990
|
+
D.current = t, C.current = E, F.current = k, Y.current = A;
|
|
3946
3991
|
});
|
|
3947
|
-
const z =
|
|
3992
|
+
const z = ce((p, c) => {
|
|
3948
3993
|
let v = 0;
|
|
3949
3994
|
r(!0);
|
|
3950
|
-
const
|
|
3951
|
-
v <
|
|
3995
|
+
const P = () => {
|
|
3996
|
+
v < p.length ? ($(p.slice(0, v + 1)), v++, d.current = window.setTimeout(P, s)) : (r(!1), c?.());
|
|
3952
3997
|
};
|
|
3953
|
-
|
|
3954
|
-
}, [s]), O =
|
|
3955
|
-
let
|
|
3998
|
+
P();
|
|
3999
|
+
}, [s]), O = ce((p) => {
|
|
4000
|
+
let c = Y.current.length;
|
|
3956
4001
|
const v = () => {
|
|
3957
|
-
|
|
4002
|
+
c > 0 ? ($(Y.current.slice(0, c - 1)), c--, d.current = window.setTimeout(v, s / 2)) : p?.();
|
|
3958
4003
|
};
|
|
3959
4004
|
v();
|
|
3960
|
-
}, [s]),
|
|
3961
|
-
if (
|
|
3962
|
-
|
|
3963
|
-
const
|
|
4005
|
+
}, [s]), _ = ce(() => {
|
|
4006
|
+
if (D.current.length === 0 || F.current) return;
|
|
4007
|
+
V(!0);
|
|
4008
|
+
const p = D.current[C.current];
|
|
3964
4009
|
Y.current ? O(() => {
|
|
3965
|
-
z(
|
|
3966
|
-
|
|
3967
|
-
|
|
4010
|
+
z(p, () => {
|
|
4011
|
+
u.current = window.setTimeout(() => {
|
|
4012
|
+
S((c) => (c + 1) % D.current.length), V(!1);
|
|
3968
4013
|
}, 2e3);
|
|
3969
4014
|
});
|
|
3970
|
-
}) : z(
|
|
3971
|
-
|
|
3972
|
-
|
|
4015
|
+
}) : z(p, () => {
|
|
4016
|
+
u.current = window.setTimeout(() => {
|
|
4017
|
+
S((c) => (c + 1) % D.current.length), V(!1);
|
|
3973
4018
|
}, 2e3);
|
|
3974
4019
|
});
|
|
3975
4020
|
}, [O, z]);
|
|
3976
|
-
return
|
|
3977
|
-
|
|
3978
|
-
}), [
|
|
3979
|
-
!w && o && t.length > 0 && !k &&
|
|
3980
|
-
}, [
|
|
4021
|
+
return fe(() => (o && t.length > 0 && !k && _(), () => {
|
|
4022
|
+
u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current);
|
|
4023
|
+
}), [E, k, o, t.length, _]), fe(() => {
|
|
4024
|
+
!w && o && t.length > 0 && !k && _();
|
|
4025
|
+
}, [E, w, o, t.length, k, _]), /* @__PURE__ */ ue("div", { style: { position: "relative" }, children: [
|
|
3981
4026
|
/* @__PURE__ */ L(
|
|
3982
|
-
|
|
4027
|
+
tn,
|
|
3983
4028
|
{
|
|
3984
4029
|
...I,
|
|
3985
4030
|
value: b,
|
|
3986
|
-
onChange: (
|
|
3987
|
-
T?.(
|
|
4031
|
+
onChange: (p) => {
|
|
4032
|
+
T?.(p.target.value), I.onChange?.(p);
|
|
3988
4033
|
},
|
|
3989
|
-
onFocus: (
|
|
3990
|
-
e(!0),
|
|
4034
|
+
onFocus: (p) => {
|
|
4035
|
+
e(!0), u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current), V(!1), r(!1), I.onFocus?.(p);
|
|
3991
4036
|
},
|
|
3992
|
-
onBlur: (
|
|
3993
|
-
e(!1), !b && t.length > 0 && ($(""),
|
|
4037
|
+
onBlur: (p) => {
|
|
4038
|
+
e(!1), !b && t.length > 0 && ($(""), S(0)), I.onBlur?.(p);
|
|
3994
4039
|
},
|
|
3995
4040
|
placeholder: k || b ? y : A || y,
|
|
3996
4041
|
style: {
|
|
@@ -4001,7 +4046,7 @@ const Sr = ({
|
|
|
4001
4046
|
}
|
|
4002
4047
|
}
|
|
4003
4048
|
),
|
|
4004
|
-
!k && !b && A && /* @__PURE__ */
|
|
4049
|
+
!k && !b && A && /* @__PURE__ */ ue(
|
|
4005
4050
|
"div",
|
|
4006
4051
|
{
|
|
4007
4052
|
style: {
|
|
@@ -4046,7 +4091,7 @@ const Sr = ({
|
|
|
4046
4091
|
` })
|
|
4047
4092
|
] });
|
|
4048
4093
|
};
|
|
4049
|
-
|
|
4094
|
+
Mr.__docgenInfo = {
|
|
4050
4095
|
displayName: "DynamicInput",
|
|
4051
4096
|
description: "动态文案输入框组件,支持流式文字动画效果",
|
|
4052
4097
|
props: {
|
|
@@ -4091,7 +4136,7 @@ Sr.__docgenInfo = {
|
|
|
4091
4136
|
}
|
|
4092
4137
|
}
|
|
4093
4138
|
};
|
|
4094
|
-
const
|
|
4139
|
+
const Ir = ({
|
|
4095
4140
|
texts: t = [],
|
|
4096
4141
|
// 动态文案数组,默认为空数组
|
|
4097
4142
|
placeholder: y = "请输入内容",
|
|
@@ -4110,87 +4155,87 @@ const Tr = ({
|
|
|
4110
4155
|
// 最大字符数限制
|
|
4111
4156
|
showCount: $ = !0,
|
|
4112
4157
|
// 是否显示字数统计
|
|
4113
|
-
submitText:
|
|
4158
|
+
submitText: E = "发送",
|
|
4114
4159
|
// 提交按钮文本
|
|
4115
|
-
disabled:
|
|
4160
|
+
disabled: S = !1,
|
|
4116
4161
|
// 是否禁用组件
|
|
4117
4162
|
rows: w = 4,
|
|
4118
4163
|
// 文本域行数
|
|
4119
|
-
style:
|
|
4164
|
+
style: V,
|
|
4120
4165
|
// 自定义样式
|
|
4121
4166
|
...k
|
|
4122
4167
|
// 其他原生属性
|
|
4123
4168
|
}) => {
|
|
4124
|
-
const [e, n] =
|
|
4125
|
-
|
|
4126
|
-
R.current = t,
|
|
4169
|
+
const [e, n] = oe(""), [r, u] = oe(0), [d, D] = oe(!1), [C, F] = oe(!1), [Y, z] = oe(!1), [O, _] = oe(b || ""), G = te(void 0), M = te(void 0), R = te(t), X = te(r), p = te(C), c = te(e), v = te(null);
|
|
4170
|
+
fe(() => {
|
|
4171
|
+
R.current = t, X.current = r, p.current = C, c.current = e;
|
|
4127
4172
|
});
|
|
4128
|
-
const
|
|
4129
|
-
let
|
|
4173
|
+
const P = ce((U, ge) => {
|
|
4174
|
+
let $e = 0;
|
|
4130
4175
|
z(!0);
|
|
4131
|
-
const ge = () => {
|
|
4132
|
-
xe < ae.length ? (n(ae.slice(0, xe + 1)), xe++, _.current = window.setTimeout(ge, s)) : (z(!1), he?.());
|
|
4133
|
-
};
|
|
4134
|
-
ge();
|
|
4135
|
-
}, [s]), B = de((ae) => {
|
|
4136
|
-
let he = p.current.length;
|
|
4137
4176
|
const xe = () => {
|
|
4138
|
-
|
|
4177
|
+
$e < U.length ? (n(U.slice(0, $e + 1)), $e++, M.current = window.setTimeout(xe, s)) : (z(!1), ge?.());
|
|
4139
4178
|
};
|
|
4140
4179
|
xe();
|
|
4141
|
-
}, [s]),
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4180
|
+
}, [s]), B = ce((U) => {
|
|
4181
|
+
let ge = c.current.length;
|
|
4182
|
+
const $e = () => {
|
|
4183
|
+
ge > 0 ? (n(c.current.slice(0, ge - 1)), ge--, M.current = window.setTimeout($e, s / 2)) : U?.();
|
|
4184
|
+
};
|
|
4185
|
+
$e();
|
|
4186
|
+
}, [s]), j = ce(() => {
|
|
4187
|
+
if (R.current.length === 0 || p.current) return;
|
|
4188
|
+
D(!0);
|
|
4189
|
+
const U = R.current[X.current];
|
|
4190
|
+
c.current ? B(() => {
|
|
4191
|
+
P(U, () => {
|
|
4147
4192
|
G.current = window.setTimeout(() => {
|
|
4148
|
-
|
|
4193
|
+
u((ge) => (ge + 1) % R.current.length), D(!1);
|
|
4149
4194
|
}, 2e3);
|
|
4150
4195
|
});
|
|
4151
|
-
}) :
|
|
4196
|
+
}) : P(U, () => {
|
|
4152
4197
|
G.current = window.setTimeout(() => {
|
|
4153
|
-
|
|
4198
|
+
u((ge) => (ge + 1) % R.current.length), D(!1);
|
|
4154
4199
|
}, 2e3);
|
|
4155
4200
|
});
|
|
4156
|
-
}, [B,
|
|
4157
|
-
|
|
4158
|
-
G.current && window.clearTimeout(G.current),
|
|
4159
|
-
}), [r,
|
|
4160
|
-
!
|
|
4161
|
-
}, [r,
|
|
4162
|
-
const
|
|
4163
|
-
F(!0), G.current && window.clearTimeout(G.current),
|
|
4164
|
-
},
|
|
4165
|
-
F(!1), !b && t.length > 0 && (n(""),
|
|
4166
|
-
},
|
|
4167
|
-
const
|
|
4168
|
-
A &&
|
|
4169
|
-
},
|
|
4170
|
-
const
|
|
4171
|
-
|
|
4172
|
-
},
|
|
4173
|
-
(
|
|
4174
|
-
},
|
|
4175
|
-
return /* @__PURE__ */
|
|
4176
|
-
/* @__PURE__ */
|
|
4201
|
+
}, [B, P]);
|
|
4202
|
+
fe(() => (o && t.length > 0 && !C && j(), () => {
|
|
4203
|
+
G.current && window.clearTimeout(G.current), M.current && window.clearTimeout(M.current);
|
|
4204
|
+
}), [r, C, o, t.length, j]), fe(() => {
|
|
4205
|
+
!d && o && t.length > 0 && !C && j();
|
|
4206
|
+
}, [r, d, o, t.length, C, j]);
|
|
4207
|
+
const J = (U) => {
|
|
4208
|
+
F(!0), G.current && window.clearTimeout(G.current), M.current && window.clearTimeout(M.current), D(!1), z(!1), k.onFocus?.(U);
|
|
4209
|
+
}, re = (U) => {
|
|
4210
|
+
F(!1), !b && t.length > 0 && (n(""), u(0)), k.onBlur?.(U);
|
|
4211
|
+
}, me = (U) => {
|
|
4212
|
+
const ge = U.target.value;
|
|
4213
|
+
A && ge.length > A || (T ? T(ge) : _(ge), k.onChange?.(U));
|
|
4214
|
+
}, de = () => {
|
|
4215
|
+
const U = T ? b : O;
|
|
4216
|
+
U.trim() && !S && (I?.(U), T || _(""));
|
|
4217
|
+
}, ye = (U) => {
|
|
4218
|
+
(U.ctrlKey || U.metaKey) && U.key === "Enter" && (U.preventDefault(), de()), k.onKeyDown?.(U);
|
|
4219
|
+
}, N = T ? b : O, be = S || !N.trim() || (A ? N.length > A : !1);
|
|
4220
|
+
return /* @__PURE__ */ ue("div", { style: { position: "relative", ...V }, children: [
|
|
4221
|
+
/* @__PURE__ */ ue("div", { style: { position: "relative" }, children: [
|
|
4177
4222
|
/* @__PURE__ */ L(
|
|
4178
4223
|
"textarea",
|
|
4179
4224
|
{
|
|
4180
4225
|
ref: v,
|
|
4181
4226
|
value: T ? b : O,
|
|
4182
|
-
onChange:
|
|
4183
|
-
onFocus: (
|
|
4184
|
-
|
|
4227
|
+
onChange: me,
|
|
4228
|
+
onFocus: (U) => {
|
|
4229
|
+
U.target.style.borderColor = "#1890ff", U.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", J(U);
|
|
4185
4230
|
},
|
|
4186
|
-
onBlur: (
|
|
4187
|
-
|
|
4231
|
+
onBlur: (U) => {
|
|
4232
|
+
U.target.style.borderColor = "#d9d9d9", U.target.style.boxShadow = "none", re(U);
|
|
4188
4233
|
},
|
|
4189
|
-
onKeyDown:
|
|
4190
|
-
placeholder:
|
|
4234
|
+
onKeyDown: ye,
|
|
4235
|
+
placeholder: C || N ? y : "",
|
|
4191
4236
|
maxLength: A,
|
|
4192
4237
|
rows: w,
|
|
4193
|
-
disabled:
|
|
4238
|
+
disabled: S,
|
|
4194
4239
|
style: {
|
|
4195
4240
|
width: "100%",
|
|
4196
4241
|
minHeight: `${w * 24 + 16}px`,
|
|
@@ -4211,7 +4256,7 @@ const Tr = ({
|
|
|
4211
4256
|
...k
|
|
4212
4257
|
}
|
|
4213
4258
|
),
|
|
4214
|
-
!
|
|
4259
|
+
!C && !N && e && /* @__PURE__ */ ue(
|
|
4215
4260
|
"div",
|
|
4216
4261
|
{
|
|
4217
4262
|
style: {
|
|
@@ -4260,13 +4305,13 @@ const Tr = ({
|
|
|
4260
4305
|
zIndex: 3
|
|
4261
4306
|
},
|
|
4262
4307
|
children: /* @__PURE__ */ L(
|
|
4263
|
-
|
|
4308
|
+
Pe,
|
|
4264
4309
|
{
|
|
4265
4310
|
type: "primary",
|
|
4266
4311
|
size: "small",
|
|
4267
|
-
icon: /* @__PURE__ */ L(
|
|
4268
|
-
onClick:
|
|
4269
|
-
disabled:
|
|
4312
|
+
icon: /* @__PURE__ */ L(zn, {}),
|
|
4313
|
+
onClick: de,
|
|
4314
|
+
disabled: be,
|
|
4270
4315
|
style: {
|
|
4271
4316
|
borderRadius: 6,
|
|
4272
4317
|
minWidth: 32,
|
|
@@ -4275,13 +4320,13 @@ const Tr = ({
|
|
|
4275
4320
|
alignItems: "center",
|
|
4276
4321
|
justifyContent: "center"
|
|
4277
4322
|
},
|
|
4278
|
-
children:
|
|
4323
|
+
children: E
|
|
4279
4324
|
}
|
|
4280
4325
|
)
|
|
4281
4326
|
}
|
|
4282
4327
|
)
|
|
4283
4328
|
] }),
|
|
4284
|
-
$ && /* @__PURE__ */
|
|
4329
|
+
$ && /* @__PURE__ */ ue(
|
|
4285
4330
|
"div",
|
|
4286
4331
|
{
|
|
4287
4332
|
style: {
|
|
@@ -4291,7 +4336,7 @@ const Tr = ({
|
|
|
4291
4336
|
color: "#999"
|
|
4292
4337
|
},
|
|
4293
4338
|
children: [
|
|
4294
|
-
|
|
4339
|
+
N.length,
|
|
4295
4340
|
"/",
|
|
4296
4341
|
A
|
|
4297
4342
|
]
|
|
@@ -4305,7 +4350,7 @@ const Tr = ({
|
|
|
4305
4350
|
` })
|
|
4306
4351
|
] });
|
|
4307
4352
|
};
|
|
4308
|
-
|
|
4353
|
+
Ir.__docgenInfo = {
|
|
4309
4354
|
displayName: "DynamicTextArea",
|
|
4310
4355
|
description: "动态文案文本域组件,支持流式文字动画效果",
|
|
4311
4356
|
props: {
|
|
@@ -4391,7 +4436,7 @@ Tr.__docgenInfo = {
|
|
|
4391
4436
|
}
|
|
4392
4437
|
}
|
|
4393
4438
|
};
|
|
4394
|
-
const
|
|
4439
|
+
const an = ({
|
|
4395
4440
|
src: t,
|
|
4396
4441
|
poster: y,
|
|
4397
4442
|
width: s = 300,
|
|
@@ -4403,37 +4448,37 @@ const Jt = ({
|
|
|
4403
4448
|
showPlayButton: I = !0,
|
|
4404
4449
|
autoPlayOnHover: A = !0,
|
|
4405
4450
|
onClick: $,
|
|
4406
|
-
onVideoLoaded:
|
|
4407
|
-
onVideoPlay:
|
|
4451
|
+
onVideoLoaded: E,
|
|
4452
|
+
onVideoPlay: S,
|
|
4408
4453
|
onVideoPause: w,
|
|
4409
|
-
onVideoEnded:
|
|
4454
|
+
onVideoEnded: V,
|
|
4410
4455
|
className: k,
|
|
4411
4456
|
style: e,
|
|
4412
4457
|
...n
|
|
4413
4458
|
}) => {
|
|
4414
|
-
const r = te(null), [
|
|
4415
|
-
r.current && (r.current.play(),
|
|
4416
|
-
}, [
|
|
4417
|
-
r.current && (r.current.pause(),
|
|
4418
|
-
}, [w]),
|
|
4419
|
-
|
|
4420
|
-
}, [
|
|
4421
|
-
|
|
4422
|
-
}, [A,
|
|
4423
|
-
|
|
4424
|
-
}, [A,
|
|
4425
|
-
Y(!0),
|
|
4426
|
-
}, [
|
|
4427
|
-
|
|
4428
|
-
}, [
|
|
4429
|
-
|
|
4430
|
-
}, [w]),
|
|
4431
|
-
|
|
4432
|
-
}, [
|
|
4433
|
-
$?.(
|
|
4459
|
+
const r = te(null), [u, d] = oe(!1), [D, C] = oe(!1), [F, Y] = oe(!1), z = ce(() => {
|
|
4460
|
+
r.current && (r.current.play(), d(!0), S?.());
|
|
4461
|
+
}, [S]), O = ce(() => {
|
|
4462
|
+
r.current && (r.current.pause(), d(!1), w?.());
|
|
4463
|
+
}, [w]), _ = ce((P) => {
|
|
4464
|
+
P.stopPropagation(), u ? O() : z();
|
|
4465
|
+
}, [u, z, O]), G = ce(() => {
|
|
4466
|
+
C(!0), A && !u && z();
|
|
4467
|
+
}, [A, u, z]), M = ce(() => {
|
|
4468
|
+
C(!1), A && u && O();
|
|
4469
|
+
}, [A, u, O]), R = ce(() => {
|
|
4470
|
+
Y(!0), E?.();
|
|
4471
|
+
}, [E]), X = ce(() => {
|
|
4472
|
+
d(!0), S?.();
|
|
4473
|
+
}, [S]), p = ce(() => {
|
|
4474
|
+
d(!1), w?.();
|
|
4475
|
+
}, [w]), c = ce(() => {
|
|
4476
|
+
d(!1), V?.();
|
|
4477
|
+
}, [V]), v = ce((P) => {
|
|
4478
|
+
$?.(P);
|
|
4434
4479
|
}, [$]);
|
|
4435
4480
|
return /* @__PURE__ */ L(
|
|
4436
|
-
|
|
4481
|
+
At,
|
|
4437
4482
|
{
|
|
4438
4483
|
...n,
|
|
4439
4484
|
className: `video-card ${k || ""}`,
|
|
@@ -4449,9 +4494,9 @@ const Jt = ({
|
|
|
4449
4494
|
},
|
|
4450
4495
|
bordered: !1,
|
|
4451
4496
|
onMouseEnter: G,
|
|
4452
|
-
onMouseLeave:
|
|
4497
|
+
onMouseLeave: M,
|
|
4453
4498
|
onClick: v,
|
|
4454
|
-
children: /* @__PURE__ */
|
|
4499
|
+
children: /* @__PURE__ */ ue("div", { className: "video-card-container", children: [
|
|
4455
4500
|
/* @__PURE__ */ L(
|
|
4456
4501
|
"video",
|
|
4457
4502
|
{
|
|
@@ -4460,9 +4505,9 @@ const Jt = ({
|
|
|
4460
4505
|
poster: y,
|
|
4461
4506
|
preload: "metadata",
|
|
4462
4507
|
onLoadedData: R,
|
|
4463
|
-
onPlay:
|
|
4464
|
-
onPause:
|
|
4465
|
-
onEnded:
|
|
4508
|
+
onPlay: X,
|
|
4509
|
+
onPause: p,
|
|
4510
|
+
onEnded: c,
|
|
4466
4511
|
muted: !0,
|
|
4467
4512
|
loop: !0
|
|
4468
4513
|
}
|
|
@@ -4470,9 +4515,9 @@ const Jt = ({
|
|
|
4470
4515
|
I && /* @__PURE__ */ L(
|
|
4471
4516
|
"div",
|
|
4472
4517
|
{
|
|
4473
|
-
className: `video-play-button ${
|
|
4474
|
-
onClick:
|
|
4475
|
-
children:
|
|
4518
|
+
className: `video-play-button ${D ? "hovered" : ""}`,
|
|
4519
|
+
onClick: _,
|
|
4520
|
+
children: u ? /* @__PURE__ */ L(Yn, { className: "play-icon" }) : /* @__PURE__ */ L(jn, { className: "play-icon" })
|
|
4476
4521
|
}
|
|
4477
4522
|
),
|
|
4478
4523
|
!F && /* @__PURE__ */ L("div", { className: "video-loading-mask", children: /* @__PURE__ */ L("div", { className: "loading-spinner" }) })
|
|
@@ -4480,7 +4525,7 @@ const Jt = ({
|
|
|
4480
4525
|
}
|
|
4481
4526
|
);
|
|
4482
4527
|
};
|
|
4483
|
-
|
|
4528
|
+
an.__docgenInfo = {
|
|
4484
4529
|
displayName: "VideoCard",
|
|
4485
4530
|
description: "视频卡片组件,支持鼠标悬浮播放控制",
|
|
4486
4531
|
props: {
|
|
@@ -4581,7 +4626,7 @@ Jt.__docgenInfo = {
|
|
|
4581
4626
|
}
|
|
4582
4627
|
}
|
|
4583
4628
|
};
|
|
4584
|
-
const
|
|
4629
|
+
const Dr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((s) => t.toLowerCase().includes(s)), Br = (t) => t.type ? t.type : Dr(t.url) ? "video" : "image", Hr = ({
|
|
4585
4630
|
items: t,
|
|
4586
4631
|
columns: y,
|
|
4587
4632
|
gap: s = 0,
|
|
@@ -4598,39 +4643,39 @@ const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
4598
4643
|
style: I,
|
|
4599
4644
|
onClick: A
|
|
4600
4645
|
}) => {
|
|
4601
|
-
const $ = te(null), [
|
|
4646
|
+
const $ = te(null), [E, S] = oe(y || b.md || 3), w = te(/* @__PURE__ */ new Map()), V = ce(() => {
|
|
4602
4647
|
if (!o || y)
|
|
4603
4648
|
return y || b.md || 3;
|
|
4604
4649
|
const r = window.innerWidth;
|
|
4605
4650
|
return r < 576 ? b.xs || 1 : r < 768 ? b.sm || 2 : r < 992 ? b.md || 3 : r < 1200 ? b.lg || 4 : r < 1600 ? b.xl || 5 : b.xxl || 6;
|
|
4606
|
-
}, [o, y, b]), k =
|
|
4651
|
+
}, [o, y, b]), k = ce(() => {
|
|
4607
4652
|
if (!$.current) return;
|
|
4608
|
-
const r =
|
|
4653
|
+
const r = E, u = $.current, D = (u.offsetWidth - s * (r - 1)) / r, C = new Array(r).fill(0);
|
|
4609
4654
|
t.forEach((Y, z) => {
|
|
4610
|
-
const O = Y.id || z,
|
|
4611
|
-
if (!
|
|
4612
|
-
const G = Math.min(...
|
|
4613
|
-
|
|
4655
|
+
const O = Y.id || z, _ = w.current.get(O);
|
|
4656
|
+
if (!_) return;
|
|
4657
|
+
const G = Math.min(...C), M = C.indexOf(G), R = M * (D + s), X = C[M];
|
|
4658
|
+
_.style.position = "absolute", _.style.left = `${R}px`, _.style.top = `${X}px`, _.style.width = `${D}px`, C[M] += _.offsetHeight + s;
|
|
4614
4659
|
});
|
|
4615
|
-
const F = Math.max(...
|
|
4616
|
-
|
|
4617
|
-
}, [t,
|
|
4618
|
-
|
|
4660
|
+
const F = Math.max(...C);
|
|
4661
|
+
u.style.height = `${F}px`;
|
|
4662
|
+
}, [t, E, s]);
|
|
4663
|
+
fe(() => {
|
|
4619
4664
|
const r = () => {
|
|
4620
|
-
const
|
|
4621
|
-
|
|
4665
|
+
const u = V();
|
|
4666
|
+
u !== E && S(u);
|
|
4622
4667
|
};
|
|
4623
4668
|
if (o)
|
|
4624
4669
|
return window.addEventListener("resize", r), r(), () => window.removeEventListener("resize", r);
|
|
4625
|
-
}, [o,
|
|
4670
|
+
}, [o, V, E]), fe(() => {
|
|
4626
4671
|
const r = setTimeout(() => {
|
|
4627
4672
|
k();
|
|
4628
4673
|
}, 100);
|
|
4629
4674
|
return () => clearTimeout(r);
|
|
4630
|
-
}, [t,
|
|
4631
|
-
const e =
|
|
4675
|
+
}, [t, E, k]);
|
|
4676
|
+
const e = ce(() => {
|
|
4632
4677
|
k();
|
|
4633
|
-
}, [k]), n =
|
|
4678
|
+
}, [k]), n = ce((r) => {
|
|
4634
4679
|
A && A(r), r.onClick?.(r);
|
|
4635
4680
|
}, [A]);
|
|
4636
4681
|
return /* @__PURE__ */ L(
|
|
@@ -4643,22 +4688,22 @@ const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
4643
4688
|
width: "100%",
|
|
4644
4689
|
...I
|
|
4645
4690
|
},
|
|
4646
|
-
children: t.map((r,
|
|
4647
|
-
const
|
|
4691
|
+
children: t.map((r, u) => {
|
|
4692
|
+
const d = r.id || u, D = Br(r);
|
|
4648
4693
|
return /* @__PURE__ */ L(
|
|
4649
4694
|
"div",
|
|
4650
4695
|
{
|
|
4651
|
-
ref: (
|
|
4652
|
-
|
|
4696
|
+
ref: (C) => {
|
|
4697
|
+
C ? w.current.set(d, C) : w.current.delete(d);
|
|
4653
4698
|
},
|
|
4654
4699
|
className: "waterfall-item",
|
|
4655
|
-
children:
|
|
4700
|
+
children: D === "video" ? /* @__PURE__ */ L("div", { style: {
|
|
4656
4701
|
width: "100%",
|
|
4657
4702
|
position: "relative",
|
|
4658
4703
|
paddingBottom: "56.25%",
|
|
4659
4704
|
cursor: A || r.onClick ? "pointer" : "default"
|
|
4660
4705
|
}, children: /* @__PURE__ */ L("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ L(
|
|
4661
|
-
|
|
4706
|
+
an,
|
|
4662
4707
|
{
|
|
4663
4708
|
src: r.url,
|
|
4664
4709
|
poster: r.poster,
|
|
@@ -4679,7 +4724,7 @@ const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
4679
4724
|
"img",
|
|
4680
4725
|
{
|
|
4681
4726
|
src: r.url,
|
|
4682
|
-
alt: `瀑布流图片 ${
|
|
4727
|
+
alt: `瀑布流图片 ${u + 1}`,
|
|
4683
4728
|
className: "waterfall-image",
|
|
4684
4729
|
onLoad: e,
|
|
4685
4730
|
onError: e,
|
|
@@ -4689,13 +4734,13 @@ const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
4689
4734
|
}
|
|
4690
4735
|
)
|
|
4691
4736
|
},
|
|
4692
|
-
|
|
4737
|
+
d
|
|
4693
4738
|
);
|
|
4694
4739
|
})
|
|
4695
4740
|
}
|
|
4696
4741
|
);
|
|
4697
4742
|
};
|
|
4698
|
-
|
|
4743
|
+
Hr.__docgenInfo = {
|
|
4699
4744
|
displayName: "Waterfall",
|
|
4700
4745
|
description: "瀑布流布局组件,支持图片和视频混合展示",
|
|
4701
4746
|
props: {
|
|
@@ -4751,8 +4796,8 @@ Ar.__docgenInfo = {
|
|
|
4751
4796
|
}
|
|
4752
4797
|
}
|
|
4753
4798
|
};
|
|
4754
|
-
const
|
|
4755
|
-
algorithm:
|
|
4799
|
+
const Fr = {
|
|
4800
|
+
algorithm: Pn.defaultAlgorithm,
|
|
4756
4801
|
token: {
|
|
4757
4802
|
// 主色
|
|
4758
4803
|
colorPrimary: "#3b82f6",
|
|
@@ -4818,21 +4863,21 @@ const Hr = {
|
|
|
4818
4863
|
}
|
|
4819
4864
|
};
|
|
4820
4865
|
export {
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4866
|
+
rr as AdvancedTable,
|
|
4867
|
+
Kn as AppModal,
|
|
4868
|
+
er as BackButton,
|
|
4869
|
+
Wn as Button,
|
|
4870
|
+
Un as Card,
|
|
4871
|
+
Mr as DynamicInput,
|
|
4872
|
+
Ir as DynamicTextArea,
|
|
4873
|
+
Zn as EmptyAndSpin,
|
|
4874
|
+
tr as LinkButton,
|
|
4875
|
+
Xn as PageTable,
|
|
4876
|
+
Nr as RichTextEditor,
|
|
4877
|
+
an as VideoCard,
|
|
4878
|
+
Lr as VirtualTable,
|
|
4879
|
+
Hr as Waterfall,
|
|
4880
|
+
Qn as XcIcon,
|
|
4881
|
+
Fr as lightTheme
|
|
4837
4882
|
};
|
|
4838
4883
|
//# sourceMappingURL=index.es.js.map
|