bi-components-library 1.0.13 → 1.0.14
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 +1171 -1161
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Button as
|
|
3
|
-
import { createFromIconfontCN as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
var
|
|
1
|
+
import Ze, { useState as Q, useRef as F, useMemo as Xe, useCallback as U, useEffect as le, useLayoutEffect as Ge } from "react";
|
|
2
|
+
import { Button as we, Card as Pe, Modal as et, Table as Be, Flex as Fe, Spin as tt, Empty as nt, Select as Oe, Form as $e, Input as Ke, Space as at, Dropdown as rt, Tooltip as ot, Progress as lt, Pagination as st, theme as it } from "antd";
|
|
3
|
+
import { createFromIconfontCN as ct, LeftOutlined as ut, SearchOutlined as dt, ReloadOutlined as pt, InfoCircleOutlined as ft, SendOutlined as mt, PauseCircleOutlined as yt, PlayCircleOutlined as gt } from "@ant-design/icons";
|
|
4
|
+
import { createPortal as ht } from "react-dom";
|
|
5
|
+
var je = { exports: {} }, ke = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -12,29 +12,29 @@ var Se = { exports: {} }, Ee = {};
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
var t = Symbol.for("react.transitional.element"),
|
|
20
|
-
function l(a,
|
|
21
|
-
var
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
for (var g in
|
|
25
|
-
g !== "key" && (
|
|
26
|
-
} else
|
|
27
|
-
return
|
|
15
|
+
var ze;
|
|
16
|
+
function bt() {
|
|
17
|
+
if (ze) return ke;
|
|
18
|
+
ze = 1;
|
|
19
|
+
var t = Symbol.for("react.transitional.element"), d = Symbol.for("react.fragment");
|
|
20
|
+
function l(a, o, y) {
|
|
21
|
+
var q = null;
|
|
22
|
+
if (y !== void 0 && (q = "" + y), o.key !== void 0 && (q = "" + o.key), "key" in o) {
|
|
23
|
+
y = {};
|
|
24
|
+
for (var g in o)
|
|
25
|
+
g !== "key" && (y[g] = o[g]);
|
|
26
|
+
} else y = o;
|
|
27
|
+
return o = y.ref, {
|
|
28
28
|
$$typeof: t,
|
|
29
29
|
type: a,
|
|
30
|
-
key:
|
|
31
|
-
ref:
|
|
32
|
-
props:
|
|
30
|
+
key: q,
|
|
31
|
+
ref: o !== void 0 ? o : null,
|
|
32
|
+
props: y
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return ke.Fragment = d, ke.jsx = l, ke.jsxs = l, ke;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var Ne = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -44,20 +44,20 @@ var ke = {};
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
return
|
|
47
|
+
var He;
|
|
48
|
+
function vt() {
|
|
49
|
+
return He || (He = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
50
|
function t(s) {
|
|
51
51
|
if (s == null) return null;
|
|
52
52
|
if (typeof s == "function")
|
|
53
|
-
return s.$$typeof ===
|
|
53
|
+
return s.$$typeof === X ? null : s.displayName || s.name || null;
|
|
54
54
|
if (typeof s == "string") return s;
|
|
55
55
|
switch (s) {
|
|
56
|
-
case
|
|
56
|
+
case C:
|
|
57
57
|
return "Fragment";
|
|
58
|
-
case
|
|
58
|
+
case E:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case i:
|
|
61
61
|
return "StrictMode";
|
|
62
62
|
case V:
|
|
63
63
|
return "Suspense";
|
|
@@ -70,11 +70,11 @@ function mt() {
|
|
|
70
70
|
switch (typeof s.tag == "number" && console.error(
|
|
71
71
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
72
|
), s.$$typeof) {
|
|
73
|
-
case
|
|
73
|
+
case r:
|
|
74
74
|
return "Portal";
|
|
75
|
-
case
|
|
75
|
+
case A:
|
|
76
76
|
return (s.displayName || "Context") + ".Provider";
|
|
77
|
-
case
|
|
77
|
+
case T:
|
|
78
78
|
return (s._context.displayName || "Context") + ".Consumer";
|
|
79
79
|
case b:
|
|
80
80
|
var L = s.render;
|
|
@@ -90,28 +90,28 @@ function mt() {
|
|
|
90
90
|
}
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function d(s) {
|
|
94
94
|
return "" + s;
|
|
95
95
|
}
|
|
96
96
|
function l(s) {
|
|
97
97
|
try {
|
|
98
|
-
|
|
98
|
+
d(s);
|
|
99
99
|
var L = !1;
|
|
100
100
|
} catch {
|
|
101
101
|
L = !0;
|
|
102
102
|
}
|
|
103
103
|
if (L) {
|
|
104
104
|
L = console;
|
|
105
|
-
var
|
|
106
|
-
return
|
|
105
|
+
var Y = L.error, ae = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
106
|
+
return Y.call(
|
|
107
107
|
L,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
109
|
ae
|
|
110
|
-
),
|
|
110
|
+
), d(s);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
function a(s) {
|
|
114
|
-
if (s ===
|
|
114
|
+
if (s === C) return "<>";
|
|
115
115
|
if (typeof s == "object" && s !== null && s.$$typeof === D)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
@@ -121,48 +121,48 @@ function mt() {
|
|
|
121
121
|
return "<...>";
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
var s =
|
|
124
|
+
function o() {
|
|
125
|
+
var s = z.A;
|
|
126
126
|
return s === null ? null : s.getOwner();
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function y() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
if (
|
|
131
|
+
function q(s) {
|
|
132
|
+
if (K.call(s, "key")) {
|
|
133
133
|
var L = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
134
134
|
if (L && L.isReactWarning) return !1;
|
|
135
135
|
}
|
|
136
136
|
return s.key !== void 0;
|
|
137
137
|
}
|
|
138
138
|
function g(s, L) {
|
|
139
|
-
function
|
|
139
|
+
function Y() {
|
|
140
140
|
I || (I = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
142
|
L
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
145
|
+
Y.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
146
|
+
get: Y,
|
|
147
147
|
configurable: !0
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function c() {
|
|
151
151
|
var s = t(this.type);
|
|
152
|
-
return
|
|
152
|
+
return Z[s] || (Z[s] = !0, console.error(
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
154
|
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
155
155
|
}
|
|
156
|
-
function e(s, L,
|
|
157
|
-
return
|
|
158
|
-
$$typeof:
|
|
156
|
+
function e(s, L, Y, ae, fe, ie, xe, M) {
|
|
157
|
+
return Y = ie.ref, s = {
|
|
158
|
+
$$typeof: p,
|
|
159
159
|
type: s,
|
|
160
160
|
key: L,
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
161
|
+
props: ie,
|
|
162
|
+
_owner: fe
|
|
163
|
+
}, (Y !== void 0 ? Y : null) !== null ? Object.defineProperty(s, "ref", {
|
|
164
164
|
enumerable: !1,
|
|
165
|
-
get:
|
|
165
|
+
get: c
|
|
166
166
|
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
167
167
|
configurable: !1,
|
|
168
168
|
enumerable: !1,
|
|
@@ -177,19 +177,19 @@ function mt() {
|
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
|
-
value:
|
|
180
|
+
value: xe
|
|
181
181
|
}), Object.defineProperty(s, "_debugTask", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
|
-
value:
|
|
185
|
+
value: M
|
|
186
186
|
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function w(s, L, Y, ae, fe, ie, xe, M) {
|
|
189
189
|
var G = L.children;
|
|
190
190
|
if (G !== void 0)
|
|
191
191
|
if (ae)
|
|
192
|
-
if (
|
|
192
|
+
if (ee(G)) {
|
|
193
193
|
for (ae = 0; ae < G.length; ae++)
|
|
194
194
|
u(G[ae]);
|
|
195
195
|
Object.freeze && Object.freeze(G);
|
|
@@ -198,12 +198,12 @@ function mt() {
|
|
|
198
198
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
199
199
|
);
|
|
200
200
|
else u(G);
|
|
201
|
-
if (
|
|
201
|
+
if (K.call(L, "key")) {
|
|
202
202
|
G = t(s);
|
|
203
|
-
var ue = Object.keys(L).filter(function(
|
|
204
|
-
return
|
|
203
|
+
var ue = Object.keys(L).filter(function(Ce) {
|
|
204
|
+
return Ce !== "key";
|
|
205
205
|
});
|
|
206
|
-
ae = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
206
|
+
ae = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}", ge[G + ae] || (ue = 0 < ue.length ? "{" + ue.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
207
|
`A props object containing a "key" prop is being spread into JSX:
|
|
208
208
|
let props = %s;
|
|
209
209
|
<%s {...props} />
|
|
@@ -214,82 +214,82 @@ React keys must be passed directly to JSX without using spread:
|
|
|
214
214
|
G,
|
|
215
215
|
ue,
|
|
216
216
|
G
|
|
217
|
-
),
|
|
217
|
+
), ge[G + ae] = !0);
|
|
218
218
|
}
|
|
219
|
-
if (G = null,
|
|
220
|
-
|
|
221
|
-
for (var
|
|
222
|
-
|
|
223
|
-
} else
|
|
219
|
+
if (G = null, Y !== void 0 && (l(Y), G = "" + Y), q(L) && (l(L.key), G = "" + L.key), "key" in L) {
|
|
220
|
+
Y = {};
|
|
221
|
+
for (var be in L)
|
|
222
|
+
be !== "key" && (Y[be] = L[be]);
|
|
223
|
+
} else Y = L;
|
|
224
224
|
return G && g(
|
|
225
|
-
|
|
225
|
+
Y,
|
|
226
226
|
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
227
227
|
), e(
|
|
228
228
|
s,
|
|
229
229
|
G,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
ie,
|
|
231
|
+
fe,
|
|
232
|
+
o(),
|
|
233
|
+
Y,
|
|
234
|
+
xe,
|
|
235
|
+
M
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
function u(s) {
|
|
239
|
-
typeof s == "object" && s !== null && s.$$typeof ===
|
|
239
|
+
typeof s == "object" && s !== null && s.$$typeof === p && s._store && (s._store.validated = 1);
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var S = Ze, p = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), A = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), z = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, ee = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
S = {
|
|
245
245
|
react_stack_bottom_frame: function(s) {
|
|
246
246
|
return s();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var I,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
)(), pe =
|
|
253
|
-
|
|
254
|
-
var
|
|
255
|
-
return
|
|
249
|
+
var I, Z = {}, te = S.react_stack_bottom_frame.bind(
|
|
250
|
+
S,
|
|
251
|
+
y
|
|
252
|
+
)(), pe = k(a(y)), ge = {};
|
|
253
|
+
Ne.Fragment = C, Ne.jsx = function(s, L, Y, ae, fe) {
|
|
254
|
+
var ie = 1e4 > z.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return w(
|
|
256
256
|
s,
|
|
257
257
|
L,
|
|
258
|
-
|
|
258
|
+
Y,
|
|
259
259
|
!1,
|
|
260
260
|
ae,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
fe,
|
|
262
|
+
ie ? Error("react-stack-top-frame") : te,
|
|
263
|
+
ie ? k(a(s)) : pe
|
|
264
264
|
);
|
|
265
|
-
},
|
|
266
|
-
var
|
|
267
|
-
return
|
|
265
|
+
}, Ne.jsxs = function(s, L, Y, ae, fe) {
|
|
266
|
+
var ie = 1e4 > z.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return w(
|
|
268
268
|
s,
|
|
269
269
|
L,
|
|
270
|
-
|
|
270
|
+
Y,
|
|
271
271
|
!0,
|
|
272
272
|
ae,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
fe,
|
|
274
|
+
ie ? Error("react-stack-top-frame") : te,
|
|
275
|
+
ie ? k(a(s)) : pe
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
|
-
}()),
|
|
278
|
+
}()), Ne;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
var We;
|
|
281
|
+
function xt() {
|
|
282
|
+
return We || (We = 1, process.env.NODE_ENV === "production" ? je.exports = bt() : je.exports = vt()), je.exports;
|
|
283
283
|
}
|
|
284
|
-
var n =
|
|
285
|
-
const
|
|
284
|
+
var n = xt();
|
|
285
|
+
const wt = ({
|
|
286
286
|
variant: t = "primary",
|
|
287
|
-
loading:
|
|
287
|
+
loading: d = !1,
|
|
288
288
|
children: l,
|
|
289
289
|
...a
|
|
290
290
|
}) => {
|
|
291
|
-
const
|
|
292
|
-
switch (
|
|
291
|
+
const o = (y) => {
|
|
292
|
+
switch (y) {
|
|
293
293
|
case "primary":
|
|
294
294
|
return "primary";
|
|
295
295
|
case "ghost":
|
|
@@ -305,17 +305,17 @@ const gt = ({
|
|
|
305
305
|
}
|
|
306
306
|
};
|
|
307
307
|
return /* @__PURE__ */ n.jsx(
|
|
308
|
-
|
|
308
|
+
we,
|
|
309
309
|
{
|
|
310
310
|
...a,
|
|
311
|
-
type:
|
|
312
|
-
loading:
|
|
311
|
+
type: o(t),
|
|
312
|
+
loading: d,
|
|
313
313
|
ghost: t === "ghost",
|
|
314
314
|
children: l
|
|
315
315
|
}
|
|
316
316
|
);
|
|
317
317
|
};
|
|
318
|
-
|
|
318
|
+
wt.__docgenInfo = {
|
|
319
319
|
displayName: "Button",
|
|
320
320
|
description: "基础按钮,用于触发操作",
|
|
321
321
|
props: {
|
|
@@ -359,25 +359,25 @@ gt.__docgenInfo = {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
|
-
const
|
|
362
|
+
const Et = ({
|
|
363
363
|
title: t,
|
|
364
|
-
children:
|
|
364
|
+
children: d,
|
|
365
365
|
bordered: l = !0,
|
|
366
366
|
hoverable: a = !1,
|
|
367
|
-
size:
|
|
368
|
-
...
|
|
367
|
+
size: o = "default",
|
|
368
|
+
...y
|
|
369
369
|
}) => /* @__PURE__ */ n.jsx(
|
|
370
|
-
|
|
370
|
+
Pe,
|
|
371
371
|
{
|
|
372
|
-
...
|
|
372
|
+
...y,
|
|
373
373
|
title: t,
|
|
374
374
|
bordered: l,
|
|
375
375
|
hoverable: a,
|
|
376
|
-
size:
|
|
377
|
-
children:
|
|
376
|
+
size: o,
|
|
377
|
+
children: d
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
|
-
|
|
380
|
+
Et.__docgenInfo = {
|
|
381
381
|
displayName: "Card",
|
|
382
382
|
description: "卡片容器,用于分组内容",
|
|
383
383
|
props: {
|
|
@@ -428,23 +428,23 @@ ht.__docgenInfo = {
|
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
|
-
const
|
|
431
|
+
const Tt = ({
|
|
432
432
|
showDefaultFooter: t = !0,
|
|
433
|
-
...
|
|
433
|
+
...d
|
|
434
434
|
}) => {
|
|
435
|
-
const l =
|
|
436
|
-
/* @__PURE__ */ n.jsx(
|
|
437
|
-
/* @__PURE__ */ n.jsx(
|
|
435
|
+
const l = d.footer !== void 0 ? d.footer : t ? (a, { OkBtn: o, CancelBtn: y }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
436
|
+
/* @__PURE__ */ n.jsx(o, {}),
|
|
437
|
+
/* @__PURE__ */ n.jsx(y, {})
|
|
438
438
|
] }) : null;
|
|
439
439
|
return /* @__PURE__ */ n.jsx(
|
|
440
|
-
|
|
440
|
+
et,
|
|
441
441
|
{
|
|
442
|
-
...
|
|
442
|
+
...d,
|
|
443
443
|
footer: l
|
|
444
444
|
}
|
|
445
445
|
);
|
|
446
446
|
};
|
|
447
|
-
|
|
447
|
+
Tt.__docgenInfo = {
|
|
448
448
|
displayName: "AppModal",
|
|
449
449
|
description: "应用级模态框组件,基于 Ant Design Modal 封装",
|
|
450
450
|
props: {
|
|
@@ -505,20 +505,20 @@ vt.__docgenInfo = {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
};
|
|
508
|
-
const
|
|
508
|
+
const kt = ({
|
|
509
509
|
scrollX: t,
|
|
510
|
-
showPagination:
|
|
510
|
+
showPagination: d = !0,
|
|
511
511
|
defaultPageSize: l = 10,
|
|
512
512
|
...a
|
|
513
513
|
}) => /* @__PURE__ */ n.jsx(
|
|
514
|
-
|
|
514
|
+
Be,
|
|
515
515
|
{
|
|
516
516
|
...a,
|
|
517
517
|
scroll: {
|
|
518
518
|
x: t || "max-content",
|
|
519
519
|
y: "50vh"
|
|
520
520
|
},
|
|
521
|
-
pagination:
|
|
521
|
+
pagination: d ? {
|
|
522
522
|
hideOnSinglePage: !0,
|
|
523
523
|
showSizeChanger: !0,
|
|
524
524
|
showQuickJumper: !0,
|
|
@@ -527,7 +527,7 @@ const bt = ({
|
|
|
527
527
|
} : !1
|
|
528
528
|
}
|
|
529
529
|
);
|
|
530
|
-
|
|
530
|
+
kt.__docgenInfo = {
|
|
531
531
|
displayName: "PageTable",
|
|
532
532
|
description: "页面级表格组件,高度铺满容器,自动滚动",
|
|
533
533
|
props: {
|
|
@@ -577,30 +577,30 @@ bt.__docgenInfo = {
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
|
-
const
|
|
580
|
+
const Nt = ct({
|
|
581
581
|
scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
|
|
582
|
-
}),
|
|
582
|
+
}), Ct = ({
|
|
583
583
|
name: t,
|
|
584
|
-
size:
|
|
584
|
+
size: d,
|
|
585
585
|
color: l,
|
|
586
586
|
style: a,
|
|
587
|
-
...
|
|
587
|
+
...o
|
|
588
588
|
}) => {
|
|
589
|
-
const
|
|
590
|
-
fontSize:
|
|
589
|
+
const y = {
|
|
590
|
+
fontSize: d,
|
|
591
591
|
color: l,
|
|
592
592
|
...a
|
|
593
593
|
};
|
|
594
594
|
return /* @__PURE__ */ n.jsx(
|
|
595
|
-
|
|
595
|
+
Nt,
|
|
596
596
|
{
|
|
597
|
-
...
|
|
597
|
+
...o,
|
|
598
598
|
type: t,
|
|
599
|
-
style:
|
|
599
|
+
style: y
|
|
600
600
|
}
|
|
601
601
|
);
|
|
602
602
|
};
|
|
603
|
-
|
|
603
|
+
Ct.__docgenInfo = {
|
|
604
604
|
displayName: "XcIcon",
|
|
605
605
|
description: "自定义图标组件,基于 iconfont",
|
|
606
606
|
props: {
|
|
@@ -636,43 +636,43 @@ wt.__docgenInfo = {
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
|
-
const
|
|
639
|
+
const St = ({
|
|
640
640
|
loading: t,
|
|
641
|
-
description:
|
|
641
|
+
description: d = "暂无数据",
|
|
642
642
|
className: l,
|
|
643
643
|
emptyChildren: a,
|
|
644
|
-
loadingText:
|
|
645
|
-
emptyImage:
|
|
644
|
+
loadingText: o,
|
|
645
|
+
emptyImage: y
|
|
646
646
|
}) => t ? /* @__PURE__ */ n.jsxs(
|
|
647
|
-
|
|
647
|
+
Fe,
|
|
648
648
|
{
|
|
649
649
|
className: `pt-10 w-full ${l || ""}`,
|
|
650
650
|
align: "center",
|
|
651
651
|
justify: "center",
|
|
652
652
|
vertical: !0,
|
|
653
653
|
children: [
|
|
654
|
-
/* @__PURE__ */ n.jsx(
|
|
655
|
-
|
|
654
|
+
/* @__PURE__ */ n.jsx(tt, { size: "large" }),
|
|
655
|
+
o && /* @__PURE__ */ n.jsx("div", { className: "mt-4 text-gray-500", children: o })
|
|
656
656
|
]
|
|
657
657
|
}
|
|
658
658
|
) : /* @__PURE__ */ n.jsx(
|
|
659
|
-
|
|
659
|
+
Fe,
|
|
660
660
|
{
|
|
661
661
|
className: `pt-10 w-full ${l || ""}`,
|
|
662
662
|
align: "center",
|
|
663
663
|
justify: "center",
|
|
664
664
|
children: /* @__PURE__ */ n.jsx(
|
|
665
|
-
|
|
665
|
+
nt,
|
|
666
666
|
{
|
|
667
|
-
image:
|
|
668
|
-
description:
|
|
667
|
+
image: y,
|
|
668
|
+
description: d,
|
|
669
669
|
imageStyle: { height: 180 },
|
|
670
670
|
children: a
|
|
671
671
|
}
|
|
672
672
|
)
|
|
673
673
|
}
|
|
674
674
|
);
|
|
675
|
-
|
|
675
|
+
St.__docgenInfo = {
|
|
676
676
|
displayName: "EmptyAndSpin",
|
|
677
677
|
description: "空状态和加载状态组合组件",
|
|
678
678
|
props: {
|
|
@@ -715,24 +715,24 @@ Et.__docgenInfo = {
|
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
};
|
|
718
|
-
const
|
|
718
|
+
const qt = ({
|
|
719
719
|
onClick: t,
|
|
720
|
-
showText:
|
|
720
|
+
showText: d = !1,
|
|
721
721
|
className: l,
|
|
722
722
|
size: a = "small",
|
|
723
|
-
type:
|
|
723
|
+
type: o = "default"
|
|
724
724
|
}) => /* @__PURE__ */ n.jsx(
|
|
725
|
-
|
|
725
|
+
we,
|
|
726
726
|
{
|
|
727
727
|
size: a,
|
|
728
|
-
type:
|
|
729
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
728
|
+
type: o,
|
|
729
|
+
icon: /* @__PURE__ */ n.jsx(ut, {}),
|
|
730
730
|
className: `cursor-pointer ${l || ""}`,
|
|
731
731
|
onClick: t,
|
|
732
|
-
children:
|
|
732
|
+
children: d && "返回"
|
|
733
733
|
}
|
|
734
734
|
);
|
|
735
|
-
|
|
735
|
+
qt.__docgenInfo = {
|
|
736
736
|
displayName: "BackButton",
|
|
737
737
|
description: "返回按钮组件",
|
|
738
738
|
props: {
|
|
@@ -771,14 +771,14 @@ kt.__docgenInfo = {
|
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
|
-
const
|
|
774
|
+
const At = ({
|
|
775
775
|
removePadding: t = !0,
|
|
776
|
-
className:
|
|
776
|
+
className: d,
|
|
777
777
|
...l
|
|
778
778
|
}) => {
|
|
779
|
-
const a = t ? `px-0 h-auto ${
|
|
779
|
+
const a = t ? `px-0 h-auto ${d || ""}` : d;
|
|
780
780
|
return /* @__PURE__ */ n.jsx(
|
|
781
|
-
|
|
781
|
+
we,
|
|
782
782
|
{
|
|
783
783
|
type: "link",
|
|
784
784
|
...l,
|
|
@@ -787,7 +787,7 @@ const Tt = ({
|
|
|
787
787
|
}
|
|
788
788
|
);
|
|
789
789
|
};
|
|
790
|
-
|
|
790
|
+
At.__docgenInfo = {
|
|
791
791
|
displayName: "LinkButton",
|
|
792
792
|
description: "链接样式按钮组件,适用于表格操作列",
|
|
793
793
|
props: {
|
|
@@ -824,129 +824,129 @@ Tt.__docgenInfo = {
|
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
|
-
const { Option:
|
|
827
|
+
const { Option: _t } = Oe, $t = ({
|
|
828
828
|
columns: t,
|
|
829
|
-
request:
|
|
829
|
+
request: d,
|
|
830
830
|
searchFields: l = [],
|
|
831
831
|
showSearch: a = !0,
|
|
832
|
-
showRefresh:
|
|
833
|
-
defaultPageSize:
|
|
834
|
-
pageSizeOptions:
|
|
832
|
+
showRefresh: o = !0,
|
|
833
|
+
defaultPageSize: y = 10,
|
|
834
|
+
pageSizeOptions: q = ["10", "20", "50", "100"],
|
|
835
835
|
autoLoad: g = !0,
|
|
836
|
-
externalParams:
|
|
836
|
+
externalParams: c = {},
|
|
837
837
|
...e
|
|
838
838
|
}) => {
|
|
839
|
-
const [
|
|
839
|
+
const [w, u] = Q([]), [S, p] = Q(!1), [r, C] = Q({
|
|
840
840
|
current: 1,
|
|
841
|
-
pageSize:
|
|
841
|
+
pageSize: y,
|
|
842
842
|
total: 0
|
|
843
|
-
}), [
|
|
844
|
-
V.current =
|
|
845
|
-
const _ =
|
|
846
|
-
_.current =
|
|
847
|
-
const P =
|
|
848
|
-
const { sortable: I, render:
|
|
843
|
+
}), [i, E] = Q({}), [T, A] = Q({}), [b] = $e.useForm(), V = F(r);
|
|
844
|
+
V.current = r;
|
|
845
|
+
const _ = F(c);
|
|
846
|
+
_.current = c;
|
|
847
|
+
const P = F(!1), D = Xe(() => t.map((k) => {
|
|
848
|
+
const { sortable: I, render: Z, ...te } = k;
|
|
849
849
|
return {
|
|
850
|
-
...
|
|
850
|
+
...te,
|
|
851
851
|
sorter: I ? !0 : void 0,
|
|
852
|
-
render:
|
|
852
|
+
render: Z || ((pe) => pe)
|
|
853
853
|
};
|
|
854
|
-
}), [t]), B =
|
|
855
|
-
if (
|
|
856
|
-
|
|
854
|
+
}), [t]), B = U(async (k = {}) => {
|
|
855
|
+
if (d) {
|
|
856
|
+
p(!0);
|
|
857
857
|
try {
|
|
858
858
|
const I = {
|
|
859
859
|
page: V.current.current,
|
|
860
860
|
pageSize: V.current.pageSize,
|
|
861
|
-
sortField:
|
|
862
|
-
sortOrder:
|
|
863
|
-
searchParams: { ...
|
|
864
|
-
...
|
|
865
|
-
},
|
|
866
|
-
|
|
867
|
-
...
|
|
868
|
-
total:
|
|
869
|
-
current: I.page ||
|
|
861
|
+
sortField: T.field,
|
|
862
|
+
sortOrder: T.order,
|
|
863
|
+
searchParams: { ...i, ..._.current },
|
|
864
|
+
...k
|
|
865
|
+
}, Z = await d(I);
|
|
866
|
+
Z.success && (u(Z.data), C((te) => ({
|
|
867
|
+
...te,
|
|
868
|
+
total: Z.total,
|
|
869
|
+
current: I.page || te.current
|
|
870
870
|
})));
|
|
871
871
|
} catch (I) {
|
|
872
872
|
console.error("加载数据失败:", I);
|
|
873
873
|
} finally {
|
|
874
|
-
|
|
874
|
+
p(!1);
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
|
-
}, [
|
|
878
|
-
|
|
879
|
-
}, []),
|
|
880
|
-
b.resetFields(),
|
|
881
|
-
}, [b]),
|
|
877
|
+
}, [d, T, i]), X = U((k) => {
|
|
878
|
+
E(k), C((I) => ({ ...I, current: 1 }));
|
|
879
|
+
}, []), z = U(() => {
|
|
880
|
+
b.resetFields(), E({}), C((k) => ({ ...k, current: 1 }));
|
|
881
|
+
}, [b]), K = U(() => {
|
|
882
882
|
B();
|
|
883
|
-
}, [B]),
|
|
884
|
-
const
|
|
885
|
-
current:
|
|
886
|
-
pageSize:
|
|
887
|
-
total:
|
|
883
|
+
}, [B]), ee = U((k, I, Z) => {
|
|
884
|
+
const te = {
|
|
885
|
+
current: k.current || 1,
|
|
886
|
+
pageSize: k.pageSize || y,
|
|
887
|
+
total: k.total || 0
|
|
888
888
|
}, pe = {
|
|
889
|
-
field:
|
|
890
|
-
order:
|
|
889
|
+
field: Z?.field,
|
|
890
|
+
order: Z?.order
|
|
891
891
|
};
|
|
892
|
-
|
|
893
|
-
}, [
|
|
894
|
-
return
|
|
895
|
-
const
|
|
896
|
-
(g && !P.current ||
|
|
897
|
-
}, [g,
|
|
898
|
-
a && l.length > 0 && /* @__PURE__ */ n.jsx(
|
|
899
|
-
|
|
892
|
+
C(te), A(pe);
|
|
893
|
+
}, [y]);
|
|
894
|
+
return le(() => {
|
|
895
|
+
const k = Object.keys(c).length > 0;
|
|
896
|
+
(g && !P.current || k) && (B(), P.current = !0);
|
|
897
|
+
}, [g, c, B]), /* @__PURE__ */ n.jsxs("div", { children: [
|
|
898
|
+
a && l.length > 0 && /* @__PURE__ */ n.jsx(Pe, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ n.jsxs(
|
|
899
|
+
$e,
|
|
900
900
|
{
|
|
901
901
|
form: b,
|
|
902
902
|
layout: "inline",
|
|
903
|
-
onFinish:
|
|
904
|
-
initialValues: l.reduce((
|
|
903
|
+
onFinish: X,
|
|
904
|
+
initialValues: l.reduce((k, I) => (I.defaultValue !== void 0 && (k[I.key] = I.defaultValue), k), {}),
|
|
905
905
|
children: [
|
|
906
|
-
l.map((
|
|
907
|
-
|
|
906
|
+
l.map((k) => /* @__PURE__ */ n.jsx($e.Item, { name: k.key, label: k.label, children: k.type === "input" ? /* @__PURE__ */ n.jsx(
|
|
907
|
+
Ke,
|
|
908
908
|
{
|
|
909
|
-
placeholder:
|
|
909
|
+
placeholder: k.placeholder || `请输入${k.label}`,
|
|
910
910
|
style: { width: 200 }
|
|
911
911
|
}
|
|
912
912
|
) : /* @__PURE__ */ n.jsx(
|
|
913
|
-
|
|
913
|
+
Oe,
|
|
914
914
|
{
|
|
915
|
-
placeholder:
|
|
915
|
+
placeholder: k.placeholder || `请选择${k.label}`,
|
|
916
916
|
style: { width: 200 },
|
|
917
917
|
allowClear: !0,
|
|
918
|
-
children:
|
|
918
|
+
children: k.options?.map((I) => /* @__PURE__ */ n.jsx(_t, { value: I.value, children: I.label }, I.value))
|
|
919
919
|
}
|
|
920
|
-
) },
|
|
921
|
-
/* @__PURE__ */ n.jsx(
|
|
922
|
-
/* @__PURE__ */ n.jsx(
|
|
923
|
-
/* @__PURE__ */ n.jsx(
|
|
924
|
-
|
|
920
|
+
) }, k.key)),
|
|
921
|
+
/* @__PURE__ */ n.jsx($e.Item, { children: /* @__PURE__ */ n.jsxs(at, { children: [
|
|
922
|
+
/* @__PURE__ */ n.jsx(we, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ n.jsx(dt, {}), children: "查询" }),
|
|
923
|
+
/* @__PURE__ */ n.jsx(we, { onClick: z, children: "重置" }),
|
|
924
|
+
o && /* @__PURE__ */ n.jsx(we, { icon: /* @__PURE__ */ n.jsx(pt, {}), onClick: K, children: "刷新" })
|
|
925
925
|
] }) })
|
|
926
926
|
]
|
|
927
927
|
}
|
|
928
928
|
) }),
|
|
929
929
|
/* @__PURE__ */ n.jsx(
|
|
930
|
-
|
|
930
|
+
Be,
|
|
931
931
|
{
|
|
932
932
|
...e,
|
|
933
933
|
columns: D,
|
|
934
|
-
dataSource:
|
|
935
|
-
loading:
|
|
934
|
+
dataSource: w,
|
|
935
|
+
loading: S,
|
|
936
936
|
pagination: {
|
|
937
|
-
...
|
|
937
|
+
...r,
|
|
938
938
|
showSizeChanger: !0,
|
|
939
939
|
showQuickJumper: !0,
|
|
940
|
-
showTotal: (
|
|
941
|
-
pageSizeOptions:
|
|
940
|
+
showTotal: (k, I) => `第 ${I[0]}-${I[1]} 条/共 ${k} 条`,
|
|
941
|
+
pageSizeOptions: q
|
|
942
942
|
},
|
|
943
|
-
onChange:
|
|
943
|
+
onChange: ee,
|
|
944
944
|
scroll: { x: "max-content", y: "50vh" }
|
|
945
945
|
}
|
|
946
946
|
)
|
|
947
947
|
] });
|
|
948
948
|
};
|
|
949
|
-
|
|
949
|
+
$t.__docgenInfo = {
|
|
950
950
|
displayName: "AdvancedTable",
|
|
951
951
|
description: "高阶表格组件,支持异步请求、搜索、排序等功能",
|
|
952
952
|
props: {
|
|
@@ -1013,73 +1013,73 @@ Ct.__docgenInfo = {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
|
-
function
|
|
1016
|
+
function Ve(t, d, l) {
|
|
1017
1017
|
if (!t.current) return;
|
|
1018
|
-
const a = /* @__PURE__ */ new Set(),
|
|
1019
|
-
for (const u of
|
|
1020
|
-
u.exclusionGroup && u.exclusionGroup !== "separator" && (a.add(u.exclusionGroup),
|
|
1018
|
+
const a = /* @__PURE__ */ new Set(), o = {};
|
|
1019
|
+
for (const u of d)
|
|
1020
|
+
u.exclusionGroup && u.exclusionGroup !== "separator" && (a.add(u.exclusionGroup), o[u.exclusionGroup] || (o[u.exclusionGroup] = []), o[u.exclusionGroup].push({
|
|
1021
1021
|
type: u.type,
|
|
1022
1022
|
key: u.key,
|
|
1023
1023
|
exclusionGroup: u.exclusionGroup
|
|
1024
1024
|
}));
|
|
1025
|
-
const
|
|
1025
|
+
const y = {};
|
|
1026
1026
|
for (const u of a) {
|
|
1027
|
-
|
|
1028
|
-
for (const
|
|
1029
|
-
if (
|
|
1030
|
-
if (l[
|
|
1031
|
-
|
|
1027
|
+
y[u] = !1;
|
|
1028
|
+
for (const S of o[u])
|
|
1029
|
+
if (S.type === "upload" && S.key) {
|
|
1030
|
+
if (l[S.key] !== null && l[S.key] !== void 0) {
|
|
1031
|
+
y[u] = !0;
|
|
1032
1032
|
break;
|
|
1033
1033
|
}
|
|
1034
|
-
} else if (
|
|
1035
|
-
const
|
|
1036
|
-
`[data-type="variable"][data-key="${
|
|
1034
|
+
} else if (S.type === "variable" && S.key) {
|
|
1035
|
+
const p = t.current.querySelector(
|
|
1036
|
+
`[data-type="variable"][data-key="${S.key}"]`
|
|
1037
1037
|
);
|
|
1038
|
-
if (
|
|
1039
|
-
|
|
1038
|
+
if (p && p.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1039
|
+
y[u] = !0;
|
|
1040
1040
|
break;
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
|
-
const
|
|
1045
|
-
(u) =>
|
|
1044
|
+
const q = d.some((u) => u.exclusionGroup === "separator"), c = Object.keys(y).filter(
|
|
1045
|
+
(u) => y[u]
|
|
1046
1046
|
).length > 0;
|
|
1047
1047
|
let e = null;
|
|
1048
|
-
if (
|
|
1049
|
-
for (const u of
|
|
1050
|
-
if (u.exclusionGroup && u.exclusionGroup !== "separator" &&
|
|
1048
|
+
if (c && q) {
|
|
1049
|
+
for (const u of d)
|
|
1050
|
+
if (u.exclusionGroup && u.exclusionGroup !== "separator" && y[u.exclusionGroup]) {
|
|
1051
1051
|
e = u.exclusionGroup;
|
|
1052
1052
|
break;
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
1055
|
for (const u of a) {
|
|
1056
|
-
const
|
|
1056
|
+
const S = t.current.querySelectorAll(
|
|
1057
1057
|
`[data-group="${u}"]`
|
|
1058
1058
|
);
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
}) :
|
|
1062
|
-
|
|
1063
|
-
}) :
|
|
1064
|
-
|
|
1059
|
+
q && c && e ? u === e ? S.forEach((p) => {
|
|
1060
|
+
p.classList.contains("required-upload-group") ? p.style.setProperty("display", "inline-flex", "important") : (p.classList.contains("exclusion-wrapper"), p.style.setProperty("display", "inline-block", "important"));
|
|
1061
|
+
}) : S.forEach((p) => {
|
|
1062
|
+
p.style.display = "none", p.style.setProperty("display", "none", "important");
|
|
1063
|
+
}) : S.forEach((p) => {
|
|
1064
|
+
p.classList.contains("required-upload-group") ? p.style.setProperty("display", "inline-flex", "important") : (p.classList.contains("exclusion-wrapper"), p.style.setProperty("display", "inline-block", "important"));
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
t.current.querySelectorAll(
|
|
1068
1068
|
'[data-group="separator"]'
|
|
1069
1069
|
).forEach((u) => {
|
|
1070
|
-
u.style.display =
|
|
1070
|
+
u.style.display = c ? "none" : "inline";
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function Le(t, d, l, a) {
|
|
1074
1074
|
if (!t.current) {
|
|
1075
1075
|
a(!1);
|
|
1076
1076
|
return;
|
|
1077
1077
|
}
|
|
1078
|
-
const
|
|
1079
|
-
for (let
|
|
1080
|
-
const e =
|
|
1078
|
+
const o = [];
|
|
1079
|
+
for (let c = 0; c < d.length; c++) {
|
|
1080
|
+
const e = d[c];
|
|
1081
1081
|
if ((e.type === "variable" || e.type === "upload" || e.type === "multi-variable") && e.required && e.key) {
|
|
1082
|
-
|
|
1082
|
+
o.push({
|
|
1083
1083
|
exclusionGroup: e.exclusionGroup || "",
|
|
1084
1084
|
key: e.key,
|
|
1085
1085
|
type: e.type === "multi-variable" ? "variable" : e.type,
|
|
@@ -1088,10 +1088,10 @@ function je(t, p, l, a) {
|
|
|
1088
1088
|
continue;
|
|
1089
1089
|
}
|
|
1090
1090
|
if (e.type === "text" && e.className?.includes("rte-text-required") && e.exclusionGroup)
|
|
1091
|
-
for (let
|
|
1092
|
-
const u =
|
|
1091
|
+
for (let w = c + 1; w < d.length; w++) {
|
|
1092
|
+
const u = d[w];
|
|
1093
1093
|
if (u.exclusionGroup === e.exclusionGroup && (u.type === "variable" || u.type === "upload") && u.key) {
|
|
1094
|
-
|
|
1094
|
+
o.push({
|
|
1095
1095
|
exclusionGroup: e.exclusionGroup,
|
|
1096
1096
|
key: u.key,
|
|
1097
1097
|
type: u.type
|
|
@@ -1100,33 +1100,33 @@ function je(t, p, l, a) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
const
|
|
1104
|
-
let
|
|
1105
|
-
if (
|
|
1106
|
-
const
|
|
1107
|
-
(
|
|
1108
|
-
) <
|
|
1109
|
-
(
|
|
1110
|
-
) >
|
|
1111
|
-
|
|
1103
|
+
const y = d.some((c) => c.exclusionGroup === "separator");
|
|
1104
|
+
let q = !1;
|
|
1105
|
+
if (y && o.length > 1) {
|
|
1106
|
+
const c = d.findIndex((u) => u.exclusionGroup === "separator"), e = o.filter((u) => d.findIndex(
|
|
1107
|
+
(p) => (p.type === "variable" || p.type === "upload") && p.key === u.key && p.exclusionGroup === u.exclusionGroup
|
|
1108
|
+
) < c), w = o.filter((u) => d.findIndex(
|
|
1109
|
+
(p) => (p.type === "variable" || p.type === "upload") && p.key === u.key && p.exclusionGroup === u.exclusionGroup
|
|
1110
|
+
) > c);
|
|
1111
|
+
q = e.length > 0 && w.length > 0;
|
|
1112
1112
|
}
|
|
1113
|
-
if (
|
|
1114
|
-
if (
|
|
1113
|
+
if (o.length === 0) {
|
|
1114
|
+
if (d.length === 0) {
|
|
1115
1115
|
if (!t.current) {
|
|
1116
1116
|
a(!1);
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
const
|
|
1120
|
-
a(
|
|
1119
|
+
const c = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
1120
|
+
a(c.length > 0);
|
|
1121
1121
|
return;
|
|
1122
1122
|
}
|
|
1123
1123
|
a(!0);
|
|
1124
1124
|
return;
|
|
1125
1125
|
}
|
|
1126
|
-
const g =
|
|
1126
|
+
const g = o.filter((c) => {
|
|
1127
1127
|
if (!t.current) return !1;
|
|
1128
1128
|
const e = t.current.querySelectorAll(
|
|
1129
|
-
`[data-group="${
|
|
1129
|
+
`[data-group="${c.exclusionGroup}"]`
|
|
1130
1130
|
);
|
|
1131
1131
|
return e.length === 0 ? !1 : e[0].style.display !== "none";
|
|
1132
1132
|
});
|
|
@@ -1134,146 +1134,146 @@ function je(t, p, l, a) {
|
|
|
1134
1134
|
a(!0);
|
|
1135
1135
|
return;
|
|
1136
1136
|
}
|
|
1137
|
-
if (
|
|
1138
|
-
let
|
|
1137
|
+
if (q) {
|
|
1138
|
+
let c = !1;
|
|
1139
1139
|
for (const e of g)
|
|
1140
1140
|
if (e.type === "upload" && e.key) {
|
|
1141
1141
|
if (l[e.key] !== null && l[e.key] !== void 0) {
|
|
1142
|
-
|
|
1142
|
+
c = !0;
|
|
1143
1143
|
break;
|
|
1144
1144
|
}
|
|
1145
1145
|
} else if (e.type === "variable" && e.key)
|
|
1146
1146
|
if (e.isMultiVariable) {
|
|
1147
|
-
const
|
|
1147
|
+
const w = t.current.querySelectorAll(
|
|
1148
1148
|
`[data-type="variable"][data-multi-key="${e.key}"]`
|
|
1149
1149
|
);
|
|
1150
1150
|
let u = !1;
|
|
1151
|
-
for (const
|
|
1152
|
-
if (
|
|
1151
|
+
for (const S of Array.from(w))
|
|
1152
|
+
if (S.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1153
1153
|
u = !0;
|
|
1154
1154
|
break;
|
|
1155
1155
|
}
|
|
1156
1156
|
if (u) {
|
|
1157
|
-
|
|
1157
|
+
c = !0;
|
|
1158
1158
|
break;
|
|
1159
1159
|
}
|
|
1160
1160
|
} else {
|
|
1161
|
-
const
|
|
1161
|
+
const w = t.current.querySelector(
|
|
1162
1162
|
`[data-type="variable"][data-key="${e.key}"]`
|
|
1163
1163
|
);
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1164
|
+
if (w && w.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1165
|
+
c = !0;
|
|
1166
1166
|
break;
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
a(
|
|
1169
|
+
a(c);
|
|
1170
1170
|
} else {
|
|
1171
|
-
let
|
|
1171
|
+
let c = !0;
|
|
1172
1172
|
for (const e of g)
|
|
1173
1173
|
if (e.type === "upload" && e.key) {
|
|
1174
1174
|
if (l[e.key] === null || l[e.key] === void 0) {
|
|
1175
|
-
|
|
1175
|
+
c = !1;
|
|
1176
1176
|
break;
|
|
1177
1177
|
}
|
|
1178
1178
|
} else if (e.type === "variable" && e.key)
|
|
1179
1179
|
if (e.isMultiVariable) {
|
|
1180
|
-
const
|
|
1180
|
+
const w = t.current.querySelectorAll(
|
|
1181
1181
|
`[data-type="variable"][data-multi-key="${e.key}"]`
|
|
1182
1182
|
);
|
|
1183
1183
|
let u = !1;
|
|
1184
|
-
for (const
|
|
1185
|
-
if (
|
|
1184
|
+
for (const S of Array.from(w))
|
|
1185
|
+
if (S.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1186
1186
|
u = !0;
|
|
1187
1187
|
break;
|
|
1188
1188
|
}
|
|
1189
1189
|
if (!u) {
|
|
1190
|
-
|
|
1190
|
+
c = !1;
|
|
1191
1191
|
break;
|
|
1192
1192
|
}
|
|
1193
1193
|
} else {
|
|
1194
|
-
const
|
|
1194
|
+
const w = t.current.querySelector(
|
|
1195
1195
|
`[data-type="variable"][data-key="${e.key}"]`
|
|
1196
1196
|
);
|
|
1197
|
-
if (!
|
|
1198
|
-
|
|
1197
|
+
if (!w) {
|
|
1198
|
+
c = !1;
|
|
1199
1199
|
break;
|
|
1200
1200
|
}
|
|
1201
|
-
if (
|
|
1202
|
-
|
|
1201
|
+
if (w.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
|
|
1202
|
+
c = !1;
|
|
1203
1203
|
break;
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
a(
|
|
1206
|
+
a(c);
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1209
|
+
function Ie(t, d) {
|
|
1210
1210
|
if (!t.current) return;
|
|
1211
1211
|
t.current.querySelectorAll('[data-type="variable"]').forEach((a) => {
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1212
|
+
const o = a.innerText.replace(/\n/g, "");
|
|
1213
|
+
o.replace(/\u200B/g, "") ? a.classList.remove("show-placeholder") : (o !== "" && (a.innerText = ""), a.classList.add("show-placeholder"));
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function jt(t, d, l, a, o, y = {}, q) {
|
|
1217
1217
|
if (!t.current) return;
|
|
1218
|
-
let g = "",
|
|
1219
|
-
for (;
|
|
1220
|
-
const e =
|
|
1221
|
-
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") &&
|
|
1222
|
-
const
|
|
1223
|
-
if (
|
|
1224
|
-
const
|
|
1218
|
+
let g = "", c = 0;
|
|
1219
|
+
for (; c < d.length; ) {
|
|
1220
|
+
const e = d[c], w = c + 1 < d.length ? d[c + 1] : null;
|
|
1221
|
+
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && w) {
|
|
1222
|
+
const i = w.type === "upload" && w.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === w.exclusionGroup, E = w.type === "variable" && w.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === w.exclusionGroup;
|
|
1223
|
+
if (i) {
|
|
1224
|
+
const A = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, b = "</span>";
|
|
1225
1225
|
let V = "";
|
|
1226
1226
|
e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
|
|
1227
|
-
const _ =
|
|
1228
|
-
g +=
|
|
1227
|
+
const _ = w, P = l[_.key] !== null && l[_.key] !== void 0, D = P ? l[_.key]?.name : _.text, B = P ? "" : "hidden", X = _.tooltip && !P ? "" : "hidden", z = P ? "has-file" : "", K = P && D ? ` data-file-name="${D.replace(/"/g, """)}"` : "", ee = `<span contenteditable="false" data-type="upload" data-key="${_.key}" class="upload-chip"><span class="upload-inner-wrapper ${z}"><span class="upload-icon">${P ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${K}>${D || _.text}</span>${_.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${X}" data-upload-key="${_.key}" data-tooltip="${_.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${B}" title="移除文件">×</span></span></span>`;
|
|
1228
|
+
g += A + V + ee + b, c += 2;
|
|
1229
1229
|
continue;
|
|
1230
1230
|
}
|
|
1231
|
-
if (
|
|
1232
|
-
const
|
|
1231
|
+
if (E) {
|
|
1232
|
+
const A = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, b = "</span>";
|
|
1233
1233
|
let V = "";
|
|
1234
1234
|
e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
|
|
1235
|
-
const _ =
|
|
1236
|
-
g +=
|
|
1235
|
+
const _ = w, D = (_.key ? o[_.key] : void 0) || _.text || "", B = !D, X = B ? "" : D, z = B ? "show-placeholder" : "", K = _.exclusionGroup ? ` data-group="${_.exclusionGroup}"` : "", ee = _.tooltip ? ` data-tooltip="${_.tooltip.replace(/"/g, """)}" data-variable-key="${_.key || ""}"` : "", k = _.tooltip && B ? "" : "hidden", I = `<span contenteditable="true" data-type="variable" data-key="${_.key}" data-placeholder="${_.placeholder || ""}"${K}${ee} class="variable-chip ${z}">${X}${_.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${k}" data-variable-key="${_.key}" data-tooltip="${_.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1236
|
+
g += A + V + I + b, c += 2;
|
|
1237
1237
|
continue;
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
|
-
const
|
|
1241
|
-
let
|
|
1240
|
+
const S = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", p = e.exclusionGroup ? `<span ${S} class="exclusion-wrapper">` : "", r = e.exclusionGroup ? "</span>" : "";
|
|
1241
|
+
let C = "";
|
|
1242
1242
|
if (e.type === "tag") {
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1243
|
+
const E = a || q === "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>', T = a ? ' data-locked="true"' : "", A = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-tag-key="${e.key || ""}"` : "";
|
|
1244
|
+
C = `<span contenteditable="false" class="tag-node group"${T}${A}><span class="tag-label">${e.text}</span>${E}</span>`;
|
|
1245
1245
|
} else if (e.type === "text") {
|
|
1246
|
-
const
|
|
1247
|
-
e.className ?
|
|
1246
|
+
const i = a ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
|
|
1247
|
+
e.className ? C = `<span class="${e.className}"${i}>${e.text ?? ""}</span>` : C = a ? `<span${i}>${e.text ?? ""}</span>` : `<span contenteditable="false">${e.text ?? ""}</span>`;
|
|
1248
1248
|
} else if (e.type === "variable" && e.key) {
|
|
1249
|
-
const
|
|
1250
|
-
e.required ?
|
|
1249
|
+
const E = o[e.key] || e.text || "", T = !E, A = T ? "" : E, b = T ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", _ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && T ? "" : "hidden", D = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${V}${_} class="variable-chip ${b}">${A}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1250
|
+
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>${D}</span>` : C = D;
|
|
1251
1251
|
} else if (e.type === "upload" && e.key) {
|
|
1252
|
-
const
|
|
1253
|
-
e.required ?
|
|
1252
|
+
const i = l[e.key] !== null && l[e.key] !== void 0, E = i ? l[e.key]?.name : e.text, T = i ? "" : "hidden", A = e.tooltip && !i ? "" : "hidden", b = i ? "has-file" : "", V = i && E ? ` data-file-name="${E.replace(/"/g, """)}"` : "", _ = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${b}"><span class="upload-icon">${i ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${V}>${E || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${A}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${T}" title="移除文件">×</span></span></span>`;
|
|
1253
|
+
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>${_}</span>` : C = _;
|
|
1254
1254
|
} else if (e.type === "multi-variable" && e.key) {
|
|
1255
|
-
const
|
|
1256
|
-
let
|
|
1257
|
-
for (let b = 0; b <
|
|
1258
|
-
const V = `${e.key}_${b}`, _ =
|
|
1259
|
-
|
|
1255
|
+
const i = e.maxCount || 9, E = y[e.key] || 1, T = Math.min(E, i);
|
|
1256
|
+
let A = "";
|
|
1257
|
+
for (let b = 0; b < T; b++) {
|
|
1258
|
+
const V = `${e.key}_${b}`, _ = o[V] || "", P = !_, D = P ? "" : _, B = P ? "show-placeholder" : "", X = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", z = e.tooltip && P ? "" : "hidden", K = `<span contenteditable="true" data-type="variable" data-key="${V}" data-multi-key="${e.key}" data-index="${b}" data-placeholder="${e.placeholder || ""}"${X} class="variable-chip ${B}">${D}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${z}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1259
|
+
A += K;
|
|
1260
1260
|
}
|
|
1261
|
-
e.required ?
|
|
1261
|
+
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>${A}</span>` : C = A;
|
|
1262
1262
|
}
|
|
1263
|
-
g +=
|
|
1263
|
+
g += p + C + r, c++;
|
|
1264
1264
|
}
|
|
1265
1265
|
t.current && (t.current.innerHTML = g, setTimeout(() => {
|
|
1266
1266
|
if (!t.current) return;
|
|
1267
|
-
t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1268
|
-
const u =
|
|
1269
|
-
u.replace(/\u200B/g, "") ?
|
|
1267
|
+
t.current.querySelectorAll('[data-type="variable"]').forEach((w) => {
|
|
1268
|
+
const u = w.innerText.replace(/\n/g, "");
|
|
1269
|
+
u.replace(/\u200B/g, "") ? w.classList.remove("show-placeholder") : (u !== "" && (w.innerText = ""), w.classList.add("show-placeholder"));
|
|
1270
1270
|
});
|
|
1271
1271
|
}, 0));
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const
|
|
1273
|
+
function Rt(t, d, l, a, o = {}, y, q, g) {
|
|
1274
|
+
const c = U(() => {
|
|
1275
1275
|
if (!t.current) return;
|
|
1276
|
-
if (
|
|
1276
|
+
if (d.length === 0) {
|
|
1277
1277
|
t.current.innerHTML = "";
|
|
1278
1278
|
return;
|
|
1279
1279
|
}
|
|
@@ -1281,314 +1281,309 @@ function qt(t, p, l, a, r = {}, m, A, g) {
|
|
|
1281
1281
|
const u = t.current.__tempVariableValues;
|
|
1282
1282
|
if (u ? (e = u, setTimeout(() => {
|
|
1283
1283
|
if (t.current) {
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1284
|
+
const S = t.current;
|
|
1285
|
+
S.__tempVariableValues === u && delete S.__tempVariableValues;
|
|
1286
1286
|
}
|
|
1287
1287
|
}, 100)) : t.current.querySelectorAll(
|
|
1288
1288
|
'[data-type="variable"]'
|
|
1289
|
-
).forEach((
|
|
1290
|
-
const
|
|
1291
|
-
if (
|
|
1292
|
-
const
|
|
1293
|
-
|
|
1289
|
+
).forEach((p) => {
|
|
1290
|
+
const r = p.dataset.key;
|
|
1291
|
+
if (r) {
|
|
1292
|
+
const C = p.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1293
|
+
C && (e[r] = C);
|
|
1294
1294
|
}
|
|
1295
|
-
}),
|
|
1296
|
-
const { key:
|
|
1295
|
+
}), jt(t, d, l, a, e, o, g), y?.current) {
|
|
1296
|
+
const { key: S, offset: p } = y.current;
|
|
1297
1297
|
setTimeout(() => {
|
|
1298
1298
|
if (!t.current) return;
|
|
1299
|
-
const
|
|
1300
|
-
`[data-type="variable"][data-key="${
|
|
1299
|
+
const r = t.current.querySelector(
|
|
1300
|
+
`[data-type="variable"][data-key="${S}"]`
|
|
1301
1301
|
);
|
|
1302
|
-
if (
|
|
1302
|
+
if (r) {
|
|
1303
1303
|
try {
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1304
|
+
const C = document.createRange(), i = document.createTreeWalker(
|
|
1305
|
+
r,
|
|
1306
1306
|
NodeFilter.SHOW_TEXT,
|
|
1307
1307
|
null
|
|
1308
1308
|
);
|
|
1309
|
-
let
|
|
1310
|
-
for (;
|
|
1311
|
-
const b =
|
|
1312
|
-
if (
|
|
1313
|
-
|
|
1309
|
+
let E = 0, T = null, A = 0;
|
|
1310
|
+
for (; i.nextNode(); ) {
|
|
1311
|
+
const b = i.currentNode, V = b.textContent?.length || 0;
|
|
1312
|
+
if (E + V >= p) {
|
|
1313
|
+
T = b, A = p - E;
|
|
1314
1314
|
break;
|
|
1315
1315
|
}
|
|
1316
|
-
|
|
1316
|
+
E += V;
|
|
1317
1317
|
}
|
|
1318
|
-
if (
|
|
1319
|
-
|
|
1318
|
+
if (T) {
|
|
1319
|
+
C.setStart(T, Math.min(A, T.textContent?.length || 0)), C.collapse(!0);
|
|
1320
1320
|
const b = window.getSelection();
|
|
1321
|
-
b && (b.removeAllRanges(), b.addRange(
|
|
1321
|
+
b && (b.removeAllRanges(), b.addRange(C), r.focus());
|
|
1322
1322
|
} else {
|
|
1323
|
-
|
|
1323
|
+
C.selectNodeContents(r), C.collapse(!1);
|
|
1324
1324
|
const b = window.getSelection();
|
|
1325
|
-
b && (b.removeAllRanges(), b.addRange(
|
|
1325
|
+
b && (b.removeAllRanges(), b.addRange(C), r.focus());
|
|
1326
1326
|
}
|
|
1327
1327
|
} catch {
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1328
|
+
const C = document.createRange();
|
|
1329
|
+
C.selectNodeContents(r), C.collapse(!1);
|
|
1330
|
+
const i = window.getSelection();
|
|
1331
|
+
i && (i.removeAllRanges(), i.addRange(C), r.focus());
|
|
1332
1332
|
}
|
|
1333
|
-
|
|
1333
|
+
y.current = null;
|
|
1334
1334
|
}
|
|
1335
1335
|
}, 0);
|
|
1336
1336
|
}
|
|
1337
|
-
}, [
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
}, [
|
|
1337
|
+
}, [d, l, a, t, o, y, q, g]);
|
|
1338
|
+
le(() => {
|
|
1339
|
+
c();
|
|
1340
|
+
}, [c]);
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1343
|
-
|
|
1344
|
-
const
|
|
1345
|
-
if (!
|
|
1346
|
-
const
|
|
1347
|
-
const
|
|
1348
|
-
if (
|
|
1349
|
-
const e =
|
|
1350
|
-
e && a({ key: e, anchorEl:
|
|
1342
|
+
function It(t, d, l, a) {
|
|
1343
|
+
le(() => {
|
|
1344
|
+
const o = t.current;
|
|
1345
|
+
if (!o) return;
|
|
1346
|
+
const y = (g) => {
|
|
1347
|
+
const c = g.target?.closest(".upload-info-icon");
|
|
1348
|
+
if (c && c.classList.contains("upload-info-icon")) {
|
|
1349
|
+
const e = c.dataset.uploadKey;
|
|
1350
|
+
e && a({ key: e, anchorEl: c, type: "upload" });
|
|
1351
1351
|
}
|
|
1352
|
-
},
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1352
|
+
}, q = (g) => {
|
|
1353
|
+
const c = g.target?.closest(".upload-info-icon"), e = g.relatedTarget;
|
|
1354
|
+
c && c.classList.contains("upload-info-icon") && (!e || !o.contains(e) ? a(null) : e.closest(".upload-info-icon") || a(null));
|
|
1355
1355
|
};
|
|
1356
|
-
return
|
|
1357
|
-
|
|
1356
|
+
return o.addEventListener("mouseover", y, !0), o.addEventListener("mouseout", q, !0), () => {
|
|
1357
|
+
o.removeEventListener("mouseover", y, !0), o.removeEventListener("mouseout", q, !0);
|
|
1358
1358
|
};
|
|
1359
|
-
}, [
|
|
1359
|
+
}, [d, l, t, a]);
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1362
|
-
|
|
1361
|
+
function Vt(t, d, l, a) {
|
|
1362
|
+
le(() => {
|
|
1363
1363
|
if (!t.current) return;
|
|
1364
|
-
const
|
|
1364
|
+
const o = (c) => {
|
|
1365
1365
|
if (a === "hideTagClose")
|
|
1366
1366
|
return;
|
|
1367
|
-
const e =
|
|
1368
|
-
|
|
1369
|
-
},
|
|
1367
|
+
const e = c.currentTarget, w = e.dataset.tooltip, u = e.dataset.tagKey || "";
|
|
1368
|
+
w && l({ key: u, anchorEl: e, type: "tag" });
|
|
1369
|
+
}, y = () => {
|
|
1370
1370
|
l(null);
|
|
1371
1371
|
};
|
|
1372
|
-
let
|
|
1372
|
+
let q;
|
|
1373
1373
|
const g = () => {
|
|
1374
1374
|
if (!t.current) return;
|
|
1375
1375
|
t.current.querySelectorAll(
|
|
1376
1376
|
".tag-node[data-tooltip]"
|
|
1377
1377
|
).forEach((e) => {
|
|
1378
|
-
e.addEventListener("mouseenter",
|
|
1378
|
+
e.addEventListener("mouseenter", o), e.addEventListener("mouseleave", y);
|
|
1379
1379
|
});
|
|
1380
1380
|
};
|
|
1381
|
-
return
|
|
1382
|
-
|
|
1381
|
+
return q = requestAnimationFrame(() => {
|
|
1382
|
+
q = requestAnimationFrame(g);
|
|
1383
1383
|
}), () => {
|
|
1384
|
-
cancelAnimationFrame(
|
|
1384
|
+
cancelAnimationFrame(q), t.current && t.current.querySelectorAll(
|
|
1385
1385
|
".tag-node[data-tooltip]"
|
|
1386
1386
|
).forEach((e) => {
|
|
1387
|
-
e.removeEventListener("mouseenter",
|
|
1387
|
+
e.removeEventListener("mouseenter", o), e.removeEventListener("mouseleave", y);
|
|
1388
1388
|
});
|
|
1389
1389
|
};
|
|
1390
|
-
}, [
|
|
1390
|
+
}, [d, t, l, a]);
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1393
|
-
|
|
1392
|
+
function Lt(t, d, l) {
|
|
1393
|
+
le(() => {
|
|
1394
1394
|
const a = t.current;
|
|
1395
1395
|
if (!a) return;
|
|
1396
|
-
const
|
|
1397
|
-
const g =
|
|
1396
|
+
const o = (q) => {
|
|
1397
|
+
const g = q.target?.closest(".variable-info-icon");
|
|
1398
1398
|
if (g && g.classList.contains("variable-info-icon")) {
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1399
|
+
const c = g.dataset.variableKey;
|
|
1400
|
+
c && l({ key: c, anchorEl: g, type: "variable" });
|
|
1401
1401
|
}
|
|
1402
|
-
},
|
|
1403
|
-
const g =
|
|
1404
|
-
g && g.classList.contains("variable-info-icon") && (!
|
|
1402
|
+
}, y = (q) => {
|
|
1403
|
+
const g = q.target?.closest(".variable-info-icon"), c = q.relatedTarget;
|
|
1404
|
+
g && g.classList.contains("variable-info-icon") && (!c || !a.contains(c) ? l(null) : c.closest(".variable-info-icon") || l(null));
|
|
1405
1405
|
};
|
|
1406
|
-
return a.addEventListener("mouseover",
|
|
1407
|
-
a.removeEventListener("mouseover",
|
|
1406
|
+
return a.addEventListener("mouseover", o, !0), a.addEventListener("mouseout", y, !0), () => {
|
|
1407
|
+
a.removeEventListener("mouseover", o, !0), a.removeEventListener("mouseout", y, !0);
|
|
1408
1408
|
};
|
|
1409
|
-
}, [
|
|
1409
|
+
}, [d, t, l]);
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1412
|
-
|
|
1411
|
+
function Pt(t, d, l, a) {
|
|
1412
|
+
le(() => {
|
|
1413
1413
|
if (!t.current) return;
|
|
1414
|
-
const
|
|
1415
|
-
const e =
|
|
1414
|
+
const o = (c) => {
|
|
1415
|
+
const e = c.currentTarget;
|
|
1416
1416
|
e.dataset.fileName && a({ key: "", anchorEl: e, type: "upload-label" });
|
|
1417
|
-
},
|
|
1417
|
+
}, y = () => {
|
|
1418
1418
|
a(null);
|
|
1419
1419
|
};
|
|
1420
|
-
let
|
|
1420
|
+
let q;
|
|
1421
1421
|
const g = () => {
|
|
1422
1422
|
if (!t.current) return;
|
|
1423
1423
|
t.current.querySelectorAll(
|
|
1424
1424
|
".upload-label[data-file-name]"
|
|
1425
1425
|
).forEach((e) => {
|
|
1426
|
-
e.addEventListener("mouseenter",
|
|
1426
|
+
e.addEventListener("mouseenter", o), e.addEventListener("mouseleave", y);
|
|
1427
1427
|
});
|
|
1428
1428
|
};
|
|
1429
|
-
return
|
|
1430
|
-
|
|
1429
|
+
return q = requestAnimationFrame(() => {
|
|
1430
|
+
q = requestAnimationFrame(g);
|
|
1431
1431
|
}), () => {
|
|
1432
|
-
cancelAnimationFrame(
|
|
1432
|
+
cancelAnimationFrame(q), t.current && t.current.querySelectorAll(
|
|
1433
1433
|
".upload-label[data-file-name]"
|
|
1434
1434
|
).forEach((e) => {
|
|
1435
|
-
e.removeEventListener("mouseenter",
|
|
1435
|
+
e.removeEventListener("mouseenter", o), e.removeEventListener("mouseleave", y);
|
|
1436
1436
|
});
|
|
1437
1437
|
};
|
|
1438
|
-
}, [
|
|
1438
|
+
}, [d, l, t, a]);
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
}, [l,
|
|
1440
|
+
function Bt(t, d, l, a) {
|
|
1441
|
+
le(() => {
|
|
1442
|
+
Ve(t, d, l), Le(t, d, l, a);
|
|
1443
|
+
}, [l, d, t, a]);
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1446
|
-
|
|
1445
|
+
function Ot(t, d) {
|
|
1446
|
+
le(() => {
|
|
1447
1447
|
if (!t.current) return;
|
|
1448
1448
|
let l = !1, a = 0;
|
|
1449
|
-
const
|
|
1449
|
+
const o = () => {
|
|
1450
1450
|
l = !0;
|
|
1451
|
-
},
|
|
1451
|
+
}, y = () => {
|
|
1452
1452
|
l = !1, a = Date.now();
|
|
1453
1453
|
};
|
|
1454
|
-
let
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1454
|
+
let q = !1, g = 0;
|
|
1455
|
+
const c = () => {
|
|
1456
|
+
q = !0;
|
|
1457
1457
|
}, e = () => {
|
|
1458
|
-
|
|
1459
|
-
},
|
|
1458
|
+
q = !1, g = Date.now();
|
|
1459
|
+
}, w = () => {
|
|
1460
1460
|
g = Date.now();
|
|
1461
1461
|
}, u = () => {
|
|
1462
1462
|
if (!t.current) return;
|
|
1463
|
-
const
|
|
1464
|
-
if (!
|
|
1465
|
-
return;
|
|
1466
|
-
const o = d.getRangeAt(0);
|
|
1467
|
-
if (!o.collapsed) {
|
|
1468
|
-
t.current.contains(o.commonAncestorContainer) || d.removeAllRanges();
|
|
1463
|
+
const p = window.getSelection();
|
|
1464
|
+
if (!p || p.rangeCount === 0 || d.current || l || q || Date.now() - g < 500)
|
|
1469
1465
|
return;
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1466
|
+
const r = p.getRangeAt(0);
|
|
1467
|
+
if (!r.collapsed)
|
|
1468
|
+
return t.current.contains(r.commonAncestorContainer), void 0;
|
|
1469
|
+
const C = p.anchorNode;
|
|
1470
|
+
if (!C || !t.current.contains(C))
|
|
1475
1471
|
return;
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
if (S.nodeType === Node.ELEMENT_NODE ? c = S.closest('[data-type="variable"]') : S.nodeType === Node.TEXT_NODE && S.parentElement && (c = S.parentElement.closest('[data-type="variable"]')), !c) {
|
|
1472
|
+
let i = null;
|
|
1473
|
+
if (C.nodeType === Node.ELEMENT_NODE ? i = C.closest('[data-type="variable"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (i = C.parentElement.closest('[data-type="variable"]')), !i) {
|
|
1479
1474
|
if (Date.now() - a > 500)
|
|
1480
1475
|
return;
|
|
1481
|
-
const
|
|
1482
|
-
if (
|
|
1483
|
-
let
|
|
1484
|
-
for (const
|
|
1485
|
-
if (
|
|
1486
|
-
|
|
1476
|
+
const E = t.current.querySelectorAll('[data-type="variable"]');
|
|
1477
|
+
if (E.length > 0) {
|
|
1478
|
+
let T = null;
|
|
1479
|
+
for (const A of Array.from(E))
|
|
1480
|
+
if (A.style.display !== "none") {
|
|
1481
|
+
T = A;
|
|
1487
1482
|
break;
|
|
1488
1483
|
}
|
|
1489
|
-
if (!
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1484
|
+
if (!T && E.length > 0 && (T = E[0]), T) {
|
|
1485
|
+
const A = document.createRange();
|
|
1486
|
+
A.selectNodeContents(T), A.collapse(!1), p.removeAllRanges(), p.addRange(A), T.focus();
|
|
1492
1487
|
} else
|
|
1493
|
-
|
|
1488
|
+
p.removeAllRanges();
|
|
1494
1489
|
} else
|
|
1495
|
-
|
|
1490
|
+
p.removeAllRanges();
|
|
1496
1491
|
}
|
|
1497
|
-
},
|
|
1498
|
-
return
|
|
1499
|
-
const
|
|
1500
|
-
|
|
1492
|
+
}, S = t.current;
|
|
1493
|
+
return S && (S.addEventListener("compositionstart", c), S.addEventListener("compositionend", e), S.addEventListener("input", w)), document.addEventListener("mousedown", o), document.addEventListener("mouseup", y), document.addEventListener("selectionchange", u), () => {
|
|
1494
|
+
const p = t.current;
|
|
1495
|
+
p && (p.removeEventListener("compositionstart", c), p.removeEventListener("compositionend", e), p.removeEventListener("input", w)), document.removeEventListener("mousedown", o), document.removeEventListener("mouseup", y), document.removeEventListener("selectionchange", u);
|
|
1501
1496
|
};
|
|
1502
|
-
}, [t,
|
|
1497
|
+
}, [t, d]);
|
|
1503
1498
|
}
|
|
1504
|
-
const
|
|
1499
|
+
const Mt = ({
|
|
1505
1500
|
config: t,
|
|
1506
|
-
onSend:
|
|
1501
|
+
onSend: d,
|
|
1507
1502
|
isProcessing: l = !1,
|
|
1508
1503
|
disabled: a = !1,
|
|
1509
|
-
width:
|
|
1510
|
-
lockStructure:
|
|
1511
|
-
agentOptions:
|
|
1504
|
+
width: o,
|
|
1505
|
+
lockStructure: y = !1,
|
|
1506
|
+
agentOptions: q = [],
|
|
1512
1507
|
onAgentSelect: g,
|
|
1513
|
-
onAgentExit:
|
|
1508
|
+
onAgentExit: c,
|
|
1514
1509
|
loading: e = !1,
|
|
1515
|
-
placeholder:
|
|
1510
|
+
placeholder: w,
|
|
1516
1511
|
border: u,
|
|
1517
|
-
background:
|
|
1518
|
-
hideButtons:
|
|
1512
|
+
background: S = "transparent",
|
|
1513
|
+
hideButtons: p
|
|
1519
1514
|
}) => {
|
|
1520
|
-
const
|
|
1515
|
+
const r = F(null), C = F(null), [i, E] = Q({}), [T, A] = Q(null), [b, V] = Q(null), _ = F(!1), P = F(null), [D, B] = Q(!1), X = F(null), [z, K] = Q(!0), [ee, k] = Q(() => {
|
|
1521
1516
|
const f = {};
|
|
1522
|
-
return t.forEach((
|
|
1523
|
-
|
|
1517
|
+
return t.forEach((m) => {
|
|
1518
|
+
m.type === "multi-variable" && m.key && (f[m.key] = 1);
|
|
1524
1519
|
}), f;
|
|
1525
|
-
}), I =
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
}, [
|
|
1529
|
-
|
|
1530
|
-
}, [
|
|
1531
|
-
const pe =
|
|
1532
|
-
|
|
1533
|
-
const f = pe(
|
|
1534
|
-
if (f && f !==
|
|
1520
|
+
}), I = F({}), Z = F({}), te = F({});
|
|
1521
|
+
le(() => {
|
|
1522
|
+
Z.current = i;
|
|
1523
|
+
}, [i]), le(() => {
|
|
1524
|
+
te.current = ee;
|
|
1525
|
+
}, [ee]);
|
|
1526
|
+
const pe = U((f) => f.find((h) => h.type === "tag")?.text || null, []), ge = F(t), s = F(null);
|
|
1527
|
+
le(() => {
|
|
1528
|
+
const f = pe(ge.current), m = pe(t);
|
|
1529
|
+
if (f && f !== m && r.current) {
|
|
1535
1530
|
const h = {};
|
|
1536
|
-
|
|
1537
|
-
const
|
|
1538
|
-
if (
|
|
1531
|
+
r.current.querySelectorAll('[data-type="variable"]').forEach((v) => {
|
|
1532
|
+
const x = v.dataset.key;
|
|
1533
|
+
if (x) {
|
|
1539
1534
|
const N = v.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1540
|
-
N && (h[
|
|
1535
|
+
N && (h[x] = N);
|
|
1541
1536
|
}
|
|
1542
1537
|
}), I.current[f] = {
|
|
1543
1538
|
variableValues: h,
|
|
1544
|
-
files: { ...
|
|
1545
|
-
multiVariableCounts: { ...
|
|
1539
|
+
files: { ...Z.current },
|
|
1540
|
+
multiVariableCounts: { ...te.current }
|
|
1546
1541
|
};
|
|
1547
1542
|
}
|
|
1548
|
-
if (
|
|
1549
|
-
const h = I.current[
|
|
1550
|
-
s.current = h,
|
|
1551
|
-
} else if (
|
|
1543
|
+
if (m && I.current[m]) {
|
|
1544
|
+
const h = I.current[m];
|
|
1545
|
+
s.current = h, E(h.files), k(h.multiVariableCounts);
|
|
1546
|
+
} else if (m) {
|
|
1552
1547
|
s.current = null;
|
|
1553
1548
|
const h = {};
|
|
1554
|
-
t.forEach((
|
|
1555
|
-
|
|
1556
|
-
}),
|
|
1549
|
+
t.forEach(($) => {
|
|
1550
|
+
$.type === "multi-variable" && $.key && (h[$.key] = 1);
|
|
1551
|
+
}), k(h), E({});
|
|
1557
1552
|
} else
|
|
1558
|
-
s.current = null,
|
|
1559
|
-
|
|
1560
|
-
}, [t, pe]),
|
|
1561
|
-
s.current &&
|
|
1553
|
+
s.current = null, k({}), E({});
|
|
1554
|
+
ge.current = t;
|
|
1555
|
+
}, [t, pe]), Ge(() => {
|
|
1556
|
+
s.current && r.current && (r.current.__tempVariableValues = s.current.variableValues, setTimeout(() => {
|
|
1562
1557
|
s.current && (s.current = null);
|
|
1563
1558
|
}, 0));
|
|
1564
|
-
}),
|
|
1559
|
+
}), Rt(r, t, i, y, ee, X, void 0, p), It(r, t, i, V), Vt(r, t, V, p), Pt(r, t, i, V), Lt(r, t, V), Bt(r, t, i, B), Ot(r, _), le(() => {
|
|
1565
1560
|
if (t.length > 0) {
|
|
1566
|
-
|
|
1561
|
+
K(!1);
|
|
1567
1562
|
return;
|
|
1568
1563
|
}
|
|
1569
1564
|
const f = () => {
|
|
1570
|
-
if (!
|
|
1571
|
-
|
|
1565
|
+
if (!r.current) {
|
|
1566
|
+
K(!0);
|
|
1572
1567
|
return;
|
|
1573
1568
|
}
|
|
1574
|
-
const h =
|
|
1575
|
-
let
|
|
1576
|
-
|
|
1577
|
-
(R.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (
|
|
1569
|
+
const h = r.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", $ = r.current.querySelectorAll('[data-type="variable"]'), v = r.current.querySelectorAll('[data-type="upload"]');
|
|
1570
|
+
let x = !1;
|
|
1571
|
+
$.forEach((R) => {
|
|
1572
|
+
(R.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (x = !0);
|
|
1578
1573
|
}), v.forEach((R) => {
|
|
1579
|
-
R.querySelector(".upload-inner-wrapper.has-file") && (
|
|
1574
|
+
R.querySelector(".upload-inner-wrapper.has-file") && (x = !0);
|
|
1580
1575
|
});
|
|
1581
|
-
const N = !h && !
|
|
1582
|
-
|
|
1576
|
+
const N = !h && !x;
|
|
1577
|
+
K(N), t.length === 0 && B(!N);
|
|
1583
1578
|
};
|
|
1584
1579
|
f();
|
|
1585
|
-
const
|
|
1586
|
-
return
|
|
1580
|
+
const m = new MutationObserver(f);
|
|
1581
|
+
return r.current && m.observe(r.current, {
|
|
1587
1582
|
childList: !0,
|
|
1588
1583
|
subtree: !0,
|
|
1589
1584
|
characterData: !0
|
|
1590
1585
|
}), () => {
|
|
1591
|
-
|
|
1586
|
+
m.disconnect();
|
|
1592
1587
|
};
|
|
1593
1588
|
}, [t]);
|
|
1594
1589
|
const L = (f) => {
|
|
@@ -1597,374 +1592,390 @@ const Vt = ({
|
|
|
1597
1592
|
return;
|
|
1598
1593
|
}
|
|
1599
1594
|
f.preventDefault();
|
|
1600
|
-
const
|
|
1595
|
+
const m = f.clipboardData.getData("text/plain"), h = window.getSelection();
|
|
1601
1596
|
if (h && h.rangeCount > 0) {
|
|
1602
|
-
const
|
|
1603
|
-
if (
|
|
1597
|
+
const $ = h.anchorNode;
|
|
1598
|
+
if ($) {
|
|
1604
1599
|
let v = null;
|
|
1605
|
-
if (
|
|
1606
|
-
const
|
|
1607
|
-
if (
|
|
1608
|
-
const N = /[、,,\s\n\r\t]+/, R =
|
|
1609
|
-
if (console.log("[Paste Event] 粘贴的内容:",
|
|
1610
|
-
const j = parseInt(v.dataset.index || "0", 10),
|
|
1611
|
-
|
|
1612
|
-
...
|
|
1613
|
-
[
|
|
1600
|
+
if ($.nodeType === Node.ELEMENT_NODE ? v = $.closest('[data-type="variable"]') : $.nodeType === Node.TEXT_NODE && $.parentElement && (v = $.parentElement.closest('[data-type="variable"]')), v) {
|
|
1601
|
+
const x = v.dataset.multiKey;
|
|
1602
|
+
if (x) {
|
|
1603
|
+
const N = /[、,,\s\n\r\t]+/, R = m.split(N).map((j) => j.trim()).filter((j) => j.length > 0);
|
|
1604
|
+
if (console.log("[Paste Event] 粘贴的内容:", m), console.log("[Paste Event] 拆分后的值:", R), R.length > 1) {
|
|
1605
|
+
const j = parseInt(v.dataset.index || "0", 10), O = t.find((re) => re.type === "multi-variable" && re.key === x)?.maxCount || 9, oe = ee[x] || 1, H = Math.min(j + R.length, O);
|
|
1606
|
+
H > oe && k((J) => ({
|
|
1607
|
+
...J,
|
|
1608
|
+
[x]: H
|
|
1614
1609
|
}));
|
|
1615
|
-
const
|
|
1616
|
-
for (let
|
|
1617
|
-
const
|
|
1618
|
-
`[data-type="variable"][data-key="${
|
|
1610
|
+
const se = [];
|
|
1611
|
+
for (let J = 0; J < oe; J++) {
|
|
1612
|
+
const re = `${x}_${J}`, me = r.current.querySelector(
|
|
1613
|
+
`[data-type="variable"][data-key="${re}"][data-multi-key="${x}"]`
|
|
1619
1614
|
);
|
|
1620
|
-
if (
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1615
|
+
if (me) {
|
|
1616
|
+
const he = me.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1617
|
+
se.push(he);
|
|
1623
1618
|
}
|
|
1624
1619
|
}
|
|
1625
|
-
|
|
1626
|
-
const
|
|
1627
|
-
|
|
1628
|
-
const
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
}),
|
|
1620
|
+
se.splice(j, 1, ...R.slice(0, O - j));
|
|
1621
|
+
const ne = se.slice(0, O);
|
|
1622
|
+
ne.length > 0 && ne[ne.length - 1] !== "" && ne.length < O && ne.push("");
|
|
1623
|
+
const W = Math.max(ne.length, 1), ce = {};
|
|
1624
|
+
ne.forEach((J, re) => {
|
|
1625
|
+
J && (ce[`${x}_${re}`] = J);
|
|
1626
|
+
}), r.current.querySelectorAll(
|
|
1632
1627
|
'[data-type="variable"]'
|
|
1633
|
-
).forEach((
|
|
1634
|
-
const
|
|
1635
|
-
if (
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1628
|
+
).forEach((J) => {
|
|
1629
|
+
const re = J.dataset.key, me = J.dataset.multiKey;
|
|
1630
|
+
if (re && me !== x) {
|
|
1631
|
+
const he = J.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1632
|
+
he && (ce[re] = he);
|
|
1638
1633
|
}
|
|
1639
|
-
}),
|
|
1640
|
-
...
|
|
1641
|
-
[
|
|
1642
|
-
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:",
|
|
1634
|
+
}), r.current.__tempVariableValues = ce, k((J) => ({
|
|
1635
|
+
...J,
|
|
1636
|
+
[x]: W
|
|
1637
|
+
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", ne);
|
|
1643
1638
|
return;
|
|
1644
1639
|
} else R.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
|
|
1645
1640
|
}
|
|
1646
1641
|
}
|
|
1647
1642
|
}
|
|
1648
1643
|
}
|
|
1649
|
-
document.execCommand("insertText", !1,
|
|
1650
|
-
const
|
|
1651
|
-
if (
|
|
1652
|
-
const v =
|
|
1644
|
+
document.execCommand("insertText", !1, m), ue(), setTimeout(() => {
|
|
1645
|
+
const $ = window.getSelection();
|
|
1646
|
+
if ($ && $.rangeCount > 0) {
|
|
1647
|
+
const v = $.anchorNode;
|
|
1653
1648
|
if (v) {
|
|
1654
|
-
let
|
|
1655
|
-
if (v.nodeType === Node.ELEMENT_NODE ?
|
|
1656
|
-
const N =
|
|
1649
|
+
let x = null;
|
|
1650
|
+
if (v.nodeType === Node.ELEMENT_NODE ? x = v.closest('[data-type="variable"][data-multi-key]') : v.nodeType === Node.TEXT_NODE && v.parentElement && (x = v.parentElement.closest('[data-type="variable"][data-multi-key]')), x) {
|
|
1651
|
+
const N = x.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1657
1652
|
/[、,,\s]+/.test(N) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", N), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
|
|
1658
1653
|
}
|
|
1659
1654
|
}
|
|
1660
1655
|
}
|
|
1661
1656
|
}, 0);
|
|
1662
|
-
},
|
|
1663
|
-
if (f.target.files && f.target.files[0] &&
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1657
|
+
}, Y = (f) => {
|
|
1658
|
+
if (f.target.files && f.target.files[0] && T) {
|
|
1659
|
+
const m = f.target.files[0], h = T;
|
|
1660
|
+
E(($) => ({ ...$, [h]: m }));
|
|
1666
1661
|
}
|
|
1667
|
-
f.target && (f.target.value = ""),
|
|
1662
|
+
f.target && (f.target.value = ""), A(null);
|
|
1668
1663
|
}, ae = (f) => {
|
|
1669
|
-
|
|
1670
|
-
const h = { ...
|
|
1664
|
+
E((m) => {
|
|
1665
|
+
const h = { ...m };
|
|
1671
1666
|
return delete h[f], h;
|
|
1672
1667
|
});
|
|
1673
|
-
},
|
|
1674
|
-
const
|
|
1675
|
-
if (
|
|
1676
|
-
if (f.preventDefault(), f.stopPropagation(),
|
|
1668
|
+
}, fe = (f) => {
|
|
1669
|
+
const m = f.target;
|
|
1670
|
+
if (m.closest(".tag-close-btn")) {
|
|
1671
|
+
if (f.preventDefault(), f.stopPropagation(), y)
|
|
1677
1672
|
return;
|
|
1678
|
-
V(null),
|
|
1673
|
+
V(null), c ? c() : r.current && (r.current.innerHTML = "", r.current.focus());
|
|
1679
1674
|
return;
|
|
1680
1675
|
}
|
|
1681
|
-
if (
|
|
1682
|
-
const v =
|
|
1683
|
-
if (v ||
|
|
1676
|
+
if (y) {
|
|
1677
|
+
const v = m.closest(".tag-node"), x = m.closest('[data-type="text"]');
|
|
1678
|
+
if (v || x) {
|
|
1684
1679
|
f.preventDefault(), f.stopPropagation();
|
|
1685
1680
|
const N = window.getSelection();
|
|
1686
1681
|
N && N.removeAllRanges();
|
|
1687
1682
|
return;
|
|
1688
1683
|
}
|
|
1689
1684
|
}
|
|
1690
|
-
|
|
1691
|
-
},
|
|
1685
|
+
m.closest('[data-type="variable"]') || (P.current = { x: f.clientX, y: f.clientY }, _.current = !1, m.closest(".file-remove-btn") && (f.preventDefault(), f.stopPropagation()));
|
|
1686
|
+
}, ie = (f) => {
|
|
1692
1687
|
if (!f.target.closest('[data-type="variable"]') && P.current) {
|
|
1693
|
-
const
|
|
1694
|
-
(
|
|
1688
|
+
const $ = Math.abs(f.clientX - P.current.x), v = Math.abs(f.clientY - P.current.y);
|
|
1689
|
+
($ > 3 || v > 3) && (_.current = !0);
|
|
1695
1690
|
}
|
|
1696
|
-
},
|
|
1691
|
+
}, xe = (f) => {
|
|
1697
1692
|
if (f.target.closest('[data-type="variable"]')) {
|
|
1698
1693
|
P.current = null, _.current = !1;
|
|
1699
1694
|
return;
|
|
1700
1695
|
}
|
|
1701
1696
|
P.current = null, _.current = !1;
|
|
1702
|
-
},
|
|
1697
|
+
}, M = (f) => {
|
|
1703
1698
|
if (a)
|
|
1704
1699
|
return;
|
|
1705
|
-
const
|
|
1706
|
-
if (
|
|
1700
|
+
const m = f.target;
|
|
1701
|
+
if (m.closest(".tag-close-btn")) {
|
|
1707
1702
|
f.preventDefault(), f.stopPropagation();
|
|
1708
1703
|
return;
|
|
1709
1704
|
}
|
|
1710
1705
|
if (t.length === 0)
|
|
1711
1706
|
return;
|
|
1712
|
-
if (
|
|
1707
|
+
if (m.closest('[data-type="text"]')) {
|
|
1713
1708
|
f.preventDefault(), f.stopPropagation();
|
|
1714
1709
|
const R = window.getSelection();
|
|
1715
1710
|
R && R.removeAllRanges();
|
|
1716
1711
|
return;
|
|
1717
1712
|
}
|
|
1718
|
-
if (
|
|
1713
|
+
if (y && m.closest(".tag-node")) {
|
|
1719
1714
|
f.preventDefault(), f.stopPropagation();
|
|
1720
1715
|
const j = window.getSelection();
|
|
1721
1716
|
j && j.removeAllRanges();
|
|
1722
1717
|
return;
|
|
1723
1718
|
}
|
|
1724
|
-
if (
|
|
1719
|
+
if (m.closest('[data-type="variable"]')) {
|
|
1725
1720
|
if (_.current)
|
|
1726
1721
|
return;
|
|
1727
1722
|
setTimeout(() => {
|
|
1728
1723
|
const R = window.getSelection();
|
|
1729
|
-
R && !R.isCollapsed ||
|
|
1724
|
+
R && !R.isCollapsed || Ie(r);
|
|
1730
1725
|
}, 10);
|
|
1731
1726
|
return;
|
|
1732
1727
|
}
|
|
1733
|
-
const
|
|
1734
|
-
if (
|
|
1728
|
+
const x = m.closest(".file-remove-btn");
|
|
1729
|
+
if (x) {
|
|
1735
1730
|
f.preventDefault(), f.stopPropagation();
|
|
1736
|
-
const j =
|
|
1731
|
+
const j = x.closest('[data-type="upload"]')?.dataset.key;
|
|
1737
1732
|
j && ae(j);
|
|
1738
1733
|
return;
|
|
1739
1734
|
}
|
|
1740
|
-
const N =
|
|
1735
|
+
const N = m.closest('[data-type="upload"]');
|
|
1741
1736
|
if (N) {
|
|
1742
1737
|
const R = N.dataset.key;
|
|
1743
|
-
R && (
|
|
1738
|
+
R && (A(R), C.current?.click());
|
|
1744
1739
|
return;
|
|
1745
1740
|
}
|
|
1746
1741
|
}, G = (f) => {
|
|
1747
1742
|
const h = f.target.closest('[data-type="variable"]');
|
|
1748
1743
|
if (h) {
|
|
1749
|
-
const
|
|
1750
|
-
if (
|
|
1751
|
-
const v = document.createRange(),
|
|
1752
|
-
if (
|
|
1753
|
-
let R = 0, j =
|
|
1754
|
-
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1744
|
+
const $ = window.getSelection();
|
|
1745
|
+
if ($) {
|
|
1746
|
+
const v = document.createRange(), x = h.textContent || "";
|
|
1747
|
+
if (x.replace(/\u200B/g, "")) {
|
|
1748
|
+
let R = 0, j = x.length;
|
|
1749
|
+
x.startsWith("") && (R = 1), x.endsWith("") && x.length > 1 && (j = x.length - 1);
|
|
1750
|
+
const O = h.firstChild;
|
|
1751
|
+
O && O.nodeType === Node.TEXT_NODE ? (v.setStart(O, R), v.setEnd(O, j)) : v.selectNodeContents(h);
|
|
1757
1752
|
} else
|
|
1758
1753
|
v.selectNodeContents(h), v.collapse(!0);
|
|
1759
|
-
|
|
1754
|
+
$.removeAllRanges(), $.addRange(v);
|
|
1760
1755
|
}
|
|
1761
1756
|
}
|
|
1762
1757
|
}, ue = () => {
|
|
1763
1758
|
if (t.length === 0) {
|
|
1764
|
-
if (
|
|
1765
|
-
const h = !(
|
|
1766
|
-
|
|
1759
|
+
if (r.current) {
|
|
1760
|
+
const h = !(r.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
|
|
1761
|
+
K(h), B(!h);
|
|
1767
1762
|
}
|
|
1768
1763
|
return;
|
|
1769
1764
|
}
|
|
1770
|
-
if (
|
|
1771
|
-
const
|
|
1772
|
-
if (
|
|
1765
|
+
if (Ie(r), r.current && r.current.querySelectorAll('[data-type="variable"]').forEach((h) => {
|
|
1766
|
+
const $ = h.querySelector(".variable-info-icon");
|
|
1767
|
+
if ($) {
|
|
1773
1768
|
let v = !1;
|
|
1774
|
-
const
|
|
1769
|
+
const x = document.createTreeWalker(
|
|
1775
1770
|
h,
|
|
1776
1771
|
NodeFilter.SHOW_TEXT,
|
|
1777
1772
|
{
|
|
1778
|
-
acceptNode: (N) =>
|
|
1773
|
+
acceptNode: (N) => $.contains(N) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
1779
1774
|
}
|
|
1780
1775
|
);
|
|
1781
|
-
for (;
|
|
1782
|
-
if (
|
|
1776
|
+
for (; x.nextNode(); )
|
|
1777
|
+
if (x.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
|
|
1783
1778
|
v = !0;
|
|
1784
1779
|
break;
|
|
1785
1780
|
}
|
|
1786
|
-
v ?
|
|
1781
|
+
v ? $.classList.add("hidden") : $.classList.remove("hidden");
|
|
1787
1782
|
}
|
|
1788
|
-
}),
|
|
1789
|
-
t.filter((
|
|
1790
|
-
if (!
|
|
1791
|
-
const h =
|
|
1792
|
-
for (let
|
|
1793
|
-
const
|
|
1794
|
-
`[data-type="variable"][data-key="${
|
|
1783
|
+
}), Ve(r, t, i), Le(r, t, i, B), !r.current) return;
|
|
1784
|
+
t.filter((m) => m.type === "multi-variable" && m.key).forEach((m) => {
|
|
1785
|
+
if (!m.key) return;
|
|
1786
|
+
const h = m.maxCount || 9, $ = ee[m.key] || 1, v = [];
|
|
1787
|
+
for (let O = 0; O < $; O++) {
|
|
1788
|
+
const oe = `${m.key}_${O}`, H = r.current.querySelector(
|
|
1789
|
+
`[data-type="variable"][data-key="${oe}"][data-multi-key="${m.key}"]`
|
|
1795
1790
|
);
|
|
1796
|
-
if (
|
|
1797
|
-
const
|
|
1798
|
-
v.push(
|
|
1791
|
+
if (H) {
|
|
1792
|
+
const se = H.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1793
|
+
v.push(se);
|
|
1799
1794
|
}
|
|
1800
1795
|
}
|
|
1801
1796
|
const N = (v[v.length - 1] || "") === "";
|
|
1802
1797
|
let R = !1, j = -1;
|
|
1803
|
-
for (let
|
|
1804
|
-
if (v[
|
|
1805
|
-
R = !0, j =
|
|
1798
|
+
for (let O = 0; O < v.length - 1; O++)
|
|
1799
|
+
if (v[O] === "") {
|
|
1800
|
+
R = !0, j = O;
|
|
1806
1801
|
break;
|
|
1807
1802
|
}
|
|
1808
1803
|
if (R && j >= 0) {
|
|
1809
|
-
const
|
|
1810
|
-
if (
|
|
1811
|
-
const
|
|
1804
|
+
const O = window.getSelection();
|
|
1805
|
+
if (O && O.rangeCount > 0) {
|
|
1806
|
+
const W = O.getRangeAt(0), ce = W.startContainer, de = ce.nodeType === Node.ELEMENT_NODE ? ce.closest('[data-type="variable"][data-multi-key]') : ce.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
1812
1807
|
if (de) {
|
|
1813
|
-
const
|
|
1814
|
-
if (
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1817
|
-
const
|
|
1818
|
-
|
|
1808
|
+
const J = de.dataset.key;
|
|
1809
|
+
if (J) {
|
|
1810
|
+
const re = document.createRange();
|
|
1811
|
+
re.setStartBefore(de), re.setEnd(W.startContainer, W.startOffset);
|
|
1812
|
+
const me = re.toString().length;
|
|
1813
|
+
X.current = { key: J, offset: me };
|
|
1819
1814
|
}
|
|
1820
1815
|
}
|
|
1821
1816
|
}
|
|
1822
|
-
const
|
|
1823
|
-
for (let
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
const
|
|
1827
|
-
|
|
1828
|
-
|
|
1817
|
+
const oe = [...v];
|
|
1818
|
+
for (let W = j; W < oe.length - 1; W++)
|
|
1819
|
+
oe[W] = oe[W + 1];
|
|
1820
|
+
oe.pop();
|
|
1821
|
+
const H = {};
|
|
1822
|
+
oe.forEach((W, ce) => {
|
|
1823
|
+
W && (H[`${m.key}_${ce}`] = W);
|
|
1829
1824
|
});
|
|
1830
|
-
const
|
|
1831
|
-
|
|
1825
|
+
const se = Math.max(N ? oe.length : oe.length + 1, 1);
|
|
1826
|
+
r.current.querySelectorAll(
|
|
1832
1827
|
'[data-type="variable"]'
|
|
1833
|
-
).forEach((
|
|
1834
|
-
const
|
|
1835
|
-
if (
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1828
|
+
).forEach((W) => {
|
|
1829
|
+
const ce = W.dataset.key, de = W.dataset.multiKey;
|
|
1830
|
+
if (ce && de !== m.key) {
|
|
1831
|
+
const J = W.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1832
|
+
J && (H[ce] = J);
|
|
1838
1833
|
}
|
|
1839
|
-
}),
|
|
1840
|
-
...
|
|
1841
|
-
[
|
|
1834
|
+
}), r.current.__tempVariableValues = H, k((W) => ({
|
|
1835
|
+
...W,
|
|
1836
|
+
[m.key]: se
|
|
1842
1837
|
}));
|
|
1843
1838
|
return;
|
|
1844
1839
|
}
|
|
1845
1840
|
if (!N) {
|
|
1846
|
-
const
|
|
1847
|
-
`[data-type="variable"][data-key="${
|
|
1841
|
+
const O = $ - 1, oe = `${m.key}_${O}`, H = r.current.querySelector(
|
|
1842
|
+
`[data-type="variable"][data-key="${oe}"][data-multi-key="${m.key}"]`
|
|
1848
1843
|
);
|
|
1849
|
-
if (
|
|
1850
|
-
const
|
|
1851
|
-
if (
|
|
1852
|
-
const
|
|
1844
|
+
if (H && H.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && $ < h) {
|
|
1845
|
+
const ne = window.getSelection();
|
|
1846
|
+
if (ne && ne.rangeCount > 0) {
|
|
1847
|
+
const W = ne.getRangeAt(0), ce = W.startContainer, de = ce.nodeType === Node.ELEMENT_NODE ? ce.closest('[data-type="variable"][data-multi-key]') : ce.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
1853
1848
|
if (de) {
|
|
1854
|
-
const
|
|
1855
|
-
if (
|
|
1856
|
-
const
|
|
1857
|
-
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1849
|
+
const J = de.dataset.key;
|
|
1850
|
+
if (J) {
|
|
1851
|
+
const re = document.createRange();
|
|
1852
|
+
re.setStartBefore(de), re.setEnd(W.startContainer, W.startOffset);
|
|
1853
|
+
const me = re.toString().length;
|
|
1854
|
+
X.current = { key: J, offset: me };
|
|
1860
1855
|
}
|
|
1861
1856
|
}
|
|
1862
1857
|
}
|
|
1863
|
-
|
|
1864
|
-
...
|
|
1865
|
-
[
|
|
1858
|
+
k((W) => ({
|
|
1859
|
+
...W,
|
|
1860
|
+
[m.key]: $ + 1
|
|
1866
1861
|
}));
|
|
1867
1862
|
}
|
|
1868
1863
|
}
|
|
1869
1864
|
});
|
|
1870
1865
|
};
|
|
1871
|
-
|
|
1872
|
-
const f =
|
|
1866
|
+
Ge(() => {
|
|
1867
|
+
const f = r.current;
|
|
1873
1868
|
if (!f) return;
|
|
1874
|
-
const
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1869
|
+
const m = /* @__PURE__ */ new Map(), h = (x) => {
|
|
1870
|
+
const N = x.target, R = x.relatedTarget;
|
|
1871
|
+
!N || !r.current || !r.current.contains(N) || R && r.current.contains(R) || setTimeout(() => {
|
|
1872
|
+
if (r.current) {
|
|
1873
|
+
if (t.length === 0) {
|
|
1874
|
+
const j = r.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
1875
|
+
B(j.length > 0);
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
Ie(r), Ve(r, t, i), Le(r, t, i, B);
|
|
1879
|
+
}
|
|
1880
|
+
}, 0);
|
|
1881
|
+
};
|
|
1882
|
+
f.addEventListener("blur", h, !0);
|
|
1883
|
+
const $ = () => {
|
|
1884
|
+
if (!r.current) return;
|
|
1885
|
+
m.forEach((R, j) => {
|
|
1886
|
+
j.removeEventListener("blur", R, !1);
|
|
1887
|
+
}), m.clear();
|
|
1888
|
+
const x = r.current.querySelectorAll(
|
|
1889
|
+
'[data-type="variable"][data-multi-key]'
|
|
1890
|
+
), N = (R) => {
|
|
1891
|
+
R.stopPropagation(), R.stopImmediatePropagation();
|
|
1892
|
+
const j = R.target;
|
|
1893
|
+
if (!j || !r.current || !r.current.contains(j))
|
|
1894
|
+
return;
|
|
1895
|
+
const O = j.closest('[data-type="variable"][data-multi-key]');
|
|
1896
|
+
if (!O || !r.current.contains(O))
|
|
1897
|
+
return;
|
|
1898
|
+
let oe = !1;
|
|
1899
|
+
if (m.forEach((re, me) => {
|
|
1900
|
+
(me === O || me.contains(j)) && (oe = !0);
|
|
1901
|
+
}), !oe)
|
|
1902
|
+
return;
|
|
1903
|
+
const H = O.dataset.multiKey, se = O.dataset.key, ne = O.dataset.index;
|
|
1904
|
+
if (!H || !se || ne === void 0) return;
|
|
1905
|
+
const W = R.relatedTarget;
|
|
1906
|
+
if (!(!W || !r.current.contains(W)))
|
|
1907
|
+
return;
|
|
1908
|
+
const de = O.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1909
|
+
console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
|
|
1910
|
+
multiKey: H,
|
|
1911
|
+
currentKey: se,
|
|
1912
|
+
index: ne,
|
|
1913
|
+
content: de
|
|
1914
|
+
});
|
|
1915
|
+
const J = /[、,,\s]+/;
|
|
1916
|
+
if (J.test(de)) {
|
|
1917
|
+
const re = de.split(J).map((Ee) => Ee.trim()).filter((Ee) => Ee.length > 0);
|
|
1918
|
+
console.log("[Blur Event] 拆分前的内容:", de), console.log("[Blur Event] 拆分后的部分:", re);
|
|
1919
|
+
const he = re.slice(0, 9);
|
|
1920
|
+
if (console.log("[Blur Event] 有效的部分(最多9个):", he), he.length > 1) {
|
|
1921
|
+
const Ee = t.find((Se) => Se.type === "multi-variable" && Se.key === H);
|
|
1922
|
+
if (Ee) {
|
|
1923
|
+
const Se = ee[H] || 1, Me = parseInt(ne, 10), De = Ee.maxCount || 9, qe = [];
|
|
1924
|
+
for (let ye = 0; ye < Se; ye++) {
|
|
1925
|
+
const Te = `${H}_${ye}`, Ae = r.current.querySelector(
|
|
1926
|
+
`[data-type="variable"][data-key="${Te}"][data-multi-key="${H}"]`
|
|
1927
|
+
);
|
|
1928
|
+
if (Ae) {
|
|
1929
|
+
const _e = Ae.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1930
|
+
qe.push(_e);
|
|
1918
1931
|
}
|
|
1919
|
-
console.log("[Blur Event] 拆分前的所有值:", fe), console.log("[Blur Event] 当前索引:", Y), console.log("[Blur Event] 要插入的值:", F), fe.splice(Y, 1, ...F);
|
|
1920
|
-
const me = fe.slice(0, se);
|
|
1921
|
-
console.log("[Blur Event] 拆分后的所有值:", me), me.length > 0 && me[me.length - 1] !== "" && me.length < se && me.push("");
|
|
1922
|
-
const We = Math.max(me.length, 1), Ae = {};
|
|
1923
|
-
me.forEach((ge, we) => {
|
|
1924
|
-
ge && (Ae[`${R}_${we}`] = ge);
|
|
1925
|
-
}), o.current.querySelectorAll(
|
|
1926
|
-
'[data-type="variable"]'
|
|
1927
|
-
).forEach((ge) => {
|
|
1928
|
-
const we = ge.dataset.key, Te = ge.dataset.multiKey;
|
|
1929
|
-
if (we && Te !== R) {
|
|
1930
|
-
const Ne = ge.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1931
|
-
Ne && (Ae[we] = Ne);
|
|
1932
|
-
}
|
|
1933
|
-
}), o.current.__tempVariableValues = Ae, T((ge) => ({
|
|
1934
|
-
...ge,
|
|
1935
|
-
[R]: We
|
|
1936
|
-
}));
|
|
1937
1932
|
}
|
|
1933
|
+
console.log("[Blur Event] 拆分前的所有值:", qe), console.log("[Blur Event] 当前索引:", Me), console.log("[Blur Event] 要插入的值:", he), qe.splice(Me, 1, ...he);
|
|
1934
|
+
const ve = qe.slice(0, De);
|
|
1935
|
+
console.log("[Blur Event] 拆分后的所有值:", ve), ve.length > 0 && ve[ve.length - 1] !== "" && ve.length < De && ve.push("");
|
|
1936
|
+
const Qe = Math.max(ve.length, 1), Re = {};
|
|
1937
|
+
ve.forEach((ye, Te) => {
|
|
1938
|
+
ye && (Re[`${H}_${Te}`] = ye);
|
|
1939
|
+
}), r.current.querySelectorAll(
|
|
1940
|
+
'[data-type="variable"]'
|
|
1941
|
+
).forEach((ye) => {
|
|
1942
|
+
const Te = ye.dataset.key, Ae = ye.dataset.multiKey;
|
|
1943
|
+
if (Te && Ae !== H) {
|
|
1944
|
+
const _e = ye.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1945
|
+
_e && (Re[Te] = _e);
|
|
1946
|
+
}
|
|
1947
|
+
}), r.current.__tempVariableValues = Re, k((ye) => ({
|
|
1948
|
+
...ye,
|
|
1949
|
+
[H]: Qe
|
|
1950
|
+
}));
|
|
1938
1951
|
}
|
|
1939
1952
|
}
|
|
1940
1953
|
}
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1954
|
+
};
|
|
1955
|
+
x.forEach((R) => {
|
|
1956
|
+
R.addEventListener("blur", N, !1), m.set(R, N);
|
|
1957
|
+
});
|
|
1958
|
+
}, v = setTimeout(() => {
|
|
1959
|
+
$();
|
|
1960
|
+
}, 0);
|
|
1961
|
+
return () => {
|
|
1962
|
+
clearTimeout(v), f.removeEventListener("blur", h, !0), m.forEach((x, N) => {
|
|
1963
|
+
N.removeEventListener("blur", x, !1);
|
|
1964
|
+
}), m.clear();
|
|
1945
1965
|
};
|
|
1946
|
-
}, [t,
|
|
1947
|
-
const
|
|
1948
|
-
if (o.current) {
|
|
1949
|
-
if (t.length === 0) {
|
|
1950
|
-
const f = o.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
1951
|
-
B(f.length > 0);
|
|
1952
|
-
return;
|
|
1953
|
-
}
|
|
1954
|
-
$e(o), _e(o, t, c), je(o, t, c, B);
|
|
1955
|
-
}
|
|
1956
|
-
}, qe = (f) => {
|
|
1966
|
+
}, [t, ee, i]);
|
|
1967
|
+
const be = (f) => {
|
|
1957
1968
|
if (a) {
|
|
1958
1969
|
f.preventDefault();
|
|
1959
1970
|
return;
|
|
1960
1971
|
}
|
|
1961
|
-
const
|
|
1962
|
-
if (
|
|
1963
|
-
const h =
|
|
1964
|
-
let
|
|
1965
|
-
if (h && (h.nodeType === Node.ELEMENT_NODE ?
|
|
1966
|
-
if (f.preventDefault(), f.stopPropagation(),
|
|
1967
|
-
const v =
|
|
1972
|
+
const m = window.getSelection();
|
|
1973
|
+
if (m && m.rangeCount > 0) {
|
|
1974
|
+
const h = m.anchorNode;
|
|
1975
|
+
let $ = null;
|
|
1976
|
+
if (h && (h.nodeType === Node.ELEMENT_NODE ? $ = h.closest('[data-type="text"]') : h.nodeType === Node.TEXT_NODE && h.parentElement && ($ = h.parentElement.closest('[data-type="text"]'))), $) {
|
|
1977
|
+
if (f.preventDefault(), f.stopPropagation(), r.current) {
|
|
1978
|
+
const v = r.current.querySelector(
|
|
1968
1979
|
'[data-type="variable"], [data-type="upload"]'
|
|
1969
1980
|
);
|
|
1970
1981
|
v && v.focus();
|
|
@@ -1972,12 +1983,12 @@ const Vt = ({
|
|
|
1972
1983
|
return;
|
|
1973
1984
|
}
|
|
1974
1985
|
}
|
|
1975
|
-
if (
|
|
1976
|
-
const h =
|
|
1977
|
-
let
|
|
1978
|
-
if (h && (h.nodeType === Node.ELEMENT_NODE ?
|
|
1979
|
-
if (f.preventDefault(), f.stopPropagation(),
|
|
1980
|
-
const v =
|
|
1986
|
+
if (y && m && m.rangeCount > 0) {
|
|
1987
|
+
const h = m.anchorNode;
|
|
1988
|
+
let $ = null;
|
|
1989
|
+
if (h && (h.nodeType === Node.ELEMENT_NODE ? $ = h.closest(".tag-node") : h.nodeType === Node.TEXT_NODE && h.parentElement && ($ = h.parentElement.closest(".tag-node"))), $) {
|
|
1990
|
+
if (f.preventDefault(), f.stopPropagation(), r.current) {
|
|
1991
|
+
const v = r.current.querySelector(
|
|
1981
1992
|
'[data-type="variable"], [data-type="upload"]'
|
|
1982
1993
|
);
|
|
1983
1994
|
v && v.focus();
|
|
@@ -1985,148 +1996,147 @@ const Vt = ({
|
|
|
1985
1996
|
return;
|
|
1986
1997
|
}
|
|
1987
1998
|
}
|
|
1988
|
-
if (f.key === "Enter" && !f.shiftKey && (f.preventDefault(),
|
|
1989
|
-
if (
|
|
1999
|
+
if (f.key === "Enter" && !f.shiftKey && (f.preventDefault(), Ce()), f.key === "Escape" && r.current) {
|
|
2000
|
+
if (y) {
|
|
1990
2001
|
f.preventDefault();
|
|
1991
2002
|
return;
|
|
1992
2003
|
}
|
|
1993
|
-
|
|
2004
|
+
r.current.innerHTML = "", r.current.focus();
|
|
1994
2005
|
}
|
|
1995
2006
|
if (f.key === "Backspace") {
|
|
1996
2007
|
const h = window.getSelection();
|
|
1997
2008
|
if (h && h.rangeCount > 0) {
|
|
1998
|
-
const
|
|
1999
|
-
if (
|
|
2009
|
+
const $ = h.getRangeAt(0), v = h.anchorNode;
|
|
2010
|
+
if (y) {
|
|
2000
2011
|
let N = null, R = null;
|
|
2001
|
-
if (v && (v.nodeType === Node.ELEMENT_NODE ? (N = v.closest(".tag-node"), R = v.closest('[data-type="text"]')) : v.nodeType === Node.TEXT_NODE && v.parentElement && (N = v.parentElement.closest(".tag-node"), R = v.parentElement.closest('[data-type="text"]'))), (N || R) &&
|
|
2012
|
+
if (v && (v.nodeType === Node.ELEMENT_NODE ? (N = v.closest(".tag-node"), R = v.closest('[data-type="text"]')) : v.nodeType === Node.TEXT_NODE && v.parentElement && (N = v.parentElement.closest(".tag-node"), R = v.parentElement.closest('[data-type="text"]'))), (N || R) && $.collapsed && $.startOffset === 0) {
|
|
2002
2013
|
f.preventDefault();
|
|
2003
2014
|
return;
|
|
2004
2015
|
}
|
|
2005
2016
|
}
|
|
2006
|
-
let
|
|
2007
|
-
if (v && (v.nodeType === Node.ELEMENT_NODE ?
|
|
2017
|
+
let x = null;
|
|
2018
|
+
if (v && (v.nodeType === Node.ELEMENT_NODE ? x = v.closest(
|
|
2008
2019
|
'[data-type="variable"]'
|
|
2009
|
-
) : v.nodeType === Node.TEXT_NODE && v.parentElement && (
|
|
2020
|
+
) : v.nodeType === Node.TEXT_NODE && v.parentElement && (x = v.parentElement.closest(
|
|
2010
2021
|
'[data-type="variable"]'
|
|
2011
|
-
))),
|
|
2012
|
-
if (
|
|
2022
|
+
))), x) {
|
|
2023
|
+
if (!$.collapsed)
|
|
2013
2024
|
return;
|
|
2014
|
-
const N =
|
|
2025
|
+
const N = x.innerText;
|
|
2015
2026
|
if (N === "" || N === "") {
|
|
2016
2027
|
f.preventDefault();
|
|
2017
2028
|
return;
|
|
2018
2029
|
}
|
|
2019
|
-
if (
|
|
2030
|
+
if ($.startOffset === 0) {
|
|
2020
2031
|
f.preventDefault();
|
|
2021
2032
|
return;
|
|
2022
2033
|
}
|
|
2023
|
-
if (N.startsWith("") &&
|
|
2034
|
+
if (N.startsWith("") && $.startOffset === 1) {
|
|
2024
2035
|
f.preventDefault();
|
|
2025
2036
|
return;
|
|
2026
2037
|
}
|
|
2027
2038
|
}
|
|
2028
2039
|
}
|
|
2029
2040
|
}
|
|
2030
|
-
},
|
|
2031
|
-
if (l || a || e || !D || !
|
|
2041
|
+
}, Ce = () => {
|
|
2042
|
+
if (l || a || e || !D || !r.current) return;
|
|
2032
2043
|
if (t.length === 0) {
|
|
2033
|
-
const
|
|
2034
|
-
if (!
|
|
2035
|
-
|
|
2044
|
+
const x = r.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
2045
|
+
if (!x) return;
|
|
2046
|
+
d(x, x);
|
|
2036
2047
|
return;
|
|
2037
2048
|
}
|
|
2038
|
-
const f =
|
|
2039
|
-
let
|
|
2040
|
-
const h = {},
|
|
2041
|
-
if (!(
|
|
2042
|
-
if (
|
|
2043
|
-
|
|
2044
|
-
else if (
|
|
2045
|
-
const N =
|
|
2049
|
+
const f = r.current;
|
|
2050
|
+
let m = "";
|
|
2051
|
+
const h = {}, $ = (x) => {
|
|
2052
|
+
if (!(x.nodeType === Node.ELEMENT_NODE && x.style.display === "none")) {
|
|
2053
|
+
if (x.nodeType === Node.TEXT_NODE)
|
|
2054
|
+
m += (x.textContent || "").replace(/\u200B/g, "");
|
|
2055
|
+
else if (x.nodeType === Node.ELEMENT_NODE) {
|
|
2056
|
+
const N = x, R = N.dataset.type, j = N.dataset.key;
|
|
2046
2057
|
if (R === "variable" && j) {
|
|
2047
|
-
let
|
|
2048
|
-
const
|
|
2058
|
+
let O = "";
|
|
2059
|
+
const oe = document.createTreeWalker(
|
|
2049
2060
|
N,
|
|
2050
2061
|
NodeFilter.SHOW_TEXT,
|
|
2051
2062
|
{
|
|
2052
|
-
acceptNode: (
|
|
2053
|
-
const
|
|
2054
|
-
return
|
|
2063
|
+
acceptNode: (se) => {
|
|
2064
|
+
const ne = N.querySelector(".variable-info-icon");
|
|
2065
|
+
return ne && ne.contains(se) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
2055
2066
|
}
|
|
2056
2067
|
}
|
|
2057
2068
|
);
|
|
2058
|
-
for (;
|
|
2059
|
-
|
|
2060
|
-
const
|
|
2061
|
-
if (
|
|
2062
|
-
const
|
|
2063
|
-
if (
|
|
2064
|
-
(!h[
|
|
2065
|
-
const
|
|
2066
|
-
|
|
2069
|
+
for (; oe.nextNode(); )
|
|
2070
|
+
O += oe.currentNode.textContent || "";
|
|
2071
|
+
const H = O.replace(/[\u200B\n]/g, "").trim();
|
|
2072
|
+
if (H) {
|
|
2073
|
+
const se = N.dataset.multiKey;
|
|
2074
|
+
if (se) {
|
|
2075
|
+
(!h[se] || !Array.isArray(h[se])) && (h[se] = []);
|
|
2076
|
+
const ne = h[se];
|
|
2077
|
+
ne.push(H), ne.length > 1 && (m += " "), m += H;
|
|
2067
2078
|
} else
|
|
2068
|
-
h[j] =
|
|
2079
|
+
h[j] = H, m += H;
|
|
2069
2080
|
}
|
|
2070
2081
|
} else if (R === "upload" && j)
|
|
2071
|
-
h[j] =
|
|
2082
|
+
h[j] = i[j] ?? null, i[j] && (m += ` [附带文件: ${i[j]?.name}] `);
|
|
2072
2083
|
else {
|
|
2073
2084
|
if (N.classList.contains("tag-close-btn") || N.classList.contains("file-remove-btn")) return;
|
|
2074
|
-
N.getAttribute("contenteditable") === "false" && !R && N.classList.contains("tag-node") ?
|
|
2085
|
+
N.getAttribute("contenteditable") === "false" && !R && N.classList.contains("tag-node") ? m += N.innerText : N.childNodes.forEach($);
|
|
2075
2086
|
}
|
|
2076
2087
|
}
|
|
2077
2088
|
}
|
|
2078
2089
|
};
|
|
2079
|
-
if (f.childNodes.forEach(
|
|
2090
|
+
if (f.childNodes.forEach($), m = m.trim(), !m) return;
|
|
2080
2091
|
const v = new FormData();
|
|
2081
|
-
v.append("fullPrompt",
|
|
2082
|
-
const N = h[
|
|
2083
|
-
N != null && (N instanceof File ? v.append(
|
|
2084
|
-
(j) => j.type === "multi-variable" && j.key ===
|
|
2092
|
+
v.append("fullPrompt", m), Object.keys(h).forEach((x) => {
|
|
2093
|
+
const N = h[x];
|
|
2094
|
+
N != null && (N instanceof File ? v.append(x, N) : Array.isArray(N) ? t.some(
|
|
2095
|
+
(j) => j.type === "multi-variable" && j.key === x
|
|
2085
2096
|
) ? N.forEach((j) => {
|
|
2086
|
-
j != null && j !== "" && v.append(
|
|
2087
|
-
}) : N.forEach((j,
|
|
2088
|
-
j != null && (j instanceof File ? v.append(`${
|
|
2089
|
-
}) : typeof N == "string" ? v.append(
|
|
2090
|
-
}),
|
|
2091
|
-
},
|
|
2092
|
-
...
|
|
2097
|
+
j != null && j !== "" && v.append(x, String(j));
|
|
2098
|
+
}) : N.forEach((j, O) => {
|
|
2099
|
+
j != null && (j instanceof File ? v.append(`${x}[${O}]`, j) : typeof j == "string" ? v.append(`${x}[${O}]`, j) : v.append(`${x}[${O}]`, String(j)));
|
|
2100
|
+
}) : typeof N == "string" ? v.append(x, N) : v.append(x, String(N)));
|
|
2101
|
+
}), d(v, m);
|
|
2102
|
+
}, Je = {
|
|
2103
|
+
...o ? { width: typeof o == "number" ? `${o}px` : o } : {},
|
|
2093
2104
|
...u ? { border: u } : {},
|
|
2094
|
-
...
|
|
2105
|
+
...S ? { background: S } : {}
|
|
2095
2106
|
};
|
|
2096
2107
|
return /* @__PURE__ */ n.jsxs(
|
|
2097
2108
|
"div",
|
|
2098
2109
|
{
|
|
2099
2110
|
className: "rich-text-editor",
|
|
2100
|
-
style:
|
|
2111
|
+
style: Je,
|
|
2101
2112
|
"data-disabled": a,
|
|
2102
2113
|
children: [
|
|
2103
2114
|
/* @__PURE__ */ n.jsx(
|
|
2104
2115
|
"div",
|
|
2105
2116
|
{
|
|
2106
|
-
ref:
|
|
2107
|
-
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${
|
|
2117
|
+
ref: r,
|
|
2118
|
+
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${z && w ? "rte-editor-empty" : ""}`,
|
|
2108
2119
|
contentEditable: t.length === 0,
|
|
2109
2120
|
suppressContentEditableWarning: !0,
|
|
2110
|
-
"data-placeholder":
|
|
2111
|
-
onMouseDown:
|
|
2112
|
-
onMouseMove:
|
|
2113
|
-
onMouseUp:
|
|
2114
|
-
onClick:
|
|
2121
|
+
"data-placeholder": w,
|
|
2122
|
+
onMouseDown: fe,
|
|
2123
|
+
onMouseMove: ie,
|
|
2124
|
+
onMouseUp: xe,
|
|
2125
|
+
onClick: M,
|
|
2115
2126
|
onDoubleClick: G,
|
|
2116
2127
|
onInput: ue,
|
|
2117
|
-
onKeyDown:
|
|
2118
|
-
onPaste: L
|
|
2119
|
-
onBlur: ve
|
|
2128
|
+
onKeyDown: be,
|
|
2129
|
+
onPaste: L
|
|
2120
2130
|
}
|
|
2121
2131
|
),
|
|
2122
2132
|
/* @__PURE__ */ n.jsx(
|
|
2123
2133
|
"input",
|
|
2124
2134
|
{
|
|
2125
2135
|
type: "file",
|
|
2126
|
-
ref:
|
|
2136
|
+
ref: C,
|
|
2127
2137
|
className: "rte-file-input",
|
|
2128
2138
|
accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
|
|
2129
|
-
onChange:
|
|
2139
|
+
onChange: Y
|
|
2130
2140
|
}
|
|
2131
2141
|
),
|
|
2132
2142
|
/* @__PURE__ */ n.jsxs("div", { className: "rich-text-editor-footer", children: [
|
|
@@ -2135,12 +2145,12 @@ const Vt = ({
|
|
|
2135
2145
|
/* @__PURE__ */ n.jsx("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
|
|
2136
2146
|
/* @__PURE__ */ n.jsx("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
|
|
2137
2147
|
] }),
|
|
2138
|
-
|
|
2139
|
-
|
|
2148
|
+
p !== "hideAgent" && /* @__PURE__ */ n.jsx(
|
|
2149
|
+
rt,
|
|
2140
2150
|
{
|
|
2141
2151
|
placement: "top",
|
|
2142
2152
|
menu: {
|
|
2143
|
-
items:
|
|
2153
|
+
items: q.map((f) => ({
|
|
2144
2154
|
key: f.key,
|
|
2145
2155
|
label: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2146
2156
|
f.icon && /* @__PURE__ */ n.jsx("i", { className: f.icon }),
|
|
@@ -2153,7 +2163,7 @@ const Vt = ({
|
|
|
2153
2163
|
},
|
|
2154
2164
|
trigger: ["click"],
|
|
2155
2165
|
disabled: a || l,
|
|
2156
|
-
children: /* @__PURE__ */ n.jsxs("div", { className: "rte-agent-badge", style: { cursor:
|
|
2166
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: "rte-agent-badge", style: { cursor: q.length > 0 ? "pointer" : "default" }, children: [
|
|
2157
2167
|
/* @__PURE__ */ n.jsx("i", { className: "iconfont icon-zhinengti" }),
|
|
2158
2168
|
/* @__PURE__ */ n.jsx("span", { className: "rte-agent-text", children: "智能体" })
|
|
2159
2169
|
] })
|
|
@@ -2164,7 +2174,7 @@ const Vt = ({
|
|
|
2164
2174
|
"button",
|
|
2165
2175
|
{
|
|
2166
2176
|
type: "button",
|
|
2167
|
-
onClick:
|
|
2177
|
+
onClick: Ce,
|
|
2168
2178
|
disabled: l || a || e || !D,
|
|
2169
2179
|
className: "rich-text-editor-send-button",
|
|
2170
2180
|
children: l || e ? /* @__PURE__ */ n.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ n.jsx("i", { className: "iconfont icon-fasong" })
|
|
@@ -2177,9 +2187,9 @@ const Vt = ({
|
|
|
2177
2187
|
let f = "";
|
|
2178
2188
|
return b.type === "upload" ? f = t.find(
|
|
2179
2189
|
(h) => h.type === "upload" && h.key === b.key
|
|
2180
|
-
)?.tooltip || "" : b.type === "tag" ? f = b.anchorEl.dataset.tooltip || "" : b.type === "upload-label" ? f = b.anchorEl.dataset.fileName || "" : b.type === "variable" && (f = b.anchorEl.dataset.tooltip || ""),
|
|
2190
|
+
)?.tooltip || "" : b.type === "tag" ? f = b.anchorEl.dataset.tooltip || "" : b.type === "upload-label" ? f = b.anchorEl.dataset.fileName || "" : b.type === "variable" && (f = b.anchorEl.dataset.tooltip || ""), ht(
|
|
2181
2191
|
/* @__PURE__ */ n.jsx(
|
|
2182
|
-
|
|
2192
|
+
ot,
|
|
2183
2193
|
{
|
|
2184
2194
|
arrow: !1,
|
|
2185
2195
|
title: /* @__PURE__ */ n.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: f }),
|
|
@@ -2211,7 +2221,7 @@ const Vt = ({
|
|
|
2211
2221
|
}
|
|
2212
2222
|
);
|
|
2213
2223
|
};
|
|
2214
|
-
|
|
2224
|
+
Mt.__docgenInfo = {
|
|
2215
2225
|
displayName: "RichTextEditor",
|
|
2216
2226
|
description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
|
|
2217
2227
|
props: {
|
|
@@ -2239,22 +2249,22 @@ Vt.__docgenInfo = {
|
|
|
2239
2249
|
}
|
|
2240
2250
|
}
|
|
2241
2251
|
};
|
|
2242
|
-
const
|
|
2252
|
+
const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", Dt = [
|
|
2243
2253
|
{ label: "5页", value: 5 },
|
|
2244
2254
|
{ label: "10页", value: 10 },
|
|
2245
2255
|
{ label: "15页", value: 15 },
|
|
2246
2256
|
{ label: "30页", value: 30 }
|
|
2247
|
-
],
|
|
2257
|
+
], Gt = ({
|
|
2248
2258
|
autoLoading: t,
|
|
2249
|
-
batchSize:
|
|
2259
|
+
batchSize: d,
|
|
2250
2260
|
loadingProgress: l,
|
|
2251
2261
|
loadIcon: a,
|
|
2252
|
-
onBatchSizeChange:
|
|
2253
|
-
onLoadNextPage:
|
|
2254
|
-
onStartAutoLoad:
|
|
2262
|
+
onBatchSizeChange: o,
|
|
2263
|
+
onLoadNextPage: y,
|
|
2264
|
+
onStartAutoLoad: q,
|
|
2255
2265
|
onStopLoad: g
|
|
2256
2266
|
}) => t && l ? /* @__PURE__ */ n.jsxs("div", { className: "auto_load_progress", children: [
|
|
2257
|
-
a || /* @__PURE__ */ n.jsx("img", { src:
|
|
2267
|
+
a || /* @__PURE__ */ n.jsx("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
|
|
2258
2268
|
/* @__PURE__ */ n.jsxs("span", { children: [
|
|
2259
2269
|
"正在加载第",
|
|
2260
2270
|
l.currentPage,
|
|
@@ -2263,7 +2273,7 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2263
2273
|
"页"
|
|
2264
2274
|
] }),
|
|
2265
2275
|
/* @__PURE__ */ n.jsx(
|
|
2266
|
-
|
|
2276
|
+
lt,
|
|
2267
2277
|
{
|
|
2268
2278
|
percent: l.percentage,
|
|
2269
2279
|
type: "line",
|
|
@@ -2275,7 +2285,7 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2275
2285
|
/* @__PURE__ */ n.jsx(
|
|
2276
2286
|
"div",
|
|
2277
2287
|
{
|
|
2278
|
-
onClick:
|
|
2288
|
+
onClick: y,
|
|
2279
2289
|
className: "auto_load_next_btn",
|
|
2280
2290
|
style: {
|
|
2281
2291
|
backgroundColor: t ? "#f5f5f5" : "#2563eb"
|
|
@@ -2295,19 +2305,19 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2295
2305
|
"div",
|
|
2296
2306
|
{
|
|
2297
2307
|
className: "auto_load_btn",
|
|
2298
|
-
onClick: t ? void 0 :
|
|
2308
|
+
onClick: t ? void 0 : q,
|
|
2299
2309
|
children: [
|
|
2300
|
-
a || /* @__PURE__ */ n.jsx("img", { src:
|
|
2310
|
+
a || /* @__PURE__ */ n.jsx("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
|
|
2301
2311
|
/* @__PURE__ */ n.jsx("span", { children: "自动加载" })
|
|
2302
2312
|
]
|
|
2303
2313
|
}
|
|
2304
2314
|
),
|
|
2305
2315
|
/* @__PURE__ */ n.jsx(
|
|
2306
|
-
|
|
2316
|
+
Oe,
|
|
2307
2317
|
{
|
|
2308
|
-
value:
|
|
2309
|
-
onChange:
|
|
2310
|
-
options:
|
|
2318
|
+
value: d,
|
|
2319
|
+
onChange: o,
|
|
2320
|
+
options: Dt,
|
|
2311
2321
|
disabled: t,
|
|
2312
2322
|
size: "small",
|
|
2313
2323
|
className: "auto_load_select",
|
|
@@ -2317,35 +2327,35 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2317
2327
|
]
|
|
2318
2328
|
}
|
|
2319
2329
|
)
|
|
2320
|
-
] }),
|
|
2330
|
+
] }), Ft = ({
|
|
2321
2331
|
current: t,
|
|
2322
|
-
loadIcon:
|
|
2332
|
+
loadIcon: d,
|
|
2323
2333
|
pageSize: l,
|
|
2324
2334
|
total: a,
|
|
2325
|
-
cachedPages:
|
|
2326
|
-
loadedCount:
|
|
2327
|
-
autoLoading:
|
|
2335
|
+
cachedPages: o,
|
|
2336
|
+
loadedCount: y,
|
|
2337
|
+
autoLoading: q = !1,
|
|
2328
2338
|
loadingProgress: g,
|
|
2329
|
-
onChange:
|
|
2339
|
+
onChange: c,
|
|
2330
2340
|
onLoadNextPage: e,
|
|
2331
|
-
onStartAutoLoad:
|
|
2341
|
+
onStartAutoLoad: w,
|
|
2332
2342
|
onStopLoading: u
|
|
2333
2343
|
}) => {
|
|
2334
|
-
const [
|
|
2335
|
-
{ length:
|
|
2336
|
-
(
|
|
2337
|
-
).filter((
|
|
2338
|
-
const V =
|
|
2339
|
-
return
|
|
2344
|
+
const [S, p] = Q(5), r = Math.ceil(a / l), C = Xe(() => o.length >= r, [o, r]), i = () => Array.from(
|
|
2345
|
+
{ length: r },
|
|
2346
|
+
(A, b) => b + 1
|
|
2347
|
+
).filter((A) => !o.includes(A)).slice(0, S), E = (T, A, b) => {
|
|
2348
|
+
const V = o.includes(T);
|
|
2349
|
+
return A === "prev" || A === "next" || A === "jump-prev" || A === "jump-next" ? /* @__PURE__ */ n.jsx("div", { className: "pageBox", children: b }) : /* @__PURE__ */ n.jsxs(
|
|
2340
2350
|
"div",
|
|
2341
2351
|
{
|
|
2342
2352
|
className: "pageBox",
|
|
2343
2353
|
style: {
|
|
2344
|
-
backgroundColor: t ===
|
|
2345
|
-
color: t ===
|
|
2354
|
+
backgroundColor: t === T ? "#2563EB" : "#f5f5f5",
|
|
2355
|
+
color: t === T ? "#fff" : V ? "#171717" : "#a3a3a3"
|
|
2346
2356
|
},
|
|
2347
2357
|
children: [
|
|
2348
|
-
|
|
2358
|
+
T,
|
|
2349
2359
|
!V && /* @__PURE__ */ n.jsx("span", { className: "unload_spot" })
|
|
2350
2360
|
]
|
|
2351
2361
|
}
|
|
@@ -2355,105 +2365,105 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2355
2365
|
/* @__PURE__ */ n.jsxs("div", { className: "pagination_leftWrap", children: [
|
|
2356
2366
|
/* @__PURE__ */ n.jsxs("span", { className: "pagination_total", children: [
|
|
2357
2367
|
/* @__PURE__ */ n.jsx(
|
|
2358
|
-
|
|
2368
|
+
ft,
|
|
2359
2369
|
{
|
|
2360
2370
|
style: { color: "#2563EB", marginRight: "4px" }
|
|
2361
2371
|
}
|
|
2362
2372
|
),
|
|
2363
2373
|
"已加载: ",
|
|
2364
|
-
|
|
2374
|
+
y,
|
|
2365
2375
|
"/",
|
|
2366
2376
|
a,
|
|
2367
2377
|
"条数据"
|
|
2368
2378
|
] }),
|
|
2369
|
-
!
|
|
2370
|
-
|
|
2379
|
+
!C && /* @__PURE__ */ n.jsx(
|
|
2380
|
+
Gt,
|
|
2371
2381
|
{
|
|
2372
|
-
loadIcon:
|
|
2373
|
-
autoLoading:
|
|
2374
|
-
batchSize:
|
|
2382
|
+
loadIcon: d || void 0,
|
|
2383
|
+
autoLoading: q,
|
|
2384
|
+
batchSize: S,
|
|
2375
2385
|
loadingProgress: g,
|
|
2376
|
-
disabled: !e || !
|
|
2377
|
-
onBatchSizeChange:
|
|
2386
|
+
disabled: !e || !w,
|
|
2387
|
+
onBatchSizeChange: p,
|
|
2378
2388
|
onLoadNextPage: () => e?.(),
|
|
2379
2389
|
onStartAutoLoad: () => {
|
|
2380
|
-
const
|
|
2381
|
-
|
|
2390
|
+
const T = i();
|
|
2391
|
+
w?.(T);
|
|
2382
2392
|
},
|
|
2383
2393
|
onStopLoad: () => u?.()
|
|
2384
2394
|
}
|
|
2385
2395
|
)
|
|
2386
2396
|
] }),
|
|
2387
2397
|
/* @__PURE__ */ n.jsx(
|
|
2388
|
-
|
|
2398
|
+
st,
|
|
2389
2399
|
{
|
|
2390
2400
|
current: t,
|
|
2391
2401
|
pageSize: l,
|
|
2392
2402
|
total: a,
|
|
2393
|
-
onChange: (
|
|
2403
|
+
onChange: (T) => c(T),
|
|
2394
2404
|
showSizeChanger: !1,
|
|
2395
2405
|
showQuickJumper: !1,
|
|
2396
|
-
showTotal: (
|
|
2397
|
-
itemRender:
|
|
2406
|
+
showTotal: (T, A) => "",
|
|
2407
|
+
itemRender: E
|
|
2398
2408
|
}
|
|
2399
2409
|
)
|
|
2400
2410
|
] });
|
|
2401
|
-
},
|
|
2411
|
+
}, zt = (t) => {
|
|
2402
2412
|
const {
|
|
2403
|
-
loading:
|
|
2413
|
+
loading: d,
|
|
2404
2414
|
autoLoading: l,
|
|
2405
2415
|
loadingProgress: a,
|
|
2406
|
-
columns:
|
|
2407
|
-
dataSource:
|
|
2408
|
-
total:
|
|
2416
|
+
columns: o = [],
|
|
2417
|
+
dataSource: y = [],
|
|
2418
|
+
total: q,
|
|
2409
2419
|
current: g,
|
|
2410
|
-
pageSize:
|
|
2420
|
+
pageSize: c,
|
|
2411
2421
|
cachedPages: e,
|
|
2412
|
-
onChangePage:
|
|
2422
|
+
onChangePage: w,
|
|
2413
2423
|
onLoadNextPage: u,
|
|
2414
|
-
onStartAutoLoad:
|
|
2415
|
-
onStopLoading:
|
|
2416
|
-
...
|
|
2417
|
-
} = t,
|
|
2418
|
-
(
|
|
2419
|
-
|
|
2420
|
-
key: `${(
|
|
2424
|
+
onStartAutoLoad: S,
|
|
2425
|
+
onStopLoading: p,
|
|
2426
|
+
...r
|
|
2427
|
+
} = t, C = F(null), i = U(
|
|
2428
|
+
(E) => {
|
|
2429
|
+
w(E), e.includes(E) && C.current?.scrollTo({
|
|
2430
|
+
key: `${(E - 1) * c + 1}`
|
|
2421
2431
|
});
|
|
2422
2432
|
},
|
|
2423
2433
|
[g]
|
|
2424
2434
|
);
|
|
2425
2435
|
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col", children: [
|
|
2426
2436
|
/* @__PURE__ */ n.jsx(
|
|
2427
|
-
|
|
2437
|
+
Be,
|
|
2428
2438
|
{
|
|
2429
|
-
ref:
|
|
2430
|
-
...
|
|
2431
|
-
columns:
|
|
2432
|
-
dataSource:
|
|
2439
|
+
ref: C,
|
|
2440
|
+
...r,
|
|
2441
|
+
columns: o,
|
|
2442
|
+
dataSource: y,
|
|
2433
2443
|
pagination: !1,
|
|
2434
2444
|
virtual: !0
|
|
2435
2445
|
}
|
|
2436
2446
|
),
|
|
2437
2447
|
/* @__PURE__ */ n.jsx(
|
|
2438
|
-
|
|
2448
|
+
Ft,
|
|
2439
2449
|
{
|
|
2440
|
-
loading:
|
|
2450
|
+
loading: d,
|
|
2441
2451
|
autoLoading: l,
|
|
2442
2452
|
loadingProgress: a,
|
|
2443
2453
|
current: g,
|
|
2444
|
-
pageSize:
|
|
2445
|
-
total:
|
|
2446
|
-
loadedCount:
|
|
2454
|
+
pageSize: c,
|
|
2455
|
+
total: q,
|
|
2456
|
+
loadedCount: y.length,
|
|
2447
2457
|
cachedPages: e,
|
|
2448
|
-
onChange:
|
|
2458
|
+
onChange: i,
|
|
2449
2459
|
onLoadNextPage: u,
|
|
2450
|
-
onStartAutoLoad:
|
|
2451
|
-
onStopLoading:
|
|
2460
|
+
onStartAutoLoad: S,
|
|
2461
|
+
onStopLoading: p
|
|
2452
2462
|
}
|
|
2453
2463
|
)
|
|
2454
2464
|
] });
|
|
2455
2465
|
};
|
|
2456
|
-
|
|
2466
|
+
zt.__docgenInfo = {
|
|
2457
2467
|
displayName: "VirtualTable",
|
|
2458
2468
|
description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
|
|
2459
2469
|
props: {
|
|
@@ -2560,79 +2570,79 @@ Ot.__docgenInfo = {
|
|
|
2560
2570
|
}
|
|
2561
2571
|
}
|
|
2562
2572
|
};
|
|
2563
|
-
const
|
|
2573
|
+
const Ht = ({
|
|
2564
2574
|
texts: t = [],
|
|
2565
|
-
placeholder:
|
|
2575
|
+
placeholder: d = "请输入内容",
|
|
2566
2576
|
animationSpeed: l = 100,
|
|
2567
2577
|
autoPlay: a = !0,
|
|
2568
|
-
value:
|
|
2569
|
-
onChange:
|
|
2570
|
-
...
|
|
2578
|
+
value: o,
|
|
2579
|
+
onChange: y,
|
|
2580
|
+
...q
|
|
2571
2581
|
}) => {
|
|
2572
|
-
const [g,
|
|
2573
|
-
|
|
2574
|
-
|
|
2582
|
+
const [g, c] = Q(""), [e, w] = Q(0), [u, S] = Q(!1), [p, r] = Q(!1), [C, i] = Q(!1), E = F(void 0), T = F(void 0), A = F(t), b = F(e), V = F(p), _ = F(g);
|
|
2583
|
+
le(() => {
|
|
2584
|
+
A.current = t, b.current = e, V.current = p, _.current = g;
|
|
2575
2585
|
});
|
|
2576
|
-
const P =
|
|
2577
|
-
let
|
|
2578
|
-
|
|
2579
|
-
const
|
|
2580
|
-
|
|
2586
|
+
const P = U((k, I) => {
|
|
2587
|
+
let Z = 0;
|
|
2588
|
+
i(!0);
|
|
2589
|
+
const te = () => {
|
|
2590
|
+
Z < k.length ? (c(k.slice(0, Z + 1)), Z++, T.current = window.setTimeout(te, l)) : (i(!1), I?.());
|
|
2581
2591
|
};
|
|
2582
|
-
|
|
2583
|
-
}, [l]), D =
|
|
2592
|
+
te();
|
|
2593
|
+
}, [l]), D = U((k) => {
|
|
2584
2594
|
let I = _.current.length;
|
|
2585
|
-
const
|
|
2586
|
-
I > 0 ? (
|
|
2595
|
+
const Z = () => {
|
|
2596
|
+
I > 0 ? (c(_.current.slice(0, I - 1)), I--, T.current = window.setTimeout(Z, l / 2)) : k?.();
|
|
2587
2597
|
};
|
|
2588
|
-
|
|
2589
|
-
}, [l]), B =
|
|
2590
|
-
if (
|
|
2591
|
-
|
|
2592
|
-
const
|
|
2598
|
+
Z();
|
|
2599
|
+
}, [l]), B = U(() => {
|
|
2600
|
+
if (A.current.length === 0 || V.current) return;
|
|
2601
|
+
S(!0);
|
|
2602
|
+
const k = A.current[b.current];
|
|
2593
2603
|
_.current ? D(() => {
|
|
2594
|
-
P(
|
|
2595
|
-
|
|
2596
|
-
|
|
2604
|
+
P(k, () => {
|
|
2605
|
+
E.current = window.setTimeout(() => {
|
|
2606
|
+
w((I) => (I + 1) % A.current.length), S(!1);
|
|
2597
2607
|
}, 2e3);
|
|
2598
2608
|
});
|
|
2599
|
-
}) : P(
|
|
2600
|
-
|
|
2601
|
-
|
|
2609
|
+
}) : P(k, () => {
|
|
2610
|
+
E.current = window.setTimeout(() => {
|
|
2611
|
+
w((I) => (I + 1) % A.current.length), S(!1);
|
|
2602
2612
|
}, 2e3);
|
|
2603
2613
|
});
|
|
2604
2614
|
}, [D, P]);
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
}), [e,
|
|
2608
|
-
!u && a && t.length > 0 && !
|
|
2609
|
-
}, [e, u, a, t.length,
|
|
2610
|
-
const
|
|
2611
|
-
|
|
2612
|
-
},
|
|
2613
|
-
|
|
2614
|
-
},
|
|
2615
|
-
|
|
2616
|
-
},
|
|
2615
|
+
le(() => (a && t.length > 0 && !p && B(), () => {
|
|
2616
|
+
E.current && window.clearTimeout(E.current), T.current && window.clearTimeout(T.current);
|
|
2617
|
+
}), [e, p, a, t.length, B]), le(() => {
|
|
2618
|
+
!u && a && t.length > 0 && !p && B();
|
|
2619
|
+
}, [e, u, a, t.length, p, B]);
|
|
2620
|
+
const X = (k) => {
|
|
2621
|
+
r(!0), E.current && window.clearTimeout(E.current), T.current && window.clearTimeout(T.current), S(!1), i(!1), q.onFocus?.(k);
|
|
2622
|
+
}, z = (k) => {
|
|
2623
|
+
r(!1), !o && t.length > 0 && (c(""), w(0)), q.onBlur?.(k);
|
|
2624
|
+
}, K = (k) => {
|
|
2625
|
+
y?.(k.target.value), q.onChange?.(k);
|
|
2626
|
+
}, ee = () => p || o ? d : g || d;
|
|
2617
2627
|
return /* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
2618
2628
|
/* @__PURE__ */ n.jsx(
|
|
2619
|
-
|
|
2629
|
+
Ke,
|
|
2620
2630
|
{
|
|
2621
|
-
...
|
|
2622
|
-
value:
|
|
2623
|
-
onChange:
|
|
2624
|
-
onFocus:
|
|
2625
|
-
onBlur:
|
|
2626
|
-
placeholder:
|
|
2631
|
+
...q,
|
|
2632
|
+
value: o,
|
|
2633
|
+
onChange: K,
|
|
2634
|
+
onFocus: X,
|
|
2635
|
+
onBlur: z,
|
|
2636
|
+
placeholder: ee(),
|
|
2627
2637
|
style: {
|
|
2628
2638
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2629
|
-
...
|
|
2639
|
+
...q.style,
|
|
2630
2640
|
position: "relative",
|
|
2631
2641
|
zIndex: 1
|
|
2632
2642
|
}
|
|
2633
2643
|
}
|
|
2634
2644
|
),
|
|
2635
|
-
!
|
|
2645
|
+
!p && !o && g && /* @__PURE__ */ n.jsxs(
|
|
2636
2646
|
"div",
|
|
2637
2647
|
{
|
|
2638
2648
|
style: {
|
|
@@ -2653,7 +2663,7 @@ const Mt = ({
|
|
|
2653
2663
|
},
|
|
2654
2664
|
children: [
|
|
2655
2665
|
/* @__PURE__ */ n.jsx("span", { children: g }),
|
|
2656
|
-
|
|
2666
|
+
C && /* @__PURE__ */ n.jsx(
|
|
2657
2667
|
"span",
|
|
2658
2668
|
{
|
|
2659
2669
|
style: {
|
|
@@ -2677,7 +2687,7 @@ const Mt = ({
|
|
|
2677
2687
|
` })
|
|
2678
2688
|
] });
|
|
2679
2689
|
};
|
|
2680
|
-
|
|
2690
|
+
Ht.__docgenInfo = {
|
|
2681
2691
|
displayName: "DynamicInput",
|
|
2682
2692
|
description: "动态文案输入框组件,支持流式文字动画效果",
|
|
2683
2693
|
props: {
|
|
@@ -2722,106 +2732,106 @@ Mt.__docgenInfo = {
|
|
|
2722
2732
|
}
|
|
2723
2733
|
}
|
|
2724
2734
|
};
|
|
2725
|
-
const
|
|
2735
|
+
const Wt = ({
|
|
2726
2736
|
texts: t = [],
|
|
2727
2737
|
// 动态文案数组,默认为空数组
|
|
2728
|
-
placeholder:
|
|
2738
|
+
placeholder: d = "请输入内容",
|
|
2729
2739
|
// 占位符文本
|
|
2730
2740
|
animationSpeed: l = 100,
|
|
2731
2741
|
// 打字机动画速度,毫秒
|
|
2732
2742
|
autoPlay: a = !0,
|
|
2733
2743
|
// 是否自动播放动画
|
|
2734
|
-
value:
|
|
2744
|
+
value: o = "",
|
|
2735
2745
|
// 受控模式的值
|
|
2736
|
-
onChange:
|
|
2746
|
+
onChange: y,
|
|
2737
2747
|
// 受控模式的变化回调
|
|
2738
|
-
onSubmit:
|
|
2748
|
+
onSubmit: q,
|
|
2739
2749
|
// 提交回调
|
|
2740
2750
|
maxLength: g = 500,
|
|
2741
2751
|
// 最大字符数限制
|
|
2742
|
-
showCount:
|
|
2752
|
+
showCount: c = !0,
|
|
2743
2753
|
// 是否显示字数统计
|
|
2744
2754
|
submitText: e = "发送",
|
|
2745
2755
|
// 提交按钮文本
|
|
2746
|
-
disabled:
|
|
2756
|
+
disabled: w = !1,
|
|
2747
2757
|
// 是否禁用组件
|
|
2748
2758
|
rows: u = 4,
|
|
2749
2759
|
// 文本域行数
|
|
2750
|
-
style:
|
|
2760
|
+
style: S,
|
|
2751
2761
|
// 自定义样式
|
|
2752
|
-
...
|
|
2762
|
+
...p
|
|
2753
2763
|
// 其他原生属性
|
|
2754
2764
|
}) => {
|
|
2755
|
-
const [
|
|
2756
|
-
|
|
2757
|
-
|
|
2765
|
+
const [r, C] = Q(""), [i, E] = Q(0), [T, A] = Q(!1), [b, V] = Q(!1), [_, P] = Q(!1), [D, B] = Q(o || ""), X = F(void 0), z = F(void 0), K = F(t), ee = F(i), k = F(b), I = F(r), Z = F(null);
|
|
2766
|
+
le(() => {
|
|
2767
|
+
K.current = t, ee.current = i, k.current = b, I.current = r;
|
|
2758
2768
|
});
|
|
2759
|
-
const
|
|
2769
|
+
const te = U((M, G) => {
|
|
2760
2770
|
let ue = 0;
|
|
2761
2771
|
P(!0);
|
|
2762
|
-
const
|
|
2763
|
-
ue <
|
|
2772
|
+
const be = () => {
|
|
2773
|
+
ue < M.length ? (C(M.slice(0, ue + 1)), ue++, z.current = window.setTimeout(be, l)) : (P(!1), G?.());
|
|
2764
2774
|
};
|
|
2765
|
-
|
|
2766
|
-
}, [l]), pe =
|
|
2775
|
+
be();
|
|
2776
|
+
}, [l]), pe = U((M) => {
|
|
2767
2777
|
let G = I.current.length;
|
|
2768
2778
|
const ue = () => {
|
|
2769
|
-
G > 0 ? (
|
|
2779
|
+
G > 0 ? (C(I.current.slice(0, G - 1)), G--, z.current = window.setTimeout(ue, l / 2)) : M?.();
|
|
2770
2780
|
};
|
|
2771
2781
|
ue();
|
|
2772
|
-
}, [l]),
|
|
2773
|
-
if (
|
|
2774
|
-
|
|
2775
|
-
const
|
|
2782
|
+
}, [l]), ge = U(() => {
|
|
2783
|
+
if (K.current.length === 0 || k.current) return;
|
|
2784
|
+
A(!0);
|
|
2785
|
+
const M = K.current[ee.current];
|
|
2776
2786
|
I.current ? pe(() => {
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2787
|
+
te(M, () => {
|
|
2788
|
+
X.current = window.setTimeout(() => {
|
|
2789
|
+
E((G) => (G + 1) % K.current.length), A(!1);
|
|
2780
2790
|
}, 2e3);
|
|
2781
2791
|
});
|
|
2782
|
-
}) :
|
|
2783
|
-
|
|
2784
|
-
|
|
2792
|
+
}) : te(M, () => {
|
|
2793
|
+
X.current = window.setTimeout(() => {
|
|
2794
|
+
E((G) => (G + 1) % K.current.length), A(!1);
|
|
2785
2795
|
}, 2e3);
|
|
2786
2796
|
});
|
|
2787
|
-
}, [pe,
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
}), [
|
|
2791
|
-
!
|
|
2792
|
-
}, [
|
|
2793
|
-
const s = (
|
|
2794
|
-
V(!0),
|
|
2795
|
-
}, L = (
|
|
2796
|
-
V(!1), !
|
|
2797
|
-
},
|
|
2798
|
-
const G =
|
|
2799
|
-
g && G.length > g || (
|
|
2797
|
+
}, [pe, te]);
|
|
2798
|
+
le(() => (a && t.length > 0 && !b && ge(), () => {
|
|
2799
|
+
X.current && window.clearTimeout(X.current), z.current && window.clearTimeout(z.current);
|
|
2800
|
+
}), [i, b, a, t.length, ge]), le(() => {
|
|
2801
|
+
!T && a && t.length > 0 && !b && ge();
|
|
2802
|
+
}, [i, T, a, t.length, b, ge]);
|
|
2803
|
+
const s = (M) => {
|
|
2804
|
+
V(!0), X.current && window.clearTimeout(X.current), z.current && window.clearTimeout(z.current), A(!1), P(!1), p.onFocus?.(M);
|
|
2805
|
+
}, L = (M) => {
|
|
2806
|
+
V(!1), !o && t.length > 0 && (C(""), E(0)), p.onBlur?.(M);
|
|
2807
|
+
}, Y = (M) => {
|
|
2808
|
+
const G = M.target.value;
|
|
2809
|
+
g && G.length > g || (y ? y(G) : B(G), p.onChange?.(M));
|
|
2800
2810
|
}, ae = () => {
|
|
2801
|
-
const
|
|
2802
|
-
|
|
2803
|
-
},
|
|
2804
|
-
(
|
|
2805
|
-
},
|
|
2806
|
-
return /* @__PURE__ */ n.jsxs("div", { style: { position: "relative", ...
|
|
2811
|
+
const M = y ? o : D;
|
|
2812
|
+
M.trim() && !w && (q?.(M), y || B(""));
|
|
2813
|
+
}, fe = (M) => {
|
|
2814
|
+
(M.ctrlKey || M.metaKey) && M.key === "Enter" && (M.preventDefault(), ae()), p.onKeyDown?.(M);
|
|
2815
|
+
}, ie = y ? o : D, xe = w || !ie.trim() || (g ? ie.length > g : !1);
|
|
2816
|
+
return /* @__PURE__ */ n.jsxs("div", { style: { position: "relative", ...S }, children: [
|
|
2807
2817
|
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
2808
2818
|
/* @__PURE__ */ n.jsx(
|
|
2809
2819
|
"textarea",
|
|
2810
2820
|
{
|
|
2811
|
-
ref:
|
|
2812
|
-
value:
|
|
2813
|
-
onChange:
|
|
2814
|
-
onFocus: (
|
|
2815
|
-
|
|
2821
|
+
ref: Z,
|
|
2822
|
+
value: y ? o : D,
|
|
2823
|
+
onChange: Y,
|
|
2824
|
+
onFocus: (M) => {
|
|
2825
|
+
M.target.style.borderColor = "#1890ff", M.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", s(M);
|
|
2816
2826
|
},
|
|
2817
|
-
onBlur: (
|
|
2818
|
-
|
|
2827
|
+
onBlur: (M) => {
|
|
2828
|
+
M.target.style.borderColor = "#d9d9d9", M.target.style.boxShadow = "none", L(M);
|
|
2819
2829
|
},
|
|
2820
|
-
onKeyDown:
|
|
2821
|
-
placeholder: b ||
|
|
2830
|
+
onKeyDown: fe,
|
|
2831
|
+
placeholder: b || ie ? d : "",
|
|
2822
2832
|
maxLength: g,
|
|
2823
2833
|
rows: u,
|
|
2824
|
-
disabled:
|
|
2834
|
+
disabled: w,
|
|
2825
2835
|
style: {
|
|
2826
2836
|
width: "100%",
|
|
2827
2837
|
minHeight: `${u * 24 + 16}px`,
|
|
@@ -2837,12 +2847,12 @@ const Dt = ({
|
|
|
2837
2847
|
transition: "border-color 0.3s, box-shadow 0.3s",
|
|
2838
2848
|
backgroundColor: "#fff",
|
|
2839
2849
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2840
|
-
...
|
|
2850
|
+
...p.style
|
|
2841
2851
|
},
|
|
2842
|
-
...
|
|
2852
|
+
...p
|
|
2843
2853
|
}
|
|
2844
2854
|
),
|
|
2845
|
-
!b && !
|
|
2855
|
+
!b && !ie && r && /* @__PURE__ */ n.jsxs(
|
|
2846
2856
|
"div",
|
|
2847
2857
|
{
|
|
2848
2858
|
style: {
|
|
@@ -2864,7 +2874,7 @@ const Dt = ({
|
|
|
2864
2874
|
lineHeight: "1.5"
|
|
2865
2875
|
},
|
|
2866
2876
|
children: [
|
|
2867
|
-
/* @__PURE__ */ n.jsx("span", { children:
|
|
2877
|
+
/* @__PURE__ */ n.jsx("span", { children: r }),
|
|
2868
2878
|
_ && /* @__PURE__ */ n.jsx(
|
|
2869
2879
|
"span",
|
|
2870
2880
|
{
|
|
@@ -2891,13 +2901,13 @@ const Dt = ({
|
|
|
2891
2901
|
zIndex: 3
|
|
2892
2902
|
},
|
|
2893
2903
|
children: /* @__PURE__ */ n.jsx(
|
|
2894
|
-
|
|
2904
|
+
we,
|
|
2895
2905
|
{
|
|
2896
2906
|
type: "primary",
|
|
2897
2907
|
size: "small",
|
|
2898
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
2908
|
+
icon: /* @__PURE__ */ n.jsx(mt, {}),
|
|
2899
2909
|
onClick: ae,
|
|
2900
|
-
disabled:
|
|
2910
|
+
disabled: xe,
|
|
2901
2911
|
style: {
|
|
2902
2912
|
borderRadius: 6,
|
|
2903
2913
|
minWidth: 32,
|
|
@@ -2912,7 +2922,7 @@ const Dt = ({
|
|
|
2912
2922
|
}
|
|
2913
2923
|
)
|
|
2914
2924
|
] }),
|
|
2915
|
-
|
|
2925
|
+
c && /* @__PURE__ */ n.jsxs(
|
|
2916
2926
|
"div",
|
|
2917
2927
|
{
|
|
2918
2928
|
style: {
|
|
@@ -2922,7 +2932,7 @@ const Dt = ({
|
|
|
2922
2932
|
color: "#999"
|
|
2923
2933
|
},
|
|
2924
2934
|
children: [
|
|
2925
|
-
|
|
2935
|
+
ie.length,
|
|
2926
2936
|
"/",
|
|
2927
2937
|
g
|
|
2928
2938
|
]
|
|
@@ -2936,7 +2946,7 @@ const Dt = ({
|
|
|
2936
2946
|
` })
|
|
2937
2947
|
] });
|
|
2938
2948
|
};
|
|
2939
|
-
|
|
2949
|
+
Wt.__docgenInfo = {
|
|
2940
2950
|
displayName: "DynamicTextArea",
|
|
2941
2951
|
description: "动态文案文本域组件,支持流式文字动画效果",
|
|
2942
2952
|
props: {
|
|
@@ -3022,88 +3032,88 @@ Dt.__docgenInfo = {
|
|
|
3022
3032
|
}
|
|
3023
3033
|
}
|
|
3024
3034
|
};
|
|
3025
|
-
const
|
|
3035
|
+
const Ye = ({
|
|
3026
3036
|
src: t,
|
|
3027
|
-
poster:
|
|
3037
|
+
poster: d,
|
|
3028
3038
|
width: l = 300,
|
|
3029
3039
|
height: a,
|
|
3030
|
-
videoWidth:
|
|
3040
|
+
videoWidth: o,
|
|
3031
3041
|
// 参数保留但不使用,由CSS控制
|
|
3032
|
-
videoHeight:
|
|
3042
|
+
videoHeight: y,
|
|
3033
3043
|
// 参数保留但不使用,由CSS控制
|
|
3034
|
-
showPlayButton:
|
|
3044
|
+
showPlayButton: q = !0,
|
|
3035
3045
|
autoPlayOnHover: g = !0,
|
|
3036
|
-
onClick:
|
|
3046
|
+
onClick: c,
|
|
3037
3047
|
onVideoLoaded: e,
|
|
3038
|
-
onVideoPlay:
|
|
3048
|
+
onVideoPlay: w,
|
|
3039
3049
|
onVideoPause: u,
|
|
3040
|
-
onVideoEnded:
|
|
3041
|
-
className:
|
|
3042
|
-
style:
|
|
3043
|
-
...
|
|
3050
|
+
onVideoEnded: S,
|
|
3051
|
+
className: p,
|
|
3052
|
+
style: r,
|
|
3053
|
+
...C
|
|
3044
3054
|
}) => {
|
|
3045
|
-
const
|
|
3046
|
-
|
|
3047
|
-
}, [
|
|
3048
|
-
|
|
3049
|
-
}, [u]), B =
|
|
3050
|
-
|
|
3051
|
-
}, [
|
|
3052
|
-
b(!0), g && !
|
|
3053
|
-
}, [g,
|
|
3054
|
-
b(!1), g &&
|
|
3055
|
-
}, [g,
|
|
3055
|
+
const i = F(null), [E, T] = Q(!1), [A, b] = Q(!1), [V, _] = Q(!1), P = U(() => {
|
|
3056
|
+
i.current && (i.current.play(), T(!0), w?.());
|
|
3057
|
+
}, [w]), D = U(() => {
|
|
3058
|
+
i.current && (i.current.pause(), T(!1), u?.());
|
|
3059
|
+
}, [u]), B = U((te) => {
|
|
3060
|
+
te.stopPropagation(), E ? D() : P();
|
|
3061
|
+
}, [E, P, D]), X = U(() => {
|
|
3062
|
+
b(!0), g && !E && P();
|
|
3063
|
+
}, [g, E, P]), z = U(() => {
|
|
3064
|
+
b(!1), g && E && D();
|
|
3065
|
+
}, [g, E, D]), K = U(() => {
|
|
3056
3066
|
_(!0), e?.();
|
|
3057
|
-
}, [e]),
|
|
3058
|
-
|
|
3059
|
-
}, [
|
|
3060
|
-
|
|
3061
|
-
}, [u]), I =
|
|
3062
|
-
|
|
3063
|
-
}, [
|
|
3064
|
-
|
|
3065
|
-
}, [
|
|
3067
|
+
}, [e]), ee = U(() => {
|
|
3068
|
+
T(!0), w?.();
|
|
3069
|
+
}, [w]), k = U(() => {
|
|
3070
|
+
T(!1), u?.();
|
|
3071
|
+
}, [u]), I = U(() => {
|
|
3072
|
+
T(!1), S?.();
|
|
3073
|
+
}, [S]), Z = U((te) => {
|
|
3074
|
+
c?.(te);
|
|
3075
|
+
}, [c]);
|
|
3066
3076
|
return /* @__PURE__ */ n.jsx(
|
|
3067
|
-
|
|
3077
|
+
Pe,
|
|
3068
3078
|
{
|
|
3069
|
-
...
|
|
3070
|
-
className: `video-card ${
|
|
3079
|
+
...C,
|
|
3080
|
+
className: `video-card ${p || ""}`,
|
|
3071
3081
|
style: {
|
|
3072
3082
|
width: l,
|
|
3073
3083
|
height: a,
|
|
3074
3084
|
padding: 0,
|
|
3075
3085
|
overflow: "hidden",
|
|
3076
|
-
cursor:
|
|
3086
|
+
cursor: c ? "pointer" : "default",
|
|
3077
3087
|
border: "none",
|
|
3078
3088
|
borderRadius: 0,
|
|
3079
|
-
...
|
|
3089
|
+
...r
|
|
3080
3090
|
},
|
|
3081
3091
|
bordered: !1,
|
|
3082
|
-
onMouseEnter:
|
|
3083
|
-
onMouseLeave:
|
|
3084
|
-
onClick:
|
|
3092
|
+
onMouseEnter: X,
|
|
3093
|
+
onMouseLeave: z,
|
|
3094
|
+
onClick: Z,
|
|
3085
3095
|
children: /* @__PURE__ */ n.jsxs("div", { className: "video-card-container", children: [
|
|
3086
3096
|
/* @__PURE__ */ n.jsx(
|
|
3087
3097
|
"video",
|
|
3088
3098
|
{
|
|
3089
|
-
ref:
|
|
3099
|
+
ref: i,
|
|
3090
3100
|
src: t,
|
|
3091
|
-
poster:
|
|
3101
|
+
poster: d,
|
|
3092
3102
|
preload: "metadata",
|
|
3093
|
-
onLoadedData:
|
|
3094
|
-
onPlay:
|
|
3095
|
-
onPause:
|
|
3103
|
+
onLoadedData: K,
|
|
3104
|
+
onPlay: ee,
|
|
3105
|
+
onPause: k,
|
|
3096
3106
|
onEnded: I,
|
|
3097
3107
|
muted: !0,
|
|
3098
3108
|
loop: !0
|
|
3099
3109
|
}
|
|
3100
3110
|
),
|
|
3101
|
-
|
|
3111
|
+
q && /* @__PURE__ */ n.jsx(
|
|
3102
3112
|
"div",
|
|
3103
3113
|
{
|
|
3104
|
-
className: `video-play-button ${
|
|
3114
|
+
className: `video-play-button ${A ? "hovered" : ""}`,
|
|
3105
3115
|
onClick: B,
|
|
3106
|
-
children:
|
|
3116
|
+
children: E ? /* @__PURE__ */ n.jsx(yt, { className: "play-icon" }) : /* @__PURE__ */ n.jsx(gt, { className: "play-icon" })
|
|
3107
3117
|
}
|
|
3108
3118
|
),
|
|
3109
3119
|
!V && /* @__PURE__ */ n.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ n.jsx("div", { className: "loading-spinner" }) })
|
|
@@ -3111,7 +3121,7 @@ const ze = ({
|
|
|
3111
3121
|
}
|
|
3112
3122
|
);
|
|
3113
3123
|
};
|
|
3114
|
-
|
|
3124
|
+
Ye.__docgenInfo = {
|
|
3115
3125
|
displayName: "VideoCard",
|
|
3116
3126
|
description: "视频卡片组件,支持鼠标悬浮播放控制",
|
|
3117
3127
|
props: {
|
|
@@ -3212,12 +3222,12 @@ ze.__docgenInfo = {
|
|
|
3212
3222
|
}
|
|
3213
3223
|
}
|
|
3214
3224
|
};
|
|
3215
|
-
const
|
|
3225
|
+
const Ut = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((l) => t.toLowerCase().includes(l)), Xt = (t) => t.type ? t.type : Ut(t.url) ? "video" : "image", Kt = ({
|
|
3216
3226
|
items: t,
|
|
3217
|
-
columns:
|
|
3227
|
+
columns: d,
|
|
3218
3228
|
gap: l = 0,
|
|
3219
3229
|
responsive: a = !0,
|
|
3220
|
-
breakpoints:
|
|
3230
|
+
breakpoints: o = {
|
|
3221
3231
|
xs: 1,
|
|
3222
3232
|
sm: 2,
|
|
3223
3233
|
md: 3,
|
|
@@ -3225,78 +3235,78 @@ const Gt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3225
3235
|
xl: 5,
|
|
3226
3236
|
xxl: 6
|
|
3227
3237
|
},
|
|
3228
|
-
className:
|
|
3229
|
-
style:
|
|
3238
|
+
className: y,
|
|
3239
|
+
style: q,
|
|
3230
3240
|
onClick: g
|
|
3231
3241
|
}) => {
|
|
3232
|
-
const
|
|
3233
|
-
if (!a ||
|
|
3234
|
-
return
|
|
3235
|
-
const
|
|
3236
|
-
return
|
|
3237
|
-
}, [a,
|
|
3238
|
-
if (!
|
|
3239
|
-
const
|
|
3242
|
+
const c = F(null), [e, w] = Q(d || o.md || 3), u = F(/* @__PURE__ */ new Map()), S = U(() => {
|
|
3243
|
+
if (!a || d)
|
|
3244
|
+
return d || o.md || 3;
|
|
3245
|
+
const i = window.innerWidth;
|
|
3246
|
+
return i < 576 ? o.xs || 1 : i < 768 ? o.sm || 2 : i < 992 ? o.md || 3 : i < 1200 ? o.lg || 4 : i < 1600 ? o.xl || 5 : o.xxl || 6;
|
|
3247
|
+
}, [a, d, o]), p = U(() => {
|
|
3248
|
+
if (!c.current) return;
|
|
3249
|
+
const i = e, E = c.current, A = (E.offsetWidth - l * (i - 1)) / i, b = new Array(i).fill(0);
|
|
3240
3250
|
t.forEach((_, P) => {
|
|
3241
3251
|
const D = _.id || P, B = u.current.get(D);
|
|
3242
3252
|
if (!B) return;
|
|
3243
|
-
const
|
|
3244
|
-
B.style.position = "absolute", B.style.left = `${
|
|
3253
|
+
const X = Math.min(...b), z = b.indexOf(X), K = z * (A + l), ee = b[z];
|
|
3254
|
+
B.style.position = "absolute", B.style.left = `${K}px`, B.style.top = `${ee}px`, B.style.width = `${A}px`, b[z] += B.offsetHeight + l;
|
|
3245
3255
|
});
|
|
3246
3256
|
const V = Math.max(...b);
|
|
3247
|
-
|
|
3257
|
+
E.style.height = `${V}px`;
|
|
3248
3258
|
}, [t, e, l]);
|
|
3249
|
-
|
|
3250
|
-
const
|
|
3251
|
-
const
|
|
3252
|
-
|
|
3259
|
+
le(() => {
|
|
3260
|
+
const i = () => {
|
|
3261
|
+
const E = S();
|
|
3262
|
+
E !== e && w(E);
|
|
3253
3263
|
};
|
|
3254
3264
|
if (a)
|
|
3255
|
-
return window.addEventListener("resize",
|
|
3256
|
-
}, [a,
|
|
3257
|
-
const
|
|
3258
|
-
|
|
3265
|
+
return window.addEventListener("resize", i), i(), () => window.removeEventListener("resize", i);
|
|
3266
|
+
}, [a, S, e]), le(() => {
|
|
3267
|
+
const i = setTimeout(() => {
|
|
3268
|
+
p();
|
|
3259
3269
|
}, 100);
|
|
3260
|
-
return () => clearTimeout(
|
|
3261
|
-
}, [t, e,
|
|
3262
|
-
const
|
|
3263
|
-
|
|
3264
|
-
}, [
|
|
3265
|
-
g && g(
|
|
3270
|
+
return () => clearTimeout(i);
|
|
3271
|
+
}, [t, e, p]);
|
|
3272
|
+
const r = U(() => {
|
|
3273
|
+
p();
|
|
3274
|
+
}, [p]), C = U((i) => {
|
|
3275
|
+
g && g(i), i.onClick?.(i);
|
|
3266
3276
|
}, [g]);
|
|
3267
3277
|
return /* @__PURE__ */ n.jsx(
|
|
3268
3278
|
"div",
|
|
3269
3279
|
{
|
|
3270
|
-
ref:
|
|
3271
|
-
className: `waterfall-container ${
|
|
3280
|
+
ref: c,
|
|
3281
|
+
className: `waterfall-container ${y || ""}`,
|
|
3272
3282
|
style: {
|
|
3273
3283
|
position: "relative",
|
|
3274
3284
|
width: "100%",
|
|
3275
|
-
...
|
|
3285
|
+
...q
|
|
3276
3286
|
},
|
|
3277
|
-
children: t.map((
|
|
3278
|
-
const
|
|
3287
|
+
children: t.map((i, E) => {
|
|
3288
|
+
const T = i.id || E, A = Xt(i);
|
|
3279
3289
|
return /* @__PURE__ */ n.jsx(
|
|
3280
3290
|
"div",
|
|
3281
3291
|
{
|
|
3282
3292
|
ref: (b) => {
|
|
3283
|
-
b ? u.current.set(
|
|
3293
|
+
b ? u.current.set(T, b) : u.current.delete(T);
|
|
3284
3294
|
},
|
|
3285
3295
|
className: "waterfall-item",
|
|
3286
|
-
children:
|
|
3296
|
+
children: A === "video" ? /* @__PURE__ */ n.jsx("div", { style: {
|
|
3287
3297
|
width: "100%",
|
|
3288
3298
|
position: "relative",
|
|
3289
3299
|
paddingBottom: "56.25%",
|
|
3290
|
-
cursor: g ||
|
|
3300
|
+
cursor: g || i.onClick ? "pointer" : "default"
|
|
3291
3301
|
}, children: /* @__PURE__ */ n.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ n.jsx(
|
|
3292
|
-
|
|
3302
|
+
Ye,
|
|
3293
3303
|
{
|
|
3294
|
-
src:
|
|
3295
|
-
poster:
|
|
3304
|
+
src: i.url,
|
|
3305
|
+
poster: i.poster,
|
|
3296
3306
|
width: "100%",
|
|
3297
3307
|
height: "100%",
|
|
3298
|
-
onClick: () =>
|
|
3299
|
-
onVideoLoaded:
|
|
3308
|
+
onClick: () => C(i),
|
|
3309
|
+
onVideoLoaded: r,
|
|
3300
3310
|
autoPlayOnHover: !0,
|
|
3301
3311
|
showPlayButton: !1
|
|
3302
3312
|
}
|
|
@@ -3304,29 +3314,29 @@ const Gt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3304
3314
|
"div",
|
|
3305
3315
|
{
|
|
3306
3316
|
className: "waterfall-image-wrapper",
|
|
3307
|
-
onClick: () =>
|
|
3308
|
-
style: { cursor: g ||
|
|
3317
|
+
onClick: () => C(i),
|
|
3318
|
+
style: { cursor: g || i.onClick ? "pointer" : "default" },
|
|
3309
3319
|
children: /* @__PURE__ */ n.jsx(
|
|
3310
3320
|
"img",
|
|
3311
3321
|
{
|
|
3312
|
-
src:
|
|
3313
|
-
alt: `瀑布流图片 ${
|
|
3322
|
+
src: i.url,
|
|
3323
|
+
alt: `瀑布流图片 ${E + 1}`,
|
|
3314
3324
|
className: "waterfall-image",
|
|
3315
|
-
onLoad:
|
|
3316
|
-
onError:
|
|
3325
|
+
onLoad: r,
|
|
3326
|
+
onError: r,
|
|
3317
3327
|
style: { display: "block", width: "100%", height: "auto" }
|
|
3318
3328
|
}
|
|
3319
3329
|
)
|
|
3320
3330
|
}
|
|
3321
3331
|
)
|
|
3322
3332
|
},
|
|
3323
|
-
|
|
3333
|
+
T
|
|
3324
3334
|
);
|
|
3325
3335
|
})
|
|
3326
3336
|
}
|
|
3327
3337
|
);
|
|
3328
3338
|
};
|
|
3329
|
-
|
|
3339
|
+
Kt.__docgenInfo = {
|
|
3330
3340
|
displayName: "Waterfall",
|
|
3331
3341
|
description: "瀑布流布局组件,支持图片和视频混合展示",
|
|
3332
3342
|
props: {
|
|
@@ -3382,8 +3392,8 @@ zt.__docgenInfo = {
|
|
|
3382
3392
|
}
|
|
3383
3393
|
}
|
|
3384
3394
|
};
|
|
3385
|
-
const
|
|
3386
|
-
algorithm:
|
|
3395
|
+
const tn = {
|
|
3396
|
+
algorithm: it.defaultAlgorithm,
|
|
3387
3397
|
token: {
|
|
3388
3398
|
// 主色
|
|
3389
3399
|
colorPrimary: "#3b82f6",
|
|
@@ -3449,21 +3459,21 @@ const Yt = {
|
|
|
3449
3459
|
}
|
|
3450
3460
|
};
|
|
3451
3461
|
export {
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3462
|
+
$t as AdvancedTable,
|
|
3463
|
+
Tt as AppModal,
|
|
3464
|
+
qt as BackButton,
|
|
3465
|
+
wt as Button,
|
|
3466
|
+
Et as Card,
|
|
3467
|
+
Ht as DynamicInput,
|
|
3468
|
+
Wt as DynamicTextArea,
|
|
3469
|
+
St as EmptyAndSpin,
|
|
3470
|
+
At as LinkButton,
|
|
3471
|
+
kt as PageTable,
|
|
3472
|
+
Mt as RichTextEditor,
|
|
3473
|
+
Ye as VideoCard,
|
|
3474
|
+
zt as VirtualTable,
|
|
3475
|
+
Kt as Waterfall,
|
|
3476
|
+
Ct as XcIcon,
|
|
3477
|
+
tn as lightTheme
|
|
3468
3478
|
};
|
|
3469
3479
|
//# sourceMappingURL=index.es.js.map
|